@ckeditor/ckeditor5-comments 47.7.4 → 47.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +19 -19
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x1e09b8={}){function _0x3d7a1c(_0x3c89b7){return _0x3c89b7['map'](_0x36a31a=>String['fromCharCode'](_0x36a31a))['join']('');}(_0x1e09b8=Object['assign']({},_0x1e09b8))['plugins']||(_0x1e09b8['plugins']=hs['defaultPlugins']),super(_0x1e09b8),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[_0x3d7a1c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d7a1c([0x76,0x69,0x65,0x77])][_0x3d7a1c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3d7a1c([0x61,0x75,0x74,0x6f]),this[_0x3d7a1c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3d7a1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3d7a1c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3d7a1c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3d7a1c([0x6f,0x6b])});}['create'](){const _0x4dcb52=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4dcb52))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xea3ab=>{const _0x43dbdc=this['model']['document']['getRoot'](),_0x5e9feb=_0x43dbdc&&_0x43dbdc['getChild'](_0x43dbdc['childCount']-0x1);_0xea3ab['setSelection'](_0x5e9feb,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x8b7bd6=this['editing']['view'],_0x2db9bd=_0x8b7bd6['document']['getRoot'](),_0x4a5ec5=_0x2db9bd['getChild'](0x0);_0x2db9bd['childCount']>0x1||!_0x4a5ec5||'p'!=_0x4a5ec5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x8b7bd6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4a5ec5['placeholder']=this['placeholder']),Ft({'view':_0x8b7bd6,'element':_0x4a5ec5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4a5ec5);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x49f99d,_0x419849={}){super(_0x49f99d),this['editor']=null,this['_editorConfig']=_0x419849,this['set']('value',_0x419849['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x49f99d,'Reply...')),this['set']('submitLabel',N(_0x49f99d,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x49b404(),this['focusCycler']=new _0x414173({'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',(_0x2c6fe1,_0x3f70fd)=>{this['cancelButtonView']['fire']('execute'),_0x3f70fd();}),this['keystrokes']['set']('Ctrl+Enter',(_0x96ef55,_0x2c966a)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x2c966a());}),this['on']('submit',(_0x175103,_0x3ee88c)=>{_0x3ee88c['length']>0xfde8?(alert(N(_0x49f99d,'TOO_LONG_COMMENT_ALERT',[_0x3ee88c['length'],0xfde8])),_0x175103['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x502d92=this['editor'];this['element']['insertBefore'](_0x502d92['ui']['element'],this['element']['firstChild']),_0x502d92['model']['document']['on']('change',()=>this['value']=_0x502d92['getData']()),_0x502d92['bind']('placeholder')['to'](this),this['focusables']['add'](_0x502d92['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5b6ab7){-0x1===_0x5b6ab7?(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:_0x47ace8}=this,_0x455907=new _0x10624b(_0x47ace8);return _0x455907['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x455907['withText']=!0x0,_0x455907['bind']('label')['to'](this,'submitLabel'),_0x455907['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x455907['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xc84dcc,_0x4a4340)=>!_0x4a4340&&!!_0xc84dcc['trim']()),_0x455907;}['_createCancelButton'](){const {locale:_0x122ef1}=this,_0x15569=new _0x10624b(_0x122ef1);return _0x15569['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x15569['label']=N(_0x122ef1,'Cancel'),_0x15569['withText']=!0x0,_0x15569['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x15569;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4a5910=>{this['focusTracker']['add'](_0x4a5910['element']);}),this['focusables']['on']('change',(_0x2b3a5b,_0x412fd3)=>{for(const _0x196d21 of Array['from'](_0x412fd3['added'])['reverse']())this['focusTracker']['add'](_0x196d21['element']);});}}class ie extends kt{constructor(_0x3e162a,_0x3bfe9a,_0x32feb3){super(_0x3e162a),this['commentInputView']=new es(_0x3e162a,_0x32feb3),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x198613,_0x1ad873)=>_0x198613||!!_0x1ad873),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 _0x3fd5b6(_0x3e162a,_0x3bfe9a),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'](_0x1c70f3){this['commentInputView']['focus'](_0x1c70f3);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x3d530d,_0x169730)=>{const {submitButtonView:_0x107c3e,cancelButtonView:_0x148f31,editor:_0x26ae5d}=this['commentInputView'];[_0x107c3e['element'],_0x148f31['element'],_0x26ae5d?_0x26ae5d['editing']['view']['getDomRoot']():null]['filter'](_0x5351d6=>_0x5351d6)['some'](_0x4cdf85=>_0x4cdf85['contains'](_0x169730['target']))||(this['focus'](),_0x169730['preventDefault']());});}}class rs extends kt{constructor(_0x531212){super(_0x531212);const _0x14d2b6=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x14d2b6['to']('count',_0x3f6951=>N(_0x531212,'NUMBER_OF_COMMENTS',_0x3f6951))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2e60fc,_0x5ac4fe,_0x4121b1){super(_0x2e60fc);const _0x7f05e7=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5ac4fe['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5ac4fe,this['_config']=_0x4121b1,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x49b404(),this['keystrokes']=new jt(),this['focusCycler']=new _0x414173({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3a24c1=>this['commentViews']['map'](_0x388727=>_0x388727['element'])['includes'](_0x3a24c1['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x2e60fc),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x8fc69e=>_0x8fc69e-this['_config']['maxCommentsWhenCollapsed']);for(const _0x160fe3 of _0x5ac4fe['comments'])this['_handleNewCommentModel'](_0x160fe3);this['_handleInfoComment'](),this['listenTo'](_0x5ac4fe['comments'],'add',(_0x26fd48,_0x3d1724)=>{const _0x1318ba=this['_calculatePosition'](_0x3d1724);this['length']++,this['_handleNewCommentModel'](_0x3d1724,_0x1318ba),this['refreshVisibleViews']();}),this['listenTo'](_0x5ac4fe['comments'],'remove',(_0x3cfd4b,_0x51c2f0)=>{this['length']--,this['_handleRemoveCommentModel'](_0x51c2f0),this['refreshVisibleViews']();}),this['listenTo'](_0x5ac4fe,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5ac4fe,'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',_0x7f05e7['if']('length','ck-hidden',_0x353250=>!_0x353250)],'aria-label':N(_0x2e60fc,'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'](_0x515377){-0x1===_0x515377?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x212fd3 of this['commentViews'])_0x212fd3['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x580f90,_0x23de82){const _0x441e6b=new this['_config']['CommentView'](this['locale'],_0x580f90,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x441e6b['viewUid']=_0x580f90['id'],_0x441e6b['delegate']('removeComment')['to'](this),_0x441e6b['delegate']('updateComment')['to'](this),_0x441e6b['delegate']('resolveCommentThread')['to'](this),_0x441e6b['delegate']('editorReady')['to'](this),_0x441e6b['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x441e6b,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x441e6b,_0x23de82);}['_calculatePosition'](_0x2e860e){const _0xd0f48a=this['_model']['_findOptimalIndex'](_0x2e860e);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2e860e['authoredAt']?_0xd0f48a-0x1:_0xd0f48a:_0xd0f48a-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2f5443={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x2f5443,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2f5443));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0xd835e){const _0x2f820d=this['commentViews']['remove'](_0xd835e['id']);this['stopListening'](_0x2f820d),_0x2f820d['isEditMode']&&this['_updateHasDirtyComment'](),_0x2f820d['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x35839b=>_0x35839b['isEditMode']);}['_rearrangeCollapse'](){const _0x30c6ae=function(_0x231d9e){const _0x5208b0=new _0x1e787f();for(const _0x4f6e96 of _0x231d9e)_0x5208b0['add'](_0x4f6e96);return _0x5208b0;}(this['commentViews']),_0x1870b4=this['_collapsedCommentsView']['count'];for(let _0x27275c=0x1;_0x27275c<=_0x1870b4;_0x27275c++)_0x30c6ae['remove'](0x1);for(const _0x6608fd of _0x30c6ae)_0x6608fd['collapse']();_0x1870b4>0x0&&_0x30c6ae['add'](this['_collapsedCommentsView'],0x1),ns(_0x11752e(Array['from'](this['visibleViews']),Array['from'](_0x30c6ae)),this['visibleViews'],_0x30c6ae);}['_rearrangeExpand'](){ns(_0x11752e(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x5350ab of this['visibleViews'])_0x5350ab['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x31253c=>{this['focusTracker']['add'](_0x31253c['element']),this['keystrokes']['listenTo'](_0x31253c['element']);}),this['commentViews']['on']('change',(_0x4566ad,_0x2cd6af)=>{for(const _0x2a2f8d of _0x2cd6af['removed'])this['focusTracker']['remove'](_0x2a2f8d['element']),this['keystrokes']['stopListening'](_0x2a2f8d['element']);for(const _0x55afbd of Array['from'](_0x2cd6af['added'])['reverse']())this['focusTracker']['add'](_0x55afbd['element']),this['keystrokes']['listenTo'](_0x55afbd['element']);});}}function ns(_0x4cba2c,_0x54752d,_0x1de930){let _0x551405=0x0;for(const _0x519639 of _0x4cba2c)switch(_0x519639){case'insert':_0x54752d['add'](_0x1de930['get'](_0x551405),_0x551405),_0x551405++;break;case'delete':_0x54752d['remove'](_0x551405);break;case'equal':_0x551405++;}}class oe extends kt{constructor(_0x442c9c){super(_0x442c9c);const _0x4a31d5=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4a31d5['to']('contextValue',_0x5a1d9e=>N(_0x442c9c,'THREAD_CONTEXT_LABEL',_0x5a1d9e)),'tabindex':-0x1},'children':[{'text':_0x4a31d5['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x438d62,_0x4c7db9){super(_0x438d62);const _0x6de2df=this['bindTemplate'];this['_model']=_0x4c7db9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x49b404(),this['keystrokes']=new jt(),this['focusCycler']=new _0x414173({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x213f17=>!!_0x213f17),this['bind']('contextValue')['to'](this['_model'],'context',_0x294b7a=>_0x294b7a&&_0x294b7a['value']?this['_trimContextValue'](_0x294b7a['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x6de2df['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 _0x5491f9=new _0x10624b(this['locale']);return _0x5491f9['label']=N(this['locale'],'Reopen'),_0x5491f9['tooltip']=N(this['locale'],'Reopen'),_0x5491f9['icon']=_0x3cbfac,_0x5491f9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5b9991=>!_0x5b9991),_0x5491f9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xd70b68,_0x2a4355)=>_0xd70b68&&_0x2a4355),_0x5491f9['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5491f9;}['_trimContextValue'](_0x28d68c){if(_0x28d68c['length']<0x96)return _0x28d68c;const _0x39f949=_0x28d68c['lastIndexOf']('\x20',0x93);return _0x28d68c['substring'](0x0,_0x39f949>-0x1?_0x39f949:0x93)+'...';}['_attachContextActions'](){const _0x361346=this['element']['querySelector']('.ck-context'),_0xce839=_0x361346['querySelector']('.ck-context__value');this['listenTo'](_0x361346,'mouseenter',()=>{_0xce839['offsetWidth']<_0xce839['scrollWidth']&&_0x361346['classList']['add']('overlay');}),this['listenTo'](_0x361346,'mouseleave',()=>{_0x361346['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x6455cd of this['focusables'])this['focusTracker']['add'](_0x6455cd['element']),this['keystrokes']['listenTo'](_0x6455cd['element']);}['_createContextView'](){const _0x4cb95a=new oe(this['locale']);return _0x4cb95a['bind']('contextValue')['to'](this),_0x4cb95a;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x25310a,_0x1aac46,_0x5c7734,_0x152bde){super(_0x25310a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1aac46,this['_localUser']=_0x5c7734,this['_config']=_0x152bde,this['commentThreadHeaderView']=new Xt(_0x25310a,_0x1aac46),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x25310a,N(_0x25310a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x25310a,_0x1aac46,Object['assign']({'CommentView':this['_config']['CommentView']},_0x152bde)),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',(_0x43c191,_0x335409)=>_0x43c191||!!_0x335409),this['bind']('isUnlinked')['to'](_0x1aac46,'unlinkedAt',_0x2ffa6a=>!!_0x2ffa6a),this['bind']('ariaLabel')['to'](this,'length',_0x26edae=>{const _0x3a40ca=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x26edae,_0x3a40ca]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x49b404(),this['keystrokes']=new jt(),this['focusCycler']=new _0x414173({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2fff96=>_0x2fff96['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 _0x1ddcef=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x50d5b5=_0x1ddcef['commentInputView'];return _0x1ddcef['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x50d5b5,'value',(_0x14667e,_0x30f8d3,_0x53371f,_0x4810a6,_0x1516b3)=>!!_0x1516b3||!!_0x4810a6&&_0x53371f&&!_0x30f8d3||_0x14667e&&_0x53371f&&!_0x30f8d3),_0x50d5b5['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xc57d89,_0x667b33,_0x46098d)=>{let _0x1d05e9;return _0x1d05e9=_0x46098d&&_0x667b33?'Reply\x20to\x20reopen\x20discussion...':_0xc57d89?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x1d05e9);}),_0x50d5b5['bind']('submitLabel')['to'](this,'length',_0x46d83c=>N(this['locale'],_0x46d83c?'Reply':'Comment')),_0x50d5b5['on']('submit',(_0x144cc6,_0x151392)=>{this['fire']('addComment',_0x151392),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x50d5b5['on']('cancel',()=>{this['focus']();}),_0x50d5b5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x50d5b5['on']('cancel',_0x1027f2=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1027f2['stop']());}),this['on']('change:isActive',(_0x1a310f,_0xd85899,_0x3f97f0)=>{_0x3f97f0||this['length']||_0x50d5b5['value']||this['fire']('removeCommentThread');}),_0x1ddcef;}}class Tt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x1d5fae(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x695b6e,target:_0x47dfef,type:_0x1ef388,isVisible:_0x58561e=!0x0}){super(),this['view']=_0x695b6e,this['view']['element']||this['view']['render'](),this['_type']=_0x1ef388,this['_target']=_0x47dfef,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1e787f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xd8a6dd,_0xcc88a9)=>{this['view']['focusTracker']['add'](_0xcc88a9);}),this['focusableElements']['on']('remove',(_0x3d4c35,_0x435d53)=>{this['view']['focusTracker']['remove'](_0x435d53);}),this['set']('isVisible',_0x58561e);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xfed139=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0xfed139),_0xfed139;}get['targetRect'](){const _0x5c7618=this['target'];if(null===_0x5c7618)return null;if(_0x5c7618 instanceof _0x3cd661)return _0x5c7618;const _0x1f039c=_0x5c7618['filter'](_0x8f8d25=>function(_0x4b8185){const _0x4d70d0=_0x4b8185['offsetParent'];if(_0x4d70d0)return!0x0;const _0x4c2a45=_0x4b8185['getClientRects']()['item'](0x0);return!!_0x4c2a45;}(_0x8f8d25));return 0x0===_0x1f039c['length']?null:new _0x3cd661(_0x1f039c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x480339){this['view']['isActive']=_0x480339,this['view']['mainView']['isActive']=_0x480339;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x16ff90){if(!(null===_0x16ff90||_0x16ff90 instanceof _0x3cd661||Array['isArray'](_0x16ff90)&&_0x16ff90['every'](_0x3178ff=>re(_0x3178ff))))throw new _0x5e18c7('annotation-invalid-target',null,{'target':_0x16ff90});}['_getNormalizedTarget'](){const _0x483985='function'==typeof this['_target']?this['_target']():this['_target'];return re(_0x483985)?[_0x483985]:_0x483985;}}function re(_0x2f59cb){return null!==_0x2f59cb&&'object'==typeof _0x2f59cb&&'nodeType'in _0x2f59cb&&0x1===_0x2f59cb['nodeType'];}class S extends _0x1e787f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0xfce374=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x49b404(),this['_focusTracker']['on']('change:isFocused',(_0x181b2e,_0x2a1cae,_0x209f73)=>{_0x209f73||this['fire']('blur');});for(const _0x4147c3 of _0xfce374)this['add'](_0x4147c3);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4cee61){if(this['has'](_0x4cee61))throw new _0x5e18c7('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4cee61['innerView'],_0x4cee61),this['_viewToAnnotation']['set'](_0x4cee61['view'],_0x4cee61);for(const _0x2d7aee of _0x4cee61['focusableElements'])this['_focusTracker']['add'](_0x2d7aee);this['listenTo'](_0x4cee61['focusableElements'],'add',(_0x2a0141,_0xb90856)=>{this['_focusTracker']['add'](_0xb90856);}),this['listenTo'](_0x4cee61['focusableElements'],'remove',(_0x1429c9,_0x4aa3d0)=>{this['_focusTracker']['remove'](_0x4aa3d0);}),this['listenTo'](_0x4cee61['view']['focusTracker'],'change:isFocused',(_0x42aada,_0x34de41,_0x2c904a)=>{_0x2c904a&&this['fire']('focus',_0x4cee61);}),_0x4cee61['updateTargetRect']();const _0x19cf41=this['_getOrderInContent'](_0x4cee61['view']['targetRect']);return super['add'](_0x4cee61,_0x19cf41);}['remove'](_0x21e8f3){if(!this['has'](_0x21e8f3))throw new _0x5e18c7('annotationcollection-not-existing-item',null);this['stopListening'](_0x21e8f3['view']['focusTracker']),this['stopListening'](_0x21e8f3['focusableElements']);for(const _0x4d7bdc of _0x21e8f3['focusableElements'])this['_focusTracker']['remove'](_0x4d7bdc);return this['_viewToAnnotation']['delete'](_0x21e8f3['view']),this['_innerViewToAnnotation']['delete'](_0x21e8f3['innerView']),super['remove'](_0x21e8f3);}['getByInnerView'](_0x39a81a){return this['_innerViewToAnnotation']['get'](_0x39a81a);}['getByView'](_0x19ec9b){return this['_viewToAnnotation']['get'](_0x19ec9b);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x49378f of this)_0x49378f['updateTargetRect']();this['_sort']();}['_sort'](){const _0x206589=Array['from'](this)['sort']((_0x7c7329,_0xeea3)=>w(_0x7c7329['view']['targetRect'],_0xeea3['view']['targetRect']));for(let _0x4239ce=_0x206589['length']-0x1;_0x4239ce>0x0;_0x4239ce--){const _0xfb672d=_0x206589[_0x4239ce];_0x4239ce!==this['getIndex'](_0xfb672d)&&(this['remove'](_0xfb672d),this['add'](_0xfb672d));}}['_getOrderInContent'](_0x504c8e){let _0x57d9f3=0x0;if(!_0x504c8e)return this['length'];for(const _0x2bc884 of this){const _0x1ab58c=_0x2bc884['view']['targetRect'];if(_0x1ab58c){if(w(_0x504c8e,_0x1ab58c)<0x0)return _0x57d9f3;_0x57d9f3++;}}return _0x57d9f3;}}function v({source:_0xc6a013,target:_0x328c6a,filter:_0x260c0d}){for(const _0x519b23 of _0xc6a013)_0x260c0d(_0x519b23)&&_0x328c6a['add'](_0x519b23);_0x328c6a['listenTo'](_0xc6a013,'add',(_0x3b65e7,_0x1d9781)=>{_0x260c0d(_0x1d9781)&&_0x328c6a['add'](_0x1d9781);}),_0x328c6a['listenTo'](_0xc6a013,'remove',(_0x45970e,_0x5b68d7)=>{_0x328c6a['has'](_0x5b68d7)&&_0x328c6a['remove'](_0x5b68d7);});}function w(_0x2fe7f8,_0x273f47){if(null===_0x2fe7f8&&null===_0x273f47)return 0x0;if(null===_0x2fe7f8)return-0x1;if(null===_0x273f47)return 0x1;const _0x1d6603=_0x2fe7f8['top']-_0x273f47['top'];return 0x0==_0x1d6603?_0x2fe7f8['left']-_0x273f47['left']:_0x1d6603;}class y extends _0x5128ef{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47713a){if(super(_0x47713a),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x47713a instanceof _0x330859){const _0x39d706=_0x47713a['locale'];_0x47713a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x39d706,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x39d706,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x39d706,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x39d706,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x39d706,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x39d706,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x39d706,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x48400d){this['collection']['add'](_0x48400d);}['remove'](_0x53aae7){this['collection']['remove'](_0x53aae7),_0x53aae7['destroy']();}['refreshVisibility'](){for(const _0x2cc10e of this['collection'])_0x2cc10e['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x34c2ab){return this['collection']['getByInnerView'](_0x34c2ab);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x51ac1d of this['collection'])_0x51ac1d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x5606c4){this['fire']('_activateAnnotation',_0x5606c4);}['createAnnotation'](_0x2b03ef){return new T(_0x2b03ef);}['createAnnotationView'](_0x2a4b82,_0x11e711){return new E(_0x2a4b82,_0x11e711);}['_addActiveAnnotation'](_0x243977){const _0x1cde5c=new Set(this['activeAnnotations']);_0x1cde5c['add'](_0x243977),this['activeAnnotations']=_0x1cde5c;}['_removeActiveAnnotation'](_0x5b0e68){const _0x28acb7=new Set(this['activeAnnotations']);_0x28acb7['delete'](_0x5b0e68),this['activeAnnotations']=_0x28acb7;}['_bindAnnotationsToVisibleAnnotations'](){const _0x23cb77=this['collection'],_0x296032=this['_visibleAnnotations'];function _0x5d77f4(_0x78c3f5){const _0x4e1221=_0x78c3f5['source'];_0x4e1221['isVisible']&&!_0x296032['has'](_0x4e1221)?_0x296032['add'](_0x4e1221):!_0x4e1221['isVisible']&&_0x296032['has'](_0x4e1221)&&_0x296032['remove'](_0x4e1221),_0x4e1221['view']['focusTracker']['remove'](_0x4e1221['view']['element']),_0x4e1221['view']['focusTracker']['add'](_0x4e1221['view']['element']);}this['listenTo'](_0x23cb77,'add',(_0x277506,_0x1b236f)=>{_0x1b236f['isVisible']&&_0x296032['add'](_0x1b236f),this['listenTo'](_0x1b236f,'change:isVisible',_0x5d77f4);}),this['listenTo'](_0x23cb77,'remove',(_0x1d8d40,_0x330fc0)=>{_0x296032['has'](_0x330fc0)&&_0x296032['remove'](_0x330fc0),this['stopListening'](_0x330fc0,'change:isVisible',_0x5d77f4);});}['_setupEnterAnnotationKeystroke'](){const _0x3da0c1=_0x5d87d0=>{_0x5d87d0['on']('ready',()=>{_0x5d87d0['keystrokes']['set'](_0x112cb1,(_0x1dc360,_0x5ad83a)=>{const _0x24ffae=_0x1784c0(this['activeAnnotations']['values']());_0x24ffae&&(_0x24ffae['view']['focus'](),_0x5ad83a());});});};this['context']instanceof _0x330859?_0x3da0c1(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x26a2b3,_0x4515d1)=>{_0x3da0c1(_0x4515d1);});}['_setupEscapeAnnotationHandling'](){const _0x5bb4ad=_0x2f5289=>{const _0x42eee4=_0x2f5289['source'],_0x459461=[];let _0x3e61ae;if(Array['isArray'](_0x42eee4['target'])){_0x3e61ae=_0x42eee4['target'][0x0],this['context']instanceof _0x330859?_0x459461['push'](this['context']):this['context']['editors']&&_0x459461['push'](...this['context']['editors']);for(const _0x261acf of _0x459461)for(const _0x9293df of _0x261acf['editing']['view']['domRoots']['values']())if(_0x9293df['contains'](_0x3e61ae))return void _0x261acf['editing']['view']['focus']();_0x3e61ae['focus']();}};this['listenTo'](this['collection'],'add',(_0x269fd5,_0x4e789f)=>{this['listenTo'](_0x4e789f,'escape',_0x5bb4ad,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xfb7d8e,_0x556e34)=>{this['stopListening'](_0x556e34,'escape',_0x5bb4ad);});}}const bt=Symbol('noChannel'),Nt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x5128ef{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,pt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf1c0b0){super(_0xf1c0b0),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x25d050=this['context']['config'];_0x25d050['define']('comments.maxCommentsWhenCollapsed',0x2),_0x25d050['define']('comments.maxThreadTotalWeight',0x1f4),_0x25d050['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x25d050['define']('comments.CommentThreadView',Tt),_0x25d050['define']('comments.CommentView',_t),_0x25d050['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x74fa12=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5b2922,_0x3bc700)=>this['_addCommentThread'](_0x3bc700)),this['on']('submitCommentThread',(_0x258fc8,_0x36e6aa)=>this['_submitCommentThread'](_0x36e6aa)),this['on']('resolveCommentThread',(_0x517a44,_0x2b3d81)=>this['_resolveCommentThread'](_0x2b3d81)),this['on']('resolveCommentThread',(_0xb7b2d5,_0x2ff89b)=>this['_updateActiveAnnotation'](_0x2ff89b),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1410b6,_0x3127db)=>this['_reopenCommentThread'](_0x3127db)),this['on']('reopenCommentThread',(_0x551c84,_0xcd27e8)=>this['_updateActiveAnnotation'](_0xcd27e8),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x583458,_0x49afac)=>this['_removeCommentThread'](_0x49afac)),this['on']('updateCommentThread',(_0x18688a,_0x3b3e0b)=>this['_updateCommentThread'](_0x3b3e0b)),this['on']('updateCommentThread',(_0x544372,_0x2da9c4)=>this['_updateActiveAnnotation'](_0x2da9c4),{'priority':'lowest'}),this['on']('addComment',(_0x3ddbe1,_0xe568bc)=>this['_addComment'](_0xe568bc)),this['on']('updateComment',(_0x41a428,_0x3d71f6)=>this['_updateComment'](_0x3d71f6)),this['on']('removeComment',(_0x36b7fa,_0x495a71)=>this['_removeComment'](_0x495a71)),this['on']('addComment',(_0x5e869d,{threadId:_0x8701d4,isFromAdapter:_0x23b19a})=>{if(_0x23b19a)return;const _0x106d2f=this['getCommentThread'](_0x8701d4),_0x411f51=_0x106d2f&&this['_threadToController']['get'](_0x106d2f);_0x411f51&&_0x411f51['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x74fa12,'change:activeAnnotations',(_0x35adba,_0x43f1ed,_0x52b01c)=>{const _0x39b154=Array['from'](_0x52b01c)['map'](_0x23e44d=>this['_viewToController']['get'](_0x23e44d['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x39b154?_0x39b154['model']:null;});}set['adapter'](_0x11588a){if(this['_adapter'])throw new _0x5e18c7('commentsrepository-adapter-already-set');this['_adapter']=_0x11588a;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x211a4f=bt,threadId:_0x3fe9d6=_0x377f30(),comments:_0x4dc44f=[],unlinkedAt:_0x9a3fd3=null,resolvedAt:_0x346fd1=null,resolvedBy:_0x215bd8=null,target:_0xcbce27=null,context:_0x31dd50=null,attributes:_0x473848={},isResolvable:_0x542bd7=!0x0,isSubmitted:_0x440961=!0x1,isFromAdapter:_0x16c078=!0x1}={}){return this['fire'](xt('addCommentThread',_0x211a4f),{'channelId':_0x211a4f,'threadId':_0x3fe9d6,'comments':_0x4dc44f,'unlinkedAt':_0x9a3fd3,'resolvedAt':_0x346fd1,'resolvedBy':_0x215bd8,'target':_0xcbce27,'context':_0x31dd50,'attributes':_0x473848,'isFromAdapter':_0x16c078,'isResolvable':_0x542bd7,'isSubmitted':_0x440961}),this['getCommentThread'](_0x3fe9d6);}['openNewCommentThread']({channelId:_0x38664a=bt,threadId:_0x4af5cb=_0x377f30(),target:_0x42a464,context:_0x7363e2=null,isResolvable:_0x58223f=!0x0}){if(this['_readOnlyChannels']['has'](_0x38664a)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x42a464)throw new _0x5e18c7('commentsrepository-missing-target');const _0x5bfa90=this['addCommentThread']({'channelId':_0x38664a,'threadId':_0x4af5cb,'target':_0x42a464,'context':_0x7363e2,'isResolvable':_0x58223f});if(!_0x5bfa90)return null;const _0x4bcd89=this['_threadToController']['get'](_0x5bfa90),_0x26c93d=_0x4bcd89['view']['commentThreadInputView']['commentInputView'],_0x3115fa=this['context']['plugins']['get'](y),_0xcdd671=_0x3115fa['getByInnerView'](_0x4bcd89['view']);return _0x3115fa['activate'](_0xcdd671),_0x26c93d['once']('editorReady',()=>_0x26c93d['focus']()),_0x5bfa90;}['hasCommentThread'](_0x1aa1ae){if('string'!=typeof _0x1aa1ae)throw new _0x5e18c7('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1aa1ae);}['updateCommentThread']({channelId:_0x290f9b=bt,threadId:_0xff5045,context:_0x44b040,unlinkedAt:_0x4ae365,attributes:_0x53a2f4,isFromAdapter:_0x386562=!0x1}){return this['fire'](xt('updateCommentThread',_0x290f9b),{'channelId':_0x290f9b,'threadId':_0xff5045,'context':_0x44b040,'unlinkedAt':_0x4ae365,'attributes':_0x53a2f4,'isFromAdapter':_0x386562}),this['getCommentThread'](_0xff5045);}['getCommentThread'](_0x41d121){if('string'!=typeof _0x41d121)throw new _0x5e18c7('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x41d121);}['fetchCommentThread']({channelId:_0x1d72e3,threadId:_0x453bf5}={}){const _0x4f7992=this['getCommentThread'](_0x453bf5);if(_0x4f7992)return Promise['resolve'](_0x4f7992);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5e18c7('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1d72e3,'threadId':_0x453bf5})['then'](_0x58a724=>this['hasCommentThread'](_0x453bf5)?this['getCommentThread'](_0x453bf5):_0x58a724?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1d72e3},_0x58a724)):void 0x0)['catch'](_0x4c4281=>{throw console['error'](_0x4c4281),new _0x5e18c7('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x18701e,skipNotAttached:_0x5ef4b8=!0x1,skipEmpty:_0x12f794=!0x1,toJSON:_0x4c0b7d=!0x1}={}){const _0x5583dc=[];for(const _0x49f609 of this['_threads']['values']())_0x18701e&&_0x49f609['channelId']!==_0x18701e||_0x5ef4b8&&!_0x49f609['isAttached']||_0x12f794&&0x0===_0x49f609['length']||_0x5583dc['push'](_0x49f609);return _0x4c0b7d?_0x5583dc['map'](_0x20f351=>_0x20f351['toJSON']()):_0x5583dc;}['getAnnotationForCommentThread'](_0x4e57e0){const _0x354d31=this['_threadToController']['get'](_0x4e57e0);if(!_0x354d31)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x354d31['view'])||null;}['getCommentThreadForAnnotation'](_0x43158b){const _0x1b7c76=this['_viewToController']['get'](_0x43158b['innerView']);return _0x1b7c76?_0x1b7c76['model']:null;}['setActiveCommentThread'](_0x556950){const _0x57b974=this['context']['plugins']['get'](y);if(!_0x556950)return void(this['activeCommentThread']&&_0x57b974['deactivateAll']());const _0x41033c=this['getCommentThread'](_0x556950);if(!_0x41033c)throw new _0x5e18c7('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x556950});if(!this['_threadToController']['has'](_0x41033c))throw new _0x5e18c7('commentsrepository-active-not-attached',null,{'threadId':_0x556950});const _0xaab041=_0x57b974['getByInnerView'](this['_threadToController']['get'](_0x41033c)['view']);_0x57b974['activate'](_0xaab041);}['switchReadOnly'](_0x560038,_0x2a44d5){_0x560038?this['_readOnlyChannels']['add'](_0x2a44d5):this['_readOnlyChannels']['delete'](_0x2a44d5),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x46342d){return this['_readOnlyChannels']['has'](_0x46342d)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xb68418,_0x135333){return new gt(_0xb68418,_0x135333);}['setPermissions'](_0x3240ff,_0x1ce859=bt){this['_permissions']['set'](_0x1ce859,_0x3240ff),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x85fe91=bt){return this['_permissions']['has'](_0x85fe91)?this['_permissions']['get'](_0x85fe91):Nt;}['_addCommentThread']({channelId:_0x3799c4,threadId:_0x5d2c72,comments:_0x57063d,unlinkedAt:_0x23c675,resolvedAt:_0x2d6c3d,resolvedBy:_0x5c7af3,target:_0x17aff9,context:_0x150b55,attributes:_0x113d87,isFromAdapter:_0x585ae6,isResolvable:_0x2694b5,isSubmitted:_0x2c2cd1}){if('string'!=typeof _0x5d2c72)throw new _0x5e18c7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5d2c72});if(this['hasCommentThread'](_0x5d2c72))throw new _0x5e18c7('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5d2c72});const _0x5789ad=new CommentThread(this,{'channelId':_0x3799c4,'id':_0x5d2c72,'context':_0x150b55,'attributes':_0x113d87,'unlinkedAt':_0x23c675,'resolvedAt':_0x2d6c3d,'resolvedBy':_0x5c7af3?this['context']['plugins']['get'](st)['getUser'](_0x5c7af3):null,'isResolvable':_0x2694b5,'isSubmitted':_0x2c2cd1||_0x585ae6});this['_threads']['set'](_0x5d2c72,_0x5789ad);for(const _0x4c8b06 of _0x57063d)_0x5789ad['_add'](this['_createNewComment']({'threadId':_0x5d2c72,..._0x4c8b06}));return _0x17aff9&&_0x5789ad['attachTo'](_0x17aff9),_0x585ae6||!_0x5789ad['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3799c4,'threadId':_0x5d2c72});}['_submitCommentThread']({channelId:_0x16ff3b,threadId:_0x4aa0ed}){if(!this['hasCommentThread'](_0x4aa0ed))throw new _0x5e18c7('commentsrepository-missing-comment-thread',this);const _0x5c406e=this['getCommentThread'](_0x4aa0ed);if(_0x5c406e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x165bc2,comments:_0x1fb21c,resolvedAt:_0x11ca4d,resolvedBy:_0x2bb0d2,context:_0x4b75ef,attributes:_0x154943}=_0x5c406e,_0x4dd3ca=this['context']['plugins']['get']('PendingActions'),_0x57c8ac=_0x4dd3ca['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x16ff3b,'threadId':_0x165bc2,'comments':_0x1fb21c['map'](_0x48297e=>_0x48297e['toJSON']()),'resolvedAt':_0x11ca4d,'resolvedBy':_0x2bb0d2?_0x2bb0d2['id']:_0x2bb0d2,'context':_0x4b75ef,'attributes':_0x154943})['then'](({comments:_0x4090fa})=>{_0x4dd3ca['remove'](_0x57c8ac);for(const _0x52d5bb of _0x4090fa)this['_updateComment']({'channelId':_0x16ff3b,'threadId':_0x4aa0ed,'commentId':_0x52d5bb['commentId'],'createdAt':_0x52d5bb['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x57f238=>{throw console['error'](_0x57f238),new _0x5e18c7('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x30f610,target:_0x220d9b}){const _0x16bf6d=this['getCommentThread'](_0x30f610);if(!_0x16bf6d)throw new _0x5e18c7('commentsrepository-attach-missing-comment-thread',this);const _0x119bc0=this['context']['plugins']['get']('PendingActions'),_0x1e4035=this['context']['plugins']['get'](y),_0x131c1a=this['_createCommentThreadView'](_0x16bf6d),_0x213b8a=new gt(_0x16bf6d,_0x131c1a);let _0x5bbe9d=null;_0x131c1a['on']('change:isDirty',(_0x4c1f15,_0x4bf659,_0x527f24)=>{_0x527f24?_0x5bbe9d=_0x119bc0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5bbe9d&&(_0x119bc0['remove'](_0x5bbe9d),_0x5bbe9d=null);}),this['_threadToController']['set'](_0x16bf6d,_0x213b8a),this['_viewToController']['set'](_0x131c1a,_0x213b8a);const _0x1c6a7f=new E(this['context']['locale'],_0x131c1a);_0x1c6a7f['bind']('length')['to'](_0x131c1a),_0x1c6a7f['bind']('isDirty')['to'](_0x131c1a,'isDirty',_0x131c1a,'length',(_0x3c0190,_0x5edae7)=>_0x3c0190||!_0x5edae7),_0x1c6a7f['bind']('isActive')['to'](_0x131c1a),_0x1c6a7f['type']='comment';const _0x1a18e2=new T({'view':_0x1c6a7f,'target':_0x220d9b,'type':'comment','isVisible':!_0x16bf6d['archivedAt']&&!!('function'==typeof _0x220d9b?_0x220d9b():_0x220d9b)});return _0x131c1a['on']('escape',()=>{_0x1a18e2['fire']('escape');}),this['_bindAnnotationToEditors'](_0x131c1a,_0x1a18e2),_0x1e4035['add'](_0x1a18e2),_0x1a18e2;}['_bindAnnotationToEditors'](_0x58b59b,_0x32b041){this['listenTo'](_0x58b59b,'editorReady',(_0x204a6e,_0x10db39)=>{const _0x39781f=_0x10db39['ui']['view']['body']['bodyCollectionContainer'];_0x32b041['focusableElements']['add'](_0x39781f),this['context']instanceof _0x330859&&this['context']['ui']['focusTracker']['add'](_0x39781f);},{'priority':'highest'}),this['listenTo'](_0x58b59b,'editorDestroyed',(_0x39af6a,_0x59d5d9)=>{const _0x2c6380=_0x59d5d9['ui']['view']['body']['bodyCollectionContainer'];_0x32b041['focusableElements']['has'](_0x2c6380)&&_0x32b041['focusableElements']['remove'](_0x2c6380),this['context']instanceof _0x330859&&this['context']['ui']['focusTracker']['remove'](_0x2c6380);});}['_unbindEditors'](_0x2d3786){this['stopListening'](_0x2d3786,'editorReady'),this['stopListening'](_0x2d3786,'editorDestroyed');}['_createCommentThreadView'](_0x27ac78){const _0xd1d664=this['context']['plugins']['get'](st),{config:_0x2f0705,locale:_0x3b9c84}=this['context'],_0x31a4b4=It(_0x2f0705['get']('locale'),_0x3b9c84);return new(0x0,(_0x2f0705['get']('comments'))['CommentThreadView'])(_0x3b9c84,_0x27ac78,_0xd1d664['me'],{'editorConfig':{..._0x2f0705['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2f0705['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2f0705['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2f0705['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2f0705['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x31a4b4,'CommentView':_0x2f0705['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x4940b7,channelId:_0x41f71e,resolvedAt:_0x46c3f1,resolvedBy:_0x31cea2,isFromAdapter:_0x3ca7f0}){if(!this['hasCommentThread'](_0x4940b7))throw new _0x5e18c7('commentsrepository-missing-comment-thread',null,{'threadId':_0x4940b7});const _0x7b1738=this['getCommentThread'](_0x4940b7);if(_0x7b1738['isResolved'])throw new _0x5e18c7('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4940b7});const _0x590e17=this['context']['plugins']['get'](st);if(_0x7b1738['resolvedBy']=_0x590e17['getUser'](_0x31cea2),_0x7b1738['resolvedAt']=_0x46c3f1,_0x3ca7f0||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x54723e=this['context']['plugins']['get']('PendingActions'),_0x4f9028=_0x54723e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x41f71e,'threadId':_0x4940b7})['then'](({resolvedAt:_0x75db0,resolvedBy:_0x309593})=>{_0x54723e['remove'](_0x4f9028),_0x7b1738['resolvedBy']['id']!==_0x309593&&(_0x7b1738['resolvedBy']=_0x590e17['getUser'](_0x309593)),_0x7b1738['resolvedAt']=_0x75db0;})['catch'](_0x10a8f8=>{throw console['error'](_0x10a8f8),new _0x5e18c7('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5c01dd,channelId:_0x545c7d,isFromAdapter:_0x3b4fce}){if(!this['hasCommentThread'](_0x5c01dd))throw new _0x5e18c7('commentsrepository-missing-comment-thread',null,{'threadId':_0x5c01dd});const _0x3faff8=this['getCommentThread'](_0x5c01dd);if(!_0x3faff8['isResolved'])throw new _0x5e18c7('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5c01dd});if(_0x3faff8['resolvedBy']=null,_0x3faff8['resolvedAt']=null,_0x3b4fce||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4ae3e5=this['context']['plugins']['get']('PendingActions'),_0x515276=_0x4ae3e5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x545c7d,'threadId':_0x5c01dd})['then'](()=>_0x4ae3e5['remove'](_0x515276))['catch'](_0x3c622d=>{throw console['error'](_0x3c622d),new _0x5e18c7('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3abac1,isFromAdapter:_0x2ead5c}){const _0x10e2cc=this['getCommentThread'](_0x3abac1);if(!_0x10e2cc)throw new _0x5e18c7('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3abac1),this['_threads']['delete'](_0x3abac1),!_0x10e2cc['isSubmitted']||_0x2ead5c||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x368e91=this['context']['plugins']['get']('PendingActions'),{channelId:_0xbf6969}=_0x10e2cc,_0x232de3=_0x368e91['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xbf6969,'threadId':_0x3abac1})['then'](()=>_0x368e91['remove'](_0x232de3))['catch'](_0x32f5ae=>{throw console['error'](_0x32f5ae),new _0x5e18c7('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x39559d,unlinkedAt:_0x3f8538,context:_0x326d3a,attributes:_0x403b6b,isFromAdapter:_0x1dbece}){if('string'!=typeof _0x39559d)throw new _0x5e18c7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x39559d});if(!this['hasCommentThread'](_0x39559d))throw new _0x5e18c7('commentsrepository-missing-comment-thread',null,{'threadId':_0x39559d});const _0x1cf810=this['getCommentThread'](_0x39559d);let _0x3f4bb2=!0x1;if(void 0x0!==_0x326d3a&&_0x1cf810['context']!==_0x326d3a&&(_0x1cf810['context']=_0x326d3a,_0x3f4bb2=!0x0),void 0x0!==_0x3f8538&&_0x1cf810['unlinkedAt']!==_0x3f8538&&(_0x1cf810['unlinkedAt']=_0x3f8538,_0x3f4bb2=!0x0),_0x403b6b&&!yt(_0x403b6b,_0x1cf810['attributes'])&&(_0x1cf810['attributes']=_0x403b6b,_0x3f4bb2=!0x0),!_0x3f4bb2)return Promise['resolve']();if(!_0x1cf810['isSubmitted']||_0x1dbece||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x20a3a9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x488b5f}=_0x1cf810,_0x5c5734=_0x20a3a9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x488b5f,'threadId':_0x39559d,'context':_0x326d3a,'unlinkedAt':_0x3f8538,'attributes':_0x403b6b})['then'](()=>_0x20a3a9['remove'](_0x5c5734))['catch'](_0x169947=>{throw console['error'](_0x169947),new _0x5e18c7('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x24a205){const _0x275f6f=this['context']['plugins']['get'](y),_0x4d503f=this['getCommentThread'](_0x24a205);if(_0x4d503f['_isAttached']=!0x1,this['_threadToController']['has'](_0x4d503f)){const _0x580d32=this['_threadToController']['get'](_0x4d503f),_0x331059=_0x580d32['view'],_0x39f95c=_0x275f6f['getByInnerView'](_0x331059);this['_threadToController']['delete'](_0x4d503f),this['_viewToController']['delete'](_0x331059),_0x39f95c&&_0x275f6f['remove'](_0x39f95c),_0x580d32['destroy'](),_0x331059['destroy']()['then'](()=>{this['_unbindEditors'](_0x331059);});}}['_updateActiveAnnotation']({threadId:_0x587c0b,resolvedAt:_0x12258f,unlinkedAt:_0x48ac7b}){const _0xdfd5e1=!!_0x12258f,_0x1fc521=this['context']['plugins']['get'](y),_0x30fdc8=this['getCommentThread'](_0x587c0b);if(this['_threadToController']['has'](_0x30fdc8)){const _0x43f7f7=this['_threadToController']['get'](_0x30fdc8)['view'],_0x13e505=_0x1fc521['getByInnerView'](_0x43f7f7);_0x13e505&&(_0xdfd5e1&&_0x1fc521['_removeActiveAnnotation'](_0x13e505),_0x48ac7b?_0x13e505['isVisible']=!0x1:_0x13e505['refreshVisibility']());}}['_getExternalAuthor'](_0xb84500){const _0x51320b=this['context']['plugins']['get'](st),_0x41df9b=wt('external:'+_0xb84500),_0x559f95=_0x51320b['getUser'](_0x41df9b);return _0x559f95||_0x51320b['addUser']({'id':_0x41df9b,'name':_0xb84500});}['_createNewComment']({threadId:_0x3b0e44,commentId:_0x1e641e=_0x377f30(),content:_0x5e23ec,authorId:_0x416335,createdAt:_0x3b20dc,attributes:_0x7151bf}){if('string'!=typeof _0x1e641e)throw new _0x5e18c7('commentsrepository-invalid-commentid');if('string'!=typeof _0x416335)throw new _0x5e18c7('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5e23ec||!_0x5e23ec['trim']())throw new _0x5e18c7('commentsrepository-invalid-comment-content');const _0x2e6cd7=this['context']['plugins']['get'](st)['getUser'](_0x416335);if(!_0x2e6cd7)throw new _0x5e18c7('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x416335});let _0x3791a9=null,_0x52911c=_0x3b20dc;return _0x7151bf?.['@external']&&(_0x3791a9=this['_getExternalAuthor'](_0x7151bf['@external']['authorName']),_0x52911c=new Date(_0x7151bf['@external']['createdAt'])),new Comment(this,{'threadId':_0x3b0e44,'id':_0x1e641e,'author':_0x3791a9||_0x2e6cd7,'creator':_0x2e6cd7,'content':_0x5e23ec,'createdAt':_0x3b20dc,'authoredAt':_0x52911c,'attributes':_0x7151bf});}['_addComment'](_0x1eb0a9){let {threadId:_0x24c585,content:_0x10d9eb,attributes:_0x5138e2,isFromAdapter:_0x49c717}=_0x1eb0a9;const _0x5c4192=this['getCommentThread'](_0x1eb0a9['threadId']);if(!_0x5c4192)throw new _0x5e18c7('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x44baac=this['_createNewComment'](_0x1eb0a9),{id:_0xe6a76}=_0x44baac;if(_0x5c4192['_add'](_0x44baac),_0x49c717||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5c4192['isSubmitted'])return Promise['resolve']();const _0x4cd6e3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x260ce3}=_0x5c4192,_0x3d7614=_0x4cd6e3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5138e2||(_0x5138e2={}),this['adapter']['addComment']({'channelId':_0x260ce3,'threadId':_0x24c585,'commentId':_0xe6a76,'content':_0x10d9eb,'attributes':_0x5138e2})['then'](_0x57cafa=>{_0x4cd6e3['remove'](_0x3d7614),_0x57cafa&&this['_updateComment']({'channelId':_0x260ce3,'threadId':_0x24c585,'commentId':_0xe6a76,'createdAt':_0x57cafa['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4c389a=>{throw console['error'](_0x4c389a),new _0x5e18c7('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x259fc5,commentId:_0x48dd58,content:_0x5c1e39,createdAt:_0x345940,attributes:_0x2922f2,isFromAdapter:_0x3128b0}){if(void 0x0!==_0x5c1e39&&('string'!=typeof _0x5c1e39||!_0x5c1e39['trim']()['length']))throw new _0x5e18c7('commentsrepository-update-comment-invalid-content');const _0xd92e10=this['getCommentThread'](_0x259fc5),_0x22a546=_0xd92e10['getComment'](_0x48dd58);if(!_0x22a546)throw new _0x5e18c7('commentsrepository-update-missing-comment',this);let _0x575df5=!0x1;if(_0x5c1e39&&_0x5c1e39!==_0x22a546['content']&&(_0x22a546['isEditable']||_0x3128b0)&&(_0x22a546['content']=_0x5c1e39,_0x575df5=!0x0),_0x345940&&_0x345940!==_0x22a546['createdAt']&&(_0x22a546['createdAt']=_0x345940,_0x22a546['attributes']&&_0x22a546['attributes']['@external']||(_0x22a546['authoredAt']=_0x345940),_0x575df5=!0x0),_0x2922f2&&!yt(_0x2922f2,_0x22a546['attributes'])&&(_0x22a546['attributes']=_0x2922f2,_0x575df5=!0x0),!_0x575df5)return Promise['resolve']();if(_0xd92e10['fire']('commentUpdated'),_0x3128b0||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5caada=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2cd9b0}=this['getCommentThread'](_0x22a546['threadId']),_0x54e5fa=_0x5caada['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2cd9b0,'threadId':_0x259fc5,'commentId':_0x48dd58,'content':_0x5c1e39,'attributes':_0x2922f2})['then'](()=>_0x5caada['remove'](_0x54e5fa))['catch'](_0x49f81e=>{throw console['error'](_0x49f81e),new _0x5e18c7('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x192fd7,commentId:_0x318f49,isFromAdapter:_0xde2fd4}){const _0x448bfa=this['getCommentThread'](_0x192fd7),_0x83e924=_0x448bfa['getComment'](_0x318f49);if(!_0x83e924)throw new _0x5e18c7('commentsrepository-remove-missing-comment',this);if(_0x448bfa['_remove'](_0x83e924),_0xde2fd4||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x24a39c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x33bc33}=_0x448bfa,_0x2e2a9a=_0x24a39c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x33bc33,'threadId':_0x192fd7,'commentId':_0x318f49})['then'](()=>_0x24a39c['remove'](_0x2e2a9a))['catch'](_0x546506=>{throw console['error'](_0x546506),new _0x5e18c7('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x1d5fae(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1fbe26,_0x20342f){super();const _0x5c44ac=_0x1fbe26['context']['plugins']['get'](st)['me'],_0x15c85f=_0x1fbe26['getCommentThread'](_0x20342f['threadId']),_0x5b7788=0x0===_0x15c85f['comments']['length'],_0x2f0f46=_0x5c44ac===_0x20342f['author'];this['id']=_0x20342f['id'],this['threadId']=_0x20342f['threadId'],this['author']=_0x20342f['author'],this['creator']=_0x20342f['creator'],this['isExternal']=Boolean(_0x20342f['attributes']&&_0x20342f['attributes']['@external']),this['set']('content',_0x20342f['content']),this['createdAt']=_0x20342f['createdAt']||new Date(),this['set']('authoredAt',_0x20342f['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x15c85f,'resolvedAt'),this['set']('attributes',_0x20342f['attributes']||{}),this['bind']('isEditable')['to'](_0x1fbe26,'_permissions',()=>{const _0x2ef8c7=_0x1fbe26['getPermissions'](_0x15c85f['channelId'])['write'],_0x582b3d=_0x1fbe26['getPermissions'](_0x15c85f['channelId'])['modifyAll'];return _0x2f0f46&&_0x2ef8c7||!_0x2f0f46&&_0x582b3d;}),this['bind']('isRemovable')['to'](_0x15c85f,'isRemovable',_0x1fbe26,'_permissions',_0x490e69=>{const _0x7270ef=_0x1fbe26['getPermissions'](_0x15c85f['channelId'])['write'],_0x809d6b=_0x1fbe26['getPermissions'](_0x15c85f['channelId'])['modifyAll'];return _0x2f0f46&&_0x7270ef||_0x490e69&&_0x5b7788||!_0x2f0f46&&_0x809d6b&&!_0x5b7788;}),this['bind']('isReadOnly')['to'](_0x15c85f,'isReadOnly'),this['_repository']=_0x1fbe26;}get['weight'](){return Math['max'](function(_0x2ffba4){const _0x42cf60=document['createElement']('div');return _0x42cf60['innerHTML']=_0x2ffba4,_0x42cf60['textContent']['length'];}(this['content']),0xc8);}['update'](_0x53a717){const {threadId:_0x589752,id:_0x1db4f5}=this;if(!this['_repository']['hasCommentThread'](_0x589752))throw new _0x5e18c7('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x45acc6}=this['_repository']['getCommentThread'](_0x589752);this['_repository']['fire'](xt('updateComment',_0x45acc6,_0x589752),{'channelId':_0x45acc6,'threadId':_0x589752,'commentId':_0x1db4f5,..._0x53a717});}['setAttribute'](_0x1584a8,_0x298c35){const _0x1973c5=At(this['attributes']);Ct(_0x1973c5,_0x1584a8,_0x298c35),this['update']({'attributes':_0x1973c5});}['removeAttribute'](_0x385f4e){const _0x525152=At(this['attributes']);vt(_0x525152,_0x385f4e),this['update']({'attributes':_0x525152});}['remove'](_0x467757={}){if(!_0x467757['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xcfc1c2,id:_0xeecaea}=this;if(!this['_repository']['hasCommentThread'](_0xcfc1c2))throw new _0x5e18c7('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xc1aa81}=this['_repository']['getCommentThread'](_0xcfc1c2);this['_repository']['fire'](xt('removeComment',_0xc1aa81,_0xcfc1c2),{'channelId':_0xc1aa81,'threadId':_0xcfc1c2,'commentId':_0xeecaea,..._0x467757});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0x227c0e,..._0x3a2d9b){for(const _0xa0b08f of _0x3a2d9b)void 0x0!==_0xa0b08f&&(_0x227c0e+=':'+String(_0xa0b08f));return _0x227c0e;}class rt extends _0x4d5e2f{constructor(_0x35808d){super(_0x35808d),this['set']('hasContent',!0x1);}['refresh'](){const _0x230799=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xcd32d0 of _0x230799['getRanges']())if(this['_hasContent'](_0xcd32d0))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3f1cef=_0x377f30(),ranges:_0x17bb99,comment:_0x1e228d}={}){const _0x3b5f2a=this['editor']['model'],_0x26a469=_0x17bb99??Array['from'](_0x3b5f2a['document']['selection']['getRanges']()),_0x3598e4=[];for(const _0x5830a9 of _0x26a469)this['_hasContent'](_0x5830a9)&&_0x3598e4['push'](this['_trimToContent'](_0x5830a9));if(!_0x3598e4['length'])throw new _0x5e18c7('addcommentthreadcommand-incorrect-ranges',null);_0x1e228d&&this['_createCommentThread'](_0x3f1cef,_0x1e228d),this['_createMarkersFromRanges'](_0x3f1cef,_0x3598e4,!!_0x1e228d);}['_createMarkersFromRanges'](_0x554fc5,_0x46449c,_0x2025b5){this['editor']['model']['change'](_0x2413ab=>{for(const _0x4acc02 of _0x46449c){const _0x454399=_0x377f30()['substr'](0x1,0x5),_0x5ce441='comment:'+_0x554fc5+':'+_0x454399;_0x2413ab['addMarker'](_0x5ce441,{'range':_0x4acc02,'usingOperation':_0x2025b5,'affectsData':_0x2025b5});}});}['_createCommentThread'](_0x149a9d,_0x1d77df){const _0x30976f=this['editor']['plugins']['get']('CommentsRepository'),_0x2087ff=this['editor']['config']['get']('collaboration.channelId'),_0x5f3489=this['editor']['plugins']['get']('Users')['me'];if(!_0x5f3489)throw new _0x5e18c7('addcommentthreadcommand-user-not-found',null);_0x30976f['addCommentThread']({'threadId':_0x149a9d,'channelId':_0x2087ff,'comments':[{'authorId':_0x5f3489['id'],'content':_0x1d77df,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x2fa458){for(const _0xac7d80 of _0x2fa458['getItems']())if(this['_itemIsContent'](_0xac7d80))return!0x0;return!0x1;}['_itemIsContent'](_0x388e2b){return _0x388e2b['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x388e2b)&&!_0x388e2b['is']('element','tableCell');}['_trimToContent'](_0xc19231){const _0x1c4ff9=_0x6e33a=>!this['_itemIsContent'](_0x6e33a['item']),_0x395ca1=_0xc19231['start']['getLastMatchingPosition'](_0x1c4ff9),_0x5560e0=_0xc19231['end']['getLastMatchingPosition'](_0x1c4ff9,{'direction':'backward'});return this['editor']['model']['createRange'](_0x395ca1,_0x5560e0);}}class b extends _0x37df86{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d81b3){super(_0x5d81b3),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2c7265=this['editor'],_0x446141=_0x2c7265['model']['document']['selection'],_0x1e2bc3=_0x25cfc6(()=>this['refreshSelectedViews'](),0xa);_0x446141['on']('change:range',(_0x5deb0a,_0x2553d1)=>{_0x2553d1['directChange']&&(_0x1e2bc3['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2c7265['editing']['view']['document'],'change:isFocused',(_0x5a3609,_0x5bb6cd,_0x221997)=>{_0x221997&&_0x1e2bc3();}),this['listenTo'](_0x2c7265['ui']['focusTracker'],'change:isFocused',(_0x370c72,_0x10a9aa,_0x240680)=>{_0x240680||this['fire']('blur',{'isAnnotationTracked':_0x2b3164=>this['_editorAnnotationsData']['has'](_0x2b3164['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x11085d){if(this['_editorAnnotations']['has'](_0x11085d['view']))return;this['_editorAnnotations']['add'](_0x11085d['view']),this['editor']['ui']['focusTracker']['add'](_0x11085d['view']['element']);const _0x12df47=this['editor']['plugins']['get'](y);this['listenTo'](_0x12df47['collection'],'remove',(_0x3028f7,_0x21f7ed)=>{this['editor']['ui']['focusTracker']['remove'](_0x21f7ed['view']['element']),this['_editorAnnotations']['delete'](_0x21f7ed['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x29d0c4){if('function'!=typeof _0x29d0c4)throw new _0x5e18c7('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x29d0c4);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xf6a5ab,annotations:_0x3b0f0b}){const _0x4d7294=[],_0x5723a1=this['editor']['model']['document']['selection'],_0x124941=Array['from'](_0x5723a1['getRanges']());for(const [_0x272c73,_0x1adff6]of this['_editorAnnotationsData']){const _0xb6ea7d=_0x4756e9(_0x1adff6),_0xe65da1=_0x3b0f0b['getByInnerView'](_0x272c73);_0xb6ea7d&&_0xe65da1&&_0x4d7294['push']({'annotation':_0xe65da1,'range':_0xb6ea7d});}function _0x4756e9(_0x93288e){for(const _0x44c1f6 of _0x93288e)for(const _0x258e81 of _0x124941)if(_0x44c1f6['containsRange'](_0x258e81,!_0x5723a1['isCollapsed']))return _0x44c1f6;return null;}return _0x4d7294['sort']((_0x57919a,_0xb1f1f4)=>{const _0xc7ea26=_0x57919a['range'],_0x53c68e=_0xb1f1f4['range'];if(!_0xc7ea26['isEqual'](_0x53c68e)){if(_0xc7ea26['containsRange'](_0x53c68e,!0x0))return 0x1;if(_0x53c68e['containsRange'](_0xc7ea26,!0x0))return-0x1;}return _0x57919a['annotation']==_0xf6a5ab?-0x1:_0xb1f1f4['annotation']==_0xf6a5ab?0x1:0x0;})['map'](_0x17663b=>_0x17663b['annotation']);}get['_editorAnnotationsData'](){const _0xc58038=new Map();for(const _0x5b966a of Array['from'](this['_dataCollectors']))for(const [_0x3728c4,_0x1ac1b4]of _0x5b966a())_0xc58038['set'](_0x3728c4,_0x1ac1b4);return _0xc58038;}}class ct extends _0x37df86{['afterInit'](){const _0x11a919=this['editor'];if(!_0x11a919['plugins']['has']('RestrictedEditingModeEditing'))return;_0x11a919['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x37df86{constructor(_0x396e68){super(_0x396e68),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x14a9ae=this['editor'],_0x587982=_0x14a9ae['commands']['get']('importWord'),_0x3b6cb8=_0x14a9ae['plugins']['get'](st);_0x587982&&(_0x587982['on']('execute',(_0x4215e4,[,_0x1c65dc])=>{_0x1c65dc['collaboration_features']={'comments':!0x0,'user_id':_0x3b6cb8['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x587982,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0xee7c49,_0x1d9cef){const {comment_threads:_0x41cae9}=_0x1d9cef;_0x41cae9&&_0x41cae9['forEach'](({thread_id:_0x41735a,comments:_0x6a2845,is_resolved:_0x13172f})=>{const _0x46eec8=new Date(),_0x26191f=_0x6a2845['map'](({author:_0x5ae5ed,content:_0xee4b08,created_at:_0x16cad3})=>({'content':_0xee4b08,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x46eec8,'attributes':{'@external':{'authorName':_0x5ae5ed,'createdAt':_0x16cad3?new Date(_0x16cad3):new Date(),'source':'importWord'}}})),_0x2af4ad=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x2af4ad,'threadId':_0x41735a,'comments':_0x26191f,'resolvedAt':_0x13172f?_0x46eec8:null});});}}class ut extends _0x37df86{constructor(_0x391798){super(_0x391798),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x3e0291=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x3e0291,'contentInsertion',(_0x45ee89,_0xb47273)=>this['_removeMarkersWithoutThreads'](_0xb47273['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x37263b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x37263b;const _0x65a43a=this['editor']['plugins']['get']('CommentsRepository');for(const _0x41a349 of _0x37263b['keys']()){const [_0x1c6272,_0x10418d]=_0x41a349['split'](':');'comment'!=_0x1c6272||_0x65a43a['hasCommentThread'](_0x10418d)||_0x37263b['delete'](_0x41a349);}return _0x37263b;}['_registerMarkerInClipboardPipeline'](){const _0xb92ed3=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4ad683=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4ad683&&_0xb92ed3['_registerMarkerToCopy']('comment',_0x4ad683);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xbb88b6){switch(_0xbb88b6){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function dt(_0x2c9c69){const _0x370298=_0x2c9c69['split'](':');return{'group':_0x370298[0x0],'id':_0x370298[0x1],'part':_0x370298[0x2]};}class ft extends _0x37df86{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2b625b,_0x1271d9)=>{if(!_0x1271d9['options']['showCommentHighlights'])return null;if(_0x1271d9['options']['ignoreResolvedComments']){const {id:_0x3558a9}=dt(_0x2b625b['markerName']),_0x5059be=this['editor']['plugins']['get'](o);if(_0x5059be['getCommentThread'](_0x3558a9)?.['isResolved']&&_0x2b625b['item'])return _0x1271d9['consumable']['consume'](_0x2b625b['item'],'addMarker:'+_0x2b625b['markerName']),_0x1271d9['consumable']['consume'](_0x2b625b['item'],'removeMarker:'+_0x2b625b['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1e96ac=>{_0x1e96ac['on']('addMarker:comment',(_0x443bb5,_0x452eb3,_0x587372)=>{if(!_0x587372['options']['showCommentHighlights'])return;const _0x348c9f=_0x452eb3['item'];if(!_0x348c9f)return;const _0x176577=_0x587372['mapper']['toViewElement'](_0x348c9f);this['editor']['model']['schema']['isObject'](_0x348c9f)&&_0x176577&&!_0x176577['getCustomProperty']('widget')&&_0x176577['is']('containerElement')&&_0x49d684(_0x176577,_0x587372['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1c3a0f,{writer:_0x59831d,options:_0x5a8cd9})=>{if(!_0x5a8cd9['showCommentHighlights'])return null;const _0x3d3c2b=_0x59831d['createContainerElement']('div'),_0x3b4e2c=_0x59831d['createEmptyElement']('hr');return _0x59831d['addClass']('ck-horizontal-line',_0x3d3c2b),_0x59831d['insert'](_0x59831d['createPositionAt'](_0x3d3c2b,0x0),_0x3b4e2c),_0x3d3c2b;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4cfe1d,{writer:_0x1c1ba4,options:_0x4e7c0f})=>{if(!_0x4e7c0f['showCommentHighlights'])return null;const _0x229439=_0x1c1ba4['createContainerElement']('span'),_0x3fb651=_0x1c1ba4['createEmptyElement']('img');return _0x1c1ba4['addClass']('image-inline',_0x229439),_0x1c1ba4['insert'](_0x1c1ba4['createPositionAt'](_0x229439,0x0),_0x3fb651),_0x229439;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x4a201b,{writer:_0x2d6c2c,options:_0x4a8fc2})=>{if(_0x4a8fc2['showCommentHighlights'])return _0x2d6c2c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2e8984,_0x5ae240,_0x46af44)=>{_0x46af44['options']['showCommentHighlights']&&_0x2e8984['stop']();},{'priority':'high'});}}class r extends _0x37df86{static get['requires'](){return[o,b,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x16c261){super(_0x16c261),this['set']('isThreadsLoadingPaused',!0x0),_0x16c261['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1ae196,_0x34ae1c,_0x5b525c,_0x454479)=>{const _0x8e58ca=_0x16c261['plugins']['get'](o),_0x4d0a45=_0x5b525c?dt(_0x5b525c)['id']:null;_0x16c261['model']['change'](()=>{if(_0x4d0a45){const _0x1acc00=this['getAllMarkersForId'](_0x4d0a45);for(const _0x17beac of _0x1acc00)_0x16c261['editing']['reconvertMarker'](_0x17beac);}if(_0x454479){const {id:_0x3670aa}=dt(_0x454479),_0x58b568=_0x8e58ca['getCommentThread'](_0x3670aa);if(_0x58b568&&_0x58b568['unlinkedAt'])return;if(_0x58b568&&!_0x58b568['isAttached'])return;const _0x372848=this['getAllMarkersForId'](_0x3670aa);for(const _0x361430 of _0x372848)_0x16c261['editing']['reconvertMarker'](_0x361430);}}),_0x4d0a45&&this['scrollToThreadMarker'](_0x4d0a45);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x55300c=this['editor'],_0x448242=_0x55300c['plugins']['get'](o),_0x4fc983=_0x55300c['config']['get']('collaboration.channelId'),_0xa32206=_0x448242['getCommentThreads']()['filter'](_0x36729d=>_0x36729d['channelId']!==_0x4fc983);_0x55300c['commands']['add']('addCommentThread',new rt(_0x55300c)),this['listenTo'](_0x55300c,'change:isReadOnly',(_0x3130ac,_0x27e9c3,_0x42d246)=>{_0x448242['switchReadOnly'](_0x42d246,_0x55300c['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x448242,ht('addCommentThread',_0x4fc983),(_0xd2f983,{threadId:_0x13c079})=>{const _0x2002b2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x13c079);_0x2002b2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x13c079);}),this['listenTo'](_0x448242,ht('removeCommentThread',_0x4fc983),(_0x14767b,{threadId:_0x39a074})=>{_0x55300c['model']['enqueueChange']({'isUndoable':!0x1},_0x46803d=>{const _0x1ba2c8=this['getAllMarkersForId'](_0x39a074);for(const _0x5a9506 of _0x1ba2c8)_0x46803d['removeMarker'](_0x5a9506);});}),this['listenTo'](_0x448242,ht('resolveCommentThread',_0x4fc983),(_0x22aad1,{threadId:_0x188eda})=>{(this['_reconvertMarkers'](_0x188eda),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x188eda)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x448242,ht('reopenCommentThread',_0x4fc983),(_0x3a81cc,{threadId:_0x149aaa})=>{this['_reconvertMarkers'](_0x149aaa);},{'priority':'low'}),this['listenTo'](_0x448242,ht('addComment',_0x4fc983),(_0x518ae5,{threadId:_0x237de4,isFromAdapter:_0xaf1d95})=>{const _0x225de0=this['getAllMarkersForId'](_0x237de4);if(_0xaf1d95||0x0==_0x225de0['length']||!_0x448242['hasCommentThread'](_0x237de4))return;0x1===_0x448242['getCommentThread'](_0x237de4)['length']&&_0x55300c['model']['enqueueChange']({'isUndoable':!0x1},_0x9a8f66=>{for(const _0x44c533 of _0x225de0)_0x9a8f66['updateMarker'](_0x44c533,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xa32206);}['afterInit'](){!async function(_0x357922){const _0x4da25a=_0x1d7f95([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x5dd0b6=0x73460ab3,_0x55b7db=0x73419f73^_0x5dd0b6,_0x590dca=window[_0x1d7f95([0x44,0x61,0x74,0x65])][_0x1d7f95([0x6e,0x6f,0x77])](),_0xc113d0=_0x357922[_0x1d7f95([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x8fd4f1=new window[(_0x1d7f95([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x590fe1=>{_0xc113d0[_0x1d7f95([0x6f,0x6e,0x63,0x65])](_0x1d7f95([0x72,0x65,0x61,0x64,0x79]),_0x590fe1);}),_0x43952d={[_0x1d7f95([0x6b,0x74,0x79])]:_0x1d7f95([0x45,0x43]),[_0x1d7f95([0x75,0x73,0x65])]:_0x1d7f95([0x73,0x69,0x67]),[_0x1d7f95([0x63,0x72,0x76])]:_0x1d7f95([0x50,0x2d,0x32,0x35,0x36]),[_0x1d7f95([0x78])]:_0x1d7f95([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]),[_0x1d7f95([0x79])]:_0x1d7f95([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]),[_0x1d7f95([0x61,0x6c,0x67])]:_0x1d7f95([0x45,0x53,0x32,0x35,0x36])},_0x62723d=_0xc113d0[_0x1d7f95([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1d7f95([0x67,0x65,0x74])](_0x1d7f95([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1c724d(){let _0x3ccf23,_0x324bc2=null,_0x4ed389=null;try{if(_0x62723d==_0x1d7f95([0x47,0x50,0x4c]))return _0x1d7f95([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3ccf23=_0x48bc22(),!_0x3ccf23)return _0x1d7f95([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3ccf23[_0x1d7f95([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4ed389=_0x4336cc(_0x3ccf23[_0x1d7f95([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3ccf23[_0x1d7f95([0x6a,0x74,0x69])])),await _0x2b7c5f()?_0x1a425d()?_0x41d4d6()?_0x1d7f95([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x20ff0f()?(_0x3ccf23[_0x1d7f95([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1d7f95([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x324bc2=_0x48ad00(_0x1d7f95([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5a230d()):_0x1d7f95([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1d7f95([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1d7f95([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1d7f95([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x41d4d6(){const _0x37e97f=[_0x1d7f95([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1d7f95([0x74,0x72,0x69,0x61,0x6c])][_0x1d7f95([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3ccf23[_0x1d7f95([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x590dca/0x3e8:0xe10*_0x55b7db;return _0x3ccf23[_0x1d7f95([0x65,0x78,0x70])]<_0x37e97f;}function _0x1a425d(){const _0x28d41c=_0x3ccf23[_0x1d7f95([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x28d41c)return!0x1;if(_0x28d41c[_0x1d7f95([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d7f95([0x2a])))return!0x0;if(_0x28d41c[_0x1d7f95([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d7f95([0x43,0x4d,0x54])))return!0x0;if(_0x28d41c[_0x1d7f95([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d7f95([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4d4a1b())return!0x0;if(_0x28d41c[_0x1d7f95([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d7f95([0x52,0x43,0x4d,0x54]))){if(_0x5e74a8())return!0x0;if(_0x479cd4()||_0x181da1())return!0x0;}return!0x1;}function _0x20ff0f(){const _0x2d5887=_0x3ccf23[_0x1d7f95([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2d5887||0x0==_0x2d5887[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x277292}=new URL(window[_0x1d7f95([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2d5887[_0x1d7f95([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x277292))return!0x0;const _0x2f2b85=_0x277292[_0x1d7f95([0x73,0x70,0x6c,0x69,0x74])](_0x1d7f95([0x2e]));return _0x2d5887[_0x1d7f95([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4b9502=>_0x4b9502[_0x1d7f95([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d7f95([0x2a])))[_0x1d7f95([0x6d,0x61,0x70])](_0x11615a=>_0x11615a[_0x1d7f95([0x73,0x70,0x6c,0x69,0x74])](_0x1d7f95([0x2e])))[_0x1d7f95([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x33b445=>_0x33b445[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2f2b85[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1d7f95([0x6d,0x61,0x70])](_0x433613=>Array(_0x2f2b85[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x433613[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1d7f95([0x66,0x69,0x6c,0x6c])](_0x433613[0x0]===_0x1d7f95([0x2a])?_0x1d7f95([0x2a]):'')[_0x1d7f95([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x433613))[_0x1d7f95([0x73,0x6f,0x6d,0x65])](_0x1d2140=>_0x2f2b85[_0x1d7f95([0x65,0x76,0x65,0x72,0x79])]((_0xb67c36,_0x117335)=>_0x1d2140[_0x117335]===_0xb67c36||_0x1d2140[_0x117335]===_0x1d7f95([0x2a])));}function _0x5a230d(){return _0x324bc2&&_0x4ed389?new window[(_0x1d7f95([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x13f7f0,_0x30b4d6)=>{_0x324bc2[_0x1d7f95([0x74,0x68,0x65,0x6e])](_0x13f7f0,_0x30b4d6),_0x4ed389[_0x1d7f95([0x74,0x68,0x65,0x6e])](_0x4f1342=>{_0x4f1342!=_0x1d7f95([0x56,0x61,0x6c,0x69,0x64])&&_0x13f7f0(_0x4f1342);},_0x30b4d6);}):_0x324bc2||_0x4ed389||_0x1d7f95([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4336cc(_0x1df810,_0x4d5f2e){return new window[(_0x1d7f95([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22ec4e=>{if(_0x2a5cb5())return _0x22ec4e(_0x1d7f95([0x56,0x61,0x6c,0x69,0x64]));_0x46f85f(),_0xc113d0[_0x1d7f95([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1d7f95([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3575ea=!0x1;const _0x447a76=_0x377f30();function _0x47a20c(_0x4477ca){return!!_0x4477ca&&(typeof _0x4477ca===_0x1d7f95([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4477ca===_0x1d7f95([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4477ca[_0x1d7f95([0x74,0x68,0x65,0x6e])]===_0x1d7f95([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4477ca[_0x1d7f95([0x63,0x61,0x74,0x63,0x68])]===_0x1d7f95([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x347af2(_0x5c41d2){_0x48fb68(_0x5c41d2)[_0x1d7f95([0x74,0x68,0x65,0x6e])](_0x3ed8d4=>{if(!_0x3ed8d4||_0x3ed8d4[_0x1d7f95([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1d7f95([0x6f,0x6b]))return _0x1d7f95([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x112aaa(_0x122e53(_0x447a76+_0x4d5f2e))!=_0x3ed8d4[_0x1d7f95([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1d7f95([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1d7f95([0x56,0x61,0x6c,0x69,0x64]);})[_0x1d7f95([0x74,0x68,0x65,0x6e])](_0x3643f6=>(_0x3de94e(),_0x3643f6),()=>{const _0x3f1af3=_0x34c057();return null==_0x3f1af3?(_0x3de94e(),_0x1d7f95([0x56,0x61,0x6c,0x69,0x64])):_0x1d7f95(_0x590dca-_0x3f1af3>(0x574a8eb3^_0x5dd0b6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1d7f95([0x74,0x68,0x65,0x6e])](_0x22ec4e)[_0x1d7f95([0x63,0x61,0x74,0x63,0x68])](()=>{_0x22ec4e(_0x1d7f95([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4406a7=0x7370e433^_0x5dd0b6;function _0x3de94e(){const _0x2c58a9=_0x1d7f95([0x6c,0x6c,0x63,0x74,0x2d])+_0x112aaa(_0x122e53(_0x1df810)),_0x518ce9=_0x1a91fb(_0x112aaa(window[_0x1d7f95([0x4d,0x61,0x74,0x68])][_0x1d7f95([0x63,0x65,0x69,0x6c])](_0x590dca/_0x4406a7)));window[_0x1d7f95([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1d7f95([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c58a9,_0x518ce9);}function _0x34c057(){const _0x173b89=_0x1d7f95([0x6c,0x6c,0x63,0x74,0x2d])+_0x112aaa(_0x122e53(_0x1df810)),_0x27a5bd=window[_0x1d7f95([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1d7f95([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x173b89);return _0x27a5bd?window[_0x1d7f95([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1a91fb(_0x27a5bd),0x10)*_0x4406a7:null;}function _0x48fb68(_0x505452){return new window[(_0x1d7f95([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1251fd,_0x1a3a33)=>{_0x505452[_0x1d7f95([0x74,0x68,0x65,0x6e])](_0x1251fd,_0x1a3a33),window[_0x1d7f95([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1a3a33,0x7347de73^_0x5dd0b6);});}}_0xc113d0[_0x1d7f95([0x6f,0x6e])](_0x1d7f95([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xa361fa,_0x456b45)=>{if(_0x456b45[0x0]!=_0x1df810)return _0x22ec4e(_0x1d7f95([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x456b45[0x1]={..._0x456b45[0x1],[_0x1d7f95([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x447a76};},{[_0x1d7f95([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1d7f95([0x68,0x69,0x67,0x68])}),_0xc113d0[_0x1d7f95([0x6f,0x6e])](_0x1d7f95([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x32d374=>{_0x47a20c(_0x32d374[_0x1d7f95([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3575ea=!0x0,_0x347af2(_0x32d374[_0x1d7f95([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1d7f95([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1d7f95([0x6c,0x6f,0x77])}),_0x8fd4f1[_0x1d7f95([0x74,0x68,0x65,0x6e])](()=>{_0x3575ea||_0x22ec4e(_0x1d7f95([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2a5cb5(){return _0xc113d0[_0x1d7f95([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1d7f95([0x76,0x69,0x65,0x77])][_0x1d7f95([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1d7f95([0x61,0x75,0x74,0x6f]);}function _0x46f85f(){_0xc113d0[_0x1d7f95([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1d7f95([0x76,0x69,0x65,0x77])][_0x1d7f95([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1d7f95([0x61,0x75,0x74,0x6f]);}}function _0x48ad00(_0x52ecd4){const _0x521cf2=[new window[(_0x1d7f95([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d7865=>setTimeout(_0x4d7865,0x734f347f^_0x5dd0b6)),_0x8fd4f1[_0x1d7f95([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1d7f95([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x500bfa=>{let _0x1a14a0=0x0;_0xc113d0[_0x1d7f95([0x6d,0x6f,0x64,0x65,0x6c])][_0x1d7f95([0x6f,0x6e])](_0x1d7f95([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x12c141,_0x5aba1c)=>{_0x5aba1c[0x0][_0x1d7f95([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1a14a0++,_0x1a14a0==(0x73460f5b^_0x5dd0b6)&&(_0x500bfa(),_0x12c141[_0x1d7f95([0x6f,0x66,0x66])]());});}))];return window[_0x1d7f95([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1d7f95([0x72,0x61,0x63,0x65])](_0x521cf2)[_0x1d7f95([0x74,0x68,0x65,0x6e])](()=>_0x52ecd4);}async function _0x36c7f3(){await _0x8fd4f1,_0xc113d0[_0x1d7f95([0x6d,0x6f,0x64,0x65,0x6c])][_0x1d7f95([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x332286,_0xc113d0[_0x1d7f95([0x6d,0x6f,0x64,0x65,0x6c])][_0x1d7f95([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x332286,_0xc113d0[_0x1d7f95([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1d7f95([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4d4a1b(){return window[_0x1d7f95([0x67,0x6c,0x6f,0x62])]&&window[_0x1d7f95([0x67,0x6c,0x6f,0x62])][_0x1d7f95([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x5e74a8(){return _0x4fd14c(_0x1d7f95([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3c37cb(_0x1d7f95([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x1d7f95([0x73,0x74,0x61,0x74,0x65])]==_0x1d7f95([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x479cd4(){return _0x4fd14c(_0x1d7f95([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 _0x181da1(){return _0x4fd14c(_0x1d7f95([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5ca8c4(_0x49d781){const _0x1119a6=_0x1960c7();_0xc113d0[_0x1119a6]=_0x1d7f95([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x49d781,_0x49d781!=_0x1d7f95([0x56,0x61,0x6c,0x69,0x64])&&_0x36c7f3();}function _0x1960c7(){const _0x304d27=window[_0x1d7f95([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1d7f95([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1d7f95([0x6e,0x6f,0x77])]())[_0x1d7f95([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1d7f95([0x2e]),'');let _0x40dd44=_0x1d7f95([0x4b]);for(let _0x431616=0x0;_0x431616<_0x304d27[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x431616+=0x2){let _0x1d4dbc=window[_0x1d7f95([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x304d27[_0x1d7f95([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x431616,_0x431616+0x2));_0x1d4dbc>=_0x4da25a[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1d4dbc-=_0x4da25a[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x40dd44+=_0x4da25a[_0x1d4dbc];}return _0x40dd44;}function _0x48bc22(){const _0x11d094=_0x62723d[_0x1d7f95([0x73,0x70,0x6c,0x69,0x74])](_0x1d7f95([0x2e]));if(0x3!=_0x11d094[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x62b008(_0x11d094[0x1]);function _0x62b008(_0x415300){const _0x47bf6b=_0x4d994d(_0x415300);return _0x47bf6b&&_0x364307()?_0x47bf6b:null;function _0x364307(){const _0x2fcbff=_0x47bf6b[_0x1d7f95([0x6a,0x74,0x69])],_0x5f2123=window[_0x1d7f95([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2fcbff[_0x1d7f95([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2fcbff[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x18826c={..._0x47bf6b,[_0x1d7f95([0x6a,0x74,0x69])]:_0x2fcbff[_0x1d7f95([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2fcbff[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x18826c[_0x1d7f95([0x76,0x63])],_0x122e53(_0x18826c)==_0x5f2123;}}}async function _0x2b7c5f(){let _0xb632cc=!0x0;try{const _0xf8fc9a=_0x62723d[_0x1d7f95([0x73,0x70,0x6c,0x69,0x74])](_0x1d7f95([0x2e])),[_0x458766,_0x13dc61,_0x5ac028]=_0xf8fc9a;return _0x3e27e8(_0x458766),await _0x126d67(_0x458766,_0x13dc61,_0x5ac028),_0xb632cc;}catch{return!0x1;}function _0x3e27e8(_0xc4b3b1){const _0xf0ea01=_0x4d994d(_0xc4b3b1);_0xf0ea01&&_0xf0ea01[_0x1d7f95([0x61,0x6c,0x67])]==_0x1d7f95([0x45,0x53,0x32,0x35,0x36])||(_0xb632cc=!0x1);}async function _0x126d67(_0x1aa5d5,_0x138c90,_0x420340){const _0x37d066=window[_0x1d7f95([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1d7f95([0x66,0x72,0x6f,0x6d])](_0xb4c468(_0x420340),_0x11cbd8=>_0x11cbd8[_0x1d7f95([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x150162=new window[(_0x1d7f95([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1d7f95([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1aa5d5+_0x1d7f95([0x2e])+_0x138c90),_0x2bf9d4=window[_0x1d7f95([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1d7f95([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2bf9d4)return;const _0x3eddfe=await _0x2bf9d4[_0x1d7f95([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1d7f95([0x6a,0x77,0x6b]),_0x43952d,{[_0x1d7f95([0x6e,0x61,0x6d,0x65])]:_0x1d7f95([0x45,0x43,0x44,0x53,0x41]),[_0x1d7f95([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1d7f95([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1d7f95([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2bf9d4[_0x1d7f95([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1d7f95([0x6e,0x61,0x6d,0x65])]:_0x1d7f95([0x45,0x43,0x44,0x53,0x41]),[_0x1d7f95([0x68,0x61,0x73,0x68])]:{[_0x1d7f95([0x6e,0x61,0x6d,0x65])]:_0x1d7f95([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3eddfe,_0x37d066,_0x150162)||(_0xb632cc=!0x1);}}function _0x4d994d(_0x38c992){return _0x38c992[_0x1d7f95([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1d7f95([0x65,0x79]))?JSON[_0x1d7f95([0x70,0x61,0x72,0x73,0x65])](_0xb4c468(_0x38c992)):null;}function _0xb4c468(_0x311a90){return window[_0x1d7f95([0x61,0x74,0x6f,0x62])](_0x311a90[_0x1d7f95([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1d7f95([0x2b]))[_0x1d7f95([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1d7f95([0x2f])));}function _0x122e53(_0xb0640f){let _0x49aac3=0x1505;function _0x3972d1(_0x1f1dc1){for(let _0x319469=0x0;_0x319469<_0x1f1dc1[_0x1d7f95([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x319469++){const _0x3fe7cf=_0x1f1dc1[_0x1d7f95([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x319469);_0x49aac3=(_0x49aac3<<0x5)+_0x49aac3+_0x3fe7cf,_0x49aac3&=_0x49aac3;}}function _0x12deaa(_0x3f946a){Array[_0x1d7f95([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3f946a)?_0x3f946a[_0x1d7f95([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x12deaa):_0x3f946a&&typeof _0x3f946a==_0x1d7f95([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1d7f95([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3f946a)[_0x1d7f95([0x73,0x6f,0x72,0x74])]()[_0x1d7f95([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3b33df,_0x2e37e1])=>{_0x3972d1(_0x3b33df),_0x12deaa(_0x2e37e1);}):_0x3972d1(window[_0x1d7f95([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3f946a));}return _0x12deaa(_0xb0640f),_0x49aac3>>>0x0;}function _0x112aaa(_0x3a9d70){return _0x3a9d70[_0x1d7f95([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1d7f95([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1d7f95([0x30]));}function _0x1a91fb(_0xb463f8){return _0xb463f8[_0x1d7f95([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1d7f95([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1d7f95([0x6a,0x6f,0x69,0x6e])]('');}function _0x4fd14c(_0x53e72b){return _0xc113d0[_0x1d7f95([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1d7f95([0x68,0x61,0x73])](_0x53e72b);}function _0x3c37cb(_0x4879eb){return _0xc113d0[_0x1d7f95([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1d7f95([0x67,0x65,0x74])](_0x4879eb);}function _0x332286(){}function _0x1d7f95(_0xcd8183){return _0xcd8183['map'](_0x271879=>String['fromCharCode'](_0x271879))['join']('');}_0x5ca8c4(await _0x1c724d());}(this);}['destroy'](){const _0x7af203=this['editor']['plugins']['get'](o),_0x4fcc90=this['editor']['config']['get']('collaboration.channelId');for(const _0x382f74 of _0x7af203['getCommentThreads']({'channelId':_0x4fcc90}))_0x7af203['_detachCommentThread'](_0x382f74['id']),_0x7af203['_threads']['delete'](_0x382f74['id']);super['destroy']();}['hasMarkerForId'](_0x5dc76c){return this['getAllMarkersForId'](_0x5dc76c)['length']>0x0;}['getAllMarkersForId'](_0x4af4f9){const _0x470c7a=[];for(const _0x216b96 of this['editor']['model']['markers'])_0x216b96['name']['startsWith']('comment:'+_0x4af4f9)&&_0x470c7a['push'](_0x216b96);return _0x470c7a;}['scrollToThreadMarker'](_0xff2054){setTimeout(()=>{const _0x43d7e2=this['_getTargetForId'](_0xff2054);if(!_0x43d7e2)return;this['activeMarker']&&dt(this['activeMarker'])['id']===_0xff2054&&ot({'target':_0x43d7e2[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x14d0c9){this['editor']['model']['change'](()=>{for(const _0xeb058a of this['getAllMarkersForId'](_0x14d0c9))this['editor']['editing']['reconvertMarker'](_0xeb058a);});}['_attachArchivedThread'](_0xf04172){const _0x14ee66=this['editor']['plugins']['get'](o),_0x4f6912=this['editor']['plugins']['get'](b),_0x1f1255=_0x14ee66['getCommentThread'](_0xf04172);if(!_0x1f1255['isAttached']){const _0x142718=_0x1f1255['attachTo'](()=>this['_getTargetForId'](_0x1f1255['id']));_0x4f6912['registerAnnotation'](_0x142718),_0x1f1255['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x209f72=this['editor'],_0x43b16e=_0x209f72['plugins']['get'](st);_0x209f72['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x2d1c49,_0x190d4d)=>{const {id:_0x567d9c}=dt(_0x2d1c49['markerName']),_0x55a6aa=_0x209f72['plugins']['get'](o)['getCommentThread'](_0x567d9c),_0x314f16=this['activeMarker']&&dt(this['activeMarker'])['id']===_0x567d9c;let _0x5b9dca;if(_0x55a6aa&&_0x55a6aa['isResolved']&&!_0x314f16&&_0x2d1c49['item'])return _0x190d4d['consumable']['consume'](_0x2d1c49['item'],'addMarker:'+_0x2d1c49['markerName']),_0x190d4d['consumable']['consume'](_0x2d1c49['item'],'removeMarker:'+_0x2d1c49['markerName']),null;const _0x48672d=['ck-comment-marker'];return _0x314f16&&_0x48672d['push']('ck-comment-marker--active'),_0x5b9dca=_0x55a6aa?.['length']?_0x55a6aa['comments']['first']['author']['id']:_0x43b16e['me']['id'],{'classes':_0x48672d,'attributes':{'data-comment':_0x567d9c,'data-author-id':_0x5b9dca}};}}),_0x209f72['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x29b5ba,{options:_0x4b6345})=>{if(_0x4b6345['showCommentHighlights'])return null;const _0x1df77f=_0x209f72['plugins']['get'](o),_0x3d3613=_0x209f72['model']['markers']['get'](_0x29b5ba),{id:_0x25ed48,part:_0x11351d}=dt(_0x29b5ba);return _0x3d3613&&!_0x3d3613['affectsData']||_0x4b6345['ignoreResolvedComments']&&_0x1df77f['getCommentThread'](_0x25ed48)?.['isResolved']?null:{'group':'comment','name':_0x11351d?_0x25ed48+':'+_0x11351d:_0x25ed48};}}),_0x209f72['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x422d01,{writer:_0x393c55})=>_0x393c55['createElement']('$marker',{'data-name':'comment:'+_0x422d01['getAttribute']('id')})}),_0x209f72['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x33edc8=this['editor'],_0x5894fa=_0x33edc8['plugins']['get'](o),_0x475e9c=new Set(),_0x3a9c36=new Set();_0x33edc8['model']['document']['registerPostFixer'](_0x4a8998=>{let _0x22d87e=!0x1;for(const {name:_0x119f5e,data:_0x3a6a8a}of _0x33edc8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x214954,id:_0x148236}=dt(_0x119f5e);let _0x5683bc=_0x3a6a8a['newRange'];if('comment'!==_0x214954||!_0x5683bc)continue;const _0x4349be='$graveyard'===_0x5683bc['root']['rootName'];_0x4349be||(_0x5683bc=mt(_0x5683bc,_0x33edc8['model']),!_0x5683bc||_0x5683bc['isCollapsed']||!_0x3a6a8a['newRange']||_0x5683bc['isEqual'](_0x3a6a8a['newRange']))?_0x33edc8['model']['hasContent'](_0x5683bc)&&!_0x4349be?this['isThreadsLoadingPaused']?_0x475e9c['add'](_0x119f5e):this['_handleThreadMarker'](_0x119f5e,_0x148236):(_0x3a9c36['add'](_0x119f5e),_0x475e9c['delete'](_0x119f5e),_0x4a8998['removeMarker'](_0x119f5e),_0x22d87e=!0x0):(_0x4a8998['updateMarker'](_0x119f5e,{'range':_0x5683bc}),_0x22d87e=!0x0);}return _0x22d87e;}),this['on']('change:isThreadsLoadingPaused',(_0x1ace63,_0x572616,_0x3c90ae)=>{if(!_0x3c90ae&&_0x475e9c['size'])for(const _0x1a6de6 of _0x475e9c){const {id:_0x541c96}=dt(_0x1a6de6);_0x475e9c['delete'](_0x1a6de6),_0x33edc8['model']['markers']['get'](_0x1a6de6)&&this['_handleThreadMarker'](_0x1a6de6,_0x541c96);}}),this['listenTo'](_0x33edc8['model']['document'],'change',()=>{for(const {name:_0x34f8d9,data:{newRange:_0x573629}}of _0x33edc8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4206a2,id:_0x2944e3}=dt(_0x34f8d9);if('comment'!==_0x4206a2)continue;const _0x437d78=_0x5894fa['getCommentThread'](_0x2944e3),_0x973ac3=this['hasMarkerForId'](_0x2944e3);_0x437d78&&(!_0x437d78['_hasTargetInContent']&&_0x573629&&_0x33edc8['editing']['view']['once']('render',()=>{const _0x4bba5a=_0x33edc8['plugins']['get'](y),_0x34d2e1=_0x5894fa['_threadToController']['get'](_0x437d78)['view'];_0x4bba5a['getByInnerView'](_0x34d2e1)['refreshVisibility']();},{'priority':'low'}),_0x437d78['_hasTargetInContent']=_0x973ac3||!!_0x573629),_0x573629||(_0x3a9c36['add'](_0x34f8d9),_0x475e9c['delete'](_0x34f8d9));}for(const _0x5cceaf of _0x3a9c36){const {id:_0x260d51}=dt(_0x5cceaf),_0x5a1697=_0x5894fa['getCommentThread'](_0x260d51);if(_0x475e9c['delete'](_0x5cceaf),!_0x5a1697)continue;const _0x180e47=this['hasMarkerForId'](_0x260d51);_0x180e47||_0x5a1697['isSubmitted']?_0x180e47||_0x5a1697['unlinkedAt']||_0x5a1697['setUnlinkedAt'](new Date()):_0x5a1697['remove']();}_0x3a9c36['clear']();});}['_handleInitialThreads'](_0x201214){_0x201214['forEach'](_0x2c61a4=>{_0x2c61a4['unlinkedAt']&&this['_attachArchivedThread'](_0x2c61a4['id']);});}['_getTargetForId'](_0x3ac364){const _0x5cd827=this['editor'],_0x4cd180=this['getAllMarkersForId'](_0x3ac364);return it(_0x5cd827['editing'],_0x4cd180);}['_getTextContext'](_0x876864){const _0x4b8054=this['getAllMarkersForId'](_0x876864);let _0x22512c='',_0x2d6354=!0x1;for(const _0x13a45d of _0x4b8054){const _0x3396ec=_0x13a45d['getRange']();for(const _0x2564b7 of Array['from'](_0x3396ec['getItems']()))_0x2564b7['is']('$textProxy')?(_0x22512c&&_0x2d6354&&(_0x22512c+='\x20',_0x2d6354=!0x1),_0x22512c+=_0x2564b7['data']):_0x2d6354=!0x0;_0x2d6354=!0x0;}return _0x22512c['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x16e134,_0x408f8e){const _0x34cfe2=this['editor'],_0x365702=_0x34cfe2['plugins']['get'](o);let _0x5d0a71=_0x365702['getCommentThread'](_0x408f8e);const _0x2eb33f=_0x34cfe2['config']['get']('collaboration.channelId'),_0x3302de=_0x34cfe2['plugins']['get'](b);if(_0x5d0a71&&(_0x5d0a71['unlinkedAt']&&_0x5d0a71['setUnlinkedAt'](null),_0x5d0a71['isAttached']))return _0x5d0a71;return!this['getAllMarkersForId'](_0x408f8e)[0x0]['managedUsingOperations']?_0x34cfe2['editing']['view']['once']('render',()=>{if(_0x365702['getCommentThread'](_0x408f8e))return;const _0x92de02=_0x34cfe2['plugins']['get'](y);_0x5d0a71=_0x365702['openNewCommentThread']({'channelId':_0x2eb33f,'threadId':_0x408f8e,'target':()=>this['_getTargetForId'](_0x408f8e),'context':{'type':'text','value':this['_getTextContext'](_0x408f8e)}});const _0x3a71af=_0x365702['_threadToController']['get'](_0x5d0a71)['view'],_0x13d76b=_0x92de02['getByInnerView'](_0x3a71af);_0x13d76b&&_0x3302de['registerAnnotation'](_0x13d76b);},{'priority':'low'}):_0x365702['fetchCommentThread']({'channelId':_0x2eb33f,'threadId':_0x408f8e})['then'](_0x548371=>{if('destroyed'!==_0x34cfe2['state']){if(_0x5d0a71=_0x548371,_0x5d0a71&&!_0x5d0a71['isAttached']){const _0x2683ea=_0x5d0a71['attachTo'](()=>this['_getTargetForId'](_0x408f8e));_0x3302de['registerAnnotation'](_0x2683ea),_0x5d0a71['isResolved']&&this['_reconvertMarkers'](_0x408f8e);}else{if(!_0x5d0a71){const _0x34b32c=this['getAllMarkersForId'](_0x408f8e);_0x34cfe2['model']['change'](_0x13521a=>{for(const _0x489ad2 of _0x34b32c)_0x13521a['removeMarker'](_0x489ad2);});}}}}),_0x5d0a71;}['_handleThreadMarker'](_0xf2a8e0,_0x1d2c5e){const _0xd06907=this['_attachMarkerToThread'](_0xf2a8e0,_0x1d2c5e);_0xd06907&&!_0xd06907['context']&&_0xd06907['setContext']({'type':'text','value':this['_getTextContext'](_0x1d2c5e)});}['_initAriaMarkerChangeAnnouncements'](){const _0x27dfa4=this['editor'];et(_0x27dfa4['model'],({left:_0x20957d,entered:_0x47a629})=>{for(const _0x8e8d94 of _0x20957d)if(lt(_0x8e8d94)){_0x27dfa4['ui']['ariaLiveAnnouncer']['announce'](N(_0x27dfa4['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1f997e of _0x47a629)if(lt(_0x1f997e)){_0x27dfa4['ui']['ariaLiveAnnouncer']['announce'](N(_0x27dfa4['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x27da22)));break;}});}}function ht(_0x5a52cf,_0x412be5){return _0x412be5?_0x5a52cf+':'+_0x412be5:_0x5a52cf;}function mt(_0x35af8b,_0x2bc230){const _0x1abdcc=_0x2bc230['schema'],_0x63beda=_0x2bc230['createRange'](_0x35af8b['start']);for(const _0x5a1cd2 of _0x35af8b['getWalker']()){const {type:_0x372b44,item:_0x32f959,nextPosition:_0xb3821d}=_0x5a1cd2;if('text'===_0x372b44||_0x1abdcc['isObject'](_0x32f959)){const _0x346c07=_0x2bc230['createPositionBefore'](_0x32f959);_0x63beda['isCollapsed']&&(_0x63beda['start']=_0x346c07),_0x63beda['end']=_0xb3821d;}}return _0x63beda;}function lt(_0x477717){return'comment'===dt(_0x477717['name'])['group'];}class s extends _0x37df86{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x27f93f=this['editor'],_0x316307=_0x27f93f['plugins']['get'](o),_0x14fb5a=_0x27f93f['plugins']['get'](r),_0x13570f=_0x27f93f['plugins']['get'](y),_0x1869a9=_0x27f93f['plugins']['get'](b);_0x27f93f['ui']['componentFactory']['add']('comment',()=>{const _0x45277a=this['_createUIButton'](_0x10624b);return _0x45277a['tooltip']=!0x0,_0x45277a;}),_0x27f93f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x20ab60)),_0x1869a9['addSourceCollector'](()=>{const _0x43919e=[];for(const [_0x413e0f,_0xf16bf4]of _0x316307['_threadToController']){const _0x9f77b=_0x14fb5a['getAllMarkersForId'](_0x413e0f['id']),_0x28a9f=_0x9f77b['map'](_0x2271c4=>_0x2271c4['getRange']());_0x9f77b['length']>0x0&&_0x43919e['push']([_0xf16bf4['view'],_0x28a9f]);}return _0x43919e;}),this['listenTo'](_0x13570f,'change:activeAnnotations',(_0x5486a3,_0x5b9656,_0x4544b2)=>{const _0x98f176=Array['from'](_0x4544b2)['map'](_0x4fe6d7=>_0x4fe6d7['innerView'])['find'](_0x557c66=>_0x316307['_viewToController']['has'](_0x557c66));if(!_0x98f176)return void(_0x14fb5a['activeMarker']=null);const _0x355f93=_0x316307['_viewToController']['get'](_0x98f176)['model']['id'],_0x87fa33='comment:'+_0x355f93;_0x355f93&&_0x14fb5a['hasMarkerForId'](_0x355f93)?_0x14fb5a['activeMarker']=_0x87fa33:_0x14fb5a['activeMarker']&&(_0x14fb5a['activeMarker']=null);}),this['listenTo'](_0x316307,'removeCommentThread',(_0xec5a07,{threadId:_0xe018fd,isFromAdapter:_0x3777b8})=>{!_0x3777b8&&_0x27f93f['ui']['focusTracker']['isFocused']&&_0x14fb5a['hasMarkerForId'](_0xe018fd)&&_0x27f93f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x316307,'addComment',(_0x208c9e,{threadId:_0x6452e9,isFromAdapter:_0x589713})=>{if(_0x589713||!_0x14fb5a['hasMarkerForId'](_0x6452e9)||!_0x316307['hasCommentThread'](_0x6452e9))return;0x1===_0x316307['getCommentThread'](_0x6452e9)['length']&&(_0x27f93f['editing']['view']['focus'](),_0x208c9e['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xce5e53=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2dcd65;for(const _0x2b4021 in _0xce5e53){const _0x50d222=_0x2b4021,_0x29ceda=_0xce5e53[_0x50d222];if('commentsLicenseKeyValid'==_0x29ceda||'commentsLicenseKeyInvalid'==_0x29ceda||'commentsLicenseKeyExpired'==_0x29ceda||'commentsLicenseKeyDomainLimit'==_0x29ceda||'commentsLicenseKeyNotAllowed'==_0x29ceda||'commentsLicenseKeyEvaluationLimit'==_0x29ceda||'commentsLicenseKeyUsageLimit'==_0x29ceda){delete _0xce5e53[_0x50d222],_0x2dcd65=_0x29ceda,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2dcd65&&_0xce5e53['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2dcd65&&_0xce5e53['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2dcd65&&_0xce5e53['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2dcd65&&_0xce5e53['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2dcd65&&_0xce5e53['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x2dcd65&&_0xce5e53['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3e0e5c){const _0xd85504=this['editor'],_0x41e7b6=new _0x3e0e5c(_0xd85504['locale']),_0x2a9688=_0xd85504['commands']['get']('addCommentThread');return _0x41e7b6['set']({'label':N(_0xd85504['locale'],'Comment'),'icon':_0x20622d}),_0x41e7b6['bind']('isEnabled')['to'](_0x2a9688,'isEnabled',_0x2a9688,'hasContent',(_0x547b66,_0x5f53d1)=>_0x547b66&&_0x5f53d1),this['listenTo'](_0x41e7b6,'execute',()=>{_0x2a9688['execute']();}),_0x41e7b6;}}class i extends _0x37df86{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x47bfd9){super(_0x47bfd9),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x131cfd,_0x1eb304,_0x75bf92)=>{_0x75bf92?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4ec3bc,_0x3db2cf]of this['editor']['commands'])_0x3db2cf['affectsData']&&'addCommentThread'!==_0x4ec3bc&&_0x3db2cf['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0xf32d41=this['editor']['editing']['view']['document'];this['listenTo'](_0xf32d41,'cut',_0x401f6e=>_0x401f6e['stop'](),{'priority':'highest'}),this['listenTo'](_0xf32d41,'clipboardInput',_0x1d9005=>_0x1d9005['stop'](),{'priority':'highest'}),this['listenTo'](_0xf32d41,'delete',_0x747117=>_0x747117['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x1a7521,_0x1e0186]of this['editor']['commands'])_0x1e0186['affectsData']&&'addCommentThread'!==_0x1a7521&&_0x1e0186['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x5128ef{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x37e172){super(_0x37e172),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x166c4d=this['context']['plugins']['get'](y);this['listenTo'](_0x166c4d,'_activateAnnotation',(_0x59401a,_0x5002a8)=>{for(const _0x3b1bb7 of this['activeUIs']){const _0x266c22=this['_uis']['get'](_0x3b1bb7);(0x0,this['uisData']['get'](_0x3b1bb7)['filter'])(_0x5002a8)&&_0x266c22['setActiveAnnotation'](_0x5002a8);}}),this['listenTo'](_0x166c4d,'_deactivateAllAnnotations',()=>{for(const _0x10f57a of this['activeUIs']){this['_uis']['get'](_0x10f57a)['setActiveAnnotation'](null);}}),this['listenTo'](_0x166c4d['_visibleAnnotations'],'add',(_0x12086d,_0x4e77b4)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4e77b4);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x253a81){return this['activeUIs']['has'](_0x253a81);}['activate'](_0x2d6b2d,_0x8556f5=this['defaultFilter']){const _0x1d963b=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2d6b2d))throw new _0x5e18c7('annotationsuis-missing-ui',this,{'uiName':_0x2d6b2d});this['isActive'](_0x2d6b2d)&&this['deactivate'](_0x2d6b2d),this['activeUIs']['add'](_0x2d6b2d);const _0x394c0f=new S();v({'source':_0x1d963b['_visibleAnnotations'],'target':_0x394c0f,'filter':_0x8556f5}),this['uisData']['set'](_0x2d6b2d,{'collection':_0x394c0f,'filter':_0x8556f5});const _0x34fbfa=this['_uis']['get'](_0x2d6b2d);_0x34fbfa['attach'](_0x394c0f),this['listenTo'](_0x34fbfa,'change:activeAnnotation',(_0x4f609c,_0x2e0fbf,_0x5e1519,_0x1981c7)=>{_0x1981c7&&_0x1d963b['_removeActiveAnnotation'](_0x1981c7),_0x5e1519&&_0x1d963b['_addActiveAnnotation'](_0x5e1519);});}['deactivate'](_0x9cfaf1){if(this['activeUIs']['delete'](_0x9cfaf1),!this['_uis']['has'](_0x9cfaf1))throw new _0x5e18c7('annotationsuis-missing-ui',this,{'uiName':_0x9cfaf1});const _0x15da0d=this['_uis']['get'](_0x9cfaf1);_0x15da0d['detach'](),this['stopListening'](_0x15da0d),this['uisData']['get'](_0x9cfaf1)['collection']['destroy'](),this['uisData']['delete'](_0x9cfaf1);}['switchTo'](_0x2ffa6e){if(!this['_uis']['has'](_0x2ffa6e))throw new _0x5e18c7('annotationsuis-missing-ui',this,{'uiName':_0x2ffa6e});const _0x33bf80=this['context']['plugins']['get'](y),_0x4f5f25=Array['from'](_0x33bf80['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2ffa6e);const _0x59e819=this['_uis']['get'](_0x2ffa6e);_0x59e819['setActiveAnnotation'](_0x4f5f25),_0x59e819['_setSelectedAnnotations']&&_0x4f5f25&&_0x59e819['_setSelectedAnnotations']([_0x4f5f25]);}['deactivateAll'](){for(const _0x2d5964 of this['activeUIs'])this['deactivate'](_0x2d5964);}['register'](_0x3eea95,_0x38f0c9){if(this['_uis']['has'](_0x3eea95))throw new _0x5e18c7('annotationsuis-register-already-registered');if('function'!=typeof _0x38f0c9['attach']||'function'!=typeof _0x38f0c9['detach']||'function'!=typeof _0x38f0c9['setActiveAnnotation'])throw new _0x5e18c7('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3eea95,_0x38f0c9);}['refilterAnnotations'](){const _0x4371cf=this['context']['plugins']['get'](y)['collection'],_0x5bd5c1=new Map(),_0x3b4a62=Array['from'](this['activeUIs']);for(const _0x6d7915 of this['activeUIs']){const _0x4e53b1=this['uisData']['get'](_0x6d7915)['collection'];for(const _0x51b338 of _0x4e53b1)_0x5bd5c1['set'](_0x51b338,_0x6d7915);}for(const _0x2e331c of _0x4371cf){const _0x3e7402=_0x5bd5c1['get'](_0x2e331c);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2e331c);const _0x2f22b6=_0x3b4a62['find'](_0x30317a=>this['uisData']['get'](_0x30317a)['filter'](_0x2e331c));_0x3e7402!==_0x2f22b6&&(_0x3e7402&&this['uisData']['get'](_0x3e7402)['collection']['remove'](_0x2e331c),_0x2f22b6&&this['uisData']['get'](_0x2f22b6)['collection']['add'](_0x2e331c));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1d664d){const _0x54e73b=[];for(const _0x342d63 of this['activeUIs']){(0x0,this['uisData']['get'](_0x342d63)['filter'])(_0x1d664d)&&_0x54e73b['push'](_0x342d63);}if(_0x54e73b['length']>0x1)throw new _0x5e18c7('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x54e73b,'annotationType':_0x1d664d['type']});}}const he=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
Dt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x149c07){super(_0x149c07),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5639b0,_0x465376)=>_0x5639b0+_0x465376),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Et(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x14e6b3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x14e6b3['to']('isAnimationDisabled',_0x22de03=>_0x22de03?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x14e6b3['to']('top',_0x13ff27=>Ht(_0x13ff27))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x45ab5f=this['element']['clientHeight'];_0x45ab5f&&(this['height']=_0x45ab5f);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x5128ef{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49c5f8){super(_0x49c5f8),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 _0x1b4993=this['context']['config']['get']('sidebar.container');_0x1b4993&&this['setContainer'](_0x1b4993);}['setContainer'](_0x3c949a){if(!g(_0x3c949a))throw new _0x5e18c7('sidebar-setcontainer-invalid-element');this['container']=_0x3c949a;}['_attachToContainer']({viewClass:_0x3dbe51='',spaceBetweenItems:_0x2c0c8d=0x19}={}){if(!g(this['container']))throw new _0x5e18c7('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3dbe51,this['_spaceBetweenItems']=_0x2c0c8d;}['rearrange']({removedAnnotation:_0x15ad60,previousAnnotation:_0x5d6326,nextAnnotation:_0x338b8a}){const _0x47dd6c=this['getSidebarItemView'](_0x15ad60);this['view']['list']['remove'](_0x47dd6c),this['_destroySidebarItemView'](_0x15ad60),_0x5d6326&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5d6326)),_0x338b8a&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x338b8a)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1e5e2d,activatedAnnotation:_0x2594a3,disableAnimationOnActivatedAnnotation:_0x4eb9ae}){if(this['_activeAnnotation']=_0x2594a3,_0x1e5e2d){_0x1e5e2d['isActive']=!0x1;const _0x569866=this['getSidebarItemView'](_0x1e5e2d);_0x569866&&_0x4eb9ae&&(_0x569866['isAnimationDisabled']=!0x1);}if(_0x2594a3){const _0xd41af2=this['getSidebarItemView'](_0x2594a3);_0xd41af2&&(_0x2594a3['isActive']=!0x0,_0x4eb9ae&&(_0xd41af2['isAnimationDisabled']=!0x0,_0xd41af2['top']+=0x1),this['_alignToTargetRect'](_0xd41af2));}}['_detachFromContainer'](_0x2484bc){if(this['view']['element']['remove'](),_0x2484bc){for(const _0x287563 of _0x2484bc)this['_destroySidebarItemView'](_0x287563);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x236a96,_0x446805){_0x446805||(_0x446805=_0x236a96['view']);const _0x5c15c0=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5c15c0,_0x236a96),this['_annotationToSidebarItemView']['set'](_0x236a96,_0x5c15c0),_0x5c15c0['content']['add'](_0x446805),this['listenTo'](_0x236a96['view'],'change:targetRect',(_0x56c861,_0x35854b,_0x262823)=>{const _0x47426a=this['_getTargetTop'](_0x236a96,_0x262823);_0x5c15c0['_targetTop']!=_0x47426a&&(_0x5c15c0['_targetTop']=_0x47426a,this['_setItemTop'](_0x5c15c0,_0x47426a));}),this['listenTo'](_0x5c15c0,'change:top',()=>{this['_recalculate'](_0x5c15c0,'top');}),this['listenTo'](_0x5c15c0,'change:bottom',()=>{this['_recalculate'](_0x5c15c0,'bottom');}),this['_alignToTargetRect'](_0x5c15c0);const _0x457597=this['_getItemBefore'](_0x5c15c0);if(_0x457597)this['_alignAfterItem'](_0x457597,_0x5c15c0)||this['_alignToTargetRect'](_0x5c15c0);else this['_alignToTargetRect'](_0x5c15c0);return this['_updateLastItem'](),this['view']['list']['add'](_0x5c15c0),_0x5c15c0;}['_alignForTopChange'](_0x6a141b){if(!_0x6a141b['content']['length'])return;const _0x58adf4=this['_getItemBefore'](_0x6a141b);if(!_0x58adf4)return;const _0xa2256d=this['_sidebarItemViewToAnnotation']['get'](_0x58adf4),_0x149cc1=this['_activeAnnotation'];_0x149cc1&&_0x149cc1===_0xa2256d?this['_alignAfterItem'](_0x58adf4,_0x6a141b):this['_alignBeforeItem'](_0x6a141b,_0x58adf4);}['_alignForBottomChange'](_0x2b6bcb){if(!_0x2b6bcb['content']['length'])return;const _0x565519=this['_getItemAfter'](_0x2b6bcb);if(!_0x565519)return;const _0x58c3f1=this['_sidebarItemViewToAnnotation']['get'](_0x565519),_0x212a10=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x568c3c=this['_activeAnnotation'];_0x568c3c&&_0x568c3c===_0x58c3f1&&_0x212a10?(this['_alignBeforeItem'](_0x565519,_0x2b6bcb),this['_alignAfterItem'](_0x2b6bcb,_0x565519)):_0x568c3c&&_0x568c3c===_0x58c3f1?this['_alignBeforeItem'](_0x565519,_0x2b6bcb):this['_alignAfterItem'](_0x2b6bcb,_0x565519);}['_recalculate'](_0x582066,_0x142e62){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x304d40,changedProp:_0x4eee67}of this['_recalculateBuffer'])'top'===_0x4eee67?this['_alignForTopChange'](_0x304d40):this['_alignForBottomChange'](_0x304d40);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x582066,'changedProp':_0x142e62});}['getSidebarItemView'](_0xad55bb){return this['_annotationToSidebarItemView']['get'](_0xad55bb);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x12f100){const _0x82c3a0=this['getSidebarItemView'](_0x12f100);this['stopListening'](_0x82c3a0),this['stopListening'](_0x12f100['view']),_0x82c3a0['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x12f100),this['_sidebarItemViewToAnnotation']['delete'](_0x82c3a0);}['_createSidebarView'](){const _0x485916=new H(this['context']['locale']);return _0x485916['render'](),this['on']('change:_lastItem',(_0x55918a,_0x1443cb,_0x4dade1,_0x3acaba)=>{_0x3acaba&&_0x485916['unbind']('minHeight'),_0x4dade1?_0x485916['bind']('minHeight')['to'](_0x4dade1,'bottom'):_0x485916['minHeight']=null;}),_0x485916;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x31fde9){const _0x5f0edb=this['_sidebarItemViewToAnnotation']['get'](_0x31fde9),_0x346720=_0x5f0edb&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5f0edb)-0x1);return _0x346720&&this['getSidebarItemView'](_0x346720)||null;}['_getItemAfter'](_0x484f96){const _0x4deb36=this['_sidebarItemViewToAnnotation']['get'](_0x484f96),_0x1a1c4f=_0x4deb36&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4deb36)+0x1);return _0x1a1c4f&&this['getSidebarItemView'](_0x1a1c4f)||null;}['_alignBeforeItem'](_0x29cb1c,_0x343beb){_0x29cb1c['updateHeight']();const _0x331991=G(_0x343beb['bottom']+this['_spaceBetweenItems'],_0x29cb1c['top']);return!!_0x331991&&(this['_setItemTop'](_0x343beb,_0x343beb['top']-_0x331991),!0x0);}['_alignAfterItem'](_0x4c66cf,_0xdbf087){_0x4c66cf['updateHeight']();const _0x42490c=G(_0x4c66cf['bottom']+this['_spaceBetweenItems'],_0xdbf087['top']);return!!_0x42490c&&(this['_setItemTop'](_0xdbf087,_0xdbf087['top']+_0x42490c,!0x1),!0x0);}['_alignToTargetRect'](_0x2f2f8f){const _0x48b50b=this['_sidebarItemViewToAnnotation']['get'](_0x2f2f8f);if(!_0x48b50b||!_0x48b50b['target']||!_0x48b50b['targetRect'])return;const _0x400fff=this['_getTargetTop'](_0x48b50b,_0x48b50b['targetRect']);this['_setItemTop'](_0x2f2f8f,_0x400fff);}['_getTargetTop'](_0x6e7110,_0x320542){if(null===_0x320542)return 0x0;if(_0x6e7110['target']instanceof _0x3cd661)return _0x320542['top'];{const _0x23fa7e=new _0x3cd661(this['view']['element'])['top'];return _0x320542['top']-_0x23fa7e;}}['_setItemTop'](_0x16b4f2,_0x3f2116,_0x4eb1ef=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x4eb1ef&&(_0x3f2116=Math['max'](_0x3f2116,this['_getMaxAvailableTop'](_0x16b4f2))),_0x16b4f2['top']=_0x3f2116;}['_getMaxAvailableTop'](_0x11be32){let _0x3860f7=this['_getItemBefore'](_0x11be32),_0x59b47c=0x0;for(;_0x3860f7;)_0x3860f7['updateHeight'](),_0x59b47c+=this['_spaceBetweenItems']+_0x3860f7['height'],_0x3860f7=this['_getItemBefore'](_0x3860f7);return _0x59b47c;}}function G(_0x374c10,_0x372208){return Math['max'](_0x374c10-_0x372208,0x0);}function g(_0xc2b820){return null!==_0xc2b820&&'object'==typeof _0xc2b820&&0x1===_0xc2b820['nodeType'];}class e extends _0x5128ef{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x164d3e){super(_0x164d3e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1e787f(),this['_refreshPositioningDebounced']=_0x25cfc6(()=>{_0x164d3e['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x17bedd=this['context']['plugins']['get'](j),_0x161782=this['context']['plugins']['get'](z);_0x17bedd['register']('wideSidebar',this),_0x161782['container']&&_0x17bedd['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5f5493){if(_0x5f5493===this['activeAnnotation'])return;const _0x17a0e1=this['context']['plugins']['get'](z);_0x17a0e1['_activeAnnotation']=_0x5f5493;const _0x55558f=this['activeAnnotation'];_0x17a0e1['refresh']({'blurredAnnotation':_0x55558f,'activatedAnnotation':_0x5f5493}),this['activeAnnotation']=_0x5f5493;}['attach'](_0xe09d59){this['annotations']=_0xe09d59;const _0x1682bb=this['context']['plugins']['get'](z);if(_0x1682bb['_annotations']=_0xe09d59,this['isAttached'])throw new _0x5e18c7('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1682bb,'set:container',()=>{this['detach'](),this['listenTo'](_0x1682bb,'change:container',_0x332916=>{_0x332916['off'](),this['attach'](_0xe09d59);});}),_0x1682bb['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3e9258=_0x534946=>{_0x534946['updateTargetRect'](),_0x1682bb['addAnnotation'](_0x534946);};for(const _0x234ac5 of _0xe09d59)_0x3e9258(_0x234ac5);this['listenTo'](_0xe09d59,'add',(_0x32ff30,_0xd24df9)=>{_0x3e9258(_0xd24df9);}),this['listenTo'](_0xe09d59,'remove',(_0x163255,_0x4aa08a,_0x1f8b37)=>{_0x1682bb['rearrange']({'removedAnnotation':_0x4aa08a,'previousAnnotation':_0xe09d59['get'](_0x1f8b37-0x1),'nextAnnotation':_0xe09d59['get'](_0x1f8b37+0x1)}),_0x4aa08a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xe09d59,'focus',(_0x36da03,_0x518b78)=>{this['setActiveAnnotation'](_0x518b78);}),this['listenTo'](_0xe09d59,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3c1092=this['context']instanceof _0x5bdaca?this['context']['editors']:new _0x1e787f([this['context']]);for(const _0x392e92 of _0x3c1092)this['_integrateWithEditorAnnotations'](_0x392e92);this['listenTo'](_0x3c1092,'add',(_0x40b971,_0x1d4761)=>{this['listenTo'](_0x1d4761,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1d4761);});}),this['listenTo'](_0x3c1092,'remove',(_0x3a27b4,_0x5c2f47)=>{_0x5c2f47['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5c2f47['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5e18c7('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3df24d=this['context']['plugins']['get'](z);_0x3df24d['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3df24d),this['stopListening'](this['annotations']),this['context']instanceof _0x5bdaca&&this['stopListening'](this['context']['editors']);for(const _0x14029d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x14029d);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x10c9c3){if(!_0x10c9c3['plugins']['has']('EditorAnnotations'))return;const _0xe0203f=_0x10c9c3['plugins']['get']('EditorAnnotations'),_0x481d69=()=>{const _0x45060f=_0xe0203f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x45060f[0x0]||null);};this['listenTo'](_0xe0203f,'refresh',_0x481d69),this['listenTo'](_0xe0203f,'blur',(_0x1bf5ee,{isAnnotationTracked:_0x232c1d})=>{this['activeAnnotation']&&_0x232c1d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xe0203f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4fb01a=>{_0xe0203f['hasDomSelection']()&&(_0x481d69(),_0x4fb01a['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xe0203f);}['_destroyEditorAnnotationsIntegration'](_0x9826db){this['stopListening'](_0x9826db),this['_editorAnnotations']['remove'](_0x9826db);}}class C extends _0x10624b{['counterView'];constructor(_0x56a255){super(_0x56a255);const _0x305d9c=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x319ace,_0x6685b3)=>_0x319ace?'...':_0x6685b3['toString']()),this['set']('annotationType',''),this['icon']=_0x20622d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x305d9c['to']('annotationType',_0x16a712=>'ck-annotation-counter__badge--'+_0x16a712),_0x305d9c['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x305d9c['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x5128ef{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ee70d){super(_0x1ee70d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1de7e4())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1e787f(),this['_refreshPositioningDebounced']=_0x25cfc6(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x44ca68(this['context']['locale']),this['balloonPanelView']=new _0x152a7b(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x14e81f){this['annotations']=_0x14e81f;const _0x4b01b5=this['context']['plugins']['get'](z),_0x44a27f=this['balloonPanelView'];if(_0x4b01b5['_annotations']=_0x14e81f,this['isAttached'])throw new _0x5e18c7('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4b01b5,'set:container',()=>{this['detach'](),this['listenTo'](_0x4b01b5,'change:container',_0x39c82a=>{_0x39c82a['off'](),this['attach'](_0x14e81f);});}),_0x4b01b5['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4cec9d=_0x121985=>{const _0x1e0b4d=new C(this['context']['locale']);_0x4b01b5['addAnnotation'](_0x121985,_0x1e0b4d),this['_annotationToNarrowView']['set'](_0x121985,_0x1e0b4d),_0x1e0b4d['bind']('isDirty','annotationType','number')['to'](_0x121985['view'],'isDirty','type','length'),_0x1e0b4d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x44a27f['content']['first']!==_0x121985['view']?(this['_showBalloon'](_0x121985),_0x121985['view']['element']['focus'](),this['setActiveAnnotation'](_0x121985)):this['setActiveAnnotation'](null);});};for(const _0x22c53f of _0x14e81f)_0x4cec9d(_0x22c53f);this['listenTo'](_0x14e81f,'add',(_0x381d93,_0x3aa243)=>{_0x4cec9d(_0x3aa243);}),this['listenTo'](_0x14e81f,'remove',(_0x5f0c53,_0x1d0b8d,_0x450333)=>{this['_annotationToNarrowView']['get'](_0x1d0b8d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1d0b8d),_0x4b01b5['rearrange']({'removedAnnotation':_0x1d0b8d,'previousAnnotation':_0x14e81f['get'](_0x450333-0x1),'nextAnnotation':_0x14e81f['get'](_0x450333+0x1)}),_0x1d0b8d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x14e81f,'focus',(_0x58984c,_0x2a2a95)=>{this['setActiveAnnotation'](_0x2a2a95);}),this['listenTo'](_0x14e81f,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x8a2fe7,_0x5acd15)=>{_0x5acd15['keyCode']===_0x2ec4e4['esc']&&_0x44a27f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x44a27f['content']['first']),this['_hideBalloon'](),_0x5acd15['stopPropagation'](),_0x5acd15['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0xd7ee76,_0x16c02d)=>{const _0x9e949a=_0x16c02d['target'];_0x44a27f['isVisible']&&_0x44a27f['element']['contains'](_0x9e949a)||_0x4b01b5['view']['element']['contains'](_0x9e949a)||_0xd7ee76['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x37dd63=>_0x37dd63['contains'](_0x9e949a))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xbd92d9=this['context']instanceof _0x5bdaca?this['context']['editors']:new _0x1e787f([this['context']]);for(const _0x70a961 of _0xbd92d9)this['_integrateWithEditorAnnotations'](_0x70a961);this['listenTo'](_0xbd92d9,'add',(_0x138748,_0xff7c81)=>{this['listenTo'](_0xff7c81,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xff7c81);});}),this['listenTo'](_0xbd92d9,'remove',(_0x5b7259,_0x43cb19)=>{_0x43cb19['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x43cb19['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x88cb58){if(_0x88cb58===this['activeAnnotation'])return;const _0x277870=this['context']['plugins']['get'](z);if(_0x277870['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x88cb58,'disableAnimationOnActivatedAnnotation':!0x0}),_0x88cb58)_0x277870['getSidebarItemView'](_0x88cb58)?this['_showBalloon'](_0x88cb58):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x88cb58;}['detach'](){if(!this['isAttached'])throw new _0x5e18c7('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x26cb20=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x588f94=>_0x588f94['destroy']()),this['_annotationToNarrowView']['clear'](),_0x26cb20['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5bdaca&&this['stopListening'](this['context']['editors']);for(const _0x591485 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x591485);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'](_0x39168e){if(!_0x39168e['plugins']['has']('EditorAnnotations'))return;const _0x4ce912=_0x39168e['plugins']['get']('EditorAnnotations'),_0x2804f5=this['context']['plugins']['get'](z),_0x1cd0ce=this['annotations'],_0x21e7de=this['balloonPanelView'],_0x2af86d=()=>{const _0x1a895b=_0x4ce912['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1a895b),this['setActiveAnnotation'](_0x1a895b[0x0]||null);};this['listenTo'](_0x4ce912,'refresh',_0x2af86d),this['listenTo'](_0x4ce912,'blur',(_0x2b36b1,{isAnnotationTracked:_0x4ab2ef})=>{this['activeAnnotation']&&_0x4ab2ef(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4ce912,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1cd0ce,'blur',_0xaf1352=>{_0x4ce912['hasDomSelection']()&&_0xaf1352['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1526ee,_0x18695a)=>{const _0x7c359e=_0x18695a['target'];_0x21e7de['isVisible']&&_0x21e7de['element']['contains'](_0x7c359e)||_0x2804f5['view']['element']['contains'](_0x7c359e)||this['activeAnnotation']&&_0x4ce912['hasDomSelection']()&&(_0x2af86d(),_0x1526ee['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4ce912);}['_destroyEditorAnnotationsIntegration'](_0xcfce67){_0xcfce67&&(this['stopListening'](_0xcfce67),this['_editorAnnotations']['remove'](_0xcfce67));}['_setSelectedAnnotations'](_0x48794){for(const _0x361086 of this['_selectedAnnotations'])_0x48794['includes'](_0x361086)||this['_manuallyClosedAnnotationViews']['delete'](_0x361086['view']);this['_selectedAnnotations']=_0x48794;}['_refreshPositioning'](){const _0x2d1652=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x2d1652['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1c6f9d){if(this['_manuallyClosedAnnotationViews']['has'](_0x1c6f9d['view']))return;const _0x2761e9=this['balloonPanelView']['content']['first'];_0x2761e9!==_0x1c6f9d['view']?(_0x2761e9&&this['_detachListeners'](_0x2761e9),this['_attachListeners'](_0x1c6f9d['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1c6f9d['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x6673ca=this['balloonPanelView']['content']['first'],_0x29de7a=_0x6673ca&&this['annotations']['getByView'](_0x6673ca);if(!_0x29de7a||!this['_annotationToNarrowView']['has'](_0x29de7a))return;const _0x28be26=this['_annotationToNarrowView']['get'](_0x29de7a)['element'],_0x4dcdac=(function(){const _0xa689ba=_0x152a7b['defaultPositions'];return[_0xa689ba['southArrowNorthEast'],_0xa689ba['northArrowSouthEast'],_0xa689ba['southArrowNorth'],_0xa689ba['northArrowSouth'],_0xa689ba['southArrowNorthWest'],_0xa689ba['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x28be26,'positions':_0x4dcdac});}['_hideBalloon'](){const _0x4bdb03=this['balloonPanelView'],_0xe9c5c4=_0x4bdb03['content']['first'];_0xe9c5c4&&(this['_detachListeners'](_0xe9c5c4),_0x4bdb03['unpin'](),_0x4bdb03['content']['clear']());}['_attachListeners'](_0x21f6b9){this['listenTo'](_0x21f6b9,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x21f6b9,'Esc',(_0x50111a,_0x515211)=>{this['_manuallyClosedAnnotationViews']['add'](_0x21f6b9),this['_hideBalloon'](),_0x515211();});}['_detachListeners'](_0x1a1a1f){this['stopListening'](_0x1a1a1f);}}class c extends _0x37df86{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x1363b8,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1de265){super(_0x1de265),_0x1de265['editing']['view']['addObserver'](_0x5f32e4),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1de265['plugins']['get'](_0x1363b8),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x25cfc6(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x26e51c=this['editor']['plugins']['get'](j);_0x26e51c['context']===this['editor']&&(_0x26e51c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1898af,_0x3653a5)=>{const _0x7b9d7f=this['_balloon'];if(this['isAttached']&&_0x7b9d7f['visibleView']){const _0x3f08e3=this['annotations']['getByView'](_0x7b9d7f['visibleView']);_0x3f08e3&&this['_closeAnnotation'](_0x3f08e3),_0x3653a5();}}));}['afterInit'](){const _0x207316=this['editor']['plugins']['get'](j);_0x207316['context']===this['editor']&&(_0x207316['hasActive']()||_0x207316['switchTo']('inline'));}['setActiveAnnotation'](_0x52528e){_0x52528e!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x52528e&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x52528e)&&this['_addAnnotationToBalloon'](_0x52528e,!0x0),_0x52528e['isActive']=!0x0),_0x52528e||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x52528e);}['attach'](_0x2b5078){this['annotations']=_0x2b5078;const _0x12a284=this['editor']['plugins']['get'](j),_0x109c61=this['_balloon'];if(this['isAttached'])throw new _0x5e18c7('inlineannotations-attach-already-attached',this);if(_0x12a284['context']!==this['editor'])throw new _0x5e18c7('inlineannotations-not-allowed-with-context',this);const _0x25db64=this['editor']['plugins']['get'](b);this['listenTo'](_0x25db64,'refresh',()=>{const _0x2a8d7f=_0x25db64['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x40eaa1,_0xafc32a;!this['_forceRefresh']&&(_0x40eaa1=_0x2a8d7f,_0xafc32a=this['_selectedAnnotations'],_0x40eaa1['length']===_0xafc32a['length']&&_0x40eaa1['every'](_0x247d57=>_0xafc32a['includes'](_0x247d57)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2a8d7f),this['setActiveAnnotation'](_0x2a8d7f[0x0]||null));}),this['listenTo'](_0x25db64,'blur',(_0x590cd1,{isAnnotationTracked:_0x1307fe})=>{this['activeAnnotation']&&_0x1307fe(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x25db64,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x36cdf2,_0x16d892,_0x58755c)=>{_0x58755c||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2b5078,'remove',(_0x958e34,_0x435d14)=>{this['_removeAnnotationFromBalloon'](_0x435d14),_0x435d14===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x109c61,'change:visibleView',(_0x33ebd5,_0xb8d3b8,_0x2ca492,_0x337693)=>{_0x337693&&this['stopListening'](_0x337693);const _0x3ffb83=_0x2b5078['getByView'](_0x2ca492);_0x2ca492&&_0x3ffb83&&(this['listenTo'](_0x2ca492,'change:height',()=>{_0x109c61['updatePosition']();}),this['listenTo'](_0x2ca492,'Esc',()=>{this['_closeAnnotation'](_0x3ffb83),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3ffb83&&this['setActiveAnnotation'](_0x3ffb83));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x109c61['visibleView']&&(_0x2b5078['getByView'](_0x109c61['visibleView'])&&_0x109c61['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 _0x5e18c7('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x30b62f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x30b62f);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x5c7b72){for(const _0x5315eb of this['_selectedAnnotations'])_0x5c7b72['includes'](_0x5315eb)||this['_manuallyClosed']['delete'](_0x5315eb);for(const _0x2dafd5 of this['annotations'])_0x5c7b72['includes'](_0x2dafd5)||this['_removeAnnotationFromBalloon'](_0x2dafd5);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3f559f of _0x5c7b72)this['_addAnnotationToBalloon'](_0x3f559f);}this['_selectedAnnotations']=_0x5c7b72;}['_addAnnotationToBalloon'](_0x192fef,_0x5ad8a6=!0x1){this['_manuallyClosed']['has'](_0x192fef)||(this['_addedAnnotations']['has'](_0x192fef)||this['_balloon']['hasView'](_0x192fef['view'])||(this['_addedAnnotations']['add'](_0x192fef),this['_balloon']['add']({'stackId':_0x192fef['view']['id'],'view':_0x192fef['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x192fef)}})),_0x5ad8a6&&this['_balloon']['showStack'](_0x192fef['view']['id']));}['_getBalloonTargetForAnnotation'](_0x1ccc3a){const _0x19773c=_0x1ccc3a['target'],_0x343a08=this['editor']['editing']['view'],_0x38713a=_0x343a08['document']['selection']['getFirstRange'](),_0x31555c=_0x343a08['domConverter']['viewRangeToDom'](_0x38713a);if(_0x31555c['collapse'](!0x0),_0x19773c){if(_0x19773c instanceof _0x3cd661)return _0x19773c;let _0x379901=[];for(const _0x2caf9a of _0x19773c)_0x379901['push'](...F(_0x2caf9a['getClientRects']()));_0x379901=function(_0x233fff){const _0x3d285b=[];let _0x502a5f=_0x233fff[0x0];for(let _0x2a8349=0x1;_0x2a8349<_0x233fff['length'];_0x2a8349++)P(_0x502a5f,_0x233fff[_0x2a8349])?_0x502a5f['width']+=_0x233fff[_0x2a8349]['width']:(_0x3d285b['push'](_0x502a5f),_0x502a5f=_0x233fff[_0x2a8349]);return _0x3d285b['push'](_0x502a5f),_0x3d285b;}(_0x379901);const _0x1ba2c3=_0x31555c['getBoundingClientRect']();return _0x379901['find'](_0x4bb17c=>_0x4bb17c['top']<=_0x1ba2c3['top']&&_0x4bb17c['bottom']>=_0x1ba2c3['bottom']&&_0x4bb17c['left']<=_0x1ba2c3['left']&&_0x4bb17c['right']>=_0x1ba2c3['right'])||_0x379901[0x0];}return _0x1ccc3a['targetRect']||_0x31555c;}['_removeAnnotationFromBalloon'](_0x48aa26){this['_addedAnnotations']['has'](_0x48aa26)&&this['_balloon']['hasView'](_0x48aa26['view'])&&(this['_addedAnnotations']['delete'](_0x48aa26),this['_balloon']['remove'](_0x48aa26['view']));}['_closeAnnotation'](_0x133760){this['_manuallyClosed']['add'](_0x133760),this['_removeAnnotationFromBalloon'](_0x133760);}}function F(_0x3d345d){return Array['from'](_0x3d345d)['map'](DOMRect['fromRect']);}function P(_0x2a1cac,_0x17c0e5){return _0x2a1cac['top']===_0x17c0e5['top']&&_0x2a1cac['bottom']===_0x17c0e5['bottom']&&_0x2a1cac['right']===_0x17c0e5['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x2a02b7,_0x4903d9){super(_0x2a02b7),this['set']('isEmpty',!_0x4903d9['length']),this['focusTracker']=new _0x49b404(),this['_annotationViews']=_0x4903d9,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x414173({'focusables':_0x4903d9,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4903d9,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4903d9,'remove',(_0x264290,_0x20f3f2)=>{_0x20f3f2['isActive']&&this['focus'](),_0x4903d9['length']||(this['isEmpty']=!0x0);});const _0x461fe0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x2a02b7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4903d9},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x461fe0['if']('isEmpty','ck-hidden',_0x13ed68=>!_0x13ed68)]},'children':[{'text':N(_0x2a02b7,'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 _0x5092ad of this['_annotationViews'])this['focusTracker']['add'](_0x5092ad['element']);this['_annotationViews']['on']('change',(_0x3fa582,{added:_0x28e007,removed:_0x2b9701})=>{for(const _0x2c1982 of _0x28e007)this['focusTracker']['add'](_0x2c1982['element']);for(const _0x7b1409 of _0x2b9701)this['focusTracker']['remove'](_0x7b1409['element']);});}}class p extends _0x5128ef{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x434d83){super(_0x434d83),this['archivedThreads']=new _0x1e787f();}['init'](){const _0x40fb8e=this['context'],_0x343e90=_0x40fb8e['plugins']['get'](o),_0x59876e=_0x40fb8e['plugins']['get'](y);this['listenTo'](_0x343e90,'addCommentThread',(_0x409c38,{threadId:_0x2e2659})=>{const _0xcc039e=_0x343e90['getCommentThread'](_0x2e2659);_0xcc039e['archivedAt']&&this['archivedThreads']['add'](_0xcc039e,this['_calculatePosition'](_0xcc039e['archivedAt'])),this['listenTo'](_0xcc039e,'change:archivedAt',(_0x51afe2,_0x1a169c,_0xe4f210)=>{_0xe4f210?this['archivedThreads']['has'](_0xcc039e)||this['archivedThreads']['add'](_0xcc039e,this['_calculatePosition'](_0xcc039e['archivedAt'])):this['archivedThreads']['has'](_0xcc039e)&&this['archivedThreads']['remove'](_0xcc039e);});}),this['listenTo'](_0x343e90,'removeCommentThread',(_0x590821,{threadId:_0x59af0b})=>{const _0x7b837=_0x343e90['getCommentThread'](_0x59af0b);this['stopListening'](_0x7b837),this['archivedThreads']['has'](_0x7b837)&&this['archivedThreads']['remove'](_0x7b837);},{'priority':'highest'}),this['listenTo'](_0x59876e['collection'],'focus',(_0x403f4c,_0x50f9db)=>{_0x50f9db['isVisible']||(_0x50f9db['isActive']=!0x0,_0x59876e['activate'](_0x50f9db));});}['_calculatePosition'](_0x1a93ea){const _0x2022ca=[...this['archivedThreads']]['findIndex'](_0x17388c=>_0x17388c['archivedAt']<_0x1a93ea);return _0x2022ca>-0x1?_0x2022ca:this['archivedThreads']['length'];}}class a extends _0x37df86{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x5a764f];}constructor(_0x3a7ea7){super(_0x3a7ea7),this['annotationViews']=new _0x7ce536(),this['_pendingThreads']=[];}['init'](){const _0x465b6f=this['editor'],_0xb89702=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x465b6f['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x10624b,!0x0)),_0x465b6f['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x322481=this['_createCommentsArchiveButton'](_0x20ab60);return _0x322481['set']({'role':'menuitemcheckbox'}),_0x322481;});const _0x424ade=_0x465b6f['plugins']['get'](p),_0x4edf58=_0x465b6f['plugins']['get']('Annotations'),_0x254987=_0x465b6f['plugins']['get']('CommentsRepository');_0x424ade['archivedThreads']['forEach'](_0x26371c=>{this['_handleNewThread'](_0x26371c);}),this['listenTo'](_0x424ade['archivedThreads'],'add',(_0x10644d,_0x48aec8)=>{this['_handleNewThread'](_0x48aec8);}),this['listenTo'](_0x4edf58['collection'],'add',(_0x3fc596,_0x3b731e)=>{const _0x15ee8d=this['_pendingThreads']['find'](_0x52e18b=>{const _0x42a4ec=_0x254987['_threadToController']['get'](_0x52e18b);return _0x42a4ec&&_0x3b731e['innerView']===_0x42a4ec['view'];});if(_0x15ee8d){const _0x371f68=this['_calculatePosition'](_0x15ee8d['archivedAt']);this['_addAnnotationToArchive'](_0x3b731e,_0x371f68),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x15ee8d),0x1);}}),this['listenTo'](_0x424ade['archivedThreads'],'remove',(_0xd471e6,_0x42eb06)=>{const _0x36b32c=_0x465b6f['config']['get']('collaboration.channelId');if(!_0x36b32c||_0x42eb06['channelId']===_0x36b32c){if(this['_pendingThreads']['includes'](_0x42eb06))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x42eb06),0x1);else{const _0x40c37e=_0x254987['_threadToController']['get'](_0x42eb06),_0x8b3aa0=_0x4edf58['getByInnerView'](_0x40c37e['view']);this['annotationViews']['remove'](_0x8b3aa0['view']),this['stopListening'](_0x8b3aa0),this['stopListening'](_0x8b3aa0['focusableElements']);}}}),this['listenTo'](_0x4edf58['collection'],'add',(_0x11da6b,_0x51bf24)=>{this['listenTo'](_0x51bf24,'escape',_0xb89702);}),this['listenTo'](_0x4edf58['collection'],'remove',(_0x122679,_0x128dd8)=>{this['stopListening'](_0x128dd8,'escape',_0xb89702);});}['_addAnnotationToArchive'](_0x2743ed,_0x5bd54f){this['listenTo'](_0x2743ed,'set:isVisible',_0x481045=>{_0x481045['return']=!0x1,_0x481045['stop']();}),this['annotationViews']['add'](_0x2743ed['view'],_0x5bd54f);}['_handleNewThread'](_0x88b1f4){const _0x1d60e2=this['editor']['plugins']['get']('CommentsRepository'),_0x19876e=this['editor']['plugins']['get']('Annotations'),_0x8d3c0f=this['editor']['config']['get']('collaboration.channelId');if(!_0x8d3c0f||_0x88b1f4['channelId']===_0x8d3c0f){const _0x5207c0=_0x1d60e2['_threadToController']['get'](_0x88b1f4);if(!_0x5207c0)return void this['_pendingThreads']['push'](_0x88b1f4);const _0x326385=this['_calculatePosition'](_0x88b1f4['archivedAt']),_0x399fc1=_0x19876e['getByInnerView'](_0x5207c0['view']);_0x399fc1['isVisible']&&_0x19876e['_visibleAnnotations']['remove'](_0x399fc1),this['_addAnnotationToArchive'](_0x399fc1,_0x326385);}}['_calculatePosition'](_0x3d1959){const _0x122441=this['editor']['config']['get']('collaboration.channelId'),_0x5e384b=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x1dcc4a=>_0x1dcc4a['channelId']===_0x122441)['findIndex'](_0x4139ed=>_0x4139ed['archivedAt']<_0x3d1959);return _0x5e384b<0x0||_0x5e384b>this['annotationViews']['length']?this['annotationViews']['length']:_0x5e384b-0x1;}['_toggleDialog'](){const _0x2ed1cc=this['editor'],_0xb9cd5d=_0x2ed1cc['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x2ed1cc['locale'],this['annotationViews'])),'commentsArchive'===_0xb9cd5d['id']?_0xb9cd5d['hide']():_0xb9cd5d['show']({'id':'commentsArchive','title':N(_0x2ed1cc['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1bfdb9,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xba3643['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2293b4,_0x24c793=!0x1){const _0x53fdab=this['editor']['locale'],_0x1e490a=this['editor']['plugins']['get']('Dialog'),_0x4bca0e=new _0x2293b4(_0x53fdab);return _0x4bca0e['bind']('isEnabled')['to'](this,'isEnabled'),_0x4bca0e['bind']('isOn')['to'](_0x1e490a,'id',_0x43b317=>'commentsArchive'===_0x43b317),_0x4bca0e['set']({'label':N(_0x53fdab,'COMMENTS_ARCHIVE'),'icon':_0x1bfdb9,'isToggleable':!0x0}),_0x24c793&&(_0x4bca0e['tooltip']=!0x0),this['listenTo'](_0x4bca0e,'execute',()=>this['_toggleDialog']()),_0x4bca0e;}['_hideDialogOnAnnotationEscape']=_0x32505d=>{const _0x5e018f=_0x32505d['source'];if(!this['annotationViews']['has'](_0x5e018f['view']))return;const _0x5a7676=this['editor']['plugins']['get']('Dialog');_0x5a7676['isOpen']&&'commentsArchive'===_0x5a7676['id']&&(_0x5a7676['hide'](),_0x32505d['stop']());};}class Comments extends _0x37df86{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,Comment,CommentThread,gt as CommentThreadController,ie as CommentThreadInputView,Tt as CommentThreadView,_t as CommentView,Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x45b8d8,ContextPlugin as _0x1acf46,PendingActions as lt,Command as _0x46b3e5,Plugin as _0x17f83a,Context as _0x449463}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x795c20,uid as _0x41fdb0,KeystrokeHandler as jt,FocusTracker as _0x153b35,diff as _0x49d132,Collection as _0x4290a9,Rect as _0x3abe6c,CKEditorError as _0x23e2eb,first as _0x114f96,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x596629,keyCodes as _0x25dde1}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x4dfc7d,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x1bcac4,trimHtml as ts,LateFocusDropdownButtonView as _0x56da9d,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x46f821}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,cloneDeep as wt,set as yt,unset as Ct,isEqual as At,debounce as _0x5db34e}from'es-toolkit/compat';import{IconUndo as _0x35dd46,IconCheck as _0x1ec1af,IconPencil as _0x51b9cd,IconRemoveComment as _0x1606e3,IconThreeVerticalDots as _0x11a0d2,IconAddComment as _0x4d6302,IconCommentsArchive as _0x4bca29}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x48fa6b,ButtonView as _0x160831,ViewCollection as _0x522e96,createDropdown as _0x5e1a75,ListView as _0x5567fa,focusChildOnDropdownOpen as _0x428f5e,ListItemView as _0x52e0f7,MenuBarMenuListItemButtonView as _0x210136,BodyCollection as _0x3d2f89,BalloonPanelView as _0x1d9ee6,ContextualBalloon as _0x482d80,Dialog as _0x2e325b,DialogViewPosition as _0x71ad12}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x47b835}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x463810}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x511f26}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x795c20(){['model'];['view'];constructor(_0x23e19e,_0x4b4361){super(),this['model']=_0x23e19e,this['model']['_isAttached']=!0x0,this['view']=_0x4b4361,this['listenTo'](_0x4b4361,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4b4361,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4b4361,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4b4361,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4b4361,'addComment',(_0x20f1b5,_0x1c8261)=>this['addComment'](_0x1c8261)),this['listenTo'](_0x4b4361,'updateComment',(_0x37d6a4,_0x33f310,_0x209e01)=>this['updateComment'](_0x33f310,_0x209e01)),this['listenTo'](_0x4b4361,'removeComment',(_0x51b7e9,_0x3877d2)=>this['removeComment'](_0x3877d2));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x4fae41){this['model']['addComment']({'content':_0x4fae41,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2d8ba0,_0x54e955){this['model']['getComment'](_0x2d8ba0)['update']({'content':_0x54e955});}['removeComment'](_0x5068c2){this['model']['getComment'](_0x5068c2)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x4784a9,_0x1588e8,_0x40dae7){const t=_0x4784a9['t'];switch(_0x1588e8){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'},_0x40dae7);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'},_0x40dae7);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'},_0x40dae7);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'},_0x40dae7);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x40dae7);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'},_0x40dae7);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'},_0x40dae7);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'},_0x40dae7);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0xc20fd9,_0x3e5866){super(_0xc20fd9);const _0x51916a=_0x41fdb0();this['main']=this['createCollection'](),this['editable']=new Vt(_0xc20fd9,_0x3e5866,void 0x0,{'label':()=>N(_0xc20fd9,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xc20fd9['uiLanguageDirection'],'lang':_0xc20fd9['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x51916a},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x4a86f5){super(_0x4a86f5),this['view']=new Rt(_0x4a86f5['locale'],_0x4a86f5['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x5925c2=this['editor']['editing']['view'],_0x2a2684=this['view']['editable'],_0x32b0e1=_0x5925c2['document']['getRoot']();_0x2a2684['name']=_0x32b0e1['rootName'],this['view']['render']();const _0x2a8225=_0x2a2684['element'];this['setEditableElement'](_0x2a2684['name'],_0x2a8225),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5925c2['attachDomRoot'](_0x2a8225),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x795c20(_0x45b8d8){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x50538a={}){function _0xb14844(_0x4eb537){return _0x4eb537['map'](_0x150b90=>String['fromCharCode'](_0x150b90))['join']('');}(_0x50538a=Object['assign']({},_0x50538a))['plugins']||(_0x50538a['plugins']=hs['defaultPlugins']),super(_0x50538a),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xb14844([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xb14844([0x76,0x69,0x65,0x77])][_0xb14844([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xb14844([0x61,0x75,0x74,0x6f]),this[_0xb14844([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xb14844([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xb14844([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xb14844([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xb14844([0x6f,0x6b])});}['create'](){const _0x34dd29=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x34dd29))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x49e45b=>{const _0x423f51=this['model']['document']['getRoot'](),_0xb29685=_0x423f51&&_0x423f51['getChild'](_0x423f51['childCount']-0x1);_0x49e45b['setSelection'](_0xb29685,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1a7f1a=this['editing']['view'],_0x52a3c1=_0x1a7f1a['document']['getRoot'](),_0x276e9c=_0x52a3c1['getChild'](0x0);_0x52a3c1['childCount']>0x1||!_0x276e9c||'p'!=_0x276e9c['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x1a7f1a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x276e9c['placeholder']=this['placeholder']),Ft({'view':_0x1a7f1a,'element':_0x276e9c,'keepOnFocus':!0x0}),this['placeholderElement']=_0x276e9c);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x44a2fd,_0x3c186f={}){super(_0x44a2fd),this['editor']=null,this['_editorConfig']=_0x3c186f,this['set']('value',_0x3c186f['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x44a2fd,'Reply...')),this['set']('submitLabel',N(_0x44a2fd,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x153b35(),this['focusCycler']=new _0x48fa6b({'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',(_0x1a9b95,_0x3dda7e)=>{this['cancelButtonView']['fire']('execute'),_0x3dda7e();}),this['keystrokes']['set']('Ctrl+Enter',(_0x252297,_0x1fed12)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x1fed12());}),this['on']('submit',(_0xc40150,_0xf97140)=>{_0xf97140['length']>0xfde8?(alert(N(_0x44a2fd,'TOO_LONG_COMMENT_ALERT',[_0xf97140['length'],0xfde8])),_0xc40150['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x48e310=this['editor'];this['element']['insertBefore'](_0x48e310['ui']['element'],this['element']['firstChild']),_0x48e310['model']['document']['on']('change',()=>this['value']=_0x48e310['getData']()),_0x48e310['bind']('placeholder')['to'](this),this['focusables']['add'](_0x48e310['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x56eb01){-0x1===_0x56eb01?(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:_0x559264}=this,_0x82e182=new _0x160831(_0x559264);return _0x82e182['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x82e182['withText']=!0x0,_0x82e182['bind']('label')['to'](this,'submitLabel'),_0x82e182['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x82e182['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x24a191,_0x2718f9)=>!_0x2718f9&&!!_0x24a191['trim']()),_0x82e182;}['_createCancelButton'](){const {locale:_0x5edc06}=this,_0x47bbff=new _0x160831(_0x5edc06);return _0x47bbff['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x47bbff['label']=N(_0x5edc06,'Cancel'),_0x47bbff['withText']=!0x0,_0x47bbff['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x47bbff;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4e4200=>{this['focusTracker']['add'](_0x4e4200['element']);}),this['focusables']['on']('change',(_0x140071,_0x24de45)=>{for(const _0x291822 of Array['from'](_0x24de45['added'])['reverse']())this['focusTracker']['add'](_0x291822['element']);});}}class ie extends kt{constructor(_0x3a9c08,_0x3ed097,_0x262abf){super(_0x3a9c08),this['commentInputView']=new es(_0x3a9c08,_0x262abf),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x85a108,_0x5937ae)=>_0x85a108||!!_0x5937ae),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 _0x4dfc7d(_0x3a9c08,_0x3ed097),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'](_0x454d93){this['commentInputView']['focus'](_0x454d93);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5abebc,_0x4319ae)=>{const {submitButtonView:_0x4dc2aa,cancelButtonView:_0x2b3128,editor:_0x5f2a32}=this['commentInputView'];[_0x4dc2aa['element'],_0x2b3128['element'],_0x5f2a32?_0x5f2a32['editing']['view']['getDomRoot']():null]['filter'](_0x5da3b7=>_0x5da3b7)['some'](_0x3274a0=>_0x3274a0['contains'](_0x4319ae['target']))||(this['focus'](),_0x4319ae['preventDefault']());});}}class rs extends kt{constructor(_0x306288){super(_0x306288);const _0x1bab39=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1bab39['to']('count',_0x5e5413=>N(_0x306288,'NUMBER_OF_COMMENTS',_0x5e5413))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x32bc7a,_0x55238e,_0x7f30f3){super(_0x32bc7a);const _0xe048ae=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x55238e['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x55238e,this['_config']=_0x7f30f3,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x153b35(),this['keystrokes']=new jt(),this['focusCycler']=new _0x48fa6b({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x9e3641=>this['commentViews']['map'](_0x47d636=>_0x47d636['element'])['includes'](_0x9e3641['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x32bc7a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5dc2dd=>_0x5dc2dd-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2cb44a of _0x55238e['comments'])this['_handleNewCommentModel'](_0x2cb44a);this['_handleInfoComment'](),this['listenTo'](_0x55238e['comments'],'add',(_0x1d15c5,_0x4d7b4e)=>{const _0x4d40b7=this['_calculatePosition'](_0x4d7b4e);this['length']++,this['_handleNewCommentModel'](_0x4d7b4e,_0x4d40b7),this['refreshVisibleViews']();}),this['listenTo'](_0x55238e['comments'],'remove',(_0x2610e7,_0x140697)=>{this['length']--,this['_handleRemoveCommentModel'](_0x140697),this['refreshVisibleViews']();}),this['listenTo'](_0x55238e,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x55238e,'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',_0xe048ae['if']('length','ck-hidden',_0x1fa859=>!_0x1fa859)],'aria-label':N(_0x32bc7a,'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'](_0x1ca909){-0x1===_0x1ca909?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1454fc of this['commentViews'])_0x1454fc['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1bea7d,_0x1659c0){const _0x5304a2=new this['_config']['CommentView'](this['locale'],_0x1bea7d,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5304a2['viewUid']=_0x1bea7d['id'],_0x5304a2['delegate']('removeComment')['to'](this),_0x5304a2['delegate']('updateComment')['to'](this),_0x5304a2['delegate']('resolveCommentThread')['to'](this),_0x5304a2['delegate']('editorReady')['to'](this),_0x5304a2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5304a2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5304a2,_0x1659c0);}['_calculatePosition'](_0x3c6003){const _0xcade07=this['_model']['_findOptimalIndex'](_0x3c6003);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3c6003['authoredAt']?_0xcade07-0x1:_0xcade07:_0xcade07-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3013e9={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3013e9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3013e9));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3d4c46){const _0x16abc5=this['commentViews']['remove'](_0x3d4c46['id']);this['stopListening'](_0x16abc5),_0x16abc5['isEditMode']&&this['_updateHasDirtyComment'](),_0x16abc5['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4714a7=>_0x4714a7['isEditMode']);}['_rearrangeCollapse'](){const _0x15aeae=function(_0x50a54a){const _0x7590cc=new _0x4290a9();for(const _0x538cb1 of _0x50a54a)_0x7590cc['add'](_0x538cb1);return _0x7590cc;}(this['commentViews']),_0x2575e4=this['_collapsedCommentsView']['count'];for(let _0x24ac18=0x1;_0x24ac18<=_0x2575e4;_0x24ac18++)_0x15aeae['remove'](0x1);for(const _0x3dcc13 of _0x15aeae)_0x3dcc13['collapse']();_0x2575e4>0x0&&_0x15aeae['add'](this['_collapsedCommentsView'],0x1),ns(_0x49d132(Array['from'](this['visibleViews']),Array['from'](_0x15aeae)),this['visibleViews'],_0x15aeae);}['_rearrangeExpand'](){ns(_0x49d132(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2b812d of this['visibleViews'])_0x2b812d['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x22bf01=>{this['focusTracker']['add'](_0x22bf01['element']),this['keystrokes']['listenTo'](_0x22bf01['element']);}),this['commentViews']['on']('change',(_0x4e6f26,_0x3a1782)=>{for(const _0x48ad58 of _0x3a1782['removed'])this['focusTracker']['remove'](_0x48ad58['element']),this['keystrokes']['stopListening'](_0x48ad58['element']);for(const _0x44252a of Array['from'](_0x3a1782['added'])['reverse']())this['focusTracker']['add'](_0x44252a['element']),this['keystrokes']['listenTo'](_0x44252a['element']);});}}function ns(_0x376d75,_0x2b81eb,_0x1b6c51){let _0x581cd4=0x0;for(const _0x22f6e6 of _0x376d75)switch(_0x22f6e6){case'insert':_0x2b81eb['add'](_0x1b6c51['get'](_0x581cd4),_0x581cd4),_0x581cd4++;break;case'delete':_0x2b81eb['remove'](_0x581cd4);break;case'equal':_0x581cd4++;}}class oe extends kt{constructor(_0x5a3e8e){super(_0x5a3e8e);const _0xbdb671=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xbdb671['to']('contextValue',_0x50eccc=>N(_0x5a3e8e,'THREAD_CONTEXT_LABEL',_0x50eccc)),'tabindex':-0x1},'children':[{'text':_0xbdb671['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3e7516,_0x3a37df){super(_0x3e7516);const _0x4920f4=this['bindTemplate'];this['_model']=_0x3a37df,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x153b35(),this['keystrokes']=new jt(),this['focusCycler']=new _0x48fa6b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5db99b=>!!_0x5db99b),this['bind']('contextValue')['to'](this['_model'],'context',_0x53f2b4=>_0x53f2b4&&_0x53f2b4['value']?this['_trimContextValue'](_0x53f2b4['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x4920f4['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 _0x2fc869=new _0x160831(this['locale']);return _0x2fc869['label']=N(this['locale'],'Reopen'),_0x2fc869['tooltip']=N(this['locale'],'Reopen'),_0x2fc869['icon']=_0x35dd46,_0x2fc869['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1a5d0d=>!_0x1a5d0d),_0x2fc869['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x75ee2a,_0x4ab9a3)=>_0x75ee2a&&_0x4ab9a3),_0x2fc869['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2fc869;}['_trimContextValue'](_0x3d1a5c){if(_0x3d1a5c['length']<0x96)return _0x3d1a5c;const _0xb63ba1=_0x3d1a5c['lastIndexOf']('\x20',0x93);return _0x3d1a5c['substring'](0x0,_0xb63ba1>-0x1?_0xb63ba1:0x93)+'...';}['_attachContextActions'](){const _0x5633f1=this['element']['querySelector']('.ck-context'),_0x576b93=_0x5633f1['querySelector']('.ck-context__value');this['listenTo'](_0x5633f1,'mouseenter',()=>{_0x576b93['offsetWidth']<_0x576b93['scrollWidth']&&_0x5633f1['classList']['add']('overlay');}),this['listenTo'](_0x5633f1,'mouseleave',()=>{_0x5633f1['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x12861c of this['focusables'])this['focusTracker']['add'](_0x12861c['element']),this['keystrokes']['listenTo'](_0x12861c['element']);}['_createContextView'](){const _0x46c1a9=new oe(this['locale']);return _0x46c1a9['bind']('contextValue')['to'](this),_0x46c1a9;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xc045,_0x1d1422,_0x3b8e54,_0x171e42){super(_0xc045),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1d1422,this['_localUser']=_0x3b8e54,this['_config']=_0x171e42,this['commentThreadHeaderView']=new Xt(_0xc045,_0x1d1422),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0xc045,N(_0xc045,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0xc045,_0x1d1422,Object['assign']({'CommentView':this['_config']['CommentView']},_0x171e42)),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',(_0x30163d,_0x2898f5)=>_0x30163d||!!_0x2898f5),this['bind']('isUnlinked')['to'](_0x1d1422,'unlinkedAt',_0x34e085=>!!_0x34e085),this['bind']('ariaLabel')['to'](this,'length',_0xfe3b45=>{const _0x1cc37d=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0xfe3b45,_0x1cc37d]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x153b35(),this['keystrokes']=new jt(),this['focusCycler']=new _0x48fa6b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1dfdcf=>_0x1dfdcf['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 _0x472e38=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x206871=_0x472e38['commentInputView'];return _0x472e38['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x206871,'value',(_0x5ab36f,_0x2b6a4e,_0x5210ba,_0xc1d526,_0x41487c)=>!!_0x41487c||!!_0xc1d526&&_0x5210ba&&!_0x2b6a4e||_0x5ab36f&&_0x5210ba&&!_0x2b6a4e),_0x206871['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x381ebf,_0x16b782,_0x3caa34)=>{let _0x2672c5;return _0x2672c5=_0x3caa34&&_0x16b782?'Reply\x20to\x20reopen\x20discussion...':_0x381ebf?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x2672c5);}),_0x206871['bind']('submitLabel')['to'](this,'length',_0x526862=>N(this['locale'],_0x526862?'Reply':'Comment')),_0x206871['on']('submit',(_0x8aa8bc,_0x17438b)=>{this['fire']('addComment',_0x17438b),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x206871['on']('cancel',()=>{this['focus']();}),_0x206871['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x206871['on']('cancel',_0x125909=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x125909['stop']());}),this['on']('change:isActive',(_0x427136,_0x5521a3,_0x313564)=>{_0x313564||this['length']||_0x206871['value']||this['fire']('removeCommentThread');}),_0x472e38;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x5f117e,_0x4a2910,_0x5162f7,_0x3e450c){super(_0x5f117e,_0x4a2910,_0x5162f7,_0x3e450c),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5f117e,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x33123f,_0x46d14e,_0xca2f5d)=>{_0xca2f5d||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x454a63,_0x599c2e,_0x344c84)=>{_0x344c84&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x505bee=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x505bee['if']('isActive','ck-thread--active'),_0x505bee['if']('isUnlinked','ck-thread--unlinked'),_0x505bee['to']('actionIndicator',_0x366a15=>_0x366a15?'ck-thread--'+_0x366a15:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x505bee['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 _0x49ee37 of this['commentsListView']['commentViews'])_0x49ee37['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3dfeef}=this,_0x210102=this['commentsListView']['commentViews']['get'](0x0);_0x210102===this['_boundFirstCommentView']||_0x210102['isSystemComment']||(this['_boundFirstCommentView']=_0x210102,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x210102,'actionIndicator',_0x174d08=>'remove'===_0x174d08?'remove':null),_0x210102['placeholder']=N(_0x3dfeef,'Write\x20a\x20comment...'),_0x210102['removeButton']['on']('execute',_0xbc6e1=>{_0xbc6e1['stop'](),this['showConfirm'](N(_0x3dfeef,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x210102['focus']();}),_0x210102['actionBar']['add'](this['resolveButton'],0x0),_0x210102['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4c5eac=new _0x1bcac4(this['locale']);return _0x4c5eac['label']=N(this['locale'],'Resolve'),_0x4c5eac['tooltip']=N(this['locale'],'Resolve'),_0x4c5eac['icon']=_0x1ec1af,_0x4c5eac['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4c5eac['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5a436b=>!_0x5a436b),_0x4c5eac['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3be2af,_0x54ee74)=>_0x3be2af&&!_0x54ee74),_0x4c5eac['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4c5eac;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x2de01e){super(_0x2de01e),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0xd4edaf,_0x59734b,_0x6c6124)=>{this['element']['innerHTML']=_0x6c6124;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x3a8bbc,_0x291237,_0x11575c){super(_0x3a8bbc),this['_model']=_0x291237,this['_config']=_0x11575c,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x291237,'content',_0x291237,'authoredAt',(_0x367806,_0x37f647)=>N(_0x3a8bbc,'COMMENT_ARIA_LABEL',[_0x291237['author']['name'],_0x11575c['formatDateTime'](_0x37f647),new DOMParser()['parseFromString'](_0x367806,'text/html')['body']['textContent'],_0x291237['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x3a8bbc,N(_0x3a8bbc,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x522e96(),this['focusTracker']=new _0x153b35(),this['keystrokes']=new jt(),this['focusCycler']=new _0x48fa6b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3953b4=>_0x3953b4['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x3dad1a=new is(this['locale']);return _0x3dad1a['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x22cee5,_0x6c3b8d)=>_0x6c3b8d?ts(_0x22cee5,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x22cee5),_0x3dad1a;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4e0d1b=new es(this['locale'],this['_config']['editorConfig']);return _0x4e0d1b['value']=this['_model']['content'],_0x4e0d1b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4e0d1b['submitLabel']=N(this['locale'],'Save'),_0x4e0d1b['on']('submit',(_0x3563d7,_0x4c9225)=>{this['fire']('updateComment',this['_model']['id'],_0x4c9225),this['switchToDisplayMode'](),this['focus']();}),_0x4e0d1b['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4e0d1b['once']('editorReady',()=>{_0x4e0d1b['focus']();}),_0x4e0d1b['createEditor'](),_0x4e0d1b['delegate']('editorReady')['to'](this),_0x4e0d1b['delegate']('editorDestroyed')['to'](this),_0x4e0d1b;}['_setupKeyboardNavigation'](){const _0x105104=this['element'];this['keystrokes']['listenTo'](_0x105104);for(const _0x8aa8a3 of this['focusables'])this['focusTracker']['add'](_0x8aa8a3['element']),this['keystrokes']['listenTo'](_0x8aa8a3['element']);this['focusables']['on']('change',(_0x3c979d,_0xd29509)=>{for(const _0xafb361 of _0xd29509['removed'])this['focusTracker']['remove'](_0xafb361['element']),this['keystrokes']['stopListening'](_0xafb361['element']);for(const _0x58dd14 of _0xd29509['added'])this['focusTracker']['add'](_0x58dd14['element']),this['keystrokes']['listenTo'](_0x58dd14['element']);}),this['keystrokes']['set']('enter',(_0x3a5057,_0x59533c)=>{_0x105104===_0x3a5057['target']&&(this['focusCycler']['focusFirst'](),_0x59533c());}),this['keystrokes']['set']('esc',(_0x437258,_0x2299d1)=>{_0x105104!==_0x437258['target']&&(this['focus'](),_0x2299d1());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x36b68a,_0x20684b,_0x1f1dbb){super(_0x36b68a,_0x20684b,_0x1f1dbb),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x36b68a,'Reply...')),this['bind']('authoredAt')['to'](_0x20684b),this['bind']('resolvedAt')['to'](_0x20684b),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 _0x4dfc7d(_0x36b68a,_0x20684b['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x20684b,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x5734fc=this['bindTemplate'],_0x53ba59=[{'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':_0x5734fc['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x5734fc['to']('authoredAt',_0x41cb96=>this['_config']['formatDateTime'](_0x41cb96))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x5734fc['if']('isEditMode','ck-comment__actions--hidden'),_0x5734fc['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']&&_0x53ba59['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x5734fc['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x5734fc['if']('isEditMode','ck-comment--edit'),_0x5734fc['if']('isSystemComment','ck-comment--info'),_0x5734fc['to']('actionIndicator',_0x4ca9c0=>_0x4ca9c0?'ck-comment--'+_0x4ca9c0:'')],'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':_0x53ba59}]}]};}['_createEditButton'](){const _0xb54f0c=new _0x160831(this['locale']);return _0xb54f0c['label']=N(this['locale'],'Edit'),_0xb54f0c['icon']=_0x51b9cd,_0xb54f0c['withText']=!0x0,_0xb54f0c['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xb54f0c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x593bc5=>!_0x593bc5),_0xb54f0c['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xb54f0c['on']('execute',()=>this['switchToEditMode']()),_0xb54f0c;}['_createRemoveButton'](){const _0x5f1b0e=new _0x160831(this['locale']);return _0x5f1b0e['label']=N(this['locale'],'Remove'),_0x5f1b0e['icon']=_0x1606e3,_0x5f1b0e['withText']=!0x0,_0x5f1b0e['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5f1b0e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1a8356=>!_0x1a8356),_0x5f1b0e['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5f1b0e['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5f1b0e;}['_createDropdown'](){const _0x49b8c1=_0x5e1a75(this['locale'],_0x56da9d),_0x2bc4e=_0x49b8c1['panelView']['children'],_0x465f3a=new _0x5567fa(this['locale']),_0x40a32f=_0x49b8c1['bindTemplate'];_0x428f5e(_0x49b8c1,()=>this['items']['find'](_0x42200d=>_0x42200d['isVisible'])),_0x49b8c1['extendTemplate']({'attributes':{'class':[_0x40a32f['if']('isVisible','ck-hidden',_0x1195a6=>!_0x1195a6)]}});const _0x26a938=(_0x119ccd,_0x1b0178=-0x1)=>{const _0x1715a1=new _0x52e0f7(this['locale']);_0x1715a1['children']['add'](_0x119ccd);const _0x2081d1=_0x1b0178>-0x1?_0x1b0178:_0x465f3a['items']['length'];_0x465f3a['items']['add'](_0x1715a1,_0x2081d1);const _0x37764e=Array['from'](this['items']);_0x49b8c1['unbind']('isEnabled','isVisible'),_0x49b8c1['bind']('isEnabled')['toMany'](_0x37764e,'isEnabled',(..._0x57edd0)=>_0x57edd0['some'](_0x3f4369=>_0x3f4369)),_0x49b8c1['bind']('isVisible')['toMany'](_0x37764e,'isVisible',(..._0x16a530)=>_0x16a530['some'](_0x490585=>_0x490585));};_0x49b8c1['panelPosition']='sw',_0x49b8c1['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x11a0d2});for(const _0x73b629 of this['items'])_0x26a938(_0x73b629);return _0x2bc4e['add'](_0x465f3a),_0x49b8c1['listenTo'](this['items'],'add',(_0x182203,_0xe0b495,_0x3198ff)=>{_0x26a938(_0xe0b495,_0x3198ff);}),_0x49b8c1['listenTo'](this['items'],'remove',(_0x4aa0d9,_0x4b50ff,_0x7dbd89)=>{_0x465f3a['items']['remove'](_0x7dbd89);}),_0x49b8c1;}['_attachActions'](_0xd44903,_0x53eb0c){const _0x2d15f8=_0xd44903&&_0xd44903['element'];_0x2d15f8&&(this['listenTo'](_0x2d15f8,'mouseenter',()=>this['actionIndicator']=_0x53eb0c),this['listenTo'](_0x2d15f8,'focus',()=>this['actionIndicator']=_0x53eb0c),this['listenTo'](_0x2d15f8,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2d15f8,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x8eadc2=super['_createCommentInputView']();return _0x8eadc2['bind']('placeholder')['to'](this),_0x8eadc2;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x181783){const _0x130c1f=Dt(_0x181783,0x1e),_0x117da5=new MutationObserver(_0x366782=>{for(const _0x4418a3 of _0x366782)('attributes'==_0x4418a3['type']&&'class'==_0x4418a3['attributeName']||'childList'==_0x4418a3['type']||'characterData'==_0x4418a3['type'])&&_0x130c1f();});return{'attach'(_0xd3bbff){_0x117da5['observe'](_0xd3bbff,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x117da5['disconnect'](),_0x130c1f['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2efc45,_0x1a9dc4){super(_0x2efc45),this['id']=_0x41fdb0(),this['focusTracker']=new _0x153b35(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x33c481,_0x36261a)=>this['fire']('Esc',_0x36261a)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x1a9dc4),this['mainView']=_0x1a9dc4;const _0x281f9f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x281f9f['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 _0x36572f=this['element']['clientHeight'];_0x36572f&&(this['height']=_0x36572f);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x795c20(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5d94cf,target:_0x4b6afc,type:_0x51bde3,isVisible:_0x3aad30=!0x0}){super(),this['view']=_0x5d94cf,this['view']['element']||this['view']['render'](),this['_type']=_0x51bde3,this['_target']=_0x4b6afc,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4290a9([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x36bbd5,_0x54e16b)=>{this['view']['focusTracker']['add'](_0x54e16b);}),this['focusableElements']['on']('remove',(_0x27dd32,_0x756c67)=>{this['view']['focusTracker']['remove'](_0x756c67);}),this['set']('isVisible',_0x3aad30);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1d688a=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x1d688a),_0x1d688a;}get['targetRect'](){const _0x34640c=this['target'];if(null===_0x34640c)return null;if(_0x34640c instanceof _0x3abe6c)return _0x34640c;const _0x41ce05=_0x34640c['filter'](_0x5371c6=>function(_0x5955a4){const _0x40c966=_0x5955a4['offsetParent'];if(_0x40c966)return!0x0;const _0x51ae06=_0x5955a4['getClientRects']()['item'](0x0);return!!_0x51ae06;}(_0x5371c6));return 0x0===_0x41ce05['length']?null:new _0x3abe6c(_0x41ce05[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x85c126){this['view']['isActive']=_0x85c126,this['view']['mainView']['isActive']=_0x85c126;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x2c3929){if(!(null===_0x2c3929||_0x2c3929 instanceof _0x3abe6c||Array['isArray'](_0x2c3929)&&_0x2c3929['every'](_0x344680=>re(_0x344680))))throw new _0x23e2eb('annotation-invalid-target',null,{'target':_0x2c3929});}['_getNormalizedTarget'](){const _0x24712='function'==typeof this['_target']?this['_target']():this['_target'];return re(_0x24712)?[_0x24712]:_0x24712;}}function re(_0x1fafa7){return null!==_0x1fafa7&&'object'==typeof _0x1fafa7&&'nodeType'in _0x1fafa7&&0x1===_0x1fafa7['nodeType'];}class S extends _0x4290a9{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x25bd3c=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x153b35(),this['_focusTracker']['on']('change:isFocused',(_0x5b93d8,_0x1736e9,_0x15c0dd)=>{_0x15c0dd||this['fire']('blur');});for(const _0x54c113 of _0x25bd3c)this['add'](_0x54c113);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x442079){if(this['has'](_0x442079))throw new _0x23e2eb('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x442079['innerView'],_0x442079),this['_viewToAnnotation']['set'](_0x442079['view'],_0x442079);for(const _0x2e2969 of _0x442079['focusableElements'])this['_focusTracker']['add'](_0x2e2969);this['listenTo'](_0x442079['focusableElements'],'add',(_0x16a1ca,_0x184b8c)=>{this['_focusTracker']['add'](_0x184b8c);}),this['listenTo'](_0x442079['focusableElements'],'remove',(_0x55dfd0,_0x52cd85)=>{this['_focusTracker']['remove'](_0x52cd85);}),this['listenTo'](_0x442079['view']['focusTracker'],'change:isFocused',(_0x42a7ba,_0xc649d0,_0x5d83a1)=>{_0x5d83a1&&this['fire']('focus',_0x442079);}),_0x442079['updateTargetRect']();const _0x18cd55=this['_getOrderInContent'](_0x442079['view']['targetRect']);return super['add'](_0x442079,_0x18cd55);}['remove'](_0x140e36){if(!this['has'](_0x140e36))throw new _0x23e2eb('annotationcollection-not-existing-item',null);this['stopListening'](_0x140e36['view']['focusTracker']),this['stopListening'](_0x140e36['focusableElements']);for(const _0x1bfad5 of _0x140e36['focusableElements'])this['_focusTracker']['remove'](_0x1bfad5);return this['_viewToAnnotation']['delete'](_0x140e36['view']),this['_innerViewToAnnotation']['delete'](_0x140e36['innerView']),super['remove'](_0x140e36);}['getByInnerView'](_0x583cac){return this['_innerViewToAnnotation']['get'](_0x583cac);}['getByView'](_0x330623){return this['_viewToAnnotation']['get'](_0x330623);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x28f4d7 of this)_0x28f4d7['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2e6cc9=Array['from'](this)['sort']((_0x32f4e6,_0x3c96fb)=>w(_0x32f4e6['view']['targetRect'],_0x3c96fb['view']['targetRect']));for(let _0x1cb71f=_0x2e6cc9['length']-0x1;_0x1cb71f>0x0;_0x1cb71f--){const _0x4a1121=_0x2e6cc9[_0x1cb71f];_0x1cb71f!==this['getIndex'](_0x4a1121)&&(this['remove'](_0x4a1121),this['add'](_0x4a1121));}}['_getOrderInContent'](_0xb72eb){let _0x1aa602=0x0;if(!_0xb72eb)return this['length'];for(const _0x413d1a of this){const _0x46531f=_0x413d1a['view']['targetRect'];if(_0x46531f){if(w(_0xb72eb,_0x46531f)<0x0)return _0x1aa602;_0x1aa602++;}}return _0x1aa602;}}function v({source:_0x8b2b79,target:_0x4b7fa4,filter:_0x5868ed}){for(const _0x24abd4 of _0x8b2b79)_0x5868ed(_0x24abd4)&&_0x4b7fa4['add'](_0x24abd4);_0x4b7fa4['listenTo'](_0x8b2b79,'add',(_0x540a33,_0x5f7aab)=>{_0x5868ed(_0x5f7aab)&&_0x4b7fa4['add'](_0x5f7aab);}),_0x4b7fa4['listenTo'](_0x8b2b79,'remove',(_0x150971,_0x1dddbd)=>{_0x4b7fa4['has'](_0x1dddbd)&&_0x4b7fa4['remove'](_0x1dddbd);});}function w(_0x4d039f,_0x58ec8c){if(null===_0x4d039f&&null===_0x58ec8c)return 0x0;if(null===_0x4d039f)return-0x1;if(null===_0x58ec8c)return 0x1;const _0x469697=_0x4d039f['top']-_0x58ec8c['top'];return 0x0==_0x469697?_0x4d039f['left']-_0x58ec8c['left']:_0x469697;}class y extends _0x1acf46{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56e6fd){if(super(_0x56e6fd),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x56e6fd instanceof _0x45b8d8){const _0x11ec2c=_0x56e6fd['locale'];_0x56e6fd['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x11ec2c,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x11ec2c,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x11ec2c,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x11ec2c,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x11ec2c,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x11ec2c,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x11ec2c,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x41b9b9){this['collection']['add'](_0x41b9b9);}['remove'](_0x22735f){this['collection']['remove'](_0x22735f),_0x22735f['destroy']();}['refreshVisibility'](){for(const _0x5cc309 of this['collection'])_0x5cc309['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0xebc123){return this['collection']['getByInnerView'](_0xebc123);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x96f629 of this['collection'])_0x96f629['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x49e196){this['fire']('_activateAnnotation',_0x49e196);}['createAnnotation'](_0x14505b){return new T(_0x14505b);}['createAnnotationView'](_0x5b3116,_0x308fb4){return new E(_0x5b3116,_0x308fb4);}['_addActiveAnnotation'](_0x2be9a0){const _0x5b0b0b=new Set(this['activeAnnotations']);_0x5b0b0b['add'](_0x2be9a0),this['activeAnnotations']=_0x5b0b0b;}['_removeActiveAnnotation'](_0x24a8ae){const _0x5448b0=new Set(this['activeAnnotations']);_0x5448b0['delete'](_0x24a8ae),this['activeAnnotations']=_0x5448b0;}['_bindAnnotationsToVisibleAnnotations'](){const _0x30ede3=this['collection'],_0x2ffc6e=this['_visibleAnnotations'];function _0x3320b0(_0x448d47){const _0x3970de=_0x448d47['source'];_0x3970de['isVisible']&&!_0x2ffc6e['has'](_0x3970de)?_0x2ffc6e['add'](_0x3970de):!_0x3970de['isVisible']&&_0x2ffc6e['has'](_0x3970de)&&_0x2ffc6e['remove'](_0x3970de),_0x3970de['view']['focusTracker']['remove'](_0x3970de['view']['element']),_0x3970de['view']['focusTracker']['add'](_0x3970de['view']['element']);}this['listenTo'](_0x30ede3,'add',(_0xd673b9,_0xadee64)=>{_0xadee64['isVisible']&&_0x2ffc6e['add'](_0xadee64),this['listenTo'](_0xadee64,'change:isVisible',_0x3320b0);}),this['listenTo'](_0x30ede3,'remove',(_0x3497ef,_0x49980b)=>{_0x2ffc6e['has'](_0x49980b)&&_0x2ffc6e['remove'](_0x49980b),this['stopListening'](_0x49980b,'change:isVisible',_0x3320b0);});}['_setupEnterAnnotationKeystroke'](){const _0x1fcb16=_0x10881f=>{_0x10881f['on']('ready',()=>{_0x10881f['keystrokes']['set'](_0x463810,(_0x59982e,_0x3aacf7)=>{const _0x994beb=_0x114f96(this['activeAnnotations']['values']());_0x994beb&&(_0x994beb['view']['focus'](),_0x3aacf7());});});};this['context']instanceof _0x45b8d8?_0x1fcb16(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5ae8b0,_0x194151)=>{_0x1fcb16(_0x194151);});}['_setupEscapeAnnotationHandling'](){const _0x1f4e15=_0x1e6c9a=>{const _0x103a24=_0x1e6c9a['source'],_0x10cc78=[];let _0x509702;if(Array['isArray'](_0x103a24['target'])){_0x509702=_0x103a24['target'][0x0],this['context']instanceof _0x45b8d8?_0x10cc78['push'](this['context']):this['context']['editors']&&_0x10cc78['push'](...this['context']['editors']);for(const _0x4cbd49 of _0x10cc78)for(const _0x2ed2c6 of _0x4cbd49['editing']['view']['domRoots']['values']())if(_0x2ed2c6['contains'](_0x509702))return void _0x4cbd49['editing']['view']['focus']();_0x509702['focus']();}};this['listenTo'](this['collection'],'add',(_0x108fe5,_0x458851)=>{this['listenTo'](_0x458851,'escape',_0x1f4e15,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x177fc5,_0x257f24)=>{this['stopListening'](_0x257f24,'escape',_0x1f4e15);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1acf46{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x15e9ba){super(_0x15e9ba),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x550895=this['context']['config'];_0x550895['define']('comments.maxCommentsWhenCollapsed',0x2),_0x550895['define']('comments.maxThreadTotalWeight',0x1f4),_0x550895['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x550895['define']('comments.CommentThreadView',gt),_0x550895['define']('comments.CommentView',Tt),_0x550895['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x416d44=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x1f3303,_0x3ef9c4)=>this['_addCommentThread'](_0x3ef9c4)),this['on']('submitCommentThread',(_0x4e2815,_0x57d5f6)=>this['_submitCommentThread'](_0x57d5f6)),this['on']('resolveCommentThread',(_0x21ffba,_0x3ac45a)=>this['_resolveCommentThread'](_0x3ac45a)),this['on']('resolveCommentThread',(_0x515be4,_0xc074dc)=>this['_updateActiveAnnotation'](_0xc074dc),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xb05868,_0x259d24)=>this['_reopenCommentThread'](_0x259d24)),this['on']('reopenCommentThread',(_0x53f180,_0x201e4b)=>this['_updateActiveAnnotation'](_0x201e4b),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x590ba5,_0x3f8b84)=>this['_removeCommentThread'](_0x3f8b84)),this['on']('updateCommentThread',(_0x41e265,_0x13ce10)=>this['_updateCommentThread'](_0x13ce10)),this['on']('updateCommentThread',(_0x113c9f,_0x730091)=>this['_updateActiveAnnotation'](_0x730091),{'priority':'lowest'}),this['on']('addComment',(_0x454f71,_0x32d8c2)=>this['_addComment'](_0x32d8c2)),this['on']('updateComment',(_0x2796cc,_0x56d29e)=>this['_updateComment'](_0x56d29e)),this['on']('removeComment',(_0x4bf801,_0x508ef2)=>this['_removeComment'](_0x508ef2)),this['on']('addComment',(_0xcc3e2,{threadId:_0x5b7717,isFromAdapter:_0x4bf038})=>{if(_0x4bf038)return;const _0x444836=this['getCommentThread'](_0x5b7717),_0x500a6a=_0x444836&&this['_threadToController']['get'](_0x444836);_0x500a6a&&_0x500a6a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x416d44,'change:activeAnnotations',(_0x623643,_0x5be4b8,_0x43d8b0)=>{const _0x37f0bb=Array['from'](_0x43d8b0)['map'](_0x1d4c53=>this['_viewToController']['get'](_0x1d4c53['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x37f0bb?_0x37f0bb['model']:null;});}set['adapter'](_0x3c269e){if(this['_adapter'])throw new _0x23e2eb('commentsrepository-adapter-already-set');this['_adapter']=_0x3c269e;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3d22c5=_t,threadId:_0xaef21d=_0x41fdb0(),comments:_0x23f27f=[],unlinkedAt:_0x562a06=null,resolvedAt:_0x235c7b=null,resolvedBy:_0x37dd5e=null,target:_0x2f54c5=null,context:_0x4d7b99=null,attributes:_0x38915f={},isResolvable:_0x8c1d2d=!0x0,isSubmitted:_0x1fc3c9=!0x1,isFromAdapter:_0x4a23f0=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x3d22c5),{'channelId':_0x3d22c5,'threadId':_0xaef21d,'comments':_0x23f27f,'unlinkedAt':_0x562a06,'resolvedAt':_0x235c7b,'resolvedBy':_0x37dd5e,'target':_0x2f54c5,'context':_0x4d7b99,'attributes':_0x38915f,'isFromAdapter':_0x4a23f0,'isResolvable':_0x8c1d2d,'isSubmitted':_0x1fc3c9}),this['getCommentThread'](_0xaef21d);}['openNewCommentThread']({channelId:_0x14076e=_t,threadId:_0x4509d8=_0x41fdb0(),target:_0x32e845,context:_0x140d74=null,isResolvable:_0xfd4067=!0x0}){if(this['_readOnlyChannels']['has'](_0x14076e)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x32e845)throw new _0x23e2eb('commentsrepository-missing-target');const _0x4be873=this['addCommentThread']({'channelId':_0x14076e,'threadId':_0x4509d8,'target':_0x32e845,'context':_0x140d74,'isResolvable':_0xfd4067});if(!_0x4be873)return null;const _0x135eef=this['_threadToController']['get'](_0x4be873),_0x1b8369=_0x135eef['view']['commentThreadInputView']['commentInputView'],_0x17e2cb=this['context']['plugins']['get'](y),_0x524a52=_0x17e2cb['getByInnerView'](_0x135eef['view']);return _0x17e2cb['activate'](_0x524a52),_0x1b8369['once']('editorReady',()=>_0x1b8369['focus']()),_0x4be873;}['hasCommentThread'](_0x2bb9b2){if('string'!=typeof _0x2bb9b2)throw new _0x23e2eb('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2bb9b2);}['updateCommentThread']({channelId:_0x11bf1=_t,threadId:_0x5c5d6a,context:_0xcd2930,unlinkedAt:_0x4b8ab0,attributes:_0x232d02,isFromAdapter:_0xa796f4=!0x1}){return this['fire'](Nt('updateCommentThread',_0x11bf1),{'channelId':_0x11bf1,'threadId':_0x5c5d6a,'context':_0xcd2930,'unlinkedAt':_0x4b8ab0,'attributes':_0x232d02,'isFromAdapter':_0xa796f4}),this['getCommentThread'](_0x5c5d6a);}['getCommentThread'](_0x4d355c){if('string'!=typeof _0x4d355c)throw new _0x23e2eb('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4d355c);}['fetchCommentThread']({channelId:_0x385b9,threadId:_0x6885f0}={}){const _0x299f5f=this['getCommentThread'](_0x6885f0);if(_0x299f5f)return Promise['resolve'](_0x299f5f);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x23e2eb('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x385b9,'threadId':_0x6885f0})['then'](_0x1253d2=>this['hasCommentThread'](_0x6885f0)?this['getCommentThread'](_0x6885f0):_0x1253d2?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x385b9},_0x1253d2)):void 0x0)['catch'](_0x5ddcba=>{throw console['error'](_0x5ddcba),new _0x23e2eb('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x19d988,skipNotAttached:_0x428492=!0x1,skipEmpty:_0x13a0a1=!0x1,toJSON:_0x42302b=!0x1}={}){const _0x5a4e29=[];for(const _0x2c792e of this['_threads']['values']())_0x19d988&&_0x2c792e['channelId']!==_0x19d988||_0x428492&&!_0x2c792e['isAttached']||_0x13a0a1&&0x0===_0x2c792e['length']||_0x5a4e29['push'](_0x2c792e);return _0x42302b?_0x5a4e29['map'](_0x4be9d8=>_0x4be9d8['toJSON']()):_0x5a4e29;}['getAnnotationForCommentThread'](_0x5cb2b2){const _0x1576f7=this['_threadToController']['get'](_0x5cb2b2);if(!_0x1576f7)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x1576f7['view'])||null;}['getCommentThreadForAnnotation'](_0x469b8f){const _0x418382=this['_viewToController']['get'](_0x469b8f['innerView']);return _0x418382?_0x418382['model']:null;}['setActiveCommentThread'](_0x1b9267){const _0x307104=this['context']['plugins']['get'](y);if(!_0x1b9267)return void(this['activeCommentThread']&&_0x307104['deactivateAll']());const _0x25a849=this['getCommentThread'](_0x1b9267);if(!_0x25a849)throw new _0x23e2eb('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1b9267});if(!this['_threadToController']['has'](_0x25a849))throw new _0x23e2eb('commentsrepository-active-not-attached',null,{'threadId':_0x1b9267});const _0x29d717=_0x307104['getByInnerView'](this['_threadToController']['get'](_0x25a849)['view']);_0x307104['activate'](_0x29d717);}['switchReadOnly'](_0x13d025,_0x2a3a10){_0x13d025?this['_readOnlyChannels']['add'](_0x2a3a10):this['_readOnlyChannels']['delete'](_0x2a3a10),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x16420b){return this['_readOnlyChannels']['has'](_0x16420b)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4a795f,_0x2b6a70){return new vt(_0x4a795f,_0x2b6a70);}['setPermissions'](_0x27e585,_0x2d7835=_t){this['_permissions']['set'](_0x2d7835,_0x27e585),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x17ba15=_t){return this['_permissions']['has'](_0x17ba15)?this['_permissions']['get'](_0x17ba15):bt;}['_addCommentThread']({channelId:_0x48fa86,threadId:_0x1edbf5,comments:_0x5c2716,unlinkedAt:_0x41132e,resolvedAt:_0x4bf9a0,resolvedBy:_0x241da5,target:_0x120cb4,context:_0x365341,attributes:_0x2b0a09,isFromAdapter:_0x799095,isResolvable:_0x3e8f54,isSubmitted:_0x8c8f65}){if('string'!=typeof _0x1edbf5)throw new _0x23e2eb('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1edbf5});if(this['hasCommentThread'](_0x1edbf5))throw new _0x23e2eb('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1edbf5});const _0x754f8b=new CommentThread(this,{'channelId':_0x48fa86,'id':_0x1edbf5,'context':_0x365341,'attributes':_0x2b0a09,'unlinkedAt':_0x41132e,'resolvedAt':_0x4bf9a0,'resolvedBy':_0x241da5?this['context']['plugins']['get'](it)['getUser'](_0x241da5):null,'isResolvable':_0x3e8f54,'isSubmitted':_0x8c8f65||_0x799095});this['_threads']['set'](_0x1edbf5,_0x754f8b);for(const _0x239f4b of _0x5c2716)_0x754f8b['_add'](this['_createNewComment']({'threadId':_0x1edbf5,..._0x239f4b}));return _0x120cb4&&_0x754f8b['attachTo'](_0x120cb4),_0x799095||!_0x754f8b['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x48fa86,'threadId':_0x1edbf5});}['_submitCommentThread']({channelId:_0x4709f5,threadId:_0x2fada3}){if(!this['hasCommentThread'](_0x2fada3))throw new _0x23e2eb('commentsrepository-missing-comment-thread',this);const _0x1447ca=this['getCommentThread'](_0x2fada3);if(_0x1447ca['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x1e8db3,comments:_0x25c704,resolvedAt:_0x164451,resolvedBy:_0x36fcf9,context:_0x76a888,attributes:_0x52be43}=_0x1447ca,_0x15b0ff=this['context']['plugins']['get']('PendingActions'),_0x8c5199=_0x15b0ff['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4709f5,'threadId':_0x1e8db3,'comments':_0x25c704['map'](_0x2f88b5=>_0x2f88b5['toJSON']()),'resolvedAt':_0x164451,'resolvedBy':_0x36fcf9?_0x36fcf9['id']:_0x36fcf9,'context':_0x76a888,'attributes':_0x52be43})['then'](({comments:_0x529980})=>{_0x15b0ff['remove'](_0x8c5199);for(const _0x4b948c of _0x529980)this['_updateComment']({'channelId':_0x4709f5,'threadId':_0x2fada3,'commentId':_0x4b948c['commentId'],'createdAt':_0x4b948c['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x7f0cff=>{throw console['error'](_0x7f0cff),new _0x23e2eb('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2f667b,target:_0x2c2060}){const _0x179fa6=this['getCommentThread'](_0x2f667b);if(!_0x179fa6)throw new _0x23e2eb('commentsrepository-attach-missing-comment-thread',this);const _0x9cb251=this['context']['plugins']['get']('PendingActions'),_0x28b526=this['context']['plugins']['get'](y),_0x4481e0=this['_createCommentThreadView'](_0x179fa6),_0x2c160e=new vt(_0x179fa6,_0x4481e0);let _0x4a6038=null;_0x4481e0['on']('change:isDirty',(_0x4d86bb,_0xf7d047,_0x21ea47)=>{_0x21ea47?_0x4a6038=_0x9cb251['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4a6038&&(_0x9cb251['remove'](_0x4a6038),_0x4a6038=null);}),this['_threadToController']['set'](_0x179fa6,_0x2c160e),this['_viewToController']['set'](_0x4481e0,_0x2c160e);const _0x45a004=new E(this['context']['locale'],_0x4481e0);_0x45a004['bind']('length')['to'](_0x4481e0),_0x45a004['bind']('isDirty')['to'](_0x4481e0,'isDirty',_0x4481e0,'length',(_0xea0f4c,_0x3e3a60)=>_0xea0f4c||!_0x3e3a60),_0x45a004['bind']('isActive')['to'](_0x4481e0),_0x45a004['type']='comment';const _0xeca21d=new T({'view':_0x45a004,'target':_0x2c2060,'type':'comment','isVisible':!_0x179fa6['archivedAt']&&!!('function'==typeof _0x2c2060?_0x2c2060():_0x2c2060)});return _0x4481e0['on']('escape',()=>{_0xeca21d['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4481e0,_0xeca21d),_0x28b526['add'](_0xeca21d),_0xeca21d;}['_bindAnnotationToEditors'](_0x186251,_0x3901ef){this['listenTo'](_0x186251,'editorReady',(_0x2d5b78,_0x6d6687)=>{const _0x2b6cea=_0x6d6687['ui']['view']['body']['bodyCollectionContainer'];_0x3901ef['focusableElements']['add'](_0x2b6cea),this['context']instanceof _0x45b8d8&&this['context']['ui']['focusTracker']['add'](_0x2b6cea);},{'priority':'highest'}),this['listenTo'](_0x186251,'editorDestroyed',(_0x3a2a70,_0x413b5e)=>{const _0x19cebf=_0x413b5e['ui']['view']['body']['bodyCollectionContainer'];_0x3901ef['focusableElements']['has'](_0x19cebf)&&_0x3901ef['focusableElements']['remove'](_0x19cebf),this['context']instanceof _0x45b8d8&&this['context']['ui']['focusTracker']['remove'](_0x19cebf);});}['_unbindEditors'](_0x20b04f){this['stopListening'](_0x20b04f,'editorReady'),this['stopListening'](_0x20b04f,'editorDestroyed');}['_createCommentThreadView'](_0x333bdf){const _0x1e2f08=this['context']['plugins']['get'](it),{config:_0x261f0c,locale:_0x4ba60a}=this['context'],_0x90d320=pt(_0x261f0c['get']('locale'),_0x4ba60a);return new(0x0,(_0x261f0c['get']('comments'))['CommentThreadView'])(_0x4ba60a,_0x333bdf,_0x1e2f08['me'],{'editorConfig':{..._0x261f0c['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x261f0c['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x261f0c['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x261f0c['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x261f0c['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x90d320,'CommentView':_0x261f0c['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5d3ffe,channelId:_0x200fea,resolvedAt:_0x12ea29,resolvedBy:_0x561022,isFromAdapter:_0x415bdf}){if(!this['hasCommentThread'](_0x5d3ffe))throw new _0x23e2eb('commentsrepository-missing-comment-thread',null,{'threadId':_0x5d3ffe});const _0x462815=this['getCommentThread'](_0x5d3ffe);if(_0x462815['isResolved'])throw new _0x23e2eb('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5d3ffe});const _0x577b03=this['context']['plugins']['get'](it);if(_0x462815['resolvedBy']=_0x577b03['getUser'](_0x561022),_0x462815['resolvedAt']=_0x12ea29,_0x415bdf||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5c4177=this['context']['plugins']['get']('PendingActions'),_0x13b183=_0x5c4177['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x200fea,'threadId':_0x5d3ffe})['then'](({resolvedAt:_0x27634d,resolvedBy:_0x43a46c})=>{_0x5c4177['remove'](_0x13b183),_0x462815['resolvedBy']['id']!==_0x43a46c&&(_0x462815['resolvedBy']=_0x577b03['getUser'](_0x43a46c)),_0x462815['resolvedAt']=_0x27634d;})['catch'](_0x81c566=>{throw console['error'](_0x81c566),new _0x23e2eb('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3e4d64,channelId:_0x3e85b6,isFromAdapter:_0x4823ed}){if(!this['hasCommentThread'](_0x3e4d64))throw new _0x23e2eb('commentsrepository-missing-comment-thread',null,{'threadId':_0x3e4d64});const _0x231aad=this['getCommentThread'](_0x3e4d64);if(!_0x231aad['isResolved'])throw new _0x23e2eb('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3e4d64});if(_0x231aad['resolvedBy']=null,_0x231aad['resolvedAt']=null,_0x4823ed||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5a79a9=this['context']['plugins']['get']('PendingActions'),_0x1d3f9a=_0x5a79a9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3e85b6,'threadId':_0x3e4d64})['then'](()=>_0x5a79a9['remove'](_0x1d3f9a))['catch'](_0x5564bf=>{throw console['error'](_0x5564bf),new _0x23e2eb('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x244cf8,isFromAdapter:_0x574753}){const _0x269bcb=this['getCommentThread'](_0x244cf8);if(!_0x269bcb)throw new _0x23e2eb('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x244cf8),this['_threads']['delete'](_0x244cf8),!_0x269bcb['isSubmitted']||_0x574753||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x52b8f1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1859c6}=_0x269bcb,_0x3308e2=_0x52b8f1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1859c6,'threadId':_0x244cf8})['then'](()=>_0x52b8f1['remove'](_0x3308e2))['catch'](_0x3fee4a=>{throw console['error'](_0x3fee4a),new _0x23e2eb('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x27fbd2,unlinkedAt:_0xbb5fd5,context:_0x4498fb,attributes:_0x2f2a82,isFromAdapter:_0x2c5705}){if('string'!=typeof _0x27fbd2)throw new _0x23e2eb('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x27fbd2});if(!this['hasCommentThread'](_0x27fbd2))throw new _0x23e2eb('commentsrepository-missing-comment-thread',null,{'threadId':_0x27fbd2});const _0x2c2205=this['getCommentThread'](_0x27fbd2);let _0x5999e2=!0x1;if(void 0x0!==_0x4498fb&&_0x2c2205['context']!==_0x4498fb&&(_0x2c2205['context']=_0x4498fb,_0x5999e2=!0x0),void 0x0!==_0xbb5fd5&&_0x2c2205['unlinkedAt']!==_0xbb5fd5&&(_0x2c2205['unlinkedAt']=_0xbb5fd5,_0x5999e2=!0x0),_0x2f2a82&&!At(_0x2f2a82,_0x2c2205['attributes'])&&(_0x2c2205['attributes']=_0x2f2a82,_0x5999e2=!0x0),!_0x5999e2)return Promise['resolve']();if(!_0x2c2205['isSubmitted']||_0x2c5705||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2bd3e3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4cd0dd}=_0x2c2205,_0x55f3d4=_0x2bd3e3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4cd0dd,'threadId':_0x27fbd2,'context':_0x4498fb,'unlinkedAt':_0xbb5fd5,'attributes':_0x2f2a82})['then'](()=>_0x2bd3e3['remove'](_0x55f3d4))['catch'](_0x40ab29=>{throw console['error'](_0x40ab29),new _0x23e2eb('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xbc49e7){const _0x28ec51=this['context']['plugins']['get'](y),_0x20386c=this['getCommentThread'](_0xbc49e7);if(_0x20386c['_isAttached']=!0x1,this['_threadToController']['has'](_0x20386c)){const _0x33a3cf=this['_threadToController']['get'](_0x20386c),_0x22572f=_0x33a3cf['view'],_0x326640=_0x28ec51['getByInnerView'](_0x22572f);this['_threadToController']['delete'](_0x20386c),this['_viewToController']['delete'](_0x22572f),_0x326640&&_0x28ec51['remove'](_0x326640),_0x33a3cf['destroy'](),_0x22572f['destroy']()['then'](()=>{this['_unbindEditors'](_0x22572f);});}}['_updateActiveAnnotation']({threadId:_0x5eca3e,resolvedAt:_0x8b6147,unlinkedAt:_0x16c521}){const _0x3cea75=!!_0x8b6147,_0x194d65=this['context']['plugins']['get'](y),_0x9a8203=this['getCommentThread'](_0x5eca3e);if(this['_threadToController']['has'](_0x9a8203)){const _0x404e9d=this['_threadToController']['get'](_0x9a8203)['view'],_0x58907e=_0x194d65['getByInnerView'](_0x404e9d);_0x58907e&&(_0x3cea75&&_0x194d65['_removeActiveAnnotation'](_0x58907e),_0x16c521?_0x58907e['isVisible']=!0x1:_0x58907e['refreshVisibility']());}}['_getExternalAuthor'](_0x1e4181){const _0x3ff1e0=this['context']['plugins']['get'](it),_0xf71b36=It('external:'+_0x1e4181),_0x428e69=_0x3ff1e0['getUser'](_0xf71b36);return _0x428e69||_0x3ff1e0['addUser']({'id':_0xf71b36,'name':_0x1e4181});}['_createNewComment']({threadId:_0x2b0af9,commentId:_0x1d954a=_0x41fdb0(),content:_0x305b9b,authorId:_0x3651a3,createdAt:_0x32d4ca,attributes:_0x1c6664}){if('string'!=typeof _0x1d954a)throw new _0x23e2eb('commentsrepository-invalid-commentid');if('string'!=typeof _0x3651a3)throw new _0x23e2eb('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x305b9b||!_0x305b9b['trim']())throw new _0x23e2eb('commentsrepository-invalid-comment-content');const _0x1261f3=this['context']['plugins']['get'](it)['getUser'](_0x3651a3);if(!_0x1261f3)throw new _0x23e2eb('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3651a3});let _0x5cf9cf=null,_0x38b307=_0x32d4ca;return _0x1c6664?.['@external']&&(_0x5cf9cf=this['_getExternalAuthor'](_0x1c6664['@external']['authorName']),_0x38b307=new Date(_0x1c6664['@external']['createdAt'])),new Comment(this,{'threadId':_0x2b0af9,'id':_0x1d954a,'author':_0x5cf9cf||_0x1261f3,'creator':_0x1261f3,'content':_0x305b9b,'createdAt':_0x32d4ca,'authoredAt':_0x38b307,'attributes':_0x1c6664});}['_addComment'](_0x4b1f71){let {threadId:_0x1bc25f,content:_0x104a2a,attributes:_0x5ce368,isFromAdapter:_0x2c3866}=_0x4b1f71;const _0x214cdc=this['getCommentThread'](_0x4b1f71['threadId']);if(!_0x214cdc)throw new _0x23e2eb('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4475a2=this['_createNewComment'](_0x4b1f71),{id:_0x3dfebf}=_0x4475a2;if(_0x214cdc['_add'](_0x4475a2),_0x2c3866||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x214cdc['isSubmitted'])return Promise['resolve']();const _0x3066e0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4593b4}=_0x214cdc,_0x215a22=_0x3066e0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5ce368||(_0x5ce368={}),this['adapter']['addComment']({'channelId':_0x4593b4,'threadId':_0x1bc25f,'commentId':_0x3dfebf,'content':_0x104a2a,'attributes':_0x5ce368})['then'](_0x3ba0c6=>{_0x3066e0['remove'](_0x215a22),_0x3ba0c6&&this['_updateComment']({'channelId':_0x4593b4,'threadId':_0x1bc25f,'commentId':_0x3dfebf,'createdAt':_0x3ba0c6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2b13f9=>{throw console['error'](_0x2b13f9),new _0x23e2eb('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x329404,commentId:_0x3de5c7,content:_0x3b74c5,createdAt:_0x6bde40,attributes:_0x4f3d4e,isFromAdapter:_0x511c30}){if(void 0x0!==_0x3b74c5&&('string'!=typeof _0x3b74c5||!_0x3b74c5['trim']()['length']))throw new _0x23e2eb('commentsrepository-update-comment-invalid-content');const _0x13e4cf=this['getCommentThread'](_0x329404),_0x19b115=_0x13e4cf['getComment'](_0x3de5c7);if(!_0x19b115)throw new _0x23e2eb('commentsrepository-update-missing-comment',this);let _0x518ac6=!0x1;if(_0x3b74c5&&_0x3b74c5!==_0x19b115['content']&&(_0x19b115['isEditable']||_0x511c30)&&(_0x19b115['content']=_0x3b74c5,_0x518ac6=!0x0),_0x6bde40&&_0x6bde40!==_0x19b115['createdAt']&&(_0x19b115['createdAt']=_0x6bde40,_0x19b115['attributes']&&_0x19b115['attributes']['@external']||(_0x19b115['authoredAt']=_0x6bde40),_0x518ac6=!0x0),_0x4f3d4e&&!At(_0x4f3d4e,_0x19b115['attributes'])&&(_0x19b115['attributes']=_0x4f3d4e,_0x518ac6=!0x0),!_0x518ac6)return Promise['resolve']();if(_0x13e4cf['fire']('commentUpdated'),_0x511c30||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xea9597=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1d1cad}=this['getCommentThread'](_0x19b115['threadId']),_0x2408ed=_0xea9597['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1d1cad,'threadId':_0x329404,'commentId':_0x3de5c7,'content':_0x3b74c5,'attributes':_0x4f3d4e})['then'](()=>_0xea9597['remove'](_0x2408ed))['catch'](_0x206ea1=>{throw console['error'](_0x206ea1),new _0x23e2eb('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x35a0a1,commentId:_0x275790,isFromAdapter:_0x54ee32}){const _0x4a3f2d=this['getCommentThread'](_0x35a0a1),_0x2df105=_0x4a3f2d['getComment'](_0x275790);if(!_0x2df105)throw new _0x23e2eb('commentsrepository-remove-missing-comment',this);if(_0x4a3f2d['_remove'](_0x2df105),_0x54ee32||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4f28e9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x25e96a}=_0x4a3f2d,_0x57e4b5=_0x4f28e9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x25e96a,'threadId':_0x35a0a1,'commentId':_0x275790})['then'](()=>_0x4f28e9['remove'](_0x57e4b5))['catch'](_0x25e289=>{throw console['error'](_0x25e289),new _0x23e2eb('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x795c20(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3cbad5,_0x46da6f){super();const _0x2dcf84=_0x46da6f['isResolvable'];this['channelId']=_0x46da6f['channelId'],this['id']=_0x46da6f['id'],this['comments']=new _0x4290a9(),this['_repository']=_0x3cbad5,this['_isAttached']=!0x1,this['_isSubmitted']=_0x46da6f['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3cbad5,'_permissions',_0x3cbad5,'_readOnlyChannels',()=>_0x3cbad5['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3cbad5,'_permissions',()=>_0x3cbad5['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3cbad5,'_permissions',()=>{const _0x453d76=_0x3cbad5['getPermissions'](this['channelId']);return _0x453d76['write']||_0x453d76['admin'];}),this['bind']('isResolvable')['to'](_0x3cbad5,'_permissions',()=>_0x2dcf84&&_0x3cbad5['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x46da6f['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x344979,_0x611738)=>_0x344979?_0x611738?_0x344979<_0x611738?_0x344979:_0x611738:_0x344979:_0x611738),this['set']('unlinkedAt',_0x46da6f['unlinkedAt']||null),this['set']('resolvedAt',_0x46da6f['resolvedAt']||null),this['set']('resolvedBy',_0x46da6f['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x538a28=>!!_0x538a28),this['set']('attributes',_0x46da6f['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x23a565,_0x532fc9)=>_0x23a565+_0x532fc9['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x58c725,id:_0x5c16a3}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x58c725),{'channelId':_0x58c725,'threadId':_0x5c16a3});}['setUnlinkedAt'](_0x4caff0){this['_update']({'unlinkedAt':_0x4caff0});}['resolve']({resolvedAt:_0x1fa1ea=new Date(),resolvedBy:_0x38e8d0='',isFromAdapter:_0x3077b8=!0x1}={}){const _0x343bc1=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x3b792c,id:_0x525156}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x3b792c),{'channelId':_0x3b792c,'threadId':_0x525156,'resolvedAt':_0x1fa1ea,'resolvedBy':_0x38e8d0||_0x343bc1['id'],'isFromAdapter':_0x3077b8});}['reopen']({isFromAdapter:_0x12957a=!0x1}={}){const {channelId:_0x2e4e0e,id:_0x59a265}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x2e4e0e),{'channelId':_0x2e4e0e,'threadId':_0x59a265,'isFromAdapter':_0x12957a});}['setContext'](_0x66e225){this['context']||this['_update']({'context':_0x66e225});}['setAttribute'](_0x371ec2,_0x18ecca){const _0xda1f1b=wt(this['attributes']);yt(_0xda1f1b,_0x371ec2,_0x18ecca),this['_update']({'attributes':_0xda1f1b});}['removeAttribute'](_0x4ec69c){const _0x276d4c=wt(this['attributes']);Ct(_0x276d4c,_0x4ec69c),this['_update']({'attributes':_0x276d4c});}['remove']({isFromAdapter:_0x2b2ec0=!0x1}={}){const {channelId:_0x540746,id:_0x3d6ddd}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x540746),{'channelId':_0x540746,'threadId':_0x3d6ddd,'isFromAdapter':_0x2b2ec0});}['attachTo'](_0x55b469){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x55b469});}['addComment'](_0x10cb1a){const {channelId:_0x5f11c9,id:_0x388143}=this;this['_repository']['fire'](Nt('addComment',_0x5f11c9,_0x388143),Object['assign']({'channelId':_0x5f11c9,'threadId':_0x388143},_0x10cb1a));}['getComment'](_0xc367e7){if('string'!=typeof _0xc367e7)throw new _0x23e2eb('commentsrepository-get-comment-invalid-id',null,{'commentId':_0xc367e7});return this['comments']['get'](_0xc367e7);}['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'](_0x47f5e0=>_0x47f5e0['toJSON']()),'attributes':this['attributes']};}['_add'](_0x26ab82){return this['listenTo'](_0x26ab82,'change:authoredAt',()=>{const _0x1e0895=this['_findOptimalIndex'](_0x26ab82),_0x6e1ee2=this['comments'];_0x1e0895-0x1!=_0x6e1ee2['getIndex'](_0x26ab82)&&_0x1e0895+0x1!=_0x6e1ee2['getIndex'](_0x26ab82)&&(this['_remove'](_0x26ab82),this['_add'](_0x26ab82));}),this['comments']['add'](_0x26ab82,this['_findOptimalIndex'](_0x26ab82));}['_update'](_0x321b0f){const {channelId:_0x42038f,id:_0x394d03}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x42038f),{..._0x321b0f,'channelId':_0x42038f,'threadId':_0x394d03});}['_remove'](_0x444c7a){return this['stopListening'](_0x444c7a),_0x444c7a['destroy'](),this['comments']['remove'](_0x444c7a);}['_findOptimalIndex'](_0xbe6558){const _0x4f929d=this['comments']['find'](_0x5a2d07=>new Date(_0x5a2d07['authoredAt'])['getTime']()>new Date(_0xbe6558['authoredAt'])['getTime']());return _0x4f929d?this['comments']['getIndex'](_0x4f929d):this['length'];}}class Comment extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x795c20(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3b0a12,_0x3e7247){super();const _0x376fe4=_0x3b0a12['context']['plugins']['get'](it)['me'],_0x3d0544=_0x3b0a12['getCommentThread'](_0x3e7247['threadId']),_0x508b20=0x0===_0x3d0544['comments']['length'],_0x4ed43d=_0x376fe4===_0x3e7247['author'];this['id']=_0x3e7247['id'],this['threadId']=_0x3e7247['threadId'],this['author']=_0x3e7247['author'],this['creator']=_0x3e7247['creator'],this['isExternal']=Boolean(_0x3e7247['attributes']&&_0x3e7247['attributes']['@external']),this['set']('content',_0x3e7247['content']),this['createdAt']=_0x3e7247['createdAt']||new Date(),this['set']('authoredAt',_0x3e7247['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3d0544,'resolvedAt'),this['set']('attributes',_0x3e7247['attributes']||{}),this['bind']('isEditable')['to'](_0x3b0a12,'_permissions',()=>{const _0xa57dd0=_0x3b0a12['getPermissions'](_0x3d0544['channelId'])['write'],_0x3811e2=_0x3b0a12['getPermissions'](_0x3d0544['channelId'])['modifyAll'];return _0x4ed43d&&_0xa57dd0||!_0x4ed43d&&_0x3811e2;}),this['bind']('isRemovable')['to'](_0x3d0544,'isRemovable',_0x3b0a12,'_permissions',_0x1735c3=>{const _0x202e98=_0x3b0a12['getPermissions'](_0x3d0544['channelId'])['write'],_0x297f32=_0x3b0a12['getPermissions'](_0x3d0544['channelId'])['modifyAll'];return _0x4ed43d&&_0x202e98||_0x1735c3&&_0x508b20||!_0x4ed43d&&_0x297f32&&!_0x508b20;}),this['bind']('isReadOnly')['to'](_0x3d0544,'isReadOnly'),this['_repository']=_0x3b0a12;}get['weight'](){return Math['max'](function(_0x5854e7){const _0xd4d25b=document['createElement']('div');return _0xd4d25b['innerHTML']=_0x5854e7,_0xd4d25b['textContent']['length'];}(this['content']),0xc8);}['update'](_0x509f6a){const {threadId:_0x474f10,id:_0x191bbb}=this;if(!this['_repository']['hasCommentThread'](_0x474f10))throw new _0x23e2eb('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x902f0d}=this['_repository']['getCommentThread'](_0x474f10);this['_repository']['fire'](Nt('updateComment',_0x902f0d,_0x474f10),{'channelId':_0x902f0d,'threadId':_0x474f10,'commentId':_0x191bbb,..._0x509f6a});}['setAttribute'](_0x4c35f4,_0x2c9e8a){const _0x91260b=wt(this['attributes']);yt(_0x91260b,_0x4c35f4,_0x2c9e8a),this['update']({'attributes':_0x91260b});}['removeAttribute'](_0x18f7d2){const _0x421f3a=wt(this['attributes']);Ct(_0x421f3a,_0x18f7d2),this['update']({'attributes':_0x421f3a});}['remove'](_0xc3560d={}){if(!_0xc3560d['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x31f3f8,id:_0x44e431}=this;if(!this['_repository']['hasCommentThread'](_0x31f3f8))throw new _0x23e2eb('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4a1ef1}=this['_repository']['getCommentThread'](_0x31f3f8);this['_repository']['fire'](Nt('removeComment',_0x4a1ef1,_0x31f3f8),{'channelId':_0x4a1ef1,'threadId':_0x31f3f8,'commentId':_0x44e431,..._0xc3560d});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x2097b5,..._0x246e72){for(const _0x42de0a of _0x246e72)void 0x0!==_0x42de0a&&(_0x2097b5+=':'+String(_0x42de0a));return _0x2097b5;}class ot extends _0x46b3e5{constructor(_0x582699){super(_0x582699),this['set']('hasContent',!0x1);}['refresh'](){const _0x2a4e59=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2872ff of _0x2a4e59['getRanges']())if(this['_hasContent'](_0x2872ff))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x225caa=_0x41fdb0(),ranges:_0x3ea228,comment:_0x12aef3}={}){const _0x34c44d=this['editor']['model'],_0x512ff6=_0x3ea228??Array['from'](_0x34c44d['document']['selection']['getRanges']()),_0x6bab26=[];for(const _0xb575a3 of _0x512ff6)this['_hasContent'](_0xb575a3)&&_0x6bab26['push'](this['_trimToContent'](_0xb575a3));if(!_0x6bab26['length'])throw new _0x23e2eb('addcommentthreadcommand-incorrect-ranges',null);_0x12aef3&&this['_createCommentThread'](_0x225caa,_0x12aef3),this['_createMarkersFromRanges'](_0x225caa,_0x6bab26,!!_0x12aef3);}['_createMarkersFromRanges'](_0xe3f95b,_0x6b339e,_0x37dd2f){this['editor']['model']['change'](_0x311357=>{for(const _0x5049c9 of _0x6b339e){const _0x19f5a3=_0x41fdb0()['substr'](0x1,0x5),_0x1ac361='comment:'+_0xe3f95b+':'+_0x19f5a3;_0x311357['addMarker'](_0x1ac361,{'range':_0x5049c9,'usingOperation':_0x37dd2f,'affectsData':_0x37dd2f});}});}['_createCommentThread'](_0xaa0922,_0x4222bc){const _0x155b96=this['editor']['plugins']['get']('CommentsRepository'),_0x2838ba=this['editor']['config']['get']('collaboration.channelId'),_0x1ba65a=this['editor']['plugins']['get']('Users')['me'];if(!_0x1ba65a)throw new _0x23e2eb('addcommentthreadcommand-user-not-found',null);_0x155b96['addCommentThread']({'threadId':_0xaa0922,'channelId':_0x2838ba,'comments':[{'authorId':_0x1ba65a['id'],'content':_0x4222bc,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0xa48f0b){for(const _0x57e034 of _0xa48f0b['getItems']())if(this['_itemIsContent'](_0x57e034))return!0x0;return!0x1;}['_itemIsContent'](_0x51751b){return _0x51751b['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x51751b)&&!_0x51751b['is']('element','tableCell');}['_trimToContent'](_0x599ca0){const _0x22a009=_0x51d7b5=>!this['_itemIsContent'](_0x51d7b5['item']),_0x267cb7=_0x599ca0['start']['getLastMatchingPosition'](_0x22a009),_0x29d8f7=_0x599ca0['end']['getLastMatchingPosition'](_0x22a009,{'direction':'backward'});return this['editor']['model']['createRange'](_0x267cb7,_0x29d8f7);}}class b extends _0x17f83a{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5373b9){super(_0x5373b9),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x40a3a0=this['editor'],_0x4dbc15=_0x40a3a0['model']['document']['selection'],_0x4ab933=_0x5db34e(()=>this['refreshSelectedViews'](),0xa);_0x4dbc15['on']('change:range',(_0x581ff8,_0x1c4ef6)=>{_0x1c4ef6['directChange']&&(_0x4ab933['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x40a3a0['editing']['view']['document'],'change:isFocused',(_0xfd9c78,_0x81f80,_0xcdf151)=>{_0xcdf151&&_0x4ab933();}),this['listenTo'](_0x40a3a0['ui']['focusTracker'],'change:isFocused',(_0x4e3492,_0x220837,_0x37fc1e)=>{_0x37fc1e||this['fire']('blur',{'isAnnotationTracked':_0x2d7e98=>this['_editorAnnotationsData']['has'](_0x2d7e98['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0xcf8fff){if(this['_editorAnnotations']['has'](_0xcf8fff['view']))return;this['_editorAnnotations']['add'](_0xcf8fff['view']),this['editor']['ui']['focusTracker']['add'](_0xcf8fff['view']['element']);const _0x348443=this['editor']['plugins']['get'](y);this['listenTo'](_0x348443['collection'],'remove',(_0x23a461,_0x5f423e)=>{this['editor']['ui']['focusTracker']['remove'](_0x5f423e['view']['element']),this['_editorAnnotations']['delete'](_0x5f423e['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x459092){if('function'!=typeof _0x459092)throw new _0x23e2eb('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x459092);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x11c473,annotations:_0x236a69}){const _0x18fc42=[],_0x5a6913=this['editor']['model']['document']['selection'],_0x343607=Array['from'](_0x5a6913['getRanges']());for(const [_0x125a92,_0x3aa419]of this['_editorAnnotationsData']){const _0x151eff=_0x46d9e3(_0x3aa419),_0x1fe142=_0x236a69['getByInnerView'](_0x125a92);_0x151eff&&_0x1fe142&&_0x18fc42['push']({'annotation':_0x1fe142,'range':_0x151eff});}function _0x46d9e3(_0x4708fa){for(const _0xd98c27 of _0x4708fa)for(const _0x317fd9 of _0x343607)if(_0xd98c27['containsRange'](_0x317fd9,!_0x5a6913['isCollapsed']))return _0xd98c27;return null;}return _0x18fc42['sort']((_0x3c2140,_0x2c58f9)=>{const _0x5246df=_0x3c2140['range'],_0xa24dee=_0x2c58f9['range'];if(!_0x5246df['isEqual'](_0xa24dee)){if(_0x5246df['containsRange'](_0xa24dee,!0x0))return 0x1;if(_0xa24dee['containsRange'](_0x5246df,!0x0))return-0x1;}return _0x3c2140['annotation']==_0x11c473?-0x1:_0x2c58f9['annotation']==_0x11c473?0x1:0x0;})['map'](_0x52f927=>_0x52f927['annotation']);}get['_editorAnnotationsData'](){const _0x333fdb=new Map();for(const _0x343240 of Array['from'](this['_dataCollectors']))for(const [_0x2a5e95,_0x16c898]of _0x343240())_0x333fdb['set'](_0x2a5e95,_0x16c898);return _0x333fdb;}}class st extends _0x17f83a{['afterInit'](){const _0x2f34a1=this['editor'];if(!_0x2f34a1['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2f34a1['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x17f83a{constructor(_0x3a9ebb){super(_0x3a9ebb),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x5d6dae=this['editor'],_0xd42565=_0x5d6dae['commands']['get']('importWord'),_0x26fdc7=_0x5d6dae['plugins']['get'](it);_0xd42565&&(_0xd42565['on']('execute',(_0x1340e5,[,_0x3a4ff6])=>{_0x3a4ff6['collaboration_features']={'comments':!0x0,'user_id':_0x26fdc7['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0xd42565,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4fd728,_0x3d07f7){const {comment_threads:_0x1cee66}=_0x3d07f7;_0x1cee66&&_0x1cee66['forEach'](({thread_id:_0x3d782a,comments:_0x4188c6,is_resolved:_0x3f5fb5})=>{const _0x44bee7=new Date(),_0x151382=_0x4188c6['map'](({author:_0x468f0d,content:_0x208a1f,created_at:_0x1e287a})=>({'content':_0x208a1f,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x44bee7,'attributes':{'@external':{'authorName':_0x468f0d,'createdAt':_0x1e287a?new Date(_0x1e287a):new Date(),'source':'importWord'}}})),_0x3bb5ef=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3bb5ef,'threadId':_0x3d782a,'comments':_0x151382,'resolvedAt':_0x3f5fb5?_0x44bee7:null});});}}class at extends _0x17f83a{constructor(_0x2cb74e){super(_0x2cb74e),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x4a8c56=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4a8c56,'contentInsertion',(_0x19f688,_0x98434d)=>this['_removeMarkersWithoutThreads'](_0x98434d['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x194d15){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x194d15;const _0x390726=this['editor']['plugins']['get']('CommentsRepository');for(const _0x339f6a of _0x194d15['keys']()){const [_0x1e15d6,_0x506435]=_0x339f6a['split'](':');'comment'!=_0x1e15d6||_0x390726['hasCommentThread'](_0x506435)||_0x194d15['delete'](_0x339f6a);}return _0x194d15;}['_registerMarkerInClipboardPipeline'](){const _0xb71c37=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xbfafde=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xbfafde&&_0xb71c37['_registerMarkerToCopy']('comment',_0xbfafde);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4b2a6a){switch(_0x4b2a6a){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x198f32){const _0xa27b96=_0x198f32['split'](':');return{'group':_0xa27b96[0x0],'id':_0xa27b96[0x1],'part':_0xa27b96[0x2]};}class ut extends _0x17f83a{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x8231fa,_0x267e7c)=>{if(!_0x267e7c['options']['showCommentHighlights'])return null;if(_0x267e7c['options']['ignoreResolvedComments']){const {id:_0x523a27}=ft(_0x8231fa['markerName']),_0x4f5c7e=this['editor']['plugins']['get'](o);if(_0x4f5c7e['getCommentThread'](_0x523a27)?.['isResolved']&&_0x8231fa['item'])return _0x267e7c['consumable']['consume'](_0x8231fa['item'],'addMarker:'+_0x8231fa['markerName']),_0x267e7c['consumable']['consume'](_0x8231fa['item'],'removeMarker:'+_0x8231fa['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x25ec56=>{_0x25ec56['on']('addMarker:comment',(_0x1b54bc,_0x6cadfc,_0x2ed9d0)=>{if(!_0x2ed9d0['options']['showCommentHighlights'])return;const _0x4cb16b=_0x6cadfc['item'];if(!_0x4cb16b)return;const _0x529ea3=_0x2ed9d0['mapper']['toViewElement'](_0x4cb16b);this['editor']['model']['schema']['isObject'](_0x4cb16b)&&_0x529ea3&&!_0x529ea3['getCustomProperty']('widget')&&_0x529ea3['is']('containerElement')&&_0x511f26(_0x529ea3,_0x2ed9d0['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1241b5,{writer:_0xd2f279,options:_0x373c7d})=>{if(!_0x373c7d['showCommentHighlights'])return null;const _0x4b9e26=_0xd2f279['createContainerElement']('div'),_0xeca2f6=_0xd2f279['createEmptyElement']('hr');return _0xd2f279['addClass']('ck-horizontal-line',_0x4b9e26),_0xd2f279['insert'](_0xd2f279['createPositionAt'](_0x4b9e26,0x0),_0xeca2f6),_0x4b9e26;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x279089,{writer:_0x388eb4,options:_0x136ba2})=>{if(!_0x136ba2['showCommentHighlights'])return null;const _0x45dfae=_0x388eb4['createContainerElement']('span'),_0xf0945c=_0x388eb4['createEmptyElement']('img');return _0x388eb4['addClass']('image-inline',_0x45dfae),_0x388eb4['insert'](_0x388eb4['createPositionAt'](_0x45dfae,0x0),_0xf0945c),_0x45dfae;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x573c71,{writer:_0x437b54,options:_0x12dab3})=>{if(_0x12dab3['showCommentHighlights'])return _0x437b54['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x163f22,_0x266511,_0x33ace0)=>{_0x33ace0['options']['showCommentHighlights']&&_0x163f22['stop']();},{'priority':'high'});}}class r extends _0x17f83a{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x97fdea){super(_0x97fdea),this['set']('isThreadsLoadingPaused',!0x0),_0x97fdea['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1d03c2,_0x11537a,_0x12a64b,_0x3b025b)=>{const _0x2b96ce=_0x97fdea['plugins']['get'](o),_0x2a9c15=_0x12a64b?ft(_0x12a64b)['id']:null;_0x97fdea['model']['change'](()=>{if(_0x2a9c15){const _0x2574ff=this['getAllMarkersForId'](_0x2a9c15);for(const _0x5a00ea of _0x2574ff)_0x97fdea['editing']['reconvertMarker'](_0x5a00ea);}if(_0x3b025b){const {id:_0x347b71}=ft(_0x3b025b),_0xdd30a9=_0x2b96ce['getCommentThread'](_0x347b71);if(_0xdd30a9&&_0xdd30a9['unlinkedAt'])return;if(_0xdd30a9&&!_0xdd30a9['isAttached'])return;const _0x501cd5=this['getAllMarkersForId'](_0x347b71);for(const _0x30dfab of _0x501cd5)_0x97fdea['editing']['reconvertMarker'](_0x30dfab);}}),_0x2a9c15&&this['scrollToThreadMarker'](_0x2a9c15);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x18a0a8=this['editor'],_0x4d1837=_0x18a0a8['plugins']['get'](o),_0x489834=_0x18a0a8['config']['get']('collaboration.channelId'),_0x5ea95f=_0x4d1837['getCommentThreads']()['filter'](_0x13b5c8=>_0x13b5c8['channelId']!==_0x489834);_0x18a0a8['commands']['add']('addCommentThread',new ot(_0x18a0a8)),this['listenTo'](_0x18a0a8,'change:isReadOnly',(_0x30849b,_0x3abea4,_0x4f2487)=>{_0x4d1837['switchReadOnly'](_0x4f2487,_0x18a0a8['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4d1837,dt('addCommentThread',_0x489834),(_0x130cf7,{threadId:_0x22c8c4})=>{const _0x588df0=this['editor']['plugins']['get'](o)['getCommentThread'](_0x22c8c4);_0x588df0?.['unlinkedAt']&&this['_attachArchivedThread'](_0x22c8c4);}),this['listenTo'](_0x4d1837,dt('removeCommentThread',_0x489834),(_0x1ea72a,{threadId:_0x36b07f})=>{_0x18a0a8['model']['enqueueChange']({'isUndoable':!0x1},_0x4f5a4d=>{const _0x5ad76a=this['getAllMarkersForId'](_0x36b07f);for(const _0xb7b875 of _0x5ad76a)_0x4f5a4d['removeMarker'](_0xb7b875);});}),this['listenTo'](_0x4d1837,dt('resolveCommentThread',_0x489834),(_0xb7aee5,{threadId:_0x1b3533})=>{(this['_reconvertMarkers'](_0x1b3533),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1b3533)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4d1837,dt('reopenCommentThread',_0x489834),(_0x35745d,{threadId:_0x1c12d7})=>{this['_reconvertMarkers'](_0x1c12d7);},{'priority':'low'}),this['listenTo'](_0x4d1837,dt('addComment',_0x489834),(_0xbb0b3f,{threadId:_0x3a9a5f,isFromAdapter:_0xecab9d})=>{const _0x5a1085=this['getAllMarkersForId'](_0x3a9a5f);if(_0xecab9d||0x0==_0x5a1085['length']||!_0x4d1837['hasCommentThread'](_0x3a9a5f))return;0x1===_0x4d1837['getCommentThread'](_0x3a9a5f)['length']&&_0x18a0a8['model']['enqueueChange']({'isUndoable':!0x1},_0x36f141=>{for(const _0x531cfe of _0x5a1085)_0x36f141['updateMarker'](_0x531cfe,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5ea95f);}['afterInit'](){!async function(_0x1b20ff){const _0x388be7=_0x41cf6d([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x1bca5a=0x73460ab3,_0x57af1e=0x73419ce3^_0x1bca5a,_0x15bff7=window[_0x41cf6d([0x44,0x61,0x74,0x65])][_0x41cf6d([0x6e,0x6f,0x77])](),_0x45cb9d=_0x1b20ff[_0x41cf6d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x26beab=new window[(_0x41cf6d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22e3d8=>{_0x45cb9d[_0x41cf6d([0x6f,0x6e,0x63,0x65])](_0x41cf6d([0x72,0x65,0x61,0x64,0x79]),_0x22e3d8);}),_0x50a3fb={[_0x41cf6d([0x6b,0x74,0x79])]:_0x41cf6d([0x45,0x43]),[_0x41cf6d([0x75,0x73,0x65])]:_0x41cf6d([0x73,0x69,0x67]),[_0x41cf6d([0x63,0x72,0x76])]:_0x41cf6d([0x50,0x2d,0x32,0x35,0x36]),[_0x41cf6d([0x78])]:_0x41cf6d([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]),[_0x41cf6d([0x79])]:_0x41cf6d([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]),[_0x41cf6d([0x61,0x6c,0x67])]:_0x41cf6d([0x45,0x53,0x32,0x35,0x36])},_0x4db4af=_0x45cb9d[_0x41cf6d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x41cf6d([0x67,0x65,0x74])](_0x41cf6d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x196dd0(){let _0x369e2e,_0x5a2754=null,_0x177ee2=null;try{if(_0x4db4af==_0x41cf6d([0x47,0x50,0x4c]))return _0x41cf6d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x369e2e=_0x1cb403(),!_0x369e2e)return _0x41cf6d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x369e2e[_0x41cf6d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x177ee2=_0x28e772(_0x369e2e[_0x41cf6d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x369e2e[_0x41cf6d([0x6a,0x74,0x69])])),await _0x3656dc()?_0x57613b()?_0x3b65d3()?_0x41cf6d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3eaf27()?(_0x369e2e[_0x41cf6d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41cf6d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5a2754=_0x40be22(_0x41cf6d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x504429()):_0x41cf6d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x41cf6d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x41cf6d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x41cf6d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3b65d3(){const _0x38eff2=[_0x41cf6d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x41cf6d([0x74,0x72,0x69,0x61,0x6c])][_0x41cf6d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x369e2e[_0x41cf6d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x15bff7/0x3e8:0xe10*_0x57af1e;return _0x369e2e[_0x41cf6d([0x65,0x78,0x70])]<_0x38eff2;}function _0x57613b(){const _0x1772c8=_0x369e2e[_0x41cf6d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1772c8)return!0x1;if(_0x1772c8[_0x41cf6d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41cf6d([0x2a])))return!0x0;if(_0x1772c8[_0x41cf6d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41cf6d([0x43,0x4d,0x54])))return!0x0;if(_0x1772c8[_0x41cf6d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41cf6d([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0xb0f583())return!0x0;if(_0x1772c8[_0x41cf6d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41cf6d([0x52,0x43,0x4d,0x54]))){if(_0x28b440())return!0x0;if(_0x1dc4dc()||_0x57c82f())return!0x0;}return!0x1;}function _0x3eaf27(){const _0xa31ed8=_0x369e2e[_0x41cf6d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xa31ed8||0x0==_0xa31ed8[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3d2c3b}=new URL(window[_0x41cf6d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xa31ed8[_0x41cf6d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d2c3b))return!0x0;const _0x15c0bb=_0x3d2c3b[_0x41cf6d([0x73,0x70,0x6c,0x69,0x74])](_0x41cf6d([0x2e]));return _0xa31ed8[_0x41cf6d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x14c789=>_0x14c789[_0x41cf6d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41cf6d([0x2a])))[_0x41cf6d([0x6d,0x61,0x70])](_0x2896b2=>_0x2896b2[_0x41cf6d([0x73,0x70,0x6c,0x69,0x74])](_0x41cf6d([0x2e])))[_0x41cf6d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x25bfe3=>_0x25bfe3[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x15c0bb[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41cf6d([0x6d,0x61,0x70])](_0x3db6af=>Array(_0x15c0bb[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3db6af[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41cf6d([0x66,0x69,0x6c,0x6c])](_0x3db6af[0x0]===_0x41cf6d([0x2a])?_0x41cf6d([0x2a]):'')[_0x41cf6d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3db6af))[_0x41cf6d([0x73,0x6f,0x6d,0x65])](_0x594221=>_0x15c0bb[_0x41cf6d([0x65,0x76,0x65,0x72,0x79])]((_0x45d6dd,_0x47800b)=>_0x594221[_0x47800b]===_0x45d6dd||_0x594221[_0x47800b]===_0x41cf6d([0x2a])));}function _0x504429(){return _0x5a2754&&_0x177ee2?new window[(_0x41cf6d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5e85ae,_0x82f7c3)=>{_0x5a2754[_0x41cf6d([0x74,0x68,0x65,0x6e])](_0x5e85ae,_0x82f7c3),_0x177ee2[_0x41cf6d([0x74,0x68,0x65,0x6e])](_0x39e6d8=>{_0x39e6d8!=_0x41cf6d([0x56,0x61,0x6c,0x69,0x64])&&_0x5e85ae(_0x39e6d8);},_0x82f7c3);}):_0x5a2754||_0x177ee2||_0x41cf6d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x28e772(_0x16060d,_0x4f38fb){return new window[(_0x41cf6d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x286c01=>{if(_0x5e9924())return _0x286c01(_0x41cf6d([0x56,0x61,0x6c,0x69,0x64]));_0x4b96fd(),_0x45cb9d[_0x41cf6d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x41cf6d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x33111d=!0x1;const _0x3bc172=_0x41fdb0();function _0x324115(_0xc3fcee){return!!_0xc3fcee&&(typeof _0xc3fcee===_0x41cf6d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xc3fcee===_0x41cf6d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xc3fcee[_0x41cf6d([0x74,0x68,0x65,0x6e])]===_0x41cf6d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xc3fcee[_0x41cf6d([0x63,0x61,0x74,0x63,0x68])]===_0x41cf6d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3a9594(_0x107c32){_0x2de062(_0x107c32)[_0x41cf6d([0x74,0x68,0x65,0x6e])](_0x5e6cd4=>{if(!_0x5e6cd4||_0x5e6cd4[_0x41cf6d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x41cf6d([0x6f,0x6b]))return _0x41cf6d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1ac691(_0x19663c(_0x3bc172+_0x4f38fb))!=_0x5e6cd4[_0x41cf6d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x41cf6d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x41cf6d([0x56,0x61,0x6c,0x69,0x64]);})[_0x41cf6d([0x74,0x68,0x65,0x6e])](_0x575c0c=>(_0x381c2f(),_0x575c0c),()=>{const _0x1f1661=_0x537ac8();return null==_0x1f1661?(_0x381c2f(),_0x41cf6d([0x56,0x61,0x6c,0x69,0x64])):_0x41cf6d(_0x15bff7-_0x1f1661>(0x574a8eb3^_0x1bca5a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x41cf6d([0x74,0x68,0x65,0x6e])](_0x286c01)[_0x41cf6d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x286c01(_0x41cf6d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3eae9c=0x7370e433^_0x1bca5a;function _0x381c2f(){const _0x2245e9=_0x41cf6d([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ac691(_0x19663c(_0x16060d)),_0x20ea95=_0x58a9c3(_0x1ac691(window[_0x41cf6d([0x4d,0x61,0x74,0x68])][_0x41cf6d([0x63,0x65,0x69,0x6c])](_0x15bff7/_0x3eae9c)));window[_0x41cf6d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41cf6d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2245e9,_0x20ea95);}function _0x537ac8(){const _0x5beb6a=_0x41cf6d([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ac691(_0x19663c(_0x16060d)),_0x49f582=window[_0x41cf6d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41cf6d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5beb6a);return _0x49f582?window[_0x41cf6d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58a9c3(_0x49f582),0x10)*_0x3eae9c:null;}function _0x2de062(_0x513c91){return new window[(_0x41cf6d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14e6fa,_0x2fd852)=>{_0x513c91[_0x41cf6d([0x74,0x68,0x65,0x6e])](_0x14e6fa,_0x2fd852),window[_0x41cf6d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2fd852,0x7347de73^_0x1bca5a);});}}_0x45cb9d[_0x41cf6d([0x6f,0x6e])](_0x41cf6d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x36b892,_0x196d72)=>{if(_0x196d72[0x0]!=_0x16060d)return _0x286c01(_0x41cf6d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x196d72[0x1]={..._0x196d72[0x1],[_0x41cf6d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3bc172};},{[_0x41cf6d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41cf6d([0x68,0x69,0x67,0x68])}),_0x45cb9d[_0x41cf6d([0x6f,0x6e])](_0x41cf6d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5eb62f=>{_0x324115(_0x5eb62f[_0x41cf6d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x33111d=!0x0,_0x3a9594(_0x5eb62f[_0x41cf6d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x41cf6d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41cf6d([0x6c,0x6f,0x77])}),_0x26beab[_0x41cf6d([0x74,0x68,0x65,0x6e])](()=>{_0x33111d||_0x286c01(_0x41cf6d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5e9924(){return _0x45cb9d[_0x41cf6d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41cf6d([0x76,0x69,0x65,0x77])][_0x41cf6d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x41cf6d([0x61,0x75,0x74,0x6f]);}function _0x4b96fd(){_0x45cb9d[_0x41cf6d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41cf6d([0x76,0x69,0x65,0x77])][_0x41cf6d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x41cf6d([0x61,0x75,0x74,0x6f]);}}function _0x40be22(_0x5323a4){const _0x31a7b8=[new window[(_0x41cf6d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58520e=>setTimeout(_0x58520e,0x734f347f^_0x1bca5a)),_0x26beab[_0x41cf6d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x41cf6d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f0ac8=>{let _0x35412b=0x0;_0x45cb9d[_0x41cf6d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41cf6d([0x6f,0x6e])](_0x41cf6d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x528934,_0x4b00a6)=>{_0x4b00a6[0x0][_0x41cf6d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x35412b++,_0x35412b==(0x73460f5b^_0x1bca5a)&&(_0x2f0ac8(),_0x528934[_0x41cf6d([0x6f,0x66,0x66])]());});}))];return window[_0x41cf6d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x41cf6d([0x72,0x61,0x63,0x65])](_0x31a7b8)[_0x41cf6d([0x74,0x68,0x65,0x6e])](()=>_0x5323a4);}async function _0x3414f6(){await _0x26beab,_0x45cb9d[_0x41cf6d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41cf6d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1f292f,_0x45cb9d[_0x41cf6d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41cf6d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1f292f,_0x45cb9d[_0x41cf6d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x41cf6d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xb0f583(){return window[_0x41cf6d([0x67,0x6c,0x6f,0x62])]&&window[_0x41cf6d([0x67,0x6c,0x6f,0x62])][_0x41cf6d([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x28b440(){return _0x5a9aa8(_0x41cf6d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x226d41(_0x41cf6d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x41cf6d([0x73,0x74,0x61,0x74,0x65])]==_0x41cf6d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1dc4dc(){return _0x5a9aa8(_0x41cf6d([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 _0x57c82f(){return _0x5a9aa8(_0x41cf6d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xef9fa9(_0x4344ad){const _0x3ac067=_0x2197cb();_0x45cb9d[_0x3ac067]=_0x41cf6d([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4344ad,_0x4344ad!=_0x41cf6d([0x56,0x61,0x6c,0x69,0x64])&&_0x3414f6();}function _0x2197cb(){const _0xdb8716=window[_0x41cf6d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x41cf6d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x41cf6d([0x6e,0x6f,0x77])]())[_0x41cf6d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x41cf6d([0x2e]),'');let _0x79fda1=_0x41cf6d([0x4b]);for(let _0x25b5fb=0x0;_0x25b5fb<_0xdb8716[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x25b5fb+=0x2){let _0x3066fb=window[_0x41cf6d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xdb8716[_0x41cf6d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x25b5fb,_0x25b5fb+0x2));_0x3066fb>=_0x388be7[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3066fb-=_0x388be7[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x79fda1+=_0x388be7[_0x3066fb];}return _0x79fda1;}function _0x1cb403(){const _0x47cd8f=_0x4db4af[_0x41cf6d([0x73,0x70,0x6c,0x69,0x74])](_0x41cf6d([0x2e]));if(0x3!=_0x47cd8f[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x319229(_0x47cd8f[0x1]);function _0x319229(_0x3c6155){const _0xcb7397=_0x3145a6(_0x3c6155);return _0xcb7397&&_0x104ff0()?_0xcb7397:null;function _0x104ff0(){const _0x57c280=_0xcb7397[_0x41cf6d([0x6a,0x74,0x69])],_0x1d2181=window[_0x41cf6d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57c280[_0x41cf6d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57c280[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x543538={..._0xcb7397,[_0x41cf6d([0x6a,0x74,0x69])]:_0x57c280[_0x41cf6d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x57c280[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x543538[_0x41cf6d([0x76,0x63])],_0x19663c(_0x543538)==_0x1d2181;}}}async function _0x3656dc(){let _0x47ed9c=!0x0;try{const _0x1ed45f=_0x4db4af[_0x41cf6d([0x73,0x70,0x6c,0x69,0x74])](_0x41cf6d([0x2e])),[_0x7b6977,_0x32ab90,_0x4ab3ae]=_0x1ed45f;return _0x284919(_0x7b6977),await _0x3023a4(_0x7b6977,_0x32ab90,_0x4ab3ae),_0x47ed9c;}catch{return!0x1;}function _0x284919(_0x47e08d){const _0x4ad3a8=_0x3145a6(_0x47e08d);_0x4ad3a8&&_0x4ad3a8[_0x41cf6d([0x61,0x6c,0x67])]==_0x41cf6d([0x45,0x53,0x32,0x35,0x36])||(_0x47ed9c=!0x1);}async function _0x3023a4(_0x2c2926,_0x48c198,_0x5ef08d){const _0x407e8f=window[_0x41cf6d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x41cf6d([0x66,0x72,0x6f,0x6d])](_0x72c6ff(_0x5ef08d),_0x4672a6=>_0x4672a6[_0x41cf6d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3f0726=new window[(_0x41cf6d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x41cf6d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2c2926+_0x41cf6d([0x2e])+_0x48c198),_0x3427d1=window[_0x41cf6d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x41cf6d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3427d1)return;const _0x34778b=await _0x3427d1[_0x41cf6d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x41cf6d([0x6a,0x77,0x6b]),_0x50a3fb,{[_0x41cf6d([0x6e,0x61,0x6d,0x65])]:_0x41cf6d([0x45,0x43,0x44,0x53,0x41]),[_0x41cf6d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x41cf6d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x41cf6d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3427d1[_0x41cf6d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x41cf6d([0x6e,0x61,0x6d,0x65])]:_0x41cf6d([0x45,0x43,0x44,0x53,0x41]),[_0x41cf6d([0x68,0x61,0x73,0x68])]:{[_0x41cf6d([0x6e,0x61,0x6d,0x65])]:_0x41cf6d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x34778b,_0x407e8f,_0x3f0726)||(_0x47ed9c=!0x1);}}function _0x3145a6(_0x274751){return _0x274751[_0x41cf6d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x41cf6d([0x65,0x79]))?JSON[_0x41cf6d([0x70,0x61,0x72,0x73,0x65])](_0x72c6ff(_0x274751)):null;}function _0x72c6ff(_0x213f9f){return window[_0x41cf6d([0x61,0x74,0x6f,0x62])](_0x213f9f[_0x41cf6d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x41cf6d([0x2b]))[_0x41cf6d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x41cf6d([0x2f])));}function _0x19663c(_0x11e51c){let _0x54df69=0x1505;function _0x4d12af(_0x17756d){for(let _0x1a67a3=0x0;_0x1a67a3<_0x17756d[_0x41cf6d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a67a3++){const _0x10b0f9=_0x17756d[_0x41cf6d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1a67a3);_0x54df69=(_0x54df69<<0x5)+_0x54df69+_0x10b0f9,_0x54df69&=_0x54df69;}}function _0x591d45(_0x57c544){Array[_0x41cf6d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x57c544)?_0x57c544[_0x41cf6d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x591d45):_0x57c544&&typeof _0x57c544==_0x41cf6d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x41cf6d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x57c544)[_0x41cf6d([0x73,0x6f,0x72,0x74])]()[_0x41cf6d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1dffee,_0x3a469a])=>{_0x4d12af(_0x1dffee),_0x591d45(_0x3a469a);}):_0x4d12af(window[_0x41cf6d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x57c544));}return _0x591d45(_0x11e51c),_0x54df69>>>0x0;}function _0x1ac691(_0x541118){return _0x541118[_0x41cf6d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x41cf6d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x41cf6d([0x30]));}function _0x58a9c3(_0x3bf654){return _0x3bf654[_0x41cf6d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x41cf6d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x41cf6d([0x6a,0x6f,0x69,0x6e])]('');}function _0x5a9aa8(_0x339c94){return _0x45cb9d[_0x41cf6d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x41cf6d([0x68,0x61,0x73])](_0x339c94);}function _0x226d41(_0x2ac3c2){return _0x45cb9d[_0x41cf6d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x41cf6d([0x67,0x65,0x74])](_0x2ac3c2);}function _0x1f292f(){}function _0x41cf6d(_0x3b1fb3){return _0x3b1fb3['map'](_0xb81e8d=>String['fromCharCode'](_0xb81e8d))['join']('');}_0xef9fa9(await _0x196dd0());}(this);}['destroy'](){const _0x421fd6=this['editor']['plugins']['get'](o),_0x8b7052=this['editor']['config']['get']('collaboration.channelId');for(const _0xe5d9d8 of _0x421fd6['getCommentThreads']({'channelId':_0x8b7052}))_0x421fd6['_detachCommentThread'](_0xe5d9d8['id']),_0x421fd6['_threads']['delete'](_0xe5d9d8['id']);super['destroy']();}['hasMarkerForId'](_0x115f8a){return this['getAllMarkersForId'](_0x115f8a)['length']>0x0;}['getAllMarkersForId'](_0x59a7b8){const _0x40804c=[];for(const _0x5e2aa2 of this['editor']['model']['markers'])_0x5e2aa2['name']['startsWith']('comment:'+_0x59a7b8)&&_0x40804c['push'](_0x5e2aa2);return _0x40804c;}['scrollToThreadMarker'](_0x2a0589){setTimeout(()=>{const _0x4fbbce=this['_getTargetForId'](_0x2a0589);if(!_0x4fbbce)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2a0589&&nt({'target':_0x4fbbce[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x33e4b8){this['editor']['model']['change'](()=>{for(const _0x131735 of this['getAllMarkersForId'](_0x33e4b8))this['editor']['editing']['reconvertMarker'](_0x131735);});}['_attachArchivedThread'](_0x51fa1c){const _0x15e7e3=this['editor']['plugins']['get'](o),_0x253a78=this['editor']['plugins']['get'](b),_0x116645=_0x15e7e3['getCommentThread'](_0x51fa1c);if(!_0x116645['isAttached']){const _0x3d9db2=_0x116645['attachTo'](()=>this['_getTargetForId'](_0x116645['id']));_0x253a78['registerAnnotation'](_0x3d9db2),_0x116645['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x357c40=this['editor'],_0x3a6165=_0x357c40['plugins']['get'](it);_0x357c40['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xdc0919,_0x2ea329)=>{const {id:_0x4d46f9}=ft(_0xdc0919['markerName']),_0x571f55=_0x357c40['plugins']['get'](o)['getCommentThread'](_0x4d46f9),_0x389b43=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x4d46f9;let _0x3bc032;if(_0x571f55&&_0x571f55['isResolved']&&!_0x389b43&&_0xdc0919['item'])return _0x2ea329['consumable']['consume'](_0xdc0919['item'],'addMarker:'+_0xdc0919['markerName']),_0x2ea329['consumable']['consume'](_0xdc0919['item'],'removeMarker:'+_0xdc0919['markerName']),null;const _0x38fb51=['ck-comment-marker'];return _0x389b43&&_0x38fb51['push']('ck-comment-marker--active'),_0x3bc032=_0x571f55?.['length']?_0x571f55['comments']['first']['author']['id']:_0x3a6165['me']['id'],{'classes':_0x38fb51,'attributes':{'data-comment':_0x4d46f9,'data-author-id':_0x3bc032}};}}),_0x357c40['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x270be3,{options:_0x322cca})=>{if(_0x322cca['showCommentHighlights'])return null;const _0x3f6860=_0x357c40['plugins']['get'](o),_0x3d5ae6=_0x357c40['model']['markers']['get'](_0x270be3),{id:_0x1acda3,part:_0x36707c}=ft(_0x270be3);return _0x3d5ae6&&!_0x3d5ae6['affectsData']||_0x322cca['ignoreResolvedComments']&&_0x3f6860['getCommentThread'](_0x1acda3)?.['isResolved']?null:{'group':'comment','name':_0x36707c?_0x1acda3+':'+_0x36707c:_0x1acda3};}}),_0x357c40['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x54235a,{writer:_0x2e54a3})=>_0x2e54a3['createElement']('$marker',{'data-name':'comment:'+_0x54235a['getAttribute']('id')})}),_0x357c40['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3c0a3d=this['editor'],_0x1b2ef7=_0x3c0a3d['plugins']['get'](o),_0x5813c7=new Set(),_0x3c2e64=new Set();_0x3c0a3d['model']['document']['registerPostFixer'](_0xeda57e=>{let _0x22422d=!0x1;for(const {name:_0x47807b,data:_0x4be7bc}of _0x3c0a3d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3092b7,id:_0x75da45}=ft(_0x47807b);let _0x461368=_0x4be7bc['newRange'];if('comment'!==_0x3092b7||!_0x461368)continue;const _0x538728='$graveyard'===_0x461368['root']['rootName'];_0x538728||(_0x461368=ht(_0x461368,_0x3c0a3d['model']),!_0x461368||_0x461368['isCollapsed']||!_0x4be7bc['newRange']||_0x461368['isEqual'](_0x4be7bc['newRange']))?_0x3c0a3d['model']['hasContent'](_0x461368)&&!_0x538728?this['isThreadsLoadingPaused']?_0x5813c7['add'](_0x47807b):this['_handleThreadMarker'](_0x47807b,_0x75da45):(_0x3c2e64['add'](_0x47807b),_0x5813c7['delete'](_0x47807b),_0xeda57e['removeMarker'](_0x47807b),_0x22422d=!0x0):(_0xeda57e['updateMarker'](_0x47807b,{'range':_0x461368}),_0x22422d=!0x0);}return _0x22422d;}),this['on']('change:isThreadsLoadingPaused',(_0x3b3194,_0x1cc8ff,_0x392c29)=>{if(!_0x392c29&&_0x5813c7['size'])for(const _0x2ebd4d of _0x5813c7){const {id:_0x224685}=ft(_0x2ebd4d);_0x5813c7['delete'](_0x2ebd4d),_0x3c0a3d['model']['markers']['get'](_0x2ebd4d)&&this['_handleThreadMarker'](_0x2ebd4d,_0x224685);}}),this['listenTo'](_0x3c0a3d['model']['document'],'change',()=>{for(const {name:_0x37dd53,data:{newRange:_0x42f722}}of _0x3c0a3d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x7278dd,id:_0x5efe58}=ft(_0x37dd53);if('comment'!==_0x7278dd)continue;const _0x3b93d5=_0x1b2ef7['getCommentThread'](_0x5efe58),_0x14d56f=this['hasMarkerForId'](_0x5efe58);_0x3b93d5&&(!_0x3b93d5['_hasTargetInContent']&&_0x42f722&&_0x3c0a3d['editing']['view']['once']('render',()=>{const _0x891c4d=_0x3c0a3d['plugins']['get'](y),_0x113135=_0x1b2ef7['_threadToController']['get'](_0x3b93d5)['view'];_0x891c4d['getByInnerView'](_0x113135)['refreshVisibility']();},{'priority':'low'}),_0x3b93d5['_hasTargetInContent']=_0x14d56f||!!_0x42f722),_0x42f722||(_0x3c2e64['add'](_0x37dd53),_0x5813c7['delete'](_0x37dd53));}for(const _0x34912e of _0x3c2e64){const {id:_0x2ea9db}=ft(_0x34912e),_0x16edfc=_0x1b2ef7['getCommentThread'](_0x2ea9db);if(_0x5813c7['delete'](_0x34912e),!_0x16edfc)continue;const _0x3789f9=this['hasMarkerForId'](_0x2ea9db);_0x3789f9||_0x16edfc['isSubmitted']?_0x3789f9||_0x16edfc['unlinkedAt']||_0x16edfc['setUnlinkedAt'](new Date()):_0x16edfc['remove']();}_0x3c2e64['clear']();});}['_handleInitialThreads'](_0x18b994){_0x18b994['forEach'](_0x1a2bf6=>{_0x1a2bf6['unlinkedAt']&&this['_attachArchivedThread'](_0x1a2bf6['id']);});}['_getTargetForId'](_0x4faa0d){const _0x4eefa2=this['editor'],_0x504996=this['getAllMarkersForId'](_0x4faa0d);return et(_0x4eefa2['editing'],_0x504996);}['_getTextContext'](_0x275f45){const _0x137cd1=this['getAllMarkersForId'](_0x275f45);let _0x2bbe94='',_0x2c587b=!0x1;for(const _0x5a2036 of _0x137cd1){const _0x4817d6=_0x5a2036['getRange']();for(const _0x547aa3 of Array['from'](_0x4817d6['getItems']()))_0x547aa3['is']('$textProxy')?(_0x2bbe94&&_0x2c587b&&(_0x2bbe94+='\x20',_0x2c587b=!0x1),_0x2bbe94+=_0x547aa3['data']):_0x2c587b=!0x0;_0x2c587b=!0x0;}return _0x2bbe94['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1ce3f4,_0x27abaa){const _0x49bf6e=this['editor'],_0x9ee8ac=_0x49bf6e['plugins']['get'](o);let _0x1dd488=_0x9ee8ac['getCommentThread'](_0x27abaa);const _0x27ff70=_0x49bf6e['config']['get']('collaboration.channelId'),_0x2f7af7=_0x49bf6e['plugins']['get'](b);if(_0x1dd488&&(_0x1dd488['unlinkedAt']&&_0x1dd488['setUnlinkedAt'](null),_0x1dd488['isAttached']))return _0x1dd488;return!this['getAllMarkersForId'](_0x27abaa)[0x0]['managedUsingOperations']?_0x49bf6e['editing']['view']['once']('render',()=>{if(_0x9ee8ac['getCommentThread'](_0x27abaa))return;const _0x2285b0=_0x49bf6e['plugins']['get'](y);_0x1dd488=_0x9ee8ac['openNewCommentThread']({'channelId':_0x27ff70,'threadId':_0x27abaa,'target':()=>this['_getTargetForId'](_0x27abaa),'context':{'type':'text','value':this['_getTextContext'](_0x27abaa)}});const _0x5b0cb9=_0x9ee8ac['_threadToController']['get'](_0x1dd488)['view'],_0x8ca95a=_0x2285b0['getByInnerView'](_0x5b0cb9);_0x8ca95a&&_0x2f7af7['registerAnnotation'](_0x8ca95a);},{'priority':'low'}):_0x9ee8ac['fetchCommentThread']({'channelId':_0x27ff70,'threadId':_0x27abaa})['then'](_0x37bee8=>{if('destroyed'!==_0x49bf6e['state']){if(_0x1dd488=_0x37bee8,_0x1dd488&&!_0x1dd488['isAttached']){const _0x563656=_0x1dd488['attachTo'](()=>this['_getTargetForId'](_0x27abaa));_0x2f7af7['registerAnnotation'](_0x563656),_0x1dd488['isResolved']&&this['_reconvertMarkers'](_0x27abaa);}else{if(!_0x1dd488){const _0x1ec9a6=this['getAllMarkersForId'](_0x27abaa);_0x49bf6e['model']['change'](_0x204454=>{for(const _0x2cdd40 of _0x1ec9a6)_0x204454['removeMarker'](_0x2cdd40);});}}}}),_0x1dd488;}['_handleThreadMarker'](_0x7e691b,_0x151ff2){const _0x1b4d9a=this['_attachMarkerToThread'](_0x7e691b,_0x151ff2);_0x1b4d9a&&!_0x1b4d9a['context']&&_0x1b4d9a['setContext']({'type':'text','value':this['_getTextContext'](_0x151ff2)});}['_initAriaMarkerChangeAnnouncements'](){const _0x2864e9=this['editor'];rt(_0x2864e9['model'],({left:_0x180562,entered:_0x2b0308})=>{for(const _0x3cbcde of _0x180562)if(mt(_0x3cbcde)){_0x2864e9['ui']['ariaLiveAnnouncer']['announce'](N(_0x2864e9['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x422db6 of _0x2b0308)if(mt(_0x422db6)){_0x2864e9['ui']['ariaLiveAnnouncer']['announce'](N(_0x2864e9['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x46f821)));break;}});}}function dt(_0x38072f,_0x3cb2c3){return _0x3cb2c3?_0x38072f+':'+_0x3cb2c3:_0x38072f;}function ht(_0x1d4eca,_0x28eabd){const _0x573540=_0x28eabd['schema'],_0x40ee23=_0x28eabd['createRange'](_0x1d4eca['start']);for(const _0xc7b06b of _0x1d4eca['getWalker']()){const {type:_0x35d76f,item:_0x37a02b,nextPosition:_0x3787ea}=_0xc7b06b;if('text'===_0x35d76f||_0x573540['isObject'](_0x37a02b)){const _0xfaa779=_0x28eabd['createPositionBefore'](_0x37a02b);_0x40ee23['isCollapsed']&&(_0x40ee23['start']=_0xfaa779),_0x40ee23['end']=_0x3787ea;}}return _0x40ee23;}function mt(_0x1fb7a9){return'comment'===ft(_0x1fb7a9['name'])['group'];}class s extends _0x17f83a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x3a95b0=this['editor'],_0x4701f9=_0x3a95b0['plugins']['get'](o),_0x52453a=_0x3a95b0['plugins']['get'](r),_0x507b01=_0x3a95b0['plugins']['get'](y),_0x4e6284=_0x3a95b0['plugins']['get'](b);_0x3a95b0['ui']['componentFactory']['add']('comment',()=>{const _0xb6b199=this['_createUIButton'](_0x160831);return _0xb6b199['tooltip']=!0x0,_0xb6b199;}),_0x3a95b0['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x210136)),_0x4e6284['addSourceCollector'](()=>{const _0x3aac31=[];for(const [_0x55ed23,_0x122259]of _0x4701f9['_threadToController']){const _0x149a2e=_0x52453a['getAllMarkersForId'](_0x55ed23['id']),_0x296c74=_0x149a2e['map'](_0x36ad05=>_0x36ad05['getRange']());_0x149a2e['length']>0x0&&_0x3aac31['push']([_0x122259['view'],_0x296c74]);}return _0x3aac31;}),this['listenTo'](_0x507b01,'change:activeAnnotations',(_0x63f197,_0x204e26,_0x2c41d8)=>{const _0x57ff6c=Array['from'](_0x2c41d8)['map'](_0x45ad6f=>_0x45ad6f['innerView'])['find'](_0x15d7d2=>_0x4701f9['_viewToController']['has'](_0x15d7d2));if(!_0x57ff6c)return void(_0x52453a['activeMarker']=null);const _0x5c5dd1=_0x4701f9['_viewToController']['get'](_0x57ff6c)['model']['id'],_0x118034='comment:'+_0x5c5dd1;_0x5c5dd1&&_0x52453a['hasMarkerForId'](_0x5c5dd1)?_0x52453a['activeMarker']=_0x118034:_0x52453a['activeMarker']&&(_0x52453a['activeMarker']=null);}),this['listenTo'](_0x4701f9,'removeCommentThread',(_0x376d8c,{threadId:_0x477c0c,isFromAdapter:_0x1ee7c5})=>{!_0x1ee7c5&&_0x3a95b0['ui']['focusTracker']['isFocused']&&_0x52453a['hasMarkerForId'](_0x477c0c)&&_0x3a95b0['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4701f9,'addComment',(_0x329e40,{threadId:_0x4bf9e3,isFromAdapter:_0x51fc61})=>{if(_0x51fc61||!_0x52453a['hasMarkerForId'](_0x4bf9e3)||!_0x4701f9['hasCommentThread'](_0x4bf9e3))return;0x1===_0x4701f9['getCommentThread'](_0x4bf9e3)['length']&&(_0x3a95b0['editing']['view']['focus'](),_0x329e40['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x22ec6f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xb65932;for(const _0xd3eae6 in _0x22ec6f){const _0x2ec3ca=_0xd3eae6,_0x452e61=_0x22ec6f[_0x2ec3ca];if('commentsLicenseKeyValid'==_0x452e61||'commentsLicenseKeyInvalid'==_0x452e61||'commentsLicenseKeyExpired'==_0x452e61||'commentsLicenseKeyDomainLimit'==_0x452e61||'commentsLicenseKeyNotAllowed'==_0x452e61||'commentsLicenseKeyEvaluationLimit'==_0x452e61||'commentsLicenseKeyUsageLimit'==_0x452e61){delete _0x22ec6f[_0x2ec3ca],_0xb65932=_0x452e61,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xb65932&&_0x22ec6f['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xb65932&&_0x22ec6f['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xb65932&&_0x22ec6f['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xb65932&&_0x22ec6f['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xb65932&&_0x22ec6f['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0xb65932&&_0x22ec6f['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x28c363){const _0x5903e8=this['editor'],_0x79b0fe=new _0x28c363(_0x5903e8['locale']),_0x2845fb=_0x5903e8['commands']['get']('addCommentThread');return _0x79b0fe['set']({'label':N(_0x5903e8['locale'],'Comment'),'icon':_0x4d6302}),_0x79b0fe['bind']('isEnabled')['to'](_0x2845fb,'isEnabled',_0x2845fb,'hasContent',(_0x5365fc,_0x1a7422)=>_0x5365fc&&_0x1a7422),this['listenTo'](_0x79b0fe,'execute',()=>{_0x2845fb['execute']();}),_0x79b0fe;}}class i extends _0x17f83a{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x26f703){super(_0x26f703),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x429cf4,_0x174b55,_0x55214c)=>{_0x55214c?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0xa87f76,_0x307919]of this['editor']['commands'])_0x307919['affectsData']&&'addCommentThread'!==_0xa87f76&&_0x307919['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x166747=this['editor']['editing']['view']['document'];this['listenTo'](_0x166747,'cut',_0x3c2dd1=>_0x3c2dd1['stop'](),{'priority':'highest'}),this['listenTo'](_0x166747,'clipboardInput',_0x2915d8=>_0x2915d8['stop'](),{'priority':'highest'}),this['listenTo'](_0x166747,'delete',_0x465b80=>_0x465b80['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4fc2d9,_0x33abc5]of this['editor']['commands'])_0x33abc5['affectsData']&&'addCommentThread'!==_0x4fc2d9&&_0x33abc5['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x1acf46{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x470611){super(_0x470611),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x52a5b2=this['context']['plugins']['get'](y);this['listenTo'](_0x52a5b2,'_activateAnnotation',(_0x12479e,_0x42f563)=>{for(const _0x4f870e of this['activeUIs']){const _0x497fc0=this['_uis']['get'](_0x4f870e);(0x0,this['uisData']['get'](_0x4f870e)['filter'])(_0x42f563)&&_0x497fc0['setActiveAnnotation'](_0x42f563);}}),this['listenTo'](_0x52a5b2,'_deactivateAllAnnotations',()=>{for(const _0x28b750 of this['activeUIs']){this['_uis']['get'](_0x28b750)['setActiveAnnotation'](null);}}),this['listenTo'](_0x52a5b2['_visibleAnnotations'],'add',(_0x440cf3,_0x37b430)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x37b430);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x42770d){return this['activeUIs']['has'](_0x42770d);}['activate'](_0x20129e,_0x443fe3=this['defaultFilter']){const _0x1d4fb6=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x20129e))throw new _0x23e2eb('annotationsuis-missing-ui',this,{'uiName':_0x20129e});this['isActive'](_0x20129e)&&this['deactivate'](_0x20129e),this['activeUIs']['add'](_0x20129e);const _0x18f51f=new S();v({'source':_0x1d4fb6['_visibleAnnotations'],'target':_0x18f51f,'filter':_0x443fe3}),this['uisData']['set'](_0x20129e,{'collection':_0x18f51f,'filter':_0x443fe3});const _0xa45c9e=this['_uis']['get'](_0x20129e);_0xa45c9e['attach'](_0x18f51f),this['listenTo'](_0xa45c9e,'change:activeAnnotation',(_0x1261d9,_0xd908ac,_0xdcb5e4,_0xb73f4b)=>{_0xb73f4b&&_0x1d4fb6['_removeActiveAnnotation'](_0xb73f4b),_0xdcb5e4&&_0x1d4fb6['_addActiveAnnotation'](_0xdcb5e4);});}['deactivate'](_0x723312){if(this['activeUIs']['delete'](_0x723312),!this['_uis']['has'](_0x723312))throw new _0x23e2eb('annotationsuis-missing-ui',this,{'uiName':_0x723312});const _0x48cc7d=this['_uis']['get'](_0x723312);_0x48cc7d['detach'](),this['stopListening'](_0x48cc7d),this['uisData']['get'](_0x723312)['collection']['destroy'](),this['uisData']['delete'](_0x723312);}['switchTo'](_0x4d84b6){if(!this['_uis']['has'](_0x4d84b6))throw new _0x23e2eb('annotationsuis-missing-ui',this,{'uiName':_0x4d84b6});const _0x581547=this['context']['plugins']['get'](y),_0x5c23ef=Array['from'](_0x581547['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4d84b6);const _0x35f4d1=this['_uis']['get'](_0x4d84b6);_0x35f4d1['setActiveAnnotation'](_0x5c23ef),_0x35f4d1['_setSelectedAnnotations']&&_0x5c23ef&&_0x35f4d1['_setSelectedAnnotations']([_0x5c23ef]);}['deactivateAll'](){for(const _0x2691db of this['activeUIs'])this['deactivate'](_0x2691db);}['register'](_0x5f505e,_0x3e9941){if(this['_uis']['has'](_0x5f505e))throw new _0x23e2eb('annotationsuis-register-already-registered');if('function'!=typeof _0x3e9941['attach']||'function'!=typeof _0x3e9941['detach']||'function'!=typeof _0x3e9941['setActiveAnnotation'])throw new _0x23e2eb('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5f505e,_0x3e9941);}['refilterAnnotations'](){const _0x124ee9=this['context']['plugins']['get'](y)['collection'],_0x2aee4a=new Map(),_0x311221=Array['from'](this['activeUIs']);for(const _0x1fca82 of this['activeUIs']){const _0x3c1ffe=this['uisData']['get'](_0x1fca82)['collection'];for(const _0x3947fb of _0x3c1ffe)_0x2aee4a['set'](_0x3947fb,_0x1fca82);}for(const _0x3bb462 of _0x124ee9){const _0x65eeb1=_0x2aee4a['get'](_0x3bb462);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3bb462);const _0x44bd4f=_0x311221['find'](_0x56200a=>this['uisData']['get'](_0x56200a)['filter'](_0x3bb462));_0x65eeb1!==_0x44bd4f&&(_0x65eeb1&&this['uisData']['get'](_0x65eeb1)['collection']['remove'](_0x3bb462),_0x44bd4f&&this['uisData']['get'](_0x44bd4f)['collection']['add'](_0x3bb462));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x332df8){const _0x191762=[];for(const _0x13463f of this['activeUIs']){(0x0,this['uisData']['get'](_0x13463f)['filter'])(_0x332df8)&&_0x191762['push'](_0x13463f);}if(_0x191762['length']>0x1)throw new _0x23e2eb('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x191762,'annotationType':_0x332df8['type']});}}const he=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x504bdc){super(_0x504bdc);const _0x4732ff=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 _0x153b35(),this['focusCycler']=new _0x48fa6b({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4732ff['to']('class')],'style':{'minHeight':_0x4732ff['to']('minHeight',_0x5b7ac4=>'number'==typeof _0x5b7ac4?he(_0x5b7ac4+0xa):null)},'dir':_0x504bdc['uiLanguageDirection'],'role':'application','aria-label':N(_0x504bdc,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x504bdc,'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',_0x1e2a23=>{this['_updateItemPositionInFocusables'](_0x1e2a23['source']);}),this['list']['forEach'](_0xd1a187=>{this['focusTracker']['add'](_0xd1a187['element']),this['_updateItemPositionInFocusables'](_0xd1a187);}),this['list']['on']('change',(_0x498011,_0x425f51)=>{for(const _0x4562f3 of _0x425f51['removed'])this['focusTracker']['remove'](_0x4562f3['element']),this['focusables']['remove'](_0x4562f3);for(const _0x378a29 of _0x425f51['added'])this['focusTracker']['add'](_0x378a29['element']),this['_updateItemPositionInFocusables'](_0x378a29);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x3b2cd9){const _0x46e95e=this['focusables']['getIndex'](_0x3b2cd9);let _0x14b342,_0x567c0e;for(const _0x4e595b of this['focusables'])if(_0x3b2cd9['top']<_0x4e595b['top']){_0x14b342=_0x4e595b;break;}if(_0x567c0e=_0x14b342?this['focusables']['getIndex'](_0x14b342):this['focusables']['length'],-0x1!==_0x46e95e){if(_0x46e95e===_0x567c0e-0x1)return;this['focusables']['remove'](_0x3b2cd9),_0x567c0e=_0x14b342?this['focusables']['getIndex'](_0x14b342):this['focusables']['length'];}this['focusables']['add'](_0x3b2cd9,_0x567c0e);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x129f2a){super(_0x129f2a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x35fbe9,_0x7fce28)=>_0x35fbe9+_0x7fce28),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x30e89a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x30e89a['to']('isAnimationDisabled',_0x531322=>_0x531322?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x30e89a['to']('top',_0x14f7ab=>Ot(_0x14f7ab))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1fd4f0=this['element']['clientHeight'];_0x1fd4f0&&(this['height']=_0x1fd4f0);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1acf46{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e6762){super(_0x5e6762),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 _0x3158d2=this['context']['config']['get']('sidebar.container');_0x3158d2&&this['setContainer'](_0x3158d2);}['setContainer'](_0x49c360){if(!g(_0x49c360))throw new _0x23e2eb('sidebar-setcontainer-invalid-element');this['container']=_0x49c360;}['_attachToContainer']({viewClass:_0x18f896='',spaceBetweenItems:_0x5ca391=0x19}={}){if(!g(this['container']))throw new _0x23e2eb('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x18f896,this['_spaceBetweenItems']=_0x5ca391;}['rearrange']({removedAnnotation:_0x5a4f8f,previousAnnotation:_0x24808b,nextAnnotation:_0x3c6faf}){const _0x5dddff=this['getSidebarItemView'](_0x5a4f8f);this['view']['list']['remove'](_0x5dddff),this['_destroySidebarItemView'](_0x5a4f8f),_0x24808b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x24808b)),_0x3c6faf&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3c6faf)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5756a9,activatedAnnotation:_0x2bf066,disableAnimationOnActivatedAnnotation:_0x465137}){if(this['_activeAnnotation']=_0x2bf066,_0x5756a9){_0x5756a9['isActive']=!0x1;const _0x498e29=this['getSidebarItemView'](_0x5756a9);_0x498e29&&_0x465137&&(_0x498e29['isAnimationDisabled']=!0x1);}if(_0x2bf066){const _0x5a5da0=this['getSidebarItemView'](_0x2bf066);_0x5a5da0&&(_0x2bf066['isActive']=!0x0,_0x465137&&(_0x5a5da0['isAnimationDisabled']=!0x0,_0x5a5da0['top']+=0x1),this['_alignToTargetRect'](_0x5a5da0));}}['_detachFromContainer'](_0x8e2d1b){if(this['view']['element']['remove'](),_0x8e2d1b){for(const _0xafbc44 of _0x8e2d1b)this['_destroySidebarItemView'](_0xafbc44);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x27b277,_0xccd296){_0xccd296||(_0xccd296=_0x27b277['view']);const _0x51b099=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x51b099,_0x27b277),this['_annotationToSidebarItemView']['set'](_0x27b277,_0x51b099),_0x51b099['content']['add'](_0xccd296),this['listenTo'](_0x27b277['view'],'change:targetRect',(_0x1dceae,_0x11093a,_0x4044e2)=>{const _0x473671=this['_getTargetTop'](_0x27b277,_0x4044e2);_0x51b099['_targetTop']!=_0x473671&&(_0x51b099['_targetTop']=_0x473671,this['_setItemTop'](_0x51b099,_0x473671));}),this['listenTo'](_0x51b099,'change:top',()=>{this['_recalculate'](_0x51b099,'top');}),this['listenTo'](_0x51b099,'change:bottom',()=>{this['_recalculate'](_0x51b099,'bottom');}),this['_alignToTargetRect'](_0x51b099);const _0x455925=this['_getItemBefore'](_0x51b099);if(_0x455925)this['_alignAfterItem'](_0x455925,_0x51b099)||this['_alignToTargetRect'](_0x51b099);else this['_alignToTargetRect'](_0x51b099);return this['_updateLastItem'](),this['view']['list']['add'](_0x51b099),_0x51b099;}['_alignForTopChange'](_0x1f4815){if(!_0x1f4815['content']['length'])return;const _0x5bd1c7=this['_getItemBefore'](_0x1f4815);if(!_0x5bd1c7)return;const _0x3c15a7=this['_sidebarItemViewToAnnotation']['get'](_0x5bd1c7),_0x4e4cdf=this['_activeAnnotation'];_0x4e4cdf&&_0x4e4cdf===_0x3c15a7?this['_alignAfterItem'](_0x5bd1c7,_0x1f4815):this['_alignBeforeItem'](_0x1f4815,_0x5bd1c7);}['_alignForBottomChange'](_0x5f13d0){if(!_0x5f13d0['content']['length'])return;const _0x39542f=this['_getItemAfter'](_0x5f13d0);if(!_0x39542f)return;const _0x2587df=this['_sidebarItemViewToAnnotation']['get'](_0x39542f),_0x274b8e=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x39ea37=this['_activeAnnotation'];_0x39ea37&&_0x39ea37===_0x2587df&&_0x274b8e?(this['_alignBeforeItem'](_0x39542f,_0x5f13d0),this['_alignAfterItem'](_0x5f13d0,_0x39542f)):_0x39ea37&&_0x39ea37===_0x2587df?this['_alignBeforeItem'](_0x39542f,_0x5f13d0):this['_alignAfterItem'](_0x5f13d0,_0x39542f);}['_recalculate'](_0x242bb9,_0x7235bd){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x550cc0,changedProp:_0x39d14f}of this['_recalculateBuffer'])'top'===_0x39d14f?this['_alignForTopChange'](_0x550cc0):this['_alignForBottomChange'](_0x550cc0);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x242bb9,'changedProp':_0x7235bd});}['getSidebarItemView'](_0x430806){return this['_annotationToSidebarItemView']['get'](_0x430806);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1036f9){const _0x32ad07=this['getSidebarItemView'](_0x1036f9);this['stopListening'](_0x32ad07),this['stopListening'](_0x1036f9['view']),_0x32ad07['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1036f9),this['_sidebarItemViewToAnnotation']['delete'](_0x32ad07);}['_createSidebarView'](){const _0x24b35e=new H(this['context']['locale']);return _0x24b35e['render'](),this['on']('change:_lastItem',(_0x13de65,_0xdf03e,_0x48f582,_0x581fa7)=>{_0x581fa7&&_0x24b35e['unbind']('minHeight'),_0x48f582?_0x24b35e['bind']('minHeight')['to'](_0x48f582,'bottom'):_0x24b35e['minHeight']=null;}),_0x24b35e;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x1a979f){const _0x27cf52=this['_sidebarItemViewToAnnotation']['get'](_0x1a979f),_0x522137=_0x27cf52&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x27cf52)-0x1);return _0x522137&&this['getSidebarItemView'](_0x522137)||null;}['_getItemAfter'](_0x30e18f){const _0x2760f7=this['_sidebarItemViewToAnnotation']['get'](_0x30e18f),_0x613db0=_0x2760f7&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2760f7)+0x1);return _0x613db0&&this['getSidebarItemView'](_0x613db0)||null;}['_alignBeforeItem'](_0x597a8d,_0x58a9f6){_0x597a8d['updateHeight']();const _0x1e56b1=G(_0x58a9f6['bottom']+this['_spaceBetweenItems'],_0x597a8d['top']);return!!_0x1e56b1&&(this['_setItemTop'](_0x58a9f6,_0x58a9f6['top']-_0x1e56b1),!0x0);}['_alignAfterItem'](_0x50f397,_0x2eae28){_0x50f397['updateHeight']();const _0x2d117d=G(_0x50f397['bottom']+this['_spaceBetweenItems'],_0x2eae28['top']);return!!_0x2d117d&&(this['_setItemTop'](_0x2eae28,_0x2eae28['top']+_0x2d117d,!0x1),!0x0);}['_alignToTargetRect'](_0x22e844){const _0x134057=this['_sidebarItemViewToAnnotation']['get'](_0x22e844);if(!_0x134057||!_0x134057['target']||!_0x134057['targetRect'])return;const _0x2dfe01=this['_getTargetTop'](_0x134057,_0x134057['targetRect']);this['_setItemTop'](_0x22e844,_0x2dfe01);}['_getTargetTop'](_0x2bee12,_0x5e375e){if(null===_0x5e375e)return 0x0;if(_0x2bee12['target']instanceof _0x3abe6c)return _0x5e375e['top'];{const _0x2fd107=new _0x3abe6c(this['view']['element'])['top'];return _0x5e375e['top']-_0x2fd107;}}['_setItemTop'](_0x580fda,_0x32da2a,_0x18e391=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x18e391&&(_0x32da2a=Math['max'](_0x32da2a,this['_getMaxAvailableTop'](_0x580fda))),_0x580fda['top']=_0x32da2a;}['_getMaxAvailableTop'](_0x2533a7){let _0x1477e0=this['_getItemBefore'](_0x2533a7),_0x48560b=0x0;for(;_0x1477e0;)_0x1477e0['updateHeight'](),_0x48560b+=this['_spaceBetweenItems']+_0x1477e0['height'],_0x1477e0=this['_getItemBefore'](_0x1477e0);return _0x48560b;}}function G(_0x3e7d16,_0x581ba9){return Math['max'](_0x3e7d16-_0x581ba9,0x0);}function g(_0x8170a4){return null!==_0x8170a4&&'object'==typeof _0x8170a4&&0x1===_0x8170a4['nodeType'];}class e extends _0x1acf46{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22dd8c){super(_0x22dd8c),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4290a9(),this['_refreshPositioningDebounced']=_0x5db34e(()=>{_0x22dd8c['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x478d0b=this['context']['plugins']['get'](j),_0x263538=this['context']['plugins']['get'](z);_0x478d0b['register']('wideSidebar',this),_0x263538['container']&&_0x478d0b['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4737c6){if(_0x4737c6===this['activeAnnotation'])return;const _0x310b48=this['context']['plugins']['get'](z);_0x310b48['_activeAnnotation']=_0x4737c6;const _0x3be737=this['activeAnnotation'];_0x310b48['refresh']({'blurredAnnotation':_0x3be737,'activatedAnnotation':_0x4737c6}),this['activeAnnotation']=_0x4737c6;}['attach'](_0x4b176f){this['annotations']=_0x4b176f;const _0x130f2e=this['context']['plugins']['get'](z);if(_0x130f2e['_annotations']=_0x4b176f,this['isAttached'])throw new _0x23e2eb('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x130f2e,'set:container',()=>{this['detach'](),this['listenTo'](_0x130f2e,'change:container',_0x536ecc=>{_0x536ecc['off'](),this['attach'](_0x4b176f);});}),_0x130f2e['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3a592b=_0x5718cc=>{_0x5718cc['updateTargetRect'](),_0x130f2e['addAnnotation'](_0x5718cc);};for(const _0x25ee67 of _0x4b176f)_0x3a592b(_0x25ee67);this['listenTo'](_0x4b176f,'add',(_0x557c8f,_0x57cb51)=>{_0x3a592b(_0x57cb51);}),this['listenTo'](_0x4b176f,'remove',(_0x3004d4,_0x175f97,_0x48b286)=>{_0x130f2e['rearrange']({'removedAnnotation':_0x175f97,'previousAnnotation':_0x4b176f['get'](_0x48b286-0x1),'nextAnnotation':_0x4b176f['get'](_0x48b286+0x1)}),_0x175f97===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4b176f,'focus',(_0x2c1611,_0x4c8862)=>{this['setActiveAnnotation'](_0x4c8862);}),this['listenTo'](_0x4b176f,'blur',()=>{this['setActiveAnnotation'](null);});const _0x417331=this['context']instanceof _0x449463?this['context']['editors']:new _0x4290a9([this['context']]);for(const _0x2b894b of _0x417331)this['_integrateWithEditorAnnotations'](_0x2b894b);this['listenTo'](_0x417331,'add',(_0x1f5775,_0x1b8af4)=>{this['listenTo'](_0x1b8af4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1b8af4);});}),this['listenTo'](_0x417331,'remove',(_0x2926d0,_0x4eecfb)=>{_0x4eecfb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4eecfb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x23e2eb('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3741cf=this['context']['plugins']['get'](z);_0x3741cf['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3741cf),this['stopListening'](this['annotations']),this['context']instanceof _0x449463&&this['stopListening'](this['context']['editors']);for(const _0x53fefd of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x53fefd);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4d9cec){if(!_0x4d9cec['plugins']['has']('EditorAnnotations'))return;const _0x2cd0ae=_0x4d9cec['plugins']['get']('EditorAnnotations'),_0xbdfbac=()=>{const _0x313292=_0x2cd0ae['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x313292[0x0]||null);};this['listenTo'](_0x2cd0ae,'refresh',_0xbdfbac),this['listenTo'](_0x2cd0ae,'blur',(_0x1d5017,{isAnnotationTracked:_0x1dfa06})=>{this['activeAnnotation']&&_0x1dfa06(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2cd0ae,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x493c3e=>{_0x2cd0ae['hasDomSelection']()&&(_0xbdfbac(),_0x493c3e['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2cd0ae);}['_destroyEditorAnnotationsIntegration'](_0x2e8e8e){this['stopListening'](_0x2e8e8e),this['_editorAnnotations']['remove'](_0x2e8e8e);}}class C extends _0x160831{['counterView'];constructor(_0x54d7ec){super(_0x54d7ec);const _0x4a3e48=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4a061f,_0xffba9c)=>_0x4a061f?'...':_0xffba9c['toString']()),this['set']('annotationType',''),this['icon']=_0x4d6302,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4a3e48['to']('annotationType',_0x57cf34=>'ck-annotation-counter__badge--'+_0x57cf34),_0x4a3e48['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4a3e48['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1acf46{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x40e97d){super(_0x40e97d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x596629())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4290a9(),this['_refreshPositioningDebounced']=_0x5db34e(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3d2f89(this['context']['locale']),this['balloonPanelView']=new _0x1d9ee6(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5abf8c){this['annotations']=_0x5abf8c;const _0x1af106=this['context']['plugins']['get'](z),_0x7978e7=this['balloonPanelView'];if(_0x1af106['_annotations']=_0x5abf8c,this['isAttached'])throw new _0x23e2eb('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1af106,'set:container',()=>{this['detach'](),this['listenTo'](_0x1af106,'change:container',_0x40ac23=>{_0x40ac23['off'](),this['attach'](_0x5abf8c);});}),_0x1af106['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5f7d8b=_0x15374d=>{const _0x2a7514=new C(this['context']['locale']);_0x1af106['addAnnotation'](_0x15374d,_0x2a7514),this['_annotationToNarrowView']['set'](_0x15374d,_0x2a7514),_0x2a7514['bind']('isDirty','annotationType','number')['to'](_0x15374d['view'],'isDirty','type','length'),_0x2a7514['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x7978e7['content']['first']!==_0x15374d['view']?(this['_showBalloon'](_0x15374d),_0x15374d['view']['element']['focus'](),this['setActiveAnnotation'](_0x15374d)):this['setActiveAnnotation'](null);});};for(const _0x142b60 of _0x5abf8c)_0x5f7d8b(_0x142b60);this['listenTo'](_0x5abf8c,'add',(_0xf91172,_0x4a8022)=>{_0x5f7d8b(_0x4a8022);}),this['listenTo'](_0x5abf8c,'remove',(_0x59d34e,_0x305296,_0xf83934)=>{this['_annotationToNarrowView']['get'](_0x305296)['destroy'](),this['_annotationToNarrowView']['delete'](_0x305296),_0x1af106['rearrange']({'removedAnnotation':_0x305296,'previousAnnotation':_0x5abf8c['get'](_0xf83934-0x1),'nextAnnotation':_0x5abf8c['get'](_0xf83934+0x1)}),_0x305296===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5abf8c,'focus',(_0x1e0102,_0x45629d)=>{this['setActiveAnnotation'](_0x45629d);}),this['listenTo'](_0x5abf8c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2edf70,_0x43a878)=>{_0x43a878['keyCode']===_0x25dde1['esc']&&_0x7978e7['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x7978e7['content']['first']),this['_hideBalloon'](),_0x43a878['stopPropagation'](),_0x43a878['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x14b01c,_0x17e2dc)=>{const _0x32924a=_0x17e2dc['target'];_0x7978e7['isVisible']&&_0x7978e7['element']['contains'](_0x32924a)||_0x1af106['view']['element']['contains'](_0x32924a)||_0x14b01c['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3ff63a=>_0x3ff63a['contains'](_0x32924a))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x51b5fa=this['context']instanceof _0x449463?this['context']['editors']:new _0x4290a9([this['context']]);for(const _0x4f9541 of _0x51b5fa)this['_integrateWithEditorAnnotations'](_0x4f9541);this['listenTo'](_0x51b5fa,'add',(_0x4a0c0a,_0x586b2c)=>{this['listenTo'](_0x586b2c,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x586b2c);});}),this['listenTo'](_0x51b5fa,'remove',(_0x45c25e,_0x8eaa59)=>{_0x8eaa59['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x8eaa59['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4584e9){if(_0x4584e9===this['activeAnnotation'])return;const _0x38ff46=this['context']['plugins']['get'](z);if(_0x38ff46['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4584e9,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4584e9)_0x38ff46['getSidebarItemView'](_0x4584e9)?this['_showBalloon'](_0x4584e9):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4584e9;}['detach'](){if(!this['isAttached'])throw new _0x23e2eb('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x485fe9=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x45c90c=>_0x45c90c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x485fe9['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x449463&&this['stopListening'](this['context']['editors']);for(const _0x36f158 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x36f158);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'](_0x577c9c){if(!_0x577c9c['plugins']['has']('EditorAnnotations'))return;const _0x15c215=_0x577c9c['plugins']['get']('EditorAnnotations'),_0x3ab529=this['context']['plugins']['get'](z),_0x47497d=this['annotations'],_0x3456e8=this['balloonPanelView'],_0x5a1010=()=>{const _0x21d4ed=_0x15c215['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x21d4ed),this['setActiveAnnotation'](_0x21d4ed[0x0]||null);};this['listenTo'](_0x15c215,'refresh',_0x5a1010),this['listenTo'](_0x15c215,'blur',(_0x2e7288,{isAnnotationTracked:_0x22b2f8})=>{this['activeAnnotation']&&_0x22b2f8(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x15c215,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x47497d,'blur',_0x4ad007=>{_0x15c215['hasDomSelection']()&&_0x4ad007['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1ae533,_0x17d6ee)=>{const _0x24fb92=_0x17d6ee['target'];_0x3456e8['isVisible']&&_0x3456e8['element']['contains'](_0x24fb92)||_0x3ab529['view']['element']['contains'](_0x24fb92)||this['activeAnnotation']&&_0x15c215['hasDomSelection']()&&(_0x5a1010(),_0x1ae533['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x15c215);}['_destroyEditorAnnotationsIntegration'](_0x4bc8ce){_0x4bc8ce&&(this['stopListening'](_0x4bc8ce),this['_editorAnnotations']['remove'](_0x4bc8ce));}['_setSelectedAnnotations'](_0x3b2946){for(const _0x330ea0 of this['_selectedAnnotations'])_0x3b2946['includes'](_0x330ea0)||this['_manuallyClosedAnnotationViews']['delete'](_0x330ea0['view']);this['_selectedAnnotations']=_0x3b2946;}['_refreshPositioning'](){const _0x1ed9ed=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x1ed9ed['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x544220){if(this['_manuallyClosedAnnotationViews']['has'](_0x544220['view']))return;const _0x3161a2=this['balloonPanelView']['content']['first'];_0x3161a2!==_0x544220['view']?(_0x3161a2&&this['_detachListeners'](_0x3161a2),this['_attachListeners'](_0x544220['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x544220['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3bab18=this['balloonPanelView']['content']['first'],_0x12b9f4=_0x3bab18&&this['annotations']['getByView'](_0x3bab18);if(!_0x12b9f4||!this['_annotationToNarrowView']['has'](_0x12b9f4))return;const _0x574605=this['_annotationToNarrowView']['get'](_0x12b9f4)['element'],_0x32ca59=(function(){const _0x2b5ff2=_0x1d9ee6['defaultPositions'];return[_0x2b5ff2['southArrowNorthEast'],_0x2b5ff2['northArrowSouthEast'],_0x2b5ff2['southArrowNorth'],_0x2b5ff2['northArrowSouth'],_0x2b5ff2['southArrowNorthWest'],_0x2b5ff2['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x574605,'positions':_0x32ca59});}['_hideBalloon'](){const _0x32df23=this['balloonPanelView'],_0x542450=_0x32df23['content']['first'];_0x542450&&(this['_detachListeners'](_0x542450),_0x32df23['unpin'](),_0x32df23['content']['clear']());}['_attachListeners'](_0x2edf37){this['listenTo'](_0x2edf37,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2edf37,'Esc',(_0x3ed0e4,_0x4edf67)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2edf37),this['_hideBalloon'](),_0x4edf67();});}['_detachListeners'](_0x38fd4e){this['stopListening'](_0x38fd4e);}}class c extends _0x17f83a{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x482d80,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56e2b1){super(_0x56e2b1),_0x56e2b1['editing']['view']['addObserver'](_0x47b835),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x56e2b1['plugins']['get'](_0x482d80),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5db34e(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x22dd34=this['editor']['plugins']['get'](j);_0x22dd34['context']===this['editor']&&(_0x22dd34['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4372d1,_0x280192)=>{const _0x126c73=this['_balloon'];if(this['isAttached']&&_0x126c73['visibleView']){const _0x311718=this['annotations']['getByView'](_0x126c73['visibleView']);_0x311718&&this['_closeAnnotation'](_0x311718),_0x280192();}}));}['afterInit'](){const _0x4ab7d3=this['editor']['plugins']['get'](j);_0x4ab7d3['context']===this['editor']&&(_0x4ab7d3['hasActive']()||_0x4ab7d3['switchTo']('inline'));}['setActiveAnnotation'](_0x59ae4d){_0x59ae4d!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x59ae4d&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x59ae4d)&&this['_addAnnotationToBalloon'](_0x59ae4d,!0x0),_0x59ae4d['isActive']=!0x0),_0x59ae4d||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x59ae4d);}['attach'](_0x35d224){this['annotations']=_0x35d224;const _0x5619f6=this['editor']['plugins']['get'](j),_0x1f2c3b=this['_balloon'];if(this['isAttached'])throw new _0x23e2eb('inlineannotations-attach-already-attached',this);if(_0x5619f6['context']!==this['editor'])throw new _0x23e2eb('inlineannotations-not-allowed-with-context',this);const _0x1f529a=this['editor']['plugins']['get'](b);this['listenTo'](_0x1f529a,'refresh',()=>{const _0x2428a3=_0x1f529a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x83f49f,_0x4fd8e7;!this['_forceRefresh']&&(_0x83f49f=_0x2428a3,_0x4fd8e7=this['_selectedAnnotations'],_0x83f49f['length']===_0x4fd8e7['length']&&_0x83f49f['every'](_0x299500=>_0x4fd8e7['includes'](_0x299500)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2428a3),this['setActiveAnnotation'](_0x2428a3[0x0]||null));}),this['listenTo'](_0x1f529a,'blur',(_0x21cf2f,{isAnnotationTracked:_0x3768f7})=>{this['activeAnnotation']&&_0x3768f7(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1f529a,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x333be9,_0x39e6af,_0x14ce37)=>{_0x14ce37||this['setActiveAnnotation'](null);}),this['listenTo'](_0x35d224,'remove',(_0x3a383c,_0x5d100b)=>{this['_removeAnnotationFromBalloon'](_0x5d100b),_0x5d100b===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1f2c3b,'change:visibleView',(_0x38c42c,_0x1cafce,_0x5ca5c8,_0x5dc55f)=>{_0x5dc55f&&this['stopListening'](_0x5dc55f);const _0x35e9f8=_0x35d224['getByView'](_0x5ca5c8);_0x5ca5c8&&_0x35e9f8&&(this['listenTo'](_0x5ca5c8,'change:height',()=>{_0x1f2c3b['updatePosition']();}),this['listenTo'](_0x5ca5c8,'Esc',()=>{this['_closeAnnotation'](_0x35e9f8),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x35e9f8&&this['setActiveAnnotation'](_0x35e9f8));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1f2c3b['visibleView']&&(_0x35d224['getByView'](_0x1f2c3b['visibleView'])&&_0x1f2c3b['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 _0x23e2eb('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x388d16 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x388d16);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x42d17c){for(const _0x350295 of this['_selectedAnnotations'])_0x42d17c['includes'](_0x350295)||this['_manuallyClosed']['delete'](_0x350295);for(const _0x237b6c of this['annotations'])_0x42d17c['includes'](_0x237b6c)||this['_removeAnnotationFromBalloon'](_0x237b6c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2e37ed of _0x42d17c)this['_addAnnotationToBalloon'](_0x2e37ed);}this['_selectedAnnotations']=_0x42d17c;}['_addAnnotationToBalloon'](_0x1fa1b4,_0x86bedf=!0x1){this['_manuallyClosed']['has'](_0x1fa1b4)||(this['_addedAnnotations']['has'](_0x1fa1b4)||this['_balloon']['hasView'](_0x1fa1b4['view'])||(this['_addedAnnotations']['add'](_0x1fa1b4),this['_balloon']['add']({'stackId':_0x1fa1b4['view']['id'],'view':_0x1fa1b4['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1fa1b4)}})),_0x86bedf&&this['_balloon']['showStack'](_0x1fa1b4['view']['id']));}['_getBalloonTargetForAnnotation'](_0x29d7eb){const _0x2ebe44=_0x29d7eb['target'],_0x5361a3=this['editor']['editing']['view'],_0x3ccd3c=_0x5361a3['document']['selection']['getFirstRange'](),_0x187deb=_0x5361a3['domConverter']['viewRangeToDom'](_0x3ccd3c);if(_0x187deb['collapse'](!0x0),_0x2ebe44){if(_0x2ebe44 instanceof _0x3abe6c)return _0x2ebe44;let _0x5b5bc4=[];for(const _0x1df199 of _0x2ebe44)_0x5b5bc4['push'](...F(_0x1df199['getClientRects']()));_0x5b5bc4=function(_0x10a19d){const _0x3c5811=[];let _0x1b2ec4=_0x10a19d[0x0];for(let _0x21058c=0x1;_0x21058c<_0x10a19d['length'];_0x21058c++)P(_0x1b2ec4,_0x10a19d[_0x21058c])?_0x1b2ec4['width']+=_0x10a19d[_0x21058c]['width']:(_0x3c5811['push'](_0x1b2ec4),_0x1b2ec4=_0x10a19d[_0x21058c]);return _0x3c5811['push'](_0x1b2ec4),_0x3c5811;}(_0x5b5bc4);const _0x1f88f=_0x187deb['getBoundingClientRect']();return _0x5b5bc4['find'](_0x29ed5c=>_0x29ed5c['top']<=_0x1f88f['top']&&_0x29ed5c['bottom']>=_0x1f88f['bottom']&&_0x29ed5c['left']<=_0x1f88f['left']&&_0x29ed5c['right']>=_0x1f88f['right'])||_0x5b5bc4[0x0];}return _0x29d7eb['targetRect']||_0x187deb;}['_removeAnnotationFromBalloon'](_0xb92769){this['_addedAnnotations']['has'](_0xb92769)&&this['_balloon']['hasView'](_0xb92769['view'])&&(this['_addedAnnotations']['delete'](_0xb92769),this['_balloon']['remove'](_0xb92769['view']));}['_closeAnnotation'](_0xac6cbf){this['_manuallyClosed']['add'](_0xac6cbf),this['_removeAnnotationFromBalloon'](_0xac6cbf);}}function F(_0x1a29bd){return Array['from'](_0x1a29bd)['map'](DOMRect['fromRect']);}function P(_0x395ead,_0x6c223){return _0x395ead['top']===_0x6c223['top']&&_0x395ead['bottom']===_0x6c223['bottom']&&_0x395ead['right']===_0x6c223['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x4b7ae4,_0x3105ee){super(_0x4b7ae4),this['set']('isEmpty',!_0x3105ee['length']),this['focusTracker']=new _0x153b35(),this['_annotationViews']=_0x3105ee,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x48fa6b({'focusables':_0x3105ee,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3105ee,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3105ee,'remove',(_0x19c0f4,_0x529b22)=>{_0x529b22['isActive']&&this['focus'](),_0x3105ee['length']||(this['isEmpty']=!0x0);});const _0x6606ba=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x4b7ae4,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3105ee},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x6606ba['if']('isEmpty','ck-hidden',_0x4d3a5d=>!_0x4d3a5d)]},'children':[{'text':N(_0x4b7ae4,'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 _0x24a8dd of this['_annotationViews'])this['focusTracker']['add'](_0x24a8dd['element']);this['_annotationViews']['on']('change',(_0x25a18e,{added:_0x1870a6,removed:_0x1f41da})=>{for(const _0x311bdf of _0x1870a6)this['focusTracker']['add'](_0x311bdf['element']);for(const _0x5dad02 of _0x1f41da)this['focusTracker']['remove'](_0x5dad02['element']);});}}class p extends _0x1acf46{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x75d3bf){super(_0x75d3bf),this['archivedThreads']=new _0x4290a9();}['init'](){const _0x1e3181=this['context'],_0x5a588b=_0x1e3181['plugins']['get'](o),_0x54e2ce=_0x1e3181['plugins']['get'](y);this['listenTo'](_0x5a588b,'addCommentThread',(_0x9d233b,{threadId:_0x30664f})=>{const _0x33e0fd=_0x5a588b['getCommentThread'](_0x30664f);_0x33e0fd['archivedAt']&&this['archivedThreads']['add'](_0x33e0fd,this['_calculatePosition'](_0x33e0fd['archivedAt'])),this['listenTo'](_0x33e0fd,'change:archivedAt',(_0x37189c,_0x1ffa0b,_0x5cb0ab)=>{_0x5cb0ab?this['archivedThreads']['has'](_0x33e0fd)||this['archivedThreads']['add'](_0x33e0fd,this['_calculatePosition'](_0x33e0fd['archivedAt'])):this['archivedThreads']['has'](_0x33e0fd)&&this['archivedThreads']['remove'](_0x33e0fd);});}),this['listenTo'](_0x5a588b,'removeCommentThread',(_0x5800a9,{threadId:_0x262aa0})=>{const _0x13728c=_0x5a588b['getCommentThread'](_0x262aa0);this['stopListening'](_0x13728c),this['archivedThreads']['has'](_0x13728c)&&this['archivedThreads']['remove'](_0x13728c);},{'priority':'highest'}),this['listenTo'](_0x54e2ce['collection'],'focus',(_0x4db493,_0x5a2735)=>{_0x5a2735['isVisible']||(_0x5a2735['isActive']=!0x0,_0x54e2ce['activate'](_0x5a2735));});}['_calculatePosition'](_0x3f4a43){const _0xbd092a=[...this['archivedThreads']]['findIndex'](_0x411dee=>_0x411dee['archivedAt']<_0x3f4a43);return _0xbd092a>-0x1?_0xbd092a:this['archivedThreads']['length'];}}class a extends _0x17f83a{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x2e325b];}constructor(_0x24f57a){super(_0x24f57a),this['annotationViews']=new _0x522e96(),this['_pendingThreads']=[];}['init'](){const _0x237149=this['editor'],_0x5e6224=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x237149['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x160831,!0x0)),_0x237149['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x507e4e=this['_createCommentsArchiveButton'](_0x210136);return _0x507e4e['set']({'role':'menuitemcheckbox'}),_0x507e4e;});const _0xb4b840=_0x237149['plugins']['get'](p),_0x108cb3=_0x237149['plugins']['get']('Annotations'),_0x1d0d87=_0x237149['plugins']['get']('CommentsRepository');_0xb4b840['archivedThreads']['forEach'](_0x17d61b=>{this['_handleNewThread'](_0x17d61b);}),this['listenTo'](_0xb4b840['archivedThreads'],'add',(_0x2abd76,_0x229902)=>{this['_handleNewThread'](_0x229902);}),this['listenTo'](_0x108cb3['collection'],'add',(_0x2f4ef7,_0x135228)=>{const _0x2cd266=this['_pendingThreads']['find'](_0x439a9b=>{const _0x5251be=_0x1d0d87['_threadToController']['get'](_0x439a9b);return _0x5251be&&_0x135228['innerView']===_0x5251be['view'];});if(_0x2cd266){const _0x23769e=this['_calculatePosition'](_0x2cd266['archivedAt']);this['_addAnnotationToArchive'](_0x135228,_0x23769e),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2cd266),0x1);}}),this['listenTo'](_0xb4b840['archivedThreads'],'remove',(_0x26ba3f,_0x3d4c77)=>{const _0x35abc1=_0x237149['config']['get']('collaboration.channelId');if(!_0x35abc1||_0x3d4c77['channelId']===_0x35abc1){if(this['_pendingThreads']['includes'](_0x3d4c77))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3d4c77),0x1);else{const _0x3d834a=_0x1d0d87['_threadToController']['get'](_0x3d4c77),_0xa68171=_0x108cb3['getByInnerView'](_0x3d834a['view']);this['annotationViews']['remove'](_0xa68171['view']),this['stopListening'](_0xa68171),this['stopListening'](_0xa68171['focusableElements']);}}}),this['listenTo'](_0x108cb3['collection'],'add',(_0x4aeff2,_0x5801f9)=>{this['listenTo'](_0x5801f9,'escape',_0x5e6224);}),this['listenTo'](_0x108cb3['collection'],'remove',(_0x17d310,_0x1e0247)=>{this['stopListening'](_0x1e0247,'escape',_0x5e6224);});}['_addAnnotationToArchive'](_0x39629e,_0x41796f){this['listenTo'](_0x39629e,'set:isVisible',_0x1dae1c=>{_0x1dae1c['return']=!0x1,_0x1dae1c['stop']();}),this['annotationViews']['add'](_0x39629e['view'],_0x41796f);}['_handleNewThread'](_0x3c7447){const _0x5d303e=this['editor']['plugins']['get']('CommentsRepository'),_0x247da5=this['editor']['plugins']['get']('Annotations'),_0x6bc3b8=this['editor']['config']['get']('collaboration.channelId');if(!_0x6bc3b8||_0x3c7447['channelId']===_0x6bc3b8){const _0x35626f=_0x5d303e['_threadToController']['get'](_0x3c7447);if(!_0x35626f)return void this['_pendingThreads']['push'](_0x3c7447);const _0x57047a=this['_calculatePosition'](_0x3c7447['archivedAt']),_0x481b5e=_0x247da5['getByInnerView'](_0x35626f['view']);_0x481b5e['isVisible']&&_0x247da5['_visibleAnnotations']['remove'](_0x481b5e),this['_addAnnotationToArchive'](_0x481b5e,_0x57047a);}}['_calculatePosition'](_0x3f5207){const _0x34c838=this['editor']['config']['get']('collaboration.channelId'),_0x46b27d=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x494ecd=>_0x494ecd['channelId']===_0x34c838)['findIndex'](_0x14e585=>_0x14e585['archivedAt']<_0x3f5207);return _0x46b27d<0x0||_0x46b27d>this['annotationViews']['length']?this['annotationViews']['length']:_0x46b27d-0x1;}['_toggleDialog'](){const _0x2a74d6=this['editor'],_0x26b89c=_0x2a74d6['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x2a74d6['locale'],this['annotationViews'])),'commentsArchive'===_0x26b89c['id']?_0x26b89c['hide']():_0x26b89c['show']({'id':'commentsArchive','title':N(_0x2a74d6['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4bca29,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x71ad12['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x59e0ba,_0x56ca18=!0x1){const _0x302cb3=this['editor']['locale'],_0x39ab6c=this['editor']['plugins']['get']('Dialog'),_0x5b6756=new _0x59e0ba(_0x302cb3);return _0x5b6756['bind']('isEnabled')['to'](this,'isEnabled'),_0x5b6756['bind']('isOn')['to'](_0x39ab6c,'id',_0x505abf=>'commentsArchive'===_0x505abf),_0x5b6756['set']({'label':N(_0x302cb3,'COMMENTS_ARCHIVE'),'icon':_0x4bca29,'isToggleable':!0x0}),_0x56ca18&&(_0x5b6756['tooltip']=!0x0),this['listenTo'](_0x5b6756,'execute',()=>this['_toggleDialog']()),_0x5b6756;}['_hideDialogOnAnnotationEscape']=_0x5a070a=>{const _0x9b3816=_0x5a070a['source'];if(!this['annotationViews']['has'](_0x9b3816['view']))return;const _0x4d9cf9=this['editor']['plugins']['get']('Dialog');_0x4d9cf9['isOpen']&&'commentsArchive'===_0x4d9cf9['id']&&(_0x4d9cf9['hide'](),_0x5a070a['stop']());};}class Comments extends _0x17f83a{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,Comment,CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|