@ckeditor/ckeditor5-comments 45.2.1-alpha.1 → 45.2.1-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +9 -9
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x221111={}){function _0x2c0d27(_0x628f55){return _0x628f55['map'](_0x28abe3=>String['fromCharCode'](_0x28abe3))['join']('');}(_0x221111=Object['assign']({},_0x221111))['plugins']||(_0x221111['plugins']=Qt['defaultPlugins']),super(_0x221111),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2c0d27([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c0d27([0x76,0x69,0x65,0x77])][_0x2c0d27([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2c0d27([0x61,0x75,0x74,0x6f]),this[_0x2c0d27([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2c0d27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2c0d27([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2c0d27([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2c0d27([0x6f,0x6b])});}['create'](){const _0x59395f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x59395f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x15d831=>{const _0x265e0b=this['model']['document']['getRoot'](),_0x2dcb45=_0x265e0b&&_0x265e0b['getChild'](_0x265e0b['childCount']-0x1);_0x15d831['setSelection'](_0x2dcb45,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xe0b2e2=this['editing']['view'],_0x20812a=_0xe0b2e2['document']['getRoot'](),_0x179231=_0x20812a['getChild'](0x0);_0x20812a['childCount']>0x1||!_0x179231||'p'!=_0x179231['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0xe0b2e2,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x179231['placeholder']=this['placeholder']),Ft({'view':_0xe0b2e2,'element':_0x179231,'keepOnFocus':!0x0}),this['placeholderElement']=_0x179231);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2563f3,_0x512a05={}){super(_0x2563f3),this['editor']=null,this['_editorConfig']=_0x512a05,this['set']('value',_0x512a05['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x2563f3,'Reply...')),this['set']('submitLabel',E(_0x2563f3,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x29f230(),this['focusCycler']=new _0x8029a4({'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',(_0x4f8761,_0x84fdcf)=>{this['cancelButtonView']['fire']('execute'),_0x84fdcf();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4b74dd,_0x1c2b4c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x1c2b4c());}),this['on']('submit',(_0x4026c9,_0x1dc56e)=>{_0x1dc56e['length']>0xfde8?(alert(E(_0x2563f3,'TOO_LONG_COMMENT_ALERT',[_0x1dc56e['length'],0xfde8])),_0x4026c9['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0xd114ff=this['editor'];this['element']['insertBefore'](_0xd114ff['ui']['element'],this['element']['firstChild']),_0xd114ff['model']['document']['on']('change',()=>this['value']=_0xd114ff['getData']()),_0xd114ff['bind']('placeholder')['to'](this),this['focusables']['add'](_0xd114ff['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x578f27){-0x1===_0x578f27?(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:_0x54de78}=this,_0x92c8f6=new _0x3f387b(_0x54de78);return _0x92c8f6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x92c8f6['withText']=!0x0,_0x92c8f6['bind']('label')['to'](this,'submitLabel'),_0x92c8f6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x92c8f6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4e7959,_0x88eea3)=>!_0x88eea3&&!!_0x4e7959['trim']()),_0x92c8f6;}['_createCancelButton'](){const {locale:_0xa300ff}=this,_0x7af1ac=new _0x3f387b(_0xa300ff);return _0x7af1ac['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x7af1ac['label']=E(_0xa300ff,'Cancel'),_0x7af1ac['withText']=!0x0,_0x7af1ac['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x7af1ac;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xe793c0=>{this['focusTracker']['add'](_0xe793c0['element']);}),this['focusables']['on']('change',(_0x33b10c,_0x22db9d)=>{for(const _0x4a3804 of Array['from'](_0x22db9d['added'])['reverse']())this['focusTracker']['add'](_0x4a3804['element']);});}}class ie extends kt{constructor(_0x140d46,_0x38a970,_0x536df1){super(_0x140d46),this['commentInputView']=new os(_0x140d46,_0x536df1),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x391159,_0x3753b7)=>_0x391159||!!_0x3753b7),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 _0x122288(_0x140d46,_0x38a970),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'](_0x5850a6){this['commentInputView']['focus'](_0x5850a6);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x449d54,_0x57db24)=>{const {submitButtonView:_0x54f36b,cancelButtonView:_0x50365e,editor:_0x25934c}=this['commentInputView'];[_0x54f36b['element'],_0x50365e['element'],_0x25934c?_0x25934c['editing']['view']['getDomRoot']():null]['filter'](_0x513661=>_0x513661)['some'](_0x2c08c2=>_0x2c08c2['contains'](_0x57db24['target']))||(this['focus'](),_0x57db24['preventDefault']());});}}class cs extends kt{constructor(_0x3a99cc){super(_0x3a99cc);const _0x51a5a7=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x51a5a7['to']('count',_0x201134=>E(_0x3a99cc,'NUMBER_OF_COMMENTS',_0x201134))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x9d6632,_0x485cad,_0x1427a5){super(_0x9d6632);const _0x3f2d4f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x485cad['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x485cad,this['_config']=_0x1427a5,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x29f230(),this['keystrokes']=new jt(),this['focusCycler']=new _0x8029a4({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4298ff=>this['commentViews']['map'](_0x142eb3=>_0x142eb3['element'])['includes'](_0x4298ff['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x9d6632),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2de9c2=>_0x2de9c2-this['_config']['maxCommentsWhenCollapsed']);for(const _0x44e37c of _0x485cad['comments'])this['_handleNewCommentModel'](_0x44e37c);this['_handleInfoComment'](),this['listenTo'](_0x485cad['comments'],'add',(_0x4d65a9,_0xd45f83)=>{const _0x17aa89=this['_calculatePosition'](_0xd45f83);this['length']++,this['_handleNewCommentModel'](_0xd45f83,_0x17aa89),this['refreshVisibleViews']();}),this['listenTo'](_0x485cad['comments'],'remove',(_0x351a85,_0x8a6039)=>{this['length']--,this['_handleRemoveCommentModel'](_0x8a6039),this['refreshVisibleViews']();}),this['listenTo'](_0x485cad,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x485cad,'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',_0x3f2d4f['if']('length','ck-hidden',_0x228142=>!_0x228142)],'aria-label':E(_0x9d6632,'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'](_0x1fbb78){-0x1===_0x1fbb78?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4f81a1 of this['commentViews'])_0x4f81a1['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x76109b,_0x4b017f){const _0x3576a0=new this['_config']['CommentView'](this['locale'],_0x76109b,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3576a0['viewUid']=_0x76109b['id'],_0x3576a0['delegate']('removeComment')['to'](this),_0x3576a0['delegate']('updateComment')['to'](this),_0x3576a0['delegate']('resolveCommentThread')['to'](this),_0x3576a0['delegate']('editorReady')['to'](this),_0x3576a0['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3576a0,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3576a0,_0x4b017f);}['_calculatePosition'](_0xef91dc){const _0x387534=this['_model']['_findOptimalIndex'](_0xef91dc);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xef91dc['authoredAt']?_0x387534-0x1:_0x387534:_0x387534-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x44abec={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x44abec,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x44abec));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x2f8e9d){const _0x3c1df9=this['commentViews']['remove'](_0x2f8e9d['id']);this['stopListening'](_0x3c1df9),_0x3c1df9['isEditMode']&&this['_updateHasDirtyComment'](),_0x3c1df9['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0xd31d58=>_0xd31d58['isEditMode']);}['_rearrangeCollapse'](){const _0x5e30fd=function(_0x31f4fc){const _0x19ed78=new _0x3eedb8();for(const _0x1c7052 of _0x31f4fc)_0x19ed78['add'](_0x1c7052);return _0x19ed78;}(this['commentViews']),_0x319efa=this['_collapsedCommentsView']['count'];for(let _0x4a9eaa=0x1;_0x4a9eaa<=_0x319efa;_0x4a9eaa++)_0x5e30fd['remove'](0x1);for(const _0x28b743 of _0x5e30fd)_0x28b743['collapse']();_0x319efa>0x0&&_0x5e30fd['add'](this['_collapsedCommentsView'],0x1),ns(_0x4d771c(Array['from'](this['visibleViews']),Array['from'](_0x5e30fd)),this['visibleViews'],_0x5e30fd);}['_rearrangeExpand'](){ns(_0x4d771c(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1ca275 of this['visibleViews'])_0x1ca275['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x3b8479=>{this['focusTracker']['add'](_0x3b8479['element']),this['keystrokes']['listenTo'](_0x3b8479['element']);}),this['commentViews']['on']('change',(_0x20afc4,_0x41b321)=>{for(const _0x6b718b of _0x41b321['removed'])this['focusTracker']['remove'](_0x6b718b['element']),this['keystrokes']['stopListening'](_0x6b718b['element']);for(const _0x40739a of Array['from'](_0x41b321['added'])['reverse']())this['focusTracker']['add'](_0x40739a['element']),this['keystrokes']['listenTo'](_0x40739a['element']);});}}function ns(_0x2842b5,_0x37a49e,_0x3c5a1e){let _0x3ff8c1=0x0;for(const _0x3b9d1e of _0x2842b5)switch(_0x3b9d1e){case'insert':_0x37a49e['add'](_0x3c5a1e['get'](_0x3ff8c1),_0x3ff8c1),_0x3ff8c1++;break;case'delete':_0x37a49e['remove'](_0x3ff8c1);break;case'equal':_0x3ff8c1++;}}class as extends kt{constructor(_0x1ff495){super(_0x1ff495);const _0x3d4199=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3d4199['to']('contextValue',_0xb5e6a8=>E(_0x1ff495,'THREAD_CONTEXT_LABEL',_0xb5e6a8)),'tabindex':-0x1},'children':[{'text':_0x3d4199['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x117071,_0x48a5f9){super(_0x117071);const _0x54e91d=this['bindTemplate'];this['_model']=_0x48a5f9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x29f230(),this['keystrokes']=new jt(),this['focusCycler']=new _0x8029a4({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xde9a75=>!!_0xde9a75),this['bind']('contextValue')['to'](this['_model'],'context',_0x5bfcfb=>_0x5bfcfb&&_0x5bfcfb['value']?this['_trimContextValue'](_0x5bfcfb['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x54e91d['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 _0x4394eb=new _0x3f387b(this['locale']);return _0x4394eb['label']=E(this['locale'],'Reopen'),_0x4394eb['tooltip']=E(this['locale'],'Reopen'),_0x4394eb['icon']=_0x2b5243,_0x4394eb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3966da=>!_0x3966da),_0x4394eb['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x588f3a,_0xe10b2f)=>_0x588f3a&&_0xe10b2f),_0x4394eb['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4394eb;}['_trimContextValue'](_0x14ecec){if(_0x14ecec['length']<0x96)return _0x14ecec;const _0x1dae7e=_0x14ecec['lastIndexOf']('\x20',0x93);return _0x14ecec['substring'](0x0,_0x1dae7e>-0x1?_0x1dae7e:0x93)+'...';}['_attachContextActions'](){const _0x177e14=this['element']['querySelector']('.ck-context'),_0x255d00=_0x177e14['querySelector']('.ck-context__value');this['listenTo'](_0x177e14,'mouseenter',()=>{_0x255d00['offsetWidth']<_0x255d00['scrollWidth']&&_0x177e14['classList']['add']('overlay');}),this['listenTo'](_0x177e14,'mouseleave',()=>{_0x177e14['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x11f958 of this['focusables'])this['focusTracker']['add'](_0x11f958['element']),this['keystrokes']['listenTo'](_0x11f958['element']);}['_createContextView'](){const _0x48b291=new as(this['locale']);return _0x48b291['bind']('contextValue')['to'](this),_0x48b291;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x17fc43,_0x219994,_0x5b6eb3,_0x54fc14){super(_0x17fc43),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x219994,this['_localUser']=_0x5b6eb3,this['_config']=_0x54fc14,this['commentThreadHeaderView']=new Xt(_0x17fc43,_0x219994),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x17fc43,E(_0x17fc43,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x17fc43,_0x219994,Object['assign']({'CommentView':this['_config']['CommentView']},_0x54fc14)),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',(_0x192362,_0x4a1783)=>_0x192362||!!_0x4a1783),this['bind']('isUnlinked')['to'](_0x219994,'unlinkedAt',_0x449889=>!!_0x449889),this['bind']('ariaLabel')['to'](this,'length',_0x430dab=>{const _0x3c0a90=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x430dab,_0x3c0a90]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x29f230(),this['keystrokes']=new jt(),this['focusCycler']=new _0x8029a4({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x19e47d=>_0x19e47d['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 _0x6dc012=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x51902c=_0x6dc012['commentInputView'];return _0x6dc012['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x51902c,'value',(_0x55597d,_0x37ea60,_0x1a4d27,_0x5532b5,_0x319b16)=>!!_0x319b16||!!_0x5532b5&&_0x1a4d27&&!_0x37ea60||_0x55597d&&_0x1a4d27&&!_0x37ea60),_0x51902c['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x177b66,_0x5a1c83,_0x1d004c)=>{let _0x4d19ff;return _0x4d19ff=_0x1d004c&&_0x5a1c83?'Reply\x20to\x20reopen\x20discussion...':_0x177b66?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x4d19ff);}),_0x51902c['bind']('submitLabel')['to'](this,'length',_0x20089f=>E(this['locale'],_0x20089f?'Reply':'Comment')),_0x51902c['on']('submit',(_0x19be7e,_0x29001b)=>{this['fire']('addComment',_0x29001b),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x51902c['on']('cancel',()=>{this['focus']();}),_0x51902c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x51902c['on']('cancel',_0x55d048=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x55d048['stop']());}),this['on']('change:isActive',(_0x101c46,_0x237d2c,_0x29b50a)=>{_0x29b50a||this['length']||_0x51902c['value']||this['fire']('removeCommentThread');}),_0x6dc012;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(
|
|
28
|
-
ti(
|
|
29
|
-
_0x434faf(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x53af5c,target:_0x44f590,type:_0x17e4c1,isVisible:_0xbb9d4d=!0x0}){super(),this['view']=_0x53af5c,this['view']['element']||this['view']['render'](),this['_type']=_0x17e4c1,this['_target']=_0x44f590,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3eedb8([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5ab584,_0x3ae0c0)=>{this['view']['focusTracker']['add'](_0x3ae0c0);}),this['focusableElements']['on']('remove',(_0x526b17,_0x106997)=>{this['view']['focusTracker']['remove'](_0x106997);}),this['set']('isVisible',_0xbb9d4d);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3d0bc9=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x3d0bc9),_0x3d0bc9;}get['targetRect'](){const _0x5ce8f9=this['target'];if(null===_0x5ce8f9)return null;if(_0x5ce8f9 instanceof _0x597a13)return _0x5ce8f9;const _0x417646=_0x5ce8f9['filter'](_0x710811=>function(_0x245798){const _0x37e980=_0x245798['offsetParent'];if(_0x37e980)return!0x0;const _0x212d3e=_0x245798['getClientRects']()['item'](0x0);return!!_0x212d3e;}(_0x710811));return 0x0===_0x417646['length']?null:new _0x597a13(_0x417646[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3fb75b){this['view']['isActive']=_0x3fb75b,this['view']['mainView']['isActive']=_0x3fb75b;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x472437){if(!(null===_0x472437||_0x472437 instanceof _0x597a13||Array['isArray'](_0x472437)&&_0x472437['every'](_0x1947e8=>li(_0x1947e8))))throw new _0x3b0292('annotation-invalid-target',null,{'target':_0x472437});}['_getNormalizedTarget'](){const _0x1a6705='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x1a6705)?[_0x1a6705]:_0x1a6705;}}function li(_0x2ca505){return null!==_0x2ca505&&'object'==typeof _0x2ca505&&'nodeType'in _0x2ca505&&0x1===_0x2ca505['nodeType'];}class _ extends _0x3eedb8{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x26a062=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x29f230(),this['_focusTracker']['on']('change:isFocused',(_0x849020,_0xe7873c,_0x174cdb)=>{_0x174cdb||this['fire']('blur');});for(const _0x151cff of _0x26a062)this['add'](_0x151cff);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x403c59){if(this['has'](_0x403c59))throw new _0x3b0292('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x403c59['innerView'],_0x403c59),this['_viewToAnnotation']['set'](_0x403c59['view'],_0x403c59);for(const _0x4c857f of _0x403c59['focusableElements'])this['_focusTracker']['add'](_0x4c857f);this['listenTo'](_0x403c59['focusableElements'],'add',(_0xa9e048,_0x1cc3b8)=>{this['_focusTracker']['add'](_0x1cc3b8);}),this['listenTo'](_0x403c59['focusableElements'],'remove',(_0x596a96,_0x15d9a8)=>{this['_focusTracker']['remove'](_0x15d9a8);}),this['listenTo'](_0x403c59['view']['focusTracker'],'change:isFocused',(_0x1ddadd,_0x17e8bb,_0x560f7c)=>{_0x560f7c&&this['fire']('focus',_0x403c59);}),_0x403c59['updateTargetRect']();const _0x11b4d4=this['_getOrderInContent'](_0x403c59['view']['targetRect']);return super['add'](_0x403c59,_0x11b4d4);}['remove'](_0x423f29){if(!this['has'](_0x423f29))throw new _0x3b0292('annotationcollection-not-existing-item',null);this['stopListening'](_0x423f29['view']['focusTracker']),this['stopListening'](_0x423f29['focusableElements']);for(const _0x19d256 of _0x423f29['focusableElements'])this['_focusTracker']['remove'](_0x19d256);return this['_viewToAnnotation']['delete'](_0x423f29['view']),this['_innerViewToAnnotation']['delete'](_0x423f29['innerView']),super['remove'](_0x423f29);}['getByInnerView'](_0x26e798){return this['_innerViewToAnnotation']['get'](_0x26e798);}['getByView'](_0x57188b){return this['_viewToAnnotation']['get'](_0x57188b);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x5cfbcc of this)_0x5cfbcc['updateTargetRect']();this['_sort']();}['_sort'](){const _0x57851d=Array['from'](this)['sort']((_0x35a32d,_0x3794e1)=>v(_0x35a32d['view']['targetRect'],_0x3794e1['view']['targetRect']));for(let _0x4581f7=_0x57851d['length']-0x1;_0x4581f7>0x0;_0x4581f7--){const _0x46e94d=_0x57851d[_0x4581f7];_0x4581f7!==this['getIndex'](_0x46e94d)&&(this['remove'](_0x46e94d),this['add'](_0x46e94d));}}['_getOrderInContent'](_0x5cd320){let _0x2b5acb=0x0;if(!_0x5cd320)return this['length'];for(const _0x8389d4 of this){const _0x275024=_0x8389d4['view']['targetRect'];if(_0x275024){if(v(_0x5cd320,_0x275024)<0x0)return _0x2b5acb;_0x2b5acb++;}}return _0x2b5acb;}}function v(_0xe0658f,_0x336e85){if(null===_0xe0658f&&null===_0x336e85)return 0x0;if(null===_0xe0658f)return-0x1;if(null===_0x336e85)return 0x1;const _0x2c7f17=_0xe0658f['top']-_0x336e85['top'];return 0x0==_0x2c7f17?_0xe0658f['left']-_0x336e85['left']:_0x2c7f17;}class O extends _0x4d0391{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x391ded){if(super(_0x391ded),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x391ded instanceof _0x53b75b){const _0x500eb2=_0x391ded['locale'];_0x391ded['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5af26d){this['collection']['add'](_0x5af26d);}['remove'](_0x37d9fa){this['collection']['remove'](_0x37d9fa),_0x37d9fa['destroy']();}['refreshVisibility'](){for(const _0x1fdd5c of this['collection'])_0x1fdd5c['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x450ada){return this['collection']['getByInnerView'](_0x450ada);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x31b0bf of this['collection'])_0x31b0bf['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x7e635b){this['fire']('_activateAnnotation',_0x7e635b);}['createAnnotation'](_0x133eb4){return new d(_0x133eb4);}['createAnnotationView'](_0x506052,_0x51313d){return new S(_0x506052,_0x51313d);}['_addActiveAnnotation'](_0x160373){const _0x959734=new Set(this['activeAnnotations']);_0x959734['add'](_0x160373),this['activeAnnotations']=_0x959734;}['_removeActiveAnnotation'](_0x477071){const _0x46d24d=new Set(this['activeAnnotations']);_0x46d24d['delete'](_0x477071),this['activeAnnotations']=_0x46d24d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1e05df=this['collection'],_0x46ae5e=this['_visibleAnnotations'];function _0x5aa12e(_0x15dd6c){const _0x3c4b46=_0x15dd6c['source'];_0x3c4b46['isVisible']&&!_0x46ae5e['has'](_0x3c4b46)?_0x46ae5e['add'](_0x3c4b46):!_0x3c4b46['isVisible']&&_0x46ae5e['has'](_0x3c4b46)&&_0x46ae5e['remove'](_0x3c4b46),_0x3c4b46['view']['focusTracker']['remove'](_0x3c4b46['view']['element']),_0x3c4b46['view']['focusTracker']['add'](_0x3c4b46['view']['element']);}this['listenTo'](_0x1e05df,'add',(_0x381f4d,_0x1d3850)=>{_0x1d3850['isVisible']&&_0x46ae5e['add'](_0x1d3850),this['listenTo'](_0x1d3850,'change:isVisible',_0x5aa12e);}),this['listenTo'](_0x1e05df,'remove',(_0x52cb3e,_0x4123de)=>{_0x46ae5e['has'](_0x4123de)&&_0x46ae5e['remove'](_0x4123de),this['stopListening'](_0x4123de,'change:isVisible',_0x5aa12e);});}['_setupEnterAnnotationKeystroke'](){const _0x2d4882=_0x287cba=>{_0x287cba['on']('ready',()=>{_0x287cba['keystrokes']['set'](_0x52545c,(_0x90847a,_0x5a20c0)=>{const _0x5c0646=_0x185237(this['activeAnnotations']['values']());_0x5c0646&&(_0x5c0646['view']['focus'](),_0x5a20c0());});});};this['context']instanceof _0x53b75b?_0x2d4882(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x57106c,_0x4aad8e)=>{_0x2d4882(_0x4aad8e);});}['_setupEscapeAnnotationHandling'](){const _0x231919=_0x25ccb4=>{const _0x5736f2=_0x25ccb4['source'],_0x9774e3=[];let _0x54d93e;if(Array['isArray'](_0x5736f2['target'])){_0x54d93e=_0x5736f2['target'][0x0],this['context']instanceof _0x53b75b?_0x9774e3['push'](this['context']):this['context']['editors']&&_0x9774e3['push'](...this['context']['editors']);for(const _0x562df8 of _0x9774e3)for(const _0x574049 of _0x562df8['editing']['view']['domRoots']['values']())if(_0x574049['contains'](_0x54d93e))return void _0x562df8['editing']['view']['focus']();_0x54d93e['focus']();}};this['listenTo'](this['collection'],'add',(_0x195136,_0x15eaf5)=>{this['listenTo'](_0x15eaf5,'escape',_0x231919,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x516791,_0x159bd1)=>{this['stopListening'](_0x159bd1,'escape',_0x231919);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4d0391{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x226edb){super(_0x226edb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x19375d=this['context']['config'];_0x19375d['define']('comments.maxCommentsWhenCollapsed',0x2),_0x19375d['define']('comments.maxThreadTotalWeight',0x1f4),_0x19375d['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x19375d['define']('comments.CommentThreadView',vt),_0x19375d['define']('comments.CommentView',gt),_0x19375d['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x25d9fa=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3fadc8,_0x1c148b)=>this['_addCommentThread'](_0x1c148b)),this['on']('submitCommentThread',(_0x29d26e,_0x1b1987)=>this['_submitCommentThread'](_0x1b1987)),this['on']('resolveCommentThread',(_0x576225,_0x28ad78)=>this['_resolveCommentThread'](_0x28ad78)),this['on']('resolveCommentThread',(_0x2b04d4,_0x5f2bea)=>this['_updateActiveAnnotation'](_0x5f2bea),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x507073,_0x2f9ee9)=>this['_reopenCommentThread'](_0x2f9ee9)),this['on']('reopenCommentThread',(_0x2517c8,_0x40342a)=>this['_updateActiveAnnotation'](_0x40342a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x390322,_0x1ec34a)=>this['_removeCommentThread'](_0x1ec34a)),this['on']('updateCommentThread',(_0x577485,_0x1f469b)=>this['_updateCommentThread'](_0x1f469b)),this['on']('updateCommentThread',(_0x479fde,_0x52fd3e)=>this['_updateActiveAnnotation'](_0x52fd3e),{'priority':'lowest'}),this['on']('addComment',(_0x6c804d,_0x43db61)=>this['_addComment'](_0x43db61)),this['on']('updateComment',(_0x4fb704,_0x3a959d)=>this['_updateComment'](_0x3a959d)),this['on']('removeComment',(_0x5ee52d,_0x3b4705)=>this['_removeComment'](_0x3b4705)),this['on']('addComment',(_0x2b3076,{threadId:_0x3ff66f,isFromAdapter:_0x2c2aba})=>{if(_0x2c2aba)return;const _0x4faee1=this['getCommentThread'](_0x3ff66f),_0x1c3b7a=_0x4faee1&&this['_threadToController']['get'](_0x4faee1);_0x1c3b7a&&_0x1c3b7a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x25d9fa,'change:activeAnnotations',(_0x533997,_0x32dd2f,_0x337976)=>{const _0x3393e4=Array['from'](_0x337976)['map'](_0x11eaaa=>this['_viewToController']['get'](_0x11eaaa['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3393e4?_0x3393e4['model']:null;});}set['adapter'](_0x3d9f17){if(this['_adapter'])throw new _0x3b0292('commentsrepository-adapter-already-set');this['_adapter']=_0x3d9f17;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3242b2=Tt,threadId:_0x8a6e23=_0x356753(),comments:_0x14022c=[],unlinkedAt:_0x350b8e=null,resolvedAt:_0xe73360=null,resolvedBy:_0x5f37e7=null,target:_0x56f101=null,context:_0x170d85=null,attributes:_0x7b88ad={},isResolvable:_0x5b888e=!0x0,isSubmitted:_0x32c216=!0x1,isFromAdapter:_0x3c2428=!0x1}={}){return this['fire'](bt('addCommentThread',_0x3242b2),{'channelId':_0x3242b2,'threadId':_0x8a6e23,'comments':_0x14022c,'unlinkedAt':_0x350b8e,'resolvedAt':_0xe73360,'resolvedBy':_0x5f37e7,'target':_0x56f101,'context':_0x170d85,'attributes':_0x7b88ad,'isFromAdapter':_0x3c2428,'isResolvable':_0x5b888e,'isSubmitted':_0x32c216}),this['getCommentThread'](_0x8a6e23);}['openNewCommentThread']({channelId:_0x5f4fea=Tt,threadId:_0x1fcd4b=_0x356753(),target:_0x473c4f,context:_0x1c9c3e=null,isResolvable:_0x294e29=!0x0}){if(this['_readOnlyChannels']['has'](_0x5f4fea)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x473c4f)throw new _0x3b0292('commentsrepository-missing-target');const _0x54f8b3=this['addCommentThread']({'channelId':_0x5f4fea,'threadId':_0x1fcd4b,'target':_0x473c4f,'context':_0x1c9c3e,'isResolvable':_0x294e29});if(!_0x54f8b3)return null;const _0x1570b7=this['_threadToController']['get'](_0x54f8b3),_0x555fc5=_0x1570b7['view']['commentThreadInputView']['commentInputView'],_0xa734a3=this['context']['plugins']['get'](O),_0x7808b1=_0xa734a3['getByInnerView'](_0x1570b7['view']);return _0xa734a3['activate'](_0x7808b1),_0x555fc5['once']('editorReady',()=>_0x555fc5['focus']()),_0x54f8b3;}['hasCommentThread'](_0x234c92){if('string'!=typeof _0x234c92)throw new _0x3b0292('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x234c92);}['updateCommentThread']({channelId:_0x56f5cc=Tt,threadId:_0x506e81,context:_0x173f92,unlinkedAt:_0x40e6e5,attributes:_0x291789,isFromAdapter:_0x58fe4c=!0x1}){return this['fire'](bt('updateCommentThread',_0x56f5cc),{'channelId':_0x56f5cc,'threadId':_0x506e81,'context':_0x173f92,'unlinkedAt':_0x40e6e5,'attributes':_0x291789,'isFromAdapter':_0x58fe4c}),this['getCommentThread'](_0x506e81);}['getCommentThread'](_0x255095){if('string'!=typeof _0x255095)throw new _0x3b0292('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x255095);}['fetchCommentThread']({channelId:_0x561423,threadId:_0x11c8bb}={}){const _0x3d62e0=this['getCommentThread'](_0x11c8bb);if(_0x3d62e0)return Promise['resolve'](_0x3d62e0);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3b0292('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x561423,'threadId':_0x11c8bb})['then'](_0x1ecaf8=>this['hasCommentThread'](_0x11c8bb)?this['getCommentThread'](_0x11c8bb):_0x1ecaf8?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x561423},_0x1ecaf8)):void 0x0)['catch'](_0x4a2413=>{throw console['error'](_0x4a2413),new _0x3b0292('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x23ae56,skipNotAttached:_0x2323b7=!0x1,skipEmpty:_0x3d8572=!0x1,toJSON:_0x262727=!0x1}={}){const _0x12eb3f=[];for(const _0x5d054a of this['_threads']['values']())_0x23ae56&&_0x5d054a['channelId']!==_0x23ae56||_0x2323b7&&!_0x5d054a['isAttached']||_0x3d8572&&0x0===_0x5d054a['length']||_0x12eb3f['push'](_0x5d054a);return _0x262727?_0x12eb3f['map'](_0x14a72d=>_0x14a72d['toJSON']()):_0x12eb3f;}['setActiveCommentThread'](_0x4c0c99){const _0x362977=this['context']['plugins']['get'](O);if(!_0x4c0c99)return void(this['activeCommentThread']&&_0x362977['deactivateAll']());const _0x5e39c9=this['getCommentThread'](_0x4c0c99);if(!_0x5e39c9)throw new _0x3b0292('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4c0c99});if(!this['_threadToController']['has'](_0x5e39c9))throw new _0x3b0292('commentsrepository-active-not-attached',null,{'threadId':_0x4c0c99});const _0x502b1b=_0x362977['getByInnerView'](this['_threadToController']['get'](_0x5e39c9)['view']);_0x362977['activate'](_0x502b1b);}['switchReadOnly'](_0x21ec62,_0x2464ed){_0x21ec62?this['_readOnlyChannels']['add'](_0x2464ed):this['_readOnlyChannels']['delete'](_0x2464ed),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x407a38){return this['_readOnlyChannels']['has'](_0x407a38)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x13665a,_0x2dada5){return new Ct(_0x13665a,_0x2dada5);}['setPermissions'](_0x14cd4a,_0x455743=Tt){this['_permissions']['set'](_0x455743,_0x14cd4a),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x39cc72=Tt){return this['_permissions']['has'](_0x39cc72)?this['_permissions']['get'](_0x39cc72):_t;}['_addCommentThread']({channelId:_0x140de0,threadId:_0x8f91e0,comments:_0x2cbf8d,unlinkedAt:_0x43ae81,resolvedAt:_0x506c09,resolvedBy:_0x1eb70d,target:_0x47302d,context:_0x2f88f9,attributes:_0x5e8bf6,isFromAdapter:_0x1419e9,isResolvable:_0x539126,isSubmitted:_0x3f7fc7}){if('string'!=typeof _0x8f91e0)throw new _0x3b0292('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x8f91e0});if(this['hasCommentThread'](_0x8f91e0))throw new _0x3b0292('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x8f91e0});const _0xcf754c=new ui(this,{'channelId':_0x140de0,'id':_0x8f91e0,'context':_0x2f88f9,'attributes':_0x5e8bf6,'unlinkedAt':_0x43ae81,'resolvedAt':_0x506c09,'resolvedBy':_0x1eb70d?this['context']['plugins']['get'](it)['getUser'](_0x1eb70d):null,'isResolvable':_0x539126,'isSubmitted':_0x3f7fc7||_0x1419e9});this['_threads']['set'](_0x8f91e0,_0xcf754c);for(const _0xf9b612 of _0x2cbf8d)_0xcf754c['_add'](this['_createNewComment']({'threadId':_0x8f91e0,..._0xf9b612}));return _0x47302d&&_0xcf754c['attachTo'](_0x47302d),_0x1419e9||!_0xcf754c['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x140de0,'threadId':_0x8f91e0});}['_submitCommentThread']({channelId:_0x3804ca,threadId:_0x4d5da5}){if(!this['hasCommentThread'](_0x4d5da5))throw new _0x3b0292('commentsrepository-missing-comment-thread',this);const _0x43e799=this['getCommentThread'](_0x4d5da5);if(_0x43e799['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4effe3,comments:_0x4ef263,resolvedAt:_0x3df856,resolvedBy:_0x3e1937,context:_0x4009af,attributes:_0x19946a}=_0x43e799,_0x59cd6f=this['context']['plugins']['get']('PendingActions'),_0x2c7140=_0x59cd6f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3804ca,'threadId':_0x4effe3,'comments':_0x4ef263['map'](_0x29d097=>_0x29d097['toJSON']()),'resolvedAt':_0x3df856,'resolvedBy':_0x3e1937?_0x3e1937['id']:_0x3e1937,'context':_0x4009af,'attributes':_0x19946a})['then'](({comments:_0x52f563})=>{_0x59cd6f['remove'](_0x2c7140);for(const _0x2468ef of _0x52f563)this['_updateComment']({'channelId':_0x3804ca,'threadId':_0x4d5da5,'commentId':_0x2468ef['commentId'],'createdAt':_0x2468ef['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3d5edc=>{throw console['error'](_0x3d5edc),new _0x3b0292('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x55edb9,target:_0x190334}){const _0x566061=this['getCommentThread'](_0x55edb9);if(!_0x566061)throw new _0x3b0292('commentsrepository-attach-missing-comment-thread',this);const _0x9d7601=this['context']['plugins']['get']('PendingActions'),_0x23cde8=this['context']['plugins']['get'](O),_0x5b4ff5=this['_createCommentThreadView'](_0x566061),_0x1100b7=new Ct(_0x566061,_0x5b4ff5);let _0x887291=null;_0x5b4ff5['on']('change:isDirty',(_0xdb7a71,_0x3c6bb6,_0x27fadf)=>{_0x27fadf?_0x887291=_0x9d7601['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x887291&&(_0x9d7601['remove'](_0x887291),_0x887291=null);}),this['_threadToController']['set'](_0x566061,_0x1100b7),this['_viewToController']['set'](_0x5b4ff5,_0x1100b7);const _0x58d435=new S(this['context']['locale'],_0x5b4ff5);_0x58d435['bind']('length')['to'](_0x5b4ff5),_0x58d435['bind']('isDirty')['to'](_0x5b4ff5,'isDirty',_0x5b4ff5,'length',(_0x13d254,_0x9ecfd4)=>_0x13d254||!_0x9ecfd4),_0x58d435['bind']('isActive')['to'](_0x5b4ff5),_0x58d435['type']='comment';const _0x97001e=new d({'view':_0x58d435,'target':_0x190334,'type':'comment','isVisible':!_0x566061['archivedAt']});return _0x5b4ff5['on']('escape',()=>{_0x97001e['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5b4ff5,_0x97001e),_0x23cde8['add'](_0x97001e),_0x97001e;}['_bindAnnotationToEditors'](_0x5f2fa4,_0x173f6b){this['listenTo'](_0x5f2fa4,'editorReady',(_0x1496e8,_0x47c066)=>{const _0x48d4c4=_0x47c066['ui']['view']['body']['bodyCollectionContainer'];_0x173f6b['focusableElements']['add'](_0x48d4c4),this['context']instanceof _0x53b75b&&this['context']['ui']['focusTracker']['add'](_0x48d4c4);},{'priority':'highest'}),this['listenTo'](_0x5f2fa4,'editorDestroyed',(_0x4e4277,_0x16db9c)=>{const _0x4cd3d2=_0x16db9c['ui']['view']['body']['bodyCollectionContainer'];_0x173f6b['focusableElements']['has'](_0x4cd3d2)&&_0x173f6b['focusableElements']['remove'](_0x4cd3d2),this['context']instanceof _0x53b75b&&this['context']['ui']['focusTracker']['remove'](_0x4cd3d2);});}['_unbindEditors'](_0x4910c6){this['stopListening'](_0x4910c6,'editorReady'),this['stopListening'](_0x4910c6,'editorDestroyed');}['_createCommentThreadView'](_0x4ff492){const _0x8d938=this['context']['plugins']['get'](it),{config:_0x57e054,locale:_0x4939da}=this['context'],_0x4f19ca=lt(_0x57e054['get']('locale'),_0x4939da);return new(0x0,(_0x57e054['get']('comments'))['CommentThreadView'])(_0x4939da,_0x4ff492,_0x8d938['me'],{'editorConfig':{..._0x57e054['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x57e054['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x57e054['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x57e054['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x57e054['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4f19ca,'CommentView':_0x57e054['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x54f5c5,channelId:_0xdae903,resolvedAt:_0x28c205,resolvedBy:_0x256aba,isFromAdapter:_0x5d7922}){if(!this['hasCommentThread'](_0x54f5c5))throw new _0x3b0292('commentsrepository-missing-comment-thread',null,{'threadId':_0x54f5c5});const _0x2a1e03=this['getCommentThread'](_0x54f5c5);if(_0x2a1e03['isResolved'])throw new _0x3b0292('commentsrepository-resolved-comment-thread',null,{'threadId':_0x54f5c5});const _0x2cddb3=this['context']['plugins']['get'](it);if(_0x2a1e03['resolvedBy']=_0x2cddb3['getUser'](_0x256aba),_0x2a1e03['resolvedAt']=_0x28c205,_0x5d7922||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x13affe=this['context']['plugins']['get']('PendingActions'),_0x249f06=_0x13affe['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xdae903,'threadId':_0x54f5c5})['then'](({resolvedAt:_0xe64139,resolvedBy:_0x44a1a1})=>{_0x13affe['remove'](_0x249f06),_0x2a1e03['resolvedBy']['id']!==_0x44a1a1&&(_0x2a1e03['resolvedBy']=_0x2cddb3['getUser'](_0x44a1a1)),_0x2a1e03['resolvedAt']=_0xe64139;})['catch'](_0x479c69=>{throw console['error'](_0x479c69),new _0x3b0292('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0xee1401,channelId:_0x453eed,isFromAdapter:_0x3a90f1}){if(!this['hasCommentThread'](_0xee1401))throw new _0x3b0292('commentsrepository-missing-comment-thread',null,{'threadId':_0xee1401});const _0x508c11=this['getCommentThread'](_0xee1401);if(!_0x508c11['isResolved'])throw new _0x3b0292('commentsrepository-reopen-comment-thread',null,{'threadId':_0xee1401});if(_0x508c11['resolvedBy']=null,_0x508c11['resolvedAt']=null,_0x3a90f1||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1de527=this['context']['plugins']['get']('PendingActions'),_0x3ffa36=_0x1de527['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x453eed,'threadId':_0xee1401})['then'](()=>_0x1de527['remove'](_0x3ffa36))['catch'](_0x2f70cf=>{throw console['error'](_0x2f70cf),new _0x3b0292('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x8e1ea7,isFromAdapter:_0x59a761}){const _0x42d475=this['getCommentThread'](_0x8e1ea7);if(!_0x42d475)throw new _0x3b0292('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x8e1ea7),this['_threads']['delete'](_0x8e1ea7),!_0x42d475['isSubmitted']||_0x59a761||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4a5465=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4104fc}=_0x42d475,_0xe89402=_0x4a5465['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4104fc,'threadId':_0x8e1ea7})['then'](()=>_0x4a5465['remove'](_0xe89402))['catch'](_0x19e3d4=>{throw console['error'](_0x19e3d4),new _0x3b0292('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x13ea1b,unlinkedAt:_0x43d0c0,context:_0x2a5f77,attributes:_0x34e187,isFromAdapter:_0x204df4}){if('string'!=typeof _0x13ea1b)throw new _0x3b0292('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x13ea1b});if(!this['hasCommentThread'](_0x13ea1b))throw new _0x3b0292('commentsrepository-missing-comment-thread',null,{'threadId':_0x13ea1b});const _0x573ed1=this['getCommentThread'](_0x13ea1b);let _0x5121f1=!0x1;if(void 0x0!==_0x2a5f77&&_0x573ed1['context']!==_0x2a5f77&&(_0x573ed1['context']=_0x2a5f77,_0x5121f1=!0x0),void 0x0!==_0x43d0c0&&_0x573ed1['unlinkedAt']!==_0x43d0c0&&(_0x573ed1['unlinkedAt']=_0x43d0c0,_0x5121f1=!0x0),_0x34e187&&!wt(_0x34e187,_0x573ed1['attributes'])&&(_0x573ed1['attributes']=_0x34e187,_0x5121f1=!0x0),!_0x5121f1)return Promise['resolve']();if(!_0x573ed1['isSubmitted']||_0x204df4||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x44df17=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1f47b4}=_0x573ed1,_0x155615=_0x44df17['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1f47b4,'threadId':_0x13ea1b,'context':_0x2a5f77,'unlinkedAt':_0x43d0c0,'attributes':_0x34e187})['then'](()=>_0x44df17['remove'](_0x155615))['catch'](_0x1106c4=>{throw console['error'](_0x1106c4),new _0x3b0292('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4e2c22){const _0x2210c6=this['context']['plugins']['get'](O),_0x41247f=this['getCommentThread'](_0x4e2c22);if(_0x41247f['_isAttached']=!0x1,this['_threadToController']['has'](_0x41247f)){const _0x54f2a5=this['_threadToController']['get'](_0x41247f),_0x4b7e49=_0x54f2a5['view'],_0x2e3ac0=_0x2210c6['getByInnerView'](_0x4b7e49);this['_threadToController']['delete'](_0x41247f),this['_viewToController']['delete'](_0x4b7e49),_0x2e3ac0&&_0x2210c6['remove'](_0x2e3ac0),_0x54f2a5['destroy'](),_0x4b7e49['destroy']()['then'](()=>{this['_unbindEditors'](_0x4b7e49);});}}['_updateActiveAnnotation']({threadId:_0x5d5fb9,resolvedAt:_0x27d19e,unlinkedAt:_0xfdc290}){const _0x10dcd1=!!_0x27d19e,_0x508677=this['context']['plugins']['get'](O),_0x4a0027=this['getCommentThread'](_0x5d5fb9);if(this['_threadToController']['has'](_0x4a0027)){const _0x1d6ffa=this['_threadToController']['get'](_0x4a0027)['view'],_0x1054e1=_0x508677['getByInnerView'](_0x1d6ffa);_0x1054e1&&(_0x10dcd1&&_0x508677['_removeActiveAnnotation'](_0x1054e1),_0xfdc290?_0x1054e1['isVisible']=!0x1:_0x1054e1['refreshVisibility']());}}['_getExternalAuthor'](_0xa8b81f){const _0x4325ee=this['context']['plugins']['get'](it),_0x1580e5=pt('external:'+_0xa8b81f),_0x23b737=_0x4325ee['getUser'](_0x1580e5);return _0x23b737||_0x4325ee['addUser']({'id':_0x1580e5,'name':_0xa8b81f});}['_createNewComment']({threadId:_0xb2acf4,commentId:_0x511e93=_0x356753(),content:_0x9952ff,authorId:_0x1a5cf5,createdAt:_0x2b7402,attributes:_0x4587bb}){if('string'!=typeof _0x511e93)throw new _0x3b0292('commentsrepository-invalid-commentid');if('string'!=typeof _0x1a5cf5)throw new _0x3b0292('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x9952ff||!_0x9952ff['trim']())throw new _0x3b0292('commentsrepository-invalid-comment-content');const _0x413ec4=this['context']['plugins']['get'](it)['getUser'](_0x1a5cf5);if(!_0x413ec4)throw new _0x3b0292('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1a5cf5});let _0xb7c976=null,_0x5044a6=_0x2b7402;return _0x4587bb?.['@external']&&(_0xb7c976=this['_getExternalAuthor'](_0x4587bb['@external']['authorName']),_0x5044a6=new Date(_0x4587bb['@external']['createdAt'])),new fi(this,{'threadId':_0xb2acf4,'id':_0x511e93,'author':_0xb7c976||_0x413ec4,'creator':_0x413ec4,'content':_0x9952ff,'createdAt':_0x2b7402,'authoredAt':_0x5044a6,'attributes':_0x4587bb});}['_addComment'](_0x40e7da){let {threadId:_0x1e5b73,content:_0x39b79a,attributes:_0x5e48df,isFromAdapter:_0x149a45}=_0x40e7da;const _0x22057d=this['getCommentThread'](_0x40e7da['threadId']);if(!_0x22057d)throw new _0x3b0292('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x37858f=this['_createNewComment'](_0x40e7da),{id:_0x237afe}=_0x37858f;if(_0x22057d['_add'](_0x37858f),_0x149a45||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x22057d['isSubmitted'])return Promise['resolve']();const _0x5089c6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2db981}=_0x22057d,_0x446741=_0x5089c6['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5e48df||(_0x5e48df={}),this['adapter']['addComment']({'channelId':_0x2db981,'threadId':_0x1e5b73,'commentId':_0x237afe,'content':_0x39b79a,'attributes':_0x5e48df})['then'](_0x3d7cbe=>{_0x5089c6['remove'](_0x446741),_0x3d7cbe&&this['_updateComment']({'channelId':_0x2db981,'threadId':_0x1e5b73,'commentId':_0x237afe,'createdAt':_0x3d7cbe['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x9779c2=>{throw console['error'](_0x9779c2),new _0x3b0292('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x36e757,commentId:_0x44d428,content:_0x1eaf69,createdAt:_0x2699f9,attributes:_0x111cd8,isFromAdapter:_0xca95d9}){if(void 0x0!==_0x1eaf69&&('string'!=typeof _0x1eaf69||!_0x1eaf69['trim']()['length']))throw new _0x3b0292('commentsrepository-update-comment-invalid-content');const _0x480874=this['getCommentThread'](_0x36e757),_0x8b175a=_0x480874['getComment'](_0x44d428);if(!_0x8b175a)throw new _0x3b0292('commentsrepository-update-missing-comment',this);let _0x547a5f=!0x1;if(_0x1eaf69&&_0x1eaf69!==_0x8b175a['content']&&(_0x8b175a['isEditable']||_0xca95d9)&&(_0x8b175a['content']=_0x1eaf69,_0x547a5f=!0x0),_0x2699f9&&_0x2699f9!==_0x8b175a['createdAt']&&(_0x8b175a['createdAt']=_0x2699f9,_0x8b175a['attributes']&&_0x8b175a['attributes']['@external']||(_0x8b175a['authoredAt']=_0x2699f9),_0x547a5f=!0x0),_0x111cd8&&!wt(_0x111cd8,_0x8b175a['attributes'])&&(_0x8b175a['attributes']=_0x111cd8,_0x547a5f=!0x0),!_0x547a5f)return Promise['resolve']();if(_0x480874['fire']('commentUpdated'),_0xca95d9||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x343480=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1fe9df}=this['getCommentThread'](_0x8b175a['threadId']),_0x4bbef8=_0x343480['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1fe9df,'threadId':_0x36e757,'commentId':_0x44d428,'content':_0x1eaf69,'attributes':_0x111cd8})['then'](()=>_0x343480['remove'](_0x4bbef8))['catch'](_0xf252e8=>{throw console['error'](_0xf252e8),new _0x3b0292('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x135136,commentId:_0x2a0237,isFromAdapter:_0x43d5e7}){const _0x487ece=this['getCommentThread'](_0x135136),_0x1d7ae3=_0x487ece['getComment'](_0x2a0237);if(!_0x1d7ae3)throw new _0x3b0292('commentsrepository-remove-missing-comment',this);if(_0x487ece['_remove'](_0x1d7ae3),_0x43d5e7||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x15e508=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1798bb}=_0x487ece,_0x21ab31=_0x15e508['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1798bb,'threadId':_0x135136,'commentId':_0x2a0237})['then'](()=>_0x15e508['remove'](_0x21ab31))['catch'](_0x5446b6=>{throw console['error'](_0x5446b6),new _0x3b0292('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x434faf(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x4b1868,_0x1649dc){super();const _0x4f5eaf=_0x4b1868['context']['plugins']['get'](it)['me'],_0x9f82b=_0x4b1868['getCommentThread'](_0x1649dc['threadId']),_0x1a6601=0x0===_0x9f82b['comments']['length'],_0x42430a=_0x4f5eaf===_0x1649dc['author'];this['id']=_0x1649dc['id'],this['threadId']=_0x1649dc['threadId'],this['author']=_0x1649dc['author'],this['creator']=_0x1649dc['creator'],this['isExternal']=Boolean(_0x1649dc['attributes']&&_0x1649dc['attributes']['@external']),this['set']('content',_0x1649dc['content']),this['createdAt']=_0x1649dc['createdAt']||new Date(),this['set']('authoredAt',_0x1649dc['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x9f82b,'resolvedAt'),this['set']('attributes',_0x1649dc['attributes']||{}),this['bind']('isEditable')['to'](_0x4b1868,'_permissions',()=>{const _0x5f4e5a=_0x4b1868['getPermissions'](_0x9f82b['channelId'])['write'],_0x53f21f=_0x4b1868['getPermissions'](_0x9f82b['channelId'])['modifyAll'];return _0x42430a&&_0x5f4e5a||!_0x42430a&&_0x53f21f;}),this['bind']('isRemovable')['to'](_0x9f82b,'isRemovable',_0x4b1868,'_permissions',_0x3a8474=>{const _0x180bc9=_0x4b1868['getPermissions'](_0x9f82b['channelId'])['write'],_0x3c46e3=_0x4b1868['getPermissions'](_0x9f82b['channelId'])['modifyAll'];return _0x42430a&&_0x180bc9||_0x3a8474&&_0x1a6601||!_0x42430a&&_0x3c46e3&&!_0x1a6601;}),this['bind']('isReadOnly')['to'](_0x9f82b,'isReadOnly'),this['_repository']=_0x4b1868;}get['weight'](){return Math['max'](function(_0x55a866){const _0x132b3d=document['createElement']('div');return _0x132b3d['innerHTML']=_0x55a866,_0x132b3d['textContent']['length'];}(this['content']),0xc8);}['update'](_0x171ca6){const {threadId:_0x516751,id:_0x187ec6}=this;if(!this['_repository']['hasCommentThread'](_0x516751))throw new _0x3b0292('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xd4e650}=this['_repository']['getCommentThread'](_0x516751);this['_repository']['fire'](bt('updateComment',_0xd4e650,_0x516751),{'channelId':_0xd4e650,'threadId':_0x516751,'commentId':_0x187ec6,..._0x171ca6});}['setAttribute'](_0xabe0e,_0x4f4dd1){const _0x3f0a82=It(this['attributes']);At(_0x3f0a82,_0xabe0e,_0x4f4dd1),this['update']({'attributes':_0x3f0a82});}['removeAttribute'](_0x31e507){const _0x157447=It(this['attributes']);yt(_0x157447,_0x31e507),this['update']({'attributes':_0x157447});}['remove'](_0x3c6eef={}){if(!_0x3c6eef['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x63227e,id:_0x4639f3}=this;if(!this['_repository']['hasCommentThread'](_0x63227e))throw new _0x3b0292('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5f0c84}=this['_repository']['getCommentThread'](_0x63227e);this['_repository']['fire'](bt('removeComment',_0x5f0c84,_0x63227e),{'channelId':_0x5f0c84,'threadId':_0x63227e,'commentId':_0x4639f3,..._0x3c6eef});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x1b6546,..._0x364999){for(const _0x5a256e of _0x364999)void 0x0!==_0x5a256e&&(_0x1b6546+=':'+String(_0x5a256e));return _0x1b6546;}class J extends _0x1c82f3{['refresh'](){const _0x38fedc=this['editor']['model']['document']['selection'];for(const _0xfed6dd of _0x38fedc['getRanges']())if(this['_hasContent'](_0xfed6dd))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x41c8e7=_0x356753()}={}){const _0x575479=this['editor']['model'],_0x2de668=[];for(const _0x5dc4f4 of _0x575479['document']['selection']['getRanges']())this['_hasContent'](_0x5dc4f4)&&_0x2de668['push'](this['_trimToContent'](_0x5dc4f4));_0x575479['change'](_0x11be9e=>{for(const _0x537dc3 of _0x2de668){const _0x540496=_0x356753()['substr'](0x1,0x5),_0x49feb6='comment:'+_0x41c8e7+':'+_0x540496;_0x11be9e['addMarker'](_0x49feb6,{'range':_0x537dc3,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x5c0c59){for(const _0x5a296d of _0x5c0c59['getItems']())if(this['_itemIsContent'](_0x5a296d))return!0x0;return!0x1;}['_itemIsContent'](_0x5c6ee9){return _0x5c6ee9['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5c6ee9)&&!_0x5c6ee9['is']('element','tableCell');}['_trimToContent'](_0x48c9f3){const _0x8408c=_0x1808f4=>!this['_itemIsContent'](_0x1808f4['item']),_0x266701=_0x48c9f3['start']['getLastMatchingPosition'](_0x8408c),_0xde1db3=_0x48c9f3['end']['getLastMatchingPosition'](_0x8408c,{'direction':'backward'});return this['editor']['model']['createRange'](_0x266701,_0xde1db3);}}class P extends _0x51209d{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7d74c6){super(_0x7d74c6),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3b7c27=this['editor'],_0x2b4619=_0x3b7c27['model']['document']['selection'],_0x150d52=_0x4724d7(()=>this['refreshSelectedViews'](),0xa);_0x2b4619['on']('change:range',(_0x171aee,_0x5c33f7)=>{_0x5c33f7['directChange']&&(_0x150d52['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3b7c27['editing']['view']['document'],'change:isFocused',(_0x473fdb,_0x38402e,_0x3e0833)=>{_0x3e0833&&_0x150d52();}),this['listenTo'](_0x3b7c27['ui']['focusTracker'],'change:isFocused',(_0x38d4de,_0x4d5b17,_0x4101a8)=>{_0x4101a8||_0x3b7c27['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x399ede=>this['_editorAnnotationsData']['has'](_0x399ede['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2b7ab1){if(this['_editorAnnotations']['has'](_0x2b7ab1['view']))return;this['_editorAnnotations']['add'](_0x2b7ab1['view']),this['editor']['ui']['focusTracker']['add'](_0x2b7ab1['view']['element']);const _0x5c86a7=this['editor']['plugins']['get'](O);this['listenTo'](_0x5c86a7['collection'],'remove',(_0x206775,_0x3d746d)=>{this['editor']['ui']['focusTracker']['remove'](_0x3d746d['view']['element']),this['_editorAnnotations']['delete'](_0x3d746d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1143a4){if('function'!=typeof _0x1143a4)throw new _0x3b0292('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1143a4);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4a3e9d,annotations:_0xcfe9d}){const _0x2aca15=[],_0x49a014=this['editor']['model']['document']['selection'],_0xed396b=Array['from'](_0x49a014['getRanges']());for(const [_0xea38dc,_0x574aef]of this['_editorAnnotationsData']){const _0x118471=_0x2a16b7(_0x574aef),_0x33a7f1=_0xcfe9d['getByInnerView'](_0xea38dc);_0x118471&&_0x33a7f1&&_0x2aca15['push']({'annotation':_0x33a7f1,'range':_0x118471});}function _0x2a16b7(_0x14ec64){for(const _0x49b4ff of _0x14ec64)for(const _0x43a1bb of _0xed396b)if(_0x49b4ff['containsRange'](_0x43a1bb,!_0x49a014['isCollapsed']))return _0x49b4ff;return null;}return _0x2aca15['sort']((_0x5c83f3,_0x4f973d)=>{const _0x30dc36=_0x5c83f3['range'],_0x5bf836=_0x4f973d['range'];if(!_0x30dc36['isEqual'](_0x5bf836)){if(_0x30dc36['containsRange'](_0x5bf836,!0x0))return 0x1;if(_0x5bf836['containsRange'](_0x30dc36,!0x0))return-0x1;}return _0x5c83f3['annotation']==_0x4a3e9d?-0x1:_0x4f973d['annotation']==_0x4a3e9d?0x1:0x0;})['map'](_0x4f438a=>_0x4f438a['annotation']);}get['_editorAnnotationsData'](){const _0x3e9638=new Map();for(const _0x30aec2 of Array['from'](this['_dataCollectors']))for(const [_0x2f1623,_0x5d6816]of _0x30aec2())_0x3e9638['set'](_0x2f1623,_0x5d6816);return _0x3e9638;}}class st extends _0x51209d{['afterInit'](){const _0x56f9a8=this['editor'];if(!_0x56f9a8['plugins']['has']('RestrictedEditingModeEditing'))return;_0x56f9a8['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x51209d{constructor(_0x1fa6c3){super(_0x1fa6c3),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x614af8=this['editor'],_0x463fc5=_0x614af8['commands']['get']('importWord'),_0x264fef=_0x614af8['plugins']['get'](it);_0x463fc5&&(_0x463fc5['on']('execute',(_0x55a432,[,_0x57b4a1])=>{_0x57b4a1['collaboration_features']={'comments':!0x0,'user_id':_0x264fef['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x463fc5,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x281d77,_0x5a50ec){const {comment_threads:_0x2c96a3}=_0x5a50ec;_0x2c96a3&&_0x2c96a3['forEach'](({thread_id:_0x274d5f,comments:_0x217571,is_resolved:_0x3f4792})=>{const _0x228900=new Date(),_0x5e8e44=_0x217571['map'](({author:_0x593a31,content:_0x19dcb2,created_at:_0x4e509c})=>({'content':_0x19dcb2,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x228900,'attributes':{'@external':{'authorName':_0x593a31,'createdAt':_0x4e509c?new Date(_0x4e509c):new Date(),'source':'importWord'}}})),_0x1af6e8=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1af6e8,'threadId':_0x274d5f,'comments':_0x5e8e44,'resolvedAt':_0x3f4792?_0x228900:null});});}}class at extends _0x51209d{constructor(_0x176235){super(_0x176235),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x47dfa6=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x47dfa6,'contentInsertion',(_0x271a7f,_0x5a22a5)=>this['_removeMarkersWithoutThreads'](_0x5a22a5['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4b051b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4b051b;const _0x5450ea=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1ecce5 of _0x4b051b['keys']()){const [_0x5447d9,_0x224799]=_0x1ecce5['split'](':');'comment'!=_0x5447d9||_0x5450ea['hasCommentThread'](_0x224799)||_0x4b051b['delete'](_0x1ecce5);}return _0x4b051b;}['_registerMarkerInClipboardPipeline'](){const _0x169ea1=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1c6229=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1c6229&&_0x169ea1['_registerMarkerToCopy']('comment',_0x1c6229);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x44da7f){switch(_0x44da7f){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x51209d{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4db678,_0x3f1525)=>{if(!_0x3f1525['options']['showCommentHighlights'])return null;if(_0x3f1525['options']['ignoreResolvedComments']){const {id:_0x27c55b}=er(_0x4db678['markerName']),_0x15e6b1=this['editor']['plugins']['get'](o);if(_0x15e6b1['getCommentThread'](_0x27c55b)?.['isResolved']&&_0x4db678['item'])return _0x3f1525['consumable']['consume'](_0x4db678['item'],'addMarker:'+_0x4db678['markerName']),_0x3f1525['consumable']['consume'](_0x4db678['item'],'removeMarker:'+_0x4db678['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5fa7c3=>{_0x5fa7c3['on']('addMarker:comment',(_0x87f81,_0x53e66f,_0x83b7d9)=>{if(!_0x83b7d9['options']['showCommentHighlights'])return;const _0xb0565f=_0x53e66f['item'];if(!_0xb0565f)return;const _0x55a6ed=_0x83b7d9['mapper']['toViewElement'](_0xb0565f);this['editor']['model']['schema']['isObject'](_0xb0565f)&&_0x55a6ed&&!_0x55a6ed['getCustomProperty']('widget')&&_0x55a6ed['is']('containerElement')&&_0x264321(_0x55a6ed,_0x83b7d9['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x24e010,{writer:_0x24e954,options:_0x2af17b})=>{if(!_0x2af17b['showCommentHighlights'])return null;const _0x39b85a=_0x24e954['createContainerElement']('div'),_0x473a19=_0x24e954['createEmptyElement']('hr');return _0x24e954['addClass']('ck-horizontal-line',_0x39b85a),_0x24e954['insert'](_0x24e954['createPositionAt'](_0x39b85a,0x0),_0x473a19),_0x39b85a;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4bd256,{writer:_0xeb6ad7,options:_0x880365})=>{if(!_0x880365['showCommentHighlights'])return null;const _0x4ad095=_0xeb6ad7['createContainerElement']('span'),_0x1fdce4=_0xeb6ad7['createEmptyElement']('img');return _0xeb6ad7['addClass']('image-inline',_0x4ad095),_0xeb6ad7['insert'](_0xeb6ad7['createPositionAt'](_0x4ad095,0x0),_0x1fdce4),_0x4ad095;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2fb23e,{writer:_0x3e2c73,options:_0x173daa})=>{if(_0x173daa['showCommentHighlights'])return _0x3e2c73['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4494d4,_0x59692a,_0x182b92)=>{_0x182b92['options']['showCommentHighlights']&&_0x4494d4['stop']();},{'priority':'high'});}}class r extends _0x51209d{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x183971){super(_0x183971),this['set']('isThreadsLoadingPaused',!0x0),_0x183971['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x412634,_0x30b90d,_0x5dc325,_0x5216d2)=>{const _0x1da6f4=_0x183971['plugins']['get'](o),_0x4d2683=_0x5dc325?er(_0x5dc325)['id']:null;_0x183971['model']['change'](()=>{if(_0x4d2683){const _0x3c3c90=this['getAllMarkersForId'](_0x4d2683);for(const _0x28f6df of _0x3c3c90)_0x183971['editing']['reconvertMarker'](_0x28f6df);}if(_0x5216d2){const {id:_0x47a613}=er(_0x5216d2),_0x1f417f=_0x1da6f4['getCommentThread'](_0x47a613);if(_0x1f417f&&_0x1f417f['unlinkedAt'])return;if(_0x1f417f&&!_0x1f417f['isAttached'])return;const _0x1f61f2=this['getAllMarkersForId'](_0x47a613);for(const _0x51c21e of _0x1f61f2)_0x183971['editing']['reconvertMarker'](_0x51c21e);}}),_0x4d2683&&this['scrollToThreadMarker'](_0x4d2683);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x805efe=this['editor'],_0x2d8d80=_0x805efe['plugins']['get'](o),_0x30c112=_0x805efe['config']['get']('collaboration.channelId'),_0xc01981=_0x2d8d80['getCommentThreads']()['filter'](_0x1214d7=>_0x1214d7['channelId']!==_0x30c112);_0x805efe['commands']['add']('addCommentThread',new J(_0x805efe)),this['listenTo'](_0x805efe,'change:isReadOnly',(_0x59a727,_0x23f981,_0x1902da)=>{_0x2d8d80['switchReadOnly'](_0x1902da,_0x805efe['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2d8d80,ft('addCommentThread',_0x30c112),(_0x280560,{threadId:_0x4e0495})=>{const _0x2533f2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4e0495);_0x2533f2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4e0495);}),this['listenTo'](_0x2d8d80,ft('removeCommentThread',_0x30c112),(_0x42d463,{threadId:_0x20352c})=>{_0x805efe['model']['enqueueChange']({'isUndoable':!0x1},_0x5652a7=>{const _0x2a92b2=this['getAllMarkersForId'](_0x20352c);for(const _0xa4fce of _0x2a92b2)_0x5652a7['removeMarker'](_0xa4fce);});}),this['listenTo'](_0x2d8d80,ft('resolveCommentThread',_0x30c112),(_0x3f065b,{threadId:_0xe98075})=>{(this['_reconvertMarkers'](_0xe98075),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0xe98075)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2d8d80,ft('reopenCommentThread',_0x30c112),(_0x40b9df,{threadId:_0x2dc27b})=>{this['_reconvertMarkers'](_0x2dc27b);},{'priority':'low'}),this['listenTo'](_0x2d8d80,ft('addComment',_0x30c112),(_0x36b168,{threadId:_0x111bd2,isFromAdapter:_0x187d49})=>{const _0x1eba47=this['getAllMarkersForId'](_0x111bd2);if(_0x187d49||0x0==_0x1eba47['length']||!_0x2d8d80['hasCommentThread'](_0x111bd2))return;0x1===_0x2d8d80['getCommentThread'](_0x111bd2)['length']&&_0x805efe['model']['enqueueChange']({'isUndoable':!0x1},_0x1daf8f=>{for(const _0x2b3a44 of _0x1eba47)_0x1daf8f['updateMarker'](_0x2b3a44,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xc01981);}['afterInit'](){!async function(_0x32a754){const _0x5d17a7=_0x2d8e6e([0x50,0x6f,0x71,0x7a,0x47,0x31,0x79,0x52,0x41,0x66,0x6e,0x61,0x42,0x33,0x77,0x48,0x75,0x6a,0x38,0x56,0x4f,0x74,0x30,0x76,0x35,0x73,0x4b,0x55,0x72,0x62,0x45,0x6d,0x37,0x6c,0x32,0x69,0x6b,0x67,0x4d,0x43,0x51,0x44,0x63,0x68,0x5a,0x54,0x78,0x49,0x53,0x4e,0x58,0x65,0x34,0x70,0x4c,0x36,0x39,0x57,0x4a,0x59,0x64,0x46]),_0x227753=0x32bda18b,_0x49fd93=0x32bacb33^_0x227753,_0x5afd8b=window[_0x2d8e6e([0x44,0x61,0x74,0x65])][_0x2d8e6e([0x6e,0x6f,0x77])](),_0xdccdc5=_0x32a754[_0x2d8e6e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x44d3c9=new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe7024=>{_0xdccdc5[_0x2d8e6e([0x6f,0x6e,0x63,0x65])](_0x2d8e6e([0x72,0x65,0x61,0x64,0x79]),_0xe7024);}),_0x572517={[_0x2d8e6e([0x6b,0x74,0x79])]:_0x2d8e6e([0x45,0x43]),[_0x2d8e6e([0x75,0x73,0x65])]:_0x2d8e6e([0x73,0x69,0x67]),[_0x2d8e6e([0x63,0x72,0x76])]:_0x2d8e6e([0x50,0x2d,0x32,0x35,0x36]),[_0x2d8e6e([0x78])]:_0x2d8e6e([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]),[_0x2d8e6e([0x79])]:_0x2d8e6e([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]),[_0x2d8e6e([0x61,0x6c,0x67])]:_0x2d8e6e([0x45,0x53,0x32,0x35,0x36])},_0x491dac=_0xdccdc5[_0x2d8e6e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2d8e6e([0x67,0x65,0x74])](_0x2d8e6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x8624eb(){let _0xb7b176,_0x2da52f=null,_0x231a8c=null;try{if(_0x491dac==_0x2d8e6e([0x47,0x50,0x4c]))return _0x2d8e6e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xb7b176=_0x3909bc(),!_0xb7b176)return _0x2d8e6e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xb7b176[_0x2d8e6e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x231a8c=_0x28ad25(_0xb7b176[_0x2d8e6e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xb7b176[_0x2d8e6e([0x6a,0x74,0x69])])),await _0xa37e01()?_0x9d3697()?_0x46d6e0()?_0x2d8e6e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x20ca4b()?(_0xb7b176[_0x2d8e6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2d8e6e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2da52f=_0x27d9a0(_0x2d8e6e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xb7b176[_0x2d8e6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2d8e6e([0x74,0x72,0x69,0x61,0x6c])&&(_0x2da52f=_0x27d9a0(_0x2d8e6e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3ff01()):_0x2d8e6e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2d8e6e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2d8e6e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2d8e6e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x46d6e0(){const _0x1d429f=[_0x2d8e6e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2d8e6e([0x74,0x72,0x69,0x61,0x6c])][_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb7b176[_0x2d8e6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5afd8b/0x3e8:0xe10*_0x49fd93;return _0xb7b176[_0x2d8e6e([0x65,0x78,0x70])]<_0x1d429f;}function _0x9d3697(){const _0x3d8a1f=_0xb7b176[_0x2d8e6e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3d8a1f)return!0x1;if(_0x3d8a1f[_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d8e6e([0x2a])))return!0x0;if(_0x3d8a1f[_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d8e6e([0x43,0x4d,0x54])))return!0x0;if(_0x3d8a1f[_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d8e6e([0x52,0x43,0x4d,0x54]))){if(_0x3a9fe0())return!0x0;if(_0x4604bb()||_0x2c5099())return!0x0;}return!0x1;}function _0x20ca4b(){const _0x102b4e=_0xb7b176[_0x2d8e6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x102b4e||0x0==_0x102b4e[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1f4fb9}=new URL(window[_0x2d8e6e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x102b4e[_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f4fb9))return!0x0;const _0x72af48=_0x1f4fb9[_0x2d8e6e([0x73,0x70,0x6c,0x69,0x74])](_0x2d8e6e([0x2e]));return _0x102b4e[_0x2d8e6e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4a8a85=>_0x4a8a85[_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d8e6e([0x2a])))[_0x2d8e6e([0x6d,0x61,0x70])](_0x23345c=>_0x23345c[_0x2d8e6e([0x73,0x70,0x6c,0x69,0x74])](_0x2d8e6e([0x2e])))[_0x2d8e6e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x20a800=>_0x20a800[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x72af48[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2d8e6e([0x6d,0x61,0x70])](_0x3f4960=>Array(_0x72af48[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3f4960[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2d8e6e([0x66,0x69,0x6c,0x6c])](_0x3f4960[0x0]===_0x2d8e6e([0x2a])?_0x2d8e6e([0x2a]):'')[_0x2d8e6e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3f4960))[_0x2d8e6e([0x73,0x6f,0x6d,0x65])](_0x5ebf06=>_0x72af48[_0x2d8e6e([0x65,0x76,0x65,0x72,0x79])]((_0x14b57d,_0x5065f9)=>_0x5ebf06[_0x5065f9]===_0x14b57d||_0x5ebf06[_0x5065f9]===_0x2d8e6e([0x2a])));}function _0x3ff01(){return _0x2da52f&&_0x231a8c?new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x381936,_0x2458dc)=>{_0x2da52f[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x381936,_0x2458dc),_0x231a8c[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x31a982=>{_0x31a982!=_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64])&&_0x381936(_0x31a982);},_0x2458dc);}):_0x2da52f||_0x231a8c||_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x28ad25(_0x3d69f5,_0x2488fa){return new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9d3bf3=>{if(_0x3a6c49())return _0x9d3bf3(_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64]));_0x1c914d(),_0xdccdc5[_0x2d8e6e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2d8e6e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x650753=!0x1;const _0x10d84b=_0x356753();function _0x2f1989(_0x17be9d){return!!_0x17be9d&&(typeof _0x17be9d===_0x2d8e6e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x17be9d===_0x2d8e6e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x17be9d[_0x2d8e6e([0x74,0x68,0x65,0x6e])]===_0x2d8e6e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x17be9d[_0x2d8e6e([0x63,0x61,0x74,0x63,0x68])]===_0x2d8e6e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x885c8b(_0x477796){_0x423023(_0x477796)[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x3a2831=>{if(!_0x3a2831||_0x3a2831[_0x2d8e6e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2d8e6e([0x6f,0x6b]))return _0x2d8e6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1bafa5(_0x4bdf27(_0x10d84b+_0x2488fa))!=_0x3a2831[_0x2d8e6e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2d8e6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64]);})[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x63e1ca=>(_0x102e87(),_0x63e1ca),()=>{const _0x413c45=_0x571760();return null==_0x413c45?(_0x102e87(),_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64])):_0x2d8e6e(_0x5afd8b-_0x413c45>(0x16b1258b^_0x227753)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x9d3bf3)[_0x2d8e6e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x9d3bf3(_0x2d8e6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x35bc14=0x328b4f0b^_0x227753;function _0x102e87(){const _0x5f5490=_0x2d8e6e([0x6c,0x6c,0x63,0x74,0x2d])+_0x1bafa5(_0x4bdf27(_0x3d69f5)),_0x37c663=_0x1aca84(_0x1bafa5(window[_0x2d8e6e([0x4d,0x61,0x74,0x68])][_0x2d8e6e([0x63,0x65,0x69,0x6c])](_0x5afd8b/_0x35bc14)));window[_0x2d8e6e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2d8e6e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5f5490,_0x37c663);}function _0x571760(){const _0x54bfbf=_0x2d8e6e([0x6c,0x6c,0x63,0x74,0x2d])+_0x1bafa5(_0x4bdf27(_0x3d69f5)),_0x4d7902=window[_0x2d8e6e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2d8e6e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x54bfbf);return _0x4d7902?window[_0x2d8e6e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1aca84(_0x4d7902),0x10)*_0x35bc14:null;}function _0x423023(_0x21638e){return new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d7084,_0x41c273)=>{_0x21638e[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x3d7084,_0x41c273),window[_0x2d8e6e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x41c273,0x32bc754b^_0x227753);});}}_0xdccdc5[_0x2d8e6e([0x6f,0x6e])](_0x2d8e6e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x18b96b,_0x28f9ad)=>{if(_0x28f9ad[0x0]!=_0x3d69f5)return _0x9d3bf3(_0x2d8e6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x28f9ad[0x1]={..._0x28f9ad[0x1],[_0x2d8e6e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x10d84b};},{[_0x2d8e6e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2d8e6e([0x68,0x69,0x67,0x68])}),_0xdccdc5[_0x2d8e6e([0x6f,0x6e])](_0x2d8e6e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x349b46=>{_0x2f1989(_0x349b46[_0x2d8e6e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x650753=!0x0,_0x885c8b(_0x349b46[_0x2d8e6e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2d8e6e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2d8e6e([0x6c,0x6f,0x77])}),_0x44d3c9[_0x2d8e6e([0x74,0x68,0x65,0x6e])](()=>{_0x650753||_0x9d3bf3(_0x2d8e6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3a6c49(){return _0xdccdc5[_0x2d8e6e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d8e6e([0x76,0x69,0x65,0x77])][_0x2d8e6e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2d8e6e([0x61,0x75,0x74,0x6f]);}function _0x1c914d(){_0xdccdc5[_0x2d8e6e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d8e6e([0x76,0x69,0x65,0x77])][_0x2d8e6e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d8e6e([0x61,0x75,0x74,0x6f]);}}function _0x27d9a0(_0x4977fd){const _0x54fc3b=[new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x137420=>setTimeout(_0x137420,0x32b49f47^_0x227753)),_0x44d3c9[_0x2d8e6e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x436513=>{let _0x4fbdbf=0x0;_0xdccdc5[_0x2d8e6e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d8e6e([0x6f,0x6e])](_0x2d8e6e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x588064,_0x46eb0a)=>{_0x46eb0a[0x0][_0x2d8e6e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4fbdbf++,_0x4fbdbf==(0x32bda073^_0x227753)&&(_0x436513(),_0x588064[_0x2d8e6e([0x6f,0x66,0x66])]());});}))];return window[_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d8e6e([0x72,0x61,0x63,0x65])](_0x54fc3b)[_0x2d8e6e([0x74,0x68,0x65,0x6e])](()=>_0x4977fd);}async function _0x5decf0(){await _0x44d3c9,_0xdccdc5[_0x2d8e6e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d8e6e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x42d591,_0xdccdc5[_0x2d8e6e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d8e6e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x42d591,_0xdccdc5[_0x2d8e6e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2d8e6e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3a9fe0(){return _0x3df86f(_0x2d8e6e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x66a368(_0x2d8e6e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2d8e6e([0x73,0x74,0x61,0x74,0x65])]==_0x2d8e6e([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4604bb(){return _0x3df86f(_0x2d8e6e([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 _0x2c5099(){return _0x3df86f(_0x2d8e6e([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1a6f9e(_0x32b9d1){const _0x2ceab8=_0x2c5e26();_0xdccdc5[_0x2ceab8]=_0x2d8e6e([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x32b9d1,_0x32b9d1!=_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64])&&_0x5decf0();}function _0x2c5e26(){const _0x1e85a6=window[_0x2d8e6e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2d8e6e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2d8e6e([0x6e,0x6f,0x77])]())[_0x2d8e6e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2d8e6e([0x2e]),'');let _0x465c7f=_0x2d8e6e([0x50]);for(let _0x3b660c=0x0;_0x3b660c<_0x1e85a6[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b660c+=0x2){let _0x4db987=window[_0x2d8e6e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1e85a6[_0x2d8e6e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b660c,_0x3b660c+0x2));_0x4db987>=_0x5d17a7[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4db987-=_0x5d17a7[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x465c7f+=_0x5d17a7[_0x4db987];}return _0x465c7f;}function _0x3909bc(){const _0x5bed00=_0x491dac[_0x2d8e6e([0x73,0x70,0x6c,0x69,0x74])](_0x2d8e6e([0x2e]));if(0x3!=_0x5bed00[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3d8cf9(_0x5bed00[0x1]);function _0x3d8cf9(_0x1c0616){const _0x1fe986=_0x596628(_0x1c0616);return _0x1fe986&&_0x1ce398()?_0x1fe986:null;function _0x1ce398(){const _0x3a95b3=_0x1fe986[_0x2d8e6e([0x6a,0x74,0x69])],_0x55363f=window[_0x2d8e6e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a95b3[_0x2d8e6e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3a95b3[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x35b9d2={..._0x1fe986,[_0x2d8e6e([0x6a,0x74,0x69])]:_0x3a95b3[_0x2d8e6e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3a95b3[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x35b9d2[_0x2d8e6e([0x76,0x63])],_0x4bdf27(_0x35b9d2)==_0x55363f;}}}async function _0xa37e01(){let _0x275413=!0x0;try{const _0x4b3467=_0x491dac[_0x2d8e6e([0x73,0x70,0x6c,0x69,0x74])](_0x2d8e6e([0x2e])),[_0x42c5ae,_0x1ae352,_0x5578aa]=_0x4b3467;return _0x2dc307(_0x42c5ae),await _0x19ad13(_0x42c5ae,_0x1ae352,_0x5578aa),_0x275413;}catch{return!0x1;}function _0x2dc307(_0x52941a){const _0x439d6c=_0x596628(_0x52941a);_0x439d6c&&_0x439d6c[_0x2d8e6e([0x61,0x6c,0x67])]==_0x2d8e6e([0x45,0x53,0x32,0x35,0x36])||(_0x275413=!0x1);}async function _0x19ad13(_0x583f9e,_0x4d4989,_0x48b6a2){const _0x3675ce=window[_0x2d8e6e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2d8e6e([0x66,0x72,0x6f,0x6d])](_0x6d4e58(_0x48b6a2),_0x55fe7b=>_0x55fe7b[_0x2d8e6e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2612b1=new window[(_0x2d8e6e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2d8e6e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x583f9e+_0x2d8e6e([0x2e])+_0x4d4989),_0xc8f243=window[_0x2d8e6e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2d8e6e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xc8f243)return;const _0x3d502a=await _0xc8f243[_0x2d8e6e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2d8e6e([0x6a,0x77,0x6b]),_0x572517,{[_0x2d8e6e([0x6e,0x61,0x6d,0x65])]:_0x2d8e6e([0x45,0x43,0x44,0x53,0x41]),[_0x2d8e6e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2d8e6e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2d8e6e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xc8f243[_0x2d8e6e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2d8e6e([0x6e,0x61,0x6d,0x65])]:_0x2d8e6e([0x45,0x43,0x44,0x53,0x41]),[_0x2d8e6e([0x68,0x61,0x73,0x68])]:{[_0x2d8e6e([0x6e,0x61,0x6d,0x65])]:_0x2d8e6e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3d502a,_0x3675ce,_0x2612b1)||(_0x275413=!0x1);}}function _0x596628(_0x4aad59){return _0x4aad59[_0x2d8e6e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2d8e6e([0x65,0x79]))?JSON[_0x2d8e6e([0x70,0x61,0x72,0x73,0x65])](_0x6d4e58(_0x4aad59)):null;}function _0x6d4e58(_0x2c8517){return window[_0x2d8e6e([0x61,0x74,0x6f,0x62])](_0x2c8517[_0x2d8e6e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2d8e6e([0x2b]))[_0x2d8e6e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2d8e6e([0x2f])));}function _0x4bdf27(_0x4bbc41){let _0x5d9430=0x1505;function _0x103732(_0x3abe83){for(let _0x4c977a=0x0;_0x4c977a<_0x3abe83[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4c977a++){const _0x4eee88=_0x3abe83[_0x2d8e6e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4c977a);_0x5d9430=(_0x5d9430<<0x5)+_0x5d9430+_0x4eee88,_0x5d9430&=_0x5d9430;}}function _0x1756a4(_0x2b0525){Array[_0x2d8e6e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2b0525)?_0x2b0525[_0x2d8e6e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1756a4):_0x2b0525&&typeof _0x2b0525==_0x2d8e6e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2d8e6e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2b0525)[_0x2d8e6e([0x73,0x6f,0x72,0x74])]()[_0x2d8e6e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2d8964,_0x189a29])=>{_0x103732(_0x2d8964),_0x1756a4(_0x189a29);}):_0x103732(window[_0x2d8e6e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2b0525));}return _0x1756a4(_0x4bbc41),_0x5d9430>>>0x0;}function _0x1bafa5(_0xedd6ed){return _0xedd6ed[_0x2d8e6e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2d8e6e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2d8e6e([0x30]));}function _0x1aca84(_0x5cc95d){return _0x5cc95d[_0x2d8e6e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2d8e6e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2d8e6e([0x6a,0x6f,0x69,0x6e])]('');}function _0x3df86f(_0x396c75){return _0xdccdc5[_0x2d8e6e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2d8e6e([0x68,0x61,0x73])](_0x396c75);}function _0x66a368(_0x1df0cf){return _0xdccdc5[_0x2d8e6e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2d8e6e([0x67,0x65,0x74])](_0x1df0cf);}function _0x42d591(){}function _0x2d8e6e(_0x273552){return _0x273552['map'](_0xacc0db=>String['fromCharCode'](_0xacc0db))['join']('');}_0x1a6f9e(await _0x8624eb());}(this);}['destroy'](){const _0x2b1700=this['editor']['plugins']['get'](o),_0x1ba515=this['editor']['config']['get']('collaboration.channelId');for(const _0x131465 of _0x2b1700['getCommentThreads']({'channelId':_0x1ba515}))_0x2b1700['_detachCommentThread'](_0x131465['id']),_0x2b1700['_threads']['delete'](_0x131465['id']);super['destroy']();}['hasMarkerForId'](_0x2b967b){return this['getAllMarkersForId'](_0x2b967b)['length']>0x0;}['getAllMarkersForId'](_0x3b2aae){const _0x4a3c8b=[];for(const _0x48cd98 of this['editor']['model']['markers'])_0x48cd98['name']['startsWith']('comment:'+_0x3b2aae)&&_0x4a3c8b['push'](_0x48cd98);return _0x4a3c8b;}['scrollToThreadMarker'](_0x33961c){const _0x4a3cc5=this['_getTargetForId'](_0x33961c);_0x4a3cc5&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x33961c&&rt({'target':_0x4a3cc5[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x9161d2){this['editor']['model']['change'](()=>{for(const _0x309d05 of this['getAllMarkersForId'](_0x9161d2))this['editor']['editing']['reconvertMarker'](_0x309d05);});}['_attachArchivedThread'](_0x48c802){const _0x14285d=this['editor']['plugins']['get'](o),_0x1fbd57=this['editor']['plugins']['get'](P),_0x529948=_0x14285d['getCommentThread'](_0x48c802);if(!_0x529948['isAttached']){const _0xa329c9=_0x529948['attachTo'](()=>this['_getTargetForId'](_0x529948['id']));_0x1fbd57['registerAnnotation'](_0xa329c9),_0x529948['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x9cc945=this['editor'],_0xa4372c=_0x9cc945['plugins']['get'](it);_0x9cc945['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x6a7bee,_0x35af37)=>{const {id:_0xb936ca}=er(_0x6a7bee['markerName']),_0x2da9a1=_0x9cc945['plugins']['get'](o)['getCommentThread'](_0xb936ca),_0x3d1d6e=this['activeMarker']&&er(this['activeMarker'])['id']===_0xb936ca;let _0x242113;if(_0x2da9a1&&_0x2da9a1['isResolved']&&!_0x3d1d6e&&_0x6a7bee['item'])return _0x35af37['consumable']['consume'](_0x6a7bee['item'],'addMarker:'+_0x6a7bee['markerName']),_0x35af37['consumable']['consume'](_0x6a7bee['item'],'removeMarker:'+_0x6a7bee['markerName']),null;const _0x3def3d=['ck-comment-marker'];return _0x3d1d6e&&_0x3def3d['push']('ck-comment-marker--active'),_0x242113=_0x2da9a1?.['length']?_0x2da9a1['comments']['first']['author']['id']:_0xa4372c['me']['id'],{'classes':_0x3def3d,'attributes':{'data-comment':_0xb936ca,'data-author-id':_0x242113}};}}),_0x9cc945['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2aee51,{options:_0x4f1f2f})=>{if(_0x4f1f2f['showCommentHighlights'])return null;const _0x1eef8c=_0x9cc945['plugins']['get'](o),_0x41dd34=_0x9cc945['model']['markers']['get'](_0x2aee51),{id:_0x50c83a,part:_0x5cedbb}=er(_0x2aee51);return _0x41dd34&&!_0x41dd34['affectsData']||_0x4f1f2f['ignoreResolvedComments']&&_0x1eef8c['getCommentThread'](_0x50c83a)?.['isResolved']?null:{'group':'comment','name':_0x5cedbb?_0x50c83a+':'+_0x5cedbb:_0x50c83a};}}),_0x9cc945['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x17b53f,{writer:_0x2e5864})=>_0x2e5864['createElement']('$marker',{'data-name':'comment:'+_0x17b53f['getAttribute']('id')})}),_0x9cc945['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x370863=this['editor'],_0x501928=_0x370863['plugins']['get'](o),_0x3b8513=new Set(),_0x4916d9=new Set();_0x370863['model']['document']['registerPostFixer'](_0x2e8d08=>{let _0x25fabb=!0x1;for(const {name:_0x2c74fb,data:_0x399311}of _0x370863['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2ead08,id:_0x479b66}=er(_0x2c74fb);let _0x363e63=_0x399311['newRange'];if('comment'!==_0x2ead08||!_0x363e63)continue;const _0x3400ea='$graveyard'===_0x363e63['root']['rootName'];_0x3400ea||(_0x363e63=dt(_0x363e63,_0x370863['model']),!_0x363e63||_0x363e63['isCollapsed']||!_0x399311['newRange']||_0x363e63['isEqual'](_0x399311['newRange']))?_0x370863['model']['hasContent'](_0x363e63)&&!_0x3400ea?this['isThreadsLoadingPaused']?_0x3b8513['add'](_0x2c74fb):this['_handleThreadMarker'](_0x2c74fb,_0x479b66):(_0x4916d9['add'](_0x2c74fb),_0x3b8513['delete'](_0x2c74fb),_0x2e8d08['removeMarker'](_0x2c74fb),_0x25fabb=!0x0):(_0x2e8d08['updateMarker'](_0x2c74fb,{'range':_0x363e63}),_0x25fabb=!0x0);}return _0x25fabb;}),this['on']('change:isThreadsLoadingPaused',(_0x39b089,_0x74e0c8,_0x5bf6f5)=>{if(!_0x5bf6f5&&_0x3b8513['size'])for(const _0x1e9f27 of _0x3b8513){const {id:_0xadf434}=er(_0x1e9f27);_0x3b8513['delete'](_0x1e9f27),_0x370863['model']['markers']['get'](_0x1e9f27)&&this['_handleThreadMarker'](_0x1e9f27,_0xadf434);}}),this['listenTo'](_0x370863['model']['document'],'change',()=>{for(const {name:_0x62c0e8,data:{newRange:_0x5bff52}}of _0x370863['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3479e5,id:_0x39cce2}=er(_0x62c0e8);if('comment'!==_0x3479e5)continue;const _0x2d62c0=_0x501928['getCommentThread'](_0x39cce2),_0x50120b=this['hasMarkerForId'](_0x39cce2);_0x2d62c0&&(!_0x2d62c0['_hasTargetInContent']&&_0x5bff52&&_0x370863['editing']['view']['once']('render',()=>{const _0x331f5f=_0x370863['plugins']['get'](O),_0x314dc5=_0x501928['_threadToController']['get'](_0x2d62c0)['view'];_0x331f5f['getByInnerView'](_0x314dc5)['refreshVisibility']();},{'priority':'low'}),_0x2d62c0['_hasTargetInContent']=_0x50120b||!!_0x5bff52),_0x5bff52||(_0x4916d9['add'](_0x62c0e8),_0x3b8513['delete'](_0x62c0e8));}for(const _0x330587 of _0x4916d9){const {id:_0x4245e9}=er(_0x330587),_0x5c6a15=_0x501928['getCommentThread'](_0x4245e9);if(_0x3b8513['delete'](_0x330587),!_0x5c6a15)continue;const _0x5b2acc=this['hasMarkerForId'](_0x4245e9);_0x5b2acc||_0x5c6a15['isSubmitted']?_0x5b2acc||_0x5c6a15['unlinkedAt']||_0x5c6a15['setUnlinkedAt'](new Date()):_0x5c6a15['remove']();}_0x4916d9['clear']();});}['_handleInitialThreads'](_0xc2ac3a){_0xc2ac3a['forEach'](_0x59343c=>{_0x59343c['unlinkedAt']&&this['_attachArchivedThread'](_0x59343c['id']);});}['_getTargetForId'](_0x463956){const _0x3ab285=this['editor'],_0x555653=this['getAllMarkersForId'](_0x463956);return et(_0x3ab285['editing'],_0x555653);}['_getTextContext'](_0x337fb0){const _0x45594f=this['getAllMarkersForId'](_0x337fb0);let _0x5eac24='',_0x2847a5=!0x1;for(const _0x3b3c9a of _0x45594f){const _0x53940c=_0x3b3c9a['getRange']();for(const _0x878e9f of Array['from'](_0x53940c['getItems']()))_0x878e9f['is']('$textProxy')?(_0x5eac24&&_0x2847a5&&(_0x5eac24+='\x20',_0x2847a5=!0x1),_0x5eac24+=_0x878e9f['data']):_0x2847a5=!0x0;_0x2847a5=!0x0;}return _0x5eac24['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x319e71,_0x10ef4d){const _0xe1cb2d=this['editor'],_0x2a8eef=_0xe1cb2d['plugins']['get'](o);let _0x23baa6=_0x2a8eef['getCommentThread'](_0x10ef4d);const _0x29ab1b=_0xe1cb2d['config']['get']('collaboration.channelId'),_0x3a2944=_0xe1cb2d['plugins']['get'](P);if(_0x23baa6&&(_0x23baa6['unlinkedAt']&&_0x23baa6['setUnlinkedAt'](null),_0x23baa6['isAttached']))return _0x23baa6;return!this['getAllMarkersForId'](_0x10ef4d)[0x0]['managedUsingOperations']?_0xe1cb2d['editing']['view']['once']('render',()=>{if(_0x2a8eef['getCommentThread'](_0x10ef4d))return;const _0xcd0b42=_0xe1cb2d['plugins']['get'](O);_0x23baa6=_0x2a8eef['openNewCommentThread']({'channelId':_0x29ab1b,'threadId':_0x10ef4d,'target':()=>this['_getTargetForId'](_0x10ef4d),'context':{'type':'text','value':this['_getTextContext'](_0x10ef4d)}});const _0x272a8d=_0x2a8eef['_threadToController']['get'](_0x23baa6)['view'],_0x27868c=_0xcd0b42['getByInnerView'](_0x272a8d);_0x27868c&&_0x3a2944['registerAnnotation'](_0x27868c);},{'priority':'low'}):_0x2a8eef['fetchCommentThread']({'channelId':_0x29ab1b,'threadId':_0x10ef4d})['then'](_0x32f5bc=>{if('destroyed'!==_0xe1cb2d['state']){if(_0x23baa6=_0x32f5bc,_0x23baa6&&!_0x23baa6['isAttached']){const _0x6f9b9c=_0x23baa6['attachTo'](()=>this['_getTargetForId'](_0x10ef4d));_0x3a2944['registerAnnotation'](_0x6f9b9c),_0x23baa6['isResolved']&&this['_reconvertMarkers'](_0x10ef4d);}else{if(!_0x23baa6){const _0x3a784b=this['getAllMarkersForId'](_0x10ef4d);_0xe1cb2d['model']['change'](_0x2e7082=>{for(const _0x496904 of _0x3a784b)_0x2e7082['removeMarker'](_0x496904);});}}}}),_0x23baa6;}['_handleThreadMarker'](_0x1f26ec,_0x384d88){const _0x5a2ae7=this['_attachMarkerToThread'](_0x1f26ec,_0x384d88);_0x5a2ae7&&!_0x5a2ae7['context']&&_0x5a2ae7['setContext']({'type':'text','value':this['_getTextContext'](_0x384d88)});}['_initAriaMarkerChangeAnnouncements'](){const _0x494052=this['editor'];ot(_0x494052['model'],({left:_0x21346a,entered:_0x3e1f07})=>{for(const _0x50a0f5 of _0x21346a)if(mt(_0x50a0f5)){_0x494052['ui']['ariaLiveAnnouncer']['announce'](E(_0x494052['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4b3926 of _0x3e1f07)if(mt(_0x4b3926)){_0x494052['ui']['ariaLiveAnnouncer']['announce'](E(_0x494052['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x3621fc)));break;}});}}function ft(_0x388986,_0x5b79d5){return _0x5b79d5?_0x388986+':'+_0x5b79d5:_0x388986;}function er(_0x239992){const _0xac46c9=_0x239992['split'](':');return{'group':_0xac46c9[0x0],'id':_0xac46c9[0x1],'part':_0xac46c9[0x2]};}function dt(_0x21bf50,_0x270a75){const _0x58617a=_0x270a75['schema'],_0x3ab495=_0x270a75['createRange'](_0x21bf50['start']);for(const _0x268e3 of _0x21bf50['getWalker']()){const {type:_0x1e16d2,item:_0x2e536a,nextPosition:_0x3625fa}=_0x268e3;if('text'===_0x1e16d2||_0x58617a['isObject'](_0x2e536a)){const _0x39a922=_0x270a75['createPositionBefore'](_0x2e536a);_0x3ab495['isCollapsed']&&(_0x3ab495['start']=_0x39a922),_0x3ab495['end']=_0x3625fa;}}return _0x3ab495;}function mt(_0x59bd00){return'comment'===er(_0x59bd00['name'])['group'];}class i extends _0x51209d{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x4e3b99=this['editor'],_0x23ed2f=_0x4e3b99['plugins']['get'](o),_0x176a1c=_0x4e3b99['plugins']['get'](r),_0x572aca=_0x4e3b99['plugins']['get'](O),_0x5c9349=_0x4e3b99['plugins']['get'](P);_0x4e3b99['ui']['componentFactory']['add']('comment',()=>{const _0x527780=this['_createUIButton'](_0x3f387b);return _0x527780['tooltip']=!0x0,_0x527780;}),_0x4e3b99['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x370a9d)),_0x5c9349['addSourceCollector'](()=>{const _0x4b5929=[];for(const [_0x1b9408,_0x371792]of _0x23ed2f['_threadToController']){const _0x1a83e6=_0x176a1c['getAllMarkersForId'](_0x1b9408['id']),_0x2def5a=_0x1a83e6['map'](_0x3b4072=>_0x3b4072['getRange']());_0x1a83e6['length']>0x0&&_0x4b5929['push']([_0x371792['view'],_0x2def5a]);}return _0x4b5929;}),this['listenTo'](_0x572aca,'change:activeAnnotations',(_0x2ea590,_0x916173,_0x27914a)=>{const _0x27a693=Array['from'](_0x27914a)['map'](_0x5e17a8=>_0x5e17a8['innerView'])['find'](_0x5eebb4=>_0x23ed2f['_viewToController']['has'](_0x5eebb4));if(!_0x27a693)return void(_0x176a1c['activeMarker']=null);const _0x2de179=_0x23ed2f['_viewToController']['get'](_0x27a693)['model']['id'],_0x33de19='comment:'+_0x2de179;_0x2de179&&_0x176a1c['hasMarkerForId'](_0x2de179)?_0x176a1c['activeMarker']=_0x33de19:_0x176a1c['activeMarker']&&(_0x176a1c['activeMarker']=null);}),this['listenTo'](_0x23ed2f,'removeCommentThread',(_0x28dbd1,{threadId:_0x225c55,isFromAdapter:_0x33abb9})=>{!_0x33abb9&&_0x4e3b99['ui']['focusTracker']['isFocused']&&_0x176a1c['hasMarkerForId'](_0x225c55)&&_0x4e3b99['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x23ed2f,'addComment',(_0x38267f,{threadId:_0x23c478,isFromAdapter:_0x55bd7b})=>{if(_0x55bd7b||!_0x176a1c['hasMarkerForId'](_0x23c478)||!_0x23ed2f['hasCommentThread'](_0x23c478))return;0x1===_0x23ed2f['getCommentThread'](_0x23c478)['length']&&(_0x4e3b99['editing']['view']['focus'](),_0x38267f['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x24b630=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4ebb54;for(const _0x321501 in _0x24b630){const _0x4af5e2=_0x321501,_0x379bec=_0x24b630[_0x4af5e2];if('commentsLicenseKeyValid'==_0x379bec||'commentsLicenseKeyInvalid'==_0x379bec||'commentsLicenseKeyExpired'==_0x379bec||'commentsLicenseKeyDomainLimit'==_0x379bec||'commentsLicenseKeyNotAllowed'==_0x379bec||'commentsLicenseKeyEvaluationLimit'==_0x379bec||'commentsLicenseKeyTrialLimit'==_0x379bec||'commentsLicenseKeyUsageLimit'==_0x379bec){delete _0x24b630[_0x4af5e2],_0x4ebb54=_0x379bec,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4ebb54&&_0x24b630['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4ebb54&&_0x24b630['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4ebb54&&_0x24b630['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4ebb54&&_0x24b630['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4ebb54&&_0x24b630['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x4ebb54&&_0x24b630['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x4ebb54&&_0x24b630['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x49179d){const _0x14747c=this['editor'],_0x403fca=new _0x49179d(_0x14747c['locale']),_0x24a177=_0x14747c['commands']['get']('addCommentThread');return _0x403fca['set']({'label':E(_0x14747c['locale'],'Comment'),'icon':_0x40f967}),_0x403fca['bind']('isEnabled')['to'](_0x24a177),this['listenTo'](_0x403fca,'execute',()=>{_0x24a177['execute']();}),_0x403fca;}}class s extends _0x51209d{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2ce8f8){super(_0x2ce8f8),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x17a769,_0x5cb691,_0x1007e6)=>{_0x1007e6?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x3cea71,_0x102c30]of this['editor']['commands'])_0x102c30['affectsData']&&'addCommentThread'!==_0x3cea71&&_0x102c30['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1cb508=this['editor']['editing']['view']['document'];this['listenTo'](_0x1cb508,'cut',_0x351511=>_0x351511['stop'](),{'priority':'highest'}),this['listenTo'](_0x1cb508,'clipboardInput',_0xd79f2=>_0xd79f2['stop'](),{'priority':'highest'}),this['listenTo'](_0x1cb508,'delete',_0x3258ac=>_0x3258ac['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x41cf17,_0x2fc954]of this['editor']['commands'])_0x2fc954['affectsData']&&'addCommentThread'!==_0x41cf17&&_0x2fc954['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x4d0391{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x23c62d){super(_0x23c62d),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4be358=this['context']['plugins']['get'](O);this['listenTo'](_0x4be358,'_activateAnnotation',(_0x3aad09,_0x234880)=>{for(const _0x617826 of this['activeUIs']){const _0x2c4bab=this['_uis']['get'](_0x617826);(0x0,this['uisData']['get'](_0x617826)['filter'])(_0x234880)&&_0x2c4bab['setActiveAnnotation'](_0x234880);}}),this['listenTo'](_0x4be358,'_deactivateAllAnnotations',()=>{for(const _0x27cb1c of this['activeUIs']){this['_uis']['get'](_0x27cb1c)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4be358['_visibleAnnotations'],'add',(_0x4ef824,_0x2ec401)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2ec401);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1521ff){return this['activeUIs']['has'](_0x1521ff);}['activate'](_0x5436c7,_0x97b7b=this['defaultFilter']){const _0x914802=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x5436c7))throw new _0x3b0292('annotationsuis-missing-ui',this,{'uiName':_0x5436c7});this['isActive'](_0x5436c7)&&this['deactivate'](_0x5436c7),this['activeUIs']['add'](_0x5436c7);const _0x340a45=new _();!function({source:_0x20b5dc,target:_0x5b2691,filter:_0x56496b}){for(const _0x241d85 of _0x20b5dc)_0x56496b(_0x241d85)&&_0x5b2691['add'](_0x241d85);_0x5b2691['listenTo'](_0x20b5dc,'add',(_0x5da73c,_0x8f4fd3)=>{_0x56496b(_0x8f4fd3)&&_0x5b2691['add'](_0x8f4fd3);}),_0x5b2691['listenTo'](_0x20b5dc,'remove',(_0x35af02,_0x1b1adb)=>{_0x5b2691['has'](_0x1b1adb)&&_0x5b2691['remove'](_0x1b1adb);});}({'source':_0x914802['_visibleAnnotations'],'target':_0x340a45,'filter':_0x97b7b}),this['uisData']['set'](_0x5436c7,{'collection':_0x340a45,'filter':_0x97b7b});const _0x26b16d=this['_uis']['get'](_0x5436c7);_0x26b16d['attach'](_0x340a45),this['listenTo'](_0x26b16d,'change:activeAnnotation',(_0x38b316,_0x166981,_0x368d60,_0x30fdc1)=>{_0x30fdc1&&_0x914802['_removeActiveAnnotation'](_0x30fdc1),_0x368d60&&_0x914802['_addActiveAnnotation'](_0x368d60);});}['deactivate'](_0x235852){if(this['activeUIs']['delete'](_0x235852),!this['_uis']['has'](_0x235852))throw new _0x3b0292('annotationsuis-missing-ui',this,{'uiName':_0x235852});const _0x29f64c=this['_uis']['get'](_0x235852);_0x29f64c['detach'](),this['stopListening'](_0x29f64c),this['uisData']['get'](_0x235852)['collection']['destroy'](),this['uisData']['delete'](_0x235852);}['switchTo'](_0x1ff6fe){if(!this['_uis']['has'](_0x1ff6fe))throw new _0x3b0292('annotationsuis-missing-ui',this,{'uiName':_0x1ff6fe});const _0x514188=this['context']['plugins']['get'](O),_0x17a85a=Array['from'](_0x514188['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1ff6fe);const _0x4271c4=this['_uis']['get'](_0x1ff6fe);_0x4271c4['setActiveAnnotation'](_0x17a85a),_0x4271c4['_setSelectedAnnotations']&&_0x17a85a&&_0x4271c4['_setSelectedAnnotations']([_0x17a85a]);}['deactivateAll'](){for(const _0x1d943b of this['activeUIs'])this['deactivate'](_0x1d943b);}['register'](_0x4057b8,_0x1385c9){if(this['_uis']['has'](_0x4057b8))throw new _0x3b0292('annotationsuis-register-already-registered');if('function'!=typeof _0x1385c9['attach']||'function'!=typeof _0x1385c9['detach']||'function'!=typeof _0x1385c9['setActiveAnnotation'])throw new _0x3b0292('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4057b8,_0x1385c9);}['refilterAnnotations'](){const _0x34e74d=this['context']['plugins']['get'](O)['collection'],_0x3edac4=new Map(),_0x39f9e9=Array['from'](this['activeUIs']);for(const _0x17bf4c of this['activeUIs']){const _0xb6f4b6=this['uisData']['get'](_0x17bf4c)['collection'];for(const _0x5682fc of _0xb6f4b6)_0x3edac4['set'](_0x5682fc,_0x17bf4c);}for(const _0x365611 of _0x34e74d){const _0x51aa7d=_0x3edac4['get'](_0x365611);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x365611);const _0x13f86b=_0x39f9e9['find'](_0x32ae09=>this['uisData']['get'](_0x32ae09)['filter'](_0x365611));_0x51aa7d!==_0x13f86b&&(_0x51aa7d&&this['uisData']['get'](_0x51aa7d)['collection']['remove'](_0x365611),_0x13f86b&&this['uisData']['get'](_0x13f86b)['collection']['add'](_0x365611));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x429d1a){const _0x148137=[];for(const _0x58c551 of this['activeUIs']){(0x0,this['uisData']['get'](_0x58c551)['filter'])(_0x429d1a)&&_0x148137['push'](_0x58c551);}if(_0x148137['length']>0x1)throw new _0x3b0292('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x148137,'annotationType':_0x429d1a['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2e32f1){super(_0x2e32f1);const _0x23fc81=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 _0x29f230(),this['focusCycler']=new _0x8029a4({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x23fc81['to']('class')],'style':{'minHeight':_0x23fc81['to']('minHeight',_0x57946=>'number'==typeof _0x57946?pi(_0x57946+0xa):null)},'dir':_0x2e32f1['uiLanguageDirection'],'role':'application','aria-label':E(_0x2e32f1,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x2e32f1,'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',_0x3f2133=>{this['_updateItemPositionInFocusables'](_0x3f2133['source']);}),this['list']['forEach'](_0x4b2bc9=>{this['focusTracker']['add'](_0x4b2bc9['element']),this['_updateItemPositionInFocusables'](_0x4b2bc9);}),this['list']['on']('change',(_0x4630f7,_0x457b95)=>{for(const _0x103627 of _0x457b95['removed'])this['focusTracker']['remove'](_0x103627['element']),this['focusables']['remove'](_0x103627);for(const _0x53c571 of _0x457b95['added'])this['focusTracker']['add'](_0x53c571['element']),this['_updateItemPositionInFocusables'](_0x53c571);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x285f1e){const _0x377525=this['focusables']['getIndex'](_0x285f1e);let _0x42f22b,_0x58091e;for(const _0x1e2f62 of this['focusables'])if(_0x285f1e['top']<_0x1e2f62['top']){_0x42f22b=_0x1e2f62;break;}if(_0x58091e=_0x42f22b?this['focusables']['getIndex'](_0x42f22b):this['focusables']['length'],-0x1!==_0x377525){if(_0x377525===_0x58091e-0x1)return;this['focusables']['remove'](_0x285f1e),_0x58091e=_0x42f22b?this['focusables']['getIndex'](_0x42f22b):this['focusables']['length'];}this['focusables']['add'](_0x285f1e,_0x58091e);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x154092){super(_0x154092),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x121e2d,_0x4c65f6)=>_0x121e2d+_0x4c65f6),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2574ce=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2574ce['to']('isAnimationDisabled',_0x338a73=>_0x338a73?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2574ce['to']('top',_0x1454ad=>Ht(_0x1454ad))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x345f02=this['element']['clientHeight'];_0x345f02&&(this['height']=_0x345f02);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4d0391{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d8246){super(_0x4d8246),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 _0x326710=this['context']['config']['get']('sidebar.container');_0x326710&&this['setContainer'](_0x326710);}['setContainer'](_0x5c8839){if(!y(_0x5c8839))throw new _0x3b0292('sidebar-setcontainer-invalid-element');this['container']=_0x5c8839;}['_attachToContainer']({viewClass:_0x11eac4='',spaceBetweenItems:_0x57c27c=0x19}={}){if(!y(this['container']))throw new _0x3b0292('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x11eac4,this['_spaceBetweenItems']=_0x57c27c;}['rearrange']({removedAnnotation:_0xf4ff95,previousAnnotation:_0x405a36,nextAnnotation:_0x54887f}){const _0xa3f19d=this['getSidebarItemView'](_0xf4ff95);this['view']['list']['remove'](_0xa3f19d),this['_destroySidebarItemView'](_0xf4ff95),_0x405a36&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x405a36)),_0x54887f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x54887f)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1f0488,activatedAnnotation:_0x579599,disableAnimationOnActivatedAnnotation:_0x160e71}){if(this['_activeAnnotation']=_0x579599,_0x1f0488){_0x1f0488['isActive']=!0x1;const _0x1a5a80=this['getSidebarItemView'](_0x1f0488);_0x1a5a80&&_0x160e71&&(_0x1a5a80['isAnimationDisabled']=!0x1);}if(_0x579599){const _0x4d674d=this['getSidebarItemView'](_0x579599);_0x4d674d&&(_0x579599['isActive']=!0x0,_0x160e71&&(_0x4d674d['isAnimationDisabled']=!0x0,_0x4d674d['top']+=0x1),this['_alignToTargetRect'](_0x4d674d));}}['_detachFromContainer'](_0x11ea78){if(this['view']['element']['remove'](),_0x11ea78){for(const _0x4363ce of _0x11ea78)this['_destroySidebarItemView'](_0x4363ce);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xbeb062,_0x43c2e8){_0x43c2e8||(_0x43c2e8=_0xbeb062['view']);const _0x3bdd0f=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3bdd0f,_0xbeb062),this['_annotationToSidebarItemView']['set'](_0xbeb062,_0x3bdd0f),_0x3bdd0f['content']['add'](_0x43c2e8),this['listenTo'](_0xbeb062['view'],'change:targetRect',(_0x57e025,_0x3ba329,_0x3b02ff)=>{const _0x384fae=this['_getTargetTop'](_0xbeb062,_0x3b02ff);_0x3bdd0f['_targetTop']!=_0x384fae&&(_0x3bdd0f['_targetTop']=_0x384fae,this['_setItemTop'](_0x3bdd0f,_0x384fae));}),this['listenTo'](_0x3bdd0f,'change:top',()=>{this['_recalculate'](_0x3bdd0f,'top');}),this['listenTo'](_0x3bdd0f,'change:bottom',()=>{this['_recalculate'](_0x3bdd0f,'bottom');}),this['_alignToTargetRect'](_0x3bdd0f);const _0x548c13=this['_getItemBefore'](_0x3bdd0f);if(_0x548c13)this['_alignAfterItem'](_0x548c13,_0x3bdd0f)||this['_alignToTargetRect'](_0x3bdd0f);else this['_alignToTargetRect'](_0x3bdd0f);return this['_updateLastItem'](),this['view']['list']['add'](_0x3bdd0f),_0x3bdd0f;}['_alignForTopChange'](_0x3e1d74){if(!_0x3e1d74['content']['length'])return;const _0x7cebc6=this['_getItemBefore'](_0x3e1d74);if(!_0x7cebc6)return;const _0x316e5a=this['_sidebarItemViewToAnnotation']['get'](_0x7cebc6),_0x156942=this['_activeAnnotation'];_0x156942&&_0x156942===_0x316e5a?this['_alignAfterItem'](_0x7cebc6,_0x3e1d74):this['_alignBeforeItem'](_0x3e1d74,_0x7cebc6);}['_alignForBottomChange'](_0x2d407f){if(!_0x2d407f['content']['length'])return;const _0x326ee0=this['_getItemAfter'](_0x2d407f);if(!_0x326ee0)return;const _0x5ded4b=this['_sidebarItemViewToAnnotation']['get'](_0x326ee0),_0x57a012=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5b68b0=this['_activeAnnotation'];_0x5b68b0&&_0x5b68b0===_0x5ded4b&&_0x57a012?(this['_alignBeforeItem'](_0x326ee0,_0x2d407f),this['_alignAfterItem'](_0x2d407f,_0x326ee0)):_0x5b68b0&&_0x5b68b0===_0x5ded4b?this['_alignBeforeItem'](_0x326ee0,_0x2d407f):this['_alignAfterItem'](_0x2d407f,_0x326ee0);}['_recalculate'](_0x18a13a,_0x4416be){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x553877,changedProp:_0x563c9a}of this['_recalculateBuffer'])'top'===_0x563c9a?this['_alignForTopChange'](_0x553877):this['_alignForBottomChange'](_0x553877);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x18a13a,'changedProp':_0x4416be});}['getSidebarItemView'](_0x3a41c5){return this['_annotationToSidebarItemView']['get'](_0x3a41c5);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x32e587){const _0x2452fb=this['getSidebarItemView'](_0x32e587);this['stopListening'](_0x2452fb),this['stopListening'](_0x32e587['view']),_0x2452fb['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x32e587),this['_sidebarItemViewToAnnotation']['delete'](_0x2452fb);}['_createSidebarView'](){const _0x538a67=new F(this['context']['locale']);return _0x538a67['render'](),this['on']('change:_lastItem',(_0x21334d,_0x313359,_0x4f566c,_0x32e299)=>{_0x32e299&&_0x538a67['unbind']('minHeight'),_0x4f566c?_0x538a67['bind']('minHeight')['to'](_0x4f566c,'bottom'):_0x538a67['minHeight']=null;}),_0x538a67;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x1d6018){const _0x43f478=this['_sidebarItemViewToAnnotation']['get'](_0x1d6018),_0x313af0=_0x43f478&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x43f478)-0x1);return _0x313af0&&this['getSidebarItemView'](_0x313af0)||null;}['_getItemAfter'](_0xd86084){const _0x55813a=this['_sidebarItemViewToAnnotation']['get'](_0xd86084),_0x366f8a=_0x55813a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x55813a)+0x1);return _0x366f8a&&this['getSidebarItemView'](_0x366f8a)||null;}['_alignBeforeItem'](_0x62d42d,_0x3e3a49){_0x62d42d['updateHeight']();const _0x12b1ad=R(_0x3e3a49['bottom']+this['_spaceBetweenItems'],_0x62d42d['top']);return!!_0x12b1ad&&(this['_setItemTop'](_0x3e3a49,_0x3e3a49['top']-_0x12b1ad),!0x0);}['_alignAfterItem'](_0x5ee42d,_0x53dda1){_0x5ee42d['updateHeight']();const _0x3d8972=R(_0x5ee42d['bottom']+this['_spaceBetweenItems'],_0x53dda1['top']);return!!_0x3d8972&&(this['_setItemTop'](_0x53dda1,_0x53dda1['top']+_0x3d8972,!0x1),!0x0);}['_alignToTargetRect'](_0x4a085b){const _0x3001de=this['_sidebarItemViewToAnnotation']['get'](_0x4a085b);if(!_0x3001de||!_0x3001de['target']||!_0x3001de['targetRect'])return;const _0x4e31bd=this['_getTargetTop'](_0x3001de,_0x3001de['targetRect']);this['_setItemTop'](_0x4a085b,_0x4e31bd);}['_getTargetTop'](_0xca78fd,_0x2b1dc5){if(null===_0x2b1dc5)return 0x0;if(_0xca78fd['target']instanceof _0x597a13)return _0x2b1dc5['top'];{const _0x1fec69=new _0x597a13(this['view']['element'])['top'];return _0x2b1dc5['top']-_0x1fec69;}}['_setItemTop'](_0x3e514f,_0x321046,_0x2a060f=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2a060f&&(_0x321046=Math['max'](_0x321046,this['_getMaxAvailableTop'](_0x3e514f))),_0x3e514f['top']=_0x321046;}['_getMaxAvailableTop'](_0x4c5c52){let _0x328030=this['_getItemBefore'](_0x4c5c52),_0x132d42=0x0;for(;_0x328030;)_0x328030['updateHeight'](),_0x132d42+=this['_spaceBetweenItems']+_0x328030['height'],_0x328030=this['_getItemBefore'](_0x328030);return _0x132d42;}}function R(_0xe0b3e0,_0xeb4f4d){return Math['max'](_0xe0b3e0-_0xeb4f4d,0x0);}function y(_0x50f632){return null!==_0x50f632&&'object'==typeof _0x50f632&&0x1===_0x50f632['nodeType'];}class e extends _0x4d0391{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1291bb){super(_0x1291bb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3eedb8(),this['_refreshPositioningDebounced']=_0x4724d7(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x539072=this['context']['plugins']['get'](M),_0x1d187b=this['context']['plugins']['get'](z);_0x539072['register']('wideSidebar',this),_0x1d187b['container']&&_0x539072['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2da0d1){if(_0x2da0d1===this['activeAnnotation'])return;const _0x51519b=this['context']['plugins']['get'](z);_0x51519b['_activeAnnotation']=_0x2da0d1;const _0xf3533d=this['activeAnnotation'];_0x51519b['refresh']({'blurredAnnotation':_0xf3533d,'activatedAnnotation':_0x2da0d1}),this['activeAnnotation']=_0x2da0d1;}['attach'](_0x2e8010){this['annotations']=_0x2e8010;const _0x54e193=this['context']['plugins']['get'](z);if(_0x54e193['_annotations']=_0x2e8010,this['isAttached'])throw new _0x3b0292('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x54e193,'set:container',()=>{this['detach'](),this['listenTo'](_0x54e193,'change:container',_0x4557f7=>{_0x4557f7['off'](),this['attach'](_0x2e8010);});}),_0x54e193['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x230f4f=_0x5ba389=>{_0x5ba389['updateTargetRect'](),_0x54e193['addAnnotation'](_0x5ba389);};for(const _0x59f892 of _0x2e8010)_0x230f4f(_0x59f892);this['listenTo'](_0x2e8010,'add',(_0x3dc2cb,_0x16d3cf)=>{_0x230f4f(_0x16d3cf);}),this['listenTo'](_0x2e8010,'remove',(_0x15fa16,_0x2e4a51,_0x2f1f2d)=>{_0x54e193['rearrange']({'removedAnnotation':_0x2e4a51,'previousAnnotation':_0x2e8010['get'](_0x2f1f2d-0x1),'nextAnnotation':_0x2e8010['get'](_0x2f1f2d+0x1)}),_0x2e4a51===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2e8010,'focus',(_0xc34871,_0x35319c)=>{this['setActiveAnnotation'](_0x35319c);}),this['listenTo'](_0x2e8010,'blur',()=>{this['setActiveAnnotation'](null);});const _0x45b7d0=this['context']instanceof _0x16f11a?this['context']['editors']:new _0x3eedb8([this['context']]);for(const _0x282a30 of _0x45b7d0)this['_integrateWithEditorAnnotations'](_0x282a30);this['listenTo'](_0x45b7d0,'add',(_0x4821c9,_0x2f8ab5)=>{this['listenTo'](_0x2f8ab5,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2f8ab5);});}),this['listenTo'](_0x45b7d0,'remove',(_0x52ef2c,_0xf33dc5)=>{_0xf33dc5['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xf33dc5['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3b0292('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xada6fa=this['context']['plugins']['get'](z);_0xada6fa['_detachFromContainer'](this['annotations']),this['stopListening'](_0xada6fa),this['stopListening'](this['annotations']),this['context']instanceof _0x16f11a&&this['stopListening'](this['context']['editors']);for(const _0x2419f9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2419f9);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x493bc2){if(!_0x493bc2['plugins']['has']('EditorAnnotations'))return;const _0x2f26e4=_0x493bc2['plugins']['get']('EditorAnnotations'),_0x5fd2d1=()=>{const _0x30b5c7=_0x2f26e4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x30b5c7[0x0]||null);};this['listenTo'](_0x2f26e4,'refresh',_0x5fd2d1),this['listenTo'](_0x2f26e4,'blur',(_0x33fee8,{isAnnotationTracked:_0x1ed41f})=>{this['activeAnnotation']&&_0x1ed41f(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2f26e4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x159676=>{_0x2f26e4['hasDomSelection']()&&(_0x5fd2d1(),_0x159676['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2f26e4);}['_destroyEditorAnnotationsIntegration'](_0x39213d){this['stopListening'](_0x39213d),this['_editorAnnotations']['remove'](_0x39213d);}}class C extends _0x3f387b{['counterView'];constructor(_0xbda410){super(_0xbda410);const _0x153de5=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3a0a3d,_0xb05bf8)=>_0x3a0a3d?'...':_0xb05bf8['toString']()),this['set']('annotationType',''),this['icon']=_0x40f967,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x153de5['to']('annotationType',_0x57eb2f=>'ck-annotation-counter__badge--'+_0x57eb2f),_0x153de5['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x153de5['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4d0391{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5ae1aa){super(_0x5ae1aa),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x56e90a),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3eedb8(),this['_refreshPositioningDebounced']=_0x4724d7(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x432c40(this['context']['locale']),this['balloonPanelView']=new _0x46863b(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x570499){this['annotations']=_0x570499;const _0x47c569=this['context']['plugins']['get'](z),_0x175296=this['balloonPanelView'];if(_0x47c569['_annotations']=_0x570499,this['isAttached'])throw new _0x3b0292('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x47c569,'set:container',()=>{this['detach'](),this['listenTo'](_0x47c569,'change:container',_0x5b811d=>{_0x5b811d['off'](),this['attach'](_0x570499);});}),_0x47c569['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x36ad14=_0x52f800=>{const _0x58d5fc=new C(this['context']['locale']);_0x47c569['addAnnotation'](_0x52f800,_0x58d5fc),this['_annotationToNarrowView']['set'](_0x52f800,_0x58d5fc),_0x58d5fc['bind']('isDirty','annotationType','number')['to'](_0x52f800['view'],'isDirty','type','length'),_0x58d5fc['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x175296['content']['first']!==_0x52f800['view']?(this['_showBalloon'](_0x52f800),_0x52f800['view']['element']['focus'](),this['setActiveAnnotation'](_0x52f800)):this['setActiveAnnotation'](null);});};for(const _0x1d6734 of _0x570499)_0x36ad14(_0x1d6734);this['listenTo'](_0x570499,'add',(_0x423ae9,_0x4ef860)=>{_0x36ad14(_0x4ef860);}),this['listenTo'](_0x570499,'remove',(_0xdc18c5,_0x5d5544,_0x429448)=>{this['_annotationToNarrowView']['get'](_0x5d5544)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5d5544),_0x47c569['rearrange']({'removedAnnotation':_0x5d5544,'previousAnnotation':_0x570499['get'](_0x429448-0x1),'nextAnnotation':_0x570499['get'](_0x429448+0x1)}),_0x5d5544===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x570499,'focus',(_0x2e918c,_0x5a1d93)=>{this['setActiveAnnotation'](_0x5a1d93);}),this['listenTo'](_0x570499,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x535a0a,_0x2e9589)=>{_0x2e9589['keyCode']===_0x10e4b0['esc']&&_0x175296['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x175296['content']['first']),this['_hideBalloon'](),_0x2e9589['stopPropagation'](),_0x2e9589['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x42d448,_0x79ae21)=>{const _0x1d2b36=_0x79ae21['target'];_0x175296['isVisible']&&_0x175296['element']['contains'](_0x1d2b36)||_0x47c569['view']['element']['contains'](_0x1d2b36)||_0x42d448['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4550ea=>_0x4550ea['contains'](_0x1d2b36))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x6f3016=this['context']instanceof _0x16f11a?this['context']['editors']:new _0x3eedb8([this['context']]);for(const _0xba8ff3 of _0x6f3016)this['_integrateWithEditorAnnotations'](_0xba8ff3);this['listenTo'](_0x6f3016,'add',(_0x4b9370,_0x45a30b)=>{this['listenTo'](_0x45a30b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x45a30b);});}),this['listenTo'](_0x6f3016,'remove',(_0x472b43,_0x2f2629)=>{_0x2f2629['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2f2629['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5b9d7b){if(_0x5b9d7b===this['activeAnnotation'])return;const _0x294be6=this['context']['plugins']['get'](z);if(_0x294be6['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5b9d7b,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5b9d7b)_0x294be6['getSidebarItemView'](_0x5b9d7b)?this['_showBalloon'](_0x5b9d7b):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5b9d7b;}['detach'](){if(!this['isAttached'])throw new _0x3b0292('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x294838=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1d14dc=>_0x1d14dc['destroy']()),this['_annotationToNarrowView']['clear'](),_0x294838['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x16f11a&&this['stopListening'](this['context']['editors']);for(const _0x1453cd of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1453cd);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'](_0x2fadf6){if(!_0x2fadf6['plugins']['has']('EditorAnnotations'))return;const _0x2ed371=_0x2fadf6['plugins']['get']('EditorAnnotations'),_0x1eeca9=this['context']['plugins']['get'](z),_0x1e14ff=this['annotations'],_0x3312bb=this['balloonPanelView'],_0x10d2f2=()=>{const _0x556380=_0x2ed371['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x556380),this['setActiveAnnotation'](_0x556380[0x0]||null);};this['listenTo'](_0x2ed371,'refresh',_0x10d2f2),this['listenTo'](_0x2ed371,'blur',(_0x264dc0,{isAnnotationTracked:_0x40f976})=>{this['activeAnnotation']&&_0x40f976(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2ed371,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1e14ff,'blur',_0x1c7847=>{_0x2ed371['hasDomSelection']()&&_0x1c7847['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4d33e6,_0x1629a3)=>{const _0x1d3d0b=_0x1629a3['target'];_0x3312bb['isVisible']&&_0x3312bb['element']['contains'](_0x1d3d0b)||_0x1eeca9['view']['element']['contains'](_0x1d3d0b)||this['activeAnnotation']&&_0x2ed371['hasDomSelection']()&&(_0x10d2f2(),_0x4d33e6['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2ed371);}['_destroyEditorAnnotationsIntegration'](_0x4b4cb0){_0x4b4cb0&&(this['stopListening'](_0x4b4cb0),this['_editorAnnotations']['remove'](_0x4b4cb0));}['_setSelectedAnnotations'](_0x2a473d){for(const _0xf8c0d of this['_selectedAnnotations'])_0x2a473d['includes'](_0xf8c0d)||this['_manuallyClosedAnnotationViews']['delete'](_0xf8c0d['view']);this['_selectedAnnotations']=_0x2a473d;}['_refreshPositioning'](){const _0x34e58a=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x34e58a['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3a7994){if(this['_manuallyClosedAnnotationViews']['has'](_0x3a7994['view']))return;const _0x5cf204=this['balloonPanelView']['content']['first'];_0x5cf204!==_0x3a7994['view']?(_0x5cf204&&this['_detachListeners'](_0x5cf204),this['_attachListeners'](_0x3a7994['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3a7994['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x250d0c=this['balloonPanelView']['content']['first'],_0x41f48d=_0x250d0c&&this['annotations']['getByView'](_0x250d0c);if(!_0x41f48d||!this['_annotationToNarrowView']['has'](_0x41f48d))return;const _0x51aab7=this['_annotationToNarrowView']['get'](_0x41f48d)['element'],_0x715e55=(function(){const _0x28753b=_0x46863b['defaultPositions'];return[_0x28753b['southArrowNorthEast'],_0x28753b['northArrowSouthEast'],_0x28753b['southArrowNorth'],_0x28753b['northArrowSouth'],_0x28753b['southArrowNorthWest'],_0x28753b['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x51aab7,'positions':_0x715e55});}['_hideBalloon'](){const _0x31d493=this['balloonPanelView'],_0x159fdf=_0x31d493['content']['first'];_0x159fdf&&(this['_detachListeners'](_0x159fdf),_0x31d493['unpin'](),_0x31d493['content']['clear']());}['_attachListeners'](_0x3cee2c){this['listenTo'](_0x3cee2c,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3cee2c,'Esc',(_0x212383,_0x2baa8a)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3cee2c),this['_hideBalloon'](),_0x2baa8a();});}['_detachListeners'](_0x356d01){this['stopListening'](_0x356d01);}}class c extends _0x51209d{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x4831a8,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xfb5a2e){super(_0xfb5a2e),_0xfb5a2e['editing']['view']['addObserver'](_0x1d8e6f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xfb5a2e['plugins']['get'](_0x4831a8),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x5f381c=this['editor']['plugins']['get'](M);_0x5f381c['context']===this['editor']&&(_0x5f381c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x41b912,_0x135825)=>{const _0x34bc21=this['_balloon'];if(this['isAttached']&&_0x34bc21['visibleView']){const _0x3ae432=this['annotations']['getByView'](_0x34bc21['visibleView']);_0x3ae432&&this['_closeAnnotation'](_0x3ae432),_0x135825();}}));}['afterInit'](){const _0x2d7de0=this['editor']['plugins']['get'](M);_0x2d7de0['context']===this['editor']&&(_0x2d7de0['hasActive']()||_0x2d7de0['switchTo']('inline'));}['setActiveAnnotation'](_0x531788){_0x531788!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x531788&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x531788)&&this['_addAnnotationToBalloon'](_0x531788,!0x0),_0x531788['isActive']=!0x0),_0x531788||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x531788);}['attach'](_0xc8e95){this['annotations']=_0xc8e95;const _0x355324=this['editor']['plugins']['get'](M),_0x5ba547=this['_balloon'];if(this['isAttached'])throw new _0x3b0292('inlineannotations-attach-already-attached',this);if(_0x355324['context']!==this['editor'])throw new _0x3b0292('inlineannotations-not-allowed-with-context',this);const _0x2e2168=this['editor']['plugins']['get'](P);this['listenTo'](_0x2e2168,'refresh',()=>{const _0x2956df=_0x2e2168['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x539c26,_0x562c77;!this['_forceRefresh']&&(_0x539c26=_0x2956df,_0x562c77=this['_selectedAnnotations'],_0x539c26['length']===_0x562c77['length']&&_0x539c26['every'](_0x54e469=>_0x562c77['includes'](_0x54e469)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2956df),this['setActiveAnnotation'](_0x2956df[0x0]||null));}),this['listenTo'](_0x2e2168,'blur',(_0x36ad36,{isAnnotationTracked:_0x262eaf})=>{this['activeAnnotation']&&_0x262eaf(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2a23c6,_0x3df146,_0x26b5fb)=>{_0x26b5fb||this['setActiveAnnotation'](null);}),this['listenTo'](_0xc8e95,'remove',(_0x23502a,_0x160008)=>{this['_removeAnnotationFromBalloon'](_0x160008),_0x160008===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5ba547,'change:visibleView',(_0x5d566c,_0x1426fb,_0x4ed8b6,_0x5b53f6)=>{_0x5b53f6&&this['stopListening'](_0x5b53f6);const _0x19b5a2=_0xc8e95['getByView'](_0x4ed8b6);_0x4ed8b6&&_0x19b5a2&&(this['listenTo'](_0x4ed8b6,'change:height',()=>{_0x5ba547['updatePosition']();}),this['listenTo'](_0x4ed8b6,'Esc',()=>{this['_closeAnnotation'](_0x19b5a2),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x19b5a2&&this['setActiveAnnotation'](_0x19b5a2));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5ba547['visibleView']&&(_0xc8e95['getByView'](_0x5ba547['visibleView'])&&_0x5ba547['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 _0x3b0292('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4bb69f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4bb69f);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2a0e71){for(const _0x519b37 of this['_selectedAnnotations'])_0x2a0e71['includes'](_0x519b37)||this['_manuallyClosed']['delete'](_0x519b37);for(const _0x40d2e4 of this['annotations'])_0x2a0e71['includes'](_0x40d2e4)||this['_removeAnnotationFromBalloon'](_0x40d2e4);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x50b4ee of _0x2a0e71)this['_addAnnotationToBalloon'](_0x50b4ee);}this['_selectedAnnotations']=_0x2a0e71;}['_addAnnotationToBalloon'](_0x1b2ad1,_0x3e247a=!0x1){this['_manuallyClosed']['has'](_0x1b2ad1)||(this['_addedAnnotations']['has'](_0x1b2ad1)||this['_balloon']['hasView'](_0x1b2ad1['view'])||(this['_addedAnnotations']['add'](_0x1b2ad1),this['_balloon']['add']({'stackId':_0x1b2ad1['view']['id'],'view':_0x1b2ad1['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1b2ad1)}})),_0x3e247a&&this['_balloon']['showStack'](_0x1b2ad1['view']['id']));}['_getBalloonTargetForAnnotation'](_0x437b6a){const _0x3f8a00=_0x437b6a['target'],_0x16a359=this['editor']['editing']['view'],_0x97b586=_0x16a359['document']['selection']['getFirstRange'](),_0x57ba77=_0x16a359['domConverter']['viewRangeToDom'](_0x97b586);if(_0x57ba77['collapse'](!0x0),_0x3f8a00){if(_0x3f8a00 instanceof _0x597a13)return _0x3f8a00;let _0x629451=[];for(const _0x3e3e3f of _0x3f8a00)_0x629451['push'](...(_0xb4170d=_0x3e3e3f['getClientRects'](),Array['from'](_0xb4170d)['map'](DOMRect['fromRect'])));_0x629451=function(_0x1d2987){const _0x126a9e=[];let _0x270187=_0x1d2987[0x0];for(let _0x2e31a5=0x1;_0x2e31a5<_0x1d2987['length'];_0x2e31a5++)B(_0x270187,_0x1d2987[_0x2e31a5])?_0x270187['width']+=_0x1d2987[_0x2e31a5]['width']:(_0x126a9e['push'](_0x270187),_0x270187=_0x1d2987[_0x2e31a5]);return _0x126a9e['push'](_0x270187),_0x126a9e;}(_0x629451);const _0x47053d=_0x57ba77['getBoundingClientRect']();return _0x629451['find'](_0x5c9e87=>_0x5c9e87['top']<=_0x47053d['top']&&_0x5c9e87['bottom']>=_0x47053d['bottom']&&_0x5c9e87['left']<=_0x47053d['left']&&_0x5c9e87['right']>=_0x47053d['right'])||_0x629451[0x0];}var _0xb4170d;return _0x437b6a['targetRect']||_0x57ba77;}['_removeAnnotationFromBalloon'](_0xae6a33){this['_addedAnnotations']['has'](_0xae6a33)&&this['_balloon']['hasView'](_0xae6a33['view'])&&(this['_addedAnnotations']['delete'](_0xae6a33),this['_balloon']['remove'](_0xae6a33['view']));}['_closeAnnotation'](_0x18d866){this['_manuallyClosed']['add'](_0x18d866),this['_removeAnnotationFromBalloon'](_0x18d866);}}function B(_0xd4f41a,_0x40174d){return _0xd4f41a['top']===_0x40174d['top']&&_0xd4f41a['bottom']===_0x40174d['bottom']&&_0xd4f41a['right']===_0x40174d['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x10f876,_0x396638){super(_0x10f876),this['set']('isEmpty',!_0x396638['length']),this['focusTracker']=new _0x29f230(),this['_annotationViews']=_0x396638,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x8029a4({'focusables':_0x396638,'focusTracker':this['focusTracker']}),this['listenTo'](_0x396638,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x396638,'remove',(_0x2d9b5c,_0x1e66f5)=>{_0x1e66f5['isActive']&&this['focus'](),_0x396638['length']||(this['isEmpty']=!0x0);});const _0x1a3007=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x10f876,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x396638},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1a3007['if']('isEmpty','ck-hidden',_0x27a8ab=>!_0x27a8ab)]},'children':[{'text':E(_0x10f876,'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 _0x1ef59b of this['_annotationViews'])this['focusTracker']['add'](_0x1ef59b['element']);this['_annotationViews']['on']('change',(_0x4409bd,{added:_0x1559b0,removed:_0x4430f6})=>{for(const _0x253c7c of _0x1559b0)this['focusTracker']['add'](_0x253c7c['element']);for(const _0x47a161 of _0x4430f6)this['focusTracker']['remove'](_0x47a161['element']);});}}class f extends _0x4d0391{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x1c0e0b){super(_0x1c0e0b),this['archivedThreads']=new _0x3eedb8();}['init'](){const _0x2bd4a2=this['context'],_0x37c3cb=_0x2bd4a2['plugins']['get'](o),_0x1623e9=_0x2bd4a2['plugins']['get'](O);this['listenTo'](_0x37c3cb,'addCommentThread',(_0x1d784a,{threadId:_0x819e41})=>{const _0x378673=_0x37c3cb['getCommentThread'](_0x819e41);_0x378673['archivedAt']&&this['archivedThreads']['add'](_0x378673,this['_calculatePosition'](_0x378673['archivedAt'])),this['listenTo'](_0x378673,'change:archivedAt',(_0x1f1a7b,_0x4c7e66,_0x3a416d)=>{_0x3a416d?this['archivedThreads']['has'](_0x378673)||this['archivedThreads']['add'](_0x378673,this['_calculatePosition'](_0x378673['archivedAt'])):this['archivedThreads']['has'](_0x378673)&&this['archivedThreads']['remove'](_0x378673);});}),this['listenTo'](_0x37c3cb,'removeCommentThread',(_0x21d68b,{threadId:_0x29328d})=>{const _0x5c9331=_0x37c3cb['getCommentThread'](_0x29328d);this['stopListening'](_0x5c9331),this['archivedThreads']['has'](_0x5c9331)&&this['archivedThreads']['remove'](_0x5c9331);},{'priority':'highest'}),this['listenTo'](_0x1623e9['collection'],'focus',(_0x330444,_0x2a0a27)=>{_0x2a0a27['isVisible']||(_0x2a0a27['isActive']=!0x0,_0x1623e9['activate'](_0x2a0a27));});}['_calculatePosition'](_0xcab64c){const _0x3115bb=[...this['archivedThreads']]['findIndex'](_0x4acee2=>_0x4acee2['archivedAt']<_0xcab64c);return _0x3115bb>-0x1?_0x3115bb:this['archivedThreads']['length'];}}class a extends _0x51209d{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x36c7ab];}constructor(_0x38bac2){super(_0x38bac2),this['annotationViews']=new _0x3ce2be(),this['_pendingThreads']=[];}['init'](){const _0x18d870=this['editor'],_0x12e8a4=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x18d870['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3f387b,!0x0)),_0x18d870['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x7301b=this['_createCommentsArchiveButton'](_0x370a9d);return _0x7301b['set']({'role':'menuitemcheckbox'}),_0x7301b;});const _0x421d7c=_0x18d870['plugins']['get'](f),_0x27de58=_0x18d870['plugins']['get']('Annotations'),_0x26d177=_0x18d870['plugins']['get']('CommentsRepository');_0x421d7c['archivedThreads']['forEach'](_0xfddd39=>{this['_handleNewThread'](_0xfddd39);}),this['listenTo'](_0x421d7c['archivedThreads'],'add',(_0x59405b,_0x530c6b)=>{this['_handleNewThread'](_0x530c6b);}),this['listenTo'](_0x27de58['collection'],'add',(_0x4c8b7b,_0x39ec31)=>{const _0x43430e=this['_pendingThreads']['find'](_0xf020d7=>{const _0x911630=_0x26d177['_threadToController']['get'](_0xf020d7);return _0x911630&&_0x39ec31['innerView']===_0x911630['view'];});if(_0x43430e){const _0x2d6944=this['_calculatePosition'](_0x43430e['archivedAt']);this['annotationViews']['add'](_0x39ec31['view'],_0x2d6944),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x43430e),0x1);}}),this['listenTo'](_0x421d7c['archivedThreads'],'remove',(_0x3f4884,_0x133427)=>{const _0x595b95=_0x18d870['config']['get']('collaboration.channelId');if(!_0x595b95||_0x133427['channelId']===_0x595b95){if(this['_pendingThreads']['includes'](_0x133427))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x133427),0x1);else{const _0x41f0ca=_0x26d177['_threadToController']['get'](_0x133427),_0x290dae=_0x27de58['getByInnerView'](_0x41f0ca['view']);this['annotationViews']['remove'](_0x290dae['view']),this['stopListening'](_0x290dae['focusableElements']);}}}),this['listenTo'](_0x27de58['collection'],'add',(_0x230ecd,_0x54a5b7)=>{this['listenTo'](_0x54a5b7,'escape',_0x12e8a4);}),this['listenTo'](_0x27de58['collection'],'remove',(_0x350c43,_0x1db637)=>{this['stopListening'](_0x1db637,'escape',_0x12e8a4);});}['_handleNewThread'](_0x5cac44){const _0x2184bb=this['editor']['plugins']['get']('CommentsRepository'),_0x3fa2f0=this['editor']['plugins']['get']('Annotations'),_0x2cfd14=this['editor']['config']['get']('collaboration.channelId');if(!_0x2cfd14||_0x5cac44['channelId']===_0x2cfd14){const _0x331aaf=_0x2184bb['_threadToController']['get'](_0x5cac44);if(!_0x331aaf)return void this['_pendingThreads']['push'](_0x5cac44);const _0x53f428=this['_calculatePosition'](_0x5cac44['archivedAt']),_0x254dc6=_0x3fa2f0['getByInnerView'](_0x331aaf['view']);_0x254dc6['isVisible']&&_0x3fa2f0['_visibleAnnotations']['remove'](_0x254dc6),this['annotationViews']['add'](_0x254dc6['view'],_0x53f428);}}['_calculatePosition'](_0xb0452d){const _0x556777=this['editor']['config']['get']('collaboration.channelId'),_0x4778ac=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x2e0d03=>_0x2e0d03['channelId']===_0x556777)['findIndex'](_0x1bcc3d=>_0x1bcc3d['archivedAt']<_0xb0452d);return _0x4778ac<0x0||_0x4778ac>this['annotationViews']['length']?this['annotationViews']['length']:_0x4778ac-0x1;}['_toggleDialog'](){const _0x535f8a=this['editor'],_0x499a35=_0x535f8a['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x535f8a['locale'],this['annotationViews'])),'commentsArchive'===_0x499a35['id']?_0x499a35['hide']():_0x499a35['show']({'id':'commentsArchive','title':E(_0x535f8a['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1442de,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3e1e67['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x180206,_0x4364e7=!0x1){const _0x1c40f5=this['editor']['locale'],_0x5c610e=this['editor']['plugins']['get']('Dialog'),_0x3d8475=new _0x180206(_0x1c40f5);return _0x3d8475['bind']('isEnabled')['to'](this,'isEnabled'),_0x3d8475['bind']('isOn')['to'](_0x5c610e,'id',_0xb9992=>'commentsArchive'===_0xb9992),_0x3d8475['set']({'label':E(_0x1c40f5,'COMMENTS_ARCHIVE'),'icon':_0x1442de,'isToggleable':!0x0}),_0x4364e7&&(_0x3d8475['tooltip']=!0x0),this['listenTo'](_0x3d8475,'execute',()=>this['_toggleDialog']()),_0x3d8475;}['_hideDialogOnAnnotationEscape']=_0x54e56f=>{const _0x7790ed=_0x54e56f['source'];if(!this['annotationViews']['has'](_0x7790ed['view']))return;const _0x2d56ec=this['editor']['plugins']['get']('Dialog');_0x2d56ec['isOpen']&&'commentsArchive'===_0x2d56ec['id']&&(_0x2d56ec['hide'](),_0x54e56f['stop']());};}class p extends _0x51209d{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x510f43,ContextPlugin as _0x474ed3,PendingActions as lt,Command as _0x50221b,Plugin as _0x39c08c,Context as _0x2f3774}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x586f16,uid as _0x25f5e2,KeystrokeHandler as jt,FocusTracker as _0x47c1df,diff as _0x13171e,Collection as _0xe77389,Rect as _0x4a96a9,CKEditorError as _0x388981,first as _0xda7f63,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x4ddb0d,keyCodes as _0x1ffe74}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x4d1a2b,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x28d0fb,trimHtml as _0x559ff4,LateFocusDropdownButtonView as _0x1b0d6e,Users as st,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x5a6ef5}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x4e3986}from'es-toolkit/compat';import{IconUndo as _0x3b57b3,IconCheck as _0x4cc545,IconPencil as _0x5914e6,IconRemoveComment as _0x96488f,IconThreeVerticalDots as _0x260a0b,IconAddComment as _0x1bf1d3,IconCommentsArchive as _0x3ca749}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x2f783a,ButtonView as _0x57ea8a,ViewCollection as _0x2335d5,createDropdown as _0x27349f,ListView as _0x4f15c6,focusChildOnDropdownOpen as _0x5b2ef7,ListItemView as _0xd0b8e8,MenuBarMenuListItemButtonView as _0x58cbad,BodyCollection as _0x230760,BalloonPanelView as _0x261e7b,ContextualBalloon as _0x47c489,Dialog as _0x524e08,DialogViewPosition as tt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x4bd5e3}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x47530a}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x52e501}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x586f16(){['model'];['view'];constructor(_0x2cb8c8,_0x14d906){super(),this['model']=_0x2cb8c8,this['model']['_isAttached']=!0x0,this['view']=_0x14d906,this['listenTo'](_0x14d906,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x14d906,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x14d906,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x14d906,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x14d906,'addComment',(_0x252a29,_0x411333)=>this['addComment'](_0x411333)),this['listenTo'](_0x14d906,'updateComment',(_0x8c151b,_0xcfe9bb,_0x193dba)=>this['updateComment'](_0xcfe9bb,_0x193dba)),this['listenTo'](_0x14d906,'removeComment',(_0x4ec438,_0x4384ea)=>this['removeComment'](_0x4384ea));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3d23cb){this['model']['addComment']({'content':_0x3d23cb,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xea97d5,_0x3d12e1){this['model']['getComment'](_0xea97d5)['update']({'content':_0x3d12e1});}['removeComment'](_0x1fad42){this['model']['getComment'](_0x1fad42)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x455ad7,_0x45c516,_0x53df88){const t=_0x455ad7['t'];switch(_0x45c516){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'},_0x53df88);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'},_0x53df88);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'},_0x53df88);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'},_0x53df88);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x53df88);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'},_0x53df88);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'},_0x53df88);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'},_0x53df88);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 Vt extends Xt{['main'];['editable'];constructor(_0x4ecc9c,_0x3bfed4){super(_0x4ecc9c);const _0x4ad724=_0x25f5e2();this['main']=this['createCollection'](),this['editable']=new $t(_0x4ecc9c,_0x3bfed4,void 0x0,{'label':()=>E(_0x4ecc9c,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x4ecc9c['uiLanguageDirection'],'lang':_0x4ecc9c['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x4ad724},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Ut{['view'];constructor(_0x712bcc){super(_0x712bcc),this['view']=new Vt(_0x712bcc['locale'],_0x712bcc['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x13fe6d=this['editor']['editing']['view'],_0x1bfa6c=this['view']['editable'],_0x11e596=_0x13fe6d['document']['getRoot']();_0x1bfa6c['name']=_0x11e596['rootName'],this['view']['render']();const _0x367fb4=_0x1bfa6c['element'];this['setEditableElement'](_0x1bfa6c['name'],_0x367fb4),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x13fe6d['attachDomRoot'](_0x367fb4),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x586f16(_0x510f43){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x22d552={}){function _0x25a30b(_0x37f690){return _0x37f690['map'](_0x144c43=>String['fromCharCode'](_0x144c43))['join']('');}(_0x22d552=Object['assign']({},_0x22d552))['plugins']||(_0x22d552['plugins']=Rt['defaultPlugins']),super(_0x22d552),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x25a30b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x25a30b([0x76,0x69,0x65,0x77])][_0x25a30b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x25a30b([0x61,0x75,0x74,0x6f]),this[_0x25a30b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x25a30b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x25a30b([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x25a30b([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x25a30b([0x6f,0x6b])});}['create'](){const _0x361935=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x361935))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x168905=>{const _0x4faeca=this['model']['document']['getRoot'](),_0x21b808=_0x4faeca&&_0x4faeca['getChild'](_0x4faeca['childCount']-0x1);_0x168905['setSelection'](_0x21b808,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x436b3a=this['editing']['view'],_0x58a15d=_0x436b3a['document']['getRoot'](),_0x1fd689=_0x58a15d['getChild'](0x0);_0x58a15d['childCount']>0x1||!_0x1fd689||'p'!=_0x1fd689['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x436b3a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1fd689['placeholder']=this['placeholder']),Ft({'view':_0x436b3a,'element':_0x1fd689,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1fd689);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4be0b1,_0x18727b={}){super(_0x4be0b1),this['editor']=null,this['_editorConfig']=_0x18727b,this['set']('value',_0x18727b['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x4be0b1,'Reply...')),this['set']('submitLabel',E(_0x4be0b1,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x47c1df(),this['focusCycler']=new _0x2f783a({'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',(_0x1ae70d,_0x4d36a)=>{this['cancelButtonView']['fire']('execute'),_0x4d36a();}),this['keystrokes']['set']('Ctrl+Enter',(_0x30d9c0,_0x212f8c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x212f8c());}),this['on']('submit',(_0x1a6da9,_0x505b3c)=>{_0x505b3c['length']>0xfde8?(alert(E(_0x4be0b1,'TOO_LONG_COMMENT_ALERT',[_0x505b3c['length'],0xfde8])),_0x1a6da9['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4ada90=this['editor'];this['element']['insertBefore'](_0x4ada90['ui']['element'],this['element']['firstChild']),_0x4ada90['model']['document']['on']('change',()=>this['value']=_0x4ada90['getData']()),_0x4ada90['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4ada90['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1ba038){-0x1===_0x1ba038?(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:_0x2230d7}=this,_0x43e213=new _0x57ea8a(_0x2230d7);return _0x43e213['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x43e213['withText']=!0x0,_0x43e213['bind']('label')['to'](this,'submitLabel'),_0x43e213['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x43e213['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x22bfee,_0x2a17a8)=>!_0x2a17a8&&!!_0x22bfee['trim']()),_0x43e213;}['_createCancelButton'](){const {locale:_0x375fe2}=this,_0x41fb7a=new _0x57ea8a(_0x375fe2);return _0x41fb7a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x41fb7a['label']=E(_0x375fe2,'Cancel'),_0x41fb7a['withText']=!0x0,_0x41fb7a['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x41fb7a;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xdf64e9=>{this['focusTracker']['add'](_0xdf64e9['element']);}),this['focusables']['on']('change',(_0x856036,_0x55a93d)=>{for(const _0x1e677b of Array['from'](_0x55a93d['added'])['reverse']())this['focusTracker']['add'](_0x1e677b['element']);});}}class ie extends kt{constructor(_0x381e2b,_0x5544b2,_0xdeb963){super(_0x381e2b),this['commentInputView']=new hs(_0x381e2b,_0xdeb963),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x21909b,_0x2ec20f)=>_0x21909b||!!_0x2ec20f),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 _0x4d1a2b(_0x381e2b,_0x5544b2),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'](_0x2f7429){this['commentInputView']['focus'](_0x2f7429);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1933ad,_0x8f9540)=>{const {submitButtonView:_0x4db942,cancelButtonView:_0x472b57,editor:_0x1b21db}=this['commentInputView'];[_0x4db942['element'],_0x472b57['element'],_0x1b21db?_0x1b21db['editing']['view']['getDomRoot']():null]['filter'](_0xa01a18=>_0xa01a18)['some'](_0x1d9d2d=>_0x1d9d2d['contains'](_0x8f9540['target']))||(this['focus'](),_0x8f9540['preventDefault']());});}}class cs extends kt{constructor(_0x4d2a2f){super(_0x4d2a2f);const _0x254bcf=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x254bcf['to']('count',_0x428012=>E(_0x4d2a2f,'NUMBER_OF_COMMENTS',_0x428012))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x39ed70,_0x24ae26,_0x4e33fd){super(_0x39ed70);const _0x2e45d0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x24ae26['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x24ae26,this['_config']=_0x4e33fd,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x47c1df(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f783a({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2654f0=>this['commentViews']['map'](_0x508a79=>_0x508a79['element'])['includes'](_0x2654f0['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x39ed70),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5b3c88=>_0x5b3c88-this['_config']['maxCommentsWhenCollapsed']);for(const _0x506c51 of _0x24ae26['comments'])this['_handleNewCommentModel'](_0x506c51);this['_handleInfoComment'](),this['listenTo'](_0x24ae26['comments'],'add',(_0x30e0e6,_0x4c9203)=>{const _0x5dc542=this['_calculatePosition'](_0x4c9203);this['length']++,this['_handleNewCommentModel'](_0x4c9203,_0x5dc542),this['refreshVisibleViews']();}),this['listenTo'](_0x24ae26['comments'],'remove',(_0x4e0afe,_0x25135b)=>{this['length']--,this['_handleRemoveCommentModel'](_0x25135b),this['refreshVisibleViews']();}),this['listenTo'](_0x24ae26,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x24ae26,'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',_0x2e45d0['if']('length','ck-hidden',_0x5b21b5=>!_0x5b21b5)],'aria-label':E(_0x39ed70,'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'](_0x29fa25){-0x1===_0x29fa25?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2a9197 of this['commentViews'])_0x2a9197['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x32e17e,_0x5ea4af){const _0x131ae0=new this['_config']['CommentView'](this['locale'],_0x32e17e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x131ae0['viewUid']=_0x32e17e['id'],_0x131ae0['delegate']('removeComment')['to'](this),_0x131ae0['delegate']('updateComment')['to'](this),_0x131ae0['delegate']('resolveCommentThread')['to'](this),_0x131ae0['delegate']('editorReady')['to'](this),_0x131ae0['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x131ae0,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x131ae0,_0x5ea4af);}['_calculatePosition'](_0x45f46e){const _0x2a5f10=this['_model']['_findOptimalIndex'](_0x45f46e);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x45f46e['authoredAt']?_0x2a5f10-0x1:_0x2a5f10:_0x2a5f10-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4b49ab={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x4b49ab,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4b49ab));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x8aef5e){const _0x5698ec=this['commentViews']['remove'](_0x8aef5e['id']);this['stopListening'](_0x5698ec),_0x5698ec['isEditMode']&&this['_updateHasDirtyComment'](),_0x5698ec['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2a4e5c=>_0x2a4e5c['isEditMode']);}['_rearrangeCollapse'](){const _0x3a7066=function(_0x591dbf){const _0x10d78f=new _0xe77389();for(const _0x4e5c47 of _0x591dbf)_0x10d78f['add'](_0x4e5c47);return _0x10d78f;}(this['commentViews']),_0x9bfb78=this['_collapsedCommentsView']['count'];for(let _0x2608fe=0x1;_0x2608fe<=_0x9bfb78;_0x2608fe++)_0x3a7066['remove'](0x1);for(const _0x34c66d of _0x3a7066)_0x34c66d['collapse']();_0x9bfb78>0x0&&_0x3a7066['add'](this['_collapsedCommentsView'],0x1),as(_0x13171e(Array['from'](this['visibleViews']),Array['from'](_0x3a7066)),this['visibleViews'],_0x3a7066);}['_rearrangeExpand'](){as(_0x13171e(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3464ea of this['visibleViews'])_0x3464ea['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2a1790=>{this['focusTracker']['add'](_0x2a1790['element']),this['keystrokes']['listenTo'](_0x2a1790['element']);}),this['commentViews']['on']('change',(_0x4c80f6,_0x17cfd2)=>{for(const _0x4d31c4 of _0x17cfd2['removed'])this['focusTracker']['remove'](_0x4d31c4['element']),this['keystrokes']['stopListening'](_0x4d31c4['element']);for(const _0x22369b of Array['from'](_0x17cfd2['added'])['reverse']())this['focusTracker']['add'](_0x22369b['element']),this['keystrokes']['listenTo'](_0x22369b['element']);});}}function as(_0x9ecba4,_0x50c7cc,_0x338781){let _0x2aac2b=0x0;for(const _0x5679f0 of _0x9ecba4)switch(_0x5679f0){case'insert':_0x50c7cc['add'](_0x338781['get'](_0x2aac2b),_0x2aac2b),_0x2aac2b++;break;case'delete':_0x50c7cc['remove'](_0x2aac2b);break;case'equal':_0x2aac2b++;}}class ls extends kt{constructor(_0x21fc4b){super(_0x21fc4b);const _0x4c4d96=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4c4d96['to']('contextValue',_0x5e952c=>E(_0x21fc4b,'THREAD_CONTEXT_LABEL',_0x5e952c)),'tabindex':-0x1},'children':[{'text':_0x4c4d96['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1d61c5,_0x585642){super(_0x1d61c5);const _0x3adc2f=this['bindTemplate'];this['_model']=_0x585642,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x47c1df(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f783a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1bd7b5=>!!_0x1bd7b5),this['bind']('contextValue')['to'](this['_model'],'context',_0x573e3d=>_0x573e3d&&_0x573e3d['value']?this['_trimContextValue'](_0x573e3d['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x3adc2f['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 _0x5536db=new _0x57ea8a(this['locale']);return _0x5536db['label']=E(this['locale'],'Reopen'),_0x5536db['tooltip']=E(this['locale'],'Reopen'),_0x5536db['icon']=_0x3b57b3,_0x5536db['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x303236=>!_0x303236),_0x5536db['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5f0f8a,_0x38b3df)=>_0x5f0f8a&&_0x38b3df),_0x5536db['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5536db;}['_trimContextValue'](_0x3d5ad7){if(_0x3d5ad7['length']<0x96)return _0x3d5ad7;const _0x22aac5=_0x3d5ad7['lastIndexOf']('\x20',0x93);return _0x3d5ad7['substring'](0x0,_0x22aac5>-0x1?_0x22aac5:0x93)+'...';}['_attachContextActions'](){const _0x5f4ea5=this['element']['querySelector']('.ck-context'),_0x3a8f2c=_0x5f4ea5['querySelector']('.ck-context__value');this['listenTo'](_0x5f4ea5,'mouseenter',()=>{_0x3a8f2c['offsetWidth']<_0x3a8f2c['scrollWidth']&&_0x5f4ea5['classList']['add']('overlay');}),this['listenTo'](_0x5f4ea5,'mouseleave',()=>{_0x5f4ea5['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x56b7c0 of this['focusables'])this['focusTracker']['add'](_0x56b7c0['element']),this['keystrokes']['listenTo'](_0x56b7c0['element']);}['_createContextView'](){const _0x4f0e76=new ls(this['locale']);return _0x4f0e76['bind']('contextValue')['to'](this),_0x4f0e76;}}class is extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x48e71a,_0x5d6cf9,_0x1bee4c,_0x519ca2){super(_0x48e71a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5d6cf9,this['_localUser']=_0x1bee4c,this['_config']=_0x519ca2,this['commentThreadHeaderView']=new Yt(_0x48e71a,_0x5d6cf9),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x48e71a,E(_0x48e71a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x48e71a,_0x5d6cf9,Object['assign']({'CommentView':this['_config']['CommentView']},_0x519ca2)),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',(_0x453951,_0x52cd54)=>_0x453951||!!_0x52cd54),this['bind']('isUnlinked')['to'](_0x5d6cf9,'unlinkedAt',_0x18d897=>!!_0x18d897),this['bind']('ariaLabel')['to'](this,'length',_0x4a8833=>{const _0x5bea6d=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x4a8833,_0x5bea6d]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x47c1df(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f783a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1991ac=>_0x1991ac['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x9c47d2=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5cb7ba=_0x9c47d2['commentInputView'];return _0x9c47d2['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5cb7ba,'value',(_0x5082b3,_0x3f2a9d,_0x2d24ee,_0x6ffe43,_0x1d676c)=>!!_0x1d676c||!!_0x6ffe43&&_0x2d24ee&&!_0x3f2a9d||_0x5082b3&&_0x2d24ee&&!_0x3f2a9d),_0x5cb7ba['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1ddae3,_0x27562d,_0x4b8b2f)=>{let _0x17f219;return _0x17f219=_0x4b8b2f&&_0x27562d?'Reply\x20to\x20reopen\x20discussion...':_0x1ddae3?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x17f219);}),_0x5cb7ba['bind']('submitLabel')['to'](this,'length',_0x387e36=>E(this['locale'],_0x387e36?'Reply':'Comment')),_0x5cb7ba['on']('submit',(_0x3598c7,_0x33d7ab)=>{this['fire']('addComment',_0x33d7ab),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5cb7ba['on']('cancel',()=>{this['focus']();}),_0x5cb7ba['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5cb7ba['on']('cancel',_0x5a34c1=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5a34c1['stop']());}),this['on']('change:isActive',(_0x379422,_0x99ff12,_0x232cb5)=>{_0x232cb5||this['length']||_0x5cb7ba['value']||this['fire']('removeCommentThread');}),_0x9c47d2;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(is){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x58ac0,_0xc8324f,_0x1bcee5,_0x50ecc6){super(_0x58ac0,_0xc8324f,_0x1bcee5,_0x50ecc6),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x58ac0,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2407c4,_0x1403fd,_0x198670)=>{_0x198670||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xbbb331,_0x3d2a9f,_0x5671e8)=>{_0x5671e8&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x1c091a=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x1c091a['if']('isActive','ck-thread--active'),_0x1c091a['if']('isUnlinked','ck-thread--unlinked'),_0x1c091a['if']('isConfirm','ck-thread--remove-confirmation'),_0x1c091a['to']('actionIndicator',_0x225549=>_0x225549?'ck-thread--'+_0x225549:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x1c091a['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 _0x286dbf of this['commentsListView']['commentViews'])_0x286dbf['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3f9726}=this,_0x3fe369=this['commentsListView']['commentViews']['get'](0x0);_0x3fe369===this['_boundFirstCommentView']||_0x3fe369['isSystemComment']||(this['_boundFirstCommentView']=_0x3fe369,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3fe369,'actionIndicator',_0x5c46ca=>'remove'===_0x5c46ca?'remove':null),_0x3fe369['placeholder']=E(_0x3f9726,'Write\x20a\x20comment...'),_0x3fe369['removeButton']['on']('execute',_0x4c5c5c=>{_0x4c5c5c['stop'](),this['showConfirm'](E(_0x3f9726,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3fe369['focus']();}),_0x3fe369['actionBar']['add'](this['resolveButton'],0x0),_0x3fe369['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2740bb=new _0x28d0fb(this['locale']);return _0x2740bb['label']=E(this['locale'],'Resolve'),_0x2740bb['tooltip']=E(this['locale'],'Resolve'),_0x2740bb['icon']=_0x4cc545,_0x2740bb['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2740bb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x449e29=>!_0x449e29),_0x2740bb['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x152208,_0x47b070)=>_0x152208&&!_0x47b070),_0x2740bb['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2740bb;}['_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 os extends kt{constructor(_0x546401){super(_0x546401),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x249297,_0x4b881d,_0x3cbfaf)=>{this['element']['innerHTML']=_0x3cbfaf;}),this['element']['innerHTML']=this['content'];}}class rs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x5edf85,_0x2aca01,_0x160b52){super(_0x5edf85),this['_model']=_0x2aca01,this['_config']=_0x160b52,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x2aca01,'content',_0x2aca01,'authoredAt',(_0x41c9d1,_0x2993dc)=>E(_0x5edf85,'COMMENT_ARIA_LABEL',[_0x2aca01['author']['name'],_0x160b52['formatDateTime'](_0x2993dc),new DOMParser()['parseFromString'](_0x41c9d1,'text/html')['body']['textContent'],_0x2aca01['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x5edf85,E(_0x5edf85,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x2335d5(),this['focusTracker']=new _0x47c1df(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f783a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x25da11=>_0x25da11['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x4aff52=new os(this['locale']);return _0x4aff52['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x114f62,_0x5aa9fc)=>_0x5aa9fc?_0x559ff4(_0x114f62,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x114f62),_0x4aff52;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x315c8b=new hs(this['locale'],this['_config']['editorConfig']);return _0x315c8b['value']=this['_model']['content'],_0x315c8b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x315c8b['submitLabel']=E(this['locale'],'Save'),_0x315c8b['on']('submit',(_0x4c1f71,_0x2f2e08)=>{this['fire']('updateComment',this['_model']['id'],_0x2f2e08),this['switchToDisplayMode'](),this['focus']();}),_0x315c8b['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x315c8b['once']('editorReady',()=>{_0x315c8b['focus']();}),_0x315c8b['createEditor'](),_0x315c8b['delegate']('editorReady')['to'](this),_0x315c8b['delegate']('editorDestroyed')['to'](this),_0x315c8b;}['_setupKeyboardNavigation'](){const _0x40ad16=this['element'];this['keystrokes']['listenTo'](_0x40ad16);for(const _0x4327fd of this['focusables'])this['focusTracker']['add'](_0x4327fd['element']),this['keystrokes']['listenTo'](_0x4327fd['element']);this['focusables']['on']('change',(_0x410007,_0x501c5e)=>{for(const _0x3c09f4 of _0x501c5e['removed'])this['focusTracker']['remove'](_0x3c09f4['element']),this['keystrokes']['stopListening'](_0x3c09f4['element']);for(const _0xb71ec9 of _0x501c5e['added'])this['focusTracker']['add'](_0xb71ec9['element']),this['keystrokes']['listenTo'](_0xb71ec9['element']);}),this['keystrokes']['set']('enter',(_0x23ab7a,_0x16c09b)=>{_0x40ad16===_0x23ab7a['target']&&(this['focusCycler']['focusFirst'](),_0x16c09b());}),this['keystrokes']['set']('esc',(_0x13e630,_0x3f89d2)=>{_0x40ad16!==_0x13e630['target']&&(this['focus'](),_0x3f89d2());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(rs){['actionBar'];['userView'];constructor(_0x4bbfcb,_0x3911b1,_0x44aac2){super(_0x4bbfcb,_0x3911b1,_0x44aac2),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x4bbfcb,'Reply...')),this['bind']('authoredAt')['to'](_0x3911b1),this['bind']('resolvedAt')['to'](_0x3911b1),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 _0x4d1a2b(_0x4bbfcb,_0x3911b1['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3911b1,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x17f573=this['bindTemplate'],_0x58d0cd=[{'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':_0x17f573['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x17f573['to']('authoredAt',_0x4a5ebb=>this['_config']['formatDateTime'](_0x4a5ebb))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x17f573['if']('isEditMode','ck-comment__actions--hidden'),_0x17f573['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']&&_0x58d0cd['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x17f573['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x17f573['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x17f573['if']('isEditMode','ck-comment--edit'),_0x17f573['if']('isSystemComment','ck-comment--info'),_0x17f573['to']('actionIndicator',_0xef073a=>_0xef073a?'ck-comment--'+_0xef073a:'')],'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':_0x58d0cd}]}]};}['_createEditButton'](){const _0x4d6de6=new _0x57ea8a(this['locale']);return _0x4d6de6['label']=E(this['locale'],'Edit'),_0x4d6de6['icon']=_0x5914e6,_0x4d6de6['withText']=!0x0,_0x4d6de6['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x4d6de6['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2d1883=>!_0x2d1883),_0x4d6de6['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x4d6de6['on']('execute',()=>this['switchToEditMode']()),_0x4d6de6;}['_createRemoveButton'](){const _0x5a1d70=new _0x57ea8a(this['locale']);return _0x5a1d70['label']=E(this['locale'],'Remove'),_0x5a1d70['icon']=_0x96488f,_0x5a1d70['withText']=!0x0,_0x5a1d70['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5a1d70['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xa4c61e=>!_0xa4c61e),_0x5a1d70['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5a1d70['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5a1d70;}['_createDropdown'](){const _0x14c320=_0x27349f(this['locale'],_0x1b0d6e),_0x1333a2=_0x14c320['panelView']['children'],_0x26053c=new _0x4f15c6(this['locale']),_0x51f092=_0x14c320['bindTemplate'];_0x5b2ef7(_0x14c320,()=>this['items']['find'](_0x2acfb2=>_0x2acfb2['isVisible'])),_0x14c320['extendTemplate']({'attributes':{'class':[_0x51f092['if']('isVisible','ck-hidden',_0x22f204=>!_0x22f204)]}});const _0x4092df=(_0x21c706,_0x48f21e=-0x1)=>{const _0x4c1f72=new _0xd0b8e8(this['locale']);_0x4c1f72['children']['add'](_0x21c706);const _0x2a9589=_0x48f21e>-0x1?_0x48f21e:_0x26053c['items']['length'];_0x26053c['items']['add'](_0x4c1f72,_0x2a9589);const _0x466cd1=Array['from'](this['items']);_0x14c320['unbind']('isEnabled','isVisible'),_0x14c320['bind']('isEnabled')['toMany'](_0x466cd1,'isEnabled',(..._0x23f523)=>_0x23f523['some'](_0x4906e9=>_0x4906e9)),_0x14c320['bind']('isVisible')['toMany'](_0x466cd1,'isVisible',(..._0x5b39e6)=>_0x5b39e6['some'](_0x27aa44=>_0x27aa44));};_0x14c320['panelPosition']='sw',_0x14c320['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x260a0b});for(const _0x5a2694 of this['items'])_0x4092df(_0x5a2694);return _0x1333a2['add'](_0x26053c),_0x14c320['listenTo'](this['items'],'add',(_0x1b063b,_0x4e0383,_0x3e76a1)=>{_0x4092df(_0x4e0383,_0x3e76a1);}),_0x14c320['listenTo'](this['items'],'remove',(_0x19ea31,_0x5afba1,_0x1e2bb9)=>{_0x26053c['items']['remove'](_0x1e2bb9);}),_0x14c320;}['_attachActions'](_0xb90c15,_0x3c2340){const _0x3bf71c=_0xb90c15&&_0xb90c15['element'];_0x3bf71c&&(this['listenTo'](_0x3bf71c,'mouseenter',()=>this['actionIndicator']=_0x3c2340),this['listenTo'](_0x3bf71c,'focus',()=>this['actionIndicator']=_0x3c2340),this['listenTo'](_0x3bf71c,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x3bf71c,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x233900=super['_createCommentInputView']();return _0x233900['bind']('placeholder')['to'](this),_0x233900;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0xcc3447){const _0x5f3aa5=Dt(_0xcc3447,0x1e),_0xeb87fd=new MutationObserver(_0x53fffe=>{for(const _0x4437a3 of _0x53fffe)('attributes'==_0x4437a3['type']&&'class'==_0x4437a3['attributeName']||'childList'==_0x4437a3['type']||'characterData'==_0x4437a3['type'])&&_0x5f3aa5();});return{'attach'(_0x283d0e){_0xeb87fd['observe'](_0x283d0e,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xeb87fd['disconnect'](),_0x5f3aa5['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x3e1219,_0x33d135){super(_0x3e1219),this['id']=_0x25f5e2(),this['focusTracker']=new _0x47c1df(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x556fe0,_0x5abf61)=>this['fire']('Esc',_0x5abf61)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x33d135),this['mainView']=_0x33d135;const _0x2c33f5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x2c33f5['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 _0x34e3dc=this['element']['clientHeight'];_0x34e3dc&&(this['height']=_0x34e3dc);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x586f16(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1d4300,target:_0x1e0040,type:_0x254bc9,isVisible:_0x2ac348=!0x0}){super(),this['view']=_0x1d4300,this['view']['element']||this['view']['render'](),this['_type']=_0x254bc9,this['_target']=_0x1e0040,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xe77389([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x169430,_0x117dcb)=>{this['view']['focusTracker']['add'](_0x117dcb);}),this['focusableElements']['on']('remove',(_0xfcd417,_0x32e060)=>{this['view']['focusTracker']['remove'](_0x32e060);}),this['set']('isVisible',_0x2ac348);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3cb585=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x3cb585),_0x3cb585;}get['targetRect'](){const _0x59e21d=this['target'];if(null===_0x59e21d)return null;if(_0x59e21d instanceof _0x4a96a9)return _0x59e21d;const _0xc15ef5=_0x59e21d['filter'](_0x22e0c6=>function(_0x4b9522){const _0x4afeb1=_0x4b9522['offsetParent'];if(_0x4afeb1)return!0x0;const _0x2500d3=_0x4b9522['getClientRects']()['item'](0x0);return!!_0x2500d3;}(_0x22e0c6));return 0x0===_0xc15ef5['length']?null:new _0x4a96a9(_0xc15ef5[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5f5085){this['view']['isActive']=_0x5f5085,this['view']['mainView']['isActive']=_0x5f5085;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x18ea89){if(!(null===_0x18ea89||_0x18ea89 instanceof _0x4a96a9||Array['isArray'](_0x18ea89)&&_0x18ea89['every'](_0x48f8b0=>li(_0x48f8b0))))throw new _0x388981('annotation-invalid-target',null,{'target':_0x18ea89});}['_getNormalizedTarget'](){const _0x532d33='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x532d33)?[_0x532d33]:_0x532d33;}}function li(_0x5a03cd){return null!==_0x5a03cd&&'object'==typeof _0x5a03cd&&'nodeType'in _0x5a03cd&&0x1===_0x5a03cd['nodeType'];}class _ extends _0xe77389{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x1eda05=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x47c1df(),this['_focusTracker']['on']('change:isFocused',(_0x44a855,_0x388905,_0x490cb3)=>{_0x490cb3||this['fire']('blur');});for(const _0x2efe6b of _0x1eda05)this['add'](_0x2efe6b);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x5b823c){if(this['has'](_0x5b823c))throw new _0x388981('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x5b823c['innerView'],_0x5b823c),this['_viewToAnnotation']['set'](_0x5b823c['view'],_0x5b823c);for(const _0xcad803 of _0x5b823c['focusableElements'])this['_focusTracker']['add'](_0xcad803);this['listenTo'](_0x5b823c['focusableElements'],'add',(_0x24b76d,_0x3a3f02)=>{this['_focusTracker']['add'](_0x3a3f02);}),this['listenTo'](_0x5b823c['focusableElements'],'remove',(_0x37ed01,_0x1ae55b)=>{this['_focusTracker']['remove'](_0x1ae55b);}),this['listenTo'](_0x5b823c['view']['focusTracker'],'change:isFocused',(_0x2838ab,_0x382e9d,_0x2129fa)=>{_0x2129fa&&this['fire']('focus',_0x5b823c);}),_0x5b823c['updateTargetRect']();const _0x1a1616=this['_getOrderInContent'](_0x5b823c['view']['targetRect']);return super['add'](_0x5b823c,_0x1a1616);}['remove'](_0x4f33d4){if(!this['has'](_0x4f33d4))throw new _0x388981('annotationcollection-not-existing-item',null);this['stopListening'](_0x4f33d4['view']['focusTracker']),this['stopListening'](_0x4f33d4['focusableElements']);for(const _0x34e0b8 of _0x4f33d4['focusableElements'])this['_focusTracker']['remove'](_0x34e0b8);return this['_viewToAnnotation']['delete'](_0x4f33d4['view']),this['_innerViewToAnnotation']['delete'](_0x4f33d4['innerView']),super['remove'](_0x4f33d4);}['getByInnerView'](_0x3ea10f){return this['_innerViewToAnnotation']['get'](_0x3ea10f);}['getByView'](_0x25a09b){return this['_viewToAnnotation']['get'](_0x25a09b);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x44cccb of this)_0x44cccb['updateTargetRect']();this['_sort']();}['_sort'](){const _0x360ebf=Array['from'](this)['sort']((_0x36f14a,_0x498e6b)=>v(_0x36f14a['view']['targetRect'],_0x498e6b['view']['targetRect']));for(let _0x396726=_0x360ebf['length']-0x1;_0x396726>0x0;_0x396726--){const _0xffb253=_0x360ebf[_0x396726];_0x396726!==this['getIndex'](_0xffb253)&&(this['remove'](_0xffb253),this['add'](_0xffb253));}}['_getOrderInContent'](_0xfa0488){let _0x702c3=0x0;if(!_0xfa0488)return this['length'];for(const _0x12b4f8 of this){const _0x59deba=_0x12b4f8['view']['targetRect'];if(_0x59deba){if(v(_0xfa0488,_0x59deba)<0x0)return _0x702c3;_0x702c3++;}}return _0x702c3;}}function v(_0x2fa704,_0x4cb262){if(null===_0x2fa704&&null===_0x4cb262)return 0x0;if(null===_0x2fa704)return-0x1;if(null===_0x4cb262)return 0x1;const _0x145c0a=_0x2fa704['top']-_0x4cb262['top'];return 0x0==_0x145c0a?_0x2fa704['left']-_0x4cb262['left']:_0x145c0a;}class O extends _0x474ed3{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e5576){if(super(_0x5e5576),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x5e5576 instanceof _0x510f43){const _0xec1e9=_0x5e5576['locale'];_0x5e5576['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0xec1e9,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0xec1e9,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0xec1e9,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0xec1e9,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0xec1e9,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0xec1e9,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0xec1e9,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x45a98d){this['collection']['add'](_0x45a98d);}['remove'](_0x2835e8){this['collection']['remove'](_0x2835e8),_0x2835e8['destroy']();}['refreshVisibility'](){for(const _0x42f277 of this['collection'])_0x42f277['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x31c5ea){return this['collection']['getByInnerView'](_0x31c5ea);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2180ed of this['collection'])_0x2180ed['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x480161){this['fire']('_activateAnnotation',_0x480161);}['createAnnotation'](_0x2b5081){return new d(_0x2b5081);}['createAnnotationView'](_0x5c4bdc,_0x100335){return new S(_0x5c4bdc,_0x100335);}['_addActiveAnnotation'](_0x32c591){const _0x2f11b9=new Set(this['activeAnnotations']);_0x2f11b9['add'](_0x32c591),this['activeAnnotations']=_0x2f11b9;}['_removeActiveAnnotation'](_0x379544){const _0x5363a6=new Set(this['activeAnnotations']);_0x5363a6['delete'](_0x379544),this['activeAnnotations']=_0x5363a6;}['_bindAnnotationsToVisibleAnnotations'](){const _0x370560=this['collection'],_0x35469c=this['_visibleAnnotations'];function _0x31e449(_0x422b10){const _0x2ec94e=_0x422b10['source'];_0x2ec94e['isVisible']&&!_0x35469c['has'](_0x2ec94e)?_0x35469c['add'](_0x2ec94e):!_0x2ec94e['isVisible']&&_0x35469c['has'](_0x2ec94e)&&_0x35469c['remove'](_0x2ec94e),_0x2ec94e['view']['focusTracker']['remove'](_0x2ec94e['view']['element']),_0x2ec94e['view']['focusTracker']['add'](_0x2ec94e['view']['element']);}this['listenTo'](_0x370560,'add',(_0x4cac99,_0x5468e6)=>{_0x5468e6['isVisible']&&_0x35469c['add'](_0x5468e6),this['listenTo'](_0x5468e6,'change:isVisible',_0x31e449);}),this['listenTo'](_0x370560,'remove',(_0xbea84e,_0x39e439)=>{_0x35469c['has'](_0x39e439)&&_0x35469c['remove'](_0x39e439),this['stopListening'](_0x39e439,'change:isVisible',_0x31e449);});}['_setupEnterAnnotationKeystroke'](){const _0xc7a26e=_0x377e9b=>{_0x377e9b['on']('ready',()=>{_0x377e9b['keystrokes']['set'](_0x47530a,(_0x57fdf5,_0x143845)=>{const _0xf324bc=_0xda7f63(this['activeAnnotations']['values']());_0xf324bc&&(_0xf324bc['view']['focus'](),_0x143845());});});};this['context']instanceof _0x510f43?_0xc7a26e(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2f5d1e,_0x95850c)=>{_0xc7a26e(_0x95850c);});}['_setupEscapeAnnotationHandling'](){const _0xb243e9=_0x391414=>{const _0x513dba=_0x391414['source'],_0x127960=[];let _0xb51c35;if(Array['isArray'](_0x513dba['target'])){_0xb51c35=_0x513dba['target'][0x0],this['context']instanceof _0x510f43?_0x127960['push'](this['context']):this['context']['editors']&&_0x127960['push'](...this['context']['editors']);for(const _0x1fa935 of _0x127960)for(const _0x5aab35 of _0x1fa935['editing']['view']['domRoots']['values']())if(_0x5aab35['contains'](_0xb51c35))return void _0x1fa935['editing']['view']['focus']();_0xb51c35['focus']();}};this['listenTo'](this['collection'],'add',(_0x38cb7d,_0x2417f8)=>{this['listenTo'](_0x2417f8,'escape',_0xb243e9,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x500e25,_0x70c3f5)=>{this['stopListening'](_0x70c3f5,'escape',_0xb243e9);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x474ed3{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,lt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2282f3){super(_0x2282f3),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5a00e6=this['context']['config'];_0x5a00e6['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5a00e6['define']('comments.maxThreadTotalWeight',0x1f4),_0x5a00e6['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5a00e6['define']('comments.CommentThreadView',gt),_0x5a00e6['define']('comments.CommentView',Tt),_0x5a00e6['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3c0de6=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5507c5,_0x3f90cf)=>this['_addCommentThread'](_0x3f90cf)),this['on']('submitCommentThread',(_0x447f17,_0x5dadc4)=>this['_submitCommentThread'](_0x5dadc4)),this['on']('resolveCommentThread',(_0xc22811,_0x2912d8)=>this['_resolveCommentThread'](_0x2912d8)),this['on']('resolveCommentThread',(_0x19db00,_0x4238dd)=>this['_updateActiveAnnotation'](_0x4238dd),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3ba7af,_0x15013f)=>this['_reopenCommentThread'](_0x15013f)),this['on']('reopenCommentThread',(_0x34d634,_0x1e736d)=>this['_updateActiveAnnotation'](_0x1e736d),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1321b7,_0x321f17)=>this['_removeCommentThread'](_0x321f17)),this['on']('updateCommentThread',(_0x2b47e4,_0xe38eb2)=>this['_updateCommentThread'](_0xe38eb2)),this['on']('updateCommentThread',(_0x41924d,_0x7cc414)=>this['_updateActiveAnnotation'](_0x7cc414),{'priority':'lowest'}),this['on']('addComment',(_0x2fc59c,_0x4653eb)=>this['_addComment'](_0x4653eb)),this['on']('updateComment',(_0x332ca8,_0xb7cf3d)=>this['_updateComment'](_0xb7cf3d)),this['on']('removeComment',(_0x52ec46,_0x1f9744)=>this['_removeComment'](_0x1f9744)),this['on']('addComment',(_0x43c281,{threadId:_0x59b35d,isFromAdapter:_0x474cf0})=>{if(_0x474cf0)return;const _0xb0be05=this['getCommentThread'](_0x59b35d),_0x58e5c8=_0xb0be05&&this['_threadToController']['get'](_0xb0be05);_0x58e5c8&&_0x58e5c8['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3c0de6,'change:activeAnnotations',(_0x2b3c5a,_0x181ad7,_0x3e0a45)=>{const _0x13d1e6=Array['from'](_0x3e0a45)['map'](_0x448763=>this['_viewToController']['get'](_0x448763['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x13d1e6?_0x13d1e6['model']:null;});}set['adapter'](_0x3a8560){if(this['_adapter'])throw new _0x388981('commentsrepository-adapter-already-set');this['_adapter']=_0x3a8560;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x396d11=_t,threadId:_0x190066=_0x25f5e2(),comments:_0x556e7d=[],unlinkedAt:_0x8f1d5e=null,resolvedAt:_0x15045c=null,resolvedBy:_0xd220ac=null,target:_0x1522e7=null,context:_0x5d1a70=null,attributes:_0x350cde={},isResolvable:_0x42cc73=!0x0,isSubmitted:_0x3d6765=!0x1,isFromAdapter:_0x139133=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x396d11),{'channelId':_0x396d11,'threadId':_0x190066,'comments':_0x556e7d,'unlinkedAt':_0x8f1d5e,'resolvedAt':_0x15045c,'resolvedBy':_0xd220ac,'target':_0x1522e7,'context':_0x5d1a70,'attributes':_0x350cde,'isFromAdapter':_0x139133,'isResolvable':_0x42cc73,'isSubmitted':_0x3d6765}),this['getCommentThread'](_0x190066);}['openNewCommentThread']({channelId:_0x4091ac=_t,threadId:_0x216f86=_0x25f5e2(),target:_0x5632b4,context:_0x57a798=null,isResolvable:_0x2adba9=!0x0}){if(this['_readOnlyChannels']['has'](_0x4091ac)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5632b4)throw new _0x388981('commentsrepository-missing-target');const _0x323bba=this['addCommentThread']({'channelId':_0x4091ac,'threadId':_0x216f86,'target':_0x5632b4,'context':_0x57a798,'isResolvable':_0x2adba9});if(!_0x323bba)return null;const _0x253143=this['_threadToController']['get'](_0x323bba),_0xcad498=_0x253143['view']['commentThreadInputView']['commentInputView'],_0x55d240=this['context']['plugins']['get'](O),_0x16e4f8=_0x55d240['getByInnerView'](_0x253143['view']);return _0x55d240['activate'](_0x16e4f8),_0xcad498['once']('editorReady',()=>_0xcad498['focus']()),_0x323bba;}['hasCommentThread'](_0x262e5b){if('string'!=typeof _0x262e5b)throw new _0x388981('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x262e5b);}['updateCommentThread']({channelId:_0x16e37d=_t,threadId:_0x143921,context:_0x4b44a3,unlinkedAt:_0x3d49af,attributes:_0x5900ca,isFromAdapter:_0x40f6d1=!0x1}){return this['fire'](Nt('updateCommentThread',_0x16e37d),{'channelId':_0x16e37d,'threadId':_0x143921,'context':_0x4b44a3,'unlinkedAt':_0x3d49af,'attributes':_0x5900ca,'isFromAdapter':_0x40f6d1}),this['getCommentThread'](_0x143921);}['getCommentThread'](_0x144f4b){if('string'!=typeof _0x144f4b)throw new _0x388981('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x144f4b);}['fetchCommentThread']({channelId:_0x3e80a2,threadId:_0x12e5e6}={}){const _0x1dca14=this['getCommentThread'](_0x12e5e6);if(_0x1dca14)return Promise['resolve'](_0x1dca14);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x388981('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3e80a2,'threadId':_0x12e5e6})['then'](_0x4588fc=>this['hasCommentThread'](_0x12e5e6)?this['getCommentThread'](_0x12e5e6):_0x4588fc?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3e80a2},_0x4588fc)):void 0x0)['catch'](_0x23483c=>{throw console['error'](_0x23483c),new _0x388981('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x477097,skipNotAttached:_0x4670b0=!0x1,skipEmpty:_0x520889=!0x1,toJSON:_0x3ce263=!0x1}={}){const _0x3a4ff5=[];for(const _0x5a3651 of this['_threads']['values']())_0x477097&&_0x5a3651['channelId']!==_0x477097||_0x4670b0&&!_0x5a3651['isAttached']||_0x520889&&0x0===_0x5a3651['length']||_0x3a4ff5['push'](_0x5a3651);return _0x3ce263?_0x3a4ff5['map'](_0x1bf9e0=>_0x1bf9e0['toJSON']()):_0x3a4ff5;}['setActiveCommentThread'](_0x3480ce){const _0x1ab4a1=this['context']['plugins']['get'](O);if(!_0x3480ce)return void(this['activeCommentThread']&&_0x1ab4a1['deactivateAll']());const _0x55aa4e=this['getCommentThread'](_0x3480ce);if(!_0x55aa4e)throw new _0x388981('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3480ce});if(!this['_threadToController']['has'](_0x55aa4e))throw new _0x388981('commentsrepository-active-not-attached',null,{'threadId':_0x3480ce});const _0x450f0b=_0x1ab4a1['getByInnerView'](this['_threadToController']['get'](_0x55aa4e)['view']);_0x1ab4a1['activate'](_0x450f0b);}['switchReadOnly'](_0x349195,_0x471d17){_0x349195?this['_readOnlyChannels']['add'](_0x471d17):this['_readOnlyChannels']['delete'](_0x471d17),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x32b7f6){return this['_readOnlyChannels']['has'](_0x32b7f6)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4993ea,_0x4e4a75){return new vt(_0x4993ea,_0x4e4a75);}['setPermissions'](_0x5afd8b,_0x5c6688=_t){this['_permissions']['set'](_0x5c6688,_0x5afd8b),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x379835=_t){return this['_permissions']['has'](_0x379835)?this['_permissions']['get'](_0x379835):bt;}['_addCommentThread']({channelId:_0x336dc3,threadId:_0x5e739f,comments:_0x70c758,unlinkedAt:_0xcae7af,resolvedAt:_0x31758e,resolvedBy:_0x3e6fab,target:_0x2b8ec4,context:_0x3c2e2d,attributes:_0x24ef72,isFromAdapter:_0x336b9f,isResolvable:_0x5da7d3,isSubmitted:_0x2ea0e4}){if('string'!=typeof _0x5e739f)throw new _0x388981('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5e739f});if(this['hasCommentThread'](_0x5e739f))throw new _0x388981('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5e739f});const _0x32dcfa=new ui(this,{'channelId':_0x336dc3,'id':_0x5e739f,'context':_0x3c2e2d,'attributes':_0x24ef72,'unlinkedAt':_0xcae7af,'resolvedAt':_0x31758e,'resolvedBy':_0x3e6fab?this['context']['plugins']['get'](st)['getUser'](_0x3e6fab):null,'isResolvable':_0x5da7d3,'isSubmitted':_0x2ea0e4||_0x336b9f});this['_threads']['set'](_0x5e739f,_0x32dcfa);for(const _0x5b45e3 of _0x70c758)_0x32dcfa['_add'](this['_createNewComment']({'threadId':_0x5e739f,..._0x5b45e3}));return _0x2b8ec4&&_0x32dcfa['attachTo'](_0x2b8ec4),_0x336b9f||!_0x32dcfa['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x336dc3,'threadId':_0x5e739f});}['_submitCommentThread']({channelId:_0x2e6f40,threadId:_0x312ea7}){if(!this['hasCommentThread'](_0x312ea7))throw new _0x388981('commentsrepository-missing-comment-thread',this);const _0x5270bb=this['getCommentThread'](_0x312ea7);if(_0x5270bb['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x332fff,comments:_0x2cc16d,resolvedAt:_0x48b16c,resolvedBy:_0x313700,context:_0x2430b6,attributes:_0x3ac66a}=_0x5270bb,_0x33e464=this['context']['plugins']['get']('PendingActions'),_0x4c76e7=_0x33e464['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2e6f40,'threadId':_0x332fff,'comments':_0x2cc16d['map'](_0x34b213=>_0x34b213['toJSON']()),'resolvedAt':_0x48b16c,'resolvedBy':_0x313700?_0x313700['id']:_0x313700,'context':_0x2430b6,'attributes':_0x3ac66a})['then'](({comments:_0x2f3139})=>{_0x33e464['remove'](_0x4c76e7);for(const _0x16b01a of _0x2f3139)this['_updateComment']({'channelId':_0x2e6f40,'threadId':_0x312ea7,'commentId':_0x16b01a['commentId'],'createdAt':_0x16b01a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3e75b6=>{throw console['error'](_0x3e75b6),new _0x388981('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x24c39d,target:_0x5aebef}){const _0x253655=this['getCommentThread'](_0x24c39d);if(!_0x253655)throw new _0x388981('commentsrepository-attach-missing-comment-thread',this);const _0x398a3d=this['context']['plugins']['get']('PendingActions'),_0x45d747=this['context']['plugins']['get'](O),_0x3a818c=this['_createCommentThreadView'](_0x253655),_0x2af550=new vt(_0x253655,_0x3a818c);let _0x4b2889=null;_0x3a818c['on']('change:isDirty',(_0x2fa0f3,_0x35bb31,_0x189881)=>{_0x189881?_0x4b2889=_0x398a3d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4b2889&&(_0x398a3d['remove'](_0x4b2889),_0x4b2889=null);}),this['_threadToController']['set'](_0x253655,_0x2af550),this['_viewToController']['set'](_0x3a818c,_0x2af550);const _0x52e85e=new S(this['context']['locale'],_0x3a818c);_0x52e85e['bind']('length')['to'](_0x3a818c),_0x52e85e['bind']('isDirty')['to'](_0x3a818c,'isDirty',_0x3a818c,'length',(_0x18f1a3,_0x438866)=>_0x18f1a3||!_0x438866),_0x52e85e['bind']('isActive')['to'](_0x3a818c),_0x52e85e['type']='comment';const _0x352924=new d({'view':_0x52e85e,'target':_0x5aebef,'type':'comment','isVisible':!_0x253655['archivedAt']});return _0x3a818c['on']('escape',()=>{_0x352924['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3a818c,_0x352924),_0x45d747['add'](_0x352924),_0x352924;}['_bindAnnotationToEditors'](_0x466226,_0x189a59){this['listenTo'](_0x466226,'editorReady',(_0x69c237,_0x45eeeb)=>{const _0x406563=_0x45eeeb['ui']['view']['body']['bodyCollectionContainer'];_0x189a59['focusableElements']['add'](_0x406563),this['context']instanceof _0x510f43&&this['context']['ui']['focusTracker']['add'](_0x406563);},{'priority':'highest'}),this['listenTo'](_0x466226,'editorDestroyed',(_0x2fea2e,_0x2931d9)=>{const _0x4eb075=_0x2931d9['ui']['view']['body']['bodyCollectionContainer'];_0x189a59['focusableElements']['has'](_0x4eb075)&&_0x189a59['focusableElements']['remove'](_0x4eb075),this['context']instanceof _0x510f43&&this['context']['ui']['focusTracker']['remove'](_0x4eb075);});}['_unbindEditors'](_0x411b72){this['stopListening'](_0x411b72,'editorReady'),this['stopListening'](_0x411b72,'editorDestroyed');}['_createCommentThreadView'](_0x284247){const _0x51b2bb=this['context']['plugins']['get'](st),{config:_0x33a0d4,locale:_0x4f1aee}=this['context'],_0x2902af=pt(_0x33a0d4['get']('locale'),_0x4f1aee);return new(0x0,(_0x33a0d4['get']('comments'))['CommentThreadView'])(_0x4f1aee,_0x284247,_0x51b2bb['me'],{'editorConfig':{..._0x33a0d4['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x33a0d4['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x33a0d4['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x33a0d4['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x33a0d4['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2902af,'CommentView':_0x33a0d4['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x34184c,channelId:_0xfa6656,resolvedAt:_0x1f142f,resolvedBy:_0x3db919,isFromAdapter:_0xf15df4}){if(!this['hasCommentThread'](_0x34184c))throw new _0x388981('commentsrepository-missing-comment-thread',null,{'threadId':_0x34184c});const _0x3f7457=this['getCommentThread'](_0x34184c);if(_0x3f7457['isResolved'])throw new _0x388981('commentsrepository-resolved-comment-thread',null,{'threadId':_0x34184c});const _0x6404e6=this['context']['plugins']['get'](st);if(_0x3f7457['resolvedBy']=_0x6404e6['getUser'](_0x3db919),_0x3f7457['resolvedAt']=_0x1f142f,_0xf15df4||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2d83c0=this['context']['plugins']['get']('PendingActions'),_0x5ca5da=_0x2d83c0['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xfa6656,'threadId':_0x34184c})['then'](({resolvedAt:_0x53ce99,resolvedBy:_0x435526})=>{_0x2d83c0['remove'](_0x5ca5da),_0x3f7457['resolvedBy']['id']!==_0x435526&&(_0x3f7457['resolvedBy']=_0x6404e6['getUser'](_0x435526)),_0x3f7457['resolvedAt']=_0x53ce99;})['catch'](_0x4cccf5=>{throw console['error'](_0x4cccf5),new _0x388981('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x17fc0b,channelId:_0x525210,isFromAdapter:_0x390495}){if(!this['hasCommentThread'](_0x17fc0b))throw new _0x388981('commentsrepository-missing-comment-thread',null,{'threadId':_0x17fc0b});const _0x54f215=this['getCommentThread'](_0x17fc0b);if(!_0x54f215['isResolved'])throw new _0x388981('commentsrepository-reopen-comment-thread',null,{'threadId':_0x17fc0b});if(_0x54f215['resolvedBy']=null,_0x54f215['resolvedAt']=null,_0x390495||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xd38e81=this['context']['plugins']['get']('PendingActions'),_0x833767=_0xd38e81['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x525210,'threadId':_0x17fc0b})['then'](()=>_0xd38e81['remove'](_0x833767))['catch'](_0x40c024=>{throw console['error'](_0x40c024),new _0x388981('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0xf6174,isFromAdapter:_0x5e7bce}){const _0x11a822=this['getCommentThread'](_0xf6174);if(!_0x11a822)throw new _0x388981('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0xf6174),this['_threads']['delete'](_0xf6174),!_0x11a822['isSubmitted']||_0x5e7bce||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2f15c6=this['context']['plugins']['get']('PendingActions'),{channelId:_0xfa82fa}=_0x11a822,_0x525037=_0x2f15c6['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xfa82fa,'threadId':_0xf6174})['then'](()=>_0x2f15c6['remove'](_0x525037))['catch'](_0x27812c=>{throw console['error'](_0x27812c),new _0x388981('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1b62c2,unlinkedAt:_0x9380bd,context:_0x1ea22a,attributes:_0x5d493c,isFromAdapter:_0x49d74f}){if('string'!=typeof _0x1b62c2)throw new _0x388981('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1b62c2});if(!this['hasCommentThread'](_0x1b62c2))throw new _0x388981('commentsrepository-missing-comment-thread',null,{'threadId':_0x1b62c2});const _0x182164=this['getCommentThread'](_0x1b62c2);let _0x39da6a=!0x1;if(void 0x0!==_0x1ea22a&&_0x182164['context']!==_0x1ea22a&&(_0x182164['context']=_0x1ea22a,_0x39da6a=!0x0),void 0x0!==_0x9380bd&&_0x182164['unlinkedAt']!==_0x9380bd&&(_0x182164['unlinkedAt']=_0x9380bd,_0x39da6a=!0x0),_0x5d493c&&!At(_0x5d493c,_0x182164['attributes'])&&(_0x182164['attributes']=_0x5d493c,_0x39da6a=!0x0),!_0x39da6a)return Promise['resolve']();if(!_0x182164['isSubmitted']||_0x49d74f||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x21061c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x45c048}=_0x182164,_0x3b60eb=_0x21061c['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x45c048,'threadId':_0x1b62c2,'context':_0x1ea22a,'unlinkedAt':_0x9380bd,'attributes':_0x5d493c})['then'](()=>_0x21061c['remove'](_0x3b60eb))['catch'](_0x5a175a=>{throw console['error'](_0x5a175a),new _0x388981('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x12e344){const _0x2ef7f4=this['context']['plugins']['get'](O),_0x36af66=this['getCommentThread'](_0x12e344);if(_0x36af66['_isAttached']=!0x1,this['_threadToController']['has'](_0x36af66)){const _0x574ba0=this['_threadToController']['get'](_0x36af66),_0x5f52c6=_0x574ba0['view'],_0x4f0c6f=_0x2ef7f4['getByInnerView'](_0x5f52c6);this['_threadToController']['delete'](_0x36af66),this['_viewToController']['delete'](_0x5f52c6),_0x4f0c6f&&_0x2ef7f4['remove'](_0x4f0c6f),_0x574ba0['destroy'](),_0x5f52c6['destroy']()['then'](()=>{this['_unbindEditors'](_0x5f52c6);});}}['_updateActiveAnnotation']({threadId:_0x48ee3d,resolvedAt:_0x5e9bcc,unlinkedAt:_0x4ef5ac}){const _0x53e191=!!_0x5e9bcc,_0x186ff3=this['context']['plugins']['get'](O),_0x9fde41=this['getCommentThread'](_0x48ee3d);if(this['_threadToController']['has'](_0x9fde41)){const _0x252a08=this['_threadToController']['get'](_0x9fde41)['view'],_0x21102f=_0x186ff3['getByInnerView'](_0x252a08);_0x21102f&&(_0x53e191&&_0x186ff3['_removeActiveAnnotation'](_0x21102f),_0x4ef5ac?_0x21102f['isVisible']=!0x1:_0x21102f['refreshVisibility']());}}['_getExternalAuthor'](_0x11170e){const _0xba1e0c=this['context']['plugins']['get'](st),_0x4c757c=It('external:'+_0x11170e),_0x3489fc=_0xba1e0c['getUser'](_0x4c757c);return _0x3489fc||_0xba1e0c['addUser']({'id':_0x4c757c,'name':_0x11170e});}['_createNewComment']({threadId:_0x513230,commentId:_0x2739e3=_0x25f5e2(),content:_0x46a2af,authorId:_0xc4aa3f,createdAt:_0x1cb33d,attributes:_0x24cc8d}){if('string'!=typeof _0x2739e3)throw new _0x388981('commentsrepository-invalid-commentid');if('string'!=typeof _0xc4aa3f)throw new _0x388981('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x46a2af||!_0x46a2af['trim']())throw new _0x388981('commentsrepository-invalid-comment-content');const _0x15f050=this['context']['plugins']['get'](st)['getUser'](_0xc4aa3f);if(!_0x15f050)throw new _0x388981('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xc4aa3f});let _0x29d6e3=null,_0x3a96c8=_0x1cb33d;return _0x24cc8d?.['@external']&&(_0x29d6e3=this['_getExternalAuthor'](_0x24cc8d['@external']['authorName']),_0x3a96c8=new Date(_0x24cc8d['@external']['createdAt'])),new fi(this,{'threadId':_0x513230,'id':_0x2739e3,'author':_0x29d6e3||_0x15f050,'creator':_0x15f050,'content':_0x46a2af,'createdAt':_0x1cb33d,'authoredAt':_0x3a96c8,'attributes':_0x24cc8d});}['_addComment'](_0x530040){let {threadId:_0x17d814,content:_0x8c64b2,attributes:_0x49b739,isFromAdapter:_0x3c94e3}=_0x530040;const _0x24e56d=this['getCommentThread'](_0x530040['threadId']);if(!_0x24e56d)throw new _0x388981('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3978d5=this['_createNewComment'](_0x530040),{id:_0x44653e}=_0x3978d5;if(_0x24e56d['_add'](_0x3978d5),_0x3c94e3||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x24e56d['isSubmitted'])return Promise['resolve']();const _0x1713be=this['context']['plugins']['get']('PendingActions'),{channelId:_0x319ee3}=_0x24e56d,_0x579756=_0x1713be['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x49b739||(_0x49b739={}),this['adapter']['addComment']({'channelId':_0x319ee3,'threadId':_0x17d814,'commentId':_0x44653e,'content':_0x8c64b2,'attributes':_0x49b739})['then'](_0x4b6bd5=>{_0x1713be['remove'](_0x579756),_0x4b6bd5&&this['_updateComment']({'channelId':_0x319ee3,'threadId':_0x17d814,'commentId':_0x44653e,'createdAt':_0x4b6bd5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x6ec975=>{throw console['error'](_0x6ec975),new _0x388981('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3c0502,commentId:_0x406428,content:_0x494259,createdAt:_0xf16abf,attributes:_0x577c16,isFromAdapter:_0x30ebbb}){if(void 0x0!==_0x494259&&('string'!=typeof _0x494259||!_0x494259['trim']()['length']))throw new _0x388981('commentsrepository-update-comment-invalid-content');const _0x40b40a=this['getCommentThread'](_0x3c0502),_0x146ed2=_0x40b40a['getComment'](_0x406428);if(!_0x146ed2)throw new _0x388981('commentsrepository-update-missing-comment',this);let _0x37055b=!0x1;if(_0x494259&&_0x494259!==_0x146ed2['content']&&(_0x146ed2['isEditable']||_0x30ebbb)&&(_0x146ed2['content']=_0x494259,_0x37055b=!0x0),_0xf16abf&&_0xf16abf!==_0x146ed2['createdAt']&&(_0x146ed2['createdAt']=_0xf16abf,_0x146ed2['attributes']&&_0x146ed2['attributes']['@external']||(_0x146ed2['authoredAt']=_0xf16abf),_0x37055b=!0x0),_0x577c16&&!At(_0x577c16,_0x146ed2['attributes'])&&(_0x146ed2['attributes']=_0x577c16,_0x37055b=!0x0),!_0x37055b)return Promise['resolve']();if(_0x40b40a['fire']('commentUpdated'),_0x30ebbb||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1f7eba=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16baa1}=this['getCommentThread'](_0x146ed2['threadId']),_0x5a4185=_0x1f7eba['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x16baa1,'threadId':_0x3c0502,'commentId':_0x406428,'content':_0x494259,'attributes':_0x577c16})['then'](()=>_0x1f7eba['remove'](_0x5a4185))['catch'](_0x21dcc2=>{throw console['error'](_0x21dcc2),new _0x388981('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3bcdcc,commentId:_0x27d1b0,isFromAdapter:_0x2087e6}){const _0x4baf92=this['getCommentThread'](_0x3bcdcc),_0x5b22c5=_0x4baf92['getComment'](_0x27d1b0);if(!_0x5b22c5)throw new _0x388981('commentsrepository-remove-missing-comment',this);if(_0x4baf92['_remove'](_0x5b22c5),_0x2087e6||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xe5701b=this['context']['plugins']['get']('PendingActions'),{channelId:_0xa24140}=_0x4baf92,_0x3a563d=_0xe5701b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xa24140,'threadId':_0x3bcdcc,'commentId':_0x27d1b0})['then'](()=>_0xe5701b['remove'](_0x3a563d))['catch'](_0x125289=>{throw console['error'](_0x125289),new _0x388981('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x586f16(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x47af4a,_0x5a5b47){super();const _0x3e1189=_0x5a5b47['isResolvable'];this['channelId']=_0x5a5b47['channelId'],this['id']=_0x5a5b47['id'],this['comments']=new _0xe77389(),this['_repository']=_0x47af4a,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5a5b47['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x47af4a,'_permissions',_0x47af4a,'_readOnlyChannels',()=>_0x47af4a['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x47af4a,'_permissions',()=>_0x47af4a['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x47af4a,'_permissions',()=>{const _0x1747cd=_0x47af4a['getPermissions'](this['channelId']);return _0x1747cd['write']||_0x1747cd['admin'];}),this['bind']('isResolvable')['to'](_0x47af4a,'_permissions',()=>_0x3e1189&&_0x47af4a['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5a5b47['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x484427,_0x224243)=>_0x484427?_0x224243?_0x484427<_0x224243?_0x484427:_0x224243:_0x484427:_0x224243),this['set']('unlinkedAt',_0x5a5b47['unlinkedAt']||null),this['set']('resolvedAt',_0x5a5b47['resolvedAt']||null),this['set']('resolvedBy',_0x5a5b47['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4198af=>!!_0x4198af),this['set']('attributes',_0x5a5b47['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x251443,_0x5d2e31)=>_0x251443+_0x5d2e31['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x4ff83,id:_0xda1b88}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x4ff83),{'channelId':_0x4ff83,'threadId':_0xda1b88});}['setUnlinkedAt'](_0x4e8559){this['_update']({'unlinkedAt':_0x4e8559});}['resolve']({resolvedAt:_0x3b8414=new Date(),resolvedBy:_0x5b5573=null,isFromAdapter:_0x59c4bc=!0x1}={}){const _0x412c39=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x4f658e,id:_0x419a60}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x4f658e),{'channelId':_0x4f658e,'threadId':_0x419a60,'resolvedAt':_0x3b8414,'resolvedBy':_0x5b5573||_0x412c39['id'],'isFromAdapter':_0x59c4bc});}['reopen']({isFromAdapter:_0x10252f=!0x1}={}){const {channelId:_0x51d24d,id:_0x412794}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x51d24d),{'channelId':_0x51d24d,'threadId':_0x412794,'isFromAdapter':_0x10252f});}['setContext'](_0x360a65){this['context']||this['_update']({'context':_0x360a65});}['setAttribute'](_0x3fc5d8,_0x5cd20d){const _0xe2d410=wt(this['attributes']);yt(_0xe2d410,_0x3fc5d8,_0x5cd20d),this['_update']({'attributes':_0xe2d410});}['removeAttribute'](_0x2d3786){const _0x3b60fe=wt(this['attributes']);Ct(_0x3b60fe,_0x2d3786),this['_update']({'attributes':_0x3b60fe});}['remove']({isFromAdapter:_0x2b3320=!0x1}={}){const {channelId:_0x2360db,id:_0x1fcce8}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x2360db),{'channelId':_0x2360db,'threadId':_0x1fcce8,'isFromAdapter':_0x2b3320});}['attachTo'](_0x5e01da){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x5e01da});}['addComment'](_0x5c4bca){const {channelId:_0x4766bb,id:_0x5340d4}=this;this['_repository']['fire'](Nt('addComment',_0x4766bb,_0x5340d4),Object['assign']({'channelId':_0x4766bb,'threadId':_0x5340d4},_0x5c4bca));}['getComment'](_0x510c93){if('string'!=typeof _0x510c93)throw new _0x388981('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x510c93});return this['comments']['get'](_0x510c93);}['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'](_0x1bbdd1=>_0x1bbdd1['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2e3e3c){return this['listenTo'](_0x2e3e3c,'change:authoredAt',()=>{const _0x224dde=this['_findOptimalIndex'](_0x2e3e3c),_0xc7a75=this['comments'];_0x224dde-0x1!=_0xc7a75['getIndex'](_0x2e3e3c)&&_0x224dde+0x1!=_0xc7a75['getIndex'](_0x2e3e3c)&&(this['_remove'](_0x2e3e3c),this['_add'](_0x2e3e3c));}),this['comments']['add'](_0x2e3e3c,this['_findOptimalIndex'](_0x2e3e3c));}['_update'](_0x531663){const {channelId:_0x3f5556,id:_0xa2597a}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x3f5556),{..._0x531663,'channelId':_0x3f5556,'threadId':_0xa2597a});}['_remove'](_0x40007c){return this['stopListening'](_0x40007c),_0x40007c['destroy'](),this['comments']['remove'](_0x40007c);}['_findOptimalIndex'](_0x1188d0){const _0x5c97e7=this['comments']['find'](_0x52626c=>new Date(_0x52626c['authoredAt'])['getTime']()>new Date(_0x1188d0['authoredAt'])['getTime']());return _0x5c97e7?this['comments']['getIndex'](_0x5c97e7):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x586f16(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5e1848,_0x104be9){super();const _0x286db3=_0x5e1848['context']['plugins']['get'](st)['me'],_0x181e3e=_0x5e1848['getCommentThread'](_0x104be9['threadId']),_0x514a37=0x0===_0x181e3e['comments']['length'],_0x27db48=_0x286db3===_0x104be9['author'];this['id']=_0x104be9['id'],this['threadId']=_0x104be9['threadId'],this['author']=_0x104be9['author'],this['creator']=_0x104be9['creator'],this['isExternal']=Boolean(_0x104be9['attributes']&&_0x104be9['attributes']['@external']),this['set']('content',_0x104be9['content']),this['createdAt']=_0x104be9['createdAt']||new Date(),this['set']('authoredAt',_0x104be9['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x181e3e,'resolvedAt'),this['set']('attributes',_0x104be9['attributes']||{}),this['bind']('isEditable')['to'](_0x5e1848,'_permissions',()=>{const _0x53eaea=_0x5e1848['getPermissions'](_0x181e3e['channelId'])['write'],_0x1ade5e=_0x5e1848['getPermissions'](_0x181e3e['channelId'])['modifyAll'];return _0x27db48&&_0x53eaea||!_0x27db48&&_0x1ade5e;}),this['bind']('isRemovable')['to'](_0x181e3e,'isRemovable',_0x5e1848,'_permissions',_0x1273b5=>{const _0x27e994=_0x5e1848['getPermissions'](_0x181e3e['channelId'])['write'],_0x4e76ca=_0x5e1848['getPermissions'](_0x181e3e['channelId'])['modifyAll'];return _0x27db48&&_0x27e994||_0x1273b5&&_0x514a37||!_0x27db48&&_0x4e76ca&&!_0x514a37;}),this['bind']('isReadOnly')['to'](_0x181e3e,'isReadOnly'),this['_repository']=_0x5e1848;}get['weight'](){return Math['max'](function(_0x3c0b1a){const _0x35b967=document['createElement']('div');return _0x35b967['innerHTML']=_0x3c0b1a,_0x35b967['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2b3037){const {threadId:_0x2543c9,id:_0x248cf9}=this;if(!this['_repository']['hasCommentThread'](_0x2543c9))throw new _0x388981('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3e4862}=this['_repository']['getCommentThread'](_0x2543c9);this['_repository']['fire'](Nt('updateComment',_0x3e4862,_0x2543c9),{'channelId':_0x3e4862,'threadId':_0x2543c9,'commentId':_0x248cf9,..._0x2b3037});}['setAttribute'](_0x59d6ba,_0x11021d){const _0x3bd739=wt(this['attributes']);yt(_0x3bd739,_0x59d6ba,_0x11021d),this['update']({'attributes':_0x3bd739});}['removeAttribute'](_0x13dd2b){const _0x1b2a51=wt(this['attributes']);Ct(_0x1b2a51,_0x13dd2b),this['update']({'attributes':_0x1b2a51});}['remove'](_0x4c0a43={}){if(!_0x4c0a43['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4da5bb,id:_0x18e08a}=this;if(!this['_repository']['hasCommentThread'](_0x4da5bb))throw new _0x388981('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4456f0}=this['_repository']['getCommentThread'](_0x4da5bb);this['_repository']['fire'](Nt('removeComment',_0x4456f0,_0x4da5bb),{'channelId':_0x4456f0,'threadId':_0x4da5bb,'commentId':_0x18e08a,..._0x4c0a43});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x18c2cc,..._0x493423){for(const _0x44b571 of _0x493423)void 0x0!==_0x44b571&&(_0x18c2cc+=':'+String(_0x44b571));return _0x18c2cc;}class K extends _0x50221b{['refresh'](){const _0xb43b4=this['editor']['model']['document']['selection'];for(const _0x2a15f2 of _0xb43b4['getRanges']())if(this['_hasContent'](_0x2a15f2))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x123490=_0x25f5e2()}={}){const _0x523301=this['editor']['model'],_0x8e9610=[];for(const _0x24b9bc of _0x523301['document']['selection']['getRanges']())this['_hasContent'](_0x24b9bc)&&_0x8e9610['push'](this['_trimToContent'](_0x24b9bc));_0x523301['change'](_0x2805d6=>{for(const _0x33d1be of _0x8e9610){const _0x1ce7cc=_0x25f5e2()['substr'](0x1,0x5),_0x253ad8='comment:'+_0x123490+':'+_0x1ce7cc;_0x2805d6['addMarker'](_0x253ad8,{'range':_0x33d1be,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x418831){for(const _0x2a8cb3 of _0x418831['getItems']())if(this['_itemIsContent'](_0x2a8cb3))return!0x0;return!0x1;}['_itemIsContent'](_0x5d3600){return _0x5d3600['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5d3600)&&!_0x5d3600['is']('element','tableCell');}['_trimToContent'](_0x5d8632){const _0x3e0bfb=_0xfabfe3=>!this['_itemIsContent'](_0xfabfe3['item']),_0x2ec20d=_0x5d8632['start']['getLastMatchingPosition'](_0x3e0bfb),_0x7ae000=_0x5d8632['end']['getLastMatchingPosition'](_0x3e0bfb,{'direction':'backward'});return this['editor']['model']['createRange'](_0x2ec20d,_0x7ae000);}}class P extends _0x39c08c{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59b11a){super(_0x59b11a),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5e82ee=this['editor'],_0x2004ab=_0x5e82ee['model']['document']['selection'],_0xc8e8d4=_0x4e3986(()=>this['refreshSelectedViews'](),0xa);_0x2004ab['on']('change:range',(_0x20cdce,_0x54740a)=>{_0x54740a['directChange']&&(_0xc8e8d4['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5e82ee['editing']['view']['document'],'change:isFocused',(_0x3b02a0,_0x5320f5,_0x506b78)=>{_0x506b78&&_0xc8e8d4();}),this['listenTo'](_0x5e82ee['ui']['focusTracker'],'change:isFocused',(_0x4c9012,_0xcc5882,_0x592e2f)=>{_0x592e2f||_0x5e82ee['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x1db921=>this['_editorAnnotationsData']['has'](_0x1db921['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x346208){if(this['_editorAnnotations']['has'](_0x346208['view']))return;this['_editorAnnotations']['add'](_0x346208['view']),this['editor']['ui']['focusTracker']['add'](_0x346208['view']['element']);const _0x3b1546=this['editor']['plugins']['get'](O);this['listenTo'](_0x3b1546['collection'],'remove',(_0x1a2d70,_0x51e8a2)=>{this['editor']['ui']['focusTracker']['remove'](_0x51e8a2['view']['element']),this['_editorAnnotations']['delete'](_0x51e8a2['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4ba8be){if('function'!=typeof _0x4ba8be)throw new _0x388981('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4ba8be);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x47427e,annotations:_0x72772c}){const _0x5a5ec1=[],_0x337011=this['editor']['model']['document']['selection'],_0x417f7b=Array['from'](_0x337011['getRanges']());for(const [_0xf207ee,_0x158139]of this['_editorAnnotationsData']){const _0x41ec91=_0x4ea300(_0x158139),_0x56e4c6=_0x72772c['getByInnerView'](_0xf207ee);_0x41ec91&&_0x56e4c6&&_0x5a5ec1['push']({'annotation':_0x56e4c6,'range':_0x41ec91});}function _0x4ea300(_0x44ed51){for(const _0x2a3e7c of _0x44ed51)for(const _0x2c7c4e of _0x417f7b)if(_0x2a3e7c['containsRange'](_0x2c7c4e,!_0x337011['isCollapsed']))return _0x2a3e7c;return null;}return _0x5a5ec1['sort']((_0x5cb700,_0x415665)=>{const _0x283d34=_0x5cb700['range'],_0x1784bd=_0x415665['range'];if(!_0x283d34['isEqual'](_0x1784bd)){if(_0x283d34['containsRange'](_0x1784bd,!0x0))return 0x1;if(_0x1784bd['containsRange'](_0x283d34,!0x0))return-0x1;}return _0x5cb700['annotation']==_0x47427e?-0x1:_0x415665['annotation']==_0x47427e?0x1:0x0;})['map'](_0x2d59a6=>_0x2d59a6['annotation']);}get['_editorAnnotationsData'](){const _0x4f203c=new Map();for(const _0x170ed0 of Array['from'](this['_dataCollectors']))for(const [_0x2aeb3f,_0x403860]of _0x170ed0())_0x4f203c['set'](_0x2aeb3f,_0x403860);return _0x4f203c;}}class ct extends _0x39c08c{['afterInit'](){const _0x34abed=this['editor'];if(!_0x34abed['plugins']['has']('RestrictedEditingModeEditing'))return;_0x34abed['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x39c08c{constructor(_0x183bde){super(_0x183bde),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x37309d=this['editor'],_0x426c4f=_0x37309d['commands']['get']('importWord'),_0xd860b=_0x37309d['plugins']['get'](st);_0x426c4f&&(_0x426c4f['on']('execute',(_0x285059,[,_0x47cb35])=>{_0x47cb35['collaboration_features']={'comments':!0x0,'user_id':_0xd860b['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x426c4f,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5f39b0,_0x3cce11){const {comment_threads:_0x2ceac4}=_0x3cce11;_0x2ceac4&&_0x2ceac4['forEach'](({thread_id:_0x45eacb,comments:_0x49e811,is_resolved:_0x49511c})=>{const _0x3e4f96=new Date(),_0x2ad99a=_0x49e811['map'](({author:_0x3623f5,content:_0xa21236,created_at:_0x14ab5f})=>({'content':_0xa21236,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x3e4f96,'attributes':{'@external':{'authorName':_0x3623f5,'createdAt':_0x14ab5f?new Date(_0x14ab5f):new Date(),'source':'importWord'}}})),_0xc460c4=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xc460c4,'threadId':_0x45eacb,'comments':_0x2ad99a,'resolvedAt':_0x49511c?_0x3e4f96:null});});}}class ut extends _0x39c08c{constructor(_0x13a5dc){super(_0x13a5dc),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x20e49f=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x20e49f,'contentInsertion',(_0x3d7b89,_0x26591a)=>this['_removeMarkersWithoutThreads'](_0x26591a['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x12107f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x12107f;const _0x5c40d7=this['editor']['plugins']['get']('CommentsRepository');for(const _0x20f7af of _0x12107f['keys']()){const [_0x2edcf5,_0x3796c8]=_0x20f7af['split'](':');'comment'!=_0x2edcf5||_0x5c40d7['hasCommentThread'](_0x3796c8)||_0x12107f['delete'](_0x20f7af);}return _0x12107f;}['_registerMarkerInClipboardPipeline'](){const _0x256a4e=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3025c7=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3025c7&&_0x256a4e['_registerMarkerToCopy']('comment',_0x3025c7);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xc49c21){switch(_0xc49c21){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ft extends _0x39c08c{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x36ac4f,_0x3d8722)=>{if(!_0x3d8722['options']['showCommentHighlights'])return null;if(_0x3d8722['options']['ignoreResolvedComments']){const {id:_0x2da78a}=er(_0x36ac4f['markerName']),_0x4b069b=this['editor']['plugins']['get'](o);if(_0x4b069b['getCommentThread'](_0x2da78a)?.['isResolved']&&_0x36ac4f['item'])return _0x3d8722['consumable']['consume'](_0x36ac4f['item'],'addMarker:'+_0x36ac4f['markerName']),_0x3d8722['consumable']['consume'](_0x36ac4f['item'],'removeMarker:'+_0x36ac4f['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4cae04=>{_0x4cae04['on']('addMarker:comment',(_0x294a81,_0x4aaaf6,_0x3a0e71)=>{if(!_0x3a0e71['options']['showCommentHighlights'])return;const _0x40bb6a=_0x4aaaf6['item'];if(!_0x40bb6a)return;const _0x45684f=_0x3a0e71['mapper']['toViewElement'](_0x40bb6a);this['editor']['model']['schema']['isObject'](_0x40bb6a)&&_0x45684f&&!_0x45684f['getCustomProperty']('widget')&&_0x45684f['is']('containerElement')&&_0x52e501(_0x45684f,_0x3a0e71['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5ed877,{writer:_0x32e332,options:_0x134a25})=>{if(!_0x134a25['showCommentHighlights'])return null;const _0x7fa475=_0x32e332['createContainerElement']('div'),_0x51330d=_0x32e332['createEmptyElement']('hr');return _0x32e332['addClass']('ck-horizontal-line',_0x7fa475),_0x32e332['insert'](_0x32e332['createPositionAt'](_0x7fa475,0x0),_0x51330d),_0x7fa475;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5d718f,{writer:_0xf4916,options:_0x183bbe})=>{if(!_0x183bbe['showCommentHighlights'])return null;const _0x73d417=_0xf4916['createContainerElement']('span'),_0x124c05=_0xf4916['createEmptyElement']('img');return _0xf4916['addClass']('image-inline',_0x73d417),_0xf4916['insert'](_0xf4916['createPositionAt'](_0x73d417,0x0),_0x124c05),_0x73d417;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2b14c0,{writer:_0x2f18a5,options:_0x30ec9b})=>{if(_0x30ec9b['showCommentHighlights'])return _0x2f18a5['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x31efcd,_0x231498,_0x14deba)=>{_0x14deba['options']['showCommentHighlights']&&_0x31efcd['stop']();},{'priority':'high'});}}class r extends _0x39c08c{static get['requires'](){return[o,P,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49fa84){super(_0x49fa84),this['set']('isThreadsLoadingPaused',!0x0),_0x49fa84['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x10da69,_0xc6a585,_0x1a4366,_0x2afa0c)=>{const _0x2d4168=_0x49fa84['plugins']['get'](o),_0x2d0138=_0x1a4366?er(_0x1a4366)['id']:null;_0x49fa84['model']['change'](()=>{if(_0x2d0138){const _0x4e3327=this['getAllMarkersForId'](_0x2d0138);for(const _0x1a897d of _0x4e3327)_0x49fa84['editing']['reconvertMarker'](_0x1a897d);}if(_0x2afa0c){const {id:_0x55aa4f}=er(_0x2afa0c),_0x585aaf=_0x2d4168['getCommentThread'](_0x55aa4f);if(_0x585aaf&&_0x585aaf['unlinkedAt'])return;if(_0x585aaf&&!_0x585aaf['isAttached'])return;const _0x56fbb1=this['getAllMarkersForId'](_0x55aa4f);for(const _0x1331a4 of _0x56fbb1)_0x49fa84['editing']['reconvertMarker'](_0x1331a4);}}),_0x2d0138&&this['scrollToThreadMarker'](_0x2d0138);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x18f838=this['editor'],_0x35383b=_0x18f838['plugins']['get'](o),_0x3f777a=_0x18f838['config']['get']('collaboration.channelId'),_0x31b121=_0x35383b['getCommentThreads']()['filter'](_0x52bae6=>_0x52bae6['channelId']!==_0x3f777a);_0x18f838['commands']['add']('addCommentThread',new K(_0x18f838)),this['listenTo'](_0x18f838,'change:isReadOnly',(_0x47489a,_0x33b0c6,_0x1e3e87)=>{_0x35383b['switchReadOnly'](_0x1e3e87,_0x18f838['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x35383b,dt('addCommentThread',_0x3f777a),(_0x5e79b8,{threadId:_0xfee57})=>{const _0x3e105b=this['editor']['plugins']['get'](o)['getCommentThread'](_0xfee57);_0x3e105b?.['unlinkedAt']&&this['_attachArchivedThread'](_0xfee57);}),this['listenTo'](_0x35383b,dt('removeCommentThread',_0x3f777a),(_0x48a69c,{threadId:_0x4f1bda})=>{_0x18f838['model']['enqueueChange']({'isUndoable':!0x1},_0x391aed=>{const _0x26869b=this['getAllMarkersForId'](_0x4f1bda);for(const _0x3de91f of _0x26869b)_0x391aed['removeMarker'](_0x3de91f);});}),this['listenTo'](_0x35383b,dt('resolveCommentThread',_0x3f777a),(_0x59f3fe,{threadId:_0x446474})=>{(this['_reconvertMarkers'](_0x446474),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x446474)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x35383b,dt('reopenCommentThread',_0x3f777a),(_0xee3ac1,{threadId:_0x14f86c})=>{this['_reconvertMarkers'](_0x14f86c);},{'priority':'low'}),this['listenTo'](_0x35383b,dt('addComment',_0x3f777a),(_0x3df638,{threadId:_0x40e51c,isFromAdapter:_0x4e78b5})=>{const _0x540a72=this['getAllMarkersForId'](_0x40e51c);if(_0x4e78b5||0x0==_0x540a72['length']||!_0x35383b['hasCommentThread'](_0x40e51c))return;0x1===_0x35383b['getCommentThread'](_0x40e51c)['length']&&_0x18f838['model']['enqueueChange']({'isUndoable':!0x1},_0xaea78c=>{for(const _0x247213 of _0x540a72)_0xaea78c['updateMarker'](_0x247213,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x31b121);}['afterInit'](){!async function(_0x2467bd){const _0x46d27f=_0x5ad1b6([0x69,0x73,0x63,0x58,0x39,0x41,0x5a,0x30,0x74,0x65,0x4a,0x62,0x45,0x33,0x67,0x64,0x35,0x71,0x76,0x72,0x6e,0x59,0x49,0x61,0x66,0x4e,0x37,0x36,0x55,0x6b,0x54,0x4b,0x52,0x77,0x6c,0x34,0x4d,0x42,0x4c,0x43,0x44,0x48,0x51,0x56,0x47,0x6a,0x6d,0x32,0x38,0x7a,0x57,0x53,0x6f,0x4f,0x68,0x70,0x78,0x50,0x31,0x46,0x75,0x79]),_0x1f3ab5=0x8a7b0ee,_0x44ff1f=0x8a0db46^_0x1f3ab5,_0xf81ad7=window[_0x5ad1b6([0x44,0x61,0x74,0x65])][_0x5ad1b6([0x6e,0x6f,0x77])](),_0x4e2a8c=_0x2467bd[_0x5ad1b6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x398465=new window[(_0x5ad1b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x356359=>{_0x4e2a8c[_0x5ad1b6([0x6f,0x6e,0x63,0x65])](_0x5ad1b6([0x72,0x65,0x61,0x64,0x79]),_0x356359);}),_0x5400cb={[_0x5ad1b6([0x6b,0x74,0x79])]:_0x5ad1b6([0x45,0x43]),[_0x5ad1b6([0x75,0x73,0x65])]:_0x5ad1b6([0x73,0x69,0x67]),[_0x5ad1b6([0x63,0x72,0x76])]:_0x5ad1b6([0x50,0x2d,0x32,0x35,0x36]),[_0x5ad1b6([0x78])]:_0x5ad1b6([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]),[_0x5ad1b6([0x79])]:_0x5ad1b6([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]),[_0x5ad1b6([0x61,0x6c,0x67])]:_0x5ad1b6([0x45,0x53,0x32,0x35,0x36])},_0x2d7adc=_0x4e2a8c[_0x5ad1b6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5ad1b6([0x67,0x65,0x74])](_0x5ad1b6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x323787(){let _0x1321af,_0x504925=null,_0x398e59=null;try{if(_0x2d7adc==_0x5ad1b6([0x47,0x50,0x4c]))return _0x5ad1b6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1321af=_0x9ebc61(),!_0x1321af)return _0x5ad1b6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1321af[_0x5ad1b6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x398e59=_0x41efe5(_0x1321af[_0x5ad1b6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1321af[_0x5ad1b6([0x6a,0x74,0x69])])),await _0x15fcd4()?_0x102cb8()?_0x2f08ff()?_0x5ad1b6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5a99d2()?(_0x1321af[_0x5ad1b6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5ad1b6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x504925=_0x50fcc1(_0x5ad1b6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1321af[_0x5ad1b6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5ad1b6([0x74,0x72,0x69,0x61,0x6c])&&(_0x504925=_0x50fcc1(_0x5ad1b6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5aaa20()):_0x5ad1b6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5ad1b6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5ad1b6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5ad1b6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2f08ff(){const _0x5eab4b=[_0x5ad1b6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5ad1b6([0x74,0x72,0x69,0x61,0x6c])][_0x5ad1b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1321af[_0x5ad1b6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xf81ad7/0x3e8:0xe10*_0x44ff1f;return _0x1321af[_0x5ad1b6([0x65,0x78,0x70])]<_0x5eab4b;}function _0x102cb8(){const _0x2fe3f2=_0x1321af[_0x5ad1b6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2fe3f2)return!0x1;if(_0x2fe3f2[_0x5ad1b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ad1b6([0x2a])))return!0x0;if(_0x2fe3f2[_0x5ad1b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ad1b6([0x43,0x4d,0x54])))return!0x0;if(_0x2fe3f2[_0x5ad1b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ad1b6([0x52,0x43,0x4d,0x54]))){if(_0x213c25())return!0x0;if(_0x172bf9()||_0x49634d())return!0x0;}return!0x1;}function _0x5a99d2(){const _0x94cfc=_0x1321af[_0x5ad1b6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x94cfc||0x0==_0x94cfc[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x296b66}=new URL(window[_0x5ad1b6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x94cfc[_0x5ad1b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x296b66))return!0x0;const _0x1cb476=_0x296b66[_0x5ad1b6([0x73,0x70,0x6c,0x69,0x74])](_0x5ad1b6([0x2e]));return _0x94cfc[_0x5ad1b6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2a0907=>_0x2a0907[_0x5ad1b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ad1b6([0x2a])))[_0x5ad1b6([0x6d,0x61,0x70])](_0x3f0705=>_0x3f0705[_0x5ad1b6([0x73,0x70,0x6c,0x69,0x74])](_0x5ad1b6([0x2e])))[_0x5ad1b6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x250d76=>_0x250d76[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1cb476[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5ad1b6([0x6d,0x61,0x70])](_0xf84d64=>Array(_0x1cb476[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xf84d64[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5ad1b6([0x66,0x69,0x6c,0x6c])](_0xf84d64[0x0]===_0x5ad1b6([0x2a])?_0x5ad1b6([0x2a]):'')[_0x5ad1b6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xf84d64))[_0x5ad1b6([0x73,0x6f,0x6d,0x65])](_0x49fc07=>_0x1cb476[_0x5ad1b6([0x65,0x76,0x65,0x72,0x79])]((_0x3b8d23,_0x59d2b7)=>_0x49fc07[_0x59d2b7]===_0x3b8d23||_0x49fc07[_0x59d2b7]===_0x5ad1b6([0x2a])));}function _0x5aaa20(){return _0x504925&&_0x398e59?new window[(_0x5ad1b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x332c03,_0x2c6473)=>{_0x504925[_0x5ad1b6([0x74,0x68,0x65,0x6e])](_0x332c03,_0x2c6473),_0x398e59[_0x5ad1b6([0x74,0x68,0x65,0x6e])](_0x39586a=>{_0x39586a!=_0x5ad1b6([0x56,0x61,0x6c,0x69,0x64])&&_0x332c03(_0x39586a);},_0x2c6473);}):_0x504925||_0x398e59||_0x5ad1b6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x41efe5(_0x22f5ab,_0xaba6e4){return new window[(_0x5ad1b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xfb8e0b=>{if(_0x2f4792())return _0xfb8e0b(_0x5ad1b6([0x56,0x61,0x6c,0x69,0x64]));_0x2e7a29(),_0x4e2a8c[_0x5ad1b6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5ad1b6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x594346=!0x1;const _0x2f49fb=_0x25f5e2();function _0x2fca16(_0x16fd31){return!!_0x16fd31&&(typeof _0x16fd31===_0x5ad1b6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x16fd31===_0x5ad1b6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x16fd31[_0x5ad1b6([0x74,0x68,0x65,0x6e])]===_0x5ad1b6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x16fd31[_0x5ad1b6([0x63,0x61,0x74,0x63,0x68])]===_0x5ad1b6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3b03f5(_0x420647){_0x4583c6(_0x420647)[_0x5ad1b6([0x74,0x68,0x65,0x6e])](_0x508d18=>{if(!_0x508d18||_0x508d18[_0x5ad1b6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5ad1b6([0x6f,0x6b]))return _0x5ad1b6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5c9817(_0x9a1295(_0x2f49fb+_0xaba6e4))!=_0x508d18[_0x5ad1b6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5ad1b6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5ad1b6([0x56,0x61,0x6c,0x69,0x64]);})[_0x5ad1b6([0x74,0x68,0x65,0x6e])](_0x44c791=>(_0x43d626(),_0x44c791),()=>{const _0x96a0c7=_0x3f9fa0();return null==_0x96a0c7?(_0x43d626(),_0x5ad1b6([0x56,0x61,0x6c,0x69,0x64])):_0x5ad1b6(_0xf81ad7-_0x96a0c7>(0x2cab34ee^_0x1f3ab5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5ad1b6([0x74,0x68,0x65,0x6e])](_0xfb8e0b)[_0x5ad1b6([0x63,0x61,0x74,0x63,0x68])](()=>{_0xfb8e0b(_0x5ad1b6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x337e96=0x8915e6e^_0x1f3ab5;function _0x43d626(){const _0x5c63ff=_0x5ad1b6([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c9817(_0x9a1295(_0x22f5ab)),_0x1b74c1=_0xf193af(_0x5c9817(window[_0x5ad1b6([0x4d,0x61,0x74,0x68])][_0x5ad1b6([0x63,0x65,0x69,0x6c])](_0xf81ad7/_0x337e96)));window[_0x5ad1b6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5ad1b6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5c63ff,_0x1b74c1);}function _0x3f9fa0(){const _0x2081bb=_0x5ad1b6([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c9817(_0x9a1295(_0x22f5ab)),_0x5a7990=window[_0x5ad1b6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5ad1b6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2081bb);return _0x5a7990?window[_0x5ad1b6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xf193af(_0x5a7990),0x10)*_0x337e96:null;}function _0x4583c6(_0x2e7992){return new window[(_0x5ad1b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5835bc,_0x4ab80c)=>{_0x2e7992[_0x5ad1b6([0x74,0x68,0x65,0x6e])](_0x5835bc,_0x4ab80c),window[_0x5ad1b6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4ab80c,0x8a6642e^_0x1f3ab5);});}}_0x4e2a8c[_0x5ad1b6([0x6f,0x6e])](_0x5ad1b6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x38aea2,_0x59f26e)=>{if(_0x59f26e[0x0]!=_0x22f5ab)return _0xfb8e0b(_0x5ad1b6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x59f26e[0x1]={..._0x59f26e[0x1],[_0x5ad1b6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2f49fb};},{[_0x5ad1b6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5ad1b6([0x68,0x69,0x67,0x68])}),_0x4e2a8c[_0x5ad1b6([0x6f,0x6e])](_0x5ad1b6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5dd122=>{_0x2fca16(_0x5dd122[_0x5ad1b6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x594346=!0x0,_0x3b03f5(_0x5dd122[_0x5ad1b6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5ad1b6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5ad1b6([0x6c,0x6f,0x77])}),_0x398465[_0x5ad1b6([0x74,0x68,0x65,0x6e])](()=>{_0x594346||_0xfb8e0b(_0x5ad1b6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2f4792(){return _0x4e2a8c[_0x5ad1b6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ad1b6([0x76,0x69,0x65,0x77])][_0x5ad1b6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5ad1b6([0x61,0x75,0x74,0x6f]);}function _0x2e7a29(){_0x4e2a8c[_0x5ad1b6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ad1b6([0x76,0x69,0x65,0x77])][_0x5ad1b6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5ad1b6([0x61,0x75,0x74,0x6f]);}}function _0x50fcc1(_0x1097b8){const _0x23262a=[new window[(_0x5ad1b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x155fe4=>setTimeout(_0x155fe4,0x8ae8e22^_0x1f3ab5)),_0x398465[_0x5ad1b6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5ad1b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ba6d9=>{let _0xce01b5=0x0;_0x4e2a8c[_0x5ad1b6([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ad1b6([0x6f,0x6e])](_0x5ad1b6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x12a65e,_0x206929)=>{_0x206929[0x0][_0x5ad1b6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xce01b5++,_0xce01b5==(0x8a7b116^_0x1f3ab5)&&(_0x4ba6d9(),_0x12a65e[_0x5ad1b6([0x6f,0x66,0x66])]());});}))];return window[_0x5ad1b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5ad1b6([0x72,0x61,0x63,0x65])](_0x23262a)[_0x5ad1b6([0x74,0x68,0x65,0x6e])](()=>_0x1097b8);}async function _0x571711(){await _0x398465,_0x4e2a8c[_0x5ad1b6([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ad1b6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4e0609,_0x4e2a8c[_0x5ad1b6([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ad1b6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4e0609,_0x4e2a8c[_0x5ad1b6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5ad1b6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x213c25(){return _0x4861d0(_0x5ad1b6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5f4b8c(_0x5ad1b6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5ad1b6([0x73,0x74,0x61,0x74,0x65])]==_0x5ad1b6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x172bf9(){return _0x4861d0(_0x5ad1b6([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 _0x49634d(){return _0x4861d0(_0x5ad1b6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x23d458(_0x4ff3c4){const _0x16d8a9=_0x5e07a9();_0x4e2a8c[_0x16d8a9]=_0x5ad1b6([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4ff3c4,_0x4ff3c4!=_0x5ad1b6([0x56,0x61,0x6c,0x69,0x64])&&_0x571711();}function _0x5e07a9(){const _0x355796=window[_0x5ad1b6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5ad1b6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5ad1b6([0x6e,0x6f,0x77])]())[_0x5ad1b6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5ad1b6([0x2e]),'');let _0x2126cc=_0x5ad1b6([0x69]);for(let _0xecd008=0x0;_0xecd008<_0x355796[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xecd008+=0x2){let _0x561cb7=window[_0x5ad1b6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x355796[_0x5ad1b6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xecd008,_0xecd008+0x2));_0x561cb7>=_0x46d27f[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x561cb7-=_0x46d27f[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2126cc+=_0x46d27f[_0x561cb7];}return _0x2126cc;}function _0x9ebc61(){const _0x1b9113=_0x2d7adc[_0x5ad1b6([0x73,0x70,0x6c,0x69,0x74])](_0x5ad1b6([0x2e]));if(0x3!=_0x1b9113[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x59d1b6(_0x1b9113[0x1]);function _0x59d1b6(_0x9739f1){const _0x31d9a5=_0x2bc92a(_0x9739f1);return _0x31d9a5&&_0x257ceb()?_0x31d9a5:null;function _0x257ceb(){const _0x249b6a=_0x31d9a5[_0x5ad1b6([0x6a,0x74,0x69])],_0x263fa8=window[_0x5ad1b6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x249b6a[_0x5ad1b6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x249b6a[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5d95ef={..._0x31d9a5,[_0x5ad1b6([0x6a,0x74,0x69])]:_0x249b6a[_0x5ad1b6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x249b6a[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5d95ef[_0x5ad1b6([0x76,0x63])],_0x9a1295(_0x5d95ef)==_0x263fa8;}}}async function _0x15fcd4(){let _0x4c3e5d=!0x0;try{const _0x58f2b1=_0x2d7adc[_0x5ad1b6([0x73,0x70,0x6c,0x69,0x74])](_0x5ad1b6([0x2e])),[_0x4ea053,_0x561ac8,_0x51d6ce]=_0x58f2b1;return _0x30ade7(_0x4ea053),await _0x22198e(_0x4ea053,_0x561ac8,_0x51d6ce),_0x4c3e5d;}catch{return!0x1;}function _0x30ade7(_0x498565){const _0x2abb85=_0x2bc92a(_0x498565);_0x2abb85&&_0x2abb85[_0x5ad1b6([0x61,0x6c,0x67])]==_0x5ad1b6([0x45,0x53,0x32,0x35,0x36])||(_0x4c3e5d=!0x1);}async function _0x22198e(_0x27ef78,_0x44807c,_0x12ab2a){const _0x4592ff=window[_0x5ad1b6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5ad1b6([0x66,0x72,0x6f,0x6d])](_0x3829fe(_0x12ab2a),_0x22f2bb=>_0x22f2bb[_0x5ad1b6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x324f4b=new window[(_0x5ad1b6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5ad1b6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x27ef78+_0x5ad1b6([0x2e])+_0x44807c),_0x5a3b7a=window[_0x5ad1b6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5ad1b6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5a3b7a)return;const _0xf5e1f0=await _0x5a3b7a[_0x5ad1b6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5ad1b6([0x6a,0x77,0x6b]),_0x5400cb,{[_0x5ad1b6([0x6e,0x61,0x6d,0x65])]:_0x5ad1b6([0x45,0x43,0x44,0x53,0x41]),[_0x5ad1b6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5ad1b6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5ad1b6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5a3b7a[_0x5ad1b6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5ad1b6([0x6e,0x61,0x6d,0x65])]:_0x5ad1b6([0x45,0x43,0x44,0x53,0x41]),[_0x5ad1b6([0x68,0x61,0x73,0x68])]:{[_0x5ad1b6([0x6e,0x61,0x6d,0x65])]:_0x5ad1b6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xf5e1f0,_0x4592ff,_0x324f4b)||(_0x4c3e5d=!0x1);}}function _0x2bc92a(_0xcff714){return _0xcff714[_0x5ad1b6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5ad1b6([0x65,0x79]))?JSON[_0x5ad1b6([0x70,0x61,0x72,0x73,0x65])](_0x3829fe(_0xcff714)):null;}function _0x3829fe(_0x5d641d){return window[_0x5ad1b6([0x61,0x74,0x6f,0x62])](_0x5d641d[_0x5ad1b6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5ad1b6([0x2b]))[_0x5ad1b6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5ad1b6([0x2f])));}function _0x9a1295(_0x127b33){let _0x3d3e80=0x1505;function _0x19f11d(_0x1e4cf3){for(let _0x575f44=0x0;_0x575f44<_0x1e4cf3[_0x5ad1b6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x575f44++){const _0x6a14bd=_0x1e4cf3[_0x5ad1b6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x575f44);_0x3d3e80=(_0x3d3e80<<0x5)+_0x3d3e80+_0x6a14bd,_0x3d3e80&=_0x3d3e80;}}function _0x16099d(_0x3a5a7c){Array[_0x5ad1b6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3a5a7c)?_0x3a5a7c[_0x5ad1b6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x16099d):_0x3a5a7c&&typeof _0x3a5a7c==_0x5ad1b6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5ad1b6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3a5a7c)[_0x5ad1b6([0x73,0x6f,0x72,0x74])]()[_0x5ad1b6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x56386a,_0x55cd7a])=>{_0x19f11d(_0x56386a),_0x16099d(_0x55cd7a);}):_0x19f11d(window[_0x5ad1b6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3a5a7c));}return _0x16099d(_0x127b33),_0x3d3e80>>>0x0;}function _0x5c9817(_0x125a9b){return _0x125a9b[_0x5ad1b6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5ad1b6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5ad1b6([0x30]));}function _0xf193af(_0x176e6c){return _0x176e6c[_0x5ad1b6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5ad1b6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5ad1b6([0x6a,0x6f,0x69,0x6e])]('');}function _0x4861d0(_0x1b9c2f){return _0x4e2a8c[_0x5ad1b6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5ad1b6([0x68,0x61,0x73])](_0x1b9c2f);}function _0x5f4b8c(_0x1188a9){return _0x4e2a8c[_0x5ad1b6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5ad1b6([0x67,0x65,0x74])](_0x1188a9);}function _0x4e0609(){}function _0x5ad1b6(_0x5a6a8){return _0x5a6a8['map'](_0x536e6c=>String['fromCharCode'](_0x536e6c))['join']('');}_0x23d458(await _0x323787());}(this);}['destroy'](){const _0x20d091=this['editor']['plugins']['get'](o),_0x3afcab=this['editor']['config']['get']('collaboration.channelId');for(const _0x25ba0f of _0x20d091['getCommentThreads']({'channelId':_0x3afcab}))_0x20d091['_detachCommentThread'](_0x25ba0f['id']),_0x20d091['_threads']['delete'](_0x25ba0f['id']);super['destroy']();}['hasMarkerForId'](_0xf79a69){return this['getAllMarkersForId'](_0xf79a69)['length']>0x0;}['getAllMarkersForId'](_0x2e55d2){const _0x20c160=[];for(const _0x4b9e53 of this['editor']['model']['markers'])_0x4b9e53['name']['startsWith']('comment:'+_0x2e55d2)&&_0x20c160['push'](_0x4b9e53);return _0x20c160;}['scrollToThreadMarker'](_0x3d104e){const _0x5a030b=this['_getTargetForId'](_0x3d104e);_0x5a030b&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x3d104e&&rt({'target':_0x5a030b[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x30912b){this['editor']['model']['change'](()=>{for(const _0x394388 of this['getAllMarkersForId'](_0x30912b))this['editor']['editing']['reconvertMarker'](_0x394388);});}['_attachArchivedThread'](_0x3e7255){const _0x153f71=this['editor']['plugins']['get'](o),_0x528630=this['editor']['plugins']['get'](P),_0x2b8184=_0x153f71['getCommentThread'](_0x3e7255);if(!_0x2b8184['isAttached']){const _0x44e467=_0x2b8184['attachTo'](()=>this['_getTargetForId'](_0x2b8184['id']));_0x528630['registerAnnotation'](_0x44e467),_0x2b8184['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1c9a6c=this['editor'],_0x303ad1=_0x1c9a6c['plugins']['get'](st);_0x1c9a6c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x237997,_0x2741b2)=>{const {id:_0x25c64c}=er(_0x237997['markerName']),_0x4ac577=_0x1c9a6c['plugins']['get'](o)['getCommentThread'](_0x25c64c),_0x58c1c7=this['activeMarker']&&er(this['activeMarker'])['id']===_0x25c64c;let _0x15e7da;if(_0x4ac577&&_0x4ac577['isResolved']&&!_0x58c1c7&&_0x237997['item'])return _0x2741b2['consumable']['consume'](_0x237997['item'],'addMarker:'+_0x237997['markerName']),_0x2741b2['consumable']['consume'](_0x237997['item'],'removeMarker:'+_0x237997['markerName']),null;const _0x2b8e03=['ck-comment-marker'];return _0x58c1c7&&_0x2b8e03['push']('ck-comment-marker--active'),_0x15e7da=_0x4ac577?.['length']?_0x4ac577['comments']['first']['author']['id']:_0x303ad1['me']['id'],{'classes':_0x2b8e03,'attributes':{'data-comment':_0x25c64c,'data-author-id':_0x15e7da}};}}),_0x1c9a6c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x306654,{options:_0x4728fa})=>{if(_0x4728fa['showCommentHighlights'])return null;const _0x5738e6=_0x1c9a6c['plugins']['get'](o),_0x26927d=_0x1c9a6c['model']['markers']['get'](_0x306654),{id:_0x56ac32,part:_0x174395}=er(_0x306654);return _0x26927d&&!_0x26927d['affectsData']||_0x4728fa['ignoreResolvedComments']&&_0x5738e6['getCommentThread'](_0x56ac32)?.['isResolved']?null:{'group':'comment','name':_0x174395?_0x56ac32+':'+_0x174395:_0x56ac32};}}),_0x1c9a6c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x298f14,{writer:_0x274196})=>_0x274196['createElement']('$marker',{'data-name':'comment:'+_0x298f14['getAttribute']('id')})}),_0x1c9a6c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x42779e=this['editor'],_0x587c34=_0x42779e['plugins']['get'](o),_0x4c6a43=new Set(),_0x582dbb=new Set();_0x42779e['model']['document']['registerPostFixer'](_0x1427cb=>{let _0x2b710d=!0x1;for(const {name:_0x4af048,data:_0x288a9c}of _0x42779e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4ad9bf,id:_0x582763}=er(_0x4af048);let _0x302267=_0x288a9c['newRange'];if('comment'!==_0x4ad9bf||!_0x302267)continue;const _0x546b25='$graveyard'===_0x302267['root']['rootName'];_0x546b25||(_0x302267=mt(_0x302267,_0x42779e['model']),!_0x302267||_0x302267['isCollapsed']||!_0x288a9c['newRange']||_0x302267['isEqual'](_0x288a9c['newRange']))?_0x42779e['model']['hasContent'](_0x302267)&&!_0x546b25?this['isThreadsLoadingPaused']?_0x4c6a43['add'](_0x4af048):this['_handleThreadMarker'](_0x4af048,_0x582763):(_0x582dbb['add'](_0x4af048),_0x4c6a43['delete'](_0x4af048),_0x1427cb['removeMarker'](_0x4af048),_0x2b710d=!0x0):(_0x1427cb['updateMarker'](_0x4af048,{'range':_0x302267}),_0x2b710d=!0x0);}return _0x2b710d;}),this['on']('change:isThreadsLoadingPaused',(_0x15740d,_0x11d8a3,_0x23bf6e)=>{if(!_0x23bf6e&&_0x4c6a43['size'])for(const _0x2307d0 of _0x4c6a43){const {id:_0x28f7b7}=er(_0x2307d0);_0x4c6a43['delete'](_0x2307d0),_0x42779e['model']['markers']['get'](_0x2307d0)&&this['_handleThreadMarker'](_0x2307d0,_0x28f7b7);}}),this['listenTo'](_0x42779e['model']['document'],'change',()=>{for(const {name:_0x5313a1,data:{newRange:_0x45556d}}of _0x42779e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x311a2e,id:_0x576db5}=er(_0x5313a1);if('comment'!==_0x311a2e)continue;const _0x274e28=_0x587c34['getCommentThread'](_0x576db5),_0x7533df=this['hasMarkerForId'](_0x576db5);_0x274e28&&(!_0x274e28['_hasTargetInContent']&&_0x45556d&&_0x42779e['editing']['view']['once']('render',()=>{const _0x354e01=_0x42779e['plugins']['get'](O),_0x172b8f=_0x587c34['_threadToController']['get'](_0x274e28)['view'];_0x354e01['getByInnerView'](_0x172b8f)['refreshVisibility']();},{'priority':'low'}),_0x274e28['_hasTargetInContent']=_0x7533df||!!_0x45556d),_0x45556d||(_0x582dbb['add'](_0x5313a1),_0x4c6a43['delete'](_0x5313a1));}for(const _0x2057b2 of _0x582dbb){const {id:_0x5927c5}=er(_0x2057b2),_0x470faa=_0x587c34['getCommentThread'](_0x5927c5);if(_0x4c6a43['delete'](_0x2057b2),!_0x470faa)continue;const _0x1aa407=this['hasMarkerForId'](_0x5927c5);_0x1aa407||_0x470faa['isSubmitted']?_0x1aa407||_0x470faa['unlinkedAt']||_0x470faa['setUnlinkedAt'](new Date()):_0x470faa['remove']();}_0x582dbb['clear']();});}['_handleInitialThreads'](_0x5c5b26){_0x5c5b26['forEach'](_0x4a99a5=>{_0x4a99a5['unlinkedAt']&&this['_attachArchivedThread'](_0x4a99a5['id']);});}['_getTargetForId'](_0x5a5617){const _0xe6cfc6=this['editor'],_0x276209=this['getAllMarkersForId'](_0x5a5617);return et(_0xe6cfc6['editing'],_0x276209);}['_getTextContext'](_0x2df712){const _0x5b19e0=this['getAllMarkersForId'](_0x2df712);let _0x48bd71='',_0x1d8acb=!0x1;for(const _0x5d068b of _0x5b19e0){const _0x52c31e=_0x5d068b['getRange']();for(const _0x4b6f92 of Array['from'](_0x52c31e['getItems']()))_0x4b6f92['is']('$textProxy')?(_0x48bd71&&_0x1d8acb&&(_0x48bd71+='\x20',_0x1d8acb=!0x1),_0x48bd71+=_0x4b6f92['data']):_0x1d8acb=!0x0;_0x1d8acb=!0x0;}return _0x48bd71['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x592c39,_0x59b3eb){const _0x57b9f5=this['editor'],_0x2b9a12=_0x57b9f5['plugins']['get'](o);let _0x4de4ee=_0x2b9a12['getCommentThread'](_0x59b3eb);const _0x11639a=_0x57b9f5['config']['get']('collaboration.channelId'),_0x7ac683=_0x57b9f5['plugins']['get'](P);if(_0x4de4ee&&(_0x4de4ee['unlinkedAt']&&_0x4de4ee['setUnlinkedAt'](null),_0x4de4ee['isAttached']))return _0x4de4ee;return!this['getAllMarkersForId'](_0x59b3eb)[0x0]['managedUsingOperations']?_0x57b9f5['editing']['view']['once']('render',()=>{if(_0x2b9a12['getCommentThread'](_0x59b3eb))return;const _0x341c24=_0x57b9f5['plugins']['get'](O);_0x4de4ee=_0x2b9a12['openNewCommentThread']({'channelId':_0x11639a,'threadId':_0x59b3eb,'target':()=>this['_getTargetForId'](_0x59b3eb),'context':{'type':'text','value':this['_getTextContext'](_0x59b3eb)}});const _0x34233f=_0x2b9a12['_threadToController']['get'](_0x4de4ee)['view'],_0x1d96e2=_0x341c24['getByInnerView'](_0x34233f);_0x1d96e2&&_0x7ac683['registerAnnotation'](_0x1d96e2);},{'priority':'low'}):_0x2b9a12['fetchCommentThread']({'channelId':_0x11639a,'threadId':_0x59b3eb})['then'](_0x57bebe=>{if('destroyed'!==_0x57b9f5['state']){if(_0x4de4ee=_0x57bebe,_0x4de4ee&&!_0x4de4ee['isAttached']){const _0x2999ce=_0x4de4ee['attachTo'](()=>this['_getTargetForId'](_0x59b3eb));_0x7ac683['registerAnnotation'](_0x2999ce),_0x4de4ee['isResolved']&&this['_reconvertMarkers'](_0x59b3eb);}else{if(!_0x4de4ee){const _0x439e0c=this['getAllMarkersForId'](_0x59b3eb);_0x57b9f5['model']['change'](_0x25b0a6=>{for(const _0x57761f of _0x439e0c)_0x25b0a6['removeMarker'](_0x57761f);});}}}}),_0x4de4ee;}['_handleThreadMarker'](_0x2d34a1,_0x24a0db){const _0xcb7d3e=this['_attachMarkerToThread'](_0x2d34a1,_0x24a0db);_0xcb7d3e&&!_0xcb7d3e['context']&&_0xcb7d3e['setContext']({'type':'text','value':this['_getTextContext'](_0x24a0db)});}['_initAriaMarkerChangeAnnouncements'](){const _0x6f1184=this['editor'];ot(_0x6f1184['model'],({left:_0x54c841,entered:_0xbd16e9})=>{for(const _0x39bf42 of _0x54c841)if(ht(_0x39bf42)){_0x6f1184['ui']['ariaLiveAnnouncer']['announce'](E(_0x6f1184['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1eddd0 of _0xbd16e9)if(ht(_0x1eddd0)){_0x6f1184['ui']['ariaLiveAnnouncer']['announce'](E(_0x6f1184['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x5a6ef5)));break;}});}}function dt(_0x399cc6,_0x180c1d){return _0x180c1d?_0x399cc6+':'+_0x180c1d:_0x399cc6;}function er(_0x314d79){const _0x35a732=_0x314d79['split'](':');return{'group':_0x35a732[0x0],'id':_0x35a732[0x1],'part':_0x35a732[0x2]};}function mt(_0x86866,_0x19b7b7){const _0x421f12=_0x19b7b7['schema'],_0x14b875=_0x19b7b7['createRange'](_0x86866['start']);for(const _0x295157 of _0x86866['getWalker']()){const {type:_0x52263b,item:_0x4a63ae,nextPosition:_0x225793}=_0x295157;if('text'===_0x52263b||_0x421f12['isObject'](_0x4a63ae)){const _0x3288c8=_0x19b7b7['createPositionBefore'](_0x4a63ae);_0x14b875['isCollapsed']&&(_0x14b875['start']=_0x3288c8),_0x14b875['end']=_0x225793;}}return _0x14b875;}function ht(_0x5eb954){return'comment'===er(_0x5eb954['name'])['group'];}class i extends _0x39c08c{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x2f0182=this['editor'],_0x59b3b5=_0x2f0182['plugins']['get'](o),_0xe301b3=_0x2f0182['plugins']['get'](r),_0x2def13=_0x2f0182['plugins']['get'](O),_0x3a8936=_0x2f0182['plugins']['get'](P);_0x2f0182['ui']['componentFactory']['add']('comment',()=>{const _0x49eee7=this['_createUIButton'](_0x57ea8a);return _0x49eee7['tooltip']=!0x0,_0x49eee7;}),_0x2f0182['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x58cbad)),_0x3a8936['addSourceCollector'](()=>{const _0x266449=[];for(const [_0x102e1a,_0x3e5261]of _0x59b3b5['_threadToController']){const _0x4748b2=_0xe301b3['getAllMarkersForId'](_0x102e1a['id']),_0x23a216=_0x4748b2['map'](_0x131fa8=>_0x131fa8['getRange']());_0x4748b2['length']>0x0&&_0x266449['push']([_0x3e5261['view'],_0x23a216]);}return _0x266449;}),this['listenTo'](_0x2def13,'change:activeAnnotations',(_0x10e1f3,_0x16be4a,_0x162130)=>{const _0x331fc8=Array['from'](_0x162130)['map'](_0x1743c3=>_0x1743c3['innerView'])['find'](_0x4d4d4e=>_0x59b3b5['_viewToController']['has'](_0x4d4d4e));if(!_0x331fc8)return void(_0xe301b3['activeMarker']=null);const _0x490fc0=_0x59b3b5['_viewToController']['get'](_0x331fc8)['model']['id'],_0x13cb36='comment:'+_0x490fc0;_0x490fc0&&_0xe301b3['hasMarkerForId'](_0x490fc0)?_0xe301b3['activeMarker']=_0x13cb36:_0xe301b3['activeMarker']&&(_0xe301b3['activeMarker']=null);}),this['listenTo'](_0x59b3b5,'removeCommentThread',(_0x5475a9,{threadId:_0x3d98ba,isFromAdapter:_0x43e155})=>{!_0x43e155&&_0x2f0182['ui']['focusTracker']['isFocused']&&_0xe301b3['hasMarkerForId'](_0x3d98ba)&&_0x2f0182['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x59b3b5,'addComment',(_0x29cd29,{threadId:_0x20abd0,isFromAdapter:_0x378c7b})=>{if(_0x378c7b||!_0xe301b3['hasMarkerForId'](_0x20abd0)||!_0x59b3b5['hasCommentThread'](_0x20abd0))return;0x1===_0x59b3b5['getCommentThread'](_0x20abd0)['length']&&(_0x2f0182['editing']['view']['focus'](),_0x29cd29['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x560a15=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2e7eaf;for(const _0x10eee4 in _0x560a15){const _0x1a9ea7=_0x10eee4,_0x52c3cd=_0x560a15[_0x1a9ea7];if('commentsLicenseKeyValid'==_0x52c3cd||'commentsLicenseKeyInvalid'==_0x52c3cd||'commentsLicenseKeyExpired'==_0x52c3cd||'commentsLicenseKeyDomainLimit'==_0x52c3cd||'commentsLicenseKeyNotAllowed'==_0x52c3cd||'commentsLicenseKeyEvaluationLimit'==_0x52c3cd||'commentsLicenseKeyTrialLimit'==_0x52c3cd||'commentsLicenseKeyUsageLimit'==_0x52c3cd){delete _0x560a15[_0x1a9ea7],_0x2e7eaf=_0x52c3cd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2e7eaf&&_0x560a15['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2e7eaf&&_0x560a15['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2e7eaf&&_0x560a15['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2e7eaf&&_0x560a15['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2e7eaf&&_0x560a15['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x2e7eaf&&_0x560a15['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x2e7eaf&&_0x560a15['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x35703c){const _0x57a1a3=this['editor'],_0x285f7c=new _0x35703c(_0x57a1a3['locale']),_0x2b20bd=_0x57a1a3['commands']['get']('addCommentThread');return _0x285f7c['set']({'label':E(_0x57a1a3['locale'],'Comment'),'icon':_0x1bf1d3}),_0x285f7c['bind']('isEnabled')['to'](_0x2b20bd),this['listenTo'](_0x285f7c,'execute',()=>{_0x2b20bd['execute']();}),_0x285f7c;}}class s extends _0x39c08c{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x4e2f5a){super(_0x4e2f5a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2ccaaa,_0x5a3f19,_0x468ece)=>{_0x468ece?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4d4882,_0x5a3140]of this['editor']['commands'])_0x5a3140['affectsData']&&'addCommentThread'!==_0x4d4882&&_0x5a3140['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0xe81312=this['editor']['editing']['view']['document'];this['listenTo'](_0xe81312,'cut',_0x16019a=>_0x16019a['stop'](),{'priority':'highest'}),this['listenTo'](_0xe81312,'clipboardInput',_0x2174bb=>_0x2174bb['stop'](),{'priority':'highest'}),this['listenTo'](_0xe81312,'delete',_0x1d17f5=>_0x1d17f5['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0xf596e7,_0x40eef8]of this['editor']['commands'])_0x40eef8['affectsData']&&'addCommentThread'!==_0xf596e7&&_0x40eef8['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x474ed3{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b19f4){super(_0x1b19f4),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x35a820=this['context']['plugins']['get'](O);this['listenTo'](_0x35a820,'_activateAnnotation',(_0x28de8c,_0x51221c)=>{for(const _0xb742c2 of this['activeUIs']){const _0x69e011=this['_uis']['get'](_0xb742c2);(0x0,this['uisData']['get'](_0xb742c2)['filter'])(_0x51221c)&&_0x69e011['setActiveAnnotation'](_0x51221c);}}),this['listenTo'](_0x35a820,'_deactivateAllAnnotations',()=>{for(const _0x438b5b of this['activeUIs']){this['_uis']['get'](_0x438b5b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x35a820['_visibleAnnotations'],'add',(_0x29b55d,_0x6b9dbf)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x6b9dbf);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3c8eed){return this['activeUIs']['has'](_0x3c8eed);}['activate'](_0x1f59cb,_0x45bda9=this['defaultFilter']){const _0xcaec4c=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x1f59cb))throw new _0x388981('annotationsuis-missing-ui',this,{'uiName':_0x1f59cb});this['isActive'](_0x1f59cb)&&this['deactivate'](_0x1f59cb),this['activeUIs']['add'](_0x1f59cb);const _0x28ed7d=new _();!function({source:_0x5a8be5,target:_0x46fbed,filter:_0x3f768c}){for(const _0x143b8a of _0x5a8be5)_0x3f768c(_0x143b8a)&&_0x46fbed['add'](_0x143b8a);_0x46fbed['listenTo'](_0x5a8be5,'add',(_0x4cba14,_0xfd066d)=>{_0x3f768c(_0xfd066d)&&_0x46fbed['add'](_0xfd066d);}),_0x46fbed['listenTo'](_0x5a8be5,'remove',(_0x255bcd,_0x2f5baa)=>{_0x46fbed['has'](_0x2f5baa)&&_0x46fbed['remove'](_0x2f5baa);});}({'source':_0xcaec4c['_visibleAnnotations'],'target':_0x28ed7d,'filter':_0x45bda9}),this['uisData']['set'](_0x1f59cb,{'collection':_0x28ed7d,'filter':_0x45bda9});const _0x5afcbd=this['_uis']['get'](_0x1f59cb);_0x5afcbd['attach'](_0x28ed7d),this['listenTo'](_0x5afcbd,'change:activeAnnotation',(_0x1c84e3,_0x4542b2,_0x3de156,_0x3fe7da)=>{_0x3fe7da&&_0xcaec4c['_removeActiveAnnotation'](_0x3fe7da),_0x3de156&&_0xcaec4c['_addActiveAnnotation'](_0x3de156);});}['deactivate'](_0x5f5016){if(this['activeUIs']['delete'](_0x5f5016),!this['_uis']['has'](_0x5f5016))throw new _0x388981('annotationsuis-missing-ui',this,{'uiName':_0x5f5016});const _0x4b848e=this['_uis']['get'](_0x5f5016);_0x4b848e['detach'](),this['stopListening'](_0x4b848e),this['uisData']['get'](_0x5f5016)['collection']['destroy'](),this['uisData']['delete'](_0x5f5016);}['switchTo'](_0x22c5de){if(!this['_uis']['has'](_0x22c5de))throw new _0x388981('annotationsuis-missing-ui',this,{'uiName':_0x22c5de});const _0x17b9bb=this['context']['plugins']['get'](O),_0x2cd5ae=Array['from'](_0x17b9bb['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x22c5de);const _0x1d81b2=this['_uis']['get'](_0x22c5de);_0x1d81b2['setActiveAnnotation'](_0x2cd5ae),_0x1d81b2['_setSelectedAnnotations']&&_0x2cd5ae&&_0x1d81b2['_setSelectedAnnotations']([_0x2cd5ae]);}['deactivateAll'](){for(const _0x3706b2 of this['activeUIs'])this['deactivate'](_0x3706b2);}['register'](_0x437352,_0x1e88cc){if(this['_uis']['has'](_0x437352))throw new _0x388981('annotationsuis-register-already-registered');if('function'!=typeof _0x1e88cc['attach']||'function'!=typeof _0x1e88cc['detach']||'function'!=typeof _0x1e88cc['setActiveAnnotation'])throw new _0x388981('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x437352,_0x1e88cc);}['refilterAnnotations'](){const _0x232ab2=this['context']['plugins']['get'](O)['collection'],_0xc7d062=new Map(),_0x3818a7=Array['from'](this['activeUIs']);for(const _0xcaf2d9 of this['activeUIs']){const _0x560736=this['uisData']['get'](_0xcaf2d9)['collection'];for(const _0x5dcb84 of _0x560736)_0xc7d062['set'](_0x5dcb84,_0xcaf2d9);}for(const _0x27f6d7 of _0x232ab2){const _0x44bb7f=_0xc7d062['get'](_0x27f6d7);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x27f6d7);const _0x17b9e8=_0x3818a7['find'](_0x352ffc=>this['uisData']['get'](_0x352ffc)['filter'](_0x27f6d7));_0x44bb7f!==_0x17b9e8&&(_0x44bb7f&&this['uisData']['get'](_0x44bb7f)['collection']['remove'](_0x27f6d7),_0x17b9e8&&this['uisData']['get'](_0x17b9e8)['collection']['add'](_0x27f6d7));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x308147){const _0x47553d=[];for(const _0x2a0d7d of this['activeUIs']){(0x0,this['uisData']['get'](_0x2a0d7d)['filter'])(_0x308147)&&_0x47553d['push'](_0x2a0d7d);}if(_0x47553d['length']>0x1)throw new _0x388981('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x47553d,'annotationType':_0x308147['type']});}}const pi=xt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0xa957f1){super(_0xa957f1);const _0x4fc395=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 _0x47c1df(),this['focusCycler']=new _0x2f783a({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4fc395['to']('class')],'style':{'minHeight':_0x4fc395['to']('minHeight',_0x2da85d=>'number'==typeof _0x2da85d?pi(_0x2da85d+0xa):null)},'dir':_0xa957f1['uiLanguageDirection'],'role':'application','aria-label':E(_0xa957f1,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0xa957f1,'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',_0x441394=>{this['_updateItemPositionInFocusables'](_0x441394['source']);}),this['list']['forEach'](_0x19c1b5=>{this['focusTracker']['add'](_0x19c1b5['element']),this['_updateItemPositionInFocusables'](_0x19c1b5);}),this['list']['on']('change',(_0x14a691,_0x423334)=>{for(const _0x183050 of _0x423334['removed'])this['focusTracker']['remove'](_0x183050['element']),this['focusables']['remove'](_0x183050);for(const _0x410115 of _0x423334['added'])this['focusTracker']['add'](_0x410115['element']),this['_updateItemPositionInFocusables'](_0x410115);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x511ccf){const _0x6d9db9=this['focusables']['getIndex'](_0x511ccf);let _0x27ee93,_0xe9010e;for(const _0x3031e8 of this['focusables'])if(_0x511ccf['top']<_0x3031e8['top']){_0x27ee93=_0x3031e8;break;}if(_0xe9010e=_0x27ee93?this['focusables']['getIndex'](_0x27ee93):this['focusables']['length'],-0x1!==_0x6d9db9){if(_0x6d9db9===_0xe9010e-0x1)return;this['focusables']['remove'](_0x511ccf),_0xe9010e=_0x27ee93?this['focusables']['getIndex'](_0x27ee93):this['focusables']['length'];}this['focusables']['add'](_0x511ccf,_0xe9010e);}}const Ht=xt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1bcdb9){super(_0x1bcdb9),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x41717b,_0x317586)=>_0x41717b+_0x317586),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x25aa07=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x25aa07['to']('isAnimationDisabled',_0xd89915=>_0xd89915?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x25aa07['to']('top',_0x393543=>Ht(_0x393543))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4dcc9f=this['element']['clientHeight'];_0x4dcc9f&&(this['height']=_0x4dcc9f);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x474ed3{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x510761){super(_0x510761),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 _0x3db08b=this['context']['config']['get']('sidebar.container');_0x3db08b&&this['setContainer'](_0x3db08b);}['setContainer'](_0x237e2b){if(!y(_0x237e2b))throw new _0x388981('sidebar-setcontainer-invalid-element');this['container']=_0x237e2b;}['_attachToContainer']({viewClass:_0x5c4d41='',spaceBetweenItems:_0x4cd3e7=0x19}={}){if(!y(this['container']))throw new _0x388981('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5c4d41,this['_spaceBetweenItems']=_0x4cd3e7;}['rearrange']({removedAnnotation:_0x55c701,previousAnnotation:_0x35f01c,nextAnnotation:_0x126b33}){const _0x4f2b21=this['getSidebarItemView'](_0x55c701);this['view']['list']['remove'](_0x4f2b21),this['_destroySidebarItemView'](_0x55c701),_0x35f01c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x35f01c)),_0x126b33&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x126b33)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x52bb75,activatedAnnotation:_0x3b928c,disableAnimationOnActivatedAnnotation:_0x11a14f}){if(this['_activeAnnotation']=_0x3b928c,_0x52bb75){_0x52bb75['isActive']=!0x1;const _0x4d691b=this['getSidebarItemView'](_0x52bb75);_0x4d691b&&_0x11a14f&&(_0x4d691b['isAnimationDisabled']=!0x1);}if(_0x3b928c){const _0x22943f=this['getSidebarItemView'](_0x3b928c);_0x22943f&&(_0x3b928c['isActive']=!0x0,_0x11a14f&&(_0x22943f['isAnimationDisabled']=!0x0,_0x22943f['top']+=0x1),this['_alignToTargetRect'](_0x22943f));}}['_detachFromContainer'](_0x52ef04){if(this['view']['element']['remove'](),_0x52ef04){for(const _0x5e6c2a of _0x52ef04)this['_destroySidebarItemView'](_0x5e6c2a);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x30160c,_0x38bb8e){_0x38bb8e||(_0x38bb8e=_0x30160c['view']);const _0x3c6ec6=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3c6ec6,_0x30160c),this['_annotationToSidebarItemView']['set'](_0x30160c,_0x3c6ec6),_0x3c6ec6['content']['add'](_0x38bb8e),this['listenTo'](_0x30160c['view'],'change:targetRect',(_0x3bf928,_0xe19379,_0x5c00f9)=>{const _0xb7c6bc=this['_getTargetTop'](_0x30160c,_0x5c00f9);_0x3c6ec6['_targetTop']!=_0xb7c6bc&&(_0x3c6ec6['_targetTop']=_0xb7c6bc,this['_setItemTop'](_0x3c6ec6,_0xb7c6bc));}),this['listenTo'](_0x3c6ec6,'change:top',()=>{this['_recalculate'](_0x3c6ec6,'top');}),this['listenTo'](_0x3c6ec6,'change:bottom',()=>{this['_recalculate'](_0x3c6ec6,'bottom');}),this['_alignToTargetRect'](_0x3c6ec6);const _0xb0f2db=this['_getItemBefore'](_0x3c6ec6);if(_0xb0f2db)this['_alignAfterItem'](_0xb0f2db,_0x3c6ec6)||this['_alignToTargetRect'](_0x3c6ec6);else this['_alignToTargetRect'](_0x3c6ec6);return this['_updateLastItem'](),this['view']['list']['add'](_0x3c6ec6),_0x3c6ec6;}['_alignForTopChange'](_0x486428){if(!_0x486428['content']['length'])return;const _0x180877=this['_getItemBefore'](_0x486428);if(!_0x180877)return;const _0x58db12=this['_sidebarItemViewToAnnotation']['get'](_0x180877),_0x3ec2ab=this['_activeAnnotation'];_0x3ec2ab&&_0x3ec2ab===_0x58db12?this['_alignAfterItem'](_0x180877,_0x486428):this['_alignBeforeItem'](_0x486428,_0x180877);}['_alignForBottomChange'](_0x5aa8c9){if(!_0x5aa8c9['content']['length'])return;const _0x498216=this['_getItemAfter'](_0x5aa8c9);if(!_0x498216)return;const _0x40e84b=this['_sidebarItemViewToAnnotation']['get'](_0x498216),_0xe26894=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x46f4d3=this['_activeAnnotation'];_0x46f4d3&&_0x46f4d3===_0x40e84b&&_0xe26894?(this['_alignBeforeItem'](_0x498216,_0x5aa8c9),this['_alignAfterItem'](_0x5aa8c9,_0x498216)):_0x46f4d3&&_0x46f4d3===_0x40e84b?this['_alignBeforeItem'](_0x498216,_0x5aa8c9):this['_alignAfterItem'](_0x5aa8c9,_0x498216);}['_recalculate'](_0x30417a,_0x514f0d){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xda2866,changedProp:_0x3c00e9}of this['_recalculateBuffer'])'top'===_0x3c00e9?this['_alignForTopChange'](_0xda2866):this['_alignForBottomChange'](_0xda2866);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x30417a,'changedProp':_0x514f0d});}['getSidebarItemView'](_0x4a35b5){return this['_annotationToSidebarItemView']['get'](_0x4a35b5);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2b2ad8){const _0x466202=this['getSidebarItemView'](_0x2b2ad8);this['stopListening'](_0x466202),this['stopListening'](_0x2b2ad8['view']),_0x466202['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2b2ad8),this['_sidebarItemViewToAnnotation']['delete'](_0x466202);}['_createSidebarView'](){const _0x1574c5=new H(this['context']['locale']);return _0x1574c5['render'](),this['on']('change:_lastItem',(_0x141379,_0x4ef0ac,_0x40b28e,_0x50bafe)=>{_0x50bafe&&_0x1574c5['unbind']('minHeight'),_0x40b28e?_0x1574c5['bind']('minHeight')['to'](_0x40b28e,'bottom'):_0x1574c5['minHeight']=null;}),_0x1574c5;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x31f5d6){const _0x16fca1=this['_sidebarItemViewToAnnotation']['get'](_0x31f5d6),_0x1061df=_0x16fca1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x16fca1)-0x1);return _0x1061df&&this['getSidebarItemView'](_0x1061df)||null;}['_getItemAfter'](_0x1d4a40){const _0x19fcd2=this['_sidebarItemViewToAnnotation']['get'](_0x1d4a40),_0x42d04d=_0x19fcd2&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x19fcd2)+0x1);return _0x42d04d&&this['getSidebarItemView'](_0x42d04d)||null;}['_alignBeforeItem'](_0x1a3dd5,_0x3f4db1){_0x1a3dd5['updateHeight']();const _0x2dbe43=G(_0x3f4db1['bottom']+this['_spaceBetweenItems'],_0x1a3dd5['top']);return!!_0x2dbe43&&(this['_setItemTop'](_0x3f4db1,_0x3f4db1['top']-_0x2dbe43),!0x0);}['_alignAfterItem'](_0x136490,_0xefea6d){_0x136490['updateHeight']();const _0x67a417=G(_0x136490['bottom']+this['_spaceBetweenItems'],_0xefea6d['top']);return!!_0x67a417&&(this['_setItemTop'](_0xefea6d,_0xefea6d['top']+_0x67a417,!0x1),!0x0);}['_alignToTargetRect'](_0x2b4288){const _0x4a2205=this['_sidebarItemViewToAnnotation']['get'](_0x2b4288);if(!_0x4a2205||!_0x4a2205['target']||!_0x4a2205['targetRect'])return;const _0x51eb78=this['_getTargetTop'](_0x4a2205,_0x4a2205['targetRect']);this['_setItemTop'](_0x2b4288,_0x51eb78);}['_getTargetTop'](_0x3774f5,_0x31b184){if(null===_0x31b184)return 0x0;if(_0x3774f5['target']instanceof _0x4a96a9)return _0x31b184['top'];{const _0x1594bc=new _0x4a96a9(this['view']['element'])['top'];return _0x31b184['top']-_0x1594bc;}}['_setItemTop'](_0x4839e4,_0x4d2a19,_0x119bc5=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x119bc5&&(_0x4d2a19=Math['max'](_0x4d2a19,this['_getMaxAvailableTop'](_0x4839e4))),_0x4839e4['top']=_0x4d2a19;}['_getMaxAvailableTop'](_0x1b3588){let _0x4adb5d=this['_getItemBefore'](_0x1b3588),_0x89eb2e=0x0;for(;_0x4adb5d;)_0x4adb5d['updateHeight'](),_0x89eb2e+=this['_spaceBetweenItems']+_0x4adb5d['height'],_0x4adb5d=this['_getItemBefore'](_0x4adb5d);return _0x89eb2e;}}function G(_0x39dec5,_0x1d578a){return Math['max'](_0x39dec5-_0x1d578a,0x0);}function y(_0x50a3df){return null!==_0x50a3df&&'object'==typeof _0x50a3df&&0x1===_0x50a3df['nodeType'];}class e extends _0x474ed3{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4a4b5e){super(_0x4a4b5e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xe77389(),this['_refreshPositioningDebounced']=_0x4e3986(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4cbbe2=this['context']['plugins']['get'](M),_0x504e2a=this['context']['plugins']['get'](z);_0x4cbbe2['register']('wideSidebar',this),_0x504e2a['container']&&_0x4cbbe2['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x9a0c4){if(_0x9a0c4===this['activeAnnotation'])return;const _0x4caaf1=this['context']['plugins']['get'](z);_0x4caaf1['_activeAnnotation']=_0x9a0c4;const _0x252a17=this['activeAnnotation'];_0x4caaf1['refresh']({'blurredAnnotation':_0x252a17,'activatedAnnotation':_0x9a0c4}),this['activeAnnotation']=_0x9a0c4;}['attach'](_0x5972cd){this['annotations']=_0x5972cd;const _0xaa6e16=this['context']['plugins']['get'](z);if(_0xaa6e16['_annotations']=_0x5972cd,this['isAttached'])throw new _0x388981('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xaa6e16,'set:container',()=>{this['detach'](),this['listenTo'](_0xaa6e16,'change:container',_0x122c8e=>{_0x122c8e['off'](),this['attach'](_0x5972cd);});}),_0xaa6e16['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0xbad00d=_0x3efa01=>{_0x3efa01['updateTargetRect'](),_0xaa6e16['addAnnotation'](_0x3efa01);};for(const _0x3f874b of _0x5972cd)_0xbad00d(_0x3f874b);this['listenTo'](_0x5972cd,'add',(_0x1ab059,_0x2b89ab)=>{_0xbad00d(_0x2b89ab);}),this['listenTo'](_0x5972cd,'remove',(_0x510b7c,_0x40e41c,_0x44b5d9)=>{_0xaa6e16['rearrange']({'removedAnnotation':_0x40e41c,'previousAnnotation':_0x5972cd['get'](_0x44b5d9-0x1),'nextAnnotation':_0x5972cd['get'](_0x44b5d9+0x1)}),_0x40e41c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5972cd,'focus',(_0x59d247,_0x5830e8)=>{this['setActiveAnnotation'](_0x5830e8);}),this['listenTo'](_0x5972cd,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5326dc=this['context']instanceof _0x2f3774?this['context']['editors']:new _0xe77389([this['context']]);for(const _0x5f483b of _0x5326dc)this['_integrateWithEditorAnnotations'](_0x5f483b);this['listenTo'](_0x5326dc,'add',(_0x45e18d,_0x5dc3b5)=>{this['listenTo'](_0x5dc3b5,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5dc3b5);});}),this['listenTo'](_0x5326dc,'remove',(_0x528592,_0x1cd57b)=>{_0x1cd57b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1cd57b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x388981('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x424103=this['context']['plugins']['get'](z);_0x424103['_detachFromContainer'](this['annotations']),this['stopListening'](_0x424103),this['stopListening'](this['annotations']),this['context']instanceof _0x2f3774&&this['stopListening'](this['context']['editors']);for(const _0x51cd08 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x51cd08);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x24decb){if(!_0x24decb['plugins']['has']('EditorAnnotations'))return;const _0x75928=_0x24decb['plugins']['get']('EditorAnnotations'),_0x4f1fda=()=>{const _0x390fc5=_0x75928['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x390fc5[0x0]||null);};this['listenTo'](_0x75928,'refresh',_0x4f1fda),this['listenTo'](_0x75928,'blur',(_0x554e97,{isAnnotationTracked:_0xbb14b0})=>{this['activeAnnotation']&&_0xbb14b0(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x75928,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x308f06=>{_0x75928['hasDomSelection']()&&(_0x4f1fda(),_0x308f06['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x75928);}['_destroyEditorAnnotationsIntegration'](_0x1e2015){this['stopListening'](_0x1e2015),this['_editorAnnotations']['remove'](_0x1e2015);}}class C extends _0x57ea8a{['counterView'];constructor(_0x39f046){super(_0x39f046);const _0xbe1653=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x434c12,_0x5d5896)=>_0x434c12?'...':_0x5d5896['toString']()),this['set']('annotationType',''),this['icon']=_0x1bf1d3,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xbe1653['to']('annotationType',_0x370e69=>'ck-annotation-counter__badge--'+_0x370e69),_0xbe1653['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xbe1653['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x474ed3{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5cf52f){super(_0x5cf52f),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x4ddb0d),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xe77389(),this['_refreshPositioningDebounced']=_0x4e3986(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x230760(this['context']['locale']),this['balloonPanelView']=new _0x261e7b(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2b7dc9){this['annotations']=_0x2b7dc9;const _0x5b9efa=this['context']['plugins']['get'](z),_0x20a6d4=this['balloonPanelView'];if(_0x5b9efa['_annotations']=_0x2b7dc9,this['isAttached'])throw new _0x388981('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5b9efa,'set:container',()=>{this['detach'](),this['listenTo'](_0x5b9efa,'change:container',_0x4a6dbb=>{_0x4a6dbb['off'](),this['attach'](_0x2b7dc9);});}),_0x5b9efa['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xa8222f=_0x157140=>{const _0x4f7044=new C(this['context']['locale']);_0x5b9efa['addAnnotation'](_0x157140,_0x4f7044),this['_annotationToNarrowView']['set'](_0x157140,_0x4f7044),_0x4f7044['bind']('isDirty','annotationType','number')['to'](_0x157140['view'],'isDirty','type','length'),_0x4f7044['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x20a6d4['content']['first']!==_0x157140['view']?(this['_showBalloon'](_0x157140),_0x157140['view']['element']['focus'](),this['setActiveAnnotation'](_0x157140)):this['setActiveAnnotation'](null);});};for(const _0x36590f of _0x2b7dc9)_0xa8222f(_0x36590f);this['listenTo'](_0x2b7dc9,'add',(_0x28a16a,_0x3953fd)=>{_0xa8222f(_0x3953fd);}),this['listenTo'](_0x2b7dc9,'remove',(_0x1d5c7a,_0xed3273,_0x8fda3)=>{this['_annotationToNarrowView']['get'](_0xed3273)['destroy'](),this['_annotationToNarrowView']['delete'](_0xed3273),_0x5b9efa['rearrange']({'removedAnnotation':_0xed3273,'previousAnnotation':_0x2b7dc9['get'](_0x8fda3-0x1),'nextAnnotation':_0x2b7dc9['get'](_0x8fda3+0x1)}),_0xed3273===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2b7dc9,'focus',(_0x5c13a3,_0x488a2a)=>{this['setActiveAnnotation'](_0x488a2a);}),this['listenTo'](_0x2b7dc9,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x35673f,_0x401bd4)=>{_0x401bd4['keyCode']===_0x1ffe74['esc']&&_0x20a6d4['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x20a6d4['content']['first']),this['_hideBalloon'](),_0x401bd4['stopPropagation'](),_0x401bd4['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x37bb60,_0x22b3d0)=>{const _0x144189=_0x22b3d0['target'];_0x20a6d4['isVisible']&&_0x20a6d4['element']['contains'](_0x144189)||_0x5b9efa['view']['element']['contains'](_0x144189)||_0x37bb60['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x5f1e99=>_0x5f1e99['contains'](_0x144189))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x4a0795=this['context']instanceof _0x2f3774?this['context']['editors']:new _0xe77389([this['context']]);for(const _0x5146c8 of _0x4a0795)this['_integrateWithEditorAnnotations'](_0x5146c8);this['listenTo'](_0x4a0795,'add',(_0x130509,_0x1778bc)=>{this['listenTo'](_0x1778bc,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1778bc);});}),this['listenTo'](_0x4a0795,'remove',(_0x16dbb4,_0x13efcb)=>{_0x13efcb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x13efcb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x85a119){if(_0x85a119===this['activeAnnotation'])return;const _0x1c7e83=this['context']['plugins']['get'](z);if(_0x1c7e83['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x85a119,'disableAnimationOnActivatedAnnotation':!0x0}),_0x85a119)_0x1c7e83['getSidebarItemView'](_0x85a119)?this['_showBalloon'](_0x85a119):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x85a119;}['detach'](){if(!this['isAttached'])throw new _0x388981('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x169d05=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x33c818=>_0x33c818['destroy']()),this['_annotationToNarrowView']['clear'](),_0x169d05['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2f3774&&this['stopListening'](this['context']['editors']);for(const _0x268d89 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x268d89);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'](_0x1be538){if(!_0x1be538['plugins']['has']('EditorAnnotations'))return;const _0x393329=_0x1be538['plugins']['get']('EditorAnnotations'),_0x1dc18e=this['context']['plugins']['get'](z),_0x14f5ca=this['annotations'],_0x180081=this['balloonPanelView'],_0x375eb1=()=>{const _0x4ba117=_0x393329['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4ba117),this['setActiveAnnotation'](_0x4ba117[0x0]||null);};this['listenTo'](_0x393329,'refresh',_0x375eb1),this['listenTo'](_0x393329,'blur',(_0x59a598,{isAnnotationTracked:_0x42a504})=>{this['activeAnnotation']&&_0x42a504(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x393329,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x14f5ca,'blur',_0x27eb9b=>{_0x393329['hasDomSelection']()&&_0x27eb9b['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x385443,_0x32cedf)=>{const _0x1d8aa4=_0x32cedf['target'];_0x180081['isVisible']&&_0x180081['element']['contains'](_0x1d8aa4)||_0x1dc18e['view']['element']['contains'](_0x1d8aa4)||this['activeAnnotation']&&_0x393329['hasDomSelection']()&&(_0x375eb1(),_0x385443['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x393329);}['_destroyEditorAnnotationsIntegration'](_0x4e1ca3){_0x4e1ca3&&(this['stopListening'](_0x4e1ca3),this['_editorAnnotations']['remove'](_0x4e1ca3));}['_setSelectedAnnotations'](_0x30ca17){for(const _0x1557f2 of this['_selectedAnnotations'])_0x30ca17['includes'](_0x1557f2)||this['_manuallyClosedAnnotationViews']['delete'](_0x1557f2['view']);this['_selectedAnnotations']=_0x30ca17;}['_refreshPositioning'](){const _0x44040a=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x44040a['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x43d5d0){if(this['_manuallyClosedAnnotationViews']['has'](_0x43d5d0['view']))return;const _0x107266=this['balloonPanelView']['content']['first'];_0x107266!==_0x43d5d0['view']?(_0x107266&&this['_detachListeners'](_0x107266),this['_attachListeners'](_0x43d5d0['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x43d5d0['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x46b927=this['balloonPanelView']['content']['first'],_0x48b5ed=_0x46b927&&this['annotations']['getByView'](_0x46b927);if(!_0x48b5ed||!this['_annotationToNarrowView']['has'](_0x48b5ed))return;const _0x5512b7=this['_annotationToNarrowView']['get'](_0x48b5ed)['element'],_0x2e595f=(function(){const _0x89f1ae=_0x261e7b['defaultPositions'];return[_0x89f1ae['southArrowNorthEast'],_0x89f1ae['northArrowSouthEast'],_0x89f1ae['southArrowNorth'],_0x89f1ae['northArrowSouth'],_0x89f1ae['southArrowNorthWest'],_0x89f1ae['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5512b7,'positions':_0x2e595f});}['_hideBalloon'](){const _0x25cd45=this['balloonPanelView'],_0xd77bce=_0x25cd45['content']['first'];_0xd77bce&&(this['_detachListeners'](_0xd77bce),_0x25cd45['unpin'](),_0x25cd45['content']['clear']());}['_attachListeners'](_0xd8efd3){this['listenTo'](_0xd8efd3,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xd8efd3,'Esc',(_0x52c729,_0x471b0e)=>{this['_manuallyClosedAnnotationViews']['add'](_0xd8efd3),this['_hideBalloon'](),_0x471b0e();});}['_detachListeners'](_0x516c2f){this['stopListening'](_0x516c2f);}}class c extends _0x39c08c{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x47c489,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x434651){super(_0x434651),_0x434651['editing']['view']['addObserver'](_0x4bd5e3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x434651['plugins']['get'](_0x47c489),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x4aa6c4=this['editor']['plugins']['get'](M);_0x4aa6c4['context']===this['editor']&&(_0x4aa6c4['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x274a24,_0x12c724)=>{const _0x424874=this['_balloon'];if(this['isAttached']&&_0x424874['visibleView']){const _0x5be3ef=this['annotations']['getByView'](_0x424874['visibleView']);_0x5be3ef&&this['_closeAnnotation'](_0x5be3ef),_0x12c724();}}));}['afterInit'](){const _0x4d61f1=this['editor']['plugins']['get'](M);_0x4d61f1['context']===this['editor']&&(_0x4d61f1['hasActive']()||_0x4d61f1['switchTo']('inline'));}['setActiveAnnotation'](_0x1f7539){_0x1f7539!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1f7539&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1f7539)&&this['_addAnnotationToBalloon'](_0x1f7539,!0x0),_0x1f7539['isActive']=!0x0),_0x1f7539||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1f7539);}['attach'](_0x1f4987){this['annotations']=_0x1f4987;const _0x417336=this['editor']['plugins']['get'](M),_0x289b19=this['_balloon'];if(this['isAttached'])throw new _0x388981('inlineannotations-attach-already-attached',this);if(_0x417336['context']!==this['editor'])throw new _0x388981('inlineannotations-not-allowed-with-context',this);const _0x34cfd7=this['editor']['plugins']['get'](P);this['listenTo'](_0x34cfd7,'refresh',()=>{const _0x258577=_0x34cfd7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x26b81b,_0x2cf52b;!this['_forceRefresh']&&(_0x26b81b=_0x258577,_0x2cf52b=this['_selectedAnnotations'],_0x26b81b['length']===_0x2cf52b['length']&&_0x26b81b['every'](_0x281887=>_0x2cf52b['includes'](_0x281887)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x258577),this['setActiveAnnotation'](_0x258577[0x0]||null));}),this['listenTo'](_0x34cfd7,'blur',(_0xecc1d8,{isAnnotationTracked:_0x4f1ec5})=>{this['activeAnnotation']&&_0x4f1ec5(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1ac149,_0x3bf901,_0x4b01f1)=>{_0x4b01f1||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1f4987,'remove',(_0x4ba86d,_0xe86b4e)=>{this['_removeAnnotationFromBalloon'](_0xe86b4e),_0xe86b4e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x289b19,'change:visibleView',(_0x33ac55,_0x11b3a5,_0x6e4d9a,_0x3afc01)=>{_0x3afc01&&this['stopListening'](_0x3afc01);const _0x1e1d57=_0x1f4987['getByView'](_0x6e4d9a);_0x6e4d9a&&_0x1e1d57&&(this['listenTo'](_0x6e4d9a,'change:height',()=>{_0x289b19['updatePosition']();}),this['listenTo'](_0x6e4d9a,'Esc',()=>{this['_closeAnnotation'](_0x1e1d57),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1e1d57&&this['setActiveAnnotation'](_0x1e1d57));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x289b19['visibleView']&&(_0x1f4987['getByView'](_0x289b19['visibleView'])&&_0x289b19['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 _0x388981('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x542aff of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x542aff);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x3c3c82){for(const _0x9232a9 of this['_selectedAnnotations'])_0x3c3c82['includes'](_0x9232a9)||this['_manuallyClosed']['delete'](_0x9232a9);for(const _0x42fb16 of this['annotations'])_0x3c3c82['includes'](_0x42fb16)||this['_removeAnnotationFromBalloon'](_0x42fb16);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3c1def of _0x3c3c82)this['_addAnnotationToBalloon'](_0x3c1def);}this['_selectedAnnotations']=_0x3c3c82;}['_addAnnotationToBalloon'](_0x49cb50,_0x2fcbb8=!0x1){this['_manuallyClosed']['has'](_0x49cb50)||(this['_addedAnnotations']['has'](_0x49cb50)||this['_balloon']['hasView'](_0x49cb50['view'])||(this['_addedAnnotations']['add'](_0x49cb50),this['_balloon']['add']({'stackId':_0x49cb50['view']['id'],'view':_0x49cb50['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x49cb50)}})),_0x2fcbb8&&this['_balloon']['showStack'](_0x49cb50['view']['id']));}['_getBalloonTargetForAnnotation'](_0x44f755){const _0x446101=_0x44f755['target'],_0x3a98ec=this['editor']['editing']['view'],_0x4043e9=_0x3a98ec['document']['selection']['getFirstRange'](),_0x3b6756=_0x3a98ec['domConverter']['viewRangeToDom'](_0x4043e9);if(_0x3b6756['collapse'](!0x0),_0x446101){if(_0x446101 instanceof _0x4a96a9)return _0x446101;let _0xb3d35c=[];for(const _0x1fc589 of _0x446101)_0xb3d35c['push'](...B(_0x1fc589['getClientRects']()));_0xb3d35c=function(_0x2ef7ac){const _0x4a2d9a=[];let _0x32d00a=_0x2ef7ac[0x0];for(let _0x2e68af=0x1;_0x2e68af<_0x2ef7ac['length'];_0x2e68af++)F(_0x32d00a,_0x2ef7ac[_0x2e68af])?_0x32d00a['width']+=_0x2ef7ac[_0x2e68af]['width']:(_0x4a2d9a['push'](_0x32d00a),_0x32d00a=_0x2ef7ac[_0x2e68af]);return _0x4a2d9a['push'](_0x32d00a),_0x4a2d9a;}(_0xb3d35c);const _0x1a5fbf=_0x3b6756['getBoundingClientRect']();return _0xb3d35c['find'](_0x5ac97d=>_0x5ac97d['top']<=_0x1a5fbf['top']&&_0x5ac97d['bottom']>=_0x1a5fbf['bottom']&&_0x5ac97d['left']<=_0x1a5fbf['left']&&_0x5ac97d['right']>=_0x1a5fbf['right'])||_0xb3d35c[0x0];}return _0x44f755['targetRect']||_0x3b6756;}['_removeAnnotationFromBalloon'](_0x3052ee){this['_addedAnnotations']['has'](_0x3052ee)&&this['_balloon']['hasView'](_0x3052ee['view'])&&(this['_addedAnnotations']['delete'](_0x3052ee),this['_balloon']['remove'](_0x3052ee['view']));}['_closeAnnotation'](_0x21193d){this['_manuallyClosed']['add'](_0x21193d),this['_removeAnnotationFromBalloon'](_0x21193d);}}function B(_0x2f0cc5){return Array['from'](_0x2f0cc5)['map'](DOMRect['fromRect']);}function F(_0x48d27e,_0x5a7888){return _0x48d27e['top']===_0x5a7888['top']&&_0x48d27e['bottom']===_0x5a7888['bottom']&&_0x48d27e['right']===_0x5a7888['left'];}class it extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x57cb80,_0x232bda){super(_0x57cb80),this['set']('isEmpty',!_0x232bda['length']),this['focusTracker']=new _0x47c1df(),this['_annotationViews']=_0x232bda,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2f783a({'focusables':_0x232bda,'focusTracker':this['focusTracker']}),this['listenTo'](_0x232bda,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x232bda,'remove',(_0x315c02,_0x46a822)=>{_0x46a822['isActive']&&this['focus'](),_0x232bda['length']||(this['isEmpty']=!0x0);});const _0x50faed=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x57cb80,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x232bda},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x50faed['if']('isEmpty','ck-hidden',_0xc46d1=>!_0xc46d1)]},'children':[{'text':E(_0x57cb80,'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 _0x4ad1f3 of this['_annotationViews'])this['focusTracker']['add'](_0x4ad1f3['element']);this['_annotationViews']['on']('change',(_0x6648e6,{added:_0x8bbbf7,removed:_0x3a1c54})=>{for(const _0x37cff0 of _0x8bbbf7)this['focusTracker']['add'](_0x37cff0['element']);for(const _0x3c7f41 of _0x3a1c54)this['focusTracker']['remove'](_0x3c7f41['element']);});}}class f extends _0x474ed3{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x59f4ea){super(_0x59f4ea),this['archivedThreads']=new _0xe77389();}['init'](){const _0xed4f98=this['context'],_0x2e916e=_0xed4f98['plugins']['get'](o),_0x18ff1a=_0xed4f98['plugins']['get'](O);this['listenTo'](_0x2e916e,'addCommentThread',(_0x17db9f,{threadId:_0x32a5cc})=>{const _0x14e123=_0x2e916e['getCommentThread'](_0x32a5cc);_0x14e123['archivedAt']&&this['archivedThreads']['add'](_0x14e123,this['_calculatePosition'](_0x14e123['archivedAt'])),this['listenTo'](_0x14e123,'change:archivedAt',(_0x4b0e22,_0x2bea1a,_0x2b0e07)=>{_0x2b0e07?this['archivedThreads']['has'](_0x14e123)||this['archivedThreads']['add'](_0x14e123,this['_calculatePosition'](_0x14e123['archivedAt'])):this['archivedThreads']['has'](_0x14e123)&&this['archivedThreads']['remove'](_0x14e123);});}),this['listenTo'](_0x2e916e,'removeCommentThread',(_0x578246,{threadId:_0x1d8818})=>{const _0x1aeb92=_0x2e916e['getCommentThread'](_0x1d8818);this['stopListening'](_0x1aeb92),this['archivedThreads']['has'](_0x1aeb92)&&this['archivedThreads']['remove'](_0x1aeb92);},{'priority':'highest'}),this['listenTo'](_0x18ff1a['collection'],'focus',(_0xb70dea,_0x2d1989)=>{_0x2d1989['isVisible']||(_0x2d1989['isActive']=!0x0,_0x18ff1a['activate'](_0x2d1989));});}['_calculatePosition'](_0x184c34){const _0x154d29=[...this['archivedThreads']]['findIndex'](_0x1af516=>_0x1af516['archivedAt']<_0x184c34);return _0x154d29>-0x1?_0x154d29:this['archivedThreads']['length'];}}class a extends _0x39c08c{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x524e08];}constructor(_0x2f003e){super(_0x2f003e),this['annotationViews']=new _0x2335d5(),this['_pendingThreads']=[];}['init'](){const _0x16f4e=this['editor'],_0x2a39f9=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x16f4e['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x57ea8a,!0x0)),_0x16f4e['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4d310c=this['_createCommentsArchiveButton'](_0x58cbad);return _0x4d310c['set']({'role':'menuitemcheckbox'}),_0x4d310c;});const _0xbf3b45=_0x16f4e['plugins']['get'](f),_0x22b2cb=_0x16f4e['plugins']['get']('Annotations'),_0x56ea9d=_0x16f4e['plugins']['get']('CommentsRepository');_0xbf3b45['archivedThreads']['forEach'](_0x5e34d5=>{this['_handleNewThread'](_0x5e34d5);}),this['listenTo'](_0xbf3b45['archivedThreads'],'add',(_0x4f6ed2,_0x4d1db1)=>{this['_handleNewThread'](_0x4d1db1);}),this['listenTo'](_0x22b2cb['collection'],'add',(_0x3237d1,_0x493971)=>{const _0x46625b=this['_pendingThreads']['find'](_0x5c4b05=>{const _0x4b6aa1=_0x56ea9d['_threadToController']['get'](_0x5c4b05);return _0x4b6aa1&&_0x493971['innerView']===_0x4b6aa1['view'];});if(_0x46625b){const _0xe90ecd=this['_calculatePosition'](_0x46625b['archivedAt']);this['annotationViews']['add'](_0x493971['view'],_0xe90ecd),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x46625b),0x1);}}),this['listenTo'](_0xbf3b45['archivedThreads'],'remove',(_0x3b85b2,_0x2db3ab)=>{const _0xe36c2f=_0x16f4e['config']['get']('collaboration.channelId');if(!_0xe36c2f||_0x2db3ab['channelId']===_0xe36c2f){if(this['_pendingThreads']['includes'](_0x2db3ab))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2db3ab),0x1);else{const _0x49b97d=_0x56ea9d['_threadToController']['get'](_0x2db3ab),_0x599a0e=_0x22b2cb['getByInnerView'](_0x49b97d['view']);this['annotationViews']['remove'](_0x599a0e['view']),this['stopListening'](_0x599a0e['focusableElements']);}}}),this['listenTo'](_0x22b2cb['collection'],'add',(_0x3e2667,_0x2604a8)=>{this['listenTo'](_0x2604a8,'escape',_0x2a39f9);}),this['listenTo'](_0x22b2cb['collection'],'remove',(_0x441e87,_0x4fdd31)=>{this['stopListening'](_0x4fdd31,'escape',_0x2a39f9);});}['_handleNewThread'](_0x2ab78d){const _0x4fa1e6=this['editor']['plugins']['get']('CommentsRepository'),_0x387bfc=this['editor']['plugins']['get']('Annotations'),_0x20d7f7=this['editor']['config']['get']('collaboration.channelId');if(!_0x20d7f7||_0x2ab78d['channelId']===_0x20d7f7){const _0x4a6cc5=_0x4fa1e6['_threadToController']['get'](_0x2ab78d);if(!_0x4a6cc5)return void this['_pendingThreads']['push'](_0x2ab78d);const _0x3dd7ea=this['_calculatePosition'](_0x2ab78d['archivedAt']),_0x5d6742=_0x387bfc['getByInnerView'](_0x4a6cc5['view']);_0x5d6742['isVisible']&&_0x387bfc['_visibleAnnotations']['remove'](_0x5d6742),this['annotationViews']['add'](_0x5d6742['view'],_0x3dd7ea);}}['_calculatePosition'](_0x4fba9d){const _0x2acc96=this['editor']['config']['get']('collaboration.channelId'),_0x3158e4=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x46c457=>_0x46c457['channelId']===_0x2acc96)['findIndex'](_0x37612e=>_0x37612e['archivedAt']<_0x4fba9d);return _0x3158e4<0x0||_0x3158e4>this['annotationViews']['length']?this['annotationViews']['length']:_0x3158e4-0x1;}['_toggleDialog'](){const _0x16f0db=this['editor'],_0x342495=_0x16f0db['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new it(_0x16f0db['locale'],this['annotationViews'])),'commentsArchive'===_0x342495['id']?_0x342495['hide']():_0x342495['show']({'id':'commentsArchive','title':E(_0x16f0db['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3ca749,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':tt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4430fe,_0x4dd410=!0x1){const _0x5f3dad=this['editor']['locale'],_0x12101e=this['editor']['plugins']['get']('Dialog'),_0x50c173=new _0x4430fe(_0x5f3dad);return _0x50c173['bind']('isEnabled')['to'](this,'isEnabled'),_0x50c173['bind']('isOn')['to'](_0x12101e,'id',_0x2e9617=>'commentsArchive'===_0x2e9617),_0x50c173['set']({'label':E(_0x5f3dad,'COMMENTS_ARCHIVE'),'icon':_0x3ca749,'isToggleable':!0x0}),_0x4dd410&&(_0x50c173['tooltip']=!0x0),this['listenTo'](_0x50c173,'execute',()=>this['_toggleDialog']()),_0x50c173;}['_hideDialogOnAnnotationEscape']=_0x585684=>{const _0x15a8d2=_0x585684['source'];if(!this['annotationViews']['has'](_0x15a8d2['view']))return;const _0x6e464d=this['editor']['plugins']['get']('Dialog');_0x6e464d['isOpen']&&'commentsArchive'===_0x6e464d['id']&&(_0x6e464d['hide'](),_0x585684['stop']());};}class p extends _0x39c08c{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,is as BaseCommentThreadView,rs as BaseCommentView,fi as Comment,ui as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|