@ckeditor/ckeditor5-comments 44.0.0-alpha.0 → 44.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +9 -9
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/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 +15 -15
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0xe525b2={}){function _0x4340c5(_0x22768f){return _0x22768f['map'](_0x1b343c=>String['fromCharCode'](_0x1b343c))['join']('');}(_0xe525b2=Object['assign']({},_0xe525b2))['plugins']||(_0xe525b2['plugins']=Rt['defaultPlugins']),super(_0xe525b2),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[_0x4340c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4340c5([0x76,0x69,0x65,0x77])][_0x4340c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4340c5([0x61,0x75,0x74,0x6f]),this[_0x4340c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4340c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4340c5([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4340c5([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4340c5([0x6f,0x6b])});}['create'](){const _0x580405=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x580405))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5c3189=>{const _0x131c23=this['model']['document']['getRoot'](),_0x4b4029=_0x131c23&&_0x131c23['getChild'](_0x131c23['childCount']-0x1);_0x5c3189['setSelection'](_0x4b4029,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x12f2ba=this['editing']['view'],_0x5cefd1=_0x12f2ba['document']['getRoot'](),_0x222b81=_0x5cefd1['getChild'](0x0);_0x5cefd1['childCount']>0x1||!_0x222b81||'p'!=_0x222b81['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(zt(_0x12f2ba,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x222b81['placeholder']=this['placeholder']),St({'view':_0x12f2ba,'element':_0x222b81,'keepOnFocus':!0x0}),this['placeholderElement']=_0x222b81);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4fe2c1,_0x5ce2ab={}){super(_0x4fe2c1),this['editor']=null,this['_editorConfig']=_0x5ce2ab,this['set']('value',_0x5ce2ab['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',S(_0x4fe2c1,'Reply...')),this['set']('submitLabel',S(_0x4fe2c1,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x90f2b9(),this['focusCycler']=new Ft({'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',(_0x20100f,_0x454873)=>{this['cancelButtonView']['fire']('execute'),_0x454873();}),this['keystrokes']['set']('Ctrl+Enter',(_0x180e6a,_0x71ac9c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x71ac9c());}),this['on']('submit',(_0x263531,_0x4c8c15)=>{_0x4c8c15['length']>0xfde8?(alert(S(_0x4fe2c1,'TOO_LONG_COMMENT_ALERT',[_0x4c8c15['length'],0xfde8])),_0x263531['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x16ac10=this['editor'];this['element']['insertBefore'](_0x16ac10['ui']['element'],this['element']['firstChild']),_0x16ac10['model']['document']['on']('change',()=>this['value']=_0x16ac10['getData']()),_0x16ac10['bind']('placeholder')['to'](this),this['focusables']['add'](_0x16ac10['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5be1e8){-0x1===_0x5be1e8?(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:_0x4112fa}=this,_0x4731d3=new _0xbee2d6(_0x4112fa);return _0x4731d3['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4731d3['withText']=!0x0,_0x4731d3['bind']('label')['to'](this,'submitLabel'),_0x4731d3['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4731d3['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x116b7,_0x58e780)=>!_0x58e780&&!!_0x116b7['trim']()),_0x4731d3;}['_createCancelButton'](){const {locale:_0x101abe}=this,_0x5690b1=new _0xbee2d6(_0x101abe);return _0x5690b1['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x5690b1['label']=S(_0x101abe,'Cancel'),_0x5690b1['withText']=!0x0,_0x5690b1['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x5690b1;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4a0934=>{this['focusTracker']['add'](_0x4a0934['element']);}),this['focusables']['on']('change',(_0x293ee2,_0x5cc4f7)=>{for(const _0x13993a of Array['from'](_0x5cc4f7['added'])['reverse']())this['focusTracker']['add'](_0x13993a['element']);});}}class ie extends kt{constructor(_0x5a4f1c,_0x250f92,_0x4bbfd0){super(_0x5a4f1c),this['commentInputView']=new hs(_0x5a4f1c,_0x4bbfd0),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x19e605,_0x44e340)=>_0x19e605||!!_0x44e340),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 _0x287a20(_0x5a4f1c,_0x250f92),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'](_0x341a23){this['commentInputView']['focus'](_0x341a23);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x4cf696,_0xaad1b5)=>{const {submitButtonView:_0x5e30c3,cancelButtonView:_0x5b8770,editor:_0x403594}=this['commentInputView'];[_0x5e30c3['element'],_0x5b8770['element'],_0x403594?_0x403594['editing']['view']['getDomRoot']():null]['filter'](_0x5ce418=>_0x5ce418)['some'](_0x44ebdf=>_0x44ebdf['contains'](_0xaad1b5['target']))||(this['focus'](),_0xaad1b5['preventDefault']());});}}class cs extends kt{constructor(_0x5d9c1b){super(_0x5d9c1b);const _0x169758=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x169758['to']('count',_0x2648c5=>S(_0x5d9c1b,'NUMBER_OF_COMMENTS',_0x2648c5))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x38fa60,_0x21a56c,_0x47d70f){super(_0x38fa60);const _0x459dd2=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x21a56c['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x21a56c,this['_config']=_0x47d70f,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x90f2b9(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3113d4=>this['commentViews']['map'](_0x133d04=>_0x133d04['element'])['includes'](_0x3113d4['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x38fa60),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x59d66f=>_0x59d66f-this['_config']['maxCommentsWhenCollapsed']);for(const _0x198dd4 of _0x21a56c['comments'])this['_handleNewCommentModel'](_0x198dd4);this['_handleInfoComment'](),this['listenTo'](_0x21a56c['comments'],'add',(_0x503397,_0x51a773)=>{const _0x55ac07=this['_calculatePosition'](_0x51a773);this['length']++,this['_handleNewCommentModel'](_0x51a773,_0x55ac07),this['refreshVisibleViews']();}),this['listenTo'](_0x21a56c['comments'],'remove',(_0x3053ae,_0x4bbf16)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4bbf16),this['refreshVisibleViews']();}),this['listenTo'](_0x21a56c,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x21a56c,'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',_0x459dd2['if']('length','ck-hidden',_0x14c8e5=>!_0x14c8e5)],'aria-label':S(_0x38fa60,'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'](_0x4cb3b5){-0x1===_0x4cb3b5?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4e15ff of this['commentViews'])_0x4e15ff['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x245201,_0x4a6808){const _0x31c881=new this['_config']['CommentView'](this['locale'],_0x245201,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x31c881['viewUid']=_0x245201['id'],_0x31c881['delegate']('removeComment')['to'](this),_0x31c881['delegate']('updateComment')['to'](this),_0x31c881['delegate']('resolveCommentThread')['to'](this),_0x31c881['delegate']('editorReady')['to'](this),_0x31c881['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x31c881,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x31c881,_0x4a6808);}['_calculatePosition'](_0x4f8aa0){const _0xbef58=this['_model']['_findOptimalIndex'](_0x4f8aa0);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x4f8aa0['authoredAt']?_0xbef58-0x1:_0xbef58:_0xbef58-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x234f4b={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':S(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x234f4b,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x234f4b));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3792cd){const _0x875a3=this['commentViews']['remove'](_0x3792cd['id']);this['stopListening'](_0x875a3),_0x875a3['isEditMode']&&this['_updateHasDirtyComment'](),_0x875a3['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1d5081=>_0x1d5081['isEditMode']);}['_rearrangeCollapse'](){const _0xd0cb4f=function(_0x237188){const _0x1495be=new _0x375c29();for(const _0x1b49e1 of _0x237188)_0x1495be['add'](_0x1b49e1);return _0x1495be;}(this['commentViews']),_0x2faf46=this['_collapsedCommentsView']['count'];for(let _0x40953c=0x1;_0x40953c<=_0x2faf46;_0x40953c++)_0xd0cb4f['remove'](0x1);for(const _0x552698 of _0xd0cb4f)_0x552698['collapse']();_0x2faf46>0x0&&_0xd0cb4f['add'](this['_collapsedCommentsView'],0x1),ns(_0xf48b38(Array['from'](this['visibleViews']),Array['from'](_0xd0cb4f)),this['visibleViews'],_0xd0cb4f);}['_rearrangeExpand'](){ns(_0xf48b38(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x5d4f9c of this['visibleViews'])_0x5d4f9c['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5e4a2c=>{this['focusTracker']['add'](_0x5e4a2c['element']),this['keystrokes']['listenTo'](_0x5e4a2c['element']);}),this['commentViews']['on']('change',(_0x3ea71d,_0x239284)=>{for(const _0xedd0a0 of _0x239284['removed'])this['focusTracker']['remove'](_0xedd0a0['element']),this['keystrokes']['stopListening'](_0xedd0a0['element']);for(const _0x2afcab of Array['from'](_0x239284['added'])['reverse']())this['focusTracker']['add'](_0x2afcab['element']),this['keystrokes']['listenTo'](_0x2afcab['element']);});}}function ns(_0x21658e,_0x5f3e14,_0x58da64){let _0x4b267e=0x0;for(const _0x5336d6 of _0x21658e)switch(_0x5336d6){case'insert':_0x5f3e14['add'](_0x58da64['get'](_0x4b267e),_0x4b267e),_0x4b267e++;break;case'delete':_0x5f3e14['remove'](_0x4b267e);break;case'equal':_0x4b267e++;}}class as extends kt{constructor(_0x3485a1){super(_0x3485a1);const _0x315bb5=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x315bb5['to']('contextValue',_0x35647c=>S(_0x3485a1,'THREAD_CONTEXT_LABEL',_0x35647c)),'tabindex':-0x1},'children':[{'text':_0x315bb5['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3e2cd7,_0x2f4190){super(_0x3e2cd7);const _0x32f5b2=this['bindTemplate'];this['_model']=_0x2f4190,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x90f2b9(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x76d11b=>!!_0x76d11b),this['bind']('contextValue')['to'](this['_model'],'context',_0x245609=>_0x245609&&_0x245609['value']?this['_trimContextValue'](_0x245609['value']):S(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',_0x32f5b2['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 _0xf07885=new _0xbee2d6(this['locale']);return _0xf07885['label']=S(this['locale'],'Reopen'),_0xf07885['tooltip']=S(this['locale'],'Reopen'),_0xf07885['icon']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22m5.042\x209.367\x202.189\x201.837a.75.75\x200\x200\x201-.965\x201.149l-3.788-3.18a.747.747\x200\x200\x201-.21-.284.75.75\x200\x200\x201\x20.17-.945L6.23\x204.762a.75.75\x200\x201\x201\x20.964\x201.15L4.863\x207.866h8.917A.75.75\x200\x200\x201\x2014\x207.9a4\x204\x200\x201\x201-1.477\x207.718l.344-1.489a2.5\x202.5\x200\x201\x200\x201.094-4.73l.008-.032H5.042z\x22/></svg>',_0xf07885['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1c3f76=>!_0x1c3f76),_0xf07885['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x477932,_0x44f6a3)=>_0x477932&&_0x44f6a3),_0xf07885['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0xf07885;}['_trimContextValue'](_0x2a5ac0){if(_0x2a5ac0['length']<0x96)return _0x2a5ac0;const _0x38f900=_0x2a5ac0['lastIndexOf']('\x20',0x93);return _0x2a5ac0['substring'](0x0,_0x38f900>-0x1?_0x38f900:0x93)+'...';}['_attachContextActions'](){const _0x11a3cf=this['element']['querySelector']('.ck-context'),_0x19a6e0=_0x11a3cf['querySelector']('.ck-context__value');this['listenTo'](_0x11a3cf,'mouseenter',()=>{_0x19a6e0['offsetWidth']<_0x19a6e0['scrollWidth']&&_0x11a3cf['classList']['add']('overlay');}),this['listenTo'](_0x11a3cf,'mouseleave',()=>{_0x11a3cf['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x12cc2d of this['focusables'])this['focusTracker']['add'](_0x12cc2d['element']),this['keystrokes']['listenTo'](_0x12cc2d['element']);}['_createContextView'](){const _0x2f6323=new as(this['locale']);return _0x2f6323['bind']('contextValue')['to'](this),_0x2f6323;}}class ss extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5c4a19,_0x5c1ed0,_0x15b424,_0xe679c2){super(_0x5c4a19),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5c1ed0,this['_localUser']=_0x15b424,this['_config']=_0xe679c2,this['commentThreadHeaderView']=new Yt(_0x5c4a19,_0x5c1ed0),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x5c4a19,S(_0x5c4a19,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5c4a19,_0x5c1ed0,Object['assign']({'CommentView':this['_config']['CommentView']},_0xe679c2)),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',(_0x13482a,_0x185961)=>_0x13482a||!!_0x185961),this['bind']('isUnlinked')['to'](_0x5c1ed0,'unlinkedAt',_0x430a5a=>!!_0x430a5a),this['bind']('ariaLabel')['to'](this,'length',_0xa830d4=>{const _0x23f99a=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return S(this['locale'],'COMMENT_THREAD_LABEL',[_0xa830d4,_0x23f99a]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x90f2b9(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1a2d57=>_0x1a2d57['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3fdb7d=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x806087=_0x3fdb7d['commentInputView'];return _0x3fdb7d['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x806087,'value',(_0x1f04ed,_0x1b6dd7,_0x152835,_0x3a79ae,_0xbfe103)=>!!_0xbfe103||!!_0x3a79ae&&_0x152835&&!_0x1b6dd7||_0x1f04ed&&_0x152835&&!_0x1b6dd7),_0x806087['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x13f565,_0x5c659c,_0x26292a)=>{let _0x1b55bd;return _0x1b55bd=_0x26292a&&_0x5c659c?'Reply\x20to\x20reopen\x20discussion...':_0x13f565?'Reply...':'Write\x20a\x20comment...',S(this['locale'],_0x1b55bd);}),_0x806087['bind']('submitLabel')['to'](this,'length',_0xd746db=>S(this['locale'],_0xd746db?'Reply':'Comment')),_0x806087['on']('submit',(_0x3d2589,_0x380907)=>{this['fire']('addComment',_0x380907),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x806087['on']('cancel',()=>{this['focus']();}),_0x806087['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x806087['on']('cancel',_0x59f73c=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x59f73c['stop']());}),this['on']('change:isActive',(_0xdcb3e6,_0xbc5564,_0x458c7f)=>{_0x458c7f||this['length']||_0x806087['value']||this['fire']('removeCommentThread');}),_0x3fdb7d;}}class Ct extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ss){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(os){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x23b86c(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x24ac0a,target:_0xd61be6,type:_0x108412,isVisible:_0x5bd95a=!0x0}){super(),this['view']=_0x24ac0a,this['view']['element']||this['view']['render'](),this['_type']=_0x108412,this['_target']=_0xd61be6,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x375c29([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5cff53,_0x2d8aeb)=>{this['view']['focusTracker']['add'](_0x2d8aeb);}),this['focusableElements']['on']('remove',(_0x445f73,_0xd12aa3)=>{this['view']['focusTracker']['remove'](_0xd12aa3);}),this['set']('isVisible',_0x5bd95a);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x56afee=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x56afee),_0x56afee;}get['targetRect'](){const _0x31d865=this['target'];if(null===_0x31d865)return null;if(_0x31d865 instanceof _0x462831)return _0x31d865;const _0x344ddd=_0x31d865['filter'](_0x55ac22=>function(_0x48b424){const _0x3db70c=_0x48b424['offsetParent'];if(_0x3db70c)return!0x0;const _0x35c58f=_0x48b424['getClientRects']()['item'](0x0);return!!_0x35c58f;}(_0x55ac22));return 0x0===_0x344ddd['length']?null:new _0x462831(_0x344ddd[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3d00d2){this['view']['isActive']=_0x3d00d2,this['view']['mainView']['isActive']=_0x3d00d2;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4c39b6){if(!(null===_0x4c39b6||_0x4c39b6 instanceof _0x462831||Array['isArray'](_0x4c39b6)&&_0x4c39b6['every'](_0x3875ff=>ne(_0x3875ff))))throw new _0x2e3068('annotation-invalid-target',null,{'target':_0x4c39b6});}['_getNormalizedTarget'](){const _0x16c0e4='function'==typeof this['_target']?this['_target']():this['_target'];return ne(_0x16c0e4)?[_0x16c0e4]:_0x16c0e4;}}function ne(_0xfaf795){return null!==_0xfaf795&&'object'==typeof _0xfaf795&&'nodeType'in _0xfaf795&&0x1===_0xfaf795['nodeType'];}class x extends _0x375c29{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x51e950=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x90f2b9(),this['_focusTracker']['on']('change:isFocused',(_0x41cb11,_0x3e78b0,_0xb15e80)=>{_0xb15e80||this['fire']('blur');});for(const _0x327722 of _0x51e950)this['add'](_0x327722);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4a1e30){if(this['has'](_0x4a1e30))throw new _0x2e3068('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4a1e30['innerView'],_0x4a1e30),this['_viewToAnnotation']['set'](_0x4a1e30['view'],_0x4a1e30);for(const _0x52a5e9 of _0x4a1e30['focusableElements'])this['_focusTracker']['add'](_0x52a5e9);this['listenTo'](_0x4a1e30['focusableElements'],'add',(_0x46144e,_0xa85208)=>{this['_focusTracker']['add'](_0xa85208);}),this['listenTo'](_0x4a1e30['focusableElements'],'remove',(_0x2f7165,_0x37aef8)=>{this['_focusTracker']['remove'](_0x37aef8);}),this['listenTo'](_0x4a1e30['view']['focusTracker'],'change:isFocused',(_0x3cc809,_0x2aacdc,_0x589db0)=>{_0x589db0&&this['fire']('focus',_0x4a1e30);}),_0x4a1e30['updateTargetRect']();const _0x39569c=this['_getOrderInContent'](_0x4a1e30['view']['targetRect']);return super['add'](_0x4a1e30,_0x39569c);}['remove'](_0x523a9b){if(!this['has'](_0x523a9b))throw new _0x2e3068('annotationcollection-not-existing-item',null);this['stopListening'](_0x523a9b['view']['focusTracker']),this['stopListening'](_0x523a9b['focusableElements']);for(const _0x577356 of _0x523a9b['focusableElements'])this['_focusTracker']['remove'](_0x577356);return this['_viewToAnnotation']['delete'](_0x523a9b['view']),this['_innerViewToAnnotation']['delete'](_0x523a9b['innerView']),super['remove'](_0x523a9b);}['getByInnerView'](_0xe011a){return this['_innerViewToAnnotation']['get'](_0xe011a);}['getByView'](_0x3b5f02){return this['_viewToAnnotation']['get'](_0x3b5f02);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2bc257 of this)_0x2bc257['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1bc2c6=Array['from'](this)['sort']((_0x1f79f9,_0x4e1871)=>v(_0x1f79f9['view']['targetRect'],_0x4e1871['view']['targetRect']));for(let _0xd0371=_0x1bc2c6['length']-0x1;_0xd0371>0x0;_0xd0371--){const _0x224ee4=_0x1bc2c6[_0xd0371];_0xd0371!==this['getIndex'](_0x224ee4)&&(this['remove'](_0x224ee4),this['add'](_0x224ee4));}}['_getOrderInContent'](_0x26d085){let _0x36350f=0x0;if(!_0x26d085)return this['length'];for(const _0xb87e11 of this){const _0x23cd6d=_0xb87e11['view']['targetRect'];if(_0x23cd6d){if(v(_0x26d085,_0x23cd6d)<0x0)return _0x36350f;_0x36350f++;}}return _0x36350f;}}function v(_0x17ba5f,_0x2a06a8){if(null===_0x17ba5f&&null===_0x2a06a8)return 0x0;if(null===_0x17ba5f)return-0x1;if(null===_0x2a06a8)return 0x1;const _0x19861f=_0x17ba5f['top']-_0x2a06a8['top'];return 0x0==_0x19861f?_0x17ba5f['left']-_0x2a06a8['left']:_0x19861f;}class N extends _0x323088{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e70f4){if(super(_0x4e70f4),this['collection']=new x(),this['_visibleAnnotations']=new x(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4e70f4 instanceof _0x316bab){const _0x8d6606=_0x4e70f4['locale'];_0x4e70f4['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':S(_0x8d6606,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':S(_0x8d6606,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':S(_0x8d6606,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':S(_0x8d6606,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':S(_0x8d6606,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':S(_0x8d6606,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':S(_0x8d6606,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x13049b){this['collection']['add'](_0x13049b);}['remove'](_0x5024d8){this['collection']['remove'](_0x5024d8),_0x5024d8['destroy']();}['refreshVisibility'](){for(const _0x4a5c32 of this['collection'])_0x4a5c32['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x167dcf){return this['collection']['getByInnerView'](_0x167dcf);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1be425 of this['collection'])_0x1be425['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3266a2){this['fire']('_activateAnnotation',_0x3266a2);}['createAnnotation'](_0x38bcc7){return new d(_0x38bcc7);}['createAnnotationView'](_0x3f8f67,_0x26882b){return new T(_0x3f8f67,_0x26882b);}['_addActiveAnnotation'](_0x4a9dcd){const _0x14563c=new Set(this['activeAnnotations']);_0x14563c['add'](_0x4a9dcd),this['activeAnnotations']=_0x14563c;}['_removeActiveAnnotation'](_0x172605){const _0x1c6b82=new Set(this['activeAnnotations']);_0x1c6b82['delete'](_0x172605),this['activeAnnotations']=_0x1c6b82;}['_bindAnnotationsToVisibleAnnotations'](){const _0x921ac7=this['collection'],_0x260b32=this['_visibleAnnotations'];function _0x155d90(_0x5e13a0){const _0xe03657=_0x5e13a0['source'];_0xe03657['isVisible']&&!_0x260b32['has'](_0xe03657)?_0x260b32['add'](_0xe03657):!_0xe03657['isVisible']&&_0x260b32['has'](_0xe03657)&&_0x260b32['remove'](_0xe03657),_0xe03657['view']['focusTracker']['remove'](_0xe03657['view']['element']),_0xe03657['view']['focusTracker']['add'](_0xe03657['view']['element']);}this['listenTo'](_0x921ac7,'add',(_0x4ef6fc,_0x396eb0)=>{_0x396eb0['isVisible']&&_0x260b32['add'](_0x396eb0),this['listenTo'](_0x396eb0,'change:isVisible',_0x155d90);}),this['listenTo'](_0x921ac7,'remove',(_0xa7cd57,_0x541f7c)=>{_0x260b32['has'](_0x541f7c)&&_0x260b32['remove'](_0x541f7c),this['stopListening'](_0x541f7c,'change:isVisible',_0x155d90);});}['_setupEnterAnnotationKeystroke'](){const _0x35745e=_0x4e3d96=>{_0x4e3d96['on']('ready',()=>{_0x4e3d96['keystrokes']['set'](_0x160036,(_0x12d4d6,_0xa3cda5)=>{const _0x1504a5=_0x17dd4b(this['activeAnnotations']['values']());_0x1504a5&&(_0x1504a5['view']['focus'](),_0xa3cda5());});});};this['context']instanceof _0x316bab?_0x35745e(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1eca3b,_0x10256d)=>{_0x35745e(_0x10256d);});}['_setupEscapeAnnotationHandling'](){const _0x42ba32=_0x34ff37=>{const _0x4acacc=_0x34ff37['source'],_0x51551d=[];let _0x53ad21;if(Array['isArray'](_0x4acacc['target'])){_0x53ad21=_0x4acacc['target'][0x0],this['context']instanceof _0x316bab?_0x51551d['push'](this['context']):this['context']['editors']&&_0x51551d['push'](...this['context']['editors']);for(const _0x3b9472 of _0x51551d)for(const _0x979f5b of _0x3b9472['editing']['view']['domRoots']['values']())if(_0x979f5b['contains'](_0x53ad21))return void _0x3b9472['editing']['view']['focus']();_0x53ad21['focus']();}};this['listenTo'](this['collection'],'add',(_0x5147b4,_0xfea922)=>{this['listenTo'](_0xfea922,'escape',_0x42ba32,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x99d06f,_0x27051c)=>{this['stopListening'](_0x27051c,'escape',_0x42ba32);});}}const gt=Symbol('noChannel'),Tt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x323088{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[N,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x388e12){super(_0x388e12),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xa3390=this['context']['config'];_0xa3390['define']('comments.maxCommentsWhenCollapsed',0x2),_0xa3390['define']('comments.maxThreadTotalWeight',0x1f4),_0xa3390['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xa3390['define']('comments.CommentThreadView',Ct),_0xa3390['define']('comments.CommentView',vt),_0xa3390['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5a9f41=this['context']['plugins']['get'](N);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x16b7c4,_0x301d55)=>this['_addCommentThread'](_0x301d55)),this['on']('submitCommentThread',(_0x3f4276,_0x576dcb)=>this['_submitCommentThread'](_0x576dcb)),this['on']('resolveCommentThread',(_0x1263d3,_0x52d5cf)=>this['_resolveCommentThread'](_0x52d5cf)),this['on']('resolveCommentThread',(_0x335e7d,_0x556e49)=>this['_updateActiveAnnotation'](_0x556e49),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x46ebb8,_0x1b9239)=>this['_reopenCommentThread'](_0x1b9239)),this['on']('reopenCommentThread',(_0xfe496b,_0x5cb8f9)=>this['_updateActiveAnnotation'](_0x5cb8f9),{'priority':'lowest'}),this['on']('removeCommentThread',(_0xfd9a45,_0xbc435e)=>this['_removeCommentThread'](_0xbc435e)),this['on']('updateCommentThread',(_0x521e84,_0x3d1871)=>this['_updateCommentThread'](_0x3d1871)),this['on']('updateCommentThread',(_0x1bf203,_0x8b2813)=>this['_updateActiveAnnotation'](_0x8b2813),{'priority':'lowest'}),this['on']('addComment',(_0x3bfb68,_0x208743)=>this['_addComment'](_0x208743)),this['on']('updateComment',(_0x419b47,_0x527b08)=>this['_updateComment'](_0x527b08)),this['on']('removeComment',(_0x4caacb,_0x5409b8)=>this['_removeComment'](_0x5409b8)),this['on']('addComment',(_0x1e9e99,{threadId:_0x4fc69e,isFromAdapter:_0x19cb49})=>{if(_0x19cb49)return;const _0x44ee43=this['getCommentThread'](_0x4fc69e),_0x5c3286=_0x44ee43&&this['_threadToController']['get'](_0x44ee43);_0x5c3286&&_0x5c3286['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5a9f41,'change:activeAnnotations',(_0x57682b,_0x328548,_0x30361b)=>{const _0x4752c6=Array['from'](_0x30361b)['map'](_0x4a1626=>this['_viewToController']['get'](_0x4a1626['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4752c6?_0x4752c6['model']:null;});}set['adapter'](_0x179191){if(this['_adapter'])throw new _0x2e3068('commentsrepository-adapter-already-set');this['_adapter']=_0x179191;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4c70fe=gt,threadId:_0x5ad62d=_0x4b8453(),comments:_0x2e505a=[],unlinkedAt:_0x1617f1=null,resolvedAt:_0x5dc887=null,resolvedBy:_0x69ab8d=null,target:_0x4dd260=null,context:_0x4e86fe=null,attributes:_0x235247={},isResolvable:_0x315a71=!0x0,isSubmitted:_0x76eb4d=!0x1,isFromAdapter:_0x464399=!0x1}={}){return this['fire'](_t('addCommentThread',_0x4c70fe),{'channelId':_0x4c70fe,'threadId':_0x5ad62d,'comments':_0x2e505a,'unlinkedAt':_0x1617f1,'resolvedAt':_0x5dc887,'resolvedBy':_0x69ab8d,'target':_0x4dd260,'context':_0x4e86fe,'attributes':_0x235247,'isFromAdapter':_0x464399,'isResolvable':_0x315a71,'isSubmitted':_0x76eb4d}),this['getCommentThread'](_0x5ad62d);}['openNewCommentThread']({channelId:_0x4fa27b=gt,threadId:_0xdd467d=_0x4b8453(),target:_0x3e5348,context:_0x31b71e=null,isResolvable:_0x3350cb=!0x0}){if(this['_readOnlyChannels']['has'](_0x4fa27b)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3e5348)throw new _0x2e3068('commentsrepository-missing-target');const _0x4e558c=this['addCommentThread']({'channelId':_0x4fa27b,'threadId':_0xdd467d,'target':_0x3e5348,'context':_0x31b71e,'isResolvable':_0x3350cb});if(!_0x4e558c)return null;const _0x1efa9a=this['_threadToController']['get'](_0x4e558c),_0xa534ac=_0x1efa9a['view']['commentThreadInputView']['commentInputView'],_0x2cd080=this['context']['plugins']['get'](N),_0x5d7e0b=_0x2cd080['getByInnerView'](_0x1efa9a['view']);return _0x2cd080['activate'](_0x5d7e0b),_0xa534ac['once']('editorReady',()=>_0xa534ac['focus']()),_0x4e558c;}['hasCommentThread'](_0xa64ea7){if('string'!=typeof _0xa64ea7)throw new _0x2e3068('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xa64ea7);}['updateCommentThread']({channelId:_0x256d50=gt,threadId:_0xcab328,context:_0xa9e45b,unlinkedAt:_0x1a1b42,attributes:_0x104ac4,isFromAdapter:_0x49fceb=!0x1}){return this['fire'](_t('updateCommentThread',_0x256d50),{'channelId':_0x256d50,'threadId':_0xcab328,'context':_0xa9e45b,'unlinkedAt':_0x1a1b42,'attributes':_0x104ac4,'isFromAdapter':_0x49fceb}),this['getCommentThread'](_0xcab328);}['getCommentThread'](_0x2da914){if('string'!=typeof _0x2da914)throw new _0x2e3068('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2da914);}['fetchCommentThread']({channelId:_0x248369,threadId:_0xde0644}={}){const _0x439356=this['getCommentThread'](_0xde0644);if(_0x439356)return Promise['resolve'](_0x439356);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2e3068('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x248369,'threadId':_0xde0644})['then'](_0x14a239=>this['hasCommentThread'](_0xde0644)?this['getCommentThread'](_0xde0644):_0x14a239?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x248369},_0x14a239)):void 0x0)['catch'](_0x53f450=>{throw console['error'](_0x53f450),new _0x2e3068('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5d505b,skipNotAttached:_0x1edef8=!0x1,skipEmpty:_0x2556cc=!0x1,toJSON:_0x25da0f=!0x1}={}){const _0x52c247=[];for(const _0x47b10c of this['_threads']['values']())_0x5d505b&&_0x47b10c['channelId']!==_0x5d505b||_0x1edef8&&!_0x47b10c['isAttached']||_0x2556cc&&0x0===_0x47b10c['length']||_0x52c247['push'](_0x47b10c);return _0x25da0f?_0x52c247['map'](_0x168e41=>_0x168e41['toJSON']()):_0x52c247;}['setActiveCommentThread'](_0x393969){const _0x4a2bc9=this['context']['plugins']['get'](N);if(!_0x393969)return void(this['activeCommentThread']&&_0x4a2bc9['deactivateAll']());const _0x51e73d=this['getCommentThread'](_0x393969);if(!_0x51e73d)throw new _0x2e3068('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x393969});if(!this['_threadToController']['has'](_0x51e73d))throw new _0x2e3068('commentsrepository-active-not-attached',null,{'threadId':_0x393969});const _0x3d1bab=_0x4a2bc9['getByInnerView'](this['_threadToController']['get'](_0x51e73d)['view']);_0x4a2bc9['activate'](_0x3d1bab);}['switchReadOnly'](_0x317090,_0x5812f1){_0x317090?this['_readOnlyChannels']['add'](_0x5812f1):this['_readOnlyChannels']['delete'](_0x5812f1),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5f48a7){return this['_readOnlyChannels']['has'](_0x5f48a7)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x110b17,_0x1f15dd){return new yt(_0x110b17,_0x1f15dd);}['setPermissions'](_0xa428bd,_0x382958=gt){this['_permissions']['set'](_0x382958,_0xa428bd),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x10f1ea=gt){return this['_permissions']['has'](_0x10f1ea)?this['_permissions']['get'](_0x10f1ea):Tt;}['_addCommentThread']({channelId:_0x388931,threadId:_0x49a831,comments:_0x31b24d,unlinkedAt:_0x5da151,resolvedAt:_0x459408,resolvedBy:_0x2eb0c1,target:_0x4ea50c,context:_0x335335,attributes:_0x36b925,isFromAdapter:_0x585391,isResolvable:_0x3d2900,isSubmitted:_0x31de89}){if('string'!=typeof _0x49a831)throw new _0x2e3068('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x49a831});if(this['hasCommentThread'](_0x49a831))throw new _0x2e3068('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x49a831});const _0x165a1e=new oe(this,{'channelId':_0x388931,'id':_0x49a831,'context':_0x335335,'attributes':_0x36b925,'unlinkedAt':_0x5da151,'resolvedAt':_0x459408,'resolvedBy':_0x2eb0c1?this['context']['plugins']['get'](it)['getUser'](_0x2eb0c1):null,'isResolvable':_0x3d2900,'isSubmitted':_0x31de89||_0x585391});this['_threads']['set'](_0x49a831,_0x165a1e);for(const _0x1cf064 of _0x31b24d)_0x165a1e['_add'](this['_createNewComment']({'threadId':_0x49a831,..._0x1cf064}));return _0x4ea50c&&_0x165a1e['attachTo'](_0x4ea50c),_0x585391||!_0x165a1e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x388931,'threadId':_0x49a831});}['_submitCommentThread']({channelId:_0x2a9512,threadId:_0xb37ead}){if(!this['hasCommentThread'](_0xb37ead))throw new _0x2e3068('commentsrepository-missing-comment-thread',this);const _0x318df4=this['getCommentThread'](_0xb37ead);if(_0x318df4['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x53cb14,comments:_0x40b9f3,resolvedAt:_0x12feb8,resolvedBy:_0x35e306,context:_0x61cf9e,attributes:_0x484d3a}=_0x318df4,_0x2e6e53=this['context']['plugins']['get']('PendingActions'),_0x113cc2=_0x2e6e53['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2a9512,'threadId':_0x53cb14,'comments':_0x40b9f3['map'](_0x14b0ae=>_0x14b0ae['toJSON']()),'resolvedAt':_0x12feb8,'resolvedBy':_0x35e306?_0x35e306['id']:_0x35e306,'context':_0x61cf9e,'attributes':_0x484d3a})['then'](({comments:_0x38a18e})=>{_0x2e6e53['remove'](_0x113cc2);for(const _0x4d4d9c of _0x38a18e)this['_updateComment']({'channelId':_0x2a9512,'threadId':_0xb37ead,'commentId':_0x4d4d9c['commentId'],'createdAt':_0x4d4d9c['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1c3e43=>{throw console['error'](_0x1c3e43),new _0x2e3068('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x51156c,target:_0x5a4a07}){const _0x26afcd=this['getCommentThread'](_0x51156c);if(!_0x26afcd)throw new _0x2e3068('commentsrepository-attach-missing-comment-thread',this);const _0x43dd26=this['context']['plugins']['get']('PendingActions'),_0x311cba=this['context']['plugins']['get'](N),_0x4d3ba3=this['_createCommentThreadView'](_0x26afcd),_0x54cd74=new yt(_0x26afcd,_0x4d3ba3);let _0x577ebd=null;_0x4d3ba3['on']('change:isDirty',(_0x559ea9,_0x4be162,_0x2b7b25)=>{_0x2b7b25?_0x577ebd=_0x43dd26['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x577ebd&&(_0x43dd26['remove'](_0x577ebd),_0x577ebd=null);}),this['_threadToController']['set'](_0x26afcd,_0x54cd74),this['_viewToController']['set'](_0x4d3ba3,_0x54cd74);const _0x40fa7d=new T(this['context']['locale'],_0x4d3ba3);_0x40fa7d['bind']('length')['to'](_0x4d3ba3),_0x40fa7d['bind']('isDirty')['to'](_0x4d3ba3,'isDirty',_0x4d3ba3,'length',(_0x27285e,_0x50f5d8)=>_0x27285e||!_0x50f5d8),_0x40fa7d['bind']('isActive')['to'](_0x4d3ba3),_0x40fa7d['type']='comment';const _0x3ebb68=new d({'view':_0x40fa7d,'target':_0x5a4a07,'type':'comment','isVisible':!_0x26afcd['isResolved']});return _0x4d3ba3['on']('escape',()=>{_0x3ebb68['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4d3ba3,_0x3ebb68),_0x311cba['add'](_0x3ebb68),_0x3ebb68;}['_bindAnnotationToEditors'](_0x3dc3bd,_0x361c13){this['listenTo'](_0x3dc3bd,'editorReady',(_0x48275c,_0x1c166c)=>{const _0x167c1a=_0x1c166c['ui']['view']['body']['bodyCollectionContainer'];_0x361c13['focusableElements']['add'](_0x167c1a),this['context']instanceof _0x316bab&&this['context']['ui']['focusTracker']['add'](_0x167c1a);},{'priority':'highest'}),this['listenTo'](_0x3dc3bd,'editorDestroyed',(_0x1b95cf,_0x5c31fa)=>{const _0x4b7643=_0x5c31fa['ui']['view']['body']['bodyCollectionContainer'];_0x361c13['focusableElements']['has'](_0x4b7643)&&_0x361c13['focusableElements']['remove'](_0x4b7643),this['context']instanceof _0x316bab&&this['context']['ui']['focusTracker']['remove'](_0x4b7643);});}['_unbindEditors'](_0x251bca){this['stopListening'](_0x251bca,'editorReady'),this['stopListening'](_0x251bca,'editorDestroyed');}['_createCommentThreadView'](_0x353075){const _0x52f3e1=this['context']['plugins']['get'](it),{config:_0x5c11dc,locale:_0xf2b57}=this['context'],_0x246f99=mt(_0x5c11dc['get']('locale'));return new(0x0,(_0x5c11dc['get']('comments'))['CommentThreadView'])(_0xf2b57,_0x353075,_0x52f3e1['me'],{'editorConfig':{..._0x5c11dc['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x5c11dc['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x5c11dc['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x5c11dc['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x5c11dc['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x246f99,'CommentView':_0x5c11dc['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5b58ad,channelId:_0x463e67,resolvedAt:_0x5df324,resolvedBy:_0x1adfdc,isFromAdapter:_0x2428d2}){if(!this['hasCommentThread'](_0x5b58ad))throw new _0x2e3068('commentsrepository-missing-comment-thread',null,{'threadId':_0x5b58ad});const _0x4a20fa=this['getCommentThread'](_0x5b58ad);if(_0x4a20fa['isResolved'])throw new _0x2e3068('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5b58ad});const _0x347a46=this['context']['plugins']['get'](it);if(_0x4a20fa['resolvedBy']=_0x347a46['getUser'](_0x1adfdc),_0x4a20fa['resolvedAt']=_0x5df324,_0x2428d2||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2a5c34=this['context']['plugins']['get']('PendingActions'),_0x58b6fa=_0x2a5c34['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x463e67,'threadId':_0x5b58ad})['then'](({resolvedAt:_0x58821c,resolvedBy:_0x14378b})=>{_0x2a5c34['remove'](_0x58b6fa),_0x4a20fa['resolvedBy']['id']!==_0x14378b&&(_0x4a20fa['resolvedBy']=_0x347a46['getUser'](_0x14378b)),_0x4a20fa['resolvedAt']=_0x58821c;})['catch'](_0xc85326=>{throw console['error'](_0xc85326),new _0x2e3068('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x510377,channelId:_0x2cd543,isFromAdapter:_0x4b3c52}){if(!this['hasCommentThread'](_0x510377))throw new _0x2e3068('commentsrepository-missing-comment-thread',null,{'threadId':_0x510377});const _0x54a922=this['getCommentThread'](_0x510377);if(!_0x54a922['isResolved'])throw new _0x2e3068('commentsrepository-reopen-comment-thread',null,{'threadId':_0x510377});if(_0x54a922['resolvedBy']=null,_0x54a922['resolvedAt']=null,_0x4b3c52||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x38cec4=this['context']['plugins']['get']('PendingActions'),_0x3744fb=_0x38cec4['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2cd543,'threadId':_0x510377})['then'](()=>_0x38cec4['remove'](_0x3744fb))['catch'](_0x4f455a=>{throw console['error'](_0x4f455a),new _0x2e3068('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x1314c0,isFromAdapter:_0x148aa6}){const _0xa55a1a=this['getCommentThread'](_0x1314c0);if(!_0xa55a1a)throw new _0x2e3068('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1314c0),this['_threads']['delete'](_0x1314c0),!_0xa55a1a['isSubmitted']||_0x148aa6||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5e9057=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5c8b25}=_0xa55a1a,_0x579981=_0x5e9057['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5c8b25,'threadId':_0x1314c0})['then'](()=>_0x5e9057['remove'](_0x579981))['catch'](_0x27d373=>{throw console['error'](_0x27d373),new _0x2e3068('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0xe1a114,unlinkedAt:_0x5d3996,context:_0x42fc9a,attributes:_0x584cbe,isFromAdapter:_0x38e064}){if('string'!=typeof _0xe1a114)throw new _0x2e3068('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xe1a114});if(!this['hasCommentThread'](_0xe1a114))throw new _0x2e3068('commentsrepository-missing-comment-thread',null,{'threadId':_0xe1a114});const _0x21474c=this['getCommentThread'](_0xe1a114);let _0x5e75c2=!0x1;if(void 0x0!==_0x42fc9a&&_0x21474c['context']!==_0x42fc9a&&(_0x21474c['context']=_0x42fc9a,_0x5e75c2=!0x0),void 0x0!==_0x5d3996&&_0x21474c['unlinkedAt']!==_0x5d3996&&(_0x21474c['unlinkedAt']=_0x5d3996,_0x5e75c2=!0x0),_0x584cbe&&!It(_0x584cbe,_0x21474c['attributes'])&&(_0x21474c['attributes']=_0x584cbe,_0x5e75c2=!0x0),!_0x5e75c2)return Promise['resolve']();if(!_0x21474c['isSubmitted']||_0x38e064||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x17bea7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5010ef}=_0x21474c,_0x4e174b=_0x17bea7['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5010ef,'threadId':_0xe1a114,'context':_0x42fc9a,'unlinkedAt':_0x5d3996,'attributes':_0x584cbe})['then'](()=>_0x17bea7['remove'](_0x4e174b))['catch'](_0x4c3f8a=>{throw console['error'](_0x4c3f8a),new _0x2e3068('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2c5056){const _0x399f69=this['context']['plugins']['get'](N),_0x469b23=this['getCommentThread'](_0x2c5056);if(this['_threadToController']['has'](_0x469b23)){const _0x7e3d7b=this['_threadToController']['get'](_0x469b23),_0x950c88=_0x7e3d7b['view'],_0x39f879=_0x399f69['getByInnerView'](_0x950c88);this['_threadToController']['delete'](_0x469b23),this['_viewToController']['delete'](_0x950c88),_0x39f879&&_0x399f69['remove'](_0x39f879),_0x7e3d7b['destroy'](),_0x950c88['destroy']()['then'](()=>{this['_unbindEditors'](_0x950c88);});}}['_updateActiveAnnotation']({threadId:_0x19be13,resolvedAt:_0x33c70d}){const _0x154555=!!_0x33c70d,_0x57d162=this['context']['plugins']['get'](N),_0x31da83=this['getCommentThread'](_0x19be13);if(this['_threadToController']['has'](_0x31da83)){const _0x5bf145=this['_threadToController']['get'](_0x31da83)['view'],_0x30bd36=_0x57d162['getByInnerView'](_0x5bf145);_0x30bd36&&(_0x154555&&_0x57d162['_removeActiveAnnotation'](_0x30bd36),_0x30bd36['refreshVisibility']());}}['_getExternalAuthor'](_0x39bce8){const _0x58117a=this['context']['plugins']['get'](it),_0x3e450f=lt('external:'+_0x39bce8),_0x77df8a=_0x58117a['getUser'](_0x3e450f);return _0x77df8a||_0x58117a['addUser']({'id':_0x3e450f,'name':_0x39bce8});}['_createNewComment']({threadId:_0xd37d10,commentId:_0x3ab344=_0x4b8453(),content:_0x516fd7,authorId:_0x2c63ae,createdAt:_0x4822f0,attributes:_0x321e0c}){if('string'!=typeof _0x3ab344)throw new _0x2e3068('commentsrepository-invalid-commentid');if('string'!=typeof _0x2c63ae)throw new _0x2e3068('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x516fd7||!_0x516fd7['trim']())throw new _0x2e3068('commentsrepository-invalid-comment-content');const _0x52117b=this['context']['plugins']['get'](it)['getUser'](_0x2c63ae);if(!_0x52117b)throw new _0x2e3068('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2c63ae});let _0x3fd3e7=null,_0x576aef=_0x4822f0;return _0x321e0c&&_0x321e0c['@external']&&(_0x3fd3e7=this['_getExternalAuthor'](_0x321e0c['@external']['authorName']),_0x576aef=new Date(_0x321e0c['@external']['createdAt'])),new re(this,{'threadId':_0xd37d10,'id':_0x3ab344,'author':_0x3fd3e7||_0x52117b,'creator':_0x52117b,'content':_0x516fd7,'createdAt':_0x4822f0,'authoredAt':_0x576aef,'attributes':_0x321e0c});}['_addComment'](_0xf2c7de){let {threadId:_0x19e223,content:_0x397d7b,attributes:_0xfa1ebd,isFromAdapter:_0x3f03e8}=_0xf2c7de;const _0x369f8b=this['getCommentThread'](_0xf2c7de['threadId']);if(!_0x369f8b)throw new _0x2e3068('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x334b73=this['_createNewComment'](_0xf2c7de),{id:_0x53075f}=_0x334b73;if(_0x369f8b['_add'](_0x334b73),_0x3f03e8||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x369f8b['isSubmitted'])return Promise['resolve']();const _0x475a7c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x35b415}=_0x369f8b,_0x174333=_0x475a7c['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xfa1ebd||(_0xfa1ebd={}),this['adapter']['addComment']({'channelId':_0x35b415,'threadId':_0x19e223,'commentId':_0x53075f,'content':_0x397d7b,'attributes':_0xfa1ebd})['then'](_0xdb94a0=>{_0x475a7c['remove'](_0x174333),_0xdb94a0&&this['_updateComment']({'channelId':_0x35b415,'threadId':_0x19e223,'commentId':_0x53075f,'createdAt':_0xdb94a0['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3b7c8c=>{throw console['error'](_0x3b7c8c),new _0x2e3068('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x175b6f,commentId:_0x471105,content:_0x56565f,createdAt:_0x278e50,attributes:_0x373c9f,isFromAdapter:_0xb7ac52}){if(void 0x0!==_0x56565f&&('string'!=typeof _0x56565f||!_0x56565f['trim']()['length']))throw new _0x2e3068('commentsrepository-update-comment-invalid-content');const _0x8435b9=this['getCommentThread'](_0x175b6f),_0x1eeb5b=_0x8435b9['getComment'](_0x471105);if(!_0x1eeb5b)throw new _0x2e3068('commentsrepository-update-missing-comment',this);let _0x14a1ba=!0x1;if(_0x56565f&&_0x56565f!==_0x1eeb5b['content']&&(_0x1eeb5b['isEditable']||_0xb7ac52)&&(_0x1eeb5b['content']=_0x56565f,_0x14a1ba=!0x0),_0x278e50&&_0x278e50!==_0x1eeb5b['createdAt']&&(_0x1eeb5b['createdAt']=_0x278e50,_0x1eeb5b['attributes']&&_0x1eeb5b['attributes']['@external']||(_0x1eeb5b['authoredAt']=_0x278e50),_0x14a1ba=!0x0),_0x373c9f&&!It(_0x373c9f,_0x1eeb5b['attributes'])&&(_0x1eeb5b['attributes']=_0x373c9f,_0x14a1ba=!0x0),!_0x14a1ba)return Promise['resolve']();if(_0x8435b9['fire']('commentUpdated'),_0xb7ac52||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5c04b2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x36b65b}=this['getCommentThread'](_0x1eeb5b['threadId']),_0x1cfc8e=_0x5c04b2['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x36b65b,'threadId':_0x175b6f,'commentId':_0x471105,'content':_0x56565f,'attributes':_0x373c9f})['then'](()=>_0x5c04b2['remove'](_0x1cfc8e))['catch'](_0x3f721a=>{throw console['error'](_0x3f721a),new _0x2e3068('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x77acd9,commentId:_0x1b96df,isFromAdapter:_0xb96f43}){const _0x350d6f=this['getCommentThread'](_0x77acd9),_0x76c24=_0x350d6f['getComment'](_0x1b96df);if(!_0x76c24)throw new _0x2e3068('commentsrepository-remove-missing-comment',this);if(_0x350d6f['_remove'](_0x76c24),_0xb96f43||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xca0ccf=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2106ab}=_0x350d6f,_0x6b54e8=_0xca0ccf['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2106ab,'threadId':_0x77acd9,'commentId':_0x1b96df})['then'](()=>_0xca0ccf['remove'](_0x6b54e8))['catch'](_0xa1066e=>{throw console['error'](_0xa1066e),new _0x2e3068('commentsrepository-remove-comment-internal-error',this);});}}class oe extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x23b86c(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0xfbb2f2,_0x4e0c19){super();const _0x164cf5=_0xfbb2f2['context']['plugins']['get'](it)['me'],_0x5d7e49=_0xfbb2f2['getCommentThread'](_0x4e0c19['threadId']),_0x25723b=0x0===_0x5d7e49['comments']['length'],_0x57fd2d=_0x164cf5===_0x4e0c19['author'];this['id']=_0x4e0c19['id'],this['threadId']=_0x4e0c19['threadId'],this['author']=_0x4e0c19['author'],this['creator']=_0x4e0c19['creator'],this['isExternal']=Boolean(_0x4e0c19['attributes']&&_0x4e0c19['attributes']['@external']),this['set']('content',_0x4e0c19['content']),this['createdAt']=_0x4e0c19['createdAt']||new Date(),this['set']('authoredAt',_0x4e0c19['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5d7e49,'resolvedAt'),this['set']('attributes',_0x4e0c19['attributes']||{}),this['bind']('isEditable')['to'](_0xfbb2f2,'_permissions',()=>{const _0x1c296d=_0xfbb2f2['getPermissions'](_0x5d7e49['channelId'])['write'],_0x156cd3=_0xfbb2f2['getPermissions'](_0x5d7e49['channelId'])['modifyAll'];return _0x57fd2d&&_0x1c296d||!_0x57fd2d&&_0x156cd3;}),this['bind']('isRemovable')['to'](_0x5d7e49,'isRemovable',_0xfbb2f2,'_permissions',_0xa83e37=>{const _0x1be988=_0xfbb2f2['getPermissions'](_0x5d7e49['channelId'])['write'],_0x222042=_0xfbb2f2['getPermissions'](_0x5d7e49['channelId'])['modifyAll'];return _0x57fd2d&&_0x1be988||_0xa83e37&&_0x25723b||!_0x57fd2d&&_0x222042&&!_0x25723b;}),this['bind']('isReadOnly')['to'](_0x5d7e49,'isReadOnly'),this['_repository']=_0xfbb2f2;}get['weight'](){return Math['max'](function(_0x1624db){const _0x49d8c4=document['createElement']('div');return _0x49d8c4['innerHTML']=_0x1624db,_0x49d8c4['textContent']['length'];}(this['content']),0xc8);}['update'](_0x51e3a9){const {threadId:_0x4665a4,id:_0x33f54a}=this;if(!this['_repository']['hasCommentThread'](_0x4665a4))throw new _0x2e3068('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4cded9}=this['_repository']['getCommentThread'](_0x4665a4);this['_repository']['fire'](_t('updateComment',_0x4cded9,_0x4665a4),{'channelId':_0x4cded9,'threadId':_0x4665a4,'commentId':_0x33f54a,..._0x51e3a9});}['setAttribute'](_0x350af7,_0x37941a){const _0xfe48b9=pt(this['attributes']);wt(_0xfe48b9,_0x350af7,_0x37941a),this['update']({'attributes':_0xfe48b9});}['removeAttribute'](_0x43925d){const _0x1c7018=pt(this['attributes']);At(_0x1c7018,_0x43925d),this['update']({'attributes':_0x1c7018});}['remove'](_0x1baa6b={}){if(!_0x1baa6b['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3c120f,id:_0x2b69c9}=this;if(!this['_repository']['hasCommentThread'](_0x3c120f))throw new _0x2e3068('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5244b5}=this['_repository']['getCommentThread'](_0x3c120f);this['_repository']['fire'](_t('removeComment',_0x5244b5,_0x3c120f),{'channelId':_0x5244b5,'threadId':_0x3c120f,'commentId':_0x2b69c9,..._0x1baa6b});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function _t(_0x3dbbc7,..._0x4ed24d){for(const _0x4e8526 of _0x4ed24d)void 0x0!==_0x4e8526&&(_0x3dbbc7+=':'+String(_0x4e8526));return _0x3dbbc7;}class J extends _0x3f3719{['refresh'](){const _0x5d2f3a=this['editor']['model']['document']['selection'];for(const _0x802d86 of _0x5d2f3a['getRanges']())if(this['_hasContent'](_0x802d86))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x385afd=_0x4b8453()}={}){const _0x325e0e=this['editor']['model'],_0x1331b5=[];for(const _0x2ae90e of _0x325e0e['document']['selection']['getRanges']())this['_hasContent'](_0x2ae90e)&&_0x1331b5['push'](this['_trimToContent'](_0x2ae90e));_0x325e0e['change'](_0x26a3d7=>{for(const _0x41f5e0 of _0x1331b5){const _0x1946b6=_0x4b8453()['substr'](0x1,0x5),_0x57c84='comment:'+_0x385afd+':'+_0x1946b6;_0x26a3d7['addMarker'](_0x57c84,{'range':_0x41f5e0,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x5c8267){for(const _0x13f0a1 of _0x5c8267['getItems']())if(this['_itemIsContent'](_0x13f0a1))return!0x0;return!0x1;}['_itemIsContent'](_0x5566b3){return _0x5566b3['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5566b3)&&!_0x5566b3['is']('element','tableCell');}['_trimToContent'](_0x561c06){const _0x1f9a76=_0x138c5c=>!this['_itemIsContent'](_0x138c5c['item']),_0x428174=_0x561c06['start']['getLastMatchingPosition'](_0x1f9a76),_0x260553=_0x561c06['end']['getLastMatchingPosition'](_0x1f9a76,{'direction':'backward'});return this['editor']['model']['createRange'](_0x428174,_0x260553);}}class P extends _0x37624c{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[N];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x38e762){super(_0x38e762),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1557f7=this['editor'],_0x1dd476=_0x1557f7['model']['document']['selection'],_0x5b68e0=_0x257b89(()=>this['refreshSelectedViews'](),0xa);_0x1dd476['on']('change:range',(_0x2adebf,_0x528b7d)=>{_0x528b7d['directChange']&&(_0x5b68e0['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1557f7['editing']['view']['document'],'change:isFocused',(_0x4ba91f,_0x1cfb1d,_0x4f54bc)=>{_0x4f54bc&&_0x5b68e0();}),this['listenTo'](_0x1557f7['ui']['focusTracker'],'change:isFocused',(_0x5c9bfc,_0x1886a8,_0x155098)=>{_0x155098||_0x1557f7['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x1ae6a0=>this['_editorAnnotationsData']['has'](_0x1ae6a0['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x169d3d){if(this['_editorAnnotations']['has'](_0x169d3d['view']))return;this['_editorAnnotations']['add'](_0x169d3d['view']),this['editor']['ui']['focusTracker']['add'](_0x169d3d['view']['element']);const _0x32d02d=this['editor']['plugins']['get'](N);this['listenTo'](_0x32d02d['collection'],'remove',(_0x4bd803,_0x10c9fb)=>{this['editor']['ui']['focusTracker']['remove'](_0x10c9fb['view']['element']),this['_editorAnnotations']['delete'](_0x10c9fb['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x11a8ab){if('function'!=typeof _0x11a8ab)throw new _0x2e3068('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x11a8ab);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1603c2,annotations:_0x280c7f}){const _0x103e19=[],_0x3ffba7=this['editor']['model']['document']['selection'],_0x280d3c=Array['from'](_0x3ffba7['getRanges']());for(const [_0x4c3d30,_0xbdd3f9]of this['_editorAnnotationsData']){const _0x538846=_0x1f575a(_0xbdd3f9),_0xdd5c37=_0x280c7f['getByInnerView'](_0x4c3d30);_0x538846&&_0xdd5c37&&_0x103e19['push']({'annotation':_0xdd5c37,'range':_0x538846});}function _0x1f575a(_0x3452ed){for(const _0x2d1143 of _0x3452ed)for(const _0x5a7373 of _0x280d3c)if(_0x2d1143['containsRange'](_0x5a7373,!_0x3ffba7['isCollapsed']))return _0x2d1143;return null;}return _0x103e19['sort']((_0x324777,_0x27a00c)=>{const _0x2692e4=_0x324777['range'],_0x347ed6=_0x27a00c['range'];if(!_0x2692e4['isEqual'](_0x347ed6)){if(_0x2692e4['containsRange'](_0x347ed6,!0x0))return 0x1;if(_0x347ed6['containsRange'](_0x2692e4,!0x0))return-0x1;}return _0x324777['annotation']==_0x1603c2?-0x1:_0x27a00c['annotation']==_0x1603c2?0x1:0x0;})['map'](_0x3d5418=>_0x3d5418['annotation']);}get['_editorAnnotationsData'](){const _0x5677a0=new Map();for(const _0x5a6941 of Array['from'](this['_dataCollectors']))for(const [_0x26ec1c,_0x105df9]of _0x5a6941())_0x5677a0['set'](_0x26ec1c,_0x105df9);return _0x5677a0;}}class st extends _0x37624c{['afterInit'](){const _0x1b22e8=this['editor'];if(!_0x1b22e8['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1b22e8['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x37624c{constructor(_0x27b5ae){super(_0x27b5ae),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xebdc75=this['editor'],_0x1a8772=_0xebdc75['commands']['get']('importWord'),_0x986c47=_0xebdc75['plugins']['get'](it);_0x1a8772&&(_0x1a8772['on']('execute',(_0x34cf98,[,_0x3b2803])=>{_0x3b2803['collaboration_features']={'comments':!0x0,'user_id':_0x986c47['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1a8772,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x42e68a,_0x1d3ef5){const {comment_threads:_0x3d5143}=_0x1d3ef5;_0x3d5143&&_0x3d5143['forEach'](({thread_id:_0x386fdf,comments:_0x11b139,is_resolved:_0x4d5b5a})=>{const _0x457e7b=new Date(),_0x268194=_0x11b139['map'](({author:_0x8456b5,content:_0x56ec41,created_at:_0x3da9a2})=>({'content':_0x56ec41,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x457e7b,'attributes':{'@external':{'authorName':_0x8456b5,'createdAt':_0x3da9a2?new Date(_0x3da9a2):new Date(),'source':'importWord'}}})),_0x116bf9=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x116bf9,'threadId':_0x386fdf,'comments':_0x268194,'resolvedAt':_0x4d5b5a?_0x457e7b:null});});}}class at extends _0x37624c{constructor(_0x507974){super(_0x507974),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x45bbed=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x45bbed,'contentInsertion',(_0x1be8a3,_0x44131b)=>this['_removeMarkersWithoutThreads'](_0x44131b['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3f6b97){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3f6b97;const _0x524a35=this['editor']['plugins']['get']('CommentsRepository');for(const _0x484700 of _0x3f6b97['keys']()){const [_0x4fb08b,_0xc1ed17]=_0x484700['split'](':');'comment'!=_0x4fb08b||_0x524a35['hasCommentThread'](_0xc1ed17)||_0x3f6b97['delete'](_0x484700);}return _0x3f6b97;}['_registerMarkerInClipboardPipeline'](){const _0x391077=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1bb5b0=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1bb5b0&&_0x391077['_registerMarkerToCopy']('comment',_0x1bb5b0);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x25af4c){switch(_0x25af4c){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class r extends _0x37624c{static get['requires'](){return[o,P,it,st,ct,at];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ae7a7){super(_0x3ae7a7),this['set']('isThreadsLoadingPaused',!0x0),_0x3ae7a7['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5df4f2,_0x2c7a0c,_0x169378,_0x1754ad)=>{const _0x125625=_0x169378?he(_0x169378)['id']:null;if(_0x3ae7a7['model']['change'](()=>{if(_0x125625){const _0x3f50d0=this['getAllMarkersForId'](_0x125625);for(const _0x1b5d1f of _0x3f50d0)_0x3ae7a7['editing']['reconvertMarker'](_0x1b5d1f);}if(_0x1754ad){const {id:_0x55639a}=he(_0x1754ad),_0x2b8aba=this['getAllMarkersForId'](_0x55639a);for(const _0x21767a of _0x2b8aba)_0x3ae7a7['editing']['reconvertMarker'](_0x21767a);}}),_0x125625){const _0x5b31da=_0x3ae7a7['plugins']['get'](o)['getCommentThread'](_0x125625);_0x5b31da&&_0x5b31da['isResolved']&&this['scrollToThreadMarker'](_0x125625);}}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x50e593=this['editor'],_0x23ad77=_0x50e593['plugins']['get'](o),_0x2250bc=_0x50e593['config']['get']('collaboration.channelId');_0x50e593['commands']['add']('addCommentThread',new J(_0x50e593)),this['listenTo'](_0x50e593,'change:isReadOnly',(_0x2e061b,_0x1f562a,_0x19fbb2)=>{_0x23ad77['switchReadOnly'](_0x19fbb2,_0x50e593['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x23ad77,ut('addCommentThread',_0x2250bc),(_0x1bc3df,{threadId:_0x2f2f24})=>{const _0x31ae37=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2f2f24);_0x31ae37&&_0x31ae37['unlinkedAt']&&this['_attachArchivedThread'](_0x2f2f24);}),this['listenTo'](_0x23ad77,ut('removeCommentThread',_0x2250bc),(_0x166884,{threadId:_0x354126})=>{_0x50e593['model']['enqueueChange']({'isUndoable':!0x1},_0x2df305=>{const _0x450197=this['getAllMarkersForId'](_0x354126);for(const _0x1b531d of _0x450197)_0x2df305['removeMarker'](_0x1b531d);});}),this['listenTo'](_0x23ad77,ut('resolveCommentThread',_0x2250bc),(_0x3911c1,{threadId:_0x3440ce})=>{(this['_reconvertMarkers'](_0x3440ce),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x3440ce)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x23ad77,ut('reopenCommentThread',_0x2250bc),(_0x2d7573,{threadId:_0x1d9781})=>{this['_reconvertMarkers'](_0x1d9781);},{'priority':'low'}),this['listenTo'](_0x23ad77,ut('addComment',_0x2250bc),(_0x3a73af,{threadId:_0x5310a4,isFromAdapter:_0x37f33c})=>{const _0x3d9ff3=this['getAllMarkersForId'](_0x5310a4);if(_0x37f33c||0x0==_0x3d9ff3['length']||!_0x23ad77['hasCommentThread'](_0x5310a4))return;0x1===_0x23ad77['getCommentThread'](_0x5310a4)['length']&&_0x50e593['model']['enqueueChange']({'isUndoable':!0x1},_0x12e1ce=>{for(const _0x59b5fb of _0x3d9ff3)_0x12e1ce['updateMarker'](_0x59b5fb,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove']();}['afterInit'](){!async function(_0x3e2775){const _0x3a8e28=_0x59a6a0([0x38,0x51,0x63,0x53,0x5a,0x79,0x6c,0x4d,0x7a,0x42,0x54,0x4f,0x44,0x56,0x4b,0x45,0x69,0x6b,0x33,0x4e,0x74,0x6a,0x36,0x34,0x70,0x72,0x37,0x77,0x48,0x4a,0x65,0x32,0x58,0x64,0x6f,0x31,0x47,0x55,0x43,0x57,0x39,0x71,0x75,0x52,0x4c,0x73,0x68,0x41,0x50,0x46,0x49,0x66,0x6e,0x61,0x6d,0x30,0x59,0x62,0x76,0x78,0x67,0x35]),_0xf230b2=0x6771a1f6,_0x146037=0x6776f69e^_0xf230b2,_0x2c5b4=window[_0x59a6a0([0x44,0x61,0x74,0x65])][_0x59a6a0([0x6e,0x6f,0x77])](),_0x49efce=_0x3e2775[_0x59a6a0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x41d83e=new window[(_0x59a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x538233=>{_0x49efce[_0x59a6a0([0x6f,0x6e,0x63,0x65])](_0x59a6a0([0x72,0x65,0x61,0x64,0x79]),_0x538233);}),_0x4ca603={[_0x59a6a0([0x6b,0x74,0x79])]:_0x59a6a0([0x45,0x43]),[_0x59a6a0([0x75,0x73,0x65])]:_0x59a6a0([0x73,0x69,0x67]),[_0x59a6a0([0x63,0x72,0x76])]:_0x59a6a0([0x50,0x2d,0x32,0x35,0x36]),[_0x59a6a0([0x78])]:_0x59a6a0([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]),[_0x59a6a0([0x79])]:_0x59a6a0([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]),[_0x59a6a0([0x61,0x6c,0x67])]:_0x59a6a0([0x45,0x53,0x32,0x35,0x36])},_0x69c710=_0x49efce[_0x59a6a0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x59a6a0([0x67,0x65,0x74])](_0x59a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xded48e(){let _0x58eee2,_0xfd295f=null,_0x2b0dcc=null;try{if(_0x69c710==_0x59a6a0([0x47,0x50,0x4c]))return _0x59a6a0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x58eee2=_0x2aabbf(),!_0x58eee2)return _0x59a6a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x58eee2[_0x59a6a0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2b0dcc=_0x1329e6(_0x58eee2[_0x59a6a0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x58eee2[_0x59a6a0([0x6a,0x74,0x69])])),await _0x1f4693()?_0x4f64ce()?_0x58afc9()?_0x59a6a0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4cecca()?(_0x58eee2[_0x59a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x59a6a0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xfd295f=_0x52ee67(_0x59a6a0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x58eee2[_0x59a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x59a6a0([0x74,0x72,0x69,0x61,0x6c])&&(_0xfd295f=_0x52ee67(_0x59a6a0([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x58eee2[_0x59a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x59a6a0([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0xfd295f=_0x52ee67(_0x59a6a0([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5baff9()):_0x59a6a0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x59a6a0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x59a6a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x1ce5de){return _0x59a6a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x58afc9(){const _0x31be99=[_0x59a6a0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x59a6a0([0x74,0x72,0x69,0x61,0x6c])][_0x59a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58eee2[_0x59a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2c5b4/0x3e8:0xe10*_0x146037;return _0x58eee2[_0x59a6a0([0x65,0x78,0x70])]<_0x31be99;}function _0x4f64ce(){const _0x2f06ce=_0x58eee2[_0x59a6a0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2f06ce&&(!!_0x2f06ce[_0x59a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59a6a0([0x2a]))||(!!_0x2f06ce[_0x59a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59a6a0([0x43,0x4d,0x54]))||!(!_0x2f06ce[_0x59a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59a6a0([0x52,0x43,0x4d,0x54]))||!_0x158b98())));}function _0x4cecca(){const _0x20c623=_0x58eee2[_0x59a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x20c623||0x0==_0x20c623[_0x59a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x845d65}=new URL(window[_0x59a6a0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x20c623[_0x59a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x845d65))return!0x0;const _0x57aaec=_0x845d65[_0x59a6a0([0x73,0x70,0x6c,0x69,0x74])](_0x59a6a0([0x2e]));return _0x20c623[_0x59a6a0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xfaf094=>_0xfaf094[_0x59a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59a6a0([0x2a])))[_0x59a6a0([0x6d,0x61,0x70])](_0x8c08a2=>_0x8c08a2[_0x59a6a0([0x73,0x70,0x6c,0x69,0x74])](_0x59a6a0([0x2e])))[_0x59a6a0([0x73,0x6f,0x6d,0x65])](_0x4799b8=>_0x57aaec[_0x59a6a0([0x65,0x76,0x65,0x72,0x79])]((_0x29f5bf,_0x29bed9)=>_0x4799b8[_0x29bed9]===_0x29f5bf||_0x4799b8[_0x29bed9]===_0x59a6a0([0x2a])));}function _0x5baff9(){return _0xfd295f&&_0x2b0dcc?new window[(_0x59a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57dc42,_0x1c7271)=>{_0xfd295f[_0x59a6a0([0x74,0x68,0x65,0x6e])](_0x57dc42,_0x1c7271),_0x2b0dcc[_0x59a6a0([0x74,0x68,0x65,0x6e])](_0x38920e=>{_0x38920e!=_0x59a6a0([0x56,0x61,0x6c,0x69,0x64])&&_0x57dc42(_0x38920e);},_0x1c7271);}):_0xfd295f||_0x2b0dcc||_0x59a6a0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1329e6(_0x5523fc,_0x54aabd){return new window[(_0x59a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x49579a=>{if(_0x2a85a6())return _0x49579a(_0x59a6a0([0x56,0x61,0x6c,0x69,0x64]));_0x10237d(),_0x49efce[_0x59a6a0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x59a6a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x33b712=!0x1;const _0x1fb1e9=_0x4b8453();function _0x5dd9b9(_0x527869){return!!_0x527869&&(typeof _0x527869===_0x59a6a0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x527869===_0x59a6a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x527869[_0x59a6a0([0x74,0x68,0x65,0x6e])]===_0x59a6a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x527869[_0x59a6a0([0x63,0x61,0x74,0x63,0x68])]===_0x59a6a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x294ebb(_0x34368f){_0x13773b(_0x34368f)[_0x59a6a0([0x74,0x68,0x65,0x6e])](_0x39e895=>{if(!_0x39e895||_0x39e895[_0x59a6a0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x59a6a0([0x6f,0x6b]))return _0x59a6a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x10991e(_0x2ae461(_0x1fb1e9+_0x54aabd))!=_0x39e895[_0x59a6a0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x59a6a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x59a6a0([0x56,0x61,0x6c,0x69,0x64]);})[_0x59a6a0([0x74,0x68,0x65,0x6e])](_0x51f705=>(_0x4ec333(),_0x51f705),()=>{const _0x2e3aa3=_0x4fcb4a();return null==_0x2e3aa3?(_0x4ec333(),_0x59a6a0([0x56,0x61,0x6c,0x69,0x64])):_0x59a6a0(_0x2c5b4-_0x2e3aa3>(0x437d25f6^_0xf230b2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x59a6a0([0x74,0x68,0x65,0x6e])](_0x49579a)[_0x59a6a0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x49579a(_0x59a6a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4e9820=0x67474f76^_0xf230b2;function _0x4ec333(){const _0x5c3200=_0x59a6a0([0x6c,0x6c,0x63,0x74,0x2d])+_0x10991e(_0x2ae461(_0x5523fc)),_0x3dd7b0=_0x20edc0(_0x10991e(window[_0x59a6a0([0x4d,0x61,0x74,0x68])][_0x59a6a0([0x63,0x65,0x69,0x6c])](_0x2c5b4/_0x4e9820)));window[_0x59a6a0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x59a6a0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5c3200,_0x3dd7b0);}function _0x4fcb4a(){const _0x2a9abc=_0x59a6a0([0x6c,0x6c,0x63,0x74,0x2d])+_0x10991e(_0x2ae461(_0x5523fc)),_0x22cec2=window[_0x59a6a0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x59a6a0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2a9abc);return _0x22cec2?window[_0x59a6a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x20edc0(_0x22cec2),0x10)*_0x4e9820:null;}function _0x13773b(_0x3d8de9){return new window[(_0x59a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14c2a5,_0x226dbe)=>{_0x3d8de9[_0x59a6a0([0x74,0x68,0x65,0x6e])](_0x14c2a5,_0x226dbe),window[_0x59a6a0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x226dbe,0x67707536^_0xf230b2);});}}_0x49efce[_0x59a6a0([0x6f,0x6e])](_0x59a6a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x508f88,_0x14d8fe)=>{if(_0x14d8fe[0x0]!=_0x5523fc)return _0x49579a(_0x59a6a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x14d8fe[0x1]={..._0x14d8fe[0x1],[_0x59a6a0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1fb1e9};},{[_0x59a6a0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x59a6a0([0x68,0x69,0x67,0x68])}),_0x49efce[_0x59a6a0([0x6f,0x6e])](_0x59a6a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x475e14=>{_0x5dd9b9(_0x475e14[_0x59a6a0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x33b712=!0x0,_0x294ebb(_0x475e14[_0x59a6a0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x59a6a0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x59a6a0([0x6c,0x6f,0x77])}),_0x41d83e[_0x59a6a0([0x74,0x68,0x65,0x6e])](()=>{_0x33b712||_0x49579a(_0x59a6a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2a85a6(){return _0x49efce[_0x59a6a0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59a6a0([0x76,0x69,0x65,0x77])][_0x59a6a0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x59a6a0([0x61,0x75,0x74,0x6f]);}function _0x10237d(){_0x49efce[_0x59a6a0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59a6a0([0x76,0x69,0x65,0x77])][_0x59a6a0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x59a6a0([0x61,0x75,0x74,0x6f]);}}function _0x52ee67(_0x334a5d){const _0x493be0=[new window[(_0x59a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54e4f3=>setTimeout(_0x54e4f3,0x67789f3a^_0xf230b2)),_0x41d83e[_0x59a6a0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x59a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c99fa=>{let _0x14995e=0x0;_0x49efce[_0x59a6a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x59a6a0([0x6f,0x6e])](_0x59a6a0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x51df68,_0x1e9369)=>{_0x1e9369[0x0][_0x59a6a0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x14995e++,_0x14995e==(0x6771a00e^_0xf230b2)&&(_0x3c99fa(),_0x51df68[_0x59a6a0([0x6f,0x66,0x66])]());});}))];return window[_0x59a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x59a6a0([0x72,0x61,0x63,0x65])](_0x493be0)[_0x59a6a0([0x74,0x68,0x65,0x6e])](()=>_0x334a5d);}async function _0x2c00f1(){await _0x41d83e,_0x49efce[_0x59a6a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x59a6a0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x488a12,_0x49efce[_0x59a6a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x59a6a0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x488a12,_0x49efce[_0x59a6a0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x59a6a0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x158b98(){return _0x3c1916(_0x59a6a0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x34e569(_0x59a6a0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x59a6a0([0x73,0x74,0x61,0x74,0x65])]==_0x59a6a0([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2f7bdc(_0x50cdf0){const _0x252804=_0x4d00ff();_0x49efce[_0x252804]=_0x59a6a0([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x50cdf0,_0x50cdf0!=_0x59a6a0([0x56,0x61,0x6c,0x69,0x64])&&_0x2c00f1();}function _0x4d00ff(){const _0x5c0782=window[_0x59a6a0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x59a6a0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x59a6a0([0x6e,0x6f,0x77])]())[_0x59a6a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x59a6a0([0x2e]),'');let _0x877853=_0x59a6a0([0x51]);for(let _0x4ca7a8=0x0;_0x4ca7a8<_0x5c0782[_0x59a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4ca7a8+=0x2){let _0x3d2b75=window[_0x59a6a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c0782[_0x59a6a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4ca7a8,_0x4ca7a8+0x2));_0x3d2b75>=_0x3a8e28[_0x59a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3d2b75-=_0x3a8e28[_0x59a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x877853+=_0x3a8e28[_0x3d2b75];}return _0x877853;}function _0x2aabbf(){const _0x3777b0=_0x69c710[_0x59a6a0([0x73,0x70,0x6c,0x69,0x74])](_0x59a6a0([0x2e]));if(0x3!=_0x3777b0[_0x59a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x75eee0(_0x3777b0[0x1]);function _0x75eee0(_0xbefad4){const _0x3e436b=_0x2de5a7(_0xbefad4);return _0x3e436b&&_0x39d8db()?_0x3e436b:null;function _0x39d8db(){const _0x245886=_0x3e436b[_0x59a6a0([0x6a,0x74,0x69])],_0x169c84=window[_0x59a6a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x245886[_0x59a6a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x245886[_0x59a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xf6e8b8={..._0x3e436b,[_0x59a6a0([0x6a,0x74,0x69])]:_0x245886[_0x59a6a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x245886[_0x59a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xf6e8b8[_0x59a6a0([0x76,0x63])],_0x2ae461(_0xf6e8b8)==_0x169c84;}}}async function _0x1f4693(){let _0x115358=!0x0;try{const _0xf332ab=_0x69c710[_0x59a6a0([0x73,0x70,0x6c,0x69,0x74])](_0x59a6a0([0x2e])),[_0x11e3c2,_0x1812dd,_0x2b654c]=_0xf332ab;return _0x2ab9bd(_0x11e3c2),await _0x4e1197(_0x11e3c2,_0x1812dd,_0x2b654c),_0x115358;}catch(_0x5ef58b){return!0x1;}function _0x2ab9bd(_0x1ae3e0){const _0x37f025=_0x2de5a7(_0x1ae3e0);_0x37f025&&_0x37f025[_0x59a6a0([0x61,0x6c,0x67])]==_0x59a6a0([0x45,0x53,0x32,0x35,0x36])||(_0x115358=!0x1);}async function _0x4e1197(_0x377e72,_0x26b2a4,_0x4067a0){const _0x534257=window[_0x59a6a0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x59a6a0([0x66,0x72,0x6f,0x6d])](_0x123002(_0x4067a0),_0x15d420=>_0x15d420[_0x59a6a0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xea7194=new window[(_0x59a6a0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x59a6a0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x377e72+_0x59a6a0([0x2e])+_0x26b2a4),_0x108564=window[_0x59a6a0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x59a6a0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x108564)return;const _0x48f965=await _0x108564[_0x59a6a0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x59a6a0([0x6a,0x77,0x6b]),_0x4ca603,{[_0x59a6a0([0x6e,0x61,0x6d,0x65])]:_0x59a6a0([0x45,0x43,0x44,0x53,0x41]),[_0x59a6a0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x59a6a0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x59a6a0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x108564[_0x59a6a0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x59a6a0([0x6e,0x61,0x6d,0x65])]:_0x59a6a0([0x45,0x43,0x44,0x53,0x41]),[_0x59a6a0([0x68,0x61,0x73,0x68])]:{[_0x59a6a0([0x6e,0x61,0x6d,0x65])]:_0x59a6a0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48f965,_0x534257,_0xea7194)||(_0x115358=!0x1);}}function _0x2de5a7(_0x1ebc6c){return _0x1ebc6c[_0x59a6a0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x59a6a0([0x65,0x79]))?JSON[_0x59a6a0([0x70,0x61,0x72,0x73,0x65])](_0x123002(_0x1ebc6c)):null;}function _0x123002(_0x110668){return window[_0x59a6a0([0x61,0x74,0x6f,0x62])](_0x110668[_0x59a6a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x59a6a0([0x2b]))[_0x59a6a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x59a6a0([0x2f])));}function _0x2ae461(_0xff70ff){let _0x2b3ff4=0x1505;function _0x38f44d(_0x510c15){for(let _0x25f0b5=0x0;_0x25f0b5<_0x510c15[_0x59a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x25f0b5++){const _0xea233f=_0x510c15[_0x59a6a0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x25f0b5);_0x2b3ff4=(_0x2b3ff4<<0x5)+_0x2b3ff4+_0xea233f,_0x2b3ff4&=_0x2b3ff4;}}function _0x5b701f(_0x314de5){Array[_0x59a6a0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x314de5)?_0x314de5[_0x59a6a0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5b701f):_0x314de5&&typeof _0x314de5==_0x59a6a0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x59a6a0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x314de5)[_0x59a6a0([0x73,0x6f,0x72,0x74])]()[_0x59a6a0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5cf480,_0x2c8916])=>{_0x38f44d(_0x5cf480),_0x5b701f(_0x2c8916);}):_0x38f44d(window[_0x59a6a0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x314de5));}return _0x5b701f(_0xff70ff),_0x2b3ff4>>>0x0;}function _0x10991e(_0x590f40){return _0x590f40[_0x59a6a0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x59a6a0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x59a6a0([0x30]));}function _0x20edc0(_0x2bac01){return _0x2bac01[_0x59a6a0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x59a6a0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x59a6a0([0x6a,0x6f,0x69,0x6e])]('');}function _0x3c1916(_0x4de5f7){return _0x49efce[_0x59a6a0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x59a6a0([0x68,0x61,0x73])](_0x4de5f7);}function _0x34e569(_0x23ddd1){return _0x49efce[_0x59a6a0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x59a6a0([0x67,0x65,0x74])](_0x23ddd1);}function _0x488a12(){}function _0x59a6a0(_0x4f2356){return _0x4f2356['map'](_0x4923db=>String['fromCharCode'](_0x4923db))['join']('');}_0x2f7bdc(await _0xded48e());}(this);}['destroy'](){const _0x536d44=this['editor']['plugins']['get'](o),_0x3456e2=this['editor']['config']['get']('collaboration.channelId');for(const _0x52777d of _0x536d44['getCommentThreads']({'channelId':_0x3456e2}))_0x536d44['_detachCommentThread'](_0x52777d['id']),_0x536d44['_threads']['delete'](_0x52777d['id']);super['destroy']();}['hasMarkerForId'](_0x5069a2){return this['getAllMarkersForId'](_0x5069a2)['length']>0x0;}['getAllMarkersForId'](_0x53e58a){const _0x40f39f=[];for(const _0x55b88b of this['editor']['model']['markers'])_0x55b88b['name']['startsWith']('comment:'+_0x53e58a)&&_0x40f39f['push'](_0x55b88b);return _0x40f39f;}['scrollToThreadMarker'](_0x36a3fb){const _0x2ec23d=this['_getTargetForId'](_0x36a3fb);_0x2ec23d&&setTimeout(()=>{this['activeMarker']&&he(this['activeMarker'])['id']===_0x36a3fb&&rt({'target':_0x2ec23d[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5f464d){this['editor']['model']['change'](()=>{for(const _0x2e26a9 of this['getAllMarkersForId'](_0x5f464d))this['editor']['editing']['reconvertMarker'](_0x2e26a9);});}['_attachArchivedThread'](_0x1fc076){const _0x24e62b=this['editor']['plugins']['get'](o),_0x4d4c7d=this['editor']['plugins']['get'](P),_0x525237=_0x24e62b['getCommentThread'](_0x1fc076);if(!_0x525237['isAttached']){const _0x2f2118=_0x525237['attachTo'](()=>this['_getTargetForId'](_0x525237['id']));_0x4d4c7d['registerAnnotation'](_0x2f2118),_0x525237['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4faadb=this['editor'],_0x305c15=_0x4faadb['plugins']['get'](it);_0x4faadb['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x651a1d,_0x6d97d7)=>{const {id:_0x2d329d}=he(_0x651a1d['markerName']),_0x137c60=_0x4faadb['plugins']['get'](o)['getCommentThread'](_0x2d329d),_0x1b385e=this['activeMarker']&&he(this['activeMarker'])['id']===_0x2d329d;let _0x198420;if(_0x137c60&&_0x137c60['isResolved']&&!_0x1b385e&&_0x651a1d['item'])return _0x6d97d7['consumable']['consume'](_0x651a1d['item'],'addMarker:'+_0x651a1d['markerName']),_0x6d97d7['consumable']['consume'](_0x651a1d['item'],'removeMarker:'+_0x651a1d['markerName']),null;const _0x215ccb=['ck-comment-marker'];return _0x1b385e&&_0x215ccb['push']('ck-comment-marker--active'),_0x198420=_0x137c60&&_0x137c60['length']?_0x137c60['comments']['first']['author']['id']:_0x305c15['me']['id'],{'classes':_0x215ccb,'attributes':{'data-comment':_0x2d329d,'data-author-id':_0x198420}};}}),_0x4faadb['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2a7e08,{options:_0x2e14bc})=>{const _0x3c02aa=_0x4faadb['plugins']['get'](o),_0x41f470=_0x4faadb['model']['markers']['get'](_0x2a7e08),{id:_0x11e285,part:_0x13c011}=he(_0x2a7e08);if(_0x41f470&&!_0x41f470['affectsData'])return null;if(_0x2e14bc['ignoreResolvedComments']){const _0xc9476f=_0x3c02aa['getCommentThread'](_0x11e285);if(_0xc9476f&&_0xc9476f['isResolved'])return null;}return{'group':'comment','name':_0x13c011?_0x11e285+':'+_0x13c011:_0x11e285};}}),_0x4faadb['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1ddcb0,{writer:_0x295cfd})=>_0x295cfd['createElement']('$marker',{'data-name':'comment:'+_0x1ddcb0['getAttribute']('id')})}),_0x4faadb['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x45d162=this['editor'],_0x52f648=_0x45d162['plugins']['get'](o),_0x5c1429=new Set(),_0x5de663=new Set();_0x45d162['model']['document']['registerPostFixer'](_0x2dec77=>{let _0x4d1fe3=!0x1;for(const {name:_0x3434c7,data:_0x20b8c7}of _0x45d162['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4d6b3e,id:_0x35b42c}=he(_0x3434c7);let _0x452626=_0x20b8c7['newRange'];if('comment'!==_0x4d6b3e||!_0x452626)continue;const _0x578ef0='$graveyard'===_0x452626['root']['rootName'];_0x578ef0||(_0x452626=ft(_0x452626,_0x45d162['model']),!_0x452626||_0x452626['isCollapsed']||!_0x20b8c7['newRange']||_0x452626['isEqual'](_0x20b8c7['newRange']))?_0x45d162['model']['hasContent'](_0x452626)&&!_0x578ef0?this['isThreadsLoadingPaused']?_0x5c1429['add'](_0x3434c7):this['_handleThreadMarker'](_0x3434c7,_0x35b42c):(_0x5de663['add'](_0x3434c7),_0x5c1429['delete'](_0x3434c7),_0x2dec77['removeMarker'](_0x3434c7),_0x4d1fe3=!0x0):(_0x2dec77['updateMarker'](_0x3434c7,{'range':_0x452626}),_0x4d1fe3=!0x0);}return _0x4d1fe3;}),this['on']('change:isThreadsLoadingPaused',(_0x5b236f,_0x222eeb,_0x5f1d24)=>{if(!_0x5f1d24&&_0x5c1429['size'])for(const _0x1b3a65 of _0x5c1429){const {id:_0x51b66d}=he(_0x1b3a65);_0x5c1429['delete'](_0x1b3a65),_0x45d162['model']['markers']['get'](_0x1b3a65)&&this['_handleThreadMarker'](_0x1b3a65,_0x51b66d);}}),this['listenTo'](_0x45d162['model']['document'],'change',(_0x2dd7b9,_0x2e59f6)=>{for(const {name:_0x3909ce,data:{newRange:_0x14782c}}of _0x45d162['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d51dc,id:_0x45739c}=he(_0x3909ce);if('comment'!==_0x3d51dc)continue;const _0x49de34=_0x52f648['getCommentThread'](_0x45739c),_0x3829a0=this['hasMarkerForId'](_0x45739c);_0x49de34&&(!_0x49de34['_hasTargetInContent']&&_0x14782c&&_0x45d162['editing']['view']['once']('render',()=>{const _0x4dfbda=_0x45d162['plugins']['get'](N),_0x787611=_0x52f648['_threadToController']['get'](_0x49de34)['view'];_0x4dfbda['getByInnerView'](_0x787611)['refreshVisibility']();},{'priority':'low'}),_0x49de34['_hasTargetInContent']=_0x3829a0||!!_0x14782c),_0x14782c||(_0x5de663['add'](_0x3909ce),_0x5c1429['delete'](_0x3909ce));}if(_0x2e59f6['isLocal'])for(const _0x38cf7e of _0x5de663){const {id:_0x2974c3}=he(_0x38cf7e),_0x3c2ad6=_0x52f648['getCommentThread'](_0x2974c3),_0x12b3a6=this['hasMarkerForId'](_0x2974c3);_0x5c1429['delete'](_0x38cf7e),!_0x3c2ad6||_0x12b3a6||_0x3c2ad6['unlinkedAt']||_0x3c2ad6['setUnlinkedAt'](new Date());}_0x5de663['clear']();});}['_getTargetForId'](_0x2dfe47){const _0x25a5c4=this['editor'],_0x2eeaf7=this['getAllMarkersForId'](_0x2dfe47);return et(_0x25a5c4['editing'],_0x2eeaf7);}['_getTextContext'](_0x49a87b){const _0xd2249d=this['getAllMarkersForId'](_0x49a87b);let _0x9341ff='',_0x354bb7=!0x1;for(const _0x531602 of _0xd2249d){const _0x9c4305=_0x531602['getRange']();for(const _0x26cad9 of Array['from'](_0x9c4305['getItems']()))_0x26cad9['is']('$textProxy')?(_0x9341ff&&_0x354bb7&&(_0x9341ff+='\x20',_0x354bb7=!0x1),_0x9341ff+=_0x26cad9['data']):_0x354bb7=!0x0;_0x354bb7=!0x0;}return _0x9341ff['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x22cdff,_0x42ad34){const _0x2337b9=this['editor'],_0x59b38b=_0x2337b9['plugins']['get'](o);let _0x3bd42c=_0x59b38b['getCommentThread'](_0x42ad34);const _0x58a904=_0x2337b9['config']['get']('collaboration.channelId'),_0x3bd1c8=_0x2337b9['plugins']['get'](P);if(_0x3bd42c&&(_0x3bd42c['unlinkedAt']&&_0x3bd42c['setUnlinkedAt'](null),_0x3bd42c['isAttached']))return _0x3bd42c;return!this['getAllMarkersForId'](_0x42ad34)[0x0]['managedUsingOperations']?_0x2337b9['editing']['view']['once']('render',()=>{if(_0x59b38b['getCommentThread'](_0x42ad34))return;const _0x12fe65=_0x2337b9['plugins']['get'](N);_0x3bd42c=_0x59b38b['openNewCommentThread']({'channelId':_0x58a904,'threadId':_0x42ad34,'target':()=>this['_getTargetForId'](_0x42ad34),'context':{'type':'text','value':this['_getTextContext'](_0x42ad34)}});const _0x40b4a0=_0x59b38b['_threadToController']['get'](_0x3bd42c)['view'],_0xca3134=_0x12fe65['getByInnerView'](_0x40b4a0);_0xca3134&&_0x3bd1c8['registerAnnotation'](_0xca3134);},{'priority':'low'}):_0x59b38b['fetchCommentThread']({'channelId':_0x58a904,'threadId':_0x42ad34})['then'](_0x33c94e=>{if('destroyed'!==_0x2337b9['state']){if(_0x3bd42c=_0x33c94e,_0x3bd42c&&!_0x3bd42c['isAttached']){const _0x34aacb=_0x3bd42c['attachTo'](()=>this['_getTargetForId'](_0x42ad34));_0x3bd1c8['registerAnnotation'](_0x34aacb),_0x3bd42c['isResolved']&&this['_reconvertMarkers'](_0x42ad34);}else{if(!_0x3bd42c){const _0x3b65af=this['getAllMarkersForId'](_0x42ad34);_0x2337b9['model']['change'](_0x3d3e6d=>{for(const _0xc0890f of _0x3b65af)_0x3d3e6d['removeMarker'](_0xc0890f);});}}}}),_0x3bd42c;}['_handleThreadMarker'](_0x5a53c6,_0x311dba){const _0x321b87=this['_attachMarkerToThread'](_0x5a53c6,_0x311dba);_0x321b87&&!_0x321b87['context']&&_0x321b87['setContext']({'type':'text','value':this['_getTextContext'](_0x311dba)});}['_initAriaMarkerChangeAnnouncements'](){const _0x50176a=this['editor'];ot(_0x50176a['model'],({left:_0x3887e8,entered:_0x14c796})=>{for(const _0x34e81a of _0x3887e8)if(dt(_0x34e81a)){_0x50176a['ui']['ariaLiveAnnouncer']['announce'](S(_0x50176a['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3d4052 of _0x14c796)if(dt(_0x3d4052)){_0x50176a['ui']['ariaLiveAnnouncer']['announce'](S(_0x50176a['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x3ef24c)));break;}});}}function ut(_0x81186f,_0x28ba70){return _0x28ba70?_0x81186f+':'+_0x28ba70:_0x81186f;}function he(_0x352008){const _0xafd210=_0x352008['split'](':');return{'group':_0xafd210[0x0],'id':_0xafd210[0x1],'part':_0xafd210[0x2]};}function ft(_0x1dda81,_0x523098){const _0x54e12b=_0x523098['schema'],_0x3ad83b=_0x523098['createRange'](_0x1dda81['start']);for(const _0xcd8725 of _0x1dda81['getWalker']()){const {type:_0x9261be,item:_0x47e35d,nextPosition:_0x31e735}=_0xcd8725;if('text'===_0x9261be||_0x54e12b['isObject'](_0x47e35d)){const _0x3837d9=_0x523098['createPositionBefore'](_0x47e35d);_0x3ad83b['isCollapsed']&&(_0x3ad83b['start']=_0x3837d9),_0x3ad83b['end']=_0x31e735;}}return _0x3ad83b;}function dt(_0x275c5b){return'comment'===he(_0x275c5b['name'])['group'];}var xt='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M4\x201.5h12A3.5\x203.5\x200\x200\x201\x2019.5\x205v8l-.005.192a3.5\x203.5\x200\x200\x201-2.927\x203.262l-.062.008v1.813a1.5\x201.5\x200\x200\x201-2.193\x201.33l-.371-.193-.38-.212a13.452\x2013.452\x200\x200\x201-3.271-2.63l-.062-.07H4A3.5\x203.5\x200\x200\x201\x20.5\x2013V5A3.5\x203.5\x200\x200\x201\x204\x201.5ZM4\x203a2\x202\x200\x200\x200-2\x202v8a2\x202\x200\x200\x200\x202\x202h6.924a11.917\x2011.917\x200\x200\x200\x203.71\x203.081l.372.194v-3.268L14.962\x2015H16a2\x202\x200\x200\x200\x202-2V5a2\x202\x200\x200\x200-2-2H4Z\x22/><path\x20d=\x22M9.75\x205a.75.75\x200\x200\x200-.75.75v2.5H6.5a.75.75\x200\x200\x200\x200\x201.5H9v2.5a.75.75\x200\x200\x200\x201.5\x200v-2.5H13a.75.75\x200\x200\x200\x200-1.5h-2.5v-2.5A.75.75\x200\x200\x200\x209.75\x205Z\x22/></svg>\x0a';class i extends _0x37624c{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,N];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x25f2b6=this['editor'],_0x75a4e4=_0x25f2b6['plugins']['get'](o),_0x28cd7b=_0x25f2b6['plugins']['get'](r),_0x1b4bab=_0x25f2b6['plugins']['get'](N),_0x47124a=_0x25f2b6['plugins']['get'](P);_0x25f2b6['ui']['componentFactory']['add']('comment',()=>{const _0xb5cff5=this['_createUIButton'](_0xbee2d6);return _0xb5cff5['tooltip']=!0x0,_0xb5cff5;}),_0x25f2b6['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x107f58)),_0x47124a['addSourceCollector'](()=>{const _0x3ef55d=[];for(const [_0x14892d,_0x3dda1b]of _0x75a4e4['_threadToController']){const _0x48f2f0=_0x28cd7b['getAllMarkersForId'](_0x14892d['id']),_0x109062=_0x48f2f0['map'](_0x57eb63=>_0x57eb63['getRange']());_0x48f2f0['length']>0x0&&_0x3ef55d['push']([_0x3dda1b['view'],_0x109062]);}return _0x3ef55d;}),this['listenTo'](_0x1b4bab,'change:activeAnnotations',(_0x51a084,_0x3a67a4,_0xc05599)=>{const _0x217dae=Array['from'](_0xc05599)['map'](_0x24e6ff=>_0x24e6ff['innerView'])['find'](_0x45ac8c=>_0x75a4e4['_viewToController']['has'](_0x45ac8c));if(!_0x217dae)return void(_0x28cd7b['activeMarker']=null);const _0x3d8eb1=_0x75a4e4['_viewToController']['get'](_0x217dae)['model']['id'],_0x4f39d7='comment:'+_0x3d8eb1;_0x3d8eb1&&_0x28cd7b['hasMarkerForId'](_0x3d8eb1)?_0x28cd7b['activeMarker']=_0x4f39d7:_0x28cd7b['activeMarker']&&(_0x28cd7b['activeMarker']=null);}),this['listenTo'](_0x75a4e4,'removeCommentThread',(_0x580c76,{threadId:_0x13f503,isFromAdapter:_0x151b9e})=>{!_0x151b9e&&_0x25f2b6['ui']['focusTracker']['isFocused']&&_0x28cd7b['hasMarkerForId'](_0x13f503)&&_0x25f2b6['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x75a4e4,'addComment',(_0x398f9f,{threadId:_0x39652a,isFromAdapter:_0x21d5d9})=>{if(_0x21d5d9||!_0x28cd7b['hasMarkerForId'](_0x39652a)||!_0x75a4e4['hasCommentThread'](_0x39652a))return;0x1===_0x75a4e4['getCommentThread'](_0x39652a)['length']&&(_0x25f2b6['editing']['view']['focus'](),_0x398f9f['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x22d138=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x23d942;for(const _0x2a37fc in _0x22d138){const _0x4cca94=_0x2a37fc,_0x2bbade=_0x22d138[_0x4cca94];if('commentsLicenseKeyValid'==_0x2bbade||'commentsLicenseKeyInvalid'==_0x2bbade||'commentsLicenseKeyExpired'==_0x2bbade||'commentsLicenseKeyDomainLimit'==_0x2bbade||'commentsLicenseKeyNotAllowed'==_0x2bbade||'commentsLicenseKeyEvaluationLimit'==_0x2bbade||'commentsLicenseKeyTrialLimit'==_0x2bbade||'commentsLicenseKeyDevelopmentLimit'==_0x2bbade||'commentsLicenseKeyUsageLimit'==_0x2bbade){delete _0x22d138[_0x4cca94],_0x23d942=_0x2bbade,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x23d942&&_0x22d138['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x23d942&&_0x22d138['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x23d942&&_0x22d138['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x23d942&&_0x22d138['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x23d942&&_0x22d138['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x23d942&&_0x22d138['_showLicenseError']('trialLimit'),'commentsLicenseKeyDevelopmentLimit'==_0x23d942&&_0x22d138['_showLicenseError']('developmentLimit'),'commentsLicenseKeyUsageLimit'==_0x23d942&&_0x22d138['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x26eea5){const _0x520b5d=this['editor'],_0x536aa1=new _0x26eea5(_0x520b5d['locale']),_0x2e4f9d=_0x520b5d['commands']['get']('addCommentThread');return _0x536aa1['set']({'label':S(_0x520b5d['locale'],'Comment'),'icon':xt}),_0x536aa1['bind']('isEnabled')['to'](_0x2e4f9d),this['listenTo'](_0x536aa1,'execute',()=>_0x2e4f9d['execute']()),_0x536aa1;}}class s extends _0x37624c{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1ff4cc){super(_0x1ff4cc),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1ba3c4,_0x52dea0,_0x1ea5f9)=>{_0x1ea5f9?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x53946d,_0x478d57]of this['editor']['commands'])_0x478d57['affectsData']&&'addCommentThread'!==_0x53946d&&_0x478d57['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode');const _0x329685=this['editor']['editing']['view']['document'];this['listenTo'](_0x329685,'cut',_0x5e836c=>_0x5e836c['stop'](),{'priority':'highest'}),this['listenTo'](_0x329685,'clipboardInput',_0x1a0a86=>_0x1a0a86['stop'](),{'priority':'highest'}),this['listenTo'](_0x329685,'delete',_0x16c713=>_0x16c713['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0xbaf416,_0x21e1c5]of this['editor']['commands'])_0x21e1c5['affectsData']&&'addCommentThread'!==_0xbaf416&&_0x21e1c5['clearForceDisabled']('commentsOnlyMode');this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x323088{['activeUIs'];['_uis'];['_uisData'];static get['requires'](){return[N];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x368356){super(_0x368356),this['activeUIs']=new Set(),this['_uis']=new Map(),this['_uisData']=new Map();}['init'](){const _0x442ca6=this['context']['plugins']['get'](N);this['listenTo'](_0x442ca6,'_activateAnnotation',(_0x445e31,_0x1a2f61)=>{for(const _0x4bce3e of this['activeUIs']){const _0x474447=this['_uis']['get'](_0x4bce3e);(0x0,this['_uisData']['get'](_0x4bce3e)['filter'])(_0x1a2f61)&&_0x474447['setActiveAnnotation'](_0x1a2f61);}}),this['listenTo'](_0x442ca6,'_deactivateAllAnnotations',()=>{for(const _0x48881b of this['activeUIs']){this['_uis']['get'](_0x48881b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x442ca6['_visibleAnnotations'],'add',(_0x2b96e3,_0x128a07)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x128a07);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1dfdc3){return this['activeUIs']['has'](_0x1dfdc3);}['activate'](_0x1266ee,_0x2f3cdd=()=>!0x0){const _0x1fa798=this['context']['plugins']['get'](N);if(!this['_uis']['has'](_0x1266ee))throw new _0x2e3068('annotationsuis-missing-ui',this,{'uiName':_0x1266ee});this['isActive'](_0x1266ee)&&this['deactivate'](_0x1266ee),this['activeUIs']['add'](_0x1266ee);const _0x415c9c=new x();!function({source:_0x4d7eec,target:_0x4fa2ae,filter:_0x47c8f6}){for(const _0x47d552 of _0x4d7eec)_0x47c8f6(_0x47d552)&&_0x4fa2ae['add'](_0x47d552);_0x4fa2ae['listenTo'](_0x4d7eec,'add',(_0x28c989,_0x5c404b)=>{_0x47c8f6(_0x5c404b)&&_0x4fa2ae['add'](_0x5c404b);}),_0x4fa2ae['listenTo'](_0x4d7eec,'remove',(_0x3799b9,_0x57a3ae)=>{_0x4fa2ae['has'](_0x57a3ae)&&_0x4fa2ae['remove'](_0x57a3ae);});}({'source':_0x1fa798['_visibleAnnotations'],'target':_0x415c9c,'filter':_0x2f3cdd}),this['_uisData']['set'](_0x1266ee,{'collection':_0x415c9c,'filter':_0x2f3cdd});const _0x38966b=this['_uis']['get'](_0x1266ee);_0x38966b['attach'](_0x415c9c),this['listenTo'](_0x38966b,'change:activeAnnotation',(_0xe748f,_0x233348,_0x45f7a5,_0xa3d185)=>{_0xa3d185&&_0x1fa798['_removeActiveAnnotation'](_0xa3d185),_0x45f7a5&&_0x1fa798['_addActiveAnnotation'](_0x45f7a5);});}['deactivate'](_0x4ac883){if(this['activeUIs']['delete'](_0x4ac883),!this['_uis']['has'](_0x4ac883))throw new _0x2e3068('annotationsuis-missing-ui',this,{'uiName':_0x4ac883});const _0x16e075=this['_uis']['get'](_0x4ac883);_0x16e075['detach'](),this['stopListening'](_0x16e075),this['_uisData']['get'](_0x4ac883)['collection']['destroy'](),this['_uisData']['delete'](_0x4ac883);}['switchTo'](_0x822606){if(!this['_uis']['has'](_0x822606))throw new _0x2e3068('annotationsuis-missing-ui',this,{'uiName':_0x822606});const _0x4c8421=this['context']['plugins']['get'](N),_0x40fd3d=Array['from'](_0x4c8421['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x822606);const _0x3c428e=this['_uis']['get'](_0x822606);_0x3c428e['setActiveAnnotation'](_0x40fd3d),_0x3c428e['_setSelectedAnnotations']&&_0x40fd3d&&_0x3c428e['_setSelectedAnnotations']([_0x40fd3d]);}['deactivateAll'](){for(const _0x36f143 of this['activeUIs'])this['deactivate'](_0x36f143);}['register'](_0x3301bd,_0xa8b060){if(this['_uis']['has'](_0x3301bd))throw new _0x2e3068('annotationsuis-register-already-registered');if('function'!=typeof _0xa8b060['attach']||'function'!=typeof _0xa8b060['detach']||'function'!=typeof _0xa8b060['setActiveAnnotation'])throw new _0x2e3068('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3301bd,_0xa8b060);}['refilterAnnotations'](){const _0x6f162d=this['context']['plugins']['get'](N)['collection'],_0x4c1197=new Map(),_0x414e98=Array['from'](this['activeUIs']);for(const _0x3b6ad1 of this['activeUIs']){const _0x244987=this['_uisData']['get'](_0x3b6ad1)['collection'];for(const _0x50c8f8 of _0x244987)_0x4c1197['set'](_0x50c8f8,_0x3b6ad1);}for(const _0x4d2d12 of _0x6f162d){const _0x5842d7=_0x4c1197['get'](_0x4d2d12);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4d2d12);const _0x46d39a=_0x414e98['find'](_0xc31078=>this['_uisData']['get'](_0xc31078)['filter'](_0x4d2d12));_0x5842d7!==_0x46d39a&&(_0x5842d7&&this['_uisData']['get'](_0x5842d7)['collection']['remove'](_0x4d2d12),_0x46d39a&&this['_uisData']['get'](_0x46d39a)['collection']['add'](_0x4d2d12));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x36ddc1){const _0x3d8fe8=[];for(const _0x59d45d of this['activeUIs']){(0x0,this['_uisData']['get'](_0x59d45d)['filter'])(_0x36ddc1)&&_0x3d8fe8['push'](_0x59d45d);}if(_0x3d8fe8['length']>0x1)throw new _0x2e3068('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x3d8fe8,'annotationType':_0x36ddc1['type']});}}const ae=Ht('px');class V extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x30b893){super(_0x30b893);const _0x390673=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 _0x90f2b9(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x390673['to']('class')],'style':{'minHeight':_0x390673['to']('minHeight',_0x1bbfbd=>'number'==typeof _0x1bbfbd?ae(_0x1bbfbd+0xa):null)},'dir':_0x30b893['uiLanguageDirection'],'role':'application','aria-label':S(_0x30b893,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':S(_0x30b893,'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',_0x338873=>{this['_updateItemPositionInFocusables'](_0x338873['source']);}),this['list']['forEach'](_0x32b993=>{this['focusTracker']['add'](_0x32b993['element']),this['_updateItemPositionInFocusables'](_0x32b993);}),this['list']['on']('change',(_0x2fbdf8,_0x41bd11)=>{for(const _0x4f76a5 of _0x41bd11['removed'])this['focusTracker']['remove'](_0x4f76a5['element']),this['focusables']['remove'](_0x4f76a5);for(const _0x5144d5 of _0x41bd11['added'])this['focusTracker']['add'](_0x5144d5['element']),this['_updateItemPositionInFocusables'](_0x5144d5);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x170da9){const _0x26cf6d=this['focusables']['getIndex'](_0x170da9);let _0x4d4541,_0x14ee03;for(const _0x1259c1 of this['focusables'])if(_0x170da9['top']<_0x1259c1['top']){_0x4d4541=_0x1259c1;break;}if(_0x14ee03=_0x4d4541?this['focusables']['getIndex'](_0x4d4541):this['focusables']['length'],-0x1!==_0x26cf6d){if(_0x26cf6d===_0x14ee03-0x1)return;this['focusables']['remove'](_0x170da9),_0x14ee03=_0x4d4541?this['focusables']['getIndex'](_0x4d4541):this['focusables']['length'];}this['focusables']['add'](_0x170da9,_0x14ee03);}}const qt=Ht('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0xba1b48){super(_0xba1b48),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x351570,_0x54a260)=>_0x351570+_0x54a260),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Dt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x54f219=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x54f219['to']('isAnimationDisabled',_0xf5cd0=>_0xf5cd0?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x54f219['to']('top',_0x3f3e0e=>qt(_0x3f3e0e))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x50cd58=this['element']['clientHeight'];_0x50cd58&&(this['height']=_0x50cd58);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x323088{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f8661){super(_0x3f8661),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 _0x19f608=this['context']['config']['get']('sidebar.container');_0x19f608&&this['setContainer'](_0x19f608);}['setContainer'](_0x21a910){if(!y(_0x21a910))throw new _0x2e3068('sidebar-setcontainer-invalid-element');this['container']=_0x21a910;}['_attachToContainer']({viewClass:_0x6cb2a1='',spaceBetweenItems:_0x3f6b48=0x19}={}){if(!y(this['container']))throw new _0x2e3068('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x6cb2a1,this['_spaceBetweenItems']=_0x3f6b48;}['rearrange']({removedAnnotation:_0x3d1b4e,previousAnnotation:_0x56d751,nextAnnotation:_0x209b00}){const _0x29d140=this['getSidebarItemView'](_0x3d1b4e);this['view']['list']['remove'](_0x29d140),this['_destroySidebarItemView'](_0x3d1b4e),_0x56d751&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x56d751)),_0x209b00&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x209b00)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5bc9a8,activatedAnnotation:_0x447932,disableAnimationOnActivatedAnnotation:_0x127da1}){if(this['_activeAnnotation']=_0x447932,_0x5bc9a8){_0x5bc9a8['isActive']=!0x1;const _0x4e8e01=this['getSidebarItemView'](_0x5bc9a8);_0x4e8e01&&_0x127da1&&(_0x4e8e01['isAnimationDisabled']=!0x1);}if(_0x447932){const _0x4dfe74=this['getSidebarItemView'](_0x447932);_0x4dfe74&&(_0x447932['isActive']=!0x0,_0x127da1&&(_0x4dfe74['isAnimationDisabled']=!0x0,_0x4dfe74['top']+=0x1),this['_alignToTargetRect'](_0x4dfe74));}}['_detachFromContainer'](_0x3a51a0){if(this['view']['element']['remove'](),_0x3a51a0){for(const _0x17fda4 of _0x3a51a0)this['_destroySidebarItemView'](_0x17fda4);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5bca53,_0x22c617){_0x22c617||(_0x22c617=_0x5bca53['view']);const _0x5862c9=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5862c9,_0x5bca53),this['_annotationToSidebarItemView']['set'](_0x5bca53,_0x5862c9),_0x5862c9['content']['add'](_0x22c617),this['listenTo'](_0x5bca53['view'],'change:targetRect',(_0x22f9cb,_0x3308df,_0x4748c7)=>{const _0x264208=this['_getTargetTop'](_0x5bca53,_0x4748c7);_0x5862c9['_targetTop']!=_0x264208&&(_0x5862c9['_targetTop']=_0x264208,this['_setItemTop'](_0x5862c9,_0x264208));}),this['listenTo'](_0x5862c9,'change:top',()=>{this['_recalculate'](_0x5862c9,'top');}),this['listenTo'](_0x5862c9,'change:bottom',()=>{this['_recalculate'](_0x5862c9,'bottom');}),this['_alignToTargetRect'](_0x5862c9);const _0x3b49a5=this['_getItemBefore'](_0x5862c9);if(_0x3b49a5)this['_alignAfterItem'](_0x3b49a5,_0x5862c9)||this['_alignToTargetRect'](_0x5862c9);else this['_alignToTargetRect'](_0x5862c9);return this['_updateLastItem'](),this['view']['list']['add'](_0x5862c9),_0x5862c9;}['_alignForTopChange'](_0xa6c0c1){if(!_0xa6c0c1['content']['length'])return;const _0x440bc9=this['_getItemBefore'](_0xa6c0c1);if(!_0x440bc9)return;const _0x17d1f8=this['_sidebarItemViewToAnnotation']['get'](_0x440bc9),_0x34e784=this['_activeAnnotation'];_0x34e784&&_0x34e784===_0x17d1f8?this['_alignAfterItem'](_0x440bc9,_0xa6c0c1):this['_alignBeforeItem'](_0xa6c0c1,_0x440bc9);}['_alignForBottomChange'](_0x58d44d){if(!_0x58d44d['content']['length'])return;const _0x76f47a=this['_getItemAfter'](_0x58d44d);if(!_0x76f47a)return;const _0x3876ab=this['_sidebarItemViewToAnnotation']['get'](_0x76f47a),_0x450676=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x516861=this['_activeAnnotation'];_0x516861&&_0x516861===_0x3876ab&&_0x450676?(this['_alignBeforeItem'](_0x76f47a,_0x58d44d),this['_alignAfterItem'](_0x58d44d,_0x76f47a)):_0x516861&&_0x516861===_0x3876ab?this['_alignBeforeItem'](_0x76f47a,_0x58d44d):this['_alignAfterItem'](_0x58d44d,_0x76f47a);}['_recalculate'](_0x31d58e,_0x5ecbad){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4f4db0,changedProp:_0x166151}of this['_recalculateBuffer'])'top'===_0x166151?this['_alignForTopChange'](_0x4f4db0):this['_alignForBottomChange'](_0x4f4db0);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x31d58e,'changedProp':_0x5ecbad});}['getSidebarItemView'](_0x242085){return this['_annotationToSidebarItemView']['get'](_0x242085);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xcda25b){const _0x336195=this['getSidebarItemView'](_0xcda25b);this['stopListening'](_0x336195),this['stopListening'](_0xcda25b['view']),_0x336195['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xcda25b),this['_sidebarItemViewToAnnotation']['delete'](_0x336195);}['_createSidebarView'](){const _0x161a79=new V(this['context']['locale']);return _0x161a79['render'](),this['on']('change:_lastItem',(_0x9ec484,_0xbee8fa,_0x89eb7a,_0x3b7138)=>{_0x3b7138&&_0x161a79['unbind']('minHeight'),_0x89eb7a?_0x161a79['bind']('minHeight')['to'](_0x89eb7a,'bottom'):_0x161a79['minHeight']=null;}),_0x161a79;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x3ab534){const _0x1e0e4c=this['_sidebarItemViewToAnnotation']['get'](_0x3ab534),_0x5e8ad0=_0x1e0e4c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1e0e4c)-0x1);return _0x5e8ad0&&this['getSidebarItemView'](_0x5e8ad0)||null;}['_getItemAfter'](_0x5b95af){const _0x474551=this['_sidebarItemViewToAnnotation']['get'](_0x5b95af),_0x375632=_0x474551&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x474551)+0x1);return _0x375632&&this['getSidebarItemView'](_0x375632)||null;}['_alignBeforeItem'](_0x53e3fc,_0x308679){_0x53e3fc['updateHeight']();const _0x43401f=R(_0x308679['bottom']+this['_spaceBetweenItems'],_0x53e3fc['top']);return!!_0x43401f&&(this['_setItemTop'](_0x308679,_0x308679['top']-_0x43401f),!0x0);}['_alignAfterItem'](_0x4800e2,_0x2a8aae){_0x4800e2['updateHeight']();const _0x43df5b=R(_0x4800e2['bottom']+this['_spaceBetweenItems'],_0x2a8aae['top']);return!!_0x43df5b&&(this['_setItemTop'](_0x2a8aae,_0x2a8aae['top']+_0x43df5b,!0x1),!0x0);}['_alignToTargetRect'](_0x3d7374){const _0x534249=this['_sidebarItemViewToAnnotation']['get'](_0x3d7374);if(!_0x534249||!_0x534249['target']||!_0x534249['targetRect'])return;const _0x2b8bd9=this['_getTargetTop'](_0x534249,_0x534249['targetRect']);this['_setItemTop'](_0x3d7374,_0x2b8bd9);}['_getTargetTop'](_0x2a0224,_0x4822c1){if(null===_0x4822c1)return 0x0;if(_0x2a0224['target']instanceof _0x462831)return _0x4822c1['top'];{const _0x12724c=new _0x462831(this['view']['element'])['top'];return _0x4822c1['top']-_0x12724c;}}['_setItemTop'](_0xed2fb4,_0x24f334,_0x27212d=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x27212d&&(_0x24f334=Math['max'](_0x24f334,this['_getMaxAvailableTop'](_0xed2fb4))),_0xed2fb4['top']=_0x24f334;}['_getMaxAvailableTop'](_0x548340){let _0x54bf65=this['_getItemBefore'](_0x548340),_0x27a184=0x0;for(;_0x54bf65;)_0x54bf65['updateHeight'](),_0x27a184+=this['_spaceBetweenItems']+_0x54bf65['height'],_0x54bf65=this['_getItemBefore'](_0x54bf65);return _0x27a184;}}function R(_0x3ad29c,_0x35fe3c){return Math['max'](_0x3ad29c-_0x35fe3c,0x0);}function y(_0x593c8c){return null!==_0x593c8c&&'object'==typeof _0x593c8c&&0x1===_0x593c8c['nodeType'];}class e extends _0x323088{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8bb68d){super(_0x8bb68d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x375c29(),this['_refreshPositioningDebounced']=_0x257b89(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5005d1=this['context']['plugins']['get'](M),_0x26ffd5=this['context']['plugins']['get'](z);_0x5005d1['register']('wideSidebar',this),_0x26ffd5['container']&&_0x5005d1['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5e3dff){if(_0x5e3dff===this['activeAnnotation'])return;const _0x29ebdc=this['context']['plugins']['get'](z);_0x29ebdc['_activeAnnotation']=_0x5e3dff;const _0x27ab58=this['activeAnnotation'];this['activeAnnotation']=_0x5e3dff,_0x29ebdc['refresh']({'blurredAnnotation':_0x27ab58,'activatedAnnotation':this['activeAnnotation']});}['attach'](_0x53878f){this['annotations']=_0x53878f;const _0x2e8b36=this['context']['plugins']['get'](z);if(_0x2e8b36['_annotations']=_0x53878f,this['isAttached'])throw new _0x2e3068('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2e8b36,'set:container',()=>{this['detach'](),this['listenTo'](_0x2e8b36,'change:container',_0x1d6a17=>{_0x1d6a17['off'](),this['attach'](_0x53878f);});}),_0x2e8b36['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3fb4c1=_0x22715c=>{_0x22715c['updateTargetRect'](),_0x2e8b36['addAnnotation'](_0x22715c);};for(const _0x524553 of _0x53878f)_0x3fb4c1(_0x524553);this['listenTo'](_0x53878f,'add',(_0x3ca45c,_0x328e5a)=>{_0x3fb4c1(_0x328e5a);}),this['listenTo'](_0x53878f,'remove',(_0x43b58f,_0x2c784d,_0x2505db)=>{_0x2e8b36['rearrange']({'removedAnnotation':_0x2c784d,'previousAnnotation':_0x53878f['get'](_0x2505db-0x1),'nextAnnotation':_0x53878f['get'](_0x2505db+0x1)}),_0x2c784d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x53878f,'focus',(_0x22b01c,_0x36015d)=>{this['setActiveAnnotation'](_0x36015d);}),this['listenTo'](_0x53878f,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3fc1cd=this['context']instanceof _0x319680?this['context']['editors']:new _0x375c29([this['context']]);for(const _0x55e01a of _0x3fc1cd)this['_integrateWithEditorAnnotations'](_0x55e01a);this['listenTo'](_0x3fc1cd,'add',(_0x51a27b,_0x465a87)=>{this['listenTo'](_0x465a87,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x465a87);});}),this['listenTo'](_0x3fc1cd,'remove',(_0x73ac2e,_0x26e2aa)=>{_0x26e2aa['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x26e2aa['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2e3068('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x886e94=this['context']['plugins']['get'](z);_0x886e94['_detachFromContainer'](this['annotations']),this['stopListening'](_0x886e94),this['stopListening'](this['annotations']),this['context']instanceof _0x319680&&this['stopListening'](this['context']['editors']);for(const _0x7926c5 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x7926c5);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x485ad4){if(!_0x485ad4['plugins']['has']('EditorAnnotations'))return;const _0x2fa146=_0x485ad4['plugins']['get']('EditorAnnotations'),_0xc86d5=()=>{const _0x4e1439=_0x2fa146['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4e1439[0x0]||null);};this['listenTo'](_0x2fa146,'refresh',_0xc86d5),this['listenTo'](_0x2fa146,'blur',(_0x2c260b,{isAnnotationTracked:_0x1cb4b8})=>{this['activeAnnotation']&&_0x1cb4b8(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2fa146,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x2a7dd3=>{_0x2fa146['hasDomSelection']()&&(_0xc86d5(),_0x2a7dd3['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2fa146);}['_destroyEditorAnnotationsIntegration'](_0x1a05c5){this['stopListening'](_0x1a05c5),this['_editorAnnotations']['remove'](_0x1a05c5);}}class D extends _0xbee2d6{['counterView'];constructor(_0x51e7c1){super(_0x51e7c1);const _0x322cd3=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5b5c9d,_0x13f4ec)=>_0x5b5c9d?'...':_0x13f4ec['toString']()),this['set']('annotationType',''),this['icon']=xt,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x322cd3['to']('annotationType',_0x4cc2ff=>'ck-annotation-counter__badge--'+_0x4cc2ff),_0x322cd3['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x322cd3['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x323088{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51aa85){super(_0x51aa85),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x1a4f4c),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x375c29(),this['_refreshPositioningDebounced']=_0x257b89(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x532a7d(this['context']['locale']),this['balloonPanelView']=new _0x3e384d(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5d2151){this['annotations']=_0x5d2151;const _0x5daf0c=this['context']['plugins']['get'](z),_0xa30151=this['balloonPanelView'];if(_0x5daf0c['_annotations']=_0x5d2151,this['isAttached'])throw new _0x2e3068('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5daf0c,'set:container',()=>{this['detach'](),this['listenTo'](_0x5daf0c,'change:container',_0x11247d=>{_0x11247d['off'](),this['attach'](_0x5d2151);});}),_0x5daf0c['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x20393f=_0x40c0e7=>{const _0x2a5c3e=new D(this['context']['locale']);_0x5daf0c['addAnnotation'](_0x40c0e7,_0x2a5c3e),this['_annotationToNarrowView']['set'](_0x40c0e7,_0x2a5c3e),_0x2a5c3e['bind']('isDirty','annotationType','number')['to'](_0x40c0e7['view'],'isDirty','type','length'),_0x2a5c3e['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xa30151['content']['first']!==_0x40c0e7['view']?(this['_showBalloon'](_0x40c0e7),_0x40c0e7['view']['element']['focus'](),this['setActiveAnnotation'](_0x40c0e7)):this['setActiveAnnotation'](null);});};for(const _0x64054a of _0x5d2151)_0x20393f(_0x64054a);this['listenTo'](_0x5d2151,'add',(_0xf84110,_0x4074b7)=>{_0x20393f(_0x4074b7);}),this['listenTo'](_0x5d2151,'remove',(_0x59846b,_0x252a74,_0x4d4ef6)=>{this['_annotationToNarrowView']['get'](_0x252a74)['destroy'](),this['_annotationToNarrowView']['delete'](_0x252a74),_0x5daf0c['rearrange']({'removedAnnotation':_0x252a74,'previousAnnotation':_0x5d2151['get'](_0x4d4ef6-0x1),'nextAnnotation':_0x5d2151['get'](_0x4d4ef6+0x1)}),_0x252a74===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5d2151,'focus',(_0xe0278,_0x21bf58)=>{this['setActiveAnnotation'](_0x21bf58);}),this['listenTo'](_0x5d2151,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x57b67c,_0x2329eb)=>{_0x2329eb['keyCode']===_0x2e683c['esc']&&_0xa30151['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xa30151['content']['first']),this['_hideBalloon'](),_0x2329eb['stopPropagation'](),_0x2329eb['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x114bde,_0x5bff16)=>{const _0x5c07f8=_0x5bff16['target'];_0xa30151['isVisible']&&_0xa30151['element']['contains'](_0x5c07f8)||_0x5daf0c['view']['element']['contains'](_0x5c07f8)||_0x114bde['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x31b271=>_0x31b271['contains'](_0x5c07f8))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x47a9cd=this['context']instanceof _0x319680?this['context']['editors']:new _0x375c29([this['context']]);for(const _0x740560 of _0x47a9cd)this['_integrateWithEditorAnnotations'](_0x740560);this['listenTo'](_0x47a9cd,'add',(_0x4d73cf,_0x518fba)=>{this['listenTo'](_0x518fba,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x518fba);});}),this['listenTo'](_0x47a9cd,'remove',(_0x16e4fa,_0x5396ba)=>{_0x5396ba['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5396ba['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x322183){if(_0x322183===this['activeAnnotation'])return;const _0x943b63=this['context']['plugins']['get'](z);if(_0x943b63['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x322183,'disableAnimationOnActivatedAnnotation':!0x0}),_0x322183)_0x943b63['getSidebarItemView'](_0x322183)?this['_showBalloon'](_0x322183):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x322183;}['detach'](){if(!this['isAttached'])throw new _0x2e3068('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x302595=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x588bf2=>_0x588bf2['destroy']()),this['_annotationToNarrowView']['clear'](),_0x302595['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x319680&&this['stopListening'](this['context']['editors']);for(const _0xc3f9c2 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xc3f9c2);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'](_0x59db1b){if(!_0x59db1b['plugins']['has']('EditorAnnotations'))return;const _0x11863e=_0x59db1b['plugins']['get']('EditorAnnotations'),_0x413740=this['context']['plugins']['get'](z),_0x25aa13=this['annotations'],_0x945e6d=this['balloonPanelView'],_0x146ca7=()=>{const _0x2104d9=_0x11863e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2104d9),this['setActiveAnnotation'](_0x2104d9[0x0]||null);};this['listenTo'](_0x11863e,'refresh',_0x146ca7),this['listenTo'](_0x11863e,'blur',(_0x2b44b8,{isAnnotationTracked:_0x47f7ea})=>{this['activeAnnotation']&&_0x47f7ea(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x11863e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x25aa13,'blur',_0x45d9e2=>{_0x11863e['hasDomSelection']()&&_0x45d9e2['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x235e9f,_0xa969af)=>{const _0xde6e2d=_0xa969af['target'];_0x945e6d['isVisible']&&_0x945e6d['element']['contains'](_0xde6e2d)||_0x413740['view']['element']['contains'](_0xde6e2d)||this['activeAnnotation']&&_0x11863e['hasDomSelection']()&&(_0x146ca7(),_0x235e9f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x11863e);}['_destroyEditorAnnotationsIntegration'](_0x491ed3){_0x491ed3&&(this['stopListening'](_0x491ed3),this['_editorAnnotations']['remove'](_0x491ed3));}['_setSelectedAnnotations'](_0x53c4e3){for(const _0x17ca59 of this['_selectedAnnotations'])_0x53c4e3['includes'](_0x17ca59)||this['_manuallyClosedAnnotationViews']['delete'](_0x17ca59['view']);this['_selectedAnnotations']=_0x53c4e3;}['_refreshPositioning'](){const _0xdb48db=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0xdb48db['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1ba136){if(this['_manuallyClosedAnnotationViews']['has'](_0x1ba136['view']))return;const _0x37d43a=this['balloonPanelView']['content']['first'];_0x37d43a!==_0x1ba136['view']?(_0x37d43a&&this['_detachListeners'](_0x37d43a),this['_attachListeners'](_0x1ba136['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1ba136['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x2073e6=this['balloonPanelView']['content']['first'],_0x11430d=_0x2073e6&&this['annotations']['getByView'](_0x2073e6);if(!_0x11430d||!this['_annotationToNarrowView']['has'](_0x11430d))return;const _0xa7458e=this['_annotationToNarrowView']['get'](_0x11430d)['element'],_0x3808bc=(function(){const _0x1221e6=_0x3e384d['defaultPositions'];return[_0x1221e6['southArrowNorthEast'],_0x1221e6['northArrowSouthEast'],_0x1221e6['southArrowNorth'],_0x1221e6['northArrowSouth'],_0x1221e6['southArrowNorthWest'],_0x1221e6['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xa7458e,'positions':_0x3808bc});}['_hideBalloon'](){const _0x170054=this['balloonPanelView'],_0x23418d=_0x170054['content']['first'];_0x23418d&&(this['_detachListeners'](_0x23418d),_0x170054['unpin'](),_0x170054['content']['clear']());}['_attachListeners'](_0x9ce0fc){this['listenTo'](_0x9ce0fc,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x9ce0fc,'Esc',(_0x6a07d9,_0x9cdfcf)=>{this['_manuallyClosedAnnotationViews']['add'](_0x9ce0fc),this['_hideBalloon'](),_0x9cdfcf();});}['_detachListeners'](_0x3daa9c){this['stopListening'](_0x3daa9c);}}class c extends _0x37624c{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x5538ca,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c445c){super(_0x2c445c),_0x2c445c['editing']['view']['addObserver'](_0x29326f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2c445c['plugins']['get'](_0x5538ca),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3baf0f=this['editor']['plugins']['get'](M);_0x3baf0f['context']===this['editor']&&(_0x3baf0f['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x571074,_0xe56dc6)=>{const _0x4e8dde=this['_balloon'];if(this['isAttached']&&_0x4e8dde['visibleView']){const _0x35cc02=this['annotations']['getByView'](_0x4e8dde['visibleView']);_0x35cc02&&this['_closeAnnotation'](_0x35cc02),_0xe56dc6();}}));}['afterInit'](){const _0x4abec2=this['editor']['plugins']['get'](M);_0x4abec2['context']===this['editor']&&(_0x4abec2['hasActive']()||_0x4abec2['switchTo']('inline'));}['setActiveAnnotation'](_0x45bf2b){_0x45bf2b!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x45bf2b&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x45bf2b)&&this['_addAnnotationToBalloon'](_0x45bf2b,!0x0),_0x45bf2b['isActive']=!0x0),_0x45bf2b||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x45bf2b);}['attach'](_0x2d1683){this['annotations']=_0x2d1683;const _0xb1659b=this['editor']['plugins']['get'](M),_0x46c312=this['_balloon'];if(this['isAttached'])throw new _0x2e3068('inlineannotations-attach-already-attached',this);if(_0xb1659b['context']!==this['editor'])throw new _0x2e3068('inlineannotations-not-allowed-with-context',this);const _0x37e931=this['editor']['plugins']['get'](P);this['listenTo'](_0x37e931,'refresh',()=>{const _0x593edf=_0x37e931['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4944c3,_0x6f9862;!this['_forceRefresh']&&(_0x4944c3=_0x593edf,_0x6f9862=this['_selectedAnnotations'],_0x4944c3['length']===_0x6f9862['length']&&_0x4944c3['every'](_0x5418d9=>_0x6f9862['includes'](_0x5418d9)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x593edf),this['setActiveAnnotation'](_0x593edf[0x0]||null));}),this['listenTo'](_0x37e931,'blur',(_0x3b90d2,{isAnnotationTracked:_0x5963b6})=>{this['activeAnnotation']&&_0x5963b6(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x591404,_0x5d0661,_0x43d0b4)=>{_0x43d0b4||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2d1683,'remove',(_0x39547c,_0x2698fa)=>{this['_removeAnnotationFromBalloon'](_0x2698fa),_0x2698fa===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x46c312,'change:visibleView',(_0x33e9a0,_0x7453df,_0x273c2c,_0x506d41)=>{_0x506d41&&this['stopListening'](_0x506d41);const _0x55073b=_0x2d1683['getByView'](_0x273c2c);_0x273c2c&&_0x55073b&&(this['listenTo'](_0x273c2c,'change:height',()=>{_0x46c312['updatePosition']();}),this['listenTo'](_0x273c2c,'Esc',()=>{this['_closeAnnotation'](_0x55073b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x55073b&&this['setActiveAnnotation'](_0x55073b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x46c312['visibleView']&&(_0x2d1683['getByView'](_0x46c312['visibleView'])&&_0x46c312['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 _0x2e3068('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x51958f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x51958f);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0xde3add){for(const _0xce63ca of this['_selectedAnnotations'])_0xde3add['includes'](_0xce63ca)||this['_manuallyClosed']['delete'](_0xce63ca);for(const _0xc8a5d of this['annotations'])_0xde3add['includes'](_0xc8a5d)||this['_removeAnnotationFromBalloon'](_0xc8a5d);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xa221c4 of _0xde3add)this['_addAnnotationToBalloon'](_0xa221c4);}this['_selectedAnnotations']=_0xde3add;}['_addAnnotationToBalloon'](_0x14e520,_0x4afd4d=!0x1){this['_manuallyClosed']['has'](_0x14e520)||(this['_addedAnnotations']['has'](_0x14e520)||this['_balloon']['hasView'](_0x14e520['view'])||(this['_addedAnnotations']['add'](_0x14e520),this['_balloon']['add']({'stackId':_0x14e520['view']['id'],'view':_0x14e520['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x14e520)}})),_0x4afd4d&&this['_balloon']['showStack'](_0x14e520['view']['id']));}['_getBalloonTargetForAnnotation'](_0x12d556){const _0x54d3a4=_0x12d556['target'],_0x3f43fb=this['editor']['editing']['view'],_0x2fd0bf=_0x3f43fb['document']['selection']['getFirstRange'](),_0x3dd177=_0x3f43fb['domConverter']['viewRangeToDom'](_0x2fd0bf);if(_0x3dd177['collapse'](!0x0),_0x54d3a4){if(_0x54d3a4 instanceof _0x462831)return _0x54d3a4;let _0x36d87b=[];for(const _0x3f408c of _0x54d3a4)_0x36d87b['push'](...(_0x6b5a53=_0x3f408c['getClientRects'](),Array['from'](_0x6b5a53)['map'](DOMRect['fromRect'])));_0x36d87b=function(_0x43f0b5){const _0x3ae8b7=[];let _0x3a8ece=_0x43f0b5[0x0];for(let _0x1e5b8b=0x1;_0x1e5b8b<_0x43f0b5['length'];_0x1e5b8b++)b(_0x3a8ece,_0x43f0b5[_0x1e5b8b])?_0x3a8ece['width']+=_0x43f0b5[_0x1e5b8b]['width']:(_0x3ae8b7['push'](_0x3a8ece),_0x3a8ece=_0x43f0b5[_0x1e5b8b]);return _0x3ae8b7['push'](_0x3a8ece),_0x3ae8b7;}(_0x36d87b);const _0x9a598f=_0x3dd177['getBoundingClientRect']();return _0x36d87b['find'](_0x87351b=>_0x87351b['top']<=_0x9a598f['top']&&_0x87351b['bottom']>=_0x9a598f['bottom']&&_0x87351b['left']<=_0x9a598f['left']&&_0x87351b['right']>=_0x9a598f['right'])||_0x36d87b[0x0];}var _0x6b5a53;return _0x12d556['targetRect']||_0x3dd177;}['_removeAnnotationFromBalloon'](_0x67ee2d){this['_addedAnnotations']['has'](_0x67ee2d)&&this['_balloon']['hasView'](_0x67ee2d['view'])&&(this['_addedAnnotations']['delete'](_0x67ee2d),this['_balloon']['remove'](_0x67ee2d['view']));}['_closeAnnotation'](_0x19ad4d){this['_manuallyClosed']['add'](_0x19ad4d),this['_removeAnnotationFromBalloon'](_0x19ad4d);}}function b(_0x26a657,_0x35a74a){return _0x26a657['top']===_0x35a74a['top']&&_0x26a657['bottom']===_0x35a74a['bottom']&&_0x26a657['right']===_0x35a74a['left'];}var Z='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M14\x203.5A3.5\x203.5\x200\x200\x201\x2017.5\x207v6l-.005.192a3.501\x203.501\x200\x200\x201-2.927\x203.262l-.062.008v1.813a1.5\x201.5\x200\x200\x201-2.193\x201.33l-.37-.193-.38-.212a13.452\x2013.452\x200\x200\x201-3.272-2.63l-.062-.07-4.729-.046a3.5\x203.5\x200\x200\x201-3.5-3.5v-6a3.5\x203.5\x200\x200\x201\x203.5-3.5L14\x203.5ZM3.5\x204.954a2\x202\x200\x200\x200-2\x202v6a2\x202\x200\x200\x200\x202\x202L8.924\x2015a11.917\x2011.917\x200\x200\x200\x203.71\x203.081l.372.194v-3.268L12.962\x2015H14a2\x202\x200\x200\x200\x202-2V7a2\x202\x200\x200\x200-2-2L3.5\x204.954Z\x22/><path\x20d=\x22M16.5.5h-10a3.5\x203.5\x200\x200\x200-3.162\x202h1.84A2\x202\x200\x200\x201\x206.5\x202h10a2\x202\x200\x200\x201\x202\x202v8.873a3.502\x203.502\x200\x200\x200\x201.495-2.681L20\x2010V4A3.5\x203.5\x200\x200\x200\x2016.5.5Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M12.013\x207.453a.75.75\x200\x200\x201\x20.034\x201.06l-3.75\x204a.75.75\x200\x200\x201-1.045.048l-2.25-2a.75.75\x200\x200\x201\x20.996-1.122l1.704\x201.515\x203.25-3.467a.75.75\x200\x200\x201\x201.061-.034Z\x22/></svg>\x0a';class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x2ca4a7,_0x3ffe81){super(_0x2ca4a7),this['set']('isEmpty',!_0x3ffe81['length']),this['focusTracker']=new _0x90f2b9(),this['_annotationViews']=_0x3ffe81,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new Ft({'focusables':_0x3ffe81,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3ffe81,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3ffe81,'remove',(_0xfc232b,_0x28f5af)=>{_0x28f5af['isActive']&&this['focus'](),_0x3ffe81['length']||(this['isEmpty']=!0x0);});const _0x44f830=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':S(_0x2ca4a7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3ffe81},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x44f830['if']('isEmpty','ck-hidden',_0x16ae56=>!_0x16ae56)]},'children':[{'text':S(_0x2ca4a7,'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 _0x2f87c4 of this['_annotationViews'])this['focusTracker']['add'](_0x2f87c4['element']);this['_annotationViews']['on']('change',(_0x4a83e3,{added:_0x5afbae,removed:_0x3e3310})=>{for(const _0x1c5345 of _0x5afbae)this['focusTracker']['add'](_0x1c5345['element']);for(const _0x496813 of _0x3e3310)this['focusTracker']['remove'](_0x496813['element']);});}}class f extends _0x323088{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,N];}constructor(_0x20faa5){super(_0x20faa5),this['archivedThreads']=new _0x375c29();}['init'](){const _0x7f04bf=this['context'],_0x39e071=_0x7f04bf['plugins']['get'](o),_0x336539=_0x7f04bf['plugins']['get'](N);this['listenTo'](_0x39e071,'addCommentThread',(_0x278655,{threadId:_0x5d1e12})=>{const _0x1c0140=_0x39e071['getCommentThread'](_0x5d1e12);_0x1c0140['archivedAt']&&this['archivedThreads']['add'](_0x1c0140,this['_calculatePosition'](_0x1c0140['archivedAt'])),this['listenTo'](_0x1c0140,'change:archivedAt',(_0x1135d0,_0x1b1d8b,_0x494eab)=>{_0x494eab?this['archivedThreads']['has'](_0x1c0140)||this['archivedThreads']['add'](_0x1c0140,this['_calculatePosition'](_0x1c0140['archivedAt'])):this['archivedThreads']['has'](_0x1c0140)&&this['archivedThreads']['remove'](_0x1c0140);});}),this['listenTo'](_0x39e071,'removeCommentThread',(_0x1f19c0,{threadId:_0x2c59e9})=>{const _0x4770db=_0x39e071['getCommentThread'](_0x2c59e9);this['stopListening'](_0x4770db),this['archivedThreads']['has'](_0x4770db)&&this['archivedThreads']['remove'](_0x4770db);},{'priority':'highest'}),this['listenTo'](_0x336539['collection'],'focus',(_0x57b640,_0x35a959)=>{_0x35a959['isVisible']||(_0x35a959['isActive']=!0x0,_0x336539['activate'](_0x35a959));});}['_calculatePosition'](_0x4c394d){const _0x129d59=[...this['archivedThreads']]['findIndex'](_0x406fa1=>_0x406fa1['archivedAt']<_0x4c394d);return _0x129d59>-0x1?_0x129d59:this['archivedThreads']['length'];}}class a extends _0x37624c{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x2709cc];}constructor(_0x415294){super(_0x415294),this['annotationViews']=new _0x150f1d(),this['_pendingThreads']=[];}['init'](){const _0x129100=this['editor'],_0x1f51b6=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x129100['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0xbee2d6,!0x0)),_0x129100['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xa8ee88=this['_createCommentsArchiveButton'](_0x107f58);return _0xa8ee88['set']({'role':'menuitemcheckbox'}),_0xa8ee88;});const _0x370cd2=_0x129100['plugins']['get'](f),_0x53469c=_0x129100['plugins']['get']('Annotations'),_0xd0515f=_0x129100['plugins']['get']('CommentsRepository');this['listenTo'](_0x370cd2['archivedThreads'],'add',(_0x267594,_0x3565d3)=>{const _0x113888=_0x129100['config']['get']('collaboration.channelId');if(!_0x113888||_0x3565d3['channelId']===_0x113888){const _0x2a7b18=_0xd0515f['_threadToController']['get'](_0x3565d3);if(!_0x2a7b18)return void this['_pendingThreads']['push'](_0x3565d3);const _0x3b2e21=this['_calculatePosition'](_0x3565d3['archivedAt']),_0x1a69f9=_0x53469c['getByInnerView'](_0x2a7b18['view']);_0x1a69f9['isVisible']&&_0x53469c['_visibleAnnotations']['remove'](_0x1a69f9),this['annotationViews']['add'](_0x1a69f9['view'],_0x3b2e21);}}),this['listenTo'](_0x53469c['collection'],'add',(_0x1165cf,_0x3e0185)=>{const _0x2c914e=this['_pendingThreads']['find'](_0x35d0bf=>{const _0x353e35=_0xd0515f['_threadToController']['get'](_0x35d0bf);return _0x353e35&&_0x3e0185['innerView']===_0x353e35['view'];});if(_0x2c914e){const _0x10670d=this['_calculatePosition'](_0x2c914e['archivedAt']);this['annotationViews']['add'](_0x3e0185['view'],_0x10670d),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2c914e),0x1);}}),this['listenTo'](_0x370cd2['archivedThreads'],'remove',(_0x2d3163,_0x4e9328)=>{const _0x3c3fbf=_0x129100['config']['get']('collaboration.channelId');if(!_0x3c3fbf||_0x4e9328['channelId']===_0x3c3fbf){const _0x325715=_0xd0515f['_threadToController']['get'](_0x4e9328),_0x37f081=_0x53469c['getByInnerView'](_0x325715['view']);this['annotationViews']['remove'](_0x37f081['view']),this['stopListening'](_0x37f081['focusableElements']);}}),this['listenTo'](_0x53469c['collection'],'add',(_0x99d004,_0x3fe061)=>{this['listenTo'](_0x3fe061,'escape',_0x1f51b6);}),this['listenTo'](_0x53469c['collection'],'remove',(_0x162311,_0x37788b)=>{this['stopListening'](_0x37788b,'escape',_0x1f51b6);});}['_calculatePosition'](_0x13a43a){const _0x6d0ff8=this['editor']['config']['get']('collaboration.channelId'),_0x244e9c=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x36c203=>_0x36c203['channelId']===_0x6d0ff8)['findIndex'](_0x32c3cd=>_0x32c3cd['archivedAt']<_0x13a43a);return _0x244e9c<0x0||_0x244e9c>this['annotationViews']['length']?this['annotationViews']['length']:_0x244e9c-0x1;}['_toggleDialog'](){const _0x1aa4fd=this['editor'],_0x818d55=_0x1aa4fd['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x1aa4fd['locale'],this['annotationViews'])),'commentsArchive'===_0x818d55['id']?_0x818d55['hide']():_0x818d55['show']({'id':'commentsArchive','title':S(_0x1aa4fd['locale'],'COMMENTS_ARCHIVE'),'icon':Z,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x18760c['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x44eeda,_0x29a80e=!0x1){const _0x34f117=this['editor']['locale'],_0x53052f=this['editor']['plugins']['get']('Dialog'),_0x43d511=new _0x44eeda(_0x34f117);return _0x43d511['bind']('isEnabled')['to'](this,'isEnabled'),_0x43d511['bind']('isOn')['to'](_0x53052f,'id',_0xa563d7=>'commentsArchive'===_0xa563d7),_0x43d511['set']({'label':S(_0x34f117,'COMMENTS_ARCHIVE'),'icon':Z,'isToggleable':!0x0}),_0x29a80e&&(_0x43d511['tooltip']=!0x0),this['listenTo'](_0x43d511,'execute',()=>this['_toggleDialog']()),_0x43d511;}['_hideDialogOnAnnotationEscape']=_0xa888df=>{const _0x2decc8=_0xa888df['source'];if(!this['annotationViews']['has'](_0x2decc8['view']))return;const _0x47c9db=this['editor']['plugins']['get']('Dialog');_0x47c9db['isOpen']&&'commentsArchive'===_0x47c9db['id']&&(_0x47c9db['hide'](),_0xa888df['stop']());};}class p extends _0x37624c{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,x as AnnotationCollection,T as AnnotationView,N as Annotations,M as AnnotationsUIs,ss as BaseCommentThreadView,os as BaseCommentView,re as Comment,oe as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,Ct as CommentThreadView,vt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x5e2b67,icons as _0x15e3ad,ContextPlugin as _0x4ffcf5,PendingActions as ht,Command as _0x584778,Plugin as _0x5c5dce,Context as _0x2a5cc0}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x27caf5,uid as _0x332833,KeystrokeHandler as jt,FocusTracker as _0x3642d0,diff as _0x1c513a,Collection as _0x41148a,Rect as _0x59e592,CKEditorError as _0x3595b5,first as _0x3c4abc,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as Dt,DomEmitterMixin as _0x483725,keyCodes as _0x15a9a0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x517b85,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x27ab5e,trimHtml as _0x47c1ef,LateFocusDropdownButtonView as _0x3d2778,Users as ct,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x2bfe6e}from'ckeditor5-collaboration/dist/index.js';import{throttle as _0x336d90,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x526b1b}from'lodash-es';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as Ft,ButtonView as _0x7c32fb,ViewCollection as _0x12b224,createDropdown as _0x5093dc,ListView as _0xb9f7e9,focusChildOnDropdownOpen as _0x43592b,ListItemView as _0xd934b8,MenuBarMenuListItemButtonView as _0x1f821d,BodyCollection as _0x457aaa,BalloonPanelView as _0x33ed69,ContextualBalloon as _0x1a6c40,Dialog as _0x6ad97f,DialogViewPosition as tt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as qt,enablePlaceholder as St,MouseObserver as _0x58dc07}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}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 _0x20217c}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x27caf5(){['model'];['view'];constructor(_0x305e65,_0x193d3c){super(),this['model']=_0x305e65,this['model']['_isAttached']=!0x0,this['view']=_0x193d3c,this['listenTo'](_0x193d3c,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x193d3c,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x193d3c,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x193d3c,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x193d3c,'addComment',(_0x24fc85,_0x333aa0)=>this['addComment'](_0x333aa0)),this['listenTo'](_0x193d3c,'updateComment',(_0x265a46,_0x888cf,_0x1e6652)=>this['updateComment'](_0x888cf,_0x1e6652)),this['listenTo'](_0x193d3c,'removeComment',(_0x4defec,_0x39fd32)=>this['removeComment'](_0x39fd32));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x402753){this['model']['addComment']({'content':_0x402753,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x200b5f,_0x26d09d){this['model']['getComment'](_0x200b5f)['update']({'content':_0x26d09d});}['removeComment'](_0x571d9a){this['model']['getComment'](_0x571d9a)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function S(_0x2ff7a4,_0x3bb3b9,_0x2aa5d5){const t=_0x2ff7a4['t'];switch(_0x3bb3b9){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'},_0x2aa5d5);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'},_0x2aa5d5);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'},_0x2aa5d5);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'},_0x2aa5d5);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x2aa5d5);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'},_0x2aa5d5);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'},_0x2aa5d5);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'},_0x2aa5d5);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x58d8d7,_0x47cb67){super(_0x58d8d7);const _0x168d1d=_0x332833();this['main']=this['createCollection'](),this['editable']=new $t(_0x58d8d7,_0x47cb67,void 0x0,{'label':()=>S(_0x58d8d7,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x58d8d7['uiLanguageDirection'],'lang':_0x58d8d7['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x168d1d},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Ut{['view'];constructor(_0x1fa1cf){super(_0x1fa1cf),this['view']=new Vt(_0x1fa1cf['locale'],_0x1fa1cf['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x23341a=this['editor']['editing']['view'],_0x8e16f8=this['view']['editable'],_0x50e361=_0x23341a['document']['getRoot']();_0x8e16f8['name']=_0x50e361['rootName'],this['view']['render']();const _0x5294d9=_0x8e16f8['element'];this['setEditableElement'](_0x8e16f8['name'],_0x5294d9),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x23341a['attachDomRoot'](_0x5294d9),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x27caf5(_0x5e2b67){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x39dc54={}){function _0x1716de(_0x2708d1){return _0x2708d1['map'](_0x370c57=>String['fromCharCode'](_0x370c57))['join']('');}(_0x39dc54=Object['assign']({},_0x39dc54))['plugins']||(_0x39dc54['plugins']=Rt['defaultPlugins']),super(_0x39dc54),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[_0x1716de([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1716de([0x76,0x69,0x65,0x77])][_0x1716de([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1716de([0x61,0x75,0x74,0x6f]),this[_0x1716de([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1716de([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1716de([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1716de([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1716de([0x6f,0x6b])});}['create'](){const _0x423243=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x423243))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3e50b0=>{const _0x5726d8=this['model']['document']['getRoot'](),_0x58198c=_0x5726d8&&_0x5726d8['getChild'](_0x5726d8['childCount']-0x1);_0x3e50b0['setSelection'](_0x58198c,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xa01bdd=this['editing']['view'],_0x3e5d68=_0xa01bdd['document']['getRoot'](),_0x1cb7e9=_0x3e5d68['getChild'](0x0);_0x3e5d68['childCount']>0x1||!_0x1cb7e9||'p'!=_0x1cb7e9['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0xa01bdd,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1cb7e9['placeholder']=this['placeholder']),St({'view':_0xa01bdd,'element':_0x1cb7e9,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1cb7e9);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0xedc0d5,_0x3c60fd={}){super(_0xedc0d5),this['editor']=null,this['_editorConfig']=_0x3c60fd,this['set']('value',_0x3c60fd['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',S(_0xedc0d5,'Reply...')),this['set']('submitLabel',S(_0xedc0d5,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x3642d0(),this['focusCycler']=new Ft({'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',(_0x1226fc,_0x5f05e3)=>{this['cancelButtonView']['fire']('execute'),_0x5f05e3();}),this['keystrokes']['set']('Ctrl+Enter',(_0x51ed8d,_0x3bd8a7)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3bd8a7());}),this['on']('submit',(_0x3a4cf6,_0x271097)=>{_0x271097['length']>0xfde8?(alert(S(_0xedc0d5,'TOO_LONG_COMMENT_ALERT',[_0x271097['length'],0xfde8])),_0x3a4cf6['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4c2be6=this['editor'];this['element']['insertBefore'](_0x4c2be6['ui']['element'],this['element']['firstChild']),_0x4c2be6['model']['document']['on']('change',()=>this['value']=_0x4c2be6['getData']()),_0x4c2be6['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4c2be6['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3cae6f){-0x1===_0x3cae6f?(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:_0x3c082b}=this,_0x575a53=new _0x7c32fb(_0x3c082b);return _0x575a53['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x575a53['withText']=!0x0,_0x575a53['bind']('label')['to'](this,'submitLabel'),_0x575a53['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x575a53['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5cf814,_0x304eaa)=>!_0x304eaa&&!!_0x5cf814['trim']()),_0x575a53;}['_createCancelButton'](){const {locale:_0x1caf3a}=this,_0x3c3c40=new _0x7c32fb(_0x1caf3a);return _0x3c3c40['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3c3c40['label']=S(_0x1caf3a,'Cancel'),_0x3c3c40['withText']=!0x0,_0x3c3c40['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3c3c40;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x265685=>{this['focusTracker']['add'](_0x265685['element']);}),this['focusables']['on']('change',(_0x476dd6,_0x4fdda7)=>{for(const _0x11c27e of Array['from'](_0x4fdda7['added'])['reverse']())this['focusTracker']['add'](_0x11c27e['element']);});}}class ie extends kt{constructor(_0x58750f,_0x85bba2,_0x3b4e84){super(_0x58750f),this['commentInputView']=new hs(_0x58750f,_0x3b4e84),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1888f8,_0x2e8cb9)=>_0x1888f8||!!_0x2e8cb9),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 _0x517b85(_0x58750f,_0x85bba2),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'](_0x1591c4){this['commentInputView']['focus'](_0x1591c4);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x4e7bf3,_0x47572e)=>{const {submitButtonView:_0x15bb04,cancelButtonView:_0x2035ba,editor:_0x125dc0}=this['commentInputView'];[_0x15bb04['element'],_0x2035ba['element'],_0x125dc0?_0x125dc0['editing']['view']['getDomRoot']():null]['filter'](_0x44b13e=>_0x44b13e)['some'](_0x5c11f0=>_0x5c11f0['contains'](_0x47572e['target']))||(this['focus'](),_0x47572e['preventDefault']());});}}class cs extends kt{constructor(_0x4c603a){super(_0x4c603a);const _0x989a2a=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x989a2a['to']('count',_0x55890b=>S(_0x4c603a,'NUMBER_OF_COMMENTS',_0x55890b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2a5ad3,_0x5068c2,_0xed9cc){super(_0x2a5ad3);const _0x3a01d5=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5068c2['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5068c2,this['_config']=_0xed9cc,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x3642d0(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x535555=>this['commentViews']['map'](_0x2f9f86=>_0x2f9f86['element'])['includes'](_0x535555['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x2a5ad3),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1367a0=>_0x1367a0-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4d43db of _0x5068c2['comments'])this['_handleNewCommentModel'](_0x4d43db);this['_handleInfoComment'](),this['listenTo'](_0x5068c2['comments'],'add',(_0x37232d,_0x3e075c)=>{const _0x466d8e=this['_calculatePosition'](_0x3e075c);this['length']++,this['_handleNewCommentModel'](_0x3e075c,_0x466d8e),this['refreshVisibleViews']();}),this['listenTo'](_0x5068c2['comments'],'remove',(_0x153d0d,_0x4e6c59)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4e6c59),this['refreshVisibleViews']();}),this['listenTo'](_0x5068c2,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5068c2,'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',_0x3a01d5['if']('length','ck-hidden',_0x27af68=>!_0x27af68)],'aria-label':S(_0x2a5ad3,'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'](_0x34377c){-0x1===_0x34377c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x9e1e90 of this['commentViews'])_0x9e1e90['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x599758,_0x1052c1){const _0x3ed857=new this['_config']['CommentView'](this['locale'],_0x599758,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3ed857['viewUid']=_0x599758['id'],_0x3ed857['delegate']('removeComment')['to'](this),_0x3ed857['delegate']('updateComment')['to'](this),_0x3ed857['delegate']('resolveCommentThread')['to'](this),_0x3ed857['delegate']('editorReady')['to'](this),_0x3ed857['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3ed857,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3ed857,_0x1052c1);}['_calculatePosition'](_0x4569c2){const _0x300ec1=this['_model']['_findOptimalIndex'](_0x4569c2);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x4569c2['authoredAt']?_0x300ec1-0x1:_0x300ec1:_0x300ec1-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x415358={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':S(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x415358,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x415358));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x44a147){const _0x405cd8=this['commentViews']['remove'](_0x44a147['id']);this['stopListening'](_0x405cd8),_0x405cd8['isEditMode']&&this['_updateHasDirtyComment'](),_0x405cd8['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5262ce=>_0x5262ce['isEditMode']);}['_rearrangeCollapse'](){const _0x18ca21=function(_0x3e8ad7){const _0xe03100=new _0x41148a();for(const _0x3e7020 of _0x3e8ad7)_0xe03100['add'](_0x3e7020);return _0xe03100;}(this['commentViews']),_0x50af18=this['_collapsedCommentsView']['count'];for(let _0x841558=0x1;_0x841558<=_0x50af18;_0x841558++)_0x18ca21['remove'](0x1);for(const _0x43d5e4 of _0x18ca21)_0x43d5e4['collapse']();_0x50af18>0x0&&_0x18ca21['add'](this['_collapsedCommentsView'],0x1),ns(_0x1c513a(Array['from'](this['visibleViews']),Array['from'](_0x18ca21)),this['visibleViews'],_0x18ca21);}['_rearrangeExpand'](){ns(_0x1c513a(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x52db5d of this['visibleViews'])_0x52db5d['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2e519e=>{this['focusTracker']['add'](_0x2e519e['element']),this['keystrokes']['listenTo'](_0x2e519e['element']);}),this['commentViews']['on']('change',(_0x30777d,_0x378ecf)=>{for(const _0x5cc18a of _0x378ecf['removed'])this['focusTracker']['remove'](_0x5cc18a['element']),this['keystrokes']['stopListening'](_0x5cc18a['element']);for(const _0x2ce89d of Array['from'](_0x378ecf['added'])['reverse']())this['focusTracker']['add'](_0x2ce89d['element']),this['keystrokes']['listenTo'](_0x2ce89d['element']);});}}function ns(_0x465bab,_0x4f1d7b,_0x10930b){let _0x177bd7=0x0;for(const _0x298931 of _0x465bab)switch(_0x298931){case'insert':_0x4f1d7b['add'](_0x10930b['get'](_0x177bd7),_0x177bd7),_0x177bd7++;break;case'delete':_0x4f1d7b['remove'](_0x177bd7);break;case'equal':_0x177bd7++;}}class as extends kt{constructor(_0x2239c5){super(_0x2239c5);const _0x42dcec=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x42dcec['to']('contextValue',_0x20a3cd=>S(_0x2239c5,'THREAD_CONTEXT_LABEL',_0x20a3cd)),'tabindex':-0x1},'children':[{'text':_0x42dcec['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x251930,_0x2432a4){super(_0x251930);const _0x36946a=this['bindTemplate'];this['_model']=_0x2432a4,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x3642d0(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5e406a=>!!_0x5e406a),this['bind']('contextValue')['to'](this['_model'],'context',_0x14e7f8=>_0x14e7f8&&_0x14e7f8['value']?this['_trimContextValue'](_0x14e7f8['value']):S(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',_0x36946a['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 _0x40dc55=new _0x7c32fb(this['locale']);return _0x40dc55['label']=S(this['locale'],'Reopen'),_0x40dc55['tooltip']=S(this['locale'],'Reopen'),_0x40dc55['icon']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22m5.042\x209.367\x202.189\x201.837a.75.75\x200\x200\x201-.965\x201.149l-3.788-3.18a.747.747\x200\x200\x201-.21-.284.75.75\x200\x200\x201\x20.17-.945L6.23\x204.762a.75.75\x200\x201\x201\x20.964\x201.15L4.863\x207.866h8.917A.75.75\x200\x200\x201\x2014\x207.9a4\x204\x200\x201\x201-1.477\x207.718l.344-1.489a2.5\x202.5\x200\x201\x200\x201.094-4.73l.008-.032H5.042z\x22/></svg>',_0x40dc55['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x29934c=>!_0x29934c),_0x40dc55['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3ef0fb,_0x18128b)=>_0x3ef0fb&&_0x18128b),_0x40dc55['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x40dc55;}['_trimContextValue'](_0x597ca9){if(_0x597ca9['length']<0x96)return _0x597ca9;const _0x335437=_0x597ca9['lastIndexOf']('\x20',0x93);return _0x597ca9['substring'](0x0,_0x335437>-0x1?_0x335437:0x93)+'...';}['_attachContextActions'](){const _0x97098b=this['element']['querySelector']('.ck-context'),_0x429393=_0x97098b['querySelector']('.ck-context__value');this['listenTo'](_0x97098b,'mouseenter',()=>{_0x429393['offsetWidth']<_0x429393['scrollWidth']&&_0x97098b['classList']['add']('overlay');}),this['listenTo'](_0x97098b,'mouseleave',()=>{_0x97098b['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x438e11 of this['focusables'])this['focusTracker']['add'](_0x438e11['element']),this['keystrokes']['listenTo'](_0x438e11['element']);}['_createContextView'](){const _0x4b01e2=new as(this['locale']);return _0x4b01e2['bind']('contextValue')['to'](this),_0x4b01e2;}}class ss extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5d4256,_0x54c302,_0x44a7b2,_0x21cc40){super(_0x5d4256),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x54c302,this['_localUser']=_0x44a7b2,this['_config']=_0x21cc40,this['commentThreadHeaderView']=new Yt(_0x5d4256,_0x54c302),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x5d4256,S(_0x5d4256,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5d4256,_0x54c302,Object['assign']({'CommentView':this['_config']['CommentView']},_0x21cc40)),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',(_0x1731b6,_0x35ee46)=>_0x1731b6||!!_0x35ee46),this['bind']('isUnlinked')['to'](_0x54c302,'unlinkedAt',_0xa5993e=>!!_0xa5993e),this['bind']('ariaLabel')['to'](this,'length',_0x5f4464=>{const _0x32b022=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return S(this['locale'],'COMMENT_THREAD_LABEL',[_0x5f4464,_0x32b022]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x3642d0(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x19cc94=>_0x19cc94['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xb5f67b=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4e1177=_0xb5f67b['commentInputView'];return _0xb5f67b['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4e1177,'value',(_0x17c3af,_0x4da34a,_0x3c5a87,_0xdc44bb,_0x25bc46)=>!!_0x25bc46||!!_0xdc44bb&&_0x3c5a87&&!_0x4da34a||_0x17c3af&&_0x3c5a87&&!_0x4da34a),_0x4e1177['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5e93b8,_0x4e7d92,_0x521f1f)=>{let _0x3abf73;return _0x3abf73=_0x521f1f&&_0x4e7d92?'Reply\x20to\x20reopen\x20discussion...':_0x5e93b8?'Reply...':'Write\x20a\x20comment...',S(this['locale'],_0x3abf73);}),_0x4e1177['bind']('submitLabel')['to'](this,'length',_0xd2d2ee=>S(this['locale'],_0xd2d2ee?'Reply':'Comment')),_0x4e1177['on']('submit',(_0x4879d1,_0x4319de)=>{this['fire']('addComment',_0x4319de),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4e1177['on']('cancel',()=>{this['focus']();}),_0x4e1177['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4e1177['on']('cancel',_0x516e6e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x516e6e['stop']());}),this['on']('change:isActive',(_0x54187d,_0x39aa3d,_0x4b10eb)=>{_0x4b10eb||this['length']||_0x4e1177['value']||this['fire']('removeCommentThread');}),_0xb5f67b;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ss){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x280de1,_0x54a689,_0x54095,_0x57cf8a){super(_0x280de1,_0x54a689,_0x54095,_0x57cf8a),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x280de1,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3a7c03,_0x463a6e,_0x2b6539)=>{_0x2b6539||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x2dc565,_0x1d5ff8,_0x31f77e)=>{_0x31f77e&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x55769a=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x55769a['if']('isActive','ck-thread--active'),_0x55769a['if']('isUnlinked','ck-thread--unlinked'),_0x55769a['if']('isConfirm','ck-thread--remove-confirmation'),_0x55769a['to']('actionIndicator',_0x4eb8b8=>_0x4eb8b8?'ck-thread--'+_0x4eb8b8:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x55769a['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 _0x477c59 of this['commentsListView']['commentViews'])_0x477c59['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x2a13dc}=this,_0x1cfd18=this['commentsListView']['commentViews']['get'](0x0);_0x1cfd18===this['_boundFirstCommentView']||_0x1cfd18['isSystemComment']||(this['_boundFirstCommentView']=_0x1cfd18,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1cfd18,'actionIndicator',_0x14af56=>'remove'===_0x14af56?'remove':null),_0x1cfd18['placeholder']=S(_0x2a13dc,'Write\x20a\x20comment...'),_0x1cfd18['removeButton']['on']('execute',_0x865570=>{_0x865570['stop'](),this['showConfirm'](S(_0x2a13dc,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1cfd18['focus']();}),_0x1cfd18['actionBar']['add'](this['resolveButton'],0x0),_0x1cfd18['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x3be2f7=new _0x27ab5e(this['locale']);return _0x3be2f7['label']=S(this['locale'],'Resolve'),_0x3be2f7['tooltip']=S(this['locale'],'Resolve'),_0x3be2f7['icon']=_0x15e3ad['check'],_0x3be2f7['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x3be2f7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xa3049b=>!_0xa3049b),_0x3be2f7['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1e93c7,_0x2f163f)=>_0x1e93c7&&!_0x2f163f),_0x3be2f7['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x3be2f7;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x1d374e){super(_0x1d374e),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x160175,_0x425f43,_0x439dd7)=>{this['element']['innerHTML']=_0x439dd7;}),this['element']['innerHTML']=this['content'];}}class os extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x588a95,_0xf39a06,_0x37ab95){super(_0x588a95),this['_model']=_0xf39a06,this['_config']=_0x37ab95,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0xf39a06,'content',_0xf39a06,'authoredAt',(_0x3d5d4e,_0x56098e)=>S(_0x588a95,'COMMENT_ARIA_LABEL',[_0xf39a06['author']['name'],_0x37ab95['formatDateTime'](_0x56098e),new DOMParser()['parseFromString'](_0x3d5d4e,'text/html')['body']['textContent'],_0xf39a06['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x588a95,S(_0x588a95,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x12b224(),this['focusTracker']=new _0x3642d0(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x57366a=>_0x57366a['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']?S(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):S(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?S(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):S(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x787090=new es(this['locale']);return _0x787090['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x471920,_0x3e6d3c)=>_0x3e6d3c?_0x47c1ef(_0x471920,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x471920),_0x787090;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x341a69=new hs(this['locale'],this['_config']['editorConfig']);return _0x341a69['value']=this['_model']['content'],_0x341a69['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x341a69['submitLabel']=S(this['locale'],'Save'),_0x341a69['on']('submit',(_0x2b5436,_0x4d64b7)=>{this['fire']('updateComment',this['_model']['id'],_0x4d64b7),this['switchToDisplayMode'](),this['focus']();}),_0x341a69['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x341a69['once']('editorReady',()=>{_0x341a69['focus']();}),_0x341a69['createEditor'](),_0x341a69['delegate']('editorReady')['to'](this),_0x341a69['delegate']('editorDestroyed')['to'](this),_0x341a69;}['_setupKeyboardNavigation'](){const _0x47dc72=this['element'];this['keystrokes']['listenTo'](_0x47dc72);for(const _0x1988d5 of this['focusables'])this['focusTracker']['add'](_0x1988d5['element']),this['keystrokes']['listenTo'](_0x1988d5['element']);this['focusables']['on']('change',(_0x1cb70e,_0x336012)=>{for(const _0x366bd3 of _0x336012['removed'])this['focusTracker']['remove'](_0x366bd3['element']),this['keystrokes']['stopListening'](_0x366bd3['element']);for(const _0x118e4d of _0x336012['added'])this['focusTracker']['add'](_0x118e4d['element']),this['keystrokes']['listenTo'](_0x118e4d['element']);}),this['keystrokes']['set']('enter',(_0x33fb24,_0x2a2172)=>{_0x47dc72===_0x33fb24['target']&&(this['focusCycler']['focusFirst'](),_0x2a2172());}),this['keystrokes']['set']('esc',(_0x2e24c5,_0x2a05ca)=>{_0x47dc72!==_0x2e24c5['target']&&(this['focus'](),_0x2a05ca());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(os){['actionBar'];['userView'];constructor(_0x2c1ea5,_0x44b86f,_0x3eb00a){super(_0x2c1ea5,_0x44b86f,_0x3eb00a),this['set']('actionIndicator',null),this['set']('placeholder',S(_0x2c1ea5,'Reply...')),this['bind']('authoredAt')['to'](_0x44b86f),this['bind']('resolvedAt')['to'](_0x44b86f),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 _0x517b85(_0x2c1ea5,_0x44b86f['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x44b86f,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0xba4173=this['bindTemplate'],_0x28edb9=[{'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']}},{'tag':'time','attributes':{'datetime':_0xba4173['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0xba4173['to']('authoredAt',_0x2958d9=>this['_config']['formatDateTime'](_0x2958d9))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0xba4173['if']('isEditMode','ck-comment__actions--hidden'),_0xba4173['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']&&_0x28edb9['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0xba4173['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0xba4173['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0xba4173['if']('isEditMode','ck-comment--edit'),_0xba4173['if']('isSystemComment','ck-comment--info'),_0xba4173['to']('actionIndicator',_0xd5dc61=>_0xd5dc61?'ck-comment--'+_0xd5dc61:'')],'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':_0x28edb9}]}]};}['_createEditButton'](){const _0xd7835b=new _0x7c32fb(this['locale']);return _0xd7835b['label']=S(this['locale'],'Edit'),_0xd7835b['icon']=_0x15e3ad['pencil'],_0xd7835b['withText']=!0x0,_0xd7835b['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xd7835b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x14b3ac=>!_0x14b3ac),_0xd7835b['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xd7835b['on']('execute',()=>this['switchToEditMode']()),_0xd7835b;}['_createRemoveButton'](){const _0x1d0d45=new _0x7c32fb(this['locale']);return _0x1d0d45['label']=S(this['locale'],'Remove'),_0x1d0d45['icon']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5.2\x207h9.2c.6\x200\x201\x20.4\x201\x201v9.9c0\x20.5-.4\x201-1\x201H5.2a1\x201\x200\x200\x201-1-1V8c0-.6.4-1\x201-1zm1\x201.5c-.3\x200-.5.2-.5.5v8c0\x20.3.2.5.5.5h.5c.2\x200\x20.5-.2.5-.5V9c0-.3-.3-.5-.5-.5h-.5zm3.2\x200c-.2\x200-.5.2-.5.5v8c0\x20.3.3.5.5.5h.5c.3\x200\x20.5-.2.5-.5V9c0-.3-.2-.5-.5-.5h-.4zm3.5\x200c-.2\x200-.5.2-.5.5v8c0\x20.3.3.5.5.5h.5c.3\x200\x20.5-.2.5-.5V9c0-.3-.2-.5-.5-.5h-.5zm-1.4-7.1H8.3L6.5\x203.6H3.8c-.5\x200-.7.3-.7.8s.2.7.7.7h12c.6\x200\x20.9-.2.9-.7\x200-.5-.3-.8-1-.8h-2.4l-1.8-2.2z\x22/></svg>\x0a',_0x1d0d45['withText']=!0x0,_0x1d0d45['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1d0d45['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4a5a63=>!_0x4a5a63),_0x1d0d45['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1d0d45['on']('execute',()=>{this['showConfirm'](S(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1d0d45;}['_createDropdown'](){const _0x5c3f49=_0x5093dc(this['locale'],_0x3d2778),_0x4d7a30=_0x5c3f49['panelView']['children'],_0x9a2802=new _0xb9f7e9(this['locale']),_0x47bb28=_0x5c3f49['bindTemplate'];_0x43592b(_0x5c3f49,()=>this['items']['find'](_0x45013a=>_0x45013a['isVisible'])),_0x5c3f49['extendTemplate']({'attributes':{'class':[_0x47bb28['if']('isVisible','ck-hidden',_0x3c95de=>!_0x3c95de)]}});const _0x4ec7c7=(_0x260527,_0x2ea4c1=-0x1)=>{const _0x492f89=new _0xd934b8(this['locale']);_0x492f89['children']['add'](_0x260527);const _0x2518bb=_0x2ea4c1>-0x1?_0x2ea4c1:_0x9a2802['items']['length'];_0x9a2802['items']['add'](_0x492f89,_0x2518bb);const _0xebcac3=Array['from'](this['items']);_0x5c3f49['unbind']('isEnabled','isVisible'),_0x5c3f49['bind']('isEnabled')['toMany'](_0xebcac3,'isEnabled',(..._0x549db0)=>_0x549db0['some'](_0x15a510=>_0x15a510)),_0x5c3f49['bind']('isVisible')['toMany'](_0xebcac3,'isVisible',(..._0x420cd4)=>_0x420cd4['some'](_0x45dc66=>_0x45dc66));};_0x5c3f49['panelPosition']='sw',_0x5c3f49['buttonView']['set']({'label':S(this['locale'],'Show\x20more\x20items'),'icon':_0x15e3ad['threeVerticalDots']});for(const _0x3b1b6f of this['items'])_0x4ec7c7(_0x3b1b6f);return _0x4d7a30['add'](_0x9a2802),_0x5c3f49['listenTo'](this['items'],'add',(_0x4c03a7,_0x2101ef,_0x44294a)=>{_0x4ec7c7(_0x2101ef,_0x44294a);}),_0x5c3f49['listenTo'](this['items'],'remove',(_0x2d0198,_0x34924f,_0x5a74f6)=>{_0x9a2802['items']['remove'](_0x5a74f6);}),_0x5c3f49;}['_attachActions'](_0x7a6fb2,_0x5fd10b){const _0x2f2cb3=_0x7a6fb2&&_0x7a6fb2['element'];_0x2f2cb3&&(this['listenTo'](_0x2f2cb3,'mouseenter',()=>this['actionIndicator']=_0x5fd10b),this['listenTo'](_0x2f2cb3,'focus',()=>this['actionIndicator']=_0x5fd10b),this['listenTo'](_0x2f2cb3,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2f2cb3,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x210f52=super['_createCommentInputView']();return _0x210f52['bind']('placeholder')['to'](this),_0x210f52;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function J(_0xb3b395){const _0x351f17=_0x336d90(_0xb3b395,0x1e),_0x502372=new MutationObserver(_0x3d6267=>{for(const _0x16dc96 of _0x3d6267)('attributes'==_0x16dc96['type']&&'class'==_0x16dc96['attributeName']||'childList'==_0x16dc96['type']||'characterData'==_0x16dc96['type'])&&_0x351f17();});return{'attach'(_0x292ad8){_0x502372['observe'](_0x292ad8,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x502372['disconnect'](),_0x351f17['cancel']();}};}class T extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x466a6d,_0x1487dd){super(_0x466a6d),this['id']=_0x332833(),this['focusTracker']=new _0x3642d0(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x33d581,_0x57c025)=>this['fire']('Esc',_0x57c025)),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']=J(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x1487dd),this['mainView']=_0x1487dd;const _0x6c4e68=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x6c4e68['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 _0x203b99=this['element']['clientHeight'];_0x203b99&&(this['height']=_0x203b99);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x27caf5(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4db8bc,target:_0x4e71e7,type:_0x5ceef3,isVisible:_0x4087cd=!0x0}){super(),this['view']=_0x4db8bc,this['view']['element']||this['view']['render'](),this['_type']=_0x5ceef3,this['_target']=_0x4e71e7,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x41148a([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x2185dd,_0x425290)=>{this['view']['focusTracker']['add'](_0x425290);}),this['focusableElements']['on']('remove',(_0x2ed019,_0x13f184)=>{this['view']['focusTracker']['remove'](_0x13f184);}),this['set']('isVisible',_0x4087cd);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x587f49=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x587f49),_0x587f49;}get['targetRect'](){const _0x135925=this['target'];if(null===_0x135925)return null;if(_0x135925 instanceof _0x59e592)return _0x135925;const _0x7ed976=_0x135925['filter'](_0x15affe=>function(_0x5ae9db){const _0x1ca76e=_0x5ae9db['offsetParent'];if(_0x1ca76e)return!0x0;const _0x5271e6=_0x5ae9db['getClientRects']()['item'](0x0);return!!_0x5271e6;}(_0x15affe));return 0x0===_0x7ed976['length']?null:new _0x59e592(_0x7ed976[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x28abc5){this['view']['isActive']=_0x28abc5,this['view']['mainView']['isActive']=_0x28abc5;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x56efcf){if(!(null===_0x56efcf||_0x56efcf instanceof _0x59e592||Array['isArray'](_0x56efcf)&&_0x56efcf['every'](_0x58fcec=>ne(_0x58fcec))))throw new _0x3595b5('annotation-invalid-target',null,{'target':_0x56efcf});}['_getNormalizedTarget'](){const _0x9ffcb1='function'==typeof this['_target']?this['_target']():this['_target'];return ne(_0x9ffcb1)?[_0x9ffcb1]:_0x9ffcb1;}}function ne(_0x2525e7){return null!==_0x2525e7&&'object'==typeof _0x2525e7&&'nodeType'in _0x2525e7&&0x1===_0x2525e7['nodeType'];}class x extends _0x41148a{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x58c456=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x3642d0(),this['_focusTracker']['on']('change:isFocused',(_0x59b56f,_0x560841,_0x5d0f4a)=>{_0x5d0f4a||this['fire']('blur');});for(const _0x5ebef4 of _0x58c456)this['add'](_0x5ebef4);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3e12ac){if(this['has'](_0x3e12ac))throw new _0x3595b5('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3e12ac['innerView'],_0x3e12ac),this['_viewToAnnotation']['set'](_0x3e12ac['view'],_0x3e12ac);for(const _0x50e02f of _0x3e12ac['focusableElements'])this['_focusTracker']['add'](_0x50e02f);this['listenTo'](_0x3e12ac['focusableElements'],'add',(_0x1a4478,_0x534954)=>{this['_focusTracker']['add'](_0x534954);}),this['listenTo'](_0x3e12ac['focusableElements'],'remove',(_0x14ebca,_0x3b1fd3)=>{this['_focusTracker']['remove'](_0x3b1fd3);}),this['listenTo'](_0x3e12ac['view']['focusTracker'],'change:isFocused',(_0x5b6e4d,_0x25c9b5,_0xa4e096)=>{_0xa4e096&&this['fire']('focus',_0x3e12ac);}),_0x3e12ac['updateTargetRect']();const _0x4f068b=this['_getOrderInContent'](_0x3e12ac['view']['targetRect']);return super['add'](_0x3e12ac,_0x4f068b);}['remove'](_0x32f225){if(!this['has'](_0x32f225))throw new _0x3595b5('annotationcollection-not-existing-item',null);this['stopListening'](_0x32f225['view']['focusTracker']),this['stopListening'](_0x32f225['focusableElements']);for(const _0x245bcb of _0x32f225['focusableElements'])this['_focusTracker']['remove'](_0x245bcb);return this['_viewToAnnotation']['delete'](_0x32f225['view']),this['_innerViewToAnnotation']['delete'](_0x32f225['innerView']),super['remove'](_0x32f225);}['getByInnerView'](_0x3e2eec){return this['_innerViewToAnnotation']['get'](_0x3e2eec);}['getByView'](_0x50b7bc){return this['_viewToAnnotation']['get'](_0x50b7bc);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x450ac1 of this)_0x450ac1['updateTargetRect']();this['_sort']();}['_sort'](){const _0x276452=Array['from'](this)['sort']((_0x5e95f1,_0x5ac2a7)=>v(_0x5e95f1['view']['targetRect'],_0x5ac2a7['view']['targetRect']));for(let _0x1da567=_0x276452['length']-0x1;_0x1da567>0x0;_0x1da567--){const _0x44876d=_0x276452[_0x1da567];_0x1da567!==this['getIndex'](_0x44876d)&&(this['remove'](_0x44876d),this['add'](_0x44876d));}}['_getOrderInContent'](_0x3e21a9){let _0x28401f=0x0;if(!_0x3e21a9)return this['length'];for(const _0x53d126 of this){const _0x5ed93e=_0x53d126['view']['targetRect'];if(_0x5ed93e){if(v(_0x3e21a9,_0x5ed93e)<0x0)return _0x28401f;_0x28401f++;}}return _0x28401f;}}function v(_0x5a6a6d,_0x3da397){if(null===_0x5a6a6d&&null===_0x3da397)return 0x0;if(null===_0x5a6a6d)return-0x1;if(null===_0x3da397)return 0x1;const _0x2f9073=_0x5a6a6d['top']-_0x3da397['top'];return 0x0==_0x2f9073?_0x5a6a6d['left']-_0x3da397['left']:_0x2f9073;}class N extends _0x4ffcf5{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x33d598){if(super(_0x33d598),this['collection']=new x(),this['_visibleAnnotations']=new x(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x33d598 instanceof _0x5e2b67){const _0x53a101=_0x33d598['locale'];_0x33d598['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':S(_0x53a101,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':S(_0x53a101,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':S(_0x53a101,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':S(_0x53a101,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':S(_0x53a101,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':S(_0x53a101,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':S(_0x53a101,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x12bae6){this['collection']['add'](_0x12bae6);}['remove'](_0x125830){this['collection']['remove'](_0x125830),_0x125830['destroy']();}['refreshVisibility'](){for(const _0x359f3d of this['collection'])_0x359f3d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2c36d0){return this['collection']['getByInnerView'](_0x2c36d0);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x233dbf of this['collection'])_0x233dbf['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0xa23460){this['fire']('_activateAnnotation',_0xa23460);}['createAnnotation'](_0x420881){return new d(_0x420881);}['createAnnotationView'](_0x54689f,_0x1d0a24){return new T(_0x54689f,_0x1d0a24);}['_addActiveAnnotation'](_0x3da8b7){const _0x12c255=new Set(this['activeAnnotations']);_0x12c255['add'](_0x3da8b7),this['activeAnnotations']=_0x12c255;}['_removeActiveAnnotation'](_0x4f052a){const _0x16c58d=new Set(this['activeAnnotations']);_0x16c58d['delete'](_0x4f052a),this['activeAnnotations']=_0x16c58d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x34cc34=this['collection'],_0x472370=this['_visibleAnnotations'];function _0x568d94(_0x57cbb0){const _0x10a47a=_0x57cbb0['source'];_0x10a47a['isVisible']&&!_0x472370['has'](_0x10a47a)?_0x472370['add'](_0x10a47a):!_0x10a47a['isVisible']&&_0x472370['has'](_0x10a47a)&&_0x472370['remove'](_0x10a47a),_0x10a47a['view']['focusTracker']['remove'](_0x10a47a['view']['element']),_0x10a47a['view']['focusTracker']['add'](_0x10a47a['view']['element']);}this['listenTo'](_0x34cc34,'add',(_0x677cd,_0x189ed7)=>{_0x189ed7['isVisible']&&_0x472370['add'](_0x189ed7),this['listenTo'](_0x189ed7,'change:isVisible',_0x568d94);}),this['listenTo'](_0x34cc34,'remove',(_0x1cb479,_0x2f6f81)=>{_0x472370['has'](_0x2f6f81)&&_0x472370['remove'](_0x2f6f81),this['stopListening'](_0x2f6f81,'change:isVisible',_0x568d94);});}['_setupEnterAnnotationKeystroke'](){const _0x238962=_0x3f60aa=>{_0x3f60aa['on']('ready',()=>{_0x3f60aa['keystrokes']['set'](_0x20217c,(_0x5f28e3,_0x537660)=>{const _0x5887b7=_0x3c4abc(this['activeAnnotations']['values']());_0x5887b7&&(_0x5887b7['view']['focus'](),_0x537660());});});};this['context']instanceof _0x5e2b67?_0x238962(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3cae84,_0x3caeae)=>{_0x238962(_0x3caeae);});}['_setupEscapeAnnotationHandling'](){const _0xcd5c36=_0x2c8823=>{const _0x232da2=_0x2c8823['source'],_0x389f75=[];let _0x3bf231;if(Array['isArray'](_0x232da2['target'])){_0x3bf231=_0x232da2['target'][0x0],this['context']instanceof _0x5e2b67?_0x389f75['push'](this['context']):this['context']['editors']&&_0x389f75['push'](...this['context']['editors']);for(const _0x34866c of _0x389f75)for(const _0x5b0a56 of _0x34866c['editing']['view']['domRoots']['values']())if(_0x5b0a56['contains'](_0x3bf231))return void _0x34866c['editing']['view']['focus']();_0x3bf231['focus']();}};this['listenTo'](this['collection'],'add',(_0x4c1ddd,_0x281ca7)=>{this['listenTo'](_0x281ca7,'escape',_0xcd5c36,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2eb5cb,_0x1e27a3)=>{this['stopListening'](_0x1e27a3,'escape',_0xcd5c36);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4ffcf5{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[N,ht,ct];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xbca2cb){super(_0xbca2cb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x10a609=this['context']['config'];_0x10a609['define']('comments.maxCommentsWhenCollapsed',0x2),_0x10a609['define']('comments.maxThreadTotalWeight',0x1f4),_0x10a609['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x10a609['define']('comments.CommentThreadView',gt),_0x10a609['define']('comments.CommentView',Tt),_0x10a609['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1a10b1=this['context']['plugins']['get'](N);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3d093c,_0x1b4dca)=>this['_addCommentThread'](_0x1b4dca)),this['on']('submitCommentThread',(_0x6bf8a,_0x23b377)=>this['_submitCommentThread'](_0x23b377)),this['on']('resolveCommentThread',(_0x4ddbff,_0x25ca5b)=>this['_resolveCommentThread'](_0x25ca5b)),this['on']('resolveCommentThread',(_0x8d2aba,_0x1c709f)=>this['_updateActiveAnnotation'](_0x1c709f),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x32d664,_0x8a592e)=>this['_reopenCommentThread'](_0x8a592e)),this['on']('reopenCommentThread',(_0x2c94d0,_0x5a1fec)=>this['_updateActiveAnnotation'](_0x5a1fec),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2e838b,_0x913cf6)=>this['_removeCommentThread'](_0x913cf6)),this['on']('updateCommentThread',(_0x2e9b27,_0x170505)=>this['_updateCommentThread'](_0x170505)),this['on']('updateCommentThread',(_0x5ef7bb,_0x45f0f8)=>this['_updateActiveAnnotation'](_0x45f0f8),{'priority':'lowest'}),this['on']('addComment',(_0x1b214b,_0x47233d)=>this['_addComment'](_0x47233d)),this['on']('updateComment',(_0x26e4e6,_0x382480)=>this['_updateComment'](_0x382480)),this['on']('removeComment',(_0x230457,_0x395b32)=>this['_removeComment'](_0x395b32)),this['on']('addComment',(_0x4aa71d,{threadId:_0x1e12e4,isFromAdapter:_0x55d510})=>{if(_0x55d510)return;const _0x3fa6f7=this['getCommentThread'](_0x1e12e4),_0x4f1a55=_0x3fa6f7&&this['_threadToController']['get'](_0x3fa6f7);_0x4f1a55&&_0x4f1a55['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1a10b1,'change:activeAnnotations',(_0x89124,_0x2249ca,_0x20e683)=>{const _0x496579=Array['from'](_0x20e683)['map'](_0x502746=>this['_viewToController']['get'](_0x502746['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x496579?_0x496579['model']:null;});}set['adapter'](_0xdcfd8f){if(this['_adapter'])throw new _0x3595b5('commentsrepository-adapter-already-set');this['_adapter']=_0xdcfd8f;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3e44b2=_t,threadId:_0x5ad9a5=_0x332833(),comments:_0x4eaa50=[],unlinkedAt:_0x4e7075=null,resolvedAt:_0x50f1fc=null,resolvedBy:_0xfaf9d5=null,target:_0x55a96d=null,context:_0x8ba320=null,attributes:_0x657409={},isResolvable:_0x3a91dd=!0x0,isSubmitted:_0x30965b=!0x1,isFromAdapter:_0x22967c=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x3e44b2),{'channelId':_0x3e44b2,'threadId':_0x5ad9a5,'comments':_0x4eaa50,'unlinkedAt':_0x4e7075,'resolvedAt':_0x50f1fc,'resolvedBy':_0xfaf9d5,'target':_0x55a96d,'context':_0x8ba320,'attributes':_0x657409,'isFromAdapter':_0x22967c,'isResolvable':_0x3a91dd,'isSubmitted':_0x30965b}),this['getCommentThread'](_0x5ad9a5);}['openNewCommentThread']({channelId:_0x1d1d78=_t,threadId:_0x358b98=_0x332833(),target:_0x333a22,context:_0x2ee779=null,isResolvable:_0x25398b=!0x0}){if(this['_readOnlyChannels']['has'](_0x1d1d78)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x333a22)throw new _0x3595b5('commentsrepository-missing-target');const _0x31796b=this['addCommentThread']({'channelId':_0x1d1d78,'threadId':_0x358b98,'target':_0x333a22,'context':_0x2ee779,'isResolvable':_0x25398b});if(!_0x31796b)return null;const _0x471faf=this['_threadToController']['get'](_0x31796b),_0xbc70a3=_0x471faf['view']['commentThreadInputView']['commentInputView'],_0x3d2b2d=this['context']['plugins']['get'](N),_0x6d5fce=_0x3d2b2d['getByInnerView'](_0x471faf['view']);return _0x3d2b2d['activate'](_0x6d5fce),_0xbc70a3['once']('editorReady',()=>_0xbc70a3['focus']()),_0x31796b;}['hasCommentThread'](_0x1d673d){if('string'!=typeof _0x1d673d)throw new _0x3595b5('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1d673d);}['updateCommentThread']({channelId:_0x4e8209=_t,threadId:_0x48010c,context:_0x4e2275,unlinkedAt:_0x371eda,attributes:_0x1db63a,isFromAdapter:_0x37dbe8=!0x1}){return this['fire'](Nt('updateCommentThread',_0x4e8209),{'channelId':_0x4e8209,'threadId':_0x48010c,'context':_0x4e2275,'unlinkedAt':_0x371eda,'attributes':_0x1db63a,'isFromAdapter':_0x37dbe8}),this['getCommentThread'](_0x48010c);}['getCommentThread'](_0x4bb052){if('string'!=typeof _0x4bb052)throw new _0x3595b5('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4bb052);}['fetchCommentThread']({channelId:_0xc9de6,threadId:_0x44b3c6}={}){const _0x50fb9b=this['getCommentThread'](_0x44b3c6);if(_0x50fb9b)return Promise['resolve'](_0x50fb9b);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3595b5('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0xc9de6,'threadId':_0x44b3c6})['then'](_0x1551a0=>this['hasCommentThread'](_0x44b3c6)?this['getCommentThread'](_0x44b3c6):_0x1551a0?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0xc9de6},_0x1551a0)):void 0x0)['catch'](_0x311925=>{throw console['error'](_0x311925),new _0x3595b5('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x145b34,skipNotAttached:_0x5a33a2=!0x1,skipEmpty:_0xb587b1=!0x1,toJSON:_0x110f24=!0x1}={}){const _0x61cb7=[];for(const _0x334fc8 of this['_threads']['values']())_0x145b34&&_0x334fc8['channelId']!==_0x145b34||_0x5a33a2&&!_0x334fc8['isAttached']||_0xb587b1&&0x0===_0x334fc8['length']||_0x61cb7['push'](_0x334fc8);return _0x110f24?_0x61cb7['map'](_0x410e4b=>_0x410e4b['toJSON']()):_0x61cb7;}['setActiveCommentThread'](_0x5414d4){const _0x5e09a7=this['context']['plugins']['get'](N);if(!_0x5414d4)return void(this['activeCommentThread']&&_0x5e09a7['deactivateAll']());const _0xc8dfd3=this['getCommentThread'](_0x5414d4);if(!_0xc8dfd3)throw new _0x3595b5('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5414d4});if(!this['_threadToController']['has'](_0xc8dfd3))throw new _0x3595b5('commentsrepository-active-not-attached',null,{'threadId':_0x5414d4});const _0x256266=_0x5e09a7['getByInnerView'](this['_threadToController']['get'](_0xc8dfd3)['view']);_0x5e09a7['activate'](_0x256266);}['switchReadOnly'](_0x27e930,_0x54e33f){_0x27e930?this['_readOnlyChannels']['add'](_0x54e33f):this['_readOnlyChannels']['delete'](_0x54e33f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x36bafe){return this['_readOnlyChannels']['has'](_0x36bafe)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3e6e2b,_0x3ca5e8){return new vt(_0x3e6e2b,_0x3ca5e8);}['setPermissions'](_0x7ca56a,_0xc4d929=_t){this['_permissions']['set'](_0xc4d929,_0x7ca56a),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x43fa05=_t){return this['_permissions']['has'](_0x43fa05)?this['_permissions']['get'](_0x43fa05):bt;}['_addCommentThread']({channelId:_0x5a762c,threadId:_0x162219,comments:_0x5ac99f,unlinkedAt:_0x6a7138,resolvedAt:_0x325535,resolvedBy:_0x5429da,target:_0x6ba318,context:_0x157c36,attributes:_0x1dfca8,isFromAdapter:_0x5a7d04,isResolvable:_0x8db7b,isSubmitted:_0x4fa640}){if('string'!=typeof _0x162219)throw new _0x3595b5('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x162219});if(this['hasCommentThread'](_0x162219))throw new _0x3595b5('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x162219});const _0x2ca8d9=new oe(this,{'channelId':_0x5a762c,'id':_0x162219,'context':_0x157c36,'attributes':_0x1dfca8,'unlinkedAt':_0x6a7138,'resolvedAt':_0x325535,'resolvedBy':_0x5429da?this['context']['plugins']['get'](ct)['getUser'](_0x5429da):null,'isResolvable':_0x8db7b,'isSubmitted':_0x4fa640||_0x5a7d04});this['_threads']['set'](_0x162219,_0x2ca8d9);for(const _0x2983c8 of _0x5ac99f)_0x2ca8d9['_add'](this['_createNewComment']({'threadId':_0x162219,..._0x2983c8}));return _0x6ba318&&_0x2ca8d9['attachTo'](_0x6ba318),_0x5a7d04||!_0x2ca8d9['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5a762c,'threadId':_0x162219});}['_submitCommentThread']({channelId:_0x1c0f6b,threadId:_0x5bc468}){if(!this['hasCommentThread'](_0x5bc468))throw new _0x3595b5('commentsrepository-missing-comment-thread',this);const _0x582504=this['getCommentThread'](_0x5bc468);if(_0x582504['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4d0f7c,comments:_0x479138,resolvedAt:_0x18be5b,resolvedBy:_0x3fc282,context:_0xb13851,attributes:_0x35b414}=_0x582504,_0x70d082=this['context']['plugins']['get']('PendingActions'),_0x487454=_0x70d082['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1c0f6b,'threadId':_0x4d0f7c,'comments':_0x479138['map'](_0x109a7f=>_0x109a7f['toJSON']()),'resolvedAt':_0x18be5b,'resolvedBy':_0x3fc282?_0x3fc282['id']:_0x3fc282,'context':_0xb13851,'attributes':_0x35b414})['then'](({comments:_0x41486a})=>{_0x70d082['remove'](_0x487454);for(const _0xb5b0cb of _0x41486a)this['_updateComment']({'channelId':_0x1c0f6b,'threadId':_0x5bc468,'commentId':_0xb5b0cb['commentId'],'createdAt':_0xb5b0cb['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3a7c18=>{throw console['error'](_0x3a7c18),new _0x3595b5('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0xe4a731,target:_0x2afb25}){const _0x220f00=this['getCommentThread'](_0xe4a731);if(!_0x220f00)throw new _0x3595b5('commentsrepository-attach-missing-comment-thread',this);const _0x539e7d=this['context']['plugins']['get']('PendingActions'),_0x3e92c6=this['context']['plugins']['get'](N),_0x111cf3=this['_createCommentThreadView'](_0x220f00),_0x389611=new vt(_0x220f00,_0x111cf3);let _0x3d20fd=null;_0x111cf3['on']('change:isDirty',(_0x130161,_0x7d50a,_0x389df9)=>{_0x389df9?_0x3d20fd=_0x539e7d['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3d20fd&&(_0x539e7d['remove'](_0x3d20fd),_0x3d20fd=null);}),this['_threadToController']['set'](_0x220f00,_0x389611),this['_viewToController']['set'](_0x111cf3,_0x389611);const _0x8ffe2e=new T(this['context']['locale'],_0x111cf3);_0x8ffe2e['bind']('length')['to'](_0x111cf3),_0x8ffe2e['bind']('isDirty')['to'](_0x111cf3,'isDirty',_0x111cf3,'length',(_0x56d1b4,_0x5c9dbf)=>_0x56d1b4||!_0x5c9dbf),_0x8ffe2e['bind']('isActive')['to'](_0x111cf3),_0x8ffe2e['type']='comment';const _0x5d1268=new d({'view':_0x8ffe2e,'target':_0x2afb25,'type':'comment','isVisible':!_0x220f00['isResolved']});return _0x111cf3['on']('escape',()=>{_0x5d1268['fire']('escape');}),this['_bindAnnotationToEditors'](_0x111cf3,_0x5d1268),_0x3e92c6['add'](_0x5d1268),_0x5d1268;}['_bindAnnotationToEditors'](_0x589653,_0xb5075a){this['listenTo'](_0x589653,'editorReady',(_0x596b52,_0x1481a4)=>{const _0x5c8d87=_0x1481a4['ui']['view']['body']['bodyCollectionContainer'];_0xb5075a['focusableElements']['add'](_0x5c8d87),this['context']instanceof _0x5e2b67&&this['context']['ui']['focusTracker']['add'](_0x5c8d87);},{'priority':'highest'}),this['listenTo'](_0x589653,'editorDestroyed',(_0x72461d,_0x1a2777)=>{const _0x46e8fe=_0x1a2777['ui']['view']['body']['bodyCollectionContainer'];_0xb5075a['focusableElements']['has'](_0x46e8fe)&&_0xb5075a['focusableElements']['remove'](_0x46e8fe),this['context']instanceof _0x5e2b67&&this['context']['ui']['focusTracker']['remove'](_0x46e8fe);});}['_unbindEditors'](_0x3b16b8){this['stopListening'](_0x3b16b8,'editorReady'),this['stopListening'](_0x3b16b8,'editorDestroyed');}['_createCommentThreadView'](_0x1ed530){const _0x5abe53=this['context']['plugins']['get'](ct),{config:_0x4a1d02,locale:_0xe38421}=this['context'],_0x3760ff=pt(_0x4a1d02['get']('locale'));return new(0x0,(_0x4a1d02['get']('comments'))['CommentThreadView'])(_0xe38421,_0x1ed530,_0x5abe53['me'],{'editorConfig':{..._0x4a1d02['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4a1d02['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4a1d02['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4a1d02['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4a1d02['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3760ff,'CommentView':_0x4a1d02['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3af252,channelId:_0x22989d,resolvedAt:_0x9d35ee,resolvedBy:_0x489bfe,isFromAdapter:_0x2b6596}){if(!this['hasCommentThread'](_0x3af252))throw new _0x3595b5('commentsrepository-missing-comment-thread',null,{'threadId':_0x3af252});const _0x45c07a=this['getCommentThread'](_0x3af252);if(_0x45c07a['isResolved'])throw new _0x3595b5('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3af252});const _0x428905=this['context']['plugins']['get'](ct);if(_0x45c07a['resolvedBy']=_0x428905['getUser'](_0x489bfe),_0x45c07a['resolvedAt']=_0x9d35ee,_0x2b6596||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x243f79=this['context']['plugins']['get']('PendingActions'),_0x3bb056=_0x243f79['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x22989d,'threadId':_0x3af252})['then'](({resolvedAt:_0x141b35,resolvedBy:_0x4f4202})=>{_0x243f79['remove'](_0x3bb056),_0x45c07a['resolvedBy']['id']!==_0x4f4202&&(_0x45c07a['resolvedBy']=_0x428905['getUser'](_0x4f4202)),_0x45c07a['resolvedAt']=_0x141b35;})['catch'](_0x4d5b5e=>{throw console['error'](_0x4d5b5e),new _0x3595b5('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x462b0f,channelId:_0x63b9b5,isFromAdapter:_0x46cbcc}){if(!this['hasCommentThread'](_0x462b0f))throw new _0x3595b5('commentsrepository-missing-comment-thread',null,{'threadId':_0x462b0f});const _0x4bc008=this['getCommentThread'](_0x462b0f);if(!_0x4bc008['isResolved'])throw new _0x3595b5('commentsrepository-reopen-comment-thread',null,{'threadId':_0x462b0f});if(_0x4bc008['resolvedBy']=null,_0x4bc008['resolvedAt']=null,_0x46cbcc||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x9e2eb1=this['context']['plugins']['get']('PendingActions'),_0x49b7bc=_0x9e2eb1['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x63b9b5,'threadId':_0x462b0f})['then'](()=>_0x9e2eb1['remove'](_0x49b7bc))['catch'](_0x233989=>{throw console['error'](_0x233989),new _0x3595b5('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x352e7c,isFromAdapter:_0x5a0989}){const _0x28fa5a=this['getCommentThread'](_0x352e7c);if(!_0x28fa5a)throw new _0x3595b5('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x352e7c),this['_threads']['delete'](_0x352e7c),!_0x28fa5a['isSubmitted']||_0x5a0989||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xa2d224=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1549de}=_0x28fa5a,_0x3eae04=_0xa2d224['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1549de,'threadId':_0x352e7c})['then'](()=>_0xa2d224['remove'](_0x3eae04))['catch'](_0x5a4c2a=>{throw console['error'](_0x5a4c2a),new _0x3595b5('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3e4757,unlinkedAt:_0x3d2c11,context:_0x1e4628,attributes:_0x2c5d43,isFromAdapter:_0x4bb67d}){if('string'!=typeof _0x3e4757)throw new _0x3595b5('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3e4757});if(!this['hasCommentThread'](_0x3e4757))throw new _0x3595b5('commentsrepository-missing-comment-thread',null,{'threadId':_0x3e4757});const _0x37182d=this['getCommentThread'](_0x3e4757);let _0x11d2e8=!0x1;if(void 0x0!==_0x1e4628&&_0x37182d['context']!==_0x1e4628&&(_0x37182d['context']=_0x1e4628,_0x11d2e8=!0x0),void 0x0!==_0x3d2c11&&_0x37182d['unlinkedAt']!==_0x3d2c11&&(_0x37182d['unlinkedAt']=_0x3d2c11,_0x11d2e8=!0x0),_0x2c5d43&&!At(_0x2c5d43,_0x37182d['attributes'])&&(_0x37182d['attributes']=_0x2c5d43,_0x11d2e8=!0x0),!_0x11d2e8)return Promise['resolve']();if(!_0x37182d['isSubmitted']||_0x4bb67d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x5e3c4a=this['context']['plugins']['get']('PendingActions'),{channelId:_0xa9afb0}=_0x37182d,_0x414acf=_0x5e3c4a['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xa9afb0,'threadId':_0x3e4757,'context':_0x1e4628,'unlinkedAt':_0x3d2c11,'attributes':_0x2c5d43})['then'](()=>_0x5e3c4a['remove'](_0x414acf))['catch'](_0x452daa=>{throw console['error'](_0x452daa),new _0x3595b5('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x283918){const _0x32f337=this['context']['plugins']['get'](N),_0x5b7a6d=this['getCommentThread'](_0x283918);if(this['_threadToController']['has'](_0x5b7a6d)){const _0x23e660=this['_threadToController']['get'](_0x5b7a6d),_0x1716fb=_0x23e660['view'],_0x359d6f=_0x32f337['getByInnerView'](_0x1716fb);this['_threadToController']['delete'](_0x5b7a6d),this['_viewToController']['delete'](_0x1716fb),_0x359d6f&&_0x32f337['remove'](_0x359d6f),_0x23e660['destroy'](),_0x1716fb['destroy']()['then'](()=>{this['_unbindEditors'](_0x1716fb);});}}['_updateActiveAnnotation']({threadId:_0x19d8ee,resolvedAt:_0x2b111a}){const _0x22a211=!!_0x2b111a,_0x48d915=this['context']['plugins']['get'](N),_0x51c051=this['getCommentThread'](_0x19d8ee);if(this['_threadToController']['has'](_0x51c051)){const _0x855947=this['_threadToController']['get'](_0x51c051)['view'],_0x5e9715=_0x48d915['getByInnerView'](_0x855947);_0x5e9715&&(_0x22a211&&_0x48d915['_removeActiveAnnotation'](_0x5e9715),_0x5e9715['refreshVisibility']());}}['_getExternalAuthor'](_0x1a682f){const _0x45836f=this['context']['plugins']['get'](ct),_0x3e7ec7=It('external:'+_0x1a682f),_0x36b637=_0x45836f['getUser'](_0x3e7ec7);return _0x36b637||_0x45836f['addUser']({'id':_0x3e7ec7,'name':_0x1a682f});}['_createNewComment']({threadId:_0x3a5fe1,commentId:_0x4baac8=_0x332833(),content:_0x3d5ea5,authorId:_0x5ec1d6,createdAt:_0x234f42,attributes:_0x5af4fe}){if('string'!=typeof _0x4baac8)throw new _0x3595b5('commentsrepository-invalid-commentid');if('string'!=typeof _0x5ec1d6)throw new _0x3595b5('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3d5ea5||!_0x3d5ea5['trim']())throw new _0x3595b5('commentsrepository-invalid-comment-content');const _0x12349a=this['context']['plugins']['get'](ct)['getUser'](_0x5ec1d6);if(!_0x12349a)throw new _0x3595b5('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5ec1d6});let _0x1c0296=null,_0x4cf857=_0x234f42;return _0x5af4fe&&_0x5af4fe['@external']&&(_0x1c0296=this['_getExternalAuthor'](_0x5af4fe['@external']['authorName']),_0x4cf857=new Date(_0x5af4fe['@external']['createdAt'])),new re(this,{'threadId':_0x3a5fe1,'id':_0x4baac8,'author':_0x1c0296||_0x12349a,'creator':_0x12349a,'content':_0x3d5ea5,'createdAt':_0x234f42,'authoredAt':_0x4cf857,'attributes':_0x5af4fe});}['_addComment'](_0x4dc93c){let {threadId:_0x11fa9b,content:_0x29536f,attributes:_0x551777,isFromAdapter:_0xcaad00}=_0x4dc93c;const _0x35b83b=this['getCommentThread'](_0x4dc93c['threadId']);if(!_0x35b83b)throw new _0x3595b5('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5ab220=this['_createNewComment'](_0x4dc93c),{id:_0x54f527}=_0x5ab220;if(_0x35b83b['_add'](_0x5ab220),_0xcaad00||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x35b83b['isSubmitted'])return Promise['resolve']();const _0x2571a6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x52e6e8}=_0x35b83b,_0x31adb6=_0x2571a6['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x551777||(_0x551777={}),this['adapter']['addComment']({'channelId':_0x52e6e8,'threadId':_0x11fa9b,'commentId':_0x54f527,'content':_0x29536f,'attributes':_0x551777})['then'](_0x2e5192=>{_0x2571a6['remove'](_0x31adb6),_0x2e5192&&this['_updateComment']({'channelId':_0x52e6e8,'threadId':_0x11fa9b,'commentId':_0x54f527,'createdAt':_0x2e5192['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x40775c=>{throw console['error'](_0x40775c),new _0x3595b5('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4f8e6b,commentId:_0x34b1fd,content:_0x2ce890,createdAt:_0x579d98,attributes:_0x412547,isFromAdapter:_0x3a9765}){if(void 0x0!==_0x2ce890&&('string'!=typeof _0x2ce890||!_0x2ce890['trim']()['length']))throw new _0x3595b5('commentsrepository-update-comment-invalid-content');const _0x5938f3=this['getCommentThread'](_0x4f8e6b),_0x415b3f=_0x5938f3['getComment'](_0x34b1fd);if(!_0x415b3f)throw new _0x3595b5('commentsrepository-update-missing-comment',this);let _0x21500a=!0x1;if(_0x2ce890&&_0x2ce890!==_0x415b3f['content']&&(_0x415b3f['isEditable']||_0x3a9765)&&(_0x415b3f['content']=_0x2ce890,_0x21500a=!0x0),_0x579d98&&_0x579d98!==_0x415b3f['createdAt']&&(_0x415b3f['createdAt']=_0x579d98,_0x415b3f['attributes']&&_0x415b3f['attributes']['@external']||(_0x415b3f['authoredAt']=_0x579d98),_0x21500a=!0x0),_0x412547&&!At(_0x412547,_0x415b3f['attributes'])&&(_0x415b3f['attributes']=_0x412547,_0x21500a=!0x0),!_0x21500a)return Promise['resolve']();if(_0x5938f3['fire']('commentUpdated'),_0x3a9765||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x12c8b1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2b7a0e}=this['getCommentThread'](_0x415b3f['threadId']),_0x1ce894=_0x12c8b1['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2b7a0e,'threadId':_0x4f8e6b,'commentId':_0x34b1fd,'content':_0x2ce890,'attributes':_0x412547})['then'](()=>_0x12c8b1['remove'](_0x1ce894))['catch'](_0x2a343b=>{throw console['error'](_0x2a343b),new _0x3595b5('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x373084,commentId:_0x4c5aa2,isFromAdapter:_0x113484}){const _0x12d810=this['getCommentThread'](_0x373084),_0x5464c8=_0x12d810['getComment'](_0x4c5aa2);if(!_0x5464c8)throw new _0x3595b5('commentsrepository-remove-missing-comment',this);if(_0x12d810['_remove'](_0x5464c8),_0x113484||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x126c2a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2e617d}=_0x12d810,_0x2baf69=_0x126c2a['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2e617d,'threadId':_0x373084,'commentId':_0x4c5aa2})['then'](()=>_0x126c2a['remove'](_0x2baf69))['catch'](_0x3d0c40=>{throw console['error'](_0x3d0c40),new _0x3595b5('commentsrepository-remove-comment-internal-error',this);});}}class oe extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x27caf5(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5e6029,_0x2c0a4d){super();const _0x54c1ae=_0x2c0a4d['isResolvable'];this['channelId']=_0x2c0a4d['channelId'],this['id']=_0x2c0a4d['id'],this['comments']=new _0x41148a(),this['_repository']=_0x5e6029,this['_isAttached']=!0x1,this['_isSubmitted']=_0x2c0a4d['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5e6029,'_permissions',_0x5e6029,'_readOnlyChannels',()=>_0x5e6029['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5e6029,'_permissions',()=>_0x5e6029['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5e6029,'_permissions',()=>{const _0x4f648e=_0x5e6029['getPermissions'](this['channelId']);return _0x4f648e['write']||_0x4f648e['admin'];}),this['bind']('isResolvable')['to'](_0x5e6029,'_permissions',()=>_0x54c1ae&&_0x5e6029['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x2c0a4d['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x104dfa,_0xdcba82)=>_0x104dfa?_0xdcba82?_0x104dfa<_0xdcba82?_0x104dfa:_0xdcba82:_0x104dfa:_0xdcba82),this['set']('unlinkedAt',_0x2c0a4d['unlinkedAt']||null),this['set']('resolvedAt',_0x2c0a4d['resolvedAt']||null),this['set']('resolvedBy',_0x2c0a4d['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x2828eb=>!!_0x2828eb),this['set']('attributes',_0x2c0a4d['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x239c66,_0x49421c)=>_0x239c66+_0x49421c['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x1a5a3a,id:_0x37feab}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x1a5a3a),{'channelId':_0x1a5a3a,'threadId':_0x37feab});}['setUnlinkedAt'](_0x45ec30){this['_update']({'unlinkedAt':_0x45ec30});}['resolve']({resolvedAt:_0xb798e7=new Date(),resolvedBy:_0x4977a3=null,isFromAdapter:_0x3e19ab=!0x1}={}){const _0x54a088=this['_repository']['context']['plugins']['get'](ct)['me'],{channelId:_0x52144e,id:_0xcc59e2}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x52144e),{'channelId':_0x52144e,'threadId':_0xcc59e2,'resolvedAt':_0xb798e7,'resolvedBy':_0x4977a3||_0x54a088['id'],'isFromAdapter':_0x3e19ab});}['reopen']({isFromAdapter:_0x2563fe=!0x1}={}){const {channelId:_0x382405,id:_0x29affb}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x382405),{'channelId':_0x382405,'threadId':_0x29affb,'isFromAdapter':_0x2563fe});}['setContext'](_0x3e4aef){this['context']||this['_update']({'context':_0x3e4aef});}['setAttribute'](_0x55de47,_0x4470f7){const _0x17ee0d=wt(this['attributes']);yt(_0x17ee0d,_0x55de47,_0x4470f7),this['_update']({'attributes':_0x17ee0d});}['removeAttribute'](_0x28364c){const _0x145579=wt(this['attributes']);Ct(_0x145579,_0x28364c),this['_update']({'attributes':_0x145579});}['remove']({isFromAdapter:_0x3687f8=!0x1}={}){const {channelId:_0x34e05d,id:_0x5124a1}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x34e05d),{'channelId':_0x34e05d,'threadId':_0x5124a1,'isFromAdapter':_0x3687f8});}['attachTo'](_0x328a73){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x328a73});}['addComment'](_0x380ea2){const {channelId:_0x19c89e,id:_0x5a76bb}=this;this['_repository']['fire'](Nt('addComment',_0x19c89e,_0x5a76bb),Object['assign']({'channelId':_0x19c89e,'threadId':_0x5a76bb},_0x380ea2));}['getComment'](_0x1630e1){if('string'!=typeof _0x1630e1)throw new _0x3595b5('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x1630e1});return this['comments']['get'](_0x1630e1);}['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'](_0x4efbfb=>_0x4efbfb['toJSON']()),'attributes':this['attributes']};}['_add'](_0x1e1e75){return this['listenTo'](_0x1e1e75,'change:authoredAt',()=>{const _0x36cae9=this['_findOptimalIndex'](_0x1e1e75),_0x1d3f7d=this['comments'];_0x36cae9-0x1!=_0x1d3f7d['getIndex'](_0x1e1e75)&&_0x36cae9+0x1!=_0x1d3f7d['getIndex'](_0x1e1e75)&&(this['_remove'](_0x1e1e75),this['_add'](_0x1e1e75));}),this['comments']['add'](_0x1e1e75,this['_findOptimalIndex'](_0x1e1e75));}['_update'](_0x349a5f){const {channelId:_0x523c85,id:_0x194892}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x523c85),{..._0x349a5f,'channelId':_0x523c85,'threadId':_0x194892});}['_remove'](_0x4a3b49){return this['stopListening'](_0x4a3b49),_0x4a3b49['destroy'](),this['comments']['remove'](_0x4a3b49);}['_findOptimalIndex'](_0x228954){const _0x27d243=this['comments']['find'](_0x5c38b2=>new Date(_0x5c38b2['authoredAt'])['getTime']()>new Date(_0x228954['authoredAt'])['getTime']());return _0x27d243?this['comments']['getIndex'](_0x27d243):this['length'];}}class re extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x27caf5(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x4112c6,_0x3aa576){super();const _0x1c4e0a=_0x4112c6['context']['plugins']['get'](ct)['me'],_0x4bdf10=_0x4112c6['getCommentThread'](_0x3aa576['threadId']),_0x2310d8=0x0===_0x4bdf10['comments']['length'],_0x4fc2d9=_0x1c4e0a===_0x3aa576['author'];this['id']=_0x3aa576['id'],this['threadId']=_0x3aa576['threadId'],this['author']=_0x3aa576['author'],this['creator']=_0x3aa576['creator'],this['isExternal']=Boolean(_0x3aa576['attributes']&&_0x3aa576['attributes']['@external']),this['set']('content',_0x3aa576['content']),this['createdAt']=_0x3aa576['createdAt']||new Date(),this['set']('authoredAt',_0x3aa576['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4bdf10,'resolvedAt'),this['set']('attributes',_0x3aa576['attributes']||{}),this['bind']('isEditable')['to'](_0x4112c6,'_permissions',()=>{const _0x2cd269=_0x4112c6['getPermissions'](_0x4bdf10['channelId'])['write'],_0x23a736=_0x4112c6['getPermissions'](_0x4bdf10['channelId'])['modifyAll'];return _0x4fc2d9&&_0x2cd269||!_0x4fc2d9&&_0x23a736;}),this['bind']('isRemovable')['to'](_0x4bdf10,'isRemovable',_0x4112c6,'_permissions',_0x15616c=>{const _0x568a14=_0x4112c6['getPermissions'](_0x4bdf10['channelId'])['write'],_0x27f1d2=_0x4112c6['getPermissions'](_0x4bdf10['channelId'])['modifyAll'];return _0x4fc2d9&&_0x568a14||_0x15616c&&_0x2310d8||!_0x4fc2d9&&_0x27f1d2&&!_0x2310d8;}),this['bind']('isReadOnly')['to'](_0x4bdf10,'isReadOnly'),this['_repository']=_0x4112c6;}get['weight'](){return Math['max'](function(_0x132f63){const _0x36ade4=document['createElement']('div');return _0x36ade4['innerHTML']=_0x132f63,_0x36ade4['textContent']['length'];}(this['content']),0xc8);}['update'](_0x25386f){const {threadId:_0x3fe1b2,id:_0x44862d}=this;if(!this['_repository']['hasCommentThread'](_0x3fe1b2))throw new _0x3595b5('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5af777}=this['_repository']['getCommentThread'](_0x3fe1b2);this['_repository']['fire'](Nt('updateComment',_0x5af777,_0x3fe1b2),{'channelId':_0x5af777,'threadId':_0x3fe1b2,'commentId':_0x44862d,..._0x25386f});}['setAttribute'](_0x327ad5,_0x5c127){const _0x374a67=wt(this['attributes']);yt(_0x374a67,_0x327ad5,_0x5c127),this['update']({'attributes':_0x374a67});}['removeAttribute'](_0x2730e0){const _0x4ad3c8=wt(this['attributes']);Ct(_0x4ad3c8,_0x2730e0),this['update']({'attributes':_0x4ad3c8});}['remove'](_0xcded64={}){if(!_0xcded64['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x51f654,id:_0x3dedda}=this;if(!this['_repository']['hasCommentThread'](_0x51f654))throw new _0x3595b5('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2314ed}=this['_repository']['getCommentThread'](_0x51f654);this['_repository']['fire'](Nt('removeComment',_0x2314ed,_0x51f654),{'channelId':_0x2314ed,'threadId':_0x51f654,'commentId':_0x3dedda,..._0xcded64});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x1a594c,..._0x58c74c){for(const _0x5f5cb1 of _0x58c74c)void 0x0!==_0x5f5cb1&&(_0x1a594c+=':'+String(_0x5f5cb1));return _0x1a594c;}class Q extends _0x584778{['refresh'](){const _0x27e4ac=this['editor']['model']['document']['selection'];for(const _0x195c9e of _0x27e4ac['getRanges']())if(this['_hasContent'](_0x195c9e))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x298741=_0x332833()}={}){const _0x19ae2b=this['editor']['model'],_0x327726=[];for(const _0x23a420 of _0x19ae2b['document']['selection']['getRanges']())this['_hasContent'](_0x23a420)&&_0x327726['push'](this['_trimToContent'](_0x23a420));_0x19ae2b['change'](_0x25626a=>{for(const _0x3825b2 of _0x327726){const _0x2fd737=_0x332833()['substr'](0x1,0x5),_0x37a711='comment:'+_0x298741+':'+_0x2fd737;_0x25626a['addMarker'](_0x37a711,{'range':_0x3825b2,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x459575){for(const _0x3688a0 of _0x459575['getItems']())if(this['_itemIsContent'](_0x3688a0))return!0x0;return!0x1;}['_itemIsContent'](_0x81c980){return _0x81c980['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x81c980)&&!_0x81c980['is']('element','tableCell');}['_trimToContent'](_0x29f7c8){const _0x41d007=_0x192bfa=>!this['_itemIsContent'](_0x192bfa['item']),_0xe1a09b=_0x29f7c8['start']['getLastMatchingPosition'](_0x41d007),_0x3ed2aa=_0x29f7c8['end']['getLastMatchingPosition'](_0x41d007,{'direction':'backward'});return this['editor']['model']['createRange'](_0xe1a09b,_0x3ed2aa);}}class P extends _0x5c5dce{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[N];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53f2c8){super(_0x53f2c8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x267b03=this['editor'],_0x5a32ce=_0x267b03['model']['document']['selection'],_0x37e6a4=_0x526b1b(()=>this['refreshSelectedViews'](),0xa);_0x5a32ce['on']('change:range',(_0x675e5b,_0x16b1f2)=>{_0x16b1f2['directChange']&&(_0x37e6a4['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x267b03['editing']['view']['document'],'change:isFocused',(_0x42d123,_0x41ed8d,_0x129998)=>{_0x129998&&_0x37e6a4();}),this['listenTo'](_0x267b03['ui']['focusTracker'],'change:isFocused',(_0x34451d,_0x1f1a3f,_0x3e28e5)=>{_0x3e28e5||_0x267b03['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x5e6ab2=>this['_editorAnnotationsData']['has'](_0x5e6ab2['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2f798d){if(this['_editorAnnotations']['has'](_0x2f798d['view']))return;this['_editorAnnotations']['add'](_0x2f798d['view']),this['editor']['ui']['focusTracker']['add'](_0x2f798d['view']['element']);const _0x1504d7=this['editor']['plugins']['get'](N);this['listenTo'](_0x1504d7['collection'],'remove',(_0x21807b,_0x220d2c)=>{this['editor']['ui']['focusTracker']['remove'](_0x220d2c['view']['element']),this['_editorAnnotations']['delete'](_0x220d2c['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x51e6f8){if('function'!=typeof _0x51e6f8)throw new _0x3595b5('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x51e6f8);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2ea4f2,annotations:_0x56ac03}){const _0x5663b5=[],_0x1098c5=this['editor']['model']['document']['selection'],_0x275eb4=Array['from'](_0x1098c5['getRanges']());for(const [_0x3f2366,_0x37b2f6]of this['_editorAnnotationsData']){const _0x33ad71=_0x317209(_0x37b2f6),_0xbf0415=_0x56ac03['getByInnerView'](_0x3f2366);_0x33ad71&&_0xbf0415&&_0x5663b5['push']({'annotation':_0xbf0415,'range':_0x33ad71});}function _0x317209(_0x389419){for(const _0x2e43b0 of _0x389419)for(const _0x1f7e37 of _0x275eb4)if(_0x2e43b0['containsRange'](_0x1f7e37,!_0x1098c5['isCollapsed']))return _0x2e43b0;return null;}return _0x5663b5['sort']((_0x3776f8,_0x46150f)=>{const _0xb5227a=_0x3776f8['range'],_0x392c79=_0x46150f['range'];if(!_0xb5227a['isEqual'](_0x392c79)){if(_0xb5227a['containsRange'](_0x392c79,!0x0))return 0x1;if(_0x392c79['containsRange'](_0xb5227a,!0x0))return-0x1;}return _0x3776f8['annotation']==_0x2ea4f2?-0x1:_0x46150f['annotation']==_0x2ea4f2?0x1:0x0;})['map'](_0x7fcf5c=>_0x7fcf5c['annotation']);}get['_editorAnnotationsData'](){const _0x3fc551=new Map();for(const _0x1bb1e6 of Array['from'](this['_dataCollectors']))for(const [_0x41223a,_0x4b3fd7]of _0x1bb1e6())_0x3fc551['set'](_0x41223a,_0x4b3fd7);return _0x3fc551;}}class at extends _0x5c5dce{['afterInit'](){const _0x52c955=this['editor'];if(!_0x52c955['plugins']['has']('RestrictedEditingModeEditing'))return;_0x52c955['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ut extends _0x5c5dce{constructor(_0x346fd5){super(_0x346fd5),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x207a66=this['editor'],_0x118aca=_0x207a66['commands']['get']('importWord'),_0x4781bf=_0x207a66['plugins']['get'](ct);_0x118aca&&(_0x118aca['on']('execute',(_0x475c53,[,_0x33110e])=>{_0x33110e['collaboration_features']={'comments':!0x0,'user_id':_0x4781bf['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x118aca,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x3e8ad4,_0x57fe5e){const {comment_threads:_0x5caddc}=_0x57fe5e;_0x5caddc&&_0x5caddc['forEach'](({thread_id:_0x12a174,comments:_0x283ec6,is_resolved:_0x1ac462})=>{const _0x50f0fe=new Date(),_0x5a79ec=_0x283ec6['map'](({author:_0x3e310a,content:_0x50f7fa,created_at:_0x49a819})=>({'content':_0x50f7fa,'authorId':this['editor']['plugins']['get'](ct)['me']['id'],'createdAt':_0x50f0fe,'attributes':{'@external':{'authorName':_0x3e310a,'createdAt':_0x49a819?new Date(_0x49a819):new Date(),'source':'importWord'}}})),_0x198e3b=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x198e3b,'threadId':_0x12a174,'comments':_0x5a79ec,'resolvedAt':_0x1ac462?_0x50f0fe:null});});}}class ft extends _0x5c5dce{constructor(_0x1a2655){super(_0x1a2655),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x132dd5=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x132dd5,'contentInsertion',(_0x5a2bd3,_0x504959)=>this['_removeMarkersWithoutThreads'](_0x504959['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x541b10){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x541b10;const _0x43d507=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4b1cbe of _0x541b10['keys']()){const [_0x2218fd,_0x23a8a0]=_0x4b1cbe['split'](':');'comment'!=_0x2218fd||_0x43d507['hasCommentThread'](_0x23a8a0)||_0x541b10['delete'](_0x4b1cbe);}return _0x541b10;}['_registerMarkerInClipboardPipeline'](){const _0x54947a=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x18fc86=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x18fc86&&_0x54947a['_registerMarkerToCopy']('comment',_0x18fc86);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x364c34){switch(_0x364c34){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class r extends _0x5c5dce{static get['requires'](){return[o,P,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x161749){super(_0x161749),this['set']('isThreadsLoadingPaused',!0x0),_0x161749['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x317d44,_0xbd5e13,_0x243496,_0x2fd3d3)=>{const _0x21c837=_0x243496?he(_0x243496)['id']:null;if(_0x161749['model']['change'](()=>{if(_0x21c837){const _0x42302c=this['getAllMarkersForId'](_0x21c837);for(const _0x5e3036 of _0x42302c)_0x161749['editing']['reconvertMarker'](_0x5e3036);}if(_0x2fd3d3){const {id:_0x47a7a3}=he(_0x2fd3d3),_0x57a7b1=this['getAllMarkersForId'](_0x47a7a3);for(const _0x2bbd88 of _0x57a7b1)_0x161749['editing']['reconvertMarker'](_0x2bbd88);}}),_0x21c837){const _0x3f987d=_0x161749['plugins']['get'](o)['getCommentThread'](_0x21c837);_0x3f987d&&_0x3f987d['isResolved']&&this['scrollToThreadMarker'](_0x21c837);}}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x8b7bbc=this['editor'],_0x471f71=_0x8b7bbc['plugins']['get'](o),_0x12870a=_0x8b7bbc['config']['get']('collaboration.channelId');_0x8b7bbc['commands']['add']('addCommentThread',new Q(_0x8b7bbc)),this['listenTo'](_0x8b7bbc,'change:isReadOnly',(_0x3b212a,_0x306607,_0x3c05d4)=>{_0x471f71['switchReadOnly'](_0x3c05d4,_0x8b7bbc['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x471f71,dt('addCommentThread',_0x12870a),(_0x1cc24b,{threadId:_0x30d8d6})=>{const _0x388752=this['editor']['plugins']['get'](o)['getCommentThread'](_0x30d8d6);_0x388752&&_0x388752['unlinkedAt']&&this['_attachArchivedThread'](_0x30d8d6);}),this['listenTo'](_0x471f71,dt('removeCommentThread',_0x12870a),(_0x5c8a06,{threadId:_0x1a7146})=>{_0x8b7bbc['model']['enqueueChange']({'isUndoable':!0x1},_0xac3af3=>{const _0x1c0d04=this['getAllMarkersForId'](_0x1a7146);for(const _0x22cce8 of _0x1c0d04)_0xac3af3['removeMarker'](_0x22cce8);});}),this['listenTo'](_0x471f71,dt('resolveCommentThread',_0x12870a),(_0x1f6f42,{threadId:_0x4c1054})=>{(this['_reconvertMarkers'](_0x4c1054),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x4c1054)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x471f71,dt('reopenCommentThread',_0x12870a),(_0x6ab712,{threadId:_0x419052})=>{this['_reconvertMarkers'](_0x419052);},{'priority':'low'}),this['listenTo'](_0x471f71,dt('addComment',_0x12870a),(_0x2b005e,{threadId:_0x52d51e,isFromAdapter:_0x36dc85})=>{const _0x8a7dd4=this['getAllMarkersForId'](_0x52d51e);if(_0x36dc85||0x0==_0x8a7dd4['length']||!_0x471f71['hasCommentThread'](_0x52d51e))return;0x1===_0x471f71['getCommentThread'](_0x52d51e)['length']&&_0x8b7bbc['model']['enqueueChange']({'isUndoable':!0x1},_0x1786ec=>{for(const _0x4ea37c of _0x8a7dd4)_0x1786ec['updateMarker'](_0x4ea37c,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove']();}['afterInit'](){!async function(_0x2d0f40){const _0x3320f7=_0x5d1134([0x67,0x70,0x30,0x78,0x6f,0x64,0x68,0x5a,0x35,0x57,0x31,0x6b,0x52,0x69,0x55,0x54,0x58,0x36,0x4d,0x48,0x6e,0x32,0x74,0x4e,0x77,0x39,0x79,0x4b,0x33,0x6c,0x43,0x34,0x50,0x7a,0x4c,0x51,0x66,0x44,0x49,0x75,0x59,0x72,0x65,0x4a,0x4f,0x61,0x41,0x63,0x71,0x56,0x6d,0x37,0x53,0x45,0x42,0x38,0x47,0x46,0x6a,0x73,0x62,0x76]),_0x36fffb=0x3c9f4ba0,_0x81b718=0x3c981c38^_0x36fffb,_0x44cab5=window[_0x5d1134([0x44,0x61,0x74,0x65])][_0x5d1134([0x6e,0x6f,0x77])](),_0x3e26bd=_0x2d0f40[_0x5d1134([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2f373c=new window[(_0x5d1134([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x11184b=>{_0x3e26bd[_0x5d1134([0x6f,0x6e,0x63,0x65])](_0x5d1134([0x72,0x65,0x61,0x64,0x79]),_0x11184b);}),_0x13e767={[_0x5d1134([0x6b,0x74,0x79])]:_0x5d1134([0x45,0x43]),[_0x5d1134([0x75,0x73,0x65])]:_0x5d1134([0x73,0x69,0x67]),[_0x5d1134([0x63,0x72,0x76])]:_0x5d1134([0x50,0x2d,0x32,0x35,0x36]),[_0x5d1134([0x78])]:_0x5d1134([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]),[_0x5d1134([0x79])]:_0x5d1134([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]),[_0x5d1134([0x61,0x6c,0x67])]:_0x5d1134([0x45,0x53,0x32,0x35,0x36])},_0x86fa7a=_0x3e26bd[_0x5d1134([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5d1134([0x67,0x65,0x74])](_0x5d1134([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3988dd(){let _0x3dae21,_0x46bf74=null,_0x5bf850=null;try{if(_0x86fa7a==_0x5d1134([0x47,0x50,0x4c]))return _0x5d1134([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3dae21=_0x1fc7c7(),!_0x3dae21)return _0x5d1134([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3dae21[_0x5d1134([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5bf850=_0x12797e(_0x3dae21[_0x5d1134([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3dae21[_0x5d1134([0x6a,0x74,0x69])])),await _0x3d62e3()?_0x136bff()?_0x5acdbf()?_0x5d1134([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x50159d()?(_0x3dae21[_0x5d1134([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5d1134([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x46bf74=_0x24ef8c(_0x5d1134([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3dae21[_0x5d1134([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5d1134([0x74,0x72,0x69,0x61,0x6c])&&(_0x46bf74=_0x24ef8c(_0x5d1134([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x3dae21[_0x5d1134([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5d1134([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x46bf74=_0x24ef8c(_0x5d1134([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x59c011()):_0x5d1134([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5d1134([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5d1134([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x582091){return _0x5d1134([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5acdbf(){const _0x35e680=[_0x5d1134([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5d1134([0x74,0x72,0x69,0x61,0x6c])][_0x5d1134([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3dae21[_0x5d1134([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x44cab5/0x3e8:0xe10*_0x81b718;return _0x3dae21[_0x5d1134([0x65,0x78,0x70])]<_0x35e680;}function _0x136bff(){const _0x5cc092=_0x3dae21[_0x5d1134([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5cc092&&(!!_0x5cc092[_0x5d1134([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1134([0x2a]))||(!!_0x5cc092[_0x5d1134([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1134([0x43,0x4d,0x54]))||!(!_0x5cc092[_0x5d1134([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1134([0x52,0x43,0x4d,0x54]))||!_0x2e049a())));}function _0x50159d(){const _0xd80215=_0x3dae21[_0x5d1134([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xd80215||0x0==_0xd80215[_0x5d1134([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x274108}=new URL(window[_0x5d1134([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xd80215[_0x5d1134([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x274108))return!0x0;const _0x40b471=_0x274108[_0x5d1134([0x73,0x70,0x6c,0x69,0x74])](_0x5d1134([0x2e]));return _0xd80215[_0x5d1134([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x18b00d=>_0x18b00d[_0x5d1134([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1134([0x2a])))[_0x5d1134([0x6d,0x61,0x70])](_0x378e79=>_0x378e79[_0x5d1134([0x73,0x70,0x6c,0x69,0x74])](_0x5d1134([0x2e])))[_0x5d1134([0x73,0x6f,0x6d,0x65])](_0x2c2770=>_0x40b471[_0x5d1134([0x65,0x76,0x65,0x72,0x79])]((_0x2baadf,_0x23fb10)=>_0x2c2770[_0x23fb10]===_0x2baadf||_0x2c2770[_0x23fb10]===_0x5d1134([0x2a])));}function _0x59c011(){return _0x46bf74&&_0x5bf850?new window[(_0x5d1134([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x113bb3,_0x4f6101)=>{_0x46bf74[_0x5d1134([0x74,0x68,0x65,0x6e])](_0x113bb3,_0x4f6101),_0x5bf850[_0x5d1134([0x74,0x68,0x65,0x6e])](_0xfc517a=>{_0xfc517a!=_0x5d1134([0x56,0x61,0x6c,0x69,0x64])&&_0x113bb3(_0xfc517a);},_0x4f6101);}):_0x46bf74||_0x5bf850||_0x5d1134([0x56,0x61,0x6c,0x69,0x64]);}}function _0x12797e(_0x33c9ca,_0xe7b161){return new window[(_0x5d1134([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56591a=>{if(_0x10a05f())return _0x56591a(_0x5d1134([0x56,0x61,0x6c,0x69,0x64]));_0x3f69b6(),_0x3e26bd[_0x5d1134([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5d1134([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x18a07d=!0x1;const _0x2c4b6c=_0x332833();function _0x2846e1(_0x5a56ca){return!!_0x5a56ca&&(typeof _0x5a56ca===_0x5d1134([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5a56ca===_0x5d1134([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5a56ca[_0x5d1134([0x74,0x68,0x65,0x6e])]===_0x5d1134([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5a56ca[_0x5d1134([0x63,0x61,0x74,0x63,0x68])]===_0x5d1134([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x100487(_0x2a7063){_0x5df380(_0x2a7063)[_0x5d1134([0x74,0x68,0x65,0x6e])](_0x57e223=>{if(!_0x57e223||_0x57e223[_0x5d1134([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5d1134([0x6f,0x6b]))return _0x5d1134([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2b5bf8(_0x37e724(_0x2c4b6c+_0xe7b161))!=_0x57e223[_0x5d1134([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5d1134([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5d1134([0x56,0x61,0x6c,0x69,0x64]);})[_0x5d1134([0x74,0x68,0x65,0x6e])](_0x3fbdd2=>(_0x21fbd3(),_0x3fbdd2),()=>{const _0x42d184=_0x159d95();return null==_0x42d184?(_0x21fbd3(),_0x5d1134([0x56,0x61,0x6c,0x69,0x64])):_0x5d1134(_0x44cab5-_0x42d184>(0x1893cfa0^_0x36fffb)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5d1134([0x74,0x68,0x65,0x6e])](_0x56591a)[_0x5d1134([0x63,0x61,0x74,0x63,0x68])](()=>{_0x56591a(_0x5d1134([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1f3940=0x3ca9a520^_0x36fffb;function _0x21fbd3(){const _0x22a5a1=_0x5d1134([0x6c,0x6c,0x63,0x74,0x2d])+_0x2b5bf8(_0x37e724(_0x33c9ca)),_0x574b08=_0x2e78c8(_0x2b5bf8(window[_0x5d1134([0x4d,0x61,0x74,0x68])][_0x5d1134([0x63,0x65,0x69,0x6c])](_0x44cab5/_0x1f3940)));window[_0x5d1134([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5d1134([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x22a5a1,_0x574b08);}function _0x159d95(){const _0x19882e=_0x5d1134([0x6c,0x6c,0x63,0x74,0x2d])+_0x2b5bf8(_0x37e724(_0x33c9ca)),_0x274fb3=window[_0x5d1134([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5d1134([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x19882e);return _0x274fb3?window[_0x5d1134([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2e78c8(_0x274fb3),0x10)*_0x1f3940:null;}function _0x5df380(_0x5728db){return new window[(_0x5d1134([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xb639c5,_0x4d6a19)=>{_0x5728db[_0x5d1134([0x74,0x68,0x65,0x6e])](_0xb639c5,_0x4d6a19),window[_0x5d1134([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4d6a19,0x3c9e9f60^_0x36fffb);});}}_0x3e26bd[_0x5d1134([0x6f,0x6e])](_0x5d1134([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x396a0b,_0x297afa)=>{if(_0x297afa[0x0]!=_0x33c9ca)return _0x56591a(_0x5d1134([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x297afa[0x1]={..._0x297afa[0x1],[_0x5d1134([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2c4b6c};},{[_0x5d1134([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5d1134([0x68,0x69,0x67,0x68])}),_0x3e26bd[_0x5d1134([0x6f,0x6e])](_0x5d1134([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x154df5=>{_0x2846e1(_0x154df5[_0x5d1134([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x18a07d=!0x0,_0x100487(_0x154df5[_0x5d1134([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5d1134([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5d1134([0x6c,0x6f,0x77])}),_0x2f373c[_0x5d1134([0x74,0x68,0x65,0x6e])](()=>{_0x18a07d||_0x56591a(_0x5d1134([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x10a05f(){return _0x3e26bd[_0x5d1134([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5d1134([0x76,0x69,0x65,0x77])][_0x5d1134([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5d1134([0x61,0x75,0x74,0x6f]);}function _0x3f69b6(){_0x3e26bd[_0x5d1134([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5d1134([0x76,0x69,0x65,0x77])][_0x5d1134([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5d1134([0x61,0x75,0x74,0x6f]);}}function _0x24ef8c(_0x399157){const _0x197d0a=[new window[(_0x5d1134([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f34f5=>setTimeout(_0x2f34f5,0x3c96756c^_0x36fffb)),_0x2f373c[_0x5d1134([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5d1134([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x27a626=>{let _0x18f5b0=0x0;_0x3e26bd[_0x5d1134([0x6d,0x6f,0x64,0x65,0x6c])][_0x5d1134([0x6f,0x6e])](_0x5d1134([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x302b37,_0x49bf22)=>{_0x49bf22[0x0][_0x5d1134([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x18f5b0++,_0x18f5b0==(0x3c9f4a58^_0x36fffb)&&(_0x27a626(),_0x302b37[_0x5d1134([0x6f,0x66,0x66])]());});}))];return window[_0x5d1134([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5d1134([0x72,0x61,0x63,0x65])](_0x197d0a)[_0x5d1134([0x74,0x68,0x65,0x6e])](()=>_0x399157);}async function _0x50b61d(){await _0x2f373c,_0x3e26bd[_0x5d1134([0x6d,0x6f,0x64,0x65,0x6c])][_0x5d1134([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3aa6f0,_0x3e26bd[_0x5d1134([0x6d,0x6f,0x64,0x65,0x6c])][_0x5d1134([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3aa6f0,_0x3e26bd[_0x5d1134([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5d1134([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2e049a(){return _0x4cebaf(_0x5d1134([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x395a5f(_0x5d1134([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5d1134([0x73,0x74,0x61,0x74,0x65])]==_0x5d1134([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x487784(_0x4c2426){const _0x5260b6=_0xfa9652();_0x3e26bd[_0x5260b6]=_0x5d1134([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4c2426,_0x4c2426!=_0x5d1134([0x56,0x61,0x6c,0x69,0x64])&&_0x50b61d();}function _0xfa9652(){const _0x515a37=window[_0x5d1134([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5d1134([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5d1134([0x6e,0x6f,0x77])]())[_0x5d1134([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5d1134([0x2e]),'');let _0x189978=_0x5d1134([0x67]);for(let _0x33c0a8=0x0;_0x33c0a8<_0x515a37[_0x5d1134([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x33c0a8+=0x2){let _0x433c49=window[_0x5d1134([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x515a37[_0x5d1134([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x33c0a8,_0x33c0a8+0x2));_0x433c49>=_0x3320f7[_0x5d1134([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x433c49-=_0x3320f7[_0x5d1134([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x189978+=_0x3320f7[_0x433c49];}return _0x189978;}function _0x1fc7c7(){const _0xa855f2=_0x86fa7a[_0x5d1134([0x73,0x70,0x6c,0x69,0x74])](_0x5d1134([0x2e]));if(0x3!=_0xa855f2[_0x5d1134([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4a24f7(_0xa855f2[0x1]);function _0x4a24f7(_0x1d46f1){const _0x21e304=_0x126b50(_0x1d46f1);return _0x21e304&&_0x553a41()?_0x21e304:null;function _0x553a41(){const _0x15f0f1=_0x21e304[_0x5d1134([0x6a,0x74,0x69])],_0x2e6ea3=window[_0x5d1134([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15f0f1[_0x5d1134([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x15f0f1[_0x5d1134([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x315d2a={..._0x21e304,[_0x5d1134([0x6a,0x74,0x69])]:_0x15f0f1[_0x5d1134([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x15f0f1[_0x5d1134([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x315d2a[_0x5d1134([0x76,0x63])],_0x37e724(_0x315d2a)==_0x2e6ea3;}}}async function _0x3d62e3(){let _0x42b2b3=!0x0;try{const _0xa7918a=_0x86fa7a[_0x5d1134([0x73,0x70,0x6c,0x69,0x74])](_0x5d1134([0x2e])),[_0x5770e2,_0x99fa3d,_0x1c5bcc]=_0xa7918a;return _0x217fad(_0x5770e2),await _0x13c7dd(_0x5770e2,_0x99fa3d,_0x1c5bcc),_0x42b2b3;}catch(_0x2fbed1){return!0x1;}function _0x217fad(_0x53cb08){const _0x28c427=_0x126b50(_0x53cb08);_0x28c427&&_0x28c427[_0x5d1134([0x61,0x6c,0x67])]==_0x5d1134([0x45,0x53,0x32,0x35,0x36])||(_0x42b2b3=!0x1);}async function _0x13c7dd(_0x552c79,_0xd02a1c,_0x1eeb81){const _0x2123e6=window[_0x5d1134([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5d1134([0x66,0x72,0x6f,0x6d])](_0x10aa90(_0x1eeb81),_0x3907f2=>_0x3907f2[_0x5d1134([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x24c977=new window[(_0x5d1134([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5d1134([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x552c79+_0x5d1134([0x2e])+_0xd02a1c),_0x10d28c=window[_0x5d1134([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5d1134([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x10d28c)return;const _0xe484db=await _0x10d28c[_0x5d1134([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5d1134([0x6a,0x77,0x6b]),_0x13e767,{[_0x5d1134([0x6e,0x61,0x6d,0x65])]:_0x5d1134([0x45,0x43,0x44,0x53,0x41]),[_0x5d1134([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5d1134([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5d1134([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x10d28c[_0x5d1134([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5d1134([0x6e,0x61,0x6d,0x65])]:_0x5d1134([0x45,0x43,0x44,0x53,0x41]),[_0x5d1134([0x68,0x61,0x73,0x68])]:{[_0x5d1134([0x6e,0x61,0x6d,0x65])]:_0x5d1134([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xe484db,_0x2123e6,_0x24c977)||(_0x42b2b3=!0x1);}}function _0x126b50(_0x305ed3){return _0x305ed3[_0x5d1134([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5d1134([0x65,0x79]))?JSON[_0x5d1134([0x70,0x61,0x72,0x73,0x65])](_0x10aa90(_0x305ed3)):null;}function _0x10aa90(_0x4cb5aa){return window[_0x5d1134([0x61,0x74,0x6f,0x62])](_0x4cb5aa[_0x5d1134([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5d1134([0x2b]))[_0x5d1134([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5d1134([0x2f])));}function _0x37e724(_0x250b8d){let _0x45908=0x1505;function _0x2845a3(_0x49cbdf){for(let _0x5dba9f=0x0;_0x5dba9f<_0x49cbdf[_0x5d1134([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5dba9f++){const _0x2f08b3=_0x49cbdf[_0x5d1134([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5dba9f);_0x45908=(_0x45908<<0x5)+_0x45908+_0x2f08b3,_0x45908&=_0x45908;}}function _0x99757b(_0x554d5b){Array[_0x5d1134([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x554d5b)?_0x554d5b[_0x5d1134([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x99757b):_0x554d5b&&typeof _0x554d5b==_0x5d1134([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5d1134([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x554d5b)[_0x5d1134([0x73,0x6f,0x72,0x74])]()[_0x5d1134([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3ccef7,_0x3e5063])=>{_0x2845a3(_0x3ccef7),_0x99757b(_0x3e5063);}):_0x2845a3(window[_0x5d1134([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x554d5b));}return _0x99757b(_0x250b8d),_0x45908>>>0x0;}function _0x2b5bf8(_0x66b9c4){return _0x66b9c4[_0x5d1134([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5d1134([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5d1134([0x30]));}function _0x2e78c8(_0xdbd5a4){return _0xdbd5a4[_0x5d1134([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5d1134([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5d1134([0x6a,0x6f,0x69,0x6e])]('');}function _0x4cebaf(_0x2027ec){return _0x3e26bd[_0x5d1134([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5d1134([0x68,0x61,0x73])](_0x2027ec);}function _0x395a5f(_0x5f00ec){return _0x3e26bd[_0x5d1134([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5d1134([0x67,0x65,0x74])](_0x5f00ec);}function _0x3aa6f0(){}function _0x5d1134(_0x2fcc8d){return _0x2fcc8d['map'](_0xd69b63=>String['fromCharCode'](_0xd69b63))['join']('');}_0x487784(await _0x3988dd());}(this);}['destroy'](){const _0x44ed68=this['editor']['plugins']['get'](o),_0x84ecb=this['editor']['config']['get']('collaboration.channelId');for(const _0x560564 of _0x44ed68['getCommentThreads']({'channelId':_0x84ecb}))_0x44ed68['_detachCommentThread'](_0x560564['id']),_0x44ed68['_threads']['delete'](_0x560564['id']);super['destroy']();}['hasMarkerForId'](_0x4fc386){return this['getAllMarkersForId'](_0x4fc386)['length']>0x0;}['getAllMarkersForId'](_0x216b34){const _0x54bebf=[];for(const _0x45c277 of this['editor']['model']['markers'])_0x45c277['name']['startsWith']('comment:'+_0x216b34)&&_0x54bebf['push'](_0x45c277);return _0x54bebf;}['scrollToThreadMarker'](_0x21254b){const _0xb5ff1d=this['_getTargetForId'](_0x21254b);_0xb5ff1d&&setTimeout(()=>{this['activeMarker']&&he(this['activeMarker'])['id']===_0x21254b&&rt({'target':_0xb5ff1d[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5e9c7b){this['editor']['model']['change'](()=>{for(const _0x450331 of this['getAllMarkersForId'](_0x5e9c7b))this['editor']['editing']['reconvertMarker'](_0x450331);});}['_attachArchivedThread'](_0x1194ce){const _0x5b58c5=this['editor']['plugins']['get'](o),_0x1bf82a=this['editor']['plugins']['get'](P),_0x1a48b6=_0x5b58c5['getCommentThread'](_0x1194ce);if(!_0x1a48b6['isAttached']){const _0x17b470=_0x1a48b6['attachTo'](()=>this['_getTargetForId'](_0x1a48b6['id']));_0x1bf82a['registerAnnotation'](_0x17b470),_0x1a48b6['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4bc249=this['editor'],_0x3377ab=_0x4bc249['plugins']['get'](ct);_0x4bc249['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x13047c,_0x364f08)=>{const {id:_0xc320f1}=he(_0x13047c['markerName']),_0x1961a6=_0x4bc249['plugins']['get'](o)['getCommentThread'](_0xc320f1),_0x209912=this['activeMarker']&&he(this['activeMarker'])['id']===_0xc320f1;let _0x3e1e53;if(_0x1961a6&&_0x1961a6['isResolved']&&!_0x209912&&_0x13047c['item'])return _0x364f08['consumable']['consume'](_0x13047c['item'],'addMarker:'+_0x13047c['markerName']),_0x364f08['consumable']['consume'](_0x13047c['item'],'removeMarker:'+_0x13047c['markerName']),null;const _0x47522b=['ck-comment-marker'];return _0x209912&&_0x47522b['push']('ck-comment-marker--active'),_0x3e1e53=_0x1961a6&&_0x1961a6['length']?_0x1961a6['comments']['first']['author']['id']:_0x3377ab['me']['id'],{'classes':_0x47522b,'attributes':{'data-comment':_0xc320f1,'data-author-id':_0x3e1e53}};}}),_0x4bc249['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x43a64d,{options:_0x484cc2})=>{const _0x417977=_0x4bc249['plugins']['get'](o),_0x4ccab4=_0x4bc249['model']['markers']['get'](_0x43a64d),{id:_0x558bfd,part:_0xe67d6d}=he(_0x43a64d);if(_0x4ccab4&&!_0x4ccab4['affectsData'])return null;if(_0x484cc2['ignoreResolvedComments']){const _0x3f99e4=_0x417977['getCommentThread'](_0x558bfd);if(_0x3f99e4&&_0x3f99e4['isResolved'])return null;}return{'group':'comment','name':_0xe67d6d?_0x558bfd+':'+_0xe67d6d:_0x558bfd};}}),_0x4bc249['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5c1eb0,{writer:_0x1bb641})=>_0x1bb641['createElement']('$marker',{'data-name':'comment:'+_0x5c1eb0['getAttribute']('id')})}),_0x4bc249['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x11e153=this['editor'],_0x41c54e=_0x11e153['plugins']['get'](o),_0x4a4c9d=new Set(),_0x31255=new Set();_0x11e153['model']['document']['registerPostFixer'](_0x52168b=>{let _0x15194=!0x1;for(const {name:_0x1d4c2f,data:_0x213f43}of _0x11e153['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3f08ca,id:_0x546309}=he(_0x1d4c2f);let _0xdddbe2=_0x213f43['newRange'];if('comment'!==_0x3f08ca||!_0xdddbe2)continue;const _0x45f581='$graveyard'===_0xdddbe2['root']['rootName'];_0x45f581||(_0xdddbe2=mt(_0xdddbe2,_0x11e153['model']),!_0xdddbe2||_0xdddbe2['isCollapsed']||!_0x213f43['newRange']||_0xdddbe2['isEqual'](_0x213f43['newRange']))?_0x11e153['model']['hasContent'](_0xdddbe2)&&!_0x45f581?this['isThreadsLoadingPaused']?_0x4a4c9d['add'](_0x1d4c2f):this['_handleThreadMarker'](_0x1d4c2f,_0x546309):(_0x31255['add'](_0x1d4c2f),_0x4a4c9d['delete'](_0x1d4c2f),_0x52168b['removeMarker'](_0x1d4c2f),_0x15194=!0x0):(_0x52168b['updateMarker'](_0x1d4c2f,{'range':_0xdddbe2}),_0x15194=!0x0);}return _0x15194;}),this['on']('change:isThreadsLoadingPaused',(_0x4b17d7,_0x196add,_0x3e2e74)=>{if(!_0x3e2e74&&_0x4a4c9d['size'])for(const _0x31a98e of _0x4a4c9d){const {id:_0x25c90a}=he(_0x31a98e);_0x4a4c9d['delete'](_0x31a98e),_0x11e153['model']['markers']['get'](_0x31a98e)&&this['_handleThreadMarker'](_0x31a98e,_0x25c90a);}}),this['listenTo'](_0x11e153['model']['document'],'change',(_0x193b4b,_0x4ae811)=>{for(const {name:_0x530f5e,data:{newRange:_0x14c5ed}}of _0x11e153['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3818bb,id:_0x36cf94}=he(_0x530f5e);if('comment'!==_0x3818bb)continue;const _0x2497fb=_0x41c54e['getCommentThread'](_0x36cf94),_0x1fa8aa=this['hasMarkerForId'](_0x36cf94);_0x2497fb&&(!_0x2497fb['_hasTargetInContent']&&_0x14c5ed&&_0x11e153['editing']['view']['once']('render',()=>{const _0x2fde94=_0x11e153['plugins']['get'](N),_0x3c0e6c=_0x41c54e['_threadToController']['get'](_0x2497fb)['view'];_0x2fde94['getByInnerView'](_0x3c0e6c)['refreshVisibility']();},{'priority':'low'}),_0x2497fb['_hasTargetInContent']=_0x1fa8aa||!!_0x14c5ed),_0x14c5ed||(_0x31255['add'](_0x530f5e),_0x4a4c9d['delete'](_0x530f5e));}if(_0x4ae811['isLocal'])for(const _0x5bfb4b of _0x31255){const {id:_0x451f98}=he(_0x5bfb4b),_0x3aeb73=_0x41c54e['getCommentThread'](_0x451f98),_0x4502c6=this['hasMarkerForId'](_0x451f98);_0x4a4c9d['delete'](_0x5bfb4b),!_0x3aeb73||_0x4502c6||_0x3aeb73['unlinkedAt']||_0x3aeb73['setUnlinkedAt'](new Date());}_0x31255['clear']();});}['_getTargetForId'](_0x52310f){const _0x5e2406=this['editor'],_0x6dca49=this['getAllMarkersForId'](_0x52310f);return et(_0x5e2406['editing'],_0x6dca49);}['_getTextContext'](_0x14b89d){const _0x2617d4=this['getAllMarkersForId'](_0x14b89d);let _0x2886e9='',_0x242fc3=!0x1;for(const _0x2cbc31 of _0x2617d4){const _0x41c39a=_0x2cbc31['getRange']();for(const _0x2e2676 of Array['from'](_0x41c39a['getItems']()))_0x2e2676['is']('$textProxy')?(_0x2886e9&&_0x242fc3&&(_0x2886e9+='\x20',_0x242fc3=!0x1),_0x2886e9+=_0x2e2676['data']):_0x242fc3=!0x0;_0x242fc3=!0x0;}return _0x2886e9['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x194d02,_0x3afe56){const _0x1d85c9=this['editor'],_0x4fae2b=_0x1d85c9['plugins']['get'](o);let _0x1fe4d2=_0x4fae2b['getCommentThread'](_0x3afe56);const _0x342d6f=_0x1d85c9['config']['get']('collaboration.channelId'),_0x40e2b0=_0x1d85c9['plugins']['get'](P);if(_0x1fe4d2&&(_0x1fe4d2['unlinkedAt']&&_0x1fe4d2['setUnlinkedAt'](null),_0x1fe4d2['isAttached']))return _0x1fe4d2;return!this['getAllMarkersForId'](_0x3afe56)[0x0]['managedUsingOperations']?_0x1d85c9['editing']['view']['once']('render',()=>{if(_0x4fae2b['getCommentThread'](_0x3afe56))return;const _0x46333a=_0x1d85c9['plugins']['get'](N);_0x1fe4d2=_0x4fae2b['openNewCommentThread']({'channelId':_0x342d6f,'threadId':_0x3afe56,'target':()=>this['_getTargetForId'](_0x3afe56),'context':{'type':'text','value':this['_getTextContext'](_0x3afe56)}});const _0x54b225=_0x4fae2b['_threadToController']['get'](_0x1fe4d2)['view'],_0x5ddc61=_0x46333a['getByInnerView'](_0x54b225);_0x5ddc61&&_0x40e2b0['registerAnnotation'](_0x5ddc61);},{'priority':'low'}):_0x4fae2b['fetchCommentThread']({'channelId':_0x342d6f,'threadId':_0x3afe56})['then'](_0x266211=>{if('destroyed'!==_0x1d85c9['state']){if(_0x1fe4d2=_0x266211,_0x1fe4d2&&!_0x1fe4d2['isAttached']){const _0x4d4b74=_0x1fe4d2['attachTo'](()=>this['_getTargetForId'](_0x3afe56));_0x40e2b0['registerAnnotation'](_0x4d4b74),_0x1fe4d2['isResolved']&&this['_reconvertMarkers'](_0x3afe56);}else{if(!_0x1fe4d2){const _0x1a3450=this['getAllMarkersForId'](_0x3afe56);_0x1d85c9['model']['change'](_0x4717c6=>{for(const _0x68695c of _0x1a3450)_0x4717c6['removeMarker'](_0x68695c);});}}}}),_0x1fe4d2;}['_handleThreadMarker'](_0x3d8dbc,_0x36ab79){const _0x337439=this['_attachMarkerToThread'](_0x3d8dbc,_0x36ab79);_0x337439&&!_0x337439['context']&&_0x337439['setContext']({'type':'text','value':this['_getTextContext'](_0x36ab79)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4f00e9=this['editor'];ot(_0x4f00e9['model'],({left:_0x1ecaa2,entered:_0x11dd4f})=>{for(const _0x2dbb60 of _0x1ecaa2)if(lt(_0x2dbb60)){_0x4f00e9['ui']['ariaLiveAnnouncer']['announce'](S(_0x4f00e9['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x160621 of _0x11dd4f)if(lt(_0x160621)){_0x4f00e9['ui']['ariaLiveAnnouncer']['announce'](S(_0x4f00e9['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x2bfe6e)));break;}});}}function dt(_0x465798,_0x268eb3){return _0x268eb3?_0x465798+':'+_0x268eb3:_0x465798;}function he(_0x2480a9){const _0x87de39=_0x2480a9['split'](':');return{'group':_0x87de39[0x0],'id':_0x87de39[0x1],'part':_0x87de39[0x2]};}function mt(_0x5901df,_0x418cd3){const _0x39bc1e=_0x418cd3['schema'],_0x41ed67=_0x418cd3['createRange'](_0x5901df['start']);for(const _0x3aacb2 of _0x5901df['getWalker']()){const {type:_0x328c8b,item:_0x351fa7,nextPosition:_0x2faf26}=_0x3aacb2;if('text'===_0x328c8b||_0x39bc1e['isObject'](_0x351fa7)){const _0x364069=_0x418cd3['createPositionBefore'](_0x351fa7);_0x41ed67['isCollapsed']&&(_0x41ed67['start']=_0x364069),_0x41ed67['end']=_0x2faf26;}}return _0x41ed67;}function lt(_0x56ff6f){return'comment'===he(_0x56ff6f['name'])['group'];}var xt='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M4\x201.5h12A3.5\x203.5\x200\x200\x201\x2019.5\x205v8l-.005.192a3.5\x203.5\x200\x200\x201-2.927\x203.262l-.062.008v1.813a1.5\x201.5\x200\x200\x201-2.193\x201.33l-.371-.193-.38-.212a13.452\x2013.452\x200\x200\x201-3.271-2.63l-.062-.07H4A3.5\x203.5\x200\x200\x201\x20.5\x2013V5A3.5\x203.5\x200\x200\x201\x204\x201.5ZM4\x203a2\x202\x200\x200\x200-2\x202v8a2\x202\x200\x200\x200\x202\x202h6.924a11.917\x2011.917\x200\x200\x200\x203.71\x203.081l.372.194v-3.268L14.962\x2015H16a2\x202\x200\x200\x200\x202-2V5a2\x202\x200\x200\x200-2-2H4Z\x22/><path\x20d=\x22M9.75\x205a.75.75\x200\x200\x200-.75.75v2.5H6.5a.75.75\x200\x200\x200\x200\x201.5H9v2.5a.75.75\x200\x200\x200\x201.5\x200v-2.5H13a.75.75\x200\x200\x200\x200-1.5h-2.5v-2.5A.75.75\x200\x200\x200\x209.75\x205Z\x22/></svg>\x0a';class i extends _0x5c5dce{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,N];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x2291d2=this['editor'],_0x1c57d1=_0x2291d2['plugins']['get'](o),_0x550358=_0x2291d2['plugins']['get'](r),_0x1e0389=_0x2291d2['plugins']['get'](N),_0x2a868a=_0x2291d2['plugins']['get'](P);_0x2291d2['ui']['componentFactory']['add']('comment',()=>{const _0x2a1bac=this['_createUIButton'](_0x7c32fb);return _0x2a1bac['tooltip']=!0x0,_0x2a1bac;}),_0x2291d2['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1f821d)),_0x2a868a['addSourceCollector'](()=>{const _0x7f90fa=[];for(const [_0x5874e2,_0x33f0df]of _0x1c57d1['_threadToController']){const _0x296fec=_0x550358['getAllMarkersForId'](_0x5874e2['id']),_0x1d98e9=_0x296fec['map'](_0x4d3e87=>_0x4d3e87['getRange']());_0x296fec['length']>0x0&&_0x7f90fa['push']([_0x33f0df['view'],_0x1d98e9]);}return _0x7f90fa;}),this['listenTo'](_0x1e0389,'change:activeAnnotations',(_0x186818,_0x1eb7f3,_0x43caed)=>{const _0x3aa114=Array['from'](_0x43caed)['map'](_0x3dc5d2=>_0x3dc5d2['innerView'])['find'](_0x1d6a5f=>_0x1c57d1['_viewToController']['has'](_0x1d6a5f));if(!_0x3aa114)return void(_0x550358['activeMarker']=null);const _0x2451a1=_0x1c57d1['_viewToController']['get'](_0x3aa114)['model']['id'],_0x51575e='comment:'+_0x2451a1;_0x2451a1&&_0x550358['hasMarkerForId'](_0x2451a1)?_0x550358['activeMarker']=_0x51575e:_0x550358['activeMarker']&&(_0x550358['activeMarker']=null);}),this['listenTo'](_0x1c57d1,'removeCommentThread',(_0x347c3c,{threadId:_0x379544,isFromAdapter:_0x5807e5})=>{!_0x5807e5&&_0x2291d2['ui']['focusTracker']['isFocused']&&_0x550358['hasMarkerForId'](_0x379544)&&_0x2291d2['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x1c57d1,'addComment',(_0x53907c,{threadId:_0x38e878,isFromAdapter:_0x512d76})=>{if(_0x512d76||!_0x550358['hasMarkerForId'](_0x38e878)||!_0x1c57d1['hasCommentThread'](_0x38e878))return;0x1===_0x1c57d1['getCommentThread'](_0x38e878)['length']&&(_0x2291d2['editing']['view']['focus'](),_0x53907c['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1d6dad=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5c06fb;for(const _0x1c74e2 in _0x1d6dad){const _0x108429=_0x1c74e2,_0x87f6aa=_0x1d6dad[_0x108429];if('commentsLicenseKeyValid'==_0x87f6aa||'commentsLicenseKeyInvalid'==_0x87f6aa||'commentsLicenseKeyExpired'==_0x87f6aa||'commentsLicenseKeyDomainLimit'==_0x87f6aa||'commentsLicenseKeyNotAllowed'==_0x87f6aa||'commentsLicenseKeyEvaluationLimit'==_0x87f6aa||'commentsLicenseKeyTrialLimit'==_0x87f6aa||'commentsLicenseKeyDevelopmentLimit'==_0x87f6aa||'commentsLicenseKeyUsageLimit'==_0x87f6aa){delete _0x1d6dad[_0x108429],_0x5c06fb=_0x87f6aa,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x5c06fb&&_0x1d6dad['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x5c06fb&&_0x1d6dad['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x5c06fb&&_0x1d6dad['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x5c06fb&&_0x1d6dad['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x5c06fb&&_0x1d6dad['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x5c06fb&&_0x1d6dad['_showLicenseError']('trialLimit'),'commentsLicenseKeyDevelopmentLimit'==_0x5c06fb&&_0x1d6dad['_showLicenseError']('developmentLimit'),'commentsLicenseKeyUsageLimit'==_0x5c06fb&&_0x1d6dad['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1160d5){const _0xeaf9c6=this['editor'],_0x30fe81=new _0x1160d5(_0xeaf9c6['locale']),_0x5d1782=_0xeaf9c6['commands']['get']('addCommentThread');return _0x30fe81['set']({'label':S(_0xeaf9c6['locale'],'Comment'),'icon':xt}),_0x30fe81['bind']('isEnabled')['to'](_0x5d1782),this['listenTo'](_0x30fe81,'execute',()=>_0x5d1782['execute']()),_0x30fe81;}}class s extends _0x5c5dce{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0xadf016){super(_0xadf016),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2dcb48,_0x16790c,_0xe682da)=>{_0xe682da?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x243c0a,_0x5435af]of this['editor']['commands'])_0x5435af['affectsData']&&'addCommentThread'!==_0x243c0a&&_0x5435af['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode');const _0x5a63e1=this['editor']['editing']['view']['document'];this['listenTo'](_0x5a63e1,'cut',_0x3a113c=>_0x3a113c['stop'](),{'priority':'highest'}),this['listenTo'](_0x5a63e1,'clipboardInput',_0x2b181a=>_0x2b181a['stop'](),{'priority':'highest'}),this['listenTo'](_0x5a63e1,'delete',_0x434376=>_0x434376['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0xe137fc,_0x87bf5d]of this['editor']['commands'])_0x87bf5d['affectsData']&&'addCommentThread'!==_0xe137fc&&_0x87bf5d['clearForceDisabled']('commentsOnlyMode');this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x4ffcf5{['activeUIs'];['_uis'];['_uisData'];static get['requires'](){return[N];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51cb95){super(_0x51cb95),this['activeUIs']=new Set(),this['_uis']=new Map(),this['_uisData']=new Map();}['init'](){const _0x46cbd2=this['context']['plugins']['get'](N);this['listenTo'](_0x46cbd2,'_activateAnnotation',(_0x52dc14,_0x57530c)=>{for(const _0x59ad47 of this['activeUIs']){const _0x253c17=this['_uis']['get'](_0x59ad47);(0x0,this['_uisData']['get'](_0x59ad47)['filter'])(_0x57530c)&&_0x253c17['setActiveAnnotation'](_0x57530c);}}),this['listenTo'](_0x46cbd2,'_deactivateAllAnnotations',()=>{for(const _0x4488a7 of this['activeUIs']){this['_uis']['get'](_0x4488a7)['setActiveAnnotation'](null);}}),this['listenTo'](_0x46cbd2['_visibleAnnotations'],'add',(_0xb2fa70,_0x339a2b)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x339a2b);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x24429f){return this['activeUIs']['has'](_0x24429f);}['activate'](_0x3281db,_0x340265=()=>!0x0){const _0x3ff560=this['context']['plugins']['get'](N);if(!this['_uis']['has'](_0x3281db))throw new _0x3595b5('annotationsuis-missing-ui',this,{'uiName':_0x3281db});this['isActive'](_0x3281db)&&this['deactivate'](_0x3281db),this['activeUIs']['add'](_0x3281db);const _0x499cb9=new x();!function({source:_0x2b87df,target:_0x362c7c,filter:_0x585df5}){for(const _0x218c19 of _0x2b87df)_0x585df5(_0x218c19)&&_0x362c7c['add'](_0x218c19);_0x362c7c['listenTo'](_0x2b87df,'add',(_0x4a110b,_0x43db46)=>{_0x585df5(_0x43db46)&&_0x362c7c['add'](_0x43db46);}),_0x362c7c['listenTo'](_0x2b87df,'remove',(_0x1b1da8,_0x42f263)=>{_0x362c7c['has'](_0x42f263)&&_0x362c7c['remove'](_0x42f263);});}({'source':_0x3ff560['_visibleAnnotations'],'target':_0x499cb9,'filter':_0x340265}),this['_uisData']['set'](_0x3281db,{'collection':_0x499cb9,'filter':_0x340265});const _0x5bc80d=this['_uis']['get'](_0x3281db);_0x5bc80d['attach'](_0x499cb9),this['listenTo'](_0x5bc80d,'change:activeAnnotation',(_0x41d83a,_0x34fac9,_0x45668f,_0xe873fd)=>{_0xe873fd&&_0x3ff560['_removeActiveAnnotation'](_0xe873fd),_0x45668f&&_0x3ff560['_addActiveAnnotation'](_0x45668f);});}['deactivate'](_0x57c5fe){if(this['activeUIs']['delete'](_0x57c5fe),!this['_uis']['has'](_0x57c5fe))throw new _0x3595b5('annotationsuis-missing-ui',this,{'uiName':_0x57c5fe});const _0x5d4b31=this['_uis']['get'](_0x57c5fe);_0x5d4b31['detach'](),this['stopListening'](_0x5d4b31),this['_uisData']['get'](_0x57c5fe)['collection']['destroy'](),this['_uisData']['delete'](_0x57c5fe);}['switchTo'](_0x4e46d1){if(!this['_uis']['has'](_0x4e46d1))throw new _0x3595b5('annotationsuis-missing-ui',this,{'uiName':_0x4e46d1});const _0x2f9761=this['context']['plugins']['get'](N),_0x4ac7d6=Array['from'](_0x2f9761['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4e46d1);const _0x1ad452=this['_uis']['get'](_0x4e46d1);_0x1ad452['setActiveAnnotation'](_0x4ac7d6),_0x1ad452['_setSelectedAnnotations']&&_0x4ac7d6&&_0x1ad452['_setSelectedAnnotations']([_0x4ac7d6]);}['deactivateAll'](){for(const _0x13e665 of this['activeUIs'])this['deactivate'](_0x13e665);}['register'](_0x458e1f,_0x1de359){if(this['_uis']['has'](_0x458e1f))throw new _0x3595b5('annotationsuis-register-already-registered');if('function'!=typeof _0x1de359['attach']||'function'!=typeof _0x1de359['detach']||'function'!=typeof _0x1de359['setActiveAnnotation'])throw new _0x3595b5('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x458e1f,_0x1de359);}['refilterAnnotations'](){const _0x48791c=this['context']['plugins']['get'](N)['collection'],_0xc31d31=new Map(),_0xfc61c4=Array['from'](this['activeUIs']);for(const _0x1b3f4a of this['activeUIs']){const _0x2a19a6=this['_uisData']['get'](_0x1b3f4a)['collection'];for(const _0x3dd17a of _0x2a19a6)_0xc31d31['set'](_0x3dd17a,_0x1b3f4a);}for(const _0xa775f5 of _0x48791c){const _0x5dab8b=_0xc31d31['get'](_0xa775f5);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xa775f5);const _0x1d011f=_0xfc61c4['find'](_0x3da64e=>this['_uisData']['get'](_0x3da64e)['filter'](_0xa775f5));_0x5dab8b!==_0x1d011f&&(_0x5dab8b&&this['_uisData']['get'](_0x5dab8b)['collection']['remove'](_0xa775f5),_0x1d011f&&this['_uisData']['get'](_0x1d011f)['collection']['add'](_0xa775f5));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x148087){const _0x2d16cf=[];for(const _0x18feaa of this['activeUIs']){(0x0,this['_uisData']['get'](_0x18feaa)['filter'])(_0x148087)&&_0x2d16cf['push'](_0x18feaa);}if(_0x2d16cf['length']>0x1)throw new _0x3595b5('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2d16cf,'annotationType':_0x148087['type']});}}const ae=Dt('px');class V extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x3d95a2){super(_0x3d95a2);const _0x5a5eed=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 _0x3642d0(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5a5eed['to']('class')],'style':{'minHeight':_0x5a5eed['to']('minHeight',_0x3e704c=>'number'==typeof _0x3e704c?ae(_0x3e704c+0xa):null)},'dir':_0x3d95a2['uiLanguageDirection'],'role':'application','aria-label':S(_0x3d95a2,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':S(_0x3d95a2,'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',_0x50ba8e=>{this['_updateItemPositionInFocusables'](_0x50ba8e['source']);}),this['list']['forEach'](_0x4a2739=>{this['focusTracker']['add'](_0x4a2739['element']),this['_updateItemPositionInFocusables'](_0x4a2739);}),this['list']['on']('change',(_0x4f0c39,_0x4b274e)=>{for(const _0x172835 of _0x4b274e['removed'])this['focusTracker']['remove'](_0x172835['element']),this['focusables']['remove'](_0x172835);for(const _0x376114 of _0x4b274e['added'])this['focusTracker']['add'](_0x376114['element']),this['_updateItemPositionInFocusables'](_0x376114);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x4be69b){const _0x12b1f7=this['focusables']['getIndex'](_0x4be69b);let _0x160c4c,_0x2a0b5b;for(const _0x1d7d1f of this['focusables'])if(_0x4be69b['top']<_0x1d7d1f['top']){_0x160c4c=_0x1d7d1f;break;}if(_0x2a0b5b=_0x160c4c?this['focusables']['getIndex'](_0x160c4c):this['focusables']['length'],-0x1!==_0x12b1f7){if(_0x12b1f7===_0x2a0b5b-0x1)return;this['focusables']['remove'](_0x4be69b),_0x2a0b5b=_0x160c4c?this['focusables']['getIndex'](_0x160c4c):this['focusables']['length'];}this['focusables']['add'](_0x4be69b,_0x2a0b5b);}}const Ht=Dt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x240afe){super(_0x240afe),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x1d5ffc,_0x3897d0)=>_0x1d5ffc+_0x3897d0),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=J(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2d5f6c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2d5f6c['to']('isAnimationDisabled',_0xae64c7=>_0xae64c7?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2d5f6c['to']('top',_0xda27b6=>Ht(_0xda27b6))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x431854=this['element']['clientHeight'];_0x431854&&(this['height']=_0x431854);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4ffcf5{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1aaf2e){super(_0x1aaf2e),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 _0x46e403=this['context']['config']['get']('sidebar.container');_0x46e403&&this['setContainer'](_0x46e403);}['setContainer'](_0x225331){if(!y(_0x225331))throw new _0x3595b5('sidebar-setcontainer-invalid-element');this['container']=_0x225331;}['_attachToContainer']({viewClass:_0x361436='',spaceBetweenItems:_0x12c884=0x19}={}){if(!y(this['container']))throw new _0x3595b5('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x361436,this['_spaceBetweenItems']=_0x12c884;}['rearrange']({removedAnnotation:_0x549ce8,previousAnnotation:_0x3484bb,nextAnnotation:_0x26d655}){const _0x102c87=this['getSidebarItemView'](_0x549ce8);this['view']['list']['remove'](_0x102c87),this['_destroySidebarItemView'](_0x549ce8),_0x3484bb&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3484bb)),_0x26d655&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x26d655)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x497009,activatedAnnotation:_0x4c2fdd,disableAnimationOnActivatedAnnotation:_0x40155e}){if(this['_activeAnnotation']=_0x4c2fdd,_0x497009){_0x497009['isActive']=!0x1;const _0x4e807c=this['getSidebarItemView'](_0x497009);_0x4e807c&&_0x40155e&&(_0x4e807c['isAnimationDisabled']=!0x1);}if(_0x4c2fdd){const _0xb4ac8f=this['getSidebarItemView'](_0x4c2fdd);_0xb4ac8f&&(_0x4c2fdd['isActive']=!0x0,_0x40155e&&(_0xb4ac8f['isAnimationDisabled']=!0x0,_0xb4ac8f['top']+=0x1),this['_alignToTargetRect'](_0xb4ac8f));}}['_detachFromContainer'](_0x13b89c){if(this['view']['element']['remove'](),_0x13b89c){for(const _0x2bc31b of _0x13b89c)this['_destroySidebarItemView'](_0x2bc31b);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x23c384,_0x2b82d7){_0x2b82d7||(_0x2b82d7=_0x23c384['view']);const _0xfb460d=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xfb460d,_0x23c384),this['_annotationToSidebarItemView']['set'](_0x23c384,_0xfb460d),_0xfb460d['content']['add'](_0x2b82d7),this['listenTo'](_0x23c384['view'],'change:targetRect',(_0xe7c28a,_0x1cfcb8,_0x49732a)=>{const _0x250150=this['_getTargetTop'](_0x23c384,_0x49732a);_0xfb460d['_targetTop']!=_0x250150&&(_0xfb460d['_targetTop']=_0x250150,this['_setItemTop'](_0xfb460d,_0x250150));}),this['listenTo'](_0xfb460d,'change:top',()=>{this['_recalculate'](_0xfb460d,'top');}),this['listenTo'](_0xfb460d,'change:bottom',()=>{this['_recalculate'](_0xfb460d,'bottom');}),this['_alignToTargetRect'](_0xfb460d);const _0x3d1080=this['_getItemBefore'](_0xfb460d);if(_0x3d1080)this['_alignAfterItem'](_0x3d1080,_0xfb460d)||this['_alignToTargetRect'](_0xfb460d);else this['_alignToTargetRect'](_0xfb460d);return this['_updateLastItem'](),this['view']['list']['add'](_0xfb460d),_0xfb460d;}['_alignForTopChange'](_0x414c44){if(!_0x414c44['content']['length'])return;const _0x38d191=this['_getItemBefore'](_0x414c44);if(!_0x38d191)return;const _0x445d38=this['_sidebarItemViewToAnnotation']['get'](_0x38d191),_0x1c0e4c=this['_activeAnnotation'];_0x1c0e4c&&_0x1c0e4c===_0x445d38?this['_alignAfterItem'](_0x38d191,_0x414c44):this['_alignBeforeItem'](_0x414c44,_0x38d191);}['_alignForBottomChange'](_0x21a3b9){if(!_0x21a3b9['content']['length'])return;const _0x4c89cc=this['_getItemAfter'](_0x21a3b9);if(!_0x4c89cc)return;const _0x1e70d6=this['_sidebarItemViewToAnnotation']['get'](_0x4c89cc),_0x4c33a6=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4f839e=this['_activeAnnotation'];_0x4f839e&&_0x4f839e===_0x1e70d6&&_0x4c33a6?(this['_alignBeforeItem'](_0x4c89cc,_0x21a3b9),this['_alignAfterItem'](_0x21a3b9,_0x4c89cc)):_0x4f839e&&_0x4f839e===_0x1e70d6?this['_alignBeforeItem'](_0x4c89cc,_0x21a3b9):this['_alignAfterItem'](_0x21a3b9,_0x4c89cc);}['_recalculate'](_0x21a917,_0x50cef5){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x43fdb9,changedProp:_0x385006}of this['_recalculateBuffer'])'top'===_0x385006?this['_alignForTopChange'](_0x43fdb9):this['_alignForBottomChange'](_0x43fdb9);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x21a917,'changedProp':_0x50cef5});}['getSidebarItemView'](_0x56bfa7){return this['_annotationToSidebarItemView']['get'](_0x56bfa7);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3ca185){const _0x2267db=this['getSidebarItemView'](_0x3ca185);this['stopListening'](_0x2267db),this['stopListening'](_0x3ca185['view']),_0x2267db['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3ca185),this['_sidebarItemViewToAnnotation']['delete'](_0x2267db);}['_createSidebarView'](){const _0x2d5760=new V(this['context']['locale']);return _0x2d5760['render'](),this['on']('change:_lastItem',(_0x40b9fb,_0x2dddde,_0x2a1a42,_0x2db47c)=>{_0x2db47c&&_0x2d5760['unbind']('minHeight'),_0x2a1a42?_0x2d5760['bind']('minHeight')['to'](_0x2a1a42,'bottom'):_0x2d5760['minHeight']=null;}),_0x2d5760;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x35aece){const _0x258c96=this['_sidebarItemViewToAnnotation']['get'](_0x35aece),_0x2b0f99=_0x258c96&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x258c96)-0x1);return _0x2b0f99&&this['getSidebarItemView'](_0x2b0f99)||null;}['_getItemAfter'](_0x25814f){const _0x481e8f=this['_sidebarItemViewToAnnotation']['get'](_0x25814f),_0x5d2f23=_0x481e8f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x481e8f)+0x1);return _0x5d2f23&&this['getSidebarItemView'](_0x5d2f23)||null;}['_alignBeforeItem'](_0x51aa5f,_0x4836b6){_0x51aa5f['updateHeight']();const _0x59ae0b=R(_0x4836b6['bottom']+this['_spaceBetweenItems'],_0x51aa5f['top']);return!!_0x59ae0b&&(this['_setItemTop'](_0x4836b6,_0x4836b6['top']-_0x59ae0b),!0x0);}['_alignAfterItem'](_0x304506,_0x51392e){_0x304506['updateHeight']();const _0x2e9573=R(_0x304506['bottom']+this['_spaceBetweenItems'],_0x51392e['top']);return!!_0x2e9573&&(this['_setItemTop'](_0x51392e,_0x51392e['top']+_0x2e9573,!0x1),!0x0);}['_alignToTargetRect'](_0x35fccd){const _0x3cdce3=this['_sidebarItemViewToAnnotation']['get'](_0x35fccd);if(!_0x3cdce3||!_0x3cdce3['target']||!_0x3cdce3['targetRect'])return;const _0x5a3567=this['_getTargetTop'](_0x3cdce3,_0x3cdce3['targetRect']);this['_setItemTop'](_0x35fccd,_0x5a3567);}['_getTargetTop'](_0x21eaab,_0x50a90a){if(null===_0x50a90a)return 0x0;if(_0x21eaab['target']instanceof _0x59e592)return _0x50a90a['top'];{const _0x45233a=new _0x59e592(this['view']['element'])['top'];return _0x50a90a['top']-_0x45233a;}}['_setItemTop'](_0x5e122b,_0x80f0a7,_0x1d09ed=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1d09ed&&(_0x80f0a7=Math['max'](_0x80f0a7,this['_getMaxAvailableTop'](_0x5e122b))),_0x5e122b['top']=_0x80f0a7;}['_getMaxAvailableTop'](_0x385275){let _0x5e4edd=this['_getItemBefore'](_0x385275),_0x2b16c2=0x0;for(;_0x5e4edd;)_0x5e4edd['updateHeight'](),_0x2b16c2+=this['_spaceBetweenItems']+_0x5e4edd['height'],_0x5e4edd=this['_getItemBefore'](_0x5e4edd);return _0x2b16c2;}}function R(_0x397cb4,_0xdaae00){return Math['max'](_0x397cb4-_0xdaae00,0x0);}function y(_0x31034c){return null!==_0x31034c&&'object'==typeof _0x31034c&&0x1===_0x31034c['nodeType'];}class e extends _0x4ffcf5{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x108821){super(_0x108821),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x41148a(),this['_refreshPositioningDebounced']=_0x526b1b(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2abe95=this['context']['plugins']['get'](M),_0x1889ae=this['context']['plugins']['get'](z);_0x2abe95['register']('wideSidebar',this),_0x1889ae['container']&&_0x2abe95['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x7f27c5){if(_0x7f27c5===this['activeAnnotation'])return;const _0x439755=this['context']['plugins']['get'](z);_0x439755['_activeAnnotation']=_0x7f27c5;const _0x4ed3e9=this['activeAnnotation'];this['activeAnnotation']=_0x7f27c5,_0x439755['refresh']({'blurredAnnotation':_0x4ed3e9,'activatedAnnotation':this['activeAnnotation']});}['attach'](_0x1075c3){this['annotations']=_0x1075c3;const _0x3d5281=this['context']['plugins']['get'](z);if(_0x3d5281['_annotations']=_0x1075c3,this['isAttached'])throw new _0x3595b5('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3d5281,'set:container',()=>{this['detach'](),this['listenTo'](_0x3d5281,'change:container',_0x437184=>{_0x437184['off'](),this['attach'](_0x1075c3);});}),_0x3d5281['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x147181=_0x258039=>{_0x258039['updateTargetRect'](),_0x3d5281['addAnnotation'](_0x258039);};for(const _0x4970c9 of _0x1075c3)_0x147181(_0x4970c9);this['listenTo'](_0x1075c3,'add',(_0x40036d,_0x5c0e01)=>{_0x147181(_0x5c0e01);}),this['listenTo'](_0x1075c3,'remove',(_0xda4db,_0x4698d4,_0x6caca5)=>{_0x3d5281['rearrange']({'removedAnnotation':_0x4698d4,'previousAnnotation':_0x1075c3['get'](_0x6caca5-0x1),'nextAnnotation':_0x1075c3['get'](_0x6caca5+0x1)}),_0x4698d4===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1075c3,'focus',(_0x51c7b7,_0x409e27)=>{this['setActiveAnnotation'](_0x409e27);}),this['listenTo'](_0x1075c3,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5ccfa6=this['context']instanceof _0x2a5cc0?this['context']['editors']:new _0x41148a([this['context']]);for(const _0x49388b of _0x5ccfa6)this['_integrateWithEditorAnnotations'](_0x49388b);this['listenTo'](_0x5ccfa6,'add',(_0x3b5689,_0x3c569e)=>{this['listenTo'](_0x3c569e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3c569e);});}),this['listenTo'](_0x5ccfa6,'remove',(_0x5e1a89,_0x36660d)=>{_0x36660d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x36660d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3595b5('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x393ad1=this['context']['plugins']['get'](z);_0x393ad1['_detachFromContainer'](this['annotations']),this['stopListening'](_0x393ad1),this['stopListening'](this['annotations']),this['context']instanceof _0x2a5cc0&&this['stopListening'](this['context']['editors']);for(const _0x1d4d53 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1d4d53);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5d587f){if(!_0x5d587f['plugins']['has']('EditorAnnotations'))return;const _0x538c6b=_0x5d587f['plugins']['get']('EditorAnnotations'),_0x38dde3=()=>{const _0x19ee69=_0x538c6b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x19ee69[0x0]||null);};this['listenTo'](_0x538c6b,'refresh',_0x38dde3),this['listenTo'](_0x538c6b,'blur',(_0x333b09,{isAnnotationTracked:_0x44cda4})=>{this['activeAnnotation']&&_0x44cda4(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x538c6b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x7e9ed=>{_0x538c6b['hasDomSelection']()&&(_0x38dde3(),_0x7e9ed['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x538c6b);}['_destroyEditorAnnotationsIntegration'](_0x53c1bb){this['stopListening'](_0x53c1bb),this['_editorAnnotations']['remove'](_0x53c1bb);}}class D extends _0x7c32fb{['counterView'];constructor(_0x2265c3){super(_0x2265c3);const _0x47aec9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x33ab4f,_0x418d95)=>_0x33ab4f?'...':_0x418d95['toString']()),this['set']('annotationType',''),this['icon']=xt,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x47aec9['to']('annotationType',_0x407046=>'ck-annotation-counter__badge--'+_0x407046),_0x47aec9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x47aec9['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4ffcf5{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xc91bc8){super(_0xc91bc8),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x483725),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x41148a(),this['_refreshPositioningDebounced']=_0x526b1b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x457aaa(this['context']['locale']),this['balloonPanelView']=new _0x33ed69(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x53d9f0){this['annotations']=_0x53d9f0;const _0x20f064=this['context']['plugins']['get'](z),_0x583a33=this['balloonPanelView'];if(_0x20f064['_annotations']=_0x53d9f0,this['isAttached'])throw new _0x3595b5('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x20f064,'set:container',()=>{this['detach'](),this['listenTo'](_0x20f064,'change:container',_0x3bb3c7=>{_0x3bb3c7['off'](),this['attach'](_0x53d9f0);});}),_0x20f064['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3a1379=_0x260058=>{const _0x365efe=new D(this['context']['locale']);_0x20f064['addAnnotation'](_0x260058,_0x365efe),this['_annotationToNarrowView']['set'](_0x260058,_0x365efe),_0x365efe['bind']('isDirty','annotationType','number')['to'](_0x260058['view'],'isDirty','type','length'),_0x365efe['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x583a33['content']['first']!==_0x260058['view']?(this['_showBalloon'](_0x260058),_0x260058['view']['element']['focus'](),this['setActiveAnnotation'](_0x260058)):this['setActiveAnnotation'](null);});};for(const _0x7949cd of _0x53d9f0)_0x3a1379(_0x7949cd);this['listenTo'](_0x53d9f0,'add',(_0x4c171c,_0x512177)=>{_0x3a1379(_0x512177);}),this['listenTo'](_0x53d9f0,'remove',(_0x4816e6,_0x39f835,_0x4fcf93)=>{this['_annotationToNarrowView']['get'](_0x39f835)['destroy'](),this['_annotationToNarrowView']['delete'](_0x39f835),_0x20f064['rearrange']({'removedAnnotation':_0x39f835,'previousAnnotation':_0x53d9f0['get'](_0x4fcf93-0x1),'nextAnnotation':_0x53d9f0['get'](_0x4fcf93+0x1)}),_0x39f835===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x53d9f0,'focus',(_0x3651af,_0x245d4c)=>{this['setActiveAnnotation'](_0x245d4c);}),this['listenTo'](_0x53d9f0,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3c9b33,_0x3cb47c)=>{_0x3cb47c['keyCode']===_0x15a9a0['esc']&&_0x583a33['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x583a33['content']['first']),this['_hideBalloon'](),_0x3cb47c['stopPropagation'](),_0x3cb47c['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2c39b4,_0x3cc614)=>{const _0x4487a0=_0x3cc614['target'];_0x583a33['isVisible']&&_0x583a33['element']['contains'](_0x4487a0)||_0x20f064['view']['element']['contains'](_0x4487a0)||_0x2c39b4['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3708a2=>_0x3708a2['contains'](_0x4487a0))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x287cf6=this['context']instanceof _0x2a5cc0?this['context']['editors']:new _0x41148a([this['context']]);for(const _0x233324 of _0x287cf6)this['_integrateWithEditorAnnotations'](_0x233324);this['listenTo'](_0x287cf6,'add',(_0x329c8a,_0x50bb7b)=>{this['listenTo'](_0x50bb7b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x50bb7b);});}),this['listenTo'](_0x287cf6,'remove',(_0xd63134,_0x9c4a5a)=>{_0x9c4a5a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x9c4a5a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0xe35c88){if(_0xe35c88===this['activeAnnotation'])return;const _0x5c5f7c=this['context']['plugins']['get'](z);if(_0x5c5f7c['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0xe35c88,'disableAnimationOnActivatedAnnotation':!0x0}),_0xe35c88)_0x5c5f7c['getSidebarItemView'](_0xe35c88)?this['_showBalloon'](_0xe35c88):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0xe35c88;}['detach'](){if(!this['isAttached'])throw new _0x3595b5('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xf426dc=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x43e4e6=>_0x43e4e6['destroy']()),this['_annotationToNarrowView']['clear'](),_0xf426dc['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2a5cc0&&this['stopListening'](this['context']['editors']);for(const _0x18af1c of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x18af1c);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'](_0x29b153){if(!_0x29b153['plugins']['has']('EditorAnnotations'))return;const _0x39256c=_0x29b153['plugins']['get']('EditorAnnotations'),_0x5a9dda=this['context']['plugins']['get'](z),_0xd9dc69=this['annotations'],_0x2b7003=this['balloonPanelView'],_0x54d692=()=>{const _0x5e64e2=_0x39256c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x5e64e2),this['setActiveAnnotation'](_0x5e64e2[0x0]||null);};this['listenTo'](_0x39256c,'refresh',_0x54d692),this['listenTo'](_0x39256c,'blur',(_0x206419,{isAnnotationTracked:_0x153ea1})=>{this['activeAnnotation']&&_0x153ea1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x39256c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xd9dc69,'blur',_0x26dd2d=>{_0x39256c['hasDomSelection']()&&_0x26dd2d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x377095,_0x1f16a)=>{const _0xd2dd6c=_0x1f16a['target'];_0x2b7003['isVisible']&&_0x2b7003['element']['contains'](_0xd2dd6c)||_0x5a9dda['view']['element']['contains'](_0xd2dd6c)||this['activeAnnotation']&&_0x39256c['hasDomSelection']()&&(_0x54d692(),_0x377095['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x39256c);}['_destroyEditorAnnotationsIntegration'](_0x4f1674){_0x4f1674&&(this['stopListening'](_0x4f1674),this['_editorAnnotations']['remove'](_0x4f1674));}['_setSelectedAnnotations'](_0x3e3b93){for(const _0x3b6142 of this['_selectedAnnotations'])_0x3e3b93['includes'](_0x3b6142)||this['_manuallyClosedAnnotationViews']['delete'](_0x3b6142['view']);this['_selectedAnnotations']=_0x3e3b93;}['_refreshPositioning'](){const _0x50ec0b=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x50ec0b['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xb971d6){if(this['_manuallyClosedAnnotationViews']['has'](_0xb971d6['view']))return;const _0x548b44=this['balloonPanelView']['content']['first'];_0x548b44!==_0xb971d6['view']?(_0x548b44&&this['_detachListeners'](_0x548b44),this['_attachListeners'](_0xb971d6['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xb971d6['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x23e999=this['balloonPanelView']['content']['first'],_0xfef95b=_0x23e999&&this['annotations']['getByView'](_0x23e999);if(!_0xfef95b||!this['_annotationToNarrowView']['has'](_0xfef95b))return;const _0x1dc7bc=this['_annotationToNarrowView']['get'](_0xfef95b)['element'],_0xc3d97a=(function(){const _0x38b34a=_0x33ed69['defaultPositions'];return[_0x38b34a['southArrowNorthEast'],_0x38b34a['northArrowSouthEast'],_0x38b34a['southArrowNorth'],_0x38b34a['northArrowSouth'],_0x38b34a['southArrowNorthWest'],_0x38b34a['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1dc7bc,'positions':_0xc3d97a});}['_hideBalloon'](){const _0x3a1d98=this['balloonPanelView'],_0x2a49f6=_0x3a1d98['content']['first'];_0x2a49f6&&(this['_detachListeners'](_0x2a49f6),_0x3a1d98['unpin'](),_0x3a1d98['content']['clear']());}['_attachListeners'](_0x1ef943){this['listenTo'](_0x1ef943,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1ef943,'Esc',(_0x2b8015,_0xaf58dd)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1ef943),this['_hideBalloon'](),_0xaf58dd();});}['_detachListeners'](_0x3c220b){this['stopListening'](_0x3c220b);}}class c extends _0x5c5dce{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x1a6c40,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x33be5d){super(_0x33be5d),_0x33be5d['editing']['view']['addObserver'](_0x58dc07),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x33be5d['plugins']['get'](_0x1a6c40),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0xb7dcce=this['editor']['plugins']['get'](M);_0xb7dcce['context']===this['editor']&&(_0xb7dcce['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4838e8,_0x436981)=>{const _0x471078=this['_balloon'];if(this['isAttached']&&_0x471078['visibleView']){const _0x381cf2=this['annotations']['getByView'](_0x471078['visibleView']);_0x381cf2&&this['_closeAnnotation'](_0x381cf2),_0x436981();}}));}['afterInit'](){const _0x2c7c89=this['editor']['plugins']['get'](M);_0x2c7c89['context']===this['editor']&&(_0x2c7c89['hasActive']()||_0x2c7c89['switchTo']('inline'));}['setActiveAnnotation'](_0x46e285){_0x46e285!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x46e285&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x46e285)&&this['_addAnnotationToBalloon'](_0x46e285,!0x0),_0x46e285['isActive']=!0x0),_0x46e285||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x46e285);}['attach'](_0x575c91){this['annotations']=_0x575c91;const _0x408c0b=this['editor']['plugins']['get'](M),_0x972e25=this['_balloon'];if(this['isAttached'])throw new _0x3595b5('inlineannotations-attach-already-attached',this);if(_0x408c0b['context']!==this['editor'])throw new _0x3595b5('inlineannotations-not-allowed-with-context',this);const _0x50ba98=this['editor']['plugins']['get'](P);this['listenTo'](_0x50ba98,'refresh',()=>{const _0x5b66d9=_0x50ba98['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1de70f,_0x4ae050;!this['_forceRefresh']&&(_0x1de70f=_0x5b66d9,_0x4ae050=this['_selectedAnnotations'],_0x1de70f['length']===_0x4ae050['length']&&_0x1de70f['every'](_0x524b58=>_0x4ae050['includes'](_0x524b58)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5b66d9),this['setActiveAnnotation'](_0x5b66d9[0x0]||null));}),this['listenTo'](_0x50ba98,'blur',(_0x36e14a,{isAnnotationTracked:_0x2f5fd1})=>{this['activeAnnotation']&&_0x2f5fd1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x556678,_0x800719,_0x34397b)=>{_0x34397b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x575c91,'remove',(_0x3956de,_0x2de3d2)=>{this['_removeAnnotationFromBalloon'](_0x2de3d2),_0x2de3d2===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x972e25,'change:visibleView',(_0x363d18,_0x587ed2,_0x5c4222,_0x36ddb3)=>{_0x36ddb3&&this['stopListening'](_0x36ddb3);const _0x1e89de=_0x575c91['getByView'](_0x5c4222);_0x5c4222&&_0x1e89de&&(this['listenTo'](_0x5c4222,'change:height',()=>{_0x972e25['updatePosition']();}),this['listenTo'](_0x5c4222,'Esc',()=>{this['_closeAnnotation'](_0x1e89de),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1e89de&&this['setActiveAnnotation'](_0x1e89de));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x972e25['visibleView']&&(_0x575c91['getByView'](_0x972e25['visibleView'])&&_0x972e25['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 _0x3595b5('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x37bcad of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x37bcad);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x508145){for(const _0x220cab of this['_selectedAnnotations'])_0x508145['includes'](_0x220cab)||this['_manuallyClosed']['delete'](_0x220cab);for(const _0x2b6272 of this['annotations'])_0x508145['includes'](_0x2b6272)||this['_removeAnnotationFromBalloon'](_0x2b6272);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x414711 of _0x508145)this['_addAnnotationToBalloon'](_0x414711);}this['_selectedAnnotations']=_0x508145;}['_addAnnotationToBalloon'](_0x2813e8,_0x5852b7=!0x1){this['_manuallyClosed']['has'](_0x2813e8)||(this['_addedAnnotations']['has'](_0x2813e8)||this['_balloon']['hasView'](_0x2813e8['view'])||(this['_addedAnnotations']['add'](_0x2813e8),this['_balloon']['add']({'stackId':_0x2813e8['view']['id'],'view':_0x2813e8['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2813e8)}})),_0x5852b7&&this['_balloon']['showStack'](_0x2813e8['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5b56fc){const _0x2a4afd=_0x5b56fc['target'],_0x10158d=this['editor']['editing']['view'],_0x38d834=_0x10158d['document']['selection']['getFirstRange'](),_0x59483e=_0x10158d['domConverter']['viewRangeToDom'](_0x38d834);if(_0x59483e['collapse'](!0x0),_0x2a4afd){if(_0x2a4afd instanceof _0x59e592)return _0x2a4afd;let _0x533ef3=[];for(const _0x57d5bb of _0x2a4afd)_0x533ef3['push'](...(_0x43e827=_0x57d5bb['getClientRects'](),Array['from'](_0x43e827)['map'](DOMRect['fromRect'])));_0x533ef3=function(_0x16a557){const _0x5c6791=[];let _0x5ca892=_0x16a557[0x0];for(let _0x269813=0x1;_0x269813<_0x16a557['length'];_0x269813++)b(_0x5ca892,_0x16a557[_0x269813])?_0x5ca892['width']+=_0x16a557[_0x269813]['width']:(_0x5c6791['push'](_0x5ca892),_0x5ca892=_0x16a557[_0x269813]);return _0x5c6791['push'](_0x5ca892),_0x5c6791;}(_0x533ef3);const _0x45326a=_0x59483e['getBoundingClientRect']();return _0x533ef3['find'](_0x4c9f3e=>_0x4c9f3e['top']<=_0x45326a['top']&&_0x4c9f3e['bottom']>=_0x45326a['bottom']&&_0x4c9f3e['left']<=_0x45326a['left']&&_0x4c9f3e['right']>=_0x45326a['right'])||_0x533ef3[0x0];}var _0x43e827;return _0x5b56fc['targetRect']||_0x59483e;}['_removeAnnotationFromBalloon'](_0x2dd553){this['_addedAnnotations']['has'](_0x2dd553)&&this['_balloon']['hasView'](_0x2dd553['view'])&&(this['_addedAnnotations']['delete'](_0x2dd553),this['_balloon']['remove'](_0x2dd553['view']));}['_closeAnnotation'](_0x1c6e59){this['_manuallyClosed']['add'](_0x1c6e59),this['_removeAnnotationFromBalloon'](_0x1c6e59);}}function b(_0x44b288,_0x43eab0){return _0x44b288['top']===_0x43eab0['top']&&_0x44b288['bottom']===_0x43eab0['bottom']&&_0x44b288['right']===_0x43eab0['left'];}var it='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M14\x203.5A3.5\x203.5\x200\x200\x201\x2017.5\x207v6l-.005.192a3.501\x203.501\x200\x200\x201-2.927\x203.262l-.062.008v1.813a1.5\x201.5\x200\x200\x201-2.193\x201.33l-.37-.193-.38-.212a13.452\x2013.452\x200\x200\x201-3.272-2.63l-.062-.07-4.729-.046a3.5\x203.5\x200\x200\x201-3.5-3.5v-6a3.5\x203.5\x200\x200\x201\x203.5-3.5L14\x203.5ZM3.5\x204.954a2\x202\x200\x200\x200-2\x202v6a2\x202\x200\x200\x200\x202\x202L8.924\x2015a11.917\x2011.917\x200\x200\x200\x203.71\x203.081l.372.194v-3.268L12.962\x2015H14a2\x202\x200\x200\x200\x202-2V7a2\x202\x200\x200\x200-2-2L3.5\x204.954Z\x22/><path\x20d=\x22M16.5.5h-10a3.5\x203.5\x200\x200\x200-3.162\x202h1.84A2\x202\x200\x200\x201\x206.5\x202h10a2\x202\x200\x200\x201\x202\x202v8.873a3.502\x203.502\x200\x200\x200\x201.495-2.681L20\x2010V4A3.5\x203.5\x200\x200\x200\x2016.5.5Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M12.013\x207.453a.75.75\x200\x200\x201\x20.034\x201.06l-3.75\x204a.75.75\x200\x200\x201-1.045.048l-2.25-2a.75.75\x200\x200\x201\x20.996-1.122l1.704\x201.515\x203.25-3.467a.75.75\x200\x200\x201\x201.061-.034Z\x22/></svg>\x0a';class st extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x455350,_0xdfcee9){super(_0x455350),this['set']('isEmpty',!_0xdfcee9['length']),this['focusTracker']=new _0x3642d0(),this['_annotationViews']=_0xdfcee9,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new Ft({'focusables':_0xdfcee9,'focusTracker':this['focusTracker']}),this['listenTo'](_0xdfcee9,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xdfcee9,'remove',(_0x12ee99,_0x1db123)=>{_0x1db123['isActive']&&this['focus'](),_0xdfcee9['length']||(this['isEmpty']=!0x0);});const _0x4cebfa=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':S(_0x455350,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xdfcee9},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x4cebfa['if']('isEmpty','ck-hidden',_0x50c58f=>!_0x50c58f)]},'children':[{'text':S(_0x455350,'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 _0x4cadd8 of this['_annotationViews'])this['focusTracker']['add'](_0x4cadd8['element']);this['_annotationViews']['on']('change',(_0x2d3ecf,{added:_0x28553d,removed:_0x2d129b})=>{for(const _0x4f86a1 of _0x28553d)this['focusTracker']['add'](_0x4f86a1['element']);for(const _0x38ae05 of _0x2d129b)this['focusTracker']['remove'](_0x38ae05['element']);});}}class f extends _0x4ffcf5{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,N];}constructor(_0xe9b26e){super(_0xe9b26e),this['archivedThreads']=new _0x41148a();}['init'](){const _0x2c41c2=this['context'],_0x513892=_0x2c41c2['plugins']['get'](o),_0xf66f66=_0x2c41c2['plugins']['get'](N);this['listenTo'](_0x513892,'addCommentThread',(_0xe58481,{threadId:_0x3cd5ab})=>{const _0x4f6e11=_0x513892['getCommentThread'](_0x3cd5ab);_0x4f6e11['archivedAt']&&this['archivedThreads']['add'](_0x4f6e11,this['_calculatePosition'](_0x4f6e11['archivedAt'])),this['listenTo'](_0x4f6e11,'change:archivedAt',(_0x76addc,_0x3a9655,_0x1b9871)=>{_0x1b9871?this['archivedThreads']['has'](_0x4f6e11)||this['archivedThreads']['add'](_0x4f6e11,this['_calculatePosition'](_0x4f6e11['archivedAt'])):this['archivedThreads']['has'](_0x4f6e11)&&this['archivedThreads']['remove'](_0x4f6e11);});}),this['listenTo'](_0x513892,'removeCommentThread',(_0x41919d,{threadId:_0x131b98})=>{const _0x140d66=_0x513892['getCommentThread'](_0x131b98);this['stopListening'](_0x140d66),this['archivedThreads']['has'](_0x140d66)&&this['archivedThreads']['remove'](_0x140d66);},{'priority':'highest'}),this['listenTo'](_0xf66f66['collection'],'focus',(_0x53b700,_0x40844c)=>{_0x40844c['isVisible']||(_0x40844c['isActive']=!0x0,_0xf66f66['activate'](_0x40844c));});}['_calculatePosition'](_0x5e5e3b){const _0x51ec14=[...this['archivedThreads']]['findIndex'](_0x157e51=>_0x157e51['archivedAt']<_0x5e5e3b);return _0x51ec14>-0x1?_0x51ec14:this['archivedThreads']['length'];}}class a extends _0x5c5dce{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x6ad97f];}constructor(_0x28ea59){super(_0x28ea59),this['annotationViews']=new _0x12b224(),this['_pendingThreads']=[];}['init'](){const _0x580436=this['editor'],_0x5ecab2=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x580436['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x7c32fb,!0x0)),_0x580436['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x255cdb=this['_createCommentsArchiveButton'](_0x1f821d);return _0x255cdb['set']({'role':'menuitemcheckbox'}),_0x255cdb;});const _0x1e87ae=_0x580436['plugins']['get'](f),_0x47442d=_0x580436['plugins']['get']('Annotations'),_0x501868=_0x580436['plugins']['get']('CommentsRepository');this['listenTo'](_0x1e87ae['archivedThreads'],'add',(_0x25e7df,_0x5236a6)=>{const _0x3b0406=_0x580436['config']['get']('collaboration.channelId');if(!_0x3b0406||_0x5236a6['channelId']===_0x3b0406){const _0x30d46c=_0x501868['_threadToController']['get'](_0x5236a6);if(!_0x30d46c)return void this['_pendingThreads']['push'](_0x5236a6);const _0x19b877=this['_calculatePosition'](_0x5236a6['archivedAt']),_0x46b082=_0x47442d['getByInnerView'](_0x30d46c['view']);_0x46b082['isVisible']&&_0x47442d['_visibleAnnotations']['remove'](_0x46b082),this['annotationViews']['add'](_0x46b082['view'],_0x19b877);}}),this['listenTo'](_0x47442d['collection'],'add',(_0x48fb94,_0x400523)=>{const _0x3e7b08=this['_pendingThreads']['find'](_0x3379ad=>{const _0x4caaad=_0x501868['_threadToController']['get'](_0x3379ad);return _0x4caaad&&_0x400523['innerView']===_0x4caaad['view'];});if(_0x3e7b08){const _0x583996=this['_calculatePosition'](_0x3e7b08['archivedAt']);this['annotationViews']['add'](_0x400523['view'],_0x583996),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3e7b08),0x1);}}),this['listenTo'](_0x1e87ae['archivedThreads'],'remove',(_0x2857ea,_0x5514d4)=>{const _0x1912d9=_0x580436['config']['get']('collaboration.channelId');if(!_0x1912d9||_0x5514d4['channelId']===_0x1912d9){const _0xa7f20b=_0x501868['_threadToController']['get'](_0x5514d4),_0x1f25de=_0x47442d['getByInnerView'](_0xa7f20b['view']);this['annotationViews']['remove'](_0x1f25de['view']),this['stopListening'](_0x1f25de['focusableElements']);}}),this['listenTo'](_0x47442d['collection'],'add',(_0x37e0f4,_0x156739)=>{this['listenTo'](_0x156739,'escape',_0x5ecab2);}),this['listenTo'](_0x47442d['collection'],'remove',(_0x4c7c00,_0x1161cf)=>{this['stopListening'](_0x1161cf,'escape',_0x5ecab2);});}['_calculatePosition'](_0x5cff9b){const _0x2f83d9=this['editor']['config']['get']('collaboration.channelId'),_0x5c69ab=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x34af08=>_0x34af08['channelId']===_0x2f83d9)['findIndex'](_0xe5b45a=>_0xe5b45a['archivedAt']<_0x5cff9b);return _0x5c69ab<0x0||_0x5c69ab>this['annotationViews']['length']?this['annotationViews']['length']:_0x5c69ab-0x1;}['_toggleDialog'](){const _0x300d8c=this['editor'],_0x4b1dbd=_0x300d8c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new st(_0x300d8c['locale'],this['annotationViews'])),'commentsArchive'===_0x4b1dbd['id']?_0x4b1dbd['hide']():_0x4b1dbd['show']({'id':'commentsArchive','title':S(_0x300d8c['locale'],'COMMENTS_ARCHIVE'),'icon':it,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':tt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x5f59bc,_0x1ee8b2=!0x1){const _0x28f910=this['editor']['locale'],_0x577415=this['editor']['plugins']['get']('Dialog'),_0x108b58=new _0x5f59bc(_0x28f910);return _0x108b58['bind']('isEnabled')['to'](this,'isEnabled'),_0x108b58['bind']('isOn')['to'](_0x577415,'id',_0x57b103=>'commentsArchive'===_0x57b103),_0x108b58['set']({'label':S(_0x28f910,'COMMENTS_ARCHIVE'),'icon':it,'isToggleable':!0x0}),_0x1ee8b2&&(_0x108b58['tooltip']=!0x0),this['listenTo'](_0x108b58,'execute',()=>this['_toggleDialog']()),_0x108b58;}['_hideDialogOnAnnotationEscape']=_0x2c0c97=>{const _0x35e4f5=_0x2c0c97['source'];if(!this['annotationViews']['has'](_0x35e4f5['view']))return;const _0x4c6745=this['editor']['plugins']['get']('Dialog');_0x4c6745['isOpen']&&'commentsArchive'===_0x4c6745['id']&&(_0x4c6745['hide'](),_0x2c0c97['stop']());};}class p extends _0x5c5dce{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,x as AnnotationCollection,T as AnnotationView,N as Annotations,M as AnnotationsUIs,ss as BaseCommentThreadView,os as BaseCommentView,re as Comment,oe as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,e as WideSidebar};
|