@ckeditor/ckeditor5-comments 47.6.1 → 48.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 +1 -1
- package/ckeditor5-metadata.json +53 -53
- package/{src → dist}/annotations/annotation.d.ts +4 -4
- package/{src → dist}/annotations/annotationcollection.d.ts +2 -2
- package/{src → dist}/annotations/annotations.d.ts +3 -3
- package/{src → dist}/annotations/annotationsuis.d.ts +2 -2
- package/{src → dist}/annotations/editorannotations.d.ts +1 -1
- package/{src → dist}/annotations/inlineannotations.d.ts +2 -2
- package/{src → dist}/annotations/narrowsidebar.d.ts +2 -2
- package/{src → dist}/annotations/sidebar.d.ts +2 -2
- package/{src → dist}/annotations/view/annotationcounterbuttonview.d.ts +2 -2
- package/{src → dist}/annotations/view/annotationview.d.ts +2 -2
- package/{src → dist}/annotations/view/sidebaritemview.d.ts +2 -2
- package/{src → dist}/annotations/view/sidebarview.d.ts +2 -2
- package/{src → dist}/annotations/widesidebar.d.ts +1 -1
- package/{src → dist}/comments/addcommentthreadcommand.d.ts +2 -2
- package/{src → dist}/comments/commentsarchive.d.ts +2 -2
- package/{src → dist}/comments/commentsarchiveui.d.ts +2 -2
- package/{src → dist}/comments/commentsediting.d.ts +3 -3
- package/{src → dist}/comments/commentsrepository.d.ts +7 -7
- package/{src → dist}/comments/commentsui.d.ts +1 -1
- package/{src → dist}/comments/integrations/clipboard.d.ts +2 -2
- package/{src → dist}/comments/integrations/commentsrestrictededitingmode.d.ts +1 -1
- package/{src → dist}/comments/integrations/importword.d.ts +1 -1
- package/{src → dist}/comments/integrations/showcommenthighlights.d.ts +1 -1
- package/{src → dist}/comments/ui/commenteditor/commenteditor.d.ts +3 -3
- package/{src → dist}/comments/ui/commenteditor/commenteditorui.d.ts +2 -2
- package/{src → dist}/comments/ui/commenteditor/commenteditoruiview.d.ts +3 -3
- package/{src → dist}/comments/ui/commentthreadcontroller.d.ts +2 -2
- package/{src → dist}/comments/ui/view/basecommentthreadview.d.ts +3 -3
- package/{src → dist}/comments/ui/view/basecommentview.d.ts +3 -3
- package/{src → dist}/comments/ui/view/collapsedcommentsview.d.ts +2 -2
- package/{src → dist}/comments/ui/view/commentcontentview.d.ts +2 -2
- package/{src → dist}/comments/ui/view/commentinputview.d.ts +3 -3
- package/{src → dist}/comments/ui/view/commentsarchiveview.d.ts +2 -2
- package/{src → dist}/comments/ui/view/commentslistview.d.ts +2 -2
- package/{src → dist}/comments/ui/view/commentthreadheadercontextview.d.ts +2 -2
- package/{src → dist}/comments/ui/view/commentthreadheaderview.d.ts +2 -2
- package/{src → dist}/comments/ui/view/commentthreadinputview.d.ts +4 -4
- package/{src → dist}/comments/ui/view/commentthreadview.d.ts +4 -4
- package/{src → dist}/comments/ui/view/commentview.d.ts +5 -5
- package/{src → dist}/comments.d.ts +1 -1
- package/{src → dist}/commentsonly.d.ts +1 -1
- package/{src → dist}/config.d.ts +1 -1
- package/dist/index-content.css +15 -15
- package/dist/index-editor.css +468 -496
- package/dist/index.css +472 -736
- package/dist/index.js +11 -11
- 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/{src → dist}/utils/common-translations.d.ts +1 -1
- package/package.json +27 -52
- package/build/comments.js +0 -5
- package/build/translations/af.js +0 -1
- package/build/translations/ar.js +0 -1
- package/build/translations/ast.js +0 -1
- package/build/translations/az.js +0 -1
- package/build/translations/be.js +0 -1
- package/build/translations/bg.js +0 -1
- package/build/translations/bn.js +0 -1
- package/build/translations/bs.js +0 -1
- package/build/translations/ca.js +0 -1
- package/build/translations/cs.js +0 -1
- package/build/translations/da.js +0 -1
- package/build/translations/de-ch.js +0 -1
- package/build/translations/de.js +0 -1
- package/build/translations/el.js +0 -1
- package/build/translations/en-au.js +0 -1
- package/build/translations/en-gb.js +0 -1
- package/build/translations/eo.js +0 -1
- package/build/translations/es-co.js +0 -1
- package/build/translations/es.js +0 -1
- package/build/translations/et.js +0 -1
- package/build/translations/eu.js +0 -1
- package/build/translations/fa.js +0 -1
- package/build/translations/fi.js +0 -1
- package/build/translations/fr.js +0 -1
- package/build/translations/gl.js +0 -1
- package/build/translations/gu.js +0 -1
- package/build/translations/he.js +0 -1
- package/build/translations/hi.js +0 -1
- package/build/translations/hr.js +0 -1
- package/build/translations/hu.js +0 -1
- package/build/translations/hy.js +0 -1
- package/build/translations/id.js +0 -1
- package/build/translations/it.js +0 -1
- package/build/translations/ja.js +0 -1
- package/build/translations/jv.js +0 -1
- package/build/translations/kk.js +0 -1
- package/build/translations/km.js +0 -1
- package/build/translations/kn.js +0 -1
- package/build/translations/ko.js +0 -1
- package/build/translations/ku.js +0 -1
- package/build/translations/lt.js +0 -1
- package/build/translations/lv.js +0 -1
- package/build/translations/ms.js +0 -1
- package/build/translations/nb.js +0 -1
- package/build/translations/ne.js +0 -1
- package/build/translations/nl.js +0 -1
- package/build/translations/no.js +0 -1
- package/build/translations/oc.js +0 -1
- package/build/translations/pl.js +0 -1
- package/build/translations/pt-br.js +0 -1
- package/build/translations/pt.js +0 -1
- package/build/translations/ro.js +0 -1
- package/build/translations/ru.js +0 -1
- package/build/translations/si.js +0 -1
- package/build/translations/sk.js +0 -1
- package/build/translations/sl.js +0 -1
- package/build/translations/sq.js +0 -1
- package/build/translations/sr-latn.js +0 -1
- package/build/translations/sr.js +0 -1
- package/build/translations/sv.js +0 -1
- package/build/translations/th.js +0 -1
- package/build/translations/ti.js +0 -1
- package/build/translations/tk.js +0 -1
- package/build/translations/tr.js +0 -1
- package/build/translations/tt.js +0 -1
- package/build/translations/ug.js +0 -1
- package/build/translations/uk.js +0 -1
- package/build/translations/ur.js +0 -1
- package/build/translations/uz.js +0 -1
- package/build/translations/vi.js +0 -1
- package/build/translations/zh-cn.js +0 -1
- package/build/translations/zh.js +0 -1
- package/lang/contexts.json +0 -42
- package/lang/translations/af.po +0 -176
- package/lang/translations/ar.po +0 -184
- package/lang/translations/ast.po +0 -176
- package/lang/translations/az.po +0 -176
- package/lang/translations/be.po +0 -178
- package/lang/translations/bg.po +0 -176
- package/lang/translations/bn.po +0 -176
- package/lang/translations/bs.po +0 -178
- package/lang/translations/ca.po +0 -176
- package/lang/translations/cs.po +0 -178
- package/lang/translations/da.po +0 -176
- package/lang/translations/de-ch.po +0 -176
- package/lang/translations/de.po +0 -176
- package/lang/translations/el.po +0 -176
- package/lang/translations/en-au.po +0 -176
- package/lang/translations/en-gb.po +0 -176
- package/lang/translations/en.po +0 -176
- package/lang/translations/eo.po +0 -176
- package/lang/translations/es-co.po +0 -176
- package/lang/translations/es.po +0 -176
- package/lang/translations/et.po +0 -176
- package/lang/translations/eu.po +0 -176
- package/lang/translations/fa.po +0 -174
- package/lang/translations/fi.po +0 -176
- package/lang/translations/fr.po +0 -176
- package/lang/translations/gl.po +0 -176
- package/lang/translations/gu.po +0 -176
- package/lang/translations/he.po +0 -176
- package/lang/translations/hi.po +0 -176
- package/lang/translations/hr.po +0 -178
- package/lang/translations/hu.po +0 -176
- package/lang/translations/hy.po +0 -176
- package/lang/translations/id.po +0 -174
- package/lang/translations/it.po +0 -176
- package/lang/translations/ja.po +0 -174
- package/lang/translations/jv.po +0 -176
- package/lang/translations/kk.po +0 -176
- package/lang/translations/km.po +0 -174
- package/lang/translations/kn.po +0 -176
- package/lang/translations/ko.po +0 -174
- package/lang/translations/ku.po +0 -176
- package/lang/translations/lt.po +0 -178
- package/lang/translations/lv.po +0 -178
- package/lang/translations/ms.po +0 -174
- package/lang/translations/nb.po +0 -176
- package/lang/translations/ne.po +0 -176
- package/lang/translations/nl.po +0 -176
- package/lang/translations/no.po +0 -176
- package/lang/translations/oc.po +0 -176
- package/lang/translations/pl.po +0 -178
- package/lang/translations/pt-br.po +0 -176
- package/lang/translations/pt.po +0 -176
- package/lang/translations/ro.po +0 -178
- package/lang/translations/ru.po +0 -178
- package/lang/translations/si.po +0 -176
- package/lang/translations/sk.po +0 -178
- package/lang/translations/sl.po +0 -180
- package/lang/translations/sq.po +0 -176
- package/lang/translations/sr-latn.po +0 -178
- package/lang/translations/sr.po +0 -178
- package/lang/translations/sv.po +0 -176
- package/lang/translations/th.po +0 -174
- package/lang/translations/ti.po +0 -176
- package/lang/translations/tk.po +0 -176
- package/lang/translations/tr.po +0 -176
- package/lang/translations/tt.po +0 -174
- package/lang/translations/ug.po +0 -174
- package/lang/translations/uk.po +0 -178
- package/lang/translations/ur.po +0 -176
- package/lang/translations/uz.po +0 -176
- package/lang/translations/vi.po +0 -174
- package/lang/translations/zh-cn.po +0 -174
- package/lang/translations/zh.po +0 -174
- package/src/annotations/annotation.js +0 -24
- package/src/annotations/annotationcollection.js +0 -23
- package/src/annotations/annotations.js +0 -23
- package/src/annotations/annotationsuis.js +0 -23
- package/src/annotations/editorannotations.js +0 -23
- package/src/annotations/inlineannotations.js +0 -23
- package/src/annotations/narrowsidebar.js +0 -23
- package/src/annotations/sidebar.js +0 -23
- package/src/annotations/view/annotationcounterbuttonview.js +0 -23
- package/src/annotations/view/annotationview.js +0 -23
- package/src/annotations/view/sidebaritemview.js +0 -24
- package/src/annotations/view/sidebarview.js +0 -24
- package/src/annotations/widesidebar.js +0 -23
- package/src/augmentation.js +0 -23
- package/src/comments/addcommentthreadcommand.js +0 -23
- package/src/comments/commentsarchive.js +0 -23
- package/src/comments/commentsarchiveui.js +0 -23
- package/src/comments/commentsediting.js +0 -23
- package/src/comments/commentsrepository.js +0 -25
- package/src/comments/commentsui.js +0 -23
- package/src/comments/integrations/clipboard.js +0 -23
- package/src/comments/integrations/commentsrestrictededitingmode.js +0 -23
- package/src/comments/integrations/importword.js +0 -23
- package/src/comments/integrations/showcommenthighlights.js +0 -23
- package/src/comments/ui/commenteditor/commenteditor.js +0 -24
- package/src/comments/ui/commenteditor/commenteditorui.js +0 -23
- package/src/comments/ui/commenteditor/commenteditoruiview.js +0 -23
- package/src/comments/ui/commentthreadcontroller.js +0 -24
- package/src/comments/ui/view/basecommentthreadview.js +0 -23
- package/src/comments/ui/view/basecommentview.js +0 -23
- package/src/comments/ui/view/collapsedcommentsview.js +0 -23
- package/src/comments/ui/view/commentcontentview.js +0 -23
- package/src/comments/ui/view/commentinputview.js +0 -23
- package/src/comments/ui/view/commentsarchiveview.js +0 -23
- package/src/comments/ui/view/commentslistview.js +0 -23
- package/src/comments/ui/view/commentthreadheadercontextview.js +0 -23
- package/src/comments/ui/view/commentthreadheaderview.js +0 -23
- package/src/comments/ui/view/commentthreadinputview.js +0 -23
- package/src/comments/ui/view/commentthreadview.js +0 -24
- package/src/comments/ui/view/commentview.js +0 -24
- package/src/comments.js +0 -23
- package/src/commentsonly.js +0 -23
- package/src/config.js +0 -23
- package/src/index.js +0 -23
- package/src/utils/common-translations.js +0 -23
- package/src/utils/createmutationobserver.js +0 -23
- package/src/utils/splitmarkername.js +0 -23
- package/theme/annotation-inline.css +0 -50
- package/theme/annotation.css +0 -151
- package/theme/comment.css +0 -182
- package/theme/commentinput.css +0 -103
- package/theme/commentmarker.css +0 -45
- package/theme/commentsarchive.css +0 -49
- package/theme/commentthread.css +0 -256
- package/theme/sidebar-narrow.css +0 -91
- package/theme/sidebar.css +0 -72
- /package/{src → dist}/augmentation.d.ts +0 -0
- /package/{src → dist}/index.d.ts +0 -0
- /package/{src → dist}/utils/createmutationobserver.d.ts +0 -0
- /package/{src → dist}/utils/splitmarkername.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x199e79={}){function _0x12295b(_0x5ee57d){return _0x5ee57d['map'](_0x54cb61=>String['fromCharCode'](_0x54cb61))['join']('');}(_0x199e79=Object['assign']({},_0x199e79))['plugins']||(_0x199e79['plugins']=hs['defaultPlugins']),super(_0x199e79),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x12295b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12295b([0x76,0x69,0x65,0x77])][_0x12295b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x12295b([0x61,0x75,0x74,0x6f]),this[_0x12295b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x12295b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x12295b([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x12295b([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x12295b([0x6f,0x6b])});}['create'](){const _0x4bdf45=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4bdf45))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3e254c=>{const _0x51d7d1=this['model']['document']['getRoot'](),_0x204924=_0x51d7d1&&_0x51d7d1['getChild'](_0x51d7d1['childCount']-0x1);_0x3e254c['setSelection'](_0x204924,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1f91bb=this['editing']['view'],_0x5d4422=_0x1f91bb['document']['getRoot'](),_0x1ba586=_0x5d4422['getChild'](0x0);_0x5d4422['childCount']>0x1||!_0x1ba586||'p'!=_0x1ba586['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x1f91bb,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1ba586['placeholder']=this['placeholder']),Ft({'view':_0x1f91bb,'element':_0x1ba586,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1ba586);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x23ddad,_0x22caa6={}){super(_0x23ddad),this['editor']=null,this['_editorConfig']=_0x22caa6,this['set']('value',_0x22caa6['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x23ddad,'Reply...')),this['set']('submitLabel',N(_0x23ddad,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x37af46(),this['focusCycler']=new _0x599a03({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x189b42,_0x4a2489)=>{this['cancelButtonView']['fire']('execute'),_0x4a2489();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3da45b,_0x213218)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x213218());}),this['on']('submit',(_0x35375c,_0x146a85)=>{_0x146a85['length']>0xfde8?(alert(N(_0x23ddad,'TOO_LONG_COMMENT_ALERT',[_0x146a85['length'],0xfde8])),_0x35375c['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x429d59=this['editor'];this['element']['insertBefore'](_0x429d59['ui']['element'],this['element']['firstChild']),_0x429d59['model']['document']['on']('change',()=>this['value']=_0x429d59['getData']()),_0x429d59['bind']('placeholder')['to'](this),this['focusables']['add'](_0x429d59['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x131db2){-0x1===_0x131db2?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x6936f7}=this,_0x1f99ff=new _0x1c15c2(_0x6936f7);return _0x1f99ff['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1f99ff['withText']=!0x0,_0x1f99ff['bind']('label')['to'](this,'submitLabel'),_0x1f99ff['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1f99ff['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1c2cd6,_0x2196fd)=>!_0x2196fd&&!!_0x1c2cd6['trim']()),_0x1f99ff;}['_createCancelButton'](){const {locale:_0x2f6d73}=this,_0x4c1131=new _0x1c15c2(_0x2f6d73);return _0x4c1131['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4c1131['label']=N(_0x2f6d73,'Cancel'),_0x4c1131['withText']=!0x0,_0x4c1131['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4c1131;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x14a6c8=>{this['focusTracker']['add'](_0x14a6c8['element']);}),this['focusables']['on']('change',(_0x49e89d,_0x43a7bd)=>{for(const _0x590526 of Array['from'](_0x43a7bd['added'])['reverse']())this['focusTracker']['add'](_0x590526['element']);});}}class ie extends kt{constructor(_0x3a43a7,_0x85e269,_0x3b61f8){super(_0x3a43a7),this['commentInputView']=new es(_0x3a43a7,_0x3b61f8),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1f3613,_0x4560be)=>_0x1f3613||!!_0x4560be),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x3848c4(_0x3a43a7,_0x85e269),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x543995){this['commentInputView']['focus'](_0x543995);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xa28e70,_0x4b43e4)=>{const {submitButtonView:_0x58cfa8,cancelButtonView:_0x3d8a86,editor:_0x45f86b}=this['commentInputView'];[_0x58cfa8['element'],_0x3d8a86['element'],_0x45f86b?_0x45f86b['editing']['view']['getDomRoot']():null]['filter'](_0x24255f=>_0x24255f)['some'](_0x5c0534=>_0x5c0534['contains'](_0x4b43e4['target']))||(this['focus'](),_0x4b43e4['preventDefault']());});}}class rs extends kt{constructor(_0x35c418){super(_0x35c418);const _0x2992d4=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2992d4['to']('count',_0x1289ea=>N(_0x35c418,'NUMBER_OF_COMMENTS',_0x1289ea))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x145dbc,_0x53c1f1,_0xb7dc05){super(_0x145dbc);const _0x4036d0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x53c1f1['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x53c1f1,this['_config']=_0xb7dc05,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x37af46(),this['keystrokes']=new jt(),this['focusCycler']=new _0x599a03({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x46b3b0=>this['commentViews']['map'](_0x38094e=>_0x38094e['element'])['includes'](_0x46b3b0['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x145dbc),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x341833=>_0x341833-this['_config']['maxCommentsWhenCollapsed']);for(const _0x27eff0 of _0x53c1f1['comments'])this['_handleNewCommentModel'](_0x27eff0);this['_handleInfoComment'](),this['listenTo'](_0x53c1f1['comments'],'add',(_0x527d9e,_0x201ad1)=>{const _0xc411e9=this['_calculatePosition'](_0x201ad1);this['length']++,this['_handleNewCommentModel'](_0x201ad1,_0xc411e9),this['refreshVisibleViews']();}),this['listenTo'](_0x53c1f1['comments'],'remove',(_0x41a1cc,_0x36b93b)=>{this['length']--,this['_handleRemoveCommentModel'](_0x36b93b),this['refreshVisibleViews']();}),this['listenTo'](_0x53c1f1,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x53c1f1,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x4036d0['if']('length','ck-hidden',_0x55e6d1=>!_0x55e6d1)],'aria-label':N(_0x145dbc,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x1effbd){-0x1===_0x1effbd?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x289583 of this['commentViews'])_0x289583['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x21ad1f,_0x5a1664){const _0x357774=new this['_config']['CommentView'](this['locale'],_0x21ad1f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x357774['viewUid']=_0x21ad1f['id'],_0x357774['delegate']('removeComment')['to'](this),_0x357774['delegate']('updateComment')['to'](this),_0x357774['delegate']('resolveCommentThread')['to'](this),_0x357774['delegate']('editorReady')['to'](this),_0x357774['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x357774,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x357774,_0x5a1664);}['_calculatePosition'](_0x1e58a3){const _0xba9f44=this['_model']['_findOptimalIndex'](_0x1e58a3);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1e58a3['authoredAt']?_0xba9f44-0x1:_0xba9f44:_0xba9f44-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x1614f4={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x1614f4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x1614f4));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x20aec0){const _0x5a819d=this['commentViews']['remove'](_0x20aec0['id']);this['stopListening'](_0x5a819d),_0x5a819d['isEditMode']&&this['_updateHasDirtyComment'](),_0x5a819d['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5bbb7b=>_0x5bbb7b['isEditMode']);}['_rearrangeCollapse'](){const _0x40c585=function(_0x2ea1b1){const _0x387418=new _0x3d0741();for(const _0x11e761 of _0x2ea1b1)_0x387418['add'](_0x11e761);return _0x387418;}(this['commentViews']),_0x29c697=this['_collapsedCommentsView']['count'];for(let _0x45815f=0x1;_0x45815f<=_0x29c697;_0x45815f++)_0x40c585['remove'](0x1);for(const _0x115dd7 of _0x40c585)_0x115dd7['collapse']();_0x29c697>0x0&&_0x40c585['add'](this['_collapsedCommentsView'],0x1),ns(_0x58ed47(Array['from'](this['visibleViews']),Array['from'](_0x40c585)),this['visibleViews'],_0x40c585);}['_rearrangeExpand'](){ns(_0x58ed47(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4942f9 of this['visibleViews'])_0x4942f9['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x31c65a=>{this['focusTracker']['add'](_0x31c65a['element']),this['keystrokes']['listenTo'](_0x31c65a['element']);}),this['commentViews']['on']('change',(_0x171f9c,_0x4e7323)=>{for(const _0x4be409 of _0x4e7323['removed'])this['focusTracker']['remove'](_0x4be409['element']),this['keystrokes']['stopListening'](_0x4be409['element']);for(const _0x35a5dc of Array['from'](_0x4e7323['added'])['reverse']())this['focusTracker']['add'](_0x35a5dc['element']),this['keystrokes']['listenTo'](_0x35a5dc['element']);});}}function ns(_0x16f5ea,_0x48990c,_0x23e89d){let _0x1618e3=0x0;for(const _0x34a1b9 of _0x16f5ea)switch(_0x34a1b9){case'insert':_0x48990c['add'](_0x23e89d['get'](_0x1618e3),_0x1618e3),_0x1618e3++;break;case'delete':_0x48990c['remove'](_0x1618e3);break;case'equal':_0x1618e3++;}}class oe extends kt{constructor(_0x35eb28){super(_0x35eb28);const _0x55c4ad=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x55c4ad['to']('contextValue',_0x4913ae=>N(_0x35eb28,'THREAD_CONTEXT_LABEL',_0x4913ae)),'tabindex':-0x1},'children':[{'text':_0x55c4ad['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x69bc7f,_0x595244){super(_0x69bc7f);const _0x537e37=this['bindTemplate'];this['_model']=_0x595244,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x37af46(),this['keystrokes']=new jt(),this['focusCycler']=new _0x599a03({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x362c15=>!!_0x362c15),this['bind']('contextValue')['to'](this['_model'],'context',_0x384b8d=>_0x384b8d&&_0x384b8d['value']?this['_trimContextValue'](_0x384b8d['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x537e37['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x153660=new _0x1c15c2(this['locale']);return _0x153660['label']=N(this['locale'],'Reopen'),_0x153660['tooltip']=N(this['locale'],'Reopen'),_0x153660['icon']=_0x10fb73,_0x153660['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2ccdf1=>!_0x2ccdf1),_0x153660['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x72d175,_0x3838b5)=>_0x72d175&&_0x3838b5),_0x153660['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x153660;}['_trimContextValue'](_0x2b1aec){if(_0x2b1aec['length']<0x96)return _0x2b1aec;const _0x1f61d6=_0x2b1aec['lastIndexOf']('\x20',0x93);return _0x2b1aec['substring'](0x0,_0x1f61d6>-0x1?_0x1f61d6:0x93)+'...';}['_attachContextActions'](){const _0x175a1d=this['element']['querySelector']('.ck-context'),_0x18beb9=_0x175a1d['querySelector']('.ck-context__value');this['listenTo'](_0x175a1d,'mouseenter',()=>{_0x18beb9['offsetWidth']<_0x18beb9['scrollWidth']&&_0x175a1d['classList']['add']('overlay');}),this['listenTo'](_0x175a1d,'mouseleave',()=>{_0x175a1d['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3c07e6 of this['focusables'])this['focusTracker']['add'](_0x3c07e6['element']),this['keystrokes']['listenTo'](_0x3c07e6['element']);}['_createContextView'](){const _0x4ac47d=new oe(this['locale']);return _0x4ac47d['bind']('contextValue')['to'](this),_0x4ac47d;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5a8e18,_0x3766e6,_0x447cc4,_0x5b0835){super(_0x5a8e18),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3766e6,this['_localUser']=_0x447cc4,this['_config']=_0x5b0835,this['commentThreadHeaderView']=new Xt(_0x5a8e18,_0x3766e6),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5a8e18,N(_0x5a8e18,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5a8e18,_0x3766e6,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5b0835)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x3cddf4,_0x2a4cf1)=>_0x3cddf4||!!_0x2a4cf1),this['bind']('isUnlinked')['to'](_0x3766e6,'unlinkedAt',_0x23415f=>!!_0x23415f),this['bind']('ariaLabel')['to'](this,'length',_0x49be2f=>{const _0x17b4fa=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x49be2f,_0x17b4fa]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x37af46(),this['keystrokes']=new jt(),this['focusCycler']=new _0x599a03({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3ec53c=>_0x3ec53c['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3c62b7=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x50807b=_0x3c62b7['commentInputView'];return _0x3c62b7['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x50807b,'value',(_0x4cbb97,_0x2e9a4a,_0x288785,_0x570f44,_0x2f6748)=>!!_0x2f6748||!!_0x570f44&&_0x288785&&!_0x2e9a4a||_0x4cbb97&&_0x288785&&!_0x2e9a4a),_0x50807b['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x512e50,_0x124713,_0x1e1c1d)=>{let _0x4a40e6;return _0x4a40e6=_0x1e1c1d&&_0x124713?'Reply\x20to\x20reopen\x20discussion...':_0x512e50?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x4a40e6);}),_0x50807b['bind']('submitLabel')['to'](this,'length',_0x1b4feb=>N(this['locale'],_0x1b4feb?'Reply':'Comment')),_0x50807b['on']('submit',(_0x359d93,_0xcadbf9)=>{this['fire']('addComment',_0xcadbf9),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x50807b['on']('cancel',()=>{this['focus']();}),_0x50807b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x50807b['on']('cancel',_0x370b60=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x370b60['stop']());}),this['on']('change:isActive',(_0x442a36,_0x4370fb,_0x2ace9c)=>{_0x2ace9c||this['length']||_0x50807b['value']||this['fire']('removeCommentThread');}),_0x3c62b7;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x4e6f5b(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5f3b26,target:_0x26ec1e,type:_0x54db84,isVisible:_0x30958e=!0x0}){super(),this['view']=_0x5f3b26,this['view']['element']||this['view']['render'](),this['_type']=_0x54db84,this['_target']=_0x26ec1e,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3d0741([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5e6452,_0x4c610b)=>{this['view']['focusTracker']['add'](_0x4c610b);}),this['focusableElements']['on']('remove',(_0x459965,_0x3ddb47)=>{this['view']['focusTracker']['remove'](_0x3ddb47);}),this['set']('isVisible',_0x30958e);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x174d20=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x174d20),_0x174d20;}get['targetRect'](){const _0x3a3e7e=this['target'];if(null===_0x3a3e7e)return null;if(_0x3a3e7e instanceof _0x2dcba1)return _0x3a3e7e;const _0x3e154f=_0x3a3e7e['filter'](_0x47c990=>function(_0x309318){const _0x19be36=_0x309318['offsetParent'];if(_0x19be36)return!0x0;const _0x1cf42f=_0x309318['getClientRects']()['item'](0x0);return!!_0x1cf42f;}(_0x47c990));return 0x0===_0x3e154f['length']?null:new _0x2dcba1(_0x3e154f[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3b7117){this['view']['isActive']=_0x3b7117,this['view']['mainView']['isActive']=_0x3b7117;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4928eb){if(!(null===_0x4928eb||_0x4928eb instanceof _0x2dcba1||Array['isArray'](_0x4928eb)&&_0x4928eb['every'](_0x406adb=>fi(_0x406adb))))throw new _0x14fd42('annotation-invalid-target',null,{'target':_0x4928eb});}['_getNormalizedTarget'](){const _0x57ea2f='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x57ea2f)?[_0x57ea2f]:_0x57ea2f;}}function fi(_0x393772){return null!==_0x393772&&'object'==typeof _0x393772&&'nodeType'in _0x393772&&0x1===_0x393772['nodeType'];}class S extends _0x3d0741{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x23c808=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x37af46(),this['_focusTracker']['on']('change:isFocused',(_0x528564,_0x2d1275,_0x462c48)=>{_0x462c48||this['fire']('blur');});for(const _0x5e9380 of _0x23c808)this['add'](_0x5e9380);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3848c9){if(this['has'](_0x3848c9))throw new _0x14fd42('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3848c9['innerView'],_0x3848c9),this['_viewToAnnotation']['set'](_0x3848c9['view'],_0x3848c9);for(const _0x3351bb of _0x3848c9['focusableElements'])this['_focusTracker']['add'](_0x3351bb);this['listenTo'](_0x3848c9['focusableElements'],'add',(_0x5e3848,_0x2b5251)=>{this['_focusTracker']['add'](_0x2b5251);}),this['listenTo'](_0x3848c9['focusableElements'],'remove',(_0x245a1e,_0x321577)=>{this['_focusTracker']['remove'](_0x321577);}),this['listenTo'](_0x3848c9['view']['focusTracker'],'change:isFocused',(_0x5d1de2,_0x5318a5,_0xe1addf)=>{_0xe1addf&&this['fire']('focus',_0x3848c9);}),_0x3848c9['updateTargetRect']();const _0x25745b=this['_getOrderInContent'](_0x3848c9['view']['targetRect']);return super['add'](_0x3848c9,_0x25745b);}['remove'](_0x44f4a4){if(!this['has'](_0x44f4a4))throw new _0x14fd42('annotationcollection-not-existing-item',null);this['stopListening'](_0x44f4a4['view']['focusTracker']),this['stopListening'](_0x44f4a4['focusableElements']);for(const _0x442bad of _0x44f4a4['focusableElements'])this['_focusTracker']['remove'](_0x442bad);return this['_viewToAnnotation']['delete'](_0x44f4a4['view']),this['_innerViewToAnnotation']['delete'](_0x44f4a4['innerView']),super['remove'](_0x44f4a4);}['getByInnerView'](_0x32d391){return this['_innerViewToAnnotation']['get'](_0x32d391);}['getByView'](_0x50f9f6){return this['_viewToAnnotation']['get'](_0x50f9f6);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x4459d0 of this)_0x4459d0['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1a28cf=Array['from'](this)['sort']((_0x157a86,_0x284395)=>w(_0x157a86['view']['targetRect'],_0x284395['view']['targetRect']));for(let _0x371d2d=_0x1a28cf['length']-0x1;_0x371d2d>0x0;_0x371d2d--){const _0x5c742b=_0x1a28cf[_0x371d2d];_0x371d2d!==this['getIndex'](_0x5c742b)&&(this['remove'](_0x5c742b),this['add'](_0x5c742b));}}['_getOrderInContent'](_0xe4cf6d){let _0x4a424e=0x0;if(!_0xe4cf6d)return this['length'];for(const _0x333f0a of this){const _0x253487=_0x333f0a['view']['targetRect'];if(_0x253487){if(w(_0xe4cf6d,_0x253487)<0x0)return _0x4a424e;_0x4a424e++;}}return _0x4a424e;}}function v({source:_0x45b15f,target:_0x16bde6,filter:_0x15da42}){for(const _0x19b1a1 of _0x45b15f)_0x15da42(_0x19b1a1)&&_0x16bde6['add'](_0x19b1a1);_0x16bde6['listenTo'](_0x45b15f,'add',(_0x170cf5,_0x12cb00)=>{_0x15da42(_0x12cb00)&&_0x16bde6['add'](_0x12cb00);}),_0x16bde6['listenTo'](_0x45b15f,'remove',(_0x1e1707,_0x5a8280)=>{_0x16bde6['has'](_0x5a8280)&&_0x16bde6['remove'](_0x5a8280);});}function w(_0x2d7078,_0x103639){if(null===_0x2d7078&&null===_0x103639)return 0x0;if(null===_0x2d7078)return-0x1;if(null===_0x103639)return 0x1;const _0x5ea1ea=_0x2d7078['top']-_0x103639['top'];return 0x0==_0x5ea1ea?_0x2d7078['left']-_0x103639['left']:_0x5ea1ea;}class y extends _0x593a50{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x164cbf){if(super(_0x164cbf),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x164cbf instanceof _0x46ffda){const _0x485a55=_0x164cbf['locale'];_0x164cbf['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2fb7cc){this['collection']['add'](_0x2fb7cc);}['remove'](_0x38f44d){this['collection']['remove'](_0x38f44d),_0x38f44d['destroy']();}['refreshVisibility'](){for(const _0x5611a6 of this['collection'])_0x5611a6['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x25214e){return this['collection']['getByInnerView'](_0x25214e);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x290152 of this['collection'])_0x290152['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x216b22){this['fire']('_activateAnnotation',_0x216b22);}['createAnnotation'](_0x54084b){return new T(_0x54084b);}['createAnnotationView'](_0x36867a,_0xea8756){return new E(_0x36867a,_0xea8756);}['_addActiveAnnotation'](_0x10973c){const _0x523711=new Set(this['activeAnnotations']);_0x523711['add'](_0x10973c),this['activeAnnotations']=_0x523711;}['_removeActiveAnnotation'](_0x407d3f){const _0x32efed=new Set(this['activeAnnotations']);_0x32efed['delete'](_0x407d3f),this['activeAnnotations']=_0x32efed;}['_bindAnnotationsToVisibleAnnotations'](){const _0x35e291=this['collection'],_0xb08b2a=this['_visibleAnnotations'];function _0x28d354(_0x3448d4){const _0x2dab0b=_0x3448d4['source'];_0x2dab0b['isVisible']&&!_0xb08b2a['has'](_0x2dab0b)?_0xb08b2a['add'](_0x2dab0b):!_0x2dab0b['isVisible']&&_0xb08b2a['has'](_0x2dab0b)&&_0xb08b2a['remove'](_0x2dab0b),_0x2dab0b['view']['focusTracker']['remove'](_0x2dab0b['view']['element']),_0x2dab0b['view']['focusTracker']['add'](_0x2dab0b['view']['element']);}this['listenTo'](_0x35e291,'add',(_0x49abd9,_0x31551b)=>{_0x31551b['isVisible']&&_0xb08b2a['add'](_0x31551b),this['listenTo'](_0x31551b,'change:isVisible',_0x28d354);}),this['listenTo'](_0x35e291,'remove',(_0x435005,_0x4819e8)=>{_0xb08b2a['has'](_0x4819e8)&&_0xb08b2a['remove'](_0x4819e8),this['stopListening'](_0x4819e8,'change:isVisible',_0x28d354);});}['_setupEnterAnnotationKeystroke'](){const _0xe44d8=_0x3c3813=>{_0x3c3813['on']('ready',()=>{_0x3c3813['keystrokes']['set'](_0x5154ad,(_0x4bac0a,_0x91fb8c)=>{const _0x545b65=_0x337871(this['activeAnnotations']['values']());_0x545b65&&(_0x545b65['view']['focus'](),_0x91fb8c());});});};this['context']instanceof _0x46ffda?_0xe44d8(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x259d02,_0xcf3a83)=>{_0xe44d8(_0xcf3a83);});}['_setupEscapeAnnotationHandling'](){const _0x31ca9b=_0x1173f3=>{const _0x2c5117=_0x1173f3['source'],_0x39c66c=[];let _0x4e17b5;if(Array['isArray'](_0x2c5117['target'])){_0x4e17b5=_0x2c5117['target'][0x0],this['context']instanceof _0x46ffda?_0x39c66c['push'](this['context']):this['context']['editors']&&_0x39c66c['push'](...this['context']['editors']);for(const _0x3fd882 of _0x39c66c)for(const _0x147ac2 of _0x3fd882['editing']['view']['domRoots']['values']())if(_0x147ac2['contains'](_0x4e17b5))return void _0x3fd882['editing']['view']['focus']();_0x4e17b5['focus']();}};this['listenTo'](this['collection'],'add',(_0x594d1d,_0x1301fc)=>{this['listenTo'](_0x1301fc,'escape',_0x31ca9b,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x36ffec,_0x5341c0)=>{this['stopListening'](_0x5341c0,'escape',_0x31ca9b);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x593a50{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ff54d){super(_0x4ff54d),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1f347f=this['context']['config'];_0x1f347f['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1f347f['define']('comments.maxThreadTotalWeight',0x1f4),_0x1f347f['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1f347f['define']('comments.CommentThreadView',gt),_0x1f347f['define']('comments.CommentView',Tt),_0x1f347f['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5a9507=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x45a52c,_0x4549d4)=>this['_addCommentThread'](_0x4549d4)),this['on']('submitCommentThread',(_0x4dcbd9,_0x51c849)=>this['_submitCommentThread'](_0x51c849)),this['on']('resolveCommentThread',(_0x5a865f,_0x3c19ba)=>this['_resolveCommentThread'](_0x3c19ba)),this['on']('resolveCommentThread',(_0x1ca2b2,_0x5f2a40)=>this['_updateActiveAnnotation'](_0x5f2a40),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3d90d6,_0x157d53)=>this['_reopenCommentThread'](_0x157d53)),this['on']('reopenCommentThread',(_0x24ba52,_0x437183)=>this['_updateActiveAnnotation'](_0x437183),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2520fd,_0x144cd7)=>this['_removeCommentThread'](_0x144cd7)),this['on']('updateCommentThread',(_0x518bbd,_0x58fbb4)=>this['_updateCommentThread'](_0x58fbb4)),this['on']('updateCommentThread',(_0x5d3064,_0x1fcd84)=>this['_updateActiveAnnotation'](_0x1fcd84),{'priority':'lowest'}),this['on']('addComment',(_0x4d0c9f,_0x35f8e2)=>this['_addComment'](_0x35f8e2)),this['on']('updateComment',(_0x9900de,_0x11882b)=>this['_updateComment'](_0x11882b)),this['on']('removeComment',(_0x44a71a,_0x3eb30f)=>this['_removeComment'](_0x3eb30f)),this['on']('addComment',(_0x266594,{threadId:_0x1b3f0b,isFromAdapter:_0x4f0100})=>{if(_0x4f0100)return;const _0x55bad3=this['getCommentThread'](_0x1b3f0b),_0x3ed784=_0x55bad3&&this['_threadToController']['get'](_0x55bad3);_0x3ed784&&_0x3ed784['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5a9507,'change:activeAnnotations',(_0x2b0b83,_0x4917ae,_0xd701f8)=>{const _0x46e80c=Array['from'](_0xd701f8)['map'](_0x294adb=>this['_viewToController']['get'](_0x294adb['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x46e80c?_0x46e80c['model']:null;});}set['adapter'](_0xd4b20e){if(this['_adapter'])throw new _0x14fd42('commentsrepository-adapter-already-set');this['_adapter']=_0xd4b20e;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3259eb=_t,threadId:_0x16c86f=_0x477669(),comments:_0x37a231=[],unlinkedAt:_0x50b5cc=null,resolvedAt:_0x164982=null,resolvedBy:_0xbd7765=null,target:_0x149a09=null,context:_0x52db0a=null,attributes:_0x4dc2c4={},isResolvable:_0x4e23c2=!0x0,isSubmitted:_0x5658a6=!0x1,isFromAdapter:_0x4b47be=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x3259eb),{'channelId':_0x3259eb,'threadId':_0x16c86f,'comments':_0x37a231,'unlinkedAt':_0x50b5cc,'resolvedAt':_0x164982,'resolvedBy':_0xbd7765,'target':_0x149a09,'context':_0x52db0a,'attributes':_0x4dc2c4,'isFromAdapter':_0x4b47be,'isResolvable':_0x4e23c2,'isSubmitted':_0x5658a6}),this['getCommentThread'](_0x16c86f);}['openNewCommentThread']({channelId:_0x42b4d1=_t,threadId:_0x31034f=_0x477669(),target:_0x3ab013,context:_0x43fb64=null,isResolvable:_0x53ffa7=!0x0}){if(this['_readOnlyChannels']['has'](_0x42b4d1)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3ab013)throw new _0x14fd42('commentsrepository-missing-target');const _0x34bd71=this['addCommentThread']({'channelId':_0x42b4d1,'threadId':_0x31034f,'target':_0x3ab013,'context':_0x43fb64,'isResolvable':_0x53ffa7});if(!_0x34bd71)return null;const _0xa8a262=this['_threadToController']['get'](_0x34bd71),_0x427fc9=_0xa8a262['view']['commentThreadInputView']['commentInputView'],_0x4d4345=this['context']['plugins']['get'](y),_0x316efe=_0x4d4345['getByInnerView'](_0xa8a262['view']);return _0x4d4345['activate'](_0x316efe),_0x427fc9['once']('editorReady',()=>_0x427fc9['focus']()),_0x34bd71;}['hasCommentThread'](_0x4b4af4){if('string'!=typeof _0x4b4af4)throw new _0x14fd42('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4b4af4);}['updateCommentThread']({channelId:_0x11a61d=_t,threadId:_0x177513,context:_0x2a3190,unlinkedAt:_0x375c32,attributes:_0x2229b9,isFromAdapter:_0x2f21a9=!0x1}){return this['fire'](Nt('updateCommentThread',_0x11a61d),{'channelId':_0x11a61d,'threadId':_0x177513,'context':_0x2a3190,'unlinkedAt':_0x375c32,'attributes':_0x2229b9,'isFromAdapter':_0x2f21a9}),this['getCommentThread'](_0x177513);}['getCommentThread'](_0x19163e){if('string'!=typeof _0x19163e)throw new _0x14fd42('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x19163e);}['fetchCommentThread']({channelId:_0x3c6ad4,threadId:_0x4978da}={}){const _0x2b7aac=this['getCommentThread'](_0x4978da);if(_0x2b7aac)return Promise['resolve'](_0x2b7aac);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x14fd42('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3c6ad4,'threadId':_0x4978da})['then'](_0x1cb286=>this['hasCommentThread'](_0x4978da)?this['getCommentThread'](_0x4978da):_0x1cb286?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3c6ad4},_0x1cb286)):void 0x0)['catch'](_0x3db020=>{throw console['error'](_0x3db020),new _0x14fd42('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x59d4fa,skipNotAttached:_0x8b7b2e=!0x1,skipEmpty:_0x16350f=!0x1,toJSON:_0x5112f7=!0x1}={}){const _0x15f7f9=[];for(const _0x9bf29e of this['_threads']['values']())_0x59d4fa&&_0x9bf29e['channelId']!==_0x59d4fa||_0x8b7b2e&&!_0x9bf29e['isAttached']||_0x16350f&&0x0===_0x9bf29e['length']||_0x15f7f9['push'](_0x9bf29e);return _0x5112f7?_0x15f7f9['map'](_0x583878=>_0x583878['toJSON']()):_0x15f7f9;}['getAnnotationForCommentThread'](_0x52222d){const _0x574520=this['_threadToController']['get'](_0x52222d);if(!_0x574520)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x574520['view'])||null;}['getCommentThreadForAnnotation'](_0x54c0a8){const _0x2a2c04=this['_viewToController']['get'](_0x54c0a8['innerView']);return _0x2a2c04?_0x2a2c04['model']:null;}['setActiveCommentThread'](_0x2d7cd6){const _0x57d71f=this['context']['plugins']['get'](y);if(!_0x2d7cd6)return void(this['activeCommentThread']&&_0x57d71f['deactivateAll']());const _0x20232d=this['getCommentThread'](_0x2d7cd6);if(!_0x20232d)throw new _0x14fd42('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2d7cd6});if(!this['_threadToController']['has'](_0x20232d))throw new _0x14fd42('commentsrepository-active-not-attached',null,{'threadId':_0x2d7cd6});const _0x4d7848=_0x57d71f['getByInnerView'](this['_threadToController']['get'](_0x20232d)['view']);_0x57d71f['activate'](_0x4d7848);}['switchReadOnly'](_0x387c87,_0x1d772f){_0x387c87?this['_readOnlyChannels']['add'](_0x1d772f):this['_readOnlyChannels']['delete'](_0x1d772f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2d1cd5){return this['_readOnlyChannels']['has'](_0x2d1cd5)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x217c2f,_0x259b6b){return new vt(_0x217c2f,_0x259b6b);}['setPermissions'](_0x308af2,_0x354692=_t){this['_permissions']['set'](_0x354692,_0x308af2),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x8ed698=_t){return this['_permissions']['has'](_0x8ed698)?this['_permissions']['get'](_0x8ed698):bt;}['_addCommentThread']({channelId:_0x2dd53a,threadId:_0x324bad,comments:_0x20fd1a,unlinkedAt:_0x243203,resolvedAt:_0x52db90,resolvedBy:_0x3e4b77,target:_0x3bf556,context:_0x5ce33f,attributes:_0x51ce3c,isFromAdapter:_0x4bec49,isResolvable:_0x266abf,isSubmitted:_0xda564d}){if('string'!=typeof _0x324bad)throw new _0x14fd42('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x324bad});if(this['hasCommentThread'](_0x324bad))throw new _0x14fd42('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x324bad});const _0x570e21=new pi(this,{'channelId':_0x2dd53a,'id':_0x324bad,'context':_0x5ce33f,'attributes':_0x51ce3c,'unlinkedAt':_0x243203,'resolvedAt':_0x52db90,'resolvedBy':_0x3e4b77?this['context']['plugins']['get'](it)['getUser'](_0x3e4b77):null,'isResolvable':_0x266abf,'isSubmitted':_0xda564d||_0x4bec49});this['_threads']['set'](_0x324bad,_0x570e21);for(const _0xf84ce9 of _0x20fd1a)_0x570e21['_add'](this['_createNewComment']({'threadId':_0x324bad,..._0xf84ce9}));return _0x3bf556&&_0x570e21['attachTo'](_0x3bf556),_0x4bec49||!_0x570e21['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2dd53a,'threadId':_0x324bad});}['_submitCommentThread']({channelId:_0x3b0180,threadId:_0x375d67}){if(!this['hasCommentThread'](_0x375d67))throw new _0x14fd42('commentsrepository-missing-comment-thread',this);const _0x562bf1=this['getCommentThread'](_0x375d67);if(_0x562bf1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x26066f,comments:_0x38a56e,resolvedAt:_0x298087,resolvedBy:_0x5b4b97,context:_0x422af3,attributes:_0x19f838}=_0x562bf1,_0x56f15c=this['context']['plugins']['get']('PendingActions'),_0x225173=_0x56f15c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3b0180,'threadId':_0x26066f,'comments':_0x38a56e['map'](_0x7a7518=>_0x7a7518['toJSON']()),'resolvedAt':_0x298087,'resolvedBy':_0x5b4b97?_0x5b4b97['id']:_0x5b4b97,'context':_0x422af3,'attributes':_0x19f838})['then'](({comments:_0x5e5e37})=>{_0x56f15c['remove'](_0x225173);for(const _0x7fc9b of _0x5e5e37)this['_updateComment']({'channelId':_0x3b0180,'threadId':_0x375d67,'commentId':_0x7fc9b['commentId'],'createdAt':_0x7fc9b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x460037=>{throw console['error'](_0x460037),new _0x14fd42('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x508458,target:_0x5d1684}){const _0x19cd96=this['getCommentThread'](_0x508458);if(!_0x19cd96)throw new _0x14fd42('commentsrepository-attach-missing-comment-thread',this);const _0x5f35cb=this['context']['plugins']['get']('PendingActions'),_0x1d51fe=this['context']['plugins']['get'](y),_0x5f43b4=this['_createCommentThreadView'](_0x19cd96),_0x5814c6=new vt(_0x19cd96,_0x5f43b4);let _0x51e848=null;_0x5f43b4['on']('change:isDirty',(_0x35a11a,_0x5cefe7,_0x183b7b)=>{_0x183b7b?_0x51e848=_0x5f35cb['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x51e848&&(_0x5f35cb['remove'](_0x51e848),_0x51e848=null);}),this['_threadToController']['set'](_0x19cd96,_0x5814c6),this['_viewToController']['set'](_0x5f43b4,_0x5814c6);const _0x3541dc=new E(this['context']['locale'],_0x5f43b4);_0x3541dc['bind']('length')['to'](_0x5f43b4),_0x3541dc['bind']('isDirty')['to'](_0x5f43b4,'isDirty',_0x5f43b4,'length',(_0xd26589,_0x130cf9)=>_0xd26589||!_0x130cf9),_0x3541dc['bind']('isActive')['to'](_0x5f43b4),_0x3541dc['type']='comment';const _0x5f4521=new T({'view':_0x3541dc,'target':_0x5d1684,'type':'comment','isVisible':!_0x19cd96['archivedAt']&&!!('function'==typeof _0x5d1684?_0x5d1684():_0x5d1684)});return _0x5f43b4['on']('escape',()=>{_0x5f4521['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5f43b4,_0x5f4521),_0x1d51fe['add'](_0x5f4521),_0x5f4521;}['_bindAnnotationToEditors'](_0x5c01a9,_0x224b7c){this['listenTo'](_0x5c01a9,'editorReady',(_0x3f6329,_0x5879d2)=>{const _0xac9e0c=_0x5879d2['ui']['view']['body']['bodyCollectionContainer'];_0x224b7c['focusableElements']['add'](_0xac9e0c),this['context']instanceof _0x46ffda&&this['context']['ui']['focusTracker']['add'](_0xac9e0c);},{'priority':'highest'}),this['listenTo'](_0x5c01a9,'editorDestroyed',(_0x5b7276,_0x5b58bc)=>{const _0x42f7ce=_0x5b58bc['ui']['view']['body']['bodyCollectionContainer'];_0x224b7c['focusableElements']['has'](_0x42f7ce)&&_0x224b7c['focusableElements']['remove'](_0x42f7ce),this['context']instanceof _0x46ffda&&this['context']['ui']['focusTracker']['remove'](_0x42f7ce);});}['_unbindEditors'](_0x2325f9){this['stopListening'](_0x2325f9,'editorReady'),this['stopListening'](_0x2325f9,'editorDestroyed');}['_createCommentThreadView'](_0x3f47a6){const _0x192a24=this['context']['plugins']['get'](it),{config:_0x53cf51,locale:_0x471ad2}=this['context'],_0x1e23ef=pt(_0x53cf51['get']('locale'),_0x471ad2);return new(0x0,(_0x53cf51['get']('comments'))['CommentThreadView'])(_0x471ad2,_0x3f47a6,_0x192a24['me'],{'editorConfig':{..._0x53cf51['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x53cf51['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x53cf51['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x53cf51['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x53cf51['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1e23ef,'CommentView':_0x53cf51['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5fcf82,channelId:_0x2f329d,resolvedAt:_0xad000f,resolvedBy:_0x749689,isFromAdapter:_0x3eef5c}){if(!this['hasCommentThread'](_0x5fcf82))throw new _0x14fd42('commentsrepository-missing-comment-thread',null,{'threadId':_0x5fcf82});const _0x5b0d88=this['getCommentThread'](_0x5fcf82);if(_0x5b0d88['isResolved'])throw new _0x14fd42('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5fcf82});const _0x33308e=this['context']['plugins']['get'](it);if(_0x5b0d88['resolvedBy']=_0x33308e['getUser'](_0x749689),_0x5b0d88['resolvedAt']=_0xad000f,_0x3eef5c||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x504c9e=this['context']['plugins']['get']('PendingActions'),_0x49a558=_0x504c9e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2f329d,'threadId':_0x5fcf82})['then'](({resolvedAt:_0x117b8a,resolvedBy:_0x732705})=>{_0x504c9e['remove'](_0x49a558),_0x5b0d88['resolvedBy']['id']!==_0x732705&&(_0x5b0d88['resolvedBy']=_0x33308e['getUser'](_0x732705)),_0x5b0d88['resolvedAt']=_0x117b8a;})['catch'](_0x2c4e5b=>{throw console['error'](_0x2c4e5b),new _0x14fd42('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x29e3b3,channelId:_0x33d1b9,isFromAdapter:_0x46c598}){if(!this['hasCommentThread'](_0x29e3b3))throw new _0x14fd42('commentsrepository-missing-comment-thread',null,{'threadId':_0x29e3b3});const _0xa26b29=this['getCommentThread'](_0x29e3b3);if(!_0xa26b29['isResolved'])throw new _0x14fd42('commentsrepository-reopen-comment-thread',null,{'threadId':_0x29e3b3});if(_0xa26b29['resolvedBy']=null,_0xa26b29['resolvedAt']=null,_0x46c598||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4afd8e=this['context']['plugins']['get']('PendingActions'),_0xa5bd5=_0x4afd8e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x33d1b9,'threadId':_0x29e3b3})['then'](()=>_0x4afd8e['remove'](_0xa5bd5))['catch'](_0x82e103=>{throw console['error'](_0x82e103),new _0x14fd42('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x32f9db,isFromAdapter:_0x31c196}){const _0x23caa7=this['getCommentThread'](_0x32f9db);if(!_0x23caa7)throw new _0x14fd42('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x32f9db),this['_threads']['delete'](_0x32f9db),!_0x23caa7['isSubmitted']||_0x31c196||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x427c9d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1be1f0}=_0x23caa7,_0x532b52=_0x427c9d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1be1f0,'threadId':_0x32f9db})['then'](()=>_0x427c9d['remove'](_0x532b52))['catch'](_0x31a01d=>{throw console['error'](_0x31a01d),new _0x14fd42('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x25f723,unlinkedAt:_0x159d32,context:_0x4d858d,attributes:_0x2043e0,isFromAdapter:_0x51a5d2}){if('string'!=typeof _0x25f723)throw new _0x14fd42('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x25f723});if(!this['hasCommentThread'](_0x25f723))throw new _0x14fd42('commentsrepository-missing-comment-thread',null,{'threadId':_0x25f723});const _0x303b08=this['getCommentThread'](_0x25f723);let _0x4c725b=!0x1;if(void 0x0!==_0x4d858d&&_0x303b08['context']!==_0x4d858d&&(_0x303b08['context']=_0x4d858d,_0x4c725b=!0x0),void 0x0!==_0x159d32&&_0x303b08['unlinkedAt']!==_0x159d32&&(_0x303b08['unlinkedAt']=_0x159d32,_0x4c725b=!0x0),_0x2043e0&&!At(_0x2043e0,_0x303b08['attributes'])&&(_0x303b08['attributes']=_0x2043e0,_0x4c725b=!0x0),!_0x4c725b)return Promise['resolve']();if(!_0x303b08['isSubmitted']||_0x51a5d2||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2c5cc2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x320b8d}=_0x303b08,_0x5a7f53=_0x2c5cc2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x320b8d,'threadId':_0x25f723,'context':_0x4d858d,'unlinkedAt':_0x159d32,'attributes':_0x2043e0})['then'](()=>_0x2c5cc2['remove'](_0x5a7f53))['catch'](_0x47e329=>{throw console['error'](_0x47e329),new _0x14fd42('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x59ded8){const _0x842056=this['context']['plugins']['get'](y),_0x25a425=this['getCommentThread'](_0x59ded8);if(_0x25a425['_isAttached']=!0x1,this['_threadToController']['has'](_0x25a425)){const _0x22fcee=this['_threadToController']['get'](_0x25a425),_0x484f4d=_0x22fcee['view'],_0x15553a=_0x842056['getByInnerView'](_0x484f4d);this['_threadToController']['delete'](_0x25a425),this['_viewToController']['delete'](_0x484f4d),_0x15553a&&_0x842056['remove'](_0x15553a),_0x22fcee['destroy'](),_0x484f4d['destroy']()['then'](()=>{this['_unbindEditors'](_0x484f4d);});}}['_updateActiveAnnotation']({threadId:_0x55dcb0,resolvedAt:_0x1ef279,unlinkedAt:_0x468bf0}){const _0x3b48c2=!!_0x1ef279,_0xf053d3=this['context']['plugins']['get'](y),_0x3c0718=this['getCommentThread'](_0x55dcb0);if(this['_threadToController']['has'](_0x3c0718)){const _0x2f4229=this['_threadToController']['get'](_0x3c0718)['view'],_0x2dc42e=_0xf053d3['getByInnerView'](_0x2f4229);_0x2dc42e&&(_0x3b48c2&&_0xf053d3['_removeActiveAnnotation'](_0x2dc42e),_0x468bf0?_0x2dc42e['isVisible']=!0x1:_0x2dc42e['refreshVisibility']());}}['_getExternalAuthor'](_0x2ccd88){const _0x3d0637=this['context']['plugins']['get'](it),_0x12441d=It('external:'+_0x2ccd88),_0x5d1415=_0x3d0637['getUser'](_0x12441d);return _0x5d1415||_0x3d0637['addUser']({'id':_0x12441d,'name':_0x2ccd88});}['_createNewComment']({threadId:_0x591bbd,commentId:_0x287609=_0x477669(),content:_0x3e4ffe,authorId:_0xe87f5,createdAt:_0x3aded1,attributes:_0x1a67cc}){if('string'!=typeof _0x287609)throw new _0x14fd42('commentsrepository-invalid-commentid');if('string'!=typeof _0xe87f5)throw new _0x14fd42('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3e4ffe||!_0x3e4ffe['trim']())throw new _0x14fd42('commentsrepository-invalid-comment-content');const _0x492c01=this['context']['plugins']['get'](it)['getUser'](_0xe87f5);if(!_0x492c01)throw new _0x14fd42('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xe87f5});let _0x598d92=null,_0x24847d=_0x3aded1;return _0x1a67cc?.['@external']&&(_0x598d92=this['_getExternalAuthor'](_0x1a67cc['@external']['authorName']),_0x24847d=new Date(_0x1a67cc['@external']['createdAt'])),new wi(this,{'threadId':_0x591bbd,'id':_0x287609,'author':_0x598d92||_0x492c01,'creator':_0x492c01,'content':_0x3e4ffe,'createdAt':_0x3aded1,'authoredAt':_0x24847d,'attributes':_0x1a67cc});}['_addComment'](_0x4216e0){let {threadId:_0x42e3a9,content:_0x2e1140,attributes:_0x19aea0,isFromAdapter:_0x5b5b90}=_0x4216e0;const _0xbd0220=this['getCommentThread'](_0x4216e0['threadId']);if(!_0xbd0220)throw new _0x14fd42('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xc848be=this['_createNewComment'](_0x4216e0),{id:_0x2b6abe}=_0xc848be;if(_0xbd0220['_add'](_0xc848be),_0x5b5b90||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0xbd0220['isSubmitted'])return Promise['resolve']();const _0x161a11=this['context']['plugins']['get']('PendingActions'),{channelId:_0x13f7ed}=_0xbd0220,_0x17db2e=_0x161a11['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x19aea0||(_0x19aea0={}),this['adapter']['addComment']({'channelId':_0x13f7ed,'threadId':_0x42e3a9,'commentId':_0x2b6abe,'content':_0x2e1140,'attributes':_0x19aea0})['then'](_0x17dad3=>{_0x161a11['remove'](_0x17db2e),_0x17dad3&&this['_updateComment']({'channelId':_0x13f7ed,'threadId':_0x42e3a9,'commentId':_0x2b6abe,'createdAt':_0x17dad3['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xbbae1b=>{throw console['error'](_0xbbae1b),new _0x14fd42('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4e9a22,commentId:_0x28863d,content:_0x442de7,createdAt:_0x55be48,attributes:_0x5276c2,isFromAdapter:_0x56d1e9}){if(void 0x0!==_0x442de7&&('string'!=typeof _0x442de7||!_0x442de7['trim']()['length']))throw new _0x14fd42('commentsrepository-update-comment-invalid-content');const _0x416597=this['getCommentThread'](_0x4e9a22),_0x58a16c=_0x416597['getComment'](_0x28863d);if(!_0x58a16c)throw new _0x14fd42('commentsrepository-update-missing-comment',this);let _0x505afb=!0x1;if(_0x442de7&&_0x442de7!==_0x58a16c['content']&&(_0x58a16c['isEditable']||_0x56d1e9)&&(_0x58a16c['content']=_0x442de7,_0x505afb=!0x0),_0x55be48&&_0x55be48!==_0x58a16c['createdAt']&&(_0x58a16c['createdAt']=_0x55be48,_0x58a16c['attributes']&&_0x58a16c['attributes']['@external']||(_0x58a16c['authoredAt']=_0x55be48),_0x505afb=!0x0),_0x5276c2&&!At(_0x5276c2,_0x58a16c['attributes'])&&(_0x58a16c['attributes']=_0x5276c2,_0x505afb=!0x0),!_0x505afb)return Promise['resolve']();if(_0x416597['fire']('commentUpdated'),_0x56d1e9||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2daf48=this['context']['plugins']['get']('PendingActions'),{channelId:_0x129a31}=this['getCommentThread'](_0x58a16c['threadId']),_0x267b41=_0x2daf48['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x129a31,'threadId':_0x4e9a22,'commentId':_0x28863d,'content':_0x442de7,'attributes':_0x5276c2})['then'](()=>_0x2daf48['remove'](_0x267b41))['catch'](_0x37e110=>{throw console['error'](_0x37e110),new _0x14fd42('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x36594d,commentId:_0x2919d5,isFromAdapter:_0x11ac11}){const _0x2df1c6=this['getCommentThread'](_0x36594d),_0x33b5ee=_0x2df1c6['getComment'](_0x2919d5);if(!_0x33b5ee)throw new _0x14fd42('commentsrepository-remove-missing-comment',this);if(_0x2df1c6['_remove'](_0x33b5ee),_0x11ac11||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3ea140=this['context']['plugins']['get']('PendingActions'),{channelId:_0xfca797}=_0x2df1c6,_0x282a0a=_0x3ea140['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xfca797,'threadId':_0x36594d,'commentId':_0x2919d5})['then'](()=>_0x3ea140['remove'](_0x282a0a))['catch'](_0x38430c=>{throw console['error'](_0x38430c),new _0x14fd42('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x4e6f5b(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x565d0f,_0x5bde35){super();const _0x413eaa=_0x565d0f['context']['plugins']['get'](it)['me'],_0x1d9cd9=_0x565d0f['getCommentThread'](_0x5bde35['threadId']),_0x350e1a=0x0===_0x1d9cd9['comments']['length'],_0x3cfbbd=_0x413eaa===_0x5bde35['author'];this['id']=_0x5bde35['id'],this['threadId']=_0x5bde35['threadId'],this['author']=_0x5bde35['author'],this['creator']=_0x5bde35['creator'],this['isExternal']=Boolean(_0x5bde35['attributes']&&_0x5bde35['attributes']['@external']),this['set']('content',_0x5bde35['content']),this['createdAt']=_0x5bde35['createdAt']||new Date(),this['set']('authoredAt',_0x5bde35['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1d9cd9,'resolvedAt'),this['set']('attributes',_0x5bde35['attributes']||{}),this['bind']('isEditable')['to'](_0x565d0f,'_permissions',()=>{const _0x57fc2d=_0x565d0f['getPermissions'](_0x1d9cd9['channelId'])['write'],_0x5b2657=_0x565d0f['getPermissions'](_0x1d9cd9['channelId'])['modifyAll'];return _0x3cfbbd&&_0x57fc2d||!_0x3cfbbd&&_0x5b2657;}),this['bind']('isRemovable')['to'](_0x1d9cd9,'isRemovable',_0x565d0f,'_permissions',_0x3303d7=>{const _0x195873=_0x565d0f['getPermissions'](_0x1d9cd9['channelId'])['write'],_0x4c1a9c=_0x565d0f['getPermissions'](_0x1d9cd9['channelId'])['modifyAll'];return _0x3cfbbd&&_0x195873||_0x3303d7&&_0x350e1a||!_0x3cfbbd&&_0x4c1a9c&&!_0x350e1a;}),this['bind']('isReadOnly')['to'](_0x1d9cd9,'isReadOnly'),this['_repository']=_0x565d0f;}get['weight'](){return Math['max'](function(_0x14425e){const _0x5e332e=document['createElement']('div');return _0x5e332e['innerHTML']=_0x14425e,_0x5e332e['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1642a5){const {threadId:_0x20f575,id:_0xf49bb2}=this;if(!this['_repository']['hasCommentThread'](_0x20f575))throw new _0x14fd42('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x336778}=this['_repository']['getCommentThread'](_0x20f575);this['_repository']['fire'](Nt('updateComment',_0x336778,_0x20f575),{'channelId':_0x336778,'threadId':_0x20f575,'commentId':_0xf49bb2,..._0x1642a5});}['setAttribute'](_0x355f4b,_0x3c83e7){const _0x4a8299=wt(this['attributes']);yt(_0x4a8299,_0x355f4b,_0x3c83e7),this['update']({'attributes':_0x4a8299});}['removeAttribute'](_0x4e94b0){const _0x5da4c2=wt(this['attributes']);Ct(_0x5da4c2,_0x4e94b0),this['update']({'attributes':_0x5da4c2});}['remove'](_0x2eb479={}){if(!_0x2eb479['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x123951,id:_0x2b764e}=this;if(!this['_repository']['hasCommentThread'](_0x123951))throw new _0x14fd42('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2646bc}=this['_repository']['getCommentThread'](_0x123951);this['_repository']['fire'](Nt('removeComment',_0x2646bc,_0x123951),{'channelId':_0x2646bc,'threadId':_0x123951,'commentId':_0x2b764e,..._0x2eb479});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3d4b01,..._0x5befb5){for(const _0x3733c0 of _0x5befb5)void 0x0!==_0x3733c0&&(_0x3d4b01+=':'+String(_0x3733c0));return _0x3d4b01;}class ot extends _0x4a97fb{constructor(_0x589a8d){super(_0x589a8d),this['set']('hasContent',!0x1);}['refresh'](){const _0x72e883=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x3c350c of _0x72e883['getRanges']())if(this['_hasContent'](_0x3c350c))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x329340=_0x477669(),ranges:_0x123df9,comment:_0x47f754}={}){const _0x4c0ed0=this['editor']['model'],_0x40492f=_0x123df9??Array['from'](_0x4c0ed0['document']['selection']['getRanges']()),_0x236ab0=[];for(const _0x3e6a9d of _0x40492f)this['_hasContent'](_0x3e6a9d)&&_0x236ab0['push'](this['_trimToContent'](_0x3e6a9d));if(!_0x236ab0['length'])throw new _0x14fd42('addcommentthreadcommand-incorrect-ranges',null);_0x47f754&&this['_createCommentThread'](_0x329340,_0x47f754),this['_createMarkersFromRanges'](_0x329340,_0x236ab0,!!_0x47f754);}['_createMarkersFromRanges'](_0x808d1d,_0x495703,_0x50fb06){this['editor']['model']['change'](_0x36d589=>{for(const _0x3ee192 of _0x495703){const _0x1cdfd9=_0x477669()['substr'](0x1,0x5),_0x33e2a6='comment:'+_0x808d1d+':'+_0x1cdfd9;_0x36d589['addMarker'](_0x33e2a6,{'range':_0x3ee192,'usingOperation':_0x50fb06,'affectsData':_0x50fb06});}});}['_createCommentThread'](_0x55033b,_0x662b41){const _0x12afff=this['editor']['plugins']['get']('CommentsRepository'),_0x758e60=this['editor']['config']['get']('collaboration.channelId'),_0x44faec=this['editor']['plugins']['get']('Users')['me'];if(!_0x44faec)throw new _0x14fd42('addcommentthreadcommand-user-not-found',null);_0x12afff['addCommentThread']({'threadId':_0x55033b,'channelId':_0x758e60,'comments':[{'authorId':_0x44faec['id'],'content':_0x662b41,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x28578e){for(const _0x583737 of _0x28578e['getItems']())if(this['_itemIsContent'](_0x583737))return!0x0;return!0x1;}['_itemIsContent'](_0x5c52a5){return _0x5c52a5['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5c52a5)&&!_0x5c52a5['is']('element','tableCell');}['_trimToContent'](_0xf31ce8){const _0x12e87d=_0x2bd755=>!this['_itemIsContent'](_0x2bd755['item']),_0x32ee16=_0xf31ce8['start']['getLastMatchingPosition'](_0x12e87d),_0x3a63a4=_0xf31ce8['end']['getLastMatchingPosition'](_0x12e87d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x32ee16,_0x3a63a4);}}class b extends _0x37aa4b{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53dde8){super(_0x53dde8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xaddc0e=this['editor'],_0x25cc74=_0xaddc0e['model']['document']['selection'],_0x2ffd5c=_0x533250(()=>this['refreshSelectedViews'](),0xa);_0x25cc74['on']('change:range',(_0x591f55,_0x338aaf)=>{_0x338aaf['directChange']&&(_0x2ffd5c['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xaddc0e['editing']['view']['document'],'change:isFocused',(_0x2823d4,_0x136110,_0x2ec3e8)=>{_0x2ec3e8&&_0x2ffd5c();}),this['listenTo'](_0xaddc0e['ui']['focusTracker'],'change:isFocused',(_0x193af4,_0x126a88,_0x5016ec)=>{_0x5016ec||this['fire']('blur',{'isAnnotationTracked':_0xfcc239=>this['_editorAnnotationsData']['has'](_0xfcc239['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2f65e0){if(this['_editorAnnotations']['has'](_0x2f65e0['view']))return;this['_editorAnnotations']['add'](_0x2f65e0['view']),this['editor']['ui']['focusTracker']['add'](_0x2f65e0['view']['element']);const _0x4fd2cd=this['editor']['plugins']['get'](y);this['listenTo'](_0x4fd2cd['collection'],'remove',(_0x4caa28,_0x1f28c7)=>{this['editor']['ui']['focusTracker']['remove'](_0x1f28c7['view']['element']),this['_editorAnnotations']['delete'](_0x1f28c7['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x28ffc2){if('function'!=typeof _0x28ffc2)throw new _0x14fd42('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x28ffc2);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2121ad,annotations:_0x500e65}){const _0x139e47=[],_0x124eb4=this['editor']['model']['document']['selection'],_0x19bf40=Array['from'](_0x124eb4['getRanges']());for(const [_0x1fedf0,_0x38815d]of this['_editorAnnotationsData']){const _0x24ac33=_0x1da4fa(_0x38815d),_0x33eaca=_0x500e65['getByInnerView'](_0x1fedf0);_0x24ac33&&_0x33eaca&&_0x139e47['push']({'annotation':_0x33eaca,'range':_0x24ac33});}function _0x1da4fa(_0xb59c94){for(const _0x330bd3 of _0xb59c94)for(const _0x3e97f9 of _0x19bf40)if(_0x330bd3['containsRange'](_0x3e97f9,!_0x124eb4['isCollapsed']))return _0x330bd3;return null;}return _0x139e47['sort']((_0x3ead70,_0x3b2047)=>{const _0x4ec419=_0x3ead70['range'],_0x8ffbb1=_0x3b2047['range'];if(!_0x4ec419['isEqual'](_0x8ffbb1)){if(_0x4ec419['containsRange'](_0x8ffbb1,!0x0))return 0x1;if(_0x8ffbb1['containsRange'](_0x4ec419,!0x0))return-0x1;}return _0x3ead70['annotation']==_0x2121ad?-0x1:_0x3b2047['annotation']==_0x2121ad?0x1:0x0;})['map'](_0x43722c=>_0x43722c['annotation']);}get['_editorAnnotationsData'](){const _0x47a2b1=new Map();for(const _0x4dc0ff of Array['from'](this['_dataCollectors']))for(const [_0xed5fd1,_0x3a37d3]of _0x4dc0ff())_0x47a2b1['set'](_0xed5fd1,_0x3a37d3);return _0x47a2b1;}}class st extends _0x37aa4b{['afterInit'](){const _0x49b8a7=this['editor'];if(!_0x49b8a7['plugins']['has']('RestrictedEditingModeEditing'))return;_0x49b8a7['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x37aa4b{constructor(_0x3d2e34){super(_0x3d2e34),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3f2d7a=this['editor'],_0x113b1c=_0x3f2d7a['commands']['get']('importWord'),_0xfd364c=_0x3f2d7a['plugins']['get'](it);_0x113b1c&&(_0x113b1c['on']('execute',(_0x204a2b,[,_0x37791a])=>{_0x37791a['collaboration_features']={'comments':!0x0,'user_id':_0xfd364c['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x113b1c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2db7d9,_0x768f76){const {comment_threads:_0x54996a}=_0x768f76;_0x54996a&&_0x54996a['forEach'](({thread_id:_0x22788e,comments:_0x454ec2,is_resolved:_0x471c7c})=>{const _0x4d5dae=new Date(),_0x27c8c0=_0x454ec2['map'](({author:_0xdb4af,content:_0x2eb0e3,created_at:_0x9e249a})=>({'content':_0x2eb0e3,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x4d5dae,'attributes':{'@external':{'authorName':_0xdb4af,'createdAt':_0x9e249a?new Date(_0x9e249a):new Date(),'source':'importWord'}}})),_0x404400=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x404400,'threadId':_0x22788e,'comments':_0x27c8c0,'resolvedAt':_0x471c7c?_0x4d5dae:null});});}}class at extends _0x37aa4b{constructor(_0x34bdf1){super(_0x34bdf1),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x6ec189=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x6ec189,'contentInsertion',(_0x3d9325,_0x210d3e)=>this['_removeMarkersWithoutThreads'](_0x210d3e['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4cf84a){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4cf84a;const _0x5b50f0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x17be5d of _0x4cf84a['keys']()){const [_0x40a0c3,_0x5b852e]=_0x17be5d['split'](':');'comment'!=_0x40a0c3||_0x5b50f0['hasCommentThread'](_0x5b852e)||_0x4cf84a['delete'](_0x17be5d);}return _0x4cf84a;}['_registerMarkerInClipboardPipeline'](){const _0x1aa027=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3eb1f8=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3eb1f8&&_0x1aa027['_registerMarkerToCopy']('comment',_0x3eb1f8);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x47ea40){switch(_0x47ea40){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5ed174){const _0xf5c52f=_0x5ed174['split'](':');return{'group':_0xf5c52f[0x0],'id':_0xf5c52f[0x1],'part':_0xf5c52f[0x2]};}class ut extends _0x37aa4b{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5c1273,_0x27e0ef)=>{if(!_0x27e0ef['options']['showCommentHighlights'])return null;if(_0x27e0ef['options']['ignoreResolvedComments']){const {id:_0x3257a9}=ft(_0x5c1273['markerName']),_0x1256e8=this['editor']['plugins']['get'](o);if(_0x1256e8['getCommentThread'](_0x3257a9)?.['isResolved']&&_0x5c1273['item'])return _0x27e0ef['consumable']['consume'](_0x5c1273['item'],'addMarker:'+_0x5c1273['markerName']),_0x27e0ef['consumable']['consume'](_0x5c1273['item'],'removeMarker:'+_0x5c1273['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x15c22e=>{_0x15c22e['on']('addMarker:comment',(_0x131f18,_0x3ae77c,_0x1fa583)=>{if(!_0x1fa583['options']['showCommentHighlights'])return;const _0x1befea=_0x3ae77c['item'];if(!_0x1befea)return;const _0x3935d9=_0x1fa583['mapper']['toViewElement'](_0x1befea);this['editor']['model']['schema']['isObject'](_0x1befea)&&_0x3935d9&&!_0x3935d9['getCustomProperty']('widget')&&_0x3935d9['is']('containerElement')&&_0x241183(_0x3935d9,_0x1fa583['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x19f2a5,{writer:_0x89602,options:_0x359b77})=>{if(!_0x359b77['showCommentHighlights'])return null;const _0x121caa=_0x89602['createContainerElement']('div'),_0x5e2e5e=_0x89602['createEmptyElement']('hr');return _0x89602['addClass']('ck-horizontal-line',_0x121caa),_0x89602['insert'](_0x89602['createPositionAt'](_0x121caa,0x0),_0x5e2e5e),_0x121caa;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5b5db5,{writer:_0x5de24d,options:_0xbc076f})=>{if(!_0xbc076f['showCommentHighlights'])return null;const _0x111229=_0x5de24d['createContainerElement']('span'),_0x3950b0=_0x5de24d['createEmptyElement']('img');return _0x5de24d['addClass']('image-inline',_0x111229),_0x5de24d['insert'](_0x5de24d['createPositionAt'](_0x111229,0x0),_0x3950b0),_0x111229;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x56347d,{writer:_0x1767b1,options:_0x1313fb})=>{if(_0x1313fb['showCommentHighlights'])return _0x1767b1['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2d099f,_0x3acc5e,_0x384651)=>{_0x384651['options']['showCommentHighlights']&&_0x2d099f['stop']();},{'priority':'high'});}}class r extends _0x37aa4b{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x349f18){super(_0x349f18),this['set']('isThreadsLoadingPaused',!0x0),_0x349f18['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x542f08,_0x5efa94,_0x1c5733,_0x4ffb6f)=>{const _0x21f68e=_0x349f18['plugins']['get'](o),_0x2b5c64=_0x1c5733?ft(_0x1c5733)['id']:null;_0x349f18['model']['change'](()=>{if(_0x2b5c64){const _0x191ab7=this['getAllMarkersForId'](_0x2b5c64);for(const _0x200fad of _0x191ab7)_0x349f18['editing']['reconvertMarker'](_0x200fad);}if(_0x4ffb6f){const {id:_0x35fb0c}=ft(_0x4ffb6f),_0x5470cb=_0x21f68e['getCommentThread'](_0x35fb0c);if(_0x5470cb&&_0x5470cb['unlinkedAt'])return;if(_0x5470cb&&!_0x5470cb['isAttached'])return;const _0x275cda=this['getAllMarkersForId'](_0x35fb0c);for(const _0x5d9e5c of _0x275cda)_0x349f18['editing']['reconvertMarker'](_0x5d9e5c);}}),_0x2b5c64&&this['scrollToThreadMarker'](_0x2b5c64);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4538e4=this['editor'],_0x4520b7=_0x4538e4['plugins']['get'](o),_0x3796ee=_0x4538e4['config']['get']('collaboration.channelId'),_0x112033=_0x4520b7['getCommentThreads']()['filter'](_0x48d5b6=>_0x48d5b6['channelId']!==_0x3796ee);_0x4538e4['commands']['add']('addCommentThread',new ot(_0x4538e4)),this['listenTo'](_0x4538e4,'change:isReadOnly',(_0xaf4a34,_0x587dc7,_0x2af37f)=>{_0x4520b7['switchReadOnly'](_0x2af37f,_0x4538e4['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4520b7,dt('addCommentThread',_0x3796ee),(_0x963695,{threadId:_0x690ade})=>{const _0x4cdae6=this['editor']['plugins']['get'](o)['getCommentThread'](_0x690ade);_0x4cdae6?.['unlinkedAt']&&this['_attachArchivedThread'](_0x690ade);}),this['listenTo'](_0x4520b7,dt('removeCommentThread',_0x3796ee),(_0x585dcb,{threadId:_0x4c56b5})=>{_0x4538e4['model']['enqueueChange']({'isUndoable':!0x1},_0x59b061=>{const _0x1e2b26=this['getAllMarkersForId'](_0x4c56b5);for(const _0x518885 of _0x1e2b26)_0x59b061['removeMarker'](_0x518885);});}),this['listenTo'](_0x4520b7,dt('resolveCommentThread',_0x3796ee),(_0x47e75e,{threadId:_0x133842})=>{(this['_reconvertMarkers'](_0x133842),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x133842)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4520b7,dt('reopenCommentThread',_0x3796ee),(_0x57d453,{threadId:_0x5b8b9e})=>{this['_reconvertMarkers'](_0x5b8b9e);},{'priority':'low'}),this['listenTo'](_0x4520b7,dt('addComment',_0x3796ee),(_0x1dbb8c,{threadId:_0x2e7925,isFromAdapter:_0x1b54dc})=>{const _0x5d6829=this['getAllMarkersForId'](_0x2e7925);if(_0x1b54dc||0x0==_0x5d6829['length']||!_0x4520b7['hasCommentThread'](_0x2e7925))return;0x1===_0x4520b7['getCommentThread'](_0x2e7925)['length']&&_0x4538e4['model']['enqueueChange']({'isUndoable':!0x1},_0x588728=>{for(const _0x3924b9 of _0x5d6829)_0x588728['updateMarker'](_0x3924b9,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x112033);}['afterInit'](){!async function(_0x294631){const _0x117979=_0x2fe6a6([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x53b376=0x73460ab3,_0x23ec5c=0x73418ebb^_0x53b376,_0x127b19=window[_0x2fe6a6([0x44,0x61,0x74,0x65])][_0x2fe6a6([0x6e,0x6f,0x77])](),_0x38d3a4=_0x294631[_0x2fe6a6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x813322=new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ed6f0=>{_0x38d3a4[_0x2fe6a6([0x6f,0x6e,0x63,0x65])](_0x2fe6a6([0x72,0x65,0x61,0x64,0x79]),_0x2ed6f0);}),_0x5034f4={[_0x2fe6a6([0x6b,0x74,0x79])]:_0x2fe6a6([0x45,0x43]),[_0x2fe6a6([0x75,0x73,0x65])]:_0x2fe6a6([0x73,0x69,0x67]),[_0x2fe6a6([0x63,0x72,0x76])]:_0x2fe6a6([0x50,0x2d,0x32,0x35,0x36]),[_0x2fe6a6([0x78])]:_0x2fe6a6([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x2fe6a6([0x79])]:_0x2fe6a6([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x2fe6a6([0x61,0x6c,0x67])]:_0x2fe6a6([0x45,0x53,0x32,0x35,0x36])},_0x2c03df=_0x38d3a4[_0x2fe6a6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2fe6a6([0x67,0x65,0x74])](_0x2fe6a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x44078a(){let _0x345d7e,_0x2e25c7=null,_0x5c1a9c=null;try{if(_0x2c03df==_0x2fe6a6([0x47,0x50,0x4c]))return _0x2fe6a6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x345d7e=_0x1eca3c(),!_0x345d7e)return _0x2fe6a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x345d7e[_0x2fe6a6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5c1a9c=_0x2665ee(_0x345d7e[_0x2fe6a6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x345d7e[_0x2fe6a6([0x6a,0x74,0x69])])),await _0x226b37()?_0x207542()?_0x159b19()?_0x2fe6a6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3f87a0()?(_0x345d7e[_0x2fe6a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2fe6a6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e25c7=_0x5f5eff(_0x2fe6a6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4024fc()):_0x2fe6a6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2fe6a6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2fe6a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2fe6a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x159b19(){const _0x29afaf=[_0x2fe6a6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2fe6a6([0x74,0x72,0x69,0x61,0x6c])][_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x345d7e[_0x2fe6a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x127b19/0x3e8:0xe10*_0x23ec5c;return _0x345d7e[_0x2fe6a6([0x65,0x78,0x70])]<_0x29afaf;}function _0x207542(){const _0x434b35=_0x345d7e[_0x2fe6a6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x434b35)return!0x1;if(_0x434b35[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fe6a6([0x2a])))return!0x0;if(_0x434b35[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fe6a6([0x43,0x4d,0x54])))return!0x0;if(_0x434b35[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fe6a6([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x13e893())return!0x0;if(_0x434b35[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fe6a6([0x52,0x43,0x4d,0x54]))){if(_0x3b1ada())return!0x0;if(_0x17a017()||_0x493726())return!0x0;}return!0x1;}function _0x3f87a0(){const _0x5a3e7c=_0x345d7e[_0x2fe6a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5a3e7c||0x0==_0x5a3e7c[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3a7f29}=new URL(window[_0x2fe6a6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5a3e7c[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a7f29))return!0x0;const _0x545875=_0x3a7f29[_0x2fe6a6([0x73,0x70,0x6c,0x69,0x74])](_0x2fe6a6([0x2e]));return _0x5a3e7c[_0x2fe6a6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1dddcd=>_0x1dddcd[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fe6a6([0x2a])))[_0x2fe6a6([0x6d,0x61,0x70])](_0x3361f1=>_0x3361f1[_0x2fe6a6([0x73,0x70,0x6c,0x69,0x74])](_0x2fe6a6([0x2e])))[_0x2fe6a6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a6a53=>_0x1a6a53[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x545875[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2fe6a6([0x6d,0x61,0x70])](_0x1ccdf9=>Array(_0x545875[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1ccdf9[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2fe6a6([0x66,0x69,0x6c,0x6c])](_0x1ccdf9[0x0]===_0x2fe6a6([0x2a])?_0x2fe6a6([0x2a]):'')[_0x2fe6a6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1ccdf9))[_0x2fe6a6([0x73,0x6f,0x6d,0x65])](_0x30e314=>_0x545875[_0x2fe6a6([0x65,0x76,0x65,0x72,0x79])]((_0x5afbe8,_0x4eb173)=>_0x30e314[_0x4eb173]===_0x5afbe8||_0x30e314[_0x4eb173]===_0x2fe6a6([0x2a])));}function _0x4024fc(){return _0x2e25c7&&_0x5c1a9c?new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5ab2d3,_0xcea8f2)=>{_0x2e25c7[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x5ab2d3,_0xcea8f2),_0x5c1a9c[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x4c53c1=>{_0x4c53c1!=_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64])&&_0x5ab2d3(_0x4c53c1);},_0xcea8f2);}):_0x2e25c7||_0x5c1a9c||_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2665ee(_0x21914f,_0x308325){return new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1786b3=>{if(_0x2fe237())return _0x1786b3(_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64]));_0x5aee53(),_0x38d3a4[_0x2fe6a6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2fe6a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x506948=!0x1;const _0x13a064=_0x477669();function _0x653cd9(_0x2d6ab6){return!!_0x2d6ab6&&(typeof _0x2d6ab6===_0x2fe6a6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2d6ab6===_0x2fe6a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2d6ab6[_0x2fe6a6([0x74,0x68,0x65,0x6e])]===_0x2fe6a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2d6ab6[_0x2fe6a6([0x63,0x61,0x74,0x63,0x68])]===_0x2fe6a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x173e1d(_0x2079b6){_0x5aa586(_0x2079b6)[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x3314ae=>{if(!_0x3314ae||_0x3314ae[_0x2fe6a6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2fe6a6([0x6f,0x6b]))return _0x2fe6a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x986c2f(_0x31fe5f(_0x13a064+_0x308325))!=_0x3314ae[_0x2fe6a6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2fe6a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64]);})[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x2f1c7c=>(_0x3f5fd3(),_0x2f1c7c),()=>{const _0x154f7d=_0x50e7f8();return null==_0x154f7d?(_0x3f5fd3(),_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64])):_0x2fe6a6(_0x127b19-_0x154f7d>(0x574a8eb3^_0x53b376)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x1786b3)[_0x2fe6a6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1786b3(_0x2fe6a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4b3e2d=0x7370e433^_0x53b376;function _0x3f5fd3(){const _0x4f51a1=_0x2fe6a6([0x6c,0x6c,0x63,0x74,0x2d])+_0x986c2f(_0x31fe5f(_0x21914f)),_0x345776=_0x323991(_0x986c2f(window[_0x2fe6a6([0x4d,0x61,0x74,0x68])][_0x2fe6a6([0x63,0x65,0x69,0x6c])](_0x127b19/_0x4b3e2d)));window[_0x2fe6a6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2fe6a6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f51a1,_0x345776);}function _0x50e7f8(){const _0x4f0846=_0x2fe6a6([0x6c,0x6c,0x63,0x74,0x2d])+_0x986c2f(_0x31fe5f(_0x21914f)),_0xb04b7c=window[_0x2fe6a6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2fe6a6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f0846);return _0xb04b7c?window[_0x2fe6a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x323991(_0xb04b7c),0x10)*_0x4b3e2d:null;}function _0x5aa586(_0x9309b5){return new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x59eaa9,_0x584268)=>{_0x9309b5[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x59eaa9,_0x584268),window[_0x2fe6a6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x584268,0x7347de73^_0x53b376);});}}_0x38d3a4[_0x2fe6a6([0x6f,0x6e])](_0x2fe6a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x56111c,_0x2941d9)=>{if(_0x2941d9[0x0]!=_0x21914f)return _0x1786b3(_0x2fe6a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2941d9[0x1]={..._0x2941d9[0x1],[_0x2fe6a6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x13a064};},{[_0x2fe6a6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2fe6a6([0x68,0x69,0x67,0x68])}),_0x38d3a4[_0x2fe6a6([0x6f,0x6e])](_0x2fe6a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x57320f=>{_0x653cd9(_0x57320f[_0x2fe6a6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x506948=!0x0,_0x173e1d(_0x57320f[_0x2fe6a6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2fe6a6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2fe6a6([0x6c,0x6f,0x77])}),_0x813322[_0x2fe6a6([0x74,0x68,0x65,0x6e])](()=>{_0x506948||_0x1786b3(_0x2fe6a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2fe237(){return _0x38d3a4[_0x2fe6a6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2fe6a6([0x76,0x69,0x65,0x77])][_0x2fe6a6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2fe6a6([0x61,0x75,0x74,0x6f]);}function _0x5aee53(){_0x38d3a4[_0x2fe6a6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2fe6a6([0x76,0x69,0x65,0x77])][_0x2fe6a6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2fe6a6([0x61,0x75,0x74,0x6f]);}}function _0x5f5eff(_0x43bd3a){const _0x4d1f20=[new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f077d=>setTimeout(_0x5f077d,0x734f347f^_0x53b376)),_0x813322[_0x2fe6a6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd90f9d=>{let _0x109192=0x0;_0x38d3a4[_0x2fe6a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2fe6a6([0x6f,0x6e])](_0x2fe6a6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x130431,_0x3fd20c)=>{_0x3fd20c[0x0][_0x2fe6a6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x109192++,_0x109192==(0x73460f5b^_0x53b376)&&(_0xd90f9d(),_0x130431[_0x2fe6a6([0x6f,0x66,0x66])]());});}))];return window[_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2fe6a6([0x72,0x61,0x63,0x65])](_0x4d1f20)[_0x2fe6a6([0x74,0x68,0x65,0x6e])](()=>_0x43bd3a);}async function _0x5c4614(){await _0x813322,_0x38d3a4[_0x2fe6a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2fe6a6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3782fb,_0x38d3a4[_0x2fe6a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2fe6a6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3782fb,_0x38d3a4[_0x2fe6a6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2fe6a6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x13e893(){return window[_0x2fe6a6([0x67,0x6c,0x6f,0x62])]&&window[_0x2fe6a6([0x67,0x6c,0x6f,0x62])][_0x2fe6a6([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x3b1ada(){return _0x25481e(_0x2fe6a6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1eebda(_0x2fe6a6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2fe6a6([0x73,0x74,0x61,0x74,0x65])]==_0x2fe6a6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x17a017(){return _0x25481e(_0x2fe6a6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x493726(){return _0x25481e(_0x2fe6a6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x24ba63(_0x49d76b){const _0xdd36fa=_0x526d3d();_0x38d3a4[_0xdd36fa]=_0x2fe6a6([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x49d76b,_0x49d76b!=_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64])&&_0x5c4614();}function _0x526d3d(){const _0x24a800=window[_0x2fe6a6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2fe6a6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2fe6a6([0x6e,0x6f,0x77])]())[_0x2fe6a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2fe6a6([0x2e]),'');let _0x23bddf=_0x2fe6a6([0x4b]);for(let _0x32fec2=0x0;_0x32fec2<_0x24a800[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x32fec2+=0x2){let _0x4996f8=window[_0x2fe6a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x24a800[_0x2fe6a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x32fec2,_0x32fec2+0x2));_0x4996f8>=_0x117979[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4996f8-=_0x117979[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x23bddf+=_0x117979[_0x4996f8];}return _0x23bddf;}function _0x1eca3c(){const _0x41348d=_0x2c03df[_0x2fe6a6([0x73,0x70,0x6c,0x69,0x74])](_0x2fe6a6([0x2e]));if(0x3!=_0x41348d[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2bcb4e(_0x41348d[0x1]);function _0x2bcb4e(_0x2de94a){const _0x43eea7=_0x1f4d5b(_0x2de94a);return _0x43eea7&&_0x2ebd01()?_0x43eea7:null;function _0x2ebd01(){const _0x10544e=_0x43eea7[_0x2fe6a6([0x6a,0x74,0x69])],_0x238894=window[_0x2fe6a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10544e[_0x2fe6a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x10544e[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x196360={..._0x43eea7,[_0x2fe6a6([0x6a,0x74,0x69])]:_0x10544e[_0x2fe6a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x10544e[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x196360[_0x2fe6a6([0x76,0x63])],_0x31fe5f(_0x196360)==_0x238894;}}}async function _0x226b37(){let _0x5cfa19=!0x0;try{const _0x1634c3=_0x2c03df[_0x2fe6a6([0x73,0x70,0x6c,0x69,0x74])](_0x2fe6a6([0x2e])),[_0x3b537e,_0x5e80e2,_0x16ac1d]=_0x1634c3;return _0x2694da(_0x3b537e),await _0x8bfda7(_0x3b537e,_0x5e80e2,_0x16ac1d),_0x5cfa19;}catch{return!0x1;}function _0x2694da(_0x28b04c){const _0x597e8d=_0x1f4d5b(_0x28b04c);_0x597e8d&&_0x597e8d[_0x2fe6a6([0x61,0x6c,0x67])]==_0x2fe6a6([0x45,0x53,0x32,0x35,0x36])||(_0x5cfa19=!0x1);}async function _0x8bfda7(_0x4106fd,_0x183fdc,_0x97df1e){const _0x33284c=window[_0x2fe6a6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2fe6a6([0x66,0x72,0x6f,0x6d])](_0xba3524(_0x97df1e),_0x50d72b=>_0x50d72b[_0x2fe6a6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x25e76c=new window[(_0x2fe6a6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2fe6a6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4106fd+_0x2fe6a6([0x2e])+_0x183fdc),_0x3f0f61=window[_0x2fe6a6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2fe6a6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3f0f61)return;const _0x3789f8=await _0x3f0f61[_0x2fe6a6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2fe6a6([0x6a,0x77,0x6b]),_0x5034f4,{[_0x2fe6a6([0x6e,0x61,0x6d,0x65])]:_0x2fe6a6([0x45,0x43,0x44,0x53,0x41]),[_0x2fe6a6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2fe6a6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2fe6a6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3f0f61[_0x2fe6a6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2fe6a6([0x6e,0x61,0x6d,0x65])]:_0x2fe6a6([0x45,0x43,0x44,0x53,0x41]),[_0x2fe6a6([0x68,0x61,0x73,0x68])]:{[_0x2fe6a6([0x6e,0x61,0x6d,0x65])]:_0x2fe6a6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3789f8,_0x33284c,_0x25e76c)||(_0x5cfa19=!0x1);}}function _0x1f4d5b(_0x2a9253){return _0x2a9253[_0x2fe6a6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2fe6a6([0x65,0x79]))?JSON[_0x2fe6a6([0x70,0x61,0x72,0x73,0x65])](_0xba3524(_0x2a9253)):null;}function _0xba3524(_0x4ca53a){return window[_0x2fe6a6([0x61,0x74,0x6f,0x62])](_0x4ca53a[_0x2fe6a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2fe6a6([0x2b]))[_0x2fe6a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2fe6a6([0x2f])));}function _0x31fe5f(_0x59b58a){let _0x358292=0x1505;function _0x3a8102(_0x5d4633){for(let _0xcea788=0x0;_0xcea788<_0x5d4633[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xcea788++){const _0x15488c=_0x5d4633[_0x2fe6a6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xcea788);_0x358292=(_0x358292<<0x5)+_0x358292+_0x15488c,_0x358292&=_0x358292;}}function _0x2495ef(_0x3b9c41){Array[_0x2fe6a6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3b9c41)?_0x3b9c41[_0x2fe6a6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2495ef):_0x3b9c41&&typeof _0x3b9c41==_0x2fe6a6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2fe6a6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3b9c41)[_0x2fe6a6([0x73,0x6f,0x72,0x74])]()[_0x2fe6a6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x22b0d4,_0x44afb0])=>{_0x3a8102(_0x22b0d4),_0x2495ef(_0x44afb0);}):_0x3a8102(window[_0x2fe6a6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3b9c41));}return _0x2495ef(_0x59b58a),_0x358292>>>0x0;}function _0x986c2f(_0x1b1f1d){return _0x1b1f1d[_0x2fe6a6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2fe6a6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2fe6a6([0x30]));}function _0x323991(_0x620594){return _0x620594[_0x2fe6a6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2fe6a6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2fe6a6([0x6a,0x6f,0x69,0x6e])]('');}function _0x25481e(_0x1a74ca){return _0x38d3a4[_0x2fe6a6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2fe6a6([0x68,0x61,0x73])](_0x1a74ca);}function _0x1eebda(_0x373b6b){return _0x38d3a4[_0x2fe6a6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2fe6a6([0x67,0x65,0x74])](_0x373b6b);}function _0x3782fb(){}function _0x2fe6a6(_0x56210b){return _0x56210b['map'](_0x30cdaa=>String['fromCharCode'](_0x30cdaa))['join']('');}_0x24ba63(await _0x44078a());}(this);}['destroy'](){const _0x482cce=this['editor']['plugins']['get'](o),_0x77d1d9=this['editor']['config']['get']('collaboration.channelId');for(const _0x367675 of _0x482cce['getCommentThreads']({'channelId':_0x77d1d9}))_0x482cce['_detachCommentThread'](_0x367675['id']),_0x482cce['_threads']['delete'](_0x367675['id']);super['destroy']();}['hasMarkerForId'](_0x38ac6c){return this['getAllMarkersForId'](_0x38ac6c)['length']>0x0;}['getAllMarkersForId'](_0x1559b5){const _0x160694=[];for(const _0x375aa9 of this['editor']['model']['markers'])_0x375aa9['name']['startsWith']('comment:'+_0x1559b5)&&_0x160694['push'](_0x375aa9);return _0x160694;}['scrollToThreadMarker'](_0x4388c9){setTimeout(()=>{const _0x93d1a7=this['_getTargetForId'](_0x4388c9);if(!_0x93d1a7)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x4388c9&&nt({'target':_0x93d1a7[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4233fe){this['editor']['model']['change'](()=>{for(const _0x31da8c of this['getAllMarkersForId'](_0x4233fe))this['editor']['editing']['reconvertMarker'](_0x31da8c);});}['_attachArchivedThread'](_0x41ce0f){const _0x1629fe=this['editor']['plugins']['get'](o),_0x2c880b=this['editor']['plugins']['get'](b),_0x137b4c=_0x1629fe['getCommentThread'](_0x41ce0f);if(!_0x137b4c['isAttached']){const _0x251092=_0x137b4c['attachTo'](()=>this['_getTargetForId'](_0x137b4c['id']));_0x2c880b['registerAnnotation'](_0x251092),_0x137b4c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3bd86c=this['editor'],_0x3f9a8c=_0x3bd86c['plugins']['get'](it);_0x3bd86c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x31b3a0,_0x4bce8c)=>{const {id:_0x188078}=ft(_0x31b3a0['markerName']),_0x3d200a=_0x3bd86c['plugins']['get'](o)['getCommentThread'](_0x188078),_0xd33f58=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x188078;let _0x50fea3;if(_0x3d200a&&_0x3d200a['isResolved']&&!_0xd33f58&&_0x31b3a0['item'])return _0x4bce8c['consumable']['consume'](_0x31b3a0['item'],'addMarker:'+_0x31b3a0['markerName']),_0x4bce8c['consumable']['consume'](_0x31b3a0['item'],'removeMarker:'+_0x31b3a0['markerName']),null;const _0x3ba45b=['ck-comment-marker'];return _0xd33f58&&_0x3ba45b['push']('ck-comment-marker--active'),_0x50fea3=_0x3d200a?.['length']?_0x3d200a['comments']['first']['author']['id']:_0x3f9a8c['me']['id'],{'classes':_0x3ba45b,'attributes':{'data-comment':_0x188078,'data-author-id':_0x50fea3}};}}),_0x3bd86c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4c34ef,{options:_0x23ed54})=>{if(_0x23ed54['showCommentHighlights'])return null;const _0x425a30=_0x3bd86c['plugins']['get'](o),_0x300390=_0x3bd86c['model']['markers']['get'](_0x4c34ef),{id:_0x58499e,part:_0x37ca2c}=ft(_0x4c34ef);return _0x300390&&!_0x300390['affectsData']||_0x23ed54['ignoreResolvedComments']&&_0x425a30['getCommentThread'](_0x58499e)?.['isResolved']?null:{'group':'comment','name':_0x37ca2c?_0x58499e+':'+_0x37ca2c:_0x58499e};}}),_0x3bd86c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2433c9,{writer:_0x232a6e})=>_0x232a6e['createElement']('$marker',{'data-name':'comment:'+_0x2433c9['getAttribute']('id')})}),_0x3bd86c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2800f9=this['editor'],_0xfb4a34=_0x2800f9['plugins']['get'](o),_0x57aaa3=new Set(),_0x4ccb36=new Set();_0x2800f9['model']['document']['registerPostFixer'](_0x5128c8=>{let _0x318d77=!0x1;for(const {name:_0x3a8173,data:_0x333e41}of _0x2800f9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1b5f39,id:_0xa720b8}=ft(_0x3a8173);let _0x1f4544=_0x333e41['newRange'];if('comment'!==_0x1b5f39||!_0x1f4544)continue;const _0x148b56='$graveyard'===_0x1f4544['root']['rootName'];_0x148b56||(_0x1f4544=ht(_0x1f4544,_0x2800f9['model']),!_0x1f4544||_0x1f4544['isCollapsed']||!_0x333e41['newRange']||_0x1f4544['isEqual'](_0x333e41['newRange']))?_0x2800f9['model']['hasContent'](_0x1f4544)&&!_0x148b56?this['isThreadsLoadingPaused']?_0x57aaa3['add'](_0x3a8173):this['_handleThreadMarker'](_0x3a8173,_0xa720b8):(_0x4ccb36['add'](_0x3a8173),_0x57aaa3['delete'](_0x3a8173),_0x5128c8['removeMarker'](_0x3a8173),_0x318d77=!0x0):(_0x5128c8['updateMarker'](_0x3a8173,{'range':_0x1f4544}),_0x318d77=!0x0);}return _0x318d77;}),this['on']('change:isThreadsLoadingPaused',(_0x25ab91,_0x1ad68f,_0x3198a3)=>{if(!_0x3198a3&&_0x57aaa3['size'])for(const _0xcbed3a of _0x57aaa3){const {id:_0x3fbdc8}=ft(_0xcbed3a);_0x57aaa3['delete'](_0xcbed3a),_0x2800f9['model']['markers']['get'](_0xcbed3a)&&this['_handleThreadMarker'](_0xcbed3a,_0x3fbdc8);}}),this['listenTo'](_0x2800f9['model']['document'],'change',()=>{for(const {name:_0x30a3f4,data:{newRange:_0x9c225c}}of _0x2800f9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x13f91e,id:_0x53c092}=ft(_0x30a3f4);if('comment'!==_0x13f91e)continue;const _0x14c29f=_0xfb4a34['getCommentThread'](_0x53c092),_0x256808=this['hasMarkerForId'](_0x53c092);_0x14c29f&&(!_0x14c29f['_hasTargetInContent']&&_0x9c225c&&_0x2800f9['editing']['view']['once']('render',()=>{const _0x1d638c=_0x2800f9['plugins']['get'](y),_0x2a9285=_0xfb4a34['_threadToController']['get'](_0x14c29f)['view'];_0x1d638c['getByInnerView'](_0x2a9285)['refreshVisibility']();},{'priority':'low'}),_0x14c29f['_hasTargetInContent']=_0x256808||!!_0x9c225c),_0x9c225c||(_0x4ccb36['add'](_0x30a3f4),_0x57aaa3['delete'](_0x30a3f4));}for(const _0x1eeeeb of _0x4ccb36){const {id:_0x57c955}=ft(_0x1eeeeb),_0x3d8f93=_0xfb4a34['getCommentThread'](_0x57c955);if(_0x57aaa3['delete'](_0x1eeeeb),!_0x3d8f93)continue;const _0x91d9b8=this['hasMarkerForId'](_0x57c955);_0x91d9b8||_0x3d8f93['isSubmitted']?_0x91d9b8||_0x3d8f93['unlinkedAt']||_0x3d8f93['setUnlinkedAt'](new Date()):_0x3d8f93['remove']();}_0x4ccb36['clear']();});}['_handleInitialThreads'](_0x37682a){_0x37682a['forEach'](_0x2e1509=>{_0x2e1509['unlinkedAt']&&this['_attachArchivedThread'](_0x2e1509['id']);});}['_getTargetForId'](_0x5d467d){const _0x40b8d7=this['editor'],_0x47dce2=this['getAllMarkersForId'](_0x5d467d);return et(_0x40b8d7['editing'],_0x47dce2);}['_getTextContext'](_0x4b72ce){const _0x2d1ec2=this['getAllMarkersForId'](_0x4b72ce);let _0x39814c='',_0x4a0c5f=!0x1;for(const _0x28b191 of _0x2d1ec2){const _0x1e04f0=_0x28b191['getRange']();for(const _0x2ffa5d of Array['from'](_0x1e04f0['getItems']()))_0x2ffa5d['is']('$textProxy')?(_0x39814c&&_0x4a0c5f&&(_0x39814c+='\x20',_0x4a0c5f=!0x1),_0x39814c+=_0x2ffa5d['data']):_0x4a0c5f=!0x0;_0x4a0c5f=!0x0;}return _0x39814c['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1a9983,_0x85dbd7){const _0x315332=this['editor'],_0x373c73=_0x315332['plugins']['get'](o);let _0x42deb6=_0x373c73['getCommentThread'](_0x85dbd7);const _0x4c3190=_0x315332['config']['get']('collaboration.channelId'),_0x21cb9e=_0x315332['plugins']['get'](b);if(_0x42deb6&&(_0x42deb6['unlinkedAt']&&_0x42deb6['setUnlinkedAt'](null),_0x42deb6['isAttached']))return _0x42deb6;return!this['getAllMarkersForId'](_0x85dbd7)[0x0]['managedUsingOperations']?_0x315332['editing']['view']['once']('render',()=>{if(_0x373c73['getCommentThread'](_0x85dbd7))return;const _0x396a41=_0x315332['plugins']['get'](y);_0x42deb6=_0x373c73['openNewCommentThread']({'channelId':_0x4c3190,'threadId':_0x85dbd7,'target':()=>this['_getTargetForId'](_0x85dbd7),'context':{'type':'text','value':this['_getTextContext'](_0x85dbd7)}});const _0x5cea9b=_0x373c73['_threadToController']['get'](_0x42deb6)['view'],_0x352952=_0x396a41['getByInnerView'](_0x5cea9b);_0x352952&&_0x21cb9e['registerAnnotation'](_0x352952);},{'priority':'low'}):_0x373c73['fetchCommentThread']({'channelId':_0x4c3190,'threadId':_0x85dbd7})['then'](_0x1b95b3=>{if('destroyed'!==_0x315332['state']){if(_0x42deb6=_0x1b95b3,_0x42deb6&&!_0x42deb6['isAttached']){const _0x1ea3bc=_0x42deb6['attachTo'](()=>this['_getTargetForId'](_0x85dbd7));_0x21cb9e['registerAnnotation'](_0x1ea3bc),_0x42deb6['isResolved']&&this['_reconvertMarkers'](_0x85dbd7);}else{if(!_0x42deb6){const _0x1812da=this['getAllMarkersForId'](_0x85dbd7);_0x315332['model']['change'](_0x1637c1=>{for(const _0x31dea7 of _0x1812da)_0x1637c1['removeMarker'](_0x31dea7);});}}}}),_0x42deb6;}['_handleThreadMarker'](_0x3e76ce,_0x34b120){const _0x352a19=this['_attachMarkerToThread'](_0x3e76ce,_0x34b120);_0x352a19&&!_0x352a19['context']&&_0x352a19['setContext']({'type':'text','value':this['_getTextContext'](_0x34b120)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1b3ada=this['editor'];rt(_0x1b3ada['model'],({left:_0x441b1a,entered:_0x385aa8})=>{for(const _0x2c7ea6 of _0x441b1a)if(mt(_0x2c7ea6)){_0x1b3ada['ui']['ariaLiveAnnouncer']['announce'](N(_0x1b3ada['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1422c8 of _0x385aa8)if(mt(_0x1422c8)){_0x1b3ada['ui']['ariaLiveAnnouncer']['announce'](N(_0x1b3ada['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x32ac22)));break;}});}}function dt(_0x46aa5a,_0x31a59f){return _0x31a59f?_0x46aa5a+':'+_0x31a59f:_0x46aa5a;}function ht(_0x3c6de8,_0x3d6647){const _0x4c07fc=_0x3d6647['schema'],_0x2df6b6=_0x3d6647['createRange'](_0x3c6de8['start']);for(const _0x3c087f of _0x3c6de8['getWalker']()){const {type:_0x3a954c,item:_0x132084,nextPosition:_0x508bfc}=_0x3c087f;if('text'===_0x3a954c||_0x4c07fc['isObject'](_0x132084)){const _0xd91dc9=_0x3d6647['createPositionBefore'](_0x132084);_0x2df6b6['isCollapsed']&&(_0x2df6b6['start']=_0xd91dc9),_0x2df6b6['end']=_0x508bfc;}}return _0x2df6b6;}function mt(_0x59339d){return'comment'===ft(_0x59339d['name'])['group'];}class s extends _0x37aa4b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x36da3e=this['editor'],_0x24eff1=_0x36da3e['plugins']['get'](o),_0xa41569=_0x36da3e['plugins']['get'](r),_0x3d80fa=_0x36da3e['plugins']['get'](y),_0x21c91c=_0x36da3e['plugins']['get'](b);_0x36da3e['ui']['componentFactory']['add']('comment',()=>{const _0x3a14cc=this['_createUIButton'](_0x1c15c2);return _0x3a14cc['tooltip']=!0x0,_0x3a14cc;}),_0x36da3e['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x34ca18)),_0x21c91c['addSourceCollector'](()=>{const _0x545cf0=[];for(const [_0x39e13f,_0x14c6f2]of _0x24eff1['_threadToController']){const _0x3c208d=_0xa41569['getAllMarkersForId'](_0x39e13f['id']),_0x57501a=_0x3c208d['map'](_0x2e2e02=>_0x2e2e02['getRange']());_0x3c208d['length']>0x0&&_0x545cf0['push']([_0x14c6f2['view'],_0x57501a]);}return _0x545cf0;}),this['listenTo'](_0x3d80fa,'change:activeAnnotations',(_0x209539,_0x1e6fea,_0x1cef69)=>{const _0x493d4d=Array['from'](_0x1cef69)['map'](_0x200158=>_0x200158['innerView'])['find'](_0x587322=>_0x24eff1['_viewToController']['has'](_0x587322));if(!_0x493d4d)return void(_0xa41569['activeMarker']=null);const _0x5d3222=_0x24eff1['_viewToController']['get'](_0x493d4d)['model']['id'],_0x364918='comment:'+_0x5d3222;_0x5d3222&&_0xa41569['hasMarkerForId'](_0x5d3222)?_0xa41569['activeMarker']=_0x364918:_0xa41569['activeMarker']&&(_0xa41569['activeMarker']=null);}),this['listenTo'](_0x24eff1,'removeCommentThread',(_0x49ffa1,{threadId:_0x28387a,isFromAdapter:_0x421348})=>{!_0x421348&&_0x36da3e['ui']['focusTracker']['isFocused']&&_0xa41569['hasMarkerForId'](_0x28387a)&&_0x36da3e['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x24eff1,'addComment',(_0x53d3ef,{threadId:_0x1b559a,isFromAdapter:_0x26e9ec})=>{if(_0x26e9ec||!_0xa41569['hasMarkerForId'](_0x1b559a)||!_0x24eff1['hasCommentThread'](_0x1b559a))return;0x1===_0x24eff1['getCommentThread'](_0x1b559a)['length']&&(_0x36da3e['editing']['view']['focus'](),_0x53d3ef['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x24daa4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1cfc3c;for(const _0x57909d in _0x24daa4){const _0x588184=_0x57909d,_0x57e269=_0x24daa4[_0x588184];if('commentsLicenseKeyValid'==_0x57e269||'commentsLicenseKeyInvalid'==_0x57e269||'commentsLicenseKeyExpired'==_0x57e269||'commentsLicenseKeyDomainLimit'==_0x57e269||'commentsLicenseKeyNotAllowed'==_0x57e269||'commentsLicenseKeyEvaluationLimit'==_0x57e269||'commentsLicenseKeyUsageLimit'==_0x57e269){delete _0x24daa4[_0x588184],_0x1cfc3c=_0x57e269,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x8e78b5){const _0x587ec1=this['editor'],_0x458e52=new _0x8e78b5(_0x587ec1['locale']),_0x3ef7f6=_0x587ec1['commands']['get']('addCommentThread');return _0x458e52['set']({'label':N(_0x587ec1['locale'],'Comment'),'icon':_0xb70e92}),_0x458e52['bind']('isEnabled')['to'](_0x3ef7f6,'isEnabled',_0x3ef7f6,'hasContent',(_0xf79191,_0x7ca2eb)=>_0xf79191&&_0x7ca2eb),this['listenTo'](_0x458e52,'execute',()=>{_0x3ef7f6['execute']();}),_0x458e52;}}class i extends _0x37aa4b{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x453110){super(_0x453110),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5061b5,_0x2a2000,_0x11cd1b)=>{_0x11cd1b?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2e472d,_0xd2dd3f]of this['editor']['commands'])_0xd2dd3f['affectsData']&&'addCommentThread'!==_0x2e472d&&_0xd2dd3f['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x15a0ea=this['editor']['editing']['view']['document'];this['listenTo'](_0x15a0ea,'cut',_0x654bdb=>_0x654bdb['stop'](),{'priority':'highest'}),this['listenTo'](_0x15a0ea,'clipboardInput',_0xa72cee=>_0xa72cee['stop'](),{'priority':'highest'}),this['listenTo'](_0x15a0ea,'delete',_0x5deb72=>_0x5deb72['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5adf20,_0x5bc4cc]of this['editor']['commands'])_0x5bc4cc['affectsData']&&'addCommentThread'!==_0x5adf20&&_0x5bc4cc['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x593a50{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x210664){super(_0x210664),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x147842=this['context']['plugins']['get'](y);this['listenTo'](_0x147842,'_activateAnnotation',(_0x3bb385,_0x248477)=>{for(const _0x521733 of this['activeUIs']){const _0x5ecf44=this['_uis']['get'](_0x521733);(0x0,this['uisData']['get'](_0x521733)['filter'])(_0x248477)&&_0x5ecf44['setActiveAnnotation'](_0x248477);}}),this['listenTo'](_0x147842,'_deactivateAllAnnotations',()=>{for(const _0x5cc34b of this['activeUIs']){this['_uis']['get'](_0x5cc34b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x147842['_visibleAnnotations'],'add',(_0x5d31d3,_0x543bac)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x543bac);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x375724){return this['activeUIs']['has'](_0x375724);}['activate'](_0xbb5978,_0x494ff0=this['defaultFilter']){const _0x5cb72b=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0xbb5978))throw new _0x14fd42('annotationsuis-missing-ui',this,{'uiName':_0xbb5978});this['isActive'](_0xbb5978)&&this['deactivate'](_0xbb5978),this['activeUIs']['add'](_0xbb5978);const _0x27a29f=new S();v({'source':_0x5cb72b['_visibleAnnotations'],'target':_0x27a29f,'filter':_0x494ff0}),this['uisData']['set'](_0xbb5978,{'collection':_0x27a29f,'filter':_0x494ff0});const _0x58a7bc=this['_uis']['get'](_0xbb5978);_0x58a7bc['attach'](_0x27a29f),this['listenTo'](_0x58a7bc,'change:activeAnnotation',(_0x30f0c4,_0x478118,_0x1e4cf6,_0x456789)=>{_0x456789&&_0x5cb72b['_removeActiveAnnotation'](_0x456789),_0x1e4cf6&&_0x5cb72b['_addActiveAnnotation'](_0x1e4cf6);});}['deactivate'](_0x327574){if(this['activeUIs']['delete'](_0x327574),!this['_uis']['has'](_0x327574))throw new _0x14fd42('annotationsuis-missing-ui',this,{'uiName':_0x327574});const _0x3cdf6c=this['_uis']['get'](_0x327574);_0x3cdf6c['detach'](),this['stopListening'](_0x3cdf6c),this['uisData']['get'](_0x327574)['collection']['destroy'](),this['uisData']['delete'](_0x327574);}['switchTo'](_0x2bd873){if(!this['_uis']['has'](_0x2bd873))throw new _0x14fd42('annotationsuis-missing-ui',this,{'uiName':_0x2bd873});const _0x21cb44=this['context']['plugins']['get'](y),_0x44c097=Array['from'](_0x21cb44['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2bd873);const _0x2966bc=this['_uis']['get'](_0x2bd873);_0x2966bc['setActiveAnnotation'](_0x44c097),_0x2966bc['_setSelectedAnnotations']&&_0x44c097&&_0x2966bc['_setSelectedAnnotations']([_0x44c097]);}['deactivateAll'](){for(const _0xa47dc2 of this['activeUIs'])this['deactivate'](_0xa47dc2);}['register'](_0x196f22,_0x270aa2){if(this['_uis']['has'](_0x196f22))throw new _0x14fd42('annotationsuis-register-already-registered');if('function'!=typeof _0x270aa2['attach']||'function'!=typeof _0x270aa2['detach']||'function'!=typeof _0x270aa2['setActiveAnnotation'])throw new _0x14fd42('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x196f22,_0x270aa2);}['refilterAnnotations'](){const _0x3f1b98=this['context']['plugins']['get'](y)['collection'],_0x419124=new Map(),_0x8cf8d=Array['from'](this['activeUIs']);for(const _0x16c97c of this['activeUIs']){const _0x458f05=this['uisData']['get'](_0x16c97c)['collection'];for(const _0x4a990b of _0x458f05)_0x419124['set'](_0x4a990b,_0x16c97c);}for(const _0x232460 of _0x3f1b98){const _0x50ded4=_0x419124['get'](_0x232460);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x232460);const _0x272c31=_0x8cf8d['find'](_0x344f88=>this['uisData']['get'](_0x344f88)['filter'](_0x232460));_0x50ded4!==_0x272c31&&(_0x50ded4&&this['uisData']['get'](_0x50ded4)['collection']['remove'](_0x232460),_0x272c31&&this['uisData']['get'](_0x272c31)['collection']['add'](_0x232460));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x40d8c7){const _0x259703=[];for(const _0xdba043 of this['activeUIs']){(0x0,this['uisData']['get'](_0xdba043)['filter'])(_0x40d8c7)&&_0x259703['push'](_0xdba043);}if(_0x259703['length']>0x1)throw new _0x14fd42('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x259703,'annotationType':_0x40d8c7['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x23153f){super(_0x23153f),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2ebdd5,_0x7f515f)=>_0x2ebdd5+_0x7f515f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3b2ef7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3b2ef7['to']('isAnimationDisabled',_0x1909f9=>_0x1909f9?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3b2ef7['to']('top',_0xdc9ec8=>Ot(_0xdc9ec8))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3d17f2=this['element']['clientHeight'];_0x3d17f2&&(this['height']=_0x3d17f2);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x593a50{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1989f1){super(_0x1989f1),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x263764=this['context']['config']['get']('sidebar.container');_0x263764&&this['setContainer'](_0x263764);}['setContainer'](_0x2e1ee0){if(!g(_0x2e1ee0))throw new _0x14fd42('sidebar-setcontainer-invalid-element');this['container']=_0x2e1ee0;}['_attachToContainer']({viewClass:_0x467c8f='',spaceBetweenItems:_0x34bfdf=0x19}={}){if(!g(this['container']))throw new _0x14fd42('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x467c8f,this['_spaceBetweenItems']=_0x34bfdf;}['rearrange']({removedAnnotation:_0x2d54cd,previousAnnotation:_0x3156de,nextAnnotation:_0x225762}){const _0x345199=this['getSidebarItemView'](_0x2d54cd);this['view']['list']['remove'](_0x345199),this['_destroySidebarItemView'](_0x2d54cd),_0x3156de&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3156de)),_0x225762&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x225762)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3ca031,activatedAnnotation:_0x257a40,disableAnimationOnActivatedAnnotation:_0x555c8f}){if(this['_activeAnnotation']=_0x257a40,_0x3ca031){_0x3ca031['isActive']=!0x1;const _0x14320d=this['getSidebarItemView'](_0x3ca031);_0x14320d&&_0x555c8f&&(_0x14320d['isAnimationDisabled']=!0x1);}if(_0x257a40){const _0xcfeff1=this['getSidebarItemView'](_0x257a40);_0xcfeff1&&(_0x257a40['isActive']=!0x0,_0x555c8f&&(_0xcfeff1['isAnimationDisabled']=!0x0,_0xcfeff1['top']+=0x1),this['_alignToTargetRect'](_0xcfeff1));}}['_detachFromContainer'](_0x10305a){if(this['view']['element']['remove'](),_0x10305a){for(const _0x2e6b50 of _0x10305a)this['_destroySidebarItemView'](_0x2e6b50);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2c7cab,_0x3465c5){_0x3465c5||(_0x3465c5=_0x2c7cab['view']);const _0x29cfed=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x29cfed,_0x2c7cab),this['_annotationToSidebarItemView']['set'](_0x2c7cab,_0x29cfed),_0x29cfed['content']['add'](_0x3465c5),this['listenTo'](_0x2c7cab['view'],'change:targetRect',(_0x415c3a,_0x235cf6,_0x307634)=>{const _0x49bff4=this['_getTargetTop'](_0x2c7cab,_0x307634);_0x29cfed['_targetTop']!=_0x49bff4&&(_0x29cfed['_targetTop']=_0x49bff4,this['_setItemTop'](_0x29cfed,_0x49bff4));}),this['listenTo'](_0x29cfed,'change:top',()=>{this['_recalculate'](_0x29cfed,'top');}),this['listenTo'](_0x29cfed,'change:bottom',()=>{this['_recalculate'](_0x29cfed,'bottom');}),this['_alignToTargetRect'](_0x29cfed);const _0x5729a0=this['_getItemBefore'](_0x29cfed);if(_0x5729a0)this['_alignAfterItem'](_0x5729a0,_0x29cfed)||this['_alignToTargetRect'](_0x29cfed);else this['_alignToTargetRect'](_0x29cfed);return this['_updateLastItem'](),this['view']['list']['add'](_0x29cfed),_0x29cfed;}['_alignForTopChange'](_0x536b26){if(!_0x536b26['content']['length'])return;const _0x445f9c=this['_getItemBefore'](_0x536b26);if(!_0x445f9c)return;const _0x1de513=this['_sidebarItemViewToAnnotation']['get'](_0x445f9c),_0x48977e=this['_activeAnnotation'];_0x48977e&&_0x48977e===_0x1de513?this['_alignAfterItem'](_0x445f9c,_0x536b26):this['_alignBeforeItem'](_0x536b26,_0x445f9c);}['_alignForBottomChange'](_0x1ea951){if(!_0x1ea951['content']['length'])return;const _0x1ce8b9=this['_getItemAfter'](_0x1ea951);if(!_0x1ce8b9)return;const _0x2040cc=this['_sidebarItemViewToAnnotation']['get'](_0x1ce8b9),_0x2ab501=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x79f0ba=this['_activeAnnotation'];_0x79f0ba&&_0x79f0ba===_0x2040cc&&_0x2ab501?(this['_alignBeforeItem'](_0x1ce8b9,_0x1ea951),this['_alignAfterItem'](_0x1ea951,_0x1ce8b9)):_0x79f0ba&&_0x79f0ba===_0x2040cc?this['_alignBeforeItem'](_0x1ce8b9,_0x1ea951):this['_alignAfterItem'](_0x1ea951,_0x1ce8b9);}['_recalculate'](_0x582348,_0x4769a1){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x44785c,changedProp:_0xf89bee}of this['_recalculateBuffer'])'top'===_0xf89bee?this['_alignForTopChange'](_0x44785c):this['_alignForBottomChange'](_0x44785c);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x582348,'changedProp':_0x4769a1});}['getSidebarItemView'](_0x412f9d){return this['_annotationToSidebarItemView']['get'](_0x412f9d);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x27260c){const _0x7a3182=this['getSidebarItemView'](_0x27260c);this['stopListening'](_0x7a3182),this['stopListening'](_0x27260c['view']),_0x7a3182['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x27260c),this['_sidebarItemViewToAnnotation']['delete'](_0x7a3182);}['_createSidebarView'](){const _0x50373e=new H(this['context']['locale']);return _0x50373e['render'](),this['on']('change:_lastItem',(_0x45d588,_0x465e4f,_0x4d649,_0x2f6c59)=>{_0x2f6c59&&_0x50373e['unbind']('minHeight'),_0x4d649?_0x50373e['bind']('minHeight')['to'](_0x4d649,'bottom'):_0x50373e['minHeight']=null;}),_0x50373e;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0xa1662a){const _0x4d2fe5=this['_sidebarItemViewToAnnotation']['get'](_0xa1662a),_0x2f73a2=_0x4d2fe5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4d2fe5)-0x1);return _0x2f73a2&&this['getSidebarItemView'](_0x2f73a2)||null;}['_getItemAfter'](_0x858dd9){const _0x43beae=this['_sidebarItemViewToAnnotation']['get'](_0x858dd9),_0x3daf1a=_0x43beae&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x43beae)+0x1);return _0x3daf1a&&this['getSidebarItemView'](_0x3daf1a)||null;}['_alignBeforeItem'](_0x1ac39e,_0x5cc2dd){_0x1ac39e['updateHeight']();const _0x137157=G(_0x5cc2dd['bottom']+this['_spaceBetweenItems'],_0x1ac39e['top']);return!!_0x137157&&(this['_setItemTop'](_0x5cc2dd,_0x5cc2dd['top']-_0x137157),!0x0);}['_alignAfterItem'](_0x32cd12,_0x331acd){_0x32cd12['updateHeight']();const _0x14349a=G(_0x32cd12['bottom']+this['_spaceBetweenItems'],_0x331acd['top']);return!!_0x14349a&&(this['_setItemTop'](_0x331acd,_0x331acd['top']+_0x14349a,!0x1),!0x0);}['_alignToTargetRect'](_0x48388d){const _0x1ed54f=this['_sidebarItemViewToAnnotation']['get'](_0x48388d);if(!_0x1ed54f||!_0x1ed54f['target']||!_0x1ed54f['targetRect'])return;const _0x18cff3=this['_getTargetTop'](_0x1ed54f,_0x1ed54f['targetRect']);this['_setItemTop'](_0x48388d,_0x18cff3);}['_getTargetTop'](_0x56610f,_0x636498){if(null===_0x636498)return 0x0;if(_0x56610f['target']instanceof _0x2dcba1)return _0x636498['top'];{const _0x5bde00=new _0x2dcba1(this['view']['element'])['top'];return _0x636498['top']-_0x5bde00;}}['_setItemTop'](_0x179005,_0x35517a,_0x2c6d8a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2c6d8a&&(_0x35517a=Math['max'](_0x35517a,this['_getMaxAvailableTop'](_0x179005))),_0x179005['top']=_0x35517a;}['_getMaxAvailableTop'](_0x58192f){let _0x39ac23=this['_getItemBefore'](_0x58192f),_0x3ec6c0=0x0;for(;_0x39ac23;)_0x39ac23['updateHeight'](),_0x3ec6c0+=this['_spaceBetweenItems']+_0x39ac23['height'],_0x39ac23=this['_getItemBefore'](_0x39ac23);return _0x3ec6c0;}}function G(_0x343279,_0xfcfc50){return Math['max'](_0x343279-_0xfcfc50,0x0);}function g(_0x53cd08){return null!==_0x53cd08&&'object'==typeof _0x53cd08&&0x1===_0x53cd08['nodeType'];}class e extends _0x593a50{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x223f63){super(_0x223f63),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3d0741(),this['_refreshPositioningDebounced']=_0x533250(()=>{_0x223f63['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5217ac=this['context']['plugins']['get'](j),_0x43ac1d=this['context']['plugins']['get'](z);_0x5217ac['register']('wideSidebar',this),_0x43ac1d['container']&&_0x5217ac['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x33f8b4){if(_0x33f8b4===this['activeAnnotation'])return;const _0x293570=this['context']['plugins']['get'](z);_0x293570['_activeAnnotation']=_0x33f8b4;const _0x93b213=this['activeAnnotation'];_0x293570['refresh']({'blurredAnnotation':_0x93b213,'activatedAnnotation':_0x33f8b4}),this['activeAnnotation']=_0x33f8b4;}['attach'](_0x20fb6f){this['annotations']=_0x20fb6f;const _0x5da70d=this['context']['plugins']['get'](z);if(_0x5da70d['_annotations']=_0x20fb6f,this['isAttached'])throw new _0x14fd42('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5da70d,'set:container',()=>{this['detach'](),this['listenTo'](_0x5da70d,'change:container',_0x30914e=>{_0x30914e['off'](),this['attach'](_0x20fb6f);});}),_0x5da70d['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x533c13=_0x150f31=>{_0x150f31['updateTargetRect'](),_0x5da70d['addAnnotation'](_0x150f31);};for(const _0x2c62ab of _0x20fb6f)_0x533c13(_0x2c62ab);this['listenTo'](_0x20fb6f,'add',(_0x421a12,_0xe73c17)=>{_0x533c13(_0xe73c17);}),this['listenTo'](_0x20fb6f,'remove',(_0x3224d9,_0x48fdc7,_0x18c1f8)=>{_0x5da70d['rearrange']({'removedAnnotation':_0x48fdc7,'previousAnnotation':_0x20fb6f['get'](_0x18c1f8-0x1),'nextAnnotation':_0x20fb6f['get'](_0x18c1f8+0x1)}),_0x48fdc7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x20fb6f,'focus',(_0x469a99,_0x1bac74)=>{this['setActiveAnnotation'](_0x1bac74);}),this['listenTo'](_0x20fb6f,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3d8df6=this['context']instanceof _0x1df1f0?this['context']['editors']:new _0x3d0741([this['context']]);for(const _0x54295c of _0x3d8df6)this['_integrateWithEditorAnnotations'](_0x54295c);this['listenTo'](_0x3d8df6,'add',(_0x5bef28,_0x1e74c9)=>{this['listenTo'](_0x1e74c9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1e74c9);});}),this['listenTo'](_0x3d8df6,'remove',(_0x541652,_0x170002)=>{_0x170002['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x170002['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x14fd42('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x39d1d7=this['context']['plugins']['get'](z);_0x39d1d7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x39d1d7),this['stopListening'](this['annotations']),this['context']instanceof _0x1df1f0&&this['stopListening'](this['context']['editors']);for(const _0x1b7161 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1b7161);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2e3320){if(!_0x2e3320['plugins']['has']('EditorAnnotations'))return;const _0xece4e4=_0x2e3320['plugins']['get']('EditorAnnotations'),_0x56be92=()=>{const _0x25b84b=_0xece4e4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x25b84b[0x0]||null);};this['listenTo'](_0xece4e4,'refresh',_0x56be92),this['listenTo'](_0xece4e4,'blur',(_0x53b5a2,{isAnnotationTracked:_0x5ea4b7})=>{this['activeAnnotation']&&_0x5ea4b7(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xece4e4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xf62b44=>{_0xece4e4['hasDomSelection']()&&(_0x56be92(),_0xf62b44['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xece4e4);}['_destroyEditorAnnotationsIntegration'](_0x216ca3){this['stopListening'](_0x216ca3),this['_editorAnnotations']['remove'](_0x216ca3);}}class C extends _0x1c15c2{['counterView'];constructor(_0x4c07f6){super(_0x4c07f6);const _0x2d61b6=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x461bbc,_0x450c6b)=>_0x461bbc?'...':_0x450c6b['toString']()),this['set']('annotationType',''),this['icon']=_0xb70e92,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2d61b6['to']('annotationType',_0x5803af=>'ck-annotation-counter__badge--'+_0x5803af),_0x2d61b6['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2d61b6['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x593a50{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e0114){super(_0x5e0114),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1bbf07())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3d0741(),this['_refreshPositioningDebounced']=_0x533250(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x287999(this['context']['locale']),this['balloonPanelView']=new _0xa8377a(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1822b3){this['annotations']=_0x1822b3;const _0x41ef1a=this['context']['plugins']['get'](z),_0x4d5dfb=this['balloonPanelView'];if(_0x41ef1a['_annotations']=_0x1822b3,this['isAttached'])throw new _0x14fd42('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x41ef1a,'set:container',()=>{this['detach'](),this['listenTo'](_0x41ef1a,'change:container',_0x1d2c90=>{_0x1d2c90['off'](),this['attach'](_0x1822b3);});}),_0x41ef1a['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x35bb0a=_0x5103a7=>{const _0x387d9e=new C(this['context']['locale']);_0x41ef1a['addAnnotation'](_0x5103a7,_0x387d9e),this['_annotationToNarrowView']['set'](_0x5103a7,_0x387d9e),_0x387d9e['bind']('isDirty','annotationType','number')['to'](_0x5103a7['view'],'isDirty','type','length'),_0x387d9e['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4d5dfb['content']['first']!==_0x5103a7['view']?(this['_showBalloon'](_0x5103a7),_0x5103a7['view']['element']['focus'](),this['setActiveAnnotation'](_0x5103a7)):this['setActiveAnnotation'](null);});};for(const _0x44c0a4 of _0x1822b3)_0x35bb0a(_0x44c0a4);this['listenTo'](_0x1822b3,'add',(_0x11bf3f,_0x1e7761)=>{_0x35bb0a(_0x1e7761);}),this['listenTo'](_0x1822b3,'remove',(_0x159d56,_0x22c560,_0x30081b)=>{this['_annotationToNarrowView']['get'](_0x22c560)['destroy'](),this['_annotationToNarrowView']['delete'](_0x22c560),_0x41ef1a['rearrange']({'removedAnnotation':_0x22c560,'previousAnnotation':_0x1822b3['get'](_0x30081b-0x1),'nextAnnotation':_0x1822b3['get'](_0x30081b+0x1)}),_0x22c560===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1822b3,'focus',(_0x59b3bc,_0x3c679f)=>{this['setActiveAnnotation'](_0x3c679f);}),this['listenTo'](_0x1822b3,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x6a84e8,_0x2155e1)=>{_0x2155e1['keyCode']===_0x23ec74['esc']&&_0x4d5dfb['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4d5dfb['content']['first']),this['_hideBalloon'](),_0x2155e1['stopPropagation'](),_0x2155e1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x335e70,_0x3e61d3)=>{const _0x2226d8=_0x3e61d3['target'];_0x4d5dfb['isVisible']&&_0x4d5dfb['element']['contains'](_0x2226d8)||_0x41ef1a['view']['element']['contains'](_0x2226d8)||_0x335e70['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x55e369=>_0x55e369['contains'](_0x2226d8))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x30e224=this['context']instanceof _0x1df1f0?this['context']['editors']:new _0x3d0741([this['context']]);for(const _0x2ebf84 of _0x30e224)this['_integrateWithEditorAnnotations'](_0x2ebf84);this['listenTo'](_0x30e224,'add',(_0x550edb,_0x492452)=>{this['listenTo'](_0x492452,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x492452);});}),this['listenTo'](_0x30e224,'remove',(_0xddcf16,_0x440f3b)=>{_0x440f3b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x440f3b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x156127){if(_0x156127===this['activeAnnotation'])return;const _0x90d61d=this['context']['plugins']['get'](z);if(_0x90d61d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x156127,'disableAnimationOnActivatedAnnotation':!0x0}),_0x156127)_0x90d61d['getSidebarItemView'](_0x156127)?this['_showBalloon'](_0x156127):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x156127;}['detach'](){if(!this['isAttached'])throw new _0x14fd42('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1302ff=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1c9783=>_0x1c9783['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1302ff['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1df1f0&&this['stopListening'](this['context']['editors']);for(const _0x4f79cb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4f79cb);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x3f5245){if(!_0x3f5245['plugins']['has']('EditorAnnotations'))return;const _0x3dddd5=_0x3f5245['plugins']['get']('EditorAnnotations'),_0x38632e=this['context']['plugins']['get'](z),_0x2f103f=this['annotations'],_0x2322b6=this['balloonPanelView'],_0x1d5a7e=()=>{const _0x15f1f3=_0x3dddd5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x15f1f3),this['setActiveAnnotation'](_0x15f1f3[0x0]||null);};this['listenTo'](_0x3dddd5,'refresh',_0x1d5a7e),this['listenTo'](_0x3dddd5,'blur',(_0x5b246b,{isAnnotationTracked:_0x5ad0ff})=>{this['activeAnnotation']&&_0x5ad0ff(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3dddd5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2f103f,'blur',_0x2d2fe9=>{_0x3dddd5['hasDomSelection']()&&_0x2d2fe9['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2e3769,_0x5d1d73)=>{const _0x1e3de2=_0x5d1d73['target'];_0x2322b6['isVisible']&&_0x2322b6['element']['contains'](_0x1e3de2)||_0x38632e['view']['element']['contains'](_0x1e3de2)||this['activeAnnotation']&&_0x3dddd5['hasDomSelection']()&&(_0x1d5a7e(),_0x2e3769['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3dddd5);}['_destroyEditorAnnotationsIntegration'](_0x146820){_0x146820&&(this['stopListening'](_0x146820),this['_editorAnnotations']['remove'](_0x146820));}['_setSelectedAnnotations'](_0x1d097b){for(const _0x1d13df of this['_selectedAnnotations'])_0x1d097b['includes'](_0x1d13df)||this['_manuallyClosedAnnotationViews']['delete'](_0x1d13df['view']);this['_selectedAnnotations']=_0x1d097b;}['_refreshPositioning'](){const _0x20dbd3=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x20dbd3['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x17f7dc){if(this['_manuallyClosedAnnotationViews']['has'](_0x17f7dc['view']))return;const _0x119267=this['balloonPanelView']['content']['first'];_0x119267!==_0x17f7dc['view']?(_0x119267&&this['_detachListeners'](_0x119267),this['_attachListeners'](_0x17f7dc['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x17f7dc['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x19a41f=this['balloonPanelView']['content']['first'],_0x906227=_0x19a41f&&this['annotations']['getByView'](_0x19a41f);if(!_0x906227||!this['_annotationToNarrowView']['has'](_0x906227))return;const _0x379866=this['_annotationToNarrowView']['get'](_0x906227)['element'],_0x41ca0f=(function(){const _0x374206=_0xa8377a['defaultPositions'];return[_0x374206['southArrowNorthEast'],_0x374206['northArrowSouthEast'],_0x374206['southArrowNorth'],_0x374206['northArrowSouth'],_0x374206['southArrowNorthWest'],_0x374206['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x379866,'positions':_0x41ca0f});}['_hideBalloon'](){const _0x46a7fd=this['balloonPanelView'],_0x195241=_0x46a7fd['content']['first'];_0x195241&&(this['_detachListeners'](_0x195241),_0x46a7fd['unpin'](),_0x46a7fd['content']['clear']());}['_attachListeners'](_0x5e8f69){this['listenTo'](_0x5e8f69,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5e8f69,'Esc',(_0x35ade1,_0xaf732e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5e8f69),this['_hideBalloon'](),_0xaf732e();});}['_detachListeners'](_0xa794fc){this['stopListening'](_0xa794fc);}}class c extends _0x37aa4b{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x47c029,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2eab37){super(_0x2eab37),_0x2eab37['editing']['view']['addObserver'](_0x753941),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2eab37['plugins']['get'](_0x47c029),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x533250(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x42dacd=this['editor']['plugins']['get'](j);_0x42dacd['context']===this['editor']&&(_0x42dacd['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x44918a,_0x3e491d)=>{const _0x49a1db=this['_balloon'];if(this['isAttached']&&_0x49a1db['visibleView']){const _0x32af1e=this['annotations']['getByView'](_0x49a1db['visibleView']);_0x32af1e&&this['_closeAnnotation'](_0x32af1e),_0x3e491d();}}));}['afterInit'](){const _0x39b476=this['editor']['plugins']['get'](j);_0x39b476['context']===this['editor']&&(_0x39b476['hasActive']()||_0x39b476['switchTo']('inline'));}['setActiveAnnotation'](_0x168171){_0x168171!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x168171&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x168171)&&this['_addAnnotationToBalloon'](_0x168171,!0x0),_0x168171['isActive']=!0x0),_0x168171||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x168171);}['attach'](_0x209355){this['annotations']=_0x209355;const _0x41fcbf=this['editor']['plugins']['get'](j),_0x1fcc4f=this['_balloon'];if(this['isAttached'])throw new _0x14fd42('inlineannotations-attach-already-attached',this);if(_0x41fcbf['context']!==this['editor'])throw new _0x14fd42('inlineannotations-not-allowed-with-context',this);const _0x204cc7=this['editor']['plugins']['get'](b);this['listenTo'](_0x204cc7,'refresh',()=>{const _0x1a58e0=_0x204cc7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x593e12,_0x84079a;!this['_forceRefresh']&&(_0x593e12=_0x1a58e0,_0x84079a=this['_selectedAnnotations'],_0x593e12['length']===_0x84079a['length']&&_0x593e12['every'](_0x539a28=>_0x84079a['includes'](_0x539a28)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1a58e0),this['setActiveAnnotation'](_0x1a58e0[0x0]||null));}),this['listenTo'](_0x204cc7,'blur',(_0x287fc2,{isAnnotationTracked:_0x50cffe})=>{this['activeAnnotation']&&_0x50cffe(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x204cc7,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4d6636,_0x340e8d,_0x3369ee)=>{_0x3369ee||this['setActiveAnnotation'](null);}),this['listenTo'](_0x209355,'remove',(_0x2e09a4,_0x3a814d)=>{this['_removeAnnotationFromBalloon'](_0x3a814d),_0x3a814d===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1fcc4f,'change:visibleView',(_0x3e7dc2,_0x4b46a8,_0x2ab79a,_0x5129e7)=>{_0x5129e7&&this['stopListening'](_0x5129e7);const _0x418c0a=_0x209355['getByView'](_0x2ab79a);_0x2ab79a&&_0x418c0a&&(this['listenTo'](_0x2ab79a,'change:height',()=>{_0x1fcc4f['updatePosition']();}),this['listenTo'](_0x2ab79a,'Esc',()=>{this['_closeAnnotation'](_0x418c0a),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x418c0a&&this['setActiveAnnotation'](_0x418c0a));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1fcc4f['visibleView']&&(_0x209355['getByView'](_0x1fcc4f['visibleView'])&&_0x1fcc4f['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x14fd42('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4941c7 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4941c7);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x55f87c){for(const _0x3df0cd of this['_selectedAnnotations'])_0x55f87c['includes'](_0x3df0cd)||this['_manuallyClosed']['delete'](_0x3df0cd);for(const _0x7884ef of this['annotations'])_0x55f87c['includes'](_0x7884ef)||this['_removeAnnotationFromBalloon'](_0x7884ef);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x103e07 of _0x55f87c)this['_addAnnotationToBalloon'](_0x103e07);}this['_selectedAnnotations']=_0x55f87c;}['_addAnnotationToBalloon'](_0x1645df,_0x4c812e=!0x1){this['_manuallyClosed']['has'](_0x1645df)||(this['_addedAnnotations']['has'](_0x1645df)||this['_balloon']['hasView'](_0x1645df['view'])||(this['_addedAnnotations']['add'](_0x1645df),this['_balloon']['add']({'stackId':_0x1645df['view']['id'],'view':_0x1645df['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1645df)}})),_0x4c812e&&this['_balloon']['showStack'](_0x1645df['view']['id']));}['_getBalloonTargetForAnnotation'](_0x53a7d7){const _0x41f909=_0x53a7d7['target'],_0x41f093=this['editor']['editing']['view'],_0xeecac4=_0x41f093['document']['selection']['getFirstRange'](),_0x21ea63=_0x41f093['domConverter']['viewRangeToDom'](_0xeecac4);if(_0x21ea63['collapse'](!0x0),_0x41f909){if(_0x41f909 instanceof _0x2dcba1)return _0x41f909;let _0x3d1c99=[];for(const _0x3195f1 of _0x41f909)_0x3d1c99['push'](...F(_0x3195f1['getClientRects']()));_0x3d1c99=function(_0x5fafaf){const _0x255759=[];let _0x39239e=_0x5fafaf[0x0];for(let _0x5e8042=0x1;_0x5e8042<_0x5fafaf['length'];_0x5e8042++)P(_0x39239e,_0x5fafaf[_0x5e8042])?_0x39239e['width']+=_0x5fafaf[_0x5e8042]['width']:(_0x255759['push'](_0x39239e),_0x39239e=_0x5fafaf[_0x5e8042]);return _0x255759['push'](_0x39239e),_0x255759;}(_0x3d1c99);const _0x28c73e=_0x21ea63['getBoundingClientRect']();return _0x3d1c99['find'](_0x2dfbaa=>_0x2dfbaa['top']<=_0x28c73e['top']&&_0x2dfbaa['bottom']>=_0x28c73e['bottom']&&_0x2dfbaa['left']<=_0x28c73e['left']&&_0x2dfbaa['right']>=_0x28c73e['right'])||_0x3d1c99[0x0];}return _0x53a7d7['targetRect']||_0x21ea63;}['_removeAnnotationFromBalloon'](_0x272dfd){this['_addedAnnotations']['has'](_0x272dfd)&&this['_balloon']['hasView'](_0x272dfd['view'])&&(this['_addedAnnotations']['delete'](_0x272dfd),this['_balloon']['remove'](_0x272dfd['view']));}['_closeAnnotation'](_0x1541e5){this['_manuallyClosed']['add'](_0x1541e5),this['_removeAnnotationFromBalloon'](_0x1541e5);}}function F(_0x42f487){return Array['from'](_0x42f487)['map'](DOMRect['fromRect']);}function P(_0x1a07d1,_0x2da7ed){return _0x1a07d1['top']===_0x2da7ed['top']&&_0x1a07d1['bottom']===_0x2da7ed['bottom']&&_0x1a07d1['right']===_0x2da7ed['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x46889f,_0x309e27){super(_0x46889f),this['set']('isEmpty',!_0x309e27['length']),this['focusTracker']=new _0x37af46(),this['_annotationViews']=_0x309e27,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x599a03({'focusables':_0x309e27,'focusTracker':this['focusTracker']}),this['listenTo'](_0x309e27,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x309e27,'remove',(_0x1f0d36,_0x182338)=>{_0x182338['isActive']&&this['focus'](),_0x309e27['length']||(this['isEmpty']=!0x0);});const _0x1947ef=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x46889f,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x309e27},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1947ef['if']('isEmpty','ck-hidden',_0x1fb94f=>!_0x1fb94f)]},'children':[{'text':N(_0x46889f,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x1ec61 of this['_annotationViews'])this['focusTracker']['add'](_0x1ec61['element']);this['_annotationViews']['on']('change',(_0x1ab281,{added:_0x59ca45,removed:_0x44747f})=>{for(const _0x38423b of _0x59ca45)this['focusTracker']['add'](_0x38423b['element']);for(const _0x1f938d of _0x44747f)this['focusTracker']['remove'](_0x1f938d['element']);});}}class p extends _0x593a50{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x247301){super(_0x247301),this['archivedThreads']=new _0x3d0741();}['init'](){const _0x4f987c=this['context'],_0x14a6a4=_0x4f987c['plugins']['get'](o),_0x58a19e=_0x4f987c['plugins']['get'](y);this['listenTo'](_0x14a6a4,'addCommentThread',(_0x401817,{threadId:_0x5f26f8})=>{const _0x53c929=_0x14a6a4['getCommentThread'](_0x5f26f8);_0x53c929['archivedAt']&&this['archivedThreads']['add'](_0x53c929,this['_calculatePosition'](_0x53c929['archivedAt'])),this['listenTo'](_0x53c929,'change:archivedAt',(_0x206745,_0x4abb29,_0x11e0d5)=>{_0x11e0d5?this['archivedThreads']['has'](_0x53c929)||this['archivedThreads']['add'](_0x53c929,this['_calculatePosition'](_0x53c929['archivedAt'])):this['archivedThreads']['has'](_0x53c929)&&this['archivedThreads']['remove'](_0x53c929);});}),this['listenTo'](_0x14a6a4,'removeCommentThread',(_0x2f02c0,{threadId:_0x56b280})=>{const _0x3af062=_0x14a6a4['getCommentThread'](_0x56b280);this['stopListening'](_0x3af062),this['archivedThreads']['has'](_0x3af062)&&this['archivedThreads']['remove'](_0x3af062);},{'priority':'highest'}),this['listenTo'](_0x58a19e['collection'],'focus',(_0x31af4c,_0x49635f)=>{_0x49635f['isVisible']||(_0x49635f['isActive']=!0x0,_0x58a19e['activate'](_0x49635f));});}['_calculatePosition'](_0x52e254){const _0x306630=[...this['archivedThreads']]['findIndex'](_0x2b8ae4=>_0x2b8ae4['archivedAt']<_0x52e254);return _0x306630>-0x1?_0x306630:this['archivedThreads']['length'];}}class a extends _0x37aa4b{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x1d5abd];}constructor(_0x3fa3c3){super(_0x3fa3c3),this['annotationViews']=new _0x4fc9fb(),this['_pendingThreads']=[];}['init'](){const _0x1b7738=this['editor'],_0x1b369e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1b7738['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1c15c2,!0x0)),_0x1b7738['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2b12f2=this['_createCommentsArchiveButton'](_0x34ca18);return _0x2b12f2['set']({'role':'menuitemcheckbox'}),_0x2b12f2;});const _0x3a8fa9=_0x1b7738['plugins']['get'](p),_0x1b37fd=_0x1b7738['plugins']['get']('Annotations'),_0x1e599d=_0x1b7738['plugins']['get']('CommentsRepository');_0x3a8fa9['archivedThreads']['forEach'](_0x29cb38=>{this['_handleNewThread'](_0x29cb38);}),this['listenTo'](_0x3a8fa9['archivedThreads'],'add',(_0x4d559a,_0x366479)=>{this['_handleNewThread'](_0x366479);}),this['listenTo'](_0x1b37fd['collection'],'add',(_0x1b7455,_0x2b57cd)=>{const _0x296bc2=this['_pendingThreads']['find'](_0xc333e7=>{const _0x35008c=_0x1e599d['_threadToController']['get'](_0xc333e7);return _0x35008c&&_0x2b57cd['innerView']===_0x35008c['view'];});if(_0x296bc2){const _0x212132=this['_calculatePosition'](_0x296bc2['archivedAt']);this['_addAnnotationToArchive'](_0x2b57cd,_0x212132),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x296bc2),0x1);}}),this['listenTo'](_0x3a8fa9['archivedThreads'],'remove',(_0x3273cb,_0x4d0723)=>{const _0x5d2059=_0x1b7738['config']['get']('collaboration.channelId');if(!_0x5d2059||_0x4d0723['channelId']===_0x5d2059){if(this['_pendingThreads']['includes'](_0x4d0723))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4d0723),0x1);else{const _0xff75f8=_0x1e599d['_threadToController']['get'](_0x4d0723),_0x596a03=_0x1b37fd['getByInnerView'](_0xff75f8['view']);this['annotationViews']['remove'](_0x596a03['view']),this['stopListening'](_0x596a03),this['stopListening'](_0x596a03['focusableElements']);}}}),this['listenTo'](_0x1b37fd['collection'],'add',(_0x53d743,_0x329e5f)=>{this['listenTo'](_0x329e5f,'escape',_0x1b369e);}),this['listenTo'](_0x1b37fd['collection'],'remove',(_0x117ded,_0x4c715b)=>{this['stopListening'](_0x4c715b,'escape',_0x1b369e);});}['_addAnnotationToArchive'](_0x46875b,_0x33742b){this['listenTo'](_0x46875b,'set:isVisible',_0x30e7c3=>{_0x30e7c3['return']=!0x1,_0x30e7c3['stop']();}),this['annotationViews']['add'](_0x46875b['view'],_0x33742b);}['_handleNewThread'](_0x135524){const _0x250fe4=this['editor']['plugins']['get']('CommentsRepository'),_0x37a542=this['editor']['plugins']['get']('Annotations'),_0x48f6d3=this['editor']['config']['get']('collaboration.channelId');if(!_0x48f6d3||_0x135524['channelId']===_0x48f6d3){const _0x2cc61b=_0x250fe4['_threadToController']['get'](_0x135524);if(!_0x2cc61b)return void this['_pendingThreads']['push'](_0x135524);const _0x4a735a=this['_calculatePosition'](_0x135524['archivedAt']),_0x675e80=_0x37a542['getByInnerView'](_0x2cc61b['view']);_0x675e80['isVisible']&&_0x37a542['_visibleAnnotations']['remove'](_0x675e80),this['_addAnnotationToArchive'](_0x675e80,_0x4a735a);}}['_calculatePosition'](_0x2f668f){const _0x4b5bdd=this['editor']['config']['get']('collaboration.channelId'),_0x4f3506=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x177a28=>_0x177a28['channelId']===_0x4b5bdd)['findIndex'](_0x14eaf6=>_0x14eaf6['archivedAt']<_0x2f668f);return _0x4f3506<0x0||_0x4f3506>this['annotationViews']['length']?this['annotationViews']['length']:_0x4f3506-0x1;}['_toggleDialog'](){const _0x363aa6=this['editor'],_0x1d9fb0=_0x363aa6['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x363aa6['locale'],this['annotationViews'])),'commentsArchive'===_0x1d9fb0['id']?_0x1d9fb0['hide']():_0x1d9fb0['show']({'id':'commentsArchive','title':N(_0x363aa6['locale'],'COMMENTS_ARCHIVE'),'icon':_0x52ca58,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x17a0a9['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2af3c6,_0x5e0291=!0x1){const _0x48c1a9=this['editor']['locale'],_0x12bcb6=this['editor']['plugins']['get']('Dialog'),_0x401ee7=new _0x2af3c6(_0x48c1a9);return _0x401ee7['bind']('isEnabled')['to'](this,'isEnabled'),_0x401ee7['bind']('isOn')['to'](_0x12bcb6,'id',_0x2c431a=>'commentsArchive'===_0x2c431a),_0x401ee7['set']({'label':N(_0x48c1a9,'COMMENTS_ARCHIVE'),'icon':_0x52ca58,'isToggleable':!0x0}),_0x5e0291&&(_0x401ee7['tooltip']=!0x0),this['listenTo'](_0x401ee7,'execute',()=>this['_toggleDialog']()),_0x401ee7;}['_hideDialogOnAnnotationEscape']=_0x34ddf6=>{const _0x44f3f8=_0x34ddf6['source'];if(!this['annotationViews']['has'](_0x44f3f8['view']))return;const _0x273cf7=this['editor']['plugins']['get']('Dialog');_0x273cf7['isOpen']&&'commentsArchive'===_0x273cf7['id']&&(_0x273cf7['hide'](),_0x34ddf6['stop']());};}class gi extends _0x37aa4b{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x3bcaf9,ContextPlugin as _0x2def50,PendingActions as _0xeddd6c,Command as _0x827b78,Plugin as _0x357641,Context as _0x3ecb89}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x25c8c0,uid as _0x396982,KeystrokeHandler as _0x17329a,FocusTracker as _0x911300,diff as _0x1b85af,Collection as _0x382eec,Rect as _0x3ba044,CKEditorError as _0x875303,first as _0x52122a,priorities as _0x34bacf,scrollViewportToShowTarget as _0x56a2b5,getEnvKeystrokeText as _0x2f8a9a,toUnit as _0x22a81b,DomEmitterMixin as _0xf86daa,keyCodes as _0x430317}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3cc9cf,AriaDescriptionView as _0x10f9be,setupThreadKeyboardNavigation as _0x3ff99a,ConfirmMixin as _0x209f74,LateFocusButtonView as _0x395ace,trimHtml as _0x3c8898,LateFocusDropdownButtonView as _0x2c46d9,FOCUS_ANNOTATION_KEYSTROKE as _0x20bd97,Users as _0x249f32,getDateTimeFormatter as _0x2591cb,hashObject as _0x4098d,getAllMarkersDomElementsSorted as _0x10520f,surroundingMarkersDetector as _0x342796}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0xe3a524,cloneDeep as _0x23dbb3,set as _0x5cc645,unset as _0x5c66ba,isEqual as _0x2b5bed,debounce as _0x4664ac}from'es-toolkit/compat';import{IconUndo as _0x2c3fc4,IconCheck as _0x449174,IconPencil as _0x372299,IconRemoveComment as _0x4aea4e,IconThreeVerticalDots as _0x27887e,IconAddComment as _0x3fe266,IconCommentsArchive as _0x2f0ca4}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x449185,InlineEditableUIView as _0x359b04,EditorUI as _0x5016dd,View as _0x41f494,FocusCycler as _0x6f869d,ButtonView as _0x38179e,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x25c8c0(){['model'];['view'];constructor(_0x77b90,_0x24e559){super(),this['model']=_0x77b90,this['model']['_isAttached']=!0x0,this['view']=_0x24e559,this['listenTo'](_0x24e559,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x24e559,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x24e559,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x24e559,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x24e559,'addComment',(_0x376330,_0x1433d0)=>this['addComment'](_0x1433d0)),this['listenTo'](_0x24e559,'updateComment',(_0x37c405,_0x196573,_0x963755)=>this['updateComment'](_0x196573,_0x963755)),this['listenTo'](_0x24e559,'removeComment',(_0x2f5643,_0x1b7e4a)=>this['removeComment'](_0x1b7e4a));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x34c798){this['model']['addComment']({'content':_0x34c798,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x40cc97,_0x5389ba){this['model']['getComment'](_0x40cc97)['update']({'content':_0x5389ba});}['removeComment'](_0x33a647){this['model']['getComment'](_0x33a647)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x4cc9b6,_0x573df2,_0x3cc9e7){const t=_0x4cc9b6['t'];switch(_0x573df2){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Reply\x20to\x20reopen\x20discussion...':return t('Reply\x20to\x20reopen\x20discussion...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20was\x20made\x20on\x20an\x20element':return t('Comment\x20was\x20made\x20on\x20an\x20element');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Marked\x20as\x20resolved':return t('Marked\x20as\x20resolved');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Resolve':return t('Resolve');case'Reopen':return t('Reopen');case'Remove':return t('Remove');case'Reply':return t('Reply');case'Save':return t('Save');case'Annotations\x20sidebar':return t('Annotations\x20sidebar');case'Annotations\x20list':return t('Annotations\x20list');case'Thread\x20comments':return t('Thread\x20comments');case'THREAD_CONTEXT_LABEL':return t({'string':'Thread\x20context:\x20%0','id':'THREAD_CONTEXT_LABEL'},_0x3cc9e7);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x3cc9e7);case'COMMENT_THREAD_DESCRIPTION':return t({'string':'Press\x20Enter\x20for\x20more\x20options.\x20Press\x20Escape\x20to\x20exit.','id':'COMMENT_THREAD_DESCRIPTION'});case'COMMENT_ARIA_LABEL':return t({'string':'Comment\x20by\x20%0.\x20Created\x20on\x20%1.\x20%2.\x20%3','id':'COMMENT_ARIA_LABEL'},_0x3cc9e7);case'LEAVE_COMMENT_ANNOUNCEMENT':return t({'string':'Leaving\x20a\x20content\x20with\x20comments.','id':'LEAVE_COMMENT_ANNOUNCEMENT'});case'ENTER_COMMENT_ANNOUNCEMENT':return t({'string':'Entering\x20a\x20content\x20with\x20comments.\x20Press\x20%0\x20to\x20go\x20to\x20the\x20discussion.','id':'ENTER_COMMENT_ANNOUNCEMENT'},_0x3cc9e7);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x3cc9e7);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0x3cc9e7);case'EXTERNAL_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20external\x20source.','id':'EXTERNAL_COMMENT'});case'EXTERNAL_IMPORT_WORD_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20imported\x20Word\x20file.','id':'EXTERNAL_IMPORT_WORD_COMMENT'});case'EXTERNAL_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20external\x20source\x20(added\x20by\x20%0)','id':'EXTERNAL_AVATAR'},_0x3cc9e7);case'EXTERNAL_IMPORT_WORD_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20a\x20Word\x20document\x20imported\x20by\x20%0','id':'EXTERNAL_IMPORT_WORD_AVATAR'},_0x3cc9e7);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Et extends _0x449185{['main'];['editable'];constructor(_0x3b545d,_0x1cf514){super(_0x3b545d);const _0x4883a7=_0x396982();this['main']=this['createCollection'](),this['editable']=new _0x359b04(_0x3b545d,_0x1cf514,void 0x0,{'label':()=>bt(_0x3b545d,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x3b545d['uiLanguageDirection'],'lang':_0x3b545d['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x4883a7},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Nt extends _0x5016dd{['view'];constructor(_0x2c45e8){super(_0x2c45e8),this['view']=new Et(_0x2c45e8['locale'],_0x2c45e8['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1f4c4d=this['editor']['editing']['view'],_0x5b184d=this['view']['editable'],_0x14a00d=_0x1f4c4d['document']['getRoot']();_0x5b184d['name']=_0x14a00d['rootName'],this['view']['render']();const _0x720026=_0x5b184d['element'];this['setEditableElement'](_0x5b184d['name'],_0x720026),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1f4c4d['attachDomRoot'](_0x720026),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x25c8c0(_0x3bcaf9){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>kt)());constructor(_0x5ba04b={}){function _0x3fa26f(_0x3a30ae){return _0x3a30ae['map'](_0x265db2=>String['fromCharCode'](_0x265db2))['join']('');}(_0x5ba04b=Object['assign']({},_0x5ba04b))['plugins']||(_0x5ba04b['plugins']=Ot['defaultPlugins']),super(_0x5ba04b),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x3fa26f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3fa26f([0x76,0x69,0x65,0x77])][_0x3fa26f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3fa26f([0x61,0x75,0x74,0x6f]),this[_0x3fa26f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3fa26f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3fa26f([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3fa26f([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3fa26f([0x6f,0x6b])});}['create'](){const _0x5d7bd4=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5d7bd4))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x189393=>{const _0x559548=this['model']['document']['getRoot'](),_0x2868c5=_0x559548&&_0x559548['getChild'](_0x559548['childCount']-0x1);_0x189393['setSelection'](_0x2868c5,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1cd717=this['editing']['view'],_0x238bef=_0x1cd717['document']['getRoot'](),_0x2c33c0=_0x238bef['getChild'](0x0);_0x238bef['childCount']>0x1||!_0x2c33c0||'p'!=_0x2c33c0['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x1cd717,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2c33c0['placeholder']=this['placeholder']),ut({'view':_0x1cd717,'element':_0x2c33c0,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2c33c0);}}class Mt extends _0x41f494{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1ec323,_0x187d06={}){super(_0x1ec323),this['editor']=null,this['_editorConfig']=_0x187d06,this['set']('value',_0x187d06['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x1ec323,'Reply...')),this['set']('submitLabel',bt(_0x1ec323,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x17329a(),this['focusTracker']=new _0x911300(),this['focusCycler']=new _0x6f869d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x1e019e,_0x2b0f35)=>{this['cancelButtonView']['fire']('execute'),_0x2b0f35();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3c8ecc,_0xdadc3a)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xdadc3a());}),this['on']('submit',(_0x37368a,_0x2e5120)=>{_0x2e5120['length']>0xfde8?(alert(bt(_0x1ec323,'TOO_LONG_COMMENT_ALERT',[_0x2e5120['length'],0xfde8])),_0x37368a['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4857e3=this['editor'];this['element']['insertBefore'](_0x4857e3['ui']['element'],this['element']['firstChild']),_0x4857e3['model']['document']['on']('change',()=>this['value']=_0x4857e3['getData']()),_0x4857e3['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4857e3['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1a3004){-0x1===_0x1a3004?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x354a3d}=this,_0x1b250d=new _0x38179e(_0x354a3d);return _0x1b250d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1b250d['withText']=!0x0,_0x1b250d['bind']('label')['to'](this,'submitLabel'),_0x1b250d['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1b250d['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x34c45a,_0x1acb1e)=>!_0x1acb1e&&!!_0x34c45a['trim']()),_0x1b250d;}['_createCancelButton'](){const {locale:_0x78f6bb}=this,_0x11b3a7=new _0x38179e(_0x78f6bb);return _0x11b3a7['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x11b3a7['label']=bt(_0x78f6bb,'Cancel'),_0x11b3a7['withText']=!0x0,_0x11b3a7['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x11b3a7;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x511f60=>{this['focusTracker']['add'](_0x511f60['element']);}),this['focusables']['on']('change',(_0x4377d2,_0x5cebda)=>{for(const _0x2cda47 of Array['from'](_0x5cebda['added'])['reverse']())this['focusTracker']['add'](_0x2cda47['element']);});}}class Rt extends _0x41f494{constructor(_0x53b304,_0x365fb9,_0x563be4){super(_0x53b304),this['commentInputView']=new Mt(_0x53b304,_0x563be4),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x34e2f5,_0x1101db)=>_0x34e2f5||!!_0x1101db),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x3cc9cf(_0x53b304,_0x365fb9),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x3ff924){this['commentInputView']['focus'](_0x3ff924);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x39cdfe,_0x2a6c39)=>{const {submitButtonView:_0x538aa5,cancelButtonView:_0x426d4d,editor:_0x4cde31}=this['commentInputView'];[_0x538aa5['element'],_0x426d4d['element'],_0x4cde31?_0x4cde31['editing']['view']['getDomRoot']():null]['filter'](_0x3b3902=>_0x3b3902)['some'](_0xd2de31=>_0xd2de31['contains'](_0x2a6c39['target']))||(this['focus'](),_0x2a6c39['preventDefault']());});}}class xt extends _0x41f494{constructor(_0x3eb244){super(_0x3eb244);const _0x4755b5=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4755b5['to']('count',_0xa524c4=>bt(_0x3eb244,'NUMBER_OF_COMMENTS',_0xa524c4))}]});}}class St extends _0x41f494{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0xd214a9,_0x5f11b8,_0x563897){super(_0xd214a9);const _0x3f85dd=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5f11b8['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5f11b8,this['_config']=_0x563897,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x911300(),this['keystrokes']=new _0x17329a(),this['focusCycler']=new _0x6f869d({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5277ae=>this['commentViews']['map'](_0x17a03b=>_0x17a03b['element'])['includes'](_0x5277ae['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0xd214a9),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3e56de=>_0x3e56de-this['_config']['maxCommentsWhenCollapsed']);for(const _0x25498d of _0x5f11b8['comments'])this['_handleNewCommentModel'](_0x25498d);this['_handleInfoComment'](),this['listenTo'](_0x5f11b8['comments'],'add',(_0x345052,_0xa2e86a)=>{const _0x3d1d53=this['_calculatePosition'](_0xa2e86a);this['length']++,this['_handleNewCommentModel'](_0xa2e86a,_0x3d1d53),this['refreshVisibleViews']();}),this['listenTo'](_0x5f11b8['comments'],'remove',(_0x48d90d,_0x21fd0b)=>{this['length']--,this['_handleRemoveCommentModel'](_0x21fd0b),this['refreshVisibleViews']();}),this['listenTo'](_0x5f11b8,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5f11b8,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x3f85dd['if']('length','ck-hidden',_0xe013b9=>!_0xe013b9)],'aria-label':bt(_0xd214a9,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x20d41e){-0x1===_0x20d41e?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x42af67 of this['commentViews'])_0x42af67['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x5c15a8,_0x3bc902){const _0x315cb5=new this['_config']['CommentView'](this['locale'],_0x5c15a8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x315cb5['viewUid']=_0x5c15a8['id'],_0x315cb5['delegate']('removeComment')['to'](this),_0x315cb5['delegate']('updateComment')['to'](this),_0x315cb5['delegate']('resolveCommentThread')['to'](this),_0x315cb5['delegate']('editorReady')['to'](this),_0x315cb5['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x315cb5,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x315cb5,_0x3bc902);}['_calculatePosition'](_0x3df4d5){const _0x17df19=this['_model']['_findOptimalIndex'](_0x3df4d5);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3df4d5['authoredAt']?_0x17df19-0x1:_0x17df19:_0x17df19-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3e8643={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3e8643,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3e8643));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x41b79a){const _0x53dd97=this['commentViews']['remove'](_0x41b79a['id']);this['stopListening'](_0x53dd97),_0x53dd97['isEditMode']&&this['_updateHasDirtyComment'](),_0x53dd97['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1e217c=>_0x1e217c['isEditMode']);}['_rearrangeCollapse'](){const _0x2be9c6=function(_0x275ac6){const _0x363a7e=new _0x382eec();for(const _0x30ea61 of _0x275ac6)_0x363a7e['add'](_0x30ea61);return _0x363a7e;}(this['commentViews']),_0x2ed0bf=this['_collapsedCommentsView']['count'];for(let _0x23da61=0x1;_0x23da61<=_0x2ed0bf;_0x23da61++)_0x2be9c6['remove'](0x1);for(const _0x5ab1b8 of _0x2be9c6)_0x5ab1b8['collapse']();_0x2ed0bf>0x0&&_0x2be9c6['add'](this['_collapsedCommentsView'],0x1),Pt(_0x1b85af(Array['from'](this['visibleViews']),Array['from'](_0x2be9c6)),this['visibleViews'],_0x2be9c6);}['_rearrangeExpand'](){Pt(_0x1b85af(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2494bf of this['visibleViews'])_0x2494bf['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2345ff=>{this['focusTracker']['add'](_0x2345ff['element']),this['keystrokes']['listenTo'](_0x2345ff['element']);}),this['commentViews']['on']('change',(_0x5291c0,_0x3eff92)=>{for(const _0x1f4ccc of _0x3eff92['removed'])this['focusTracker']['remove'](_0x1f4ccc['element']),this['keystrokes']['stopListening'](_0x1f4ccc['element']);for(const _0x4cbf75 of Array['from'](_0x3eff92['added'])['reverse']())this['focusTracker']['add'](_0x4cbf75['element']),this['keystrokes']['listenTo'](_0x4cbf75['element']);});}}function Pt(_0x44214b,_0xfbd587,_0x25f8a0){let _0x303f61=0x0;for(const _0x15ee37 of _0x44214b)switch(_0x15ee37){case'insert':_0xfbd587['add'](_0x25f8a0['get'](_0x303f61),_0x303f61),_0x303f61++;break;case'delete':_0xfbd587['remove'](_0x303f61);break;case'equal':_0x303f61++;}}class Lt extends _0x41f494{constructor(_0xaee5ee){super(_0xaee5ee);const _0x23f5a6=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x23f5a6['to']('contextValue',_0x14085a=>bt(_0xaee5ee,'THREAD_CONTEXT_LABEL',_0x14085a)),'tabindex':-0x1},'children':[{'text':_0x23f5a6['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x41f494{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x126fc1,_0x9bc22a){super(_0x126fc1);const _0x2588a1=this['bindTemplate'];this['_model']=_0x9bc22a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x911300(),this['keystrokes']=new _0x17329a(),this['focusCycler']=new _0x6f869d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x301352=>!!_0x301352),this['bind']('contextValue')['to'](this['_model'],'context',_0x1a830e=>_0x1a830e&&_0x1a830e['value']?this['_trimContextValue'](_0x1a830e['value']):bt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x2588a1['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x4ec868=new _0x38179e(this['locale']);return _0x4ec868['label']=bt(this['locale'],'Reopen'),_0x4ec868['tooltip']=bt(this['locale'],'Reopen'),_0x4ec868['icon']=_0x2c3fc4,_0x4ec868['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x12597c=>!_0x12597c),_0x4ec868['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xee96b1,_0x3e1196)=>_0xee96b1&&_0x3e1196),_0x4ec868['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4ec868;}['_trimContextValue'](_0xea859){if(_0xea859['length']<0x96)return _0xea859;const _0x1f0e23=_0xea859['lastIndexOf']('\x20',0x93);return _0xea859['substring'](0x0,_0x1f0e23>-0x1?_0x1f0e23:0x93)+'...';}['_attachContextActions'](){const _0x51ed1a=this['element']['querySelector']('.ck-context'),_0x279b4f=_0x51ed1a['querySelector']('.ck-context__value');this['listenTo'](_0x51ed1a,'mouseenter',()=>{_0x279b4f['offsetWidth']<_0x279b4f['scrollWidth']&&_0x51ed1a['classList']['add']('overlay');}),this['listenTo'](_0x51ed1a,'mouseleave',()=>{_0x51ed1a['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x14a807 of this['focusables'])this['focusTracker']['add'](_0x14a807['element']),this['keystrokes']['listenTo'](_0x14a807['element']);}['_createContextView'](){const _0x51fb17=new Lt(this['locale']);return _0x51fb17['bind']('contextValue')['to'](this),_0x51fb17;}}class Vt extends _0x41f494{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x39d94e,_0x544b05,_0x10ccc5,_0x53c36e){super(_0x39d94e),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x544b05,this['_localUser']=_0x10ccc5,this['_config']=_0x53c36e,this['commentThreadHeaderView']=new Dt(_0x39d94e,_0x544b05),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x10f9be(_0x39d94e,bt(_0x39d94e,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x39d94e,_0x544b05,Object['assign']({'CommentView':this['_config']['CommentView']},_0x53c36e)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x1e63bc,_0x472e52)=>_0x1e63bc||!!_0x472e52),this['bind']('isUnlinked')['to'](_0x544b05,'unlinkedAt',_0x1f2f13=>!!_0x1f2f13),this['bind']('ariaLabel')['to'](this,'length',_0x7252a8=>{const _0xd03318=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x7252a8,_0xd03318]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x911300(),this['keystrokes']=new _0x17329a(),this['focusCycler']=new _0x6f869d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x291189=>_0x291189['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x3ff99a(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3b1510=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x492faf=_0x3b1510['commentInputView'];return _0x3b1510['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x492faf,'value',(_0x4c3142,_0x2c861a,_0x2527ba,_0x18097d,_0x425ddc)=>!!_0x425ddc||!!_0x18097d&&_0x2527ba&&!_0x2c861a||_0x4c3142&&_0x2527ba&&!_0x2c861a),_0x492faf['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x186ef6,_0x31442f,_0x22fa79)=>{let _0x1955a7;return _0x1955a7=_0x22fa79&&_0x31442f?'Reply\x20to\x20reopen\x20discussion...':_0x186ef6?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x1955a7);}),_0x492faf['bind']('submitLabel')['to'](this,'length',_0x5658af=>bt(this['locale'],_0x5658af?'Reply':'Comment')),_0x492faf['on']('submit',(_0x9afe,_0x351554)=>{this['fire']('addComment',_0x351554),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x492faf['on']('cancel',()=>{this['focus']();}),_0x492faf['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x492faf['on']('cancel',_0x357e89=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x357e89['stop']());}),this['on']('change:isActive',(_0x273dc7,_0x571101,_0x9457bb)=>{_0x9457bb||this['length']||_0x492faf['value']||this['fire']('removeCommentThread');}),_0x3b1510;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x209f74(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x5494dc,_0x4efcec,_0x35273a,_0x35ad8a){super(_0x5494dc,_0x4efcec,_0x35273a,_0x35ad8a),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5494dc,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2a7269,_0x26a6eb,_0x8d9660)=>{_0x8d9660||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x34ed69,_0xd0ef77,_0x3b3aa6)=>{_0x3b3aa6&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0xb45719=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0xb45719['if']('isActive','ck-thread--active'),_0xb45719['if']('isUnlinked','ck-thread--unlinked'),_0xb45719['to']('actionIndicator',_0x4afcad=>_0x4afcad?'ck-thread--'+_0x4afcad:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0xb45719['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id']},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container'),this['_model']['on']('change:archivedAt',()=>{this['_updateArchivedThreadHeader']();}),this['_updateArchivedThreadHeader']();}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0xf2336f of this['commentsListView']['commentViews'])_0xf2336f['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x4e8214}=this,_0x39be8d=this['commentsListView']['commentViews']['get'](0x0);_0x39be8d===this['_boundFirstCommentView']||_0x39be8d['isSystemComment']||(this['_boundFirstCommentView']=_0x39be8d,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x39be8d,'actionIndicator',_0x32822e=>'remove'===_0x32822e?'remove':null),_0x39be8d['placeholder']=bt(_0x4e8214,'Write\x20a\x20comment...'),_0x39be8d['removeButton']['on']('execute',_0x343089=>{_0x343089['stop'](),this['showConfirm'](bt(_0x4e8214,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x39be8d['focus']();}),_0x39be8d['actionBar']['add'](this['resolveButton'],0x0),_0x39be8d['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x432de4=new _0x395ace(this['locale']);return _0x432de4['label']=bt(this['locale'],'Resolve'),_0x432de4['tooltip']=bt(this['locale'],'Resolve'),_0x432de4['icon']=_0x449174,_0x432de4['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x432de4['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x21d118=>!_0x21d118),_0x432de4['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x176ba0,_0x1df1cc)=>_0x176ba0&&!_0x1df1cc),_0x432de4['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x432de4;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class Ht extends _0x41f494{constructor(_0x3ef47b){super(_0x3ef47b),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x18c722,_0x41fb63,_0x369051)=>{this['element']['innerHTML']=_0x369051;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x41f494{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x5d0c45,_0x449cfc,_0x4c0d6f){super(_0x5d0c45),this['_model']=_0x449cfc,this['_config']=_0x4c0d6f,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x449cfc,'content',_0x449cfc,'authoredAt',(_0x2ac58b,_0xe2983a)=>bt(_0x5d0c45,'COMMENT_ARIA_LABEL',[_0x449cfc['author']['name'],_0x4c0d6f['formatDateTime'](_0xe2983a),new DOMParser()['parseFromString'](_0x2ac58b,'text/html')['body']['textContent'],_0x449cfc['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x10f9be(_0x5d0c45,bt(_0x5d0c45,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x911300(),this['keystrokes']=new _0x17329a(),this['focusCycler']=new _0x6f869d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1b2bfa=>_0x1b2bfa['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x10dd4c=new Ht(this['locale']);return _0x10dd4c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2f191d,_0x35bb6b)=>_0x35bb6b?_0x3c8898(_0x2f191d,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2f191d),_0x10dd4c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x2d0e2c=new Mt(this['locale'],this['_config']['editorConfig']);return _0x2d0e2c['value']=this['_model']['content'],_0x2d0e2c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2d0e2c['submitLabel']=bt(this['locale'],'Save'),_0x2d0e2c['on']('submit',(_0x3f21e0,_0x53c4b8)=>{this['fire']('updateComment',this['_model']['id'],_0x53c4b8),this['switchToDisplayMode'](),this['focus']();}),_0x2d0e2c['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x2d0e2c['once']('editorReady',()=>{_0x2d0e2c['focus']();}),_0x2d0e2c['createEditor'](),_0x2d0e2c['delegate']('editorReady')['to'](this),_0x2d0e2c['delegate']('editorDestroyed')['to'](this),_0x2d0e2c;}['_setupKeyboardNavigation'](){const _0xad2bcb=this['element'];this['keystrokes']['listenTo'](_0xad2bcb);for(const _0x2f92cf of this['focusables'])this['focusTracker']['add'](_0x2f92cf['element']),this['keystrokes']['listenTo'](_0x2f92cf['element']);this['focusables']['on']('change',(_0x51a23f,_0x15bd68)=>{for(const _0x550228 of _0x15bd68['removed'])this['focusTracker']['remove'](_0x550228['element']),this['keystrokes']['stopListening'](_0x550228['element']);for(const _0x2b3504 of _0x15bd68['added'])this['focusTracker']['add'](_0x2b3504['element']),this['keystrokes']['listenTo'](_0x2b3504['element']);}),this['keystrokes']['set']('enter',(_0x3f91a9,_0x4645d3)=>{_0xad2bcb===_0x3f91a9['target']&&(this['focusCycler']['focusFirst'](),_0x4645d3());}),this['keystrokes']['set']('esc',(_0x36b8a6,_0x2f0e17)=>{_0xad2bcb!==_0x36b8a6['target']&&(this['focus'](),_0x2f0e17());});}}class Ut extends/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x209f74(Ft){['actionBar'];['userView'];constructor(_0x515408,_0x3ec0b0,_0x28b792){super(_0x515408,_0x3ec0b0,_0x28b792),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0x515408,'Reply...')),this['bind']('authoredAt')['to'](_0x3ec0b0),this['bind']('resolvedAt')['to'](_0x3ec0b0),this['actionBar']=this['createCollection'](),this['isSystemComment']||(this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this['createCollection'](),this['items']['addMany']([this['editButton'],this['removeButton']]),this['dropdown']=this['_createDropdown'](),this['actionBar']['add'](this['dropdown']),this['focusables']['add'](this['dropdown'])),this['userView']=new _0x3cc9cf(_0x515408,_0x3ec0b0['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3ec0b0,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x17c1f6=this['bindTemplate'],_0x2a789d=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x17c1f6['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x17c1f6['to']('authoredAt',_0x524ad5=>this['_config']['formatDateTime'](_0x524ad5))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x17c1f6['if']('isEditMode','ck-comment__actions--hidden'),_0x17c1f6['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']},this['ariaDescriptionView']];return this['_model']['isExternal']&&_0x2a789d['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x17c1f6['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x17c1f6['if']('isEditMode','ck-comment--edit'),_0x17c1f6['if']('isSystemComment','ck-comment--info'),_0x17c1f6['to']('actionIndicator',_0x46cbf8=>_0x46cbf8?'ck-comment--'+_0x46cbf8:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id'],'role':'group'},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':_0x2a789d}]}]};}['_createEditButton'](){const _0x157dcb=new _0x38179e(this['locale']);return _0x157dcb['label']=bt(this['locale'],'Edit'),_0x157dcb['icon']=_0x372299,_0x157dcb['withText']=!0x0,_0x157dcb['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x157dcb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x348214=>!_0x348214),_0x157dcb['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x157dcb['on']('execute',()=>this['switchToEditMode']()),_0x157dcb;}['_createRemoveButton'](){const _0x3b5c0b=new _0x38179e(this['locale']);return _0x3b5c0b['label']=bt(this['locale'],'Remove'),_0x3b5c0b['icon']=_0x4aea4e,_0x3b5c0b['withText']=!0x0,_0x3b5c0b['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x3b5c0b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4d7a5e=>!_0x4d7a5e),_0x3b5c0b['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x3b5c0b['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x3b5c0b;}['_createDropdown'](){const _0x2f7885=it(this['locale'],_0x2c46d9),_0x2bfbe0=_0x2f7885['panelView']['children'],_0x4251ce=new et(this['locale']),_0x27e126=_0x2f7885['bindTemplate'];st(_0x2f7885,()=>this['items']['find'](_0x528253=>_0x528253['isVisible'])),_0x2f7885['extendTemplate']({'attributes':{'class':[_0x27e126['if']('isVisible','ck-hidden',_0x43d330=>!_0x43d330)]}});const _0xd1b75c=(_0x21d22c,_0x2aa8af=-0x1)=>{const _0x2f6f27=new nt(this['locale']);_0x2f6f27['children']['add'](_0x21d22c);const _0x90a67c=_0x2aa8af>-0x1?_0x2aa8af:_0x4251ce['items']['length'];_0x4251ce['items']['add'](_0x2f6f27,_0x90a67c);const _0x289b0a=Array['from'](this['items']);_0x2f7885['unbind']('isEnabled','isVisible'),_0x2f7885['bind']('isEnabled')['toMany'](_0x289b0a,'isEnabled',(..._0x191b57)=>_0x191b57['some'](_0x42a070=>_0x42a070)),_0x2f7885['bind']('isVisible')['toMany'](_0x289b0a,'isVisible',(..._0x4af0e6)=>_0x4af0e6['some'](_0xe45b4d=>_0xe45b4d));};_0x2f7885['panelPosition']='sw',_0x2f7885['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x27887e});for(const _0x4b96b3 of this['items'])_0xd1b75c(_0x4b96b3);return _0x2bfbe0['add'](_0x4251ce),_0x2f7885['listenTo'](this['items'],'add',(_0x504598,_0x29b340,_0x3385bf)=>{_0xd1b75c(_0x29b340,_0x3385bf);}),_0x2f7885['listenTo'](this['items'],'remove',(_0x534bf8,_0x5d2f58,_0x2458ce)=>{_0x4251ce['items']['remove'](_0x2458ce);}),_0x2f7885;}['_attachActions'](_0x3aefd1,_0x238cf4){const _0x525028=_0x3aefd1&&_0x3aefd1['element'];_0x525028&&(this['listenTo'](_0x525028,'mouseenter',()=>this['actionIndicator']=_0x238cf4),this['listenTo'](_0x525028,'focus',()=>this['actionIndicator']=_0x238cf4),this['listenTo'](_0x525028,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x525028,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x25b7f8=super['_createCommentInputView']();return _0x25b7f8['bind']('placeholder')['to'](this),_0x25b7f8;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x4435dd){const _0x1f13d7=_0xe3a524(_0x4435dd,0x1e),_0x4f4f28=new MutationObserver(_0x11e2ef=>{for(const _0x1f8f05 of _0x11e2ef)('attributes'==_0x1f8f05['type']&&'class'==_0x1f8f05['attributeName']||'childList'==_0x1f8f05['type']||'characterData'==_0x1f8f05['type'])&&_0x1f13d7();});return{'attach'(_0x463300){_0x4f4f28['observe'](_0x463300,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4f4f28['disconnect'](),_0x1f13d7['cancel']();}};}class Kt extends _0x41f494{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2340b0,_0x915eb9){super(_0x2340b0),this['id']=_0x396982(),this['focusTracker']=new _0x911300(),this['keystrokes']=new _0x17329a(),this['keystrokes']['set']('Esc',(_0x10fa63,_0x14e5be)=>this['fire']('Esc',_0x14e5be)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x915eb9),this['mainView']=_0x915eb9;const _0x15633f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x15633f['if']('isActive','ck-annotation-wrapper--active')],'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['focusTracker']['add'](this['element']),this['keystrokes']['listenTo'](this['element']),this['_mutationObserver']['attach'](this['element']);}['destroy'](){this['content']['clear'](),this['keystrokes']['destroy'](),this['focusTracker']['destroy'](),this['_mutationObserver']['detach'](),super['destroy']();}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['_updateHeight'](){const _0x22da0b=this['element']['clientHeight'];_0x22da0b&&(this['height']=_0x22da0b);}}class Yt extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x25c8c0(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x205562,target:_0x4f4d6e,type:_0x5e0daf,isVisible:_0x145087=!0x0}){super(),this['view']=_0x205562,this['view']['element']||this['view']['render'](),this['_type']=_0x5e0daf,this['_target']=_0x4f4d6e,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x382eec([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x56cf32,_0x1f122e)=>{this['view']['focusTracker']['add'](_0x1f122e);}),this['focusableElements']['on']('remove',(_0x35ffed,_0x4d981e)=>{this['view']['focusTracker']['remove'](_0x4d981e);}),this['set']('isVisible',_0x145087);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x17e351=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x17e351),_0x17e351;}get['targetRect'](){const _0x5a5f05=this['target'];if(null===_0x5a5f05)return null;if(_0x5a5f05 instanceof _0x3ba044)return _0x5a5f05;const _0x133463=_0x5a5f05['filter'](_0x1bff1f=>function(_0x585a1b){const _0x39b95e=_0x585a1b['offsetParent'];if(_0x39b95e)return!0x0;const _0x2c6302=_0x585a1b['getClientRects']()['item'](0x0);return!!_0x2c6302;}(_0x1bff1f));return 0x0===_0x133463['length']?null:_0x3ba044['getDomElementRects'](_0x133463[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x23f8cb){this['view']['isActive']=_0x23f8cb,this['view']['mainView']['isActive']=_0x23f8cb;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3a0b73){if(!(null===_0x3a0b73||_0x3a0b73 instanceof _0x3ba044||Array['isArray'](_0x3a0b73)&&_0x3a0b73['every'](_0x56e79d=>Gt(_0x56e79d))))throw new _0x875303('annotation-invalid-target',null,{'target':_0x3a0b73});}['_getNormalizedTarget'](){const _0x311734='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x311734)?[_0x311734]:_0x311734;}}function Gt(_0x52281e){return null!==_0x52281e&&'object'==typeof _0x52281e&&'nodeType'in _0x52281e&&0x1===_0x52281e['nodeType'];}class jt extends _0x382eec{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2c74f7=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x911300(),this['_focusTracker']['on']('change:isFocused',(_0x51573b,_0x4e87e8,_0x5aeb8e)=>{_0x5aeb8e||this['fire']('blur');});for(const _0x319706 of _0x2c74f7)this['add'](_0x319706);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x41c3dd){if(this['has'](_0x41c3dd))throw new _0x875303('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x41c3dd['innerView'],_0x41c3dd),this['_viewToAnnotation']['set'](_0x41c3dd['view'],_0x41c3dd);for(const _0x250514 of _0x41c3dd['focusableElements'])this['_focusTracker']['add'](_0x250514);this['listenTo'](_0x41c3dd['focusableElements'],'add',(_0x3bbbeb,_0x1552db)=>{this['_focusTracker']['add'](_0x1552db);}),this['listenTo'](_0x41c3dd['focusableElements'],'remove',(_0x6a2092,_0x2bb377)=>{this['_focusTracker']['remove'](_0x2bb377);}),this['listenTo'](_0x41c3dd['view']['focusTracker'],'change:isFocused',(_0x35e0b0,_0x2034fa,_0x40b323)=>{_0x40b323&&this['fire']('focus',_0x41c3dd);}),_0x41c3dd['updateTargetRect']();const _0x10f90b=this['_getOrderInContent'](_0x41c3dd['view']['targetRect']);return super['add'](_0x41c3dd,_0x10f90b);}['remove'](_0x25760f){if(!this['has'](_0x25760f))throw new _0x875303('annotationcollection-not-existing-item',null);this['stopListening'](_0x25760f['view']['focusTracker']),this['stopListening'](_0x25760f['focusableElements']);for(const _0x968bf0 of _0x25760f['focusableElements'])this['_focusTracker']['remove'](_0x968bf0);return this['_viewToAnnotation']['delete'](_0x25760f['view']),this['_innerViewToAnnotation']['delete'](_0x25760f['innerView']),super['remove'](_0x25760f);}['getByInnerView'](_0x28abef){return this['_innerViewToAnnotation']['get'](_0x28abef);}['getByView'](_0x3e04da){return this['_viewToAnnotation']['get'](_0x3e04da);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x4b78e1 of this)_0x4b78e1['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2e0caf=Array['from'](this)['sort']((_0x350278,_0x2ec3b9)=>qt(_0x350278['view']['targetRect'],_0x2ec3b9['view']['targetRect']));for(let _0x5eaeac=_0x2e0caf['length']-0x1;_0x5eaeac>0x0;_0x5eaeac--){const _0x40c72c=_0x2e0caf[_0x5eaeac];_0x5eaeac!==this['getIndex'](_0x40c72c)&&(this['remove'](_0x40c72c),this['add'](_0x40c72c));}}['_getOrderInContent'](_0x262c39){let _0x4b4947=0x0;if(!_0x262c39)return this['length'];for(const _0x294fff of this){const _0x3473ca=_0x294fff['view']['targetRect'];if(_0x3473ca){if(qt(_0x262c39,_0x3473ca)<0x0)return _0x4b4947;_0x4b4947++;}}return _0x4b4947;}}function Xt({source:_0x2a4db0,target:_0x35696f,filter:_0x22cafc}){for(const _0x2bc0e7 of _0x2a4db0)_0x22cafc(_0x2bc0e7)&&_0x35696f['add'](_0x2bc0e7);_0x35696f['listenTo'](_0x2a4db0,'add',(_0x5a8ce8,_0x109000)=>{_0x22cafc(_0x109000)&&_0x35696f['add'](_0x109000);}),_0x35696f['listenTo'](_0x2a4db0,'remove',(_0x372680,_0x59f433)=>{_0x35696f['has'](_0x59f433)&&_0x35696f['remove'](_0x59f433);});}function qt(_0x15c3ca,_0x374f89){if(null===_0x15c3ca&&null===_0x374f89)return 0x0;if(null===_0x15c3ca)return-0x1;if(null===_0x374f89)return 0x1;const _0x11e122=_0x15c3ca['top']-_0x374f89['top'];return 0x0==_0x11e122?_0x15c3ca['left']-_0x374f89['left']:_0x11e122;}class $t extends _0x2def50{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xa79ed9){if(super(_0xa79ed9),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xa79ed9 instanceof _0x3bcaf9){const _0x352052=_0xa79ed9['locale'];_0xa79ed9['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x352052,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x352052,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x352052,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x352052,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x352052,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x352052,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x352052,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5d09f2){this['collection']['add'](_0x5d09f2);}['remove'](_0x4e5679){this['collection']['remove'](_0x4e5679),_0x4e5679['destroy']();}['refreshVisibility'](){for(const _0x20f808 of this['collection'])_0x20f808['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5b5e47){return this['collection']['getByInnerView'](_0x5b5e47);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2f3e9b of this['collection'])_0x2f3e9b['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x165033){this['fire']('_activateAnnotation',_0x165033);}['createAnnotation'](_0x59f246){return new Yt(_0x59f246);}['createAnnotationView'](_0x2f3782,_0x45ccd0){return new Kt(_0x2f3782,_0x45ccd0);}['_addActiveAnnotation'](_0x671933){const _0x365e7d=new Set(this['activeAnnotations']);_0x365e7d['add'](_0x671933),this['activeAnnotations']=_0x365e7d;}['_removeActiveAnnotation'](_0xc83852){const _0x61958f=new Set(this['activeAnnotations']);_0x61958f['delete'](_0xc83852),this['activeAnnotations']=_0x61958f;}['_bindAnnotationsToVisibleAnnotations'](){const _0x53db34=this['collection'],_0x3e4572=this['_visibleAnnotations'];function _0x53108f(_0xb9a40){const _0x3a14d1=_0xb9a40['source'];_0x3a14d1['isVisible']&&!_0x3e4572['has'](_0x3a14d1)?_0x3e4572['add'](_0x3a14d1):!_0x3a14d1['isVisible']&&_0x3e4572['has'](_0x3a14d1)&&_0x3e4572['remove'](_0x3a14d1),_0x3a14d1['view']['focusTracker']['remove'](_0x3a14d1['view']['element']),_0x3a14d1['view']['focusTracker']['add'](_0x3a14d1['view']['element']);}this['listenTo'](_0x53db34,'add',(_0xf819c4,_0x4e4acc)=>{_0x4e4acc['isVisible']&&_0x3e4572['add'](_0x4e4acc),this['listenTo'](_0x4e4acc,'change:isVisible',_0x53108f);}),this['listenTo'](_0x53db34,'remove',(_0x22562d,_0x190af5)=>{_0x3e4572['has'](_0x190af5)&&_0x3e4572['remove'](_0x190af5),this['stopListening'](_0x190af5,'change:isVisible',_0x53108f);});}['_setupEnterAnnotationKeystroke'](){const _0x1931e6=_0xc93e4e=>{_0xc93e4e['on']('ready',()=>{_0xc93e4e['keystrokes']['set'](_0x20bd97,(_0x3b462e,_0x2fc292)=>{const _0x2756f6=_0x52122a(this['activeAnnotations']['values']());_0x2756f6&&(_0x2756f6['view']['focus'](),_0x2fc292());});});};this['context']instanceof _0x3bcaf9?_0x1931e6(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1bd70f,_0x336ded)=>{_0x1931e6(_0x336ded);});}['_setupEscapeAnnotationHandling'](){const _0x9054cc=_0x371aea=>{const _0x3b8703=_0x371aea['source'],_0x4a7f56=[];let _0x2bd38c;if(Array['isArray'](_0x3b8703['target'])){_0x2bd38c=_0x3b8703['target'][0x0],this['context']instanceof _0x3bcaf9?_0x4a7f56['push'](this['context']):this['context']['editors']&&_0x4a7f56['push'](...this['context']['editors']);for(const _0x3ba0f6 of _0x4a7f56)for(const _0x3c161f of _0x3ba0f6['editing']['view']['domRoots']['values']())if(_0x3c161f['contains'](_0x2bd38c))return void _0x3ba0f6['editing']['view']['focus']();_0x2bd38c['focus']();}};this['listenTo'](this['collection'],'add',(_0x316791,_0xeb09d1)=>{this['listenTo'](_0xeb09d1,'escape',_0x9054cc,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x238ceb,_0x210e01)=>{this['stopListening'](_0x210e01,'escape',_0x9054cc);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x2def50{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0xeddd6c,_0x249f32];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35d072){super(_0x35d072),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2b3afb=this['context']['config'];_0x2b3afb['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2b3afb['define']('comments.maxThreadTotalWeight',0x1f4),_0x2b3afb['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2b3afb['define']('comments.CommentThreadView',Bt),_0x2b3afb['define']('comments.CommentView',Ut),_0x2b3afb['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1213d6=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4f2923,_0x43dd50)=>this['_addCommentThread'](_0x43dd50)),this['on']('submitCommentThread',(_0x1ca517,_0x43ba8a)=>this['_submitCommentThread'](_0x43ba8a)),this['on']('resolveCommentThread',(_0x3e1032,_0x1602cf)=>this['_resolveCommentThread'](_0x1602cf)),this['on']('resolveCommentThread',(_0x5b95ac,_0x15bdf3)=>this['_updateActiveAnnotation'](_0x15bdf3),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x163beb,_0x448174)=>this['_reopenCommentThread'](_0x448174)),this['on']('reopenCommentThread',(_0x2847fd,_0x2b3223)=>this['_updateActiveAnnotation'](_0x2b3223),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x43e556,_0x158a17)=>this['_removeCommentThread'](_0x158a17)),this['on']('updateCommentThread',(_0x3f290f,_0x39b280)=>this['_updateCommentThread'](_0x39b280)),this['on']('updateCommentThread',(_0x32fce5,_0x2d2469)=>this['_updateActiveAnnotation'](_0x2d2469),{'priority':'lowest'}),this['on']('addComment',(_0x2e81fc,_0x5995f7)=>this['_addComment'](_0x5995f7)),this['on']('updateComment',(_0x419273,_0x35567f)=>this['_updateComment'](_0x35567f)),this['on']('removeComment',(_0x58e1ef,_0xf745fe)=>this['_removeComment'](_0xf745fe)),this['on']('addComment',(_0x5a1fe7,{threadId:_0x36052a,isFromAdapter:_0x2b4a79})=>{if(_0x2b4a79)return;const _0x1eab31=this['getCommentThread'](_0x36052a),_0x30aaf0=_0x1eab31&&this['_threadToController']['get'](_0x1eab31);_0x30aaf0&&_0x30aaf0['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1213d6,'change:activeAnnotations',(_0x4ef0dd,_0x5a763c,_0x599688)=>{const _0x4bf249=Array['from'](_0x599688)['map'](_0x36fce1=>this['_viewToController']['get'](_0x36fce1['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4bf249?_0x4bf249['model']:null;});}set['adapter'](_0x127495){if(this['_adapter'])throw new _0x875303('commentsrepository-adapter-already-set');this['_adapter']=_0x127495;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x148f4f=zt,threadId:_0x405cbd=_0x396982(),comments:_0x5445db=[],unlinkedAt:_0x2ff825=null,resolvedAt:_0x54a9af=null,resolvedBy:_0x2390d3=null,target:_0x2aad37=null,context:_0x4a76a6=null,attributes:_0x236272={},isResolvable:_0x1daee7=!0x0,isSubmitted:_0x520435=!0x1,isFromAdapter:_0x5cc335=!0x1}={}){return this['fire'](ii('addCommentThread',_0x148f4f),{'channelId':_0x148f4f,'threadId':_0x405cbd,'comments':_0x5445db,'unlinkedAt':_0x2ff825,'resolvedAt':_0x54a9af,'resolvedBy':_0x2390d3,'target':_0x2aad37,'context':_0x4a76a6,'attributes':_0x236272,'isFromAdapter':_0x5cc335,'isResolvable':_0x1daee7,'isSubmitted':_0x520435}),this['getCommentThread'](_0x405cbd);}['openNewCommentThread']({channelId:_0xa53132=zt,threadId:_0x52e158=_0x396982(),target:_0x74c532,context:_0x79342=null,isResolvable:_0x179274=!0x0}){if(this['_readOnlyChannels']['has'](_0xa53132)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x74c532)throw new _0x875303('commentsrepository-missing-target');const _0x3262b8=this['addCommentThread']({'channelId':_0xa53132,'threadId':_0x52e158,'target':_0x74c532,'context':_0x79342,'isResolvable':_0x179274});if(!_0x3262b8)return null;const _0x2abeb0=this['_threadToController']['get'](_0x3262b8),_0xa354bd=_0x2abeb0['view']['commentThreadInputView']['commentInputView'],_0x2b6dbf=this['context']['plugins']['get']($t),_0x4f49db=_0x2b6dbf['getByInnerView'](_0x2abeb0['view']);return _0x2b6dbf['activate'](_0x4f49db),_0xa354bd['once']('editorReady',()=>_0xa354bd['focus']()),_0x3262b8;}['hasCommentThread'](_0x5c520c){if('string'!=typeof _0x5c520c)throw new _0x875303('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x5c520c);}['updateCommentThread']({channelId:_0xa4cedf=zt,threadId:_0x2409ee,context:_0x1e0281,unlinkedAt:_0x5629a0,attributes:_0x5dc8e3,isFromAdapter:_0x486a58=!0x1}){return this['fire'](ii('updateCommentThread',_0xa4cedf),{'channelId':_0xa4cedf,'threadId':_0x2409ee,'context':_0x1e0281,'unlinkedAt':_0x5629a0,'attributes':_0x5dc8e3,'isFromAdapter':_0x486a58}),this['getCommentThread'](_0x2409ee);}['getCommentThread'](_0x271211){if('string'!=typeof _0x271211)throw new _0x875303('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x271211);}['fetchCommentThread']({channelId:_0x17c475,threadId:_0xea774c}={}){const _0x16ad94=this['getCommentThread'](_0xea774c);if(_0x16ad94)return Promise['resolve'](_0x16ad94);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x875303('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x17c475,'threadId':_0xea774c})['then'](_0x3b3149=>this['hasCommentThread'](_0xea774c)?this['getCommentThread'](_0xea774c):_0x3b3149?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x17c475},_0x3b3149)):void 0x0)['catch'](_0x4fba07=>{throw console['error'](_0x4fba07),new _0x875303('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x36a202,skipNotAttached:_0x28d4bb=!0x1,skipEmpty:_0x2b6a67=!0x1,toJSON:_0x1fedc4=!0x1}={}){const _0x2321d4=[];for(const _0x90efff of this['_threads']['values']())_0x36a202&&_0x90efff['channelId']!==_0x36a202||_0x28d4bb&&!_0x90efff['isAttached']||_0x2b6a67&&0x0===_0x90efff['length']||_0x2321d4['push'](_0x90efff);return _0x1fedc4?_0x2321d4['map'](_0x4f4d9b=>_0x4f4d9b['toJSON']()):_0x2321d4;}['getAnnotationForCommentThread'](_0x203b0c){const _0x2dc6bd=this['_threadToController']['get'](_0x203b0c);if(!_0x2dc6bd)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x2dc6bd['view'])||null;}['getCommentThreadForAnnotation'](_0x535f29){const _0x9c1735=this['_viewToController']['get'](_0x535f29['innerView']);return _0x9c1735?_0x9c1735['model']:null;}['setActiveCommentThread'](_0x41ab4f){const _0x159ede=this['context']['plugins']['get']($t);if(!_0x41ab4f)return void(this['activeCommentThread']&&_0x159ede['deactivateAll']());const _0x3e3aed=this['getCommentThread'](_0x41ab4f);if(!_0x3e3aed)throw new _0x875303('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x41ab4f});if(!this['_threadToController']['has'](_0x3e3aed))throw new _0x875303('commentsrepository-active-not-attached',null,{'threadId':_0x41ab4f});const _0x3160d0=_0x159ede['getByInnerView'](this['_threadToController']['get'](_0x3e3aed)['view']);_0x159ede['activate'](_0x3160d0);}['switchReadOnly'](_0x376a19,_0x250a99){_0x376a19?this['_readOnlyChannels']['add'](_0x250a99):this['_readOnlyChannels']['delete'](_0x250a99),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xd81f2d){return this['_readOnlyChannels']['has'](_0xd81f2d)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x39b82c,_0x37ea76){return new It(_0x39b82c,_0x37ea76);}['setPermissions'](_0x3bed63,_0x2c2a7b=zt){this['_permissions']['set'](_0x2c2a7b,_0x3bed63),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1bf4aa=zt){return this['_permissions']['has'](_0x1bf4aa)?this['_permissions']['get'](_0x1bf4aa):Jt;}['_addCommentThread']({channelId:_0x27838d,threadId:_0x563248,comments:_0x3f24b8,unlinkedAt:_0x3977f1,resolvedAt:_0x51f63c,resolvedBy:_0x400ff4,target:_0x354274,context:_0x1cf269,attributes:_0x541159,isFromAdapter:_0x3d5b8a,isResolvable:_0x3e6ccf,isSubmitted:_0x40e6a2}){if('string'!=typeof _0x563248)throw new _0x875303('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x563248});if(this['hasCommentThread'](_0x563248))throw new _0x875303('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x563248});const _0x318e30=new Zt(this,{'channelId':_0x27838d,'id':_0x563248,'context':_0x1cf269,'attributes':_0x541159,'unlinkedAt':_0x3977f1,'resolvedAt':_0x51f63c,'resolvedBy':_0x400ff4?this['context']['plugins']['get'](_0x249f32)['getUser'](_0x400ff4):null,'isResolvable':_0x3e6ccf,'isSubmitted':_0x40e6a2||_0x3d5b8a});this['_threads']['set'](_0x563248,_0x318e30);for(const _0x9beb2c of _0x3f24b8)_0x318e30['_add'](this['_createNewComment']({'threadId':_0x563248,..._0x9beb2c}));return _0x354274&&_0x318e30['attachTo'](_0x354274),_0x3d5b8a||!_0x318e30['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x27838d,'threadId':_0x563248});}['_submitCommentThread']({channelId:_0x1aec55,threadId:_0x216ba0}){if(!this['hasCommentThread'](_0x216ba0))throw new _0x875303('commentsrepository-missing-comment-thread',this);const _0x29eee0=this['getCommentThread'](_0x216ba0);if(_0x29eee0['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5a12cf,comments:_0x22e0ce,resolvedAt:_0x27b5ce,resolvedBy:_0x1ec33e,context:_0x4b970e,attributes:_0x19ff59}=_0x29eee0,_0x377ad8=this['context']['plugins']['get']('PendingActions'),_0x199529=_0x377ad8['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1aec55,'threadId':_0x5a12cf,'comments':_0x22e0ce['map'](_0x404f26=>_0x404f26['toJSON']()),'resolvedAt':_0x27b5ce,'resolvedBy':_0x1ec33e?_0x1ec33e['id']:_0x1ec33e,'context':_0x4b970e,'attributes':_0x19ff59})['then'](({comments:_0x7be2f4})=>{_0x377ad8['remove'](_0x199529);for(const _0x4b378e of _0x7be2f4)this['_updateComment']({'channelId':_0x1aec55,'threadId':_0x216ba0,'commentId':_0x4b378e['commentId'],'createdAt':_0x4b378e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4c9fae=>{throw console['error'](_0x4c9fae),new _0x875303('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x6b3507,target:_0x263388}){const _0x4082b4=this['getCommentThread'](_0x6b3507);if(!_0x4082b4)throw new _0x875303('commentsrepository-attach-missing-comment-thread',this);const _0x3e16d3=this['context']['plugins']['get']('PendingActions'),_0x2ba001=this['context']['plugins']['get']($t),_0x33eecb=this['_createCommentThreadView'](_0x4082b4),_0x22a66f=new It(_0x4082b4,_0x33eecb);let _0x3347b4=null;_0x33eecb['on']('change:isDirty',(_0x586168,_0x1abf98,_0x1dcf63)=>{_0x1dcf63?_0x3347b4=_0x3e16d3['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3347b4&&(_0x3e16d3['remove'](_0x3347b4),_0x3347b4=null);}),this['_threadToController']['set'](_0x4082b4,_0x22a66f),this['_viewToController']['set'](_0x33eecb,_0x22a66f);const _0x40be76=new Kt(this['context']['locale'],_0x33eecb);_0x40be76['bind']('length')['to'](_0x33eecb),_0x40be76['bind']('isDirty')['to'](_0x33eecb,'isDirty',_0x33eecb,'length',(_0x39bb52,_0x2f9891)=>_0x39bb52||!_0x2f9891),_0x40be76['bind']('isActive')['to'](_0x33eecb),_0x40be76['type']='comment';const _0x330403=new Yt({'view':_0x40be76,'target':_0x263388,'type':'comment','isVisible':!_0x4082b4['archivedAt']&&!!('function'==typeof _0x263388?_0x263388():_0x263388)});return _0x33eecb['on']('escape',()=>{_0x330403['fire']('escape');}),this['_bindAnnotationToEditors'](_0x33eecb,_0x330403),_0x2ba001['add'](_0x330403),_0x330403;}['_bindAnnotationToEditors'](_0xe1557d,_0x2da35a){this['listenTo'](_0xe1557d,'editorReady',(_0x3534cb,_0x2d070b)=>{const _0xc5bca1=_0x2d070b['ui']['view']['body']['bodyCollectionContainer'];_0x2da35a['focusableElements']['add'](_0xc5bca1),this['context']instanceof _0x3bcaf9&&this['context']['ui']['focusTracker']['add'](_0xc5bca1);},{'priority':'highest'}),this['listenTo'](_0xe1557d,'editorDestroyed',(_0x1cf2a7,_0x4a67c9)=>{const _0x9314f6=_0x4a67c9['ui']['view']['body']['bodyCollectionContainer'];_0x2da35a['focusableElements']['has'](_0x9314f6)&&_0x2da35a['focusableElements']['remove'](_0x9314f6),this['context']instanceof _0x3bcaf9&&this['context']['ui']['focusTracker']['remove'](_0x9314f6);});}['_unbindEditors'](_0x4bc4dc){this['stopListening'](_0x4bc4dc,'editorReady'),this['stopListening'](_0x4bc4dc,'editorDestroyed');}['_createCommentThreadView'](_0x185ecc){const _0x5f3a08=this['context']['plugins']['get'](_0x249f32),{config:_0x15f297,locale:_0x332d53}=this['context'],_0x4ccf53=_0x2591cb(_0x15f297['get']('locale'),_0x332d53);return new(0x0,(_0x15f297['get']('comments'))['CommentThreadView'])(_0x332d53,_0x185ecc,_0x5f3a08['me'],{'editorConfig':{..._0x15f297['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x15f297['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x15f297['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x15f297['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x15f297['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4ccf53,'CommentView':_0x15f297['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x31c3e4,channelId:_0x5e9046,resolvedAt:_0x410fa3,resolvedBy:_0x41f371,isFromAdapter:_0x353274}){if(!this['hasCommentThread'](_0x31c3e4))throw new _0x875303('commentsrepository-missing-comment-thread',null,{'threadId':_0x31c3e4});const _0x4a5b43=this['getCommentThread'](_0x31c3e4);if(_0x4a5b43['isResolved'])throw new _0x875303('commentsrepository-resolved-comment-thread',null,{'threadId':_0x31c3e4});const _0x43a044=this['context']['plugins']['get'](_0x249f32);if(_0x4a5b43['resolvedBy']=_0x43a044['getUser'](_0x41f371),_0x4a5b43['resolvedAt']=_0x410fa3,_0x353274||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1e326b=this['context']['plugins']['get']('PendingActions'),_0x4998ed=_0x1e326b['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x5e9046,'threadId':_0x31c3e4})['then'](({resolvedAt:_0x34ad8a,resolvedBy:_0xd98fcd})=>{_0x1e326b['remove'](_0x4998ed),_0x4a5b43['resolvedBy']['id']!==_0xd98fcd&&(_0x4a5b43['resolvedBy']=_0x43a044['getUser'](_0xd98fcd)),_0x4a5b43['resolvedAt']=_0x34ad8a;})['catch'](_0x6d1293=>{throw console['error'](_0x6d1293),new _0x875303('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x797b42,channelId:_0x46040b,isFromAdapter:_0x5340fd}){if(!this['hasCommentThread'](_0x797b42))throw new _0x875303('commentsrepository-missing-comment-thread',null,{'threadId':_0x797b42});const _0x3c2dbf=this['getCommentThread'](_0x797b42);if(!_0x3c2dbf['isResolved'])throw new _0x875303('commentsrepository-reopen-comment-thread',null,{'threadId':_0x797b42});if(_0x3c2dbf['resolvedBy']=null,_0x3c2dbf['resolvedAt']=null,_0x5340fd||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3869de=this['context']['plugins']['get']('PendingActions'),_0x5d181f=_0x3869de['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x46040b,'threadId':_0x797b42})['then'](()=>_0x3869de['remove'](_0x5d181f))['catch'](_0x2eb35c=>{throw console['error'](_0x2eb35c),new _0x875303('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5b9f08,isFromAdapter:_0x24a401}){const _0xf070d2=this['getCommentThread'](_0x5b9f08);if(!_0xf070d2)throw new _0x875303('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5b9f08),this['_threads']['delete'](_0x5b9f08),!_0xf070d2['isSubmitted']||_0x24a401||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xce1c9d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4334ca}=_0xf070d2,_0x3a377c=_0xce1c9d['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4334ca,'threadId':_0x5b9f08})['then'](()=>_0xce1c9d['remove'](_0x3a377c))['catch'](_0x35ead9=>{throw console['error'](_0x35ead9),new _0x875303('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5188e0,unlinkedAt:_0x2ba601,context:_0x3840dd,attributes:_0x49b546,isFromAdapter:_0x2f1305}){if('string'!=typeof _0x5188e0)throw new _0x875303('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5188e0});if(!this['hasCommentThread'](_0x5188e0))throw new _0x875303('commentsrepository-missing-comment-thread',null,{'threadId':_0x5188e0});const _0x10abe5=this['getCommentThread'](_0x5188e0);let _0x3e3630=!0x1;if(void 0x0!==_0x3840dd&&_0x10abe5['context']!==_0x3840dd&&(_0x10abe5['context']=_0x3840dd,_0x3e3630=!0x0),void 0x0!==_0x2ba601&&_0x10abe5['unlinkedAt']!==_0x2ba601&&(_0x10abe5['unlinkedAt']=_0x2ba601,_0x3e3630=!0x0),_0x49b546&&!_0x2b5bed(_0x49b546,_0x10abe5['attributes'])&&(_0x10abe5['attributes']=_0x49b546,_0x3e3630=!0x0),!_0x3e3630)return Promise['resolve']();if(!_0x10abe5['isSubmitted']||_0x2f1305||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x8d594f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x46f59a}=_0x10abe5,_0x244577=_0x8d594f['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x46f59a,'threadId':_0x5188e0,'context':_0x3840dd,'unlinkedAt':_0x2ba601,'attributes':_0x49b546})['then'](()=>_0x8d594f['remove'](_0x244577))['catch'](_0x335450=>{throw console['error'](_0x335450),new _0x875303('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2cad76){const _0x1ce102=this['context']['plugins']['get']($t),_0x24f872=this['getCommentThread'](_0x2cad76);if(_0x24f872['_isAttached']=!0x1,this['_threadToController']['has'](_0x24f872)){const _0x399480=this['_threadToController']['get'](_0x24f872),_0x35f08c=_0x399480['view'],_0x1f1c49=_0x1ce102['getByInnerView'](_0x35f08c);this['_threadToController']['delete'](_0x24f872),this['_viewToController']['delete'](_0x35f08c),_0x1f1c49&&_0x1ce102['remove'](_0x1f1c49),_0x399480['destroy'](),_0x35f08c['destroy']()['then'](()=>{this['_unbindEditors'](_0x35f08c);});}}['_updateActiveAnnotation']({threadId:_0xcf5f1c,resolvedAt:_0xe2d92a,unlinkedAt:_0xb2e08d}){const _0x1f91cd=!!_0xe2d92a,_0x32a12b=this['context']['plugins']['get']($t),_0x136e21=this['getCommentThread'](_0xcf5f1c);if(this['_threadToController']['has'](_0x136e21)){const _0x343ade=this['_threadToController']['get'](_0x136e21)['view'],_0x25e76d=_0x32a12b['getByInnerView'](_0x343ade);_0x25e76d&&(_0x1f91cd&&_0x32a12b['_removeActiveAnnotation'](_0x25e76d),_0xb2e08d?_0x25e76d['isVisible']=!0x1:_0x25e76d['refreshVisibility']());}}['_getExternalAuthor'](_0x4c1d04){const _0x33aeaa=this['context']['plugins']['get'](_0x249f32),_0x325667=_0x4098d('external:'+_0x4c1d04),_0x2739c5=_0x33aeaa['getUser'](_0x325667);return _0x2739c5||_0x33aeaa['addUser']({'id':_0x325667,'name':_0x4c1d04});}['_createNewComment']({threadId:_0x277f41,commentId:_0x110e7e=_0x396982(),content:_0x281746,authorId:_0x4b203b,createdAt:_0x27472e,attributes:_0x41fda9}){if('string'!=typeof _0x110e7e)throw new _0x875303('commentsrepository-invalid-commentid');if('string'!=typeof _0x4b203b)throw new _0x875303('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x281746||!_0x281746['trim']())throw new _0x875303('commentsrepository-invalid-comment-content');const _0x112c7a=this['context']['plugins']['get'](_0x249f32)['getUser'](_0x4b203b);if(!_0x112c7a)throw new _0x875303('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4b203b});let _0x2e7c62=null,_0x61a5e1=_0x27472e;return _0x41fda9?.['@external']&&(_0x2e7c62=this['_getExternalAuthor'](_0x41fda9['@external']['authorName']),_0x61a5e1=new Date(_0x41fda9['@external']['createdAt'])),new ti(this,{'threadId':_0x277f41,'id':_0x110e7e,'author':_0x2e7c62||_0x112c7a,'creator':_0x112c7a,'content':_0x281746,'createdAt':_0x27472e,'authoredAt':_0x61a5e1,'attributes':_0x41fda9});}['_addComment'](_0x25e71){let {threadId:_0x3d14dc,content:_0x488d96,attributes:_0x49bc0f,isFromAdapter:_0x37c212}=_0x25e71;const _0x376ab7=this['getCommentThread'](_0x25e71['threadId']);if(!_0x376ab7)throw new _0x875303('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2b847a=this['_createNewComment'](_0x25e71),{id:_0x3c1882}=_0x2b847a;if(_0x376ab7['_add'](_0x2b847a),_0x37c212||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x376ab7['isSubmitted'])return Promise['resolve']();const _0x131e38=this['context']['plugins']['get']('PendingActions'),{channelId:_0x39aa25}=_0x376ab7,_0x38b464=_0x131e38['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x49bc0f||(_0x49bc0f={}),this['adapter']['addComment']({'channelId':_0x39aa25,'threadId':_0x3d14dc,'commentId':_0x3c1882,'content':_0x488d96,'attributes':_0x49bc0f})['then'](_0xcfafe=>{_0x131e38['remove'](_0x38b464),_0xcfafe&&this['_updateComment']({'channelId':_0x39aa25,'threadId':_0x3d14dc,'commentId':_0x3c1882,'createdAt':_0xcfafe['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xb12061=>{throw console['error'](_0xb12061),new _0x875303('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x212081,commentId:_0x182be1,content:_0x2cc7f8,createdAt:_0x36ca40,attributes:_0xc0a7e5,isFromAdapter:_0x23e187}){if(void 0x0!==_0x2cc7f8&&('string'!=typeof _0x2cc7f8||!_0x2cc7f8['trim']()['length']))throw new _0x875303('commentsrepository-update-comment-invalid-content');const _0x1e3757=this['getCommentThread'](_0x212081),_0x1909ec=_0x1e3757['getComment'](_0x182be1);if(!_0x1909ec)throw new _0x875303('commentsrepository-update-missing-comment',this);let _0x173a63=!0x1;if(_0x2cc7f8&&_0x2cc7f8!==_0x1909ec['content']&&(_0x1909ec['isEditable']||_0x23e187)&&(_0x1909ec['content']=_0x2cc7f8,_0x173a63=!0x0),_0x36ca40&&_0x36ca40!==_0x1909ec['createdAt']&&(_0x1909ec['createdAt']=_0x36ca40,_0x1909ec['attributes']&&_0x1909ec['attributes']['@external']||(_0x1909ec['authoredAt']=_0x36ca40),_0x173a63=!0x0),_0xc0a7e5&&!_0x2b5bed(_0xc0a7e5,_0x1909ec['attributes'])&&(_0x1909ec['attributes']=_0xc0a7e5,_0x173a63=!0x0),!_0x173a63)return Promise['resolve']();if(_0x1e3757['fire']('commentUpdated'),_0x23e187||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x499958=this['context']['plugins']['get']('PendingActions'),{channelId:_0x33feb4}=this['getCommentThread'](_0x1909ec['threadId']),_0x2af258=_0x499958['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x33feb4,'threadId':_0x212081,'commentId':_0x182be1,'content':_0x2cc7f8,'attributes':_0xc0a7e5})['then'](()=>_0x499958['remove'](_0x2af258))['catch'](_0x2881f8=>{throw console['error'](_0x2881f8),new _0x875303('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x218d5a,commentId:_0xc7be25,isFromAdapter:_0x331dc4}){const _0x26602d=this['getCommentThread'](_0x218d5a),_0x4b1e7e=_0x26602d['getComment'](_0xc7be25);if(!_0x4b1e7e)throw new _0x875303('commentsrepository-remove-missing-comment',this);if(_0x26602d['_remove'](_0x4b1e7e),_0x331dc4||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5eecd4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x390e49}=_0x26602d,_0x42e94c=_0x5eecd4['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x390e49,'threadId':_0x218d5a,'commentId':_0xc7be25})['then'](()=>_0x5eecd4['remove'](_0x42e94c))['catch'](_0x255b4d=>{throw console['error'](_0x255b4d),new _0x875303('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x25c8c0(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4fd84f,_0x21c631){super();const _0x593b78=_0x21c631['isResolvable'];this['channelId']=_0x21c631['channelId'],this['id']=_0x21c631['id'],this['comments']=new _0x382eec(),this['_repository']=_0x4fd84f,this['_isAttached']=!0x1,this['_isSubmitted']=_0x21c631['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4fd84f,'_permissions',_0x4fd84f,'_readOnlyChannels',()=>_0x4fd84f['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4fd84f,'_permissions',()=>_0x4fd84f['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4fd84f,'_permissions',()=>{const _0x129bbf=_0x4fd84f['getPermissions'](this['channelId']);return _0x129bbf['write']||_0x129bbf['admin'];}),this['bind']('isResolvable')['to'](_0x4fd84f,'_permissions',()=>_0x593b78&&_0x4fd84f['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x21c631['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x307842,_0x3773b5)=>_0x307842?_0x3773b5?_0x307842<_0x3773b5?_0x307842:_0x3773b5:_0x307842:_0x3773b5),this['set']('unlinkedAt',_0x21c631['unlinkedAt']||null),this['set']('resolvedAt',_0x21c631['resolvedAt']||null),this['set']('resolvedBy',_0x21c631['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x55ebad=>!!_0x55ebad),this['set']('attributes',_0x21c631['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x30a7e9,_0x4a5c63)=>_0x30a7e9+_0x4a5c63['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x497f4c,id:_0x5b6dcd}=this;this['_repository']['fire'](ii('submitCommentThread',_0x497f4c),{'channelId':_0x497f4c,'threadId':_0x5b6dcd});}['setUnlinkedAt'](_0x4cbd6e){this['_update']({'unlinkedAt':_0x4cbd6e});}['resolve']({resolvedAt:_0x1842c3=new Date(),resolvedBy:_0x118c32='',isFromAdapter:_0x13347b=!0x1}={}){const _0x2d31fa=this['_repository']['context']['plugins']['get'](_0x249f32)['me'],{channelId:_0x7d8cea,id:_0x293457}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x7d8cea),{'channelId':_0x7d8cea,'threadId':_0x293457,'resolvedAt':_0x1842c3,'resolvedBy':_0x118c32||_0x2d31fa['id'],'isFromAdapter':_0x13347b});}['reopen']({isFromAdapter:_0xb81c1c=!0x1}={}){const {channelId:_0x1d738c,id:_0xf7c9b3}=this;this['_repository']['fire'](ii('reopenCommentThread',_0x1d738c),{'channelId':_0x1d738c,'threadId':_0xf7c9b3,'isFromAdapter':_0xb81c1c});}['setContext'](_0x184493){this['context']||this['_update']({'context':_0x184493});}['setAttribute'](_0x7bf02e,_0x13d922){const _0x5f691a=_0x23dbb3(this['attributes']);_0x5cc645(_0x5f691a,_0x7bf02e,_0x13d922),this['_update']({'attributes':_0x5f691a});}['removeAttribute'](_0x38b983){const _0x50ca54=_0x23dbb3(this['attributes']);_0x5c66ba(_0x50ca54,_0x38b983),this['_update']({'attributes':_0x50ca54});}['remove']({isFromAdapter:_0x8733c4=!0x1}={}){const {channelId:_0x1200e3,id:_0x45ee85}=this;this['_repository']['fire'](ii('removeCommentThread',_0x1200e3),{'channelId':_0x1200e3,'threadId':_0x45ee85,'isFromAdapter':_0x8733c4});}['attachTo'](_0x13c88d){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x13c88d});}['addComment'](_0x54c846){const {channelId:_0x1a29cf,id:_0xd359ab}=this;this['_repository']['fire'](ii('addComment',_0x1a29cf,_0xd359ab),Object['assign']({'channelId':_0x1a29cf,'threadId':_0xd359ab},_0x54c846));}['getComment'](_0x4cb810){if('string'!=typeof _0x4cb810)throw new _0x875303('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x4cb810});return this['comments']['get'](_0x4cb810);}['toJSON'](){return{'threadId':this['id'],'context':this['context'],'unlinkedAt':this['unlinkedAt'],'resolvedAt':this['resolvedAt'],'resolvedBy':this['resolvedBy']?this['resolvedBy']['id']:null,'archivedAt':this['archivedAt'],'comments':this['comments']['map'](_0x4231c7=>_0x4231c7['toJSON']()),'attributes':this['attributes']};}['_add'](_0x3175f5){return this['listenTo'](_0x3175f5,'change:authoredAt',()=>{const _0x53ad70=this['_findOptimalIndex'](_0x3175f5),_0x4bf25f=this['comments'];_0x53ad70-0x1!=_0x4bf25f['getIndex'](_0x3175f5)&&_0x53ad70+0x1!=_0x4bf25f['getIndex'](_0x3175f5)&&(this['_remove'](_0x3175f5),this['_add'](_0x3175f5));}),this['comments']['add'](_0x3175f5,this['_findOptimalIndex'](_0x3175f5));}['_update'](_0x14ec50){const {channelId:_0x577c81,id:_0x36b8d3}=this;this['_repository']['fire'](ii('updateCommentThread',_0x577c81),{..._0x14ec50,'channelId':_0x577c81,'threadId':_0x36b8d3});}['_remove'](_0x440110){return this['stopListening'](_0x440110),_0x440110['destroy'](),this['comments']['remove'](_0x440110);}['_findOptimalIndex'](_0x2d7538){const _0x4a921e=this['comments']['find'](_0x5e97e9=>new Date(_0x5e97e9['authoredAt'])['getTime']()>new Date(_0x2d7538['authoredAt'])['getTime']());return _0x4a921e?this['comments']['getIndex'](_0x4a921e):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x25c8c0(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x34f20c,_0x7c817e){super();const _0x5d1d17=_0x34f20c['context']['plugins']['get'](_0x249f32)['me'],_0xec7c02=_0x34f20c['getCommentThread'](_0x7c817e['threadId']),_0x1812f6=0x0===_0xec7c02['comments']['length'],_0x56625b=_0x5d1d17===_0x7c817e['author'];this['id']=_0x7c817e['id'],this['threadId']=_0x7c817e['threadId'],this['author']=_0x7c817e['author'],this['creator']=_0x7c817e['creator'],this['isExternal']=Boolean(_0x7c817e['attributes']&&_0x7c817e['attributes']['@external']),this['set']('content',_0x7c817e['content']),this['createdAt']=_0x7c817e['createdAt']||new Date(),this['set']('authoredAt',_0x7c817e['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xec7c02,'resolvedAt'),this['set']('attributes',_0x7c817e['attributes']||{}),this['bind']('isEditable')['to'](_0x34f20c,'_permissions',()=>{const _0x3fe291=_0x34f20c['getPermissions'](_0xec7c02['channelId'])['write'],_0x496f15=_0x34f20c['getPermissions'](_0xec7c02['channelId'])['modifyAll'];return _0x56625b&&_0x3fe291||!_0x56625b&&_0x496f15;}),this['bind']('isRemovable')['to'](_0xec7c02,'isRemovable',_0x34f20c,'_permissions',_0x5d9fcf=>{const _0x212944=_0x34f20c['getPermissions'](_0xec7c02['channelId'])['write'],_0x44f8d0=_0x34f20c['getPermissions'](_0xec7c02['channelId'])['modifyAll'];return _0x56625b&&_0x212944||_0x5d9fcf&&_0x1812f6||!_0x56625b&&_0x44f8d0&&!_0x1812f6;}),this['bind']('isReadOnly')['to'](_0xec7c02,'isReadOnly'),this['_repository']=_0x34f20c;}get['weight'](){return Math['max'](function(_0x60e747){const _0x127209=document['createElement']('div');return _0x127209['innerHTML']=_0x60e747,_0x127209['textContent']['length'];}(this['content']),0xc8);}['update'](_0xbdd28a){const {threadId:_0x4425c7,id:_0x1207cd}=this;if(!this['_repository']['hasCommentThread'](_0x4425c7))throw new _0x875303('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x44312a}=this['_repository']['getCommentThread'](_0x4425c7);this['_repository']['fire'](ii('updateComment',_0x44312a,_0x4425c7),{'channelId':_0x44312a,'threadId':_0x4425c7,'commentId':_0x1207cd,..._0xbdd28a});}['setAttribute'](_0x3be531,_0xb9cf7){const _0x39ab16=_0x23dbb3(this['attributes']);_0x5cc645(_0x39ab16,_0x3be531,_0xb9cf7),this['update']({'attributes':_0x39ab16});}['removeAttribute'](_0x3d2218){const _0xc50120=_0x23dbb3(this['attributes']);_0x5c66ba(_0xc50120,_0x3d2218),this['update']({'attributes':_0xc50120});}['remove'](_0x363632={}){if(!_0x363632['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xef2a81,id:_0xbbeb7f}=this;if(!this['_repository']['hasCommentThread'](_0xef2a81))throw new _0x875303('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x55f498}=this['_repository']['getCommentThread'](_0xef2a81);this['_repository']['fire'](ii('removeComment',_0x55f498,_0xef2a81),{'channelId':_0x55f498,'threadId':_0xef2a81,'commentId':_0xbbeb7f,..._0x363632});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x1eaaa5,..._0xd38ccf){for(const _0x329dd3 of _0xd38ccf)void 0x0!==_0x329dd3&&(_0x1eaaa5+=':'+String(_0x329dd3));return _0x1eaaa5;}class ei extends _0x827b78{constructor(_0x1aaa71){super(_0x1aaa71),this['set']('hasContent',!0x1);}['refresh'](){const _0x4b1d80=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4fc14f of _0x4b1d80['getRanges']())if(this['_hasContent'](_0x4fc14f))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x5b4b23=_0x396982(),ranges:_0x3216dd,comment:_0x3c99de}={}){const _0x3e69fc=this['editor']['model'],_0x26205a=_0x3216dd??Array['from'](_0x3e69fc['document']['selection']['getRanges']()),_0x2710d4=[];for(const _0x227e19 of _0x26205a)this['_hasContent'](_0x227e19)&&_0x2710d4['push'](this['_trimToContent'](_0x227e19));if(!_0x2710d4['length'])throw new _0x875303('addcommentthreadcommand-incorrect-ranges',null);_0x3c99de&&this['_createCommentThread'](_0x5b4b23,_0x3c99de),this['_createMarkersFromRanges'](_0x5b4b23,_0x2710d4,!!_0x3c99de);}['_createMarkersFromRanges'](_0x5436a7,_0x417fdb,_0x1f8797){this['editor']['model']['change'](_0x26e128=>{for(const _0x3420f0 of _0x417fdb){const _0x19fee1=_0x396982()['substr'](0x1,0x5),_0x29069e='comment:'+_0x5436a7+':'+_0x19fee1;_0x26e128['addMarker'](_0x29069e,{'range':_0x3420f0,'usingOperation':_0x1f8797,'affectsData':_0x1f8797});}});}['_createCommentThread'](_0x549e3c,_0x3b21a0){const _0x2a459d=this['editor']['plugins']['get']('CommentsRepository'),_0x17bf3a=this['editor']['config']['get']('collaboration.channelId'),_0x352975=this['editor']['plugins']['get']('Users')['me'];if(!_0x352975)throw new _0x875303('addcommentthreadcommand-user-not-found',null);_0x2a459d['addCommentThread']({'threadId':_0x549e3c,'channelId':_0x17bf3a,'comments':[{'authorId':_0x352975['id'],'content':_0x3b21a0,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x2b97a1){for(const _0x357f1c of _0x2b97a1['getItems']())if(this['_itemIsContent'](_0x357f1c))return!0x0;return!0x1;}['_itemIsContent'](_0x177c5a){return _0x177c5a['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x177c5a)&&!_0x177c5a['is']('element','tableCell');}['_trimToContent'](_0xc0cbe1){const _0x1570af=_0x4804c7=>!this['_itemIsContent'](_0x4804c7['item']),_0x216083=_0xc0cbe1['start']['getLastMatchingPosition'](_0x1570af),_0x2238a7=_0xc0cbe1['end']['getLastMatchingPosition'](_0x1570af,{'direction':'backward'});return this['editor']['model']['createRange'](_0x216083,_0x2238a7);}}class si extends _0x357641{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f245d){super(_0x5f245d),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2ab5e8=this['editor'],_0x3a44bb=_0x2ab5e8['model']['document']['selection'],_0xd9b268=_0x4664ac(()=>this['refreshSelectedViews'](),0xa);_0x3a44bb['on']('change:range',(_0x31d0db,_0x24e761)=>{_0x24e761['directChange']&&(_0xd9b268['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2ab5e8['editing']['view']['document'],'change:isFocused',(_0x5b0c95,_0x3cf710,_0x28c2bb)=>{_0x28c2bb&&_0xd9b268();}),this['listenTo'](_0x2ab5e8['ui']['focusTracker'],'change:isFocused',(_0x133052,_0x45daf6,_0x5e6fb9)=>{_0x5e6fb9||this['fire']('blur',{'isAnnotationTracked':_0x32b323=>this['_editorAnnotationsData']['has'](_0x32b323['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x24b72b){if(this['_editorAnnotations']['has'](_0x24b72b['view']))return;this['_editorAnnotations']['add'](_0x24b72b['view']),this['editor']['ui']['focusTracker']['add'](_0x24b72b['view']['element']);const _0x105ca0=this['editor']['plugins']['get']($t);this['listenTo'](_0x105ca0['collection'],'remove',(_0x2e1ae4,_0x740d8c)=>{this['editor']['ui']['focusTracker']['remove'](_0x740d8c['view']['element']),this['_editorAnnotations']['delete'](_0x740d8c['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2ae52e){if('function'!=typeof _0x2ae52e)throw new _0x875303('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2ae52e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x223f94,annotations:_0x17cc2d}){const _0x42588e=[],_0x3ef91e=this['editor']['model']['document']['selection'],_0x18e1b8=Array['from'](_0x3ef91e['getRanges']());for(const [_0x5a1bc9,_0x366844]of this['_editorAnnotationsData']){const _0x2ca4fa=_0x75820(_0x366844),_0x417838=_0x17cc2d['getByInnerView'](_0x5a1bc9);_0x2ca4fa&&_0x417838&&_0x42588e['push']({'annotation':_0x417838,'range':_0x2ca4fa});}function _0x75820(_0x1bcb6e){for(const _0x34f7bb of _0x1bcb6e)for(const _0x51a4d4 of _0x18e1b8)if(_0x34f7bb['containsRange'](_0x51a4d4,!_0x3ef91e['isCollapsed']))return _0x34f7bb;return null;}return _0x42588e['sort']((_0x2fe88d,_0x4634b7)=>{const _0xf44f49=_0x2fe88d['range'],_0xb59ed0=_0x4634b7['range'];if(!_0xf44f49['isEqual'](_0xb59ed0)){if(_0xf44f49['containsRange'](_0xb59ed0,!0x0))return 0x1;if(_0xb59ed0['containsRange'](_0xf44f49,!0x0))return-0x1;}return _0x2fe88d['annotation']==_0x223f94?-0x1:_0x4634b7['annotation']==_0x223f94?0x1:0x0;})['map'](_0x4c4af3=>_0x4c4af3['annotation']);}get['_editorAnnotationsData'](){const _0x4d427f=new Map();for(const _0x11602d of Array['from'](this['_dataCollectors']))for(const [_0x26b2be,_0xd1c016]of _0x11602d())_0x4d427f['set'](_0x26b2be,_0xd1c016);return _0x4d427f;}}class ni extends _0x357641{['afterInit'](){const _0x585295=this['editor'];if(!_0x585295['plugins']['has']('RestrictedEditingModeEditing'))return;_0x585295['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x357641{constructor(_0x23b8e0){super(_0x23b8e0),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x26e43f=this['editor'],_0x332059=_0x26e43f['commands']['get']('importWord'),_0x5471cc=_0x26e43f['plugins']['get'](_0x249f32);_0x332059&&(_0x332059['on']('execute',(_0x11df4c,[,_0x32ac18])=>{_0x32ac18['collaboration_features']={'comments':!0x0,'user_id':_0x5471cc['me']['id']};},{'priority':_0x34bacf['high']+0xa}),this['listenTo'](_0x332059,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x354ef1,_0x1b050c){const {comment_threads:_0x374c79}=_0x1b050c;_0x374c79&&_0x374c79['forEach'](({thread_id:_0x3718aa,comments:_0xe54da4,is_resolved:_0x9c40e})=>{const _0x1d8c7f=new Date(),_0x2a13bc=_0xe54da4['map'](({author:_0x50ff21,content:_0x4645c3,created_at:_0x58c10a})=>({'content':_0x4645c3,'authorId':this['editor']['plugins']['get'](_0x249f32)['me']['id'],'createdAt':_0x1d8c7f,'attributes':{'@external':{'authorName':_0x50ff21,'createdAt':_0x58c10a?new Date(_0x58c10a):new Date(),'source':'importWord'}}})),_0x4e9490=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x4e9490,'threadId':_0x3718aa,'comments':_0x2a13bc,'resolvedAt':_0x9c40e?_0x1d8c7f:null});});}}class ri extends _0x357641{constructor(_0x3d61f6){super(_0x3d61f6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x1dd5e9=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1dd5e9,'contentInsertion',(_0x117bd1,_0x3ea44f)=>this['_removeMarkersWithoutThreads'](_0x3ea44f['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1ad9b1){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1ad9b1;const _0x1905ac=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5bf9c4 of _0x1ad9b1['keys']()){const [_0x6b162,_0x21ec93]=_0x5bf9c4['split'](':');'comment'!=_0x6b162||_0x1905ac['hasCommentThread'](_0x21ec93)||_0x1ad9b1['delete'](_0x5bf9c4);}return _0x1ad9b1;}['_registerMarkerInClipboardPipeline'](){const _0x9ade43=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x40b7b5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x40b7b5&&_0x9ade43['_registerMarkerToCopy']('comment',_0x40b7b5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4363d3){switch(_0x4363d3){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x11b66b){const _0x4aacb4=_0x11b66b['split'](':');return{'group':_0x4aacb4[0x0],'id':_0x4aacb4[0x1],'part':_0x4aacb4[0x2]};}class ai extends _0x357641{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x15bb39,_0x3db9be)=>{if(!_0x3db9be['options']['showCommentHighlights'])return null;if(_0x3db9be['options']['ignoreResolvedComments']){const {id:_0x421908}=hi(_0x15bb39['markerName']),_0x65e91f=this['editor']['plugins']['get'](Qt);if(_0x65e91f['getCommentThread'](_0x421908)?.['isResolved']&&_0x15bb39['item'])return _0x3db9be['consumable']['consume'](_0x15bb39['item'],'addMarker:'+_0x15bb39['markerName']),_0x3db9be['consumable']['consume'](_0x15bb39['item'],'removeMarker:'+_0x15bb39['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x485160=>{_0x485160['on']('addMarker:comment',(_0x4f01dd,_0xa1c9e7,_0x60d9a6)=>{if(!_0x60d9a6['options']['showCommentHighlights'])return;const _0x1a10c8=_0xa1c9e7['item'];if(!_0x1a10c8)return;const _0x6c8d9b=_0x60d9a6['mapper']['toViewElement'](_0x1a10c8);this['editor']['model']['schema']['isObject'](_0x1a10c8)&&_0x6c8d9b&&!_0x6c8d9b['getCustomProperty']('widget')&&_0x6c8d9b['is']('containerElement')&&Ct(_0x6c8d9b,_0x60d9a6['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1e536a,{writer:_0x4fa681,options:_0x1b31e6})=>{if(!_0x1b31e6['showCommentHighlights'])return null;const _0x448b7a=_0x4fa681['createContainerElement']('div'),_0x2e1436=_0x4fa681['createEmptyElement']('hr');return _0x4fa681['addClass']('ck-horizontal-line',_0x448b7a),_0x4fa681['insert'](_0x4fa681['createPositionAt'](_0x448b7a,0x0),_0x2e1436),_0x448b7a;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x52da78,{writer:_0xd88594,options:_0x271938})=>{if(!_0x271938['showCommentHighlights'])return null;const _0x470ce0=_0xd88594['createContainerElement']('span'),_0x420000=_0xd88594['createEmptyElement']('img');return _0xd88594['addClass']('image-inline',_0x470ce0),_0xd88594['insert'](_0xd88594['createPositionAt'](_0x470ce0,0x0),_0x420000),_0x470ce0;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x104f01,{writer:_0x3e16c9,options:_0x3b997b})=>{if(_0x3b997b['showCommentHighlights'])return _0x3e16c9['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xb19fd6,_0xc812b9,_0x5eb0be)=>{_0x5eb0be['options']['showCommentHighlights']&&_0xb19fd6['stop']();},{'priority':'high'});}}class ci extends _0x357641{static get['requires'](){return[Qt,si,_0x249f32,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ffb77){super(_0x3ffb77),this['set']('isThreadsLoadingPaused',!0x0),_0x3ffb77['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x250425,_0x327246,_0x1e3c86,_0x14256f)=>{const _0x383518=_0x3ffb77['plugins']['get'](Qt),_0x4aea5d=_0x1e3c86?hi(_0x1e3c86)['id']:null;_0x3ffb77['model']['change'](()=>{if(_0x4aea5d){const _0x551026=this['getAllMarkersForId'](_0x4aea5d);for(const _0x2a76c8 of _0x551026)_0x3ffb77['editing']['reconvertMarker'](_0x2a76c8);}if(_0x14256f){const {id:_0x5c1d47}=hi(_0x14256f),_0x8f0b81=_0x383518['getCommentThread'](_0x5c1d47);if(_0x8f0b81&&_0x8f0b81['unlinkedAt'])return;if(_0x8f0b81&&!_0x8f0b81['isAttached'])return;const _0x3c466c=this['getAllMarkersForId'](_0x5c1d47);for(const _0x5cb471 of _0x3c466c)_0x3ffb77['editing']['reconvertMarker'](_0x5cb471);}}),_0x4aea5d&&this['scrollToThreadMarker'](_0x4aea5d);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2f6701=this['editor'],_0x2624fa=_0x2f6701['plugins']['get'](Qt),_0x1267c2=_0x2f6701['config']['get']('collaboration.channelId'),_0x5c0df3=_0x2624fa['getCommentThreads']()['filter'](_0xd8c274=>_0xd8c274['channelId']!==_0x1267c2);_0x2f6701['commands']['add']('addCommentThread',new ei(_0x2f6701)),this['listenTo'](_0x2f6701,'change:isReadOnly',(_0x43b924,_0x3eb171,_0x33c4a5)=>{_0x2624fa['switchReadOnly'](_0x33c4a5,_0x2f6701['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2624fa,di('addCommentThread',_0x1267c2),(_0x5db739,{threadId:_0xc7f7d1})=>{const _0x591400=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0xc7f7d1);_0x591400?.['unlinkedAt']&&this['_attachArchivedThread'](_0xc7f7d1);}),this['listenTo'](_0x2624fa,di('removeCommentThread',_0x1267c2),(_0x4d867b,{threadId:_0x1c818b})=>{_0x2f6701['model']['enqueueChange']({'isUndoable':!0x1},_0x382f20=>{const _0x1ffd3d=this['getAllMarkersForId'](_0x1c818b);for(const _0x37d396 of _0x1ffd3d)_0x382f20['removeMarker'](_0x37d396);});}),this['listenTo'](_0x2624fa,di('resolveCommentThread',_0x1267c2),(_0x2e2afe,{threadId:_0x18d0a0})=>{(this['_reconvertMarkers'](_0x18d0a0),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x18d0a0)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2624fa,di('reopenCommentThread',_0x1267c2),(_0x1dee76,{threadId:_0x278b58})=>{this['_reconvertMarkers'](_0x278b58);},{'priority':'low'}),this['listenTo'](_0x2624fa,di('addComment',_0x1267c2),(_0x460c25,{threadId:_0x3d1efd,isFromAdapter:_0xf000fd})=>{const _0xa33b2c=this['getAllMarkersForId'](_0x3d1efd);if(_0xf000fd||0x0==_0xa33b2c['length']||!_0x2624fa['hasCommentThread'](_0x3d1efd))return;0x1===_0x2624fa['getCommentThread'](_0x3d1efd)['length']&&_0x2f6701['model']['enqueueChange']({'isUndoable':!0x1},_0x465b1e=>{for(const _0x59dbd8 of _0xa33b2c)_0x465b1e['updateMarker'](_0x59dbd8,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5c0df3);}['afterInit'](){!async function(_0x50347c){const _0x3ef63f=_0x11ea49([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x3f44a8=0x73460ab3,_0x11279d=0x73418e53^_0x3f44a8,_0x3bbbf4=window[_0x11ea49([0x44,0x61,0x74,0x65])][_0x11ea49([0x6e,0x6f,0x77])](),_0x52b0cb=_0x50347c[_0x11ea49([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2968b6=new window[(_0x11ea49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f103e=>{_0x52b0cb[_0x11ea49([0x6f,0x6e,0x63,0x65])](_0x11ea49([0x72,0x65,0x61,0x64,0x79]),_0x2f103e);}),_0x4a20c3={[_0x11ea49([0x6b,0x74,0x79])]:_0x11ea49([0x45,0x43]),[_0x11ea49([0x75,0x73,0x65])]:_0x11ea49([0x73,0x69,0x67]),[_0x11ea49([0x63,0x72,0x76])]:_0x11ea49([0x50,0x2d,0x32,0x35,0x36]),[_0x11ea49([0x78])]:_0x11ea49([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x11ea49([0x79])]:_0x11ea49([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x11ea49([0x61,0x6c,0x67])]:_0x11ea49([0x45,0x53,0x32,0x35,0x36])},_0x284de0=_0x52b0cb[_0x11ea49([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x11ea49([0x67,0x65,0x74])](_0x11ea49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2ade03(){let _0x7f5e53,_0x5fee80=null,_0x3eac56=null;try{if(_0x284de0==_0x11ea49([0x47,0x50,0x4c]))return _0x11ea49([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x7f5e53=_0x39f53d(),!_0x7f5e53)return _0x11ea49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x7f5e53[_0x11ea49([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3eac56=_0x4c65aa(_0x7f5e53[_0x11ea49([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x7f5e53[_0x11ea49([0x6a,0x74,0x69])])),await _0x566f6c()?_0x2e3fdb()?_0x8ee96f()?_0x11ea49([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x253c18()?(_0x7f5e53[_0x11ea49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x11ea49([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5fee80=_0x335fc1(_0x11ea49([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3e3958()):_0x11ea49([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x11ea49([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x11ea49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x11ea49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x8ee96f(){const _0x145246=[_0x11ea49([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x11ea49([0x74,0x72,0x69,0x61,0x6c])][_0x11ea49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7f5e53[_0x11ea49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3bbbf4/0x3e8:0xe10*_0x11279d;return _0x7f5e53[_0x11ea49([0x65,0x78,0x70])]<_0x145246;}function _0x2e3fdb(){const _0x441846=_0x7f5e53[_0x11ea49([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x441846)return!0x1;if(_0x441846[_0x11ea49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11ea49([0x2a])))return!0x0;if(_0x441846[_0x11ea49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11ea49([0x43,0x4d,0x54])))return!0x0;if(_0x441846[_0x11ea49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11ea49([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x5d12b7())return!0x0;if(_0x441846[_0x11ea49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11ea49([0x52,0x43,0x4d,0x54]))){if(_0x454eeb())return!0x0;if(_0x15cf29()||_0xfa2bc5())return!0x0;}return!0x1;}function _0x253c18(){const _0x489697=_0x7f5e53[_0x11ea49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x489697||0x0==_0x489697[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x13a9c1}=new URL(window[_0x11ea49([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x489697[_0x11ea49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13a9c1))return!0x0;const _0x5575ad=_0x13a9c1[_0x11ea49([0x73,0x70,0x6c,0x69,0x74])](_0x11ea49([0x2e]));return _0x489697[_0x11ea49([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2c57ec=>_0x2c57ec[_0x11ea49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11ea49([0x2a])))[_0x11ea49([0x6d,0x61,0x70])](_0x30241f=>_0x30241f[_0x11ea49([0x73,0x70,0x6c,0x69,0x74])](_0x11ea49([0x2e])))[_0x11ea49([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xfbe1db=>_0xfbe1db[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5575ad[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x11ea49([0x6d,0x61,0x70])](_0x34e728=>Array(_0x5575ad[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x34e728[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x11ea49([0x66,0x69,0x6c,0x6c])](_0x34e728[0x0]===_0x11ea49([0x2a])?_0x11ea49([0x2a]):'')[_0x11ea49([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x34e728))[_0x11ea49([0x73,0x6f,0x6d,0x65])](_0x159756=>_0x5575ad[_0x11ea49([0x65,0x76,0x65,0x72,0x79])]((_0x44a69c,_0x287d85)=>_0x159756[_0x287d85]===_0x44a69c||_0x159756[_0x287d85]===_0x11ea49([0x2a])));}function _0x3e3958(){return _0x5fee80&&_0x3eac56?new window[(_0x11ea49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x382401,_0x246567)=>{_0x5fee80[_0x11ea49([0x74,0x68,0x65,0x6e])](_0x382401,_0x246567),_0x3eac56[_0x11ea49([0x74,0x68,0x65,0x6e])](_0x22aeed=>{_0x22aeed!=_0x11ea49([0x56,0x61,0x6c,0x69,0x64])&&_0x382401(_0x22aeed);},_0x246567);}):_0x5fee80||_0x3eac56||_0x11ea49([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4c65aa(_0x465006,_0x19c6b0){return new window[(_0x11ea49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3bb59a=>{if(_0x2c166f())return _0x3bb59a(_0x11ea49([0x56,0x61,0x6c,0x69,0x64]));_0x4798f2(),_0x52b0cb[_0x11ea49([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x11ea49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x284e25=!0x1;const _0x1d1017=_0x396982();function _0x31d1a0(_0x5d127c){return!!_0x5d127c&&(typeof _0x5d127c===_0x11ea49([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5d127c===_0x11ea49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5d127c[_0x11ea49([0x74,0x68,0x65,0x6e])]===_0x11ea49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5d127c[_0x11ea49([0x63,0x61,0x74,0x63,0x68])]===_0x11ea49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x17ad20(_0x435da9){_0x6ddb1(_0x435da9)[_0x11ea49([0x74,0x68,0x65,0x6e])](_0x43fdd8=>{if(!_0x43fdd8||_0x43fdd8[_0x11ea49([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x11ea49([0x6f,0x6b]))return _0x11ea49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x214f63(_0x24d611(_0x1d1017+_0x19c6b0))!=_0x43fdd8[_0x11ea49([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x11ea49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x11ea49([0x56,0x61,0x6c,0x69,0x64]);})[_0x11ea49([0x74,0x68,0x65,0x6e])](_0x1569e9=>(_0xf41882(),_0x1569e9),()=>{const _0x1f9667=_0x9a1c72();return null==_0x1f9667?(_0xf41882(),_0x11ea49([0x56,0x61,0x6c,0x69,0x64])):_0x11ea49(_0x3bbbf4-_0x1f9667>(0x574a8eb3^_0x3f44a8)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x11ea49([0x74,0x68,0x65,0x6e])](_0x3bb59a)[_0x11ea49([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3bb59a(_0x11ea49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x41cabe=0x7370e433^_0x3f44a8;function _0xf41882(){const _0x3c8301=_0x11ea49([0x6c,0x6c,0x63,0x74,0x2d])+_0x214f63(_0x24d611(_0x465006)),_0x36d07e=_0x1993ff(_0x214f63(window[_0x11ea49([0x4d,0x61,0x74,0x68])][_0x11ea49([0x63,0x65,0x69,0x6c])](_0x3bbbf4/_0x41cabe)));window[_0x11ea49([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x11ea49([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3c8301,_0x36d07e);}function _0x9a1c72(){const _0x369ef3=_0x11ea49([0x6c,0x6c,0x63,0x74,0x2d])+_0x214f63(_0x24d611(_0x465006)),_0x2f2ae0=window[_0x11ea49([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x11ea49([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x369ef3);return _0x2f2ae0?window[_0x11ea49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1993ff(_0x2f2ae0),0x10)*_0x41cabe:null;}function _0x6ddb1(_0x9ebcd4){return new window[(_0x11ea49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1b6452,_0x305769)=>{_0x9ebcd4[_0x11ea49([0x74,0x68,0x65,0x6e])](_0x1b6452,_0x305769),window[_0x11ea49([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x305769,0x7347de73^_0x3f44a8);});}}_0x52b0cb[_0x11ea49([0x6f,0x6e])](_0x11ea49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x576445,_0x3a1aca)=>{if(_0x3a1aca[0x0]!=_0x465006)return _0x3bb59a(_0x11ea49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3a1aca[0x1]={..._0x3a1aca[0x1],[_0x11ea49([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1d1017};},{[_0x11ea49([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x11ea49([0x68,0x69,0x67,0x68])}),_0x52b0cb[_0x11ea49([0x6f,0x6e])](_0x11ea49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x110e7d=>{_0x31d1a0(_0x110e7d[_0x11ea49([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x284e25=!0x0,_0x17ad20(_0x110e7d[_0x11ea49([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x11ea49([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x11ea49([0x6c,0x6f,0x77])}),_0x2968b6[_0x11ea49([0x74,0x68,0x65,0x6e])](()=>{_0x284e25||_0x3bb59a(_0x11ea49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2c166f(){return _0x52b0cb[_0x11ea49([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x11ea49([0x76,0x69,0x65,0x77])][_0x11ea49([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x11ea49([0x61,0x75,0x74,0x6f]);}function _0x4798f2(){_0x52b0cb[_0x11ea49([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x11ea49([0x76,0x69,0x65,0x77])][_0x11ea49([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x11ea49([0x61,0x75,0x74,0x6f]);}}function _0x335fc1(_0x26186e){const _0x4ed510=[new window[(_0x11ea49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25c601=>setTimeout(_0x25c601,0x734f347f^_0x3f44a8)),_0x2968b6[_0x11ea49([0x74,0x68,0x65,0x6e])](()=>new window[(_0x11ea49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3823b9=>{let _0xaeb07c=0x0;_0x52b0cb[_0x11ea49([0x6d,0x6f,0x64,0x65,0x6c])][_0x11ea49([0x6f,0x6e])](_0x11ea49([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3a094b,_0x43d14a)=>{_0x43d14a[0x0][_0x11ea49([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xaeb07c++,_0xaeb07c==(0x73460f5b^_0x3f44a8)&&(_0x3823b9(),_0x3a094b[_0x11ea49([0x6f,0x66,0x66])]());});}))];return window[_0x11ea49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x11ea49([0x72,0x61,0x63,0x65])](_0x4ed510)[_0x11ea49([0x74,0x68,0x65,0x6e])](()=>_0x26186e);}async function _0xcd5562(){await _0x2968b6,_0x52b0cb[_0x11ea49([0x6d,0x6f,0x64,0x65,0x6c])][_0x11ea49([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x45315a,_0x52b0cb[_0x11ea49([0x6d,0x6f,0x64,0x65,0x6c])][_0x11ea49([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x45315a,_0x52b0cb[_0x11ea49([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x11ea49([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5d12b7(){return window[_0x11ea49([0x67,0x6c,0x6f,0x62])]&&window[_0x11ea49([0x67,0x6c,0x6f,0x62])][_0x11ea49([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x454eeb(){return _0x9baf63(_0x11ea49([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x47fefc(_0x11ea49([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x11ea49([0x73,0x74,0x61,0x74,0x65])]==_0x11ea49([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x15cf29(){return _0x9baf63(_0x11ea49([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0xfa2bc5(){return _0x9baf63(_0x11ea49([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3649c5(_0x32884e){const _0x273382=_0x4df346();_0x52b0cb[_0x273382]=_0x11ea49([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x32884e,_0x32884e!=_0x11ea49([0x56,0x61,0x6c,0x69,0x64])&&_0xcd5562();}function _0x4df346(){const _0x1c82d8=window[_0x11ea49([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x11ea49([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x11ea49([0x6e,0x6f,0x77])]())[_0x11ea49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x11ea49([0x2e]),'');let _0x38d0f5=_0x11ea49([0x4b]);for(let _0x93d7de=0x0;_0x93d7de<_0x1c82d8[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x93d7de+=0x2){let _0x4be3ae=window[_0x11ea49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c82d8[_0x11ea49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x93d7de,_0x93d7de+0x2));_0x4be3ae>=_0x3ef63f[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4be3ae-=_0x3ef63f[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x38d0f5+=_0x3ef63f[_0x4be3ae];}return _0x38d0f5;}function _0x39f53d(){const _0x11f1d0=_0x284de0[_0x11ea49([0x73,0x70,0x6c,0x69,0x74])](_0x11ea49([0x2e]));if(0x3!=_0x11f1d0[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3898d0(_0x11f1d0[0x1]);function _0x3898d0(_0x4b3376){const _0x158dd1=_0x2be37b(_0x4b3376);return _0x158dd1&&_0x32d1e1()?_0x158dd1:null;function _0x32d1e1(){const _0x4d79be=_0x158dd1[_0x11ea49([0x6a,0x74,0x69])],_0x2a3378=window[_0x11ea49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4d79be[_0x11ea49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4d79be[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x284ef7={..._0x158dd1,[_0x11ea49([0x6a,0x74,0x69])]:_0x4d79be[_0x11ea49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4d79be[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x284ef7[_0x11ea49([0x76,0x63])],_0x24d611(_0x284ef7)==_0x2a3378;}}}async function _0x566f6c(){let _0x107b75=!0x0;try{const _0x117a19=_0x284de0[_0x11ea49([0x73,0x70,0x6c,0x69,0x74])](_0x11ea49([0x2e])),[_0x3b621a,_0x261c1e,_0x59466c]=_0x117a19;return _0x283c89(_0x3b621a),await _0x5b2515(_0x3b621a,_0x261c1e,_0x59466c),_0x107b75;}catch{return!0x1;}function _0x283c89(_0x473345){const _0x2d782c=_0x2be37b(_0x473345);_0x2d782c&&_0x2d782c[_0x11ea49([0x61,0x6c,0x67])]==_0x11ea49([0x45,0x53,0x32,0x35,0x36])||(_0x107b75=!0x1);}async function _0x5b2515(_0xa03e31,_0x1fab1b,_0x35a3b3){const _0x1fc242=window[_0x11ea49([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x11ea49([0x66,0x72,0x6f,0x6d])](_0x3497f5(_0x35a3b3),_0x42cb61=>_0x42cb61[_0x11ea49([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x36c374=new window[(_0x11ea49([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x11ea49([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xa03e31+_0x11ea49([0x2e])+_0x1fab1b),_0x5928c4=window[_0x11ea49([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x11ea49([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5928c4)return;const _0x4d3d9d=await _0x5928c4[_0x11ea49([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x11ea49([0x6a,0x77,0x6b]),_0x4a20c3,{[_0x11ea49([0x6e,0x61,0x6d,0x65])]:_0x11ea49([0x45,0x43,0x44,0x53,0x41]),[_0x11ea49([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x11ea49([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x11ea49([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5928c4[_0x11ea49([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x11ea49([0x6e,0x61,0x6d,0x65])]:_0x11ea49([0x45,0x43,0x44,0x53,0x41]),[_0x11ea49([0x68,0x61,0x73,0x68])]:{[_0x11ea49([0x6e,0x61,0x6d,0x65])]:_0x11ea49([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4d3d9d,_0x1fc242,_0x36c374)||(_0x107b75=!0x1);}}function _0x2be37b(_0x1e481e){return _0x1e481e[_0x11ea49([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x11ea49([0x65,0x79]))?JSON[_0x11ea49([0x70,0x61,0x72,0x73,0x65])](_0x3497f5(_0x1e481e)):null;}function _0x3497f5(_0x5bd177){return window[_0x11ea49([0x61,0x74,0x6f,0x62])](_0x5bd177[_0x11ea49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x11ea49([0x2b]))[_0x11ea49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x11ea49([0x2f])));}function _0x24d611(_0x48ad9e){let _0x24f985=0x1505;function _0x1cf0dc(_0x53206d){for(let _0x5819e7=0x0;_0x5819e7<_0x53206d[_0x11ea49([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5819e7++){const _0x189486=_0x53206d[_0x11ea49([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5819e7);_0x24f985=(_0x24f985<<0x5)+_0x24f985+_0x189486,_0x24f985&=_0x24f985;}}function _0x4b9826(_0x4d1d69){Array[_0x11ea49([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4d1d69)?_0x4d1d69[_0x11ea49([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4b9826):_0x4d1d69&&typeof _0x4d1d69==_0x11ea49([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x11ea49([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4d1d69)[_0x11ea49([0x73,0x6f,0x72,0x74])]()[_0x11ea49([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5812c5,_0x10fcb5])=>{_0x1cf0dc(_0x5812c5),_0x4b9826(_0x10fcb5);}):_0x1cf0dc(window[_0x11ea49([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4d1d69));}return _0x4b9826(_0x48ad9e),_0x24f985>>>0x0;}function _0x214f63(_0x3ce834){return _0x3ce834[_0x11ea49([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x11ea49([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x11ea49([0x30]));}function _0x1993ff(_0x14e4e1){return _0x14e4e1[_0x11ea49([0x73,0x70,0x6c,0x69,0x74])]('')[_0x11ea49([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x11ea49([0x6a,0x6f,0x69,0x6e])]('');}function _0x9baf63(_0x4c71e7){return _0x52b0cb[_0x11ea49([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x11ea49([0x68,0x61,0x73])](_0x4c71e7);}function _0x47fefc(_0x20d027){return _0x52b0cb[_0x11ea49([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x11ea49([0x67,0x65,0x74])](_0x20d027);}function _0x45315a(){}function _0x11ea49(_0x34e3dc){return _0x34e3dc['map'](_0x55ecc0=>String['fromCharCode'](_0x55ecc0))['join']('');}_0x3649c5(await _0x2ade03());}(this);}['destroy'](){const _0x28e643=this['editor']['plugins']['get'](Qt),_0x4fb644=this['editor']['config']['get']('collaboration.channelId');for(const _0x5f13b0 of _0x28e643['getCommentThreads']({'channelId':_0x4fb644}))_0x28e643['_detachCommentThread'](_0x5f13b0['id']),_0x28e643['_threads']['delete'](_0x5f13b0['id']);super['destroy']();}['hasMarkerForId'](_0x4ffccf){return this['getAllMarkersForId'](_0x4ffccf)['length']>0x0;}['getAllMarkersForId'](_0x14f2e2){const _0x3c5c13=[];for(const _0x1b93d8 of this['editor']['model']['markers'])_0x1b93d8['name']['startsWith']('comment:'+_0x14f2e2)&&_0x3c5c13['push'](_0x1b93d8);return _0x3c5c13;}['scrollToThreadMarker'](_0x3f7200){setTimeout(()=>{const _0x5ec7e0=this['_getTargetForId'](_0x3f7200);if(!_0x5ec7e0)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x3f7200&&_0x56a2b5({'target':_0x5ec7e0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x27ec95){this['editor']['model']['change'](()=>{for(const _0x2857c6 of this['getAllMarkersForId'](_0x27ec95))this['editor']['editing']['reconvertMarker'](_0x2857c6);});}['_attachArchivedThread'](_0x32c253){const _0x28b72b=this['editor']['plugins']['get'](Qt),_0x26e84a=this['editor']['plugins']['get'](si),_0x11e722=_0x28b72b['getCommentThread'](_0x32c253);if(!_0x11e722['isAttached']){const _0x54920d=_0x11e722['attachTo'](()=>this['_getTargetForId'](_0x11e722['id']));_0x26e84a['registerAnnotation'](_0x54920d),_0x11e722['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x556878=this['editor'],_0x536cae=_0x556878['plugins']['get'](_0x249f32);_0x556878['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x47dc16,_0x555f9c)=>{const {id:_0x1de1f6}=hi(_0x47dc16['markerName']),_0x572dc7=_0x556878['plugins']['get'](Qt)['getCommentThread'](_0x1de1f6),_0x5745b5=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x1de1f6;let _0x4707fd;if(_0x572dc7&&_0x572dc7['isResolved']&&!_0x5745b5&&_0x47dc16['item'])return _0x555f9c['consumable']['consume'](_0x47dc16['item'],'addMarker:'+_0x47dc16['markerName']),_0x555f9c['consumable']['consume'](_0x47dc16['item'],'removeMarker:'+_0x47dc16['markerName']),null;const _0x3b4ad1=['ck-comment-marker'];return _0x5745b5&&_0x3b4ad1['push']('ck-comment-marker--active'),_0x4707fd=_0x572dc7?.['length']?_0x572dc7['comments']['first']['author']['id']:_0x536cae['me']['id'],{'classes':_0x3b4ad1,'attributes':{'data-comment':_0x1de1f6,'data-author-id':_0x4707fd}};}}),_0x556878['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2f4b82,{options:_0x84101e})=>{if(_0x84101e['showCommentHighlights'])return null;const _0x33ab50=_0x556878['plugins']['get'](Qt),_0x87570d=_0x556878['model']['markers']['get'](_0x2f4b82),{id:_0x333f19,part:_0x198ace}=hi(_0x2f4b82);return _0x87570d&&!_0x87570d['affectsData']||_0x84101e['ignoreResolvedComments']&&_0x33ab50['getCommentThread'](_0x333f19)?.['isResolved']?null:{'group':'comment','name':_0x198ace?_0x333f19+':'+_0x198ace:_0x333f19};}}),_0x556878['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x387f43,{writer:_0x1a44d2})=>_0x1a44d2['createElement']('$marker',{'data-name':'comment:'+_0x387f43['getAttribute']('id')})}),_0x556878['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x37d1d6=this['editor'],_0xe02244=_0x37d1d6['plugins']['get'](Qt),_0x259a79=new Set(),_0x52b22d=new Set();_0x37d1d6['model']['document']['registerPostFixer'](_0x5949b4=>{let _0x194c4e=!0x1;for(const {name:_0x4efe80,data:_0x377a4a}of _0x37d1d6['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4af00a,id:_0x15e11a}=hi(_0x4efe80);let _0x167c73=_0x377a4a['newRange'];if('comment'!==_0x4af00a||!_0x167c73)continue;const _0xfbed3b='$graveyard'===_0x167c73['root']['rootName'];_0xfbed3b||(_0x167c73=li(_0x167c73,_0x37d1d6['model']),!_0x167c73||_0x167c73['isCollapsed']||!_0x377a4a['newRange']||_0x167c73['isEqual'](_0x377a4a['newRange']))?_0x37d1d6['model']['hasContent'](_0x167c73)&&!_0xfbed3b?this['isThreadsLoadingPaused']?_0x259a79['add'](_0x4efe80):this['_handleThreadMarker'](_0x4efe80,_0x15e11a):(_0x52b22d['add'](_0x4efe80),_0x259a79['delete'](_0x4efe80),_0x5949b4['removeMarker'](_0x4efe80),_0x194c4e=!0x0):(_0x5949b4['updateMarker'](_0x4efe80,{'range':_0x167c73}),_0x194c4e=!0x0);}return _0x194c4e;}),this['on']('change:isThreadsLoadingPaused',(_0xb64384,_0x2a08ea,_0x125298)=>{if(!_0x125298&&_0x259a79['size'])for(const _0xbe163d of _0x259a79){const {id:_0x8667ec}=hi(_0xbe163d);_0x259a79['delete'](_0xbe163d),_0x37d1d6['model']['markers']['get'](_0xbe163d)&&this['_handleThreadMarker'](_0xbe163d,_0x8667ec);}}),this['listenTo'](_0x37d1d6['model']['document'],'change',()=>{for(const {name:_0x23e50d,data:{newRange:_0x5b3754}}of _0x37d1d6['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4b9d8c,id:_0x2fc850}=hi(_0x23e50d);if('comment'!==_0x4b9d8c)continue;const _0x34a3c6=_0xe02244['getCommentThread'](_0x2fc850),_0x57cd40=this['hasMarkerForId'](_0x2fc850);_0x34a3c6&&(!_0x34a3c6['_hasTargetInContent']&&_0x5b3754&&_0x37d1d6['editing']['view']['once']('render',()=>{const _0x8cc5ee=_0x37d1d6['plugins']['get']($t),_0x471d74=_0xe02244['_threadToController']['get'](_0x34a3c6)['view'];_0x8cc5ee['getByInnerView'](_0x471d74)['refreshVisibility']();},{'priority':'low'}),_0x34a3c6['_hasTargetInContent']=_0x57cd40||!!_0x5b3754),_0x5b3754||(_0x52b22d['add'](_0x23e50d),_0x259a79['delete'](_0x23e50d));}for(const _0x16d9ba of _0x52b22d){const {id:_0x22dfa6}=hi(_0x16d9ba),_0x1152e7=_0xe02244['getCommentThread'](_0x22dfa6);if(_0x259a79['delete'](_0x16d9ba),!_0x1152e7)continue;const _0x89abcc=this['hasMarkerForId'](_0x22dfa6);_0x89abcc||_0x1152e7['isSubmitted']?_0x89abcc||_0x1152e7['unlinkedAt']||_0x1152e7['setUnlinkedAt'](new Date()):_0x1152e7['remove']();}_0x52b22d['clear']();});}['_handleInitialThreads'](_0x5efa2e){_0x5efa2e['forEach'](_0x2e3c7a=>{_0x2e3c7a['unlinkedAt']&&this['_attachArchivedThread'](_0x2e3c7a['id']);});}['_getTargetForId'](_0x313c87){const _0x5eb1e8=this['editor'],_0x4d0c4e=this['getAllMarkersForId'](_0x313c87);return _0x10520f(_0x5eb1e8['editing'],_0x4d0c4e);}['_getTextContext'](_0x22ac81){const _0x5d0346=this['getAllMarkersForId'](_0x22ac81);let _0x20d80b='',_0x3dc76f=!0x1;for(const _0x2ae105 of _0x5d0346){const _0x3349e1=_0x2ae105['getRange']();for(const _0x40d662 of Array['from'](_0x3349e1['getItems']()))_0x40d662['is']('$textProxy')?(_0x20d80b&&_0x3dc76f&&(_0x20d80b+='\x20',_0x3dc76f=!0x1),_0x20d80b+=_0x40d662['data']):_0x3dc76f=!0x0;_0x3dc76f=!0x0;}return _0x20d80b['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x53b46d,_0x4d4f2a){const _0x3d691b=this['editor'],_0x5860fa=_0x3d691b['plugins']['get'](Qt);let _0x21b630=_0x5860fa['getCommentThread'](_0x4d4f2a);const _0x23140c=_0x3d691b['config']['get']('collaboration.channelId'),_0x5e3d9b=_0x3d691b['plugins']['get'](si);if(_0x21b630&&(_0x21b630['unlinkedAt']&&_0x21b630['setUnlinkedAt'](null),_0x21b630['isAttached']))return _0x21b630;return!this['getAllMarkersForId'](_0x4d4f2a)[0x0]['managedUsingOperations']?_0x3d691b['editing']['view']['once']('render',()=>{if(_0x5860fa['getCommentThread'](_0x4d4f2a))return;const _0x285427=_0x3d691b['plugins']['get']($t);_0x21b630=_0x5860fa['openNewCommentThread']({'channelId':_0x23140c,'threadId':_0x4d4f2a,'target':()=>this['_getTargetForId'](_0x4d4f2a),'context':{'type':'text','value':this['_getTextContext'](_0x4d4f2a)}});const _0x229bb0=_0x5860fa['_threadToController']['get'](_0x21b630)['view'],_0x3865cf=_0x285427['getByInnerView'](_0x229bb0);_0x3865cf&&_0x5e3d9b['registerAnnotation'](_0x3865cf);},{'priority':'low'}):_0x5860fa['fetchCommentThread']({'channelId':_0x23140c,'threadId':_0x4d4f2a})['then'](_0x514880=>{if('destroyed'!==_0x3d691b['state']){if(_0x21b630=_0x514880,_0x21b630&&!_0x21b630['isAttached']){const _0xff5cb2=_0x21b630['attachTo'](()=>this['_getTargetForId'](_0x4d4f2a));_0x5e3d9b['registerAnnotation'](_0xff5cb2),_0x21b630['isResolved']&&this['_reconvertMarkers'](_0x4d4f2a);}else{if(!_0x21b630){const _0x47cd80=this['getAllMarkersForId'](_0x4d4f2a);_0x3d691b['model']['change'](_0x3454c5=>{for(const _0x10943c of _0x47cd80)_0x3454c5['removeMarker'](_0x10943c);});}}}}),_0x21b630;}['_handleThreadMarker'](_0x5c5dad,_0x12d0b7){const _0x164d8f=this['_attachMarkerToThread'](_0x5c5dad,_0x12d0b7);_0x164d8f&&!_0x164d8f['context']&&_0x164d8f['setContext']({'type':'text','value':this['_getTextContext'](_0x12d0b7)});}['_initAriaMarkerChangeAnnouncements'](){const _0x26936d=this['editor'];_0x342796(_0x26936d['model'],({left:_0x146056,entered:_0x18c377})=>{for(const _0x5781f6 of _0x146056)if(ui(_0x5781f6)){_0x26936d['ui']['ariaLiveAnnouncer']['announce'](bt(_0x26936d['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x400dad of _0x18c377)if(ui(_0x400dad)){_0x26936d['ui']['ariaLiveAnnouncer']['announce'](bt(_0x26936d['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x2f8a9a(_0x20bd97)));break;}});}}function di(_0x568cab,_0x1555e9){return _0x1555e9?_0x568cab+':'+_0x1555e9:_0x568cab;}function li(_0x1066b1,_0x427f25){const _0x340f77=_0x427f25['schema'],_0xfcf180=_0x427f25['createRange'](_0x1066b1['start']);for(const _0x3788b5 of _0x1066b1['getWalker']()){const {type:_0x6b71dc,item:_0x598bec,nextPosition:_0x44c745}=_0x3788b5;if('text'===_0x6b71dc||_0x340f77['isObject'](_0x598bec)){const _0x257241=_0x427f25['createPositionBefore'](_0x598bec);_0xfcf180['isCollapsed']&&(_0xfcf180['start']=_0x257241),_0xfcf180['end']=_0x44c745;}}return _0xfcf180;}function ui(_0x2391dd){return'comment'===hi(_0x2391dd['name'])['group'];}class mi extends _0x357641{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x576972=this['editor'],_0x11c916=_0x576972['plugins']['get'](Qt),_0x17d9c6=_0x576972['plugins']['get'](ci),_0x2dead5=_0x576972['plugins']['get']($t),_0x2d3f81=_0x576972['plugins']['get'](si);_0x576972['ui']['componentFactory']['add']('comment',()=>{const _0x206183=this['_createUIButton'](_0x38179e);return _0x206183['tooltip']=!0x0,_0x206183;}),_0x576972['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x2d3f81['addSourceCollector'](()=>{const _0x4cef03=[];for(const [_0x34ec01,_0x5c3e35]of _0x11c916['_threadToController']){const _0x67d09=_0x17d9c6['getAllMarkersForId'](_0x34ec01['id']),_0x5c129e=_0x67d09['map'](_0x538e54=>_0x538e54['getRange']());_0x67d09['length']>0x0&&_0x4cef03['push']([_0x5c3e35['view'],_0x5c129e]);}return _0x4cef03;}),this['listenTo'](_0x2dead5,'change:activeAnnotations',(_0x425a90,_0x12ceb9,_0x3b942e)=>{const _0x3abcd7=Array['from'](_0x3b942e)['map'](_0x6c440d=>_0x6c440d['innerView'])['find'](_0x343922=>_0x11c916['_viewToController']['has'](_0x343922));if(!_0x3abcd7)return void(_0x17d9c6['activeMarker']=null);const _0x2e9fcc=_0x11c916['_viewToController']['get'](_0x3abcd7)['model']['id'],_0x560238='comment:'+_0x2e9fcc;_0x2e9fcc&&_0x17d9c6['hasMarkerForId'](_0x2e9fcc)?_0x17d9c6['activeMarker']=_0x560238:_0x17d9c6['activeMarker']&&(_0x17d9c6['activeMarker']=null);}),this['listenTo'](_0x11c916,'removeCommentThread',(_0x4f94f0,{threadId:_0x136dc3,isFromAdapter:_0x37423b})=>{!_0x37423b&&_0x576972['ui']['focusTracker']['isFocused']&&_0x17d9c6['hasMarkerForId'](_0x136dc3)&&_0x576972['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x11c916,'addComment',(_0x24ae15,{threadId:_0x2e6271,isFromAdapter:_0x595a09})=>{if(_0x595a09||!_0x17d9c6['hasMarkerForId'](_0x2e6271)||!_0x11c916['hasCommentThread'](_0x2e6271))return;0x1===_0x11c916['getCommentThread'](_0x2e6271)['length']&&(_0x576972['editing']['view']['focus'](),_0x24ae15['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x164b82=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x183e54;for(const _0x34c686 in _0x164b82){const _0x106907=_0x34c686,_0x55a9df=_0x164b82[_0x106907];if('commentsLicenseKeyValid'==_0x55a9df||'commentsLicenseKeyInvalid'==_0x55a9df||'commentsLicenseKeyExpired'==_0x55a9df||'commentsLicenseKeyDomainLimit'==_0x55a9df||'commentsLicenseKeyNotAllowed'==_0x55a9df||'commentsLicenseKeyEvaluationLimit'==_0x55a9df||'commentsLicenseKeyUsageLimit'==_0x55a9df){delete _0x164b82[_0x106907],_0x183e54=_0x55a9df,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x183e54&&_0x164b82['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x183e54&&_0x164b82['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x183e54&&_0x164b82['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x183e54&&_0x164b82['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x183e54&&_0x164b82['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x183e54&&_0x164b82['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x94dfe1){const _0x49ac34=this['editor'],_0x34f772=new _0x94dfe1(_0x49ac34['locale']),_0x3d1d94=_0x49ac34['commands']['get']('addCommentThread');return _0x34f772['set']({'label':bt(_0x49ac34['locale'],'Comment'),'icon':_0x3fe266}),_0x34f772['bind']('isEnabled')['to'](_0x3d1d94,'isEnabled',_0x3d1d94,'hasContent',(_0x17f4fe,_0x3f3f78)=>_0x17f4fe&&_0x3f3f78),this['listenTo'](_0x34f772,'execute',()=>{_0x3d1d94['execute']();}),_0x34f772;}}class fi extends _0x357641{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x4576ef){super(_0x4576ef),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1030ef,_0x1920d0,_0x5bb5b2)=>{_0x5bb5b2?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x10143b,_0x56d04d]of this['editor']['commands'])_0x56d04d['affectsData']&&'addCommentThread'!==_0x10143b&&_0x56d04d['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x38c539=this['editor']['editing']['view']['document'];this['listenTo'](_0x38c539,'cut',_0x10aded=>_0x10aded['stop'](),{'priority':'highest'}),this['listenTo'](_0x38c539,'clipboardInput',_0x3838b6=>_0x3838b6['stop'](),{'priority':'highest'}),this['listenTo'](_0x38c539,'delete',_0x56ab26=>_0x56ab26['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x12cd6a,_0x2a3209]of this['editor']['commands'])_0x2a3209['affectsData']&&'addCommentThread'!==_0x12cd6a&&_0x2a3209['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x2def50{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x295fb1){super(_0x295fb1),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x437d1d=this['context']['plugins']['get']($t);this['listenTo'](_0x437d1d,'_activateAnnotation',(_0x207729,_0x596289)=>{for(const _0xc42653 of this['activeUIs']){const _0x581200=this['_uis']['get'](_0xc42653);(0x0,this['uisData']['get'](_0xc42653)['filter'])(_0x596289)&&_0x581200['setActiveAnnotation'](_0x596289);}}),this['listenTo'](_0x437d1d,'_deactivateAllAnnotations',()=>{for(const _0x32c73b of this['activeUIs']){this['_uis']['get'](_0x32c73b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x437d1d['_visibleAnnotations'],'add',(_0x4d5b16,_0x26e4e1)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x26e4e1);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0xe2f9d6){return this['activeUIs']['has'](_0xe2f9d6);}['activate'](_0x5e1fe4,_0x4fb899=this['defaultFilter']){const _0x4fbe2c=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x5e1fe4))throw new _0x875303('annotationsuis-missing-ui',this,{'uiName':_0x5e1fe4});this['isActive'](_0x5e1fe4)&&this['deactivate'](_0x5e1fe4),this['activeUIs']['add'](_0x5e1fe4);const _0x50e52f=new jt();Xt({'source':_0x4fbe2c['_visibleAnnotations'],'target':_0x50e52f,'filter':_0x4fb899}),this['uisData']['set'](_0x5e1fe4,{'collection':_0x50e52f,'filter':_0x4fb899});const _0x3b87af=this['_uis']['get'](_0x5e1fe4);_0x3b87af['attach'](_0x50e52f),this['listenTo'](_0x3b87af,'change:activeAnnotation',(_0x40cc63,_0x5804b8,_0x51f9bb,_0x39ef5a)=>{_0x39ef5a&&_0x4fbe2c['_removeActiveAnnotation'](_0x39ef5a),_0x51f9bb&&_0x4fbe2c['_addActiveAnnotation'](_0x51f9bb);});}['deactivate'](_0x351485){if(this['activeUIs']['delete'](_0x351485),!this['_uis']['has'](_0x351485))throw new _0x875303('annotationsuis-missing-ui',this,{'uiName':_0x351485});const _0x14bb9b=this['_uis']['get'](_0x351485);_0x14bb9b['detach'](),this['stopListening'](_0x14bb9b),this['uisData']['get'](_0x351485)['collection']['destroy'](),this['uisData']['delete'](_0x351485);}['switchTo'](_0x43a66c){if(!this['_uis']['has'](_0x43a66c))throw new _0x875303('annotationsuis-missing-ui',this,{'uiName':_0x43a66c});const _0xb92e32=this['context']['plugins']['get']($t),_0x455ce3=Array['from'](_0xb92e32['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x43a66c);const _0x447361=this['_uis']['get'](_0x43a66c);_0x447361['setActiveAnnotation'](_0x455ce3),_0x447361['_setSelectedAnnotations']&&_0x455ce3&&_0x447361['_setSelectedAnnotations']([_0x455ce3]);}['deactivateAll'](){for(const _0x3b2b5f of this['activeUIs'])this['deactivate'](_0x3b2b5f);}['register'](_0x1928b8,_0x21e470){if(this['_uis']['has'](_0x1928b8))throw new _0x875303('annotationsuis-register-already-registered');if('function'!=typeof _0x21e470['attach']||'function'!=typeof _0x21e470['detach']||'function'!=typeof _0x21e470['setActiveAnnotation'])throw new _0x875303('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1928b8,_0x21e470);}['refilterAnnotations'](){const _0x168e32=this['context']['plugins']['get']($t)['collection'],_0x24c6dc=new Map(),_0x7d444e=Array['from'](this['activeUIs']);for(const _0x525208 of this['activeUIs']){const _0x20540d=this['uisData']['get'](_0x525208)['collection'];for(const _0xa2c2d7 of _0x20540d)_0x24c6dc['set'](_0xa2c2d7,_0x525208);}for(const _0x2cf194 of _0x168e32){const _0x3dd86c=_0x24c6dc['get'](_0x2cf194);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2cf194);const _0x56ff7e=_0x7d444e['find'](_0x1ab3a9=>this['uisData']['get'](_0x1ab3a9)['filter'](_0x2cf194));_0x3dd86c!==_0x56ff7e&&(_0x3dd86c&&this['uisData']['get'](_0x3dd86c)['collection']['remove'](_0x2cf194),_0x56ff7e&&this['uisData']['get'](_0x56ff7e)['collection']['add'](_0x2cf194));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x33b530){const _0x314908=[];for(const _0x12bb1a of this['activeUIs']){(0x0,this['uisData']['get'](_0x12bb1a)['filter'])(_0x33b530)&&_0x314908['push'](_0x12bb1a);}if(_0x314908['length']>0x1)throw new _0x875303('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x314908,'annotationType':_0x33b530['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x22a81b('px');class _i extends _0x41f494{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x45db68){super(_0x45db68);const _0x35ca76=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0x911300(),this['focusCycler']=new _0x6f869d({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x35ca76['to']('class')],'style':{'minHeight':_0x35ca76['to']('minHeight',_0x3b63fd=>'number'==typeof _0x3b63fd?wi(_0x3b63fd+0xa):null)},'dir':_0x45db68['uiLanguageDirection'],'role':'application','aria-label':bt(_0x45db68,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x45db68,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x8fa0cb=>{this['_updateItemPositionInFocusables'](_0x8fa0cb['source']);}),this['list']['forEach'](_0x8b3477=>{this['focusTracker']['add'](_0x8b3477['element']),this['_updateItemPositionInFocusables'](_0x8b3477);}),this['list']['on']('change',(_0x5db898,_0x257903)=>{for(const _0x4eb141 of _0x257903['removed'])this['focusTracker']['remove'](_0x4eb141['element']),this['focusables']['remove'](_0x4eb141);for(const _0x41b41a of _0x257903['added'])this['focusTracker']['add'](_0x41b41a['element']),this['_updateItemPositionInFocusables'](_0x41b41a);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5a54c7){const _0xa4b7bd=this['focusables']['getIndex'](_0x5a54c7);let _0x176f54,_0x5b8e0c;for(const _0x9c68e1 of this['focusables'])if(_0x5a54c7['top']<_0x9c68e1['top']){_0x176f54=_0x9c68e1;break;}if(_0x5b8e0c=_0x176f54?this['focusables']['getIndex'](_0x176f54):this['focusables']['length'],-0x1!==_0xa4b7bd){if(_0xa4b7bd===_0x5b8e0c-0x1)return;this['focusables']['remove'](_0x5a54c7),_0x5b8e0c=_0x176f54?this['focusables']['getIndex'](_0x176f54):this['focusables']['length'];}this['focusables']['add'](_0x5a54c7,_0x5b8e0c);}}const gi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x22a81b('px');class Ai extends _0x41f494{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x259c07){super(_0x259c07),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x426e34,_0xac1af8)=>_0x426e34+_0xac1af8),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x105aa7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x105aa7['to']('isAnimationDisabled',_0x1c739b=>_0x1c739b?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x105aa7['to']('top',_0x397a6b=>gi(_0x397a6b))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x18dd54=this['element']['clientHeight'];_0x18dd54&&(this['height']=_0x18dd54);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x2def50{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3d8fe8){super(_0x3d8fe8),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x9c796d=this['context']['config']['get']('sidebar.container');_0x9c796d&&this['setContainer'](_0x9c796d);}['setContainer'](_0x6c43df){if(!yi(_0x6c43df))throw new _0x875303('sidebar-setcontainer-invalid-element');this['container']=_0x6c43df;}['_attachToContainer']({viewClass:_0x324d8d='',spaceBetweenItems:_0x4a7372=0x19}={}){if(!yi(this['container']))throw new _0x875303('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x324d8d,this['_spaceBetweenItems']=_0x4a7372;}['rearrange']({removedAnnotation:_0x1d9504,previousAnnotation:_0x29baf7,nextAnnotation:_0x481917}){const _0x556235=this['getSidebarItemView'](_0x1d9504);this['view']['list']['remove'](_0x556235),this['_destroySidebarItemView'](_0x1d9504),_0x29baf7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x29baf7)),_0x481917&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x481917)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x9de40c,activatedAnnotation:_0x2215b0,disableAnimationOnActivatedAnnotation:_0xe17421}){if(this['_activeAnnotation']=_0x2215b0,_0x9de40c){_0x9de40c['isActive']=!0x1;const _0xca7a32=this['getSidebarItemView'](_0x9de40c);_0xca7a32&&_0xe17421&&(_0xca7a32['isAnimationDisabled']=!0x1);}if(_0x2215b0){const _0xfb5a61=this['getSidebarItemView'](_0x2215b0);_0xfb5a61&&(_0x2215b0['isActive']=!0x0,_0xe17421&&(_0xfb5a61['isAnimationDisabled']=!0x0,_0xfb5a61['top']+=0x1),this['_alignToTargetRect'](_0xfb5a61));}}['_detachFromContainer'](_0x34f372){if(this['view']['element']['remove'](),_0x34f372){for(const _0x57cd35 of _0x34f372)this['_destroySidebarItemView'](_0x57cd35);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x432322,_0x5e1e27){_0x5e1e27||(_0x5e1e27=_0x432322['view']);const _0x28f1ed=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x28f1ed,_0x432322),this['_annotationToSidebarItemView']['set'](_0x432322,_0x28f1ed),_0x28f1ed['content']['add'](_0x5e1e27),this['listenTo'](_0x432322['view'],'change:targetRect',(_0x4d8dbc,_0xed2f99,_0x59a651)=>{const _0x349c6c=this['_getTargetTop'](_0x432322,_0x59a651);_0x28f1ed['_targetTop']!=_0x349c6c&&(_0x28f1ed['_targetTop']=_0x349c6c,this['_setItemTop'](_0x28f1ed,_0x349c6c));}),this['listenTo'](_0x28f1ed,'change:top',()=>{this['_recalculate'](_0x28f1ed,'top');}),this['listenTo'](_0x28f1ed,'change:bottom',()=>{this['_recalculate'](_0x28f1ed,'bottom');}),this['_alignToTargetRect'](_0x28f1ed);const _0x30dee9=this['_getItemBefore'](_0x28f1ed);if(_0x30dee9)this['_alignAfterItem'](_0x30dee9,_0x28f1ed)||this['_alignToTargetRect'](_0x28f1ed);else this['_alignToTargetRect'](_0x28f1ed);return this['_updateLastItem'](),this['view']['list']['add'](_0x28f1ed),_0x28f1ed;}['_alignForTopChange'](_0x21ac32){if(!_0x21ac32['content']['length'])return;const _0x1c154c=this['_getItemBefore'](_0x21ac32);if(!_0x1c154c)return;const _0x519f6c=this['_sidebarItemViewToAnnotation']['get'](_0x1c154c),_0x1baec6=this['_activeAnnotation'];_0x1baec6&&_0x1baec6===_0x519f6c?this['_alignAfterItem'](_0x1c154c,_0x21ac32):this['_alignBeforeItem'](_0x21ac32,_0x1c154c);}['_alignForBottomChange'](_0x5414e4){if(!_0x5414e4['content']['length'])return;const _0x114f94=this['_getItemAfter'](_0x5414e4);if(!_0x114f94)return;const _0x230a2e=this['_sidebarItemViewToAnnotation']['get'](_0x114f94),_0xeec01b=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x43ceca=this['_activeAnnotation'];_0x43ceca&&_0x43ceca===_0x230a2e&&_0xeec01b?(this['_alignBeforeItem'](_0x114f94,_0x5414e4),this['_alignAfterItem'](_0x5414e4,_0x114f94)):_0x43ceca&&_0x43ceca===_0x230a2e?this['_alignBeforeItem'](_0x114f94,_0x5414e4):this['_alignAfterItem'](_0x5414e4,_0x114f94);}['_recalculate'](_0x3f7677,_0x5a7067){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x19412e,changedProp:_0x44218}of this['_recalculateBuffer'])'top'===_0x44218?this['_alignForTopChange'](_0x19412e):this['_alignForBottomChange'](_0x19412e);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3f7677,'changedProp':_0x5a7067});}['getSidebarItemView'](_0x23329c){return this['_annotationToSidebarItemView']['get'](_0x23329c);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2b7982){const _0x1b1363=this['getSidebarItemView'](_0x2b7982);this['stopListening'](_0x1b1363),this['stopListening'](_0x2b7982['view']),_0x1b1363['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2b7982),this['_sidebarItemViewToAnnotation']['delete'](_0x1b1363);}['_createSidebarView'](){const _0xeabec5=new _i(this['context']['locale']);return _0xeabec5['render'](),this['on']('change:_lastItem',(_0x208eab,_0x70d4b6,_0x32961f,_0xf85c2a)=>{_0xf85c2a&&_0xeabec5['unbind']('minHeight'),_0x32961f?_0xeabec5['bind']('minHeight')['to'](_0x32961f,'bottom'):_0xeabec5['minHeight']=null;}),_0xeabec5;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x57956d){const _0x54df3e=this['_sidebarItemViewToAnnotation']['get'](_0x57956d),_0x2858b3=_0x54df3e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x54df3e)-0x1);return _0x2858b3&&this['getSidebarItemView'](_0x2858b3)||null;}['_getItemAfter'](_0x1c0e85){const _0x2f21ec=this['_sidebarItemViewToAnnotation']['get'](_0x1c0e85),_0x49e736=_0x2f21ec&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2f21ec)+0x1);return _0x49e736&&this['getSidebarItemView'](_0x49e736)||null;}['_alignBeforeItem'](_0x2d289f,_0x4a5c10){_0x2d289f['updateHeight']();const _0x137208=vi(_0x4a5c10['bottom']+this['_spaceBetweenItems'],_0x2d289f['top']);return!!_0x137208&&(this['_setItemTop'](_0x4a5c10,_0x4a5c10['top']-_0x137208),!0x0);}['_alignAfterItem'](_0x482777,_0x1f04b5){_0x482777['updateHeight']();const _0x380c20=vi(_0x482777['bottom']+this['_spaceBetweenItems'],_0x1f04b5['top']);return!!_0x380c20&&(this['_setItemTop'](_0x1f04b5,_0x1f04b5['top']+_0x380c20,!0x1),!0x0);}['_alignToTargetRect'](_0x4566aa){const _0x2ca555=this['_sidebarItemViewToAnnotation']['get'](_0x4566aa);if(!_0x2ca555||!_0x2ca555['target']||!_0x2ca555['targetRect'])return;const _0x558a32=this['_getTargetTop'](_0x2ca555,_0x2ca555['targetRect']);this['_setItemTop'](_0x4566aa,_0x558a32);}['_getTargetTop'](_0x2731c5,_0x3f7d37){if(null===_0x3f7d37)return 0x0;if(_0x2731c5['target']instanceof _0x3ba044)return _0x3f7d37['top'];{const _0x14dbdb=new _0x3ba044(this['view']['element'])['top'];return _0x3f7d37['top']-_0x14dbdb;}}['_setItemTop'](_0x103b21,_0x583851,_0x10a0fb=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x10a0fb&&(_0x583851=Math['max'](_0x583851,this['_getMaxAvailableTop'](_0x103b21))),_0x103b21['top']=_0x583851;}['_getMaxAvailableTop'](_0x47cf6f){let _0x5c78ce=this['_getItemBefore'](_0x47cf6f),_0x5097cc=0x0;for(;_0x5c78ce;)_0x5c78ce['updateHeight'](),_0x5097cc+=this['_spaceBetweenItems']+_0x5c78ce['height'],_0x5c78ce=this['_getItemBefore'](_0x5c78ce);return _0x5097cc;}}function vi(_0x19dac9,_0x1689df){return Math['max'](_0x19dac9-_0x1689df,0x0);}function yi(_0x35d932){return null!==_0x35d932&&'object'==typeof _0x35d932&&0x1===_0x35d932['nodeType'];}class Ci extends _0x2def50{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x346997){super(_0x346997),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x382eec(),this['_refreshPositioningDebounced']=_0x4664ac(()=>{_0x346997['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3a3739=this['context']['plugins']['get'](pi),_0x1f7dcf=this['context']['plugins']['get'](Ti);_0x3a3739['register']('wideSidebar',this),_0x1f7dcf['container']&&_0x3a3739['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4dfb75){if(_0x4dfb75===this['activeAnnotation'])return;const _0x12c05e=this['context']['plugins']['get'](Ti);_0x12c05e['_activeAnnotation']=_0x4dfb75;const _0x2b433c=this['activeAnnotation'];_0x12c05e['refresh']({'blurredAnnotation':_0x2b433c,'activatedAnnotation':_0x4dfb75}),this['activeAnnotation']=_0x4dfb75;}['attach'](_0x1bb631){this['annotations']=_0x1bb631;const _0xb20d9c=this['context']['plugins']['get'](Ti);if(_0xb20d9c['_annotations']=_0x1bb631,this['isAttached'])throw new _0x875303('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xb20d9c,'set:container',()=>{this['detach'](),this['listenTo'](_0xb20d9c,'change:container',_0x55e67f=>{_0x55e67f['off'](),this['attach'](_0x1bb631);});}),_0xb20d9c['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1e241a=_0xffe94b=>{_0xffe94b['updateTargetRect'](),_0xb20d9c['addAnnotation'](_0xffe94b);};for(const _0x32b0c7 of _0x1bb631)_0x1e241a(_0x32b0c7);this['listenTo'](_0x1bb631,'add',(_0x3f9311,_0x4f2099)=>{_0x1e241a(_0x4f2099);}),this['listenTo'](_0x1bb631,'remove',(_0x871e57,_0x1d172d,_0x318374)=>{_0xb20d9c['rearrange']({'removedAnnotation':_0x1d172d,'previousAnnotation':_0x1bb631['get'](_0x318374-0x1),'nextAnnotation':_0x1bb631['get'](_0x318374+0x1)}),_0x1d172d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1bb631,'focus',(_0x1ffd6d,_0x12af42)=>{this['setActiveAnnotation'](_0x12af42);}),this['listenTo'](_0x1bb631,'blur',()=>{this['setActiveAnnotation'](null);});const _0x293e02=this['context']instanceof _0x3ecb89?this['context']['editors']:new _0x382eec([this['context']]);for(const _0x59b434 of _0x293e02)this['_integrateWithEditorAnnotations'](_0x59b434);this['listenTo'](_0x293e02,'add',(_0x3d3c31,_0x4f91aa)=>{this['listenTo'](_0x4f91aa,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4f91aa);});}),this['listenTo'](_0x293e02,'remove',(_0x5c1357,_0x18d937)=>{_0x18d937['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x18d937['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x875303('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x43f7ab=this['context']['plugins']['get'](Ti);_0x43f7ab['_detachFromContainer'](this['annotations']),this['stopListening'](_0x43f7ab),this['stopListening'](this['annotations']),this['context']instanceof _0x3ecb89&&this['stopListening'](this['context']['editors']);for(const _0x58313a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x58313a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4bd8c2){if(!_0x4bd8c2['plugins']['has']('EditorAnnotations'))return;const _0x20bc75=_0x4bd8c2['plugins']['get']('EditorAnnotations'),_0x133e49=()=>{const _0x20e582=_0x20bc75['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x20e582[0x0]||null);};this['listenTo'](_0x20bc75,'refresh',_0x133e49),this['listenTo'](_0x20bc75,'blur',(_0xfe1092,{isAnnotationTracked:_0x501443})=>{this['activeAnnotation']&&_0x501443(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x20bc75,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1a2559=>{_0x20bc75['hasDomSelection']()&&(_0x133e49(),_0x1a2559['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x20bc75);}['_destroyEditorAnnotationsIntegration'](_0x30ccc2){this['stopListening'](_0x30ccc2),this['_editorAnnotations']['remove'](_0x30ccc2);}}class Ii extends _0x38179e{['counterView'];constructor(_0x2c0927){super(_0x2c0927);const _0x650919=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x22b111,_0x5d25a5)=>_0x22b111?'...':_0x5d25a5['toString']()),this['set']('annotationType',''),this['icon']=_0x3fe266,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x41f494(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x650919['to']('annotationType',_0xd62607=>'ck-annotation-counter__badge--'+_0xd62607),_0x650919['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x650919['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x2def50{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e2ec2){super(_0x4e2ec2),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xf86daa())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x382eec(),this['_refreshPositioningDebounced']=_0x4664ac(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x24a879){this['annotations']=_0x24a879;const _0x49e6fb=this['context']['plugins']['get'](Ti),_0x319986=this['balloonPanelView'];if(_0x49e6fb['_annotations']=_0x24a879,this['isAttached'])throw new _0x875303('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x49e6fb,'set:container',()=>{this['detach'](),this['listenTo'](_0x49e6fb,'change:container',_0x527c0e=>{_0x527c0e['off'](),this['attach'](_0x24a879);});}),_0x49e6fb['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2a0e85=_0x40fab0=>{const _0xe6a1bb=new Ii(this['context']['locale']);_0x49e6fb['addAnnotation'](_0x40fab0,_0xe6a1bb),this['_annotationToNarrowView']['set'](_0x40fab0,_0xe6a1bb),_0xe6a1bb['bind']('isDirty','annotationType','number')['to'](_0x40fab0['view'],'isDirty','type','length'),_0xe6a1bb['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x319986['content']['first']!==_0x40fab0['view']?(this['_showBalloon'](_0x40fab0),_0x40fab0['view']['element']['focus'](),this['setActiveAnnotation'](_0x40fab0)):this['setActiveAnnotation'](null);});};for(const _0x537139 of _0x24a879)_0x2a0e85(_0x537139);this['listenTo'](_0x24a879,'add',(_0x542445,_0x16dc20)=>{_0x2a0e85(_0x16dc20);}),this['listenTo'](_0x24a879,'remove',(_0x5ac843,_0x6717df,_0x2a2ae3)=>{this['_annotationToNarrowView']['get'](_0x6717df)['destroy'](),this['_annotationToNarrowView']['delete'](_0x6717df),_0x49e6fb['rearrange']({'removedAnnotation':_0x6717df,'previousAnnotation':_0x24a879['get'](_0x2a2ae3-0x1),'nextAnnotation':_0x24a879['get'](_0x2a2ae3+0x1)}),_0x6717df===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x24a879,'focus',(_0x3fb9c7,_0x1bdaac)=>{this['setActiveAnnotation'](_0x1bdaac);}),this['listenTo'](_0x24a879,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2a842d,_0x5c1847)=>{_0x5c1847['keyCode']===_0x430317['esc']&&_0x319986['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x319986['content']['first']),this['_hideBalloon'](),_0x5c1847['stopPropagation'](),_0x5c1847['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2b1947,_0x1ea9c2)=>{const _0x12526d=_0x1ea9c2['target'];_0x319986['isVisible']&&_0x319986['element']['contains'](_0x12526d)||_0x49e6fb['view']['element']['contains'](_0x12526d)||_0x2b1947['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x52d66f=>_0x52d66f['contains'](_0x12526d))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xedacb6=this['context']instanceof _0x3ecb89?this['context']['editors']:new _0x382eec([this['context']]);for(const _0x1d7f0a of _0xedacb6)this['_integrateWithEditorAnnotations'](_0x1d7f0a);this['listenTo'](_0xedacb6,'add',(_0x18173d,_0x520752)=>{this['listenTo'](_0x520752,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x520752);});}),this['listenTo'](_0xedacb6,'remove',(_0x132a50,_0x3242f3)=>{_0x3242f3['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3242f3['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x1cccef){if(_0x1cccef===this['activeAnnotation'])return;const _0x25f079=this['context']['plugins']['get'](Ti);if(_0x25f079['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1cccef,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1cccef)_0x25f079['getSidebarItemView'](_0x1cccef)?this['_showBalloon'](_0x1cccef):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x1cccef;}['detach'](){if(!this['isAttached'])throw new _0x875303('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2872f2=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4cab13=>_0x4cab13['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2872f2['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3ecb89&&this['stopListening'](this['context']['editors']);for(const _0x1346c8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1346c8);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x5e32f4){if(!_0x5e32f4['plugins']['has']('EditorAnnotations'))return;const _0x4db3c6=_0x5e32f4['plugins']['get']('EditorAnnotations'),_0x34e3e2=this['context']['plugins']['get'](Ti),_0x3a3356=this['annotations'],_0x49283d=this['balloonPanelView'],_0x36adcf=()=>{const _0x29be64=_0x4db3c6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x29be64),this['setActiveAnnotation'](_0x29be64[0x0]||null);};this['listenTo'](_0x4db3c6,'refresh',_0x36adcf),this['listenTo'](_0x4db3c6,'blur',(_0x3ebcd9,{isAnnotationTracked:_0x567efb})=>{this['activeAnnotation']&&_0x567efb(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4db3c6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3a3356,'blur',_0x30af2d=>{_0x4db3c6['hasDomSelection']()&&_0x30af2d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2f81af,_0x6299f9)=>{const _0x87cfeb=_0x6299f9['target'];_0x49283d['isVisible']&&_0x49283d['element']['contains'](_0x87cfeb)||_0x34e3e2['view']['element']['contains'](_0x87cfeb)||this['activeAnnotation']&&_0x4db3c6['hasDomSelection']()&&(_0x36adcf(),_0x2f81af['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4db3c6);}['_destroyEditorAnnotationsIntegration'](_0x51daab){_0x51daab&&(this['stopListening'](_0x51daab),this['_editorAnnotations']['remove'](_0x51daab));}['_setSelectedAnnotations'](_0x56fd90){for(const _0x4dcce6 of this['_selectedAnnotations'])_0x56fd90['includes'](_0x4dcce6)||this['_manuallyClosedAnnotationViews']['delete'](_0x4dcce6['view']);this['_selectedAnnotations']=_0x56fd90;}['_refreshPositioning'](){const _0xc94342=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xc94342['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x5bea52){if(this['_manuallyClosedAnnotationViews']['has'](_0x5bea52['view']))return;const _0xabcb=this['balloonPanelView']['content']['first'];_0xabcb!==_0x5bea52['view']?(_0xabcb&&this['_detachListeners'](_0xabcb),this['_attachListeners'](_0x5bea52['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x5bea52['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xc91a93=this['balloonPanelView']['content']['first'],_0x106252=_0xc91a93&&this['annotations']['getByView'](_0xc91a93);if(!_0x106252||!this['_annotationToNarrowView']['has'](_0x106252))return;const _0x3a7a05=this['_annotationToNarrowView']['get'](_0x106252)['element'],_0x25793c=(function(){const _0x37f915=ht['defaultPositions'];return[_0x37f915['southArrowNorthEast'],_0x37f915['northArrowSouthEast'],_0x37f915['southArrowNorth'],_0x37f915['northArrowSouth'],_0x37f915['southArrowNorthWest'],_0x37f915['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3a7a05,'positions':_0x25793c});}['_hideBalloon'](){const _0x363bbd=this['balloonPanelView'],_0x28a985=_0x363bbd['content']['first'];_0x28a985&&(this['_detachListeners'](_0x28a985),_0x363bbd['unpin'](),_0x363bbd['content']['clear']());}['_attachListeners'](_0x39d884){this['listenTo'](_0x39d884,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x39d884,'Esc',(_0x2ac592,_0x58c30b)=>{this['_manuallyClosedAnnotationViews']['add'](_0x39d884),this['_hideBalloon'](),_0x58c30b();});}['_detachListeners'](_0x2397b7){this['stopListening'](_0x2397b7);}}class Ei extends _0x357641{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4cb6f0){super(_0x4cb6f0),_0x4cb6f0['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4cb6f0['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x4664ac(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x4db0e3=this['editor']['plugins']['get'](pi);_0x4db0e3['context']===this['editor']&&(_0x4db0e3['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x12b973,_0x32b7cb)=>{const _0x3a0ca4=this['_balloon'];if(this['isAttached']&&_0x3a0ca4['visibleView']){const _0x331a1f=this['annotations']['getByView'](_0x3a0ca4['visibleView']);_0x331a1f&&this['_closeAnnotation'](_0x331a1f),_0x32b7cb();}}));}['afterInit'](){const _0x11069e=this['editor']['plugins']['get'](pi);_0x11069e['context']===this['editor']&&(_0x11069e['hasActive']()||_0x11069e['switchTo']('inline'));}['setActiveAnnotation'](_0x344678){_0x344678!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x344678&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x344678)&&this['_addAnnotationToBalloon'](_0x344678,!0x0),_0x344678['isActive']=!0x0),_0x344678||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x344678);}['attach'](_0x2555c6){this['annotations']=_0x2555c6;const _0x48a855=this['editor']['plugins']['get'](pi),_0x1cad7b=this['_balloon'];if(this['isAttached'])throw new _0x875303('inlineannotations-attach-already-attached',this);if(_0x48a855['context']!==this['editor'])throw new _0x875303('inlineannotations-not-allowed-with-context',this);const _0x3b52ed=this['editor']['plugins']['get'](si);this['listenTo'](_0x3b52ed,'refresh',()=>{const _0x1e4039=_0x3b52ed['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x168f27,_0x376ae9;!this['_forceRefresh']&&(_0x168f27=_0x1e4039,_0x376ae9=this['_selectedAnnotations'],_0x168f27['length']===_0x376ae9['length']&&_0x168f27['every'](_0x540406=>_0x376ae9['includes'](_0x540406)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1e4039),this['setActiveAnnotation'](_0x1e4039[0x0]||null));}),this['listenTo'](_0x3b52ed,'blur',(_0x35c441,{isAnnotationTracked:_0x2043df})=>{this['activeAnnotation']&&_0x2043df(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3b52ed,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3cc8cc,_0x45c5d4,_0x10985b)=>{_0x10985b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2555c6,'remove',(_0x5ad1f8,_0x55ef4f)=>{this['_removeAnnotationFromBalloon'](_0x55ef4f),_0x55ef4f===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1cad7b,'change:visibleView',(_0x4ea7e3,_0xd46d0b,_0x4515d4,_0x1d9dc9)=>{_0x1d9dc9&&this['stopListening'](_0x1d9dc9);const _0x51a073=_0x2555c6['getByView'](_0x4515d4);_0x4515d4&&_0x51a073&&(this['listenTo'](_0x4515d4,'change:height',()=>{_0x1cad7b['updatePosition']();}),this['listenTo'](_0x4515d4,'Esc',()=>{this['_closeAnnotation'](_0x51a073),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x51a073&&this['setActiveAnnotation'](_0x51a073));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1cad7b['visibleView']&&(_0x2555c6['getByView'](_0x1cad7b['visibleView'])&&_0x1cad7b['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x875303('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1edb3a of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1edb3a);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x13e6e8){for(const _0x34a9a2 of this['_selectedAnnotations'])_0x13e6e8['includes'](_0x34a9a2)||this['_manuallyClosed']['delete'](_0x34a9a2);for(const _0x360c7a of this['annotations'])_0x13e6e8['includes'](_0x360c7a)||this['_removeAnnotationFromBalloon'](_0x360c7a);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2ac82a of _0x13e6e8)this['_addAnnotationToBalloon'](_0x2ac82a);}this['_selectedAnnotations']=_0x13e6e8;}['_addAnnotationToBalloon'](_0x8d303e,_0x1619b1=!0x1){this['_manuallyClosed']['has'](_0x8d303e)||(this['_addedAnnotations']['has'](_0x8d303e)||this['_balloon']['hasView'](_0x8d303e['view'])||(this['_addedAnnotations']['add'](_0x8d303e),this['_balloon']['add']({'stackId':_0x8d303e['view']['id'],'view':_0x8d303e['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x8d303e)}})),_0x1619b1&&this['_balloon']['showStack'](_0x8d303e['view']['id']));}['_getBalloonTargetForAnnotation'](_0x458ca7){const _0x3d2d32=_0x458ca7['target'],_0x41e38d=this['editor']['editing']['view'],_0x120df6=_0x41e38d['document']['selection']['getFirstRange'](),_0x498946=_0x41e38d['domConverter']['viewRangeToDom'](_0x120df6);if(_0x498946['collapse'](!0x0),_0x3d2d32){if(_0x3d2d32 instanceof _0x3ba044)return _0x3d2d32;let _0x38ec7c=[];for(const _0x2057eb of _0x3d2d32)_0x38ec7c['push'](..._0x3ba044['getDomElementRects'](_0x2057eb));_0x38ec7c=function(_0x4db68b){const _0x492dc3=[];let _0x51e7a8=_0x4db68b[0x0];for(let _0x41c10f=0x1;_0x41c10f<_0x4db68b['length'];_0x41c10f++)if(Ni(_0x51e7a8,_0x4db68b[_0x41c10f])){const _0x229735=_0x4db68b[_0x41c10f]['width'];_0x51e7a8['width']+=_0x229735,_0x51e7a8['right']+=_0x229735;}else _0x492dc3['push'](_0x51e7a8),_0x51e7a8=_0x4db68b[_0x41c10f];return _0x492dc3['push'](_0x51e7a8),_0x492dc3;}(_0x38ec7c);const _0x54316d=_0x498946['getBoundingClientRect']();return _0x38ec7c['find'](_0x154c59=>_0x154c59['top']<=_0x54316d['top']&&_0x154c59['bottom']>=_0x54316d['bottom']&&_0x154c59['left']<=_0x54316d['left']&&_0x154c59['right']>=_0x54316d['right'])||_0x38ec7c[0x0];}return _0x458ca7['targetRect']||_0x498946;}['_removeAnnotationFromBalloon'](_0x1e690c){this['_addedAnnotations']['has'](_0x1e690c)&&this['_balloon']['hasView'](_0x1e690c['view'])&&(this['_addedAnnotations']['delete'](_0x1e690c),this['_balloon']['remove'](_0x1e690c['view']));}['_closeAnnotation'](_0x409ca4){this['_manuallyClosed']['add'](_0x409ca4),this['_removeAnnotationFromBalloon'](_0x409ca4);}}function Ni(_0x938757,_0x52a3e8){return _0x938757['top']===_0x52a3e8['top']&&_0x938757['bottom']===_0x52a3e8['bottom']&&_0x938757['right']===_0x52a3e8['left'];}class ki extends _0x41f494{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x10eda5,_0x530b09){super(_0x10eda5),this['set']('isEmpty',!_0x530b09['length']),this['focusTracker']=new _0x911300(),this['_annotationViews']=_0x530b09,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x6f869d({'focusables':_0x530b09,'focusTracker':this['focusTracker']}),this['listenTo'](_0x530b09,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x530b09,'remove',(_0x4ab982,_0x1661b3)=>{_0x1661b3['isActive']&&this['focus'](),_0x530b09['length']||(this['isEmpty']=!0x0);});const _0x153e7c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x10eda5,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x530b09},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x153e7c['if']('isEmpty','ck-hidden',_0x1e38c0=>!_0x1e38c0)]},'children':[{'text':bt(_0x10eda5,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x47f6ba of this['_annotationViews'])this['focusTracker']['add'](_0x47f6ba['element']);this['_annotationViews']['on']('change',(_0x52244b,{added:_0x26b147,removed:_0x1c2988})=>{for(const _0x4aca44 of _0x26b147)this['focusTracker']['add'](_0x4aca44['element']);for(const _0x267c88 of _0x1c2988)this['focusTracker']['remove'](_0x267c88['element']);});}}class Oi extends _0x2def50{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x36bb28){super(_0x36bb28),this['archivedThreads']=new _0x382eec();}['init'](){const _0x47b15c=this['context'],_0x3688d3=_0x47b15c['plugins']['get'](Qt),_0x3f3331=_0x47b15c['plugins']['get']($t);this['listenTo'](_0x3688d3,'addCommentThread',(_0x314928,{threadId:_0x1d12d8})=>{const _0x3480eb=_0x3688d3['getCommentThread'](_0x1d12d8);_0x3480eb['archivedAt']&&this['archivedThreads']['add'](_0x3480eb,this['_calculatePosition'](_0x3480eb['archivedAt'])),this['listenTo'](_0x3480eb,'change:archivedAt',(_0x72faa7,_0x207093,_0x2d426a)=>{_0x2d426a?this['archivedThreads']['has'](_0x3480eb)||this['archivedThreads']['add'](_0x3480eb,this['_calculatePosition'](_0x3480eb['archivedAt'])):this['archivedThreads']['has'](_0x3480eb)&&this['archivedThreads']['remove'](_0x3480eb);});}),this['listenTo'](_0x3688d3,'removeCommentThread',(_0x64d40,{threadId:_0x3e096c})=>{const _0x19e403=_0x3688d3['getCommentThread'](_0x3e096c);this['stopListening'](_0x19e403),this['archivedThreads']['has'](_0x19e403)&&this['archivedThreads']['remove'](_0x19e403);},{'priority':'highest'}),this['listenTo'](_0x3f3331['collection'],'focus',(_0x1ce4fe,_0x44eb0e)=>{_0x44eb0e['isVisible']||(_0x44eb0e['isActive']=!0x0,_0x3f3331['activate'](_0x44eb0e));});}['_calculatePosition'](_0x1dd2b3){const _0x362a31=[...this['archivedThreads']]['findIndex'](_0x5cf829=>_0x5cf829['archivedAt']<_0x1dd2b3);return _0x362a31>-0x1?_0x362a31:this['archivedThreads']['length'];}}class Mi extends _0x357641{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x836cf7){super(_0x836cf7),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x434d37=this['editor'],_0x501d88=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x434d37['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x38179e,!0x0)),_0x434d37['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x575a08=this['_createCommentsArchiveButton'](ot);return _0x575a08['set']({'role':'menuitemcheckbox'}),_0x575a08;});const _0x472e25=_0x434d37['plugins']['get'](Oi),_0x18b0cd=_0x434d37['plugins']['get']('Annotations'),_0x5bbf71=_0x434d37['plugins']['get']('CommentsRepository');_0x472e25['archivedThreads']['forEach'](_0x8aae78=>{this['_handleNewThread'](_0x8aae78);}),this['listenTo'](_0x472e25['archivedThreads'],'add',(_0x448a70,_0x1a1b28)=>{this['_handleNewThread'](_0x1a1b28);}),this['listenTo'](_0x18b0cd['collection'],'add',(_0xfe8da7,_0x191383)=>{const _0x50e895=this['_pendingThreads']['find'](_0xcc2b5f=>{const _0x15c0c1=_0x5bbf71['_threadToController']['get'](_0xcc2b5f);return _0x15c0c1&&_0x191383['innerView']===_0x15c0c1['view'];});if(_0x50e895){const _0x1c55f6=this['_calculatePosition'](_0x50e895['archivedAt']);this['_addAnnotationToArchive'](_0x191383,_0x1c55f6),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x50e895),0x1);}}),this['listenTo'](_0x472e25['archivedThreads'],'remove',(_0x2528fb,_0x59c741)=>{const _0x3340d8=_0x434d37['config']['get']('collaboration.channelId');if(!_0x3340d8||_0x59c741['channelId']===_0x3340d8){if(this['_pendingThreads']['includes'](_0x59c741))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x59c741),0x1);else{const _0x2e0d54=_0x5bbf71['_threadToController']['get'](_0x59c741),_0x484f01=_0x18b0cd['getByInnerView'](_0x2e0d54['view']);this['annotationViews']['remove'](_0x484f01['view']),this['stopListening'](_0x484f01),this['stopListening'](_0x484f01['focusableElements']);}}}),this['listenTo'](_0x18b0cd['collection'],'add',(_0x2de6e0,_0x503bf0)=>{this['listenTo'](_0x503bf0,'escape',_0x501d88);}),this['listenTo'](_0x18b0cd['collection'],'remove',(_0x1af341,_0x5caf37)=>{this['stopListening'](_0x5caf37,'escape',_0x501d88);});}['_addAnnotationToArchive'](_0x724077,_0x4e8661){this['listenTo'](_0x724077,'set:isVisible',_0x1aaf48=>{_0x1aaf48['return']=!0x1,_0x1aaf48['stop']();}),this['annotationViews']['add'](_0x724077['view'],_0x4e8661);}['_handleNewThread'](_0x2882cd){const _0x23e579=this['editor']['plugins']['get']('CommentsRepository'),_0xcf4e4c=this['editor']['plugins']['get']('Annotations'),_0x280fc7=this['editor']['config']['get']('collaboration.channelId');if(!_0x280fc7||_0x2882cd['channelId']===_0x280fc7){const _0x53dd0b=_0x23e579['_threadToController']['get'](_0x2882cd);if(!_0x53dd0b)return void this['_pendingThreads']['push'](_0x2882cd);const _0x487c1f=this['_calculatePosition'](_0x2882cd['archivedAt']),_0x25baed=_0xcf4e4c['getByInnerView'](_0x53dd0b['view']);_0x25baed['isVisible']&&_0xcf4e4c['_visibleAnnotations']['remove'](_0x25baed),this['_addAnnotationToArchive'](_0x25baed,_0x487c1f);}}['_calculatePosition'](_0x562e5e){const _0x17d245=this['editor']['config']['get']('collaboration.channelId'),_0xb43401=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x100f61=>_0x100f61['channelId']===_0x17d245)['findIndex'](_0x497e3f=>_0x497e3f['archivedAt']<_0x562e5e);return _0xb43401<0x0||_0xb43401>this['annotationViews']['length']?this['annotationViews']['length']:_0xb43401-0x1;}['_toggleDialog'](){const _0x2c712d=this['editor'],_0x173d8f=_0x2c712d['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x2c712d['locale'],this['annotationViews'])),'commentsArchive'===_0x173d8f['id']?_0x173d8f['hide']():_0x173d8f['show']({'id':'commentsArchive','title':bt(_0x2c712d['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2f0ca4,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x181a20,_0xc2e784=!0x1){const _0x4d0669=this['editor']['locale'],_0x15c91e=this['editor']['plugins']['get']('Dialog'),_0x3ff5ab=new _0x181a20(_0x4d0669);return _0x3ff5ab['bind']('isEnabled')['to'](this,'isEnabled'),_0x3ff5ab['bind']('isOn')['to'](_0x15c91e,'id',_0x1adddf=>'commentsArchive'===_0x1adddf),_0x3ff5ab['set']({'label':bt(_0x4d0669,'COMMENTS_ARCHIVE'),'icon':_0x2f0ca4,'isToggleable':!0x0}),_0xc2e784&&(_0x3ff5ab['tooltip']=!0x0),this['listenTo'](_0x3ff5ab,'execute',()=>this['_toggleDialog']()),_0x3ff5ab;}['_hideDialogOnAnnotationEscape']=_0x4dd3e1=>{const _0x8ed56=_0x4dd3e1['source'];if(!this['annotationViews']['has'](_0x8ed56['view']))return;const _0x3454fb=this['editor']['plugins']['get']('Dialog');_0x3454fb['isOpen']&&'commentsArchive'===_0x3454fb['id']&&(_0x3454fb['hide'](),_0x4dd3e1['stop']());};}class Ri extends _0x357641{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|