@ckeditor/ckeditor5-comments 47.7.0-alpha.1 → 47.7.0-alpha.3
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 +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +19 -19
- 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 +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- 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/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x5845a1={}){function _0x96c70f(_0x4b7273){return _0x4b7273['map'](_0x15cd79=>String['fromCharCode'](_0x15cd79))['join']('');}(_0x5845a1=Object['assign']({},_0x5845a1))['plugins']||(_0x5845a1['plugins']=hs['defaultPlugins']),super(_0x5845a1),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x96c70f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x96c70f([0x76,0x69,0x65,0x77])][_0x96c70f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x96c70f([0x61,0x75,0x74,0x6f]),this[_0x96c70f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x96c70f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x96c70f([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x96c70f([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x96c70f([0x6f,0x6b])});}['create'](){const _0x2676b6=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2676b6))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xe9e876=>{const _0x362586=this['model']['document']['getRoot'](),_0x5989f=_0x362586&&_0x362586['getChild'](_0x362586['childCount']-0x1);_0xe9e876['setSelection'](_0x5989f,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x441585=this['editing']['view'],_0x49fda9=_0x441585['document']['getRoot'](),_0x42c913=_0x49fda9['getChild'](0x0);_0x49fda9['childCount']>0x1||!_0x42c913||'p'!=_0x42c913['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x441585,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x42c913['placeholder']=this['placeholder']),Ft({'view':_0x441585,'element':_0x42c913,'keepOnFocus':!0x0}),this['placeholderElement']=_0x42c913);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x16def2,_0x476f33={}){super(_0x16def2),this['editor']=null,this['_editorConfig']=_0x476f33,this['set']('value',_0x476f33['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x16def2,'Reply...')),this['set']('submitLabel',N(_0x16def2,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4e7aba(),this['focusCycler']=new _0x540a82({'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',(_0x3bac99,_0x276f15)=>{this['cancelButtonView']['fire']('execute'),_0x276f15();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2023c1,_0xb98933)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xb98933());}),this['on']('submit',(_0x1634df,_0xc90006)=>{_0xc90006['length']>0xfde8?(alert(N(_0x16def2,'TOO_LONG_COMMENT_ALERT',[_0xc90006['length'],0xfde8])),_0x1634df['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0xf33acd=this['editor'];this['element']['insertBefore'](_0xf33acd['ui']['element'],this['element']['firstChild']),_0xf33acd['model']['document']['on']('change',()=>this['value']=_0xf33acd['getData']()),_0xf33acd['bind']('placeholder')['to'](this),this['focusables']['add'](_0xf33acd['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x25c98d){-0x1===_0x25c98d?(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:_0x5e42e3}=this,_0x3217df=new _0x20f04f(_0x5e42e3);return _0x3217df['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3217df['withText']=!0x0,_0x3217df['bind']('label')['to'](this,'submitLabel'),_0x3217df['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3217df['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xe80710,_0x2ef7aa)=>!_0x2ef7aa&&!!_0xe80710['trim']()),_0x3217df;}['_createCancelButton'](){const {locale:_0x5811fe}=this,_0x3cf531=new _0x20f04f(_0x5811fe);return _0x3cf531['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3cf531['label']=N(_0x5811fe,'Cancel'),_0x3cf531['withText']=!0x0,_0x3cf531['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3cf531;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4f4b78=>{this['focusTracker']['add'](_0x4f4b78['element']);}),this['focusables']['on']('change',(_0x169b77,_0xba3a21)=>{for(const _0x506ad0 of Array['from'](_0xba3a21['added'])['reverse']())this['focusTracker']['add'](_0x506ad0['element']);});}}class ie extends kt{constructor(_0x71f75e,_0x4cb5bb,_0x49a186){super(_0x71f75e),this['commentInputView']=new es(_0x71f75e,_0x49a186),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4f313b,_0x17c3e7)=>_0x4f313b||!!_0x17c3e7),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 _0x472009(_0x71f75e,_0x4cb5bb),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'](_0x36d2b6){this['commentInputView']['focus'](_0x36d2b6);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1eca1f,_0x503a87)=>{const {submitButtonView:_0x16da2f,cancelButtonView:_0x102b15,editor:_0x31ee3d}=this['commentInputView'];[_0x16da2f['element'],_0x102b15['element'],_0x31ee3d?_0x31ee3d['editing']['view']['getDomRoot']():null]['filter'](_0x21a34a=>_0x21a34a)['some'](_0x19d034=>_0x19d034['contains'](_0x503a87['target']))||(this['focus'](),_0x503a87['preventDefault']());});}}class rs extends kt{constructor(_0x5014f8){super(_0x5014f8);const _0x4032bd=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4032bd['to']('count',_0x1052c3=>N(_0x5014f8,'NUMBER_OF_COMMENTS',_0x1052c3))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5281e5,_0x456df2,_0x161963){super(_0x5281e5);const _0x1b1d82=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x456df2['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x456df2,this['_config']=_0x161963,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4e7aba(),this['keystrokes']=new jt(),this['focusCycler']=new _0x540a82({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xe6bf84=>this['commentViews']['map'](_0x5211c0=>_0x5211c0['element'])['includes'](_0xe6bf84['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5281e5),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5ac783=>_0x5ac783-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4b8bac of _0x456df2['comments'])this['_handleNewCommentModel'](_0x4b8bac);this['_handleInfoComment'](),this['listenTo'](_0x456df2['comments'],'add',(_0x5221c0,_0x497186)=>{const _0x1befe5=this['_calculatePosition'](_0x497186);this['length']++,this['_handleNewCommentModel'](_0x497186,_0x1befe5),this['refreshVisibleViews']();}),this['listenTo'](_0x456df2['comments'],'remove',(_0x20de09,_0x50b0ac)=>{this['length']--,this['_handleRemoveCommentModel'](_0x50b0ac),this['refreshVisibleViews']();}),this['listenTo'](_0x456df2,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x456df2,'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',_0x1b1d82['if']('length','ck-hidden',_0x5aa112=>!_0x5aa112)],'aria-label':N(_0x5281e5,'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'](_0x5a956a){-0x1===_0x5a956a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x348f6b of this['commentViews'])_0x348f6b['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x543ba7,_0x204852){const _0x45d345=new this['_config']['CommentView'](this['locale'],_0x543ba7,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x45d345['viewUid']=_0x543ba7['id'],_0x45d345['delegate']('removeComment')['to'](this),_0x45d345['delegate']('updateComment')['to'](this),_0x45d345['delegate']('resolveCommentThread')['to'](this),_0x45d345['delegate']('editorReady')['to'](this),_0x45d345['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x45d345,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x45d345,_0x204852);}['_calculatePosition'](_0x504f39){const _0x1a6ad5=this['_model']['_findOptimalIndex'](_0x504f39);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x504f39['authoredAt']?_0x1a6ad5-0x1:_0x1a6ad5:_0x1a6ad5-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4ed3ac={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x4ed3ac,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4ed3ac));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x585a2c){const _0x3b4184=this['commentViews']['remove'](_0x585a2c['id']);this['stopListening'](_0x3b4184),_0x3b4184['isEditMode']&&this['_updateHasDirtyComment'](),_0x3b4184['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4ca833=>_0x4ca833['isEditMode']);}['_rearrangeCollapse'](){const _0x19f00a=function(_0x447aa4){const _0x1aa295=new _0x242e1d();for(const _0x1fba2b of _0x447aa4)_0x1aa295['add'](_0x1fba2b);return _0x1aa295;}(this['commentViews']),_0x5566f9=this['_collapsedCommentsView']['count'];for(let _0x471641=0x1;_0x471641<=_0x5566f9;_0x471641++)_0x19f00a['remove'](0x1);for(const _0x299a89 of _0x19f00a)_0x299a89['collapse']();_0x5566f9>0x0&&_0x19f00a['add'](this['_collapsedCommentsView'],0x1),ns(_0x391c82(Array['from'](this['visibleViews']),Array['from'](_0x19f00a)),this['visibleViews'],_0x19f00a);}['_rearrangeExpand'](){ns(_0x391c82(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x34c6ae of this['visibleViews'])_0x34c6ae['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x45609a=>{this['focusTracker']['add'](_0x45609a['element']),this['keystrokes']['listenTo'](_0x45609a['element']);}),this['commentViews']['on']('change',(_0x58466a,_0x3bec74)=>{for(const _0x9ecd03 of _0x3bec74['removed'])this['focusTracker']['remove'](_0x9ecd03['element']),this['keystrokes']['stopListening'](_0x9ecd03['element']);for(const _0x67dbd3 of Array['from'](_0x3bec74['added'])['reverse']())this['focusTracker']['add'](_0x67dbd3['element']),this['keystrokes']['listenTo'](_0x67dbd3['element']);});}}function ns(_0x474b31,_0x280406,_0x138d73){let _0x499fb6=0x0;for(const _0x4cc19b of _0x474b31)switch(_0x4cc19b){case'insert':_0x280406['add'](_0x138d73['get'](_0x499fb6),_0x499fb6),_0x499fb6++;break;case'delete':_0x280406['remove'](_0x499fb6);break;case'equal':_0x499fb6++;}}class oe extends kt{constructor(_0x3802ff){super(_0x3802ff);const _0x4cc835=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4cc835['to']('contextValue',_0x3c26e8=>N(_0x3802ff,'THREAD_CONTEXT_LABEL',_0x3c26e8)),'tabindex':-0x1},'children':[{'text':_0x4cc835['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x596d67,_0x42e85d){super(_0x596d67);const _0x28aed0=this['bindTemplate'];this['_model']=_0x42e85d,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4e7aba(),this['keystrokes']=new jt(),this['focusCycler']=new _0x540a82({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5645db=>!!_0x5645db),this['bind']('contextValue')['to'](this['_model'],'context',_0x589172=>_0x589172&&_0x589172['value']?this['_trimContextValue'](_0x589172['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x28aed0['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 _0x2f44f7=new _0x20f04f(this['locale']);return _0x2f44f7['label']=N(this['locale'],'Reopen'),_0x2f44f7['tooltip']=N(this['locale'],'Reopen'),_0x2f44f7['icon']=_0x2ec0bc,_0x2f44f7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4b9fc0=>!_0x4b9fc0),_0x2f44f7['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x45beb6,_0x16c69f)=>_0x45beb6&&_0x16c69f),_0x2f44f7['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2f44f7;}['_trimContextValue'](_0x2f0229){if(_0x2f0229['length']<0x96)return _0x2f0229;const _0x419833=_0x2f0229['lastIndexOf']('\x20',0x93);return _0x2f0229['substring'](0x0,_0x419833>-0x1?_0x419833:0x93)+'...';}['_attachContextActions'](){const _0x5a57c8=this['element']['querySelector']('.ck-context'),_0x2da981=_0x5a57c8['querySelector']('.ck-context__value');this['listenTo'](_0x5a57c8,'mouseenter',()=>{_0x2da981['offsetWidth']<_0x2da981['scrollWidth']&&_0x5a57c8['classList']['add']('overlay');}),this['listenTo'](_0x5a57c8,'mouseleave',()=>{_0x5a57c8['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x41660d of this['focusables'])this['focusTracker']['add'](_0x41660d['element']),this['keystrokes']['listenTo'](_0x41660d['element']);}['_createContextView'](){const _0x537108=new oe(this['locale']);return _0x537108['bind']('contextValue')['to'](this),_0x537108;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x28c99e,_0xacb518,_0x17ad22,_0x494817){super(_0x28c99e),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xacb518,this['_localUser']=_0x17ad22,this['_config']=_0x494817,this['commentThreadHeaderView']=new Xt(_0x28c99e,_0xacb518),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x28c99e,N(_0x28c99e,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x28c99e,_0xacb518,Object['assign']({'CommentView':this['_config']['CommentView']},_0x494817)),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',(_0x54a252,_0x12ab22)=>_0x54a252||!!_0x12ab22),this['bind']('isUnlinked')['to'](_0xacb518,'unlinkedAt',_0x18c612=>!!_0x18c612),this['bind']('ariaLabel')['to'](this,'length',_0x2a6e62=>{const _0x38daad=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x2a6e62,_0x38daad]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4e7aba(),this['keystrokes']=new jt(),this['focusCycler']=new _0x540a82({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x27349a=>_0x27349a['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 _0x22df29=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3d365a=_0x22df29['commentInputView'];return _0x22df29['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3d365a,'value',(_0x841a55,_0x18eda1,_0x1611bb,_0x3e7479,_0x527db5)=>!!_0x527db5||!!_0x3e7479&&_0x1611bb&&!_0x18eda1||_0x841a55&&_0x1611bb&&!_0x18eda1),_0x3d365a['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x172f9c,_0x406de3,_0x56ede3)=>{let _0x529d9d;return _0x529d9d=_0x56ede3&&_0x406de3?'Reply\x20to\x20reopen\x20discussion...':_0x172f9c?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x529d9d);}),_0x3d365a['bind']('submitLabel')['to'](this,'length',_0x2fe337=>N(this['locale'],_0x2fe337?'Reply':'Comment')),_0x3d365a['on']('submit',(_0x32c526,_0x2f5537)=>{this['fire']('addComment',_0x2f5537),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3d365a['on']('cancel',()=>{this['focus']();}),_0x3d365a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3d365a['on']('cancel',_0x4654a2=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4654a2['stop']());}),this['on']('change:isActive',(_0x342b45,_0x3aa710,_0x3e55b1)=>{_0x3e55b1||this['length']||_0x3d365a['value']||this['fire']('removeCommentThread');}),_0x22df29;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x127aff(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2534f5,target:_0x21fd4c,type:_0x5d4166,isVisible:_0x12573e=!0x0}){super(),this['view']=_0x2534f5,this['view']['element']||this['view']['render'](),this['_type']=_0x5d4166,this['_target']=_0x21fd4c,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x242e1d([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x602ab9,_0xef5cfe)=>{this['view']['focusTracker']['add'](_0xef5cfe);}),this['focusableElements']['on']('remove',(_0x5c404f,_0x521ddb)=>{this['view']['focusTracker']['remove'](_0x521ddb);}),this['set']('isVisible',_0x12573e);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1d4ba1=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x1d4ba1),_0x1d4ba1;}get['targetRect'](){const _0x256ea6=this['target'];if(null===_0x256ea6)return null;if(_0x256ea6 instanceof _0x5c3397)return _0x256ea6;const _0x21c996=_0x256ea6['filter'](_0x1ab006=>function(_0x1cea1f){const _0x527df9=_0x1cea1f['offsetParent'];if(_0x527df9)return!0x0;const _0x5cc399=_0x1cea1f['getClientRects']()['item'](0x0);return!!_0x5cc399;}(_0x1ab006));return 0x0===_0x21c996['length']?null:new _0x5c3397(_0x21c996[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x28ebf2){this['view']['isActive']=_0x28ebf2,this['view']['mainView']['isActive']=_0x28ebf2;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x441d1d){if(!(null===_0x441d1d||_0x441d1d instanceof _0x5c3397||Array['isArray'](_0x441d1d)&&_0x441d1d['every'](_0x207116=>fi(_0x207116))))throw new _0x425354('annotation-invalid-target',null,{'target':_0x441d1d});}['_getNormalizedTarget'](){const _0x5c5435='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5c5435)?[_0x5c5435]:_0x5c5435;}}function fi(_0x47e222){return null!==_0x47e222&&'object'==typeof _0x47e222&&'nodeType'in _0x47e222&&0x1===_0x47e222['nodeType'];}class S extends _0x242e1d{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3426c1=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4e7aba(),this['_focusTracker']['on']('change:isFocused',(_0x54eddd,_0x43609a,_0x4d80e2)=>{_0x4d80e2||this['fire']('blur');});for(const _0x589742 of _0x3426c1)this['add'](_0x589742);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x594536){if(this['has'](_0x594536))throw new _0x425354('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x594536['innerView'],_0x594536),this['_viewToAnnotation']['set'](_0x594536['view'],_0x594536);for(const _0x624cd3 of _0x594536['focusableElements'])this['_focusTracker']['add'](_0x624cd3);this['listenTo'](_0x594536['focusableElements'],'add',(_0x16f68f,_0x39d292)=>{this['_focusTracker']['add'](_0x39d292);}),this['listenTo'](_0x594536['focusableElements'],'remove',(_0x418062,_0x47382f)=>{this['_focusTracker']['remove'](_0x47382f);}),this['listenTo'](_0x594536['view']['focusTracker'],'change:isFocused',(_0x163602,_0x22f409,_0x22eecb)=>{_0x22eecb&&this['fire']('focus',_0x594536);}),_0x594536['updateTargetRect']();const _0x16eabc=this['_getOrderInContent'](_0x594536['view']['targetRect']);return super['add'](_0x594536,_0x16eabc);}['remove'](_0x4474af){if(!this['has'](_0x4474af))throw new _0x425354('annotationcollection-not-existing-item',null);this['stopListening'](_0x4474af['view']['focusTracker']),this['stopListening'](_0x4474af['focusableElements']);for(const _0x22844e of _0x4474af['focusableElements'])this['_focusTracker']['remove'](_0x22844e);return this['_viewToAnnotation']['delete'](_0x4474af['view']),this['_innerViewToAnnotation']['delete'](_0x4474af['innerView']),super['remove'](_0x4474af);}['getByInnerView'](_0x2115c3){return this['_innerViewToAnnotation']['get'](_0x2115c3);}['getByView'](_0x390d3b){return this['_viewToAnnotation']['get'](_0x390d3b);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x5b038b of this)_0x5b038b['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2a2b7e=Array['from'](this)['sort']((_0x31de6e,_0x78620a)=>w(_0x31de6e['view']['targetRect'],_0x78620a['view']['targetRect']));for(let _0x399153=_0x2a2b7e['length']-0x1;_0x399153>0x0;_0x399153--){const _0x5a52bb=_0x2a2b7e[_0x399153];_0x399153!==this['getIndex'](_0x5a52bb)&&(this['remove'](_0x5a52bb),this['add'](_0x5a52bb));}}['_getOrderInContent'](_0x3735bf){let _0x2c8a90=0x0;if(!_0x3735bf)return this['length'];for(const _0x4cfd00 of this){const _0x391dfd=_0x4cfd00['view']['targetRect'];if(_0x391dfd){if(w(_0x3735bf,_0x391dfd)<0x0)return _0x2c8a90;_0x2c8a90++;}}return _0x2c8a90;}}function v({source:_0x355ba0,target:_0x28e588,filter:_0x57ada7}){for(const _0x48308f of _0x355ba0)_0x57ada7(_0x48308f)&&_0x28e588['add'](_0x48308f);_0x28e588['listenTo'](_0x355ba0,'add',(_0x3de77e,_0x4463a3)=>{_0x57ada7(_0x4463a3)&&_0x28e588['add'](_0x4463a3);}),_0x28e588['listenTo'](_0x355ba0,'remove',(_0x211b3a,_0x12f1b6)=>{_0x28e588['has'](_0x12f1b6)&&_0x28e588['remove'](_0x12f1b6);});}function w(_0x23a7af,_0x4b9965){if(null===_0x23a7af&&null===_0x4b9965)return 0x0;if(null===_0x23a7af)return-0x1;if(null===_0x4b9965)return 0x1;const _0x29f6b6=_0x23a7af['top']-_0x4b9965['top'];return 0x0==_0x29f6b6?_0x23a7af['left']-_0x4b9965['left']:_0x29f6b6;}class y extends _0x4bfeb4{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3161d9){if(super(_0x3161d9),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3161d9 instanceof _0x3f6b93){const _0x111e80=_0x3161d9['locale'];_0x3161d9['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x111e80,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x111e80,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x111e80,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x111e80,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x111e80,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x111e80,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x111e80,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x56f31d){this['collection']['add'](_0x56f31d);}['remove'](_0x2f9de3){this['collection']['remove'](_0x2f9de3),_0x2f9de3['destroy']();}['refreshVisibility'](){for(const _0x1bbf5e of this['collection'])_0x1bbf5e['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3b9db5){return this['collection']['getByInnerView'](_0x3b9db5);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1f9a10 of this['collection'])_0x1f9a10['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4835ae){this['fire']('_activateAnnotation',_0x4835ae);}['createAnnotation'](_0x5e2095){return new T(_0x5e2095);}['createAnnotationView'](_0x1e0cee,_0x1db3b3){return new E(_0x1e0cee,_0x1db3b3);}['_addActiveAnnotation'](_0x3a3a2b){const _0x5a1d7f=new Set(this['activeAnnotations']);_0x5a1d7f['add'](_0x3a3a2b),this['activeAnnotations']=_0x5a1d7f;}['_removeActiveAnnotation'](_0x106c77){const _0x4cf7cc=new Set(this['activeAnnotations']);_0x4cf7cc['delete'](_0x106c77),this['activeAnnotations']=_0x4cf7cc;}['_bindAnnotationsToVisibleAnnotations'](){const _0x41b111=this['collection'],_0x408b07=this['_visibleAnnotations'];function _0x2041d5(_0xe9b0ba){const _0x33c1af=_0xe9b0ba['source'];_0x33c1af['isVisible']&&!_0x408b07['has'](_0x33c1af)?_0x408b07['add'](_0x33c1af):!_0x33c1af['isVisible']&&_0x408b07['has'](_0x33c1af)&&_0x408b07['remove'](_0x33c1af),_0x33c1af['view']['focusTracker']['remove'](_0x33c1af['view']['element']),_0x33c1af['view']['focusTracker']['add'](_0x33c1af['view']['element']);}this['listenTo'](_0x41b111,'add',(_0x4a1c60,_0x1159a1)=>{_0x1159a1['isVisible']&&_0x408b07['add'](_0x1159a1),this['listenTo'](_0x1159a1,'change:isVisible',_0x2041d5);}),this['listenTo'](_0x41b111,'remove',(_0xb40f3d,_0x2a1985)=>{_0x408b07['has'](_0x2a1985)&&_0x408b07['remove'](_0x2a1985),this['stopListening'](_0x2a1985,'change:isVisible',_0x2041d5);});}['_setupEnterAnnotationKeystroke'](){const _0x4e5ba1=_0x1b8816=>{_0x1b8816['on']('ready',()=>{_0x1b8816['keystrokes']['set'](_0x4ac5fe,(_0x4ef4c0,_0x295269)=>{const _0x47b89b=_0x19b567(this['activeAnnotations']['values']());_0x47b89b&&(_0x47b89b['view']['focus'](),_0x295269());});});};this['context']instanceof _0x3f6b93?_0x4e5ba1(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x45e822,_0x45aa64)=>{_0x4e5ba1(_0x45aa64);});}['_setupEscapeAnnotationHandling'](){const _0xc70462=_0x583078=>{const _0x495b99=_0x583078['source'],_0x5791cc=[];let _0xb32fe1;if(Array['isArray'](_0x495b99['target'])){_0xb32fe1=_0x495b99['target'][0x0],this['context']instanceof _0x3f6b93?_0x5791cc['push'](this['context']):this['context']['editors']&&_0x5791cc['push'](...this['context']['editors']);for(const _0x5e5e6b of _0x5791cc)for(const _0x5a13d1 of _0x5e5e6b['editing']['view']['domRoots']['values']())if(_0x5a13d1['contains'](_0xb32fe1))return void _0x5e5e6b['editing']['view']['focus']();_0xb32fe1['focus']();}};this['listenTo'](this['collection'],'add',(_0x2544ba,_0x4157a7)=>{this['listenTo'](_0x4157a7,'escape',_0xc70462,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x51eae5,_0x8a0b02)=>{this['stopListening'](_0x8a0b02,'escape',_0xc70462);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4bfeb4{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29bc30){super(_0x29bc30),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5fcfce=this['context']['config'];_0x5fcfce['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5fcfce['define']('comments.maxThreadTotalWeight',0x1f4),_0x5fcfce['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5fcfce['define']('comments.CommentThreadView',gt),_0x5fcfce['define']('comments.CommentView',Tt),_0x5fcfce['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1f7817=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x30ac8c,_0x42db10)=>this['_addCommentThread'](_0x42db10)),this['on']('submitCommentThread',(_0x3367a1,_0x4bd778)=>this['_submitCommentThread'](_0x4bd778)),this['on']('resolveCommentThread',(_0x1d4bc8,_0x1e38e8)=>this['_resolveCommentThread'](_0x1e38e8)),this['on']('resolveCommentThread',(_0x53430f,_0x39b121)=>this['_updateActiveAnnotation'](_0x39b121),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x4a9035,_0x223189)=>this['_reopenCommentThread'](_0x223189)),this['on']('reopenCommentThread',(_0x49bb9a,_0x32336d)=>this['_updateActiveAnnotation'](_0x32336d),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4fbe01,_0x5704f5)=>this['_removeCommentThread'](_0x5704f5)),this['on']('updateCommentThread',(_0x38d7ed,_0x780d65)=>this['_updateCommentThread'](_0x780d65)),this['on']('updateCommentThread',(_0x30e74f,_0x2e48b7)=>this['_updateActiveAnnotation'](_0x2e48b7),{'priority':'lowest'}),this['on']('addComment',(_0x5e5fc4,_0x323bd3)=>this['_addComment'](_0x323bd3)),this['on']('updateComment',(_0x4926af,_0xf59828)=>this['_updateComment'](_0xf59828)),this['on']('removeComment',(_0xbb32c1,_0x4f05ab)=>this['_removeComment'](_0x4f05ab)),this['on']('addComment',(_0x359e0f,{threadId:_0x72f94,isFromAdapter:_0x39cf14})=>{if(_0x39cf14)return;const _0x2b7c2f=this['getCommentThread'](_0x72f94),_0x46dc55=_0x2b7c2f&&this['_threadToController']['get'](_0x2b7c2f);_0x46dc55&&_0x46dc55['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1f7817,'change:activeAnnotations',(_0xa7007b,_0x3dad9d,_0x5b2a3b)=>{const _0x446869=Array['from'](_0x5b2a3b)['map'](_0x4d9038=>this['_viewToController']['get'](_0x4d9038['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x446869?_0x446869['model']:null;});}set['adapter'](_0x239ad5){if(this['_adapter'])throw new _0x425354('commentsrepository-adapter-already-set');this['_adapter']=_0x239ad5;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3001f7=_t,threadId:_0x5913c9=_0x260e0b(),comments:_0x8ecd7=[],unlinkedAt:_0xb4d7ec=null,resolvedAt:_0x5c7fd6=null,resolvedBy:_0x3da836=null,target:_0x11b35a=null,context:_0x2aaea8=null,attributes:_0x46c0bf={},isResolvable:_0x9fe40d=!0x0,isSubmitted:_0x13bf16=!0x1,isFromAdapter:_0xf7bf23=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x3001f7),{'channelId':_0x3001f7,'threadId':_0x5913c9,'comments':_0x8ecd7,'unlinkedAt':_0xb4d7ec,'resolvedAt':_0x5c7fd6,'resolvedBy':_0x3da836,'target':_0x11b35a,'context':_0x2aaea8,'attributes':_0x46c0bf,'isFromAdapter':_0xf7bf23,'isResolvable':_0x9fe40d,'isSubmitted':_0x13bf16}),this['getCommentThread'](_0x5913c9);}['openNewCommentThread']({channelId:_0x308d42=_t,threadId:_0x229847=_0x260e0b(),target:_0x4b1865,context:_0x1bbb68=null,isResolvable:_0x3b16bf=!0x0}){if(this['_readOnlyChannels']['has'](_0x308d42)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4b1865)throw new _0x425354('commentsrepository-missing-target');const _0xc42ba7=this['addCommentThread']({'channelId':_0x308d42,'threadId':_0x229847,'target':_0x4b1865,'context':_0x1bbb68,'isResolvable':_0x3b16bf});if(!_0xc42ba7)return null;const _0x5e2808=this['_threadToController']['get'](_0xc42ba7),_0x2b382b=_0x5e2808['view']['commentThreadInputView']['commentInputView'],_0x39a6f6=this['context']['plugins']['get'](y),_0x1e450b=_0x39a6f6['getByInnerView'](_0x5e2808['view']);return _0x39a6f6['activate'](_0x1e450b),_0x2b382b['once']('editorReady',()=>_0x2b382b['focus']()),_0xc42ba7;}['hasCommentThread'](_0x490005){if('string'!=typeof _0x490005)throw new _0x425354('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x490005);}['updateCommentThread']({channelId:_0x20ddc5=_t,threadId:_0xd842f1,context:_0x2191d4,unlinkedAt:_0x3f62fd,attributes:_0x31bd4f,isFromAdapter:_0x3911a3=!0x1}){return this['fire'](Nt('updateCommentThread',_0x20ddc5),{'channelId':_0x20ddc5,'threadId':_0xd842f1,'context':_0x2191d4,'unlinkedAt':_0x3f62fd,'attributes':_0x31bd4f,'isFromAdapter':_0x3911a3}),this['getCommentThread'](_0xd842f1);}['getCommentThread'](_0x2d51d4){if('string'!=typeof _0x2d51d4)throw new _0x425354('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2d51d4);}['fetchCommentThread']({channelId:_0x5762f3,threadId:_0x20efee}={}){const _0x23d866=this['getCommentThread'](_0x20efee);if(_0x23d866)return Promise['resolve'](_0x23d866);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x425354('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5762f3,'threadId':_0x20efee})['then'](_0x3b7d27=>this['hasCommentThread'](_0x20efee)?this['getCommentThread'](_0x20efee):_0x3b7d27?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5762f3},_0x3b7d27)):void 0x0)['catch'](_0x963a33=>{throw console['error'](_0x963a33),new _0x425354('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x3348b7,skipNotAttached:_0x482c90=!0x1,skipEmpty:_0x4d5757=!0x1,toJSON:_0x322a8c=!0x1}={}){const _0x3e2866=[];for(const _0x4370d1 of this['_threads']['values']())_0x3348b7&&_0x4370d1['channelId']!==_0x3348b7||_0x482c90&&!_0x4370d1['isAttached']||_0x4d5757&&0x0===_0x4370d1['length']||_0x3e2866['push'](_0x4370d1);return _0x322a8c?_0x3e2866['map'](_0x32595b=>_0x32595b['toJSON']()):_0x3e2866;}['getAnnotationForCommentThread'](_0xbad130){const _0x3d13e7=this['_threadToController']['get'](_0xbad130);if(!_0x3d13e7)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x3d13e7['view'])||null;}['getCommentThreadForAnnotation'](_0x5c8d75){const _0x57b7c4=this['_viewToController']['get'](_0x5c8d75['innerView']);return _0x57b7c4?_0x57b7c4['model']:null;}['setActiveCommentThread'](_0x1df1eb){const _0x167883=this['context']['plugins']['get'](y);if(!_0x1df1eb)return void(this['activeCommentThread']&&_0x167883['deactivateAll']());const _0x4188d8=this['getCommentThread'](_0x1df1eb);if(!_0x4188d8)throw new _0x425354('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1df1eb});if(!this['_threadToController']['has'](_0x4188d8))throw new _0x425354('commentsrepository-active-not-attached',null,{'threadId':_0x1df1eb});const _0x511707=_0x167883['getByInnerView'](this['_threadToController']['get'](_0x4188d8)['view']);_0x167883['activate'](_0x511707);}['switchReadOnly'](_0x3388c0,_0x20191f){_0x3388c0?this['_readOnlyChannels']['add'](_0x20191f):this['_readOnlyChannels']['delete'](_0x20191f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x15fb17){return this['_readOnlyChannels']['has'](_0x15fb17)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3c313f,_0x147c86){return new vt(_0x3c313f,_0x147c86);}['setPermissions'](_0xf8a20b,_0x578a7c=_t){this['_permissions']['set'](_0x578a7c,_0xf8a20b),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3091b4=_t){return this['_permissions']['has'](_0x3091b4)?this['_permissions']['get'](_0x3091b4):bt;}['_addCommentThread']({channelId:_0x28afee,threadId:_0xe3b6e6,comments:_0x1044e7,unlinkedAt:_0x38b7b4,resolvedAt:_0x460a38,resolvedBy:_0x713101,target:_0x486232,context:_0x2aa437,attributes:_0x4f8b65,isFromAdapter:_0x28348d,isResolvable:_0x563e0c,isSubmitted:_0x499585}){if('string'!=typeof _0xe3b6e6)throw new _0x425354('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xe3b6e6});if(this['hasCommentThread'](_0xe3b6e6))throw new _0x425354('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xe3b6e6});const _0x4431de=new pi(this,{'channelId':_0x28afee,'id':_0xe3b6e6,'context':_0x2aa437,'attributes':_0x4f8b65,'unlinkedAt':_0x38b7b4,'resolvedAt':_0x460a38,'resolvedBy':_0x713101?this['context']['plugins']['get'](it)['getUser'](_0x713101):null,'isResolvable':_0x563e0c,'isSubmitted':_0x499585||_0x28348d});this['_threads']['set'](_0xe3b6e6,_0x4431de);for(const _0x2a431a of _0x1044e7)_0x4431de['_add'](this['_createNewComment']({'threadId':_0xe3b6e6,..._0x2a431a}));return _0x486232&&_0x4431de['attachTo'](_0x486232),_0x28348d||!_0x4431de['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x28afee,'threadId':_0xe3b6e6});}['_submitCommentThread']({channelId:_0x5875b0,threadId:_0x18afc9}){if(!this['hasCommentThread'](_0x18afc9))throw new _0x425354('commentsrepository-missing-comment-thread',this);const _0x4a4122=this['getCommentThread'](_0x18afc9);if(_0x4a4122['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x354e47,comments:_0x49b105,resolvedAt:_0x37cc10,resolvedBy:_0x37bd01,context:_0x4f3977,attributes:_0x40abba}=_0x4a4122,_0x32088b=this['context']['plugins']['get']('PendingActions'),_0x1f74f0=_0x32088b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x5875b0,'threadId':_0x354e47,'comments':_0x49b105['map'](_0x413656=>_0x413656['toJSON']()),'resolvedAt':_0x37cc10,'resolvedBy':_0x37bd01?_0x37bd01['id']:_0x37bd01,'context':_0x4f3977,'attributes':_0x40abba})['then'](({comments:_0x400b33})=>{_0x32088b['remove'](_0x1f74f0);for(const _0x44d117 of _0x400b33)this['_updateComment']({'channelId':_0x5875b0,'threadId':_0x18afc9,'commentId':_0x44d117['commentId'],'createdAt':_0x44d117['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xfcc11b=>{throw console['error'](_0xfcc11b),new _0x425354('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x239233,target:_0x5ab59f}){const _0x50fc6c=this['getCommentThread'](_0x239233);if(!_0x50fc6c)throw new _0x425354('commentsrepository-attach-missing-comment-thread',this);const _0x1c3ee9=this['context']['plugins']['get']('PendingActions'),_0x13f40d=this['context']['plugins']['get'](y),_0x57ab3e=this['_createCommentThreadView'](_0x50fc6c),_0x53292d=new vt(_0x50fc6c,_0x57ab3e);let _0x12f79c=null;_0x57ab3e['on']('change:isDirty',(_0x34d447,_0x173719,_0x1efa9e)=>{_0x1efa9e?_0x12f79c=_0x1c3ee9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x12f79c&&(_0x1c3ee9['remove'](_0x12f79c),_0x12f79c=null);}),this['_threadToController']['set'](_0x50fc6c,_0x53292d),this['_viewToController']['set'](_0x57ab3e,_0x53292d);const _0x12743b=new E(this['context']['locale'],_0x57ab3e);_0x12743b['bind']('length')['to'](_0x57ab3e),_0x12743b['bind']('isDirty')['to'](_0x57ab3e,'isDirty',_0x57ab3e,'length',(_0x1f3f95,_0x31b38c)=>_0x1f3f95||!_0x31b38c),_0x12743b['bind']('isActive')['to'](_0x57ab3e),_0x12743b['type']='comment';const _0x46ae76=new T({'view':_0x12743b,'target':_0x5ab59f,'type':'comment','isVisible':!_0x50fc6c['archivedAt']&&!!('function'==typeof _0x5ab59f?_0x5ab59f():_0x5ab59f)});return _0x57ab3e['on']('escape',()=>{_0x46ae76['fire']('escape');}),this['_bindAnnotationToEditors'](_0x57ab3e,_0x46ae76),_0x13f40d['add'](_0x46ae76),_0x46ae76;}['_bindAnnotationToEditors'](_0x32155c,_0x54ea23){this['listenTo'](_0x32155c,'editorReady',(_0x487125,_0x15d9fc)=>{const _0x1ab835=_0x15d9fc['ui']['view']['body']['bodyCollectionContainer'];_0x54ea23['focusableElements']['add'](_0x1ab835),this['context']instanceof _0x3f6b93&&this['context']['ui']['focusTracker']['add'](_0x1ab835);},{'priority':'highest'}),this['listenTo'](_0x32155c,'editorDestroyed',(_0x25e935,_0x328acd)=>{const _0x691253=_0x328acd['ui']['view']['body']['bodyCollectionContainer'];_0x54ea23['focusableElements']['has'](_0x691253)&&_0x54ea23['focusableElements']['remove'](_0x691253),this['context']instanceof _0x3f6b93&&this['context']['ui']['focusTracker']['remove'](_0x691253);});}['_unbindEditors'](_0x435798){this['stopListening'](_0x435798,'editorReady'),this['stopListening'](_0x435798,'editorDestroyed');}['_createCommentThreadView'](_0x164d06){const _0x218882=this['context']['plugins']['get'](it),{config:_0x4b15be,locale:_0x2b1bee}=this['context'],_0x50ec98=pt(_0x4b15be['get']('locale'),_0x2b1bee);return new(0x0,(_0x4b15be['get']('comments'))['CommentThreadView'])(_0x2b1bee,_0x164d06,_0x218882['me'],{'editorConfig':{..._0x4b15be['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4b15be['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4b15be['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4b15be['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4b15be['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x50ec98,'CommentView':_0x4b15be['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x35ae53,channelId:_0x7e03ff,resolvedAt:_0x474bac,resolvedBy:_0x56045d,isFromAdapter:_0x384f78}){if(!this['hasCommentThread'](_0x35ae53))throw new _0x425354('commentsrepository-missing-comment-thread',null,{'threadId':_0x35ae53});const _0xf5fbc0=this['getCommentThread'](_0x35ae53);if(_0xf5fbc0['isResolved'])throw new _0x425354('commentsrepository-resolved-comment-thread',null,{'threadId':_0x35ae53});const _0x18a0ab=this['context']['plugins']['get'](it);if(_0xf5fbc0['resolvedBy']=_0x18a0ab['getUser'](_0x56045d),_0xf5fbc0['resolvedAt']=_0x474bac,_0x384f78||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x63671d=this['context']['plugins']['get']('PendingActions'),_0x5a786a=_0x63671d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x7e03ff,'threadId':_0x35ae53})['then'](({resolvedAt:_0x1e6898,resolvedBy:_0x212da8})=>{_0x63671d['remove'](_0x5a786a),_0xf5fbc0['resolvedBy']['id']!==_0x212da8&&(_0xf5fbc0['resolvedBy']=_0x18a0ab['getUser'](_0x212da8)),_0xf5fbc0['resolvedAt']=_0x1e6898;})['catch'](_0x206b44=>{throw console['error'](_0x206b44),new _0x425354('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5accfc,channelId:_0xd8bf,isFromAdapter:_0x572162}){if(!this['hasCommentThread'](_0x5accfc))throw new _0x425354('commentsrepository-missing-comment-thread',null,{'threadId':_0x5accfc});const _0x193f66=this['getCommentThread'](_0x5accfc);if(!_0x193f66['isResolved'])throw new _0x425354('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5accfc});if(_0x193f66['resolvedBy']=null,_0x193f66['resolvedAt']=null,_0x572162||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xc080b5=this['context']['plugins']['get']('PendingActions'),_0x53c7c4=_0xc080b5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xd8bf,'threadId':_0x5accfc})['then'](()=>_0xc080b5['remove'](_0x53c7c4))['catch'](_0x3c57fb=>{throw console['error'](_0x3c57fb),new _0x425354('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x37ea2f,isFromAdapter:_0x271378}){const _0x36c91b=this['getCommentThread'](_0x37ea2f);if(!_0x36c91b)throw new _0x425354('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x37ea2f),this['_threads']['delete'](_0x37ea2f),!_0x36c91b['isSubmitted']||_0x271378||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5686c0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5c9b9c}=_0x36c91b,_0x22e40a=_0x5686c0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5c9b9c,'threadId':_0x37ea2f})['then'](()=>_0x5686c0['remove'](_0x22e40a))['catch'](_0x472fe2=>{throw console['error'](_0x472fe2),new _0x425354('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2025b8,unlinkedAt:_0x55cecc,context:_0x433693,attributes:_0x4d5f21,isFromAdapter:_0x2a8a1f}){if('string'!=typeof _0x2025b8)throw new _0x425354('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2025b8});if(!this['hasCommentThread'](_0x2025b8))throw new _0x425354('commentsrepository-missing-comment-thread',null,{'threadId':_0x2025b8});const _0x3f32b1=this['getCommentThread'](_0x2025b8);let _0x2b9d17=!0x1;if(void 0x0!==_0x433693&&_0x3f32b1['context']!==_0x433693&&(_0x3f32b1['context']=_0x433693,_0x2b9d17=!0x0),void 0x0!==_0x55cecc&&_0x3f32b1['unlinkedAt']!==_0x55cecc&&(_0x3f32b1['unlinkedAt']=_0x55cecc,_0x2b9d17=!0x0),_0x4d5f21&&!At(_0x4d5f21,_0x3f32b1['attributes'])&&(_0x3f32b1['attributes']=_0x4d5f21,_0x2b9d17=!0x0),!_0x2b9d17)return Promise['resolve']();if(!_0x3f32b1['isSubmitted']||_0x2a8a1f||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xa23296=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1fafaa}=_0x3f32b1,_0x1062e1=_0xa23296['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1fafaa,'threadId':_0x2025b8,'context':_0x433693,'unlinkedAt':_0x55cecc,'attributes':_0x4d5f21})['then'](()=>_0xa23296['remove'](_0x1062e1))['catch'](_0x4cf349=>{throw console['error'](_0x4cf349),new _0x425354('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x52b9d5){const _0x504868=this['context']['plugins']['get'](y),_0x5e5c1e=this['getCommentThread'](_0x52b9d5);if(_0x5e5c1e['_isAttached']=!0x1,this['_threadToController']['has'](_0x5e5c1e)){const _0xc190bc=this['_threadToController']['get'](_0x5e5c1e),_0xd76218=_0xc190bc['view'],_0x5d067e=_0x504868['getByInnerView'](_0xd76218);this['_threadToController']['delete'](_0x5e5c1e),this['_viewToController']['delete'](_0xd76218),_0x5d067e&&_0x504868['remove'](_0x5d067e),_0xc190bc['destroy'](),_0xd76218['destroy']()['then'](()=>{this['_unbindEditors'](_0xd76218);});}}['_updateActiveAnnotation']({threadId:_0x519fd7,resolvedAt:_0x2cb912,unlinkedAt:_0x275591}){const _0x167f22=!!_0x2cb912,_0x3a8c8a=this['context']['plugins']['get'](y),_0x262b0f=this['getCommentThread'](_0x519fd7);if(this['_threadToController']['has'](_0x262b0f)){const _0x323118=this['_threadToController']['get'](_0x262b0f)['view'],_0x1299f8=_0x3a8c8a['getByInnerView'](_0x323118);_0x1299f8&&(_0x167f22&&_0x3a8c8a['_removeActiveAnnotation'](_0x1299f8),_0x275591?_0x1299f8['isVisible']=!0x1:_0x1299f8['refreshVisibility']());}}['_getExternalAuthor'](_0x390d8d){const _0x4f5652=this['context']['plugins']['get'](it),_0x1dc7e2=It('external:'+_0x390d8d),_0xbecf77=_0x4f5652['getUser'](_0x1dc7e2);return _0xbecf77||_0x4f5652['addUser']({'id':_0x1dc7e2,'name':_0x390d8d});}['_createNewComment']({threadId:_0x1e84a3,commentId:_0x4115e4=_0x260e0b(),content:_0x12bff4,authorId:_0x1da879,createdAt:_0x4d61d9,attributes:_0x567ba2}){if('string'!=typeof _0x4115e4)throw new _0x425354('commentsrepository-invalid-commentid');if('string'!=typeof _0x1da879)throw new _0x425354('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x12bff4||!_0x12bff4['trim']())throw new _0x425354('commentsrepository-invalid-comment-content');const _0x5bae8f=this['context']['plugins']['get'](it)['getUser'](_0x1da879);if(!_0x5bae8f)throw new _0x425354('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1da879});let _0x173ab6=null,_0x2df9fe=_0x4d61d9;return _0x567ba2?.['@external']&&(_0x173ab6=this['_getExternalAuthor'](_0x567ba2['@external']['authorName']),_0x2df9fe=new Date(_0x567ba2['@external']['createdAt'])),new wi(this,{'threadId':_0x1e84a3,'id':_0x4115e4,'author':_0x173ab6||_0x5bae8f,'creator':_0x5bae8f,'content':_0x12bff4,'createdAt':_0x4d61d9,'authoredAt':_0x2df9fe,'attributes':_0x567ba2});}['_addComment'](_0x5a2775){let {threadId:_0x60758a,content:_0x813520,attributes:_0x4dc171,isFromAdapter:_0x171fc9}=_0x5a2775;const _0x5b434d=this['getCommentThread'](_0x5a2775['threadId']);if(!_0x5b434d)throw new _0x425354('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x19e0b3=this['_createNewComment'](_0x5a2775),{id:_0x48254d}=_0x19e0b3;if(_0x5b434d['_add'](_0x19e0b3),_0x171fc9||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5b434d['isSubmitted'])return Promise['resolve']();const _0x2ae762=this['context']['plugins']['get']('PendingActions'),{channelId:_0x270dc0}=_0x5b434d,_0x41e299=_0x2ae762['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4dc171||(_0x4dc171={}),this['adapter']['addComment']({'channelId':_0x270dc0,'threadId':_0x60758a,'commentId':_0x48254d,'content':_0x813520,'attributes':_0x4dc171})['then'](_0xd6fa94=>{_0x2ae762['remove'](_0x41e299),_0xd6fa94&&this['_updateComment']({'channelId':_0x270dc0,'threadId':_0x60758a,'commentId':_0x48254d,'createdAt':_0xd6fa94['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3808d8=>{throw console['error'](_0x3808d8),new _0x425354('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4b38d4,commentId:_0x1d3053,content:_0x51be61,createdAt:_0x8d5c7e,attributes:_0x50d972,isFromAdapter:_0x54cd0f}){if(void 0x0!==_0x51be61&&('string'!=typeof _0x51be61||!_0x51be61['trim']()['length']))throw new _0x425354('commentsrepository-update-comment-invalid-content');const _0x32a7b7=this['getCommentThread'](_0x4b38d4),_0x15fdc5=_0x32a7b7['getComment'](_0x1d3053);if(!_0x15fdc5)throw new _0x425354('commentsrepository-update-missing-comment',this);let _0x3129bb=!0x1;if(_0x51be61&&_0x51be61!==_0x15fdc5['content']&&(_0x15fdc5['isEditable']||_0x54cd0f)&&(_0x15fdc5['content']=_0x51be61,_0x3129bb=!0x0),_0x8d5c7e&&_0x8d5c7e!==_0x15fdc5['createdAt']&&(_0x15fdc5['createdAt']=_0x8d5c7e,_0x15fdc5['attributes']&&_0x15fdc5['attributes']['@external']||(_0x15fdc5['authoredAt']=_0x8d5c7e),_0x3129bb=!0x0),_0x50d972&&!At(_0x50d972,_0x15fdc5['attributes'])&&(_0x15fdc5['attributes']=_0x50d972,_0x3129bb=!0x0),!_0x3129bb)return Promise['resolve']();if(_0x32a7b7['fire']('commentUpdated'),_0x54cd0f||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x3c9b4d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1fe132}=this['getCommentThread'](_0x15fdc5['threadId']),_0x41bc29=_0x3c9b4d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1fe132,'threadId':_0x4b38d4,'commentId':_0x1d3053,'content':_0x51be61,'attributes':_0x50d972})['then'](()=>_0x3c9b4d['remove'](_0x41bc29))['catch'](_0x39b932=>{throw console['error'](_0x39b932),new _0x425354('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3f02b1,commentId:_0x3fe130,isFromAdapter:_0x5198c7}){const _0x2f6b96=this['getCommentThread'](_0x3f02b1),_0x193490=_0x2f6b96['getComment'](_0x3fe130);if(!_0x193490)throw new _0x425354('commentsrepository-remove-missing-comment',this);if(_0x2f6b96['_remove'](_0x193490),_0x5198c7||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1902f6=this['context']['plugins']['get']('PendingActions'),{channelId:_0xaff7c1}=_0x2f6b96,_0x6e3dce=_0x1902f6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xaff7c1,'threadId':_0x3f02b1,'commentId':_0x3fe130})['then'](()=>_0x1902f6['remove'](_0x6e3dce))['catch'](_0xb73716=>{throw console['error'](_0xb73716),new _0x425354('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x127aff(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x10f4d8,_0x3489dd){super();const _0x3b5137=_0x10f4d8['context']['plugins']['get'](it)['me'],_0xb9da22=_0x10f4d8['getCommentThread'](_0x3489dd['threadId']),_0x5b36af=0x0===_0xb9da22['comments']['length'],_0x956b3c=_0x3b5137===_0x3489dd['author'];this['id']=_0x3489dd['id'],this['threadId']=_0x3489dd['threadId'],this['author']=_0x3489dd['author'],this['creator']=_0x3489dd['creator'],this['isExternal']=Boolean(_0x3489dd['attributes']&&_0x3489dd['attributes']['@external']),this['set']('content',_0x3489dd['content']),this['createdAt']=_0x3489dd['createdAt']||new Date(),this['set']('authoredAt',_0x3489dd['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xb9da22,'resolvedAt'),this['set']('attributes',_0x3489dd['attributes']||{}),this['bind']('isEditable')['to'](_0x10f4d8,'_permissions',()=>{const _0x187c56=_0x10f4d8['getPermissions'](_0xb9da22['channelId'])['write'],_0x25c05b=_0x10f4d8['getPermissions'](_0xb9da22['channelId'])['modifyAll'];return _0x956b3c&&_0x187c56||!_0x956b3c&&_0x25c05b;}),this['bind']('isRemovable')['to'](_0xb9da22,'isRemovable',_0x10f4d8,'_permissions',_0x3c3fda=>{const _0x2e7a5f=_0x10f4d8['getPermissions'](_0xb9da22['channelId'])['write'],_0x313e2d=_0x10f4d8['getPermissions'](_0xb9da22['channelId'])['modifyAll'];return _0x956b3c&&_0x2e7a5f||_0x3c3fda&&_0x5b36af||!_0x956b3c&&_0x313e2d&&!_0x5b36af;}),this['bind']('isReadOnly')['to'](_0xb9da22,'isReadOnly'),this['_repository']=_0x10f4d8;}get['weight'](){return Math['max'](function(_0x4641bd){const _0x126636=document['createElement']('div');return _0x126636['innerHTML']=_0x4641bd,_0x126636['textContent']['length'];}(this['content']),0xc8);}['update'](_0x46caef){const {threadId:_0x48307c,id:_0x5b4cc7}=this;if(!this['_repository']['hasCommentThread'](_0x48307c))throw new _0x425354('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x40eb48}=this['_repository']['getCommentThread'](_0x48307c);this['_repository']['fire'](Nt('updateComment',_0x40eb48,_0x48307c),{'channelId':_0x40eb48,'threadId':_0x48307c,'commentId':_0x5b4cc7,..._0x46caef});}['setAttribute'](_0x1defb8,_0x3b9590){const _0x10ec90=wt(this['attributes']);yt(_0x10ec90,_0x1defb8,_0x3b9590),this['update']({'attributes':_0x10ec90});}['removeAttribute'](_0x56febb){const _0x4a0960=wt(this['attributes']);Ct(_0x4a0960,_0x56febb),this['update']({'attributes':_0x4a0960});}['remove'](_0x48a6fb={}){if(!_0x48a6fb['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1a34cd,id:_0x5a098d}=this;if(!this['_repository']['hasCommentThread'](_0x1a34cd))throw new _0x425354('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xb804d6}=this['_repository']['getCommentThread'](_0x1a34cd);this['_repository']['fire'](Nt('removeComment',_0xb804d6,_0x1a34cd),{'channelId':_0xb804d6,'threadId':_0x1a34cd,'commentId':_0x5a098d,..._0x48a6fb});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x45f842,..._0x5c6660){for(const _0x484956 of _0x5c6660)void 0x0!==_0x484956&&(_0x45f842+=':'+String(_0x484956));return _0x45f842;}class ot extends _0x44e473{constructor(_0x21fd90){super(_0x21fd90),this['set']('hasContent',!0x1);}['refresh'](){const _0x248693=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x19aa77 of _0x248693['getRanges']())if(this['_hasContent'](_0x19aa77))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x4181dc=_0x260e0b(),ranges:_0x48b806,comment:_0xd265d2}={}){const _0x4135e3=this['editor']['model'],_0x4fa7e5=_0x48b806??Array['from'](_0x4135e3['document']['selection']['getRanges']()),_0x2fe0ed=[];for(const _0x555534 of _0x4fa7e5)this['_hasContent'](_0x555534)&&_0x2fe0ed['push'](this['_trimToContent'](_0x555534));if(!_0x2fe0ed['length'])throw new _0x425354('addcommentthreadcommand-incorrect-ranges',null);_0xd265d2&&this['_createCommentThread'](_0x4181dc,_0xd265d2),this['_createMarkersFromRanges'](_0x4181dc,_0x2fe0ed,!!_0xd265d2);}['_createMarkersFromRanges'](_0x29bd70,_0x1dbf83,_0x262730){this['editor']['model']['change'](_0x1001d5=>{for(const _0x23736e of _0x1dbf83){const _0x4dadda=_0x260e0b()['substr'](0x1,0x5),_0x2ac1ff='comment:'+_0x29bd70+':'+_0x4dadda;_0x1001d5['addMarker'](_0x2ac1ff,{'range':_0x23736e,'usingOperation':_0x262730,'affectsData':_0x262730});}});}['_createCommentThread'](_0x254a3b,_0xca3472){const _0x4a66e7=this['editor']['plugins']['get']('CommentsRepository'),_0x1390e8=this['editor']['config']['get']('collaboration.channelId'),_0x3a1fe6=this['editor']['plugins']['get']('Users')['me'];if(!_0x3a1fe6)throw new _0x425354('addcommentthreadcommand-user-not-found',null);_0x4a66e7['addCommentThread']({'threadId':_0x254a3b,'channelId':_0x1390e8,'comments':[{'authorId':_0x3a1fe6['id'],'content':_0xca3472,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x361664){for(const _0x5490c4 of _0x361664['getItems']())if(this['_itemIsContent'](_0x5490c4))return!0x0;return!0x1;}['_itemIsContent'](_0x242d1a){return _0x242d1a['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x242d1a)&&!_0x242d1a['is']('element','tableCell');}['_trimToContent'](_0x1c10b0){const _0xe4197a=_0x1506c5=>!this['_itemIsContent'](_0x1506c5['item']),_0x341a1f=_0x1c10b0['start']['getLastMatchingPosition'](_0xe4197a),_0x495fda=_0x1c10b0['end']['getLastMatchingPosition'](_0xe4197a,{'direction':'backward'});return this['editor']['model']['createRange'](_0x341a1f,_0x495fda);}}class b extends _0x3d3386{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xd9b7ab){super(_0xd9b7ab),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xb004a5=this['editor'],_0x2616b3=_0xb004a5['model']['document']['selection'],_0x4ede55=_0x4b297f(()=>this['refreshSelectedViews'](),0xa);_0x2616b3['on']('change:range',(_0x1af3f8,_0x1fa9d4)=>{_0x1fa9d4['directChange']&&(_0x4ede55['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xb004a5['editing']['view']['document'],'change:isFocused',(_0x1ca381,_0x1b9f10,_0xfe8fdd)=>{_0xfe8fdd&&_0x4ede55();}),this['listenTo'](_0xb004a5['ui']['focusTracker'],'change:isFocused',(_0x1fa568,_0x218fc0,_0x710517)=>{_0x710517||this['fire']('blur',{'isAnnotationTracked':_0x11a3d3=>this['_editorAnnotationsData']['has'](_0x11a3d3['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x289b22){if(this['_editorAnnotations']['has'](_0x289b22['view']))return;this['_editorAnnotations']['add'](_0x289b22['view']),this['editor']['ui']['focusTracker']['add'](_0x289b22['view']['element']);const _0x1e9a03=this['editor']['plugins']['get'](y);this['listenTo'](_0x1e9a03['collection'],'remove',(_0x151db0,_0x38a1a3)=>{this['editor']['ui']['focusTracker']['remove'](_0x38a1a3['view']['element']),this['_editorAnnotations']['delete'](_0x38a1a3['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2af067){if('function'!=typeof _0x2af067)throw new _0x425354('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2af067);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x29e75f,annotations:_0x39c4d8}){const _0x24c9a4=[],_0x478938=this['editor']['model']['document']['selection'],_0x33d7a1=Array['from'](_0x478938['getRanges']());for(const [_0x1e1b80,_0x1077c7]of this['_editorAnnotationsData']){const _0x487cdc=_0x13820e(_0x1077c7),_0x1c29b3=_0x39c4d8['getByInnerView'](_0x1e1b80);_0x487cdc&&_0x1c29b3&&_0x24c9a4['push']({'annotation':_0x1c29b3,'range':_0x487cdc});}function _0x13820e(_0x37c604){for(const _0x39a1cc of _0x37c604)for(const _0x3e6eb7 of _0x33d7a1)if(_0x39a1cc['containsRange'](_0x3e6eb7,!_0x478938['isCollapsed']))return _0x39a1cc;return null;}return _0x24c9a4['sort']((_0x59468c,_0x38772f)=>{const _0x241243=_0x59468c['range'],_0xb24a9a=_0x38772f['range'];if(!_0x241243['isEqual'](_0xb24a9a)){if(_0x241243['containsRange'](_0xb24a9a,!0x0))return 0x1;if(_0xb24a9a['containsRange'](_0x241243,!0x0))return-0x1;}return _0x59468c['annotation']==_0x29e75f?-0x1:_0x38772f['annotation']==_0x29e75f?0x1:0x0;})['map'](_0x4a61c6=>_0x4a61c6['annotation']);}get['_editorAnnotationsData'](){const _0x2d4013=new Map();for(const _0x160c44 of Array['from'](this['_dataCollectors']))for(const [_0x2b82e6,_0x1600d4]of _0x160c44())_0x2d4013['set'](_0x2b82e6,_0x1600d4);return _0x2d4013;}}class st extends _0x3d3386{['afterInit'](){const _0x46c6c8=this['editor'];if(!_0x46c6c8['plugins']['has']('RestrictedEditingModeEditing'))return;_0x46c6c8['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3d3386{constructor(_0x4578df){super(_0x4578df),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x571d8a=this['editor'],_0x3d60e8=_0x571d8a['commands']['get']('importWord'),_0x2b73a9=_0x571d8a['plugins']['get'](it);_0x3d60e8&&(_0x3d60e8['on']('execute',(_0x5cae00,[,_0x13cee6])=>{_0x13cee6['collaboration_features']={'comments':!0x0,'user_id':_0x2b73a9['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x3d60e8,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1c4304,_0x4fd96f){const {comment_threads:_0x1ebb17}=_0x4fd96f;_0x1ebb17&&_0x1ebb17['forEach'](({thread_id:_0x1cc285,comments:_0x5d659d,is_resolved:_0x3a4c90})=>{const _0x4c6e51=new Date(),_0x1d44a6=_0x5d659d['map'](({author:_0x5cfa12,content:_0x3ab711,created_at:_0xf542e0})=>({'content':_0x3ab711,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x4c6e51,'attributes':{'@external':{'authorName':_0x5cfa12,'createdAt':_0xf542e0?new Date(_0xf542e0):new Date(),'source':'importWord'}}})),_0x378913=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x378913,'threadId':_0x1cc285,'comments':_0x1d44a6,'resolvedAt':_0x3a4c90?_0x4c6e51:null});});}}class at extends _0x3d3386{constructor(_0x1c2c52){super(_0x1c2c52),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x11cd3a=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x11cd3a,'contentInsertion',(_0x3bd75a,_0x2e80f2)=>this['_removeMarkersWithoutThreads'](_0x2e80f2['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x22fc19){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x22fc19;const _0x91715f=this['editor']['plugins']['get']('CommentsRepository');for(const _0x44a5da of _0x22fc19['keys']()){const [_0x531269,_0x507ba3]=_0x44a5da['split'](':');'comment'!=_0x531269||_0x91715f['hasCommentThread'](_0x507ba3)||_0x22fc19['delete'](_0x44a5da);}return _0x22fc19;}['_registerMarkerInClipboardPipeline'](){const _0x16e3ab=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x508aff=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x508aff&&_0x16e3ab['_registerMarkerToCopy']('comment',_0x508aff);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x395b7b){switch(_0x395b7b){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x48de7b){const _0x5c724a=_0x48de7b['split'](':');return{'group':_0x5c724a[0x0],'id':_0x5c724a[0x1],'part':_0x5c724a[0x2]};}class ut extends _0x3d3386{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x455338,_0x11b058)=>{if(!_0x11b058['options']['showCommentHighlights'])return null;if(_0x11b058['options']['ignoreResolvedComments']){const {id:_0x358d22}=ft(_0x455338['markerName']),_0x40492f=this['editor']['plugins']['get'](o);if(_0x40492f['getCommentThread'](_0x358d22)?.['isResolved']&&_0x455338['item'])return _0x11b058['consumable']['consume'](_0x455338['item'],'addMarker:'+_0x455338['markerName']),_0x11b058['consumable']['consume'](_0x455338['item'],'removeMarker:'+_0x455338['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5b5abe=>{_0x5b5abe['on']('addMarker:comment',(_0x1559b9,_0x54cd26,_0x44927e)=>{if(!_0x44927e['options']['showCommentHighlights'])return;const _0x1f82a1=_0x54cd26['item'];if(!_0x1f82a1)return;const _0x4ab8d2=_0x44927e['mapper']['toViewElement'](_0x1f82a1);this['editor']['model']['schema']['isObject'](_0x1f82a1)&&_0x4ab8d2&&!_0x4ab8d2['getCustomProperty']('widget')&&_0x4ab8d2['is']('containerElement')&&_0x4542ae(_0x4ab8d2,_0x44927e['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1c0a96,{writer:_0x5cc05d,options:_0x3e58b9})=>{if(!_0x3e58b9['showCommentHighlights'])return null;const _0x35d5c6=_0x5cc05d['createContainerElement']('div'),_0xd1d52d=_0x5cc05d['createEmptyElement']('hr');return _0x5cc05d['addClass']('ck-horizontal-line',_0x35d5c6),_0x5cc05d['insert'](_0x5cc05d['createPositionAt'](_0x35d5c6,0x0),_0xd1d52d),_0x35d5c6;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1b09af,{writer:_0x48a602,options:_0x545722})=>{if(!_0x545722['showCommentHighlights'])return null;const _0x3d50e0=_0x48a602['createContainerElement']('span'),_0x544af2=_0x48a602['createEmptyElement']('img');return _0x48a602['addClass']('image-inline',_0x3d50e0),_0x48a602['insert'](_0x48a602['createPositionAt'](_0x3d50e0,0x0),_0x544af2),_0x3d50e0;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1a11cf,{writer:_0xd4b895,options:_0x4411c3})=>{if(_0x4411c3['showCommentHighlights'])return _0xd4b895['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x5ba7bd,_0x160011,_0x3b1a1e)=>{_0x3b1a1e['options']['showCommentHighlights']&&_0x5ba7bd['stop']();},{'priority':'high'});}}class r extends _0x3d3386{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4c570b){super(_0x4c570b),this['set']('isThreadsLoadingPaused',!0x0),_0x4c570b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x29070e,_0xf6820f,_0x2a21fb,_0x1b02bd)=>{const _0x148706=_0x4c570b['plugins']['get'](o),_0x23f20a=_0x2a21fb?ft(_0x2a21fb)['id']:null;_0x4c570b['model']['change'](()=>{if(_0x23f20a){const _0x359963=this['getAllMarkersForId'](_0x23f20a);for(const _0x4953ba of _0x359963)_0x4c570b['editing']['reconvertMarker'](_0x4953ba);}if(_0x1b02bd){const {id:_0x249c6e}=ft(_0x1b02bd),_0x3523da=_0x148706['getCommentThread'](_0x249c6e);if(_0x3523da&&_0x3523da['unlinkedAt'])return;if(_0x3523da&&!_0x3523da['isAttached'])return;const _0xba592b=this['getAllMarkersForId'](_0x249c6e);for(const _0x402ffb of _0xba592b)_0x4c570b['editing']['reconvertMarker'](_0x402ffb);}}),_0x23f20a&&this['scrollToThreadMarker'](_0x23f20a);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x520c88=this['editor'],_0x1a8bbe=_0x520c88['plugins']['get'](o),_0x36f98b=_0x520c88['config']['get']('collaboration.channelId'),_0x46658b=_0x1a8bbe['getCommentThreads']()['filter'](_0x221905=>_0x221905['channelId']!==_0x36f98b);_0x520c88['commands']['add']('addCommentThread',new ot(_0x520c88)),this['listenTo'](_0x520c88,'change:isReadOnly',(_0xfd5aed,_0x3450a4,_0x3f6a5d)=>{_0x1a8bbe['switchReadOnly'](_0x3f6a5d,_0x520c88['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1a8bbe,dt('addCommentThread',_0x36f98b),(_0x2399cf,{threadId:_0x1cafa7})=>{const _0x420149=this['editor']['plugins']['get'](o)['getCommentThread'](_0x1cafa7);_0x420149?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1cafa7);}),this['listenTo'](_0x1a8bbe,dt('removeCommentThread',_0x36f98b),(_0x5612d9,{threadId:_0x385b6c})=>{_0x520c88['model']['enqueueChange']({'isUndoable':!0x1},_0x5c600b=>{const _0x27d10e=this['getAllMarkersForId'](_0x385b6c);for(const _0x1ed22d of _0x27d10e)_0x5c600b['removeMarker'](_0x1ed22d);});}),this['listenTo'](_0x1a8bbe,dt('resolveCommentThread',_0x36f98b),(_0x53d58e,{threadId:_0x142b42})=>{(this['_reconvertMarkers'](_0x142b42),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x142b42)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1a8bbe,dt('reopenCommentThread',_0x36f98b),(_0x30cabc,{threadId:_0x26beb9})=>{this['_reconvertMarkers'](_0x26beb9);},{'priority':'low'}),this['listenTo'](_0x1a8bbe,dt('addComment',_0x36f98b),(_0x31abef,{threadId:_0x55cea1,isFromAdapter:_0xe4f80d})=>{const _0x63f14c=this['getAllMarkersForId'](_0x55cea1);if(_0xe4f80d||0x0==_0x63f14c['length']||!_0x1a8bbe['hasCommentThread'](_0x55cea1))return;0x1===_0x1a8bbe['getCommentThread'](_0x55cea1)['length']&&_0x520c88['model']['enqueueChange']({'isUndoable':!0x1},_0x5e6ee3=>{for(const _0x4f9ac7 of _0x63f14c)_0x5e6ee3['updateMarker'](_0x4f9ac7,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x46658b);}['afterInit'](){!async function(_0x13cee5){const _0x3f127f=_0x1fd099([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x2077ab=0x73460ab3,_0x75db16=0x73418d93^_0x2077ab,_0x5407d4=window[_0x1fd099([0x44,0x61,0x74,0x65])][_0x1fd099([0x6e,0x6f,0x77])](),_0x5da791=_0x13cee5[_0x1fd099([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x34c2d1=new window[(_0x1fd099([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16b39d=>{_0x5da791[_0x1fd099([0x6f,0x6e,0x63,0x65])](_0x1fd099([0x72,0x65,0x61,0x64,0x79]),_0x16b39d);}),_0x3e12d4={[_0x1fd099([0x6b,0x74,0x79])]:_0x1fd099([0x45,0x43]),[_0x1fd099([0x75,0x73,0x65])]:_0x1fd099([0x73,0x69,0x67]),[_0x1fd099([0x63,0x72,0x76])]:_0x1fd099([0x50,0x2d,0x32,0x35,0x36]),[_0x1fd099([0x78])]:_0x1fd099([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]),[_0x1fd099([0x79])]:_0x1fd099([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]),[_0x1fd099([0x61,0x6c,0x67])]:_0x1fd099([0x45,0x53,0x32,0x35,0x36])},_0x5cccda=_0x5da791[_0x1fd099([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1fd099([0x67,0x65,0x74])](_0x1fd099([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x21db60(){let _0x31e6ac,_0x2a90ec=null,_0x395fd9=null;try{if(_0x5cccda==_0x1fd099([0x47,0x50,0x4c]))return _0x1fd099([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x31e6ac=_0x4c7054(),!_0x31e6ac)return _0x1fd099([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x31e6ac[_0x1fd099([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x395fd9=_0x3f9537(_0x31e6ac[_0x1fd099([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x31e6ac[_0x1fd099([0x6a,0x74,0x69])])),await _0x2be7e1()?_0x3c432f()?_0x46b83a()?_0x1fd099([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4792be()?(_0x31e6ac[_0x1fd099([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1fd099([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2a90ec=_0x4f29c6(_0x1fd099([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1f7309()):_0x1fd099([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1fd099([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1fd099([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1fd099([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x46b83a(){const _0x1de72a=[_0x1fd099([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1fd099([0x74,0x72,0x69,0x61,0x6c])][_0x1fd099([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31e6ac[_0x1fd099([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5407d4/0x3e8:0xe10*_0x75db16;return _0x31e6ac[_0x1fd099([0x65,0x78,0x70])]<_0x1de72a;}function _0x3c432f(){const _0x2b9e3c=_0x31e6ac[_0x1fd099([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2b9e3c)return!0x1;if(_0x2b9e3c[_0x1fd099([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1fd099([0x2a])))return!0x0;if(_0x2b9e3c[_0x1fd099([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1fd099([0x43,0x4d,0x54])))return!0x0;if(_0x2b9e3c[_0x1fd099([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1fd099([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4ea714())return!0x0;if(_0x2b9e3c[_0x1fd099([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1fd099([0x52,0x43,0x4d,0x54]))){if(_0x277457())return!0x0;if(_0x21490b()||_0x4cabff())return!0x0;}return!0x1;}function _0x4792be(){const _0x4e3663=_0x31e6ac[_0x1fd099([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4e3663||0x0==_0x4e3663[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2e21e2}=new URL(window[_0x1fd099([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4e3663[_0x1fd099([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e21e2))return!0x0;const _0x3c70b0=_0x2e21e2[_0x1fd099([0x73,0x70,0x6c,0x69,0x74])](_0x1fd099([0x2e]));return _0x4e3663[_0x1fd099([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x585576=>_0x585576[_0x1fd099([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1fd099([0x2a])))[_0x1fd099([0x6d,0x61,0x70])](_0x43b298=>_0x43b298[_0x1fd099([0x73,0x70,0x6c,0x69,0x74])](_0x1fd099([0x2e])))[_0x1fd099([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x46e9a6=>_0x46e9a6[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3c70b0[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1fd099([0x6d,0x61,0x70])](_0x2cf39b=>Array(_0x3c70b0[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2cf39b[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1fd099([0x66,0x69,0x6c,0x6c])](_0x2cf39b[0x0]===_0x1fd099([0x2a])?_0x1fd099([0x2a]):'')[_0x1fd099([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2cf39b))[_0x1fd099([0x73,0x6f,0x6d,0x65])](_0x2b8117=>_0x3c70b0[_0x1fd099([0x65,0x76,0x65,0x72,0x79])]((_0x571d02,_0x11b814)=>_0x2b8117[_0x11b814]===_0x571d02||_0x2b8117[_0x11b814]===_0x1fd099([0x2a])));}function _0x1f7309(){return _0x2a90ec&&_0x395fd9?new window[(_0x1fd099([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xe21c89,_0xf89424)=>{_0x2a90ec[_0x1fd099([0x74,0x68,0x65,0x6e])](_0xe21c89,_0xf89424),_0x395fd9[_0x1fd099([0x74,0x68,0x65,0x6e])](_0x21311d=>{_0x21311d!=_0x1fd099([0x56,0x61,0x6c,0x69,0x64])&&_0xe21c89(_0x21311d);},_0xf89424);}):_0x2a90ec||_0x395fd9||_0x1fd099([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3f9537(_0xe03d62,_0x5d98fc){return new window[(_0x1fd099([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf02539=>{if(_0x52358f())return _0xf02539(_0x1fd099([0x56,0x61,0x6c,0x69,0x64]));_0x4e293c(),_0x5da791[_0x1fd099([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1fd099([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x36e108=!0x1;const _0x3e7583=_0x260e0b();function _0x40a6e2(_0x815253){return!!_0x815253&&(typeof _0x815253===_0x1fd099([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x815253===_0x1fd099([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x815253[_0x1fd099([0x74,0x68,0x65,0x6e])]===_0x1fd099([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x815253[_0x1fd099([0x63,0x61,0x74,0x63,0x68])]===_0x1fd099([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5d3336(_0x5f57aa){_0x256503(_0x5f57aa)[_0x1fd099([0x74,0x68,0x65,0x6e])](_0x515871=>{if(!_0x515871||_0x515871[_0x1fd099([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1fd099([0x6f,0x6b]))return _0x1fd099([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4a901b(_0x46d990(_0x3e7583+_0x5d98fc))!=_0x515871[_0x1fd099([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1fd099([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1fd099([0x56,0x61,0x6c,0x69,0x64]);})[_0x1fd099([0x74,0x68,0x65,0x6e])](_0x3ba86a=>(_0x9426db(),_0x3ba86a),()=>{const _0x1c7c86=_0x1dd2d3();return null==_0x1c7c86?(_0x9426db(),_0x1fd099([0x56,0x61,0x6c,0x69,0x64])):_0x1fd099(_0x5407d4-_0x1c7c86>(0x574a8eb3^_0x2077ab)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1fd099([0x74,0x68,0x65,0x6e])](_0xf02539)[_0x1fd099([0x63,0x61,0x74,0x63,0x68])](()=>{_0xf02539(_0x1fd099([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x97cb58=0x7370e433^_0x2077ab;function _0x9426db(){const _0x45c6ac=_0x1fd099([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a901b(_0x46d990(_0xe03d62)),_0x4cd44b=_0x2805d5(_0x4a901b(window[_0x1fd099([0x4d,0x61,0x74,0x68])][_0x1fd099([0x63,0x65,0x69,0x6c])](_0x5407d4/_0x97cb58)));window[_0x1fd099([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1fd099([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x45c6ac,_0x4cd44b);}function _0x1dd2d3(){const _0x479095=_0x1fd099([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a901b(_0x46d990(_0xe03d62)),_0x3123f7=window[_0x1fd099([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1fd099([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x479095);return _0x3123f7?window[_0x1fd099([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2805d5(_0x3123f7),0x10)*_0x97cb58:null;}function _0x256503(_0x26b75e){return new window[(_0x1fd099([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x45ff26,_0x1a152b)=>{_0x26b75e[_0x1fd099([0x74,0x68,0x65,0x6e])](_0x45ff26,_0x1a152b),window[_0x1fd099([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1a152b,0x7347de73^_0x2077ab);});}}_0x5da791[_0x1fd099([0x6f,0x6e])](_0x1fd099([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x42b7e5,_0x57cc7e)=>{if(_0x57cc7e[0x0]!=_0xe03d62)return _0xf02539(_0x1fd099([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x57cc7e[0x1]={..._0x57cc7e[0x1],[_0x1fd099([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3e7583};},{[_0x1fd099([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1fd099([0x68,0x69,0x67,0x68])}),_0x5da791[_0x1fd099([0x6f,0x6e])](_0x1fd099([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2e3b0b=>{_0x40a6e2(_0x2e3b0b[_0x1fd099([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x36e108=!0x0,_0x5d3336(_0x2e3b0b[_0x1fd099([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1fd099([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1fd099([0x6c,0x6f,0x77])}),_0x34c2d1[_0x1fd099([0x74,0x68,0x65,0x6e])](()=>{_0x36e108||_0xf02539(_0x1fd099([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52358f(){return _0x5da791[_0x1fd099([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1fd099([0x76,0x69,0x65,0x77])][_0x1fd099([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1fd099([0x61,0x75,0x74,0x6f]);}function _0x4e293c(){_0x5da791[_0x1fd099([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1fd099([0x76,0x69,0x65,0x77])][_0x1fd099([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1fd099([0x61,0x75,0x74,0x6f]);}}function _0x4f29c6(_0xc29558){const _0x5d21ae=[new window[(_0x1fd099([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58c5f4=>setTimeout(_0x58c5f4,0x734f347f^_0x2077ab)),_0x34c2d1[_0x1fd099([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1fd099([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x501946=>{let _0x40d606=0x0;_0x5da791[_0x1fd099([0x6d,0x6f,0x64,0x65,0x6c])][_0x1fd099([0x6f,0x6e])](_0x1fd099([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1d8053,_0x1c0a47)=>{_0x1c0a47[0x0][_0x1fd099([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x40d606++,_0x40d606==(0x73460f5b^_0x2077ab)&&(_0x501946(),_0x1d8053[_0x1fd099([0x6f,0x66,0x66])]());});}))];return window[_0x1fd099([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1fd099([0x72,0x61,0x63,0x65])](_0x5d21ae)[_0x1fd099([0x74,0x68,0x65,0x6e])](()=>_0xc29558);}async function _0xb8a30b(){await _0x34c2d1,_0x5da791[_0x1fd099([0x6d,0x6f,0x64,0x65,0x6c])][_0x1fd099([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x7ea7d2,_0x5da791[_0x1fd099([0x6d,0x6f,0x64,0x65,0x6c])][_0x1fd099([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x7ea7d2,_0x5da791[_0x1fd099([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1fd099([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4ea714(){return window[_0x1fd099([0x67,0x6c,0x6f,0x62])]&&window[_0x1fd099([0x67,0x6c,0x6f,0x62])][_0x1fd099([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x277457(){return _0x104d70(_0x1fd099([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3e2217(_0x1fd099([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x1fd099([0x73,0x74,0x61,0x74,0x65])]==_0x1fd099([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x21490b(){return _0x104d70(_0x1fd099([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 _0x4cabff(){return _0x104d70(_0x1fd099([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2ab686(_0x689526){const _0x26bfcf=_0x4de54a();_0x5da791[_0x26bfcf]=_0x1fd099([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x689526,_0x689526!=_0x1fd099([0x56,0x61,0x6c,0x69,0x64])&&_0xb8a30b();}function _0x4de54a(){const _0xe58a7d=window[_0x1fd099([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1fd099([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1fd099([0x6e,0x6f,0x77])]())[_0x1fd099([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1fd099([0x2e]),'');let _0x4cc509=_0x1fd099([0x4b]);for(let _0x160406=0x0;_0x160406<_0xe58a7d[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x160406+=0x2){let _0x22d7ae=window[_0x1fd099([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xe58a7d[_0x1fd099([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x160406,_0x160406+0x2));_0x22d7ae>=_0x3f127f[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x22d7ae-=_0x3f127f[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4cc509+=_0x3f127f[_0x22d7ae];}return _0x4cc509;}function _0x4c7054(){const _0x25f71d=_0x5cccda[_0x1fd099([0x73,0x70,0x6c,0x69,0x74])](_0x1fd099([0x2e]));if(0x3!=_0x25f71d[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4ecfd4(_0x25f71d[0x1]);function _0x4ecfd4(_0x4a058a){const _0xb675a6=_0x504fa9(_0x4a058a);return _0xb675a6&&_0x15fad3()?_0xb675a6:null;function _0x15fad3(){const _0x1ca598=_0xb675a6[_0x1fd099([0x6a,0x74,0x69])],_0x42c3ac=window[_0x1fd099([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ca598[_0x1fd099([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ca598[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x138a82={..._0xb675a6,[_0x1fd099([0x6a,0x74,0x69])]:_0x1ca598[_0x1fd099([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1ca598[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x138a82[_0x1fd099([0x76,0x63])],_0x46d990(_0x138a82)==_0x42c3ac;}}}async function _0x2be7e1(){let _0x548860=!0x0;try{const _0xac1f66=_0x5cccda[_0x1fd099([0x73,0x70,0x6c,0x69,0x74])](_0x1fd099([0x2e])),[_0x5bee77,_0x2ae1e7,_0x1a90d2]=_0xac1f66;return _0xcc6d21(_0x5bee77),await _0x44750e(_0x5bee77,_0x2ae1e7,_0x1a90d2),_0x548860;}catch{return!0x1;}function _0xcc6d21(_0x1e8ce2){const _0x2c04d1=_0x504fa9(_0x1e8ce2);_0x2c04d1&&_0x2c04d1[_0x1fd099([0x61,0x6c,0x67])]==_0x1fd099([0x45,0x53,0x32,0x35,0x36])||(_0x548860=!0x1);}async function _0x44750e(_0x28ad2a,_0x548d21,_0x4f3fcd){const _0x2aba35=window[_0x1fd099([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1fd099([0x66,0x72,0x6f,0x6d])](_0x3a7fb1(_0x4f3fcd),_0x20a7a6=>_0x20a7a6[_0x1fd099([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1f1b26=new window[(_0x1fd099([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1fd099([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x28ad2a+_0x1fd099([0x2e])+_0x548d21),_0x5ae6d2=window[_0x1fd099([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1fd099([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5ae6d2)return;const _0x394f59=await _0x5ae6d2[_0x1fd099([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1fd099([0x6a,0x77,0x6b]),_0x3e12d4,{[_0x1fd099([0x6e,0x61,0x6d,0x65])]:_0x1fd099([0x45,0x43,0x44,0x53,0x41]),[_0x1fd099([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1fd099([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1fd099([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5ae6d2[_0x1fd099([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1fd099([0x6e,0x61,0x6d,0x65])]:_0x1fd099([0x45,0x43,0x44,0x53,0x41]),[_0x1fd099([0x68,0x61,0x73,0x68])]:{[_0x1fd099([0x6e,0x61,0x6d,0x65])]:_0x1fd099([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x394f59,_0x2aba35,_0x1f1b26)||(_0x548860=!0x1);}}function _0x504fa9(_0x4b3fbb){return _0x4b3fbb[_0x1fd099([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1fd099([0x65,0x79]))?JSON[_0x1fd099([0x70,0x61,0x72,0x73,0x65])](_0x3a7fb1(_0x4b3fbb)):null;}function _0x3a7fb1(_0x587573){return window[_0x1fd099([0x61,0x74,0x6f,0x62])](_0x587573[_0x1fd099([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1fd099([0x2b]))[_0x1fd099([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1fd099([0x2f])));}function _0x46d990(_0x570944){let _0x5a5216=0x1505;function _0x27222a(_0x2c26b5){for(let _0x431edd=0x0;_0x431edd<_0x2c26b5[_0x1fd099([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x431edd++){const _0x5d2b51=_0x2c26b5[_0x1fd099([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x431edd);_0x5a5216=(_0x5a5216<<0x5)+_0x5a5216+_0x5d2b51,_0x5a5216&=_0x5a5216;}}function _0x2ca031(_0x2b91d9){Array[_0x1fd099([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2b91d9)?_0x2b91d9[_0x1fd099([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2ca031):_0x2b91d9&&typeof _0x2b91d9==_0x1fd099([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1fd099([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2b91d9)[_0x1fd099([0x73,0x6f,0x72,0x74])]()[_0x1fd099([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x51560f,_0x371fc1])=>{_0x27222a(_0x51560f),_0x2ca031(_0x371fc1);}):_0x27222a(window[_0x1fd099([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2b91d9));}return _0x2ca031(_0x570944),_0x5a5216>>>0x0;}function _0x4a901b(_0x8d1166){return _0x8d1166[_0x1fd099([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1fd099([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1fd099([0x30]));}function _0x2805d5(_0x28c9b3){return _0x28c9b3[_0x1fd099([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1fd099([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1fd099([0x6a,0x6f,0x69,0x6e])]('');}function _0x104d70(_0x27dbdc){return _0x5da791[_0x1fd099([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1fd099([0x68,0x61,0x73])](_0x27dbdc);}function _0x3e2217(_0x915768){return _0x5da791[_0x1fd099([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1fd099([0x67,0x65,0x74])](_0x915768);}function _0x7ea7d2(){}function _0x1fd099(_0x188ac6){return _0x188ac6['map'](_0xff224b=>String['fromCharCode'](_0xff224b))['join']('');}_0x2ab686(await _0x21db60());}(this);}['destroy'](){const _0x458969=this['editor']['plugins']['get'](o),_0x204b94=this['editor']['config']['get']('collaboration.channelId');for(const _0x4964e5 of _0x458969['getCommentThreads']({'channelId':_0x204b94}))_0x458969['_detachCommentThread'](_0x4964e5['id']),_0x458969['_threads']['delete'](_0x4964e5['id']);super['destroy']();}['hasMarkerForId'](_0x3a3297){return this['getAllMarkersForId'](_0x3a3297)['length']>0x0;}['getAllMarkersForId'](_0x189b82){const _0x9b3eb7=[];for(const _0x29ee76 of this['editor']['model']['markers'])_0x29ee76['name']['startsWith']('comment:'+_0x189b82)&&_0x9b3eb7['push'](_0x29ee76);return _0x9b3eb7;}['scrollToThreadMarker'](_0xf546b6){setTimeout(()=>{const _0x359b67=this['_getTargetForId'](_0xf546b6);if(!_0x359b67)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0xf546b6&&nt({'target':_0x359b67[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x43ed94){this['editor']['model']['change'](()=>{for(const _0x315f80 of this['getAllMarkersForId'](_0x43ed94))this['editor']['editing']['reconvertMarker'](_0x315f80);});}['_attachArchivedThread'](_0x59c806){const _0x1f5cd5=this['editor']['plugins']['get'](o),_0x12f37a=this['editor']['plugins']['get'](b),_0x195a65=_0x1f5cd5['getCommentThread'](_0x59c806);if(!_0x195a65['isAttached']){const _0x8dbc42=_0x195a65['attachTo'](()=>this['_getTargetForId'](_0x195a65['id']));_0x12f37a['registerAnnotation'](_0x8dbc42),_0x195a65['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x496dd9=this['editor'],_0x5d1f8f=_0x496dd9['plugins']['get'](it);_0x496dd9['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x348ad3,_0x54b187)=>{const {id:_0x8e04c4}=ft(_0x348ad3['markerName']),_0x4ed8e7=_0x496dd9['plugins']['get'](o)['getCommentThread'](_0x8e04c4),_0x191708=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x8e04c4;let _0xf9e2ad;if(_0x4ed8e7&&_0x4ed8e7['isResolved']&&!_0x191708&&_0x348ad3['item'])return _0x54b187['consumable']['consume'](_0x348ad3['item'],'addMarker:'+_0x348ad3['markerName']),_0x54b187['consumable']['consume'](_0x348ad3['item'],'removeMarker:'+_0x348ad3['markerName']),null;const _0x4509c1=['ck-comment-marker'];return _0x191708&&_0x4509c1['push']('ck-comment-marker--active'),_0xf9e2ad=_0x4ed8e7?.['length']?_0x4ed8e7['comments']['first']['author']['id']:_0x5d1f8f['me']['id'],{'classes':_0x4509c1,'attributes':{'data-comment':_0x8e04c4,'data-author-id':_0xf9e2ad}};}}),_0x496dd9['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1e3662,{options:_0x1e9da4})=>{if(_0x1e9da4['showCommentHighlights'])return null;const _0x206234=_0x496dd9['plugins']['get'](o),_0x14095a=_0x496dd9['model']['markers']['get'](_0x1e3662),{id:_0x35f3f0,part:_0x66fc78}=ft(_0x1e3662);return _0x14095a&&!_0x14095a['affectsData']||_0x1e9da4['ignoreResolvedComments']&&_0x206234['getCommentThread'](_0x35f3f0)?.['isResolved']?null:{'group':'comment','name':_0x66fc78?_0x35f3f0+':'+_0x66fc78:_0x35f3f0};}}),_0x496dd9['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x492018,{writer:_0x5ecd9e})=>_0x5ecd9e['createElement']('$marker',{'data-name':'comment:'+_0x492018['getAttribute']('id')})}),_0x496dd9['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x954d2b=this['editor'],_0x1a443a=_0x954d2b['plugins']['get'](o),_0x64e2c9=new Set(),_0x2adfce=new Set();_0x954d2b['model']['document']['registerPostFixer'](_0xbc2d24=>{let _0x5f39d5=!0x1;for(const {name:_0x11248d,data:_0x3aec8c}of _0x954d2b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4c5482,id:_0x48df9b}=ft(_0x11248d);let _0x25528e=_0x3aec8c['newRange'];if('comment'!==_0x4c5482||!_0x25528e)continue;const _0x5e485f='$graveyard'===_0x25528e['root']['rootName'];_0x5e485f||(_0x25528e=ht(_0x25528e,_0x954d2b['model']),!_0x25528e||_0x25528e['isCollapsed']||!_0x3aec8c['newRange']||_0x25528e['isEqual'](_0x3aec8c['newRange']))?_0x954d2b['model']['hasContent'](_0x25528e)&&!_0x5e485f?this['isThreadsLoadingPaused']?_0x64e2c9['add'](_0x11248d):this['_handleThreadMarker'](_0x11248d,_0x48df9b):(_0x2adfce['add'](_0x11248d),_0x64e2c9['delete'](_0x11248d),_0xbc2d24['removeMarker'](_0x11248d),_0x5f39d5=!0x0):(_0xbc2d24['updateMarker'](_0x11248d,{'range':_0x25528e}),_0x5f39d5=!0x0);}return _0x5f39d5;}),this['on']('change:isThreadsLoadingPaused',(_0x539a27,_0x9cf82e,_0x5158f6)=>{if(!_0x5158f6&&_0x64e2c9['size'])for(const _0xaee390 of _0x64e2c9){const {id:_0x2fcf98}=ft(_0xaee390);_0x64e2c9['delete'](_0xaee390),_0x954d2b['model']['markers']['get'](_0xaee390)&&this['_handleThreadMarker'](_0xaee390,_0x2fcf98);}}),this['listenTo'](_0x954d2b['model']['document'],'change',()=>{for(const {name:_0x2b311d,data:{newRange:_0x1303ec}}of _0x954d2b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x37ebab,id:_0x16e66a}=ft(_0x2b311d);if('comment'!==_0x37ebab)continue;const _0x286b32=_0x1a443a['getCommentThread'](_0x16e66a),_0x28f960=this['hasMarkerForId'](_0x16e66a);_0x286b32&&(!_0x286b32['_hasTargetInContent']&&_0x1303ec&&_0x954d2b['editing']['view']['once']('render',()=>{const _0x1ec61a=_0x954d2b['plugins']['get'](y),_0x145d9f=_0x1a443a['_threadToController']['get'](_0x286b32)['view'];_0x1ec61a['getByInnerView'](_0x145d9f)['refreshVisibility']();},{'priority':'low'}),_0x286b32['_hasTargetInContent']=_0x28f960||!!_0x1303ec),_0x1303ec||(_0x2adfce['add'](_0x2b311d),_0x64e2c9['delete'](_0x2b311d));}for(const _0x181e15 of _0x2adfce){const {id:_0xdc3665}=ft(_0x181e15),_0x426ec2=_0x1a443a['getCommentThread'](_0xdc3665);if(_0x64e2c9['delete'](_0x181e15),!_0x426ec2)continue;const _0x454451=this['hasMarkerForId'](_0xdc3665);_0x454451||_0x426ec2['isSubmitted']?_0x454451||_0x426ec2['unlinkedAt']||_0x426ec2['setUnlinkedAt'](new Date()):_0x426ec2['remove']();}_0x2adfce['clear']();});}['_handleInitialThreads'](_0x59f7cc){_0x59f7cc['forEach'](_0x4992a8=>{_0x4992a8['unlinkedAt']&&this['_attachArchivedThread'](_0x4992a8['id']);});}['_getTargetForId'](_0x1eac37){const _0x2556f4=this['editor'],_0x2a04db=this['getAllMarkersForId'](_0x1eac37);return et(_0x2556f4['editing'],_0x2a04db);}['_getTextContext'](_0x299406){const _0x29a56b=this['getAllMarkersForId'](_0x299406);let _0x426b6f='',_0x47c214=!0x1;for(const _0x4c56ba of _0x29a56b){const _0x1f6fef=_0x4c56ba['getRange']();for(const _0x223c98 of Array['from'](_0x1f6fef['getItems']()))_0x223c98['is']('$textProxy')?(_0x426b6f&&_0x47c214&&(_0x426b6f+='\x20',_0x47c214=!0x1),_0x426b6f+=_0x223c98['data']):_0x47c214=!0x0;_0x47c214=!0x0;}return _0x426b6f['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4745e3,_0x5eb8bb){const _0x18a21b=this['editor'],_0x30e997=_0x18a21b['plugins']['get'](o);let _0xe112a5=_0x30e997['getCommentThread'](_0x5eb8bb);const _0x16c2f2=_0x18a21b['config']['get']('collaboration.channelId'),_0x3e71c0=_0x18a21b['plugins']['get'](b);if(_0xe112a5&&(_0xe112a5['unlinkedAt']&&_0xe112a5['setUnlinkedAt'](null),_0xe112a5['isAttached']))return _0xe112a5;return!this['getAllMarkersForId'](_0x5eb8bb)[0x0]['managedUsingOperations']?_0x18a21b['editing']['view']['once']('render',()=>{if(_0x30e997['getCommentThread'](_0x5eb8bb))return;const _0x52346b=_0x18a21b['plugins']['get'](y);_0xe112a5=_0x30e997['openNewCommentThread']({'channelId':_0x16c2f2,'threadId':_0x5eb8bb,'target':()=>this['_getTargetForId'](_0x5eb8bb),'context':{'type':'text','value':this['_getTextContext'](_0x5eb8bb)}});const _0x4abfec=_0x30e997['_threadToController']['get'](_0xe112a5)['view'],_0x4dd37f=_0x52346b['getByInnerView'](_0x4abfec);_0x4dd37f&&_0x3e71c0['registerAnnotation'](_0x4dd37f);},{'priority':'low'}):_0x30e997['fetchCommentThread']({'channelId':_0x16c2f2,'threadId':_0x5eb8bb})['then'](_0xe0263f=>{if('destroyed'!==_0x18a21b['state']){if(_0xe112a5=_0xe0263f,_0xe112a5&&!_0xe112a5['isAttached']){const _0x39e5b7=_0xe112a5['attachTo'](()=>this['_getTargetForId'](_0x5eb8bb));_0x3e71c0['registerAnnotation'](_0x39e5b7),_0xe112a5['isResolved']&&this['_reconvertMarkers'](_0x5eb8bb);}else{if(!_0xe112a5){const _0x4068ec=this['getAllMarkersForId'](_0x5eb8bb);_0x18a21b['model']['change'](_0xdfab5=>{for(const _0x2ec1df of _0x4068ec)_0xdfab5['removeMarker'](_0x2ec1df);});}}}}),_0xe112a5;}['_handleThreadMarker'](_0x56a91b,_0x5bcec5){const _0x213624=this['_attachMarkerToThread'](_0x56a91b,_0x5bcec5);_0x213624&&!_0x213624['context']&&_0x213624['setContext']({'type':'text','value':this['_getTextContext'](_0x5bcec5)});}['_initAriaMarkerChangeAnnouncements'](){const _0x47c4d9=this['editor'];rt(_0x47c4d9['model'],({left:_0x12fe47,entered:_0x530356})=>{for(const _0x5a3e4b of _0x12fe47)if(mt(_0x5a3e4b)){_0x47c4d9['ui']['ariaLiveAnnouncer']['announce'](N(_0x47c4d9['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x392f0e of _0x530356)if(mt(_0x392f0e)){_0x47c4d9['ui']['ariaLiveAnnouncer']['announce'](N(_0x47c4d9['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x57d40e)));break;}});}}function dt(_0x43c7b4,_0x496de3){return _0x496de3?_0x43c7b4+':'+_0x496de3:_0x43c7b4;}function ht(_0x15a775,_0x51a419){const _0x17a1bf=_0x51a419['schema'],_0x1895c1=_0x51a419['createRange'](_0x15a775['start']);for(const _0x20f989 of _0x15a775['getWalker']()){const {type:_0x239dd8,item:_0x3201a2,nextPosition:_0x512e03}=_0x20f989;if('text'===_0x239dd8||_0x17a1bf['isObject'](_0x3201a2)){const _0x262f63=_0x51a419['createPositionBefore'](_0x3201a2);_0x1895c1['isCollapsed']&&(_0x1895c1['start']=_0x262f63),_0x1895c1['end']=_0x512e03;}}return _0x1895c1;}function mt(_0x54d8c9){return'comment'===ft(_0x54d8c9['name'])['group'];}class s extends _0x3d3386{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x19c787=this['editor'],_0x46f406=_0x19c787['plugins']['get'](o),_0x2999b2=_0x19c787['plugins']['get'](r),_0x59ef62=_0x19c787['plugins']['get'](y),_0x46c603=_0x19c787['plugins']['get'](b);_0x19c787['ui']['componentFactory']['add']('comment',()=>{const _0x25e725=this['_createUIButton'](_0x20f04f);return _0x25e725['tooltip']=!0x0,_0x25e725;}),_0x19c787['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x331cf1)),_0x46c603['addSourceCollector'](()=>{const _0x354fa3=[];for(const [_0x4adac4,_0x2b2853]of _0x46f406['_threadToController']){const _0x3bea4f=_0x2999b2['getAllMarkersForId'](_0x4adac4['id']),_0x1c92ac=_0x3bea4f['map'](_0x3e2399=>_0x3e2399['getRange']());_0x3bea4f['length']>0x0&&_0x354fa3['push']([_0x2b2853['view'],_0x1c92ac]);}return _0x354fa3;}),this['listenTo'](_0x59ef62,'change:activeAnnotations',(_0x20a8c5,_0x334bb9,_0x5426c4)=>{const _0x30cc59=Array['from'](_0x5426c4)['map'](_0x4829ed=>_0x4829ed['innerView'])['find'](_0x4456cd=>_0x46f406['_viewToController']['has'](_0x4456cd));if(!_0x30cc59)return void(_0x2999b2['activeMarker']=null);const _0x5a86b4=_0x46f406['_viewToController']['get'](_0x30cc59)['model']['id'],_0x4fd614='comment:'+_0x5a86b4;_0x5a86b4&&_0x2999b2['hasMarkerForId'](_0x5a86b4)?_0x2999b2['activeMarker']=_0x4fd614:_0x2999b2['activeMarker']&&(_0x2999b2['activeMarker']=null);}),this['listenTo'](_0x46f406,'removeCommentThread',(_0x478ac7,{threadId:_0xb4880e,isFromAdapter:_0x237a12})=>{!_0x237a12&&_0x19c787['ui']['focusTracker']['isFocused']&&_0x2999b2['hasMarkerForId'](_0xb4880e)&&_0x19c787['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x46f406,'addComment',(_0x3564c9,{threadId:_0x336d0f,isFromAdapter:_0x5ebb7d})=>{if(_0x5ebb7d||!_0x2999b2['hasMarkerForId'](_0x336d0f)||!_0x46f406['hasCommentThread'](_0x336d0f))return;0x1===_0x46f406['getCommentThread'](_0x336d0f)['length']&&(_0x19c787['editing']['view']['focus'](),_0x3564c9['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4c093a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x459e81;for(const _0x459a75 in _0x4c093a){const _0x2e70ed=_0x459a75,_0x2db920=_0x4c093a[_0x2e70ed];if('commentsLicenseKeyValid'==_0x2db920||'commentsLicenseKeyInvalid'==_0x2db920||'commentsLicenseKeyExpired'==_0x2db920||'commentsLicenseKeyDomainLimit'==_0x2db920||'commentsLicenseKeyNotAllowed'==_0x2db920||'commentsLicenseKeyEvaluationLimit'==_0x2db920||'commentsLicenseKeyUsageLimit'==_0x2db920){delete _0x4c093a[_0x2e70ed],_0x459e81=_0x2db920,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x459e81&&_0x4c093a['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x459e81&&_0x4c093a['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x459e81&&_0x4c093a['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x459e81&&_0x4c093a['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x459e81&&_0x4c093a['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x459e81&&_0x4c093a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2c1f9e){const _0x4dd3fc=this['editor'],_0x3ca338=new _0x2c1f9e(_0x4dd3fc['locale']),_0x49608f=_0x4dd3fc['commands']['get']('addCommentThread');return _0x3ca338['set']({'label':N(_0x4dd3fc['locale'],'Comment'),'icon':_0x2853dc}),_0x3ca338['bind']('isEnabled')['to'](_0x49608f,'isEnabled',_0x49608f,'hasContent',(_0x4c5bcd,_0x16da55)=>_0x4c5bcd&&_0x16da55),this['listenTo'](_0x3ca338,'execute',()=>{_0x49608f['execute']();}),_0x3ca338;}}class i extends _0x3d3386{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x524b89){super(_0x524b89),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x26936e,_0x43a01a,_0x46942e)=>{_0x46942e?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x423956,_0x2bcda7]of this['editor']['commands'])_0x2bcda7['affectsData']&&'addCommentThread'!==_0x423956&&_0x2bcda7['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x26f718=this['editor']['editing']['view']['document'];this['listenTo'](_0x26f718,'cut',_0x3f0c6d=>_0x3f0c6d['stop'](),{'priority':'highest'}),this['listenTo'](_0x26f718,'clipboardInput',_0x4ad286=>_0x4ad286['stop'](),{'priority':'highest'}),this['listenTo'](_0x26f718,'delete',_0xe215f3=>_0xe215f3['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5b0ef9,_0x41726f]of this['editor']['commands'])_0x41726f['affectsData']&&'addCommentThread'!==_0x5b0ef9&&_0x41726f['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x4bfeb4{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x368ac2){super(_0x368ac2),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x30bd95=this['context']['plugins']['get'](y);this['listenTo'](_0x30bd95,'_activateAnnotation',(_0x4cf320,_0x59b961)=>{for(const _0x4bef7c of this['activeUIs']){const _0x3344ef=this['_uis']['get'](_0x4bef7c);(0x0,this['uisData']['get'](_0x4bef7c)['filter'])(_0x59b961)&&_0x3344ef['setActiveAnnotation'](_0x59b961);}}),this['listenTo'](_0x30bd95,'_deactivateAllAnnotations',()=>{for(const _0x4bf54b of this['activeUIs']){this['_uis']['get'](_0x4bf54b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x30bd95['_visibleAnnotations'],'add',(_0x14976f,_0x3eb528)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3eb528);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x593594){return this['activeUIs']['has'](_0x593594);}['activate'](_0x3bfebb,_0x425835=this['defaultFilter']){const _0x2303e2=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3bfebb))throw new _0x425354('annotationsuis-missing-ui',this,{'uiName':_0x3bfebb});this['isActive'](_0x3bfebb)&&this['deactivate'](_0x3bfebb),this['activeUIs']['add'](_0x3bfebb);const _0x1d3104=new S();v({'source':_0x2303e2['_visibleAnnotations'],'target':_0x1d3104,'filter':_0x425835}),this['uisData']['set'](_0x3bfebb,{'collection':_0x1d3104,'filter':_0x425835});const _0x235145=this['_uis']['get'](_0x3bfebb);_0x235145['attach'](_0x1d3104),this['listenTo'](_0x235145,'change:activeAnnotation',(_0x5051d2,_0xd2472a,_0x13b10e,_0x323b3a)=>{_0x323b3a&&_0x2303e2['_removeActiveAnnotation'](_0x323b3a),_0x13b10e&&_0x2303e2['_addActiveAnnotation'](_0x13b10e);});}['deactivate'](_0x3a50cd){if(this['activeUIs']['delete'](_0x3a50cd),!this['_uis']['has'](_0x3a50cd))throw new _0x425354('annotationsuis-missing-ui',this,{'uiName':_0x3a50cd});const _0x4b0850=this['_uis']['get'](_0x3a50cd);_0x4b0850['detach'](),this['stopListening'](_0x4b0850),this['uisData']['get'](_0x3a50cd)['collection']['destroy'](),this['uisData']['delete'](_0x3a50cd);}['switchTo'](_0x3589be){if(!this['_uis']['has'](_0x3589be))throw new _0x425354('annotationsuis-missing-ui',this,{'uiName':_0x3589be});const _0x419edf=this['context']['plugins']['get'](y),_0x196e9c=Array['from'](_0x419edf['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3589be);const _0x448953=this['_uis']['get'](_0x3589be);_0x448953['setActiveAnnotation'](_0x196e9c),_0x448953['_setSelectedAnnotations']&&_0x196e9c&&_0x448953['_setSelectedAnnotations']([_0x196e9c]);}['deactivateAll'](){for(const _0x38b6ac of this['activeUIs'])this['deactivate'](_0x38b6ac);}['register'](_0x75b4e8,_0x13743a){if(this['_uis']['has'](_0x75b4e8))throw new _0x425354('annotationsuis-register-already-registered');if('function'!=typeof _0x13743a['attach']||'function'!=typeof _0x13743a['detach']||'function'!=typeof _0x13743a['setActiveAnnotation'])throw new _0x425354('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x75b4e8,_0x13743a);}['refilterAnnotations'](){const _0x564b70=this['context']['plugins']['get'](y)['collection'],_0x311eee=new Map(),_0x4ad2a1=Array['from'](this['activeUIs']);for(const _0x16dd43 of this['activeUIs']){const _0x1e13c0=this['uisData']['get'](_0x16dd43)['collection'];for(const _0x20c001 of _0x1e13c0)_0x311eee['set'](_0x20c001,_0x16dd43);}for(const _0xdbd174 of _0x564b70){const _0x3bc283=_0x311eee['get'](_0xdbd174);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xdbd174);const _0x88477d=_0x4ad2a1['find'](_0x4f1b1f=>this['uisData']['get'](_0x4f1b1f)['filter'](_0xdbd174));_0x3bc283!==_0x88477d&&(_0x3bc283&&this['uisData']['get'](_0x3bc283)['collection']['remove'](_0xdbd174),_0x88477d&&this['uisData']['get'](_0x88477d)['collection']['add'](_0xdbd174));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3289b3){const _0x15440e=[];for(const _0x3e7ecf of this['activeUIs']){(0x0,this['uisData']['get'](_0x3e7ecf)['filter'])(_0x3289b3)&&_0x15440e['push'](_0x3e7ecf);}if(_0x15440e['length']>0x1)throw new _0x425354('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x15440e,'annotationType':_0x3289b3['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5a8f5b){super(_0x5a8f5b),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x136f91,_0x1510be)=>_0x136f91+_0x1510be),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2edda0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2edda0['to']('isAnimationDisabled',_0x4d382e=>_0x4d382e?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2edda0['to']('top',_0x304b5b=>Ot(_0x304b5b))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x469c9b=this['element']['clientHeight'];_0x469c9b&&(this['height']=_0x469c9b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4bfeb4{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f8edc){super(_0x2f8edc),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 _0x4c31d6=this['context']['config']['get']('sidebar.container');_0x4c31d6&&this['setContainer'](_0x4c31d6);}['setContainer'](_0x5af26c){if(!g(_0x5af26c))throw new _0x425354('sidebar-setcontainer-invalid-element');this['container']=_0x5af26c;}['_attachToContainer']({viewClass:_0x14304d='',spaceBetweenItems:_0x5a5f4a=0x19}={}){if(!g(this['container']))throw new _0x425354('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x14304d,this['_spaceBetweenItems']=_0x5a5f4a;}['rearrange']({removedAnnotation:_0x392963,previousAnnotation:_0x3e4ad0,nextAnnotation:_0x15d8e4}){const _0x9b0f91=this['getSidebarItemView'](_0x392963);this['view']['list']['remove'](_0x9b0f91),this['_destroySidebarItemView'](_0x392963),_0x3e4ad0&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3e4ad0)),_0x15d8e4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x15d8e4)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x57cd6e,activatedAnnotation:_0x1d2c65,disableAnimationOnActivatedAnnotation:_0x1035bf}){if(this['_activeAnnotation']=_0x1d2c65,_0x57cd6e){_0x57cd6e['isActive']=!0x1;const _0x31276c=this['getSidebarItemView'](_0x57cd6e);_0x31276c&&_0x1035bf&&(_0x31276c['isAnimationDisabled']=!0x1);}if(_0x1d2c65){const _0x465c87=this['getSidebarItemView'](_0x1d2c65);_0x465c87&&(_0x1d2c65['isActive']=!0x0,_0x1035bf&&(_0x465c87['isAnimationDisabled']=!0x0,_0x465c87['top']+=0x1),this['_alignToTargetRect'](_0x465c87));}}['_detachFromContainer'](_0x5704d3){if(this['view']['element']['remove'](),_0x5704d3){for(const _0x62f567 of _0x5704d3)this['_destroySidebarItemView'](_0x62f567);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5a7caf,_0xe035ec){_0xe035ec||(_0xe035ec=_0x5a7caf['view']);const _0x40a3e2=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x40a3e2,_0x5a7caf),this['_annotationToSidebarItemView']['set'](_0x5a7caf,_0x40a3e2),_0x40a3e2['content']['add'](_0xe035ec),this['listenTo'](_0x5a7caf['view'],'change:targetRect',(_0x479fdd,_0x28b685,_0x24bfab)=>{const _0x1b2fb0=this['_getTargetTop'](_0x5a7caf,_0x24bfab);_0x40a3e2['_targetTop']!=_0x1b2fb0&&(_0x40a3e2['_targetTop']=_0x1b2fb0,this['_setItemTop'](_0x40a3e2,_0x1b2fb0));}),this['listenTo'](_0x40a3e2,'change:top',()=>{this['_recalculate'](_0x40a3e2,'top');}),this['listenTo'](_0x40a3e2,'change:bottom',()=>{this['_recalculate'](_0x40a3e2,'bottom');}),this['_alignToTargetRect'](_0x40a3e2);const _0x494a14=this['_getItemBefore'](_0x40a3e2);if(_0x494a14)this['_alignAfterItem'](_0x494a14,_0x40a3e2)||this['_alignToTargetRect'](_0x40a3e2);else this['_alignToTargetRect'](_0x40a3e2);return this['_updateLastItem'](),this['view']['list']['add'](_0x40a3e2),_0x40a3e2;}['_alignForTopChange'](_0xd9211){if(!_0xd9211['content']['length'])return;const _0x4ccfcc=this['_getItemBefore'](_0xd9211);if(!_0x4ccfcc)return;const _0x11646e=this['_sidebarItemViewToAnnotation']['get'](_0x4ccfcc),_0x1ac89d=this['_activeAnnotation'];_0x1ac89d&&_0x1ac89d===_0x11646e?this['_alignAfterItem'](_0x4ccfcc,_0xd9211):this['_alignBeforeItem'](_0xd9211,_0x4ccfcc);}['_alignForBottomChange'](_0x1a812d){if(!_0x1a812d['content']['length'])return;const _0x31468d=this['_getItemAfter'](_0x1a812d);if(!_0x31468d)return;const _0x2fa488=this['_sidebarItemViewToAnnotation']['get'](_0x31468d),_0x445327=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x59f690=this['_activeAnnotation'];_0x59f690&&_0x59f690===_0x2fa488&&_0x445327?(this['_alignBeforeItem'](_0x31468d,_0x1a812d),this['_alignAfterItem'](_0x1a812d,_0x31468d)):_0x59f690&&_0x59f690===_0x2fa488?this['_alignBeforeItem'](_0x31468d,_0x1a812d):this['_alignAfterItem'](_0x1a812d,_0x31468d);}['_recalculate'](_0xa37129,_0x3c2dec){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5ddd3d,changedProp:_0x22448c}of this['_recalculateBuffer'])'top'===_0x22448c?this['_alignForTopChange'](_0x5ddd3d):this['_alignForBottomChange'](_0x5ddd3d);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xa37129,'changedProp':_0x3c2dec});}['getSidebarItemView'](_0x368d7f){return this['_annotationToSidebarItemView']['get'](_0x368d7f);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x249986){const _0x220943=this['getSidebarItemView'](_0x249986);this['stopListening'](_0x220943),this['stopListening'](_0x249986['view']),_0x220943['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x249986),this['_sidebarItemViewToAnnotation']['delete'](_0x220943);}['_createSidebarView'](){const _0x8695e1=new H(this['context']['locale']);return _0x8695e1['render'](),this['on']('change:_lastItem',(_0x2b4997,_0x53c7b1,_0x586aed,_0x3435b7)=>{_0x3435b7&&_0x8695e1['unbind']('minHeight'),_0x586aed?_0x8695e1['bind']('minHeight')['to'](_0x586aed,'bottom'):_0x8695e1['minHeight']=null;}),_0x8695e1;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x3787fb){const _0x5d75af=this['_sidebarItemViewToAnnotation']['get'](_0x3787fb),_0xbbbe3d=_0x5d75af&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5d75af)-0x1);return _0xbbbe3d&&this['getSidebarItemView'](_0xbbbe3d)||null;}['_getItemAfter'](_0x2ed8f){const _0xfb5d8=this['_sidebarItemViewToAnnotation']['get'](_0x2ed8f),_0x518304=_0xfb5d8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xfb5d8)+0x1);return _0x518304&&this['getSidebarItemView'](_0x518304)||null;}['_alignBeforeItem'](_0x59b49f,_0x33aa8a){_0x59b49f['updateHeight']();const _0x496a16=G(_0x33aa8a['bottom']+this['_spaceBetweenItems'],_0x59b49f['top']);return!!_0x496a16&&(this['_setItemTop'](_0x33aa8a,_0x33aa8a['top']-_0x496a16),!0x0);}['_alignAfterItem'](_0x27dcfb,_0x322da3){_0x27dcfb['updateHeight']();const _0x2af414=G(_0x27dcfb['bottom']+this['_spaceBetweenItems'],_0x322da3['top']);return!!_0x2af414&&(this['_setItemTop'](_0x322da3,_0x322da3['top']+_0x2af414,!0x1),!0x0);}['_alignToTargetRect'](_0x4d6171){const _0x24c221=this['_sidebarItemViewToAnnotation']['get'](_0x4d6171);if(!_0x24c221||!_0x24c221['target']||!_0x24c221['targetRect'])return;const _0xdbd9a=this['_getTargetTop'](_0x24c221,_0x24c221['targetRect']);this['_setItemTop'](_0x4d6171,_0xdbd9a);}['_getTargetTop'](_0x290f68,_0x11cdbc){if(null===_0x11cdbc)return 0x0;if(_0x290f68['target']instanceof _0x5c3397)return _0x11cdbc['top'];{const _0x2caf40=new _0x5c3397(this['view']['element'])['top'];return _0x11cdbc['top']-_0x2caf40;}}['_setItemTop'](_0x588863,_0x36c7a2,_0x1f4557=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1f4557&&(_0x36c7a2=Math['max'](_0x36c7a2,this['_getMaxAvailableTop'](_0x588863))),_0x588863['top']=_0x36c7a2;}['_getMaxAvailableTop'](_0x43e6af){let _0xd259fb=this['_getItemBefore'](_0x43e6af),_0x49c1d4=0x0;for(;_0xd259fb;)_0xd259fb['updateHeight'](),_0x49c1d4+=this['_spaceBetweenItems']+_0xd259fb['height'],_0xd259fb=this['_getItemBefore'](_0xd259fb);return _0x49c1d4;}}function G(_0x1d18e7,_0x313753){return Math['max'](_0x1d18e7-_0x313753,0x0);}function g(_0x3c082e){return null!==_0x3c082e&&'object'==typeof _0x3c082e&&0x1===_0x3c082e['nodeType'];}class e extends _0x4bfeb4{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x42d5a4){super(_0x42d5a4),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x242e1d(),this['_refreshPositioningDebounced']=_0x4b297f(()=>{_0x42d5a4['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x258afb=this['context']['plugins']['get'](j),_0x1281c3=this['context']['plugins']['get'](z);_0x258afb['register']('wideSidebar',this),_0x1281c3['container']&&_0x258afb['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x560c07){if(_0x560c07===this['activeAnnotation'])return;const _0x3c08d6=this['context']['plugins']['get'](z);_0x3c08d6['_activeAnnotation']=_0x560c07;const _0x4d92c5=this['activeAnnotation'];_0x3c08d6['refresh']({'blurredAnnotation':_0x4d92c5,'activatedAnnotation':_0x560c07}),this['activeAnnotation']=_0x560c07;}['attach'](_0x48b4b8){this['annotations']=_0x48b4b8;const _0x5d1153=this['context']['plugins']['get'](z);if(_0x5d1153['_annotations']=_0x48b4b8,this['isAttached'])throw new _0x425354('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5d1153,'set:container',()=>{this['detach'](),this['listenTo'](_0x5d1153,'change:container',_0x24a521=>{_0x24a521['off'](),this['attach'](_0x48b4b8);});}),_0x5d1153['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x41b511=_0x155e42=>{_0x155e42['updateTargetRect'](),_0x5d1153['addAnnotation'](_0x155e42);};for(const _0x577b3e of _0x48b4b8)_0x41b511(_0x577b3e);this['listenTo'](_0x48b4b8,'add',(_0x6eb8cc,_0x526bac)=>{_0x41b511(_0x526bac);}),this['listenTo'](_0x48b4b8,'remove',(_0x195225,_0x5edbec,_0x33c11c)=>{_0x5d1153['rearrange']({'removedAnnotation':_0x5edbec,'previousAnnotation':_0x48b4b8['get'](_0x33c11c-0x1),'nextAnnotation':_0x48b4b8['get'](_0x33c11c+0x1)}),_0x5edbec===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x48b4b8,'focus',(_0x3471fe,_0x3c0dcd)=>{this['setActiveAnnotation'](_0x3c0dcd);}),this['listenTo'](_0x48b4b8,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3f84d3=this['context']instanceof _0x2b5820?this['context']['editors']:new _0x242e1d([this['context']]);for(const _0x4a877b of _0x3f84d3)this['_integrateWithEditorAnnotations'](_0x4a877b);this['listenTo'](_0x3f84d3,'add',(_0x54d59c,_0x3dddab)=>{this['listenTo'](_0x3dddab,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3dddab);});}),this['listenTo'](_0x3f84d3,'remove',(_0x6ea0c8,_0x228754)=>{_0x228754['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x228754['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x425354('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3c6693=this['context']['plugins']['get'](z);_0x3c6693['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3c6693),this['stopListening'](this['annotations']),this['context']instanceof _0x2b5820&&this['stopListening'](this['context']['editors']);for(const _0x3612ba of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3612ba);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x312019){if(!_0x312019['plugins']['has']('EditorAnnotations'))return;const _0x4889e9=_0x312019['plugins']['get']('EditorAnnotations'),_0x198e50=()=>{const _0x269a4b=_0x4889e9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x269a4b[0x0]||null);};this['listenTo'](_0x4889e9,'refresh',_0x198e50),this['listenTo'](_0x4889e9,'blur',(_0x4590b9,{isAnnotationTracked:_0x79f471})=>{this['activeAnnotation']&&_0x79f471(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4889e9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x16a6ae=>{_0x4889e9['hasDomSelection']()&&(_0x198e50(),_0x16a6ae['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4889e9);}['_destroyEditorAnnotationsIntegration'](_0x2512bf){this['stopListening'](_0x2512bf),this['_editorAnnotations']['remove'](_0x2512bf);}}class C extends _0x20f04f{['counterView'];constructor(_0x229176){super(_0x229176);const _0x4a85f1=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2eeb9c,_0x1e341b)=>_0x2eeb9c?'...':_0x1e341b['toString']()),this['set']('annotationType',''),this['icon']=_0x2853dc,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4a85f1['to']('annotationType',_0x1c935d=>'ck-annotation-counter__badge--'+_0x1c935d),_0x4a85f1['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4a85f1['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4bfeb4{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x160058){super(_0x160058),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x2c5617())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x242e1d(),this['_refreshPositioningDebounced']=_0x4b297f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x50dec5(this['context']['locale']),this['balloonPanelView']=new _0x73c1ce(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x9075e9){this['annotations']=_0x9075e9;const _0x33faf0=this['context']['plugins']['get'](z),_0x5cae68=this['balloonPanelView'];if(_0x33faf0['_annotations']=_0x9075e9,this['isAttached'])throw new _0x425354('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x33faf0,'set:container',()=>{this['detach'](),this['listenTo'](_0x33faf0,'change:container',_0x4444e2=>{_0x4444e2['off'](),this['attach'](_0x9075e9);});}),_0x33faf0['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x37ea0d=_0x419b17=>{const _0xeb7f92=new C(this['context']['locale']);_0x33faf0['addAnnotation'](_0x419b17,_0xeb7f92),this['_annotationToNarrowView']['set'](_0x419b17,_0xeb7f92),_0xeb7f92['bind']('isDirty','annotationType','number')['to'](_0x419b17['view'],'isDirty','type','length'),_0xeb7f92['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5cae68['content']['first']!==_0x419b17['view']?(this['_showBalloon'](_0x419b17),_0x419b17['view']['element']['focus'](),this['setActiveAnnotation'](_0x419b17)):this['setActiveAnnotation'](null);});};for(const _0x22926a of _0x9075e9)_0x37ea0d(_0x22926a);this['listenTo'](_0x9075e9,'add',(_0x59d9fd,_0x544ca2)=>{_0x37ea0d(_0x544ca2);}),this['listenTo'](_0x9075e9,'remove',(_0x17ae89,_0x4152a0,_0x229856)=>{this['_annotationToNarrowView']['get'](_0x4152a0)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4152a0),_0x33faf0['rearrange']({'removedAnnotation':_0x4152a0,'previousAnnotation':_0x9075e9['get'](_0x229856-0x1),'nextAnnotation':_0x9075e9['get'](_0x229856+0x1)}),_0x4152a0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x9075e9,'focus',(_0xaf4eea,_0x1229c0)=>{this['setActiveAnnotation'](_0x1229c0);}),this['listenTo'](_0x9075e9,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2a46ef,_0x38df51)=>{_0x38df51['keyCode']===_0x3c889a['esc']&&_0x5cae68['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5cae68['content']['first']),this['_hideBalloon'](),_0x38df51['stopPropagation'](),_0x38df51['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2e6e89,_0x34a000)=>{const _0x1468f4=_0x34a000['target'];_0x5cae68['isVisible']&&_0x5cae68['element']['contains'](_0x1468f4)||_0x33faf0['view']['element']['contains'](_0x1468f4)||_0x2e6e89['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x849756=>_0x849756['contains'](_0x1468f4))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2b0e22=this['context']instanceof _0x2b5820?this['context']['editors']:new _0x242e1d([this['context']]);for(const _0x4e0194 of _0x2b0e22)this['_integrateWithEditorAnnotations'](_0x4e0194);this['listenTo'](_0x2b0e22,'add',(_0x3e75f6,_0xe65572)=>{this['listenTo'](_0xe65572,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xe65572);});}),this['listenTo'](_0x2b0e22,'remove',(_0x337248,_0x186f07)=>{_0x186f07['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x186f07['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x55f316){if(_0x55f316===this['activeAnnotation'])return;const _0x35b691=this['context']['plugins']['get'](z);if(_0x35b691['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x55f316,'disableAnimationOnActivatedAnnotation':!0x0}),_0x55f316)_0x35b691['getSidebarItemView'](_0x55f316)?this['_showBalloon'](_0x55f316):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x55f316;}['detach'](){if(!this['isAttached'])throw new _0x425354('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2dd0cd=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xf28596=>_0xf28596['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2dd0cd['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2b5820&&this['stopListening'](this['context']['editors']);for(const _0x4156b6 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4156b6);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'](_0x4acba2){if(!_0x4acba2['plugins']['has']('EditorAnnotations'))return;const _0x3b996d=_0x4acba2['plugins']['get']('EditorAnnotations'),_0x1f786d=this['context']['plugins']['get'](z),_0x158cd7=this['annotations'],_0x260dcd=this['balloonPanelView'],_0x3b6eda=()=>{const _0x19ba6d=_0x3b996d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x19ba6d),this['setActiveAnnotation'](_0x19ba6d[0x0]||null);};this['listenTo'](_0x3b996d,'refresh',_0x3b6eda),this['listenTo'](_0x3b996d,'blur',(_0x208a70,{isAnnotationTracked:_0x449728})=>{this['activeAnnotation']&&_0x449728(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3b996d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x158cd7,'blur',_0x42dd13=>{_0x3b996d['hasDomSelection']()&&_0x42dd13['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1d08a9,_0x1257a4)=>{const _0x1ea72d=_0x1257a4['target'];_0x260dcd['isVisible']&&_0x260dcd['element']['contains'](_0x1ea72d)||_0x1f786d['view']['element']['contains'](_0x1ea72d)||this['activeAnnotation']&&_0x3b996d['hasDomSelection']()&&(_0x3b6eda(),_0x1d08a9['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3b996d);}['_destroyEditorAnnotationsIntegration'](_0x3cb0e3){_0x3cb0e3&&(this['stopListening'](_0x3cb0e3),this['_editorAnnotations']['remove'](_0x3cb0e3));}['_setSelectedAnnotations'](_0x54c27c){for(const _0x3a3a45 of this['_selectedAnnotations'])_0x54c27c['includes'](_0x3a3a45)||this['_manuallyClosedAnnotationViews']['delete'](_0x3a3a45['view']);this['_selectedAnnotations']=_0x54c27c;}['_refreshPositioning'](){const _0x1d5a0e=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x1d5a0e['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x35df3f){if(this['_manuallyClosedAnnotationViews']['has'](_0x35df3f['view']))return;const _0xc11c44=this['balloonPanelView']['content']['first'];_0xc11c44!==_0x35df3f['view']?(_0xc11c44&&this['_detachListeners'](_0xc11c44),this['_attachListeners'](_0x35df3f['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x35df3f['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4b224b=this['balloonPanelView']['content']['first'],_0x348b9a=_0x4b224b&&this['annotations']['getByView'](_0x4b224b);if(!_0x348b9a||!this['_annotationToNarrowView']['has'](_0x348b9a))return;const _0x4db9d7=this['_annotationToNarrowView']['get'](_0x348b9a)['element'],_0x11fcfa=(function(){const _0x2c8a60=_0x73c1ce['defaultPositions'];return[_0x2c8a60['southArrowNorthEast'],_0x2c8a60['northArrowSouthEast'],_0x2c8a60['southArrowNorth'],_0x2c8a60['northArrowSouth'],_0x2c8a60['southArrowNorthWest'],_0x2c8a60['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x4db9d7,'positions':_0x11fcfa});}['_hideBalloon'](){const _0x843a7f=this['balloonPanelView'],_0x4b2c71=_0x843a7f['content']['first'];_0x4b2c71&&(this['_detachListeners'](_0x4b2c71),_0x843a7f['unpin'](),_0x843a7f['content']['clear']());}['_attachListeners'](_0x47eac9){this['listenTo'](_0x47eac9,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x47eac9,'Esc',(_0x320b5b,_0x20d85d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x47eac9),this['_hideBalloon'](),_0x20d85d();});}['_detachListeners'](_0x11d1ee){this['stopListening'](_0x11d1ee);}}class c extends _0x3d3386{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x89ec3d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3744a7){super(_0x3744a7),_0x3744a7['editing']['view']['addObserver'](_0x5a2f6),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x3744a7['plugins']['get'](_0x89ec3d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x4b297f(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x514d50=this['editor']['plugins']['get'](j);_0x514d50['context']===this['editor']&&(_0x514d50['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x589916,_0x4512dd)=>{const _0x5c4966=this['_balloon'];if(this['isAttached']&&_0x5c4966['visibleView']){const _0x2c2864=this['annotations']['getByView'](_0x5c4966['visibleView']);_0x2c2864&&this['_closeAnnotation'](_0x2c2864),_0x4512dd();}}));}['afterInit'](){const _0x56f28b=this['editor']['plugins']['get'](j);_0x56f28b['context']===this['editor']&&(_0x56f28b['hasActive']()||_0x56f28b['switchTo']('inline'));}['setActiveAnnotation'](_0x505994){_0x505994!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x505994&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x505994)&&this['_addAnnotationToBalloon'](_0x505994,!0x0),_0x505994['isActive']=!0x0),_0x505994||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x505994);}['attach'](_0x161c38){this['annotations']=_0x161c38;const _0x181ac3=this['editor']['plugins']['get'](j),_0x4523d5=this['_balloon'];if(this['isAttached'])throw new _0x425354('inlineannotations-attach-already-attached',this);if(_0x181ac3['context']!==this['editor'])throw new _0x425354('inlineannotations-not-allowed-with-context',this);const _0x21aea6=this['editor']['plugins']['get'](b);this['listenTo'](_0x21aea6,'refresh',()=>{const _0x19250e=_0x21aea6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x318ae7,_0x298cef;!this['_forceRefresh']&&(_0x318ae7=_0x19250e,_0x298cef=this['_selectedAnnotations'],_0x318ae7['length']===_0x298cef['length']&&_0x318ae7['every'](_0x4de695=>_0x298cef['includes'](_0x4de695)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x19250e),this['setActiveAnnotation'](_0x19250e[0x0]||null));}),this['listenTo'](_0x21aea6,'blur',(_0x45aa26,{isAnnotationTracked:_0x1cab01})=>{this['activeAnnotation']&&_0x1cab01(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x21aea6,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1cd3fc,_0x2cef4d,_0x2ec0cf)=>{_0x2ec0cf||this['setActiveAnnotation'](null);}),this['listenTo'](_0x161c38,'remove',(_0x8336f1,_0x294244)=>{this['_removeAnnotationFromBalloon'](_0x294244),_0x294244===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4523d5,'change:visibleView',(_0x147f52,_0x21e741,_0xbcfd34,_0x4bbac6)=>{_0x4bbac6&&this['stopListening'](_0x4bbac6);const _0xa2a16d=_0x161c38['getByView'](_0xbcfd34);_0xbcfd34&&_0xa2a16d&&(this['listenTo'](_0xbcfd34,'change:height',()=>{_0x4523d5['updatePosition']();}),this['listenTo'](_0xbcfd34,'Esc',()=>{this['_closeAnnotation'](_0xa2a16d),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xa2a16d&&this['setActiveAnnotation'](_0xa2a16d));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4523d5['visibleView']&&(_0x161c38['getByView'](_0x4523d5['visibleView'])&&_0x4523d5['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 _0x425354('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3cdab4 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3cdab4);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x293a1c){for(const _0x10635c of this['_selectedAnnotations'])_0x293a1c['includes'](_0x10635c)||this['_manuallyClosed']['delete'](_0x10635c);for(const _0x392b54 of this['annotations'])_0x293a1c['includes'](_0x392b54)||this['_removeAnnotationFromBalloon'](_0x392b54);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xf3a197 of _0x293a1c)this['_addAnnotationToBalloon'](_0xf3a197);}this['_selectedAnnotations']=_0x293a1c;}['_addAnnotationToBalloon'](_0x5c2909,_0x21da0f=!0x1){this['_manuallyClosed']['has'](_0x5c2909)||(this['_addedAnnotations']['has'](_0x5c2909)||this['_balloon']['hasView'](_0x5c2909['view'])||(this['_addedAnnotations']['add'](_0x5c2909),this['_balloon']['add']({'stackId':_0x5c2909['view']['id'],'view':_0x5c2909['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5c2909)}})),_0x21da0f&&this['_balloon']['showStack'](_0x5c2909['view']['id']));}['_getBalloonTargetForAnnotation'](_0x3a4a69){const _0x3f26ad=_0x3a4a69['target'],_0x189f03=this['editor']['editing']['view'],_0x5b7479=_0x189f03['document']['selection']['getFirstRange'](),_0x4e94f4=_0x189f03['domConverter']['viewRangeToDom'](_0x5b7479);if(_0x4e94f4['collapse'](!0x0),_0x3f26ad){if(_0x3f26ad instanceof _0x5c3397)return _0x3f26ad;let _0x52e3c9=[];for(const _0xac9cd1 of _0x3f26ad)_0x52e3c9['push'](...F(_0xac9cd1['getClientRects']()));_0x52e3c9=function(_0x277a33){const _0x2868fa=[];let _0x409a92=_0x277a33[0x0];for(let _0x283889=0x1;_0x283889<_0x277a33['length'];_0x283889++)P(_0x409a92,_0x277a33[_0x283889])?_0x409a92['width']+=_0x277a33[_0x283889]['width']:(_0x2868fa['push'](_0x409a92),_0x409a92=_0x277a33[_0x283889]);return _0x2868fa['push'](_0x409a92),_0x2868fa;}(_0x52e3c9);const _0x538d68=_0x4e94f4['getBoundingClientRect']();return _0x52e3c9['find'](_0x3e42b6=>_0x3e42b6['top']<=_0x538d68['top']&&_0x3e42b6['bottom']>=_0x538d68['bottom']&&_0x3e42b6['left']<=_0x538d68['left']&&_0x3e42b6['right']>=_0x538d68['right'])||_0x52e3c9[0x0];}return _0x3a4a69['targetRect']||_0x4e94f4;}['_removeAnnotationFromBalloon'](_0x22f118){this['_addedAnnotations']['has'](_0x22f118)&&this['_balloon']['hasView'](_0x22f118['view'])&&(this['_addedAnnotations']['delete'](_0x22f118),this['_balloon']['remove'](_0x22f118['view']));}['_closeAnnotation'](_0x37a425){this['_manuallyClosed']['add'](_0x37a425),this['_removeAnnotationFromBalloon'](_0x37a425);}}function F(_0x1e16c0){return Array['from'](_0x1e16c0)['map'](DOMRect['fromRect']);}function P(_0x2d1e4e,_0x464d06){return _0x2d1e4e['top']===_0x464d06['top']&&_0x2d1e4e['bottom']===_0x464d06['bottom']&&_0x2d1e4e['right']===_0x464d06['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x50bb2c,_0x3d0295){super(_0x50bb2c),this['set']('isEmpty',!_0x3d0295['length']),this['focusTracker']=new _0x4e7aba(),this['_annotationViews']=_0x3d0295,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x540a82({'focusables':_0x3d0295,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3d0295,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3d0295,'remove',(_0x4dc602,_0x54f1fe)=>{_0x54f1fe['isActive']&&this['focus'](),_0x3d0295['length']||(this['isEmpty']=!0x0);});const _0xb9ef66=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x50bb2c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3d0295},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0xb9ef66['if']('isEmpty','ck-hidden',_0x17121b=>!_0x17121b)]},'children':[{'text':N(_0x50bb2c,'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 _0xd8550e of this['_annotationViews'])this['focusTracker']['add'](_0xd8550e['element']);this['_annotationViews']['on']('change',(_0x33f162,{added:_0x4519b8,removed:_0x52d632})=>{for(const _0x173a15 of _0x4519b8)this['focusTracker']['add'](_0x173a15['element']);for(const _0x354499 of _0x52d632)this['focusTracker']['remove'](_0x354499['element']);});}}class p extends _0x4bfeb4{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x2e601f){super(_0x2e601f),this['archivedThreads']=new _0x242e1d();}['init'](){const _0x410e62=this['context'],_0x1ea620=_0x410e62['plugins']['get'](o),_0x1a6ad6=_0x410e62['plugins']['get'](y);this['listenTo'](_0x1ea620,'addCommentThread',(_0x5f4d5b,{threadId:_0x204335})=>{const _0x3fa328=_0x1ea620['getCommentThread'](_0x204335);_0x3fa328['archivedAt']&&this['archivedThreads']['add'](_0x3fa328,this['_calculatePosition'](_0x3fa328['archivedAt'])),this['listenTo'](_0x3fa328,'change:archivedAt',(_0x403678,_0x2b4149,_0x5a57aa)=>{_0x5a57aa?this['archivedThreads']['has'](_0x3fa328)||this['archivedThreads']['add'](_0x3fa328,this['_calculatePosition'](_0x3fa328['archivedAt'])):this['archivedThreads']['has'](_0x3fa328)&&this['archivedThreads']['remove'](_0x3fa328);});}),this['listenTo'](_0x1ea620,'removeCommentThread',(_0x392b76,{threadId:_0x1dd9e5})=>{const _0x562012=_0x1ea620['getCommentThread'](_0x1dd9e5);this['stopListening'](_0x562012),this['archivedThreads']['has'](_0x562012)&&this['archivedThreads']['remove'](_0x562012);},{'priority':'highest'}),this['listenTo'](_0x1a6ad6['collection'],'focus',(_0x1b0ac6,_0x32ec9a)=>{_0x32ec9a['isVisible']||(_0x32ec9a['isActive']=!0x0,_0x1a6ad6['activate'](_0x32ec9a));});}['_calculatePosition'](_0x3f13e5){const _0x5b1cd8=[...this['archivedThreads']]['findIndex'](_0x37c29f=>_0x37c29f['archivedAt']<_0x3f13e5);return _0x5b1cd8>-0x1?_0x5b1cd8:this['archivedThreads']['length'];}}class a extends _0x3d3386{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x114f2b];}constructor(_0x50f767){super(_0x50f767),this['annotationViews']=new _0x15debb(),this['_pendingThreads']=[];}['init'](){const _0x4a0626=this['editor'],_0x1879d1=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4a0626['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x20f04f,!0x0)),_0x4a0626['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2e0ed3=this['_createCommentsArchiveButton'](_0x331cf1);return _0x2e0ed3['set']({'role':'menuitemcheckbox'}),_0x2e0ed3;});const _0x27abef=_0x4a0626['plugins']['get'](p),_0x27f176=_0x4a0626['plugins']['get']('Annotations'),_0x216d40=_0x4a0626['plugins']['get']('CommentsRepository');_0x27abef['archivedThreads']['forEach'](_0x284dac=>{this['_handleNewThread'](_0x284dac);}),this['listenTo'](_0x27abef['archivedThreads'],'add',(_0x480723,_0x4b3eb8)=>{this['_handleNewThread'](_0x4b3eb8);}),this['listenTo'](_0x27f176['collection'],'add',(_0x34c5e6,_0xdd7197)=>{const _0x162a3e=this['_pendingThreads']['find'](_0x31ff8c=>{const _0xc3370=_0x216d40['_threadToController']['get'](_0x31ff8c);return _0xc3370&&_0xdd7197['innerView']===_0xc3370['view'];});if(_0x162a3e){const _0x3c4e40=this['_calculatePosition'](_0x162a3e['archivedAt']);this['_addAnnotationToArchive'](_0xdd7197,_0x3c4e40),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x162a3e),0x1);}}),this['listenTo'](_0x27abef['archivedThreads'],'remove',(_0x21eaff,_0x4f6cc8)=>{const _0x9d3239=_0x4a0626['config']['get']('collaboration.channelId');if(!_0x9d3239||_0x4f6cc8['channelId']===_0x9d3239){if(this['_pendingThreads']['includes'](_0x4f6cc8))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4f6cc8),0x1);else{const _0x4bd6b2=_0x216d40['_threadToController']['get'](_0x4f6cc8),_0x5100b0=_0x27f176['getByInnerView'](_0x4bd6b2['view']);this['annotationViews']['remove'](_0x5100b0['view']),this['stopListening'](_0x5100b0),this['stopListening'](_0x5100b0['focusableElements']);}}}),this['listenTo'](_0x27f176['collection'],'add',(_0x3a8a6d,_0x103e9c)=>{this['listenTo'](_0x103e9c,'escape',_0x1879d1);}),this['listenTo'](_0x27f176['collection'],'remove',(_0x1181b9,_0x49f562)=>{this['stopListening'](_0x49f562,'escape',_0x1879d1);});}['_addAnnotationToArchive'](_0x5e1d9a,_0x53a349){this['listenTo'](_0x5e1d9a,'set:isVisible',_0x531651=>{_0x531651['return']=!0x1,_0x531651['stop']();}),this['annotationViews']['add'](_0x5e1d9a['view'],_0x53a349);}['_handleNewThread'](_0x5727fa){const _0x54b58e=this['editor']['plugins']['get']('CommentsRepository'),_0x566f17=this['editor']['plugins']['get']('Annotations'),_0x5c0e4b=this['editor']['config']['get']('collaboration.channelId');if(!_0x5c0e4b||_0x5727fa['channelId']===_0x5c0e4b){const _0x5e2e35=_0x54b58e['_threadToController']['get'](_0x5727fa);if(!_0x5e2e35)return void this['_pendingThreads']['push'](_0x5727fa);const _0x160ea0=this['_calculatePosition'](_0x5727fa['archivedAt']),_0x5005b1=_0x566f17['getByInnerView'](_0x5e2e35['view']);_0x5005b1['isVisible']&&_0x566f17['_visibleAnnotations']['remove'](_0x5005b1),this['_addAnnotationToArchive'](_0x5005b1,_0x160ea0);}}['_calculatePosition'](_0x498770){const _0x8d5465=this['editor']['config']['get']('collaboration.channelId'),_0x109d7f=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x422ae0=>_0x422ae0['channelId']===_0x8d5465)['findIndex'](_0x2c020c=>_0x2c020c['archivedAt']<_0x498770);return _0x109d7f<0x0||_0x109d7f>this['annotationViews']['length']?this['annotationViews']['length']:_0x109d7f-0x1;}['_toggleDialog'](){const _0x235bff=this['editor'],_0x28b5b=_0x235bff['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x235bff['locale'],this['annotationViews'])),'commentsArchive'===_0x28b5b['id']?_0x28b5b['hide']():_0x28b5b['show']({'id':'commentsArchive','title':N(_0x235bff['locale'],'COMMENTS_ARCHIVE'),'icon':_0xd8de89,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x2443a8['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4cba37,_0x5e91e9=!0x1){const _0x5e5101=this['editor']['locale'],_0x55a5f0=this['editor']['plugins']['get']('Dialog'),_0x3240ae=new _0x4cba37(_0x5e5101);return _0x3240ae['bind']('isEnabled')['to'](this,'isEnabled'),_0x3240ae['bind']('isOn')['to'](_0x55a5f0,'id',_0x4e6cb6=>'commentsArchive'===_0x4e6cb6),_0x3240ae['set']({'label':N(_0x5e5101,'COMMENTS_ARCHIVE'),'icon':_0xd8de89,'isToggleable':!0x0}),_0x5e91e9&&(_0x3240ae['tooltip']=!0x0),this['listenTo'](_0x3240ae,'execute',()=>this['_toggleDialog']()),_0x3240ae;}['_hideDialogOnAnnotationEscape']=_0x4298e5=>{const _0x53671c=_0x4298e5['source'];if(!this['annotationViews']['has'](_0x53671c['view']))return;const _0x2560f2=this['editor']['plugins']['get']('Dialog');_0x2560f2['isOpen']&&'commentsArchive'===_0x2560f2['id']&&(_0x2560f2['hide'](),_0x4298e5['stop']());};}class gi extends _0x3d3386{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x552c8b,ContextPlugin as _0x5da752,PendingActions as lt,Command as _0x2e80b8,Plugin as _0x296061,Context as _0x345514}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x177751,uid as _0x32fc6d,KeystrokeHandler as jt,FocusTracker as _0xadc067,diff as _0x21e128,Collection as _0x52a82c,Rect as _0x2cf657,CKEditorError as _0x3593cf,first as _0x1a22cf,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x33fa4a,keyCodes as _0x324c4d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x1bc631,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x2da3f9,trimHtml as ts,LateFocusDropdownButtonView as _0x53aa75,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x17a1c9}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x1a90a8}from'es-toolkit/compat';import{IconUndo as _0x21e0c3,IconCheck as _0x26c7b4,IconPencil as _0x5ba220,IconRemoveComment as _0x4af64b,IconThreeVerticalDots as _0x33f82d,IconAddComment as _0x86f3df,IconCommentsArchive as _0x2d2656}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x369a14,ButtonView as _0x4c5034,ViewCollection as _0x2e7393,createDropdown as _0x4bcbb5,ListView as _0x3b8927,focusChildOnDropdownOpen as _0x386e77,ListItemView as _0x150f86,MenuBarMenuListItemButtonView as _0x3e2643,BodyCollection as _0x171eb1,BalloonPanelView as _0x5b0488,ContextualBalloon as _0x4ba0df,Dialog as _0x15a9d9,DialogViewPosition as _0x1d1998}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x1e4159}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 Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x21af1b}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x3259cb}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x177751(){['model'];['view'];constructor(_0x52465e,_0x5977f1){super(),this['model']=_0x52465e,this['model']['_isAttached']=!0x0,this['view']=_0x5977f1,this['listenTo'](_0x5977f1,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x5977f1,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x5977f1,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x5977f1,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x5977f1,'addComment',(_0x311174,_0x39cd4e)=>this['addComment'](_0x39cd4e)),this['listenTo'](_0x5977f1,'updateComment',(_0x39c96e,_0x554fc6,_0x4b5d4d)=>this['updateComment'](_0x554fc6,_0x4b5d4d)),this['listenTo'](_0x5977f1,'removeComment',(_0x37ee31,_0x5dc503)=>this['removeComment'](_0x5dc503));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x378141){this['model']['addComment']({'content':_0x378141,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xfc16f5,_0x5b7577){this['model']['getComment'](_0xfc16f5)['update']({'content':_0x5b7577});}['removeComment'](_0x5975b5){this['model']['getComment'](_0x5975b5)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x4fd831,_0x2d3cf1,_0x315358){const t=_0x4fd831['t'];switch(_0x2d3cf1){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'},_0x315358);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'},_0x315358);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'},_0x315358);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'},_0x315358);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x315358);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'},_0x315358);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'},_0x315358);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'},_0x315358);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 Rt extends $t{['main'];['editable'];constructor(_0x26c6b1,_0x12f8f0){super(_0x26c6b1);const _0x36e427=_0x32fc6d();this['main']=this['createCollection'](),this['editable']=new Vt(_0x26c6b1,_0x12f8f0,void 0x0,{'label':()=>N(_0x26c6b1,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x26c6b1['uiLanguageDirection'],'lang':_0x26c6b1['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x36e427},'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 Et extends Ut{['view'];constructor(_0x331728){super(_0x331728),this['view']=new Rt(_0x331728['locale'],_0x331728['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x51b96f=this['editor']['editing']['view'],_0x151963=this['view']['editable'],_0x528691=_0x51b96f['document']['getRoot']();_0x151963['name']=_0x528691['rootName'],this['view']['render']();const _0x395a69=_0x151963['element'];this['setEditableElement'](_0x151963['name'],_0x395a69),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x51b96f['attachDomRoot'](_0x395a69),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x177751(_0x552c8b){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x431df8={}){function _0x3e028e(_0x43c3e3){return _0x43c3e3['map'](_0x1c4d09=>String['fromCharCode'](_0x1c4d09))['join']('');}(_0x431df8=Object['assign']({},_0x431df8))['plugins']||(_0x431df8['plugins']=hs['defaultPlugins']),super(_0x431df8),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x3e028e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3e028e([0x76,0x69,0x65,0x77])][_0x3e028e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3e028e([0x61,0x75,0x74,0x6f]),this[_0x3e028e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3e028e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3e028e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3e028e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3e028e([0x6f,0x6b])});}['create'](){const _0x30fef4=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x30fef4))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x27a877=>{const _0x7920fa=this['model']['document']['getRoot'](),_0x35d19d=_0x7920fa&&_0x7920fa['getChild'](_0x7920fa['childCount']-0x1);_0x27a877['setSelection'](_0x35d19d,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x4c23d6=this['editing']['view'],_0x5cf323=_0x4c23d6['document']['getRoot'](),_0x12e77e=_0x5cf323['getChild'](0x0);_0x5cf323['childCount']>0x1||!_0x12e77e||'p'!=_0x12e77e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x4c23d6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x12e77e['placeholder']=this['placeholder']),Ft({'view':_0x4c23d6,'element':_0x12e77e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x12e77e);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1c7a2b,_0x3bd8f5={}){super(_0x1c7a2b),this['editor']=null,this['_editorConfig']=_0x3bd8f5,this['set']('value',_0x3bd8f5['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x1c7a2b,'Reply...')),this['set']('submitLabel',N(_0x1c7a2b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xadc067(),this['focusCycler']=new _0x369a14({'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',(_0x273d80,_0xb2b255)=>{this['cancelButtonView']['fire']('execute'),_0xb2b255();}),this['keystrokes']['set']('Ctrl+Enter',(_0x56b615,_0x42ed41)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x42ed41());}),this['on']('submit',(_0x190665,_0x31688d)=>{_0x31688d['length']>0xfde8?(alert(N(_0x1c7a2b,'TOO_LONG_COMMENT_ALERT',[_0x31688d['length'],0xfde8])),_0x190665['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x455dcd=this['editor'];this['element']['insertBefore'](_0x455dcd['ui']['element'],this['element']['firstChild']),_0x455dcd['model']['document']['on']('change',()=>this['value']=_0x455dcd['getData']()),_0x455dcd['bind']('placeholder')['to'](this),this['focusables']['add'](_0x455dcd['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x43e904){-0x1===_0x43e904?(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:_0x52214e}=this,_0xe36307=new _0x4c5034(_0x52214e);return _0xe36307['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xe36307['withText']=!0x0,_0xe36307['bind']('label')['to'](this,'submitLabel'),_0xe36307['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xe36307['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1b6b83,_0x37e040)=>!_0x37e040&&!!_0x1b6b83['trim']()),_0xe36307;}['_createCancelButton'](){const {locale:_0x4558e9}=this,_0xe1670f=new _0x4c5034(_0x4558e9);return _0xe1670f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xe1670f['label']=N(_0x4558e9,'Cancel'),_0xe1670f['withText']=!0x0,_0xe1670f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xe1670f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x1e08db=>{this['focusTracker']['add'](_0x1e08db['element']);}),this['focusables']['on']('change',(_0x29e583,_0x3b7ded)=>{for(const _0x1d6eb4 of Array['from'](_0x3b7ded['added'])['reverse']())this['focusTracker']['add'](_0x1d6eb4['element']);});}}class ie extends kt{constructor(_0x594256,_0x3e2051,_0x22803f){super(_0x594256),this['commentInputView']=new es(_0x594256,_0x22803f),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x55669b,_0x12cd49)=>_0x55669b||!!_0x12cd49),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 _0x1bc631(_0x594256,_0x3e2051),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'](_0x71d251){this['commentInputView']['focus'](_0x71d251);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x41b753,_0x360632)=>{const {submitButtonView:_0x5e696f,cancelButtonView:_0x4f96c2,editor:_0x2d7485}=this['commentInputView'];[_0x5e696f['element'],_0x4f96c2['element'],_0x2d7485?_0x2d7485['editing']['view']['getDomRoot']():null]['filter'](_0x55c9c5=>_0x55c9c5)['some'](_0x17fd88=>_0x17fd88['contains'](_0x360632['target']))||(this['focus'](),_0x360632['preventDefault']());});}}class rs extends kt{constructor(_0x4d027e){super(_0x4d027e);const _0x4154cf=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4154cf['to']('count',_0x3ff2e0=>N(_0x4d027e,'NUMBER_OF_COMMENTS',_0x3ff2e0))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x16219c,_0x1235a1,_0x51c1e2){super(_0x16219c);const _0x22305c=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1235a1['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1235a1,this['_config']=_0x51c1e2,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xadc067(),this['keystrokes']=new jt(),this['focusCycler']=new _0x369a14({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x276914=>this['commentViews']['map'](_0x1931cb=>_0x1931cb['element'])['includes'](_0x276914['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x16219c),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x47ab9e=>_0x47ab9e-this['_config']['maxCommentsWhenCollapsed']);for(const _0x374484 of _0x1235a1['comments'])this['_handleNewCommentModel'](_0x374484);this['_handleInfoComment'](),this['listenTo'](_0x1235a1['comments'],'add',(_0x44ac9c,_0x782dcd)=>{const _0x31f313=this['_calculatePosition'](_0x782dcd);this['length']++,this['_handleNewCommentModel'](_0x782dcd,_0x31f313),this['refreshVisibleViews']();}),this['listenTo'](_0x1235a1['comments'],'remove',(_0x2f5266,_0x3608de)=>{this['length']--,this['_handleRemoveCommentModel'](_0x3608de),this['refreshVisibleViews']();}),this['listenTo'](_0x1235a1,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1235a1,'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',_0x22305c['if']('length','ck-hidden',_0x13e491=>!_0x13e491)],'aria-label':N(_0x16219c,'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'](_0x18ed75){-0x1===_0x18ed75?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x380fc4 of this['commentViews'])_0x380fc4['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x5da342,_0x107b09){const _0x40140e=new this['_config']['CommentView'](this['locale'],_0x5da342,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x40140e['viewUid']=_0x5da342['id'],_0x40140e['delegate']('removeComment')['to'](this),_0x40140e['delegate']('updateComment')['to'](this),_0x40140e['delegate']('resolveCommentThread')['to'](this),_0x40140e['delegate']('editorReady')['to'](this),_0x40140e['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x40140e,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x40140e,_0x107b09);}['_calculatePosition'](_0x2c6a77){const _0x47cef1=this['_model']['_findOptimalIndex'](_0x2c6a77);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2c6a77['authoredAt']?_0x47cef1-0x1:_0x47cef1:_0x47cef1-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x658805={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x658805,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x658805));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x476cd3){const _0x521259=this['commentViews']['remove'](_0x476cd3['id']);this['stopListening'](_0x521259),_0x521259['isEditMode']&&this['_updateHasDirtyComment'](),_0x521259['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x240417=>_0x240417['isEditMode']);}['_rearrangeCollapse'](){const _0x2ce311=function(_0x58b56f){const _0x51a714=new _0x52a82c();for(const _0x27b403 of _0x58b56f)_0x51a714['add'](_0x27b403);return _0x51a714;}(this['commentViews']),_0x310484=this['_collapsedCommentsView']['count'];for(let _0x474ff9=0x1;_0x474ff9<=_0x310484;_0x474ff9++)_0x2ce311['remove'](0x1);for(const _0x1fbd29 of _0x2ce311)_0x1fbd29['collapse']();_0x310484>0x0&&_0x2ce311['add'](this['_collapsedCommentsView'],0x1),ns(_0x21e128(Array['from'](this['visibleViews']),Array['from'](_0x2ce311)),this['visibleViews'],_0x2ce311);}['_rearrangeExpand'](){ns(_0x21e128(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x11736b of this['visibleViews'])_0x11736b['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x58e0b1=>{this['focusTracker']['add'](_0x58e0b1['element']),this['keystrokes']['listenTo'](_0x58e0b1['element']);}),this['commentViews']['on']('change',(_0x199235,_0x13b310)=>{for(const _0x5d7789 of _0x13b310['removed'])this['focusTracker']['remove'](_0x5d7789['element']),this['keystrokes']['stopListening'](_0x5d7789['element']);for(const _0xa7fd30 of Array['from'](_0x13b310['added'])['reverse']())this['focusTracker']['add'](_0xa7fd30['element']),this['keystrokes']['listenTo'](_0xa7fd30['element']);});}}function ns(_0x5c9135,_0x4e664d,_0x38e288){let _0x3bf287=0x0;for(const _0xf277e5 of _0x5c9135)switch(_0xf277e5){case'insert':_0x4e664d['add'](_0x38e288['get'](_0x3bf287),_0x3bf287),_0x3bf287++;break;case'delete':_0x4e664d['remove'](_0x3bf287);break;case'equal':_0x3bf287++;}}class oe extends kt{constructor(_0x300ecc){super(_0x300ecc);const _0x91f2f1=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x91f2f1['to']('contextValue',_0x5101a0=>N(_0x300ecc,'THREAD_CONTEXT_LABEL',_0x5101a0)),'tabindex':-0x1},'children':[{'text':_0x91f2f1['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x845e00,_0x2e7ffe){super(_0x845e00);const _0x120ff4=this['bindTemplate'];this['_model']=_0x2e7ffe,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xadc067(),this['keystrokes']=new jt(),this['focusCycler']=new _0x369a14({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4a148a=>!!_0x4a148a),this['bind']('contextValue')['to'](this['_model'],'context',_0x2424a9=>_0x2424a9&&_0x2424a9['value']?this['_trimContextValue'](_0x2424a9['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x120ff4['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 _0x5bd4e8=new _0x4c5034(this['locale']);return _0x5bd4e8['label']=N(this['locale'],'Reopen'),_0x5bd4e8['tooltip']=N(this['locale'],'Reopen'),_0x5bd4e8['icon']=_0x21e0c3,_0x5bd4e8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x676c14=>!_0x676c14),_0x5bd4e8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2d6ddb,_0x2c687f)=>_0x2d6ddb&&_0x2c687f),_0x5bd4e8['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5bd4e8;}['_trimContextValue'](_0x2f1f00){if(_0x2f1f00['length']<0x96)return _0x2f1f00;const _0x48db6e=_0x2f1f00['lastIndexOf']('\x20',0x93);return _0x2f1f00['substring'](0x0,_0x48db6e>-0x1?_0x48db6e:0x93)+'...';}['_attachContextActions'](){const _0x1fcd64=this['element']['querySelector']('.ck-context'),_0x2fbc49=_0x1fcd64['querySelector']('.ck-context__value');this['listenTo'](_0x1fcd64,'mouseenter',()=>{_0x2fbc49['offsetWidth']<_0x2fbc49['scrollWidth']&&_0x1fcd64['classList']['add']('overlay');}),this['listenTo'](_0x1fcd64,'mouseleave',()=>{_0x1fcd64['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x45a70a of this['focusables'])this['focusTracker']['add'](_0x45a70a['element']),this['keystrokes']['listenTo'](_0x45a70a['element']);}['_createContextView'](){const _0x1a36ad=new oe(this['locale']);return _0x1a36ad['bind']('contextValue')['to'](this),_0x1a36ad;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x31c33d,_0x207631,_0x4eefbc,_0x247e23){super(_0x31c33d),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x207631,this['_localUser']=_0x4eefbc,this['_config']=_0x247e23,this['commentThreadHeaderView']=new Xt(_0x31c33d,_0x207631),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x31c33d,N(_0x31c33d,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x31c33d,_0x207631,Object['assign']({'CommentView':this['_config']['CommentView']},_0x247e23)),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',(_0x5f4875,_0x5d7088)=>_0x5f4875||!!_0x5d7088),this['bind']('isUnlinked')['to'](_0x207631,'unlinkedAt',_0x4033ef=>!!_0x4033ef),this['bind']('ariaLabel')['to'](this,'length',_0x2d4c10=>{const _0x3c7828=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x2d4c10,_0x3c7828]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xadc067(),this['keystrokes']=new jt(),this['focusCycler']=new _0x369a14({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x57327c=>_0x57327c['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 _0x2667bc=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x10eaf8=_0x2667bc['commentInputView'];return _0x2667bc['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x10eaf8,'value',(_0x3a4137,_0x9219e8,_0x357e44,_0x3db239,_0xf0d9ad)=>!!_0xf0d9ad||!!_0x3db239&&_0x357e44&&!_0x9219e8||_0x3a4137&&_0x357e44&&!_0x9219e8),_0x10eaf8['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2fc227,_0x1d42fd,_0x5844f8)=>{let _0x543e32;return _0x543e32=_0x5844f8&&_0x1d42fd?'Reply\x20to\x20reopen\x20discussion...':_0x2fc227?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x543e32);}),_0x10eaf8['bind']('submitLabel')['to'](this,'length',_0x54c4d6=>N(this['locale'],_0x54c4d6?'Reply':'Comment')),_0x10eaf8['on']('submit',(_0x4f3fae,_0x5db816)=>{this['fire']('addComment',_0x5db816),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x10eaf8['on']('cancel',()=>{this['focus']();}),_0x10eaf8['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x10eaf8['on']('cancel',_0x4f7855=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4f7855['stop']());}),this['on']('change:isActive',(_0xd8780a,_0x47ceef,_0x40ba2e)=>{_0x40ba2e||this['length']||_0x10eaf8['value']||this['fire']('removeCommentThread');}),_0x2667bc;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x190494,_0x34de63,_0xd55169,_0x13415d){super(_0x190494,_0x34de63,_0xd55169,_0x13415d),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x190494,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x26b9bf,_0x7fe343,_0x491736)=>{_0x491736||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x41dd74,_0xd171e4,_0x3925a5)=>{_0x3925a5&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5cfdd5=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5cfdd5['if']('isActive','ck-thread--active'),_0x5cfdd5['if']('isUnlinked','ck-thread--unlinked'),_0x5cfdd5['to']('actionIndicator',_0x3ff4b9=>_0x3ff4b9?'ck-thread--'+_0x3ff4b9:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5cfdd5['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 _0x3801a1 of this['commentsListView']['commentViews'])_0x3801a1['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x2acc7a}=this,_0x3d0cae=this['commentsListView']['commentViews']['get'](0x0);_0x3d0cae===this['_boundFirstCommentView']||_0x3d0cae['isSystemComment']||(this['_boundFirstCommentView']=_0x3d0cae,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3d0cae,'actionIndicator',_0x41b5b4=>'remove'===_0x41b5b4?'remove':null),_0x3d0cae['placeholder']=N(_0x2acc7a,'Write\x20a\x20comment...'),_0x3d0cae['removeButton']['on']('execute',_0x398be3=>{_0x398be3['stop'](),this['showConfirm'](N(_0x2acc7a,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3d0cae['focus']();}),_0x3d0cae['actionBar']['add'](this['resolveButton'],0x0),_0x3d0cae['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x25fdb5=new _0x2da3f9(this['locale']);return _0x25fdb5['label']=N(this['locale'],'Resolve'),_0x25fdb5['tooltip']=N(this['locale'],'Resolve'),_0x25fdb5['icon']=_0x26c7b4,_0x25fdb5['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x25fdb5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x8048e6=>!_0x8048e6),_0x25fdb5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4316e4,_0x3fe917)=>_0x4316e4&&!_0x3fe917),_0x25fdb5['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x25fdb5;}['_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 is extends kt{constructor(_0x5e1812){super(_0x5e1812),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x28b74e,_0x3d49b2,_0x4cbd2f)=>{this['element']['innerHTML']=_0x4cbd2f;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1144c4,_0x584d5b,_0x528d52){super(_0x1144c4),this['_model']=_0x584d5b,this['_config']=_0x528d52,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x584d5b,'content',_0x584d5b,'authoredAt',(_0x159d27,_0x453201)=>N(_0x1144c4,'COMMENT_ARIA_LABEL',[_0x584d5b['author']['name'],_0x528d52['formatDateTime'](_0x453201),new DOMParser()['parseFromString'](_0x159d27,'text/html')['body']['textContent'],_0x584d5b['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x1144c4,N(_0x1144c4,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x2e7393(),this['focusTracker']=new _0xadc067(),this['keystrokes']=new jt(),this['focusCycler']=new _0x369a14({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x13b3da=>_0x13b3da['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']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x487954=new is(this['locale']);return _0x487954['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x340f89,_0x4145e7)=>_0x4145e7?ts(_0x340f89,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x340f89),_0x487954;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x557d06=new es(this['locale'],this['_config']['editorConfig']);return _0x557d06['value']=this['_model']['content'],_0x557d06['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x557d06['submitLabel']=N(this['locale'],'Save'),_0x557d06['on']('submit',(_0x1c5442,_0x3d1726)=>{this['fire']('updateComment',this['_model']['id'],_0x3d1726),this['switchToDisplayMode'](),this['focus']();}),_0x557d06['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x557d06['once']('editorReady',()=>{_0x557d06['focus']();}),_0x557d06['createEditor'](),_0x557d06['delegate']('editorReady')['to'](this),_0x557d06['delegate']('editorDestroyed')['to'](this),_0x557d06;}['_setupKeyboardNavigation'](){const _0x2e7dd8=this['element'];this['keystrokes']['listenTo'](_0x2e7dd8);for(const _0x406dc1 of this['focusables'])this['focusTracker']['add'](_0x406dc1['element']),this['keystrokes']['listenTo'](_0x406dc1['element']);this['focusables']['on']('change',(_0x1f4512,_0x6bcf33)=>{for(const _0x47c376 of _0x6bcf33['removed'])this['focusTracker']['remove'](_0x47c376['element']),this['keystrokes']['stopListening'](_0x47c376['element']);for(const _0x14e9da of _0x6bcf33['added'])this['focusTracker']['add'](_0x14e9da['element']),this['keystrokes']['listenTo'](_0x14e9da['element']);}),this['keystrokes']['set']('enter',(_0x4cfa23,_0x21e456)=>{_0x2e7dd8===_0x4cfa23['target']&&(this['focusCycler']['focusFirst'](),_0x21e456());}),this['keystrokes']['set']('esc',(_0x487423,_0x5b4159)=>{_0x2e7dd8!==_0x487423['target']&&(this['focus'](),_0x5b4159());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x379cce,_0x3c76bf,_0x2cd77c){super(_0x379cce,_0x3c76bf,_0x2cd77c),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x379cce,'Reply...')),this['bind']('authoredAt')['to'](_0x3c76bf),this['bind']('resolvedAt')['to'](_0x3c76bf),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 _0x1bc631(_0x379cce,_0x3c76bf['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3c76bf,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x55db18=this['bindTemplate'],_0x18e0cb=[{'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':_0x55db18['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x55db18['to']('authoredAt',_0x1c17b2=>this['_config']['formatDateTime'](_0x1c17b2))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x55db18['if']('isEditMode','ck-comment__actions--hidden'),_0x55db18['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']&&_0x18e0cb['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x55db18['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x55db18['if']('isEditMode','ck-comment--edit'),_0x55db18['if']('isSystemComment','ck-comment--info'),_0x55db18['to']('actionIndicator',_0x3463eb=>_0x3463eb?'ck-comment--'+_0x3463eb:'')],'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':_0x18e0cb}]}]};}['_createEditButton'](){const _0x32ce15=new _0x4c5034(this['locale']);return _0x32ce15['label']=N(this['locale'],'Edit'),_0x32ce15['icon']=_0x5ba220,_0x32ce15['withText']=!0x0,_0x32ce15['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x32ce15['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x125c21=>!_0x125c21),_0x32ce15['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x32ce15['on']('execute',()=>this['switchToEditMode']()),_0x32ce15;}['_createRemoveButton'](){const _0x15ddda=new _0x4c5034(this['locale']);return _0x15ddda['label']=N(this['locale'],'Remove'),_0x15ddda['icon']=_0x4af64b,_0x15ddda['withText']=!0x0,_0x15ddda['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x15ddda['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x119e7b=>!_0x119e7b),_0x15ddda['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x15ddda['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x15ddda;}['_createDropdown'](){const _0x7533fd=_0x4bcbb5(this['locale'],_0x53aa75),_0x18c802=_0x7533fd['panelView']['children'],_0x58f34d=new _0x3b8927(this['locale']),_0x56f020=_0x7533fd['bindTemplate'];_0x386e77(_0x7533fd,()=>this['items']['find'](_0xefa321=>_0xefa321['isVisible'])),_0x7533fd['extendTemplate']({'attributes':{'class':[_0x56f020['if']('isVisible','ck-hidden',_0x271a43=>!_0x271a43)]}});const _0x5b9b83=(_0x129a85,_0x19b620=-0x1)=>{const _0x4e1cf3=new _0x150f86(this['locale']);_0x4e1cf3['children']['add'](_0x129a85);const _0x2b03b0=_0x19b620>-0x1?_0x19b620:_0x58f34d['items']['length'];_0x58f34d['items']['add'](_0x4e1cf3,_0x2b03b0);const _0x1ef023=Array['from'](this['items']);_0x7533fd['unbind']('isEnabled','isVisible'),_0x7533fd['bind']('isEnabled')['toMany'](_0x1ef023,'isEnabled',(..._0x168927)=>_0x168927['some'](_0x352238=>_0x352238)),_0x7533fd['bind']('isVisible')['toMany'](_0x1ef023,'isVisible',(..._0x4ebda4)=>_0x4ebda4['some'](_0x599535=>_0x599535));};_0x7533fd['panelPosition']='sw',_0x7533fd['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x33f82d});for(const _0x1419b8 of this['items'])_0x5b9b83(_0x1419b8);return _0x18c802['add'](_0x58f34d),_0x7533fd['listenTo'](this['items'],'add',(_0x1c1b94,_0x400678,_0x58b732)=>{_0x5b9b83(_0x400678,_0x58b732);}),_0x7533fd['listenTo'](this['items'],'remove',(_0x35599c,_0x2b47db,_0x561370)=>{_0x58f34d['items']['remove'](_0x561370);}),_0x7533fd;}['_attachActions'](_0xfc57d3,_0x5d17b1){const _0x48fa9a=_0xfc57d3&&_0xfc57d3['element'];_0x48fa9a&&(this['listenTo'](_0x48fa9a,'mouseenter',()=>this['actionIndicator']=_0x5d17b1),this['listenTo'](_0x48fa9a,'focus',()=>this['actionIndicator']=_0x5d17b1),this['listenTo'](_0x48fa9a,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x48fa9a,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1e983c=super['_createCommentInputView']();return _0x1e983c['bind']('placeholder')['to'](this),_0x1e983c;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x345e5f){const _0x5b1d44=Dt(_0x345e5f,0x1e),_0x1d7ba6=new MutationObserver(_0x275f4a=>{for(const _0x1d40f1 of _0x275f4a)('attributes'==_0x1d40f1['type']&&'class'==_0x1d40f1['attributeName']||'childList'==_0x1d40f1['type']||'characterData'==_0x1d40f1['type'])&&_0x5b1d44();});return{'attach'(_0x29e6a9){_0x1d7ba6['observe'](_0x29e6a9,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x1d7ba6['disconnect'](),_0x5b1d44['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x5e1399,_0x26eaca){super(_0x5e1399),this['id']=_0x32fc6d(),this['focusTracker']=new _0xadc067(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x1fe54c,_0x9c40c9)=>this['fire']('Esc',_0x9c40c9)),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']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x26eaca),this['mainView']=_0x26eaca;const _0xd48beb=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xd48beb['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 _0xc29202=this['element']['clientHeight'];_0xc29202&&(this['height']=_0xc29202);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x177751(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x232c54,target:_0x5e36ad,type:_0x12f68e,isVisible:_0x3ea9db=!0x0}){super(),this['view']=_0x232c54,this['view']['element']||this['view']['render'](),this['_type']=_0x12f68e,this['_target']=_0x5e36ad,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x52a82c([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1ff17f,_0x40eb67)=>{this['view']['focusTracker']['add'](_0x40eb67);}),this['focusableElements']['on']('remove',(_0x56a365,_0x2f02d8)=>{this['view']['focusTracker']['remove'](_0x2f02d8);}),this['set']('isVisible',_0x3ea9db);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x7ec0f3=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x7ec0f3),_0x7ec0f3;}get['targetRect'](){const _0x284475=this['target'];if(null===_0x284475)return null;if(_0x284475 instanceof _0x2cf657)return _0x284475;const _0x538010=_0x284475['filter'](_0x223e0f=>function(_0x55c403){const _0x2aaae0=_0x55c403['offsetParent'];if(_0x2aaae0)return!0x0;const _0x555a73=_0x55c403['getClientRects']()['item'](0x0);return!!_0x555a73;}(_0x223e0f));return 0x0===_0x538010['length']?null:new _0x2cf657(_0x538010[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x162330){this['view']['isActive']=_0x162330,this['view']['mainView']['isActive']=_0x162330;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x16d66d){if(!(null===_0x16d66d||_0x16d66d instanceof _0x2cf657||Array['isArray'](_0x16d66d)&&_0x16d66d['every'](_0x2517ee=>fi(_0x2517ee))))throw new _0x3593cf('annotation-invalid-target',null,{'target':_0x16d66d});}['_getNormalizedTarget'](){const _0x2a9980='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x2a9980)?[_0x2a9980]:_0x2a9980;}}function fi(_0x164e16){return null!==_0x164e16&&'object'==typeof _0x164e16&&'nodeType'in _0x164e16&&0x1===_0x164e16['nodeType'];}class S extends _0x52a82c{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x1e5450=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xadc067(),this['_focusTracker']['on']('change:isFocused',(_0x1805f4,_0xd56921,_0x16cda6)=>{_0x16cda6||this['fire']('blur');});for(const _0x43ecec of _0x1e5450)this['add'](_0x43ecec);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x472ae1){if(this['has'](_0x472ae1))throw new _0x3593cf('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x472ae1['innerView'],_0x472ae1),this['_viewToAnnotation']['set'](_0x472ae1['view'],_0x472ae1);for(const _0x102664 of _0x472ae1['focusableElements'])this['_focusTracker']['add'](_0x102664);this['listenTo'](_0x472ae1['focusableElements'],'add',(_0x430e41,_0x10fe7c)=>{this['_focusTracker']['add'](_0x10fe7c);}),this['listenTo'](_0x472ae1['focusableElements'],'remove',(_0x45af3a,_0xe87224)=>{this['_focusTracker']['remove'](_0xe87224);}),this['listenTo'](_0x472ae1['view']['focusTracker'],'change:isFocused',(_0x533e3b,_0xfabe43,_0x4674fc)=>{_0x4674fc&&this['fire']('focus',_0x472ae1);}),_0x472ae1['updateTargetRect']();const _0x1d48a5=this['_getOrderInContent'](_0x472ae1['view']['targetRect']);return super['add'](_0x472ae1,_0x1d48a5);}['remove'](_0x2528c8){if(!this['has'](_0x2528c8))throw new _0x3593cf('annotationcollection-not-existing-item',null);this['stopListening'](_0x2528c8['view']['focusTracker']),this['stopListening'](_0x2528c8['focusableElements']);for(const _0x5dbdfb of _0x2528c8['focusableElements'])this['_focusTracker']['remove'](_0x5dbdfb);return this['_viewToAnnotation']['delete'](_0x2528c8['view']),this['_innerViewToAnnotation']['delete'](_0x2528c8['innerView']),super['remove'](_0x2528c8);}['getByInnerView'](_0x4cbe8c){return this['_innerViewToAnnotation']['get'](_0x4cbe8c);}['getByView'](_0x4cc493){return this['_viewToAnnotation']['get'](_0x4cc493);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x284c8c of this)_0x284c8c['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2da246=Array['from'](this)['sort']((_0x14cc85,_0x19bc85)=>w(_0x14cc85['view']['targetRect'],_0x19bc85['view']['targetRect']));for(let _0x382924=_0x2da246['length']-0x1;_0x382924>0x0;_0x382924--){const _0x1bf037=_0x2da246[_0x382924];_0x382924!==this['getIndex'](_0x1bf037)&&(this['remove'](_0x1bf037),this['add'](_0x1bf037));}}['_getOrderInContent'](_0x22d4bc){let _0x57d7a2=0x0;if(!_0x22d4bc)return this['length'];for(const _0x3dc6df of this){const _0x13a998=_0x3dc6df['view']['targetRect'];if(_0x13a998){if(w(_0x22d4bc,_0x13a998)<0x0)return _0x57d7a2;_0x57d7a2++;}}return _0x57d7a2;}}function v({source:_0x1cbbca,target:_0x1d06a9,filter:_0x6a32bc}){for(const _0xf79645 of _0x1cbbca)_0x6a32bc(_0xf79645)&&_0x1d06a9['add'](_0xf79645);_0x1d06a9['listenTo'](_0x1cbbca,'add',(_0x34743d,_0x188cdb)=>{_0x6a32bc(_0x188cdb)&&_0x1d06a9['add'](_0x188cdb);}),_0x1d06a9['listenTo'](_0x1cbbca,'remove',(_0x4f3ae6,_0x261f3a)=>{_0x1d06a9['has'](_0x261f3a)&&_0x1d06a9['remove'](_0x261f3a);});}function w(_0x3e2852,_0x6bb50d){if(null===_0x3e2852&&null===_0x6bb50d)return 0x0;if(null===_0x3e2852)return-0x1;if(null===_0x6bb50d)return 0x1;const _0x3eccd9=_0x3e2852['top']-_0x6bb50d['top'];return 0x0==_0x3eccd9?_0x3e2852['left']-_0x6bb50d['left']:_0x3eccd9;}class y extends _0x5da752{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xa77b70){if(super(_0xa77b70),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xa77b70 instanceof _0x552c8b){const _0x5b1c65=_0xa77b70['locale'];_0xa77b70['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x5b1c65,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x5b1c65,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x5b1c65,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x5b1c65,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x5b1c65,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x5b1c65,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x5b1c65,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x31f365){this['collection']['add'](_0x31f365);}['remove'](_0x368b7b){this['collection']['remove'](_0x368b7b),_0x368b7b['destroy']();}['refreshVisibility'](){for(const _0x170d0d of this['collection'])_0x170d0d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x19bae2){return this['collection']['getByInnerView'](_0x19bae2);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x50198e of this['collection'])_0x50198e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2102d9){this['fire']('_activateAnnotation',_0x2102d9);}['createAnnotation'](_0x280b08){return new T(_0x280b08);}['createAnnotationView'](_0x1eade6,_0x433236){return new E(_0x1eade6,_0x433236);}['_addActiveAnnotation'](_0x1c2132){const _0x336318=new Set(this['activeAnnotations']);_0x336318['add'](_0x1c2132),this['activeAnnotations']=_0x336318;}['_removeActiveAnnotation'](_0x7af51){const _0x3e0dfe=new Set(this['activeAnnotations']);_0x3e0dfe['delete'](_0x7af51),this['activeAnnotations']=_0x3e0dfe;}['_bindAnnotationsToVisibleAnnotations'](){const _0x175f0e=this['collection'],_0x5f3837=this['_visibleAnnotations'];function _0x437da8(_0x23a7c7){const _0x395493=_0x23a7c7['source'];_0x395493['isVisible']&&!_0x5f3837['has'](_0x395493)?_0x5f3837['add'](_0x395493):!_0x395493['isVisible']&&_0x5f3837['has'](_0x395493)&&_0x5f3837['remove'](_0x395493),_0x395493['view']['focusTracker']['remove'](_0x395493['view']['element']),_0x395493['view']['focusTracker']['add'](_0x395493['view']['element']);}this['listenTo'](_0x175f0e,'add',(_0x32aa22,_0x147e75)=>{_0x147e75['isVisible']&&_0x5f3837['add'](_0x147e75),this['listenTo'](_0x147e75,'change:isVisible',_0x437da8);}),this['listenTo'](_0x175f0e,'remove',(_0x266298,_0x143311)=>{_0x5f3837['has'](_0x143311)&&_0x5f3837['remove'](_0x143311),this['stopListening'](_0x143311,'change:isVisible',_0x437da8);});}['_setupEnterAnnotationKeystroke'](){const _0x378a45=_0x1eb57b=>{_0x1eb57b['on']('ready',()=>{_0x1eb57b['keystrokes']['set'](_0x21af1b,(_0x3431e3,_0x5d6715)=>{const _0x444570=_0x1a22cf(this['activeAnnotations']['values']());_0x444570&&(_0x444570['view']['focus'](),_0x5d6715());});});};this['context']instanceof _0x552c8b?_0x378a45(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x331fd6,_0x486afc)=>{_0x378a45(_0x486afc);});}['_setupEscapeAnnotationHandling'](){const _0x15fa88=_0x219872=>{const _0x132e3d=_0x219872['source'],_0x55ead0=[];let _0x51c4cc;if(Array['isArray'](_0x132e3d['target'])){_0x51c4cc=_0x132e3d['target'][0x0],this['context']instanceof _0x552c8b?_0x55ead0['push'](this['context']):this['context']['editors']&&_0x55ead0['push'](...this['context']['editors']);for(const _0xce34bd of _0x55ead0)for(const _0x5b0923 of _0xce34bd['editing']['view']['domRoots']['values']())if(_0x5b0923['contains'](_0x51c4cc))return void _0xce34bd['editing']['view']['focus']();_0x51c4cc['focus']();}};this['listenTo'](this['collection'],'add',(_0x497d1e,_0x3135b0)=>{this['listenTo'](_0x3135b0,'escape',_0x15fa88,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1591bf,_0xaec1fb)=>{this['stopListening'](_0xaec1fb,'escape',_0x15fa88);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x5da752{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x435cfb){super(_0x435cfb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x37179e=this['context']['config'];_0x37179e['define']('comments.maxCommentsWhenCollapsed',0x2),_0x37179e['define']('comments.maxThreadTotalWeight',0x1f4),_0x37179e['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x37179e['define']('comments.CommentThreadView',gt),_0x37179e['define']('comments.CommentView',Tt),_0x37179e['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x95145d=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x28e1a7,_0x215150)=>this['_addCommentThread'](_0x215150)),this['on']('submitCommentThread',(_0x3cbef6,_0x10d4c1)=>this['_submitCommentThread'](_0x10d4c1)),this['on']('resolveCommentThread',(_0x4a37a8,_0x708291)=>this['_resolveCommentThread'](_0x708291)),this['on']('resolveCommentThread',(_0x54c6fe,_0x3f6454)=>this['_updateActiveAnnotation'](_0x3f6454),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x598d36,_0x4387de)=>this['_reopenCommentThread'](_0x4387de)),this['on']('reopenCommentThread',(_0x5ad4d8,_0x4bf797)=>this['_updateActiveAnnotation'](_0x4bf797),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x201b4c,_0x570f60)=>this['_removeCommentThread'](_0x570f60)),this['on']('updateCommentThread',(_0x48ffbc,_0x4bd547)=>this['_updateCommentThread'](_0x4bd547)),this['on']('updateCommentThread',(_0x2c3675,_0x3eac1a)=>this['_updateActiveAnnotation'](_0x3eac1a),{'priority':'lowest'}),this['on']('addComment',(_0x96dfff,_0x44e827)=>this['_addComment'](_0x44e827)),this['on']('updateComment',(_0x3ca54b,_0x11d773)=>this['_updateComment'](_0x11d773)),this['on']('removeComment',(_0x338cfe,_0x58293a)=>this['_removeComment'](_0x58293a)),this['on']('addComment',(_0x159205,{threadId:_0x1972d3,isFromAdapter:_0x379533})=>{if(_0x379533)return;const _0x1ec691=this['getCommentThread'](_0x1972d3),_0x55b465=_0x1ec691&&this['_threadToController']['get'](_0x1ec691);_0x55b465&&_0x55b465['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x95145d,'change:activeAnnotations',(_0x4315ee,_0x5bc682,_0x2ecf8c)=>{const _0x4c686c=Array['from'](_0x2ecf8c)['map'](_0x5e8c36=>this['_viewToController']['get'](_0x5e8c36['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4c686c?_0x4c686c['model']:null;});}set['adapter'](_0x2d655c){if(this['_adapter'])throw new _0x3593cf('commentsrepository-adapter-already-set');this['_adapter']=_0x2d655c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x127b94=_t,threadId:_0x5ea6ff=_0x32fc6d(),comments:_0x5bce1e=[],unlinkedAt:_0xe62241=null,resolvedAt:_0x5f1da8=null,resolvedBy:_0x318a01=null,target:_0x1ff737=null,context:_0x1c55d9=null,attributes:_0x553044={},isResolvable:_0x389daa=!0x0,isSubmitted:_0x5b6e7e=!0x1,isFromAdapter:_0x50aa9e=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x127b94),{'channelId':_0x127b94,'threadId':_0x5ea6ff,'comments':_0x5bce1e,'unlinkedAt':_0xe62241,'resolvedAt':_0x5f1da8,'resolvedBy':_0x318a01,'target':_0x1ff737,'context':_0x1c55d9,'attributes':_0x553044,'isFromAdapter':_0x50aa9e,'isResolvable':_0x389daa,'isSubmitted':_0x5b6e7e}),this['getCommentThread'](_0x5ea6ff);}['openNewCommentThread']({channelId:_0x2c8b27=_t,threadId:_0x583e54=_0x32fc6d(),target:_0x30b9b6,context:_0x599d49=null,isResolvable:_0x4fff94=!0x0}){if(this['_readOnlyChannels']['has'](_0x2c8b27)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x30b9b6)throw new _0x3593cf('commentsrepository-missing-target');const _0x3bfa44=this['addCommentThread']({'channelId':_0x2c8b27,'threadId':_0x583e54,'target':_0x30b9b6,'context':_0x599d49,'isResolvable':_0x4fff94});if(!_0x3bfa44)return null;const _0x43d6ad=this['_threadToController']['get'](_0x3bfa44),_0x5c43f0=_0x43d6ad['view']['commentThreadInputView']['commentInputView'],_0x141b74=this['context']['plugins']['get'](y),_0x5da1eb=_0x141b74['getByInnerView'](_0x43d6ad['view']);return _0x141b74['activate'](_0x5da1eb),_0x5c43f0['once']('editorReady',()=>_0x5c43f0['focus']()),_0x3bfa44;}['hasCommentThread'](_0x2c7651){if('string'!=typeof _0x2c7651)throw new _0x3593cf('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2c7651);}['updateCommentThread']({channelId:_0xe2757e=_t,threadId:_0x4b8a13,context:_0x322563,unlinkedAt:_0x1466d0,attributes:_0x3ececc,isFromAdapter:_0x1f226f=!0x1}){return this['fire'](Nt('updateCommentThread',_0xe2757e),{'channelId':_0xe2757e,'threadId':_0x4b8a13,'context':_0x322563,'unlinkedAt':_0x1466d0,'attributes':_0x3ececc,'isFromAdapter':_0x1f226f}),this['getCommentThread'](_0x4b8a13);}['getCommentThread'](_0x42124c){if('string'!=typeof _0x42124c)throw new _0x3593cf('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x42124c);}['fetchCommentThread']({channelId:_0x38cc1d,threadId:_0x1e6e42}={}){const _0x5df9fe=this['getCommentThread'](_0x1e6e42);if(_0x5df9fe)return Promise['resolve'](_0x5df9fe);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3593cf('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x38cc1d,'threadId':_0x1e6e42})['then'](_0x4d6149=>this['hasCommentThread'](_0x1e6e42)?this['getCommentThread'](_0x1e6e42):_0x4d6149?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x38cc1d},_0x4d6149)):void 0x0)['catch'](_0x42846a=>{throw console['error'](_0x42846a),new _0x3593cf('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2e2173,skipNotAttached:_0x1863df=!0x1,skipEmpty:_0x314383=!0x1,toJSON:_0x3008d2=!0x1}={}){const _0x2d428b=[];for(const _0x5e715c of this['_threads']['values']())_0x2e2173&&_0x5e715c['channelId']!==_0x2e2173||_0x1863df&&!_0x5e715c['isAttached']||_0x314383&&0x0===_0x5e715c['length']||_0x2d428b['push'](_0x5e715c);return _0x3008d2?_0x2d428b['map'](_0x4967da=>_0x4967da['toJSON']()):_0x2d428b;}['getAnnotationForCommentThread'](_0xd7e459){const _0x30a9f4=this['_threadToController']['get'](_0xd7e459);if(!_0x30a9f4)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x30a9f4['view'])||null;}['getCommentThreadForAnnotation'](_0x27c58e){const _0x5d24c8=this['_viewToController']['get'](_0x27c58e['innerView']);return _0x5d24c8?_0x5d24c8['model']:null;}['setActiveCommentThread'](_0x45fd30){const _0x35ff90=this['context']['plugins']['get'](y);if(!_0x45fd30)return void(this['activeCommentThread']&&_0x35ff90['deactivateAll']());const _0x23e769=this['getCommentThread'](_0x45fd30);if(!_0x23e769)throw new _0x3593cf('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x45fd30});if(!this['_threadToController']['has'](_0x23e769))throw new _0x3593cf('commentsrepository-active-not-attached',null,{'threadId':_0x45fd30});const _0x300762=_0x35ff90['getByInnerView'](this['_threadToController']['get'](_0x23e769)['view']);_0x35ff90['activate'](_0x300762);}['switchReadOnly'](_0x3cb8eb,_0x299430){_0x3cb8eb?this['_readOnlyChannels']['add'](_0x299430):this['_readOnlyChannels']['delete'](_0x299430),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4003ff){return this['_readOnlyChannels']['has'](_0x4003ff)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x44774b,_0x38be48){return new vt(_0x44774b,_0x38be48);}['setPermissions'](_0x4f5c7a,_0x322586=_t){this['_permissions']['set'](_0x322586,_0x4f5c7a),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x560f92=_t){return this['_permissions']['has'](_0x560f92)?this['_permissions']['get'](_0x560f92):bt;}['_addCommentThread']({channelId:_0x255a90,threadId:_0x57f4ac,comments:_0x27ec12,unlinkedAt:_0x824708,resolvedAt:_0x3badca,resolvedBy:_0x580cf5,target:_0x49103b,context:_0x1e4674,attributes:_0x1673e5,isFromAdapter:_0xf3611,isResolvable:_0x4d3d68,isSubmitted:_0x231da7}){if('string'!=typeof _0x57f4ac)throw new _0x3593cf('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x57f4ac});if(this['hasCommentThread'](_0x57f4ac))throw new _0x3593cf('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x57f4ac});const _0x432f5e=new pi(this,{'channelId':_0x255a90,'id':_0x57f4ac,'context':_0x1e4674,'attributes':_0x1673e5,'unlinkedAt':_0x824708,'resolvedAt':_0x3badca,'resolvedBy':_0x580cf5?this['context']['plugins']['get'](it)['getUser'](_0x580cf5):null,'isResolvable':_0x4d3d68,'isSubmitted':_0x231da7||_0xf3611});this['_threads']['set'](_0x57f4ac,_0x432f5e);for(const _0x2d3269 of _0x27ec12)_0x432f5e['_add'](this['_createNewComment']({'threadId':_0x57f4ac,..._0x2d3269}));return _0x49103b&&_0x432f5e['attachTo'](_0x49103b),_0xf3611||!_0x432f5e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x255a90,'threadId':_0x57f4ac});}['_submitCommentThread']({channelId:_0x4861f8,threadId:_0x1d4d62}){if(!this['hasCommentThread'](_0x1d4d62))throw new _0x3593cf('commentsrepository-missing-comment-thread',this);const _0x578ccc=this['getCommentThread'](_0x1d4d62);if(_0x578ccc['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x110bb1,comments:_0x22c8b6,resolvedAt:_0x132819,resolvedBy:_0x36e7f2,context:_0x1ee7c9,attributes:_0x31e725}=_0x578ccc,_0x28b9fa=this['context']['plugins']['get']('PendingActions'),_0x3a216d=_0x28b9fa['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4861f8,'threadId':_0x110bb1,'comments':_0x22c8b6['map'](_0x187e17=>_0x187e17['toJSON']()),'resolvedAt':_0x132819,'resolvedBy':_0x36e7f2?_0x36e7f2['id']:_0x36e7f2,'context':_0x1ee7c9,'attributes':_0x31e725})['then'](({comments:_0x477ed7})=>{_0x28b9fa['remove'](_0x3a216d);for(const _0x9bf16c of _0x477ed7)this['_updateComment']({'channelId':_0x4861f8,'threadId':_0x1d4d62,'commentId':_0x9bf16c['commentId'],'createdAt':_0x9bf16c['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5441f7=>{throw console['error'](_0x5441f7),new _0x3593cf('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x134842,target:_0x2c2343}){const _0x2bb12c=this['getCommentThread'](_0x134842);if(!_0x2bb12c)throw new _0x3593cf('commentsrepository-attach-missing-comment-thread',this);const _0x350f42=this['context']['plugins']['get']('PendingActions'),_0xe312f3=this['context']['plugins']['get'](y),_0x4694b2=this['_createCommentThreadView'](_0x2bb12c),_0x12b367=new vt(_0x2bb12c,_0x4694b2);let _0x7f5481=null;_0x4694b2['on']('change:isDirty',(_0x16d229,_0x35a24a,_0xcb040d)=>{_0xcb040d?_0x7f5481=_0x350f42['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x7f5481&&(_0x350f42['remove'](_0x7f5481),_0x7f5481=null);}),this['_threadToController']['set'](_0x2bb12c,_0x12b367),this['_viewToController']['set'](_0x4694b2,_0x12b367);const _0x346fc8=new E(this['context']['locale'],_0x4694b2);_0x346fc8['bind']('length')['to'](_0x4694b2),_0x346fc8['bind']('isDirty')['to'](_0x4694b2,'isDirty',_0x4694b2,'length',(_0x4d8542,_0x23a344)=>_0x4d8542||!_0x23a344),_0x346fc8['bind']('isActive')['to'](_0x4694b2),_0x346fc8['type']='comment';const _0x171beb=new T({'view':_0x346fc8,'target':_0x2c2343,'type':'comment','isVisible':!_0x2bb12c['archivedAt']&&!!('function'==typeof _0x2c2343?_0x2c2343():_0x2c2343)});return _0x4694b2['on']('escape',()=>{_0x171beb['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4694b2,_0x171beb),_0xe312f3['add'](_0x171beb),_0x171beb;}['_bindAnnotationToEditors'](_0xd101a5,_0x43fcb0){this['listenTo'](_0xd101a5,'editorReady',(_0x4e840a,_0x328022)=>{const _0x522eae=_0x328022['ui']['view']['body']['bodyCollectionContainer'];_0x43fcb0['focusableElements']['add'](_0x522eae),this['context']instanceof _0x552c8b&&this['context']['ui']['focusTracker']['add'](_0x522eae);},{'priority':'highest'}),this['listenTo'](_0xd101a5,'editorDestroyed',(_0x4ad4c8,_0x2259fc)=>{const _0x133199=_0x2259fc['ui']['view']['body']['bodyCollectionContainer'];_0x43fcb0['focusableElements']['has'](_0x133199)&&_0x43fcb0['focusableElements']['remove'](_0x133199),this['context']instanceof _0x552c8b&&this['context']['ui']['focusTracker']['remove'](_0x133199);});}['_unbindEditors'](_0x2d1324){this['stopListening'](_0x2d1324,'editorReady'),this['stopListening'](_0x2d1324,'editorDestroyed');}['_createCommentThreadView'](_0x3f72f9){const _0x13516d=this['context']['plugins']['get'](it),{config:_0x2d45d8,locale:_0x391738}=this['context'],_0x2f5088=pt(_0x2d45d8['get']('locale'),_0x391738);return new(0x0,(_0x2d45d8['get']('comments'))['CommentThreadView'])(_0x391738,_0x3f72f9,_0x13516d['me'],{'editorConfig':{..._0x2d45d8['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2d45d8['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2d45d8['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2d45d8['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2d45d8['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2f5088,'CommentView':_0x2d45d8['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x282fc4,channelId:_0x24b66b,resolvedAt:_0x496bb5,resolvedBy:_0xf39d06,isFromAdapter:_0x546a21}){if(!this['hasCommentThread'](_0x282fc4))throw new _0x3593cf('commentsrepository-missing-comment-thread',null,{'threadId':_0x282fc4});const _0x4b2cd=this['getCommentThread'](_0x282fc4);if(_0x4b2cd['isResolved'])throw new _0x3593cf('commentsrepository-resolved-comment-thread',null,{'threadId':_0x282fc4});const _0x2f9c70=this['context']['plugins']['get'](it);if(_0x4b2cd['resolvedBy']=_0x2f9c70['getUser'](_0xf39d06),_0x4b2cd['resolvedAt']=_0x496bb5,_0x546a21||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2ddcca=this['context']['plugins']['get']('PendingActions'),_0x3c148c=_0x2ddcca['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x24b66b,'threadId':_0x282fc4})['then'](({resolvedAt:_0x386b30,resolvedBy:_0x947fc2})=>{_0x2ddcca['remove'](_0x3c148c),_0x4b2cd['resolvedBy']['id']!==_0x947fc2&&(_0x4b2cd['resolvedBy']=_0x2f9c70['getUser'](_0x947fc2)),_0x4b2cd['resolvedAt']=_0x386b30;})['catch'](_0x29e4a8=>{throw console['error'](_0x29e4a8),new _0x3593cf('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4ef052,channelId:_0x13f5d6,isFromAdapter:_0x1bb9dd}){if(!this['hasCommentThread'](_0x4ef052))throw new _0x3593cf('commentsrepository-missing-comment-thread',null,{'threadId':_0x4ef052});const _0x39463b=this['getCommentThread'](_0x4ef052);if(!_0x39463b['isResolved'])throw new _0x3593cf('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4ef052});if(_0x39463b['resolvedBy']=null,_0x39463b['resolvedAt']=null,_0x1bb9dd||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x265922=this['context']['plugins']['get']('PendingActions'),_0x1f3d3f=_0x265922['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x13f5d6,'threadId':_0x4ef052})['then'](()=>_0x265922['remove'](_0x1f3d3f))['catch'](_0x312739=>{throw console['error'](_0x312739),new _0x3593cf('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x220b8a,isFromAdapter:_0x45201f}){const _0x40ff92=this['getCommentThread'](_0x220b8a);if(!_0x40ff92)throw new _0x3593cf('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x220b8a),this['_threads']['delete'](_0x220b8a),!_0x40ff92['isSubmitted']||_0x45201f||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x38f9cd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7dbf31}=_0x40ff92,_0x2517fe=_0x38f9cd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x7dbf31,'threadId':_0x220b8a})['then'](()=>_0x38f9cd['remove'](_0x2517fe))['catch'](_0x53ecf4=>{throw console['error'](_0x53ecf4),new _0x3593cf('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x595e8c,unlinkedAt:_0x4c6258,context:_0x33064d,attributes:_0x3f6e6a,isFromAdapter:_0x5a2988}){if('string'!=typeof _0x595e8c)throw new _0x3593cf('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x595e8c});if(!this['hasCommentThread'](_0x595e8c))throw new _0x3593cf('commentsrepository-missing-comment-thread',null,{'threadId':_0x595e8c});const _0x278646=this['getCommentThread'](_0x595e8c);let _0x554e4a=!0x1;if(void 0x0!==_0x33064d&&_0x278646['context']!==_0x33064d&&(_0x278646['context']=_0x33064d,_0x554e4a=!0x0),void 0x0!==_0x4c6258&&_0x278646['unlinkedAt']!==_0x4c6258&&(_0x278646['unlinkedAt']=_0x4c6258,_0x554e4a=!0x0),_0x3f6e6a&&!At(_0x3f6e6a,_0x278646['attributes'])&&(_0x278646['attributes']=_0x3f6e6a,_0x554e4a=!0x0),!_0x554e4a)return Promise['resolve']();if(!_0x278646['isSubmitted']||_0x5a2988||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x58fc59=this['context']['plugins']['get']('PendingActions'),{channelId:_0x44ed50}=_0x278646,_0x77152a=_0x58fc59['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x44ed50,'threadId':_0x595e8c,'context':_0x33064d,'unlinkedAt':_0x4c6258,'attributes':_0x3f6e6a})['then'](()=>_0x58fc59['remove'](_0x77152a))['catch'](_0x5f3fb2=>{throw console['error'](_0x5f3fb2),new _0x3593cf('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x5c9477){const _0x5b62ff=this['context']['plugins']['get'](y),_0x57300e=this['getCommentThread'](_0x5c9477);if(_0x57300e['_isAttached']=!0x1,this['_threadToController']['has'](_0x57300e)){const _0x27d838=this['_threadToController']['get'](_0x57300e),_0x175ceb=_0x27d838['view'],_0x459a17=_0x5b62ff['getByInnerView'](_0x175ceb);this['_threadToController']['delete'](_0x57300e),this['_viewToController']['delete'](_0x175ceb),_0x459a17&&_0x5b62ff['remove'](_0x459a17),_0x27d838['destroy'](),_0x175ceb['destroy']()['then'](()=>{this['_unbindEditors'](_0x175ceb);});}}['_updateActiveAnnotation']({threadId:_0x2d815f,resolvedAt:_0x3fbe01,unlinkedAt:_0x242e37}){const _0x38d9ea=!!_0x3fbe01,_0x339b62=this['context']['plugins']['get'](y),_0x47f6c2=this['getCommentThread'](_0x2d815f);if(this['_threadToController']['has'](_0x47f6c2)){const _0x2cefc2=this['_threadToController']['get'](_0x47f6c2)['view'],_0x2e38bb=_0x339b62['getByInnerView'](_0x2cefc2);_0x2e38bb&&(_0x38d9ea&&_0x339b62['_removeActiveAnnotation'](_0x2e38bb),_0x242e37?_0x2e38bb['isVisible']=!0x1:_0x2e38bb['refreshVisibility']());}}['_getExternalAuthor'](_0x11f6ef){const _0xd00dc3=this['context']['plugins']['get'](it),_0x5cd8b4=It('external:'+_0x11f6ef),_0x2bb60d=_0xd00dc3['getUser'](_0x5cd8b4);return _0x2bb60d||_0xd00dc3['addUser']({'id':_0x5cd8b4,'name':_0x11f6ef});}['_createNewComment']({threadId:_0x4cb12a,commentId:_0x3bbd83=_0x32fc6d(),content:_0x27e843,authorId:_0x472808,createdAt:_0x24ac32,attributes:_0x36f13f}){if('string'!=typeof _0x3bbd83)throw new _0x3593cf('commentsrepository-invalid-commentid');if('string'!=typeof _0x472808)throw new _0x3593cf('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x27e843||!_0x27e843['trim']())throw new _0x3593cf('commentsrepository-invalid-comment-content');const _0x1e7d24=this['context']['plugins']['get'](it)['getUser'](_0x472808);if(!_0x1e7d24)throw new _0x3593cf('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x472808});let _0x4a082c=null,_0x4bba81=_0x24ac32;return _0x36f13f?.['@external']&&(_0x4a082c=this['_getExternalAuthor'](_0x36f13f['@external']['authorName']),_0x4bba81=new Date(_0x36f13f['@external']['createdAt'])),new wi(this,{'threadId':_0x4cb12a,'id':_0x3bbd83,'author':_0x4a082c||_0x1e7d24,'creator':_0x1e7d24,'content':_0x27e843,'createdAt':_0x24ac32,'authoredAt':_0x4bba81,'attributes':_0x36f13f});}['_addComment'](_0x2dbcc1){let {threadId:_0x1d4f90,content:_0x4e1141,attributes:_0x828b9,isFromAdapter:_0x4a259a}=_0x2dbcc1;const _0x11d013=this['getCommentThread'](_0x2dbcc1['threadId']);if(!_0x11d013)throw new _0x3593cf('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x34a1bf=this['_createNewComment'](_0x2dbcc1),{id:_0x3a8746}=_0x34a1bf;if(_0x11d013['_add'](_0x34a1bf),_0x4a259a||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x11d013['isSubmitted'])return Promise['resolve']();const _0x4b7d7c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1d66e9}=_0x11d013,_0x538d9b=_0x4b7d7c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x828b9||(_0x828b9={}),this['adapter']['addComment']({'channelId':_0x1d66e9,'threadId':_0x1d4f90,'commentId':_0x3a8746,'content':_0x4e1141,'attributes':_0x828b9})['then'](_0x1be6ed=>{_0x4b7d7c['remove'](_0x538d9b),_0x1be6ed&&this['_updateComment']({'channelId':_0x1d66e9,'threadId':_0x1d4f90,'commentId':_0x3a8746,'createdAt':_0x1be6ed['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x433599=>{throw console['error'](_0x433599),new _0x3593cf('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x2a1e5a,commentId:_0x73be2d,content:_0x323466,createdAt:_0x5a8037,attributes:_0x3efbd7,isFromAdapter:_0x4096b7}){if(void 0x0!==_0x323466&&('string'!=typeof _0x323466||!_0x323466['trim']()['length']))throw new _0x3593cf('commentsrepository-update-comment-invalid-content');const _0x49d657=this['getCommentThread'](_0x2a1e5a),_0x495371=_0x49d657['getComment'](_0x73be2d);if(!_0x495371)throw new _0x3593cf('commentsrepository-update-missing-comment',this);let _0x23df18=!0x1;if(_0x323466&&_0x323466!==_0x495371['content']&&(_0x495371['isEditable']||_0x4096b7)&&(_0x495371['content']=_0x323466,_0x23df18=!0x0),_0x5a8037&&_0x5a8037!==_0x495371['createdAt']&&(_0x495371['createdAt']=_0x5a8037,_0x495371['attributes']&&_0x495371['attributes']['@external']||(_0x495371['authoredAt']=_0x5a8037),_0x23df18=!0x0),_0x3efbd7&&!At(_0x3efbd7,_0x495371['attributes'])&&(_0x495371['attributes']=_0x3efbd7,_0x23df18=!0x0),!_0x23df18)return Promise['resolve']();if(_0x49d657['fire']('commentUpdated'),_0x4096b7||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1de8f0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ae39b}=this['getCommentThread'](_0x495371['threadId']),_0x45c22d=_0x1de8f0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1ae39b,'threadId':_0x2a1e5a,'commentId':_0x73be2d,'content':_0x323466,'attributes':_0x3efbd7})['then'](()=>_0x1de8f0['remove'](_0x45c22d))['catch'](_0x2305d6=>{throw console['error'](_0x2305d6),new _0x3593cf('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x571419,commentId:_0x5eff78,isFromAdapter:_0x4df16e}){const _0x2a4a2a=this['getCommentThread'](_0x571419),_0x50834f=_0x2a4a2a['getComment'](_0x5eff78);if(!_0x50834f)throw new _0x3593cf('commentsrepository-remove-missing-comment',this);if(_0x2a4a2a['_remove'](_0x50834f),_0x4df16e||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x59826f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x433e40}=_0x2a4a2a,_0x136c53=_0x59826f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x433e40,'threadId':_0x571419,'commentId':_0x5eff78})['then'](()=>_0x59826f['remove'](_0x136c53))['catch'](_0x18d990=>{throw console['error'](_0x18d990),new _0x3593cf('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x177751(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4544d4,_0x34ff94){super();const _0x307db6=_0x34ff94['isResolvable'];this['channelId']=_0x34ff94['channelId'],this['id']=_0x34ff94['id'],this['comments']=new _0x52a82c(),this['_repository']=_0x4544d4,this['_isAttached']=!0x1,this['_isSubmitted']=_0x34ff94['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4544d4,'_permissions',_0x4544d4,'_readOnlyChannels',()=>_0x4544d4['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4544d4,'_permissions',()=>_0x4544d4['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4544d4,'_permissions',()=>{const _0x653af8=_0x4544d4['getPermissions'](this['channelId']);return _0x653af8['write']||_0x653af8['admin'];}),this['bind']('isResolvable')['to'](_0x4544d4,'_permissions',()=>_0x307db6&&_0x4544d4['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x34ff94['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2ebb71,_0x116939)=>_0x2ebb71?_0x116939?_0x2ebb71<_0x116939?_0x2ebb71:_0x116939:_0x2ebb71:_0x116939),this['set']('unlinkedAt',_0x34ff94['unlinkedAt']||null),this['set']('resolvedAt',_0x34ff94['resolvedAt']||null),this['set']('resolvedBy',_0x34ff94['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1e60b5=>!!_0x1e60b5),this['set']('attributes',_0x34ff94['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x466616,_0x130cad)=>_0x466616+_0x130cad['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x27d7a7,id:_0x19982d}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x27d7a7),{'channelId':_0x27d7a7,'threadId':_0x19982d});}['setUnlinkedAt'](_0xc8f299){this['_update']({'unlinkedAt':_0xc8f299});}['resolve']({resolvedAt:_0x575ef0=new Date(),resolvedBy:_0x1332bc='',isFromAdapter:_0x12770e=!0x1}={}){const _0x227725=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x57d3c9,id:_0x64dc86}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x57d3c9),{'channelId':_0x57d3c9,'threadId':_0x64dc86,'resolvedAt':_0x575ef0,'resolvedBy':_0x1332bc||_0x227725['id'],'isFromAdapter':_0x12770e});}['reopen']({isFromAdapter:_0x2a582b=!0x1}={}){const {channelId:_0x2ac579,id:_0x501f16}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x2ac579),{'channelId':_0x2ac579,'threadId':_0x501f16,'isFromAdapter':_0x2a582b});}['setContext'](_0x268c07){this['context']||this['_update']({'context':_0x268c07});}['setAttribute'](_0x47eac6,_0x3d72e0){const _0x184313=wt(this['attributes']);yt(_0x184313,_0x47eac6,_0x3d72e0),this['_update']({'attributes':_0x184313});}['removeAttribute'](_0x7d3cf){const _0x4b31e7=wt(this['attributes']);Ct(_0x4b31e7,_0x7d3cf),this['_update']({'attributes':_0x4b31e7});}['remove']({isFromAdapter:_0x144eca=!0x1}={}){const {channelId:_0x15be52,id:_0x5afb89}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x15be52),{'channelId':_0x15be52,'threadId':_0x5afb89,'isFromAdapter':_0x144eca});}['attachTo'](_0x3fec7e){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x3fec7e});}['addComment'](_0x2aa92a){const {channelId:_0xe50ea0,id:_0x51c7d0}=this;this['_repository']['fire'](Nt('addComment',_0xe50ea0,_0x51c7d0),Object['assign']({'channelId':_0xe50ea0,'threadId':_0x51c7d0},_0x2aa92a));}['getComment'](_0x2fe5ad){if('string'!=typeof _0x2fe5ad)throw new _0x3593cf('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x2fe5ad});return this['comments']['get'](_0x2fe5ad);}['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'](_0x550f63=>_0x550f63['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2b06bb){return this['listenTo'](_0x2b06bb,'change:authoredAt',()=>{const _0x1a3d02=this['_findOptimalIndex'](_0x2b06bb),_0x5d7331=this['comments'];_0x1a3d02-0x1!=_0x5d7331['getIndex'](_0x2b06bb)&&_0x1a3d02+0x1!=_0x5d7331['getIndex'](_0x2b06bb)&&(this['_remove'](_0x2b06bb),this['_add'](_0x2b06bb));}),this['comments']['add'](_0x2b06bb,this['_findOptimalIndex'](_0x2b06bb));}['_update'](_0x203334){const {channelId:_0xeb7f4,id:_0x152741}=this;this['_repository']['fire'](Nt('updateCommentThread',_0xeb7f4),{..._0x203334,'channelId':_0xeb7f4,'threadId':_0x152741});}['_remove'](_0x4cbcbc){return this['stopListening'](_0x4cbcbc),_0x4cbcbc['destroy'](),this['comments']['remove'](_0x4cbcbc);}['_findOptimalIndex'](_0x42243e){const _0x4e5c76=this['comments']['find'](_0x2e61d2=>new Date(_0x2e61d2['authoredAt'])['getTime']()>new Date(_0x42243e['authoredAt'])['getTime']());return _0x4e5c76?this['comments']['getIndex'](_0x4e5c76):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x177751(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5035ad,_0x3a918f){super();const _0x733a61=_0x5035ad['context']['plugins']['get'](it)['me'],_0x400bec=_0x5035ad['getCommentThread'](_0x3a918f['threadId']),_0x2c7ee4=0x0===_0x400bec['comments']['length'],_0x2a4f8d=_0x733a61===_0x3a918f['author'];this['id']=_0x3a918f['id'],this['threadId']=_0x3a918f['threadId'],this['author']=_0x3a918f['author'],this['creator']=_0x3a918f['creator'],this['isExternal']=Boolean(_0x3a918f['attributes']&&_0x3a918f['attributes']['@external']),this['set']('content',_0x3a918f['content']),this['createdAt']=_0x3a918f['createdAt']||new Date(),this['set']('authoredAt',_0x3a918f['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x400bec,'resolvedAt'),this['set']('attributes',_0x3a918f['attributes']||{}),this['bind']('isEditable')['to'](_0x5035ad,'_permissions',()=>{const _0x320172=_0x5035ad['getPermissions'](_0x400bec['channelId'])['write'],_0x531e04=_0x5035ad['getPermissions'](_0x400bec['channelId'])['modifyAll'];return _0x2a4f8d&&_0x320172||!_0x2a4f8d&&_0x531e04;}),this['bind']('isRemovable')['to'](_0x400bec,'isRemovable',_0x5035ad,'_permissions',_0x194e10=>{const _0x192019=_0x5035ad['getPermissions'](_0x400bec['channelId'])['write'],_0x9d7651=_0x5035ad['getPermissions'](_0x400bec['channelId'])['modifyAll'];return _0x2a4f8d&&_0x192019||_0x194e10&&_0x2c7ee4||!_0x2a4f8d&&_0x9d7651&&!_0x2c7ee4;}),this['bind']('isReadOnly')['to'](_0x400bec,'isReadOnly'),this['_repository']=_0x5035ad;}get['weight'](){return Math['max'](function(_0x31bb1e){const _0x2b4fa3=document['createElement']('div');return _0x2b4fa3['innerHTML']=_0x31bb1e,_0x2b4fa3['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1ab267){const {threadId:_0x53b387,id:_0x2e1e1e}=this;if(!this['_repository']['hasCommentThread'](_0x53b387))throw new _0x3593cf('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x2f9563}=this['_repository']['getCommentThread'](_0x53b387);this['_repository']['fire'](Nt('updateComment',_0x2f9563,_0x53b387),{'channelId':_0x2f9563,'threadId':_0x53b387,'commentId':_0x2e1e1e,..._0x1ab267});}['setAttribute'](_0x432342,_0x3e32ab){const _0x481878=wt(this['attributes']);yt(_0x481878,_0x432342,_0x3e32ab),this['update']({'attributes':_0x481878});}['removeAttribute'](_0x1eae9e){const _0xb5a8a3=wt(this['attributes']);Ct(_0xb5a8a3,_0x1eae9e),this['update']({'attributes':_0xb5a8a3});}['remove'](_0x183467={}){if(!_0x183467['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xd4d309,id:_0x6d57f6}=this;if(!this['_repository']['hasCommentThread'](_0xd4d309))throw new _0x3593cf('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x358f28}=this['_repository']['getCommentThread'](_0xd4d309);this['_repository']['fire'](Nt('removeComment',_0x358f28,_0xd4d309),{'channelId':_0x358f28,'threadId':_0xd4d309,'commentId':_0x6d57f6,..._0x183467});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x1e27e7,..._0x1ee44f){for(const _0x182b2c of _0x1ee44f)void 0x0!==_0x182b2c&&(_0x1e27e7+=':'+String(_0x182b2c));return _0x1e27e7;}class ot extends _0x2e80b8{constructor(_0x435a9a){super(_0x435a9a),this['set']('hasContent',!0x1);}['refresh'](){const _0x5d423d=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x813d23 of _0x5d423d['getRanges']())if(this['_hasContent'](_0x813d23))return void(this['hasContent']=!0x0);}['execute']({threadId:_0xf31736=_0x32fc6d(),ranges:_0xcda2f1,comment:_0x14dfef}={}){const _0x3ac2b7=this['editor']['model'],_0xa4e338=_0xcda2f1??Array['from'](_0x3ac2b7['document']['selection']['getRanges']()),_0x35bd10=[];for(const _0xad3fe6 of _0xa4e338)this['_hasContent'](_0xad3fe6)&&_0x35bd10['push'](this['_trimToContent'](_0xad3fe6));if(!_0x35bd10['length'])throw new _0x3593cf('addcommentthreadcommand-incorrect-ranges',null);_0x14dfef&&this['_createCommentThread'](_0xf31736,_0x14dfef),this['_createMarkersFromRanges'](_0xf31736,_0x35bd10,!!_0x14dfef);}['_createMarkersFromRanges'](_0x4340be,_0x42f1c0,_0x21d7db){this['editor']['model']['change'](_0x4b6573=>{for(const _0x21b891 of _0x42f1c0){const _0xba4696=_0x32fc6d()['substr'](0x1,0x5),_0x384a30='comment:'+_0x4340be+':'+_0xba4696;_0x4b6573['addMarker'](_0x384a30,{'range':_0x21b891,'usingOperation':_0x21d7db,'affectsData':_0x21d7db});}});}['_createCommentThread'](_0x4dce2c,_0x3fba0d){const _0x4e9020=this['editor']['plugins']['get']('CommentsRepository'),_0x50e4d8=this['editor']['config']['get']('collaboration.channelId'),_0x60c2b8=this['editor']['plugins']['get']('Users')['me'];if(!_0x60c2b8)throw new _0x3593cf('addcommentthreadcommand-user-not-found',null);_0x4e9020['addCommentThread']({'threadId':_0x4dce2c,'channelId':_0x50e4d8,'comments':[{'authorId':_0x60c2b8['id'],'content':_0x3fba0d,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x5534ec){for(const _0x3ba520 of _0x5534ec['getItems']())if(this['_itemIsContent'](_0x3ba520))return!0x0;return!0x1;}['_itemIsContent'](_0x2934e0){return _0x2934e0['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x2934e0)&&!_0x2934e0['is']('element','tableCell');}['_trimToContent'](_0x49f8b2){const _0x1a91f0=_0x5097e6=>!this['_itemIsContent'](_0x5097e6['item']),_0x1e5f32=_0x49f8b2['start']['getLastMatchingPosition'](_0x1a91f0),_0x5afdc0=_0x49f8b2['end']['getLastMatchingPosition'](_0x1a91f0,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1e5f32,_0x5afdc0);}}class b extends _0x296061{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x548921){super(_0x548921),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4657d6=this['editor'],_0x1c75cc=_0x4657d6['model']['document']['selection'],_0xad5732=_0x1a90a8(()=>this['refreshSelectedViews'](),0xa);_0x1c75cc['on']('change:range',(_0x32beee,_0x41ecc6)=>{_0x41ecc6['directChange']&&(_0xad5732['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4657d6['editing']['view']['document'],'change:isFocused',(_0x57ae29,_0x1cee89,_0x56e527)=>{_0x56e527&&_0xad5732();}),this['listenTo'](_0x4657d6['ui']['focusTracker'],'change:isFocused',(_0x273baf,_0x5142d5,_0xd2c3ca)=>{_0xd2c3ca||this['fire']('blur',{'isAnnotationTracked':_0x536394=>this['_editorAnnotationsData']['has'](_0x536394['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x352f15){if(this['_editorAnnotations']['has'](_0x352f15['view']))return;this['_editorAnnotations']['add'](_0x352f15['view']),this['editor']['ui']['focusTracker']['add'](_0x352f15['view']['element']);const _0x39baa5=this['editor']['plugins']['get'](y);this['listenTo'](_0x39baa5['collection'],'remove',(_0x387f6d,_0x46d9f1)=>{this['editor']['ui']['focusTracker']['remove'](_0x46d9f1['view']['element']),this['_editorAnnotations']['delete'](_0x46d9f1['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2716b0){if('function'!=typeof _0x2716b0)throw new _0x3593cf('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2716b0);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4c88ae,annotations:_0x4b4b80}){const _0x3ab7e1=[],_0x3b9e16=this['editor']['model']['document']['selection'],_0x50e1cd=Array['from'](_0x3b9e16['getRanges']());for(const [_0x3ece5f,_0xd26a09]of this['_editorAnnotationsData']){const _0x1d3d34=_0x299b9e(_0xd26a09),_0x1bac99=_0x4b4b80['getByInnerView'](_0x3ece5f);_0x1d3d34&&_0x1bac99&&_0x3ab7e1['push']({'annotation':_0x1bac99,'range':_0x1d3d34});}function _0x299b9e(_0x1e5275){for(const _0x39ccfd of _0x1e5275)for(const _0x543a2e of _0x50e1cd)if(_0x39ccfd['containsRange'](_0x543a2e,!_0x3b9e16['isCollapsed']))return _0x39ccfd;return null;}return _0x3ab7e1['sort']((_0x3c6c7c,_0x4788ba)=>{const _0x20e25a=_0x3c6c7c['range'],_0x21ac7b=_0x4788ba['range'];if(!_0x20e25a['isEqual'](_0x21ac7b)){if(_0x20e25a['containsRange'](_0x21ac7b,!0x0))return 0x1;if(_0x21ac7b['containsRange'](_0x20e25a,!0x0))return-0x1;}return _0x3c6c7c['annotation']==_0x4c88ae?-0x1:_0x4788ba['annotation']==_0x4c88ae?0x1:0x0;})['map'](_0x1f892e=>_0x1f892e['annotation']);}get['_editorAnnotationsData'](){const _0x5a39fa=new Map();for(const _0x1eaebc of Array['from'](this['_dataCollectors']))for(const [_0x588280,_0x374e33]of _0x1eaebc())_0x5a39fa['set'](_0x588280,_0x374e33);return _0x5a39fa;}}class st extends _0x296061{['afterInit'](){const _0x3fe4b1=this['editor'];if(!_0x3fe4b1['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3fe4b1['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x296061{constructor(_0xc18145){super(_0xc18145),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2ab286=this['editor'],_0x52c22e=_0x2ab286['commands']['get']('importWord'),_0x35aa63=_0x2ab286['plugins']['get'](it);_0x52c22e&&(_0x52c22e['on']('execute',(_0x1b8d25,[,_0x409ad4])=>{_0x409ad4['collaboration_features']={'comments':!0x0,'user_id':_0x35aa63['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x52c22e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x552dc3,_0x44aa14){const {comment_threads:_0x250740}=_0x44aa14;_0x250740&&_0x250740['forEach'](({thread_id:_0x5325b4,comments:_0x4891c3,is_resolved:_0x86ea85})=>{const _0x57879d=new Date(),_0x2ca22b=_0x4891c3['map'](({author:_0x1c2963,content:_0x5614d0,created_at:_0x268f09})=>({'content':_0x5614d0,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x57879d,'attributes':{'@external':{'authorName':_0x1c2963,'createdAt':_0x268f09?new Date(_0x268f09):new Date(),'source':'importWord'}}})),_0x56a97b=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x56a97b,'threadId':_0x5325b4,'comments':_0x2ca22b,'resolvedAt':_0x86ea85?_0x57879d:null});});}}class at extends _0x296061{constructor(_0x30ce8d){super(_0x30ce8d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x4a6f52=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4a6f52,'contentInsertion',(_0x5e85a,_0x12fd13)=>this['_removeMarkersWithoutThreads'](_0x12fd13['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xbd4948){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xbd4948;const _0x342950=this['editor']['plugins']['get']('CommentsRepository');for(const _0xe3d689 of _0xbd4948['keys']()){const [_0x21220e,_0xf579ed]=_0xe3d689['split'](':');'comment'!=_0x21220e||_0x342950['hasCommentThread'](_0xf579ed)||_0xbd4948['delete'](_0xe3d689);}return _0xbd4948;}['_registerMarkerInClipboardPipeline'](){const _0x1bbf9f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3b2320=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3b2320&&_0x1bbf9f['_registerMarkerToCopy']('comment',_0x3b2320);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x236cb3){switch(_0x236cb3){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x57294c){const _0x24a063=_0x57294c['split'](':');return{'group':_0x24a063[0x0],'id':_0x24a063[0x1],'part':_0x24a063[0x2]};}class ut extends _0x296061{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x8a3e12,_0x1326c9)=>{if(!_0x1326c9['options']['showCommentHighlights'])return null;if(_0x1326c9['options']['ignoreResolvedComments']){const {id:_0x5f3447}=ft(_0x8a3e12['markerName']),_0x33d7ab=this['editor']['plugins']['get'](o);if(_0x33d7ab['getCommentThread'](_0x5f3447)?.['isResolved']&&_0x8a3e12['item'])return _0x1326c9['consumable']['consume'](_0x8a3e12['item'],'addMarker:'+_0x8a3e12['markerName']),_0x1326c9['consumable']['consume'](_0x8a3e12['item'],'removeMarker:'+_0x8a3e12['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1e6c2d=>{_0x1e6c2d['on']('addMarker:comment',(_0xbc20fd,_0x20e698,_0x43ca85)=>{if(!_0x43ca85['options']['showCommentHighlights'])return;const _0x400ac4=_0x20e698['item'];if(!_0x400ac4)return;const _0x4f0acc=_0x43ca85['mapper']['toViewElement'](_0x400ac4);this['editor']['model']['schema']['isObject'](_0x400ac4)&&_0x4f0acc&&!_0x4f0acc['getCustomProperty']('widget')&&_0x4f0acc['is']('containerElement')&&_0x3259cb(_0x4f0acc,_0x43ca85['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x491d5c,{writer:_0x68e260,options:_0x5bd7a4})=>{if(!_0x5bd7a4['showCommentHighlights'])return null;const _0xbda02f=_0x68e260['createContainerElement']('div'),_0x46c1c9=_0x68e260['createEmptyElement']('hr');return _0x68e260['addClass']('ck-horizontal-line',_0xbda02f),_0x68e260['insert'](_0x68e260['createPositionAt'](_0xbda02f,0x0),_0x46c1c9),_0xbda02f;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3467a4,{writer:_0x1df0b8,options:_0x4ec6c4})=>{if(!_0x4ec6c4['showCommentHighlights'])return null;const _0x21fbd6=_0x1df0b8['createContainerElement']('span'),_0x5e19cc=_0x1df0b8['createEmptyElement']('img');return _0x1df0b8['addClass']('image-inline',_0x21fbd6),_0x1df0b8['insert'](_0x1df0b8['createPositionAt'](_0x21fbd6,0x0),_0x5e19cc),_0x21fbd6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x227d0f,{writer:_0x47090a,options:_0xe360e})=>{if(_0xe360e['showCommentHighlights'])return _0x47090a['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x114ccc,_0x204711,_0xb96acd)=>{_0xb96acd['options']['showCommentHighlights']&&_0x114ccc['stop']();},{'priority':'high'});}}class r extends _0x296061{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3b1786){super(_0x3b1786),this['set']('isThreadsLoadingPaused',!0x0),_0x3b1786['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4749ec,_0x2e6f5d,_0x212f22,_0x255181)=>{const _0x521051=_0x3b1786['plugins']['get'](o),_0x400086=_0x212f22?ft(_0x212f22)['id']:null;_0x3b1786['model']['change'](()=>{if(_0x400086){const _0x2500d1=this['getAllMarkersForId'](_0x400086);for(const _0x553fe1 of _0x2500d1)_0x3b1786['editing']['reconvertMarker'](_0x553fe1);}if(_0x255181){const {id:_0x3e2843}=ft(_0x255181),_0x364bb6=_0x521051['getCommentThread'](_0x3e2843);if(_0x364bb6&&_0x364bb6['unlinkedAt'])return;if(_0x364bb6&&!_0x364bb6['isAttached'])return;const _0x1894bb=this['getAllMarkersForId'](_0x3e2843);for(const _0xd8ae05 of _0x1894bb)_0x3b1786['editing']['reconvertMarker'](_0xd8ae05);}}),_0x400086&&this['scrollToThreadMarker'](_0x400086);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5cf488=this['editor'],_0x1c636e=_0x5cf488['plugins']['get'](o),_0x228171=_0x5cf488['config']['get']('collaboration.channelId'),_0x8762bb=_0x1c636e['getCommentThreads']()['filter'](_0x5c2d4e=>_0x5c2d4e['channelId']!==_0x228171);_0x5cf488['commands']['add']('addCommentThread',new ot(_0x5cf488)),this['listenTo'](_0x5cf488,'change:isReadOnly',(_0x511087,_0x11ea9f,_0x262ad1)=>{_0x1c636e['switchReadOnly'](_0x262ad1,_0x5cf488['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1c636e,dt('addCommentThread',_0x228171),(_0x446896,{threadId:_0x246334})=>{const _0x22c0fd=this['editor']['plugins']['get'](o)['getCommentThread'](_0x246334);_0x22c0fd?.['unlinkedAt']&&this['_attachArchivedThread'](_0x246334);}),this['listenTo'](_0x1c636e,dt('removeCommentThread',_0x228171),(_0x4b5eb4,{threadId:_0x5036b1})=>{_0x5cf488['model']['enqueueChange']({'isUndoable':!0x1},_0x23c7ed=>{const _0x5e18ee=this['getAllMarkersForId'](_0x5036b1);for(const _0x42b150 of _0x5e18ee)_0x23c7ed['removeMarker'](_0x42b150);});}),this['listenTo'](_0x1c636e,dt('resolveCommentThread',_0x228171),(_0x46cf66,{threadId:_0x268981})=>{(this['_reconvertMarkers'](_0x268981),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x268981)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1c636e,dt('reopenCommentThread',_0x228171),(_0x3d2c2d,{threadId:_0x419869})=>{this['_reconvertMarkers'](_0x419869);},{'priority':'low'}),this['listenTo'](_0x1c636e,dt('addComment',_0x228171),(_0x1b1f47,{threadId:_0x358aa4,isFromAdapter:_0x298453})=>{const _0x5a6dee=this['getAllMarkersForId'](_0x358aa4);if(_0x298453||0x0==_0x5a6dee['length']||!_0x1c636e['hasCommentThread'](_0x358aa4))return;0x1===_0x1c636e['getCommentThread'](_0x358aa4)['length']&&_0x5cf488['model']['enqueueChange']({'isUndoable':!0x1},_0x31f260=>{for(const _0x5d717d of _0x5a6dee)_0x31f260['updateMarker'](_0x5d717d,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x8762bb);}['afterInit'](){!async function(_0x283d7a){const _0x5e3db8=_0x59ff03([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x3bfe2b=0x73460ab3,_0x320875=0x73418d8b^_0x3bfe2b,_0x4f96a7=window[_0x59ff03([0x44,0x61,0x74,0x65])][_0x59ff03([0x6e,0x6f,0x77])](),_0x319973=_0x283d7a[_0x59ff03([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2fb7c0=new window[(_0x59ff03([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10e78b=>{_0x319973[_0x59ff03([0x6f,0x6e,0x63,0x65])](_0x59ff03([0x72,0x65,0x61,0x64,0x79]),_0x10e78b);}),_0x377ebd={[_0x59ff03([0x6b,0x74,0x79])]:_0x59ff03([0x45,0x43]),[_0x59ff03([0x75,0x73,0x65])]:_0x59ff03([0x73,0x69,0x67]),[_0x59ff03([0x63,0x72,0x76])]:_0x59ff03([0x50,0x2d,0x32,0x35,0x36]),[_0x59ff03([0x78])]:_0x59ff03([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]),[_0x59ff03([0x79])]:_0x59ff03([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]),[_0x59ff03([0x61,0x6c,0x67])]:_0x59ff03([0x45,0x53,0x32,0x35,0x36])},_0x2f5d24=_0x319973[_0x59ff03([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x59ff03([0x67,0x65,0x74])](_0x59ff03([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x431d39(){let _0x24b14e,_0x3b847f=null,_0x3dbd27=null;try{if(_0x2f5d24==_0x59ff03([0x47,0x50,0x4c]))return _0x59ff03([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x24b14e=_0x345ffc(),!_0x24b14e)return _0x59ff03([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x24b14e[_0x59ff03([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3dbd27=_0x49ca04(_0x24b14e[_0x59ff03([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x24b14e[_0x59ff03([0x6a,0x74,0x69])])),await _0x3869ea()?_0x2b998b()?_0x5ad094()?_0x59ff03([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x430a9b()?(_0x24b14e[_0x59ff03([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x59ff03([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3b847f=_0x2ed9e(_0x59ff03([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3424b8()):_0x59ff03([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x59ff03([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x59ff03([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x59ff03([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5ad094(){const _0x46eeeb=[_0x59ff03([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x59ff03([0x74,0x72,0x69,0x61,0x6c])][_0x59ff03([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24b14e[_0x59ff03([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4f96a7/0x3e8:0xe10*_0x320875;return _0x24b14e[_0x59ff03([0x65,0x78,0x70])]<_0x46eeeb;}function _0x2b998b(){const _0x43f4d8=_0x24b14e[_0x59ff03([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x43f4d8)return!0x1;if(_0x43f4d8[_0x59ff03([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59ff03([0x2a])))return!0x0;if(_0x43f4d8[_0x59ff03([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59ff03([0x43,0x4d,0x54])))return!0x0;if(_0x43f4d8[_0x59ff03([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59ff03([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0xf77725())return!0x0;if(_0x43f4d8[_0x59ff03([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59ff03([0x52,0x43,0x4d,0x54]))){if(_0x1a303b())return!0x0;if(_0x262887()||_0x3b16c5())return!0x0;}return!0x1;}function _0x430a9b(){const _0xd692aa=_0x24b14e[_0x59ff03([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xd692aa||0x0==_0xd692aa[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x36b8cb}=new URL(window[_0x59ff03([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xd692aa[_0x59ff03([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36b8cb))return!0x0;const _0x4dac75=_0x36b8cb[_0x59ff03([0x73,0x70,0x6c,0x69,0x74])](_0x59ff03([0x2e]));return _0xd692aa[_0x59ff03([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x245c01=>_0x245c01[_0x59ff03([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59ff03([0x2a])))[_0x59ff03([0x6d,0x61,0x70])](_0x18ce33=>_0x18ce33[_0x59ff03([0x73,0x70,0x6c,0x69,0x74])](_0x59ff03([0x2e])))[_0x59ff03([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e75f7=>_0x1e75f7[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4dac75[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x59ff03([0x6d,0x61,0x70])](_0x120964=>Array(_0x4dac75[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x120964[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x59ff03([0x66,0x69,0x6c,0x6c])](_0x120964[0x0]===_0x59ff03([0x2a])?_0x59ff03([0x2a]):'')[_0x59ff03([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x120964))[_0x59ff03([0x73,0x6f,0x6d,0x65])](_0x493781=>_0x4dac75[_0x59ff03([0x65,0x76,0x65,0x72,0x79])]((_0x3d621a,_0xd00f9b)=>_0x493781[_0xd00f9b]===_0x3d621a||_0x493781[_0xd00f9b]===_0x59ff03([0x2a])));}function _0x3424b8(){return _0x3b847f&&_0x3dbd27?new window[(_0x59ff03([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xeac562,_0x55bedf)=>{_0x3b847f[_0x59ff03([0x74,0x68,0x65,0x6e])](_0xeac562,_0x55bedf),_0x3dbd27[_0x59ff03([0x74,0x68,0x65,0x6e])](_0x26a830=>{_0x26a830!=_0x59ff03([0x56,0x61,0x6c,0x69,0x64])&&_0xeac562(_0x26a830);},_0x55bedf);}):_0x3b847f||_0x3dbd27||_0x59ff03([0x56,0x61,0x6c,0x69,0x64]);}}function _0x49ca04(_0x20a05a,_0x49cf84){return new window[(_0x59ff03([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1858d3=>{if(_0x130350())return _0x1858d3(_0x59ff03([0x56,0x61,0x6c,0x69,0x64]));_0x3ad08a(),_0x319973[_0x59ff03([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x59ff03([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xd2cdb=!0x1;const _0x3f7df9=_0x32fc6d();function _0x38dcb6(_0x570207){return!!_0x570207&&(typeof _0x570207===_0x59ff03([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x570207===_0x59ff03([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x570207[_0x59ff03([0x74,0x68,0x65,0x6e])]===_0x59ff03([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x570207[_0x59ff03([0x63,0x61,0x74,0x63,0x68])]===_0x59ff03([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4394a9(_0x32fd8c){_0x6b1576(_0x32fd8c)[_0x59ff03([0x74,0x68,0x65,0x6e])](_0x5dcf51=>{if(!_0x5dcf51||_0x5dcf51[_0x59ff03([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x59ff03([0x6f,0x6b]))return _0x59ff03([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x90dbf0(_0x4eaf68(_0x3f7df9+_0x49cf84))!=_0x5dcf51[_0x59ff03([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x59ff03([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x59ff03([0x56,0x61,0x6c,0x69,0x64]);})[_0x59ff03([0x74,0x68,0x65,0x6e])](_0x573267=>(_0x111485(),_0x573267),()=>{const _0x9898ea=_0x2de7f4();return null==_0x9898ea?(_0x111485(),_0x59ff03([0x56,0x61,0x6c,0x69,0x64])):_0x59ff03(_0x4f96a7-_0x9898ea>(0x574a8eb3^_0x3bfe2b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x59ff03([0x74,0x68,0x65,0x6e])](_0x1858d3)[_0x59ff03([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1858d3(_0x59ff03([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1b9622=0x7370e433^_0x3bfe2b;function _0x111485(){const _0x5ba819=_0x59ff03([0x6c,0x6c,0x63,0x74,0x2d])+_0x90dbf0(_0x4eaf68(_0x20a05a)),_0x491171=_0x359f02(_0x90dbf0(window[_0x59ff03([0x4d,0x61,0x74,0x68])][_0x59ff03([0x63,0x65,0x69,0x6c])](_0x4f96a7/_0x1b9622)));window[_0x59ff03([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x59ff03([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5ba819,_0x491171);}function _0x2de7f4(){const _0x4502fa=_0x59ff03([0x6c,0x6c,0x63,0x74,0x2d])+_0x90dbf0(_0x4eaf68(_0x20a05a)),_0x3ae24a=window[_0x59ff03([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x59ff03([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4502fa);return _0x3ae24a?window[_0x59ff03([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x359f02(_0x3ae24a),0x10)*_0x1b9622:null;}function _0x6b1576(_0x33ebee){return new window[(_0x59ff03([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x471abd,_0x8fd400)=>{_0x33ebee[_0x59ff03([0x74,0x68,0x65,0x6e])](_0x471abd,_0x8fd400),window[_0x59ff03([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x8fd400,0x7347de73^_0x3bfe2b);});}}_0x319973[_0x59ff03([0x6f,0x6e])](_0x59ff03([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4175ba,_0x1e2549)=>{if(_0x1e2549[0x0]!=_0x20a05a)return _0x1858d3(_0x59ff03([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1e2549[0x1]={..._0x1e2549[0x1],[_0x59ff03([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3f7df9};},{[_0x59ff03([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x59ff03([0x68,0x69,0x67,0x68])}),_0x319973[_0x59ff03([0x6f,0x6e])](_0x59ff03([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5af164=>{_0x38dcb6(_0x5af164[_0x59ff03([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xd2cdb=!0x0,_0x4394a9(_0x5af164[_0x59ff03([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x59ff03([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x59ff03([0x6c,0x6f,0x77])}),_0x2fb7c0[_0x59ff03([0x74,0x68,0x65,0x6e])](()=>{_0xd2cdb||_0x1858d3(_0x59ff03([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x130350(){return _0x319973[_0x59ff03([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59ff03([0x76,0x69,0x65,0x77])][_0x59ff03([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x59ff03([0x61,0x75,0x74,0x6f]);}function _0x3ad08a(){_0x319973[_0x59ff03([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59ff03([0x76,0x69,0x65,0x77])][_0x59ff03([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x59ff03([0x61,0x75,0x74,0x6f]);}}function _0x2ed9e(_0xdeafcb){const _0x47f284=[new window[(_0x59ff03([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e100a=>setTimeout(_0x4e100a,0x734f347f^_0x3bfe2b)),_0x2fb7c0[_0x59ff03([0x74,0x68,0x65,0x6e])](()=>new window[(_0x59ff03([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e0d2d=>{let _0x5e2880=0x0;_0x319973[_0x59ff03([0x6d,0x6f,0x64,0x65,0x6c])][_0x59ff03([0x6f,0x6e])](_0x59ff03([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x23d9e2,_0x14ec22)=>{_0x14ec22[0x0][_0x59ff03([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5e2880++,_0x5e2880==(0x73460f5b^_0x3bfe2b)&&(_0x1e0d2d(),_0x23d9e2[_0x59ff03([0x6f,0x66,0x66])]());});}))];return window[_0x59ff03([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x59ff03([0x72,0x61,0x63,0x65])](_0x47f284)[_0x59ff03([0x74,0x68,0x65,0x6e])](()=>_0xdeafcb);}async function _0x459f3c(){await _0x2fb7c0,_0x319973[_0x59ff03([0x6d,0x6f,0x64,0x65,0x6c])][_0x59ff03([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x10940d,_0x319973[_0x59ff03([0x6d,0x6f,0x64,0x65,0x6c])][_0x59ff03([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x10940d,_0x319973[_0x59ff03([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x59ff03([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xf77725(){return window[_0x59ff03([0x67,0x6c,0x6f,0x62])]&&window[_0x59ff03([0x67,0x6c,0x6f,0x62])][_0x59ff03([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1a303b(){return _0x362bb6(_0x59ff03([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x45fbfe(_0x59ff03([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x59ff03([0x73,0x74,0x61,0x74,0x65])]==_0x59ff03([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x262887(){return _0x362bb6(_0x59ff03([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 _0x3b16c5(){return _0x362bb6(_0x59ff03([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5e66cd(_0x5ccc4b){const _0x669a2a=_0x24e278();_0x319973[_0x669a2a]=_0x59ff03([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5ccc4b,_0x5ccc4b!=_0x59ff03([0x56,0x61,0x6c,0x69,0x64])&&_0x459f3c();}function _0x24e278(){const _0x24acc2=window[_0x59ff03([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x59ff03([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x59ff03([0x6e,0x6f,0x77])]())[_0x59ff03([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x59ff03([0x2e]),'');let _0x426cb0=_0x59ff03([0x4b]);for(let _0x436832=0x0;_0x436832<_0x24acc2[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x436832+=0x2){let _0x49b2ce=window[_0x59ff03([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x24acc2[_0x59ff03([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x436832,_0x436832+0x2));_0x49b2ce>=_0x5e3db8[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x49b2ce-=_0x5e3db8[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x426cb0+=_0x5e3db8[_0x49b2ce];}return _0x426cb0;}function _0x345ffc(){const _0x295f6b=_0x2f5d24[_0x59ff03([0x73,0x70,0x6c,0x69,0x74])](_0x59ff03([0x2e]));if(0x3!=_0x295f6b[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x28f502(_0x295f6b[0x1]);function _0x28f502(_0x19269a){const _0x2203ba=_0x4752a0(_0x19269a);return _0x2203ba&&_0x5ca422()?_0x2203ba:null;function _0x5ca422(){const _0x4840b4=_0x2203ba[_0x59ff03([0x6a,0x74,0x69])],_0x287812=window[_0x59ff03([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4840b4[_0x59ff03([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4840b4[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5b7119={..._0x2203ba,[_0x59ff03([0x6a,0x74,0x69])]:_0x4840b4[_0x59ff03([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4840b4[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5b7119[_0x59ff03([0x76,0x63])],_0x4eaf68(_0x5b7119)==_0x287812;}}}async function _0x3869ea(){let _0x2c25aa=!0x0;try{const _0x4d9e22=_0x2f5d24[_0x59ff03([0x73,0x70,0x6c,0x69,0x74])](_0x59ff03([0x2e])),[_0x1a369d,_0x1dac8a,_0x1db453]=_0x4d9e22;return _0xd1fc5f(_0x1a369d),await _0x13d1fa(_0x1a369d,_0x1dac8a,_0x1db453),_0x2c25aa;}catch{return!0x1;}function _0xd1fc5f(_0x4199ad){const _0x254460=_0x4752a0(_0x4199ad);_0x254460&&_0x254460[_0x59ff03([0x61,0x6c,0x67])]==_0x59ff03([0x45,0x53,0x32,0x35,0x36])||(_0x2c25aa=!0x1);}async function _0x13d1fa(_0x1dc2ad,_0x4ae489,_0x108ff6){const _0x55aa59=window[_0x59ff03([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x59ff03([0x66,0x72,0x6f,0x6d])](_0x53b6f6(_0x108ff6),_0x4a20b0=>_0x4a20b0[_0x59ff03([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4a503b=new window[(_0x59ff03([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x59ff03([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1dc2ad+_0x59ff03([0x2e])+_0x4ae489),_0x4eddd3=window[_0x59ff03([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x59ff03([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4eddd3)return;const _0x808b28=await _0x4eddd3[_0x59ff03([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x59ff03([0x6a,0x77,0x6b]),_0x377ebd,{[_0x59ff03([0x6e,0x61,0x6d,0x65])]:_0x59ff03([0x45,0x43,0x44,0x53,0x41]),[_0x59ff03([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x59ff03([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x59ff03([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4eddd3[_0x59ff03([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x59ff03([0x6e,0x61,0x6d,0x65])]:_0x59ff03([0x45,0x43,0x44,0x53,0x41]),[_0x59ff03([0x68,0x61,0x73,0x68])]:{[_0x59ff03([0x6e,0x61,0x6d,0x65])]:_0x59ff03([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x808b28,_0x55aa59,_0x4a503b)||(_0x2c25aa=!0x1);}}function _0x4752a0(_0x579d19){return _0x579d19[_0x59ff03([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x59ff03([0x65,0x79]))?JSON[_0x59ff03([0x70,0x61,0x72,0x73,0x65])](_0x53b6f6(_0x579d19)):null;}function _0x53b6f6(_0x397af5){return window[_0x59ff03([0x61,0x74,0x6f,0x62])](_0x397af5[_0x59ff03([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x59ff03([0x2b]))[_0x59ff03([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x59ff03([0x2f])));}function _0x4eaf68(_0x40110c){let _0x190a6f=0x1505;function _0x58e49b(_0x190ec8){for(let _0x2ff9ab=0x0;_0x2ff9ab<_0x190ec8[_0x59ff03([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2ff9ab++){const _0x1a2171=_0x190ec8[_0x59ff03([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2ff9ab);_0x190a6f=(_0x190a6f<<0x5)+_0x190a6f+_0x1a2171,_0x190a6f&=_0x190a6f;}}function _0x376ec9(_0x479f77){Array[_0x59ff03([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x479f77)?_0x479f77[_0x59ff03([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x376ec9):_0x479f77&&typeof _0x479f77==_0x59ff03([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x59ff03([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x479f77)[_0x59ff03([0x73,0x6f,0x72,0x74])]()[_0x59ff03([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x8d197e,_0x28ec1f])=>{_0x58e49b(_0x8d197e),_0x376ec9(_0x28ec1f);}):_0x58e49b(window[_0x59ff03([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x479f77));}return _0x376ec9(_0x40110c),_0x190a6f>>>0x0;}function _0x90dbf0(_0x1c3ce1){return _0x1c3ce1[_0x59ff03([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x59ff03([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x59ff03([0x30]));}function _0x359f02(_0x111f3c){return _0x111f3c[_0x59ff03([0x73,0x70,0x6c,0x69,0x74])]('')[_0x59ff03([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x59ff03([0x6a,0x6f,0x69,0x6e])]('');}function _0x362bb6(_0x3569f7){return _0x319973[_0x59ff03([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x59ff03([0x68,0x61,0x73])](_0x3569f7);}function _0x45fbfe(_0xa7d2d9){return _0x319973[_0x59ff03([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x59ff03([0x67,0x65,0x74])](_0xa7d2d9);}function _0x10940d(){}function _0x59ff03(_0x5e929f){return _0x5e929f['map'](_0x19bc43=>String['fromCharCode'](_0x19bc43))['join']('');}_0x5e66cd(await _0x431d39());}(this);}['destroy'](){const _0x1d3d43=this['editor']['plugins']['get'](o),_0x113d36=this['editor']['config']['get']('collaboration.channelId');for(const _0x51289f of _0x1d3d43['getCommentThreads']({'channelId':_0x113d36}))_0x1d3d43['_detachCommentThread'](_0x51289f['id']),_0x1d3d43['_threads']['delete'](_0x51289f['id']);super['destroy']();}['hasMarkerForId'](_0xb90d44){return this['getAllMarkersForId'](_0xb90d44)['length']>0x0;}['getAllMarkersForId'](_0x578344){const _0x311f50=[];for(const _0x38d450 of this['editor']['model']['markers'])_0x38d450['name']['startsWith']('comment:'+_0x578344)&&_0x311f50['push'](_0x38d450);return _0x311f50;}['scrollToThreadMarker'](_0x53eeab){setTimeout(()=>{const _0x366fac=this['_getTargetForId'](_0x53eeab);if(!_0x366fac)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x53eeab&&nt({'target':_0x366fac[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x39f1bc){this['editor']['model']['change'](()=>{for(const _0x590427 of this['getAllMarkersForId'](_0x39f1bc))this['editor']['editing']['reconvertMarker'](_0x590427);});}['_attachArchivedThread'](_0x3dbcc3){const _0x254529=this['editor']['plugins']['get'](o),_0x22ad77=this['editor']['plugins']['get'](b),_0x67428d=_0x254529['getCommentThread'](_0x3dbcc3);if(!_0x67428d['isAttached']){const _0x21cef4=_0x67428d['attachTo'](()=>this['_getTargetForId'](_0x67428d['id']));_0x22ad77['registerAnnotation'](_0x21cef4),_0x67428d['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x55d66=this['editor'],_0x22c235=_0x55d66['plugins']['get'](it);_0x55d66['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x136029,_0x3a0453)=>{const {id:_0x55b862}=ft(_0x136029['markerName']),_0x3e5bb1=_0x55d66['plugins']['get'](o)['getCommentThread'](_0x55b862),_0x535301=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x55b862;let _0x372c99;if(_0x3e5bb1&&_0x3e5bb1['isResolved']&&!_0x535301&&_0x136029['item'])return _0x3a0453['consumable']['consume'](_0x136029['item'],'addMarker:'+_0x136029['markerName']),_0x3a0453['consumable']['consume'](_0x136029['item'],'removeMarker:'+_0x136029['markerName']),null;const _0x10e8a3=['ck-comment-marker'];return _0x535301&&_0x10e8a3['push']('ck-comment-marker--active'),_0x372c99=_0x3e5bb1?.['length']?_0x3e5bb1['comments']['first']['author']['id']:_0x22c235['me']['id'],{'classes':_0x10e8a3,'attributes':{'data-comment':_0x55b862,'data-author-id':_0x372c99}};}}),_0x55d66['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1302c4,{options:_0x40e206})=>{if(_0x40e206['showCommentHighlights'])return null;const _0x54b863=_0x55d66['plugins']['get'](o),_0x387648=_0x55d66['model']['markers']['get'](_0x1302c4),{id:_0x5513d8,part:_0x13a2f3}=ft(_0x1302c4);return _0x387648&&!_0x387648['affectsData']||_0x40e206['ignoreResolvedComments']&&_0x54b863['getCommentThread'](_0x5513d8)?.['isResolved']?null:{'group':'comment','name':_0x13a2f3?_0x5513d8+':'+_0x13a2f3:_0x5513d8};}}),_0x55d66['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3cbb74,{writer:_0x110e4b})=>_0x110e4b['createElement']('$marker',{'data-name':'comment:'+_0x3cbb74['getAttribute']('id')})}),_0x55d66['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x54618b=this['editor'],_0x5250a3=_0x54618b['plugins']['get'](o),_0x58637a=new Set(),_0x4b478a=new Set();_0x54618b['model']['document']['registerPostFixer'](_0x49e9af=>{let _0x583453=!0x1;for(const {name:_0x4fdd7b,data:_0x37b358}of _0x54618b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x419a04,id:_0x546b81}=ft(_0x4fdd7b);let _0x126c92=_0x37b358['newRange'];if('comment'!==_0x419a04||!_0x126c92)continue;const _0x3a1165='$graveyard'===_0x126c92['root']['rootName'];_0x3a1165||(_0x126c92=ht(_0x126c92,_0x54618b['model']),!_0x126c92||_0x126c92['isCollapsed']||!_0x37b358['newRange']||_0x126c92['isEqual'](_0x37b358['newRange']))?_0x54618b['model']['hasContent'](_0x126c92)&&!_0x3a1165?this['isThreadsLoadingPaused']?_0x58637a['add'](_0x4fdd7b):this['_handleThreadMarker'](_0x4fdd7b,_0x546b81):(_0x4b478a['add'](_0x4fdd7b),_0x58637a['delete'](_0x4fdd7b),_0x49e9af['removeMarker'](_0x4fdd7b),_0x583453=!0x0):(_0x49e9af['updateMarker'](_0x4fdd7b,{'range':_0x126c92}),_0x583453=!0x0);}return _0x583453;}),this['on']('change:isThreadsLoadingPaused',(_0x34bb9e,_0x56af61,_0x580db2)=>{if(!_0x580db2&&_0x58637a['size'])for(const _0x78894b of _0x58637a){const {id:_0x2bf778}=ft(_0x78894b);_0x58637a['delete'](_0x78894b),_0x54618b['model']['markers']['get'](_0x78894b)&&this['_handleThreadMarker'](_0x78894b,_0x2bf778);}}),this['listenTo'](_0x54618b['model']['document'],'change',()=>{for(const {name:_0x6f4179,data:{newRange:_0x53c149}}of _0x54618b['model']['document']['differ']['getChangedMarkers']()){const {group:_0xe15789,id:_0x201f71}=ft(_0x6f4179);if('comment'!==_0xe15789)continue;const _0x3220f9=_0x5250a3['getCommentThread'](_0x201f71),_0x1149f7=this['hasMarkerForId'](_0x201f71);_0x3220f9&&(!_0x3220f9['_hasTargetInContent']&&_0x53c149&&_0x54618b['editing']['view']['once']('render',()=>{const _0xd7ee19=_0x54618b['plugins']['get'](y),_0x1f20c7=_0x5250a3['_threadToController']['get'](_0x3220f9)['view'];_0xd7ee19['getByInnerView'](_0x1f20c7)['refreshVisibility']();},{'priority':'low'}),_0x3220f9['_hasTargetInContent']=_0x1149f7||!!_0x53c149),_0x53c149||(_0x4b478a['add'](_0x6f4179),_0x58637a['delete'](_0x6f4179));}for(const _0x15aeb8 of _0x4b478a){const {id:_0x46b965}=ft(_0x15aeb8),_0x5183dc=_0x5250a3['getCommentThread'](_0x46b965);if(_0x58637a['delete'](_0x15aeb8),!_0x5183dc)continue;const _0x4039d8=this['hasMarkerForId'](_0x46b965);_0x4039d8||_0x5183dc['isSubmitted']?_0x4039d8||_0x5183dc['unlinkedAt']||_0x5183dc['setUnlinkedAt'](new Date()):_0x5183dc['remove']();}_0x4b478a['clear']();});}['_handleInitialThreads'](_0x177490){_0x177490['forEach'](_0x3a10d8=>{_0x3a10d8['unlinkedAt']&&this['_attachArchivedThread'](_0x3a10d8['id']);});}['_getTargetForId'](_0x50316e){const _0x3cfa51=this['editor'],_0x51cc86=this['getAllMarkersForId'](_0x50316e);return et(_0x3cfa51['editing'],_0x51cc86);}['_getTextContext'](_0x1b59ca){const _0xda2750=this['getAllMarkersForId'](_0x1b59ca);let _0x4bcb76='',_0x32e3bf=!0x1;for(const _0x393f99 of _0xda2750){const _0x6d845b=_0x393f99['getRange']();for(const _0x49cfd7 of Array['from'](_0x6d845b['getItems']()))_0x49cfd7['is']('$textProxy')?(_0x4bcb76&&_0x32e3bf&&(_0x4bcb76+='\x20',_0x32e3bf=!0x1),_0x4bcb76+=_0x49cfd7['data']):_0x32e3bf=!0x0;_0x32e3bf=!0x0;}return _0x4bcb76['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xfb47,_0x21f429){const _0x54f107=this['editor'],_0x51b998=_0x54f107['plugins']['get'](o);let _0x2617e7=_0x51b998['getCommentThread'](_0x21f429);const _0x58118c=_0x54f107['config']['get']('collaboration.channelId'),_0x34d2fa=_0x54f107['plugins']['get'](b);if(_0x2617e7&&(_0x2617e7['unlinkedAt']&&_0x2617e7['setUnlinkedAt'](null),_0x2617e7['isAttached']))return _0x2617e7;return!this['getAllMarkersForId'](_0x21f429)[0x0]['managedUsingOperations']?_0x54f107['editing']['view']['once']('render',()=>{if(_0x51b998['getCommentThread'](_0x21f429))return;const _0x1b3e7a=_0x54f107['plugins']['get'](y);_0x2617e7=_0x51b998['openNewCommentThread']({'channelId':_0x58118c,'threadId':_0x21f429,'target':()=>this['_getTargetForId'](_0x21f429),'context':{'type':'text','value':this['_getTextContext'](_0x21f429)}});const _0x3b9e53=_0x51b998['_threadToController']['get'](_0x2617e7)['view'],_0x52dc54=_0x1b3e7a['getByInnerView'](_0x3b9e53);_0x52dc54&&_0x34d2fa['registerAnnotation'](_0x52dc54);},{'priority':'low'}):_0x51b998['fetchCommentThread']({'channelId':_0x58118c,'threadId':_0x21f429})['then'](_0x1a5f47=>{if('destroyed'!==_0x54f107['state']){if(_0x2617e7=_0x1a5f47,_0x2617e7&&!_0x2617e7['isAttached']){const _0xd9a1bf=_0x2617e7['attachTo'](()=>this['_getTargetForId'](_0x21f429));_0x34d2fa['registerAnnotation'](_0xd9a1bf),_0x2617e7['isResolved']&&this['_reconvertMarkers'](_0x21f429);}else{if(!_0x2617e7){const _0x4af898=this['getAllMarkersForId'](_0x21f429);_0x54f107['model']['change'](_0x2d2c38=>{for(const _0x2e02ce of _0x4af898)_0x2d2c38['removeMarker'](_0x2e02ce);});}}}}),_0x2617e7;}['_handleThreadMarker'](_0x4c8185,_0xa052d2){const _0x3dddd6=this['_attachMarkerToThread'](_0x4c8185,_0xa052d2);_0x3dddd6&&!_0x3dddd6['context']&&_0x3dddd6['setContext']({'type':'text','value':this['_getTextContext'](_0xa052d2)});}['_initAriaMarkerChangeAnnouncements'](){const _0xd8eaf5=this['editor'];rt(_0xd8eaf5['model'],({left:_0x3c8511,entered:_0x1ea4f1})=>{for(const _0x1f9566 of _0x3c8511)if(mt(_0x1f9566)){_0xd8eaf5['ui']['ariaLiveAnnouncer']['announce'](N(_0xd8eaf5['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x50fa6b of _0x1ea4f1)if(mt(_0x50fa6b)){_0xd8eaf5['ui']['ariaLiveAnnouncer']['announce'](N(_0xd8eaf5['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x17a1c9)));break;}});}}function dt(_0x49ee53,_0x469bfa){return _0x469bfa?_0x49ee53+':'+_0x469bfa:_0x49ee53;}function ht(_0x31cd75,_0x36ff2f){const _0x9d29a6=_0x36ff2f['schema'],_0x400be4=_0x36ff2f['createRange'](_0x31cd75['start']);for(const _0x597768 of _0x31cd75['getWalker']()){const {type:_0xd25a3a,item:_0x129656,nextPosition:_0x594376}=_0x597768;if('text'===_0xd25a3a||_0x9d29a6['isObject'](_0x129656)){const _0x76bdcb=_0x36ff2f['createPositionBefore'](_0x129656);_0x400be4['isCollapsed']&&(_0x400be4['start']=_0x76bdcb),_0x400be4['end']=_0x594376;}}return _0x400be4;}function mt(_0x4b674c){return'comment'===ft(_0x4b674c['name'])['group'];}class s extends _0x296061{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x4fc238=this['editor'],_0x329b41=_0x4fc238['plugins']['get'](o),_0x50543d=_0x4fc238['plugins']['get'](r),_0x1dd71f=_0x4fc238['plugins']['get'](y),_0x135ff8=_0x4fc238['plugins']['get'](b);_0x4fc238['ui']['componentFactory']['add']('comment',()=>{const _0x5b29d8=this['_createUIButton'](_0x4c5034);return _0x5b29d8['tooltip']=!0x0,_0x5b29d8;}),_0x4fc238['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x3e2643)),_0x135ff8['addSourceCollector'](()=>{const _0x32fdd5=[];for(const [_0x41679b,_0x2e26f7]of _0x329b41['_threadToController']){const _0x411264=_0x50543d['getAllMarkersForId'](_0x41679b['id']),_0x1272d8=_0x411264['map'](_0x7a7d5b=>_0x7a7d5b['getRange']());_0x411264['length']>0x0&&_0x32fdd5['push']([_0x2e26f7['view'],_0x1272d8]);}return _0x32fdd5;}),this['listenTo'](_0x1dd71f,'change:activeAnnotations',(_0x2dce69,_0xe5c5c9,_0x35f55d)=>{const _0x2a94cf=Array['from'](_0x35f55d)['map'](_0x4e42b2=>_0x4e42b2['innerView'])['find'](_0x4d9ad4=>_0x329b41['_viewToController']['has'](_0x4d9ad4));if(!_0x2a94cf)return void(_0x50543d['activeMarker']=null);const _0x230f59=_0x329b41['_viewToController']['get'](_0x2a94cf)['model']['id'],_0x18161e='comment:'+_0x230f59;_0x230f59&&_0x50543d['hasMarkerForId'](_0x230f59)?_0x50543d['activeMarker']=_0x18161e:_0x50543d['activeMarker']&&(_0x50543d['activeMarker']=null);}),this['listenTo'](_0x329b41,'removeCommentThread',(_0x3f75e4,{threadId:_0x1d7212,isFromAdapter:_0xff4a4e})=>{!_0xff4a4e&&_0x4fc238['ui']['focusTracker']['isFocused']&&_0x50543d['hasMarkerForId'](_0x1d7212)&&_0x4fc238['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x329b41,'addComment',(_0x2a3be1,{threadId:_0x41f7ff,isFromAdapter:_0x13b1a4})=>{if(_0x13b1a4||!_0x50543d['hasMarkerForId'](_0x41f7ff)||!_0x329b41['hasCommentThread'](_0x41f7ff))return;0x1===_0x329b41['getCommentThread'](_0x41f7ff)['length']&&(_0x4fc238['editing']['view']['focus'](),_0x2a3be1['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5a7bf9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xe68749;for(const _0xcf41c1 in _0x5a7bf9){const _0x103009=_0xcf41c1,_0xf10961=_0x5a7bf9[_0x103009];if('commentsLicenseKeyValid'==_0xf10961||'commentsLicenseKeyInvalid'==_0xf10961||'commentsLicenseKeyExpired'==_0xf10961||'commentsLicenseKeyDomainLimit'==_0xf10961||'commentsLicenseKeyNotAllowed'==_0xf10961||'commentsLicenseKeyEvaluationLimit'==_0xf10961||'commentsLicenseKeyUsageLimit'==_0xf10961){delete _0x5a7bf9[_0x103009],_0xe68749=_0xf10961,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xe68749&&_0x5a7bf9['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xe68749&&_0x5a7bf9['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xe68749&&_0x5a7bf9['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xe68749&&_0x5a7bf9['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xe68749&&_0x5a7bf9['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0xe68749&&_0x5a7bf9['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1f1489){const _0x549707=this['editor'],_0x57adc3=new _0x1f1489(_0x549707['locale']),_0x3f8c5f=_0x549707['commands']['get']('addCommentThread');return _0x57adc3['set']({'label':N(_0x549707['locale'],'Comment'),'icon':_0x86f3df}),_0x57adc3['bind']('isEnabled')['to'](_0x3f8c5f,'isEnabled',_0x3f8c5f,'hasContent',(_0xf7abac,_0x343815)=>_0xf7abac&&_0x343815),this['listenTo'](_0x57adc3,'execute',()=>{_0x3f8c5f['execute']();}),_0x57adc3;}}class i extends _0x296061{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x504a0d){super(_0x504a0d),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x115cb0,_0x309f5c,_0x642e19)=>{_0x642e19?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x447858,_0x209c0f]of this['editor']['commands'])_0x209c0f['affectsData']&&'addCommentThread'!==_0x447858&&_0x209c0f['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1b4b76=this['editor']['editing']['view']['document'];this['listenTo'](_0x1b4b76,'cut',_0x3fb8ad=>_0x3fb8ad['stop'](),{'priority':'highest'}),this['listenTo'](_0x1b4b76,'clipboardInput',_0xc9221c=>_0xc9221c['stop'](),{'priority':'highest'}),this['listenTo'](_0x1b4b76,'delete',_0x5a526d=>_0x5a526d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3044b4,_0x395630]of this['editor']['commands'])_0x395630['affectsData']&&'addCommentThread'!==_0x3044b4&&_0x395630['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x5da752{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x191b52){super(_0x191b52),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x38c2ff=this['context']['plugins']['get'](y);this['listenTo'](_0x38c2ff,'_activateAnnotation',(_0x29fbab,_0x3eb72a)=>{for(const _0x24baa0 of this['activeUIs']){const _0x1e0d0c=this['_uis']['get'](_0x24baa0);(0x0,this['uisData']['get'](_0x24baa0)['filter'])(_0x3eb72a)&&_0x1e0d0c['setActiveAnnotation'](_0x3eb72a);}}),this['listenTo'](_0x38c2ff,'_deactivateAllAnnotations',()=>{for(const _0x361163 of this['activeUIs']){this['_uis']['get'](_0x361163)['setActiveAnnotation'](null);}}),this['listenTo'](_0x38c2ff['_visibleAnnotations'],'add',(_0x4747ab,_0x21e926)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x21e926);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x52a380){return this['activeUIs']['has'](_0x52a380);}['activate'](_0x4bfbee,_0x72ad77=this['defaultFilter']){const _0x2a67e4=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x4bfbee))throw new _0x3593cf('annotationsuis-missing-ui',this,{'uiName':_0x4bfbee});this['isActive'](_0x4bfbee)&&this['deactivate'](_0x4bfbee),this['activeUIs']['add'](_0x4bfbee);const _0x1d43d0=new S();v({'source':_0x2a67e4['_visibleAnnotations'],'target':_0x1d43d0,'filter':_0x72ad77}),this['uisData']['set'](_0x4bfbee,{'collection':_0x1d43d0,'filter':_0x72ad77});const _0x1bddd1=this['_uis']['get'](_0x4bfbee);_0x1bddd1['attach'](_0x1d43d0),this['listenTo'](_0x1bddd1,'change:activeAnnotation',(_0x359e37,_0x2a5b7f,_0x5bb20e,_0x38f0ca)=>{_0x38f0ca&&_0x2a67e4['_removeActiveAnnotation'](_0x38f0ca),_0x5bb20e&&_0x2a67e4['_addActiveAnnotation'](_0x5bb20e);});}['deactivate'](_0x13d46b){if(this['activeUIs']['delete'](_0x13d46b),!this['_uis']['has'](_0x13d46b))throw new _0x3593cf('annotationsuis-missing-ui',this,{'uiName':_0x13d46b});const _0x3c573b=this['_uis']['get'](_0x13d46b);_0x3c573b['detach'](),this['stopListening'](_0x3c573b),this['uisData']['get'](_0x13d46b)['collection']['destroy'](),this['uisData']['delete'](_0x13d46b);}['switchTo'](_0x2aa435){if(!this['_uis']['has'](_0x2aa435))throw new _0x3593cf('annotationsuis-missing-ui',this,{'uiName':_0x2aa435});const _0x2c0ece=this['context']['plugins']['get'](y),_0x1c0363=Array['from'](_0x2c0ece['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2aa435);const _0x3d50b3=this['_uis']['get'](_0x2aa435);_0x3d50b3['setActiveAnnotation'](_0x1c0363),_0x3d50b3['_setSelectedAnnotations']&&_0x1c0363&&_0x3d50b3['_setSelectedAnnotations']([_0x1c0363]);}['deactivateAll'](){for(const _0x43185c of this['activeUIs'])this['deactivate'](_0x43185c);}['register'](_0x48b7c2,_0x4b7ba6){if(this['_uis']['has'](_0x48b7c2))throw new _0x3593cf('annotationsuis-register-already-registered');if('function'!=typeof _0x4b7ba6['attach']||'function'!=typeof _0x4b7ba6['detach']||'function'!=typeof _0x4b7ba6['setActiveAnnotation'])throw new _0x3593cf('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x48b7c2,_0x4b7ba6);}['refilterAnnotations'](){const _0x9c7161=this['context']['plugins']['get'](y)['collection'],_0x3a88ea=new Map(),_0x5b9bbf=Array['from'](this['activeUIs']);for(const _0x2bd520 of this['activeUIs']){const _0x1fd3a5=this['uisData']['get'](_0x2bd520)['collection'];for(const _0x4e41e8 of _0x1fd3a5)_0x3a88ea['set'](_0x4e41e8,_0x2bd520);}for(const _0x3761ef of _0x9c7161){const _0x10368b=_0x3a88ea['get'](_0x3761ef);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3761ef);const _0x3537ff=_0x5b9bbf['find'](_0x381cf5=>this['uisData']['get'](_0x381cf5)['filter'](_0x3761ef));_0x10368b!==_0x3537ff&&(_0x10368b&&this['uisData']['get'](_0x10368b)['collection']['remove'](_0x3761ef),_0x3537ff&&this['uisData']['get'](_0x3537ff)['collection']['add'](_0x3761ef));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3188d8){const _0x116761=[];for(const _0x5869aa of this['activeUIs']){(0x0,this['uisData']['get'](_0x5869aa)['filter'])(_0x3188d8)&&_0x116761['push'](_0x5869aa);}if(_0x116761['length']>0x1)throw new _0x3593cf('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x116761,'annotationType':_0x3188d8['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x34cbfd){super(_0x34cbfd);const _0x36d6fb=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 _0xadc067(),this['focusCycler']=new _0x369a14({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x36d6fb['to']('class')],'style':{'minHeight':_0x36d6fb['to']('minHeight',_0x251aab=>'number'==typeof _0x251aab?_i(_0x251aab+0xa):null)},'dir':_0x34cbfd['uiLanguageDirection'],'role':'application','aria-label':N(_0x34cbfd,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x34cbfd,'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',_0x1a6caa=>{this['_updateItemPositionInFocusables'](_0x1a6caa['source']);}),this['list']['forEach'](_0xb6234=>{this['focusTracker']['add'](_0xb6234['element']),this['_updateItemPositionInFocusables'](_0xb6234);}),this['list']['on']('change',(_0x31e43e,_0x5131e3)=>{for(const _0x174225 of _0x5131e3['removed'])this['focusTracker']['remove'](_0x174225['element']),this['focusables']['remove'](_0x174225);for(const _0x3d6e56 of _0x5131e3['added'])this['focusTracker']['add'](_0x3d6e56['element']),this['_updateItemPositionInFocusables'](_0x3d6e56);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x4502f4){const _0x248ad0=this['focusables']['getIndex'](_0x4502f4);let _0x355d04,_0x28bbcc;for(const _0x54b4d3 of this['focusables'])if(_0x4502f4['top']<_0x54b4d3['top']){_0x355d04=_0x54b4d3;break;}if(_0x28bbcc=_0x355d04?this['focusables']['getIndex'](_0x355d04):this['focusables']['length'],-0x1!==_0x248ad0){if(_0x248ad0===_0x28bbcc-0x1)return;this['focusables']['remove'](_0x4502f4),_0x28bbcc=_0x355d04?this['focusables']['getIndex'](_0x355d04):this['focusables']['length'];}this['focusables']['add'](_0x4502f4,_0x28bbcc);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x56c4b9){super(_0x56c4b9),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x41b7af,_0x14b1fa)=>_0x41b7af+_0x14b1fa),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x58888c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x58888c['to']('isAnimationDisabled',_0xf48454=>_0xf48454?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x58888c['to']('top',_0x5d904e=>Ot(_0x5d904e))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3f64f3=this['element']['clientHeight'];_0x3f64f3&&(this['height']=_0x3f64f3);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x5da752{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x45bee9){super(_0x45bee9),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 _0x58f6a4=this['context']['config']['get']('sidebar.container');_0x58f6a4&&this['setContainer'](_0x58f6a4);}['setContainer'](_0x109bb9){if(!g(_0x109bb9))throw new _0x3593cf('sidebar-setcontainer-invalid-element');this['container']=_0x109bb9;}['_attachToContainer']({viewClass:_0x462cd0='',spaceBetweenItems:_0x1aa116=0x19}={}){if(!g(this['container']))throw new _0x3593cf('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x462cd0,this['_spaceBetweenItems']=_0x1aa116;}['rearrange']({removedAnnotation:_0x15bdc5,previousAnnotation:_0x33adc3,nextAnnotation:_0x3f0369}){const _0x2b337d=this['getSidebarItemView'](_0x15bdc5);this['view']['list']['remove'](_0x2b337d),this['_destroySidebarItemView'](_0x15bdc5),_0x33adc3&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x33adc3)),_0x3f0369&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3f0369)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1855c0,activatedAnnotation:_0x12acdc,disableAnimationOnActivatedAnnotation:_0x5a1b0b}){if(this['_activeAnnotation']=_0x12acdc,_0x1855c0){_0x1855c0['isActive']=!0x1;const _0x155700=this['getSidebarItemView'](_0x1855c0);_0x155700&&_0x5a1b0b&&(_0x155700['isAnimationDisabled']=!0x1);}if(_0x12acdc){const _0x47efa7=this['getSidebarItemView'](_0x12acdc);_0x47efa7&&(_0x12acdc['isActive']=!0x0,_0x5a1b0b&&(_0x47efa7['isAnimationDisabled']=!0x0,_0x47efa7['top']+=0x1),this['_alignToTargetRect'](_0x47efa7));}}['_detachFromContainer'](_0x11df20){if(this['view']['element']['remove'](),_0x11df20){for(const _0x300f3f of _0x11df20)this['_destroySidebarItemView'](_0x300f3f);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3d0793,_0xed457b){_0xed457b||(_0xed457b=_0x3d0793['view']);const _0x14c919=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x14c919,_0x3d0793),this['_annotationToSidebarItemView']['set'](_0x3d0793,_0x14c919),_0x14c919['content']['add'](_0xed457b),this['listenTo'](_0x3d0793['view'],'change:targetRect',(_0x4c9c3a,_0x43a081,_0x45b7c5)=>{const _0x2cefaf=this['_getTargetTop'](_0x3d0793,_0x45b7c5);_0x14c919['_targetTop']!=_0x2cefaf&&(_0x14c919['_targetTop']=_0x2cefaf,this['_setItemTop'](_0x14c919,_0x2cefaf));}),this['listenTo'](_0x14c919,'change:top',()=>{this['_recalculate'](_0x14c919,'top');}),this['listenTo'](_0x14c919,'change:bottom',()=>{this['_recalculate'](_0x14c919,'bottom');}),this['_alignToTargetRect'](_0x14c919);const _0x51b46f=this['_getItemBefore'](_0x14c919);if(_0x51b46f)this['_alignAfterItem'](_0x51b46f,_0x14c919)||this['_alignToTargetRect'](_0x14c919);else this['_alignToTargetRect'](_0x14c919);return this['_updateLastItem'](),this['view']['list']['add'](_0x14c919),_0x14c919;}['_alignForTopChange'](_0x55fb0b){if(!_0x55fb0b['content']['length'])return;const _0x20b9bd=this['_getItemBefore'](_0x55fb0b);if(!_0x20b9bd)return;const _0x1f0ecf=this['_sidebarItemViewToAnnotation']['get'](_0x20b9bd),_0x4260e2=this['_activeAnnotation'];_0x4260e2&&_0x4260e2===_0x1f0ecf?this['_alignAfterItem'](_0x20b9bd,_0x55fb0b):this['_alignBeforeItem'](_0x55fb0b,_0x20b9bd);}['_alignForBottomChange'](_0x3ec723){if(!_0x3ec723['content']['length'])return;const _0x4062f9=this['_getItemAfter'](_0x3ec723);if(!_0x4062f9)return;const _0x539a1d=this['_sidebarItemViewToAnnotation']['get'](_0x4062f9),_0x31e3e1=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3a7c12=this['_activeAnnotation'];_0x3a7c12&&_0x3a7c12===_0x539a1d&&_0x31e3e1?(this['_alignBeforeItem'](_0x4062f9,_0x3ec723),this['_alignAfterItem'](_0x3ec723,_0x4062f9)):_0x3a7c12&&_0x3a7c12===_0x539a1d?this['_alignBeforeItem'](_0x4062f9,_0x3ec723):this['_alignAfterItem'](_0x3ec723,_0x4062f9);}['_recalculate'](_0x53e4c3,_0x3c527d){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x225145,changedProp:_0x20b9e7}of this['_recalculateBuffer'])'top'===_0x20b9e7?this['_alignForTopChange'](_0x225145):this['_alignForBottomChange'](_0x225145);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x53e4c3,'changedProp':_0x3c527d});}['getSidebarItemView'](_0x3085cd){return this['_annotationToSidebarItemView']['get'](_0x3085cd);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x546839){const _0x2943f5=this['getSidebarItemView'](_0x546839);this['stopListening'](_0x2943f5),this['stopListening'](_0x546839['view']),_0x2943f5['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x546839),this['_sidebarItemViewToAnnotation']['delete'](_0x2943f5);}['_createSidebarView'](){const _0x32ca51=new H(this['context']['locale']);return _0x32ca51['render'](),this['on']('change:_lastItem',(_0x57a8d7,_0x1a44e6,_0x46fc16,_0x4e0dca)=>{_0x4e0dca&&_0x32ca51['unbind']('minHeight'),_0x46fc16?_0x32ca51['bind']('minHeight')['to'](_0x46fc16,'bottom'):_0x32ca51['minHeight']=null;}),_0x32ca51;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x161db2){const _0x3f31ca=this['_sidebarItemViewToAnnotation']['get'](_0x161db2),_0x50be57=_0x3f31ca&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3f31ca)-0x1);return _0x50be57&&this['getSidebarItemView'](_0x50be57)||null;}['_getItemAfter'](_0x70498e){const _0x16eca3=this['_sidebarItemViewToAnnotation']['get'](_0x70498e),_0x4894ed=_0x16eca3&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x16eca3)+0x1);return _0x4894ed&&this['getSidebarItemView'](_0x4894ed)||null;}['_alignBeforeItem'](_0x423130,_0x4a1e1b){_0x423130['updateHeight']();const _0x4feff9=G(_0x4a1e1b['bottom']+this['_spaceBetweenItems'],_0x423130['top']);return!!_0x4feff9&&(this['_setItemTop'](_0x4a1e1b,_0x4a1e1b['top']-_0x4feff9),!0x0);}['_alignAfterItem'](_0x4419a4,_0x4fd262){_0x4419a4['updateHeight']();const _0x4ddc93=G(_0x4419a4['bottom']+this['_spaceBetweenItems'],_0x4fd262['top']);return!!_0x4ddc93&&(this['_setItemTop'](_0x4fd262,_0x4fd262['top']+_0x4ddc93,!0x1),!0x0);}['_alignToTargetRect'](_0x2ae44c){const _0x1daf58=this['_sidebarItemViewToAnnotation']['get'](_0x2ae44c);if(!_0x1daf58||!_0x1daf58['target']||!_0x1daf58['targetRect'])return;const _0x2a40e5=this['_getTargetTop'](_0x1daf58,_0x1daf58['targetRect']);this['_setItemTop'](_0x2ae44c,_0x2a40e5);}['_getTargetTop'](_0x3cb458,_0x302169){if(null===_0x302169)return 0x0;if(_0x3cb458['target']instanceof _0x2cf657)return _0x302169['top'];{const _0x1c5103=new _0x2cf657(this['view']['element'])['top'];return _0x302169['top']-_0x1c5103;}}['_setItemTop'](_0x81d84,_0x6b28df,_0x3a7dc6=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x3a7dc6&&(_0x6b28df=Math['max'](_0x6b28df,this['_getMaxAvailableTop'](_0x81d84))),_0x81d84['top']=_0x6b28df;}['_getMaxAvailableTop'](_0x5890fb){let _0x39ccf0=this['_getItemBefore'](_0x5890fb),_0x5a7963=0x0;for(;_0x39ccf0;)_0x39ccf0['updateHeight'](),_0x5a7963+=this['_spaceBetweenItems']+_0x39ccf0['height'],_0x39ccf0=this['_getItemBefore'](_0x39ccf0);return _0x5a7963;}}function G(_0x441b6b,_0xfb2cb0){return Math['max'](_0x441b6b-_0xfb2cb0,0x0);}function g(_0x3f4302){return null!==_0x3f4302&&'object'==typeof _0x3f4302&&0x1===_0x3f4302['nodeType'];}class e extends _0x5da752{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x41d8be){super(_0x41d8be),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x52a82c(),this['_refreshPositioningDebounced']=_0x1a90a8(()=>{_0x41d8be['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x241c25=this['context']['plugins']['get'](j),_0x1c3462=this['context']['plugins']['get'](z);_0x241c25['register']('wideSidebar',this),_0x1c3462['container']&&_0x241c25['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3bda8a){if(_0x3bda8a===this['activeAnnotation'])return;const _0x381efd=this['context']['plugins']['get'](z);_0x381efd['_activeAnnotation']=_0x3bda8a;const _0x3c4e17=this['activeAnnotation'];_0x381efd['refresh']({'blurredAnnotation':_0x3c4e17,'activatedAnnotation':_0x3bda8a}),this['activeAnnotation']=_0x3bda8a;}['attach'](_0x55bb8f){this['annotations']=_0x55bb8f;const _0x446383=this['context']['plugins']['get'](z);if(_0x446383['_annotations']=_0x55bb8f,this['isAttached'])throw new _0x3593cf('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x446383,'set:container',()=>{this['detach'](),this['listenTo'](_0x446383,'change:container',_0x1b6b66=>{_0x1b6b66['off'](),this['attach'](_0x55bb8f);});}),_0x446383['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2975e9=_0x466ca2=>{_0x466ca2['updateTargetRect'](),_0x446383['addAnnotation'](_0x466ca2);};for(const _0x2f952d of _0x55bb8f)_0x2975e9(_0x2f952d);this['listenTo'](_0x55bb8f,'add',(_0x1bdab1,_0x1e86c6)=>{_0x2975e9(_0x1e86c6);}),this['listenTo'](_0x55bb8f,'remove',(_0x46af5d,_0x1fde59,_0x2cae30)=>{_0x446383['rearrange']({'removedAnnotation':_0x1fde59,'previousAnnotation':_0x55bb8f['get'](_0x2cae30-0x1),'nextAnnotation':_0x55bb8f['get'](_0x2cae30+0x1)}),_0x1fde59===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x55bb8f,'focus',(_0x71ec7f,_0x55d068)=>{this['setActiveAnnotation'](_0x55d068);}),this['listenTo'](_0x55bb8f,'blur',()=>{this['setActiveAnnotation'](null);});const _0x32a013=this['context']instanceof _0x345514?this['context']['editors']:new _0x52a82c([this['context']]);for(const _0x558e32 of _0x32a013)this['_integrateWithEditorAnnotations'](_0x558e32);this['listenTo'](_0x32a013,'add',(_0x500781,_0x3e9d3f)=>{this['listenTo'](_0x3e9d3f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3e9d3f);});}),this['listenTo'](_0x32a013,'remove',(_0x2087a9,_0x352e4c)=>{_0x352e4c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x352e4c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3593cf('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x31c241=this['context']['plugins']['get'](z);_0x31c241['_detachFromContainer'](this['annotations']),this['stopListening'](_0x31c241),this['stopListening'](this['annotations']),this['context']instanceof _0x345514&&this['stopListening'](this['context']['editors']);for(const _0x39e41b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x39e41b);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1fa9e8){if(!_0x1fa9e8['plugins']['has']('EditorAnnotations'))return;const _0x3a18ed=_0x1fa9e8['plugins']['get']('EditorAnnotations'),_0x446ab8=()=>{const _0x5ad069=_0x3a18ed['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x5ad069[0x0]||null);};this['listenTo'](_0x3a18ed,'refresh',_0x446ab8),this['listenTo'](_0x3a18ed,'blur',(_0x5355ba,{isAnnotationTracked:_0x3e7495})=>{this['activeAnnotation']&&_0x3e7495(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3a18ed,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5a9e2f=>{_0x3a18ed['hasDomSelection']()&&(_0x446ab8(),_0x5a9e2f['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3a18ed);}['_destroyEditorAnnotationsIntegration'](_0x91cbe0){this['stopListening'](_0x91cbe0),this['_editorAnnotations']['remove'](_0x91cbe0);}}class C extends _0x4c5034{['counterView'];constructor(_0x103816){super(_0x103816);const _0x234973=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x576358,_0x1ebd8c)=>_0x576358?'...':_0x1ebd8c['toString']()),this['set']('annotationType',''),this['icon']=_0x86f3df,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x234973['to']('annotationType',_0x124652=>'ck-annotation-counter__badge--'+_0x124652),_0x234973['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x234973['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x5da752{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b63bf){super(_0x1b63bf),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x33fa4a())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x52a82c(),this['_refreshPositioningDebounced']=_0x1a90a8(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x171eb1(this['context']['locale']),this['balloonPanelView']=new _0x5b0488(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5ad710){this['annotations']=_0x5ad710;const _0x295f8f=this['context']['plugins']['get'](z),_0x2b1a3c=this['balloonPanelView'];if(_0x295f8f['_annotations']=_0x5ad710,this['isAttached'])throw new _0x3593cf('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x295f8f,'set:container',()=>{this['detach'](),this['listenTo'](_0x295f8f,'change:container',_0x417220=>{_0x417220['off'](),this['attach'](_0x5ad710);});}),_0x295f8f['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2f2840=_0x1400f5=>{const _0x3ca356=new C(this['context']['locale']);_0x295f8f['addAnnotation'](_0x1400f5,_0x3ca356),this['_annotationToNarrowView']['set'](_0x1400f5,_0x3ca356),_0x3ca356['bind']('isDirty','annotationType','number')['to'](_0x1400f5['view'],'isDirty','type','length'),_0x3ca356['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2b1a3c['content']['first']!==_0x1400f5['view']?(this['_showBalloon'](_0x1400f5),_0x1400f5['view']['element']['focus'](),this['setActiveAnnotation'](_0x1400f5)):this['setActiveAnnotation'](null);});};for(const _0x3d3968 of _0x5ad710)_0x2f2840(_0x3d3968);this['listenTo'](_0x5ad710,'add',(_0xf349d7,_0x44a98f)=>{_0x2f2840(_0x44a98f);}),this['listenTo'](_0x5ad710,'remove',(_0x30803c,_0x56d230,_0x2eb7a4)=>{this['_annotationToNarrowView']['get'](_0x56d230)['destroy'](),this['_annotationToNarrowView']['delete'](_0x56d230),_0x295f8f['rearrange']({'removedAnnotation':_0x56d230,'previousAnnotation':_0x5ad710['get'](_0x2eb7a4-0x1),'nextAnnotation':_0x5ad710['get'](_0x2eb7a4+0x1)}),_0x56d230===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5ad710,'focus',(_0x22d0eb,_0x1e4af5)=>{this['setActiveAnnotation'](_0x1e4af5);}),this['listenTo'](_0x5ad710,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3580b0,_0xb72392)=>{_0xb72392['keyCode']===_0x324c4d['esc']&&_0x2b1a3c['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2b1a3c['content']['first']),this['_hideBalloon'](),_0xb72392['stopPropagation'](),_0xb72392['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x53229b,_0x21ae9b)=>{const _0x3cf237=_0x21ae9b['target'];_0x2b1a3c['isVisible']&&_0x2b1a3c['element']['contains'](_0x3cf237)||_0x295f8f['view']['element']['contains'](_0x3cf237)||_0x53229b['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x5da090=>_0x5da090['contains'](_0x3cf237))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x42e866=this['context']instanceof _0x345514?this['context']['editors']:new _0x52a82c([this['context']]);for(const _0x51ac55 of _0x42e866)this['_integrateWithEditorAnnotations'](_0x51ac55);this['listenTo'](_0x42e866,'add',(_0x148195,_0x4c3e45)=>{this['listenTo'](_0x4c3e45,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4c3e45);});}),this['listenTo'](_0x42e866,'remove',(_0x359a43,_0x39eb5f)=>{_0x39eb5f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x39eb5f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3b23ac){if(_0x3b23ac===this['activeAnnotation'])return;const _0x35876a=this['context']['plugins']['get'](z);if(_0x35876a['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3b23ac,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3b23ac)_0x35876a['getSidebarItemView'](_0x3b23ac)?this['_showBalloon'](_0x3b23ac):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3b23ac;}['detach'](){if(!this['isAttached'])throw new _0x3593cf('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xb6fa7c=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x28c741=>_0x28c741['destroy']()),this['_annotationToNarrowView']['clear'](),_0xb6fa7c['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x345514&&this['stopListening'](this['context']['editors']);for(const _0x79f2a8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x79f2a8);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'](_0x14e3d7){if(!_0x14e3d7['plugins']['has']('EditorAnnotations'))return;const _0x44aad0=_0x14e3d7['plugins']['get']('EditorAnnotations'),_0x5e3411=this['context']['plugins']['get'](z),_0x28b2a5=this['annotations'],_0x5343e9=this['balloonPanelView'],_0x21a8df=()=>{const _0xa97dc1=_0x44aad0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xa97dc1),this['setActiveAnnotation'](_0xa97dc1[0x0]||null);};this['listenTo'](_0x44aad0,'refresh',_0x21a8df),this['listenTo'](_0x44aad0,'blur',(_0x5701eb,{isAnnotationTracked:_0x3d50c0})=>{this['activeAnnotation']&&_0x3d50c0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x44aad0,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x28b2a5,'blur',_0x39dc67=>{_0x44aad0['hasDomSelection']()&&_0x39dc67['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x311bf0,_0x128588)=>{const _0x27e015=_0x128588['target'];_0x5343e9['isVisible']&&_0x5343e9['element']['contains'](_0x27e015)||_0x5e3411['view']['element']['contains'](_0x27e015)||this['activeAnnotation']&&_0x44aad0['hasDomSelection']()&&(_0x21a8df(),_0x311bf0['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x44aad0);}['_destroyEditorAnnotationsIntegration'](_0x58059d){_0x58059d&&(this['stopListening'](_0x58059d),this['_editorAnnotations']['remove'](_0x58059d));}['_setSelectedAnnotations'](_0x151ed4){for(const _0x1b3fee of this['_selectedAnnotations'])_0x151ed4['includes'](_0x1b3fee)||this['_manuallyClosedAnnotationViews']['delete'](_0x1b3fee['view']);this['_selectedAnnotations']=_0x151ed4;}['_refreshPositioning'](){const _0x2235d0=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x2235d0['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x609eb7){if(this['_manuallyClosedAnnotationViews']['has'](_0x609eb7['view']))return;const _0x5382f9=this['balloonPanelView']['content']['first'];_0x5382f9!==_0x609eb7['view']?(_0x5382f9&&this['_detachListeners'](_0x5382f9),this['_attachListeners'](_0x609eb7['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x609eb7['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4e2633=this['balloonPanelView']['content']['first'],_0x3a2453=_0x4e2633&&this['annotations']['getByView'](_0x4e2633);if(!_0x3a2453||!this['_annotationToNarrowView']['has'](_0x3a2453))return;const _0x3009a6=this['_annotationToNarrowView']['get'](_0x3a2453)['element'],_0x2817ed=(function(){const _0x4443c0=_0x5b0488['defaultPositions'];return[_0x4443c0['southArrowNorthEast'],_0x4443c0['northArrowSouthEast'],_0x4443c0['southArrowNorth'],_0x4443c0['northArrowSouth'],_0x4443c0['southArrowNorthWest'],_0x4443c0['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3009a6,'positions':_0x2817ed});}['_hideBalloon'](){const _0x52a15a=this['balloonPanelView'],_0x36e478=_0x52a15a['content']['first'];_0x36e478&&(this['_detachListeners'](_0x36e478),_0x52a15a['unpin'](),_0x52a15a['content']['clear']());}['_attachListeners'](_0x18d144){this['listenTo'](_0x18d144,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x18d144,'Esc',(_0x175da0,_0xb0b1d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x18d144),this['_hideBalloon'](),_0xb0b1d();});}['_detachListeners'](_0x3715c2){this['stopListening'](_0x3715c2);}}class c extends _0x296061{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x4ba0df,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5c87c7){super(_0x5c87c7),_0x5c87c7['editing']['view']['addObserver'](_0x1e4159),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5c87c7['plugins']['get'](_0x4ba0df),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x1a90a8(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x5d4026=this['editor']['plugins']['get'](j);_0x5d4026['context']===this['editor']&&(_0x5d4026['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x439904,_0x55239e)=>{const _0x361608=this['_balloon'];if(this['isAttached']&&_0x361608['visibleView']){const _0x3bdfab=this['annotations']['getByView'](_0x361608['visibleView']);_0x3bdfab&&this['_closeAnnotation'](_0x3bdfab),_0x55239e();}}));}['afterInit'](){const _0x41c227=this['editor']['plugins']['get'](j);_0x41c227['context']===this['editor']&&(_0x41c227['hasActive']()||_0x41c227['switchTo']('inline'));}['setActiveAnnotation'](_0x5621bf){_0x5621bf!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5621bf&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5621bf)&&this['_addAnnotationToBalloon'](_0x5621bf,!0x0),_0x5621bf['isActive']=!0x0),_0x5621bf||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5621bf);}['attach'](_0x271880){this['annotations']=_0x271880;const _0x50fee5=this['editor']['plugins']['get'](j),_0x4dfadc=this['_balloon'];if(this['isAttached'])throw new _0x3593cf('inlineannotations-attach-already-attached',this);if(_0x50fee5['context']!==this['editor'])throw new _0x3593cf('inlineannotations-not-allowed-with-context',this);const _0x582682=this['editor']['plugins']['get'](b);this['listenTo'](_0x582682,'refresh',()=>{const _0x397449=_0x582682['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x220c79,_0x58a96d;!this['_forceRefresh']&&(_0x220c79=_0x397449,_0x58a96d=this['_selectedAnnotations'],_0x220c79['length']===_0x58a96d['length']&&_0x220c79['every'](_0x530397=>_0x58a96d['includes'](_0x530397)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x397449),this['setActiveAnnotation'](_0x397449[0x0]||null));}),this['listenTo'](_0x582682,'blur',(_0x4464c5,{isAnnotationTracked:_0x44ae0b})=>{this['activeAnnotation']&&_0x44ae0b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x582682,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2fde29,_0x18942a,_0x786803)=>{_0x786803||this['setActiveAnnotation'](null);}),this['listenTo'](_0x271880,'remove',(_0x181ffd,_0x1401ed)=>{this['_removeAnnotationFromBalloon'](_0x1401ed),_0x1401ed===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4dfadc,'change:visibleView',(_0x29d92c,_0x40397b,_0x5a79cf,_0x2c96db)=>{_0x2c96db&&this['stopListening'](_0x2c96db);const _0x483726=_0x271880['getByView'](_0x5a79cf);_0x5a79cf&&_0x483726&&(this['listenTo'](_0x5a79cf,'change:height',()=>{_0x4dfadc['updatePosition']();}),this['listenTo'](_0x5a79cf,'Esc',()=>{this['_closeAnnotation'](_0x483726),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x483726&&this['setActiveAnnotation'](_0x483726));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4dfadc['visibleView']&&(_0x271880['getByView'](_0x4dfadc['visibleView'])&&_0x4dfadc['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 _0x3593cf('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x269f73 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x269f73);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x20acf1){for(const _0x1bdd4f of this['_selectedAnnotations'])_0x20acf1['includes'](_0x1bdd4f)||this['_manuallyClosed']['delete'](_0x1bdd4f);for(const _0xbf618e of this['annotations'])_0x20acf1['includes'](_0xbf618e)||this['_removeAnnotationFromBalloon'](_0xbf618e);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x30ec7a of _0x20acf1)this['_addAnnotationToBalloon'](_0x30ec7a);}this['_selectedAnnotations']=_0x20acf1;}['_addAnnotationToBalloon'](_0x4f2a0f,_0x6f5ff5=!0x1){this['_manuallyClosed']['has'](_0x4f2a0f)||(this['_addedAnnotations']['has'](_0x4f2a0f)||this['_balloon']['hasView'](_0x4f2a0f['view'])||(this['_addedAnnotations']['add'](_0x4f2a0f),this['_balloon']['add']({'stackId':_0x4f2a0f['view']['id'],'view':_0x4f2a0f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4f2a0f)}})),_0x6f5ff5&&this['_balloon']['showStack'](_0x4f2a0f['view']['id']));}['_getBalloonTargetForAnnotation'](_0x49965a){const _0x450540=_0x49965a['target'],_0x153849=this['editor']['editing']['view'],_0x58712b=_0x153849['document']['selection']['getFirstRange'](),_0x34fd60=_0x153849['domConverter']['viewRangeToDom'](_0x58712b);if(_0x34fd60['collapse'](!0x0),_0x450540){if(_0x450540 instanceof _0x2cf657)return _0x450540;let _0x11d554=[];for(const _0x216171 of _0x450540)_0x11d554['push'](...F(_0x216171['getClientRects']()));_0x11d554=function(_0x17ddd0){const _0x4dda09=[];let _0xde33b3=_0x17ddd0[0x0];for(let _0x540ea6=0x1;_0x540ea6<_0x17ddd0['length'];_0x540ea6++)P(_0xde33b3,_0x17ddd0[_0x540ea6])?_0xde33b3['width']+=_0x17ddd0[_0x540ea6]['width']:(_0x4dda09['push'](_0xde33b3),_0xde33b3=_0x17ddd0[_0x540ea6]);return _0x4dda09['push'](_0xde33b3),_0x4dda09;}(_0x11d554);const _0xa9a9ba=_0x34fd60['getBoundingClientRect']();return _0x11d554['find'](_0x172679=>_0x172679['top']<=_0xa9a9ba['top']&&_0x172679['bottom']>=_0xa9a9ba['bottom']&&_0x172679['left']<=_0xa9a9ba['left']&&_0x172679['right']>=_0xa9a9ba['right'])||_0x11d554[0x0];}return _0x49965a['targetRect']||_0x34fd60;}['_removeAnnotationFromBalloon'](_0x330124){this['_addedAnnotations']['has'](_0x330124)&&this['_balloon']['hasView'](_0x330124['view'])&&(this['_addedAnnotations']['delete'](_0x330124),this['_balloon']['remove'](_0x330124['view']));}['_closeAnnotation'](_0x44fdb9){this['_manuallyClosed']['add'](_0x44fdb9),this['_removeAnnotationFromBalloon'](_0x44fdb9);}}function F(_0x5032a1){return Array['from'](_0x5032a1)['map'](DOMRect['fromRect']);}function P(_0x2e3787,_0x187454){return _0x2e3787['top']===_0x187454['top']&&_0x2e3787['bottom']===_0x187454['bottom']&&_0x2e3787['right']===_0x187454['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x534959,_0x193b64){super(_0x534959),this['set']('isEmpty',!_0x193b64['length']),this['focusTracker']=new _0xadc067(),this['_annotationViews']=_0x193b64,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x369a14({'focusables':_0x193b64,'focusTracker':this['focusTracker']}),this['listenTo'](_0x193b64,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x193b64,'remove',(_0x27526f,_0x1da285)=>{_0x1da285['isActive']&&this['focus'](),_0x193b64['length']||(this['isEmpty']=!0x0);});const _0x34928e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x534959,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x193b64},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x34928e['if']('isEmpty','ck-hidden',_0x41948e=>!_0x41948e)]},'children':[{'text':N(_0x534959,'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 _0x1e623f of this['_annotationViews'])this['focusTracker']['add'](_0x1e623f['element']);this['_annotationViews']['on']('change',(_0x5a3171,{added:_0x4271d6,removed:_0x19df9})=>{for(const _0x847d24 of _0x4271d6)this['focusTracker']['add'](_0x847d24['element']);for(const _0x43579b of _0x19df9)this['focusTracker']['remove'](_0x43579b['element']);});}}class p extends _0x5da752{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x582473){super(_0x582473),this['archivedThreads']=new _0x52a82c();}['init'](){const _0x2fafd0=this['context'],_0x22f5c3=_0x2fafd0['plugins']['get'](o),_0x442a9c=_0x2fafd0['plugins']['get'](y);this['listenTo'](_0x22f5c3,'addCommentThread',(_0x19e49a,{threadId:_0x537fc5})=>{const _0x48910c=_0x22f5c3['getCommentThread'](_0x537fc5);_0x48910c['archivedAt']&&this['archivedThreads']['add'](_0x48910c,this['_calculatePosition'](_0x48910c['archivedAt'])),this['listenTo'](_0x48910c,'change:archivedAt',(_0x1e54c3,_0x55792c,_0x1f2fd7)=>{_0x1f2fd7?this['archivedThreads']['has'](_0x48910c)||this['archivedThreads']['add'](_0x48910c,this['_calculatePosition'](_0x48910c['archivedAt'])):this['archivedThreads']['has'](_0x48910c)&&this['archivedThreads']['remove'](_0x48910c);});}),this['listenTo'](_0x22f5c3,'removeCommentThread',(_0x4c5085,{threadId:_0x1461f2})=>{const _0x530575=_0x22f5c3['getCommentThread'](_0x1461f2);this['stopListening'](_0x530575),this['archivedThreads']['has'](_0x530575)&&this['archivedThreads']['remove'](_0x530575);},{'priority':'highest'}),this['listenTo'](_0x442a9c['collection'],'focus',(_0x5afe1f,_0x13af84)=>{_0x13af84['isVisible']||(_0x13af84['isActive']=!0x0,_0x442a9c['activate'](_0x13af84));});}['_calculatePosition'](_0x1890fa){const _0x2eb339=[...this['archivedThreads']]['findIndex'](_0x501556=>_0x501556['archivedAt']<_0x1890fa);return _0x2eb339>-0x1?_0x2eb339:this['archivedThreads']['length'];}}class a extends _0x296061{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x15a9d9];}constructor(_0x28cd25){super(_0x28cd25),this['annotationViews']=new _0x2e7393(),this['_pendingThreads']=[];}['init'](){const _0x528817=this['editor'],_0x104bf3=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x528817['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4c5034,!0x0)),_0x528817['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x32fb57=this['_createCommentsArchiveButton'](_0x3e2643);return _0x32fb57['set']({'role':'menuitemcheckbox'}),_0x32fb57;});const _0xe4c19e=_0x528817['plugins']['get'](p),_0x5e3325=_0x528817['plugins']['get']('Annotations'),_0x2403dc=_0x528817['plugins']['get']('CommentsRepository');_0xe4c19e['archivedThreads']['forEach'](_0x7af49d=>{this['_handleNewThread'](_0x7af49d);}),this['listenTo'](_0xe4c19e['archivedThreads'],'add',(_0xcb7f88,_0x3c2898)=>{this['_handleNewThread'](_0x3c2898);}),this['listenTo'](_0x5e3325['collection'],'add',(_0x34a00e,_0x273b26)=>{const _0x44b0ce=this['_pendingThreads']['find'](_0x3776bb=>{const _0x326173=_0x2403dc['_threadToController']['get'](_0x3776bb);return _0x326173&&_0x273b26['innerView']===_0x326173['view'];});if(_0x44b0ce){const _0xdd4f76=this['_calculatePosition'](_0x44b0ce['archivedAt']);this['_addAnnotationToArchive'](_0x273b26,_0xdd4f76),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x44b0ce),0x1);}}),this['listenTo'](_0xe4c19e['archivedThreads'],'remove',(_0x2f2fe1,_0xb4ed2b)=>{const _0x17d460=_0x528817['config']['get']('collaboration.channelId');if(!_0x17d460||_0xb4ed2b['channelId']===_0x17d460){if(this['_pendingThreads']['includes'](_0xb4ed2b))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xb4ed2b),0x1);else{const _0x177513=_0x2403dc['_threadToController']['get'](_0xb4ed2b),_0x223de9=_0x5e3325['getByInnerView'](_0x177513['view']);this['annotationViews']['remove'](_0x223de9['view']),this['stopListening'](_0x223de9),this['stopListening'](_0x223de9['focusableElements']);}}}),this['listenTo'](_0x5e3325['collection'],'add',(_0x1f2fbd,_0x3ee829)=>{this['listenTo'](_0x3ee829,'escape',_0x104bf3);}),this['listenTo'](_0x5e3325['collection'],'remove',(_0x65b2aa,_0x210e44)=>{this['stopListening'](_0x210e44,'escape',_0x104bf3);});}['_addAnnotationToArchive'](_0x2a1839,_0x258abb){this['listenTo'](_0x2a1839,'set:isVisible',_0x45ee0d=>{_0x45ee0d['return']=!0x1,_0x45ee0d['stop']();}),this['annotationViews']['add'](_0x2a1839['view'],_0x258abb);}['_handleNewThread'](_0x3709c9){const _0x1f2f34=this['editor']['plugins']['get']('CommentsRepository'),_0x570047=this['editor']['plugins']['get']('Annotations'),_0x406d7f=this['editor']['config']['get']('collaboration.channelId');if(!_0x406d7f||_0x3709c9['channelId']===_0x406d7f){const _0x28c218=_0x1f2f34['_threadToController']['get'](_0x3709c9);if(!_0x28c218)return void this['_pendingThreads']['push'](_0x3709c9);const _0x16408a=this['_calculatePosition'](_0x3709c9['archivedAt']),_0x5bcac1=_0x570047['getByInnerView'](_0x28c218['view']);_0x5bcac1['isVisible']&&_0x570047['_visibleAnnotations']['remove'](_0x5bcac1),this['_addAnnotationToArchive'](_0x5bcac1,_0x16408a);}}['_calculatePosition'](_0x53db0f){const _0x4e455f=this['editor']['config']['get']('collaboration.channelId'),_0x2421ac=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x4de730=>_0x4de730['channelId']===_0x4e455f)['findIndex'](_0x352459=>_0x352459['archivedAt']<_0x53db0f);return _0x2421ac<0x0||_0x2421ac>this['annotationViews']['length']?this['annotationViews']['length']:_0x2421ac-0x1;}['_toggleDialog'](){const _0x5a376c=this['editor'],_0x9c1e64=_0x5a376c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x5a376c['locale'],this['annotationViews'])),'commentsArchive'===_0x9c1e64['id']?_0x9c1e64['hide']():_0x9c1e64['show']({'id':'commentsArchive','title':N(_0x5a376c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2d2656,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1d1998['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x324b6c,_0x15da3d=!0x1){const _0x4aa048=this['editor']['locale'],_0x1cfc8b=this['editor']['plugins']['get']('Dialog'),_0x45d36d=new _0x324b6c(_0x4aa048);return _0x45d36d['bind']('isEnabled')['to'](this,'isEnabled'),_0x45d36d['bind']('isOn')['to'](_0x1cfc8b,'id',_0x580d62=>'commentsArchive'===_0x580d62),_0x45d36d['set']({'label':N(_0x4aa048,'COMMENTS_ARCHIVE'),'icon':_0x2d2656,'isToggleable':!0x0}),_0x15da3d&&(_0x45d36d['tooltip']=!0x0),this['listenTo'](_0x45d36d,'execute',()=>this['_toggleDialog']()),_0x45d36d;}['_hideDialogOnAnnotationEscape']=_0x254403=>{const _0x37d2f2=_0x254403['source'];if(!this['annotationViews']['has'](_0x37d2f2['view']))return;const _0x24072c=this['editor']['plugins']['get']('Dialog');_0x24072c['isOpen']&&'commentsArchive'===_0x24072c['id']&&(_0x24072c['hide'](),_0x254403['stop']());};}class gi extends _0x296061{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|