@ckeditor/ckeditor5-comments 45.2.0-alpha.0 → 45.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 _0x17bd9d,ContextPlugin as _0x2c6a5a,PendingActions as ht,Command as _0x3ea4db,Plugin as _0x3136d3,Context as _0x5e197b}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3b9dd7,uid as _0x35b95b,KeystrokeHandler as jt,FocusTracker as _0x4998e4,diff as _0x693b90,Collection as _0x2a536e,Rect as _0x5708d8,CKEditorError as _0x15c172,first as _0x5d65fb,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x13575b,keyCodes as _0x16045e}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x12c1b5,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x4bb770,trimHtml as _0x2a709c,LateFocusDropdownButtonView as _0x5b1190,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x8ce7cf}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x356c72}from'es-toolkit/compat';import{IconUndo as _0x49b621,IconCheck as _0x56bad1,IconPencil as _0x2dd1d3,IconRemoveComment as _0x5207a8,IconThreeVerticalDots as _0x376907,IconAddComment as _0x4f9c07,IconCommentsArchive as _0x380c51}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x4a5462,ButtonView as _0x501ccc,ViewCollection as _0x1614c2,createDropdown as _0x173f07,ListView as _0x4478f6,focusChildOnDropdownOpen as _0x559ecd,ListItemView as _0x80f34e,MenuBarMenuListItemButtonView as _0x1d3340,BodyCollection as _0x4f0a56,BalloonPanelView as _0x34c707,ContextualBalloon as _0xf7176a,Dialog as _0x15c150,DialogViewPosition as _0x59b2e7}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x56d6e7}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 _0x396715}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0xe8f520}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3b9dd7(){['model'];['view'];constructor(_0x221e59,_0x377146){super(),this['model']=_0x221e59,this['model']['_isAttached']=!0x0,this['view']=_0x377146,this['listenTo'](_0x377146,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x377146,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x377146,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x377146,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x377146,'addComment',(_0x38693b,_0x2ead4b)=>this['addComment'](_0x2ead4b)),this['listenTo'](_0x377146,'updateComment',(_0x235741,_0x4a397c,_0x5849ce)=>this['updateComment'](_0x4a397c,_0x5849ce)),this['listenTo'](_0x377146,'removeComment',(_0x591234,_0x36ec4e)=>this['removeComment'](_0x36ec4e));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x29f1c7){this['model']['addComment']({'content':_0x29f1c7,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x24f30f,_0x3c63cc){this['model']['getComment'](_0x24f30f)['update']({'content':_0x3c63cc});}['removeComment'](_0x1d29c3){this['model']['getComment'](_0x1d29c3)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x2108e7,_0x581cc5,_0x502831){const t=_0x2108e7['t'];switch(_0x581cc5){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'},_0x502831);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'},_0x502831);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'},_0x502831);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'},_0x502831);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x502831);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'},_0x502831);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'},_0x502831);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'},_0x502831);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(_0x210e2d,_0x4547a2){super(_0x210e2d);const _0x21a24e=_0x35b95b();this['main']=this['createCollection'](),this['editable']=new $t(_0x210e2d,_0x4547a2,void 0x0,{'label':()=>E(_0x210e2d,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x210e2d['uiLanguageDirection'],'lang':_0x210e2d['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x21a24e},'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(_0x1b9ec0){super(_0x1b9ec0),this['view']=new Ut(_0x1b9ec0['locale'],_0x1b9ec0['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x30214f=this['editor']['editing']['view'],_0x193eb0=this['view']['editable'],_0x3c4c98=_0x30214f['document']['getRoot']();_0x193eb0['name']=_0x3c4c98['rootName'],this['view']['render']();const _0x5a9e6a=_0x193eb0['element'];this['setEditableElement'](_0x193eb0['name'],_0x5a9e6a),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x30214f['attachDomRoot'](_0x5a9e6a),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3b9dd7(_0x17bd9d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x59b836={}){function _0x45d121(_0x129f80){return _0x129f80['map'](_0x1f0a7c=>String['fromCharCode'](_0x1f0a7c))['join']('');}(_0x59b836=Object['assign']({},_0x59b836))['plugins']||(_0x59b836['plugins']=Qt['defaultPlugins']),super(_0x59b836),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[_0x45d121([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45d121([0x76,0x69,0x65,0x77])][_0x45d121([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x45d121([0x61,0x75,0x74,0x6f]),this[_0x45d121([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x45d121([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x45d121([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x45d121([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x45d121([0x6f,0x6b])});}['create'](){const _0x465509=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x465509))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x17e2ef=>{const _0x30920a=this['model']['document']['getRoot'](),_0x8099b5=_0x30920a&&_0x30920a['getChild'](_0x30920a['childCount']-0x1);_0x17e2ef['setSelection'](_0x8099b5,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x28aeb4=this['editing']['view'],_0x56eb69=_0x28aeb4['document']['getRoot'](),_0x17f7db=_0x56eb69['getChild'](0x0);_0x56eb69['childCount']>0x1||!_0x17f7db||'p'!=_0x17f7db['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x28aeb4,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x17f7db['placeholder']=this['placeholder']),Ft({'view':_0x28aeb4,'element':_0x17f7db,'keepOnFocus':!0x0}),this['placeholderElement']=_0x17f7db);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2287c4,_0x19dc5c={}){super(_0x2287c4),this['editor']=null,this['_editorConfig']=_0x19dc5c,this['set']('value',_0x19dc5c['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x2287c4,'Reply...')),this['set']('submitLabel',E(_0x2287c4,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4998e4(),this['focusCycler']=new _0x4a5462({'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',(_0x28a9d4,_0x56dc30)=>{this['cancelButtonView']['fire']('execute'),_0x56dc30();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4e1ae3,_0x6aa80f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x6aa80f());}),this['on']('submit',(_0x51a747,_0x2a8ab3)=>{_0x2a8ab3['length']>0xfde8?(alert(E(_0x2287c4,'TOO_LONG_COMMENT_ALERT',[_0x2a8ab3['length'],0xfde8])),_0x51a747['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 _0x46f15d=this['editor'];this['element']['insertBefore'](_0x46f15d['ui']['element'],this['element']['firstChild']),_0x46f15d['model']['document']['on']('change',()=>this['value']=_0x46f15d['getData']()),_0x46f15d['bind']('placeholder')['to'](this),this['focusables']['add'](_0x46f15d['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0xe7b5c1){-0x1===_0xe7b5c1?(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:_0x10e004}=this,_0x27a7f8=new _0x501ccc(_0x10e004);return _0x27a7f8['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x27a7f8['withText']=!0x0,_0x27a7f8['bind']('label')['to'](this,'submitLabel'),_0x27a7f8['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x27a7f8['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2bb55b,_0x254500)=>!_0x254500&&!!_0x2bb55b['trim']()),_0x27a7f8;}['_createCancelButton'](){const {locale:_0x4ffb48}=this,_0x3726db=new _0x501ccc(_0x4ffb48);return _0x3726db['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3726db['label']=E(_0x4ffb48,'Cancel'),_0x3726db['withText']=!0x0,_0x3726db['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3726db;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5d362f=>{this['focusTracker']['add'](_0x5d362f['element']);}),this['focusables']['on']('change',(_0x461aa5,_0x2e52f1)=>{for(const _0x4df941 of Array['from'](_0x2e52f1['added'])['reverse']())this['focusTracker']['add'](_0x4df941['element']);});}}class ie extends kt{constructor(_0x3ff30c,_0x452af5,_0x508433){super(_0x3ff30c),this['commentInputView']=new os(_0x3ff30c,_0x508433),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x56ab71,_0x4d7049)=>_0x56ab71||!!_0x4d7049),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 _0x12c1b5(_0x3ff30c,_0x452af5),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'](_0xeb6952){this['commentInputView']['focus'](_0xeb6952);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x32b779,_0x4865ad)=>{const {submitButtonView:_0x1b7e7d,cancelButtonView:_0x358d4b,editor:_0x5e831a}=this['commentInputView'];[_0x1b7e7d['element'],_0x358d4b['element'],_0x5e831a?_0x5e831a['editing']['view']['getDomRoot']():null]['filter'](_0x5e1ba8=>_0x5e1ba8)['some'](_0x4b78ec=>_0x4b78ec['contains'](_0x4865ad['target']))||(this['focus'](),_0x4865ad['preventDefault']());});}}class cs extends kt{constructor(_0x522cd4){super(_0x522cd4);const _0x3b55fa=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3b55fa['to']('count',_0x333e6a=>E(_0x522cd4,'NUMBER_OF_COMMENTS',_0x333e6a))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3f2dd7,_0x381f6c,_0x3d51fd){super(_0x3f2dd7);const _0x1969b0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x381f6c['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x381f6c,this['_config']=_0x3d51fd,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4998e4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a5462({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3dcdc5=>this['commentViews']['map'](_0x52a0a2=>_0x52a0a2['element'])['includes'](_0x3dcdc5['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x3f2dd7),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x13cf1d=>_0x13cf1d-this['_config']['maxCommentsWhenCollapsed']);for(const _0x8c1dde of _0x381f6c['comments'])this['_handleNewCommentModel'](_0x8c1dde);this['_handleInfoComment'](),this['listenTo'](_0x381f6c['comments'],'add',(_0x2e07ae,_0x47f35a)=>{const _0x7096fe=this['_calculatePosition'](_0x47f35a);this['length']++,this['_handleNewCommentModel'](_0x47f35a,_0x7096fe),this['refreshVisibleViews']();}),this['listenTo'](_0x381f6c['comments'],'remove',(_0x1a4986,_0x450087)=>{this['length']--,this['_handleRemoveCommentModel'](_0x450087),this['refreshVisibleViews']();}),this['listenTo'](_0x381f6c,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x381f6c,'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',_0x1969b0['if']('length','ck-hidden',_0x268ecf=>!_0x268ecf)],'aria-label':E(_0x3f2dd7,'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'](_0x254490){-0x1===_0x254490?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2f3c52 of this['commentViews'])_0x2f3c52['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3fbe06,_0xc97f6a){const _0x1d9cb1=new this['_config']['CommentView'](this['locale'],_0x3fbe06,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1d9cb1['viewUid']=_0x3fbe06['id'],_0x1d9cb1['delegate']('removeComment')['to'](this),_0x1d9cb1['delegate']('updateComment')['to'](this),_0x1d9cb1['delegate']('resolveCommentThread')['to'](this),_0x1d9cb1['delegate']('editorReady')['to'](this),_0x1d9cb1['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1d9cb1,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1d9cb1,_0xc97f6a);}['_calculatePosition'](_0x429478){const _0x253d0c=this['_model']['_findOptimalIndex'](_0x429478);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x429478['authoredAt']?_0x253d0c-0x1:_0x253d0c:_0x253d0c-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x43fdea={'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'],_0x43fdea,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x43fdea));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x918aa6){const _0x5dc428=this['commentViews']['remove'](_0x918aa6['id']);this['stopListening'](_0x5dc428),_0x5dc428['isEditMode']&&this['_updateHasDirtyComment'](),_0x5dc428['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x55d2e6=>_0x55d2e6['isEditMode']);}['_rearrangeCollapse'](){const _0x1ed489=function(_0x4b0f1d){const _0x4a620d=new _0x2a536e();for(const _0x44cc86 of _0x4b0f1d)_0x4a620d['add'](_0x44cc86);return _0x4a620d;}(this['commentViews']),_0x487ec4=this['_collapsedCommentsView']['count'];for(let _0x5b666b=0x1;_0x5b666b<=_0x487ec4;_0x5b666b++)_0x1ed489['remove'](0x1);for(const _0x142dd0 of _0x1ed489)_0x142dd0['collapse']();_0x487ec4>0x0&&_0x1ed489['add'](this['_collapsedCommentsView'],0x1),ns(_0x693b90(Array['from'](this['visibleViews']),Array['from'](_0x1ed489)),this['visibleViews'],_0x1ed489);}['_rearrangeExpand'](){ns(_0x693b90(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2a9335 of this['visibleViews'])_0x2a9335['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x32fc41=>{this['focusTracker']['add'](_0x32fc41['element']),this['keystrokes']['listenTo'](_0x32fc41['element']);}),this['commentViews']['on']('change',(_0x3acc42,_0x4a5b27)=>{for(const _0x50e322 of _0x4a5b27['removed'])this['focusTracker']['remove'](_0x50e322['element']),this['keystrokes']['stopListening'](_0x50e322['element']);for(const _0x2d8c32 of Array['from'](_0x4a5b27['added'])['reverse']())this['focusTracker']['add'](_0x2d8c32['element']),this['keystrokes']['listenTo'](_0x2d8c32['element']);});}}function ns(_0x373847,_0x22a734,_0x204cc2){let _0xd9406c=0x0;for(const _0x380b14 of _0x373847)switch(_0x380b14){case'insert':_0x22a734['add'](_0x204cc2['get'](_0xd9406c),_0xd9406c),_0xd9406c++;break;case'delete':_0x22a734['remove'](_0xd9406c);break;case'equal':_0xd9406c++;}}class as extends kt{constructor(_0xf5736b){super(_0xf5736b);const _0x1d3960=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1d3960['to']('contextValue',_0x2d83f9=>E(_0xf5736b,'THREAD_CONTEXT_LABEL',_0x2d83f9)),'tabindex':-0x1},'children':[{'text':_0x1d3960['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x238668,_0x25b669){super(_0x238668);const _0x3340b5=this['bindTemplate'];this['_model']=_0x25b669,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4998e4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a5462({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xa9d99=>!!_0xa9d99),this['bind']('contextValue')['to'](this['_model'],'context',_0x5b9f52=>_0x5b9f52&&_0x5b9f52['value']?this['_trimContextValue'](_0x5b9f52['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',_0x3340b5['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 _0x32d7b9=new _0x501ccc(this['locale']);return _0x32d7b9['label']=E(this['locale'],'Reopen'),_0x32d7b9['tooltip']=E(this['locale'],'Reopen'),_0x32d7b9['icon']=_0x49b621,_0x32d7b9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x306d70=>!_0x306d70),_0x32d7b9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x15531b,_0x13145d)=>_0x15531b&&_0x13145d),_0x32d7b9['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x32d7b9;}['_trimContextValue'](_0x115d1b){if(_0x115d1b['length']<0x96)return _0x115d1b;const _0x58c716=_0x115d1b['lastIndexOf']('\x20',0x93);return _0x115d1b['substring'](0x0,_0x58c716>-0x1?_0x58c716:0x93)+'...';}['_attachContextActions'](){const _0x4177bc=this['element']['querySelector']('.ck-context'),_0x285720=_0x4177bc['querySelector']('.ck-context__value');this['listenTo'](_0x4177bc,'mouseenter',()=>{_0x285720['offsetWidth']<_0x285720['scrollWidth']&&_0x4177bc['classList']['add']('overlay');}),this['listenTo'](_0x4177bc,'mouseleave',()=>{_0x4177bc['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3a11fa of this['focusables'])this['focusTracker']['add'](_0x3a11fa['element']),this['keystrokes']['listenTo'](_0x3a11fa['element']);}['_createContextView'](){const _0x58fb70=new as(this['locale']);return _0x58fb70['bind']('contextValue')['to'](this),_0x58fb70;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1331c6,_0x37a4d4,_0xb95f3e,_0x374fff){super(_0x1331c6),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x37a4d4,this['_localUser']=_0xb95f3e,this['_config']=_0x374fff,this['commentThreadHeaderView']=new Xt(_0x1331c6,_0x37a4d4),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x1331c6,E(_0x1331c6,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1331c6,_0x37a4d4,Object['assign']({'CommentView':this['_config']['CommentView']},_0x374fff)),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',(_0x5731f4,_0x245027)=>_0x5731f4||!!_0x245027),this['bind']('isUnlinked')['to'](_0x37a4d4,'unlinkedAt',_0x5ac605=>!!_0x5ac605),this['bind']('ariaLabel')['to'](this,'length',_0x25e50a=>{const _0x44f066=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x25e50a,_0x44f066]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4998e4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a5462({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x121532=>_0x121532['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 _0xb2259e=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3bff9a=_0xb2259e['commentInputView'];return _0xb2259e['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3bff9a,'value',(_0x3aed7f,_0xe8bcaf,_0x2ceabd,_0x1b9fc4,_0x1a63af)=>!!_0x1a63af||!!_0x1b9fc4&&_0x2ceabd&&!_0xe8bcaf||_0x3aed7f&&_0x2ceabd&&!_0xe8bcaf),_0x3bff9a['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4508a4,_0x57b312,_0x1067a4)=>{let _0x366016;return _0x366016=_0x1067a4&&_0x57b312?'Reply\x20to\x20reopen\x20discussion...':_0x4508a4?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x366016);}),_0x3bff9a['bind']('submitLabel')['to'](this,'length',_0x3879f0=>E(this['locale'],_0x3879f0?'Reply':'Comment')),_0x3bff9a['on']('submit',(_0x15e1aa,_0x500653)=>{this['fire']('addComment',_0x500653),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3bff9a['on']('cancel',()=>{this['focus']();}),_0x3bff9a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3bff9a['on']('cancel',_0x34f7f0=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x34f7f0['stop']());}),this['on']('change:isActive',(_0x3db6ed,_0x3d7c91,_0x132528)=>{_0x132528||this['length']||_0x3bff9a['value']||this['fire']('removeCommentThread');}),_0xb2259e;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x5be524,_0xd3c1cd,_0x3865ad,_0x5db0f9){super(_0x5be524,_0xd3c1cd,_0x3865ad,_0x5db0f9),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5be524,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x4d8a33,_0x63e3ae,_0x2a3523)=>{_0x2a3523||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3fb1dd,_0x39ac48,_0x1a4cbc)=>{_0x1a4cbc&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x54914e=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x54914e['if']('isActive','ck-thread--active'),_0x54914e['if']('isUnlinked','ck-thread--unlinked'),_0x54914e['if']('isConfirm','ck-thread--remove-confirmation'),_0x54914e['to']('actionIndicator',_0x2f90b7=>_0x2f90b7?'ck-thread--'+_0x2f90b7:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x54914e['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 _0x4d309d of this['commentsListView']['commentViews'])_0x4d309d['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x586859}=this,_0x45beab=this['commentsListView']['commentViews']['get'](0x0);_0x45beab===this['_boundFirstCommentView']||_0x45beab['isSystemComment']||(this['_boundFirstCommentView']=_0x45beab,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x45beab,'actionIndicator',_0x2a576a=>'remove'===_0x2a576a?'remove':null),_0x45beab['placeholder']=E(_0x586859,'Write\x20a\x20comment...'),_0x45beab['removeButton']['on']('execute',_0x53207c=>{_0x53207c['stop'](),this['showConfirm'](E(_0x586859,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x45beab['focus']();}),_0x45beab['actionBar']['add'](this['resolveButton'],0x0),_0x45beab['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4aa407=new _0x4bb770(this['locale']);return _0x4aa407['label']=E(this['locale'],'Resolve'),_0x4aa407['tooltip']=E(this['locale'],'Resolve'),_0x4aa407['icon']=_0x56bad1,_0x4aa407['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4aa407['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2261d0=>!_0x2261d0),_0x4aa407['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x39d0e7,_0x29f624)=>_0x39d0e7&&!_0x29f624),_0x4aa407['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4aa407;}['_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(_0x1dea76){super(_0x1dea76),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x14e0cd,_0x1efd82,_0x55fcc6)=>{this['element']['innerHTML']=_0x55fcc6;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x159101,_0x54c4e9,_0x32aec3){super(_0x159101),this['_model']=_0x54c4e9,this['_config']=_0x32aec3,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x54c4e9,'content',_0x54c4e9,'authoredAt',(_0x4c4860,_0x3bd4a9)=>E(_0x159101,'COMMENT_ARIA_LABEL',[_0x54c4e9['author']['name'],_0x32aec3['formatDateTime'](_0x3bd4a9),new DOMParser()['parseFromString'](_0x4c4860,'text/html')['body']['textContent'],_0x54c4e9['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x159101,E(_0x159101,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x1614c2(),this['focusTracker']=new _0x4998e4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a5462({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x29248e=>_0x29248e['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 _0x33a813=new es(this['locale']);return _0x33a813['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x52bbd3,_0x3892c1)=>_0x3892c1?_0x2a709c(_0x52bbd3,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x52bbd3),_0x33a813;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x15fb3f=new os(this['locale'],this['_config']['editorConfig']);return _0x15fb3f['value']=this['_model']['content'],_0x15fb3f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x15fb3f['submitLabel']=E(this['locale'],'Save'),_0x15fb3f['on']('submit',(_0xb37829,_0x1c997b)=>{this['fire']('updateComment',this['_model']['id'],_0x1c997b),this['switchToDisplayMode'](),this['focus']();}),_0x15fb3f['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x15fb3f['once']('editorReady',()=>{_0x15fb3f['focus']();}),_0x15fb3f['createEditor'](),_0x15fb3f['delegate']('editorReady')['to'](this),_0x15fb3f['delegate']('editorDestroyed')['to'](this),_0x15fb3f;}['_setupKeyboardNavigation'](){const _0x16ff8d=this['element'];this['keystrokes']['listenTo'](_0x16ff8d);for(const _0x5e878d of this['focusables'])this['focusTracker']['add'](_0x5e878d['element']),this['keystrokes']['listenTo'](_0x5e878d['element']);this['focusables']['on']('change',(_0x5c8808,_0x7f9a0b)=>{for(const _0x170503 of _0x7f9a0b['removed'])this['focusTracker']['remove'](_0x170503['element']),this['keystrokes']['stopListening'](_0x170503['element']);for(const _0x494c07 of _0x7f9a0b['added'])this['focusTracker']['add'](_0x494c07['element']),this['keystrokes']['listenTo'](_0x494c07['element']);}),this['keystrokes']['set']('enter',(_0x5e72aa,_0x1792d4)=>{_0x16ff8d===_0x5e72aa['target']&&(this['focusCycler']['focusFirst'](),_0x1792d4());}),this['keystrokes']['set']('esc',(_0x2108b7,_0x518563)=>{_0x16ff8d!==_0x2108b7['target']&&(this['focus'](),_0x518563());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0xe58b7c,_0x212a86,_0x4a0fd5){super(_0xe58b7c,_0x212a86,_0x4a0fd5),this['set']('actionIndicator',null),this['set']('placeholder',E(_0xe58b7c,'Reply...')),this['bind']('authoredAt')['to'](_0x212a86),this['bind']('resolvedAt')['to'](_0x212a86),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 _0x12c1b5(_0xe58b7c,_0x212a86['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x212a86,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x260475=this['bindTemplate'],_0x3b02d1=[{'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':_0x260475['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x260475['to']('authoredAt',_0x1d1cdc=>this['_config']['formatDateTime'](_0x1d1cdc))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x260475['if']('isEditMode','ck-comment__actions--hidden'),_0x260475['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']&&_0x3b02d1['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x260475['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x260475['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x260475['if']('isEditMode','ck-comment--edit'),_0x260475['if']('isSystemComment','ck-comment--info'),_0x260475['to']('actionIndicator',_0x209ab9=>_0x209ab9?'ck-comment--'+_0x209ab9:'')],'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':_0x3b02d1}]}]};}['_createEditButton'](){const _0x1a1d6f=new _0x501ccc(this['locale']);return _0x1a1d6f['label']=E(this['locale'],'Edit'),_0x1a1d6f['icon']=_0x2dd1d3,_0x1a1d6f['withText']=!0x0,_0x1a1d6f['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1a1d6f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1dcbbb=>!_0x1dcbbb),_0x1a1d6f['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1a1d6f['on']('execute',()=>this['switchToEditMode']()),_0x1a1d6f;}['_createRemoveButton'](){const _0x4cad2e=new _0x501ccc(this['locale']);return _0x4cad2e['label']=E(this['locale'],'Remove'),_0x4cad2e['icon']=_0x5207a8,_0x4cad2e['withText']=!0x0,_0x4cad2e['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4cad2e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xdf495a=>!_0xdf495a),_0x4cad2e['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4cad2e['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4cad2e;}['_createDropdown'](){const _0x1403eb=_0x173f07(this['locale'],_0x5b1190),_0x4992dc=_0x1403eb['panelView']['children'],_0x134b93=new _0x4478f6(this['locale']),_0x4b4389=_0x1403eb['bindTemplate'];_0x559ecd(_0x1403eb,()=>this['items']['find'](_0x449020=>_0x449020['isVisible'])),_0x1403eb['extendTemplate']({'attributes':{'class':[_0x4b4389['if']('isVisible','ck-hidden',_0x2bc151=>!_0x2bc151)]}});const _0x260329=(_0x3b3639,_0x3254f7=-0x1)=>{const _0x2bdc52=new _0x80f34e(this['locale']);_0x2bdc52['children']['add'](_0x3b3639);const _0xa1477b=_0x3254f7>-0x1?_0x3254f7:_0x134b93['items']['length'];_0x134b93['items']['add'](_0x2bdc52,_0xa1477b);const _0x72a969=Array['from'](this['items']);_0x1403eb['unbind']('isEnabled','isVisible'),_0x1403eb['bind']('isEnabled')['toMany'](_0x72a969,'isEnabled',(..._0x4d55c1)=>_0x4d55c1['some'](_0x308a11=>_0x308a11)),_0x1403eb['bind']('isVisible')['toMany'](_0x72a969,'isVisible',(..._0x4bd193)=>_0x4bd193['some'](_0x5b5656=>_0x5b5656));};_0x1403eb['panelPosition']='sw',_0x1403eb['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x376907});for(const _0x501f7f of this['items'])_0x260329(_0x501f7f);return _0x4992dc['add'](_0x134b93),_0x1403eb['listenTo'](this['items'],'add',(_0x261319,_0x1fb1c8,_0xa4b404)=>{_0x260329(_0x1fb1c8,_0xa4b404);}),_0x1403eb['listenTo'](this['items'],'remove',(_0x2ee68a,_0x55c637,_0x5e4898)=>{_0x134b93['items']['remove'](_0x5e4898);}),_0x1403eb;}['_attachActions'](_0x4e0b2f,_0x247183){const _0x336f0b=_0x4e0b2f&&_0x4e0b2f['element'];_0x336f0b&&(this['listenTo'](_0x336f0b,'mouseenter',()=>this['actionIndicator']=_0x247183),this['listenTo'](_0x336f0b,'focus',()=>this['actionIndicator']=_0x247183),this['listenTo'](_0x336f0b,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x336f0b,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x4ae3d1=super['_createCommentInputView']();return _0x4ae3d1['bind']('placeholder')['to'](this),_0x4ae3d1;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x153375){const _0xedb6b9=Dt(_0x153375,0x1e),_0x177d00=new MutationObserver(_0xdf7b7a=>{for(const _0x291f51 of _0xdf7b7a)('attributes'==_0x291f51['type']&&'class'==_0x291f51['attributeName']||'childList'==_0x291f51['type']||'characterData'==_0x291f51['type'])&&_0xedb6b9();});return{'attach'(_0x2e6b9){_0x177d00['observe'](_0x2e6b9,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x177d00['disconnect'](),_0xedb6b9['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x138993,_0x315492){super(_0x138993),this['id']=_0x35b95b(),this['focusTracker']=new _0x4998e4(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x7fc38f,_0x6a6ac0)=>this['fire']('Esc',_0x6a6ac0)),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'](_0x315492),this['mainView']=_0x315492;const _0x1cb97d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x1cb97d['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 _0x4adf40=this['element']['clientHeight'];_0x4adf40&&(this['height']=_0x4adf40);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3b9dd7(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x45232b,target:_0x4a0753,type:_0x1af45c,isVisible:_0x40f432=!0x0}){super(),this['view']=_0x45232b,this['view']['element']||this['view']['render'](),this['_type']=_0x1af45c,this['_target']=_0x4a0753,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2a536e([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x7d1e7f,_0x2e97e0)=>{this['view']['focusTracker']['add'](_0x2e97e0);}),this['focusableElements']['on']('remove',(_0x1f6dae,_0x502686)=>{this['view']['focusTracker']['remove'](_0x502686);}),this['set']('isVisible',_0x40f432);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x5d7fef=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x5d7fef),_0x5d7fef;}get['targetRect'](){const _0x4a1646=this['target'];if(null===_0x4a1646)return null;if(_0x4a1646 instanceof _0x5708d8)return _0x4a1646;const _0x3b9d2c=_0x4a1646['filter'](_0xade569=>function(_0x5387e2){const _0x13017a=_0x5387e2['offsetParent'];if(_0x13017a)return!0x0;const _0x24a2e8=_0x5387e2['getClientRects']()['item'](0x0);return!!_0x24a2e8;}(_0xade569));return 0x0===_0x3b9d2c['length']?null:new _0x5708d8(_0x3b9d2c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5cd325){this['view']['isActive']=_0x5cd325,this['view']['mainView']['isActive']=_0x5cd325;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x449d1b){if(!(null===_0x449d1b||_0x449d1b instanceof _0x5708d8||Array['isArray'](_0x449d1b)&&_0x449d1b['every'](_0x4b0bdf=>li(_0x4b0bdf))))throw new _0x15c172('annotation-invalid-target',null,{'target':_0x449d1b});}['_getNormalizedTarget'](){const _0x178266='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x178266)?[_0x178266]:_0x178266;}}function li(_0x423574){return null!==_0x423574&&'object'==typeof _0x423574&&'nodeType'in _0x423574&&0x1===_0x423574['nodeType'];}class _ extends _0x2a536e{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4ecd81=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4998e4(),this['_focusTracker']['on']('change:isFocused',(_0x439f21,_0x49bc80,_0x498dec)=>{_0x498dec||this['fire']('blur');});for(const _0x49420f of _0x4ecd81)this['add'](_0x49420f);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2b9491){if(this['has'](_0x2b9491))throw new _0x15c172('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2b9491['innerView'],_0x2b9491),this['_viewToAnnotation']['set'](_0x2b9491['view'],_0x2b9491);for(const _0x3f6b35 of _0x2b9491['focusableElements'])this['_focusTracker']['add'](_0x3f6b35);this['listenTo'](_0x2b9491['focusableElements'],'add',(_0x408a21,_0x57344b)=>{this['_focusTracker']['add'](_0x57344b);}),this['listenTo'](_0x2b9491['focusableElements'],'remove',(_0x2645e4,_0x567145)=>{this['_focusTracker']['remove'](_0x567145);}),this['listenTo'](_0x2b9491['view']['focusTracker'],'change:isFocused',(_0x309d48,_0x5a561e,_0x26a4cf)=>{_0x26a4cf&&this['fire']('focus',_0x2b9491);}),_0x2b9491['updateTargetRect']();const _0x4b7f6f=this['_getOrderInContent'](_0x2b9491['view']['targetRect']);return super['add'](_0x2b9491,_0x4b7f6f);}['remove'](_0x58c0d5){if(!this['has'](_0x58c0d5))throw new _0x15c172('annotationcollection-not-existing-item',null);this['stopListening'](_0x58c0d5['view']['focusTracker']),this['stopListening'](_0x58c0d5['focusableElements']);for(const _0x13bd2e of _0x58c0d5['focusableElements'])this['_focusTracker']['remove'](_0x13bd2e);return this['_viewToAnnotation']['delete'](_0x58c0d5['view']),this['_innerViewToAnnotation']['delete'](_0x58c0d5['innerView']),super['remove'](_0x58c0d5);}['getByInnerView'](_0x6be1f4){return this['_innerViewToAnnotation']['get'](_0x6be1f4);}['getByView'](_0xd8310d){return this['_viewToAnnotation']['get'](_0xd8310d);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x166469 of this)_0x166469['updateTargetRect']();this['_sort']();}['_sort'](){const _0x485af8=Array['from'](this)['sort']((_0x3b8370,_0x1089fa)=>v(_0x3b8370['view']['targetRect'],_0x1089fa['view']['targetRect']));for(let _0x2206e2=_0x485af8['length']-0x1;_0x2206e2>0x0;_0x2206e2--){const _0x4e49bc=_0x485af8[_0x2206e2];_0x2206e2!==this['getIndex'](_0x4e49bc)&&(this['remove'](_0x4e49bc),this['add'](_0x4e49bc));}}['_getOrderInContent'](_0x25642d){let _0x6d23e5=0x0;if(!_0x25642d)return this['length'];for(const _0x82d42b of this){const _0x36d443=_0x82d42b['view']['targetRect'];if(_0x36d443){if(v(_0x25642d,_0x36d443)<0x0)return _0x6d23e5;_0x6d23e5++;}}return _0x6d23e5;}}function v(_0x959fc0,_0xa37af2){if(null===_0x959fc0&&null===_0xa37af2)return 0x0;if(null===_0x959fc0)return-0x1;if(null===_0xa37af2)return 0x1;const _0xfd23fc=_0x959fc0['top']-_0xa37af2['top'];return 0x0==_0xfd23fc?_0x959fc0['left']-_0xa37af2['left']:_0xfd23fc;}class O extends _0x2c6a5a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x379a2e){if(super(_0x379a2e),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x379a2e instanceof _0x17bd9d){const _0x5473e9=_0x379a2e['locale'];_0x379a2e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x45d382){this['collection']['add'](_0x45d382);}['remove'](_0x2558a7){this['collection']['remove'](_0x2558a7),_0x2558a7['destroy']();}['refreshVisibility'](){for(const _0x5dc45c of this['collection'])_0x5dc45c['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x17b479){return this['collection']['getByInnerView'](_0x17b479);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x44a3bb of this['collection'])_0x44a3bb['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3b3729){this['fire']('_activateAnnotation',_0x3b3729);}['createAnnotation'](_0xbb0943){return new d(_0xbb0943);}['createAnnotationView'](_0x265e07,_0x842829){return new S(_0x265e07,_0x842829);}['_addActiveAnnotation'](_0x533c29){const _0xc436a7=new Set(this['activeAnnotations']);_0xc436a7['add'](_0x533c29),this['activeAnnotations']=_0xc436a7;}['_removeActiveAnnotation'](_0x491c51){const _0x2ad539=new Set(this['activeAnnotations']);_0x2ad539['delete'](_0x491c51),this['activeAnnotations']=_0x2ad539;}['_bindAnnotationsToVisibleAnnotations'](){const _0x23faaa=this['collection'],_0x273f1d=this['_visibleAnnotations'];function _0x5dfb46(_0x40882d){const _0x884452=_0x40882d['source'];_0x884452['isVisible']&&!_0x273f1d['has'](_0x884452)?_0x273f1d['add'](_0x884452):!_0x884452['isVisible']&&_0x273f1d['has'](_0x884452)&&_0x273f1d['remove'](_0x884452),_0x884452['view']['focusTracker']['remove'](_0x884452['view']['element']),_0x884452['view']['focusTracker']['add'](_0x884452['view']['element']);}this['listenTo'](_0x23faaa,'add',(_0x172096,_0x1d8a26)=>{_0x1d8a26['isVisible']&&_0x273f1d['add'](_0x1d8a26),this['listenTo'](_0x1d8a26,'change:isVisible',_0x5dfb46);}),this['listenTo'](_0x23faaa,'remove',(_0x3d9b70,_0x531d0f)=>{_0x273f1d['has'](_0x531d0f)&&_0x273f1d['remove'](_0x531d0f),this['stopListening'](_0x531d0f,'change:isVisible',_0x5dfb46);});}['_setupEnterAnnotationKeystroke'](){const _0x497648=_0x1b8794=>{_0x1b8794['on']('ready',()=>{_0x1b8794['keystrokes']['set'](_0x396715,(_0x2abe14,_0x572979)=>{const _0x1da2bf=_0x5d65fb(this['activeAnnotations']['values']());_0x1da2bf&&(_0x1da2bf['view']['focus'](),_0x572979());});});};this['context']instanceof _0x17bd9d?_0x497648(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x52582b,_0xc780c9)=>{_0x497648(_0xc780c9);});}['_setupEscapeAnnotationHandling'](){const _0x19e9a3=_0x3c46f8=>{const _0x245ef2=_0x3c46f8['source'],_0x465d31=[];let _0x4d6b0e;if(Array['isArray'](_0x245ef2['target'])){_0x4d6b0e=_0x245ef2['target'][0x0],this['context']instanceof _0x17bd9d?_0x465d31['push'](this['context']):this['context']['editors']&&_0x465d31['push'](...this['context']['editors']);for(const _0x22f164 of _0x465d31)for(const _0x51df26 of _0x22f164['editing']['view']['domRoots']['values']())if(_0x51df26['contains'](_0x4d6b0e))return void _0x22f164['editing']['view']['focus']();_0x4d6b0e['focus']();}};this['listenTo'](this['collection'],'add',(_0x152c66,_0x2438d8)=>{this['listenTo'](_0x2438d8,'escape',_0x19e9a3,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2e690f,_0x4ba55f)=>{this['stopListening'](_0x4ba55f,'escape',_0x19e9a3);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x2c6a5a{['_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(_0x4a0bfd){super(_0x4a0bfd),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xb05720=this['context']['config'];_0xb05720['define']('comments.maxCommentsWhenCollapsed',0x2),_0xb05720['define']('comments.maxThreadTotalWeight',0x1f4),_0xb05720['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xb05720['define']('comments.CommentThreadView',vt),_0xb05720['define']('comments.CommentView',gt),_0xb05720['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2f2e6c=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4da32e,_0x50e5a6)=>this['_addCommentThread'](_0x50e5a6)),this['on']('submitCommentThread',(_0x378bd2,_0x33dd20)=>this['_submitCommentThread'](_0x33dd20)),this['on']('resolveCommentThread',(_0x3ab859,_0x4c5d2a)=>this['_resolveCommentThread'](_0x4c5d2a)),this['on']('resolveCommentThread',(_0x589994,_0x390fac)=>this['_updateActiveAnnotation'](_0x390fac),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x58fcf5,_0x27fe76)=>this['_reopenCommentThread'](_0x27fe76)),this['on']('reopenCommentThread',(_0x47f201,_0x3c0b5a)=>this['_updateActiveAnnotation'](_0x3c0b5a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1c5890,_0x4f282f)=>this['_removeCommentThread'](_0x4f282f)),this['on']('updateCommentThread',(_0x29d0d2,_0xfeaca9)=>this['_updateCommentThread'](_0xfeaca9)),this['on']('updateCommentThread',(_0x3ed69f,_0xdbdb5f)=>this['_updateActiveAnnotation'](_0xdbdb5f),{'priority':'lowest'}),this['on']('addComment',(_0x4f74ba,_0x199ec2)=>this['_addComment'](_0x199ec2)),this['on']('updateComment',(_0x33dee2,_0x42d498)=>this['_updateComment'](_0x42d498)),this['on']('removeComment',(_0x1446d2,_0x47b290)=>this['_removeComment'](_0x47b290)),this['on']('addComment',(_0x52f4f5,{threadId:_0x5bc427,isFromAdapter:_0x898bfb})=>{if(_0x898bfb)return;const _0x14a9a1=this['getCommentThread'](_0x5bc427),_0x35d0ca=_0x14a9a1&&this['_threadToController']['get'](_0x14a9a1);_0x35d0ca&&_0x35d0ca['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2f2e6c,'change:activeAnnotations',(_0x5588ea,_0x9cab16,_0x3afb17)=>{const _0x1375a5=Array['from'](_0x3afb17)['map'](_0x448b8c=>this['_viewToController']['get'](_0x448b8c['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1375a5?_0x1375a5['model']:null;});}set['adapter'](_0x32e1d9){if(this['_adapter'])throw new _0x15c172('commentsrepository-adapter-already-set');this['_adapter']=_0x32e1d9;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4586d2=Tt,threadId:_0x54c847=_0x35b95b(),comments:_0x46121a=[],unlinkedAt:_0x490656=null,resolvedAt:_0x28ee6f=null,resolvedBy:_0x208a8d=null,target:_0x42da9b=null,context:_0x49df16=null,attributes:_0x115b51={},isResolvable:_0x3f8416=!0x0,isSubmitted:_0x10fa27=!0x1,isFromAdapter:_0x21ca2c=!0x1}={}){return this['fire'](bt('addCommentThread',_0x4586d2),{'channelId':_0x4586d2,'threadId':_0x54c847,'comments':_0x46121a,'unlinkedAt':_0x490656,'resolvedAt':_0x28ee6f,'resolvedBy':_0x208a8d,'target':_0x42da9b,'context':_0x49df16,'attributes':_0x115b51,'isFromAdapter':_0x21ca2c,'isResolvable':_0x3f8416,'isSubmitted':_0x10fa27}),this['getCommentThread'](_0x54c847);}['openNewCommentThread']({channelId:_0x2ddcff=Tt,threadId:_0x5065b9=_0x35b95b(),target:_0x1a4783,context:_0x2fe592=null,isResolvable:_0xac5ef0=!0x0}){if(this['_readOnlyChannels']['has'](_0x2ddcff)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1a4783)throw new _0x15c172('commentsrepository-missing-target');const _0x422de3=this['addCommentThread']({'channelId':_0x2ddcff,'threadId':_0x5065b9,'target':_0x1a4783,'context':_0x2fe592,'isResolvable':_0xac5ef0});if(!_0x422de3)return null;const _0x1265d9=this['_threadToController']['get'](_0x422de3),_0x2657c0=_0x1265d9['view']['commentThreadInputView']['commentInputView'],_0x4b551e=this['context']['plugins']['get'](O),_0x3c3eeb=_0x4b551e['getByInnerView'](_0x1265d9['view']);return _0x4b551e['activate'](_0x3c3eeb),_0x2657c0['once']('editorReady',()=>_0x2657c0['focus']()),_0x422de3;}['hasCommentThread'](_0x3f36c5){if('string'!=typeof _0x3f36c5)throw new _0x15c172('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3f36c5);}['updateCommentThread']({channelId:_0x50c3fb=Tt,threadId:_0x81bb93,context:_0x3032e8,unlinkedAt:_0x4b96fc,attributes:_0x47e2bc,isFromAdapter:_0x109335=!0x1}){return this['fire'](bt('updateCommentThread',_0x50c3fb),{'channelId':_0x50c3fb,'threadId':_0x81bb93,'context':_0x3032e8,'unlinkedAt':_0x4b96fc,'attributes':_0x47e2bc,'isFromAdapter':_0x109335}),this['getCommentThread'](_0x81bb93);}['getCommentThread'](_0x4fce12){if('string'!=typeof _0x4fce12)throw new _0x15c172('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4fce12);}['fetchCommentThread']({channelId:_0x34840a,threadId:_0xa311a7}={}){const _0x7bd410=this['getCommentThread'](_0xa311a7);if(_0x7bd410)return Promise['resolve'](_0x7bd410);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x15c172('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x34840a,'threadId':_0xa311a7})['then'](_0x2bfc83=>this['hasCommentThread'](_0xa311a7)?this['getCommentThread'](_0xa311a7):_0x2bfc83?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x34840a},_0x2bfc83)):void 0x0)['catch'](_0x42aa19=>{throw console['error'](_0x42aa19),new _0x15c172('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x49356d,skipNotAttached:_0x3b600c=!0x1,skipEmpty:_0x12da45=!0x1,toJSON:_0x4e1346=!0x1}={}){const _0x415382=[];for(const _0x48db00 of this['_threads']['values']())_0x49356d&&_0x48db00['channelId']!==_0x49356d||_0x3b600c&&!_0x48db00['isAttached']||_0x12da45&&0x0===_0x48db00['length']||_0x415382['push'](_0x48db00);return _0x4e1346?_0x415382['map'](_0x3578d0=>_0x3578d0['toJSON']()):_0x415382;}['setActiveCommentThread'](_0x3186c4){const _0xa07709=this['context']['plugins']['get'](O);if(!_0x3186c4)return void(this['activeCommentThread']&&_0xa07709['deactivateAll']());const _0x66bb21=this['getCommentThread'](_0x3186c4);if(!_0x66bb21)throw new _0x15c172('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3186c4});if(!this['_threadToController']['has'](_0x66bb21))throw new _0x15c172('commentsrepository-active-not-attached',null,{'threadId':_0x3186c4});const _0x16fa6b=_0xa07709['getByInnerView'](this['_threadToController']['get'](_0x66bb21)['view']);_0xa07709['activate'](_0x16fa6b);}['switchReadOnly'](_0x5f21fa,_0x2a72aa){_0x5f21fa?this['_readOnlyChannels']['add'](_0x2a72aa):this['_readOnlyChannels']['delete'](_0x2a72aa),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xbde589){return this['_readOnlyChannels']['has'](_0xbde589)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x53c1d6,_0x1db48e){return new Ct(_0x53c1d6,_0x1db48e);}['setPermissions'](_0x259b8e,_0x4c127e=Tt){this['_permissions']['set'](_0x4c127e,_0x259b8e),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x245c23=Tt){return this['_permissions']['has'](_0x245c23)?this['_permissions']['get'](_0x245c23):_t;}['_addCommentThread']({channelId:_0x56d701,threadId:_0xf2b8c8,comments:_0x4cb569,unlinkedAt:_0x57ae7d,resolvedAt:_0x131d75,resolvedBy:_0x2dd1dd,target:_0x3805b7,context:_0x4186df,attributes:_0x4c7123,isFromAdapter:_0xdc6ad,isResolvable:_0x47db37,isSubmitted:_0x33af49}){if('string'!=typeof _0xf2b8c8)throw new _0x15c172('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xf2b8c8});if(this['hasCommentThread'](_0xf2b8c8))throw new _0x15c172('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xf2b8c8});const _0x1fd0b3=new ui(this,{'channelId':_0x56d701,'id':_0xf2b8c8,'context':_0x4186df,'attributes':_0x4c7123,'unlinkedAt':_0x57ae7d,'resolvedAt':_0x131d75,'resolvedBy':_0x2dd1dd?this['context']['plugins']['get'](it)['getUser'](_0x2dd1dd):null,'isResolvable':_0x47db37,'isSubmitted':_0x33af49||_0xdc6ad});this['_threads']['set'](_0xf2b8c8,_0x1fd0b3);for(const _0x1c2ff1 of _0x4cb569)_0x1fd0b3['_add'](this['_createNewComment']({'threadId':_0xf2b8c8,..._0x1c2ff1}));return _0x3805b7&&_0x1fd0b3['attachTo'](_0x3805b7),_0xdc6ad||!_0x1fd0b3['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x56d701,'threadId':_0xf2b8c8});}['_submitCommentThread']({channelId:_0x1037cb,threadId:_0x45ede9}){if(!this['hasCommentThread'](_0x45ede9))throw new _0x15c172('commentsrepository-missing-comment-thread',this);const _0x5f04aa=this['getCommentThread'](_0x45ede9);if(_0x5f04aa['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x354aa0,comments:_0x534a86,resolvedAt:_0x1a258b,resolvedBy:_0x564fbd,context:_0x4ece6e,attributes:_0x23e0ae}=_0x5f04aa,_0x803f16=this['context']['plugins']['get']('PendingActions'),_0x4997e8=_0x803f16['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1037cb,'threadId':_0x354aa0,'comments':_0x534a86['map'](_0x935bb5=>_0x935bb5['toJSON']()),'resolvedAt':_0x1a258b,'resolvedBy':_0x564fbd?_0x564fbd['id']:_0x564fbd,'context':_0x4ece6e,'attributes':_0x23e0ae})['then'](({comments:_0x2fe341})=>{_0x803f16['remove'](_0x4997e8);for(const _0x52f5df of _0x2fe341)this['_updateComment']({'channelId':_0x1037cb,'threadId':_0x45ede9,'commentId':_0x52f5df['commentId'],'createdAt':_0x52f5df['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1a8e0c=>{throw console['error'](_0x1a8e0c),new _0x15c172('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0xc4a666,target:_0x29bd49}){const _0x3a7c5d=this['getCommentThread'](_0xc4a666);if(!_0x3a7c5d)throw new _0x15c172('commentsrepository-attach-missing-comment-thread',this);const _0x805e77=this['context']['plugins']['get']('PendingActions'),_0x33a543=this['context']['plugins']['get'](O),_0xd4dc91=this['_createCommentThreadView'](_0x3a7c5d),_0x4c4582=new Ct(_0x3a7c5d,_0xd4dc91);let _0x14fd71=null;_0xd4dc91['on']('change:isDirty',(_0x64c99b,_0x4045c2,_0x5907a8)=>{_0x5907a8?_0x14fd71=_0x805e77['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x14fd71&&(_0x805e77['remove'](_0x14fd71),_0x14fd71=null);}),this['_threadToController']['set'](_0x3a7c5d,_0x4c4582),this['_viewToController']['set'](_0xd4dc91,_0x4c4582);const _0x51e6b6=new S(this['context']['locale'],_0xd4dc91);_0x51e6b6['bind']('length')['to'](_0xd4dc91),_0x51e6b6['bind']('isDirty')['to'](_0xd4dc91,'isDirty',_0xd4dc91,'length',(_0x47562d,_0x5ff2eb)=>_0x47562d||!_0x5ff2eb),_0x51e6b6['bind']('isActive')['to'](_0xd4dc91),_0x51e6b6['type']='comment';const _0x7cd0c7=new d({'view':_0x51e6b6,'target':_0x29bd49,'type':'comment','isVisible':!_0x3a7c5d['archivedAt']});return _0xd4dc91['on']('escape',()=>{_0x7cd0c7['fire']('escape');}),this['_bindAnnotationToEditors'](_0xd4dc91,_0x7cd0c7),_0x33a543['add'](_0x7cd0c7),_0x7cd0c7;}['_bindAnnotationToEditors'](_0x16fbf5,_0x47cee3){this['listenTo'](_0x16fbf5,'editorReady',(_0x1b3559,_0x2e6315)=>{const _0xa102f6=_0x2e6315['ui']['view']['body']['bodyCollectionContainer'];_0x47cee3['focusableElements']['add'](_0xa102f6),this['context']instanceof _0x17bd9d&&this['context']['ui']['focusTracker']['add'](_0xa102f6);},{'priority':'highest'}),this['listenTo'](_0x16fbf5,'editorDestroyed',(_0x9308d4,_0x597886)=>{const _0x3c90a6=_0x597886['ui']['view']['body']['bodyCollectionContainer'];_0x47cee3['focusableElements']['has'](_0x3c90a6)&&_0x47cee3['focusableElements']['remove'](_0x3c90a6),this['context']instanceof _0x17bd9d&&this['context']['ui']['focusTracker']['remove'](_0x3c90a6);});}['_unbindEditors'](_0x5eb702){this['stopListening'](_0x5eb702,'editorReady'),this['stopListening'](_0x5eb702,'editorDestroyed');}['_createCommentThreadView'](_0x45f60a){const _0x26b615=this['context']['plugins']['get'](it),{config:_0x439630,locale:_0x597479}=this['context'],_0x19b1cb=lt(_0x439630['get']('locale'),_0x597479);return new(0x0,(_0x439630['get']('comments'))['CommentThreadView'])(_0x597479,_0x45f60a,_0x26b615['me'],{'editorConfig':{..._0x439630['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x439630['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x439630['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x439630['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x439630['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x19b1cb,'CommentView':_0x439630['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1d2c3d,channelId:_0x2d52d0,resolvedAt:_0x29a7d9,resolvedBy:_0x4bd03a,isFromAdapter:_0x101ef5}){if(!this['hasCommentThread'](_0x1d2c3d))throw new _0x15c172('commentsrepository-missing-comment-thread',null,{'threadId':_0x1d2c3d});const _0x164dce=this['getCommentThread'](_0x1d2c3d);if(_0x164dce['isResolved'])throw new _0x15c172('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1d2c3d});const _0x4a7e88=this['context']['plugins']['get'](it);if(_0x164dce['resolvedBy']=_0x4a7e88['getUser'](_0x4bd03a),_0x164dce['resolvedAt']=_0x29a7d9,_0x101ef5||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0xe61ece=this['context']['plugins']['get']('PendingActions'),_0x39ca27=_0xe61ece['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2d52d0,'threadId':_0x1d2c3d})['then'](({resolvedAt:_0x5d4df6,resolvedBy:_0x506bfb})=>{_0xe61ece['remove'](_0x39ca27),_0x164dce['resolvedBy']['id']!==_0x506bfb&&(_0x164dce['resolvedBy']=_0x4a7e88['getUser'](_0x506bfb)),_0x164dce['resolvedAt']=_0x5d4df6;})['catch'](_0x5494ff=>{throw console['error'](_0x5494ff),new _0x15c172('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x17f91d,channelId:_0x1e6535,isFromAdapter:_0xd57634}){if(!this['hasCommentThread'](_0x17f91d))throw new _0x15c172('commentsrepository-missing-comment-thread',null,{'threadId':_0x17f91d});const _0x29cac1=this['getCommentThread'](_0x17f91d);if(!_0x29cac1['isResolved'])throw new _0x15c172('commentsrepository-reopen-comment-thread',null,{'threadId':_0x17f91d});if(_0x29cac1['resolvedBy']=null,_0x29cac1['resolvedAt']=null,_0xd57634||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x121519=this['context']['plugins']['get']('PendingActions'),_0x347183=_0x121519['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1e6535,'threadId':_0x17f91d})['then'](()=>_0x121519['remove'](_0x347183))['catch'](_0x2299e7=>{throw console['error'](_0x2299e7),new _0x15c172('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2be539,isFromAdapter:_0x823ed5}){const _0x137ddb=this['getCommentThread'](_0x2be539);if(!_0x137ddb)throw new _0x15c172('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2be539),this['_threads']['delete'](_0x2be539),!_0x137ddb['isSubmitted']||_0x823ed5||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5ea47a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1fbaec}=_0x137ddb,_0x352cfc=_0x5ea47a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1fbaec,'threadId':_0x2be539})['then'](()=>_0x5ea47a['remove'](_0x352cfc))['catch'](_0x40ab74=>{throw console['error'](_0x40ab74),new _0x15c172('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x7ba645,unlinkedAt:_0x4e250d,context:_0x5c8fac,attributes:_0xdc26b5,isFromAdapter:_0x240fd7}){if('string'!=typeof _0x7ba645)throw new _0x15c172('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x7ba645});if(!this['hasCommentThread'](_0x7ba645))throw new _0x15c172('commentsrepository-missing-comment-thread',null,{'threadId':_0x7ba645});const _0x12e023=this['getCommentThread'](_0x7ba645);let _0x290545=!0x1;if(void 0x0!==_0x5c8fac&&_0x12e023['context']!==_0x5c8fac&&(_0x12e023['context']=_0x5c8fac,_0x290545=!0x0),void 0x0!==_0x4e250d&&_0x12e023['unlinkedAt']!==_0x4e250d&&(_0x12e023['unlinkedAt']=_0x4e250d,_0x290545=!0x0),_0xdc26b5&&!wt(_0xdc26b5,_0x12e023['attributes'])&&(_0x12e023['attributes']=_0xdc26b5,_0x290545=!0x0),!_0x290545)return Promise['resolve']();if(!_0x12e023['isSubmitted']||_0x240fd7||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2fe263=this['context']['plugins']['get']('PendingActions'),{channelId:_0x37ddbe}=_0x12e023,_0x384b8e=_0x2fe263['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x37ddbe,'threadId':_0x7ba645,'context':_0x5c8fac,'unlinkedAt':_0x4e250d,'attributes':_0xdc26b5})['then'](()=>_0x2fe263['remove'](_0x384b8e))['catch'](_0x3ccb5d=>{throw console['error'](_0x3ccb5d),new _0x15c172('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x556a44){const _0x36e869=this['context']['plugins']['get'](O),_0x33a880=this['getCommentThread'](_0x556a44);if(_0x33a880['_isAttached']=!0x1,this['_threadToController']['has'](_0x33a880)){const _0x51dd4f=this['_threadToController']['get'](_0x33a880),_0x49f7eb=_0x51dd4f['view'],_0x29e6e5=_0x36e869['getByInnerView'](_0x49f7eb);this['_threadToController']['delete'](_0x33a880),this['_viewToController']['delete'](_0x49f7eb),_0x29e6e5&&_0x36e869['remove'](_0x29e6e5),_0x51dd4f['destroy'](),_0x49f7eb['destroy']()['then'](()=>{this['_unbindEditors'](_0x49f7eb);});}}['_updateActiveAnnotation']({threadId:_0x10af0d,resolvedAt:_0xa0b232,unlinkedAt:_0x881cf5}){const _0x5c7a29=!!_0xa0b232,_0xf51afd=this['context']['plugins']['get'](O),_0x2dc6b9=this['getCommentThread'](_0x10af0d);if(this['_threadToController']['has'](_0x2dc6b9)){const _0x4f00c1=this['_threadToController']['get'](_0x2dc6b9)['view'],_0xcf2934=_0xf51afd['getByInnerView'](_0x4f00c1);_0xcf2934&&(_0x5c7a29&&_0xf51afd['_removeActiveAnnotation'](_0xcf2934),_0x881cf5?_0xcf2934['isVisible']=!0x1:_0xcf2934['refreshVisibility']());}}['_getExternalAuthor'](_0x50f13d){const _0x22a1d7=this['context']['plugins']['get'](it),_0x5e58ce=pt('external:'+_0x50f13d),_0x3beb27=_0x22a1d7['getUser'](_0x5e58ce);return _0x3beb27||_0x22a1d7['addUser']({'id':_0x5e58ce,'name':_0x50f13d});}['_createNewComment']({threadId:_0x4a32ef,commentId:_0xb26d4a=_0x35b95b(),content:_0x3bbf65,authorId:_0x155014,createdAt:_0x23d1f5,attributes:_0xc1cf1f}){if('string'!=typeof _0xb26d4a)throw new _0x15c172('commentsrepository-invalid-commentid');if('string'!=typeof _0x155014)throw new _0x15c172('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3bbf65||!_0x3bbf65['trim']())throw new _0x15c172('commentsrepository-invalid-comment-content');const _0x110af1=this['context']['plugins']['get'](it)['getUser'](_0x155014);if(!_0x110af1)throw new _0x15c172('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x155014});let _0x3c94fb=null,_0x3236d7=_0x23d1f5;return _0xc1cf1f?.['@external']&&(_0x3c94fb=this['_getExternalAuthor'](_0xc1cf1f['@external']['authorName']),_0x3236d7=new Date(_0xc1cf1f['@external']['createdAt'])),new fi(this,{'threadId':_0x4a32ef,'id':_0xb26d4a,'author':_0x3c94fb||_0x110af1,'creator':_0x110af1,'content':_0x3bbf65,'createdAt':_0x23d1f5,'authoredAt':_0x3236d7,'attributes':_0xc1cf1f});}['_addComment'](_0x9a76c9){let {threadId:_0x202550,content:_0x289496,attributes:_0xb2c8e5,isFromAdapter:_0x495492}=_0x9a76c9;const _0x168331=this['getCommentThread'](_0x9a76c9['threadId']);if(!_0x168331)throw new _0x15c172('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1d3df3=this['_createNewComment'](_0x9a76c9),{id:_0x5b5da8}=_0x1d3df3;if(_0x168331['_add'](_0x1d3df3),_0x495492||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x168331['isSubmitted'])return Promise['resolve']();const _0x59613c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5b5701}=_0x168331,_0x16ad8f=_0x59613c['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xb2c8e5||(_0xb2c8e5={}),this['adapter']['addComment']({'channelId':_0x5b5701,'threadId':_0x202550,'commentId':_0x5b5da8,'content':_0x289496,'attributes':_0xb2c8e5})['then'](_0x1baa03=>{_0x59613c['remove'](_0x16ad8f),_0x1baa03&&this['_updateComment']({'channelId':_0x5b5701,'threadId':_0x202550,'commentId':_0x5b5da8,'createdAt':_0x1baa03['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x24e696=>{throw console['error'](_0x24e696),new _0x15c172('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3af0b9,commentId:_0x1360a0,content:_0x10eafd,createdAt:_0x52f4ad,attributes:_0x2a245b,isFromAdapter:_0x5a47d5}){if(void 0x0!==_0x10eafd&&('string'!=typeof _0x10eafd||!_0x10eafd['trim']()['length']))throw new _0x15c172('commentsrepository-update-comment-invalid-content');const _0x5ae307=this['getCommentThread'](_0x3af0b9),_0x5c281c=_0x5ae307['getComment'](_0x1360a0);if(!_0x5c281c)throw new _0x15c172('commentsrepository-update-missing-comment',this);let _0x6ee5f9=!0x1;if(_0x10eafd&&_0x10eafd!==_0x5c281c['content']&&(_0x5c281c['isEditable']||_0x5a47d5)&&(_0x5c281c['content']=_0x10eafd,_0x6ee5f9=!0x0),_0x52f4ad&&_0x52f4ad!==_0x5c281c['createdAt']&&(_0x5c281c['createdAt']=_0x52f4ad,_0x5c281c['attributes']&&_0x5c281c['attributes']['@external']||(_0x5c281c['authoredAt']=_0x52f4ad),_0x6ee5f9=!0x0),_0x2a245b&&!wt(_0x2a245b,_0x5c281c['attributes'])&&(_0x5c281c['attributes']=_0x2a245b,_0x6ee5f9=!0x0),!_0x6ee5f9)return Promise['resolve']();if(_0x5ae307['fire']('commentUpdated'),_0x5a47d5||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x197224=this['context']['plugins']['get']('PendingActions'),{channelId:_0x311413}=this['getCommentThread'](_0x5c281c['threadId']),_0x33b18e=_0x197224['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x311413,'threadId':_0x3af0b9,'commentId':_0x1360a0,'content':_0x10eafd,'attributes':_0x2a245b})['then'](()=>_0x197224['remove'](_0x33b18e))['catch'](_0xb06cb1=>{throw console['error'](_0xb06cb1),new _0x15c172('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x202567,commentId:_0x816850,isFromAdapter:_0x1ddbdb}){const _0x149a18=this['getCommentThread'](_0x202567),_0x315b51=_0x149a18['getComment'](_0x816850);if(!_0x315b51)throw new _0x15c172('commentsrepository-remove-missing-comment',this);if(_0x149a18['_remove'](_0x315b51),_0x1ddbdb||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x38b42a=this['context']['plugins']['get']('PendingActions'),{channelId:_0xc56ee0}=_0x149a18,_0x31222d=_0x38b42a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xc56ee0,'threadId':_0x202567,'commentId':_0x816850})['then'](()=>_0x38b42a['remove'](_0x31222d))['catch'](_0x31421c=>{throw console['error'](_0x31421c),new _0x15c172('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3b9dd7(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5050a2,_0x2761a0){super();const _0x2e7cca=_0x2761a0['isResolvable'];this['channelId']=_0x2761a0['channelId'],this['id']=_0x2761a0['id'],this['comments']=new _0x2a536e(),this['_repository']=_0x5050a2,this['_isAttached']=!0x1,this['_isSubmitted']=_0x2761a0['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5050a2,'_permissions',_0x5050a2,'_readOnlyChannels',()=>_0x5050a2['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5050a2,'_permissions',()=>_0x5050a2['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5050a2,'_permissions',()=>{const _0x5c7f3a=_0x5050a2['getPermissions'](this['channelId']);return _0x5c7f3a['write']||_0x5c7f3a['admin'];}),this['bind']('isResolvable')['to'](_0x5050a2,'_permissions',()=>_0x2e7cca&&_0x5050a2['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x2761a0['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4c89a0,_0x462ae5)=>_0x4c89a0?_0x462ae5?_0x4c89a0<_0x462ae5?_0x4c89a0:_0x462ae5:_0x4c89a0:_0x462ae5),this['set']('unlinkedAt',_0x2761a0['unlinkedAt']||null),this['set']('resolvedAt',_0x2761a0['resolvedAt']||null),this['set']('resolvedBy',_0x2761a0['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x201c56=>!!_0x201c56),this['set']('attributes',_0x2761a0['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2acd23,_0x53f651)=>_0x2acd23+_0x53f651['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x4db681,id:_0x43e808}=this;this['_repository']['fire'](bt('submitCommentThread',_0x4db681),{'channelId':_0x4db681,'threadId':_0x43e808});}['setUnlinkedAt'](_0x415e68){this['_update']({'unlinkedAt':_0x415e68});}['resolve']({resolvedAt:_0x37e6ca=new Date(),resolvedBy:_0x39f371=null,isFromAdapter:_0x164a24=!0x1}={}){const _0x375c1f=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x3eccb3,id:_0x5c8818}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x3eccb3),{'channelId':_0x3eccb3,'threadId':_0x5c8818,'resolvedAt':_0x37e6ca,'resolvedBy':_0x39f371||_0x375c1f['id'],'isFromAdapter':_0x164a24});}['reopen']({isFromAdapter:_0x30f0bb=!0x1}={}){const {channelId:_0xf96b6d,id:_0x248db9}=this;this['_repository']['fire'](bt('reopenCommentThread',_0xf96b6d),{'channelId':_0xf96b6d,'threadId':_0x248db9,'isFromAdapter':_0x30f0bb});}['setContext'](_0x1b4680){this['context']||this['_update']({'context':_0x1b4680});}['setAttribute'](_0x4fffa1,_0x443336){const _0x2ef0a4=It(this['attributes']);At(_0x2ef0a4,_0x4fffa1,_0x443336),this['_update']({'attributes':_0x2ef0a4});}['removeAttribute'](_0x46ba77){const _0xb9b255=It(this['attributes']);yt(_0xb9b255,_0x46ba77),this['_update']({'attributes':_0xb9b255});}['remove']({isFromAdapter:_0x2e1869=!0x1}={}){const {channelId:_0x360e89,id:_0x4ad577}=this;this['_repository']['fire'](bt('removeCommentThread',_0x360e89),{'channelId':_0x360e89,'threadId':_0x4ad577,'isFromAdapter':_0x2e1869});}['attachTo'](_0x3043b2){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x3043b2});}['addComment'](_0x87fc5a){const {channelId:_0x417b2e,id:_0x10a046}=this;this['_repository']['fire'](bt('addComment',_0x417b2e,_0x10a046),Object['assign']({'channelId':_0x417b2e,'threadId':_0x10a046},_0x87fc5a));}['getComment'](_0x803a3b){if('string'!=typeof _0x803a3b)throw new _0x15c172('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x803a3b});return this['comments']['get'](_0x803a3b);}['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'](_0x60c223=>_0x60c223['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4670f3){return this['listenTo'](_0x4670f3,'change:authoredAt',()=>{const _0x309874=this['_findOptimalIndex'](_0x4670f3),_0x5ead38=this['comments'];_0x309874-0x1!=_0x5ead38['getIndex'](_0x4670f3)&&_0x309874+0x1!=_0x5ead38['getIndex'](_0x4670f3)&&(this['_remove'](_0x4670f3),this['_add'](_0x4670f3));}),this['comments']['add'](_0x4670f3,this['_findOptimalIndex'](_0x4670f3));}['_update'](_0x402b26){const {channelId:_0x25aced,id:_0x3582af}=this;this['_repository']['fire'](bt('updateCommentThread',_0x25aced),{..._0x402b26,'channelId':_0x25aced,'threadId':_0x3582af});}['_remove'](_0x38cec0){return this['stopListening'](_0x38cec0),_0x38cec0['destroy'](),this['comments']['remove'](_0x38cec0);}['_findOptimalIndex'](_0xd77e8d){const _0x1dd8ef=this['comments']['find'](_0x4dd391=>new Date(_0x4dd391['authoredAt'])['getTime']()>new Date(_0xd77e8d['authoredAt'])['getTime']());return _0x1dd8ef?this['comments']['getIndex'](_0x1dd8ef):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3b9dd7(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x23bbf6,_0x1ff399){super();const _0x1687e7=_0x23bbf6['context']['plugins']['get'](it)['me'],_0x3a08a7=_0x23bbf6['getCommentThread'](_0x1ff399['threadId']),_0x1affa7=0x0===_0x3a08a7['comments']['length'],_0x2f11b4=_0x1687e7===_0x1ff399['author'];this['id']=_0x1ff399['id'],this['threadId']=_0x1ff399['threadId'],this['author']=_0x1ff399['author'],this['creator']=_0x1ff399['creator'],this['isExternal']=Boolean(_0x1ff399['attributes']&&_0x1ff399['attributes']['@external']),this['set']('content',_0x1ff399['content']),this['createdAt']=_0x1ff399['createdAt']||new Date(),this['set']('authoredAt',_0x1ff399['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3a08a7,'resolvedAt'),this['set']('attributes',_0x1ff399['attributes']||{}),this['bind']('isEditable')['to'](_0x23bbf6,'_permissions',()=>{const _0x3994c5=_0x23bbf6['getPermissions'](_0x3a08a7['channelId'])['write'],_0x5823c6=_0x23bbf6['getPermissions'](_0x3a08a7['channelId'])['modifyAll'];return _0x2f11b4&&_0x3994c5||!_0x2f11b4&&_0x5823c6;}),this['bind']('isRemovable')['to'](_0x3a08a7,'isRemovable',_0x23bbf6,'_permissions',_0xc5475c=>{const _0x59a21f=_0x23bbf6['getPermissions'](_0x3a08a7['channelId'])['write'],_0x2031d8=_0x23bbf6['getPermissions'](_0x3a08a7['channelId'])['modifyAll'];return _0x2f11b4&&_0x59a21f||_0xc5475c&&_0x1affa7||!_0x2f11b4&&_0x2031d8&&!_0x1affa7;}),this['bind']('isReadOnly')['to'](_0x3a08a7,'isReadOnly'),this['_repository']=_0x23bbf6;}get['weight'](){return Math['max'](function(_0x56fa7f){const _0x1a1b49=document['createElement']('div');return _0x1a1b49['innerHTML']=_0x56fa7f,_0x1a1b49['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2d0598){const {threadId:_0x17cca1,id:_0x12429b}=this;if(!this['_repository']['hasCommentThread'](_0x17cca1))throw new _0x15c172('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3e9a0b}=this['_repository']['getCommentThread'](_0x17cca1);this['_repository']['fire'](bt('updateComment',_0x3e9a0b,_0x17cca1),{'channelId':_0x3e9a0b,'threadId':_0x17cca1,'commentId':_0x12429b,..._0x2d0598});}['setAttribute'](_0x1cfd7a,_0x5998be){const _0x16b6ce=It(this['attributes']);At(_0x16b6ce,_0x1cfd7a,_0x5998be),this['update']({'attributes':_0x16b6ce});}['removeAttribute'](_0x34bce1){const _0x524a27=It(this['attributes']);yt(_0x524a27,_0x34bce1),this['update']({'attributes':_0x524a27});}['remove'](_0x4225ce={}){if(!_0x4225ce['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1c514f,id:_0x33f5c6}=this;if(!this['_repository']['hasCommentThread'](_0x1c514f))throw new _0x15c172('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x58e247}=this['_repository']['getCommentThread'](_0x1c514f);this['_repository']['fire'](bt('removeComment',_0x58e247,_0x1c514f),{'channelId':_0x58e247,'threadId':_0x1c514f,'commentId':_0x33f5c6,..._0x4225ce});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x4443ac,..._0x5ba61f){for(const _0x2e62d9 of _0x5ba61f)void 0x0!==_0x2e62d9&&(_0x4443ac+=':'+String(_0x2e62d9));return _0x4443ac;}class J extends _0x3ea4db{['refresh'](){const _0x4bd75f=this['editor']['model']['document']['selection'];for(const _0x2c702b of _0x4bd75f['getRanges']())if(this['_hasContent'](_0x2c702b))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x3977f4=_0x35b95b()}={}){const _0x2421e3=this['editor']['model'],_0x344b58=[];for(const _0xb8ded4 of _0x2421e3['document']['selection']['getRanges']())this['_hasContent'](_0xb8ded4)&&_0x344b58['push'](this['_trimToContent'](_0xb8ded4));_0x2421e3['change'](_0x2f6ed8=>{for(const _0x644c7 of _0x344b58){const _0x4552a1=_0x35b95b()['substr'](0x1,0x5),_0x2d74fd='comment:'+_0x3977f4+':'+_0x4552a1;_0x2f6ed8['addMarker'](_0x2d74fd,{'range':_0x644c7,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x11efd5){for(const _0x20d0f1 of _0x11efd5['getItems']())if(this['_itemIsContent'](_0x20d0f1))return!0x0;return!0x1;}['_itemIsContent'](_0xd48ce1){return _0xd48ce1['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xd48ce1)&&!_0xd48ce1['is']('element','tableCell');}['_trimToContent'](_0x55a4a0){const _0x3a2ef6=_0x42ad7f=>!this['_itemIsContent'](_0x42ad7f['item']),_0x5835aa=_0x55a4a0['start']['getLastMatchingPosition'](_0x3a2ef6),_0x5e5d4b=_0x55a4a0['end']['getLastMatchingPosition'](_0x3a2ef6,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5835aa,_0x5e5d4b);}}class P extends _0x3136d3{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d235f){super(_0x5d235f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x35f21d=this['editor'],_0x2ab2ac=_0x35f21d['model']['document']['selection'],_0x6d80ec=_0x356c72(()=>this['refreshSelectedViews'](),0xa);_0x2ab2ac['on']('change:range',(_0x42e7b9,_0x3f7b27)=>{_0x3f7b27['directChange']&&(_0x6d80ec['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x35f21d['editing']['view']['document'],'change:isFocused',(_0x1ca7fb,_0x52f39b,_0x27611f)=>{_0x27611f&&_0x6d80ec();}),this['listenTo'](_0x35f21d['ui']['focusTracker'],'change:isFocused',(_0x265b0b,_0x2b0cfd,_0xd5454a)=>{_0xd5454a||_0x35f21d['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x3d754e=>this['_editorAnnotationsData']['has'](_0x3d754e['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x137c24){if(this['_editorAnnotations']['has'](_0x137c24['view']))return;this['_editorAnnotations']['add'](_0x137c24['view']),this['editor']['ui']['focusTracker']['add'](_0x137c24['view']['element']);const _0x641c97=this['editor']['plugins']['get'](O);this['listenTo'](_0x641c97['collection'],'remove',(_0x5a6f12,_0x25e9a)=>{this['editor']['ui']['focusTracker']['remove'](_0x25e9a['view']['element']),this['_editorAnnotations']['delete'](_0x25e9a['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x24b2dd){if('function'!=typeof _0x24b2dd)throw new _0x15c172('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x24b2dd);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x597214,annotations:_0x4a50d}){const _0x14f629=[],_0x233332=this['editor']['model']['document']['selection'],_0x43db40=Array['from'](_0x233332['getRanges']());for(const [_0xc21acf,_0x3bcbdc]of this['_editorAnnotationsData']){const _0x3c2908=_0x4cbdbf(_0x3bcbdc),_0x5efbae=_0x4a50d['getByInnerView'](_0xc21acf);_0x3c2908&&_0x5efbae&&_0x14f629['push']({'annotation':_0x5efbae,'range':_0x3c2908});}function _0x4cbdbf(_0x13093b){for(const _0x47ccd9 of _0x13093b)for(const _0x25f519 of _0x43db40)if(_0x47ccd9['containsRange'](_0x25f519,!_0x233332['isCollapsed']))return _0x47ccd9;return null;}return _0x14f629['sort']((_0x473272,_0x3e2b55)=>{const _0x2c274c=_0x473272['range'],_0x45c196=_0x3e2b55['range'];if(!_0x2c274c['isEqual'](_0x45c196)){if(_0x2c274c['containsRange'](_0x45c196,!0x0))return 0x1;if(_0x45c196['containsRange'](_0x2c274c,!0x0))return-0x1;}return _0x473272['annotation']==_0x597214?-0x1:_0x3e2b55['annotation']==_0x597214?0x1:0x0;})['map'](_0x4fa7e4=>_0x4fa7e4['annotation']);}get['_editorAnnotationsData'](){const _0x1f1e7d=new Map();for(const _0x285461 of Array['from'](this['_dataCollectors']))for(const [_0x3b95c9,_0x1c9878]of _0x285461())_0x1f1e7d['set'](_0x3b95c9,_0x1c9878);return _0x1f1e7d;}}class st extends _0x3136d3{['afterInit'](){const _0xe918a2=this['editor'];if(!_0xe918a2['plugins']['has']('RestrictedEditingModeEditing'))return;_0xe918a2['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3136d3{constructor(_0x42db4c){super(_0x42db4c),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x832c91=this['editor'],_0x1d1fed=_0x832c91['commands']['get']('importWord'),_0x2c4e4b=_0x832c91['plugins']['get'](it);_0x1d1fed&&(_0x1d1fed['on']('execute',(_0x461eb9,[,_0xb39b3a])=>{_0xb39b3a['collaboration_features']={'comments':!0x0,'user_id':_0x2c4e4b['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1d1fed,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x348bfe,_0x20857a){const {comment_threads:_0x2fdf2a}=_0x20857a;_0x2fdf2a&&_0x2fdf2a['forEach'](({thread_id:_0x469228,comments:_0x2a3942,is_resolved:_0x2fd2fb})=>{const _0x394cb3=new Date(),_0x127c06=_0x2a3942['map'](({author:_0x1f5092,content:_0x134402,created_at:_0x1db8e5})=>({'content':_0x134402,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x394cb3,'attributes':{'@external':{'authorName':_0x1f5092,'createdAt':_0x1db8e5?new Date(_0x1db8e5):new Date(),'source':'importWord'}}})),_0x2653ac=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x2653ac,'threadId':_0x469228,'comments':_0x127c06,'resolvedAt':_0x2fd2fb?_0x394cb3:null});});}}class at extends _0x3136d3{constructor(_0x18a57d){super(_0x18a57d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2060fc=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2060fc,'contentInsertion',(_0x3016b0,_0x464326)=>this['_removeMarkersWithoutThreads'](_0x464326['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xcc1686){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xcc1686;const _0x20195c=this['editor']['plugins']['get']('CommentsRepository');for(const _0x131bff of _0xcc1686['keys']()){const [_0x314f2e,_0x3f8ffd]=_0x131bff['split'](':');'comment'!=_0x314f2e||_0x20195c['hasCommentThread'](_0x3f8ffd)||_0xcc1686['delete'](_0x131bff);}return _0xcc1686;}['_registerMarkerInClipboardPipeline'](){const _0x4a67ce=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2fc2d3=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2fc2d3&&_0x4a67ce['_registerMarkerToCopy']('comment',_0x2fc2d3);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x51aaa8){switch(_0x51aaa8){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 _0x3136d3{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x29996e,_0x254854)=>{if(!_0x254854['options']['showCommentHighlights'])return null;if(_0x254854['options']['ignoreResolvedComments']){const {id:_0x280ade}=er(_0x29996e['markerName']),_0xed20a9=this['editor']['plugins']['get'](o);if(_0xed20a9['getCommentThread'](_0x280ade)?.['isResolved']&&_0x29996e['item'])return _0x254854['consumable']['consume'](_0x29996e['item'],'addMarker:'+_0x29996e['markerName']),_0x254854['consumable']['consume'](_0x29996e['item'],'removeMarker:'+_0x29996e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x33efb9=>{_0x33efb9['on']('addMarker:comment',(_0xb35110,_0x4a8356,_0x404214)=>{if(!_0x404214['options']['showCommentHighlights'])return;const _0x1be0a9=_0x4a8356['item'];if(!_0x1be0a9)return;const _0x33e104=_0x404214['mapper']['toViewElement'](_0x1be0a9);this['editor']['model']['schema']['isObject'](_0x1be0a9)&&_0x33e104&&!_0x33e104['getCustomProperty']('widget')&&_0x33e104['is']('containerElement')&&_0xe8f520(_0x33e104,_0x404214['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x311e52,{writer:_0x24d68b,options:_0x2c78ea})=>{if(!_0x2c78ea['showCommentHighlights'])return null;const _0x58bb9c=_0x24d68b['createContainerElement']('div'),_0x5a7128=_0x24d68b['createEmptyElement']('hr');return _0x24d68b['addClass']('ck-horizontal-line',_0x58bb9c),_0x24d68b['insert'](_0x24d68b['createPositionAt'](_0x58bb9c,0x0),_0x5a7128),_0x58bb9c;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x36dd7f,{writer:_0x18bd28,options:_0x409592})=>{if(!_0x409592['showCommentHighlights'])return null;const _0x4d7b9d=_0x18bd28['createContainerElement']('span'),_0xd3dd47=_0x18bd28['createEmptyElement']('img');return _0x18bd28['addClass']('image-inline',_0x4d7b9d),_0x18bd28['insert'](_0x18bd28['createPositionAt'](_0x4d7b9d,0x0),_0xd3dd47),_0x4d7b9d;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2a03e3,{writer:_0x40f7f4,options:_0x34a995})=>{if(_0x34a995['showCommentHighlights'])return _0x40f7f4['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x30f2e6,_0x48b495,_0x4c0375)=>{_0x4c0375['options']['showCommentHighlights']&&_0x30f2e6['stop']();},{'priority':'high'});}}class r extends _0x3136d3{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(_0x263b92){super(_0x263b92),this['set']('isThreadsLoadingPaused',!0x0),_0x263b92['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5b05c0,_0x308c9e,_0x2c2764,_0x8c04e1)=>{const _0x2042c2=_0x263b92['plugins']['get'](o),_0x59bd10=_0x2c2764?er(_0x2c2764)['id']:null;_0x263b92['model']['change'](()=>{if(_0x59bd10){const _0x2210be=this['getAllMarkersForId'](_0x59bd10);for(const _0x103589 of _0x2210be)_0x263b92['editing']['reconvertMarker'](_0x103589);}if(_0x8c04e1){const {id:_0x15a9fa}=er(_0x8c04e1),_0x13aebd=_0x2042c2['getCommentThread'](_0x15a9fa);if(_0x13aebd&&_0x13aebd['unlinkedAt'])return;if(_0x13aebd&&!_0x13aebd['isAttached'])return;const _0x41abb1=this['getAllMarkersForId'](_0x15a9fa);for(const _0x53d55c of _0x41abb1)_0x263b92['editing']['reconvertMarker'](_0x53d55c);}}),_0x59bd10&&this['scrollToThreadMarker'](_0x59bd10);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x224e26=this['editor'],_0x19a71e=_0x224e26['plugins']['get'](o),_0x315073=_0x224e26['config']['get']('collaboration.channelId'),_0x359135=_0x19a71e['getCommentThreads']()['filter'](_0x30201b=>_0x30201b['channelId']!==_0x315073);_0x224e26['commands']['add']('addCommentThread',new J(_0x224e26)),this['listenTo'](_0x224e26,'change:isReadOnly',(_0x3a1b64,_0x1223d9,_0x1175d5)=>{_0x19a71e['switchReadOnly'](_0x1175d5,_0x224e26['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x19a71e,ft('addCommentThread',_0x315073),(_0xafb203,{threadId:_0x4b2f65})=>{const _0x23342d=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4b2f65);_0x23342d?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4b2f65);}),this['listenTo'](_0x19a71e,ft('removeCommentThread',_0x315073),(_0x24edbb,{threadId:_0x3f202d})=>{_0x224e26['model']['enqueueChange']({'isUndoable':!0x1},_0xb4fab7=>{const _0x496692=this['getAllMarkersForId'](_0x3f202d);for(const _0x5e3956 of _0x496692)_0xb4fab7['removeMarker'](_0x5e3956);});}),this['listenTo'](_0x19a71e,ft('resolveCommentThread',_0x315073),(_0x4c0e99,{threadId:_0x51430f})=>{(this['_reconvertMarkers'](_0x51430f),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x51430f)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x19a71e,ft('reopenCommentThread',_0x315073),(_0x1e7f34,{threadId:_0xa7738f})=>{this['_reconvertMarkers'](_0xa7738f);},{'priority':'low'}),this['listenTo'](_0x19a71e,ft('addComment',_0x315073),(_0x1a45b7,{threadId:_0xd4c69e,isFromAdapter:_0x50e0a4})=>{const _0x17836a=this['getAllMarkersForId'](_0xd4c69e);if(_0x50e0a4||0x0==_0x17836a['length']||!_0x19a71e['hasCommentThread'](_0xd4c69e))return;0x1===_0x19a71e['getCommentThread'](_0xd4c69e)['length']&&_0x224e26['model']['enqueueChange']({'isUndoable':!0x1},_0x24839e=>{for(const _0x2b7bb6 of _0x17836a)_0x24839e['updateMarker'](_0x2b7bb6,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x359135);}['afterInit'](){!async function(_0x18b26d){const _0x317dd5=_0x3434bd([0x72,0x67,0x78,0x63,0x79,0x6f,0x58,0x37,0x61,0x62,0x73,0x70,0x6c,0x53,0x52,0x45,0x6b,0x49,0x42,0x4b,0x32,0x69,0x76,0x4c,0x7a,0x44,0x59,0x65,0x75,0x66,0x77,0x71,0x46,0x35,0x34,0x5a,0x6e,0x51,0x4a,0x57,0x64,0x39,0x4f,0x4d,0x41,0x43,0x4e,0x38,0x30,0x48,0x47,0x6d,0x54,0x74,0x55,0x33,0x36,0x6a,0x50,0x56,0x31,0x68]),_0x121f2e=0x32ae8dd0,_0x504605=0x32a9e4e8^_0x121f2e,_0x367b1b=window[_0x3434bd([0x44,0x61,0x74,0x65])][_0x3434bd([0x6e,0x6f,0x77])](),_0x59082e=_0x18b26d[_0x3434bd([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3628d2=new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f8795=>{_0x59082e[_0x3434bd([0x6f,0x6e,0x63,0x65])](_0x3434bd([0x72,0x65,0x61,0x64,0x79]),_0x2f8795);}),_0x3e13b9={[_0x3434bd([0x6b,0x74,0x79])]:_0x3434bd([0x45,0x43]),[_0x3434bd([0x75,0x73,0x65])]:_0x3434bd([0x73,0x69,0x67]),[_0x3434bd([0x63,0x72,0x76])]:_0x3434bd([0x50,0x2d,0x32,0x35,0x36]),[_0x3434bd([0x78])]:_0x3434bd([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]),[_0x3434bd([0x79])]:_0x3434bd([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]),[_0x3434bd([0x61,0x6c,0x67])]:_0x3434bd([0x45,0x53,0x32,0x35,0x36])},_0x508cd7=_0x59082e[_0x3434bd([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3434bd([0x67,0x65,0x74])](_0x3434bd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2f6bb6(){let _0x213475,_0x45959f=null,_0xa1e8a8=null;try{if(_0x508cd7==_0x3434bd([0x47,0x50,0x4c]))return _0x3434bd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x213475=_0x128f21(),!_0x213475)return _0x3434bd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x213475[_0x3434bd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xa1e8a8=_0x3695a1(_0x213475[_0x3434bd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x213475[_0x3434bd([0x6a,0x74,0x69])])),await _0x412529()?_0x3551fb()?_0xdadfcb()?_0x3434bd([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5ca1c2()?(_0x213475[_0x3434bd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3434bd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x45959f=_0x4c70bb(_0x3434bd([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x213475[_0x3434bd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3434bd([0x74,0x72,0x69,0x61,0x6c])&&(_0x45959f=_0x4c70bb(_0x3434bd([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x20e536()):_0x3434bd([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3434bd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3434bd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3434bd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xdadfcb(){const _0x4a3883=[_0x3434bd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3434bd([0x74,0x72,0x69,0x61,0x6c])][_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213475[_0x3434bd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x367b1b/0x3e8:0xe10*_0x504605;return _0x213475[_0x3434bd([0x65,0x78,0x70])]<_0x4a3883;}function _0x3551fb(){const _0x4a4bb7=_0x213475[_0x3434bd([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4a4bb7)return!0x1;if(_0x4a4bb7[_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3434bd([0x2a])))return!0x0;if(_0x4a4bb7[_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3434bd([0x43,0x4d,0x54])))return!0x0;if(_0x4a4bb7[_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3434bd([0x52,0x43,0x4d,0x54]))){if(_0x462582())return!0x0;if(_0x5920e1()||_0x1630fa())return!0x0;}return!0x1;}function _0x5ca1c2(){const _0x4e35c4=_0x213475[_0x3434bd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4e35c4||0x0==_0x4e35c4[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x11ca0a}=new URL(window[_0x3434bd([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4e35c4[_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11ca0a))return!0x0;const _0x15e152=_0x11ca0a[_0x3434bd([0x73,0x70,0x6c,0x69,0x74])](_0x3434bd([0x2e]));return _0x4e35c4[_0x3434bd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x39667d=>_0x39667d[_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3434bd([0x2a])))[_0x3434bd([0x6d,0x61,0x70])](_0x3248c0=>_0x3248c0[_0x3434bd([0x73,0x70,0x6c,0x69,0x74])](_0x3434bd([0x2e])))[_0x3434bd([0x73,0x6f,0x6d,0x65])](_0x414c8d=>_0x15e152[_0x3434bd([0x65,0x76,0x65,0x72,0x79])]((_0x38ffca,_0xd9038c)=>_0x414c8d[_0xd9038c]===_0x38ffca||_0x414c8d[_0xd9038c]===_0x3434bd([0x2a])));}function _0x20e536(){return _0x45959f&&_0xa1e8a8?new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x352337,_0x3fc9ca)=>{_0x45959f[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x352337,_0x3fc9ca),_0xa1e8a8[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x47acad=>{_0x47acad!=_0x3434bd([0x56,0x61,0x6c,0x69,0x64])&&_0x352337(_0x47acad);},_0x3fc9ca);}):_0x45959f||_0xa1e8a8||_0x3434bd([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3695a1(_0x4a9b98,_0x5d04b7){return new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x177685=>{if(_0x1d0b3c())return _0x177685(_0x3434bd([0x56,0x61,0x6c,0x69,0x64]));_0x41b60f(),_0x59082e[_0x3434bd([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3434bd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2153a1=!0x1;const _0x41cc5a=_0x35b95b();function _0x139632(_0x207590){return!!_0x207590&&(typeof _0x207590===_0x3434bd([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x207590===_0x3434bd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x207590[_0x3434bd([0x74,0x68,0x65,0x6e])]===_0x3434bd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x207590[_0x3434bd([0x63,0x61,0x74,0x63,0x68])]===_0x3434bd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x27add9(_0x2e1b1f){_0x4bf40e(_0x2e1b1f)[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x8fbefa=>{if(!_0x8fbefa||_0x8fbefa[_0x3434bd([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3434bd([0x6f,0x6b]))return _0x3434bd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xd1e0eb(_0x43acca(_0x41cc5a+_0x5d04b7))!=_0x8fbefa[_0x3434bd([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3434bd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3434bd([0x56,0x61,0x6c,0x69,0x64]);})[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x41ec4b=>(_0x5dd00b(),_0x41ec4b),()=>{const _0x331fca=_0x748002();return null==_0x331fca?(_0x5dd00b(),_0x3434bd([0x56,0x61,0x6c,0x69,0x64])):_0x3434bd(_0x367b1b-_0x331fca>(0x16a209d0^_0x121f2e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x177685)[_0x3434bd([0x63,0x61,0x74,0x63,0x68])](()=>{_0x177685(_0x3434bd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x24317a=0x32986350^_0x121f2e;function _0x5dd00b(){const _0x5a8d53=_0x3434bd([0x6c,0x6c,0x63,0x74,0x2d])+_0xd1e0eb(_0x43acca(_0x4a9b98)),_0xab0932=_0x2037eb(_0xd1e0eb(window[_0x3434bd([0x4d,0x61,0x74,0x68])][_0x3434bd([0x63,0x65,0x69,0x6c])](_0x367b1b/_0x24317a)));window[_0x3434bd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3434bd([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5a8d53,_0xab0932);}function _0x748002(){const _0xa97be6=_0x3434bd([0x6c,0x6c,0x63,0x74,0x2d])+_0xd1e0eb(_0x43acca(_0x4a9b98)),_0x408cab=window[_0x3434bd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3434bd([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xa97be6);return _0x408cab?window[_0x3434bd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2037eb(_0x408cab),0x10)*_0x24317a:null;}function _0x4bf40e(_0x1e45cd){return new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x179564,_0x49d45b)=>{_0x1e45cd[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x179564,_0x49d45b),window[_0x3434bd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x49d45b,0x32af5910^_0x121f2e);});}}_0x59082e[_0x3434bd([0x6f,0x6e])](_0x3434bd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x46e75a,_0x4fef67)=>{if(_0x4fef67[0x0]!=_0x4a9b98)return _0x177685(_0x3434bd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4fef67[0x1]={..._0x4fef67[0x1],[_0x3434bd([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x41cc5a};},{[_0x3434bd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3434bd([0x68,0x69,0x67,0x68])}),_0x59082e[_0x3434bd([0x6f,0x6e])](_0x3434bd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2554a2=>{_0x139632(_0x2554a2[_0x3434bd([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2153a1=!0x0,_0x27add9(_0x2554a2[_0x3434bd([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3434bd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3434bd([0x6c,0x6f,0x77])}),_0x3628d2[_0x3434bd([0x74,0x68,0x65,0x6e])](()=>{_0x2153a1||_0x177685(_0x3434bd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1d0b3c(){return _0x59082e[_0x3434bd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3434bd([0x76,0x69,0x65,0x77])][_0x3434bd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3434bd([0x61,0x75,0x74,0x6f]);}function _0x41b60f(){_0x59082e[_0x3434bd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3434bd([0x76,0x69,0x65,0x77])][_0x3434bd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3434bd([0x61,0x75,0x74,0x6f]);}}function _0x4c70bb(_0x268af2){const _0x1521d7=[new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3156ae=>setTimeout(_0x3156ae,0x32a7b31c^_0x121f2e)),_0x3628d2[_0x3434bd([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20f51a=>{let _0x458e84=0x0;_0x59082e[_0x3434bd([0x6d,0x6f,0x64,0x65,0x6c])][_0x3434bd([0x6f,0x6e])](_0x3434bd([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x36c670,_0x962781)=>{_0x962781[0x0][_0x3434bd([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x458e84++,_0x458e84==(0x32ae8c28^_0x121f2e)&&(_0x20f51a(),_0x36c670[_0x3434bd([0x6f,0x66,0x66])]());});}))];return window[_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3434bd([0x72,0x61,0x63,0x65])](_0x1521d7)[_0x3434bd([0x74,0x68,0x65,0x6e])](()=>_0x268af2);}async function _0x1e5620(){await _0x3628d2,_0x59082e[_0x3434bd([0x6d,0x6f,0x64,0x65,0x6c])][_0x3434bd([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x26e947,_0x59082e[_0x3434bd([0x6d,0x6f,0x64,0x65,0x6c])][_0x3434bd([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x26e947,_0x59082e[_0x3434bd([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3434bd([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x462582(){return _0x4198d1(_0x3434bd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3fd727(_0x3434bd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3434bd([0x73,0x74,0x61,0x74,0x65])]==_0x3434bd([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5920e1(){return _0x4198d1(_0x3434bd([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 _0x1630fa(){return _0x4198d1(_0x3434bd([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xbd0f1c(_0x2a7d15){const _0x366184=_0x1448cc();_0x59082e[_0x366184]=_0x3434bd([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2a7d15,_0x2a7d15!=_0x3434bd([0x56,0x61,0x6c,0x69,0x64])&&_0x1e5620();}function _0x1448cc(){const _0x4563d2=window[_0x3434bd([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3434bd([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3434bd([0x6e,0x6f,0x77])]())[_0x3434bd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3434bd([0x2e]),'');let _0x4c4c19=_0x3434bd([0x72]);for(let _0x164b1e=0x0;_0x164b1e<_0x4563d2[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x164b1e+=0x2){let _0x33fb20=window[_0x3434bd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4563d2[_0x3434bd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x164b1e,_0x164b1e+0x2));_0x33fb20>=_0x317dd5[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x33fb20-=_0x317dd5[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4c4c19+=_0x317dd5[_0x33fb20];}return _0x4c4c19;}function _0x128f21(){const _0x53f161=_0x508cd7[_0x3434bd([0x73,0x70,0x6c,0x69,0x74])](_0x3434bd([0x2e]));if(0x3!=_0x53f161[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x599f9d(_0x53f161[0x1]);function _0x599f9d(_0x1e0e2a){const _0x5e9a74=_0x35fe04(_0x1e0e2a);return _0x5e9a74&&_0x479115()?_0x5e9a74:null;function _0x479115(){const _0x1319e5=_0x5e9a74[_0x3434bd([0x6a,0x74,0x69])],_0x3fe69e=window[_0x3434bd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1319e5[_0x3434bd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1319e5[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3eda25={..._0x5e9a74,[_0x3434bd([0x6a,0x74,0x69])]:_0x1319e5[_0x3434bd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1319e5[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3eda25[_0x3434bd([0x76,0x63])],_0x43acca(_0x3eda25)==_0x3fe69e;}}}async function _0x412529(){let _0x931fad=!0x0;try{const _0x4ab61f=_0x508cd7[_0x3434bd([0x73,0x70,0x6c,0x69,0x74])](_0x3434bd([0x2e])),[_0x18f826,_0x51fccd,_0x40778c]=_0x4ab61f;return _0x2e4028(_0x18f826),await _0x157d49(_0x18f826,_0x51fccd,_0x40778c),_0x931fad;}catch{return!0x1;}function _0x2e4028(_0x338f08){const _0x5b0d85=_0x35fe04(_0x338f08);_0x5b0d85&&_0x5b0d85[_0x3434bd([0x61,0x6c,0x67])]==_0x3434bd([0x45,0x53,0x32,0x35,0x36])||(_0x931fad=!0x1);}async function _0x157d49(_0x57f6e5,_0x53a9df,_0x38aefa){const _0x4c7377=window[_0x3434bd([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3434bd([0x66,0x72,0x6f,0x6d])](_0x1f5a3c(_0x38aefa),_0x9b75f2=>_0x9b75f2[_0x3434bd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xbd01a3=new window[(_0x3434bd([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3434bd([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x57f6e5+_0x3434bd([0x2e])+_0x53a9df),_0x14d4ac=window[_0x3434bd([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3434bd([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x14d4ac)return;const _0x3809b9=await _0x14d4ac[_0x3434bd([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3434bd([0x6a,0x77,0x6b]),_0x3e13b9,{[_0x3434bd([0x6e,0x61,0x6d,0x65])]:_0x3434bd([0x45,0x43,0x44,0x53,0x41]),[_0x3434bd([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3434bd([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3434bd([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x14d4ac[_0x3434bd([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3434bd([0x6e,0x61,0x6d,0x65])]:_0x3434bd([0x45,0x43,0x44,0x53,0x41]),[_0x3434bd([0x68,0x61,0x73,0x68])]:{[_0x3434bd([0x6e,0x61,0x6d,0x65])]:_0x3434bd([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3809b9,_0x4c7377,_0xbd01a3)||(_0x931fad=!0x1);}}function _0x35fe04(_0x2ec8a3){return _0x2ec8a3[_0x3434bd([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3434bd([0x65,0x79]))?JSON[_0x3434bd([0x70,0x61,0x72,0x73,0x65])](_0x1f5a3c(_0x2ec8a3)):null;}function _0x1f5a3c(_0x1bcdda){return window[_0x3434bd([0x61,0x74,0x6f,0x62])](_0x1bcdda[_0x3434bd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3434bd([0x2b]))[_0x3434bd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3434bd([0x2f])));}function _0x43acca(_0x3c947f){let _0x2cc6a6=0x1505;function _0x57bf11(_0x50ce11){for(let _0xcf2cc5=0x0;_0xcf2cc5<_0x50ce11[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xcf2cc5++){const _0x181ddb=_0x50ce11[_0x3434bd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xcf2cc5);_0x2cc6a6=(_0x2cc6a6<<0x5)+_0x2cc6a6+_0x181ddb,_0x2cc6a6&=_0x2cc6a6;}}function _0x402b42(_0x4ba1ae){Array[_0x3434bd([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4ba1ae)?_0x4ba1ae[_0x3434bd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x402b42):_0x4ba1ae&&typeof _0x4ba1ae==_0x3434bd([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3434bd([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4ba1ae)[_0x3434bd([0x73,0x6f,0x72,0x74])]()[_0x3434bd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2aba06,_0x33b638])=>{_0x57bf11(_0x2aba06),_0x402b42(_0x33b638);}):_0x57bf11(window[_0x3434bd([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4ba1ae));}return _0x402b42(_0x3c947f),_0x2cc6a6>>>0x0;}function _0xd1e0eb(_0xb9fe72){return _0xb9fe72[_0x3434bd([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3434bd([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3434bd([0x30]));}function _0x2037eb(_0x215ef4){return _0x215ef4[_0x3434bd([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3434bd([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3434bd([0x6a,0x6f,0x69,0x6e])]('');}function _0x4198d1(_0x3593a1){return _0x59082e[_0x3434bd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3434bd([0x68,0x61,0x73])](_0x3593a1);}function _0x3fd727(_0x5119ae){return _0x59082e[_0x3434bd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3434bd([0x67,0x65,0x74])](_0x5119ae);}function _0x26e947(){}function _0x3434bd(_0x4dc682){return _0x4dc682['map'](_0x3a314b=>String['fromCharCode'](_0x3a314b))['join']('');}_0xbd0f1c(await _0x2f6bb6());}(this);}['destroy'](){const _0x2800b6=this['editor']['plugins']['get'](o),_0xb7c8d8=this['editor']['config']['get']('collaboration.channelId');for(const _0x429dfd of _0x2800b6['getCommentThreads']({'channelId':_0xb7c8d8}))_0x2800b6['_detachCommentThread'](_0x429dfd['id']),_0x2800b6['_threads']['delete'](_0x429dfd['id']);super['destroy']();}['hasMarkerForId'](_0x46f2c2){return this['getAllMarkersForId'](_0x46f2c2)['length']>0x0;}['getAllMarkersForId'](_0x4a11c0){const _0x48b711=[];for(const _0x48aaa0 of this['editor']['model']['markers'])_0x48aaa0['name']['startsWith']('comment:'+_0x4a11c0)&&_0x48b711['push'](_0x48aaa0);return _0x48b711;}['scrollToThreadMarker'](_0x439015){const _0x2553a4=this['_getTargetForId'](_0x439015);_0x2553a4&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x439015&&rt({'target':_0x2553a4[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3c658d){this['editor']['model']['change'](()=>{for(const _0x22b994 of this['getAllMarkersForId'](_0x3c658d))this['editor']['editing']['reconvertMarker'](_0x22b994);});}['_attachArchivedThread'](_0x270c8b){const _0x1ed3ce=this['editor']['plugins']['get'](o),_0xccecab=this['editor']['plugins']['get'](P),_0x287e8c=_0x1ed3ce['getCommentThread'](_0x270c8b);if(!_0x287e8c['isAttached']){const _0x135864=_0x287e8c['attachTo'](()=>this['_getTargetForId'](_0x287e8c['id']));_0xccecab['registerAnnotation'](_0x135864),_0x287e8c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xd19b91=this['editor'],_0x281465=_0xd19b91['plugins']['get'](it);_0xd19b91['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x197747,_0x3ad018)=>{const {id:_0x2eba6d}=er(_0x197747['markerName']),_0x25f5e2=_0xd19b91['plugins']['get'](o)['getCommentThread'](_0x2eba6d),_0x187c46=this['activeMarker']&&er(this['activeMarker'])['id']===_0x2eba6d;let _0x1da78d;if(_0x25f5e2&&_0x25f5e2['isResolved']&&!_0x187c46&&_0x197747['item'])return _0x3ad018['consumable']['consume'](_0x197747['item'],'addMarker:'+_0x197747['markerName']),_0x3ad018['consumable']['consume'](_0x197747['item'],'removeMarker:'+_0x197747['markerName']),null;const _0x53bca1=['ck-comment-marker'];return _0x187c46&&_0x53bca1['push']('ck-comment-marker--active'),_0x1da78d=_0x25f5e2?.['length']?_0x25f5e2['comments']['first']['author']['id']:_0x281465['me']['id'],{'classes':_0x53bca1,'attributes':{'data-comment':_0x2eba6d,'data-author-id':_0x1da78d}};}}),_0xd19b91['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5976bf,{options:_0x53c1c5})=>{if(_0x53c1c5['showCommentHighlights'])return null;const _0x28523d=_0xd19b91['plugins']['get'](o),_0x58e71b=_0xd19b91['model']['markers']['get'](_0x5976bf),{id:_0x2ec3f5,part:_0x28d02f}=er(_0x5976bf);return _0x58e71b&&!_0x58e71b['affectsData']||_0x53c1c5['ignoreResolvedComments']&&_0x28523d['getCommentThread'](_0x2ec3f5)?.['isResolved']?null:{'group':'comment','name':_0x28d02f?_0x2ec3f5+':'+_0x28d02f:_0x2ec3f5};}}),_0xd19b91['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1c63cd,{writer:_0x1115b2})=>_0x1115b2['createElement']('$marker',{'data-name':'comment:'+_0x1c63cd['getAttribute']('id')})}),_0xd19b91['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x758080=this['editor'],_0x37ce67=_0x758080['plugins']['get'](o),_0x4a2f01=new Set(),_0x239df7=new Set();_0x758080['model']['document']['registerPostFixer'](_0x570bce=>{let _0x5297b6=!0x1;for(const {name:_0xaa7623,data:_0x1ac7fe}of _0x758080['model']['document']['differ']['getChangedMarkers']()){const {group:_0x6aadd6,id:_0x376579}=er(_0xaa7623);let _0x4a361c=_0x1ac7fe['newRange'];if('comment'!==_0x6aadd6||!_0x4a361c)continue;const _0x4d0485='$graveyard'===_0x4a361c['root']['rootName'];_0x4d0485||(_0x4a361c=dt(_0x4a361c,_0x758080['model']),!_0x4a361c||_0x4a361c['isCollapsed']||!_0x1ac7fe['newRange']||_0x4a361c['isEqual'](_0x1ac7fe['newRange']))?_0x758080['model']['hasContent'](_0x4a361c)&&!_0x4d0485?this['isThreadsLoadingPaused']?_0x4a2f01['add'](_0xaa7623):this['_handleThreadMarker'](_0xaa7623,_0x376579):(_0x239df7['add'](_0xaa7623),_0x4a2f01['delete'](_0xaa7623),_0x570bce['removeMarker'](_0xaa7623),_0x5297b6=!0x0):(_0x570bce['updateMarker'](_0xaa7623,{'range':_0x4a361c}),_0x5297b6=!0x0);}return _0x5297b6;}),this['on']('change:isThreadsLoadingPaused',(_0x570ed5,_0x472406,_0x7e03bb)=>{if(!_0x7e03bb&&_0x4a2f01['size'])for(const _0x3ad61e of _0x4a2f01){const {id:_0x45636c}=er(_0x3ad61e);_0x4a2f01['delete'](_0x3ad61e),_0x758080['model']['markers']['get'](_0x3ad61e)&&this['_handleThreadMarker'](_0x3ad61e,_0x45636c);}}),this['listenTo'](_0x758080['model']['document'],'change',()=>{for(const {name:_0x35dedf,data:{newRange:_0x1de249}}of _0x758080['model']['document']['differ']['getChangedMarkers']()){const {group:_0x178843,id:_0x40de01}=er(_0x35dedf);if('comment'!==_0x178843)continue;const _0x3b2de6=_0x37ce67['getCommentThread'](_0x40de01),_0x535230=this['hasMarkerForId'](_0x40de01);_0x3b2de6&&(!_0x3b2de6['_hasTargetInContent']&&_0x1de249&&_0x758080['editing']['view']['once']('render',()=>{const _0x43c1a3=_0x758080['plugins']['get'](O),_0x494bcc=_0x37ce67['_threadToController']['get'](_0x3b2de6)['view'];_0x43c1a3['getByInnerView'](_0x494bcc)['refreshVisibility']();},{'priority':'low'}),_0x3b2de6['_hasTargetInContent']=_0x535230||!!_0x1de249),_0x1de249||(_0x239df7['add'](_0x35dedf),_0x4a2f01['delete'](_0x35dedf));}for(const _0x421875 of _0x239df7){const {id:_0x273f56}=er(_0x421875),_0x4073a4=_0x37ce67['getCommentThread'](_0x273f56);if(_0x4a2f01['delete'](_0x421875),!_0x4073a4)continue;const _0x442db2=this['hasMarkerForId'](_0x273f56);_0x442db2||_0x4073a4['isSubmitted']?_0x442db2||_0x4073a4['unlinkedAt']||_0x4073a4['setUnlinkedAt'](new Date()):_0x4073a4['remove']();}_0x239df7['clear']();});}['_handleInitialThreads'](_0x16729d){_0x16729d['forEach'](_0x1df388=>{_0x1df388['unlinkedAt']&&this['_attachArchivedThread'](_0x1df388['id']);});}['_getTargetForId'](_0x5e7082){const _0x2e56a0=this['editor'],_0x5cfd71=this['getAllMarkersForId'](_0x5e7082);return et(_0x2e56a0['editing'],_0x5cfd71);}['_getTextContext'](_0x4c5813){const _0x5a60d9=this['getAllMarkersForId'](_0x4c5813);let _0x45852c='',_0x1d6f58=!0x1;for(const _0x2dbf95 of _0x5a60d9){const _0x183762=_0x2dbf95['getRange']();for(const _0xeef57a of Array['from'](_0x183762['getItems']()))_0xeef57a['is']('$textProxy')?(_0x45852c&&_0x1d6f58&&(_0x45852c+='\x20',_0x1d6f58=!0x1),_0x45852c+=_0xeef57a['data']):_0x1d6f58=!0x0;_0x1d6f58=!0x0;}return _0x45852c['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5b4cc4,_0x3db4bb){const _0x2524da=this['editor'],_0x3e07fe=_0x2524da['plugins']['get'](o);let _0x2746a8=_0x3e07fe['getCommentThread'](_0x3db4bb);const _0x1d6e5a=_0x2524da['config']['get']('collaboration.channelId'),_0x13b04a=_0x2524da['plugins']['get'](P);if(_0x2746a8&&(_0x2746a8['unlinkedAt']&&_0x2746a8['setUnlinkedAt'](null),_0x2746a8['isAttached']))return _0x2746a8;return!this['getAllMarkersForId'](_0x3db4bb)[0x0]['managedUsingOperations']?_0x2524da['editing']['view']['once']('render',()=>{if(_0x3e07fe['getCommentThread'](_0x3db4bb))return;const _0x558676=_0x2524da['plugins']['get'](O);_0x2746a8=_0x3e07fe['openNewCommentThread']({'channelId':_0x1d6e5a,'threadId':_0x3db4bb,'target':()=>this['_getTargetForId'](_0x3db4bb),'context':{'type':'text','value':this['_getTextContext'](_0x3db4bb)}});const _0x1ccaa3=_0x3e07fe['_threadToController']['get'](_0x2746a8)['view'],_0x1a8b38=_0x558676['getByInnerView'](_0x1ccaa3);_0x1a8b38&&_0x13b04a['registerAnnotation'](_0x1a8b38);},{'priority':'low'}):_0x3e07fe['fetchCommentThread']({'channelId':_0x1d6e5a,'threadId':_0x3db4bb})['then'](_0x40c1bb=>{if('destroyed'!==_0x2524da['state']){if(_0x2746a8=_0x40c1bb,_0x2746a8&&!_0x2746a8['isAttached']){const _0x55a64e=_0x2746a8['attachTo'](()=>this['_getTargetForId'](_0x3db4bb));_0x13b04a['registerAnnotation'](_0x55a64e),_0x2746a8['isResolved']&&this['_reconvertMarkers'](_0x3db4bb);}else{if(!_0x2746a8){const _0x3ae8cc=this['getAllMarkersForId'](_0x3db4bb);_0x2524da['model']['change'](_0x751c83=>{for(const _0x324ab0 of _0x3ae8cc)_0x751c83['removeMarker'](_0x324ab0);});}}}}),_0x2746a8;}['_handleThreadMarker'](_0x54e392,_0x5be235){const _0x2e5604=this['_attachMarkerToThread'](_0x54e392,_0x5be235);_0x2e5604&&!_0x2e5604['context']&&_0x2e5604['setContext']({'type':'text','value':this['_getTextContext'](_0x5be235)});}['_initAriaMarkerChangeAnnouncements'](){const _0x31a571=this['editor'];ot(_0x31a571['model'],({left:_0x5bf617,entered:_0x5ab22e})=>{for(const _0x8cc322 of _0x5bf617)if(mt(_0x8cc322)){_0x31a571['ui']['ariaLiveAnnouncer']['announce'](E(_0x31a571['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3e73fc of _0x5ab22e)if(mt(_0x3e73fc)){_0x31a571['ui']['ariaLiveAnnouncer']['announce'](E(_0x31a571['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x8ce7cf)));break;}});}}function ft(_0x571329,_0x26caf4){return _0x26caf4?_0x571329+':'+_0x26caf4:_0x571329;}function er(_0x1752eb){const _0x5b13a7=_0x1752eb['split'](':');return{'group':_0x5b13a7[0x0],'id':_0x5b13a7[0x1],'part':_0x5b13a7[0x2]};}function dt(_0x24be73,_0x39c9ae){const _0x1bf78f=_0x39c9ae['schema'],_0x4924ff=_0x39c9ae['createRange'](_0x24be73['start']);for(const _0x209410 of _0x24be73['getWalker']()){const {type:_0x5b5df8,item:_0x11cb02,nextPosition:_0x77fd39}=_0x209410;if('text'===_0x5b5df8||_0x1bf78f['isObject'](_0x11cb02)){const _0x36701f=_0x39c9ae['createPositionBefore'](_0x11cb02);_0x4924ff['isCollapsed']&&(_0x4924ff['start']=_0x36701f),_0x4924ff['end']=_0x77fd39;}}return _0x4924ff;}function mt(_0x2272d3){return'comment'===er(_0x2272d3['name'])['group'];}class i extends _0x3136d3{['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 _0x24404f=this['editor'],_0x48b910=_0x24404f['plugins']['get'](o),_0x323201=_0x24404f['plugins']['get'](r),_0x12ee92=_0x24404f['plugins']['get'](O),_0x55b229=_0x24404f['plugins']['get'](P);_0x24404f['ui']['componentFactory']['add']('comment',()=>{const _0x401d55=this['_createUIButton'](_0x501ccc);return _0x401d55['tooltip']=!0x0,_0x401d55;}),_0x24404f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1d3340)),_0x55b229['addSourceCollector'](()=>{const _0x35cb77=[];for(const [_0x40350b,_0x1284b8]of _0x48b910['_threadToController']){const _0x1d868e=_0x323201['getAllMarkersForId'](_0x40350b['id']),_0x2e71a9=_0x1d868e['map'](_0x3d60f5=>_0x3d60f5['getRange']());_0x1d868e['length']>0x0&&_0x35cb77['push']([_0x1284b8['view'],_0x2e71a9]);}return _0x35cb77;}),this['listenTo'](_0x12ee92,'change:activeAnnotations',(_0x29b37f,_0x154dd9,_0x3ed87c)=>{const _0x4c7133=Array['from'](_0x3ed87c)['map'](_0x39d7ac=>_0x39d7ac['innerView'])['find'](_0x1ec084=>_0x48b910['_viewToController']['has'](_0x1ec084));if(!_0x4c7133)return void(_0x323201['activeMarker']=null);const _0x504765=_0x48b910['_viewToController']['get'](_0x4c7133)['model']['id'],_0x4c30f8='comment:'+_0x504765;_0x504765&&_0x323201['hasMarkerForId'](_0x504765)?_0x323201['activeMarker']=_0x4c30f8:_0x323201['activeMarker']&&(_0x323201['activeMarker']=null);}),this['listenTo'](_0x48b910,'removeCommentThread',(_0x2eedd4,{threadId:_0x524ce2,isFromAdapter:_0x4b43de})=>{!_0x4b43de&&_0x24404f['ui']['focusTracker']['isFocused']&&_0x323201['hasMarkerForId'](_0x524ce2)&&_0x24404f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x48b910,'addComment',(_0x3386f2,{threadId:_0x7b58,isFromAdapter:_0x1fc98d})=>{if(_0x1fc98d||!_0x323201['hasMarkerForId'](_0x7b58)||!_0x48b910['hasCommentThread'](_0x7b58))return;0x1===_0x48b910['getCommentThread'](_0x7b58)['length']&&(_0x24404f['editing']['view']['focus'](),_0x3386f2['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4bafae=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4b2e03;for(const _0x207280 in _0x4bafae){const _0x1a240b=_0x207280,_0x3c760b=_0x4bafae[_0x1a240b];if('commentsLicenseKeyValid'==_0x3c760b||'commentsLicenseKeyInvalid'==_0x3c760b||'commentsLicenseKeyExpired'==_0x3c760b||'commentsLicenseKeyDomainLimit'==_0x3c760b||'commentsLicenseKeyNotAllowed'==_0x3c760b||'commentsLicenseKeyEvaluationLimit'==_0x3c760b||'commentsLicenseKeyTrialLimit'==_0x3c760b||'commentsLicenseKeyUsageLimit'==_0x3c760b){delete _0x4bafae[_0x1a240b],_0x4b2e03=_0x3c760b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4b2e03&&_0x4bafae['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4b2e03&&_0x4bafae['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4b2e03&&_0x4bafae['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4b2e03&&_0x4bafae['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4b2e03&&_0x4bafae['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x4b2e03&&_0x4bafae['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x4b2e03&&_0x4bafae['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xe651f7){const _0x5512b6=this['editor'],_0xa57560=new _0xe651f7(_0x5512b6['locale']),_0x438731=_0x5512b6['commands']['get']('addCommentThread');return _0xa57560['set']({'label':E(_0x5512b6['locale'],'Comment'),'icon':_0x4f9c07}),_0xa57560['bind']('isEnabled')['to'](_0x438731),this['listenTo'](_0xa57560,'execute',()=>{_0x438731['execute']();}),_0xa57560;}}class s extends _0x3136d3{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x32c04a){super(_0x32c04a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x204418,_0x379f52,_0x279463)=>{_0x279463?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x93b0d4,_0x3342d2]of this['editor']['commands'])_0x3342d2['affectsData']&&'addCommentThread'!==_0x93b0d4&&_0x3342d2['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 _0x30dcda=this['editor']['editing']['view']['document'];this['listenTo'](_0x30dcda,'cut',_0xa55c05=>_0xa55c05['stop'](),{'priority':'highest'}),this['listenTo'](_0x30dcda,'clipboardInput',_0x8fb011=>_0x8fb011['stop'](),{'priority':'highest'}),this['listenTo'](_0x30dcda,'delete',_0x45ae14=>_0x45ae14['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5aefd3,_0x5f4e8f]of this['editor']['commands'])_0x5f4e8f['affectsData']&&'addCommentThread'!==_0x5aefd3&&_0x5f4e8f['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 _0x2c6a5a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3be377){super(_0x3be377),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4893ee=this['context']['plugins']['get'](O);this['listenTo'](_0x4893ee,'_activateAnnotation',(_0x4a630a,_0x33a629)=>{for(const _0x130799 of this['activeUIs']){const _0x233736=this['_uis']['get'](_0x130799);(0x0,this['uisData']['get'](_0x130799)['filter'])(_0x33a629)&&_0x233736['setActiveAnnotation'](_0x33a629);}}),this['listenTo'](_0x4893ee,'_deactivateAllAnnotations',()=>{for(const _0x383ba0 of this['activeUIs']){this['_uis']['get'](_0x383ba0)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4893ee['_visibleAnnotations'],'add',(_0xca25ff,_0x56c98e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x56c98e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3c535e){return this['activeUIs']['has'](_0x3c535e);}['activate'](_0x207d88,_0x1e3cae=this['defaultFilter']){const _0xfc9a1c=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x207d88))throw new _0x15c172('annotationsuis-missing-ui',this,{'uiName':_0x207d88});this['isActive'](_0x207d88)&&this['deactivate'](_0x207d88),this['activeUIs']['add'](_0x207d88);const _0x5c0e16=new _();!function({source:_0x7aec5c,target:_0x5e531d,filter:_0x28b428}){for(const _0x1b1598 of _0x7aec5c)_0x28b428(_0x1b1598)&&_0x5e531d['add'](_0x1b1598);_0x5e531d['listenTo'](_0x7aec5c,'add',(_0x541b40,_0x35cbbb)=>{_0x28b428(_0x35cbbb)&&_0x5e531d['add'](_0x35cbbb);}),_0x5e531d['listenTo'](_0x7aec5c,'remove',(_0x23ad4a,_0x27ec94)=>{_0x5e531d['has'](_0x27ec94)&&_0x5e531d['remove'](_0x27ec94);});}({'source':_0xfc9a1c['_visibleAnnotations'],'target':_0x5c0e16,'filter':_0x1e3cae}),this['uisData']['set'](_0x207d88,{'collection':_0x5c0e16,'filter':_0x1e3cae});const _0x571a08=this['_uis']['get'](_0x207d88);_0x571a08['attach'](_0x5c0e16),this['listenTo'](_0x571a08,'change:activeAnnotation',(_0x3aace7,_0x2ec78c,_0x140a88,_0x607c32)=>{_0x607c32&&_0xfc9a1c['_removeActiveAnnotation'](_0x607c32),_0x140a88&&_0xfc9a1c['_addActiveAnnotation'](_0x140a88);});}['deactivate'](_0x2c3bb0){if(this['activeUIs']['delete'](_0x2c3bb0),!this['_uis']['has'](_0x2c3bb0))throw new _0x15c172('annotationsuis-missing-ui',this,{'uiName':_0x2c3bb0});const _0x530c97=this['_uis']['get'](_0x2c3bb0);_0x530c97['detach'](),this['stopListening'](_0x530c97),this['uisData']['get'](_0x2c3bb0)['collection']['destroy'](),this['uisData']['delete'](_0x2c3bb0);}['switchTo'](_0x1dc9c4){if(!this['_uis']['has'](_0x1dc9c4))throw new _0x15c172('annotationsuis-missing-ui',this,{'uiName':_0x1dc9c4});const _0x332040=this['context']['plugins']['get'](O),_0xc690ce=Array['from'](_0x332040['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1dc9c4);const _0x1140f2=this['_uis']['get'](_0x1dc9c4);_0x1140f2['setActiveAnnotation'](_0xc690ce),_0x1140f2['_setSelectedAnnotations']&&_0xc690ce&&_0x1140f2['_setSelectedAnnotations']([_0xc690ce]);}['deactivateAll'](){for(const _0x43fe3a of this['activeUIs'])this['deactivate'](_0x43fe3a);}['register'](_0x7e59b7,_0x3f3575){if(this['_uis']['has'](_0x7e59b7))throw new _0x15c172('annotationsuis-register-already-registered');if('function'!=typeof _0x3f3575['attach']||'function'!=typeof _0x3f3575['detach']||'function'!=typeof _0x3f3575['setActiveAnnotation'])throw new _0x15c172('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x7e59b7,_0x3f3575);}['refilterAnnotations'](){const _0x42d2e4=this['context']['plugins']['get'](O)['collection'],_0x2cee74=new Map(),_0x8a6cd2=Array['from'](this['activeUIs']);for(const _0x2fcfdd of this['activeUIs']){const _0xfe4a04=this['uisData']['get'](_0x2fcfdd)['collection'];for(const _0x5b863f of _0xfe4a04)_0x2cee74['set'](_0x5b863f,_0x2fcfdd);}for(const _0x1bda8d of _0x42d2e4){const _0x2ef813=_0x2cee74['get'](_0x1bda8d);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1bda8d);const _0x2c12ae=_0x8a6cd2['find'](_0x1d716d=>this['uisData']['get'](_0x1d716d)['filter'](_0x1bda8d));_0x2ef813!==_0x2c12ae&&(_0x2ef813&&this['uisData']['get'](_0x2ef813)['collection']['remove'](_0x1bda8d),_0x2c12ae&&this['uisData']['get'](_0x2c12ae)['collection']['add'](_0x1bda8d));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x566e07){const _0x110adb=[];for(const _0x139e06 of this['activeUIs']){(0x0,this['uisData']['get'](_0x139e06)['filter'])(_0x566e07)&&_0x110adb['push'](_0x139e06);}if(_0x110adb['length']>0x1)throw new _0x15c172('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x110adb,'annotationType':_0x566e07['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2c4ff2){super(_0x2c4ff2);const _0x5d956f=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 _0x4998e4(),this['focusCycler']=new _0x4a5462({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5d956f['to']('class')],'style':{'minHeight':_0x5d956f['to']('minHeight',_0x36a80b=>'number'==typeof _0x36a80b?pi(_0x36a80b+0xa):null)},'dir':_0x2c4ff2['uiLanguageDirection'],'role':'application','aria-label':E(_0x2c4ff2,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x2c4ff2,'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',_0xcce857=>{this['_updateItemPositionInFocusables'](_0xcce857['source']);}),this['list']['forEach'](_0xe3a70a=>{this['focusTracker']['add'](_0xe3a70a['element']),this['_updateItemPositionInFocusables'](_0xe3a70a);}),this['list']['on']('change',(_0x1b95a1,_0x5726ee)=>{for(const _0x2b96e9 of _0x5726ee['removed'])this['focusTracker']['remove'](_0x2b96e9['element']),this['focusables']['remove'](_0x2b96e9);for(const _0x1bbaae of _0x5726ee['added'])this['focusTracker']['add'](_0x1bbaae['element']),this['_updateItemPositionInFocusables'](_0x1bbaae);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x55bd13){const _0x4e2b6e=this['focusables']['getIndex'](_0x55bd13);let _0x22bb47,_0x4d4b43;for(const _0x2aa458 of this['focusables'])if(_0x55bd13['top']<_0x2aa458['top']){_0x22bb47=_0x2aa458;break;}if(_0x4d4b43=_0x22bb47?this['focusables']['getIndex'](_0x22bb47):this['focusables']['length'],-0x1!==_0x4e2b6e){if(_0x4e2b6e===_0x4d4b43-0x1)return;this['focusables']['remove'](_0x55bd13),_0x4d4b43=_0x22bb47?this['focusables']['getIndex'](_0x22bb47):this['focusables']['length'];}this['focusables']['add'](_0x55bd13,_0x4d4b43);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x47b82e){super(_0x47b82e),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x457519,_0x4d59dc)=>_0x457519+_0x4d59dc),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x48adad=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x48adad['to']('isAnimationDisabled',_0x3dd824=>_0x3dd824?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x48adad['to']('top',_0x4b195f=>Ht(_0x4b195f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3a6cc2=this['element']['clientHeight'];_0x3a6cc2&&(this['height']=_0x3a6cc2);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x2c6a5a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x13bdd7){super(_0x13bdd7),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 _0x1c582f=this['context']['config']['get']('sidebar.container');_0x1c582f&&this['setContainer'](_0x1c582f);}['setContainer'](_0x40eac0){if(!y(_0x40eac0))throw new _0x15c172('sidebar-setcontainer-invalid-element');this['container']=_0x40eac0;}['_attachToContainer']({viewClass:_0x3e140e='',spaceBetweenItems:_0x56b74a=0x19}={}){if(!y(this['container']))throw new _0x15c172('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3e140e,this['_spaceBetweenItems']=_0x56b74a;}['rearrange']({removedAnnotation:_0x1694f1,previousAnnotation:_0x53c522,nextAnnotation:_0x3deecc}){const _0x2999b5=this['getSidebarItemView'](_0x1694f1);this['view']['list']['remove'](_0x2999b5),this['_destroySidebarItemView'](_0x1694f1),_0x53c522&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x53c522)),_0x3deecc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3deecc)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x369dc3,activatedAnnotation:_0x396ab4,disableAnimationOnActivatedAnnotation:_0x4bbd99}){if(this['_activeAnnotation']=_0x396ab4,_0x369dc3){_0x369dc3['isActive']=!0x1;const _0x5f31e2=this['getSidebarItemView'](_0x369dc3);_0x5f31e2&&_0x4bbd99&&(_0x5f31e2['isAnimationDisabled']=!0x1);}if(_0x396ab4){const _0x5e6e6c=this['getSidebarItemView'](_0x396ab4);_0x5e6e6c&&(_0x396ab4['isActive']=!0x0,_0x4bbd99&&(_0x5e6e6c['isAnimationDisabled']=!0x0,_0x5e6e6c['top']+=0x1),this['_alignToTargetRect'](_0x5e6e6c));}}['_detachFromContainer'](_0x36b1e2){if(this['view']['element']['remove'](),_0x36b1e2){for(const _0x47bcf2 of _0x36b1e2)this['_destroySidebarItemView'](_0x47bcf2);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3f94b2,_0x1d1dd0){_0x1d1dd0||(_0x1d1dd0=_0x3f94b2['view']);const _0x53494f=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x53494f,_0x3f94b2),this['_annotationToSidebarItemView']['set'](_0x3f94b2,_0x53494f),_0x53494f['content']['add'](_0x1d1dd0),this['listenTo'](_0x3f94b2['view'],'change:targetRect',(_0x52a8f0,_0x4fd710,_0x1d934f)=>{const _0x1b8e82=this['_getTargetTop'](_0x3f94b2,_0x1d934f);_0x53494f['_targetTop']!=_0x1b8e82&&(_0x53494f['_targetTop']=_0x1b8e82,this['_setItemTop'](_0x53494f,_0x1b8e82));}),this['listenTo'](_0x53494f,'change:top',()=>{this['_recalculate'](_0x53494f,'top');}),this['listenTo'](_0x53494f,'change:bottom',()=>{this['_recalculate'](_0x53494f,'bottom');}),this['_alignToTargetRect'](_0x53494f);const _0x144324=this['_getItemBefore'](_0x53494f);if(_0x144324)this['_alignAfterItem'](_0x144324,_0x53494f)||this['_alignToTargetRect'](_0x53494f);else this['_alignToTargetRect'](_0x53494f);return this['_updateLastItem'](),this['view']['list']['add'](_0x53494f),_0x53494f;}['_alignForTopChange'](_0x34c376){if(!_0x34c376['content']['length'])return;const _0x3ec280=this['_getItemBefore'](_0x34c376);if(!_0x3ec280)return;const _0x1ccdb7=this['_sidebarItemViewToAnnotation']['get'](_0x3ec280),_0x20dabd=this['_activeAnnotation'];_0x20dabd&&_0x20dabd===_0x1ccdb7?this['_alignAfterItem'](_0x3ec280,_0x34c376):this['_alignBeforeItem'](_0x34c376,_0x3ec280);}['_alignForBottomChange'](_0x637c01){if(!_0x637c01['content']['length'])return;const _0x47b3a6=this['_getItemAfter'](_0x637c01);if(!_0x47b3a6)return;const _0x23d485=this['_sidebarItemViewToAnnotation']['get'](_0x47b3a6),_0x446582=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x41983b=this['_activeAnnotation'];_0x41983b&&_0x41983b===_0x23d485&&_0x446582?(this['_alignBeforeItem'](_0x47b3a6,_0x637c01),this['_alignAfterItem'](_0x637c01,_0x47b3a6)):_0x41983b&&_0x41983b===_0x23d485?this['_alignBeforeItem'](_0x47b3a6,_0x637c01):this['_alignAfterItem'](_0x637c01,_0x47b3a6);}['_recalculate'](_0x31bd87,_0x35236f){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x499976,changedProp:_0x235831}of this['_recalculateBuffer'])'top'===_0x235831?this['_alignForTopChange'](_0x499976):this['_alignForBottomChange'](_0x499976);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x31bd87,'changedProp':_0x35236f});}['getSidebarItemView'](_0x978eee){return this['_annotationToSidebarItemView']['get'](_0x978eee);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x191916){const _0x3c0586=this['getSidebarItemView'](_0x191916);this['stopListening'](_0x3c0586),this['stopListening'](_0x191916['view']),_0x3c0586['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x191916),this['_sidebarItemViewToAnnotation']['delete'](_0x3c0586);}['_createSidebarView'](){const _0x2a1a43=new F(this['context']['locale']);return _0x2a1a43['render'](),this['on']('change:_lastItem',(_0x43d38e,_0x4e2166,_0x384ce5,_0x54a2e0)=>{_0x54a2e0&&_0x2a1a43['unbind']('minHeight'),_0x384ce5?_0x2a1a43['bind']('minHeight')['to'](_0x384ce5,'bottom'):_0x2a1a43['minHeight']=null;}),_0x2a1a43;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5f12f3){const _0x3eb4ef=this['_sidebarItemViewToAnnotation']['get'](_0x5f12f3),_0xbf229f=_0x3eb4ef&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3eb4ef)-0x1);return _0xbf229f&&this['getSidebarItemView'](_0xbf229f)||null;}['_getItemAfter'](_0x599e4d){const _0xe12095=this['_sidebarItemViewToAnnotation']['get'](_0x599e4d),_0x16458c=_0xe12095&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xe12095)+0x1);return _0x16458c&&this['getSidebarItemView'](_0x16458c)||null;}['_alignBeforeItem'](_0x47435a,_0x2b3988){_0x47435a['updateHeight']();const _0x6a6eec=R(_0x2b3988['bottom']+this['_spaceBetweenItems'],_0x47435a['top']);return!!_0x6a6eec&&(this['_setItemTop'](_0x2b3988,_0x2b3988['top']-_0x6a6eec),!0x0);}['_alignAfterItem'](_0x53d2fb,_0x41c189){_0x53d2fb['updateHeight']();const _0x271156=R(_0x53d2fb['bottom']+this['_spaceBetweenItems'],_0x41c189['top']);return!!_0x271156&&(this['_setItemTop'](_0x41c189,_0x41c189['top']+_0x271156,!0x1),!0x0);}['_alignToTargetRect'](_0x347f91){const _0x359323=this['_sidebarItemViewToAnnotation']['get'](_0x347f91);if(!_0x359323||!_0x359323['target']||!_0x359323['targetRect'])return;const _0x1123e1=this['_getTargetTop'](_0x359323,_0x359323['targetRect']);this['_setItemTop'](_0x347f91,_0x1123e1);}['_getTargetTop'](_0xae83c8,_0x6cc69d){if(null===_0x6cc69d)return 0x0;if(_0xae83c8['target']instanceof _0x5708d8)return _0x6cc69d['top'];{const _0x39fa54=new _0x5708d8(this['view']['element'])['top'];return _0x6cc69d['top']-_0x39fa54;}}['_setItemTop'](_0x2f0a11,_0x57fc40,_0xdd1601=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xdd1601&&(_0x57fc40=Math['max'](_0x57fc40,this['_getMaxAvailableTop'](_0x2f0a11))),_0x2f0a11['top']=_0x57fc40;}['_getMaxAvailableTop'](_0x422824){let _0x18e86c=this['_getItemBefore'](_0x422824),_0x2a52f6=0x0;for(;_0x18e86c;)_0x18e86c['updateHeight'](),_0x2a52f6+=this['_spaceBetweenItems']+_0x18e86c['height'],_0x18e86c=this['_getItemBefore'](_0x18e86c);return _0x2a52f6;}}function R(_0x3815ec,_0x2c742f){return Math['max'](_0x3815ec-_0x2c742f,0x0);}function y(_0x1d0d59){return null!==_0x1d0d59&&'object'==typeof _0x1d0d59&&0x1===_0x1d0d59['nodeType'];}class e extends _0x2c6a5a{['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(_0x30b2d9){super(_0x30b2d9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2a536e(),this['_refreshPositioningDebounced']=_0x356c72(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x349cad=this['context']['plugins']['get'](M),_0x165ab0=this['context']['plugins']['get'](z);_0x349cad['register']('wideSidebar',this),_0x165ab0['container']&&_0x349cad['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x291e31){if(_0x291e31===this['activeAnnotation'])return;const _0x4a4bb8=this['context']['plugins']['get'](z);_0x4a4bb8['_activeAnnotation']=_0x291e31;const _0x29e21e=this['activeAnnotation'];_0x4a4bb8['refresh']({'blurredAnnotation':_0x29e21e,'activatedAnnotation':_0x291e31}),this['activeAnnotation']=_0x291e31;}['attach'](_0x291718){this['annotations']=_0x291718;const _0x221b93=this['context']['plugins']['get'](z);if(_0x221b93['_annotations']=_0x291718,this['isAttached'])throw new _0x15c172('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x221b93,'set:container',()=>{this['detach'](),this['listenTo'](_0x221b93,'change:container',_0x60f550=>{_0x60f550['off'](),this['attach'](_0x291718);});}),_0x221b93['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5c628f=_0x418f6b=>{_0x418f6b['updateTargetRect'](),_0x221b93['addAnnotation'](_0x418f6b);};for(const _0xb32568 of _0x291718)_0x5c628f(_0xb32568);this['listenTo'](_0x291718,'add',(_0x1bcd19,_0xe81a8b)=>{_0x5c628f(_0xe81a8b);}),this['listenTo'](_0x291718,'remove',(_0x3fa8c7,_0x4e8135,_0x428dcc)=>{_0x221b93['rearrange']({'removedAnnotation':_0x4e8135,'previousAnnotation':_0x291718['get'](_0x428dcc-0x1),'nextAnnotation':_0x291718['get'](_0x428dcc+0x1)}),_0x4e8135===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x291718,'focus',(_0x372550,_0x2a5d4f)=>{this['setActiveAnnotation'](_0x2a5d4f);}),this['listenTo'](_0x291718,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2c92e2=this['context']instanceof _0x5e197b?this['context']['editors']:new _0x2a536e([this['context']]);for(const _0x458307 of _0x2c92e2)this['_integrateWithEditorAnnotations'](_0x458307);this['listenTo'](_0x2c92e2,'add',(_0x255bb0,_0x41cc0b)=>{this['listenTo'](_0x41cc0b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x41cc0b);});}),this['listenTo'](_0x2c92e2,'remove',(_0x398571,_0x3de071)=>{_0x3de071['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3de071['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x15c172('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5cde45=this['context']['plugins']['get'](z);_0x5cde45['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5cde45),this['stopListening'](this['annotations']),this['context']instanceof _0x5e197b&&this['stopListening'](this['context']['editors']);for(const _0x120aeb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x120aeb);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x226be2){if(!_0x226be2['plugins']['has']('EditorAnnotations'))return;const _0x2fc2de=_0x226be2['plugins']['get']('EditorAnnotations'),_0x196314=()=>{const _0x4c4c48=_0x2fc2de['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4c4c48[0x0]||null);};this['listenTo'](_0x2fc2de,'refresh',_0x196314),this['listenTo'](_0x2fc2de,'blur',(_0x309c8b,{isAnnotationTracked:_0x5f15d6})=>{this['activeAnnotation']&&_0x5f15d6(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2fc2de,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x38dcd2=>{_0x2fc2de['hasDomSelection']()&&(_0x196314(),_0x38dcd2['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2fc2de);}['_destroyEditorAnnotationsIntegration'](_0x2e5233){this['stopListening'](_0x2e5233),this['_editorAnnotations']['remove'](_0x2e5233);}}class C extends _0x501ccc{['counterView'];constructor(_0x5839a3){super(_0x5839a3);const _0x3eeca9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2c573e,_0x3a779f)=>_0x2c573e?'...':_0x3a779f['toString']()),this['set']('annotationType',''),this['icon']=_0x4f9c07,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3eeca9['to']('annotationType',_0x2e6656=>'ck-annotation-counter__badge--'+_0x2e6656),_0x3eeca9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3eeca9['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x2c6a5a{['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(_0x588f2e){super(_0x588f2e),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x13575b),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2a536e(),this['_refreshPositioningDebounced']=_0x356c72(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4f0a56(this['context']['locale']),this['balloonPanelView']=new _0x34c707(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x109b32){this['annotations']=_0x109b32;const _0x6b80a2=this['context']['plugins']['get'](z),_0x5a0896=this['balloonPanelView'];if(_0x6b80a2['_annotations']=_0x109b32,this['isAttached'])throw new _0x15c172('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x6b80a2,'set:container',()=>{this['detach'](),this['listenTo'](_0x6b80a2,'change:container',_0x48ba2f=>{_0x48ba2f['off'](),this['attach'](_0x109b32);});}),_0x6b80a2['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3d547d=_0x5dfba0=>{const _0x1ac032=new C(this['context']['locale']);_0x6b80a2['addAnnotation'](_0x5dfba0,_0x1ac032),this['_annotationToNarrowView']['set'](_0x5dfba0,_0x1ac032),_0x1ac032['bind']('isDirty','annotationType','number')['to'](_0x5dfba0['view'],'isDirty','type','length'),_0x1ac032['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5a0896['content']['first']!==_0x5dfba0['view']?(this['_showBalloon'](_0x5dfba0),_0x5dfba0['view']['element']['focus'](),this['setActiveAnnotation'](_0x5dfba0)):this['setActiveAnnotation'](null);});};for(const _0x4fdc7d of _0x109b32)_0x3d547d(_0x4fdc7d);this['listenTo'](_0x109b32,'add',(_0x5018d4,_0x5781fa)=>{_0x3d547d(_0x5781fa);}),this['listenTo'](_0x109b32,'remove',(_0x3ebc32,_0x28fc59,_0x5a3e8b)=>{this['_annotationToNarrowView']['get'](_0x28fc59)['destroy'](),this['_annotationToNarrowView']['delete'](_0x28fc59),_0x6b80a2['rearrange']({'removedAnnotation':_0x28fc59,'previousAnnotation':_0x109b32['get'](_0x5a3e8b-0x1),'nextAnnotation':_0x109b32['get'](_0x5a3e8b+0x1)}),_0x28fc59===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x109b32,'focus',(_0x5c329c,_0x5b270b)=>{this['setActiveAnnotation'](_0x5b270b);}),this['listenTo'](_0x109b32,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1e5cab,_0x3a4525)=>{_0x3a4525['keyCode']===_0x16045e['esc']&&_0x5a0896['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5a0896['content']['first']),this['_hideBalloon'](),_0x3a4525['stopPropagation'](),_0x3a4525['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x49e585,_0x57e458)=>{const _0x39068e=_0x57e458['target'];_0x5a0896['isVisible']&&_0x5a0896['element']['contains'](_0x39068e)||_0x6b80a2['view']['element']['contains'](_0x39068e)||_0x49e585['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4c87a4=>_0x4c87a4['contains'](_0x39068e))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1a8cb0=this['context']instanceof _0x5e197b?this['context']['editors']:new _0x2a536e([this['context']]);for(const _0x42abf1 of _0x1a8cb0)this['_integrateWithEditorAnnotations'](_0x42abf1);this['listenTo'](_0x1a8cb0,'add',(_0x1eac2d,_0x2b4882)=>{this['listenTo'](_0x2b4882,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2b4882);});}),this['listenTo'](_0x1a8cb0,'remove',(_0x9a8461,_0x56eb31)=>{_0x56eb31['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x56eb31['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x1178de){if(_0x1178de===this['activeAnnotation'])return;const _0x31d241=this['context']['plugins']['get'](z);if(_0x31d241['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1178de,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1178de)_0x31d241['getSidebarItemView'](_0x1178de)?this['_showBalloon'](_0x1178de):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x1178de;}['detach'](){if(!this['isAttached'])throw new _0x15c172('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x34cdd1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x11cbd1=>_0x11cbd1['destroy']()),this['_annotationToNarrowView']['clear'](),_0x34cdd1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5e197b&&this['stopListening'](this['context']['editors']);for(const _0x6f608e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x6f608e);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'](_0x266a53){if(!_0x266a53['plugins']['has']('EditorAnnotations'))return;const _0x475843=_0x266a53['plugins']['get']('EditorAnnotations'),_0x282900=this['context']['plugins']['get'](z),_0x13a74f=this['annotations'],_0x24170d=this['balloonPanelView'],_0x232bc4=()=>{const _0x1540d3=_0x475843['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1540d3),this['setActiveAnnotation'](_0x1540d3[0x0]||null);};this['listenTo'](_0x475843,'refresh',_0x232bc4),this['listenTo'](_0x475843,'blur',(_0x23206e,{isAnnotationTracked:_0x4b1840})=>{this['activeAnnotation']&&_0x4b1840(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x475843,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x13a74f,'blur',_0x29c825=>{_0x475843['hasDomSelection']()&&_0x29c825['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5ef307,_0x133d83)=>{const _0x51003d=_0x133d83['target'];_0x24170d['isVisible']&&_0x24170d['element']['contains'](_0x51003d)||_0x282900['view']['element']['contains'](_0x51003d)||this['activeAnnotation']&&_0x475843['hasDomSelection']()&&(_0x232bc4(),_0x5ef307['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x475843);}['_destroyEditorAnnotationsIntegration'](_0x5223ef){_0x5223ef&&(this['stopListening'](_0x5223ef),this['_editorAnnotations']['remove'](_0x5223ef));}['_setSelectedAnnotations'](_0x175082){for(const _0x2c0069 of this['_selectedAnnotations'])_0x175082['includes'](_0x2c0069)||this['_manuallyClosedAnnotationViews']['delete'](_0x2c0069['view']);this['_selectedAnnotations']=_0x175082;}['_refreshPositioning'](){const _0x1c1693=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x1c1693['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x346dd8){if(this['_manuallyClosedAnnotationViews']['has'](_0x346dd8['view']))return;const _0x2078e2=this['balloonPanelView']['content']['first'];_0x2078e2!==_0x346dd8['view']?(_0x2078e2&&this['_detachListeners'](_0x2078e2),this['_attachListeners'](_0x346dd8['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x346dd8['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xda17cd=this['balloonPanelView']['content']['first'],_0x170402=_0xda17cd&&this['annotations']['getByView'](_0xda17cd);if(!_0x170402||!this['_annotationToNarrowView']['has'](_0x170402))return;const _0x5e89f0=this['_annotationToNarrowView']['get'](_0x170402)['element'],_0x41fb7c=(function(){const _0x3d18ce=_0x34c707['defaultPositions'];return[_0x3d18ce['southArrowNorthEast'],_0x3d18ce['northArrowSouthEast'],_0x3d18ce['southArrowNorth'],_0x3d18ce['northArrowSouth'],_0x3d18ce['southArrowNorthWest'],_0x3d18ce['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5e89f0,'positions':_0x41fb7c});}['_hideBalloon'](){const _0x4ac8e0=this['balloonPanelView'],_0x442d95=_0x4ac8e0['content']['first'];_0x442d95&&(this['_detachListeners'](_0x442d95),_0x4ac8e0['unpin'](),_0x4ac8e0['content']['clear']());}['_attachListeners'](_0x1212eb){this['listenTo'](_0x1212eb,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1212eb,'Esc',(_0x10e57f,_0x5dd585)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1212eb),this['_hideBalloon'](),_0x5dd585();});}['_detachListeners'](_0x1fb0cb){this['stopListening'](_0x1fb0cb);}}class c extends _0x3136d3{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0xf7176a,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8b7d56){super(_0x8b7d56),_0x8b7d56['editing']['view']['addObserver'](_0x56d6e7),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x8b7d56['plugins']['get'](_0xf7176a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x26ebfb=this['editor']['plugins']['get'](M);_0x26ebfb['context']===this['editor']&&(_0x26ebfb['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x2ba84f,_0x3970cc)=>{const _0x5d08af=this['_balloon'];if(this['isAttached']&&_0x5d08af['visibleView']){const _0x1de96=this['annotations']['getByView'](_0x5d08af['visibleView']);_0x1de96&&this['_closeAnnotation'](_0x1de96),_0x3970cc();}}));}['afterInit'](){const _0xa14160=this['editor']['plugins']['get'](M);_0xa14160['context']===this['editor']&&(_0xa14160['hasActive']()||_0xa14160['switchTo']('inline'));}['setActiveAnnotation'](_0x2c1444){_0x2c1444!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2c1444&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2c1444)&&this['_addAnnotationToBalloon'](_0x2c1444,!0x0),_0x2c1444['isActive']=!0x0),_0x2c1444||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2c1444);}['attach'](_0x54f49d){this['annotations']=_0x54f49d;const _0x34791c=this['editor']['plugins']['get'](M),_0x1d6aba=this['_balloon'];if(this['isAttached'])throw new _0x15c172('inlineannotations-attach-already-attached',this);if(_0x34791c['context']!==this['editor'])throw new _0x15c172('inlineannotations-not-allowed-with-context',this);const _0x5a01e3=this['editor']['plugins']['get'](P);this['listenTo'](_0x5a01e3,'refresh',()=>{const _0x3a6416=_0x5a01e3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x358c4e,_0x5862c4;!this['_forceRefresh']&&(_0x358c4e=_0x3a6416,_0x5862c4=this['_selectedAnnotations'],_0x358c4e['length']===_0x5862c4['length']&&_0x358c4e['every'](_0x4c1fde=>_0x5862c4['includes'](_0x4c1fde)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3a6416),this['setActiveAnnotation'](_0x3a6416[0x0]||null));}),this['listenTo'](_0x5a01e3,'blur',(_0x502e27,{isAnnotationTracked:_0x1a9222})=>{this['activeAnnotation']&&_0x1a9222(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x57a308,_0x6c2d5f,_0x764f1b)=>{_0x764f1b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x54f49d,'remove',(_0x136bfe,_0x1ffb34)=>{this['_removeAnnotationFromBalloon'](_0x1ffb34),_0x1ffb34===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1d6aba,'change:visibleView',(_0x1a49fe,_0x4342e0,_0x59ec46,_0x48266a)=>{_0x48266a&&this['stopListening'](_0x48266a);const _0x3856fb=_0x54f49d['getByView'](_0x59ec46);_0x59ec46&&_0x3856fb&&(this['listenTo'](_0x59ec46,'change:height',()=>{_0x1d6aba['updatePosition']();}),this['listenTo'](_0x59ec46,'Esc',()=>{this['_closeAnnotation'](_0x3856fb),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3856fb&&this['setActiveAnnotation'](_0x3856fb));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1d6aba['visibleView']&&(_0x54f49d['getByView'](_0x1d6aba['visibleView'])&&_0x1d6aba['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 _0x15c172('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x172400 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x172400);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x593c66){for(const _0x2decc9 of this['_selectedAnnotations'])_0x593c66['includes'](_0x2decc9)||this['_manuallyClosed']['delete'](_0x2decc9);for(const _0x2105fe of this['annotations'])_0x593c66['includes'](_0x2105fe)||this['_removeAnnotationFromBalloon'](_0x2105fe);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x45dad6 of _0x593c66)this['_addAnnotationToBalloon'](_0x45dad6);}this['_selectedAnnotations']=_0x593c66;}['_addAnnotationToBalloon'](_0x2e85bb,_0x48a285=!0x1){this['_manuallyClosed']['has'](_0x2e85bb)||(this['_addedAnnotations']['has'](_0x2e85bb)||this['_balloon']['hasView'](_0x2e85bb['view'])||(this['_addedAnnotations']['add'](_0x2e85bb),this['_balloon']['add']({'stackId':_0x2e85bb['view']['id'],'view':_0x2e85bb['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2e85bb)}})),_0x48a285&&this['_balloon']['showStack'](_0x2e85bb['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4486be){const _0x3ca19b=_0x4486be['target'],_0x470109=this['editor']['editing']['view'],_0x4a0618=_0x470109['document']['selection']['getFirstRange'](),_0x103108=_0x470109['domConverter']['viewRangeToDom'](_0x4a0618);if(_0x103108['collapse'](!0x0),_0x3ca19b){if(_0x3ca19b instanceof _0x5708d8)return _0x3ca19b;let _0x4f5ee4=[];for(const _0x517ed4 of _0x3ca19b)_0x4f5ee4['push'](...(_0x33dbfb=_0x517ed4['getClientRects'](),Array['from'](_0x33dbfb)['map'](DOMRect['fromRect'])));_0x4f5ee4=function(_0x367b04){const _0x16e269=[];let _0x1af9de=_0x367b04[0x0];for(let _0x3fb184=0x1;_0x3fb184<_0x367b04['length'];_0x3fb184++)B(_0x1af9de,_0x367b04[_0x3fb184])?_0x1af9de['width']+=_0x367b04[_0x3fb184]['width']:(_0x16e269['push'](_0x1af9de),_0x1af9de=_0x367b04[_0x3fb184]);return _0x16e269['push'](_0x1af9de),_0x16e269;}(_0x4f5ee4);const _0x4cb3aa=_0x103108['getBoundingClientRect']();return _0x4f5ee4['find'](_0x2bf6f3=>_0x2bf6f3['top']<=_0x4cb3aa['top']&&_0x2bf6f3['bottom']>=_0x4cb3aa['bottom']&&_0x2bf6f3['left']<=_0x4cb3aa['left']&&_0x2bf6f3['right']>=_0x4cb3aa['right'])||_0x4f5ee4[0x0];}var _0x33dbfb;return _0x4486be['targetRect']||_0x103108;}['_removeAnnotationFromBalloon'](_0x3bff69){this['_addedAnnotations']['has'](_0x3bff69)&&this['_balloon']['hasView'](_0x3bff69['view'])&&(this['_addedAnnotations']['delete'](_0x3bff69),this['_balloon']['remove'](_0x3bff69['view']));}['_closeAnnotation'](_0x50f2d1){this['_manuallyClosed']['add'](_0x50f2d1),this['_removeAnnotationFromBalloon'](_0x50f2d1);}}function B(_0x27979b,_0x56b9c3){return _0x27979b['top']===_0x56b9c3['top']&&_0x27979b['bottom']===_0x56b9c3['bottom']&&_0x27979b['right']===_0x56b9c3['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x294bf4,_0x629bb1){super(_0x294bf4),this['set']('isEmpty',!_0x629bb1['length']),this['focusTracker']=new _0x4998e4(),this['_annotationViews']=_0x629bb1,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4a5462({'focusables':_0x629bb1,'focusTracker':this['focusTracker']}),this['listenTo'](_0x629bb1,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x629bb1,'remove',(_0x4f0a6f,_0x66210)=>{_0x66210['isActive']&&this['focus'](),_0x629bb1['length']||(this['isEmpty']=!0x0);});const _0x243f9c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x294bf4,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x629bb1},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x243f9c['if']('isEmpty','ck-hidden',_0x5ab072=>!_0x5ab072)]},'children':[{'text':E(_0x294bf4,'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 _0x2362ec of this['_annotationViews'])this['focusTracker']['add'](_0x2362ec['element']);this['_annotationViews']['on']('change',(_0x1077f0,{added:_0xbc6d5b,removed:_0x233c76})=>{for(const _0x4ace75 of _0xbc6d5b)this['focusTracker']['add'](_0x4ace75['element']);for(const _0x5ece0f of _0x233c76)this['focusTracker']['remove'](_0x5ece0f['element']);});}}class f extends _0x2c6a5a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x1f5953){super(_0x1f5953),this['archivedThreads']=new _0x2a536e();}['init'](){const _0x523686=this['context'],_0x580aa8=_0x523686['plugins']['get'](o),_0x4d2704=_0x523686['plugins']['get'](O);this['listenTo'](_0x580aa8,'addCommentThread',(_0x34ef66,{threadId:_0x53f3a1})=>{const _0x46a5d9=_0x580aa8['getCommentThread'](_0x53f3a1);_0x46a5d9['archivedAt']&&this['archivedThreads']['add'](_0x46a5d9,this['_calculatePosition'](_0x46a5d9['archivedAt'])),this['listenTo'](_0x46a5d9,'change:archivedAt',(_0x530678,_0x18a263,_0x5e4caf)=>{_0x5e4caf?this['archivedThreads']['has'](_0x46a5d9)||this['archivedThreads']['add'](_0x46a5d9,this['_calculatePosition'](_0x46a5d9['archivedAt'])):this['archivedThreads']['has'](_0x46a5d9)&&this['archivedThreads']['remove'](_0x46a5d9);});}),this['listenTo'](_0x580aa8,'removeCommentThread',(_0x5634ee,{threadId:_0x1c35b0})=>{const _0x2148ab=_0x580aa8['getCommentThread'](_0x1c35b0);this['stopListening'](_0x2148ab),this['archivedThreads']['has'](_0x2148ab)&&this['archivedThreads']['remove'](_0x2148ab);},{'priority':'highest'}),this['listenTo'](_0x4d2704['collection'],'focus',(_0x46cac8,_0x47bb61)=>{_0x47bb61['isVisible']||(_0x47bb61['isActive']=!0x0,_0x4d2704['activate'](_0x47bb61));});}['_calculatePosition'](_0x209cf){const _0x22c67d=[...this['archivedThreads']]['findIndex'](_0x3c91cf=>_0x3c91cf['archivedAt']<_0x209cf);return _0x22c67d>-0x1?_0x22c67d:this['archivedThreads']['length'];}}class a extends _0x3136d3{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x15c150];}constructor(_0x2db29){super(_0x2db29),this['annotationViews']=new _0x1614c2(),this['_pendingThreads']=[];}['init'](){const _0x39e150=this['editor'],_0x3b75f4=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x39e150['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x501ccc,!0x0)),_0x39e150['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5a1fcf=this['_createCommentsArchiveButton'](_0x1d3340);return _0x5a1fcf['set']({'role':'menuitemcheckbox'}),_0x5a1fcf;});const _0x7d5f7d=_0x39e150['plugins']['get'](f),_0x3f5aa4=_0x39e150['plugins']['get']('Annotations'),_0x484de5=_0x39e150['plugins']['get']('CommentsRepository');_0x7d5f7d['archivedThreads']['forEach'](_0x2a0844=>{this['_handleNewThread'](_0x2a0844);}),this['listenTo'](_0x7d5f7d['archivedThreads'],'add',(_0x5e9380,_0x3384a4)=>{this['_handleNewThread'](_0x3384a4);}),this['listenTo'](_0x3f5aa4['collection'],'add',(_0x380e02,_0x2175d8)=>{const _0x5c4e30=this['_pendingThreads']['find'](_0x2c939b=>{const _0x18c45c=_0x484de5['_threadToController']['get'](_0x2c939b);return _0x18c45c&&_0x2175d8['innerView']===_0x18c45c['view'];});if(_0x5c4e30){const _0x26e9f1=this['_calculatePosition'](_0x5c4e30['archivedAt']);this['annotationViews']['add'](_0x2175d8['view'],_0x26e9f1),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5c4e30),0x1);}}),this['listenTo'](_0x7d5f7d['archivedThreads'],'remove',(_0x3cc82e,_0x5a182a)=>{const _0x4a73df=_0x39e150['config']['get']('collaboration.channelId');if(!_0x4a73df||_0x5a182a['channelId']===_0x4a73df){if(this['_pendingThreads']['includes'](_0x5a182a))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5a182a),0x1);else{const _0x228b0e=_0x484de5['_threadToController']['get'](_0x5a182a),_0x159ae3=_0x3f5aa4['getByInnerView'](_0x228b0e['view']);this['annotationViews']['remove'](_0x159ae3['view']),this['stopListening'](_0x159ae3['focusableElements']);}}}),this['listenTo'](_0x3f5aa4['collection'],'add',(_0x50a926,_0x5c139e)=>{this['listenTo'](_0x5c139e,'escape',_0x3b75f4);}),this['listenTo'](_0x3f5aa4['collection'],'remove',(_0x4bb06e,_0x92bbef)=>{this['stopListening'](_0x92bbef,'escape',_0x3b75f4);});}['_handleNewThread'](_0x23a2ba){const _0x446a06=this['editor']['plugins']['get']('CommentsRepository'),_0x3d7d27=this['editor']['plugins']['get']('Annotations'),_0x5bdbc2=this['editor']['config']['get']('collaboration.channelId');if(!_0x5bdbc2||_0x23a2ba['channelId']===_0x5bdbc2){const _0x27b9a1=_0x446a06['_threadToController']['get'](_0x23a2ba);if(!_0x27b9a1)return void this['_pendingThreads']['push'](_0x23a2ba);const _0x2a5ca4=this['_calculatePosition'](_0x23a2ba['archivedAt']),_0x4d4b18=_0x3d7d27['getByInnerView'](_0x27b9a1['view']);_0x4d4b18['isVisible']&&_0x3d7d27['_visibleAnnotations']['remove'](_0x4d4b18),this['annotationViews']['add'](_0x4d4b18['view'],_0x2a5ca4);}}['_calculatePosition'](_0x28565a){const _0x2f85db=this['editor']['config']['get']('collaboration.channelId'),_0x2cc919=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x1f440f=>_0x1f440f['channelId']===_0x2f85db)['findIndex'](_0x66fb26=>_0x66fb26['archivedAt']<_0x28565a);return _0x2cc919<0x0||_0x2cc919>this['annotationViews']['length']?this['annotationViews']['length']:_0x2cc919-0x1;}['_toggleDialog'](){const _0x24f80c=this['editor'],_0x4ca072=_0x24f80c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x24f80c['locale'],this['annotationViews'])),'commentsArchive'===_0x4ca072['id']?_0x4ca072['hide']():_0x4ca072['show']({'id':'commentsArchive','title':E(_0x24f80c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x380c51,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x59b2e7['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x13b5e9,_0x4dd87f=!0x1){const _0x114403=this['editor']['locale'],_0x357418=this['editor']['plugins']['get']('Dialog'),_0x4414d9=new _0x13b5e9(_0x114403);return _0x4414d9['bind']('isEnabled')['to'](this,'isEnabled'),_0x4414d9['bind']('isOn')['to'](_0x357418,'id',_0x8a0b39=>'commentsArchive'===_0x8a0b39),_0x4414d9['set']({'label':E(_0x114403,'COMMENTS_ARCHIVE'),'icon':_0x380c51,'isToggleable':!0x0}),_0x4dd87f&&(_0x4414d9['tooltip']=!0x0),this['listenTo'](_0x4414d9,'execute',()=>this['_toggleDialog']()),_0x4414d9;}['_hideDialogOnAnnotationEscape']=_0x3bedb2=>{const _0x1f8931=_0x3bedb2['source'];if(!this['annotationViews']['has'](_0x1f8931['view']))return;const _0x59cb06=this['editor']['plugins']['get']('Dialog');_0x59cb06['isOpen']&&'commentsArchive'===_0x59cb06['id']&&(_0x59cb06['hide'](),_0x3bedb2['stop']());};}class p extends _0x3136d3{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};
|