@ckeditor/ckeditor5-comments 45.2.0-alpha.0 → 45.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +9 -9
- 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/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x55f216={}){function _0xedb00d(_0x5ea659){return _0x5ea659['map'](_0x48692e=>String['fromCharCode'](_0x48692e))['join']('');}(_0x55f216=Object['assign']({},_0x55f216))['plugins']||(_0x55f216['plugins']=Qt['defaultPlugins']),super(_0x55f216),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xedb00d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xedb00d([0x76,0x69,0x65,0x77])][_0xedb00d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xedb00d([0x61,0x75,0x74,0x6f]),this[_0xedb00d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xedb00d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xedb00d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xedb00d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xedb00d([0x6f,0x6b])});}['create'](){const _0x5aea8f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5aea8f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x375d23=>{const _0xc620f1=this['model']['document']['getRoot'](),_0x25d1c2=_0xc620f1&&_0xc620f1['getChild'](_0xc620f1['childCount']-0x1);_0x375d23['setSelection'](_0x25d1c2,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x101de4=this['editing']['view'],_0x2c827a=_0x101de4['document']['getRoot'](),_0x178225=_0x2c827a['getChild'](0x0);_0x2c827a['childCount']>0x1||!_0x178225||'p'!=_0x178225['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x101de4,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x178225['placeholder']=this['placeholder']),Ft({'view':_0x101de4,'element':_0x178225,'keepOnFocus':!0x0}),this['placeholderElement']=_0x178225);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x5d1c9a,_0x53ded0={}){super(_0x5d1c9a),this['editor']=null,this['_editorConfig']=_0x53ded0,this['set']('value',_0x53ded0['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x5d1c9a,'Reply...')),this['set']('submitLabel',E(_0x5d1c9a,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1e0a9c(),this['focusCycler']=new _0x1ca448({'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',(_0x4990ac,_0x3e48cd)=>{this['cancelButtonView']['fire']('execute'),_0x3e48cd();}),this['keystrokes']['set']('Ctrl+Enter',(_0x6b68aa,_0x485956)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x485956());}),this['on']('submit',(_0x19ea4d,_0x3336b1)=>{_0x3336b1['length']>0xfde8?(alert(E(_0x5d1c9a,'TOO_LONG_COMMENT_ALERT',[_0x3336b1['length'],0xfde8])),_0x19ea4d['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2f716d=this['editor'];this['element']['insertBefore'](_0x2f716d['ui']['element'],this['element']['firstChild']),_0x2f716d['model']['document']['on']('change',()=>this['value']=_0x2f716d['getData']()),_0x2f716d['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2f716d['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4b4057){-0x1===_0x4b4057?(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:_0x457148}=this,_0x396de2=new _0x5134f9(_0x457148);return _0x396de2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x396de2['withText']=!0x0,_0x396de2['bind']('label')['to'](this,'submitLabel'),_0x396de2['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x396de2['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x180075,_0x25aabf)=>!_0x25aabf&&!!_0x180075['trim']()),_0x396de2;}['_createCancelButton'](){const {locale:_0x5a59be}=this,_0x2ff87c=new _0x5134f9(_0x5a59be);return _0x2ff87c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2ff87c['label']=E(_0x5a59be,'Cancel'),_0x2ff87c['withText']=!0x0,_0x2ff87c['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2ff87c;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3c070f=>{this['focusTracker']['add'](_0x3c070f['element']);}),this['focusables']['on']('change',(_0x53e709,_0x5cc70d)=>{for(const _0x2ea00f of Array['from'](_0x5cc70d['added'])['reverse']())this['focusTracker']['add'](_0x2ea00f['element']);});}}class ie extends kt{constructor(_0x5cbeb2,_0x118b80,_0xcf53f9){super(_0x5cbeb2),this['commentInputView']=new os(_0x5cbeb2,_0xcf53f9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x578fc1,_0x3abb79)=>_0x578fc1||!!_0x3abb79),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 _0x2e8d01(_0x5cbeb2,_0x118b80),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'](_0x1f760f){this['commentInputView']['focus'](_0x1f760f);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x790cab,_0x302cd8)=>{const {submitButtonView:_0x4be58a,cancelButtonView:_0x1b242d,editor:_0x5ece2b}=this['commentInputView'];[_0x4be58a['element'],_0x1b242d['element'],_0x5ece2b?_0x5ece2b['editing']['view']['getDomRoot']():null]['filter'](_0xf813dd=>_0xf813dd)['some'](_0x10bf0b=>_0x10bf0b['contains'](_0x302cd8['target']))||(this['focus'](),_0x302cd8['preventDefault']());});}}class cs extends kt{constructor(_0x772d4a){super(_0x772d4a);const _0x1f4394=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1f4394['to']('count',_0x368a4b=>E(_0x772d4a,'NUMBER_OF_COMMENTS',_0x368a4b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x38e23e,_0x2f2f73,_0xcd5549){super(_0x38e23e);const _0x224604=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2f2f73['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2f2f73,this['_config']=_0xcd5549,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1e0a9c(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ca448({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2e2d83=>this['commentViews']['map'](_0x30c674=>_0x30c674['element'])['includes'](_0x2e2d83['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x38e23e),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x28d611=>_0x28d611-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4559a2 of _0x2f2f73['comments'])this['_handleNewCommentModel'](_0x4559a2);this['_handleInfoComment'](),this['listenTo'](_0x2f2f73['comments'],'add',(_0x28e17b,_0x3845f0)=>{const _0xfb8f14=this['_calculatePosition'](_0x3845f0);this['length']++,this['_handleNewCommentModel'](_0x3845f0,_0xfb8f14),this['refreshVisibleViews']();}),this['listenTo'](_0x2f2f73['comments'],'remove',(_0x5a9f2e,_0x4bd5ec)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4bd5ec),this['refreshVisibleViews']();}),this['listenTo'](_0x2f2f73,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2f2f73,'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',_0x224604['if']('length','ck-hidden',_0x438daf=>!_0x438daf)],'aria-label':E(_0x38e23e,'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'](_0x5b0d2f){-0x1===_0x5b0d2f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x3cdb38 of this['commentViews'])_0x3cdb38['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x18511f,_0x3c20c9){const _0x2e8508=new this['_config']['CommentView'](this['locale'],_0x18511f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x2e8508['viewUid']=_0x18511f['id'],_0x2e8508['delegate']('removeComment')['to'](this),_0x2e8508['delegate']('updateComment')['to'](this),_0x2e8508['delegate']('resolveCommentThread')['to'](this),_0x2e8508['delegate']('editorReady')['to'](this),_0x2e8508['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x2e8508,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x2e8508,_0x3c20c9);}['_calculatePosition'](_0x2a770d){const _0x1b68a2=this['_model']['_findOptimalIndex'](_0x2a770d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2a770d['authoredAt']?_0x1b68a2-0x1:_0x1b68a2:_0x1b68a2-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x470a10={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x470a10,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x470a10));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x19cebb){const _0x550ee4=this['commentViews']['remove'](_0x19cebb['id']);this['stopListening'](_0x550ee4),_0x550ee4['isEditMode']&&this['_updateHasDirtyComment'](),_0x550ee4['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x713c78=>_0x713c78['isEditMode']);}['_rearrangeCollapse'](){const _0x3f7d7a=function(_0x12e25b){const _0x3a2c7d=new _0x41f317();for(const _0x51520c of _0x12e25b)_0x3a2c7d['add'](_0x51520c);return _0x3a2c7d;}(this['commentViews']),_0x385a57=this['_collapsedCommentsView']['count'];for(let _0x4414a0=0x1;_0x4414a0<=_0x385a57;_0x4414a0++)_0x3f7d7a['remove'](0x1);for(const _0x19bc85 of _0x3f7d7a)_0x19bc85['collapse']();_0x385a57>0x0&&_0x3f7d7a['add'](this['_collapsedCommentsView'],0x1),ns(_0xb268bd(Array['from'](this['visibleViews']),Array['from'](_0x3f7d7a)),this['visibleViews'],_0x3f7d7a);}['_rearrangeExpand'](){ns(_0xb268bd(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2980b7 of this['visibleViews'])_0x2980b7['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x66aea=>{this['focusTracker']['add'](_0x66aea['element']),this['keystrokes']['listenTo'](_0x66aea['element']);}),this['commentViews']['on']('change',(_0x17df68,_0x4809e6)=>{for(const _0x3784d1 of _0x4809e6['removed'])this['focusTracker']['remove'](_0x3784d1['element']),this['keystrokes']['stopListening'](_0x3784d1['element']);for(const _0x324885 of Array['from'](_0x4809e6['added'])['reverse']())this['focusTracker']['add'](_0x324885['element']),this['keystrokes']['listenTo'](_0x324885['element']);});}}function ns(_0x39c1d4,_0xa890cb,_0x559c5c){let _0x2b9885=0x0;for(const _0x37e131 of _0x39c1d4)switch(_0x37e131){case'insert':_0xa890cb['add'](_0x559c5c['get'](_0x2b9885),_0x2b9885),_0x2b9885++;break;case'delete':_0xa890cb['remove'](_0x2b9885);break;case'equal':_0x2b9885++;}}class as extends kt{constructor(_0x596633){super(_0x596633);const _0x4b9805=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4b9805['to']('contextValue',_0x545554=>E(_0x596633,'THREAD_CONTEXT_LABEL',_0x545554)),'tabindex':-0x1},'children':[{'text':_0x4b9805['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1b41bb,_0x5125e1){super(_0x1b41bb);const _0x4e64b6=this['bindTemplate'];this['_model']=_0x5125e1,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1e0a9c(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ca448({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x8d069=>!!_0x8d069),this['bind']('contextValue')['to'](this['_model'],'context',_0x36430a=>_0x36430a&&_0x36430a['value']?this['_trimContextValue'](_0x36430a['value']):E(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',_0x4e64b6['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 _0x11ada9=new _0x5134f9(this['locale']);return _0x11ada9['label']=E(this['locale'],'Reopen'),_0x11ada9['tooltip']=E(this['locale'],'Reopen'),_0x11ada9['icon']=_0x29628a,_0x11ada9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4973ea=>!_0x4973ea),_0x11ada9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x40d77b,_0x4ab449)=>_0x40d77b&&_0x4ab449),_0x11ada9['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x11ada9;}['_trimContextValue'](_0x4748ef){if(_0x4748ef['length']<0x96)return _0x4748ef;const _0x2a3b5f=_0x4748ef['lastIndexOf']('\x20',0x93);return _0x4748ef['substring'](0x0,_0x2a3b5f>-0x1?_0x2a3b5f:0x93)+'...';}['_attachContextActions'](){const _0x46ad01=this['element']['querySelector']('.ck-context'),_0x2fd035=_0x46ad01['querySelector']('.ck-context__value');this['listenTo'](_0x46ad01,'mouseenter',()=>{_0x2fd035['offsetWidth']<_0x2fd035['scrollWidth']&&_0x46ad01['classList']['add']('overlay');}),this['listenTo'](_0x46ad01,'mouseleave',()=>{_0x46ad01['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4df84b of this['focusables'])this['focusTracker']['add'](_0x4df84b['element']),this['keystrokes']['listenTo'](_0x4df84b['element']);}['_createContextView'](){const _0x3d721a=new as(this['locale']);return _0x3d721a['bind']('contextValue')['to'](this),_0x3d721a;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x890875,_0x33ecb3,_0x18824f,_0x187e0a){super(_0x890875),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x33ecb3,this['_localUser']=_0x18824f,this['_config']=_0x187e0a,this['commentThreadHeaderView']=new Xt(_0x890875,_0x33ecb3),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x890875,E(_0x890875,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x890875,_0x33ecb3,Object['assign']({'CommentView':this['_config']['CommentView']},_0x187e0a)),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',(_0x2e064,_0x221b07)=>_0x2e064||!!_0x221b07),this['bind']('isUnlinked')['to'](_0x33ecb3,'unlinkedAt',_0x454e2f=>!!_0x454e2f),this['bind']('ariaLabel')['to'](this,'length',_0x549660=>{const _0x8a5e5e=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x549660,_0x8a5e5e]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1e0a9c(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ca448({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xd75b64=>_0xd75b64['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 _0x570667=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x523f4c=_0x570667['commentInputView'];return _0x570667['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x523f4c,'value',(_0x44352f,_0xa98953,_0x661de4,_0x32ea25,_0x2f7b7a)=>!!_0x2f7b7a||!!_0x32ea25&&_0x661de4&&!_0xa98953||_0x44352f&&_0x661de4&&!_0xa98953),_0x523f4c['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4622c7,_0x51d5d0,_0xdae7c4)=>{let _0x13f591;return _0x13f591=_0xdae7c4&&_0x51d5d0?'Reply\x20to\x20reopen\x20discussion...':_0x4622c7?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x13f591);}),_0x523f4c['bind']('submitLabel')['to'](this,'length',_0x3074ba=>E(this['locale'],_0x3074ba?'Reply':'Comment')),_0x523f4c['on']('submit',(_0x56c536,_0x576497)=>{this['fire']('addComment',_0x576497),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x523f4c['on']('cancel',()=>{this['focus']();}),_0x523f4c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x523f4c['on']('cancel',_0x22f4e7=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x22f4e7['stop']());}),this['on']('change:isActive',(_0x4a0ecd,_0x4f326b,_0x2bb692)=>{_0x2bb692||this['length']||_0x523f4c['value']||this['fire']('removeCommentThread');}),_0x570667;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(hs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x1f969f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5dcc58,target:_0x461ea6,type:_0x170372,isVisible:_0x278230=!0x0}){super(),this['view']=_0x5dcc58,this['view']['element']||this['view']['render'](),this['_type']=_0x170372,this['_target']=_0x461ea6,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x41f317([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x29549d,_0x2018a1)=>{this['view']['focusTracker']['add'](_0x2018a1);}),this['focusableElements']['on']('remove',(_0xc300d2,_0x157eb2)=>{this['view']['focusTracker']['remove'](_0x157eb2);}),this['set']('isVisible',_0x278230);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2eb308=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x2eb308),_0x2eb308;}get['targetRect'](){const _0x16f529=this['target'];if(null===_0x16f529)return null;if(_0x16f529 instanceof _0x521279)return _0x16f529;const _0x3aa63e=_0x16f529['filter'](_0x1562dd=>function(_0x4cb049){const _0x4f4035=_0x4cb049['offsetParent'];if(_0x4f4035)return!0x0;const _0x3aaf8b=_0x4cb049['getClientRects']()['item'](0x0);return!!_0x3aaf8b;}(_0x1562dd));return 0x0===_0x3aa63e['length']?null:new _0x521279(_0x3aa63e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x23cf97){this['view']['isActive']=_0x23cf97,this['view']['mainView']['isActive']=_0x23cf97;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3dad5c){if(!(null===_0x3dad5c||_0x3dad5c instanceof _0x521279||Array['isArray'](_0x3dad5c)&&_0x3dad5c['every'](_0x540868=>li(_0x540868))))throw new _0x3b16ef('annotation-invalid-target',null,{'target':_0x3dad5c});}['_getNormalizedTarget'](){const _0xf97e2='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0xf97e2)?[_0xf97e2]:_0xf97e2;}}function li(_0x58e7c3){return null!==_0x58e7c3&&'object'==typeof _0x58e7c3&&'nodeType'in _0x58e7c3&&0x1===_0x58e7c3['nodeType'];}class _ extends _0x41f317{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4c6efc=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1e0a9c(),this['_focusTracker']['on']('change:isFocused',(_0x5e6081,_0x4d22e9,_0x344d67)=>{_0x344d67||this['fire']('blur');});for(const _0x204bab of _0x4c6efc)this['add'](_0x204bab);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2df131){if(this['has'](_0x2df131))throw new _0x3b16ef('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2df131['innerView'],_0x2df131),this['_viewToAnnotation']['set'](_0x2df131['view'],_0x2df131);for(const _0x256fab of _0x2df131['focusableElements'])this['_focusTracker']['add'](_0x256fab);this['listenTo'](_0x2df131['focusableElements'],'add',(_0x390c04,_0x3901c5)=>{this['_focusTracker']['add'](_0x3901c5);}),this['listenTo'](_0x2df131['focusableElements'],'remove',(_0x21094f,_0x36e66c)=>{this['_focusTracker']['remove'](_0x36e66c);}),this['listenTo'](_0x2df131['view']['focusTracker'],'change:isFocused',(_0x46cc86,_0x3b4fa0,_0x5448f1)=>{_0x5448f1&&this['fire']('focus',_0x2df131);}),_0x2df131['updateTargetRect']();const _0x126344=this['_getOrderInContent'](_0x2df131['view']['targetRect']);return super['add'](_0x2df131,_0x126344);}['remove'](_0x1da050){if(!this['has'](_0x1da050))throw new _0x3b16ef('annotationcollection-not-existing-item',null);this['stopListening'](_0x1da050['view']['focusTracker']),this['stopListening'](_0x1da050['focusableElements']);for(const _0x1f42ab of _0x1da050['focusableElements'])this['_focusTracker']['remove'](_0x1f42ab);return this['_viewToAnnotation']['delete'](_0x1da050['view']),this['_innerViewToAnnotation']['delete'](_0x1da050['innerView']),super['remove'](_0x1da050);}['getByInnerView'](_0x300159){return this['_innerViewToAnnotation']['get'](_0x300159);}['getByView'](_0x2e28e3){return this['_viewToAnnotation']['get'](_0x2e28e3);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x11bbc9 of this)_0x11bbc9['updateTargetRect']();this['_sort']();}['_sort'](){const _0x46c884=Array['from'](this)['sort']((_0x6ab347,_0x499cbb)=>v(_0x6ab347['view']['targetRect'],_0x499cbb['view']['targetRect']));for(let _0x285666=_0x46c884['length']-0x1;_0x285666>0x0;_0x285666--){const _0x2ad9fe=_0x46c884[_0x285666];_0x285666!==this['getIndex'](_0x2ad9fe)&&(this['remove'](_0x2ad9fe),this['add'](_0x2ad9fe));}}['_getOrderInContent'](_0x5a60cf){let _0x16d35c=0x0;if(!_0x5a60cf)return this['length'];for(const _0x40759c of this){const _0x42eb00=_0x40759c['view']['targetRect'];if(_0x42eb00){if(v(_0x5a60cf,_0x42eb00)<0x0)return _0x16d35c;_0x16d35c++;}}return _0x16d35c;}}function v(_0x1c64aa,_0x13cd6e){if(null===_0x1c64aa&&null===_0x13cd6e)return 0x0;if(null===_0x1c64aa)return-0x1;if(null===_0x13cd6e)return 0x1;const _0x2e716d=_0x1c64aa['top']-_0x13cd6e['top'];return 0x0==_0x2e716d?_0x1c64aa['left']-_0x13cd6e['left']:_0x2e716d;}class O extends _0x1318aa{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x159121){if(super(_0x159121),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x159121 instanceof _0x180d0b){const _0x3f67b0=_0x159121['locale'];_0x159121['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x595c94){this['collection']['add'](_0x595c94);}['remove'](_0x5aa7ae){this['collection']['remove'](_0x5aa7ae),_0x5aa7ae['destroy']();}['refreshVisibility'](){for(const _0x39fb06 of this['collection'])_0x39fb06['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2ba79a){return this['collection']['getByInnerView'](_0x2ba79a);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3d5255 of this['collection'])_0x3d5255['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x41b4f4){this['fire']('_activateAnnotation',_0x41b4f4);}['createAnnotation'](_0x184195){return new d(_0x184195);}['createAnnotationView'](_0x486479,_0x3d1269){return new S(_0x486479,_0x3d1269);}['_addActiveAnnotation'](_0x18b01c){const _0xa472fa=new Set(this['activeAnnotations']);_0xa472fa['add'](_0x18b01c),this['activeAnnotations']=_0xa472fa;}['_removeActiveAnnotation'](_0x182fa0){const _0x36b43d=new Set(this['activeAnnotations']);_0x36b43d['delete'](_0x182fa0),this['activeAnnotations']=_0x36b43d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5a6e27=this['collection'],_0x52fb45=this['_visibleAnnotations'];function _0x529448(_0x3c5454){const _0x45c25d=_0x3c5454['source'];_0x45c25d['isVisible']&&!_0x52fb45['has'](_0x45c25d)?_0x52fb45['add'](_0x45c25d):!_0x45c25d['isVisible']&&_0x52fb45['has'](_0x45c25d)&&_0x52fb45['remove'](_0x45c25d),_0x45c25d['view']['focusTracker']['remove'](_0x45c25d['view']['element']),_0x45c25d['view']['focusTracker']['add'](_0x45c25d['view']['element']);}this['listenTo'](_0x5a6e27,'add',(_0x556897,_0xae07b1)=>{_0xae07b1['isVisible']&&_0x52fb45['add'](_0xae07b1),this['listenTo'](_0xae07b1,'change:isVisible',_0x529448);}),this['listenTo'](_0x5a6e27,'remove',(_0x2bfd0c,_0x3b7ac4)=>{_0x52fb45['has'](_0x3b7ac4)&&_0x52fb45['remove'](_0x3b7ac4),this['stopListening'](_0x3b7ac4,'change:isVisible',_0x529448);});}['_setupEnterAnnotationKeystroke'](){const _0x493e70=_0x35dc99=>{_0x35dc99['on']('ready',()=>{_0x35dc99['keystrokes']['set'](_0x298e25,(_0x463576,_0x2d45d2)=>{const _0x510500=_0x338d21(this['activeAnnotations']['values']());_0x510500&&(_0x510500['view']['focus'](),_0x2d45d2());});});};this['context']instanceof _0x180d0b?_0x493e70(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3bf56d,_0x279122)=>{_0x493e70(_0x279122);});}['_setupEscapeAnnotationHandling'](){const _0x3ba19f=_0x5e0461=>{const _0x5bd1ce=_0x5e0461['source'],_0x2fb374=[];let _0x25d1cc;if(Array['isArray'](_0x5bd1ce['target'])){_0x25d1cc=_0x5bd1ce['target'][0x0],this['context']instanceof _0x180d0b?_0x2fb374['push'](this['context']):this['context']['editors']&&_0x2fb374['push'](...this['context']['editors']);for(const _0x231a23 of _0x2fb374)for(const _0x5a3d47 of _0x231a23['editing']['view']['domRoots']['values']())if(_0x5a3d47['contains'](_0x25d1cc))return void _0x231a23['editing']['view']['focus']();_0x25d1cc['focus']();}};this['listenTo'](this['collection'],'add',(_0xfca855,_0x4c380a)=>{this['listenTo'](_0x4c380a,'escape',_0x3ba19f,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3c74bc,_0x26478d)=>{this['stopListening'](_0x26478d,'escape',_0x3ba19f);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1318aa{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x459f75){super(_0x459f75),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4b84ad=this['context']['config'];_0x4b84ad['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4b84ad['define']('comments.maxThreadTotalWeight',0x1f4),_0x4b84ad['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4b84ad['define']('comments.CommentThreadView',vt),_0x4b84ad['define']('comments.CommentView',gt),_0x4b84ad['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5da1ec=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x49ae0a,_0x406ea0)=>this['_addCommentThread'](_0x406ea0)),this['on']('submitCommentThread',(_0x3bb718,_0x426178)=>this['_submitCommentThread'](_0x426178)),this['on']('resolveCommentThread',(_0x17bc34,_0x329c61)=>this['_resolveCommentThread'](_0x329c61)),this['on']('resolveCommentThread',(_0x1a1e0c,_0x32f2ec)=>this['_updateActiveAnnotation'](_0x32f2ec),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x9dcf0,_0x53d14f)=>this['_reopenCommentThread'](_0x53d14f)),this['on']('reopenCommentThread',(_0x570fd8,_0x43663f)=>this['_updateActiveAnnotation'](_0x43663f),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4aaf8c,_0x27d440)=>this['_removeCommentThread'](_0x27d440)),this['on']('updateCommentThread',(_0x2228b4,_0x31e470)=>this['_updateCommentThread'](_0x31e470)),this['on']('updateCommentThread',(_0x359cc0,_0x2ff680)=>this['_updateActiveAnnotation'](_0x2ff680),{'priority':'lowest'}),this['on']('addComment',(_0x168132,_0x2e7880)=>this['_addComment'](_0x2e7880)),this['on']('updateComment',(_0x30a27b,_0x5dc0cd)=>this['_updateComment'](_0x5dc0cd)),this['on']('removeComment',(_0x154297,_0x1a54ab)=>this['_removeComment'](_0x1a54ab)),this['on']('addComment',(_0x5edc4a,{threadId:_0x3176ac,isFromAdapter:_0x12c4a3})=>{if(_0x12c4a3)return;const _0x5a6db4=this['getCommentThread'](_0x3176ac),_0x2af1ce=_0x5a6db4&&this['_threadToController']['get'](_0x5a6db4);_0x2af1ce&&_0x2af1ce['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5da1ec,'change:activeAnnotations',(_0xc5b705,_0x22002d,_0x33d275)=>{const _0xe798cb=Array['from'](_0x33d275)['map'](_0xb5f9a5=>this['_viewToController']['get'](_0xb5f9a5['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xe798cb?_0xe798cb['model']:null;});}set['adapter'](_0x1073cf){if(this['_adapter'])throw new _0x3b16ef('commentsrepository-adapter-already-set');this['_adapter']=_0x1073cf;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x29b25b=Tt,threadId:_0x1715fe=_0x437d75(),comments:_0x2846a8=[],unlinkedAt:_0x2555d2=null,resolvedAt:_0x3d1036=null,resolvedBy:_0x4ddacc=null,target:_0x15de3a=null,context:_0x5686f1=null,attributes:_0x4ae343={},isResolvable:_0x30a8bc=!0x0,isSubmitted:_0x42566e=!0x1,isFromAdapter:_0x809116=!0x1}={}){return this['fire'](bt('addCommentThread',_0x29b25b),{'channelId':_0x29b25b,'threadId':_0x1715fe,'comments':_0x2846a8,'unlinkedAt':_0x2555d2,'resolvedAt':_0x3d1036,'resolvedBy':_0x4ddacc,'target':_0x15de3a,'context':_0x5686f1,'attributes':_0x4ae343,'isFromAdapter':_0x809116,'isResolvable':_0x30a8bc,'isSubmitted':_0x42566e}),this['getCommentThread'](_0x1715fe);}['openNewCommentThread']({channelId:_0x4581d3=Tt,threadId:_0x248b0b=_0x437d75(),target:_0x80c3d2,context:_0x16f470=null,isResolvable:_0x1fed83=!0x0}){if(this['_readOnlyChannels']['has'](_0x4581d3)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x80c3d2)throw new _0x3b16ef('commentsrepository-missing-target');const _0x1a2e8d=this['addCommentThread']({'channelId':_0x4581d3,'threadId':_0x248b0b,'target':_0x80c3d2,'context':_0x16f470,'isResolvable':_0x1fed83});if(!_0x1a2e8d)return null;const _0x51b859=this['_threadToController']['get'](_0x1a2e8d),_0x4b6de9=_0x51b859['view']['commentThreadInputView']['commentInputView'],_0x3eb0e7=this['context']['plugins']['get'](O),_0x52e259=_0x3eb0e7['getByInnerView'](_0x51b859['view']);return _0x3eb0e7['activate'](_0x52e259),_0x4b6de9['once']('editorReady',()=>_0x4b6de9['focus']()),_0x1a2e8d;}['hasCommentThread'](_0x18660e){if('string'!=typeof _0x18660e)throw new _0x3b16ef('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x18660e);}['updateCommentThread']({channelId:_0x41ebfe=Tt,threadId:_0x5640c9,context:_0x248a1c,unlinkedAt:_0x575cdd,attributes:_0x2ca657,isFromAdapter:_0x27f02d=!0x1}){return this['fire'](bt('updateCommentThread',_0x41ebfe),{'channelId':_0x41ebfe,'threadId':_0x5640c9,'context':_0x248a1c,'unlinkedAt':_0x575cdd,'attributes':_0x2ca657,'isFromAdapter':_0x27f02d}),this['getCommentThread'](_0x5640c9);}['getCommentThread'](_0x53efea){if('string'!=typeof _0x53efea)throw new _0x3b16ef('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x53efea);}['fetchCommentThread']({channelId:_0x376580,threadId:_0x1dd63b}={}){const _0x18b99b=this['getCommentThread'](_0x1dd63b);if(_0x18b99b)return Promise['resolve'](_0x18b99b);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3b16ef('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x376580,'threadId':_0x1dd63b})['then'](_0x3eaef5=>this['hasCommentThread'](_0x1dd63b)?this['getCommentThread'](_0x1dd63b):_0x3eaef5?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x376580},_0x3eaef5)):void 0x0)['catch'](_0x12267f=>{throw console['error'](_0x12267f),new _0x3b16ef('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x47177e,skipNotAttached:_0x32e539=!0x1,skipEmpty:_0x1246a5=!0x1,toJSON:_0x53897e=!0x1}={}){const _0xa452fe=[];for(const _0xf95f93 of this['_threads']['values']())_0x47177e&&_0xf95f93['channelId']!==_0x47177e||_0x32e539&&!_0xf95f93['isAttached']||_0x1246a5&&0x0===_0xf95f93['length']||_0xa452fe['push'](_0xf95f93);return _0x53897e?_0xa452fe['map'](_0x9276b3=>_0x9276b3['toJSON']()):_0xa452fe;}['setActiveCommentThread'](_0x286af1){const _0xaefcd1=this['context']['plugins']['get'](O);if(!_0x286af1)return void(this['activeCommentThread']&&_0xaefcd1['deactivateAll']());const _0x2526cb=this['getCommentThread'](_0x286af1);if(!_0x2526cb)throw new _0x3b16ef('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x286af1});if(!this['_threadToController']['has'](_0x2526cb))throw new _0x3b16ef('commentsrepository-active-not-attached',null,{'threadId':_0x286af1});const _0x3eb283=_0xaefcd1['getByInnerView'](this['_threadToController']['get'](_0x2526cb)['view']);_0xaefcd1['activate'](_0x3eb283);}['switchReadOnly'](_0x15a30b,_0x1a2fb1){_0x15a30b?this['_readOnlyChannels']['add'](_0x1a2fb1):this['_readOnlyChannels']['delete'](_0x1a2fb1),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x3fb818){return this['_readOnlyChannels']['has'](_0x3fb818)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x482f1a,_0x17469a){return new Ct(_0x482f1a,_0x17469a);}['setPermissions'](_0x493984,_0x37e237=Tt){this['_permissions']['set'](_0x37e237,_0x493984),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5b4ee8=Tt){return this['_permissions']['has'](_0x5b4ee8)?this['_permissions']['get'](_0x5b4ee8):_t;}['_addCommentThread']({channelId:_0xd6fb6c,threadId:_0x2917a3,comments:_0x28007c,unlinkedAt:_0x501b84,resolvedAt:_0x23efa,resolvedBy:_0x3feb68,target:_0x388173,context:_0x51922e,attributes:_0x305ed3,isFromAdapter:_0x5e89e8,isResolvable:_0x519d40,isSubmitted:_0x1a7577}){if('string'!=typeof _0x2917a3)throw new _0x3b16ef('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2917a3});if(this['hasCommentThread'](_0x2917a3))throw new _0x3b16ef('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2917a3});const _0x2afa27=new ui(this,{'channelId':_0xd6fb6c,'id':_0x2917a3,'context':_0x51922e,'attributes':_0x305ed3,'unlinkedAt':_0x501b84,'resolvedAt':_0x23efa,'resolvedBy':_0x3feb68?this['context']['plugins']['get'](it)['getUser'](_0x3feb68):null,'isResolvable':_0x519d40,'isSubmitted':_0x1a7577||_0x5e89e8});this['_threads']['set'](_0x2917a3,_0x2afa27);for(const _0x570e07 of _0x28007c)_0x2afa27['_add'](this['_createNewComment']({'threadId':_0x2917a3,..._0x570e07}));return _0x388173&&_0x2afa27['attachTo'](_0x388173),_0x5e89e8||!_0x2afa27['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0xd6fb6c,'threadId':_0x2917a3});}['_submitCommentThread']({channelId:_0x49386a,threadId:_0x56cfed}){if(!this['hasCommentThread'](_0x56cfed))throw new _0x3b16ef('commentsrepository-missing-comment-thread',this);const _0x50158b=this['getCommentThread'](_0x56cfed);if(_0x50158b['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2fa7b1,comments:_0x3f9922,resolvedAt:_0x501b46,resolvedBy:_0x43a65c,context:_0x15a455,attributes:_0x3e51a1}=_0x50158b,_0x3ed084=this['context']['plugins']['get']('PendingActions'),_0x1da3c1=_0x3ed084['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x49386a,'threadId':_0x2fa7b1,'comments':_0x3f9922['map'](_0x4f2036=>_0x4f2036['toJSON']()),'resolvedAt':_0x501b46,'resolvedBy':_0x43a65c?_0x43a65c['id']:_0x43a65c,'context':_0x15a455,'attributes':_0x3e51a1})['then'](({comments:_0x5152f7})=>{_0x3ed084['remove'](_0x1da3c1);for(const _0x56ff42 of _0x5152f7)this['_updateComment']({'channelId':_0x49386a,'threadId':_0x56cfed,'commentId':_0x56ff42['commentId'],'createdAt':_0x56ff42['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x25cf2a=>{throw console['error'](_0x25cf2a),new _0x3b16ef('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x3acfc1,target:_0x58f2cc}){const _0x2d51c0=this['getCommentThread'](_0x3acfc1);if(!_0x2d51c0)throw new _0x3b16ef('commentsrepository-attach-missing-comment-thread',this);const _0x5f226a=this['context']['plugins']['get']('PendingActions'),_0x262383=this['context']['plugins']['get'](O),_0x14a209=this['_createCommentThreadView'](_0x2d51c0),_0x1f9ed5=new Ct(_0x2d51c0,_0x14a209);let _0x4c4ec3=null;_0x14a209['on']('change:isDirty',(_0x2a7224,_0x176a97,_0x6f95ce)=>{_0x6f95ce?_0x4c4ec3=_0x5f226a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4c4ec3&&(_0x5f226a['remove'](_0x4c4ec3),_0x4c4ec3=null);}),this['_threadToController']['set'](_0x2d51c0,_0x1f9ed5),this['_viewToController']['set'](_0x14a209,_0x1f9ed5);const _0x1083c9=new S(this['context']['locale'],_0x14a209);_0x1083c9['bind']('length')['to'](_0x14a209),_0x1083c9['bind']('isDirty')['to'](_0x14a209,'isDirty',_0x14a209,'length',(_0x2c99e2,_0x3033e6)=>_0x2c99e2||!_0x3033e6),_0x1083c9['bind']('isActive')['to'](_0x14a209),_0x1083c9['type']='comment';const _0x5882b4=new d({'view':_0x1083c9,'target':_0x58f2cc,'type':'comment','isVisible':!_0x2d51c0['archivedAt']});return _0x14a209['on']('escape',()=>{_0x5882b4['fire']('escape');}),this['_bindAnnotationToEditors'](_0x14a209,_0x5882b4),_0x262383['add'](_0x5882b4),_0x5882b4;}['_bindAnnotationToEditors'](_0x1a1cfc,_0x4687e8){this['listenTo'](_0x1a1cfc,'editorReady',(_0x3afce8,_0x6118ca)=>{const _0x34b827=_0x6118ca['ui']['view']['body']['bodyCollectionContainer'];_0x4687e8['focusableElements']['add'](_0x34b827),this['context']instanceof _0x180d0b&&this['context']['ui']['focusTracker']['add'](_0x34b827);},{'priority':'highest'}),this['listenTo'](_0x1a1cfc,'editorDestroyed',(_0x208549,_0x1460c7)=>{const _0x137250=_0x1460c7['ui']['view']['body']['bodyCollectionContainer'];_0x4687e8['focusableElements']['has'](_0x137250)&&_0x4687e8['focusableElements']['remove'](_0x137250),this['context']instanceof _0x180d0b&&this['context']['ui']['focusTracker']['remove'](_0x137250);});}['_unbindEditors'](_0x522630){this['stopListening'](_0x522630,'editorReady'),this['stopListening'](_0x522630,'editorDestroyed');}['_createCommentThreadView'](_0x262baf){const _0x5b2b92=this['context']['plugins']['get'](it),{config:_0x5d768e,locale:_0x2df54f}=this['context'],_0x3736e6=lt(_0x5d768e['get']('locale'),_0x2df54f);return new(0x0,(_0x5d768e['get']('comments'))['CommentThreadView'])(_0x2df54f,_0x262baf,_0x5b2b92['me'],{'editorConfig':{..._0x5d768e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x5d768e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x5d768e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x5d768e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x5d768e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3736e6,'CommentView':_0x5d768e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5b9740,channelId:_0x12c734,resolvedAt:_0x258e07,resolvedBy:_0x55286c,isFromAdapter:_0x584e24}){if(!this['hasCommentThread'](_0x5b9740))throw new _0x3b16ef('commentsrepository-missing-comment-thread',null,{'threadId':_0x5b9740});const _0x5456b0=this['getCommentThread'](_0x5b9740);if(_0x5456b0['isResolved'])throw new _0x3b16ef('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5b9740});const _0x33aee1=this['context']['plugins']['get'](it);if(_0x5456b0['resolvedBy']=_0x33aee1['getUser'](_0x55286c),_0x5456b0['resolvedAt']=_0x258e07,_0x584e24||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x43d8e0=this['context']['plugins']['get']('PendingActions'),_0x5884ed=_0x43d8e0['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x12c734,'threadId':_0x5b9740})['then'](({resolvedAt:_0x45a5f3,resolvedBy:_0x2536d9})=>{_0x43d8e0['remove'](_0x5884ed),_0x5456b0['resolvedBy']['id']!==_0x2536d9&&(_0x5456b0['resolvedBy']=_0x33aee1['getUser'](_0x2536d9)),_0x5456b0['resolvedAt']=_0x45a5f3;})['catch'](_0x1ceb14=>{throw console['error'](_0x1ceb14),new _0x3b16ef('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4d6479,channelId:_0x214a0a,isFromAdapter:_0x465006}){if(!this['hasCommentThread'](_0x4d6479))throw new _0x3b16ef('commentsrepository-missing-comment-thread',null,{'threadId':_0x4d6479});const _0x440781=this['getCommentThread'](_0x4d6479);if(!_0x440781['isResolved'])throw new _0x3b16ef('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4d6479});if(_0x440781['resolvedBy']=null,_0x440781['resolvedAt']=null,_0x465006||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x12063e=this['context']['plugins']['get']('PendingActions'),_0x4fd2d4=_0x12063e['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x214a0a,'threadId':_0x4d6479})['then'](()=>_0x12063e['remove'](_0x4fd2d4))['catch'](_0x3ca310=>{throw console['error'](_0x3ca310),new _0x3b16ef('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5494a1,isFromAdapter:_0x2bebba}){const _0x48494a=this['getCommentThread'](_0x5494a1);if(!_0x48494a)throw new _0x3b16ef('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5494a1),this['_threads']['delete'](_0x5494a1),!_0x48494a['isSubmitted']||_0x2bebba||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5ab8a8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x142122}=_0x48494a,_0x55e254=_0x5ab8a8['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x142122,'threadId':_0x5494a1})['then'](()=>_0x5ab8a8['remove'](_0x55e254))['catch'](_0x53831e=>{throw console['error'](_0x53831e),new _0x3b16ef('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x239bf3,unlinkedAt:_0x12b080,context:_0x1a1c18,attributes:_0x18f6dc,isFromAdapter:_0x25df3d}){if('string'!=typeof _0x239bf3)throw new _0x3b16ef('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x239bf3});if(!this['hasCommentThread'](_0x239bf3))throw new _0x3b16ef('commentsrepository-missing-comment-thread',null,{'threadId':_0x239bf3});const _0x38febb=this['getCommentThread'](_0x239bf3);let _0x2f5c86=!0x1;if(void 0x0!==_0x1a1c18&&_0x38febb['context']!==_0x1a1c18&&(_0x38febb['context']=_0x1a1c18,_0x2f5c86=!0x0),void 0x0!==_0x12b080&&_0x38febb['unlinkedAt']!==_0x12b080&&(_0x38febb['unlinkedAt']=_0x12b080,_0x2f5c86=!0x0),_0x18f6dc&&!wt(_0x18f6dc,_0x38febb['attributes'])&&(_0x38febb['attributes']=_0x18f6dc,_0x2f5c86=!0x0),!_0x2f5c86)return Promise['resolve']();if(!_0x38febb['isSubmitted']||_0x25df3d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x43ad6b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x240f3a}=_0x38febb,_0x557763=_0x43ad6b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x240f3a,'threadId':_0x239bf3,'context':_0x1a1c18,'unlinkedAt':_0x12b080,'attributes':_0x18f6dc})['then'](()=>_0x43ad6b['remove'](_0x557763))['catch'](_0x424ed0=>{throw console['error'](_0x424ed0),new _0x3b16ef('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x35154b){const _0x589a8f=this['context']['plugins']['get'](O),_0x4f65b8=this['getCommentThread'](_0x35154b);if(_0x4f65b8['_isAttached']=!0x1,this['_threadToController']['has'](_0x4f65b8)){const _0x1d5a95=this['_threadToController']['get'](_0x4f65b8),_0x364b89=_0x1d5a95['view'],_0x5877ed=_0x589a8f['getByInnerView'](_0x364b89);this['_threadToController']['delete'](_0x4f65b8),this['_viewToController']['delete'](_0x364b89),_0x5877ed&&_0x589a8f['remove'](_0x5877ed),_0x1d5a95['destroy'](),_0x364b89['destroy']()['then'](()=>{this['_unbindEditors'](_0x364b89);});}}['_updateActiveAnnotation']({threadId:_0x40c566,resolvedAt:_0x348e72,unlinkedAt:_0x402c72}){const _0x495e88=!!_0x348e72,_0x10c7e8=this['context']['plugins']['get'](O),_0x3f4e4b=this['getCommentThread'](_0x40c566);if(this['_threadToController']['has'](_0x3f4e4b)){const _0x58369f=this['_threadToController']['get'](_0x3f4e4b)['view'],_0x31f5a1=_0x10c7e8['getByInnerView'](_0x58369f);_0x31f5a1&&(_0x495e88&&_0x10c7e8['_removeActiveAnnotation'](_0x31f5a1),_0x402c72?_0x31f5a1['isVisible']=!0x1:_0x31f5a1['refreshVisibility']());}}['_getExternalAuthor'](_0x340d04){const _0x459f08=this['context']['plugins']['get'](it),_0x39d740=pt('external:'+_0x340d04),_0x29c1a5=_0x459f08['getUser'](_0x39d740);return _0x29c1a5||_0x459f08['addUser']({'id':_0x39d740,'name':_0x340d04});}['_createNewComment']({threadId:_0xdc5588,commentId:_0x11073a=_0x437d75(),content:_0x4c5f4f,authorId:_0x3b1000,createdAt:_0x1855cb,attributes:_0x440830}){if('string'!=typeof _0x11073a)throw new _0x3b16ef('commentsrepository-invalid-commentid');if('string'!=typeof _0x3b1000)throw new _0x3b16ef('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4c5f4f||!_0x4c5f4f['trim']())throw new _0x3b16ef('commentsrepository-invalid-comment-content');const _0x57c790=this['context']['plugins']['get'](it)['getUser'](_0x3b1000);if(!_0x57c790)throw new _0x3b16ef('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3b1000});let _0x9c475=null,_0x5c9fa6=_0x1855cb;return _0x440830?.['@external']&&(_0x9c475=this['_getExternalAuthor'](_0x440830['@external']['authorName']),_0x5c9fa6=new Date(_0x440830['@external']['createdAt'])),new fi(this,{'threadId':_0xdc5588,'id':_0x11073a,'author':_0x9c475||_0x57c790,'creator':_0x57c790,'content':_0x4c5f4f,'createdAt':_0x1855cb,'authoredAt':_0x5c9fa6,'attributes':_0x440830});}['_addComment'](_0x30a33f){let {threadId:_0x544a34,content:_0x10c839,attributes:_0x1e4385,isFromAdapter:_0x34b99f}=_0x30a33f;const _0x4e339e=this['getCommentThread'](_0x30a33f['threadId']);if(!_0x4e339e)throw new _0x3b16ef('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x169ef0=this['_createNewComment'](_0x30a33f),{id:_0x5c0707}=_0x169ef0;if(_0x4e339e['_add'](_0x169ef0),_0x34b99f||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4e339e['isSubmitted'])return Promise['resolve']();const _0x3c1ef7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x244c28}=_0x4e339e,_0xd462fd=_0x3c1ef7['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1e4385||(_0x1e4385={}),this['adapter']['addComment']({'channelId':_0x244c28,'threadId':_0x544a34,'commentId':_0x5c0707,'content':_0x10c839,'attributes':_0x1e4385})['then'](_0x4cbee8=>{_0x3c1ef7['remove'](_0xd462fd),_0x4cbee8&&this['_updateComment']({'channelId':_0x244c28,'threadId':_0x544a34,'commentId':_0x5c0707,'createdAt':_0x4cbee8['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x219538=>{throw console['error'](_0x219538),new _0x3b16ef('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x151be0,commentId:_0x4eb8f0,content:_0x3992a6,createdAt:_0x43fea9,attributes:_0x23d56f,isFromAdapter:_0x522e8d}){if(void 0x0!==_0x3992a6&&('string'!=typeof _0x3992a6||!_0x3992a6['trim']()['length']))throw new _0x3b16ef('commentsrepository-update-comment-invalid-content');const _0x4027be=this['getCommentThread'](_0x151be0),_0x3600a8=_0x4027be['getComment'](_0x4eb8f0);if(!_0x3600a8)throw new _0x3b16ef('commentsrepository-update-missing-comment',this);let _0x2775d1=!0x1;if(_0x3992a6&&_0x3992a6!==_0x3600a8['content']&&(_0x3600a8['isEditable']||_0x522e8d)&&(_0x3600a8['content']=_0x3992a6,_0x2775d1=!0x0),_0x43fea9&&_0x43fea9!==_0x3600a8['createdAt']&&(_0x3600a8['createdAt']=_0x43fea9,_0x3600a8['attributes']&&_0x3600a8['attributes']['@external']||(_0x3600a8['authoredAt']=_0x43fea9),_0x2775d1=!0x0),_0x23d56f&&!wt(_0x23d56f,_0x3600a8['attributes'])&&(_0x3600a8['attributes']=_0x23d56f,_0x2775d1=!0x0),!_0x2775d1)return Promise['resolve']();if(_0x4027be['fire']('commentUpdated'),_0x522e8d||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1b0548=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1d2baa}=this['getCommentThread'](_0x3600a8['threadId']),_0x45397d=_0x1b0548['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1d2baa,'threadId':_0x151be0,'commentId':_0x4eb8f0,'content':_0x3992a6,'attributes':_0x23d56f})['then'](()=>_0x1b0548['remove'](_0x45397d))['catch'](_0x346b9d=>{throw console['error'](_0x346b9d),new _0x3b16ef('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1e9886,commentId:_0x105113,isFromAdapter:_0x5ef8cc}){const _0x23c75f=this['getCommentThread'](_0x1e9886),_0x4de0de=_0x23c75f['getComment'](_0x105113);if(!_0x4de0de)throw new _0x3b16ef('commentsrepository-remove-missing-comment',this);if(_0x23c75f['_remove'](_0x4de0de),_0x5ef8cc||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xb92baf=this['context']['plugins']['get']('PendingActions'),{channelId:_0x27c54c}=_0x23c75f,_0x1e530c=_0xb92baf['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x27c54c,'threadId':_0x1e9886,'commentId':_0x105113})['then'](()=>_0xb92baf['remove'](_0x1e530c))['catch'](_0x13740a=>{throw console['error'](_0x13740a),new _0x3b16ef('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x1f969f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x234438,_0xf4909d){super();const _0x1ae9ac=_0x234438['context']['plugins']['get'](it)['me'],_0x2f6499=_0x234438['getCommentThread'](_0xf4909d['threadId']),_0x749029=0x0===_0x2f6499['comments']['length'],_0x550776=_0x1ae9ac===_0xf4909d['author'];this['id']=_0xf4909d['id'],this['threadId']=_0xf4909d['threadId'],this['author']=_0xf4909d['author'],this['creator']=_0xf4909d['creator'],this['isExternal']=Boolean(_0xf4909d['attributes']&&_0xf4909d['attributes']['@external']),this['set']('content',_0xf4909d['content']),this['createdAt']=_0xf4909d['createdAt']||new Date(),this['set']('authoredAt',_0xf4909d['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2f6499,'resolvedAt'),this['set']('attributes',_0xf4909d['attributes']||{}),this['bind']('isEditable')['to'](_0x234438,'_permissions',()=>{const _0x13d476=_0x234438['getPermissions'](_0x2f6499['channelId'])['write'],_0x4800b1=_0x234438['getPermissions'](_0x2f6499['channelId'])['modifyAll'];return _0x550776&&_0x13d476||!_0x550776&&_0x4800b1;}),this['bind']('isRemovable')['to'](_0x2f6499,'isRemovable',_0x234438,'_permissions',_0xa5f9e7=>{const _0x42edcf=_0x234438['getPermissions'](_0x2f6499['channelId'])['write'],_0x30be21=_0x234438['getPermissions'](_0x2f6499['channelId'])['modifyAll'];return _0x550776&&_0x42edcf||_0xa5f9e7&&_0x749029||!_0x550776&&_0x30be21&&!_0x749029;}),this['bind']('isReadOnly')['to'](_0x2f6499,'isReadOnly'),this['_repository']=_0x234438;}get['weight'](){return Math['max'](function(_0x169164){const _0x4a899c=document['createElement']('div');return _0x4a899c['innerHTML']=_0x169164,_0x4a899c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1da917){const {threadId:_0x4cae1c,id:_0x53af3e}=this;if(!this['_repository']['hasCommentThread'](_0x4cae1c))throw new _0x3b16ef('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x34ba19}=this['_repository']['getCommentThread'](_0x4cae1c);this['_repository']['fire'](bt('updateComment',_0x34ba19,_0x4cae1c),{'channelId':_0x34ba19,'threadId':_0x4cae1c,'commentId':_0x53af3e,..._0x1da917});}['setAttribute'](_0x387f8d,_0x27459c){const _0x87d870=It(this['attributes']);At(_0x87d870,_0x387f8d,_0x27459c),this['update']({'attributes':_0x87d870});}['removeAttribute'](_0x703431){const _0x33960d=It(this['attributes']);yt(_0x33960d,_0x703431),this['update']({'attributes':_0x33960d});}['remove'](_0x34128={}){if(!_0x34128['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x21cbb7,id:_0x4b977b}=this;if(!this['_repository']['hasCommentThread'](_0x21cbb7))throw new _0x3b16ef('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4f79ce}=this['_repository']['getCommentThread'](_0x21cbb7);this['_repository']['fire'](bt('removeComment',_0x4f79ce,_0x21cbb7),{'channelId':_0x4f79ce,'threadId':_0x21cbb7,'commentId':_0x4b977b,..._0x34128});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x4625ad,..._0x548250){for(const _0x1f7add of _0x548250)void 0x0!==_0x1f7add&&(_0x4625ad+=':'+String(_0x1f7add));return _0x4625ad;}class J extends _0x3906d3{['refresh'](){const _0x1a5824=this['editor']['model']['document']['selection'];for(const _0x5f44cd of _0x1a5824['getRanges']())if(this['_hasContent'](_0x5f44cd))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x1854f2=_0x437d75()}={}){const _0x2cf593=this['editor']['model'],_0x221222=[];for(const _0x141eaf of _0x2cf593['document']['selection']['getRanges']())this['_hasContent'](_0x141eaf)&&_0x221222['push'](this['_trimToContent'](_0x141eaf));_0x2cf593['change'](_0x3246d9=>{for(const _0x417ae8 of _0x221222){const _0x355272=_0x437d75()['substr'](0x1,0x5),_0xff66eb='comment:'+_0x1854f2+':'+_0x355272;_0x3246d9['addMarker'](_0xff66eb,{'range':_0x417ae8,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x2507da){for(const _0x4bddef of _0x2507da['getItems']())if(this['_itemIsContent'](_0x4bddef))return!0x0;return!0x1;}['_itemIsContent'](_0x4481ad){return _0x4481ad['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x4481ad)&&!_0x4481ad['is']('element','tableCell');}['_trimToContent'](_0x703e5b){const _0x39f59f=_0xb4716=>!this['_itemIsContent'](_0xb4716['item']),_0x196ac4=_0x703e5b['start']['getLastMatchingPosition'](_0x39f59f),_0xc77ab9=_0x703e5b['end']['getLastMatchingPosition'](_0x39f59f,{'direction':'backward'});return this['editor']['model']['createRange'](_0x196ac4,_0xc77ab9);}}class P extends _0x387cbb{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54c283){super(_0x54c283),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x192e7b=this['editor'],_0x46df2b=_0x192e7b['model']['document']['selection'],_0x403b4b=_0x5d89fe(()=>this['refreshSelectedViews'](),0xa);_0x46df2b['on']('change:range',(_0x385e41,_0x373859)=>{_0x373859['directChange']&&(_0x403b4b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x192e7b['editing']['view']['document'],'change:isFocused',(_0x123824,_0x199fcd,_0x40f16a)=>{_0x40f16a&&_0x403b4b();}),this['listenTo'](_0x192e7b['ui']['focusTracker'],'change:isFocused',(_0x9d9990,_0x4b3761,_0x589394)=>{_0x589394||_0x192e7b['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x3d1413=>this['_editorAnnotationsData']['has'](_0x3d1413['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x582622){if(this['_editorAnnotations']['has'](_0x582622['view']))return;this['_editorAnnotations']['add'](_0x582622['view']),this['editor']['ui']['focusTracker']['add'](_0x582622['view']['element']);const _0x56f50a=this['editor']['plugins']['get'](O);this['listenTo'](_0x56f50a['collection'],'remove',(_0x33d4a9,_0x58c128)=>{this['editor']['ui']['focusTracker']['remove'](_0x58c128['view']['element']),this['_editorAnnotations']['delete'](_0x58c128['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2dab12){if('function'!=typeof _0x2dab12)throw new _0x3b16ef('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2dab12);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1955cf,annotations:_0x37827d}){const _0x49a8b1=[],_0x40a356=this['editor']['model']['document']['selection'],_0x54f476=Array['from'](_0x40a356['getRanges']());for(const [_0x190e08,_0x3cb8c6]of this['_editorAnnotationsData']){const _0x6b1cfb=_0x37c7c9(_0x3cb8c6),_0x2aea41=_0x37827d['getByInnerView'](_0x190e08);_0x6b1cfb&&_0x2aea41&&_0x49a8b1['push']({'annotation':_0x2aea41,'range':_0x6b1cfb});}function _0x37c7c9(_0x44523f){for(const _0x3451c9 of _0x44523f)for(const _0x4ac548 of _0x54f476)if(_0x3451c9['containsRange'](_0x4ac548,!_0x40a356['isCollapsed']))return _0x3451c9;return null;}return _0x49a8b1['sort']((_0x44faa2,_0x36153d)=>{const _0x4e8094=_0x44faa2['range'],_0x52703c=_0x36153d['range'];if(!_0x4e8094['isEqual'](_0x52703c)){if(_0x4e8094['containsRange'](_0x52703c,!0x0))return 0x1;if(_0x52703c['containsRange'](_0x4e8094,!0x0))return-0x1;}return _0x44faa2['annotation']==_0x1955cf?-0x1:_0x36153d['annotation']==_0x1955cf?0x1:0x0;})['map'](_0x148013=>_0x148013['annotation']);}get['_editorAnnotationsData'](){const _0x51261b=new Map();for(const _0x29d717 of Array['from'](this['_dataCollectors']))for(const [_0x13680d,_0x391558]of _0x29d717())_0x51261b['set'](_0x13680d,_0x391558);return _0x51261b;}}class st extends _0x387cbb{['afterInit'](){const _0x3e7dca=this['editor'];if(!_0x3e7dca['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3e7dca['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x387cbb{constructor(_0x2df3f1){super(_0x2df3f1),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4ff054=this['editor'],_0x1eb00c=_0x4ff054['commands']['get']('importWord'),_0x5ed1a4=_0x4ff054['plugins']['get'](it);_0x1eb00c&&(_0x1eb00c['on']('execute',(_0x5cdfa,[,_0x40aeda])=>{_0x40aeda['collaboration_features']={'comments':!0x0,'user_id':_0x5ed1a4['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1eb00c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x56e796,_0x13e922){const {comment_threads:_0x286d50}=_0x13e922;_0x286d50&&_0x286d50['forEach'](({thread_id:_0x36ffce,comments:_0x7ff8e3,is_resolved:_0xe24b6})=>{const _0x3530d7=new Date(),_0x5ebefb=_0x7ff8e3['map'](({author:_0x446355,content:_0x291d1f,created_at:_0x11b0d7})=>({'content':_0x291d1f,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x3530d7,'attributes':{'@external':{'authorName':_0x446355,'createdAt':_0x11b0d7?new Date(_0x11b0d7):new Date(),'source':'importWord'}}})),_0x2aa634=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x2aa634,'threadId':_0x36ffce,'comments':_0x5ebefb,'resolvedAt':_0xe24b6?_0x3530d7:null});});}}class at extends _0x387cbb{constructor(_0x26d1ee){super(_0x26d1ee),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5d8caf=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5d8caf,'contentInsertion',(_0x51acf0,_0x2e23dc)=>this['_removeMarkersWithoutThreads'](_0x2e23dc['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x30604e){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x30604e;const _0x19b363=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4cbd53 of _0x30604e['keys']()){const [_0x1e95aa,_0x5a5641]=_0x4cbd53['split'](':');'comment'!=_0x1e95aa||_0x19b363['hasCommentThread'](_0x5a5641)||_0x30604e['delete'](_0x4cbd53);}return _0x30604e;}['_registerMarkerInClipboardPipeline'](){const _0x464dcf=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x334ce9=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x334ce9&&_0x464dcf['_registerMarkerToCopy']('comment',_0x334ce9);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xa9e945){switch(_0xa9e945){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x387cbb{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x26a602,_0x261b34)=>{if(!_0x261b34['options']['showCommentHighlights'])return null;if(_0x261b34['options']['ignoreResolvedComments']){const {id:_0x467a9d}=er(_0x26a602['markerName']),_0xc787d8=this['editor']['plugins']['get'](o);if(_0xc787d8['getCommentThread'](_0x467a9d)?.['isResolved']&&_0x26a602['item'])return _0x261b34['consumable']['consume'](_0x26a602['item'],'addMarker:'+_0x26a602['markerName']),_0x261b34['consumable']['consume'](_0x26a602['item'],'removeMarker:'+_0x26a602['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x274f32=>{_0x274f32['on']('addMarker:comment',(_0xf1723,_0x3fe4ef,_0x3ad96d)=>{if(!_0x3ad96d['options']['showCommentHighlights'])return;const _0x46cbbb=_0x3fe4ef['item'];if(!_0x46cbbb)return;const _0x20f957=_0x3ad96d['mapper']['toViewElement'](_0x46cbbb);this['editor']['model']['schema']['isObject'](_0x46cbbb)&&_0x20f957&&!_0x20f957['getCustomProperty']('widget')&&_0x20f957['is']('containerElement')&&_0x43117b(_0x20f957,_0x3ad96d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x423850,{writer:_0x311396,options:_0x3d24e1})=>{if(!_0x3d24e1['showCommentHighlights'])return null;const _0x2543a7=_0x311396['createContainerElement']('div'),_0x411b24=_0x311396['createEmptyElement']('hr');return _0x311396['addClass']('ck-horizontal-line',_0x2543a7),_0x311396['insert'](_0x311396['createPositionAt'](_0x2543a7,0x0),_0x411b24),_0x2543a7;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2dd09a,{writer:_0x15a2ad,options:_0x198e04})=>{if(!_0x198e04['showCommentHighlights'])return null;const _0x33c82f=_0x15a2ad['createContainerElement']('span'),_0x362672=_0x15a2ad['createEmptyElement']('img');return _0x15a2ad['addClass']('image-inline',_0x33c82f),_0x15a2ad['insert'](_0x15a2ad['createPositionAt'](_0x33c82f,0x0),_0x362672),_0x33c82f;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x4b7651,{writer:_0x243544,options:_0x4792af})=>{if(_0x4792af['showCommentHighlights'])return _0x243544['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x28201b,_0x5b8528,_0x50c83f)=>{_0x50c83f['options']['showCommentHighlights']&&_0x28201b['stop']();},{'priority':'high'});}}class r extends _0x387cbb{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b7175){super(_0x1b7175),this['set']('isThreadsLoadingPaused',!0x0),_0x1b7175['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x27ae31,_0x14024d,_0x186dfe,_0x1b79b1)=>{const _0x38c194=_0x1b7175['plugins']['get'](o),_0x58cc33=_0x186dfe?er(_0x186dfe)['id']:null;_0x1b7175['model']['change'](()=>{if(_0x58cc33){const _0x4bb7b3=this['getAllMarkersForId'](_0x58cc33);for(const _0x22c7b3 of _0x4bb7b3)_0x1b7175['editing']['reconvertMarker'](_0x22c7b3);}if(_0x1b79b1){const {id:_0x160437}=er(_0x1b79b1),_0x48c60f=_0x38c194['getCommentThread'](_0x160437);if(_0x48c60f&&_0x48c60f['unlinkedAt'])return;if(_0x48c60f&&!_0x48c60f['isAttached'])return;const _0x10f406=this['getAllMarkersForId'](_0x160437);for(const _0x2f4507 of _0x10f406)_0x1b7175['editing']['reconvertMarker'](_0x2f4507);}}),_0x58cc33&&this['scrollToThreadMarker'](_0x58cc33);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5480ea=this['editor'],_0x5781f7=_0x5480ea['plugins']['get'](o),_0x27789e=_0x5480ea['config']['get']('collaboration.channelId'),_0x48891b=_0x5781f7['getCommentThreads']()['filter'](_0x70f9ed=>_0x70f9ed['channelId']!==_0x27789e);_0x5480ea['commands']['add']('addCommentThread',new J(_0x5480ea)),this['listenTo'](_0x5480ea,'change:isReadOnly',(_0x314cfa,_0x37666b,_0x5e5c3e)=>{_0x5781f7['switchReadOnly'](_0x5e5c3e,_0x5480ea['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x5781f7,ft('addCommentThread',_0x27789e),(_0xf01a1f,{threadId:_0x3bc254})=>{const _0x55e43d=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3bc254);_0x55e43d?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3bc254);}),this['listenTo'](_0x5781f7,ft('removeCommentThread',_0x27789e),(_0x43f92b,{threadId:_0x2e6685})=>{_0x5480ea['model']['enqueueChange']({'isUndoable':!0x1},_0x3a9853=>{const _0x2270ea=this['getAllMarkersForId'](_0x2e6685);for(const _0x3f2610 of _0x2270ea)_0x3a9853['removeMarker'](_0x3f2610);});}),this['listenTo'](_0x5781f7,ft('resolveCommentThread',_0x27789e),(_0x59aed7,{threadId:_0x46b503})=>{(this['_reconvertMarkers'](_0x46b503),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x46b503)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x5781f7,ft('reopenCommentThread',_0x27789e),(_0x203863,{threadId:_0x2838bb})=>{this['_reconvertMarkers'](_0x2838bb);},{'priority':'low'}),this['listenTo'](_0x5781f7,ft('addComment',_0x27789e),(_0x5b2ecc,{threadId:_0x50a778,isFromAdapter:_0x2256ef})=>{const _0x5e2f4e=this['getAllMarkersForId'](_0x50a778);if(_0x2256ef||0x0==_0x5e2f4e['length']||!_0x5781f7['hasCommentThread'](_0x50a778))return;0x1===_0x5781f7['getCommentThread'](_0x50a778)['length']&&_0x5480ea['model']['enqueueChange']({'isUndoable':!0x1},_0x238fd0=>{for(const _0x336b35 of _0x5e2f4e)_0x238fd0['updateMarker'](_0x336b35,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x48891b);}['afterInit'](){!async function(_0x295748){const _0x23f817=_0x2735cb([0x53,0x45,0x44,0x70,0x56,0x5a,0x7a,0x67,0x4f,0x39,0x74,0x4e,0x6d,0x4b,0x75,0x69,0x66,0x64,0x32,0x30,0x36,0x61,0x46,0x37,0x42,0x58,0x48,0x43,0x54,0x73,0x63,0x33,0x78,0x57,0x31,0x34,0x4c,0x6c,0x71,0x59,0x38,0x72,0x4a,0x41,0x79,0x68,0x4d,0x6a,0x55,0x76,0x47,0x62,0x6b,0x77,0x6e,0x52,0x49,0x6f,0x51,0x35,0x65,0x50]),_0x18a0a4=0x1458ce0b,_0x2f0db4=0x145fa72b^_0x18a0a4,_0x49d7da=window[_0x2735cb([0x44,0x61,0x74,0x65])][_0x2735cb([0x6e,0x6f,0x77])](),_0x1d1e8b=_0x295748[_0x2735cb([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4e7a14=new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35163b=>{_0x1d1e8b[_0x2735cb([0x6f,0x6e,0x63,0x65])](_0x2735cb([0x72,0x65,0x61,0x64,0x79]),_0x35163b);}),_0x2d6da6={[_0x2735cb([0x6b,0x74,0x79])]:_0x2735cb([0x45,0x43]),[_0x2735cb([0x75,0x73,0x65])]:_0x2735cb([0x73,0x69,0x67]),[_0x2735cb([0x63,0x72,0x76])]:_0x2735cb([0x50,0x2d,0x32,0x35,0x36]),[_0x2735cb([0x78])]:_0x2735cb([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]),[_0x2735cb([0x79])]:_0x2735cb([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]),[_0x2735cb([0x61,0x6c,0x67])]:_0x2735cb([0x45,0x53,0x32,0x35,0x36])},_0x7d5259=_0x1d1e8b[_0x2735cb([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2735cb([0x67,0x65,0x74])](_0x2735cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x590de1(){let _0xd24d2a,_0x20e1e5=null,_0x2a95d4=null;try{if(_0x7d5259==_0x2735cb([0x47,0x50,0x4c]))return _0x2735cb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xd24d2a=_0x2ed3b6(),!_0xd24d2a)return _0x2735cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xd24d2a[_0x2735cb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2a95d4=_0x5d3fa1(_0xd24d2a[_0x2735cb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xd24d2a[_0x2735cb([0x6a,0x74,0x69])])),await _0x29bedd()?_0x5dd68b()?_0x1b7e40()?_0x2735cb([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2a0a15()?(_0xd24d2a[_0x2735cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2735cb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x20e1e5=_0x1d762b(_0x2735cb([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xd24d2a[_0x2735cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2735cb([0x74,0x72,0x69,0x61,0x6c])&&(_0x20e1e5=_0x1d762b(_0x2735cb([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3136fa()):_0x2735cb([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2735cb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2735cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2735cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1b7e40(){const _0x2638b9=[_0x2735cb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2735cb([0x74,0x72,0x69,0x61,0x6c])][_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd24d2a[_0x2735cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x49d7da/0x3e8:0xe10*_0x2f0db4;return _0xd24d2a[_0x2735cb([0x65,0x78,0x70])]<_0x2638b9;}function _0x5dd68b(){const _0x332629=_0xd24d2a[_0x2735cb([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x332629)return!0x1;if(_0x332629[_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2735cb([0x2a])))return!0x0;if(_0x332629[_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2735cb([0x43,0x4d,0x54])))return!0x0;if(_0x332629[_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2735cb([0x52,0x43,0x4d,0x54]))){if(_0x3ff2b3())return!0x0;if(_0x1515c1()||_0x3115f0())return!0x0;}return!0x1;}function _0x2a0a15(){const _0x1ebeed=_0xd24d2a[_0x2735cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1ebeed||0x0==_0x1ebeed[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2e703d}=new URL(window[_0x2735cb([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1ebeed[_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e703d))return!0x0;const _0x573eb5=_0x2e703d[_0x2735cb([0x73,0x70,0x6c,0x69,0x74])](_0x2735cb([0x2e]));return _0x1ebeed[_0x2735cb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf51413=>_0xf51413[_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2735cb([0x2a])))[_0x2735cb([0x6d,0x61,0x70])](_0x4e4778=>_0x4e4778[_0x2735cb([0x73,0x70,0x6c,0x69,0x74])](_0x2735cb([0x2e])))[_0x2735cb([0x73,0x6f,0x6d,0x65])](_0x413980=>_0x573eb5[_0x2735cb([0x65,0x76,0x65,0x72,0x79])]((_0x4b487e,_0x287fec)=>_0x413980[_0x287fec]===_0x4b487e||_0x413980[_0x287fec]===_0x2735cb([0x2a])));}function _0x3136fa(){return _0x20e1e5&&_0x2a95d4?new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5edb1d,_0x3afe36)=>{_0x20e1e5[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x5edb1d,_0x3afe36),_0x2a95d4[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x22e59f=>{_0x22e59f!=_0x2735cb([0x56,0x61,0x6c,0x69,0x64])&&_0x5edb1d(_0x22e59f);},_0x3afe36);}):_0x20e1e5||_0x2a95d4||_0x2735cb([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5d3fa1(_0x4c2671,_0x3f6735){return new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x172556=>{if(_0x2860e6())return _0x172556(_0x2735cb([0x56,0x61,0x6c,0x69,0x64]));_0x1bce52(),_0x1d1e8b[_0x2735cb([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2735cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x408a70=!0x1;const _0x24c2cc=_0x437d75();function _0x4fb98a(_0x6ff9ea){return!!_0x6ff9ea&&(typeof _0x6ff9ea===_0x2735cb([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x6ff9ea===_0x2735cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x6ff9ea[_0x2735cb([0x74,0x68,0x65,0x6e])]===_0x2735cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x6ff9ea[_0x2735cb([0x63,0x61,0x74,0x63,0x68])]===_0x2735cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1250da(_0x21df98){_0xc57fef(_0x21df98)[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x224537=>{if(!_0x224537||_0x224537[_0x2735cb([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2735cb([0x6f,0x6b]))return _0x2735cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1e01f9(_0x23f628(_0x24c2cc+_0x3f6735))!=_0x224537[_0x2735cb([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2735cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2735cb([0x56,0x61,0x6c,0x69,0x64]);})[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x140f22=>(_0x2c5d81(),_0x140f22),()=>{const _0xb917fd=_0x3fe6eb();return null==_0xb917fd?(_0x2c5d81(),_0x2735cb([0x56,0x61,0x6c,0x69,0x64])):_0x2735cb(_0x49d7da-_0xb917fd>(0x30544a0b^_0x18a0a4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x172556)[_0x2735cb([0x63,0x61,0x74,0x63,0x68])](()=>{_0x172556(_0x2735cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d82b6=0x146e208b^_0x18a0a4;function _0x2c5d81(){const _0x793693=_0x2735cb([0x6c,0x6c,0x63,0x74,0x2d])+_0x1e01f9(_0x23f628(_0x4c2671)),_0x238e38=_0x2861a7(_0x1e01f9(window[_0x2735cb([0x4d,0x61,0x74,0x68])][_0x2735cb([0x63,0x65,0x69,0x6c])](_0x49d7da/_0x3d82b6)));window[_0x2735cb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2735cb([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x793693,_0x238e38);}function _0x3fe6eb(){const _0xcc210d=_0x2735cb([0x6c,0x6c,0x63,0x74,0x2d])+_0x1e01f9(_0x23f628(_0x4c2671)),_0x22cc87=window[_0x2735cb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2735cb([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xcc210d);return _0x22cc87?window[_0x2735cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2861a7(_0x22cc87),0x10)*_0x3d82b6:null;}function _0xc57fef(_0x18a07d){return new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x308085,_0x348c72)=>{_0x18a07d[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x308085,_0x348c72),window[_0x2735cb([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x348c72,0x14591acb^_0x18a0a4);});}}_0x1d1e8b[_0x2735cb([0x6f,0x6e])](_0x2735cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x346ce6,_0x16a9c3)=>{if(_0x16a9c3[0x0]!=_0x4c2671)return _0x172556(_0x2735cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x16a9c3[0x1]={..._0x16a9c3[0x1],[_0x2735cb([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x24c2cc};},{[_0x2735cb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2735cb([0x68,0x69,0x67,0x68])}),_0x1d1e8b[_0x2735cb([0x6f,0x6e])](_0x2735cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xd2973b=>{_0x4fb98a(_0xd2973b[_0x2735cb([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x408a70=!0x0,_0x1250da(_0xd2973b[_0x2735cb([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2735cb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2735cb([0x6c,0x6f,0x77])}),_0x4e7a14[_0x2735cb([0x74,0x68,0x65,0x6e])](()=>{_0x408a70||_0x172556(_0x2735cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2860e6(){return _0x1d1e8b[_0x2735cb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2735cb([0x76,0x69,0x65,0x77])][_0x2735cb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2735cb([0x61,0x75,0x74,0x6f]);}function _0x1bce52(){_0x1d1e8b[_0x2735cb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2735cb([0x76,0x69,0x65,0x77])][_0x2735cb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2735cb([0x61,0x75,0x74,0x6f]);}}function _0x1d762b(_0x64363){const _0x567e89=[new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1753b4=>setTimeout(_0x1753b4,0x1451f0c7^_0x18a0a4)),_0x4e7a14[_0x2735cb([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16f85b=>{let _0x337c46=0x0;_0x1d1e8b[_0x2735cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2735cb([0x6f,0x6e])](_0x2735cb([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x129f07,_0x11fbc0)=>{_0x11fbc0[0x0][_0x2735cb([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x337c46++,_0x337c46==(0x1458cff3^_0x18a0a4)&&(_0x16f85b(),_0x129f07[_0x2735cb([0x6f,0x66,0x66])]());});}))];return window[_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2735cb([0x72,0x61,0x63,0x65])](_0x567e89)[_0x2735cb([0x74,0x68,0x65,0x6e])](()=>_0x64363);}async function _0x26e7cc(){await _0x4e7a14,_0x1d1e8b[_0x2735cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2735cb([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x55a20f,_0x1d1e8b[_0x2735cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2735cb([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x55a20f,_0x1d1e8b[_0x2735cb([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2735cb([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3ff2b3(){return _0x8d97bc(_0x2735cb([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3549b4(_0x2735cb([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2735cb([0x73,0x74,0x61,0x74,0x65])]==_0x2735cb([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1515c1(){return _0x8d97bc(_0x2735cb([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 _0x3115f0(){return _0x8d97bc(_0x2735cb([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4542f7(_0x1ebb51){const _0x5a8bbf=_0x44b094();_0x1d1e8b[_0x5a8bbf]=_0x2735cb([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1ebb51,_0x1ebb51!=_0x2735cb([0x56,0x61,0x6c,0x69,0x64])&&_0x26e7cc();}function _0x44b094(){const _0x4e84f1=window[_0x2735cb([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2735cb([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2735cb([0x6e,0x6f,0x77])]())[_0x2735cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2735cb([0x2e]),'');let _0x1cb9be=_0x2735cb([0x53]);for(let _0xc6c0f4=0x0;_0xc6c0f4<_0x4e84f1[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xc6c0f4+=0x2){let _0x40c287=window[_0x2735cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e84f1[_0x2735cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc6c0f4,_0xc6c0f4+0x2));_0x40c287>=_0x23f817[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x40c287-=_0x23f817[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1cb9be+=_0x23f817[_0x40c287];}return _0x1cb9be;}function _0x2ed3b6(){const _0x3d800a=_0x7d5259[_0x2735cb([0x73,0x70,0x6c,0x69,0x74])](_0x2735cb([0x2e]));if(0x3!=_0x3d800a[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x35e91a(_0x3d800a[0x1]);function _0x35e91a(_0x2800c9){const _0x28c93e=_0xf734bd(_0x2800c9);return _0x28c93e&&_0x4ce526()?_0x28c93e:null;function _0x4ce526(){const _0x1b9368=_0x28c93e[_0x2735cb([0x6a,0x74,0x69])],_0x3fbb99=window[_0x2735cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b9368[_0x2735cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b9368[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4759dd={..._0x28c93e,[_0x2735cb([0x6a,0x74,0x69])]:_0x1b9368[_0x2735cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b9368[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4759dd[_0x2735cb([0x76,0x63])],_0x23f628(_0x4759dd)==_0x3fbb99;}}}async function _0x29bedd(){let _0x140f0e=!0x0;try{const _0x243d93=_0x7d5259[_0x2735cb([0x73,0x70,0x6c,0x69,0x74])](_0x2735cb([0x2e])),[_0x19ced5,_0x13bbc3,_0x1f254e]=_0x243d93;return _0x2c193f(_0x19ced5),await _0x5ca520(_0x19ced5,_0x13bbc3,_0x1f254e),_0x140f0e;}catch{return!0x1;}function _0x2c193f(_0x54b6fd){const _0x1e50ce=_0xf734bd(_0x54b6fd);_0x1e50ce&&_0x1e50ce[_0x2735cb([0x61,0x6c,0x67])]==_0x2735cb([0x45,0x53,0x32,0x35,0x36])||(_0x140f0e=!0x1);}async function _0x5ca520(_0x590bc9,_0x291bf6,_0x42c376){const _0x26014a=window[_0x2735cb([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2735cb([0x66,0x72,0x6f,0x6d])](_0x22d8af(_0x42c376),_0x5067bc=>_0x5067bc[_0x2735cb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x21bb06=new window[(_0x2735cb([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2735cb([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x590bc9+_0x2735cb([0x2e])+_0x291bf6),_0x3f56fe=window[_0x2735cb([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2735cb([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3f56fe)return;const _0x3faa48=await _0x3f56fe[_0x2735cb([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2735cb([0x6a,0x77,0x6b]),_0x2d6da6,{[_0x2735cb([0x6e,0x61,0x6d,0x65])]:_0x2735cb([0x45,0x43,0x44,0x53,0x41]),[_0x2735cb([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2735cb([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2735cb([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3f56fe[_0x2735cb([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2735cb([0x6e,0x61,0x6d,0x65])]:_0x2735cb([0x45,0x43,0x44,0x53,0x41]),[_0x2735cb([0x68,0x61,0x73,0x68])]:{[_0x2735cb([0x6e,0x61,0x6d,0x65])]:_0x2735cb([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3faa48,_0x26014a,_0x21bb06)||(_0x140f0e=!0x1);}}function _0xf734bd(_0x35a06d){return _0x35a06d[_0x2735cb([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2735cb([0x65,0x79]))?JSON[_0x2735cb([0x70,0x61,0x72,0x73,0x65])](_0x22d8af(_0x35a06d)):null;}function _0x22d8af(_0x338c27){return window[_0x2735cb([0x61,0x74,0x6f,0x62])](_0x338c27[_0x2735cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2735cb([0x2b]))[_0x2735cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2735cb([0x2f])));}function _0x23f628(_0x691535){let _0x6096c3=0x1505;function _0xeebca(_0x4795fa){for(let _0x235375=0x0;_0x235375<_0x4795fa[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x235375++){const _0x155c18=_0x4795fa[_0x2735cb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x235375);_0x6096c3=(_0x6096c3<<0x5)+_0x6096c3+_0x155c18,_0x6096c3&=_0x6096c3;}}function _0x39cf42(_0x2376cf){Array[_0x2735cb([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2376cf)?_0x2376cf[_0x2735cb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39cf42):_0x2376cf&&typeof _0x2376cf==_0x2735cb([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2735cb([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2376cf)[_0x2735cb([0x73,0x6f,0x72,0x74])]()[_0x2735cb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5f2d71,_0x32cbd0])=>{_0xeebca(_0x5f2d71),_0x39cf42(_0x32cbd0);}):_0xeebca(window[_0x2735cb([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2376cf));}return _0x39cf42(_0x691535),_0x6096c3>>>0x0;}function _0x1e01f9(_0x102d51){return _0x102d51[_0x2735cb([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2735cb([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2735cb([0x30]));}function _0x2861a7(_0x4b678e){return _0x4b678e[_0x2735cb([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2735cb([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2735cb([0x6a,0x6f,0x69,0x6e])]('');}function _0x8d97bc(_0x477ac3){return _0x1d1e8b[_0x2735cb([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2735cb([0x68,0x61,0x73])](_0x477ac3);}function _0x3549b4(_0x5e0ffc){return _0x1d1e8b[_0x2735cb([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2735cb([0x67,0x65,0x74])](_0x5e0ffc);}function _0x55a20f(){}function _0x2735cb(_0x525c8c){return _0x525c8c['map'](_0x29ae27=>String['fromCharCode'](_0x29ae27))['join']('');}_0x4542f7(await _0x590de1());}(this);}['destroy'](){const _0x443693=this['editor']['plugins']['get'](o),_0x5b6a8f=this['editor']['config']['get']('collaboration.channelId');for(const _0x133615 of _0x443693['getCommentThreads']({'channelId':_0x5b6a8f}))_0x443693['_detachCommentThread'](_0x133615['id']),_0x443693['_threads']['delete'](_0x133615['id']);super['destroy']();}['hasMarkerForId'](_0x27bed6){return this['getAllMarkersForId'](_0x27bed6)['length']>0x0;}['getAllMarkersForId'](_0xa0ef85){const _0x3aadc4=[];for(const _0x114b86 of this['editor']['model']['markers'])_0x114b86['name']['startsWith']('comment:'+_0xa0ef85)&&_0x3aadc4['push'](_0x114b86);return _0x3aadc4;}['scrollToThreadMarker'](_0x990f73){const _0x40a013=this['_getTargetForId'](_0x990f73);_0x40a013&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x990f73&&rt({'target':_0x40a013[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1657c6){this['editor']['model']['change'](()=>{for(const _0x2cc999 of this['getAllMarkersForId'](_0x1657c6))this['editor']['editing']['reconvertMarker'](_0x2cc999);});}['_attachArchivedThread'](_0x8406b5){const _0x30edff=this['editor']['plugins']['get'](o),_0x162479=this['editor']['plugins']['get'](P),_0x406b7a=_0x30edff['getCommentThread'](_0x8406b5);if(!_0x406b7a['isAttached']){const _0x5843f9=_0x406b7a['attachTo'](()=>this['_getTargetForId'](_0x406b7a['id']));_0x162479['registerAnnotation'](_0x5843f9),_0x406b7a['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x16b395=this['editor'],_0x4c64da=_0x16b395['plugins']['get'](it);_0x16b395['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d6c9d,_0xecb1f3)=>{const {id:_0x23c646}=er(_0x5d6c9d['markerName']),_0x5c9d85=_0x16b395['plugins']['get'](o)['getCommentThread'](_0x23c646),_0x15fb5d=this['activeMarker']&&er(this['activeMarker'])['id']===_0x23c646;let _0x711890;if(_0x5c9d85&&_0x5c9d85['isResolved']&&!_0x15fb5d&&_0x5d6c9d['item'])return _0xecb1f3['consumable']['consume'](_0x5d6c9d['item'],'addMarker:'+_0x5d6c9d['markerName']),_0xecb1f3['consumable']['consume'](_0x5d6c9d['item'],'removeMarker:'+_0x5d6c9d['markerName']),null;const _0x46e705=['ck-comment-marker'];return _0x15fb5d&&_0x46e705['push']('ck-comment-marker--active'),_0x711890=_0x5c9d85?.['length']?_0x5c9d85['comments']['first']['author']['id']:_0x4c64da['me']['id'],{'classes':_0x46e705,'attributes':{'data-comment':_0x23c646,'data-author-id':_0x711890}};}}),_0x16b395['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x518060,{options:_0x3cef00})=>{if(_0x3cef00['showCommentHighlights'])return null;const _0x12c0ec=_0x16b395['plugins']['get'](o),_0x2cec90=_0x16b395['model']['markers']['get'](_0x518060),{id:_0x400137,part:_0x4035b9}=er(_0x518060);return _0x2cec90&&!_0x2cec90['affectsData']||_0x3cef00['ignoreResolvedComments']&&_0x12c0ec['getCommentThread'](_0x400137)?.['isResolved']?null:{'group':'comment','name':_0x4035b9?_0x400137+':'+_0x4035b9:_0x400137};}}),_0x16b395['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5630de,{writer:_0x29b68a})=>_0x29b68a['createElement']('$marker',{'data-name':'comment:'+_0x5630de['getAttribute']('id')})}),_0x16b395['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3f2928=this['editor'],_0x1a5f03=_0x3f2928['plugins']['get'](o),_0x2eeadf=new Set(),_0x5c447b=new Set();_0x3f2928['model']['document']['registerPostFixer'](_0x1cc7b2=>{let _0x44836d=!0x1;for(const {name:_0x5f4330,data:_0x15c0d3}of _0x3f2928['model']['document']['differ']['getChangedMarkers']()){const {group:_0x48ab9d,id:_0x26545b}=er(_0x5f4330);let _0x55f364=_0x15c0d3['newRange'];if('comment'!==_0x48ab9d||!_0x55f364)continue;const _0x28419a='$graveyard'===_0x55f364['root']['rootName'];_0x28419a||(_0x55f364=dt(_0x55f364,_0x3f2928['model']),!_0x55f364||_0x55f364['isCollapsed']||!_0x15c0d3['newRange']||_0x55f364['isEqual'](_0x15c0d3['newRange']))?_0x3f2928['model']['hasContent'](_0x55f364)&&!_0x28419a?this['isThreadsLoadingPaused']?_0x2eeadf['add'](_0x5f4330):this['_handleThreadMarker'](_0x5f4330,_0x26545b):(_0x5c447b['add'](_0x5f4330),_0x2eeadf['delete'](_0x5f4330),_0x1cc7b2['removeMarker'](_0x5f4330),_0x44836d=!0x0):(_0x1cc7b2['updateMarker'](_0x5f4330,{'range':_0x55f364}),_0x44836d=!0x0);}return _0x44836d;}),this['on']('change:isThreadsLoadingPaused',(_0x79cca8,_0xb76b0,_0x46b6cc)=>{if(!_0x46b6cc&&_0x2eeadf['size'])for(const _0xc3af0a of _0x2eeadf){const {id:_0x55a2f1}=er(_0xc3af0a);_0x2eeadf['delete'](_0xc3af0a),_0x3f2928['model']['markers']['get'](_0xc3af0a)&&this['_handleThreadMarker'](_0xc3af0a,_0x55a2f1);}}),this['listenTo'](_0x3f2928['model']['document'],'change',()=>{for(const {name:_0x39edda,data:{newRange:_0x5f5198}}of _0x3f2928['model']['document']['differ']['getChangedMarkers']()){const {group:_0x734db4,id:_0x1d7a8e}=er(_0x39edda);if('comment'!==_0x734db4)continue;const _0x5144f0=_0x1a5f03['getCommentThread'](_0x1d7a8e),_0x33ecc7=this['hasMarkerForId'](_0x1d7a8e);_0x5144f0&&(!_0x5144f0['_hasTargetInContent']&&_0x5f5198&&_0x3f2928['editing']['view']['once']('render',()=>{const _0x2c94d6=_0x3f2928['plugins']['get'](O),_0x110b7b=_0x1a5f03['_threadToController']['get'](_0x5144f0)['view'];_0x2c94d6['getByInnerView'](_0x110b7b)['refreshVisibility']();},{'priority':'low'}),_0x5144f0['_hasTargetInContent']=_0x33ecc7||!!_0x5f5198),_0x5f5198||(_0x5c447b['add'](_0x39edda),_0x2eeadf['delete'](_0x39edda));}for(const _0x3cf388 of _0x5c447b){const {id:_0x453a2c}=er(_0x3cf388),_0x278041=_0x1a5f03['getCommentThread'](_0x453a2c);if(_0x2eeadf['delete'](_0x3cf388),!_0x278041)continue;const _0x3a9ef6=this['hasMarkerForId'](_0x453a2c);_0x3a9ef6||_0x278041['isSubmitted']?_0x3a9ef6||_0x278041['unlinkedAt']||_0x278041['setUnlinkedAt'](new Date()):_0x278041['remove']();}_0x5c447b['clear']();});}['_handleInitialThreads'](_0x1efaeb){_0x1efaeb['forEach'](_0x3b5f76=>{_0x3b5f76['unlinkedAt']&&this['_attachArchivedThread'](_0x3b5f76['id']);});}['_getTargetForId'](_0x9483be){const _0x11f87b=this['editor'],_0x53de90=this['getAllMarkersForId'](_0x9483be);return et(_0x11f87b['editing'],_0x53de90);}['_getTextContext'](_0x4c8f01){const _0x5080d7=this['getAllMarkersForId'](_0x4c8f01);let _0xf77d3e='',_0x395c50=!0x1;for(const _0x20f628 of _0x5080d7){const _0x30ee66=_0x20f628['getRange']();for(const _0x7207c8 of Array['from'](_0x30ee66['getItems']()))_0x7207c8['is']('$textProxy')?(_0xf77d3e&&_0x395c50&&(_0xf77d3e+='\x20',_0x395c50=!0x1),_0xf77d3e+=_0x7207c8['data']):_0x395c50=!0x0;_0x395c50=!0x0;}return _0xf77d3e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5b2d32,_0x2f0b0b){const _0x208b85=this['editor'],_0x4e6dd5=_0x208b85['plugins']['get'](o);let _0x23825f=_0x4e6dd5['getCommentThread'](_0x2f0b0b);const _0x569b99=_0x208b85['config']['get']('collaboration.channelId'),_0x453da1=_0x208b85['plugins']['get'](P);if(_0x23825f&&(_0x23825f['unlinkedAt']&&_0x23825f['setUnlinkedAt'](null),_0x23825f['isAttached']))return _0x23825f;return!this['getAllMarkersForId'](_0x2f0b0b)[0x0]['managedUsingOperations']?_0x208b85['editing']['view']['once']('render',()=>{if(_0x4e6dd5['getCommentThread'](_0x2f0b0b))return;const _0x420965=_0x208b85['plugins']['get'](O);_0x23825f=_0x4e6dd5['openNewCommentThread']({'channelId':_0x569b99,'threadId':_0x2f0b0b,'target':()=>this['_getTargetForId'](_0x2f0b0b),'context':{'type':'text','value':this['_getTextContext'](_0x2f0b0b)}});const _0x28983=_0x4e6dd5['_threadToController']['get'](_0x23825f)['view'],_0x4b35b5=_0x420965['getByInnerView'](_0x28983);_0x4b35b5&&_0x453da1['registerAnnotation'](_0x4b35b5);},{'priority':'low'}):_0x4e6dd5['fetchCommentThread']({'channelId':_0x569b99,'threadId':_0x2f0b0b})['then'](_0x241f1d=>{if('destroyed'!==_0x208b85['state']){if(_0x23825f=_0x241f1d,_0x23825f&&!_0x23825f['isAttached']){const _0x35c5ac=_0x23825f['attachTo'](()=>this['_getTargetForId'](_0x2f0b0b));_0x453da1['registerAnnotation'](_0x35c5ac),_0x23825f['isResolved']&&this['_reconvertMarkers'](_0x2f0b0b);}else{if(!_0x23825f){const _0x40576c=this['getAllMarkersForId'](_0x2f0b0b);_0x208b85['model']['change'](_0x2659eb=>{for(const _0x4398b0 of _0x40576c)_0x2659eb['removeMarker'](_0x4398b0);});}}}}),_0x23825f;}['_handleThreadMarker'](_0x2b833b,_0x4a6f3b){const _0x58ffd2=this['_attachMarkerToThread'](_0x2b833b,_0x4a6f3b);_0x58ffd2&&!_0x58ffd2['context']&&_0x58ffd2['setContext']({'type':'text','value':this['_getTextContext'](_0x4a6f3b)});}['_initAriaMarkerChangeAnnouncements'](){const _0x47d6fa=this['editor'];ot(_0x47d6fa['model'],({left:_0x58093f,entered:_0x4b6b06})=>{for(const _0x1d42ec of _0x58093f)if(mt(_0x1d42ec)){_0x47d6fa['ui']['ariaLiveAnnouncer']['announce'](E(_0x47d6fa['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x29f6cc of _0x4b6b06)if(mt(_0x29f6cc)){_0x47d6fa['ui']['ariaLiveAnnouncer']['announce'](E(_0x47d6fa['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x10ebc1)));break;}});}}function ft(_0x5bddd1,_0x18eb51){return _0x18eb51?_0x5bddd1+':'+_0x18eb51:_0x5bddd1;}function er(_0x4a6e63){const _0x356323=_0x4a6e63['split'](':');return{'group':_0x356323[0x0],'id':_0x356323[0x1],'part':_0x356323[0x2]};}function dt(_0x24d2f5,_0x99d230){const _0x2320d1=_0x99d230['schema'],_0x31db6e=_0x99d230['createRange'](_0x24d2f5['start']);for(const _0x1c0b33 of _0x24d2f5['getWalker']()){const {type:_0x1689a5,item:_0x31ca1b,nextPosition:_0x4df13c}=_0x1c0b33;if('text'===_0x1689a5||_0x2320d1['isObject'](_0x31ca1b)){const _0x2e631b=_0x99d230['createPositionBefore'](_0x31ca1b);_0x31db6e['isCollapsed']&&(_0x31db6e['start']=_0x2e631b),_0x31db6e['end']=_0x4df13c;}}return _0x31db6e;}function mt(_0x3f2218){return'comment'===er(_0x3f2218['name'])['group'];}class i extends _0x387cbb{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x231f67=this['editor'],_0x24506a=_0x231f67['plugins']['get'](o),_0x3153bd=_0x231f67['plugins']['get'](r),_0x4884d5=_0x231f67['plugins']['get'](O),_0x2b7b20=_0x231f67['plugins']['get'](P);_0x231f67['ui']['componentFactory']['add']('comment',()=>{const _0x1e3ac0=this['_createUIButton'](_0x5134f9);return _0x1e3ac0['tooltip']=!0x0,_0x1e3ac0;}),_0x231f67['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x180ec2)),_0x2b7b20['addSourceCollector'](()=>{const _0x379c30=[];for(const [_0x4290e2,_0x509079]of _0x24506a['_threadToController']){const _0x45cd9c=_0x3153bd['getAllMarkersForId'](_0x4290e2['id']),_0x4a254d=_0x45cd9c['map'](_0x551efb=>_0x551efb['getRange']());_0x45cd9c['length']>0x0&&_0x379c30['push']([_0x509079['view'],_0x4a254d]);}return _0x379c30;}),this['listenTo'](_0x4884d5,'change:activeAnnotations',(_0x4be854,_0x5cf5a1,_0x3588ea)=>{const _0x590463=Array['from'](_0x3588ea)['map'](_0x9a6c1e=>_0x9a6c1e['innerView'])['find'](_0x5b14d5=>_0x24506a['_viewToController']['has'](_0x5b14d5));if(!_0x590463)return void(_0x3153bd['activeMarker']=null);const _0x2f5544=_0x24506a['_viewToController']['get'](_0x590463)['model']['id'],_0x4425ea='comment:'+_0x2f5544;_0x2f5544&&_0x3153bd['hasMarkerForId'](_0x2f5544)?_0x3153bd['activeMarker']=_0x4425ea:_0x3153bd['activeMarker']&&(_0x3153bd['activeMarker']=null);}),this['listenTo'](_0x24506a,'removeCommentThread',(_0x2e5d79,{threadId:_0x152040,isFromAdapter:_0x59efa3})=>{!_0x59efa3&&_0x231f67['ui']['focusTracker']['isFocused']&&_0x3153bd['hasMarkerForId'](_0x152040)&&_0x231f67['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x24506a,'addComment',(_0x934270,{threadId:_0x2f8a44,isFromAdapter:_0x1bc5c1})=>{if(_0x1bc5c1||!_0x3153bd['hasMarkerForId'](_0x2f8a44)||!_0x24506a['hasCommentThread'](_0x2f8a44))return;0x1===_0x24506a['getCommentThread'](_0x2f8a44)['length']&&(_0x231f67['editing']['view']['focus'](),_0x934270['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x32c0ae=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x12f656;for(const _0x2a2687 in _0x32c0ae){const _0x1cf358=_0x2a2687,_0x3475fa=_0x32c0ae[_0x1cf358];if('commentsLicenseKeyValid'==_0x3475fa||'commentsLicenseKeyInvalid'==_0x3475fa||'commentsLicenseKeyExpired'==_0x3475fa||'commentsLicenseKeyDomainLimit'==_0x3475fa||'commentsLicenseKeyNotAllowed'==_0x3475fa||'commentsLicenseKeyEvaluationLimit'==_0x3475fa||'commentsLicenseKeyTrialLimit'==_0x3475fa||'commentsLicenseKeyUsageLimit'==_0x3475fa){delete _0x32c0ae[_0x1cf358],_0x12f656=_0x3475fa,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x12f656&&_0x32c0ae['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x12f656&&_0x32c0ae['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x12f656&&_0x32c0ae['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x12f656&&_0x32c0ae['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x12f656&&_0x32c0ae['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x12f656&&_0x32c0ae['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x12f656&&_0x32c0ae['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3dfecc){const _0x5967d0=this['editor'],_0x424501=new _0x3dfecc(_0x5967d0['locale']),_0x225e8c=_0x5967d0['commands']['get']('addCommentThread');return _0x424501['set']({'label':E(_0x5967d0['locale'],'Comment'),'icon':_0x5e46cc}),_0x424501['bind']('isEnabled')['to'](_0x225e8c),this['listenTo'](_0x424501,'execute',()=>{_0x225e8c['execute']();}),_0x424501;}}class s extends _0x387cbb{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x51419f){super(_0x51419f),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x25621e,_0x1d54f0,_0x8f2c62)=>{_0x8f2c62?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x344609,_0x181131]of this['editor']['commands'])_0x181131['affectsData']&&'addCommentThread'!==_0x344609&&_0x181131['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x192f41=this['editor']['editing']['view']['document'];this['listenTo'](_0x192f41,'cut',_0x126f7b=>_0x126f7b['stop'](),{'priority':'highest'}),this['listenTo'](_0x192f41,'clipboardInput',_0x7b4ee5=>_0x7b4ee5['stop'](),{'priority':'highest'}),this['listenTo'](_0x192f41,'delete',_0x389fb4=>_0x389fb4['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x488487,_0x359266]of this['editor']['commands'])_0x359266['affectsData']&&'addCommentThread'!==_0x488487&&_0x359266['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 M extends _0x1318aa{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe57ae8){super(_0xe57ae8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x436989=this['context']['plugins']['get'](O);this['listenTo'](_0x436989,'_activateAnnotation',(_0x2deef6,_0x502a91)=>{for(const _0x4130b5 of this['activeUIs']){const _0x3f169c=this['_uis']['get'](_0x4130b5);(0x0,this['uisData']['get'](_0x4130b5)['filter'])(_0x502a91)&&_0x3f169c['setActiveAnnotation'](_0x502a91);}}),this['listenTo'](_0x436989,'_deactivateAllAnnotations',()=>{for(const _0x458e07 of this['activeUIs']){this['_uis']['get'](_0x458e07)['setActiveAnnotation'](null);}}),this['listenTo'](_0x436989['_visibleAnnotations'],'add',(_0x518d3d,_0x3896bc)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3896bc);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0xd23b7d){return this['activeUIs']['has'](_0xd23b7d);}['activate'](_0x455e27,_0x15340e=this['defaultFilter']){const _0xac90d2=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x455e27))throw new _0x3b16ef('annotationsuis-missing-ui',this,{'uiName':_0x455e27});this['isActive'](_0x455e27)&&this['deactivate'](_0x455e27),this['activeUIs']['add'](_0x455e27);const _0x4f12e8=new _();!function({source:_0x2b431b,target:_0x2f5bb1,filter:_0x4f3794}){for(const _0x1819cd of _0x2b431b)_0x4f3794(_0x1819cd)&&_0x2f5bb1['add'](_0x1819cd);_0x2f5bb1['listenTo'](_0x2b431b,'add',(_0x15f881,_0x44e67c)=>{_0x4f3794(_0x44e67c)&&_0x2f5bb1['add'](_0x44e67c);}),_0x2f5bb1['listenTo'](_0x2b431b,'remove',(_0x448eb4,_0x26dccb)=>{_0x2f5bb1['has'](_0x26dccb)&&_0x2f5bb1['remove'](_0x26dccb);});}({'source':_0xac90d2['_visibleAnnotations'],'target':_0x4f12e8,'filter':_0x15340e}),this['uisData']['set'](_0x455e27,{'collection':_0x4f12e8,'filter':_0x15340e});const _0x3f1d89=this['_uis']['get'](_0x455e27);_0x3f1d89['attach'](_0x4f12e8),this['listenTo'](_0x3f1d89,'change:activeAnnotation',(_0x16ce4c,_0x4cb693,_0x33c3e9,_0x3849dc)=>{_0x3849dc&&_0xac90d2['_removeActiveAnnotation'](_0x3849dc),_0x33c3e9&&_0xac90d2['_addActiveAnnotation'](_0x33c3e9);});}['deactivate'](_0x185c34){if(this['activeUIs']['delete'](_0x185c34),!this['_uis']['has'](_0x185c34))throw new _0x3b16ef('annotationsuis-missing-ui',this,{'uiName':_0x185c34});const _0xcccf51=this['_uis']['get'](_0x185c34);_0xcccf51['detach'](),this['stopListening'](_0xcccf51),this['uisData']['get'](_0x185c34)['collection']['destroy'](),this['uisData']['delete'](_0x185c34);}['switchTo'](_0x3a2a4b){if(!this['_uis']['has'](_0x3a2a4b))throw new _0x3b16ef('annotationsuis-missing-ui',this,{'uiName':_0x3a2a4b});const _0x3969a3=this['context']['plugins']['get'](O),_0x1fcc41=Array['from'](_0x3969a3['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3a2a4b);const _0x49aaa3=this['_uis']['get'](_0x3a2a4b);_0x49aaa3['setActiveAnnotation'](_0x1fcc41),_0x49aaa3['_setSelectedAnnotations']&&_0x1fcc41&&_0x49aaa3['_setSelectedAnnotations']([_0x1fcc41]);}['deactivateAll'](){for(const _0x5462a6 of this['activeUIs'])this['deactivate'](_0x5462a6);}['register'](_0x59fc99,_0x594ca0){if(this['_uis']['has'](_0x59fc99))throw new _0x3b16ef('annotationsuis-register-already-registered');if('function'!=typeof _0x594ca0['attach']||'function'!=typeof _0x594ca0['detach']||'function'!=typeof _0x594ca0['setActiveAnnotation'])throw new _0x3b16ef('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x59fc99,_0x594ca0);}['refilterAnnotations'](){const _0x519c96=this['context']['plugins']['get'](O)['collection'],_0x127bc8=new Map(),_0x19168a=Array['from'](this['activeUIs']);for(const _0xd466c2 of this['activeUIs']){const _0x4cb00a=this['uisData']['get'](_0xd466c2)['collection'];for(const _0x58cff5 of _0x4cb00a)_0x127bc8['set'](_0x58cff5,_0xd466c2);}for(const _0x596a25 of _0x519c96){const _0x840718=_0x127bc8['get'](_0x596a25);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x596a25);const _0x1749df=_0x19168a['find'](_0x282499=>this['uisData']['get'](_0x282499)['filter'](_0x596a25));_0x840718!==_0x1749df&&(_0x840718&&this['uisData']['get'](_0x840718)['collection']['remove'](_0x596a25),_0x1749df&&this['uisData']['get'](_0x1749df)['collection']['add'](_0x596a25));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5448e6){const _0x4827d0=[];for(const _0x4d361c of this['activeUIs']){(0x0,this['uisData']['get'](_0x4d361c)['filter'])(_0x5448e6)&&_0x4827d0['push'](_0x4d361c);}if(_0x4827d0['length']>0x1)throw new _0x3b16ef('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4827d0,'annotationType':_0x5448e6['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x5707a4){super(_0x5707a4);const _0x4206c1=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 _0x1e0a9c(),this['focusCycler']=new _0x1ca448({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4206c1['to']('class')],'style':{'minHeight':_0x4206c1['to']('minHeight',_0x195147=>'number'==typeof _0x195147?pi(_0x195147+0xa):null)},'dir':_0x5707a4['uiLanguageDirection'],'role':'application','aria-label':E(_0x5707a4,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x5707a4,'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',_0x45ebbe=>{this['_updateItemPositionInFocusables'](_0x45ebbe['source']);}),this['list']['forEach'](_0x1c1120=>{this['focusTracker']['add'](_0x1c1120['element']),this['_updateItemPositionInFocusables'](_0x1c1120);}),this['list']['on']('change',(_0x267954,_0x18a435)=>{for(const _0x1f1e10 of _0x18a435['removed'])this['focusTracker']['remove'](_0x1f1e10['element']),this['focusables']['remove'](_0x1f1e10);for(const _0x3b7919 of _0x18a435['added'])this['focusTracker']['add'](_0x3b7919['element']),this['_updateItemPositionInFocusables'](_0x3b7919);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x4a1a9f){const _0x4fe9f5=this['focusables']['getIndex'](_0x4a1a9f);let _0x104284,_0x26da88;for(const _0xc0e488 of this['focusables'])if(_0x4a1a9f['top']<_0xc0e488['top']){_0x104284=_0xc0e488;break;}if(_0x26da88=_0x104284?this['focusables']['getIndex'](_0x104284):this['focusables']['length'],-0x1!==_0x4fe9f5){if(_0x4fe9f5===_0x26da88-0x1)return;this['focusables']['remove'](_0x4a1a9f),_0x26da88=_0x104284?this['focusables']['getIndex'](_0x104284):this['focusables']['length'];}this['focusables']['add'](_0x4a1a9f,_0x26da88);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0xb366f){super(_0xb366f),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2bb62e,_0xd95bb4)=>_0x2bb62e+_0xd95bb4),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x499b67=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x499b67['to']('isAnimationDisabled',_0x1dfde4=>_0x1dfde4?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x499b67['to']('top',_0x2f7017=>Ht(_0x2f7017))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x24928a=this['element']['clientHeight'];_0x24928a&&(this['height']=_0x24928a);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1318aa{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x26fe10){super(_0x26fe10),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 _0x4fa2aa=this['context']['config']['get']('sidebar.container');_0x4fa2aa&&this['setContainer'](_0x4fa2aa);}['setContainer'](_0x1358ce){if(!y(_0x1358ce))throw new _0x3b16ef('sidebar-setcontainer-invalid-element');this['container']=_0x1358ce;}['_attachToContainer']({viewClass:_0x351ed7='',spaceBetweenItems:_0x4c39be=0x19}={}){if(!y(this['container']))throw new _0x3b16ef('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x351ed7,this['_spaceBetweenItems']=_0x4c39be;}['rearrange']({removedAnnotation:_0x14f5ea,previousAnnotation:_0x26323f,nextAnnotation:_0x4cfc8a}){const _0x4a3826=this['getSidebarItemView'](_0x14f5ea);this['view']['list']['remove'](_0x4a3826),this['_destroySidebarItemView'](_0x14f5ea),_0x26323f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x26323f)),_0x4cfc8a&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4cfc8a)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3ce848,activatedAnnotation:_0x8b1e78,disableAnimationOnActivatedAnnotation:_0x406cb3}){if(this['_activeAnnotation']=_0x8b1e78,_0x3ce848){_0x3ce848['isActive']=!0x1;const _0x1c1538=this['getSidebarItemView'](_0x3ce848);_0x1c1538&&_0x406cb3&&(_0x1c1538['isAnimationDisabled']=!0x1);}if(_0x8b1e78){const _0x4478d2=this['getSidebarItemView'](_0x8b1e78);_0x4478d2&&(_0x8b1e78['isActive']=!0x0,_0x406cb3&&(_0x4478d2['isAnimationDisabled']=!0x0,_0x4478d2['top']+=0x1),this['_alignToTargetRect'](_0x4478d2));}}['_detachFromContainer'](_0x500479){if(this['view']['element']['remove'](),_0x500479){for(const _0x32eb79 of _0x500479)this['_destroySidebarItemView'](_0x32eb79);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5e0335,_0x33e667){_0x33e667||(_0x33e667=_0x5e0335['view']);const _0x24488c=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x24488c,_0x5e0335),this['_annotationToSidebarItemView']['set'](_0x5e0335,_0x24488c),_0x24488c['content']['add'](_0x33e667),this['listenTo'](_0x5e0335['view'],'change:targetRect',(_0x55d745,_0x535726,_0x17effa)=>{const _0x404679=this['_getTargetTop'](_0x5e0335,_0x17effa);_0x24488c['_targetTop']!=_0x404679&&(_0x24488c['_targetTop']=_0x404679,this['_setItemTop'](_0x24488c,_0x404679));}),this['listenTo'](_0x24488c,'change:top',()=>{this['_recalculate'](_0x24488c,'top');}),this['listenTo'](_0x24488c,'change:bottom',()=>{this['_recalculate'](_0x24488c,'bottom');}),this['_alignToTargetRect'](_0x24488c);const _0x4f29d5=this['_getItemBefore'](_0x24488c);if(_0x4f29d5)this['_alignAfterItem'](_0x4f29d5,_0x24488c)||this['_alignToTargetRect'](_0x24488c);else this['_alignToTargetRect'](_0x24488c);return this['_updateLastItem'](),this['view']['list']['add'](_0x24488c),_0x24488c;}['_alignForTopChange'](_0x5bd022){if(!_0x5bd022['content']['length'])return;const _0x306cb6=this['_getItemBefore'](_0x5bd022);if(!_0x306cb6)return;const _0x332fb1=this['_sidebarItemViewToAnnotation']['get'](_0x306cb6),_0xf462c2=this['_activeAnnotation'];_0xf462c2&&_0xf462c2===_0x332fb1?this['_alignAfterItem'](_0x306cb6,_0x5bd022):this['_alignBeforeItem'](_0x5bd022,_0x306cb6);}['_alignForBottomChange'](_0x38f055){if(!_0x38f055['content']['length'])return;const _0x4c27c5=this['_getItemAfter'](_0x38f055);if(!_0x4c27c5)return;const _0x452dcf=this['_sidebarItemViewToAnnotation']['get'](_0x4c27c5),_0x530752=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xccb116=this['_activeAnnotation'];_0xccb116&&_0xccb116===_0x452dcf&&_0x530752?(this['_alignBeforeItem'](_0x4c27c5,_0x38f055),this['_alignAfterItem'](_0x38f055,_0x4c27c5)):_0xccb116&&_0xccb116===_0x452dcf?this['_alignBeforeItem'](_0x4c27c5,_0x38f055):this['_alignAfterItem'](_0x38f055,_0x4c27c5);}['_recalculate'](_0x2af35b,_0x1b881a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1bae71,changedProp:_0x569bf8}of this['_recalculateBuffer'])'top'===_0x569bf8?this['_alignForTopChange'](_0x1bae71):this['_alignForBottomChange'](_0x1bae71);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2af35b,'changedProp':_0x1b881a});}['getSidebarItemView'](_0x4971da){return this['_annotationToSidebarItemView']['get'](_0x4971da);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x12c475){const _0x44d4a5=this['getSidebarItemView'](_0x12c475);this['stopListening'](_0x44d4a5),this['stopListening'](_0x12c475['view']),_0x44d4a5['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x12c475),this['_sidebarItemViewToAnnotation']['delete'](_0x44d4a5);}['_createSidebarView'](){const _0x255ed4=new F(this['context']['locale']);return _0x255ed4['render'](),this['on']('change:_lastItem',(_0x33b3d3,_0x4e4002,_0x8bf589,_0x5b3a2d)=>{_0x5b3a2d&&_0x255ed4['unbind']('minHeight'),_0x8bf589?_0x255ed4['bind']('minHeight')['to'](_0x8bf589,'bottom'):_0x255ed4['minHeight']=null;}),_0x255ed4;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4ed8d5){const _0x1eec87=this['_sidebarItemViewToAnnotation']['get'](_0x4ed8d5),_0x52c6e0=_0x1eec87&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1eec87)-0x1);return _0x52c6e0&&this['getSidebarItemView'](_0x52c6e0)||null;}['_getItemAfter'](_0x49db49){const _0x181102=this['_sidebarItemViewToAnnotation']['get'](_0x49db49),_0x5f1c3d=_0x181102&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x181102)+0x1);return _0x5f1c3d&&this['getSidebarItemView'](_0x5f1c3d)||null;}['_alignBeforeItem'](_0x150912,_0x4017ed){_0x150912['updateHeight']();const _0x46ea06=R(_0x4017ed['bottom']+this['_spaceBetweenItems'],_0x150912['top']);return!!_0x46ea06&&(this['_setItemTop'](_0x4017ed,_0x4017ed['top']-_0x46ea06),!0x0);}['_alignAfterItem'](_0x3f75f7,_0x5963b0){_0x3f75f7['updateHeight']();const _0x496506=R(_0x3f75f7['bottom']+this['_spaceBetweenItems'],_0x5963b0['top']);return!!_0x496506&&(this['_setItemTop'](_0x5963b0,_0x5963b0['top']+_0x496506,!0x1),!0x0);}['_alignToTargetRect'](_0x289fe9){const _0x5d7e66=this['_sidebarItemViewToAnnotation']['get'](_0x289fe9);if(!_0x5d7e66||!_0x5d7e66['target']||!_0x5d7e66['targetRect'])return;const _0x2b5691=this['_getTargetTop'](_0x5d7e66,_0x5d7e66['targetRect']);this['_setItemTop'](_0x289fe9,_0x2b5691);}['_getTargetTop'](_0x5e37ca,_0x485b16){if(null===_0x485b16)return 0x0;if(_0x5e37ca['target']instanceof _0x521279)return _0x485b16['top'];{const _0x3105c4=new _0x521279(this['view']['element'])['top'];return _0x485b16['top']-_0x3105c4;}}['_setItemTop'](_0xc92fd9,_0x2e6fbf,_0x570d03=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x570d03&&(_0x2e6fbf=Math['max'](_0x2e6fbf,this['_getMaxAvailableTop'](_0xc92fd9))),_0xc92fd9['top']=_0x2e6fbf;}['_getMaxAvailableTop'](_0xb99f63){let _0x26197e=this['_getItemBefore'](_0xb99f63),_0x50a29a=0x0;for(;_0x26197e;)_0x26197e['updateHeight'](),_0x50a29a+=this['_spaceBetweenItems']+_0x26197e['height'],_0x26197e=this['_getItemBefore'](_0x26197e);return _0x50a29a;}}function R(_0x3ac2f8,_0x11cee){return Math['max'](_0x3ac2f8-_0x11cee,0x0);}function y(_0x4abb58){return null!==_0x4abb58&&'object'==typeof _0x4abb58&&0x1===_0x4abb58['nodeType'];}class e extends _0x1318aa{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2e1446){super(_0x2e1446),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x41f317(),this['_refreshPositioningDebounced']=_0x5d89fe(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5a5536=this['context']['plugins']['get'](M),_0x3a8615=this['context']['plugins']['get'](z);_0x5a5536['register']('wideSidebar',this),_0x3a8615['container']&&_0x5a5536['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3c62da){if(_0x3c62da===this['activeAnnotation'])return;const _0x3326f0=this['context']['plugins']['get'](z);_0x3326f0['_activeAnnotation']=_0x3c62da;const _0x55768e=this['activeAnnotation'];_0x3326f0['refresh']({'blurredAnnotation':_0x55768e,'activatedAnnotation':_0x3c62da}),this['activeAnnotation']=_0x3c62da;}['attach'](_0x1232df){this['annotations']=_0x1232df;const _0x4d89db=this['context']['plugins']['get'](z);if(_0x4d89db['_annotations']=_0x1232df,this['isAttached'])throw new _0x3b16ef('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4d89db,'set:container',()=>{this['detach'](),this['listenTo'](_0x4d89db,'change:container',_0x2d3d60=>{_0x2d3d60['off'](),this['attach'](_0x1232df);});}),_0x4d89db['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4da5d8=_0x2c8604=>{_0x2c8604['updateTargetRect'](),_0x4d89db['addAnnotation'](_0x2c8604);};for(const _0x5dd6c5 of _0x1232df)_0x4da5d8(_0x5dd6c5);this['listenTo'](_0x1232df,'add',(_0x206a43,_0x435e69)=>{_0x4da5d8(_0x435e69);}),this['listenTo'](_0x1232df,'remove',(_0x4c4010,_0x224e47,_0x4f4228)=>{_0x4d89db['rearrange']({'removedAnnotation':_0x224e47,'previousAnnotation':_0x1232df['get'](_0x4f4228-0x1),'nextAnnotation':_0x1232df['get'](_0x4f4228+0x1)}),_0x224e47===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1232df,'focus',(_0x2064cb,_0x8d0ceb)=>{this['setActiveAnnotation'](_0x8d0ceb);}),this['listenTo'](_0x1232df,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1dd72e=this['context']instanceof _0x3fe096?this['context']['editors']:new _0x41f317([this['context']]);for(const _0x21cb5d of _0x1dd72e)this['_integrateWithEditorAnnotations'](_0x21cb5d);this['listenTo'](_0x1dd72e,'add',(_0x1f0ebe,_0x8da610)=>{this['listenTo'](_0x8da610,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x8da610);});}),this['listenTo'](_0x1dd72e,'remove',(_0x318ca0,_0x460f76)=>{_0x460f76['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x460f76['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3b16ef('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x504596=this['context']['plugins']['get'](z);_0x504596['_detachFromContainer'](this['annotations']),this['stopListening'](_0x504596),this['stopListening'](this['annotations']),this['context']instanceof _0x3fe096&&this['stopListening'](this['context']['editors']);for(const _0x142026 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x142026);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2a8ee1){if(!_0x2a8ee1['plugins']['has']('EditorAnnotations'))return;const _0x3c67a3=_0x2a8ee1['plugins']['get']('EditorAnnotations'),_0x1160b9=()=>{const _0x1344cd=_0x3c67a3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1344cd[0x0]||null);};this['listenTo'](_0x3c67a3,'refresh',_0x1160b9),this['listenTo'](_0x3c67a3,'blur',(_0x49e68d,{isAnnotationTracked:_0x4b9c8b})=>{this['activeAnnotation']&&_0x4b9c8b(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3c67a3,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x191790=>{_0x3c67a3['hasDomSelection']()&&(_0x1160b9(),_0x191790['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3c67a3);}['_destroyEditorAnnotationsIntegration'](_0x1ef3ec){this['stopListening'](_0x1ef3ec),this['_editorAnnotations']['remove'](_0x1ef3ec);}}class C extends _0x5134f9{['counterView'];constructor(_0x38b90a){super(_0x38b90a);const _0x27788c=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x45a62b,_0x4769e5)=>_0x45a62b?'...':_0x4769e5['toString']()),this['set']('annotationType',''),this['icon']=_0x5e46cc,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x27788c['to']('annotationType',_0x139c5a=>'ck-annotation-counter__badge--'+_0x139c5a),_0x27788c['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x27788c['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1318aa{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x288973){super(_0x288973),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x12c5b6),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x41f317(),this['_refreshPositioningDebounced']=_0x5d89fe(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x172d8b(this['context']['locale']),this['balloonPanelView']=new _0x39e067(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3f3136){this['annotations']=_0x3f3136;const _0x154fef=this['context']['plugins']['get'](z),_0x41d1dc=this['balloonPanelView'];if(_0x154fef['_annotations']=_0x3f3136,this['isAttached'])throw new _0x3b16ef('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x154fef,'set:container',()=>{this['detach'](),this['listenTo'](_0x154fef,'change:container',_0x48356c=>{_0x48356c['off'](),this['attach'](_0x3f3136);});}),_0x154fef['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x20f016=_0x2ef98e=>{const _0x301ae0=new C(this['context']['locale']);_0x154fef['addAnnotation'](_0x2ef98e,_0x301ae0),this['_annotationToNarrowView']['set'](_0x2ef98e,_0x301ae0),_0x301ae0['bind']('isDirty','annotationType','number')['to'](_0x2ef98e['view'],'isDirty','type','length'),_0x301ae0['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x41d1dc['content']['first']!==_0x2ef98e['view']?(this['_showBalloon'](_0x2ef98e),_0x2ef98e['view']['element']['focus'](),this['setActiveAnnotation'](_0x2ef98e)):this['setActiveAnnotation'](null);});};for(const _0x4736b3 of _0x3f3136)_0x20f016(_0x4736b3);this['listenTo'](_0x3f3136,'add',(_0x212e25,_0x4d2d8d)=>{_0x20f016(_0x4d2d8d);}),this['listenTo'](_0x3f3136,'remove',(_0x34b659,_0x1f9b14,_0x53d12b)=>{this['_annotationToNarrowView']['get'](_0x1f9b14)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1f9b14),_0x154fef['rearrange']({'removedAnnotation':_0x1f9b14,'previousAnnotation':_0x3f3136['get'](_0x53d12b-0x1),'nextAnnotation':_0x3f3136['get'](_0x53d12b+0x1)}),_0x1f9b14===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3f3136,'focus',(_0x2a3fe7,_0x58fa54)=>{this['setActiveAnnotation'](_0x58fa54);}),this['listenTo'](_0x3f3136,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4a878f,_0x5049cd)=>{_0x5049cd['keyCode']===_0x16ee43['esc']&&_0x41d1dc['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x41d1dc['content']['first']),this['_hideBalloon'](),_0x5049cd['stopPropagation'](),_0x5049cd['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x43fe5e,_0x10b6f6)=>{const _0x32f863=_0x10b6f6['target'];_0x41d1dc['isVisible']&&_0x41d1dc['element']['contains'](_0x32f863)||_0x154fef['view']['element']['contains'](_0x32f863)||_0x43fe5e['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x5c93cc=>_0x5c93cc['contains'](_0x32f863))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x555d7e=this['context']instanceof _0x3fe096?this['context']['editors']:new _0x41f317([this['context']]);for(const _0x5e2897 of _0x555d7e)this['_integrateWithEditorAnnotations'](_0x5e2897);this['listenTo'](_0x555d7e,'add',(_0x24d3da,_0x5588aa)=>{this['listenTo'](_0x5588aa,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5588aa);});}),this['listenTo'](_0x555d7e,'remove',(_0x5ed68a,_0x4a9abb)=>{_0x4a9abb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4a9abb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x16fae1){if(_0x16fae1===this['activeAnnotation'])return;const _0x4cf60d=this['context']['plugins']['get'](z);if(_0x4cf60d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x16fae1,'disableAnimationOnActivatedAnnotation':!0x0}),_0x16fae1)_0x4cf60d['getSidebarItemView'](_0x16fae1)?this['_showBalloon'](_0x16fae1):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x16fae1;}['detach'](){if(!this['isAttached'])throw new _0x3b16ef('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x51eec1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x42b5c7=>_0x42b5c7['destroy']()),this['_annotationToNarrowView']['clear'](),_0x51eec1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3fe096&&this['stopListening'](this['context']['editors']);for(const _0x3ddbbc of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3ddbbc);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'](_0x3c3329){if(!_0x3c3329['plugins']['has']('EditorAnnotations'))return;const _0x2ee29c=_0x3c3329['plugins']['get']('EditorAnnotations'),_0x3776a6=this['context']['plugins']['get'](z),_0xdb6a87=this['annotations'],_0x46a994=this['balloonPanelView'],_0x534a0d=()=>{const _0x1b131e=_0x2ee29c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1b131e),this['setActiveAnnotation'](_0x1b131e[0x0]||null);};this['listenTo'](_0x2ee29c,'refresh',_0x534a0d),this['listenTo'](_0x2ee29c,'blur',(_0x4b39ce,{isAnnotationTracked:_0x2b3c94})=>{this['activeAnnotation']&&_0x2b3c94(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2ee29c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xdb6a87,'blur',_0x3d0948=>{_0x2ee29c['hasDomSelection']()&&_0x3d0948['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x564627,_0x1597d9)=>{const _0x5a7325=_0x1597d9['target'];_0x46a994['isVisible']&&_0x46a994['element']['contains'](_0x5a7325)||_0x3776a6['view']['element']['contains'](_0x5a7325)||this['activeAnnotation']&&_0x2ee29c['hasDomSelection']()&&(_0x534a0d(),_0x564627['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2ee29c);}['_destroyEditorAnnotationsIntegration'](_0x77fc76){_0x77fc76&&(this['stopListening'](_0x77fc76),this['_editorAnnotations']['remove'](_0x77fc76));}['_setSelectedAnnotations'](_0x48d346){for(const _0x4902cc of this['_selectedAnnotations'])_0x48d346['includes'](_0x4902cc)||this['_manuallyClosedAnnotationViews']['delete'](_0x4902cc['view']);this['_selectedAnnotations']=_0x48d346;}['_refreshPositioning'](){const _0x36b4ac=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x36b4ac['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3b0dd3){if(this['_manuallyClosedAnnotationViews']['has'](_0x3b0dd3['view']))return;const _0x33daa0=this['balloonPanelView']['content']['first'];_0x33daa0!==_0x3b0dd3['view']?(_0x33daa0&&this['_detachListeners'](_0x33daa0),this['_attachListeners'](_0x3b0dd3['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3b0dd3['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x173416=this['balloonPanelView']['content']['first'],_0x1a0e64=_0x173416&&this['annotations']['getByView'](_0x173416);if(!_0x1a0e64||!this['_annotationToNarrowView']['has'](_0x1a0e64))return;const _0x5bef48=this['_annotationToNarrowView']['get'](_0x1a0e64)['element'],_0x5dc9f2=(function(){const _0x3a9069=_0x39e067['defaultPositions'];return[_0x3a9069['southArrowNorthEast'],_0x3a9069['northArrowSouthEast'],_0x3a9069['southArrowNorth'],_0x3a9069['northArrowSouth'],_0x3a9069['southArrowNorthWest'],_0x3a9069['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5bef48,'positions':_0x5dc9f2});}['_hideBalloon'](){const _0x3debb9=this['balloonPanelView'],_0x35c147=_0x3debb9['content']['first'];_0x35c147&&(this['_detachListeners'](_0x35c147),_0x3debb9['unpin'](),_0x3debb9['content']['clear']());}['_attachListeners'](_0x2b1855){this['listenTo'](_0x2b1855,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2b1855,'Esc',(_0x1f7eb2,_0x4f8933)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2b1855),this['_hideBalloon'](),_0x4f8933();});}['_detachListeners'](_0x5bc14a){this['stopListening'](_0x5bc14a);}}class c extends _0x387cbb{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x5f439b,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24438c){super(_0x24438c),_0x24438c['editing']['view']['addObserver'](_0x5a2c11),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x24438c['plugins']['get'](_0x5f439b),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x9a29e1=this['editor']['plugins']['get'](M);_0x9a29e1['context']===this['editor']&&(_0x9a29e1['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xaefb85,_0x41b940)=>{const _0xa2afc1=this['_balloon'];if(this['isAttached']&&_0xa2afc1['visibleView']){const _0x2661cb=this['annotations']['getByView'](_0xa2afc1['visibleView']);_0x2661cb&&this['_closeAnnotation'](_0x2661cb),_0x41b940();}}));}['afterInit'](){const _0x25c6f4=this['editor']['plugins']['get'](M);_0x25c6f4['context']===this['editor']&&(_0x25c6f4['hasActive']()||_0x25c6f4['switchTo']('inline'));}['setActiveAnnotation'](_0x820a3){_0x820a3!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x820a3&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x820a3)&&this['_addAnnotationToBalloon'](_0x820a3,!0x0),_0x820a3['isActive']=!0x0),_0x820a3||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x820a3);}['attach'](_0x57ba0c){this['annotations']=_0x57ba0c;const _0x3ede31=this['editor']['plugins']['get'](M),_0x3e13f9=this['_balloon'];if(this['isAttached'])throw new _0x3b16ef('inlineannotations-attach-already-attached',this);if(_0x3ede31['context']!==this['editor'])throw new _0x3b16ef('inlineannotations-not-allowed-with-context',this);const _0x3d3ac6=this['editor']['plugins']['get'](P);this['listenTo'](_0x3d3ac6,'refresh',()=>{const _0x39a927=_0x3d3ac6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3b7a73,_0xf17bd3;!this['_forceRefresh']&&(_0x3b7a73=_0x39a927,_0xf17bd3=this['_selectedAnnotations'],_0x3b7a73['length']===_0xf17bd3['length']&&_0x3b7a73['every'](_0x3c84e0=>_0xf17bd3['includes'](_0x3c84e0)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x39a927),this['setActiveAnnotation'](_0x39a927[0x0]||null));}),this['listenTo'](_0x3d3ac6,'blur',(_0x299a16,{isAnnotationTracked:_0x542157})=>{this['activeAnnotation']&&_0x542157(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x41c10b,_0x6f85dc,_0x15e0b1)=>{_0x15e0b1||this['setActiveAnnotation'](null);}),this['listenTo'](_0x57ba0c,'remove',(_0x2334fc,_0x178c4e)=>{this['_removeAnnotationFromBalloon'](_0x178c4e),_0x178c4e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3e13f9,'change:visibleView',(_0x58cc0e,_0x4d350e,_0x28039b,_0x2e8fd0)=>{_0x2e8fd0&&this['stopListening'](_0x2e8fd0);const _0x2d0cba=_0x57ba0c['getByView'](_0x28039b);_0x28039b&&_0x2d0cba&&(this['listenTo'](_0x28039b,'change:height',()=>{_0x3e13f9['updatePosition']();}),this['listenTo'](_0x28039b,'Esc',()=>{this['_closeAnnotation'](_0x2d0cba),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2d0cba&&this['setActiveAnnotation'](_0x2d0cba));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3e13f9['visibleView']&&(_0x57ba0c['getByView'](_0x3e13f9['visibleView'])&&_0x3e13f9['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 _0x3b16ef('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4afab5 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4afab5);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x59580c){for(const _0xcccab5 of this['_selectedAnnotations'])_0x59580c['includes'](_0xcccab5)||this['_manuallyClosed']['delete'](_0xcccab5);for(const _0x32cc0f of this['annotations'])_0x59580c['includes'](_0x32cc0f)||this['_removeAnnotationFromBalloon'](_0x32cc0f);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x21a9bc of _0x59580c)this['_addAnnotationToBalloon'](_0x21a9bc);}this['_selectedAnnotations']=_0x59580c;}['_addAnnotationToBalloon'](_0x462b77,_0x4ff7fa=!0x1){this['_manuallyClosed']['has'](_0x462b77)||(this['_addedAnnotations']['has'](_0x462b77)||this['_balloon']['hasView'](_0x462b77['view'])||(this['_addedAnnotations']['add'](_0x462b77),this['_balloon']['add']({'stackId':_0x462b77['view']['id'],'view':_0x462b77['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x462b77)}})),_0x4ff7fa&&this['_balloon']['showStack'](_0x462b77['view']['id']));}['_getBalloonTargetForAnnotation'](_0x269517){const _0x2658d9=_0x269517['target'],_0xecb979=this['editor']['editing']['view'],_0x11abb9=_0xecb979['document']['selection']['getFirstRange'](),_0x2dbca6=_0xecb979['domConverter']['viewRangeToDom'](_0x11abb9);if(_0x2dbca6['collapse'](!0x0),_0x2658d9){if(_0x2658d9 instanceof _0x521279)return _0x2658d9;let _0xe73705=[];for(const _0x4c512d of _0x2658d9)_0xe73705['push'](...(_0x27ed7b=_0x4c512d['getClientRects'](),Array['from'](_0x27ed7b)['map'](DOMRect['fromRect'])));_0xe73705=function(_0x1c5eaa){const _0x2e47c7=[];let _0x4f78ff=_0x1c5eaa[0x0];for(let _0x3ea738=0x1;_0x3ea738<_0x1c5eaa['length'];_0x3ea738++)B(_0x4f78ff,_0x1c5eaa[_0x3ea738])?_0x4f78ff['width']+=_0x1c5eaa[_0x3ea738]['width']:(_0x2e47c7['push'](_0x4f78ff),_0x4f78ff=_0x1c5eaa[_0x3ea738]);return _0x2e47c7['push'](_0x4f78ff),_0x2e47c7;}(_0xe73705);const _0x2d24f5=_0x2dbca6['getBoundingClientRect']();return _0xe73705['find'](_0x477f04=>_0x477f04['top']<=_0x2d24f5['top']&&_0x477f04['bottom']>=_0x2d24f5['bottom']&&_0x477f04['left']<=_0x2d24f5['left']&&_0x477f04['right']>=_0x2d24f5['right'])||_0xe73705[0x0];}var _0x27ed7b;return _0x269517['targetRect']||_0x2dbca6;}['_removeAnnotationFromBalloon'](_0x604938){this['_addedAnnotations']['has'](_0x604938)&&this['_balloon']['hasView'](_0x604938['view'])&&(this['_addedAnnotations']['delete'](_0x604938),this['_balloon']['remove'](_0x604938['view']));}['_closeAnnotation'](_0x364620){this['_manuallyClosed']['add'](_0x364620),this['_removeAnnotationFromBalloon'](_0x364620);}}function B(_0x11fbab,_0x29be1b){return _0x11fbab['top']===_0x29be1b['top']&&_0x11fbab['bottom']===_0x29be1b['bottom']&&_0x11fbab['right']===_0x29be1b['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5f5c67,_0x47929f){super(_0x5f5c67),this['set']('isEmpty',!_0x47929f['length']),this['focusTracker']=new _0x1e0a9c(),this['_annotationViews']=_0x47929f,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x1ca448({'focusables':_0x47929f,'focusTracker':this['focusTracker']}),this['listenTo'](_0x47929f,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x47929f,'remove',(_0x320b4a,_0x2649c5)=>{_0x2649c5['isActive']&&this['focus'](),_0x47929f['length']||(this['isEmpty']=!0x0);});const _0x2149ba=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x5f5c67,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x47929f},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2149ba['if']('isEmpty','ck-hidden',_0x2fd893=>!_0x2fd893)]},'children':[{'text':E(_0x5f5c67,'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 _0x41695d of this['_annotationViews'])this['focusTracker']['add'](_0x41695d['element']);this['_annotationViews']['on']('change',(_0x2e7097,{added:_0x40cffb,removed:_0x1c02ca})=>{for(const _0x165a27 of _0x40cffb)this['focusTracker']['add'](_0x165a27['element']);for(const _0x1713c2 of _0x1c02ca)this['focusTracker']['remove'](_0x1713c2['element']);});}}class f extends _0x1318aa{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x401195){super(_0x401195),this['archivedThreads']=new _0x41f317();}['init'](){const _0x444710=this['context'],_0x20c12d=_0x444710['plugins']['get'](o),_0x4de498=_0x444710['plugins']['get'](O);this['listenTo'](_0x20c12d,'addCommentThread',(_0x20c9c4,{threadId:_0x1aabb3})=>{const _0x4d0770=_0x20c12d['getCommentThread'](_0x1aabb3);_0x4d0770['archivedAt']&&this['archivedThreads']['add'](_0x4d0770,this['_calculatePosition'](_0x4d0770['archivedAt'])),this['listenTo'](_0x4d0770,'change:archivedAt',(_0x4a4d2b,_0x26dd94,_0x8d2bb3)=>{_0x8d2bb3?this['archivedThreads']['has'](_0x4d0770)||this['archivedThreads']['add'](_0x4d0770,this['_calculatePosition'](_0x4d0770['archivedAt'])):this['archivedThreads']['has'](_0x4d0770)&&this['archivedThreads']['remove'](_0x4d0770);});}),this['listenTo'](_0x20c12d,'removeCommentThread',(_0x389723,{threadId:_0x494151})=>{const _0xc166cf=_0x20c12d['getCommentThread'](_0x494151);this['stopListening'](_0xc166cf),this['archivedThreads']['has'](_0xc166cf)&&this['archivedThreads']['remove'](_0xc166cf);},{'priority':'highest'}),this['listenTo'](_0x4de498['collection'],'focus',(_0xde957e,_0x54c11c)=>{_0x54c11c['isVisible']||(_0x54c11c['isActive']=!0x0,_0x4de498['activate'](_0x54c11c));});}['_calculatePosition'](_0x25110e){const _0x33a14f=[...this['archivedThreads']]['findIndex'](_0x5bfa2a=>_0x5bfa2a['archivedAt']<_0x25110e);return _0x33a14f>-0x1?_0x33a14f:this['archivedThreads']['length'];}}class a extends _0x387cbb{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x2afe41];}constructor(_0x4902f4){super(_0x4902f4),this['annotationViews']=new _0x4d7b71(),this['_pendingThreads']=[];}['init'](){const _0x1b58b8=this['editor'],_0x56f423=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1b58b8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5134f9,!0x0)),_0x1b58b8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1c1162=this['_createCommentsArchiveButton'](_0x180ec2);return _0x1c1162['set']({'role':'menuitemcheckbox'}),_0x1c1162;});const _0xa9c556=_0x1b58b8['plugins']['get'](f),_0x1a5be3=_0x1b58b8['plugins']['get']('Annotations'),_0x66111f=_0x1b58b8['plugins']['get']('CommentsRepository');_0xa9c556['archivedThreads']['forEach'](_0x3ba6dd=>{this['_handleNewThread'](_0x3ba6dd);}),this['listenTo'](_0xa9c556['archivedThreads'],'add',(_0x351f5d,_0x5d8d5f)=>{this['_handleNewThread'](_0x5d8d5f);}),this['listenTo'](_0x1a5be3['collection'],'add',(_0x569282,_0x49893f)=>{const _0x1e1da1=this['_pendingThreads']['find'](_0x5efc50=>{const _0x2b7426=_0x66111f['_threadToController']['get'](_0x5efc50);return _0x2b7426&&_0x49893f['innerView']===_0x2b7426['view'];});if(_0x1e1da1){const _0x14668a=this['_calculatePosition'](_0x1e1da1['archivedAt']);this['annotationViews']['add'](_0x49893f['view'],_0x14668a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1e1da1),0x1);}}),this['listenTo'](_0xa9c556['archivedThreads'],'remove',(_0x8b925a,_0x347ee5)=>{const _0x2cdc74=_0x1b58b8['config']['get']('collaboration.channelId');if(!_0x2cdc74||_0x347ee5['channelId']===_0x2cdc74){if(this['_pendingThreads']['includes'](_0x347ee5))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x347ee5),0x1);else{const _0x335830=_0x66111f['_threadToController']['get'](_0x347ee5),_0x2c26e2=_0x1a5be3['getByInnerView'](_0x335830['view']);this['annotationViews']['remove'](_0x2c26e2['view']),this['stopListening'](_0x2c26e2['focusableElements']);}}}),this['listenTo'](_0x1a5be3['collection'],'add',(_0x481ce4,_0x1f151e)=>{this['listenTo'](_0x1f151e,'escape',_0x56f423);}),this['listenTo'](_0x1a5be3['collection'],'remove',(_0x39407d,_0x2a9d28)=>{this['stopListening'](_0x2a9d28,'escape',_0x56f423);});}['_handleNewThread'](_0x127d69){const _0x41919c=this['editor']['plugins']['get']('CommentsRepository'),_0x6586b8=this['editor']['plugins']['get']('Annotations'),_0x1daa9b=this['editor']['config']['get']('collaboration.channelId');if(!_0x1daa9b||_0x127d69['channelId']===_0x1daa9b){const _0x11d462=_0x41919c['_threadToController']['get'](_0x127d69);if(!_0x11d462)return void this['_pendingThreads']['push'](_0x127d69);const _0x39bebc=this['_calculatePosition'](_0x127d69['archivedAt']),_0x2924dd=_0x6586b8['getByInnerView'](_0x11d462['view']);_0x2924dd['isVisible']&&_0x6586b8['_visibleAnnotations']['remove'](_0x2924dd),this['annotationViews']['add'](_0x2924dd['view'],_0x39bebc);}}['_calculatePosition'](_0x3f464d){const _0x3f4f8e=this['editor']['config']['get']('collaboration.channelId'),_0x154dcb=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x420506=>_0x420506['channelId']===_0x3f4f8e)['findIndex'](_0x2b9511=>_0x2b9511['archivedAt']<_0x3f464d);return _0x154dcb<0x0||_0x154dcb>this['annotationViews']['length']?this['annotationViews']['length']:_0x154dcb-0x1;}['_toggleDialog'](){const _0x470e14=this['editor'],_0x4f3d43=_0x470e14['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x470e14['locale'],this['annotationViews'])),'commentsArchive'===_0x4f3d43['id']?_0x4f3d43['hide']():_0x4f3d43['show']({'id':'commentsArchive','title':E(_0x470e14['locale'],'COMMENTS_ARCHIVE'),'icon':_0x17f915,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1c0c65['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x1289c6,_0x154d99=!0x1){const _0x3e63d2=this['editor']['locale'],_0x6eb1ce=this['editor']['plugins']['get']('Dialog'),_0x132ed4=new _0x1289c6(_0x3e63d2);return _0x132ed4['bind']('isEnabled')['to'](this,'isEnabled'),_0x132ed4['bind']('isOn')['to'](_0x6eb1ce,'id',_0x14a201=>'commentsArchive'===_0x14a201),_0x132ed4['set']({'label':E(_0x3e63d2,'COMMENTS_ARCHIVE'),'icon':_0x17f915,'isToggleable':!0x0}),_0x154d99&&(_0x132ed4['tooltip']=!0x0),this['listenTo'](_0x132ed4,'execute',()=>this['_toggleDialog']()),_0x132ed4;}['_hideDialogOnAnnotationEscape']=_0xb98b92=>{const _0xfc7f0=_0xb98b92['source'];if(!this['annotationViews']['has'](_0xfc7f0['view']))return;const _0x20ede6=this['editor']['plugins']['get']('Dialog');_0x20ede6['isOpen']&&'commentsArchive'===_0x20ede6['id']&&(_0x20ede6['hide'](),_0xb98b92['stop']());};}class p extends _0x387cbb{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x5d6d0a,ContextPlugin as _0xd751f5,PendingActions as ht,Command as _0xceca52,Plugin as _0x5dedc1,Context as _0x467a4d}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x12fe42,uid as _0x550e29,KeystrokeHandler as jt,FocusTracker as _0x573782,diff as _0x55f29c,Collection as _0x100e27,Rect as _0xefacec,CKEditorError as _0x3f73c4,first as _0x13001c,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x687f4e,keyCodes as _0x5a0553}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2cce26,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x15c465,trimHtml as _0x52475a,LateFocusDropdownButtonView as _0x1d1f33,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x295518}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x4eaad4}from'es-toolkit/compat';import{IconUndo as _0x412d7b,IconCheck as _0x3ae766,IconPencil as _0x10d7ca,IconRemoveComment as _0x37bf94,IconThreeVerticalDots as _0x1cffb7,IconAddComment as _0x2d891e,IconCommentsArchive as _0x1143f9}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x15cdbf,ButtonView as _0x1cb946,ViewCollection as _0x34cf04,createDropdown as _0x4dbdf7,ListView as _0x5b3553,focusChildOnDropdownOpen as _0x510ace,ListItemView as _0x9bc6d4,MenuBarMenuListItemButtonView as _0x121529,BodyCollection as _0x56107f,BalloonPanelView as _0xd282f8,ContextualBalloon as _0x322d01,Dialog as _0x25447e,DialogViewPosition as _0x43c115}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x529852}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x4e7ea4}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x198158}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x12fe42(){['model'];['view'];constructor(_0x18159b,_0x112cc3){super(),this['model']=_0x18159b,this['model']['_isAttached']=!0x0,this['view']=_0x112cc3,this['listenTo'](_0x112cc3,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x112cc3,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x112cc3,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x112cc3,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x112cc3,'addComment',(_0x1194ae,_0x5ce22b)=>this['addComment'](_0x5ce22b)),this['listenTo'](_0x112cc3,'updateComment',(_0x8c83fa,_0x53caf0,_0x1624a3)=>this['updateComment'](_0x53caf0,_0x1624a3)),this['listenTo'](_0x112cc3,'removeComment',(_0x52759e,_0x504b03)=>this['removeComment'](_0x504b03));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x59c97d){this['model']['addComment']({'content':_0x59c97d,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x39f10a,_0x18a7af){this['model']['getComment'](_0x39f10a)['update']({'content':_0x18a7af});}['removeComment'](_0x527a5e){this['model']['getComment'](_0x527a5e)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x607e94,_0x538a58,_0x5d2dfa){const t=_0x607e94['t'];switch(_0x538a58){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'},_0x5d2dfa);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'},_0x5d2dfa);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'},_0x5d2dfa);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'},_0x5d2dfa);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x5d2dfa);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'},_0x5d2dfa);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'},_0x5d2dfa);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'},_0x5d2dfa);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 Ut extends Vt{['main'];['editable'];constructor(_0x6736b4,_0x370e31){super(_0x6736b4);const _0x49ead9=_0x550e29();this['main']=this['createCollection'](),this['editable']=new $t(_0x6736b4,_0x370e31,void 0x0,{'label':()=>E(_0x6736b4,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x6736b4['uiLanguageDirection'],'lang':_0x6736b4['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x49ead9},'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 Ot extends Rt{['view'];constructor(_0x2c9014){super(_0x2c9014),this['view']=new Ut(_0x2c9014['locale'],_0x2c9014['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x462aa3=this['editor']['editing']['view'],_0x209f1d=this['view']['editable'],_0x1dadaa=_0x462aa3['document']['getRoot']();_0x209f1d['name']=_0x1dadaa['rootName'],this['view']['render']();const _0x415ece=_0x209f1d['element'];this['setEditableElement'](_0x209f1d['name'],_0x415ece),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x462aa3['attachDomRoot'](_0x415ece),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x12fe42(_0x5d6d0a){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x4baee9={}){function _0x17dd57(_0x142b79){return _0x142b79['map'](_0x3877e6=>String['fromCharCode'](_0x3877e6))['join']('');}(_0x4baee9=Object['assign']({},_0x4baee9))['plugins']||(_0x4baee9['plugins']=Qt['defaultPlugins']),super(_0x4baee9),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x17dd57([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x17dd57([0x76,0x69,0x65,0x77])][_0x17dd57([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x17dd57([0x61,0x75,0x74,0x6f]),this[_0x17dd57([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x17dd57([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x17dd57([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x17dd57([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x17dd57([0x6f,0x6b])});}['create'](){const _0x6f5d4a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x6f5d4a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x149798=>{const _0x371717=this['model']['document']['getRoot'](),_0x569dae=_0x371717&&_0x371717['getChild'](_0x371717['childCount']-0x1);_0x149798['setSelection'](_0x569dae,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x464b38=this['editing']['view'],_0xbbc4db=_0x464b38['document']['getRoot'](),_0x5e9991=_0xbbc4db['getChild'](0x0);_0xbbc4db['childCount']>0x1||!_0x5e9991||'p'!=_0x5e9991['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x464b38,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5e9991['placeholder']=this['placeholder']),Ft({'view':_0x464b38,'element':_0x5e9991,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5e9991);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x370572,_0x42e1a9={}){super(_0x370572),this['editor']=null,this['_editorConfig']=_0x42e1a9,this['set']('value',_0x42e1a9['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x370572,'Reply...')),this['set']('submitLabel',E(_0x370572,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x573782(),this['focusCycler']=new _0x15cdbf({'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',(_0x13ae9e,_0x15af78)=>{this['cancelButtonView']['fire']('execute'),_0x15af78();}),this['keystrokes']['set']('Ctrl+Enter',(_0x29f68b,_0x565a9e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x565a9e());}),this['on']('submit',(_0x3cc841,_0x4e4ad1)=>{_0x4e4ad1['length']>0xfde8?(alert(E(_0x370572,'TOO_LONG_COMMENT_ALERT',[_0x4e4ad1['length'],0xfde8])),_0x3cc841['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x8d06b5=this['editor'];this['element']['insertBefore'](_0x8d06b5['ui']['element'],this['element']['firstChild']),_0x8d06b5['model']['document']['on']('change',()=>this['value']=_0x8d06b5['getData']()),_0x8d06b5['bind']('placeholder')['to'](this),this['focusables']['add'](_0x8d06b5['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0xe11d3c){-0x1===_0xe11d3c?(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:_0xd6440d}=this,_0x9a0196=new _0x1cb946(_0xd6440d);return _0x9a0196['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x9a0196['withText']=!0x0,_0x9a0196['bind']('label')['to'](this,'submitLabel'),_0x9a0196['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x9a0196['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x276c96,_0x4687f5)=>!_0x4687f5&&!!_0x276c96['trim']()),_0x9a0196;}['_createCancelButton'](){const {locale:_0x343c3e}=this,_0x4ca093=new _0x1cb946(_0x343c3e);return _0x4ca093['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4ca093['label']=E(_0x343c3e,'Cancel'),_0x4ca093['withText']=!0x0,_0x4ca093['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4ca093;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5911d5=>{this['focusTracker']['add'](_0x5911d5['element']);}),this['focusables']['on']('change',(_0x54bbac,_0x287056)=>{for(const _0x1a8b90 of Array['from'](_0x287056['added'])['reverse']())this['focusTracker']['add'](_0x1a8b90['element']);});}}class ie extends kt{constructor(_0x4f09a0,_0x5b149b,_0x32e54d){super(_0x4f09a0),this['commentInputView']=new os(_0x4f09a0,_0x32e54d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x25279e,_0x5dd428)=>_0x25279e||!!_0x5dd428),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 _0x2cce26(_0x4f09a0,_0x5b149b),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'](_0x3a3a66){this['commentInputView']['focus'](_0x3a3a66);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x17c735,_0x322e7a)=>{const {submitButtonView:_0x4e3296,cancelButtonView:_0x2f8fd6,editor:_0x4c3e9d}=this['commentInputView'];[_0x4e3296['element'],_0x2f8fd6['element'],_0x4c3e9d?_0x4c3e9d['editing']['view']['getDomRoot']():null]['filter'](_0x6b8cd5=>_0x6b8cd5)['some'](_0xb3cb88=>_0xb3cb88['contains'](_0x322e7a['target']))||(this['focus'](),_0x322e7a['preventDefault']());});}}class cs extends kt{constructor(_0x32af72){super(_0x32af72);const _0x335b43=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x335b43['to']('count',_0x3d1101=>E(_0x32af72,'NUMBER_OF_COMMENTS',_0x3d1101))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x4bb46d,_0x19ded7,_0x1e8afd){super(_0x4bb46d);const _0x4dedbb=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x19ded7['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x19ded7,this['_config']=_0x1e8afd,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x573782(),this['keystrokes']=new jt(),this['focusCycler']=new _0x15cdbf({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x45a9e5=>this['commentViews']['map'](_0x1ab6d1=>_0x1ab6d1['element'])['includes'](_0x45a9e5['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x4bb46d),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x466b39=>_0x466b39-this['_config']['maxCommentsWhenCollapsed']);for(const _0xd6e8df of _0x19ded7['comments'])this['_handleNewCommentModel'](_0xd6e8df);this['_handleInfoComment'](),this['listenTo'](_0x19ded7['comments'],'add',(_0x257795,_0x2d3ab2)=>{const _0x9c5c49=this['_calculatePosition'](_0x2d3ab2);this['length']++,this['_handleNewCommentModel'](_0x2d3ab2,_0x9c5c49),this['refreshVisibleViews']();}),this['listenTo'](_0x19ded7['comments'],'remove',(_0x29b51e,_0x25f89f)=>{this['length']--,this['_handleRemoveCommentModel'](_0x25f89f),this['refreshVisibleViews']();}),this['listenTo'](_0x19ded7,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x19ded7,'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',_0x4dedbb['if']('length','ck-hidden',_0x2182a6=>!_0x2182a6)],'aria-label':E(_0x4bb46d,'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'](_0x38aa20){-0x1===_0x38aa20?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x5b5d45 of this['commentViews'])_0x5b5d45['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x365475,_0xc899d2){const _0x51d75a=new this['_config']['CommentView'](this['locale'],_0x365475,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x51d75a['viewUid']=_0x365475['id'],_0x51d75a['delegate']('removeComment')['to'](this),_0x51d75a['delegate']('updateComment')['to'](this),_0x51d75a['delegate']('resolveCommentThread')['to'](this),_0x51d75a['delegate']('editorReady')['to'](this),_0x51d75a['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x51d75a,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x51d75a,_0xc899d2);}['_calculatePosition'](_0x289340){const _0x40eba6=this['_model']['_findOptimalIndex'](_0x289340);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x289340['authoredAt']?_0x40eba6-0x1:_0x40eba6:_0x40eba6-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x43270c={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x43270c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x43270c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x42156c){const _0x4a2e0d=this['commentViews']['remove'](_0x42156c['id']);this['stopListening'](_0x4a2e0d),_0x4a2e0d['isEditMode']&&this['_updateHasDirtyComment'](),_0x4a2e0d['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5a7f0f=>_0x5a7f0f['isEditMode']);}['_rearrangeCollapse'](){const _0x22bfb1=function(_0x231339){const _0xae6f75=new _0x100e27();for(const _0x1d202f of _0x231339)_0xae6f75['add'](_0x1d202f);return _0xae6f75;}(this['commentViews']),_0xf0a000=this['_collapsedCommentsView']['count'];for(let _0x1b1ef6=0x1;_0x1b1ef6<=_0xf0a000;_0x1b1ef6++)_0x22bfb1['remove'](0x1);for(const _0x67831b of _0x22bfb1)_0x67831b['collapse']();_0xf0a000>0x0&&_0x22bfb1['add'](this['_collapsedCommentsView'],0x1),ns(_0x55f29c(Array['from'](this['visibleViews']),Array['from'](_0x22bfb1)),this['visibleViews'],_0x22bfb1);}['_rearrangeExpand'](){ns(_0x55f29c(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1397dd of this['visibleViews'])_0x1397dd['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1d0b94=>{this['focusTracker']['add'](_0x1d0b94['element']),this['keystrokes']['listenTo'](_0x1d0b94['element']);}),this['commentViews']['on']('change',(_0x28b2e4,_0x5ea961)=>{for(const _0x26e302 of _0x5ea961['removed'])this['focusTracker']['remove'](_0x26e302['element']),this['keystrokes']['stopListening'](_0x26e302['element']);for(const _0x1d4705 of Array['from'](_0x5ea961['added'])['reverse']())this['focusTracker']['add'](_0x1d4705['element']),this['keystrokes']['listenTo'](_0x1d4705['element']);});}}function ns(_0x429704,_0x13c286,_0x526f40){let _0x172a6c=0x0;for(const _0x58f8cd of _0x429704)switch(_0x58f8cd){case'insert':_0x13c286['add'](_0x526f40['get'](_0x172a6c),_0x172a6c),_0x172a6c++;break;case'delete':_0x13c286['remove'](_0x172a6c);break;case'equal':_0x172a6c++;}}class as extends kt{constructor(_0x5973a9){super(_0x5973a9);const _0x37768b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x37768b['to']('contextValue',_0x1fd480=>E(_0x5973a9,'THREAD_CONTEXT_LABEL',_0x1fd480)),'tabindex':-0x1},'children':[{'text':_0x37768b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x560580,_0x3bae39){super(_0x560580);const _0x382d54=this['bindTemplate'];this['_model']=_0x3bae39,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x573782(),this['keystrokes']=new jt(),this['focusCycler']=new _0x15cdbf({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xd6cec1=>!!_0xd6cec1),this['bind']('contextValue')['to'](this['_model'],'context',_0x13b06f=>_0x13b06f&&_0x13b06f['value']?this['_trimContextValue'](_0x13b06f['value']):E(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',_0x382d54['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 _0x399a8d=new _0x1cb946(this['locale']);return _0x399a8d['label']=E(this['locale'],'Reopen'),_0x399a8d['tooltip']=E(this['locale'],'Reopen'),_0x399a8d['icon']=_0x412d7b,_0x399a8d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4c62e9=>!_0x4c62e9),_0x399a8d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x522740,_0x3160f4)=>_0x522740&&_0x3160f4),_0x399a8d['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x399a8d;}['_trimContextValue'](_0xec9324){if(_0xec9324['length']<0x96)return _0xec9324;const _0x3bb1a6=_0xec9324['lastIndexOf']('\x20',0x93);return _0xec9324['substring'](0x0,_0x3bb1a6>-0x1?_0x3bb1a6:0x93)+'...';}['_attachContextActions'](){const _0x32d45c=this['element']['querySelector']('.ck-context'),_0x1cf23a=_0x32d45c['querySelector']('.ck-context__value');this['listenTo'](_0x32d45c,'mouseenter',()=>{_0x1cf23a['offsetWidth']<_0x1cf23a['scrollWidth']&&_0x32d45c['classList']['add']('overlay');}),this['listenTo'](_0x32d45c,'mouseleave',()=>{_0x32d45c['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5a39e3 of this['focusables'])this['focusTracker']['add'](_0x5a39e3['element']),this['keystrokes']['listenTo'](_0x5a39e3['element']);}['_createContextView'](){const _0x56a21b=new as(this['locale']);return _0x56a21b['bind']('contextValue')['to'](this),_0x56a21b;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2a959a,_0x34c52e,_0x45304a,_0xa3a416){super(_0x2a959a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x34c52e,this['_localUser']=_0x45304a,this['_config']=_0xa3a416,this['commentThreadHeaderView']=new Xt(_0x2a959a,_0x34c52e),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x2a959a,E(_0x2a959a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x2a959a,_0x34c52e,Object['assign']({'CommentView':this['_config']['CommentView']},_0xa3a416)),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',(_0x13576a,_0x12ac85)=>_0x13576a||!!_0x12ac85),this['bind']('isUnlinked')['to'](_0x34c52e,'unlinkedAt',_0x1a3022=>!!_0x1a3022),this['bind']('ariaLabel')['to'](this,'length',_0x4916b3=>{const _0x345881=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x4916b3,_0x345881]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x573782(),this['keystrokes']=new jt(),this['focusCycler']=new _0x15cdbf({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x8593a1=>_0x8593a1['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 _0x4d4007=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1d2254=_0x4d4007['commentInputView'];return _0x4d4007['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1d2254,'value',(_0xf4406c,_0x53c378,_0x4e7ff4,_0x5b8384,_0xf075d3)=>!!_0xf075d3||!!_0x5b8384&&_0x4e7ff4&&!_0x53c378||_0xf4406c&&_0x4e7ff4&&!_0x53c378),_0x1d2254['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3fb117,_0x110dce,_0x32b5b4)=>{let _0x3738cd;return _0x3738cd=_0x32b5b4&&_0x110dce?'Reply\x20to\x20reopen\x20discussion...':_0x3fb117?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x3738cd);}),_0x1d2254['bind']('submitLabel')['to'](this,'length',_0x17a2fe=>E(this['locale'],_0x17a2fe?'Reply':'Comment')),_0x1d2254['on']('submit',(_0x2d9963,_0x3f53d6)=>{this['fire']('addComment',_0x3f53d6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1d2254['on']('cancel',()=>{this['focus']();}),_0x1d2254['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1d2254['on']('cancel',_0x272d9d=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x272d9d['stop']());}),this['on']('change:isActive',(_0x4d6421,_0x506776,_0x378d4a)=>{_0x378d4a||this['length']||_0x1d2254['value']||this['fire']('removeCommentThread');}),_0x4d4007;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1e27df,_0x236d64,_0x400cfa,_0x2e0874){super(_0x1e27df,_0x236d64,_0x400cfa,_0x2e0874),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1e27df,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x283bd1,_0x6eff33,_0x43bd15)=>{_0x43bd15||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x4d51c5,_0x514f4d,_0x48ab66)=>{_0x48ab66&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x1eaa16=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x1eaa16['if']('isActive','ck-thread--active'),_0x1eaa16['if']('isUnlinked','ck-thread--unlinked'),_0x1eaa16['if']('isConfirm','ck-thread--remove-confirmation'),_0x1eaa16['to']('actionIndicator',_0x5d8c7a=>_0x5d8c7a?'ck-thread--'+_0x5d8c7a:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x1eaa16['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 _0x3517fc of this['commentsListView']['commentViews'])_0x3517fc['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5ea1ed}=this,_0x29ec2e=this['commentsListView']['commentViews']['get'](0x0);_0x29ec2e===this['_boundFirstCommentView']||_0x29ec2e['isSystemComment']||(this['_boundFirstCommentView']=_0x29ec2e,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x29ec2e,'actionIndicator',_0x27b7b2=>'remove'===_0x27b7b2?'remove':null),_0x29ec2e['placeholder']=E(_0x5ea1ed,'Write\x20a\x20comment...'),_0x29ec2e['removeButton']['on']('execute',_0x14a538=>{_0x14a538['stop'](),this['showConfirm'](E(_0x5ea1ed,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x29ec2e['focus']();}),_0x29ec2e['actionBar']['add'](this['resolveButton'],0x0),_0x29ec2e['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x56a59d=new _0x15c465(this['locale']);return _0x56a59d['label']=E(this['locale'],'Resolve'),_0x56a59d['tooltip']=E(this['locale'],'Resolve'),_0x56a59d['icon']=_0x3ae766,_0x56a59d['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x56a59d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x58f655=>!_0x58f655),_0x56a59d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5dbbdc,_0x4142c9)=>_0x5dbbdc&&!_0x4142c9),_0x56a59d['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x56a59d;}['_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 es extends kt{constructor(_0x1f8d04){super(_0x1f8d04),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1be92f,_0xbe59f,_0x2e1af9)=>{this['element']['innerHTML']=_0x2e1af9;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x23a399,_0x498901,_0x17a7d0){super(_0x23a399),this['_model']=_0x498901,this['_config']=_0x17a7d0,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x498901,'content',_0x498901,'authoredAt',(_0x3cffb4,_0x54345a)=>E(_0x23a399,'COMMENT_ARIA_LABEL',[_0x498901['author']['name'],_0x17a7d0['formatDateTime'](_0x54345a),new DOMParser()['parseFromString'](_0x3cffb4,'text/html')['body']['textContent'],_0x498901['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x23a399,E(_0x23a399,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x34cf04(),this['focusTracker']=new _0x573782(),this['keystrokes']=new jt(),this['focusCycler']=new _0x15cdbf({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x6108a2=>_0x6108a2['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']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x137ee9=new es(this['locale']);return _0x137ee9['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x1d04ab,_0x158029)=>_0x158029?_0x52475a(_0x1d04ab,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x1d04ab),_0x137ee9;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5d2406=new os(this['locale'],this['_config']['editorConfig']);return _0x5d2406['value']=this['_model']['content'],_0x5d2406['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5d2406['submitLabel']=E(this['locale'],'Save'),_0x5d2406['on']('submit',(_0x58ecd8,_0x736a94)=>{this['fire']('updateComment',this['_model']['id'],_0x736a94),this['switchToDisplayMode'](),this['focus']();}),_0x5d2406['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5d2406['once']('editorReady',()=>{_0x5d2406['focus']();}),_0x5d2406['createEditor'](),_0x5d2406['delegate']('editorReady')['to'](this),_0x5d2406['delegate']('editorDestroyed')['to'](this),_0x5d2406;}['_setupKeyboardNavigation'](){const _0x479311=this['element'];this['keystrokes']['listenTo'](_0x479311);for(const _0x6270c8 of this['focusables'])this['focusTracker']['add'](_0x6270c8['element']),this['keystrokes']['listenTo'](_0x6270c8['element']);this['focusables']['on']('change',(_0x18820e,_0x3d6bd7)=>{for(const _0x139688 of _0x3d6bd7['removed'])this['focusTracker']['remove'](_0x139688['element']),this['keystrokes']['stopListening'](_0x139688['element']);for(const _0x50d565 of _0x3d6bd7['added'])this['focusTracker']['add'](_0x50d565['element']),this['keystrokes']['listenTo'](_0x50d565['element']);}),this['keystrokes']['set']('enter',(_0x4b1f44,_0x177c8f)=>{_0x479311===_0x4b1f44['target']&&(this['focusCycler']['focusFirst'](),_0x177c8f());}),this['keystrokes']['set']('esc',(_0x2c04ed,_0x2ffb70)=>{_0x479311!==_0x2c04ed['target']&&(this['focus'](),_0x2ffb70());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0x580588,_0x31b2b1,_0x5a3ac3){super(_0x580588,_0x31b2b1,_0x5a3ac3),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x580588,'Reply...')),this['bind']('authoredAt')['to'](_0x31b2b1),this['bind']('resolvedAt')['to'](_0x31b2b1),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 _0x2cce26(_0x580588,_0x31b2b1['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x31b2b1,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x234d40=this['bindTemplate'],_0x7c96f8=[{'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':_0x234d40['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x234d40['to']('authoredAt',_0x1c1afb=>this['_config']['formatDateTime'](_0x1c1afb))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x234d40['if']('isEditMode','ck-comment__actions--hidden'),_0x234d40['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']&&_0x7c96f8['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x234d40['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x234d40['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x234d40['if']('isEditMode','ck-comment--edit'),_0x234d40['if']('isSystemComment','ck-comment--info'),_0x234d40['to']('actionIndicator',_0x3357c5=>_0x3357c5?'ck-comment--'+_0x3357c5:'')],'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':_0x7c96f8}]}]};}['_createEditButton'](){const _0xe60490=new _0x1cb946(this['locale']);return _0xe60490['label']=E(this['locale'],'Edit'),_0xe60490['icon']=_0x10d7ca,_0xe60490['withText']=!0x0,_0xe60490['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xe60490['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x800a44=>!_0x800a44),_0xe60490['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xe60490['on']('execute',()=>this['switchToEditMode']()),_0xe60490;}['_createRemoveButton'](){const _0x166461=new _0x1cb946(this['locale']);return _0x166461['label']=E(this['locale'],'Remove'),_0x166461['icon']=_0x37bf94,_0x166461['withText']=!0x0,_0x166461['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x166461['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x585d9d=>!_0x585d9d),_0x166461['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x166461['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x166461;}['_createDropdown'](){const _0x5728a2=_0x4dbdf7(this['locale'],_0x1d1f33),_0x12cac7=_0x5728a2['panelView']['children'],_0x361cbb=new _0x5b3553(this['locale']),_0x28b842=_0x5728a2['bindTemplate'];_0x510ace(_0x5728a2,()=>this['items']['find'](_0x13cff9=>_0x13cff9['isVisible'])),_0x5728a2['extendTemplate']({'attributes':{'class':[_0x28b842['if']('isVisible','ck-hidden',_0x363c21=>!_0x363c21)]}});const _0x589092=(_0x7430d4,_0x273041=-0x1)=>{const _0x407f98=new _0x9bc6d4(this['locale']);_0x407f98['children']['add'](_0x7430d4);const _0x235a92=_0x273041>-0x1?_0x273041:_0x361cbb['items']['length'];_0x361cbb['items']['add'](_0x407f98,_0x235a92);const _0x2444ba=Array['from'](this['items']);_0x5728a2['unbind']('isEnabled','isVisible'),_0x5728a2['bind']('isEnabled')['toMany'](_0x2444ba,'isEnabled',(..._0x5b2b2b)=>_0x5b2b2b['some'](_0x54418e=>_0x54418e)),_0x5728a2['bind']('isVisible')['toMany'](_0x2444ba,'isVisible',(..._0x45e427)=>_0x45e427['some'](_0x4f809a=>_0x4f809a));};_0x5728a2['panelPosition']='sw',_0x5728a2['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x1cffb7});for(const _0x524a18 of this['items'])_0x589092(_0x524a18);return _0x12cac7['add'](_0x361cbb),_0x5728a2['listenTo'](this['items'],'add',(_0x4ee9d0,_0x4a4d51,_0x16ce62)=>{_0x589092(_0x4a4d51,_0x16ce62);}),_0x5728a2['listenTo'](this['items'],'remove',(_0x12bb63,_0x74d4af,_0x59f6fc)=>{_0x361cbb['items']['remove'](_0x59f6fc);}),_0x5728a2;}['_attachActions'](_0x11e12f,_0x4b6cb4){const _0x358861=_0x11e12f&&_0x11e12f['element'];_0x358861&&(this['listenTo'](_0x358861,'mouseenter',()=>this['actionIndicator']=_0x4b6cb4),this['listenTo'](_0x358861,'focus',()=>this['actionIndicator']=_0x4b6cb4),this['listenTo'](_0x358861,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x358861,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x2bf591=super['_createCommentInputView']();return _0x2bf591['bind']('placeholder')['to'](this),_0x2bf591;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x1f620b){const _0x53bed5=Dt(_0x1f620b,0x1e),_0x51ae33=new MutationObserver(_0x52745e=>{for(const _0x5bf13f of _0x52745e)('attributes'==_0x5bf13f['type']&&'class'==_0x5bf13f['attributeName']||'childList'==_0x5bf13f['type']||'characterData'==_0x5bf13f['type'])&&_0x53bed5();});return{'attach'(_0x4ae5c4){_0x51ae33['observe'](_0x4ae5c4,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x51ae33['disconnect'](),_0x53bed5['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x33eee9,_0x3d9dc1){super(_0x33eee9),this['id']=_0x550e29(),this['focusTracker']=new _0x573782(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x491fa0,_0x1887af)=>this['fire']('Esc',_0x1887af)),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']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x3d9dc1),this['mainView']=_0x3d9dc1;const _0x4c53e1=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4c53e1['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 _0x4738da=this['element']['clientHeight'];_0x4738da&&(this['height']=_0x4738da);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x12fe42(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5cf9d9,target:_0x22e415,type:_0x205185,isVisible:_0x1643e8=!0x0}){super(),this['view']=_0x5cf9d9,this['view']['element']||this['view']['render'](),this['_type']=_0x205185,this['_target']=_0x22e415,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x100e27([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x575415,_0x115c69)=>{this['view']['focusTracker']['add'](_0x115c69);}),this['focusableElements']['on']('remove',(_0xd7c5d6,_0x547455)=>{this['view']['focusTracker']['remove'](_0x547455);}),this['set']('isVisible',_0x1643e8);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x4b0ea1=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x4b0ea1),_0x4b0ea1;}get['targetRect'](){const _0x2e6090=this['target'];if(null===_0x2e6090)return null;if(_0x2e6090 instanceof _0xefacec)return _0x2e6090;const _0x10df19=_0x2e6090['filter'](_0x11a461=>function(_0x2fcce4){const _0x236dd5=_0x2fcce4['offsetParent'];if(_0x236dd5)return!0x0;const _0x284f53=_0x2fcce4['getClientRects']()['item'](0x0);return!!_0x284f53;}(_0x11a461));return 0x0===_0x10df19['length']?null:new _0xefacec(_0x10df19[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5bea48){this['view']['isActive']=_0x5bea48,this['view']['mainView']['isActive']=_0x5bea48;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x79992e){if(!(null===_0x79992e||_0x79992e instanceof _0xefacec||Array['isArray'](_0x79992e)&&_0x79992e['every'](_0x3cafc5=>li(_0x3cafc5))))throw new _0x3f73c4('annotation-invalid-target',null,{'target':_0x79992e});}['_getNormalizedTarget'](){const _0x3f302c='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x3f302c)?[_0x3f302c]:_0x3f302c;}}function li(_0x5666ed){return null!==_0x5666ed&&'object'==typeof _0x5666ed&&'nodeType'in _0x5666ed&&0x1===_0x5666ed['nodeType'];}class _ extends _0x100e27{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x507dec=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x573782(),this['_focusTracker']['on']('change:isFocused',(_0x527d38,_0x26670b,_0x439607)=>{_0x439607||this['fire']('blur');});for(const _0x4da58f of _0x507dec)this['add'](_0x4da58f);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x43c963){if(this['has'](_0x43c963))throw new _0x3f73c4('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x43c963['innerView'],_0x43c963),this['_viewToAnnotation']['set'](_0x43c963['view'],_0x43c963);for(const _0x46ddb5 of _0x43c963['focusableElements'])this['_focusTracker']['add'](_0x46ddb5);this['listenTo'](_0x43c963['focusableElements'],'add',(_0x447487,_0x3329c4)=>{this['_focusTracker']['add'](_0x3329c4);}),this['listenTo'](_0x43c963['focusableElements'],'remove',(_0xfd9fe6,_0xbcc600)=>{this['_focusTracker']['remove'](_0xbcc600);}),this['listenTo'](_0x43c963['view']['focusTracker'],'change:isFocused',(_0x2b092b,_0x4caecc,_0x4eb237)=>{_0x4eb237&&this['fire']('focus',_0x43c963);}),_0x43c963['updateTargetRect']();const _0x459c4a=this['_getOrderInContent'](_0x43c963['view']['targetRect']);return super['add'](_0x43c963,_0x459c4a);}['remove'](_0x27d36c){if(!this['has'](_0x27d36c))throw new _0x3f73c4('annotationcollection-not-existing-item',null);this['stopListening'](_0x27d36c['view']['focusTracker']),this['stopListening'](_0x27d36c['focusableElements']);for(const _0x4c8d8b of _0x27d36c['focusableElements'])this['_focusTracker']['remove'](_0x4c8d8b);return this['_viewToAnnotation']['delete'](_0x27d36c['view']),this['_innerViewToAnnotation']['delete'](_0x27d36c['innerView']),super['remove'](_0x27d36c);}['getByInnerView'](_0x578e36){return this['_innerViewToAnnotation']['get'](_0x578e36);}['getByView'](_0x16bbd0){return this['_viewToAnnotation']['get'](_0x16bbd0);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1f7373 of this)_0x1f7373['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3e2094=Array['from'](this)['sort']((_0x1d37c1,_0x5cf846)=>v(_0x1d37c1['view']['targetRect'],_0x5cf846['view']['targetRect']));for(let _0xa1d408=_0x3e2094['length']-0x1;_0xa1d408>0x0;_0xa1d408--){const _0x320984=_0x3e2094[_0xa1d408];_0xa1d408!==this['getIndex'](_0x320984)&&(this['remove'](_0x320984),this['add'](_0x320984));}}['_getOrderInContent'](_0x2c7638){let _0x19cb1d=0x0;if(!_0x2c7638)return this['length'];for(const _0xfaf958 of this){const _0x4a4f33=_0xfaf958['view']['targetRect'];if(_0x4a4f33){if(v(_0x2c7638,_0x4a4f33)<0x0)return _0x19cb1d;_0x19cb1d++;}}return _0x19cb1d;}}function v(_0x4f7cde,_0x3d46b2){if(null===_0x4f7cde&&null===_0x3d46b2)return 0x0;if(null===_0x4f7cde)return-0x1;if(null===_0x3d46b2)return 0x1;const _0xeda864=_0x4f7cde['top']-_0x3d46b2['top'];return 0x0==_0xeda864?_0x4f7cde['left']-_0x3d46b2['left']:_0xeda864;}class O extends _0xd751f5{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3d6679){if(super(_0x3d6679),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3d6679 instanceof _0x5d6d0a){const _0x3dffae=_0x3d6679['locale'];_0x3d6679['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x3dffae,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x3dffae,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x3dffae,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x3dffae,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x3dffae,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x3dffae,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x3dffae,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5bbdc7){this['collection']['add'](_0x5bbdc7);}['remove'](_0x5694c5){this['collection']['remove'](_0x5694c5),_0x5694c5['destroy']();}['refreshVisibility'](){for(const _0x5bf928 of this['collection'])_0x5bf928['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0xfe4ac9){return this['collection']['getByInnerView'](_0xfe4ac9);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x52781d of this['collection'])_0x52781d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x7e7f20){this['fire']('_activateAnnotation',_0x7e7f20);}['createAnnotation'](_0x17a333){return new d(_0x17a333);}['createAnnotationView'](_0x350d8e,_0x285584){return new S(_0x350d8e,_0x285584);}['_addActiveAnnotation'](_0x223e4e){const _0x5e0c6b=new Set(this['activeAnnotations']);_0x5e0c6b['add'](_0x223e4e),this['activeAnnotations']=_0x5e0c6b;}['_removeActiveAnnotation'](_0x25982b){const _0x22d71d=new Set(this['activeAnnotations']);_0x22d71d['delete'](_0x25982b),this['activeAnnotations']=_0x22d71d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x14b67e=this['collection'],_0x4381d6=this['_visibleAnnotations'];function _0x205cf1(_0x1e66fc){const _0x3274ac=_0x1e66fc['source'];_0x3274ac['isVisible']&&!_0x4381d6['has'](_0x3274ac)?_0x4381d6['add'](_0x3274ac):!_0x3274ac['isVisible']&&_0x4381d6['has'](_0x3274ac)&&_0x4381d6['remove'](_0x3274ac),_0x3274ac['view']['focusTracker']['remove'](_0x3274ac['view']['element']),_0x3274ac['view']['focusTracker']['add'](_0x3274ac['view']['element']);}this['listenTo'](_0x14b67e,'add',(_0x59d9ae,_0x5b5fc8)=>{_0x5b5fc8['isVisible']&&_0x4381d6['add'](_0x5b5fc8),this['listenTo'](_0x5b5fc8,'change:isVisible',_0x205cf1);}),this['listenTo'](_0x14b67e,'remove',(_0x19cdef,_0x10ac49)=>{_0x4381d6['has'](_0x10ac49)&&_0x4381d6['remove'](_0x10ac49),this['stopListening'](_0x10ac49,'change:isVisible',_0x205cf1);});}['_setupEnterAnnotationKeystroke'](){const _0x51a41d=_0x1c6a0a=>{_0x1c6a0a['on']('ready',()=>{_0x1c6a0a['keystrokes']['set'](_0x4e7ea4,(_0x42d5ab,_0x4c1384)=>{const _0x457b9c=_0x13001c(this['activeAnnotations']['values']());_0x457b9c&&(_0x457b9c['view']['focus'](),_0x4c1384());});});};this['context']instanceof _0x5d6d0a?_0x51a41d(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x467924,_0x1fa969)=>{_0x51a41d(_0x1fa969);});}['_setupEscapeAnnotationHandling'](){const _0x30ee1a=_0x568530=>{const _0x5d3326=_0x568530['source'],_0x556d41=[];let _0x479fad;if(Array['isArray'](_0x5d3326['target'])){_0x479fad=_0x5d3326['target'][0x0],this['context']instanceof _0x5d6d0a?_0x556d41['push'](this['context']):this['context']['editors']&&_0x556d41['push'](...this['context']['editors']);for(const _0x192723 of _0x556d41)for(const _0x4436cd of _0x192723['editing']['view']['domRoots']['values']())if(_0x4436cd['contains'](_0x479fad))return void _0x192723['editing']['view']['focus']();_0x479fad['focus']();}};this['listenTo'](this['collection'],'add',(_0x5e51f2,_0x37ef4c)=>{this['listenTo'](_0x37ef4c,'escape',_0x30ee1a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2abf12,_0x78299b)=>{this['stopListening'](_0x78299b,'escape',_0x30ee1a);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xd751f5{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44b182){super(_0x44b182),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x366df6=this['context']['config'];_0x366df6['define']('comments.maxCommentsWhenCollapsed',0x2),_0x366df6['define']('comments.maxThreadTotalWeight',0x1f4),_0x366df6['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x366df6['define']('comments.CommentThreadView',vt),_0x366df6['define']('comments.CommentView',gt),_0x366df6['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2f4bce=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3c2192,_0x25c883)=>this['_addCommentThread'](_0x25c883)),this['on']('submitCommentThread',(_0x4a4341,_0x29a035)=>this['_submitCommentThread'](_0x29a035)),this['on']('resolveCommentThread',(_0x3122c7,_0x5e4946)=>this['_resolveCommentThread'](_0x5e4946)),this['on']('resolveCommentThread',(_0x3d505f,_0x18be33)=>this['_updateActiveAnnotation'](_0x18be33),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x34390a,_0x2bdf98)=>this['_reopenCommentThread'](_0x2bdf98)),this['on']('reopenCommentThread',(_0x54ba25,_0x3a408d)=>this['_updateActiveAnnotation'](_0x3a408d),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1a266e,_0x216de9)=>this['_removeCommentThread'](_0x216de9)),this['on']('updateCommentThread',(_0x371958,_0xce4f47)=>this['_updateCommentThread'](_0xce4f47)),this['on']('updateCommentThread',(_0x37f258,_0x399d89)=>this['_updateActiveAnnotation'](_0x399d89),{'priority':'lowest'}),this['on']('addComment',(_0x8e7728,_0x5da5d9)=>this['_addComment'](_0x5da5d9)),this['on']('updateComment',(_0x5462b9,_0x26737b)=>this['_updateComment'](_0x26737b)),this['on']('removeComment',(_0x557439,_0x46216c)=>this['_removeComment'](_0x46216c)),this['on']('addComment',(_0x4526c9,{threadId:_0x166b11,isFromAdapter:_0x4b2ca1})=>{if(_0x4b2ca1)return;const _0x56459a=this['getCommentThread'](_0x166b11),_0x19f440=_0x56459a&&this['_threadToController']['get'](_0x56459a);_0x19f440&&_0x19f440['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2f4bce,'change:activeAnnotations',(_0x9feada,_0x30d83b,_0x2c812b)=>{const _0x1257ee=Array['from'](_0x2c812b)['map'](_0x3fa317=>this['_viewToController']['get'](_0x3fa317['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1257ee?_0x1257ee['model']:null;});}set['adapter'](_0x48525d){if(this['_adapter'])throw new _0x3f73c4('commentsrepository-adapter-already-set');this['_adapter']=_0x48525d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3bb6d0=Tt,threadId:_0x507b31=_0x550e29(),comments:_0x3f6e98=[],unlinkedAt:_0x3568dd=null,resolvedAt:_0x282c66=null,resolvedBy:_0x30620b=null,target:_0x58200a=null,context:_0x3914a2=null,attributes:_0x5b40c7={},isResolvable:_0x4eb009=!0x0,isSubmitted:_0x3dc1e8=!0x1,isFromAdapter:_0x254168=!0x1}={}){return this['fire'](bt('addCommentThread',_0x3bb6d0),{'channelId':_0x3bb6d0,'threadId':_0x507b31,'comments':_0x3f6e98,'unlinkedAt':_0x3568dd,'resolvedAt':_0x282c66,'resolvedBy':_0x30620b,'target':_0x58200a,'context':_0x3914a2,'attributes':_0x5b40c7,'isFromAdapter':_0x254168,'isResolvable':_0x4eb009,'isSubmitted':_0x3dc1e8}),this['getCommentThread'](_0x507b31);}['openNewCommentThread']({channelId:_0x2e7c2b=Tt,threadId:_0x2a4aeb=_0x550e29(),target:_0x33a459,context:_0x41e008=null,isResolvable:_0x439d28=!0x0}){if(this['_readOnlyChannels']['has'](_0x2e7c2b)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x33a459)throw new _0x3f73c4('commentsrepository-missing-target');const _0xafe146=this['addCommentThread']({'channelId':_0x2e7c2b,'threadId':_0x2a4aeb,'target':_0x33a459,'context':_0x41e008,'isResolvable':_0x439d28});if(!_0xafe146)return null;const _0x25aaef=this['_threadToController']['get'](_0xafe146),_0x24f34d=_0x25aaef['view']['commentThreadInputView']['commentInputView'],_0x3f689c=this['context']['plugins']['get'](O),_0x17e9df=_0x3f689c['getByInnerView'](_0x25aaef['view']);return _0x3f689c['activate'](_0x17e9df),_0x24f34d['once']('editorReady',()=>_0x24f34d['focus']()),_0xafe146;}['hasCommentThread'](_0x52ac64){if('string'!=typeof _0x52ac64)throw new _0x3f73c4('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x52ac64);}['updateCommentThread']({channelId:_0x20ef90=Tt,threadId:_0x351854,context:_0x3e33d9,unlinkedAt:_0x1627e1,attributes:_0x1a6d04,isFromAdapter:_0x414f77=!0x1}){return this['fire'](bt('updateCommentThread',_0x20ef90),{'channelId':_0x20ef90,'threadId':_0x351854,'context':_0x3e33d9,'unlinkedAt':_0x1627e1,'attributes':_0x1a6d04,'isFromAdapter':_0x414f77}),this['getCommentThread'](_0x351854);}['getCommentThread'](_0x13ad0c){if('string'!=typeof _0x13ad0c)throw new _0x3f73c4('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x13ad0c);}['fetchCommentThread']({channelId:_0x184d6b,threadId:_0x516abc}={}){const _0x56b7e4=this['getCommentThread'](_0x516abc);if(_0x56b7e4)return Promise['resolve'](_0x56b7e4);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3f73c4('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x184d6b,'threadId':_0x516abc})['then'](_0xba04d3=>this['hasCommentThread'](_0x516abc)?this['getCommentThread'](_0x516abc):_0xba04d3?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x184d6b},_0xba04d3)):void 0x0)['catch'](_0x22e3f1=>{throw console['error'](_0x22e3f1),new _0x3f73c4('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0xffce9,skipNotAttached:_0x21cd56=!0x1,skipEmpty:_0x25d9da=!0x1,toJSON:_0x553e60=!0x1}={}){const _0x141fc5=[];for(const _0x33bf5e of this['_threads']['values']())_0xffce9&&_0x33bf5e['channelId']!==_0xffce9||_0x21cd56&&!_0x33bf5e['isAttached']||_0x25d9da&&0x0===_0x33bf5e['length']||_0x141fc5['push'](_0x33bf5e);return _0x553e60?_0x141fc5['map'](_0x42a81d=>_0x42a81d['toJSON']()):_0x141fc5;}['setActiveCommentThread'](_0x9e5b01){const _0x2fed79=this['context']['plugins']['get'](O);if(!_0x9e5b01)return void(this['activeCommentThread']&&_0x2fed79['deactivateAll']());const _0x3fe3d1=this['getCommentThread'](_0x9e5b01);if(!_0x3fe3d1)throw new _0x3f73c4('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x9e5b01});if(!this['_threadToController']['has'](_0x3fe3d1))throw new _0x3f73c4('commentsrepository-active-not-attached',null,{'threadId':_0x9e5b01});const _0x4c1578=_0x2fed79['getByInnerView'](this['_threadToController']['get'](_0x3fe3d1)['view']);_0x2fed79['activate'](_0x4c1578);}['switchReadOnly'](_0x47e89c,_0x507370){_0x47e89c?this['_readOnlyChannels']['add'](_0x507370):this['_readOnlyChannels']['delete'](_0x507370),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x35dbcb){return this['_readOnlyChannels']['has'](_0x35dbcb)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x18a04e,_0x3aaa7a){return new Ct(_0x18a04e,_0x3aaa7a);}['setPermissions'](_0x218ad2,_0x51acc3=Tt){this['_permissions']['set'](_0x51acc3,_0x218ad2),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2f7f05=Tt){return this['_permissions']['has'](_0x2f7f05)?this['_permissions']['get'](_0x2f7f05):_t;}['_addCommentThread']({channelId:_0x2fad02,threadId:_0x39c675,comments:_0x11c4b0,unlinkedAt:_0x2b69b5,resolvedAt:_0x323faf,resolvedBy:_0x2050f7,target:_0x45cda5,context:_0x3139a1,attributes:_0x18c8bb,isFromAdapter:_0x216ed1,isResolvable:_0x103a02,isSubmitted:_0x986c0e}){if('string'!=typeof _0x39c675)throw new _0x3f73c4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x39c675});if(this['hasCommentThread'](_0x39c675))throw new _0x3f73c4('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x39c675});const _0x299d4c=new ui(this,{'channelId':_0x2fad02,'id':_0x39c675,'context':_0x3139a1,'attributes':_0x18c8bb,'unlinkedAt':_0x2b69b5,'resolvedAt':_0x323faf,'resolvedBy':_0x2050f7?this['context']['plugins']['get'](it)['getUser'](_0x2050f7):null,'isResolvable':_0x103a02,'isSubmitted':_0x986c0e||_0x216ed1});this['_threads']['set'](_0x39c675,_0x299d4c);for(const _0x5a7af1 of _0x11c4b0)_0x299d4c['_add'](this['_createNewComment']({'threadId':_0x39c675,..._0x5a7af1}));return _0x45cda5&&_0x299d4c['attachTo'](_0x45cda5),_0x216ed1||!_0x299d4c['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2fad02,'threadId':_0x39c675});}['_submitCommentThread']({channelId:_0x42f581,threadId:_0x50aca2}){if(!this['hasCommentThread'](_0x50aca2))throw new _0x3f73c4('commentsrepository-missing-comment-thread',this);const _0x3db8f7=this['getCommentThread'](_0x50aca2);if(_0x3db8f7['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x35e3a8,comments:_0x2b4c46,resolvedAt:_0x30fe1c,resolvedBy:_0x18f133,context:_0x50ad08,attributes:_0x5c91ca}=_0x3db8f7,_0x1b66b4=this['context']['plugins']['get']('PendingActions'),_0x4860e0=_0x1b66b4['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x42f581,'threadId':_0x35e3a8,'comments':_0x2b4c46['map'](_0x556ffb=>_0x556ffb['toJSON']()),'resolvedAt':_0x30fe1c,'resolvedBy':_0x18f133?_0x18f133['id']:_0x18f133,'context':_0x50ad08,'attributes':_0x5c91ca})['then'](({comments:_0x2225a6})=>{_0x1b66b4['remove'](_0x4860e0);for(const _0x5a6e7e of _0x2225a6)this['_updateComment']({'channelId':_0x42f581,'threadId':_0x50aca2,'commentId':_0x5a6e7e['commentId'],'createdAt':_0x5a6e7e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x431625=>{throw console['error'](_0x431625),new _0x3f73c4('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x1c5afa,target:_0x2c7117}){const _0x403d7e=this['getCommentThread'](_0x1c5afa);if(!_0x403d7e)throw new _0x3f73c4('commentsrepository-attach-missing-comment-thread',this);const _0x9cf35d=this['context']['plugins']['get']('PendingActions'),_0x46b412=this['context']['plugins']['get'](O),_0x1ff0fa=this['_createCommentThreadView'](_0x403d7e),_0x250a67=new Ct(_0x403d7e,_0x1ff0fa);let _0x32795d=null;_0x1ff0fa['on']('change:isDirty',(_0x11a389,_0x30e673,_0x10387c)=>{_0x10387c?_0x32795d=_0x9cf35d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x32795d&&(_0x9cf35d['remove'](_0x32795d),_0x32795d=null);}),this['_threadToController']['set'](_0x403d7e,_0x250a67),this['_viewToController']['set'](_0x1ff0fa,_0x250a67);const _0xe57ad0=new S(this['context']['locale'],_0x1ff0fa);_0xe57ad0['bind']('length')['to'](_0x1ff0fa),_0xe57ad0['bind']('isDirty')['to'](_0x1ff0fa,'isDirty',_0x1ff0fa,'length',(_0x229f16,_0x4481db)=>_0x229f16||!_0x4481db),_0xe57ad0['bind']('isActive')['to'](_0x1ff0fa),_0xe57ad0['type']='comment';const _0x48c72f=new d({'view':_0xe57ad0,'target':_0x2c7117,'type':'comment','isVisible':!_0x403d7e['archivedAt']});return _0x1ff0fa['on']('escape',()=>{_0x48c72f['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1ff0fa,_0x48c72f),_0x46b412['add'](_0x48c72f),_0x48c72f;}['_bindAnnotationToEditors'](_0x2a1a28,_0x1e5e3a){this['listenTo'](_0x2a1a28,'editorReady',(_0x3eb613,_0x407ef9)=>{const _0x269a35=_0x407ef9['ui']['view']['body']['bodyCollectionContainer'];_0x1e5e3a['focusableElements']['add'](_0x269a35),this['context']instanceof _0x5d6d0a&&this['context']['ui']['focusTracker']['add'](_0x269a35);},{'priority':'highest'}),this['listenTo'](_0x2a1a28,'editorDestroyed',(_0x440fd8,_0x2face7)=>{const _0x4daf44=_0x2face7['ui']['view']['body']['bodyCollectionContainer'];_0x1e5e3a['focusableElements']['has'](_0x4daf44)&&_0x1e5e3a['focusableElements']['remove'](_0x4daf44),this['context']instanceof _0x5d6d0a&&this['context']['ui']['focusTracker']['remove'](_0x4daf44);});}['_unbindEditors'](_0xccd4f4){this['stopListening'](_0xccd4f4,'editorReady'),this['stopListening'](_0xccd4f4,'editorDestroyed');}['_createCommentThreadView'](_0x3f058b){const _0x541bdb=this['context']['plugins']['get'](it),{config:_0x43560c,locale:_0x20925b}=this['context'],_0x10112f=lt(_0x43560c['get']('locale'),_0x20925b);return new(0x0,(_0x43560c['get']('comments'))['CommentThreadView'])(_0x20925b,_0x3f058b,_0x541bdb['me'],{'editorConfig':{..._0x43560c['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x43560c['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x43560c['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x43560c['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x43560c['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x10112f,'CommentView':_0x43560c['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x4b9d5b,channelId:_0x1c6e4a,resolvedAt:_0x47768c,resolvedBy:_0x337676,isFromAdapter:_0x4c04f9}){if(!this['hasCommentThread'](_0x4b9d5b))throw new _0x3f73c4('commentsrepository-missing-comment-thread',null,{'threadId':_0x4b9d5b});const _0x2cf341=this['getCommentThread'](_0x4b9d5b);if(_0x2cf341['isResolved'])throw new _0x3f73c4('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4b9d5b});const _0x5d8236=this['context']['plugins']['get'](it);if(_0x2cf341['resolvedBy']=_0x5d8236['getUser'](_0x337676),_0x2cf341['resolvedAt']=_0x47768c,_0x4c04f9||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x36f72c=this['context']['plugins']['get']('PendingActions'),_0x4a2a77=_0x36f72c['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1c6e4a,'threadId':_0x4b9d5b})['then'](({resolvedAt:_0x20ad25,resolvedBy:_0x5517c6})=>{_0x36f72c['remove'](_0x4a2a77),_0x2cf341['resolvedBy']['id']!==_0x5517c6&&(_0x2cf341['resolvedBy']=_0x5d8236['getUser'](_0x5517c6)),_0x2cf341['resolvedAt']=_0x20ad25;})['catch'](_0x145fe7=>{throw console['error'](_0x145fe7),new _0x3f73c4('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x403f64,channelId:_0x4d5d79,isFromAdapter:_0x24202c}){if(!this['hasCommentThread'](_0x403f64))throw new _0x3f73c4('commentsrepository-missing-comment-thread',null,{'threadId':_0x403f64});const _0x21e69f=this['getCommentThread'](_0x403f64);if(!_0x21e69f['isResolved'])throw new _0x3f73c4('commentsrepository-reopen-comment-thread',null,{'threadId':_0x403f64});if(_0x21e69f['resolvedBy']=null,_0x21e69f['resolvedAt']=null,_0x24202c||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x19ca49=this['context']['plugins']['get']('PendingActions'),_0xdcf0f5=_0x19ca49['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4d5d79,'threadId':_0x403f64})['then'](()=>_0x19ca49['remove'](_0xdcf0f5))['catch'](_0x102b92=>{throw console['error'](_0x102b92),new _0x3f73c4('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0xaa0b74,isFromAdapter:_0x1e98de}){const _0x3f2049=this['getCommentThread'](_0xaa0b74);if(!_0x3f2049)throw new _0x3f73c4('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0xaa0b74),this['_threads']['delete'](_0xaa0b74),!_0x3f2049['isSubmitted']||_0x1e98de||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2d5120=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4578e2}=_0x3f2049,_0x5f2217=_0x2d5120['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4578e2,'threadId':_0xaa0b74})['then'](()=>_0x2d5120['remove'](_0x5f2217))['catch'](_0x13fb51=>{throw console['error'](_0x13fb51),new _0x3f73c4('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x25dcb5,unlinkedAt:_0x19cd9b,context:_0x2d5c09,attributes:_0x29781e,isFromAdapter:_0x7d76fc}){if('string'!=typeof _0x25dcb5)throw new _0x3f73c4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x25dcb5});if(!this['hasCommentThread'](_0x25dcb5))throw new _0x3f73c4('commentsrepository-missing-comment-thread',null,{'threadId':_0x25dcb5});const _0x279fc2=this['getCommentThread'](_0x25dcb5);let _0x150c88=!0x1;if(void 0x0!==_0x2d5c09&&_0x279fc2['context']!==_0x2d5c09&&(_0x279fc2['context']=_0x2d5c09,_0x150c88=!0x0),void 0x0!==_0x19cd9b&&_0x279fc2['unlinkedAt']!==_0x19cd9b&&(_0x279fc2['unlinkedAt']=_0x19cd9b,_0x150c88=!0x0),_0x29781e&&!wt(_0x29781e,_0x279fc2['attributes'])&&(_0x279fc2['attributes']=_0x29781e,_0x150c88=!0x0),!_0x150c88)return Promise['resolve']();if(!_0x279fc2['isSubmitted']||_0x7d76fc||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4770e5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x394c46}=_0x279fc2,_0x6de587=_0x4770e5['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x394c46,'threadId':_0x25dcb5,'context':_0x2d5c09,'unlinkedAt':_0x19cd9b,'attributes':_0x29781e})['then'](()=>_0x4770e5['remove'](_0x6de587))['catch'](_0x438d07=>{throw console['error'](_0x438d07),new _0x3f73c4('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x568300){const _0xbb0190=this['context']['plugins']['get'](O),_0x3f1324=this['getCommentThread'](_0x568300);if(_0x3f1324['_isAttached']=!0x1,this['_threadToController']['has'](_0x3f1324)){const _0x5edb34=this['_threadToController']['get'](_0x3f1324),_0x501281=_0x5edb34['view'],_0x28ac8c=_0xbb0190['getByInnerView'](_0x501281);this['_threadToController']['delete'](_0x3f1324),this['_viewToController']['delete'](_0x501281),_0x28ac8c&&_0xbb0190['remove'](_0x28ac8c),_0x5edb34['destroy'](),_0x501281['destroy']()['then'](()=>{this['_unbindEditors'](_0x501281);});}}['_updateActiveAnnotation']({threadId:_0x52f37d,resolvedAt:_0x100e2a,unlinkedAt:_0x4e163e}){const _0x28794c=!!_0x100e2a,_0x311467=this['context']['plugins']['get'](O),_0x568a06=this['getCommentThread'](_0x52f37d);if(this['_threadToController']['has'](_0x568a06)){const _0x3a9e5b=this['_threadToController']['get'](_0x568a06)['view'],_0x78a0b9=_0x311467['getByInnerView'](_0x3a9e5b);_0x78a0b9&&(_0x28794c&&_0x311467['_removeActiveAnnotation'](_0x78a0b9),_0x4e163e?_0x78a0b9['isVisible']=!0x1:_0x78a0b9['refreshVisibility']());}}['_getExternalAuthor'](_0x4f0921){const _0x150a1c=this['context']['plugins']['get'](it),_0x411f08=pt('external:'+_0x4f0921),_0x955816=_0x150a1c['getUser'](_0x411f08);return _0x955816||_0x150a1c['addUser']({'id':_0x411f08,'name':_0x4f0921});}['_createNewComment']({threadId:_0x56bc22,commentId:_0x197514=_0x550e29(),content:_0x28884e,authorId:_0x335b06,createdAt:_0x5b3ecb,attributes:_0x2c4501}){if('string'!=typeof _0x197514)throw new _0x3f73c4('commentsrepository-invalid-commentid');if('string'!=typeof _0x335b06)throw new _0x3f73c4('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x28884e||!_0x28884e['trim']())throw new _0x3f73c4('commentsrepository-invalid-comment-content');const _0x36349e=this['context']['plugins']['get'](it)['getUser'](_0x335b06);if(!_0x36349e)throw new _0x3f73c4('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x335b06});let _0x474eec=null,_0x7d4342=_0x5b3ecb;return _0x2c4501?.['@external']&&(_0x474eec=this['_getExternalAuthor'](_0x2c4501['@external']['authorName']),_0x7d4342=new Date(_0x2c4501['@external']['createdAt'])),new fi(this,{'threadId':_0x56bc22,'id':_0x197514,'author':_0x474eec||_0x36349e,'creator':_0x36349e,'content':_0x28884e,'createdAt':_0x5b3ecb,'authoredAt':_0x7d4342,'attributes':_0x2c4501});}['_addComment'](_0x2568e0){let {threadId:_0x5f12e8,content:_0x177fc4,attributes:_0x5c024b,isFromAdapter:_0xde3b38}=_0x2568e0;const _0x51f4ff=this['getCommentThread'](_0x2568e0['threadId']);if(!_0x51f4ff)throw new _0x3f73c4('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1b06d7=this['_createNewComment'](_0x2568e0),{id:_0x4d4dcc}=_0x1b06d7;if(_0x51f4ff['_add'](_0x1b06d7),_0xde3b38||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x51f4ff['isSubmitted'])return Promise['resolve']();const _0x3c547d=this['context']['plugins']['get']('PendingActions'),{channelId:_0xee4849}=_0x51f4ff,_0x4e0961=_0x3c547d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5c024b||(_0x5c024b={}),this['adapter']['addComment']({'channelId':_0xee4849,'threadId':_0x5f12e8,'commentId':_0x4d4dcc,'content':_0x177fc4,'attributes':_0x5c024b})['then'](_0x2e533a=>{_0x3c547d['remove'](_0x4e0961),_0x2e533a&&this['_updateComment']({'channelId':_0xee4849,'threadId':_0x5f12e8,'commentId':_0x4d4dcc,'createdAt':_0x2e533a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x10b578=>{throw console['error'](_0x10b578),new _0x3f73c4('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0xfcf3b0,commentId:_0x121ca0,content:_0x318161,createdAt:_0x9abc68,attributes:_0x1392f1,isFromAdapter:_0x5ca140}){if(void 0x0!==_0x318161&&('string'!=typeof _0x318161||!_0x318161['trim']()['length']))throw new _0x3f73c4('commentsrepository-update-comment-invalid-content');const _0x35058f=this['getCommentThread'](_0xfcf3b0),_0x5dc156=_0x35058f['getComment'](_0x121ca0);if(!_0x5dc156)throw new _0x3f73c4('commentsrepository-update-missing-comment',this);let _0x13a89e=!0x1;if(_0x318161&&_0x318161!==_0x5dc156['content']&&(_0x5dc156['isEditable']||_0x5ca140)&&(_0x5dc156['content']=_0x318161,_0x13a89e=!0x0),_0x9abc68&&_0x9abc68!==_0x5dc156['createdAt']&&(_0x5dc156['createdAt']=_0x9abc68,_0x5dc156['attributes']&&_0x5dc156['attributes']['@external']||(_0x5dc156['authoredAt']=_0x9abc68),_0x13a89e=!0x0),_0x1392f1&&!wt(_0x1392f1,_0x5dc156['attributes'])&&(_0x5dc156['attributes']=_0x1392f1,_0x13a89e=!0x0),!_0x13a89e)return Promise['resolve']();if(_0x35058f['fire']('commentUpdated'),_0x5ca140||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x87f32=this['context']['plugins']['get']('PendingActions'),{channelId:_0xb45a07}=this['getCommentThread'](_0x5dc156['threadId']),_0x4fb544=_0x87f32['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xb45a07,'threadId':_0xfcf3b0,'commentId':_0x121ca0,'content':_0x318161,'attributes':_0x1392f1})['then'](()=>_0x87f32['remove'](_0x4fb544))['catch'](_0x4bd2fa=>{throw console['error'](_0x4bd2fa),new _0x3f73c4('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xbb1f1,commentId:_0x3098b1,isFromAdapter:_0x1a1a44}){const _0x7ebd5c=this['getCommentThread'](_0xbb1f1),_0x1cf195=_0x7ebd5c['getComment'](_0x3098b1);if(!_0x1cf195)throw new _0x3f73c4('commentsrepository-remove-missing-comment',this);if(_0x7ebd5c['_remove'](_0x1cf195),_0x1a1a44||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x6a5c5c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x517d3f}=_0x7ebd5c,_0x32a5a5=_0x6a5c5c['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x517d3f,'threadId':_0xbb1f1,'commentId':_0x3098b1})['then'](()=>_0x6a5c5c['remove'](_0x32a5a5))['catch'](_0x529d8a=>{throw console['error'](_0x529d8a),new _0x3f73c4('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x12fe42(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4c871d,_0x1edf50){super();const _0x20c834=_0x1edf50['isResolvable'];this['channelId']=_0x1edf50['channelId'],this['id']=_0x1edf50['id'],this['comments']=new _0x100e27(),this['_repository']=_0x4c871d,this['_isAttached']=!0x1,this['_isSubmitted']=_0x1edf50['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4c871d,'_permissions',_0x4c871d,'_readOnlyChannels',()=>_0x4c871d['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4c871d,'_permissions',()=>_0x4c871d['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4c871d,'_permissions',()=>{const _0x5550a8=_0x4c871d['getPermissions'](this['channelId']);return _0x5550a8['write']||_0x5550a8['admin'];}),this['bind']('isResolvable')['to'](_0x4c871d,'_permissions',()=>_0x20c834&&_0x4c871d['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x1edf50['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x366252,_0x266027)=>_0x366252?_0x266027?_0x366252<_0x266027?_0x366252:_0x266027:_0x366252:_0x266027),this['set']('unlinkedAt',_0x1edf50['unlinkedAt']||null),this['set']('resolvedAt',_0x1edf50['resolvedAt']||null),this['set']('resolvedBy',_0x1edf50['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0xc22811=>!!_0xc22811),this['set']('attributes',_0x1edf50['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x340bd5,_0x129ecc)=>_0x340bd5+_0x129ecc['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x885bdd,id:_0x170645}=this;this['_repository']['fire'](bt('submitCommentThread',_0x885bdd),{'channelId':_0x885bdd,'threadId':_0x170645});}['setUnlinkedAt'](_0x5abf63){this['_update']({'unlinkedAt':_0x5abf63});}['resolve']({resolvedAt:_0x42c1bc=new Date(),resolvedBy:_0xbfebce=null,isFromAdapter:_0x558b82=!0x1}={}){const _0x4ccdc1=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x2a18a6,id:_0x6270b2}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x2a18a6),{'channelId':_0x2a18a6,'threadId':_0x6270b2,'resolvedAt':_0x42c1bc,'resolvedBy':_0xbfebce||_0x4ccdc1['id'],'isFromAdapter':_0x558b82});}['reopen']({isFromAdapter:_0x350835=!0x1}={}){const {channelId:_0x4a0269,id:_0x3e1567}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x4a0269),{'channelId':_0x4a0269,'threadId':_0x3e1567,'isFromAdapter':_0x350835});}['setContext'](_0xdc1ca0){this['context']||this['_update']({'context':_0xdc1ca0});}['setAttribute'](_0x29ff3c,_0x38911c){const _0x2f0d74=It(this['attributes']);At(_0x2f0d74,_0x29ff3c,_0x38911c),this['_update']({'attributes':_0x2f0d74});}['removeAttribute'](_0x3ebcc2){const _0x460f56=It(this['attributes']);yt(_0x460f56,_0x3ebcc2),this['_update']({'attributes':_0x460f56});}['remove']({isFromAdapter:_0x2b56a0=!0x1}={}){const {channelId:_0x302769,id:_0x34206d}=this;this['_repository']['fire'](bt('removeCommentThread',_0x302769),{'channelId':_0x302769,'threadId':_0x34206d,'isFromAdapter':_0x2b56a0});}['attachTo'](_0x2c1fc3){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2c1fc3});}['addComment'](_0x59205f){const {channelId:_0x116743,id:_0x911bc7}=this;this['_repository']['fire'](bt('addComment',_0x116743,_0x911bc7),Object['assign']({'channelId':_0x116743,'threadId':_0x911bc7},_0x59205f));}['getComment'](_0x2f2c69){if('string'!=typeof _0x2f2c69)throw new _0x3f73c4('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x2f2c69});return this['comments']['get'](_0x2f2c69);}['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'](_0x3c7e44=>_0x3c7e44['toJSON']()),'attributes':this['attributes']};}['_add'](_0x420ebe){return this['listenTo'](_0x420ebe,'change:authoredAt',()=>{const _0x4e14db=this['_findOptimalIndex'](_0x420ebe),_0x3166e0=this['comments'];_0x4e14db-0x1!=_0x3166e0['getIndex'](_0x420ebe)&&_0x4e14db+0x1!=_0x3166e0['getIndex'](_0x420ebe)&&(this['_remove'](_0x420ebe),this['_add'](_0x420ebe));}),this['comments']['add'](_0x420ebe,this['_findOptimalIndex'](_0x420ebe));}['_update'](_0x368a7d){const {channelId:_0x270b0a,id:_0x420c3d}=this;this['_repository']['fire'](bt('updateCommentThread',_0x270b0a),{..._0x368a7d,'channelId':_0x270b0a,'threadId':_0x420c3d});}['_remove'](_0x4e1f52){return this['stopListening'](_0x4e1f52),_0x4e1f52['destroy'](),this['comments']['remove'](_0x4e1f52);}['_findOptimalIndex'](_0x1ec1e8){const _0x14a079=this['comments']['find'](_0x261203=>new Date(_0x261203['authoredAt'])['getTime']()>new Date(_0x1ec1e8['authoredAt'])['getTime']());return _0x14a079?this['comments']['getIndex'](_0x14a079):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x12fe42(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0xb45f9f,_0xbd7778){super();const _0x36615a=_0xb45f9f['context']['plugins']['get'](it)['me'],_0x3998c=_0xb45f9f['getCommentThread'](_0xbd7778['threadId']),_0x350d94=0x0===_0x3998c['comments']['length'],_0x502d9b=_0x36615a===_0xbd7778['author'];this['id']=_0xbd7778['id'],this['threadId']=_0xbd7778['threadId'],this['author']=_0xbd7778['author'],this['creator']=_0xbd7778['creator'],this['isExternal']=Boolean(_0xbd7778['attributes']&&_0xbd7778['attributes']['@external']),this['set']('content',_0xbd7778['content']),this['createdAt']=_0xbd7778['createdAt']||new Date(),this['set']('authoredAt',_0xbd7778['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3998c,'resolvedAt'),this['set']('attributes',_0xbd7778['attributes']||{}),this['bind']('isEditable')['to'](_0xb45f9f,'_permissions',()=>{const _0x129096=_0xb45f9f['getPermissions'](_0x3998c['channelId'])['write'],_0x280346=_0xb45f9f['getPermissions'](_0x3998c['channelId'])['modifyAll'];return _0x502d9b&&_0x129096||!_0x502d9b&&_0x280346;}),this['bind']('isRemovable')['to'](_0x3998c,'isRemovable',_0xb45f9f,'_permissions',_0x5919c7=>{const _0x135ec2=_0xb45f9f['getPermissions'](_0x3998c['channelId'])['write'],_0x465b=_0xb45f9f['getPermissions'](_0x3998c['channelId'])['modifyAll'];return _0x502d9b&&_0x135ec2||_0x5919c7&&_0x350d94||!_0x502d9b&&_0x465b&&!_0x350d94;}),this['bind']('isReadOnly')['to'](_0x3998c,'isReadOnly'),this['_repository']=_0xb45f9f;}get['weight'](){return Math['max'](function(_0x518961){const _0x104f64=document['createElement']('div');return _0x104f64['innerHTML']=_0x518961,_0x104f64['textContent']['length'];}(this['content']),0xc8);}['update'](_0x4f8393){const {threadId:_0x25a770,id:_0x15875a}=this;if(!this['_repository']['hasCommentThread'](_0x25a770))throw new _0x3f73c4('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x1a28fe}=this['_repository']['getCommentThread'](_0x25a770);this['_repository']['fire'](bt('updateComment',_0x1a28fe,_0x25a770),{'channelId':_0x1a28fe,'threadId':_0x25a770,'commentId':_0x15875a,..._0x4f8393});}['setAttribute'](_0x50fcea,_0x1ee9dc){const _0x5305d9=It(this['attributes']);At(_0x5305d9,_0x50fcea,_0x1ee9dc),this['update']({'attributes':_0x5305d9});}['removeAttribute'](_0x1818d9){const _0x131035=It(this['attributes']);yt(_0x131035,_0x1818d9),this['update']({'attributes':_0x131035});}['remove'](_0x15c719={}){if(!_0x15c719['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x45c181,id:_0x57d3ad}=this;if(!this['_repository']['hasCommentThread'](_0x45c181))throw new _0x3f73c4('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x3d56e3}=this['_repository']['getCommentThread'](_0x45c181);this['_repository']['fire'](bt('removeComment',_0x3d56e3,_0x45c181),{'channelId':_0x3d56e3,'threadId':_0x45c181,'commentId':_0x57d3ad,..._0x15c719});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x30b07d,..._0x1cb0c6){for(const _0xfaf34e of _0x1cb0c6)void 0x0!==_0xfaf34e&&(_0x30b07d+=':'+String(_0xfaf34e));return _0x30b07d;}class J extends _0xceca52{['refresh'](){const _0x2bf03a=this['editor']['model']['document']['selection'];for(const _0x55bc34 of _0x2bf03a['getRanges']())if(this['_hasContent'](_0x55bc34))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x3c7660=_0x550e29()}={}){const _0x41e66b=this['editor']['model'],_0x15b145=[];for(const _0x2d7765 of _0x41e66b['document']['selection']['getRanges']())this['_hasContent'](_0x2d7765)&&_0x15b145['push'](this['_trimToContent'](_0x2d7765));_0x41e66b['change'](_0x2c56b6=>{for(const _0x227442 of _0x15b145){const _0x54e384=_0x550e29()['substr'](0x1,0x5),_0x34b70a='comment:'+_0x3c7660+':'+_0x54e384;_0x2c56b6['addMarker'](_0x34b70a,{'range':_0x227442,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x5dbcde){for(const _0x4fde09 of _0x5dbcde['getItems']())if(this['_itemIsContent'](_0x4fde09))return!0x0;return!0x1;}['_itemIsContent'](_0x28aa27){return _0x28aa27['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x28aa27)&&!_0x28aa27['is']('element','tableCell');}['_trimToContent'](_0x45ab88){const _0x2d789c=_0x20c8de=>!this['_itemIsContent'](_0x20c8de['item']),_0x111563=_0x45ab88['start']['getLastMatchingPosition'](_0x2d789c),_0x49bae7=_0x45ab88['end']['getLastMatchingPosition'](_0x2d789c,{'direction':'backward'});return this['editor']['model']['createRange'](_0x111563,_0x49bae7);}}class P extends _0x5dedc1{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x584cbf){super(_0x584cbf),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x39f070=this['editor'],_0x1d0abd=_0x39f070['model']['document']['selection'],_0x916215=_0x4eaad4(()=>this['refreshSelectedViews'](),0xa);_0x1d0abd['on']('change:range',(_0xc349a7,_0x46c54b)=>{_0x46c54b['directChange']&&(_0x916215['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x39f070['editing']['view']['document'],'change:isFocused',(_0x598441,_0x5814d7,_0xed4775)=>{_0xed4775&&_0x916215();}),this['listenTo'](_0x39f070['ui']['focusTracker'],'change:isFocused',(_0x410f2b,_0x45e1e7,_0x5a1694)=>{_0x5a1694||_0x39f070['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x413b11=>this['_editorAnnotationsData']['has'](_0x413b11['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5bcae1){if(this['_editorAnnotations']['has'](_0x5bcae1['view']))return;this['_editorAnnotations']['add'](_0x5bcae1['view']),this['editor']['ui']['focusTracker']['add'](_0x5bcae1['view']['element']);const _0x43c47a=this['editor']['plugins']['get'](O);this['listenTo'](_0x43c47a['collection'],'remove',(_0x5206b6,_0x33af11)=>{this['editor']['ui']['focusTracker']['remove'](_0x33af11['view']['element']),this['_editorAnnotations']['delete'](_0x33af11['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x46ba12){if('function'!=typeof _0x46ba12)throw new _0x3f73c4('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x46ba12);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x25d9bc,annotations:_0x3a6fc2}){const _0xb212d=[],_0x56334a=this['editor']['model']['document']['selection'],_0x1a2f28=Array['from'](_0x56334a['getRanges']());for(const [_0xcff58c,_0x3d6751]of this['_editorAnnotationsData']){const _0xd91521=_0x8b1f9b(_0x3d6751),_0x30df95=_0x3a6fc2['getByInnerView'](_0xcff58c);_0xd91521&&_0x30df95&&_0xb212d['push']({'annotation':_0x30df95,'range':_0xd91521});}function _0x8b1f9b(_0x35f1a3){for(const _0x559d9e of _0x35f1a3)for(const _0xd141e4 of _0x1a2f28)if(_0x559d9e['containsRange'](_0xd141e4,!_0x56334a['isCollapsed']))return _0x559d9e;return null;}return _0xb212d['sort']((_0x27df02,_0x5c1a18)=>{const _0x2546b5=_0x27df02['range'],_0x141bae=_0x5c1a18['range'];if(!_0x2546b5['isEqual'](_0x141bae)){if(_0x2546b5['containsRange'](_0x141bae,!0x0))return 0x1;if(_0x141bae['containsRange'](_0x2546b5,!0x0))return-0x1;}return _0x27df02['annotation']==_0x25d9bc?-0x1:_0x5c1a18['annotation']==_0x25d9bc?0x1:0x0;})['map'](_0x398b22=>_0x398b22['annotation']);}get['_editorAnnotationsData'](){const _0x31c94a=new Map();for(const _0x36f1aa of Array['from'](this['_dataCollectors']))for(const [_0xedb3a6,_0xee2370]of _0x36f1aa())_0x31c94a['set'](_0xedb3a6,_0xee2370);return _0x31c94a;}}class st extends _0x5dedc1{['afterInit'](){const _0x5ee987=this['editor'];if(!_0x5ee987['plugins']['has']('RestrictedEditingModeEditing'))return;_0x5ee987['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x5dedc1{constructor(_0x5141b2){super(_0x5141b2),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x291cc9=this['editor'],_0x50a9c9=_0x291cc9['commands']['get']('importWord'),_0x593f57=_0x291cc9['plugins']['get'](it);_0x50a9c9&&(_0x50a9c9['on']('execute',(_0x510d92,[,_0x5c3614])=>{_0x5c3614['collaboration_features']={'comments':!0x0,'user_id':_0x593f57['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x50a9c9,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x275c88,_0x28dfb0){const {comment_threads:_0x57afef}=_0x28dfb0;_0x57afef&&_0x57afef['forEach'](({thread_id:_0x253a26,comments:_0x21a043,is_resolved:_0x122c2})=>{const _0x1d28dd=new Date(),_0x50d657=_0x21a043['map'](({author:_0x49eb2d,content:_0x35d6dc,created_at:_0x411401})=>({'content':_0x35d6dc,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x1d28dd,'attributes':{'@external':{'authorName':_0x49eb2d,'createdAt':_0x411401?new Date(_0x411401):new Date(),'source':'importWord'}}})),_0x186d35=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x186d35,'threadId':_0x253a26,'comments':_0x50d657,'resolvedAt':_0x122c2?_0x1d28dd:null});});}}class at extends _0x5dedc1{constructor(_0x8d6587){super(_0x8d6587),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x37d7c2=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x37d7c2,'contentInsertion',(_0x36b5ce,_0x520f85)=>this['_removeMarkersWithoutThreads'](_0x520f85['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x5134e2){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5134e2;const _0x4a7af4=this['editor']['plugins']['get']('CommentsRepository');for(const _0x470947 of _0x5134e2['keys']()){const [_0x393f4d,_0xf0aebe]=_0x470947['split'](':');'comment'!=_0x393f4d||_0x4a7af4['hasCommentThread'](_0xf0aebe)||_0x5134e2['delete'](_0x470947);}return _0x5134e2;}['_registerMarkerInClipboardPipeline'](){const _0x255890=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xe26da6=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xe26da6&&_0x255890['_registerMarkerToCopy']('comment',_0xe26da6);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x3ac550){switch(_0x3ac550){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x5dedc1{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x54d90c,_0x4c65a0)=>{if(!_0x4c65a0['options']['showCommentHighlights'])return null;if(_0x4c65a0['options']['ignoreResolvedComments']){const {id:_0x1c7325}=er(_0x54d90c['markerName']),_0x5adbd0=this['editor']['plugins']['get'](o);if(_0x5adbd0['getCommentThread'](_0x1c7325)?.['isResolved']&&_0x54d90c['item'])return _0x4c65a0['consumable']['consume'](_0x54d90c['item'],'addMarker:'+_0x54d90c['markerName']),_0x4c65a0['consumable']['consume'](_0x54d90c['item'],'removeMarker:'+_0x54d90c['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1aa970=>{_0x1aa970['on']('addMarker:comment',(_0x5d3b1c,_0x4433f2,_0x34d314)=>{if(!_0x34d314['options']['showCommentHighlights'])return;const _0x172f25=_0x4433f2['item'];if(!_0x172f25)return;const _0x58db5b=_0x34d314['mapper']['toViewElement'](_0x172f25);this['editor']['model']['schema']['isObject'](_0x172f25)&&_0x58db5b&&!_0x58db5b['getCustomProperty']('widget')&&_0x58db5b['is']('containerElement')&&_0x198158(_0x58db5b,_0x34d314['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1d1cb9,{writer:_0xddcc61,options:_0xe31ce8})=>{if(!_0xe31ce8['showCommentHighlights'])return null;const _0x490b6d=_0xddcc61['createContainerElement']('div'),_0x6d520b=_0xddcc61['createEmptyElement']('hr');return _0xddcc61['addClass']('ck-horizontal-line',_0x490b6d),_0xddcc61['insert'](_0xddcc61['createPositionAt'](_0x490b6d,0x0),_0x6d520b),_0x490b6d;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x597e07,{writer:_0x3980a8,options:_0x31de5f})=>{if(!_0x31de5f['showCommentHighlights'])return null;const _0xff48ce=_0x3980a8['createContainerElement']('span'),_0x3eefe1=_0x3980a8['createEmptyElement']('img');return _0x3980a8['addClass']('image-inline',_0xff48ce),_0x3980a8['insert'](_0x3980a8['createPositionAt'](_0xff48ce,0x0),_0x3eefe1),_0xff48ce;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1a68c7,{writer:_0xaa73bf,options:_0x1beffe})=>{if(_0x1beffe['showCommentHighlights'])return _0xaa73bf['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3b7659,_0x2717e3,_0x2b4c07)=>{_0x2b4c07['options']['showCommentHighlights']&&_0x3b7659['stop']();},{'priority':'high'});}}class r extends _0x5dedc1{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x246e5c){super(_0x246e5c),this['set']('isThreadsLoadingPaused',!0x0),_0x246e5c['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4471c9,_0x345b84,_0x270151,_0x27d885)=>{const _0x55d8ee=_0x246e5c['plugins']['get'](o),_0x19df73=_0x270151?er(_0x270151)['id']:null;_0x246e5c['model']['change'](()=>{if(_0x19df73){const _0x13a8a3=this['getAllMarkersForId'](_0x19df73);for(const _0x349793 of _0x13a8a3)_0x246e5c['editing']['reconvertMarker'](_0x349793);}if(_0x27d885){const {id:_0x5e2e8a}=er(_0x27d885),_0x5351f4=_0x55d8ee['getCommentThread'](_0x5e2e8a);if(_0x5351f4&&_0x5351f4['unlinkedAt'])return;if(_0x5351f4&&!_0x5351f4['isAttached'])return;const _0x95285b=this['getAllMarkersForId'](_0x5e2e8a);for(const _0x1ed2c5 of _0x95285b)_0x246e5c['editing']['reconvertMarker'](_0x1ed2c5);}}),_0x19df73&&this['scrollToThreadMarker'](_0x19df73);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4a0bb7=this['editor'],_0x2fe30f=_0x4a0bb7['plugins']['get'](o),_0x157003=_0x4a0bb7['config']['get']('collaboration.channelId'),_0x49f15f=_0x2fe30f['getCommentThreads']()['filter'](_0x5d8c27=>_0x5d8c27['channelId']!==_0x157003);_0x4a0bb7['commands']['add']('addCommentThread',new J(_0x4a0bb7)),this['listenTo'](_0x4a0bb7,'change:isReadOnly',(_0x466b26,_0x1a7ed8,_0x3e8d07)=>{_0x2fe30f['switchReadOnly'](_0x3e8d07,_0x4a0bb7['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2fe30f,ft('addCommentThread',_0x157003),(_0x4d28e1,{threadId:_0x447456})=>{const _0x5678bb=this['editor']['plugins']['get'](o)['getCommentThread'](_0x447456);_0x5678bb?.['unlinkedAt']&&this['_attachArchivedThread'](_0x447456);}),this['listenTo'](_0x2fe30f,ft('removeCommentThread',_0x157003),(_0x820b57,{threadId:_0x245ff9})=>{_0x4a0bb7['model']['enqueueChange']({'isUndoable':!0x1},_0x1fa2a3=>{const _0x87d940=this['getAllMarkersForId'](_0x245ff9);for(const _0x2147bd of _0x87d940)_0x1fa2a3['removeMarker'](_0x2147bd);});}),this['listenTo'](_0x2fe30f,ft('resolveCommentThread',_0x157003),(_0xfcdbd8,{threadId:_0x1f3e6a})=>{(this['_reconvertMarkers'](_0x1f3e6a),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1f3e6a)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2fe30f,ft('reopenCommentThread',_0x157003),(_0x1466c6,{threadId:_0x4a443e})=>{this['_reconvertMarkers'](_0x4a443e);},{'priority':'low'}),this['listenTo'](_0x2fe30f,ft('addComment',_0x157003),(_0x379029,{threadId:_0x392bfd,isFromAdapter:_0x418d4b})=>{const _0x43e4b1=this['getAllMarkersForId'](_0x392bfd);if(_0x418d4b||0x0==_0x43e4b1['length']||!_0x2fe30f['hasCommentThread'](_0x392bfd))return;0x1===_0x2fe30f['getCommentThread'](_0x392bfd)['length']&&_0x4a0bb7['model']['enqueueChange']({'isUndoable':!0x1},_0x2b3adc=>{for(const _0x1dbad7 of _0x43e4b1)_0x2b3adc['updateMarker'](_0x1dbad7,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x49f15f);}['afterInit'](){!async function(_0x2cb698){const _0x428a97=_0x548351([0x42,0x65,0x76,0x75,0x6e,0x54,0x31,0x52,0x51,0x6a,0x66,0x73,0x33,0x71,0x55,0x68,0x50,0x30,0x4a,0x64,0x36,0x74,0x77,0x72,0x49,0x6d,0x57,0x32,0x4b,0x7a,0x53,0x4d,0x79,0x59,0x6b,0x43,0x58,0x45,0x6f,0x78,0x63,0x4e,0x47,0x34,0x56,0x69,0x5a,0x70,0x39,0x37,0x67,0x4c,0x4f,0x35,0x41,0x48,0x38,0x62,0x44,0x46,0x6c,0x61]),_0x3af52b=0x2ace9546,_0x140d48=0x2ac9fc16^_0x3af52b,_0x5f290c=window[_0x548351([0x44,0x61,0x74,0x65])][_0x548351([0x6e,0x6f,0x77])](),_0x33d9a7=_0x2cb698[_0x548351([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x35ab8e=new window[(_0x548351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c4bae=>{_0x33d9a7[_0x548351([0x6f,0x6e,0x63,0x65])](_0x548351([0x72,0x65,0x61,0x64,0x79]),_0x5c4bae);}),_0x3cf59c={[_0x548351([0x6b,0x74,0x79])]:_0x548351([0x45,0x43]),[_0x548351([0x75,0x73,0x65])]:_0x548351([0x73,0x69,0x67]),[_0x548351([0x63,0x72,0x76])]:_0x548351([0x50,0x2d,0x32,0x35,0x36]),[_0x548351([0x78])]:_0x548351([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]),[_0x548351([0x79])]:_0x548351([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]),[_0x548351([0x61,0x6c,0x67])]:_0x548351([0x45,0x53,0x32,0x35,0x36])},_0x1cccf8=_0x33d9a7[_0x548351([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x548351([0x67,0x65,0x74])](_0x548351([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1cc309(){let _0x425bf0,_0x46aa51=null,_0x16174f=null;try{if(_0x1cccf8==_0x548351([0x47,0x50,0x4c]))return _0x548351([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x425bf0=_0xea3e87(),!_0x425bf0)return _0x548351([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x425bf0[_0x548351([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x16174f=_0x4982c5(_0x425bf0[_0x548351([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x425bf0[_0x548351([0x6a,0x74,0x69])])),await _0x5be31a()?_0x2e79cc()?_0x1f3eec()?_0x548351([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x189bc6()?(_0x425bf0[_0x548351([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x548351([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x46aa51=_0x1e6019(_0x548351([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x425bf0[_0x548351([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x548351([0x74,0x72,0x69,0x61,0x6c])&&(_0x46aa51=_0x1e6019(_0x548351([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3eb1bc()):_0x548351([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x548351([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x548351([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x548351([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1f3eec(){const _0x38c01f=[_0x548351([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x548351([0x74,0x72,0x69,0x61,0x6c])][_0x548351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x425bf0[_0x548351([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5f290c/0x3e8:0xe10*_0x140d48;return _0x425bf0[_0x548351([0x65,0x78,0x70])]<_0x38c01f;}function _0x2e79cc(){const _0x284912=_0x425bf0[_0x548351([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x284912)return!0x1;if(_0x284912[_0x548351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x548351([0x2a])))return!0x0;if(_0x284912[_0x548351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x548351([0x43,0x4d,0x54])))return!0x0;if(_0x284912[_0x548351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x548351([0x52,0x43,0x4d,0x54]))){if(_0x531770())return!0x0;if(_0x42ea03()||_0x4e64e0())return!0x0;}return!0x1;}function _0x189bc6(){const _0x11edf5=_0x425bf0[_0x548351([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x11edf5||0x0==_0x11edf5[_0x548351([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x47086e}=new URL(window[_0x548351([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x11edf5[_0x548351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47086e))return!0x0;const _0x2932b1=_0x47086e[_0x548351([0x73,0x70,0x6c,0x69,0x74])](_0x548351([0x2e]));return _0x11edf5[_0x548351([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1241b=>_0x1241b[_0x548351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x548351([0x2a])))[_0x548351([0x6d,0x61,0x70])](_0xccf14=>_0xccf14[_0x548351([0x73,0x70,0x6c,0x69,0x74])](_0x548351([0x2e])))[_0x548351([0x73,0x6f,0x6d,0x65])](_0x34103e=>_0x2932b1[_0x548351([0x65,0x76,0x65,0x72,0x79])]((_0x2fbfe6,_0x18e12c)=>_0x34103e[_0x18e12c]===_0x2fbfe6||_0x34103e[_0x18e12c]===_0x548351([0x2a])));}function _0x3eb1bc(){return _0x46aa51&&_0x16174f?new window[(_0x548351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x461cfe,_0x4c1514)=>{_0x46aa51[_0x548351([0x74,0x68,0x65,0x6e])](_0x461cfe,_0x4c1514),_0x16174f[_0x548351([0x74,0x68,0x65,0x6e])](_0x22d5fc=>{_0x22d5fc!=_0x548351([0x56,0x61,0x6c,0x69,0x64])&&_0x461cfe(_0x22d5fc);},_0x4c1514);}):_0x46aa51||_0x16174f||_0x548351([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4982c5(_0x461ae1,_0x7d965f){return new window[(_0x548351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4070f2=>{if(_0x2c47db())return _0x4070f2(_0x548351([0x56,0x61,0x6c,0x69,0x64]));_0x1d0d76(),_0x33d9a7[_0x548351([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x548351([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3e58b6=!0x1;const _0x215a88=_0x550e29();function _0x5d6433(_0x440b1f){return!!_0x440b1f&&(typeof _0x440b1f===_0x548351([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x440b1f===_0x548351([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x440b1f[_0x548351([0x74,0x68,0x65,0x6e])]===_0x548351([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x440b1f[_0x548351([0x63,0x61,0x74,0x63,0x68])]===_0x548351([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x410053(_0x193119){_0x52168b(_0x193119)[_0x548351([0x74,0x68,0x65,0x6e])](_0x481c14=>{if(!_0x481c14||_0x481c14[_0x548351([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x548351([0x6f,0x6b]))return _0x548351([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3075ed(_0xd45509(_0x215a88+_0x7d965f))!=_0x481c14[_0x548351([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x548351([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x548351([0x56,0x61,0x6c,0x69,0x64]);})[_0x548351([0x74,0x68,0x65,0x6e])](_0x2fddc9=>(_0x17aa42(),_0x2fddc9),()=>{const _0x526a6e=_0x217724();return null==_0x526a6e?(_0x17aa42(),_0x548351([0x56,0x61,0x6c,0x69,0x64])):_0x548351(_0x5f290c-_0x526a6e>(0xec21146^_0x3af52b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x548351([0x74,0x68,0x65,0x6e])](_0x4070f2)[_0x548351([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4070f2(_0x548351([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4d3b29=0x2af87bc6^_0x3af52b;function _0x17aa42(){const _0x3f8f83=_0x548351([0x6c,0x6c,0x63,0x74,0x2d])+_0x3075ed(_0xd45509(_0x461ae1)),_0x381b59=_0x80e341(_0x3075ed(window[_0x548351([0x4d,0x61,0x74,0x68])][_0x548351([0x63,0x65,0x69,0x6c])](_0x5f290c/_0x4d3b29)));window[_0x548351([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x548351([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f8f83,_0x381b59);}function _0x217724(){const _0x257c03=_0x548351([0x6c,0x6c,0x63,0x74,0x2d])+_0x3075ed(_0xd45509(_0x461ae1)),_0x546294=window[_0x548351([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x548351([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x257c03);return _0x546294?window[_0x548351([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x80e341(_0x546294),0x10)*_0x4d3b29:null;}function _0x52168b(_0x5a5c3f){return new window[(_0x548351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x6e28c4,_0x32933f)=>{_0x5a5c3f[_0x548351([0x74,0x68,0x65,0x6e])](_0x6e28c4,_0x32933f),window[_0x548351([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x32933f,0x2acf4186^_0x3af52b);});}}_0x33d9a7[_0x548351([0x6f,0x6e])](_0x548351([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1e266c,_0x32c95f)=>{if(_0x32c95f[0x0]!=_0x461ae1)return _0x4070f2(_0x548351([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x32c95f[0x1]={..._0x32c95f[0x1],[_0x548351([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x215a88};},{[_0x548351([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x548351([0x68,0x69,0x67,0x68])}),_0x33d9a7[_0x548351([0x6f,0x6e])](_0x548351([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4d783c=>{_0x5d6433(_0x4d783c[_0x548351([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3e58b6=!0x0,_0x410053(_0x4d783c[_0x548351([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x548351([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x548351([0x6c,0x6f,0x77])}),_0x35ab8e[_0x548351([0x74,0x68,0x65,0x6e])](()=>{_0x3e58b6||_0x4070f2(_0x548351([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2c47db(){return _0x33d9a7[_0x548351([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x548351([0x76,0x69,0x65,0x77])][_0x548351([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x548351([0x61,0x75,0x74,0x6f]);}function _0x1d0d76(){_0x33d9a7[_0x548351([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x548351([0x76,0x69,0x65,0x77])][_0x548351([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x548351([0x61,0x75,0x74,0x6f]);}}function _0x1e6019(_0x581e6d){const _0x557531=[new window[(_0x548351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2b6a9f=>setTimeout(_0x2b6a9f,0x2ac7ab8a^_0x3af52b)),_0x35ab8e[_0x548351([0x74,0x68,0x65,0x6e])](()=>new window[(_0x548351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4a9120=>{let _0x190147=0x0;_0x33d9a7[_0x548351([0x6d,0x6f,0x64,0x65,0x6c])][_0x548351([0x6f,0x6e])](_0x548351([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x20ce31,_0x4cda6c)=>{_0x4cda6c[0x0][_0x548351([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x190147++,_0x190147==(0x2ace94be^_0x3af52b)&&(_0x4a9120(),_0x20ce31[_0x548351([0x6f,0x66,0x66])]());});}))];return window[_0x548351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x548351([0x72,0x61,0x63,0x65])](_0x557531)[_0x548351([0x74,0x68,0x65,0x6e])](()=>_0x581e6d);}async function _0x3a27ce(){await _0x35ab8e,_0x33d9a7[_0x548351([0x6d,0x6f,0x64,0x65,0x6c])][_0x548351([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4d9889,_0x33d9a7[_0x548351([0x6d,0x6f,0x64,0x65,0x6c])][_0x548351([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4d9889,_0x33d9a7[_0x548351([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x548351([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x531770(){return _0x1336cc(_0x548351([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x760f6d(_0x548351([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x548351([0x73,0x74,0x61,0x74,0x65])]==_0x548351([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x42ea03(){return _0x1336cc(_0x548351([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 _0x4e64e0(){return _0x1336cc(_0x548351([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3c7589(_0x51f38a){const _0x422ab2=_0x102509();_0x33d9a7[_0x422ab2]=_0x548351([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x51f38a,_0x51f38a!=_0x548351([0x56,0x61,0x6c,0x69,0x64])&&_0x3a27ce();}function _0x102509(){const _0x7bff90=window[_0x548351([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x548351([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x548351([0x6e,0x6f,0x77])]())[_0x548351([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x548351([0x2e]),'');let _0x17b721=_0x548351([0x42]);for(let _0x127865=0x0;_0x127865<_0x7bff90[_0x548351([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x127865+=0x2){let _0x4a15bf=window[_0x548351([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x7bff90[_0x548351([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x127865,_0x127865+0x2));_0x4a15bf>=_0x428a97[_0x548351([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4a15bf-=_0x428a97[_0x548351([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x17b721+=_0x428a97[_0x4a15bf];}return _0x17b721;}function _0xea3e87(){const _0x14d5fc=_0x1cccf8[_0x548351([0x73,0x70,0x6c,0x69,0x74])](_0x548351([0x2e]));if(0x3!=_0x14d5fc[_0x548351([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x45e5d(_0x14d5fc[0x1]);function _0x45e5d(_0x1c5d67){const _0x91cfa8=_0x4840b3(_0x1c5d67);return _0x91cfa8&&_0x244562()?_0x91cfa8:null;function _0x244562(){const _0x4e1fad=_0x91cfa8[_0x548351([0x6a,0x74,0x69])],_0x35da68=window[_0x548351([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e1fad[_0x548351([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4e1fad[_0x548351([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x253770={..._0x91cfa8,[_0x548351([0x6a,0x74,0x69])]:_0x4e1fad[_0x548351([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4e1fad[_0x548351([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x253770[_0x548351([0x76,0x63])],_0xd45509(_0x253770)==_0x35da68;}}}async function _0x5be31a(){let _0x1b56fa=!0x0;try{const _0xb2636e=_0x1cccf8[_0x548351([0x73,0x70,0x6c,0x69,0x74])](_0x548351([0x2e])),[_0x3cf70a,_0x5b4ac1,_0x49f714]=_0xb2636e;return _0xf92938(_0x3cf70a),await _0x54901f(_0x3cf70a,_0x5b4ac1,_0x49f714),_0x1b56fa;}catch{return!0x1;}function _0xf92938(_0x3b3d98){const _0x2ac7b7=_0x4840b3(_0x3b3d98);_0x2ac7b7&&_0x2ac7b7[_0x548351([0x61,0x6c,0x67])]==_0x548351([0x45,0x53,0x32,0x35,0x36])||(_0x1b56fa=!0x1);}async function _0x54901f(_0x5a8064,_0x546445,_0x36bb32){const _0x44443b=window[_0x548351([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x548351([0x66,0x72,0x6f,0x6d])](_0x51621b(_0x36bb32),_0x3e2ff8=>_0x3e2ff8[_0x548351([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1304d9=new window[(_0x548351([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x548351([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5a8064+_0x548351([0x2e])+_0x546445),_0x3f8c4d=window[_0x548351([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x548351([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3f8c4d)return;const _0x773161=await _0x3f8c4d[_0x548351([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x548351([0x6a,0x77,0x6b]),_0x3cf59c,{[_0x548351([0x6e,0x61,0x6d,0x65])]:_0x548351([0x45,0x43,0x44,0x53,0x41]),[_0x548351([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x548351([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x548351([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3f8c4d[_0x548351([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x548351([0x6e,0x61,0x6d,0x65])]:_0x548351([0x45,0x43,0x44,0x53,0x41]),[_0x548351([0x68,0x61,0x73,0x68])]:{[_0x548351([0x6e,0x61,0x6d,0x65])]:_0x548351([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x773161,_0x44443b,_0x1304d9)||(_0x1b56fa=!0x1);}}function _0x4840b3(_0x3e2cc3){return _0x3e2cc3[_0x548351([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x548351([0x65,0x79]))?JSON[_0x548351([0x70,0x61,0x72,0x73,0x65])](_0x51621b(_0x3e2cc3)):null;}function _0x51621b(_0x2e6dd9){return window[_0x548351([0x61,0x74,0x6f,0x62])](_0x2e6dd9[_0x548351([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x548351([0x2b]))[_0x548351([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x548351([0x2f])));}function _0xd45509(_0x43a455){let _0x2df893=0x1505;function _0x3c825f(_0x46ca7d){for(let _0x3614a8=0x0;_0x3614a8<_0x46ca7d[_0x548351([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3614a8++){const _0x44c0e2=_0x46ca7d[_0x548351([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3614a8);_0x2df893=(_0x2df893<<0x5)+_0x2df893+_0x44c0e2,_0x2df893&=_0x2df893;}}function _0x26abfe(_0x100b91){Array[_0x548351([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x100b91)?_0x100b91[_0x548351([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x26abfe):_0x100b91&&typeof _0x100b91==_0x548351([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x548351([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x100b91)[_0x548351([0x73,0x6f,0x72,0x74])]()[_0x548351([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x9abf70,_0x4de510])=>{_0x3c825f(_0x9abf70),_0x26abfe(_0x4de510);}):_0x3c825f(window[_0x548351([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x100b91));}return _0x26abfe(_0x43a455),_0x2df893>>>0x0;}function _0x3075ed(_0x1a968b){return _0x1a968b[_0x548351([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x548351([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x548351([0x30]));}function _0x80e341(_0x4a4b9e){return _0x4a4b9e[_0x548351([0x73,0x70,0x6c,0x69,0x74])]('')[_0x548351([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x548351([0x6a,0x6f,0x69,0x6e])]('');}function _0x1336cc(_0x347b13){return _0x33d9a7[_0x548351([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x548351([0x68,0x61,0x73])](_0x347b13);}function _0x760f6d(_0x1a04a4){return _0x33d9a7[_0x548351([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x548351([0x67,0x65,0x74])](_0x1a04a4);}function _0x4d9889(){}function _0x548351(_0x1672df){return _0x1672df['map'](_0x178932=>String['fromCharCode'](_0x178932))['join']('');}_0x3c7589(await _0x1cc309());}(this);}['destroy'](){const _0xbc645b=this['editor']['plugins']['get'](o),_0x344539=this['editor']['config']['get']('collaboration.channelId');for(const _0xa82218 of _0xbc645b['getCommentThreads']({'channelId':_0x344539}))_0xbc645b['_detachCommentThread'](_0xa82218['id']),_0xbc645b['_threads']['delete'](_0xa82218['id']);super['destroy']();}['hasMarkerForId'](_0x19f40d){return this['getAllMarkersForId'](_0x19f40d)['length']>0x0;}['getAllMarkersForId'](_0x38e778){const _0x4f8151=[];for(const _0x9efd16 of this['editor']['model']['markers'])_0x9efd16['name']['startsWith']('comment:'+_0x38e778)&&_0x4f8151['push'](_0x9efd16);return _0x4f8151;}['scrollToThreadMarker'](_0x2059e7){const _0x153ac6=this['_getTargetForId'](_0x2059e7);_0x153ac6&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x2059e7&&rt({'target':_0x153ac6[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x203d41){this['editor']['model']['change'](()=>{for(const _0x3a4c48 of this['getAllMarkersForId'](_0x203d41))this['editor']['editing']['reconvertMarker'](_0x3a4c48);});}['_attachArchivedThread'](_0x264a4f){const _0x106293=this['editor']['plugins']['get'](o),_0x155833=this['editor']['plugins']['get'](P),_0x56249b=_0x106293['getCommentThread'](_0x264a4f);if(!_0x56249b['isAttached']){const _0x4748f8=_0x56249b['attachTo'](()=>this['_getTargetForId'](_0x56249b['id']));_0x155833['registerAnnotation'](_0x4748f8),_0x56249b['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x2585fd=this['editor'],_0x13f6d0=_0x2585fd['plugins']['get'](it);_0x2585fd['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x2fb0fa,_0x1f6f66)=>{const {id:_0x4ca8fe}=er(_0x2fb0fa['markerName']),_0x201050=_0x2585fd['plugins']['get'](o)['getCommentThread'](_0x4ca8fe),_0x5c9098=this['activeMarker']&&er(this['activeMarker'])['id']===_0x4ca8fe;let _0x11e3b8;if(_0x201050&&_0x201050['isResolved']&&!_0x5c9098&&_0x2fb0fa['item'])return _0x1f6f66['consumable']['consume'](_0x2fb0fa['item'],'addMarker:'+_0x2fb0fa['markerName']),_0x1f6f66['consumable']['consume'](_0x2fb0fa['item'],'removeMarker:'+_0x2fb0fa['markerName']),null;const _0x748b19=['ck-comment-marker'];return _0x5c9098&&_0x748b19['push']('ck-comment-marker--active'),_0x11e3b8=_0x201050?.['length']?_0x201050['comments']['first']['author']['id']:_0x13f6d0['me']['id'],{'classes':_0x748b19,'attributes':{'data-comment':_0x4ca8fe,'data-author-id':_0x11e3b8}};}}),_0x2585fd['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xc068bc,{options:_0x430fa0})=>{if(_0x430fa0['showCommentHighlights'])return null;const _0x14df03=_0x2585fd['plugins']['get'](o),_0x24066f=_0x2585fd['model']['markers']['get'](_0xc068bc),{id:_0x162a84,part:_0x12f59a}=er(_0xc068bc);return _0x24066f&&!_0x24066f['affectsData']||_0x430fa0['ignoreResolvedComments']&&_0x14df03['getCommentThread'](_0x162a84)?.['isResolved']?null:{'group':'comment','name':_0x12f59a?_0x162a84+':'+_0x12f59a:_0x162a84};}}),_0x2585fd['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x413c89,{writer:_0x1fbfe9})=>_0x1fbfe9['createElement']('$marker',{'data-name':'comment:'+_0x413c89['getAttribute']('id')})}),_0x2585fd['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x23413b=this['editor'],_0x17d401=_0x23413b['plugins']['get'](o),_0x44083f=new Set(),_0x14785e=new Set();_0x23413b['model']['document']['registerPostFixer'](_0x1f97a1=>{let _0x28d662=!0x1;for(const {name:_0x338165,data:_0x300d46}of _0x23413b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x549b32,id:_0x4ef774}=er(_0x338165);let _0x5aff98=_0x300d46['newRange'];if('comment'!==_0x549b32||!_0x5aff98)continue;const _0x8a6ca7='$graveyard'===_0x5aff98['root']['rootName'];_0x8a6ca7||(_0x5aff98=dt(_0x5aff98,_0x23413b['model']),!_0x5aff98||_0x5aff98['isCollapsed']||!_0x300d46['newRange']||_0x5aff98['isEqual'](_0x300d46['newRange']))?_0x23413b['model']['hasContent'](_0x5aff98)&&!_0x8a6ca7?this['isThreadsLoadingPaused']?_0x44083f['add'](_0x338165):this['_handleThreadMarker'](_0x338165,_0x4ef774):(_0x14785e['add'](_0x338165),_0x44083f['delete'](_0x338165),_0x1f97a1['removeMarker'](_0x338165),_0x28d662=!0x0):(_0x1f97a1['updateMarker'](_0x338165,{'range':_0x5aff98}),_0x28d662=!0x0);}return _0x28d662;}),this['on']('change:isThreadsLoadingPaused',(_0x15e8a7,_0x3b15f2,_0x37c16a)=>{if(!_0x37c16a&&_0x44083f['size'])for(const _0x1cb0eb of _0x44083f){const {id:_0x565d90}=er(_0x1cb0eb);_0x44083f['delete'](_0x1cb0eb),_0x23413b['model']['markers']['get'](_0x1cb0eb)&&this['_handleThreadMarker'](_0x1cb0eb,_0x565d90);}}),this['listenTo'](_0x23413b['model']['document'],'change',()=>{for(const {name:_0x185631,data:{newRange:_0xd53208}}of _0x23413b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x232670,id:_0xea3d7b}=er(_0x185631);if('comment'!==_0x232670)continue;const _0x1cf2e5=_0x17d401['getCommentThread'](_0xea3d7b),_0x286d65=this['hasMarkerForId'](_0xea3d7b);_0x1cf2e5&&(!_0x1cf2e5['_hasTargetInContent']&&_0xd53208&&_0x23413b['editing']['view']['once']('render',()=>{const _0x58c956=_0x23413b['plugins']['get'](O),_0x37ad6b=_0x17d401['_threadToController']['get'](_0x1cf2e5)['view'];_0x58c956['getByInnerView'](_0x37ad6b)['refreshVisibility']();},{'priority':'low'}),_0x1cf2e5['_hasTargetInContent']=_0x286d65||!!_0xd53208),_0xd53208||(_0x14785e['add'](_0x185631),_0x44083f['delete'](_0x185631));}for(const _0x358b48 of _0x14785e){const {id:_0x51ebd7}=er(_0x358b48),_0x39a97e=_0x17d401['getCommentThread'](_0x51ebd7);if(_0x44083f['delete'](_0x358b48),!_0x39a97e)continue;const _0x2fbacf=this['hasMarkerForId'](_0x51ebd7);_0x2fbacf||_0x39a97e['isSubmitted']?_0x2fbacf||_0x39a97e['unlinkedAt']||_0x39a97e['setUnlinkedAt'](new Date()):_0x39a97e['remove']();}_0x14785e['clear']();});}['_handleInitialThreads'](_0x52f2d){_0x52f2d['forEach'](_0x4103c9=>{_0x4103c9['unlinkedAt']&&this['_attachArchivedThread'](_0x4103c9['id']);});}['_getTargetForId'](_0xd12dc6){const _0x275d4d=this['editor'],_0x5095d5=this['getAllMarkersForId'](_0xd12dc6);return et(_0x275d4d['editing'],_0x5095d5);}['_getTextContext'](_0x61a76a){const _0x3c9204=this['getAllMarkersForId'](_0x61a76a);let _0xf22db2='',_0x1fec20=!0x1;for(const _0x429536 of _0x3c9204){const _0x2e3afe=_0x429536['getRange']();for(const _0x351558 of Array['from'](_0x2e3afe['getItems']()))_0x351558['is']('$textProxy')?(_0xf22db2&&_0x1fec20&&(_0xf22db2+='\x20',_0x1fec20=!0x1),_0xf22db2+=_0x351558['data']):_0x1fec20=!0x0;_0x1fec20=!0x0;}return _0xf22db2['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x533300,_0x379ae9){const _0x43bf0a=this['editor'],_0x24968a=_0x43bf0a['plugins']['get'](o);let _0x44e404=_0x24968a['getCommentThread'](_0x379ae9);const _0x8ee8d=_0x43bf0a['config']['get']('collaboration.channelId'),_0x45af29=_0x43bf0a['plugins']['get'](P);if(_0x44e404&&(_0x44e404['unlinkedAt']&&_0x44e404['setUnlinkedAt'](null),_0x44e404['isAttached']))return _0x44e404;return!this['getAllMarkersForId'](_0x379ae9)[0x0]['managedUsingOperations']?_0x43bf0a['editing']['view']['once']('render',()=>{if(_0x24968a['getCommentThread'](_0x379ae9))return;const _0x2361e2=_0x43bf0a['plugins']['get'](O);_0x44e404=_0x24968a['openNewCommentThread']({'channelId':_0x8ee8d,'threadId':_0x379ae9,'target':()=>this['_getTargetForId'](_0x379ae9),'context':{'type':'text','value':this['_getTextContext'](_0x379ae9)}});const _0x4166d2=_0x24968a['_threadToController']['get'](_0x44e404)['view'],_0x1ff264=_0x2361e2['getByInnerView'](_0x4166d2);_0x1ff264&&_0x45af29['registerAnnotation'](_0x1ff264);},{'priority':'low'}):_0x24968a['fetchCommentThread']({'channelId':_0x8ee8d,'threadId':_0x379ae9})['then'](_0x130842=>{if('destroyed'!==_0x43bf0a['state']){if(_0x44e404=_0x130842,_0x44e404&&!_0x44e404['isAttached']){const _0x1978e2=_0x44e404['attachTo'](()=>this['_getTargetForId'](_0x379ae9));_0x45af29['registerAnnotation'](_0x1978e2),_0x44e404['isResolved']&&this['_reconvertMarkers'](_0x379ae9);}else{if(!_0x44e404){const _0x309ada=this['getAllMarkersForId'](_0x379ae9);_0x43bf0a['model']['change'](_0x3e7103=>{for(const _0x28b0f7 of _0x309ada)_0x3e7103['removeMarker'](_0x28b0f7);});}}}}),_0x44e404;}['_handleThreadMarker'](_0x5de83d,_0x3df434){const _0x4dbc38=this['_attachMarkerToThread'](_0x5de83d,_0x3df434);_0x4dbc38&&!_0x4dbc38['context']&&_0x4dbc38['setContext']({'type':'text','value':this['_getTextContext'](_0x3df434)});}['_initAriaMarkerChangeAnnouncements'](){const _0xb1696c=this['editor'];ot(_0xb1696c['model'],({left:_0x324495,entered:_0x4e2af8})=>{for(const _0x1a0285 of _0x324495)if(mt(_0x1a0285)){_0xb1696c['ui']['ariaLiveAnnouncer']['announce'](E(_0xb1696c['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1015a6 of _0x4e2af8)if(mt(_0x1015a6)){_0xb1696c['ui']['ariaLiveAnnouncer']['announce'](E(_0xb1696c['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x295518)));break;}});}}function ft(_0x1118ee,_0x54443d){return _0x54443d?_0x1118ee+':'+_0x54443d:_0x1118ee;}function er(_0x2ba230){const _0x12f322=_0x2ba230['split'](':');return{'group':_0x12f322[0x0],'id':_0x12f322[0x1],'part':_0x12f322[0x2]};}function dt(_0x3f6659,_0x4161e6){const _0x5b308b=_0x4161e6['schema'],_0x9c407c=_0x4161e6['createRange'](_0x3f6659['start']);for(const _0x111181 of _0x3f6659['getWalker']()){const {type:_0x497a16,item:_0xc270a6,nextPosition:_0x3e8cb0}=_0x111181;if('text'===_0x497a16||_0x5b308b['isObject'](_0xc270a6)){const _0x342f18=_0x4161e6['createPositionBefore'](_0xc270a6);_0x9c407c['isCollapsed']&&(_0x9c407c['start']=_0x342f18),_0x9c407c['end']=_0x3e8cb0;}}return _0x9c407c;}function mt(_0x1971e7){return'comment'===er(_0x1971e7['name'])['group'];}class i extends _0x5dedc1{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x31a446=this['editor'],_0x249cbe=_0x31a446['plugins']['get'](o),_0x32cd7c=_0x31a446['plugins']['get'](r),_0x5a9f1e=_0x31a446['plugins']['get'](O),_0x538c93=_0x31a446['plugins']['get'](P);_0x31a446['ui']['componentFactory']['add']('comment',()=>{const _0x1eba51=this['_createUIButton'](_0x1cb946);return _0x1eba51['tooltip']=!0x0,_0x1eba51;}),_0x31a446['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x121529)),_0x538c93['addSourceCollector'](()=>{const _0x295c5b=[];for(const [_0x328e08,_0x31514c]of _0x249cbe['_threadToController']){const _0x3bb32d=_0x32cd7c['getAllMarkersForId'](_0x328e08['id']),_0x2d56cc=_0x3bb32d['map'](_0x377ac3=>_0x377ac3['getRange']());_0x3bb32d['length']>0x0&&_0x295c5b['push']([_0x31514c['view'],_0x2d56cc]);}return _0x295c5b;}),this['listenTo'](_0x5a9f1e,'change:activeAnnotations',(_0xe0ec47,_0x4a5282,_0xb49bad)=>{const _0x39e108=Array['from'](_0xb49bad)['map'](_0x1eb93d=>_0x1eb93d['innerView'])['find'](_0x353179=>_0x249cbe['_viewToController']['has'](_0x353179));if(!_0x39e108)return void(_0x32cd7c['activeMarker']=null);const _0x2c9d74=_0x249cbe['_viewToController']['get'](_0x39e108)['model']['id'],_0xd83753='comment:'+_0x2c9d74;_0x2c9d74&&_0x32cd7c['hasMarkerForId'](_0x2c9d74)?_0x32cd7c['activeMarker']=_0xd83753:_0x32cd7c['activeMarker']&&(_0x32cd7c['activeMarker']=null);}),this['listenTo'](_0x249cbe,'removeCommentThread',(_0x29e81f,{threadId:_0x22fb7c,isFromAdapter:_0x422984})=>{!_0x422984&&_0x31a446['ui']['focusTracker']['isFocused']&&_0x32cd7c['hasMarkerForId'](_0x22fb7c)&&_0x31a446['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x249cbe,'addComment',(_0xa9cf57,{threadId:_0x1ab6ca,isFromAdapter:_0x1ea7df})=>{if(_0x1ea7df||!_0x32cd7c['hasMarkerForId'](_0x1ab6ca)||!_0x249cbe['hasCommentThread'](_0x1ab6ca))return;0x1===_0x249cbe['getCommentThread'](_0x1ab6ca)['length']&&(_0x31a446['editing']['view']['focus'](),_0xa9cf57['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x430985=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xe48be9;for(const _0x4f710d in _0x430985){const _0xb9ea5=_0x4f710d,_0x37efdd=_0x430985[_0xb9ea5];if('commentsLicenseKeyValid'==_0x37efdd||'commentsLicenseKeyInvalid'==_0x37efdd||'commentsLicenseKeyExpired'==_0x37efdd||'commentsLicenseKeyDomainLimit'==_0x37efdd||'commentsLicenseKeyNotAllowed'==_0x37efdd||'commentsLicenseKeyEvaluationLimit'==_0x37efdd||'commentsLicenseKeyTrialLimit'==_0x37efdd||'commentsLicenseKeyUsageLimit'==_0x37efdd){delete _0x430985[_0xb9ea5],_0xe48be9=_0x37efdd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xe48be9&&_0x430985['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xe48be9&&_0x430985['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xe48be9&&_0x430985['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xe48be9&&_0x430985['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xe48be9&&_0x430985['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0xe48be9&&_0x430985['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0xe48be9&&_0x430985['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x280790){const _0x17edf9=this['editor'],_0x19a328=new _0x280790(_0x17edf9['locale']),_0x57bfb8=_0x17edf9['commands']['get']('addCommentThread');return _0x19a328['set']({'label':E(_0x17edf9['locale'],'Comment'),'icon':_0x2d891e}),_0x19a328['bind']('isEnabled')['to'](_0x57bfb8),this['listenTo'](_0x19a328,'execute',()=>{_0x57bfb8['execute']();}),_0x19a328;}}class s extends _0x5dedc1{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0xc016c2){super(_0xc016c2),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xe0c06c,_0x100505,_0x1fea54)=>{_0x1fea54?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x31ccdf,_0x1077f3]of this['editor']['commands'])_0x1077f3['affectsData']&&'addCommentThread'!==_0x31ccdf&&_0x1077f3['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x456f1f=this['editor']['editing']['view']['document'];this['listenTo'](_0x456f1f,'cut',_0x57b0ee=>_0x57b0ee['stop'](),{'priority':'highest'}),this['listenTo'](_0x456f1f,'clipboardInput',_0x97c084=>_0x97c084['stop'](),{'priority':'highest'}),this['listenTo'](_0x456f1f,'delete',_0x5baa1b=>_0x5baa1b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x23dc62,_0x573874]of this['editor']['commands'])_0x573874['affectsData']&&'addCommentThread'!==_0x23dc62&&_0x573874['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 M extends _0xd751f5{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2eaad0){super(_0x2eaad0),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x20d8d0=this['context']['plugins']['get'](O);this['listenTo'](_0x20d8d0,'_activateAnnotation',(_0x52b184,_0x5c09e1)=>{for(const _0x217b48 of this['activeUIs']){const _0x5e941a=this['_uis']['get'](_0x217b48);(0x0,this['uisData']['get'](_0x217b48)['filter'])(_0x5c09e1)&&_0x5e941a['setActiveAnnotation'](_0x5c09e1);}}),this['listenTo'](_0x20d8d0,'_deactivateAllAnnotations',()=>{for(const _0x508bf4 of this['activeUIs']){this['_uis']['get'](_0x508bf4)['setActiveAnnotation'](null);}}),this['listenTo'](_0x20d8d0['_visibleAnnotations'],'add',(_0x354d3c,_0x16c80e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x16c80e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x46c9ef){return this['activeUIs']['has'](_0x46c9ef);}['activate'](_0x45fa3b,_0x577644=this['defaultFilter']){const _0x103d01=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x45fa3b))throw new _0x3f73c4('annotationsuis-missing-ui',this,{'uiName':_0x45fa3b});this['isActive'](_0x45fa3b)&&this['deactivate'](_0x45fa3b),this['activeUIs']['add'](_0x45fa3b);const _0x11e2d1=new _();!function({source:_0x4e79d8,target:_0x28ed1b,filter:_0xfb3ea9}){for(const _0x241183 of _0x4e79d8)_0xfb3ea9(_0x241183)&&_0x28ed1b['add'](_0x241183);_0x28ed1b['listenTo'](_0x4e79d8,'add',(_0x59faaf,_0x2a1da1)=>{_0xfb3ea9(_0x2a1da1)&&_0x28ed1b['add'](_0x2a1da1);}),_0x28ed1b['listenTo'](_0x4e79d8,'remove',(_0x1677e4,_0x274f80)=>{_0x28ed1b['has'](_0x274f80)&&_0x28ed1b['remove'](_0x274f80);});}({'source':_0x103d01['_visibleAnnotations'],'target':_0x11e2d1,'filter':_0x577644}),this['uisData']['set'](_0x45fa3b,{'collection':_0x11e2d1,'filter':_0x577644});const _0x3b9775=this['_uis']['get'](_0x45fa3b);_0x3b9775['attach'](_0x11e2d1),this['listenTo'](_0x3b9775,'change:activeAnnotation',(_0x2033a8,_0x4a353e,_0x4fbfb4,_0x278cb1)=>{_0x278cb1&&_0x103d01['_removeActiveAnnotation'](_0x278cb1),_0x4fbfb4&&_0x103d01['_addActiveAnnotation'](_0x4fbfb4);});}['deactivate'](_0x230a5f){if(this['activeUIs']['delete'](_0x230a5f),!this['_uis']['has'](_0x230a5f))throw new _0x3f73c4('annotationsuis-missing-ui',this,{'uiName':_0x230a5f});const _0x318fe0=this['_uis']['get'](_0x230a5f);_0x318fe0['detach'](),this['stopListening'](_0x318fe0),this['uisData']['get'](_0x230a5f)['collection']['destroy'](),this['uisData']['delete'](_0x230a5f);}['switchTo'](_0x8c8283){if(!this['_uis']['has'](_0x8c8283))throw new _0x3f73c4('annotationsuis-missing-ui',this,{'uiName':_0x8c8283});const _0xf35cc6=this['context']['plugins']['get'](O),_0xc435fe=Array['from'](_0xf35cc6['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x8c8283);const _0x48752f=this['_uis']['get'](_0x8c8283);_0x48752f['setActiveAnnotation'](_0xc435fe),_0x48752f['_setSelectedAnnotations']&&_0xc435fe&&_0x48752f['_setSelectedAnnotations']([_0xc435fe]);}['deactivateAll'](){for(const _0x528b3b of this['activeUIs'])this['deactivate'](_0x528b3b);}['register'](_0x2e3698,_0x2f36fb){if(this['_uis']['has'](_0x2e3698))throw new _0x3f73c4('annotationsuis-register-already-registered');if('function'!=typeof _0x2f36fb['attach']||'function'!=typeof _0x2f36fb['detach']||'function'!=typeof _0x2f36fb['setActiveAnnotation'])throw new _0x3f73c4('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2e3698,_0x2f36fb);}['refilterAnnotations'](){const _0x182beb=this['context']['plugins']['get'](O)['collection'],_0x28c6d6=new Map(),_0x226d55=Array['from'](this['activeUIs']);for(const _0x509e11 of this['activeUIs']){const _0x403b7e=this['uisData']['get'](_0x509e11)['collection'];for(const _0x9dfd66 of _0x403b7e)_0x28c6d6['set'](_0x9dfd66,_0x509e11);}for(const _0x5e511a of _0x182beb){const _0x44f021=_0x28c6d6['get'](_0x5e511a);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5e511a);const _0x483cb3=_0x226d55['find'](_0x123ab0=>this['uisData']['get'](_0x123ab0)['filter'](_0x5e511a));_0x44f021!==_0x483cb3&&(_0x44f021&&this['uisData']['get'](_0x44f021)['collection']['remove'](_0x5e511a),_0x483cb3&&this['uisData']['get'](_0x483cb3)['collection']['add'](_0x5e511a));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x588bba){const _0x368906=[];for(const _0xc85ebc of this['activeUIs']){(0x0,this['uisData']['get'](_0xc85ebc)['filter'])(_0x588bba)&&_0x368906['push'](_0xc85ebc);}if(_0x368906['length']>0x1)throw new _0x3f73c4('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x368906,'annotationType':_0x588bba['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x584b6e){super(_0x584b6e);const _0x25398b=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 _0x573782(),this['focusCycler']=new _0x15cdbf({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x25398b['to']('class')],'style':{'minHeight':_0x25398b['to']('minHeight',_0x56d366=>'number'==typeof _0x56d366?pi(_0x56d366+0xa):null)},'dir':_0x584b6e['uiLanguageDirection'],'role':'application','aria-label':E(_0x584b6e,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x584b6e,'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',_0x1b8579=>{this['_updateItemPositionInFocusables'](_0x1b8579['source']);}),this['list']['forEach'](_0x4dd828=>{this['focusTracker']['add'](_0x4dd828['element']),this['_updateItemPositionInFocusables'](_0x4dd828);}),this['list']['on']('change',(_0x59a65d,_0x3ef0c4)=>{for(const _0x12bf1a of _0x3ef0c4['removed'])this['focusTracker']['remove'](_0x12bf1a['element']),this['focusables']['remove'](_0x12bf1a);for(const _0x26751f of _0x3ef0c4['added'])this['focusTracker']['add'](_0x26751f['element']),this['_updateItemPositionInFocusables'](_0x26751f);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5f1dfb){const _0x1601d5=this['focusables']['getIndex'](_0x5f1dfb);let _0x1f7ed8,_0x1fc44f;for(const _0x38dc6d of this['focusables'])if(_0x5f1dfb['top']<_0x38dc6d['top']){_0x1f7ed8=_0x38dc6d;break;}if(_0x1fc44f=_0x1f7ed8?this['focusables']['getIndex'](_0x1f7ed8):this['focusables']['length'],-0x1!==_0x1601d5){if(_0x1601d5===_0x1fc44f-0x1)return;this['focusables']['remove'](_0x5f1dfb),_0x1fc44f=_0x1f7ed8?this['focusables']['getIndex'](_0x1f7ed8):this['focusables']['length'];}this['focusables']['add'](_0x5f1dfb,_0x1fc44f);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0xd1447f){super(_0xd1447f),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x28eeca,_0x42b69f)=>_0x28eeca+_0x42b69f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x49510c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x49510c['to']('isAnimationDisabled',_0x44f18f=>_0x44f18f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x49510c['to']('top',_0x3ef3a9=>Ht(_0x3ef3a9))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x168331=this['element']['clientHeight'];_0x168331&&(this['height']=_0x168331);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xd751f5{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x202c8b){super(_0x202c8b),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 _0x37fc27=this['context']['config']['get']('sidebar.container');_0x37fc27&&this['setContainer'](_0x37fc27);}['setContainer'](_0x1f8b7d){if(!y(_0x1f8b7d))throw new _0x3f73c4('sidebar-setcontainer-invalid-element');this['container']=_0x1f8b7d;}['_attachToContainer']({viewClass:_0x8f27dd='',spaceBetweenItems:_0x3e34b0=0x19}={}){if(!y(this['container']))throw new _0x3f73c4('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x8f27dd,this['_spaceBetweenItems']=_0x3e34b0;}['rearrange']({removedAnnotation:_0x35d6e9,previousAnnotation:_0x65cbab,nextAnnotation:_0x4f1ddd}){const _0x27576b=this['getSidebarItemView'](_0x35d6e9);this['view']['list']['remove'](_0x27576b),this['_destroySidebarItemView'](_0x35d6e9),_0x65cbab&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x65cbab)),_0x4f1ddd&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4f1ddd)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5f5a9d,activatedAnnotation:_0x37abff,disableAnimationOnActivatedAnnotation:_0x2a5c3e}){if(this['_activeAnnotation']=_0x37abff,_0x5f5a9d){_0x5f5a9d['isActive']=!0x1;const _0x1b7eba=this['getSidebarItemView'](_0x5f5a9d);_0x1b7eba&&_0x2a5c3e&&(_0x1b7eba['isAnimationDisabled']=!0x1);}if(_0x37abff){const _0x4d178a=this['getSidebarItemView'](_0x37abff);_0x4d178a&&(_0x37abff['isActive']=!0x0,_0x2a5c3e&&(_0x4d178a['isAnimationDisabled']=!0x0,_0x4d178a['top']+=0x1),this['_alignToTargetRect'](_0x4d178a));}}['_detachFromContainer'](_0x4a8965){if(this['view']['element']['remove'](),_0x4a8965){for(const _0x585eba of _0x4a8965)this['_destroySidebarItemView'](_0x585eba);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x4e7fad,_0x15b95c){_0x15b95c||(_0x15b95c=_0x4e7fad['view']);const _0x5f2d41=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5f2d41,_0x4e7fad),this['_annotationToSidebarItemView']['set'](_0x4e7fad,_0x5f2d41),_0x5f2d41['content']['add'](_0x15b95c),this['listenTo'](_0x4e7fad['view'],'change:targetRect',(_0x3054e6,_0x3348ed,_0x5edd9a)=>{const _0x7e6157=this['_getTargetTop'](_0x4e7fad,_0x5edd9a);_0x5f2d41['_targetTop']!=_0x7e6157&&(_0x5f2d41['_targetTop']=_0x7e6157,this['_setItemTop'](_0x5f2d41,_0x7e6157));}),this['listenTo'](_0x5f2d41,'change:top',()=>{this['_recalculate'](_0x5f2d41,'top');}),this['listenTo'](_0x5f2d41,'change:bottom',()=>{this['_recalculate'](_0x5f2d41,'bottom');}),this['_alignToTargetRect'](_0x5f2d41);const _0x3e2ce8=this['_getItemBefore'](_0x5f2d41);if(_0x3e2ce8)this['_alignAfterItem'](_0x3e2ce8,_0x5f2d41)||this['_alignToTargetRect'](_0x5f2d41);else this['_alignToTargetRect'](_0x5f2d41);return this['_updateLastItem'](),this['view']['list']['add'](_0x5f2d41),_0x5f2d41;}['_alignForTopChange'](_0x56551b){if(!_0x56551b['content']['length'])return;const _0x3f8f37=this['_getItemBefore'](_0x56551b);if(!_0x3f8f37)return;const _0x204cb4=this['_sidebarItemViewToAnnotation']['get'](_0x3f8f37),_0x5c4b6c=this['_activeAnnotation'];_0x5c4b6c&&_0x5c4b6c===_0x204cb4?this['_alignAfterItem'](_0x3f8f37,_0x56551b):this['_alignBeforeItem'](_0x56551b,_0x3f8f37);}['_alignForBottomChange'](_0x4b3439){if(!_0x4b3439['content']['length'])return;const _0xa1de4f=this['_getItemAfter'](_0x4b3439);if(!_0xa1de4f)return;const _0x55c797=this['_sidebarItemViewToAnnotation']['get'](_0xa1de4f),_0x1a889f=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3f7db5=this['_activeAnnotation'];_0x3f7db5&&_0x3f7db5===_0x55c797&&_0x1a889f?(this['_alignBeforeItem'](_0xa1de4f,_0x4b3439),this['_alignAfterItem'](_0x4b3439,_0xa1de4f)):_0x3f7db5&&_0x3f7db5===_0x55c797?this['_alignBeforeItem'](_0xa1de4f,_0x4b3439):this['_alignAfterItem'](_0x4b3439,_0xa1de4f);}['_recalculate'](_0x1caf25,_0x4f4a72){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2a0ef0,changedProp:_0x828a7b}of this['_recalculateBuffer'])'top'===_0x828a7b?this['_alignForTopChange'](_0x2a0ef0):this['_alignForBottomChange'](_0x2a0ef0);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1caf25,'changedProp':_0x4f4a72});}['getSidebarItemView'](_0xfc6484){return this['_annotationToSidebarItemView']['get'](_0xfc6484);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xf3a8e){const _0x59611f=this['getSidebarItemView'](_0xf3a8e);this['stopListening'](_0x59611f),this['stopListening'](_0xf3a8e['view']),_0x59611f['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xf3a8e),this['_sidebarItemViewToAnnotation']['delete'](_0x59611f);}['_createSidebarView'](){const _0x25ff30=new F(this['context']['locale']);return _0x25ff30['render'](),this['on']('change:_lastItem',(_0x23166a,_0x273202,_0x37cbd2,_0x3cf2d1)=>{_0x3cf2d1&&_0x25ff30['unbind']('minHeight'),_0x37cbd2?_0x25ff30['bind']('minHeight')['to'](_0x37cbd2,'bottom'):_0x25ff30['minHeight']=null;}),_0x25ff30;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5ea8ca){const _0x3c2e06=this['_sidebarItemViewToAnnotation']['get'](_0x5ea8ca),_0x11f416=_0x3c2e06&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3c2e06)-0x1);return _0x11f416&&this['getSidebarItemView'](_0x11f416)||null;}['_getItemAfter'](_0xf97ab6){const _0x5e80ca=this['_sidebarItemViewToAnnotation']['get'](_0xf97ab6),_0x52a898=_0x5e80ca&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5e80ca)+0x1);return _0x52a898&&this['getSidebarItemView'](_0x52a898)||null;}['_alignBeforeItem'](_0x928458,_0xf6ec5d){_0x928458['updateHeight']();const _0x483cc2=R(_0xf6ec5d['bottom']+this['_spaceBetweenItems'],_0x928458['top']);return!!_0x483cc2&&(this['_setItemTop'](_0xf6ec5d,_0xf6ec5d['top']-_0x483cc2),!0x0);}['_alignAfterItem'](_0x22f2ee,_0x423917){_0x22f2ee['updateHeight']();const _0x224a73=R(_0x22f2ee['bottom']+this['_spaceBetweenItems'],_0x423917['top']);return!!_0x224a73&&(this['_setItemTop'](_0x423917,_0x423917['top']+_0x224a73,!0x1),!0x0);}['_alignToTargetRect'](_0x3b125b){const _0x542dbf=this['_sidebarItemViewToAnnotation']['get'](_0x3b125b);if(!_0x542dbf||!_0x542dbf['target']||!_0x542dbf['targetRect'])return;const _0x576873=this['_getTargetTop'](_0x542dbf,_0x542dbf['targetRect']);this['_setItemTop'](_0x3b125b,_0x576873);}['_getTargetTop'](_0x2441f8,_0x4c9dc2){if(null===_0x4c9dc2)return 0x0;if(_0x2441f8['target']instanceof _0xefacec)return _0x4c9dc2['top'];{const _0x25d8d7=new _0xefacec(this['view']['element'])['top'];return _0x4c9dc2['top']-_0x25d8d7;}}['_setItemTop'](_0x4ce1b5,_0x19b1a7,_0x47b2c9=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x47b2c9&&(_0x19b1a7=Math['max'](_0x19b1a7,this['_getMaxAvailableTop'](_0x4ce1b5))),_0x4ce1b5['top']=_0x19b1a7;}['_getMaxAvailableTop'](_0x304cf8){let _0x453eb0=this['_getItemBefore'](_0x304cf8),_0x50974f=0x0;for(;_0x453eb0;)_0x453eb0['updateHeight'](),_0x50974f+=this['_spaceBetweenItems']+_0x453eb0['height'],_0x453eb0=this['_getItemBefore'](_0x453eb0);return _0x50974f;}}function R(_0x3f782c,_0x16ae34){return Math['max'](_0x3f782c-_0x16ae34,0x0);}function y(_0x3cfbed){return null!==_0x3cfbed&&'object'==typeof _0x3cfbed&&0x1===_0x3cfbed['nodeType'];}class e extends _0xd751f5{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x114ae9){super(_0x114ae9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x100e27(),this['_refreshPositioningDebounced']=_0x4eaad4(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5f0b34=this['context']['plugins']['get'](M),_0x27f744=this['context']['plugins']['get'](z);_0x5f0b34['register']('wideSidebar',this),_0x27f744['container']&&_0x5f0b34['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x40492b){if(_0x40492b===this['activeAnnotation'])return;const _0x2665ba=this['context']['plugins']['get'](z);_0x2665ba['_activeAnnotation']=_0x40492b;const _0x474995=this['activeAnnotation'];_0x2665ba['refresh']({'blurredAnnotation':_0x474995,'activatedAnnotation':_0x40492b}),this['activeAnnotation']=_0x40492b;}['attach'](_0x23d517){this['annotations']=_0x23d517;const _0x185f15=this['context']['plugins']['get'](z);if(_0x185f15['_annotations']=_0x23d517,this['isAttached'])throw new _0x3f73c4('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x185f15,'set:container',()=>{this['detach'](),this['listenTo'](_0x185f15,'change:container',_0x506750=>{_0x506750['off'](),this['attach'](_0x23d517);});}),_0x185f15['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x63ce09=_0x40d9d8=>{_0x40d9d8['updateTargetRect'](),_0x185f15['addAnnotation'](_0x40d9d8);};for(const _0x3d7e9d of _0x23d517)_0x63ce09(_0x3d7e9d);this['listenTo'](_0x23d517,'add',(_0x479352,_0xa6618a)=>{_0x63ce09(_0xa6618a);}),this['listenTo'](_0x23d517,'remove',(_0x48e62f,_0x3bd302,_0x33fcd6)=>{_0x185f15['rearrange']({'removedAnnotation':_0x3bd302,'previousAnnotation':_0x23d517['get'](_0x33fcd6-0x1),'nextAnnotation':_0x23d517['get'](_0x33fcd6+0x1)}),_0x3bd302===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x23d517,'focus',(_0x217e2f,_0x24936f)=>{this['setActiveAnnotation'](_0x24936f);}),this['listenTo'](_0x23d517,'blur',()=>{this['setActiveAnnotation'](null);});const _0x316a6a=this['context']instanceof _0x467a4d?this['context']['editors']:new _0x100e27([this['context']]);for(const _0x31030d of _0x316a6a)this['_integrateWithEditorAnnotations'](_0x31030d);this['listenTo'](_0x316a6a,'add',(_0x3c8254,_0x415bb3)=>{this['listenTo'](_0x415bb3,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x415bb3);});}),this['listenTo'](_0x316a6a,'remove',(_0x8841fe,_0x17dd0e)=>{_0x17dd0e['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x17dd0e['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3f73c4('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1bbc69=this['context']['plugins']['get'](z);_0x1bbc69['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1bbc69),this['stopListening'](this['annotations']),this['context']instanceof _0x467a4d&&this['stopListening'](this['context']['editors']);for(const _0x336ead of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x336ead);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5790ed){if(!_0x5790ed['plugins']['has']('EditorAnnotations'))return;const _0x35d3a6=_0x5790ed['plugins']['get']('EditorAnnotations'),_0x10be9e=()=>{const _0xcd5803=_0x35d3a6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0xcd5803[0x0]||null);};this['listenTo'](_0x35d3a6,'refresh',_0x10be9e),this['listenTo'](_0x35d3a6,'blur',(_0x524f9d,{isAnnotationTracked:_0x15982c})=>{this['activeAnnotation']&&_0x15982c(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x35d3a6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1d540d=>{_0x35d3a6['hasDomSelection']()&&(_0x10be9e(),_0x1d540d['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x35d3a6);}['_destroyEditorAnnotationsIntegration'](_0x1ecdea){this['stopListening'](_0x1ecdea),this['_editorAnnotations']['remove'](_0x1ecdea);}}class C extends _0x1cb946{['counterView'];constructor(_0x323dc4){super(_0x323dc4);const _0x3db458=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2c4bfd,_0x33a9f8)=>_0x2c4bfd?'...':_0x33a9f8['toString']()),this['set']('annotationType',''),this['icon']=_0x2d891e,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3db458['to']('annotationType',_0x2af22a=>'ck-annotation-counter__badge--'+_0x2af22a),_0x3db458['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3db458['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xd751f5{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54d333){super(_0x54d333),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x687f4e),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x100e27(),this['_refreshPositioningDebounced']=_0x4eaad4(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x56107f(this['context']['locale']),this['balloonPanelView']=new _0xd282f8(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x506018){this['annotations']=_0x506018;const _0xdc76ed=this['context']['plugins']['get'](z),_0x564d6c=this['balloonPanelView'];if(_0xdc76ed['_annotations']=_0x506018,this['isAttached'])throw new _0x3f73c4('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xdc76ed,'set:container',()=>{this['detach'](),this['listenTo'](_0xdc76ed,'change:container',_0x2e2a81=>{_0x2e2a81['off'](),this['attach'](_0x506018);});}),_0xdc76ed['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2f9082=_0x387fe2=>{const _0x54b36f=new C(this['context']['locale']);_0xdc76ed['addAnnotation'](_0x387fe2,_0x54b36f),this['_annotationToNarrowView']['set'](_0x387fe2,_0x54b36f),_0x54b36f['bind']('isDirty','annotationType','number')['to'](_0x387fe2['view'],'isDirty','type','length'),_0x54b36f['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x564d6c['content']['first']!==_0x387fe2['view']?(this['_showBalloon'](_0x387fe2),_0x387fe2['view']['element']['focus'](),this['setActiveAnnotation'](_0x387fe2)):this['setActiveAnnotation'](null);});};for(const _0x39bad6 of _0x506018)_0x2f9082(_0x39bad6);this['listenTo'](_0x506018,'add',(_0x41a79e,_0x180339)=>{_0x2f9082(_0x180339);}),this['listenTo'](_0x506018,'remove',(_0x253006,_0x4f1170,_0x5a58d8)=>{this['_annotationToNarrowView']['get'](_0x4f1170)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4f1170),_0xdc76ed['rearrange']({'removedAnnotation':_0x4f1170,'previousAnnotation':_0x506018['get'](_0x5a58d8-0x1),'nextAnnotation':_0x506018['get'](_0x5a58d8+0x1)}),_0x4f1170===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x506018,'focus',(_0x3b2bb5,_0x96fdfb)=>{this['setActiveAnnotation'](_0x96fdfb);}),this['listenTo'](_0x506018,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x40f6da,_0x44e348)=>{_0x44e348['keyCode']===_0x5a0553['esc']&&_0x564d6c['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x564d6c['content']['first']),this['_hideBalloon'](),_0x44e348['stopPropagation'](),_0x44e348['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x73e587,_0x6bbde2)=>{const _0x3e6fe5=_0x6bbde2['target'];_0x564d6c['isVisible']&&_0x564d6c['element']['contains'](_0x3e6fe5)||_0xdc76ed['view']['element']['contains'](_0x3e6fe5)||_0x73e587['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x37663b=>_0x37663b['contains'](_0x3e6fe5))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x255b5b=this['context']instanceof _0x467a4d?this['context']['editors']:new _0x100e27([this['context']]);for(const _0x393410 of _0x255b5b)this['_integrateWithEditorAnnotations'](_0x393410);this['listenTo'](_0x255b5b,'add',(_0xbf5ade,_0x347c6e)=>{this['listenTo'](_0x347c6e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x347c6e);});}),this['listenTo'](_0x255b5b,'remove',(_0x221482,_0x5426a8)=>{_0x5426a8['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5426a8['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x1fa9a3){if(_0x1fa9a3===this['activeAnnotation'])return;const _0x450b2c=this['context']['plugins']['get'](z);if(_0x450b2c['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1fa9a3,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1fa9a3)_0x450b2c['getSidebarItemView'](_0x1fa9a3)?this['_showBalloon'](_0x1fa9a3):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x1fa9a3;}['detach'](){if(!this['isAttached'])throw new _0x3f73c4('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2e23cb=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x48d796=>_0x48d796['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2e23cb['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x467a4d&&this['stopListening'](this['context']['editors']);for(const _0x3d78f9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3d78f9);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'](_0x4ba30c){if(!_0x4ba30c['plugins']['has']('EditorAnnotations'))return;const _0x4de540=_0x4ba30c['plugins']['get']('EditorAnnotations'),_0x2de9aa=this['context']['plugins']['get'](z),_0x202ae3=this['annotations'],_0xfa5f8f=this['balloonPanelView'],_0x4abcc7=()=>{const _0x3d42f1=_0x4de540['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x3d42f1),this['setActiveAnnotation'](_0x3d42f1[0x0]||null);};this['listenTo'](_0x4de540,'refresh',_0x4abcc7),this['listenTo'](_0x4de540,'blur',(_0x2ea0d5,{isAnnotationTracked:_0x58b7f9})=>{this['activeAnnotation']&&_0x58b7f9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4de540,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x202ae3,'blur',_0x3a364b=>{_0x4de540['hasDomSelection']()&&_0x3a364b['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x182c5c,_0x45ed50)=>{const _0x2f220=_0x45ed50['target'];_0xfa5f8f['isVisible']&&_0xfa5f8f['element']['contains'](_0x2f220)||_0x2de9aa['view']['element']['contains'](_0x2f220)||this['activeAnnotation']&&_0x4de540['hasDomSelection']()&&(_0x4abcc7(),_0x182c5c['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4de540);}['_destroyEditorAnnotationsIntegration'](_0x35c824){_0x35c824&&(this['stopListening'](_0x35c824),this['_editorAnnotations']['remove'](_0x35c824));}['_setSelectedAnnotations'](_0x3d65f5){for(const _0x36322e of this['_selectedAnnotations'])_0x3d65f5['includes'](_0x36322e)||this['_manuallyClosedAnnotationViews']['delete'](_0x36322e['view']);this['_selectedAnnotations']=_0x3d65f5;}['_refreshPositioning'](){const _0x590fe8=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x590fe8['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xea86c4){if(this['_manuallyClosedAnnotationViews']['has'](_0xea86c4['view']))return;const _0x58054f=this['balloonPanelView']['content']['first'];_0x58054f!==_0xea86c4['view']?(_0x58054f&&this['_detachListeners'](_0x58054f),this['_attachListeners'](_0xea86c4['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xea86c4['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x40cbb0=this['balloonPanelView']['content']['first'],_0x57a7e6=_0x40cbb0&&this['annotations']['getByView'](_0x40cbb0);if(!_0x57a7e6||!this['_annotationToNarrowView']['has'](_0x57a7e6))return;const _0x35b939=this['_annotationToNarrowView']['get'](_0x57a7e6)['element'],_0x4596ba=(function(){const _0x47b139=_0xd282f8['defaultPositions'];return[_0x47b139['southArrowNorthEast'],_0x47b139['northArrowSouthEast'],_0x47b139['southArrowNorth'],_0x47b139['northArrowSouth'],_0x47b139['southArrowNorthWest'],_0x47b139['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x35b939,'positions':_0x4596ba});}['_hideBalloon'](){const _0x571dcf=this['balloonPanelView'],_0x44f97c=_0x571dcf['content']['first'];_0x44f97c&&(this['_detachListeners'](_0x44f97c),_0x571dcf['unpin'](),_0x571dcf['content']['clear']());}['_attachListeners'](_0x16e0aa){this['listenTo'](_0x16e0aa,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x16e0aa,'Esc',(_0x28d153,_0xdc9f1d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x16e0aa),this['_hideBalloon'](),_0xdc9f1d();});}['_detachListeners'](_0x1fd3c4){this['stopListening'](_0x1fd3c4);}}class c extends _0x5dedc1{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x322d01,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2e7501){super(_0x2e7501),_0x2e7501['editing']['view']['addObserver'](_0x529852),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2e7501['plugins']['get'](_0x322d01),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x1aeecb=this['editor']['plugins']['get'](M);_0x1aeecb['context']===this['editor']&&(_0x1aeecb['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x504a07,_0x3e1321)=>{const _0x51b488=this['_balloon'];if(this['isAttached']&&_0x51b488['visibleView']){const _0x33a067=this['annotations']['getByView'](_0x51b488['visibleView']);_0x33a067&&this['_closeAnnotation'](_0x33a067),_0x3e1321();}}));}['afterInit'](){const _0x1b2bc5=this['editor']['plugins']['get'](M);_0x1b2bc5['context']===this['editor']&&(_0x1b2bc5['hasActive']()||_0x1b2bc5['switchTo']('inline'));}['setActiveAnnotation'](_0x39e484){_0x39e484!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x39e484&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x39e484)&&this['_addAnnotationToBalloon'](_0x39e484,!0x0),_0x39e484['isActive']=!0x0),_0x39e484||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x39e484);}['attach'](_0x437c7d){this['annotations']=_0x437c7d;const _0x45f008=this['editor']['plugins']['get'](M),_0x1e346d=this['_balloon'];if(this['isAttached'])throw new _0x3f73c4('inlineannotations-attach-already-attached',this);if(_0x45f008['context']!==this['editor'])throw new _0x3f73c4('inlineannotations-not-allowed-with-context',this);const _0x3eb15a=this['editor']['plugins']['get'](P);this['listenTo'](_0x3eb15a,'refresh',()=>{const _0x436e07=_0x3eb15a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x11e101,_0x1bf927;!this['_forceRefresh']&&(_0x11e101=_0x436e07,_0x1bf927=this['_selectedAnnotations'],_0x11e101['length']===_0x1bf927['length']&&_0x11e101['every'](_0x1a3639=>_0x1bf927['includes'](_0x1a3639)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x436e07),this['setActiveAnnotation'](_0x436e07[0x0]||null));}),this['listenTo'](_0x3eb15a,'blur',(_0x216745,{isAnnotationTracked:_0x2a50ac})=>{this['activeAnnotation']&&_0x2a50ac(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4cccbc,_0x2cb553,_0x4e4a49)=>{_0x4e4a49||this['setActiveAnnotation'](null);}),this['listenTo'](_0x437c7d,'remove',(_0x514aa2,_0x310e4b)=>{this['_removeAnnotationFromBalloon'](_0x310e4b),_0x310e4b===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1e346d,'change:visibleView',(_0x320c32,_0x264be5,_0x2f88b5,_0x5c03a9)=>{_0x5c03a9&&this['stopListening'](_0x5c03a9);const _0x5caeb7=_0x437c7d['getByView'](_0x2f88b5);_0x2f88b5&&_0x5caeb7&&(this['listenTo'](_0x2f88b5,'change:height',()=>{_0x1e346d['updatePosition']();}),this['listenTo'](_0x2f88b5,'Esc',()=>{this['_closeAnnotation'](_0x5caeb7),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5caeb7&&this['setActiveAnnotation'](_0x5caeb7));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1e346d['visibleView']&&(_0x437c7d['getByView'](_0x1e346d['visibleView'])&&_0x1e346d['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 _0x3f73c4('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x184707 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x184707);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x34e03d){for(const _0x3c8ab6 of this['_selectedAnnotations'])_0x34e03d['includes'](_0x3c8ab6)||this['_manuallyClosed']['delete'](_0x3c8ab6);for(const _0x54f8f7 of this['annotations'])_0x34e03d['includes'](_0x54f8f7)||this['_removeAnnotationFromBalloon'](_0x54f8f7);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x45e96b of _0x34e03d)this['_addAnnotationToBalloon'](_0x45e96b);}this['_selectedAnnotations']=_0x34e03d;}['_addAnnotationToBalloon'](_0x2cf5ee,_0x2688ca=!0x1){this['_manuallyClosed']['has'](_0x2cf5ee)||(this['_addedAnnotations']['has'](_0x2cf5ee)||this['_balloon']['hasView'](_0x2cf5ee['view'])||(this['_addedAnnotations']['add'](_0x2cf5ee),this['_balloon']['add']({'stackId':_0x2cf5ee['view']['id'],'view':_0x2cf5ee['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2cf5ee)}})),_0x2688ca&&this['_balloon']['showStack'](_0x2cf5ee['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4fd380){const _0x323d4a=_0x4fd380['target'],_0x4c1d1d=this['editor']['editing']['view'],_0x555441=_0x4c1d1d['document']['selection']['getFirstRange'](),_0xc3efde=_0x4c1d1d['domConverter']['viewRangeToDom'](_0x555441);if(_0xc3efde['collapse'](!0x0),_0x323d4a){if(_0x323d4a instanceof _0xefacec)return _0x323d4a;let _0x22a114=[];for(const _0x9561d8 of _0x323d4a)_0x22a114['push'](...(_0x2a7472=_0x9561d8['getClientRects'](),Array['from'](_0x2a7472)['map'](DOMRect['fromRect'])));_0x22a114=function(_0x2c55c3){const _0x17e842=[];let _0x2d889b=_0x2c55c3[0x0];for(let _0x2f3f4e=0x1;_0x2f3f4e<_0x2c55c3['length'];_0x2f3f4e++)B(_0x2d889b,_0x2c55c3[_0x2f3f4e])?_0x2d889b['width']+=_0x2c55c3[_0x2f3f4e]['width']:(_0x17e842['push'](_0x2d889b),_0x2d889b=_0x2c55c3[_0x2f3f4e]);return _0x17e842['push'](_0x2d889b),_0x17e842;}(_0x22a114);const _0x2fc606=_0xc3efde['getBoundingClientRect']();return _0x22a114['find'](_0x5ef5dc=>_0x5ef5dc['top']<=_0x2fc606['top']&&_0x5ef5dc['bottom']>=_0x2fc606['bottom']&&_0x5ef5dc['left']<=_0x2fc606['left']&&_0x5ef5dc['right']>=_0x2fc606['right'])||_0x22a114[0x0];}var _0x2a7472;return _0x4fd380['targetRect']||_0xc3efde;}['_removeAnnotationFromBalloon'](_0xa7ad2c){this['_addedAnnotations']['has'](_0xa7ad2c)&&this['_balloon']['hasView'](_0xa7ad2c['view'])&&(this['_addedAnnotations']['delete'](_0xa7ad2c),this['_balloon']['remove'](_0xa7ad2c['view']));}['_closeAnnotation'](_0x10e1e8){this['_manuallyClosed']['add'](_0x10e1e8),this['_removeAnnotationFromBalloon'](_0x10e1e8);}}function B(_0x2da102,_0x29ce33){return _0x2da102['top']===_0x29ce33['top']&&_0x2da102['bottom']===_0x29ce33['bottom']&&_0x2da102['right']===_0x29ce33['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1debbb,_0x1fdb5b){super(_0x1debbb),this['set']('isEmpty',!_0x1fdb5b['length']),this['focusTracker']=new _0x573782(),this['_annotationViews']=_0x1fdb5b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x15cdbf({'focusables':_0x1fdb5b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1fdb5b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1fdb5b,'remove',(_0x44d44b,_0x42c0cd)=>{_0x42c0cd['isActive']&&this['focus'](),_0x1fdb5b['length']||(this['isEmpty']=!0x0);});const _0x5856aa=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x1debbb,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1fdb5b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5856aa['if']('isEmpty','ck-hidden',_0x4481ae=>!_0x4481ae)]},'children':[{'text':E(_0x1debbb,'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 _0x34b972 of this['_annotationViews'])this['focusTracker']['add'](_0x34b972['element']);this['_annotationViews']['on']('change',(_0x397755,{added:_0x412dd9,removed:_0x52e37f})=>{for(const _0x17f791 of _0x412dd9)this['focusTracker']['add'](_0x17f791['element']);for(const _0x313ff7 of _0x52e37f)this['focusTracker']['remove'](_0x313ff7['element']);});}}class f extends _0xd751f5{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x5dc148){super(_0x5dc148),this['archivedThreads']=new _0x100e27();}['init'](){const _0x2f243f=this['context'],_0x57637d=_0x2f243f['plugins']['get'](o),_0x297ded=_0x2f243f['plugins']['get'](O);this['listenTo'](_0x57637d,'addCommentThread',(_0x2b2fac,{threadId:_0x97f9ab})=>{const _0x1e5128=_0x57637d['getCommentThread'](_0x97f9ab);_0x1e5128['archivedAt']&&this['archivedThreads']['add'](_0x1e5128,this['_calculatePosition'](_0x1e5128['archivedAt'])),this['listenTo'](_0x1e5128,'change:archivedAt',(_0x19ee49,_0x3e4d40,_0x17c5b3)=>{_0x17c5b3?this['archivedThreads']['has'](_0x1e5128)||this['archivedThreads']['add'](_0x1e5128,this['_calculatePosition'](_0x1e5128['archivedAt'])):this['archivedThreads']['has'](_0x1e5128)&&this['archivedThreads']['remove'](_0x1e5128);});}),this['listenTo'](_0x57637d,'removeCommentThread',(_0x310c42,{threadId:_0x1cdaea})=>{const _0x569813=_0x57637d['getCommentThread'](_0x1cdaea);this['stopListening'](_0x569813),this['archivedThreads']['has'](_0x569813)&&this['archivedThreads']['remove'](_0x569813);},{'priority':'highest'}),this['listenTo'](_0x297ded['collection'],'focus',(_0x4cfe49,_0x3999ab)=>{_0x3999ab['isVisible']||(_0x3999ab['isActive']=!0x0,_0x297ded['activate'](_0x3999ab));});}['_calculatePosition'](_0x17b81){const _0x266967=[...this['archivedThreads']]['findIndex'](_0x49411f=>_0x49411f['archivedAt']<_0x17b81);return _0x266967>-0x1?_0x266967:this['archivedThreads']['length'];}}class a extends _0x5dedc1{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x25447e];}constructor(_0x5bbe78){super(_0x5bbe78),this['annotationViews']=new _0x34cf04(),this['_pendingThreads']=[];}['init'](){const _0x10fdc2=this['editor'],_0x15c917=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x10fdc2['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1cb946,!0x0)),_0x10fdc2['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x20913f=this['_createCommentsArchiveButton'](_0x121529);return _0x20913f['set']({'role':'menuitemcheckbox'}),_0x20913f;});const _0x407d9e=_0x10fdc2['plugins']['get'](f),_0x53ca1d=_0x10fdc2['plugins']['get']('Annotations'),_0x23e712=_0x10fdc2['plugins']['get']('CommentsRepository');_0x407d9e['archivedThreads']['forEach'](_0x556b74=>{this['_handleNewThread'](_0x556b74);}),this['listenTo'](_0x407d9e['archivedThreads'],'add',(_0x207611,_0x1714ea)=>{this['_handleNewThread'](_0x1714ea);}),this['listenTo'](_0x53ca1d['collection'],'add',(_0xcbae75,_0xd58968)=>{const _0x50ae0a=this['_pendingThreads']['find'](_0x26ed58=>{const _0x244f05=_0x23e712['_threadToController']['get'](_0x26ed58);return _0x244f05&&_0xd58968['innerView']===_0x244f05['view'];});if(_0x50ae0a){const _0x2c0a4f=this['_calculatePosition'](_0x50ae0a['archivedAt']);this['annotationViews']['add'](_0xd58968['view'],_0x2c0a4f),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x50ae0a),0x1);}}),this['listenTo'](_0x407d9e['archivedThreads'],'remove',(_0x176a24,_0x54c5d3)=>{const _0x55baa8=_0x10fdc2['config']['get']('collaboration.channelId');if(!_0x55baa8||_0x54c5d3['channelId']===_0x55baa8){if(this['_pendingThreads']['includes'](_0x54c5d3))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x54c5d3),0x1);else{const _0x2ba888=_0x23e712['_threadToController']['get'](_0x54c5d3),_0x2bc96b=_0x53ca1d['getByInnerView'](_0x2ba888['view']);this['annotationViews']['remove'](_0x2bc96b['view']),this['stopListening'](_0x2bc96b['focusableElements']);}}}),this['listenTo'](_0x53ca1d['collection'],'add',(_0x4f7f27,_0x4a14d5)=>{this['listenTo'](_0x4a14d5,'escape',_0x15c917);}),this['listenTo'](_0x53ca1d['collection'],'remove',(_0x2e6e45,_0x28801d)=>{this['stopListening'](_0x28801d,'escape',_0x15c917);});}['_handleNewThread'](_0xe526ea){const _0x4cdb3f=this['editor']['plugins']['get']('CommentsRepository'),_0xd6d70a=this['editor']['plugins']['get']('Annotations'),_0x1dc96b=this['editor']['config']['get']('collaboration.channelId');if(!_0x1dc96b||_0xe526ea['channelId']===_0x1dc96b){const _0x554f33=_0x4cdb3f['_threadToController']['get'](_0xe526ea);if(!_0x554f33)return void this['_pendingThreads']['push'](_0xe526ea);const _0x4625a5=this['_calculatePosition'](_0xe526ea['archivedAt']),_0x168f66=_0xd6d70a['getByInnerView'](_0x554f33['view']);_0x168f66['isVisible']&&_0xd6d70a['_visibleAnnotations']['remove'](_0x168f66),this['annotationViews']['add'](_0x168f66['view'],_0x4625a5);}}['_calculatePosition'](_0x3cf36c){const _0x355884=this['editor']['config']['get']('collaboration.channelId'),_0x4e4db4=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x4ca907=>_0x4ca907['channelId']===_0x355884)['findIndex'](_0x103ff5=>_0x103ff5['archivedAt']<_0x3cf36c);return _0x4e4db4<0x0||_0x4e4db4>this['annotationViews']['length']?this['annotationViews']['length']:_0x4e4db4-0x1;}['_toggleDialog'](){const _0x449cd0=this['editor'],_0x37b866=_0x449cd0['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x449cd0['locale'],this['annotationViews'])),'commentsArchive'===_0x37b866['id']?_0x37b866['hide']():_0x37b866['show']({'id':'commentsArchive','title':E(_0x449cd0['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1143f9,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x43c115['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x204d7b,_0x3ec80b=!0x1){const _0x3be26c=this['editor']['locale'],_0x570acc=this['editor']['plugins']['get']('Dialog'),_0x1e1c15=new _0x204d7b(_0x3be26c);return _0x1e1c15['bind']('isEnabled')['to'](this,'isEnabled'),_0x1e1c15['bind']('isOn')['to'](_0x570acc,'id',_0x336b65=>'commentsArchive'===_0x336b65),_0x1e1c15['set']({'label':E(_0x3be26c,'COMMENTS_ARCHIVE'),'icon':_0x1143f9,'isToggleable':!0x0}),_0x3ec80b&&(_0x1e1c15['tooltip']=!0x0),this['listenTo'](_0x1e1c15,'execute',()=>this['_toggleDialog']()),_0x1e1c15;}['_hideDialogOnAnnotationEscape']=_0x556750=>{const _0x81684f=_0x556750['source'];if(!this['annotationViews']['has'](_0x81684f['view']))return;const _0x52cc5c=this['editor']['plugins']['get']('Dialog');_0x52cc5c['isOpen']&&'commentsArchive'===_0x52cc5c['id']&&(_0x52cc5c['hide'](),_0x556750['stop']());};}class p extends _0x5dedc1{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|