@ckeditor/ckeditor5-comments 46.0.3 → 46.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x4aec43={}){function _0x2c2497(_0x1608b9){return _0x1608b9['map'](_0x248fa3=>String['fromCharCode'](_0x248fa3))['join']('');}(_0x4aec43=Object['assign']({},_0x4aec43))['plugins']||(_0x4aec43['plugins']=Rt['defaultPlugins']),super(_0x4aec43),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2c2497([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c2497([0x76,0x69,0x65,0x77])][_0x2c2497([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2c2497([0x61,0x75,0x74,0x6f]),this[_0x2c2497([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2c2497([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2c2497([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2c2497([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2c2497([0x6f,0x6b])});}['create'](){const _0x4948a9=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4948a9))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x24c953=>{const _0x3d3b57=this['model']['document']['getRoot'](),_0x3dcf34=_0x3d3b57&&_0x3d3b57['getChild'](_0x3d3b57['childCount']-0x1);_0x24c953['setSelection'](_0x3dcf34,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xf4275a=this['editing']['view'],_0x1dc037=_0xf4275a['document']['getRoot'](),_0x4a07b5=_0x1dc037['getChild'](0x0);_0x1dc037['childCount']>0x1||!_0x4a07b5||'p'!=_0x4a07b5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0xf4275a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4a07b5['placeholder']=this['placeholder']),St({'view':_0xf4275a,'element':_0x4a07b5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4a07b5);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x29808f,_0x4c0dc5={}){super(_0x29808f),this['editor']=null,this['_editorConfig']=_0x4c0dc5,this['set']('value',_0x4c0dc5['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x29808f,'Reply...')),this['set']('submitLabel',N(_0x29808f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5f12d6(),this['focusCycler']=new _0x349db7({'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',(_0x3fff06,_0x1df4a)=>{this['cancelButtonView']['fire']('execute'),_0x1df4a();}),this['keystrokes']['set']('Ctrl+Enter',(_0x23234b,_0x5b0d7e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5b0d7e());}),this['on']('submit',(_0x503e47,_0x3c076d)=>{_0x3c076d['length']>0xfde8?(alert(N(_0x29808f,'TOO_LONG_COMMENT_ALERT',[_0x3c076d['length'],0xfde8])),_0x503e47['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 _0x9e1861=this['editor'];this['element']['insertBefore'](_0x9e1861['ui']['element'],this['element']['firstChild']),_0x9e1861['model']['document']['on']('change',()=>this['value']=_0x9e1861['getData']()),_0x9e1861['bind']('placeholder')['to'](this),this['focusables']['add'](_0x9e1861['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x9f6175){-0x1===_0x9f6175?(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:_0x2e5ce0}=this,_0x116558=new _0x3596fa(_0x2e5ce0);return _0x116558['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x116558['withText']=!0x0,_0x116558['bind']('label')['to'](this,'submitLabel'),_0x116558['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x116558['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x22f531,_0x1338d1)=>!_0x1338d1&&!!_0x22f531['trim']()),_0x116558;}['_createCancelButton'](){const {locale:_0x543541}=this,_0x21295c=new _0x3596fa(_0x543541);return _0x21295c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x21295c['label']=N(_0x543541,'Cancel'),_0x21295c['withText']=!0x0,_0x21295c['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x21295c;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xdc7bd5=>{this['focusTracker']['add'](_0xdc7bd5['element']);}),this['focusables']['on']('change',(_0x538633,_0x3a10e9)=>{for(const _0x437c04 of Array['from'](_0x3a10e9['added'])['reverse']())this['focusTracker']['add'](_0x437c04['element']);});}}class ie extends kt{constructor(_0x31d81d,_0x4cffb4,_0x3f8944){super(_0x31d81d),this['commentInputView']=new os(_0x31d81d,_0x3f8944),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x12b49f,_0x5be5f9)=>_0x12b49f||!!_0x5be5f9),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 _0x3f7232(_0x31d81d,_0x4cffb4),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'](_0x3ec2c4){this['commentInputView']['focus'](_0x3ec2c4);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x3d52d5,_0x7fad78)=>{const {submitButtonView:_0x324732,cancelButtonView:_0x12ad26,editor:_0x2530d5}=this['commentInputView'];[_0x324732['element'],_0x12ad26['element'],_0x2530d5?_0x2530d5['editing']['view']['getDomRoot']():null]['filter'](_0x35a40c=>_0x35a40c)['some'](_0x42b20d=>_0x42b20d['contains'](_0x7fad78['target']))||(this['focus'](),_0x7fad78['preventDefault']());});}}class rs extends kt{constructor(_0x3506ae){super(_0x3506ae);const _0x2afe13=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2afe13['to']('count',_0x5f4d11=>N(_0x3506ae,'NUMBER_OF_COMMENTS',_0x5f4d11))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5bae54,_0x35f428,_0x419fe1){super(_0x5bae54);const _0xb9571e=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x35f428['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x35f428,this['_config']=_0x419fe1,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x22e7a3=>this['commentViews']['map'](_0x2cdb48=>_0x2cdb48['element'])['includes'](_0x22e7a3['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5bae54),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4e09ac=>_0x4e09ac-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5a4588 of _0x35f428['comments'])this['_handleNewCommentModel'](_0x5a4588);this['_handleInfoComment'](),this['listenTo'](_0x35f428['comments'],'add',(_0x4a22e5,_0x59321b)=>{const _0x533598=this['_calculatePosition'](_0x59321b);this['length']++,this['_handleNewCommentModel'](_0x59321b,_0x533598),this['refreshVisibleViews']();}),this['listenTo'](_0x35f428['comments'],'remove',(_0x38ff44,_0xc4fcd6)=>{this['length']--,this['_handleRemoveCommentModel'](_0xc4fcd6),this['refreshVisibleViews']();}),this['listenTo'](_0x35f428,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x35f428,'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',_0xb9571e['if']('length','ck-hidden',_0x3e66d1=>!_0x3e66d1)],'aria-label':N(_0x5bae54,'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'](_0x135d68){-0x1===_0x135d68?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2202a2 of this['commentViews'])_0x2202a2['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1afc42,_0x798efa){const _0x108950=new this['_config']['CommentView'](this['locale'],_0x1afc42,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x108950['viewUid']=_0x1afc42['id'],_0x108950['delegate']('removeComment')['to'](this),_0x108950['delegate']('updateComment')['to'](this),_0x108950['delegate']('resolveCommentThread')['to'](this),_0x108950['delegate']('editorReady')['to'](this),_0x108950['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x108950,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x108950,_0x798efa);}['_calculatePosition'](_0x532a8f){const _0x5bee5f=this['_model']['_findOptimalIndex'](_0x532a8f);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x532a8f['authoredAt']?_0x5bee5f-0x1:_0x5bee5f:_0x5bee5f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3c91c9={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3c91c9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3c91c9));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0xe614a4){const _0x23e44c=this['commentViews']['remove'](_0xe614a4['id']);this['stopListening'](_0x23e44c),_0x23e44c['isEditMode']&&this['_updateHasDirtyComment'](),_0x23e44c['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4e5d50=>_0x4e5d50['isEditMode']);}['_rearrangeCollapse'](){const _0x8e75b5=function(_0x599e6c){const _0x9e6773=new _0x4d5d77();for(const _0x2abe9e of _0x599e6c)_0x9e6773['add'](_0x2abe9e);return _0x9e6773;}(this['commentViews']),_0xb1b3e6=this['_collapsedCommentsView']['count'];for(let _0x3b8b79=0x1;_0x3b8b79<=_0xb1b3e6;_0x3b8b79++)_0x8e75b5['remove'](0x1);for(const _0x449a80 of _0x8e75b5)_0x449a80['collapse']();_0xb1b3e6>0x0&&_0x8e75b5['add'](this['_collapsedCommentsView'],0x1),ns(_0x54c417(Array['from'](this['visibleViews']),Array['from'](_0x8e75b5)),this['visibleViews'],_0x8e75b5);}['_rearrangeExpand'](){ns(_0x54c417(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x58f403 of this['visibleViews'])_0x58f403['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1d451e=>{this['focusTracker']['add'](_0x1d451e['element']),this['keystrokes']['listenTo'](_0x1d451e['element']);}),this['commentViews']['on']('change',(_0x21deaf,_0xb5adcb)=>{for(const _0x5e0e80 of _0xb5adcb['removed'])this['focusTracker']['remove'](_0x5e0e80['element']),this['keystrokes']['stopListening'](_0x5e0e80['element']);for(const _0x48844d of Array['from'](_0xb5adcb['added'])['reverse']())this['focusTracker']['add'](_0x48844d['element']),this['keystrokes']['listenTo'](_0x48844d['element']);});}}function ns(_0x431faa,_0x4612d5,_0xc8402b){let _0x424ce9=0x0;for(const _0x5243e5 of _0x431faa)switch(_0x5243e5){case'insert':_0x4612d5['add'](_0xc8402b['get'](_0x424ce9),_0x424ce9),_0x424ce9++;break;case'delete':_0x4612d5['remove'](_0x424ce9);break;case'equal':_0x424ce9++;}}class oe extends kt{constructor(_0xff5afe){super(_0xff5afe);const _0x3dcc8c=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3dcc8c['to']('contextValue',_0x565301=>N(_0xff5afe,'THREAD_CONTEXT_LABEL',_0x565301)),'tabindex':-0x1},'children':[{'text':_0x3dcc8c['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x87502f,_0x4e0703){super(_0x87502f);const _0x55e4bc=this['bindTemplate'];this['_model']=_0x4e0703,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x2c2628=>!!_0x2c2628),this['bind']('contextValue')['to'](this['_model'],'context',_0x3e9ecf=>_0x3e9ecf&&_0x3e9ecf['value']?this['_trimContextValue'](_0x3e9ecf['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x55e4bc['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 _0x1b7a47=new _0x3596fa(this['locale']);return _0x1b7a47['label']=N(this['locale'],'Reopen'),_0x1b7a47['tooltip']=N(this['locale'],'Reopen'),_0x1b7a47['icon']=_0xb49e9d,_0x1b7a47['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x37c715=>!_0x37c715),_0x1b7a47['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x457809,_0x55703e)=>_0x457809&&_0x55703e),_0x1b7a47['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1b7a47;}['_trimContextValue'](_0x4d773a){if(_0x4d773a['length']<0x96)return _0x4d773a;const _0x2457d7=_0x4d773a['lastIndexOf']('\x20',0x93);return _0x4d773a['substring'](0x0,_0x2457d7>-0x1?_0x2457d7:0x93)+'...';}['_attachContextActions'](){const _0x3714c2=this['element']['querySelector']('.ck-context'),_0x4125bb=_0x3714c2['querySelector']('.ck-context__value');this['listenTo'](_0x3714c2,'mouseenter',()=>{_0x4125bb['offsetWidth']<_0x4125bb['scrollWidth']&&_0x3714c2['classList']['add']('overlay');}),this['listenTo'](_0x3714c2,'mouseleave',()=>{_0x3714c2['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x599e6b of this['focusables'])this['focusTracker']['add'](_0x599e6b['element']),this['keystrokes']['listenTo'](_0x599e6b['element']);}['_createContextView'](){const _0x962210=new oe(this['locale']);return _0x962210['bind']('contextValue')['to'](this),_0x962210;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x11a80d,_0x3a3de1,_0x193722,_0x1e092e){super(_0x11a80d),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3a3de1,this['_localUser']=_0x193722,this['_config']=_0x1e092e,this['commentThreadHeaderView']=new Yt(_0x11a80d,_0x3a3de1),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x11a80d,N(_0x11a80d,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x11a80d,_0x3a3de1,Object['assign']({'CommentView':this['_config']['CommentView']},_0x1e092e)),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',(_0x25f67c,_0x1fd3df)=>_0x25f67c||!!_0x1fd3df),this['bind']('isUnlinked')['to'](_0x3a3de1,'unlinkedAt',_0x550153=>!!_0x550153),this['bind']('ariaLabel')['to'](this,'length',_0x2a977c=>{const _0x4d5cb6=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x2a977c,_0x4d5cb6]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x358eb9=>_0x358eb9['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 _0x278c83=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x216a81=_0x278c83['commentInputView'];return _0x278c83['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x216a81,'value',(_0xf002b5,_0x121831,_0x305c16,_0x5c002e,_0x4cf7a1)=>!!_0x4cf7a1||!!_0x5c002e&&_0x305c16&&!_0x121831||_0xf002b5&&_0x305c16&&!_0x121831),_0x216a81['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x977154,_0x374b78,_0x463859)=>{let _0x36285f;return _0x36285f=_0x463859&&_0x374b78?'Reply\x20to\x20reopen\x20discussion...':_0x977154?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x36285f);}),_0x216a81['bind']('submitLabel')['to'](this,'length',_0x5a93d2=>N(this['locale'],_0x5a93d2?'Reply':'Comment')),_0x216a81['on']('submit',(_0x51b8cd,_0xe7715d)=>{this['fire']('addComment',_0xe7715d),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x216a81['on']('cancel',()=>{this['focus']();}),_0x216a81['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x216a81['on']('cancel',_0x244f12=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x244f12['stop']());}),this['on']('change:isActive',(_0x432b6f,_0x3c684b,_0xceee3e)=>{_0xceee3e||this['length']||_0x216a81['value']||this['fire']('removeCommentThread');}),_0x278c83;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x3e3063(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x250235,target:_0x14b01d,type:_0x3e6267,isVisible:_0x203d80=!0x0}){super(),this['view']=_0x250235,this['view']['element']||this['view']['render'](),this['_type']=_0x3e6267,this['_target']=_0x14b01d,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4d5d77([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x16c4bc,_0x1135e7)=>{this['view']['focusTracker']['add'](_0x1135e7);}),this['focusableElements']['on']('remove',(_0x4e6483,_0x1e919d)=>{this['view']['focusTracker']['remove'](_0x1e919d);}),this['set']('isVisible',_0x203d80);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x51225e=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x51225e),_0x51225e;}get['targetRect'](){const _0x1f3199=this['target'];if(null===_0x1f3199)return null;if(_0x1f3199 instanceof _0x23d655)return _0x1f3199;const _0x258d5e=_0x1f3199['filter'](_0x5c2b29=>function(_0x426f65){const _0x298498=_0x426f65['offsetParent'];if(_0x298498)return!0x0;const _0x3026cb=_0x426f65['getClientRects']()['item'](0x0);return!!_0x3026cb;}(_0x5c2b29));return 0x0===_0x258d5e['length']?null:new _0x23d655(_0x258d5e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5b4856){this['view']['isActive']=_0x5b4856,this['view']['mainView']['isActive']=_0x5b4856;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3d3d52){if(!(null===_0x3d3d52||_0x3d3d52 instanceof _0x23d655||Array['isArray'](_0x3d3d52)&&_0x3d3d52['every'](_0x17d82e=>fi(_0x17d82e))))throw new _0x2cc838('annotation-invalid-target',null,{'target':_0x3d3d52});}['_getNormalizedTarget'](){const _0x6a295='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x6a295)?[_0x6a295]:_0x6a295;}}function fi(_0x4f6f6d){return null!==_0x4f6f6d&&'object'==typeof _0x4f6f6d&&'nodeType'in _0x4f6f6d&&0x1===_0x4f6f6d['nodeType'];}class S extends _0x4d5d77{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x280c38=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5f12d6(),this['_focusTracker']['on']('change:isFocused',(_0x42ef1f,_0x21f359,_0x6b31c2)=>{_0x6b31c2||this['fire']('blur');});for(const _0x4b1ada of _0x280c38)this['add'](_0x4b1ada);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x323627){if(this['has'](_0x323627))throw new _0x2cc838('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x323627['innerView'],_0x323627),this['_viewToAnnotation']['set'](_0x323627['view'],_0x323627);for(const _0x114859 of _0x323627['focusableElements'])this['_focusTracker']['add'](_0x114859);this['listenTo'](_0x323627['focusableElements'],'add',(_0xd4c7ac,_0x319972)=>{this['_focusTracker']['add'](_0x319972);}),this['listenTo'](_0x323627['focusableElements'],'remove',(_0x49d71d,_0x12a3d3)=>{this['_focusTracker']['remove'](_0x12a3d3);}),this['listenTo'](_0x323627['view']['focusTracker'],'change:isFocused',(_0x9b0632,_0x1013ed,_0x18e2d2)=>{_0x18e2d2&&this['fire']('focus',_0x323627);}),_0x323627['updateTargetRect']();const _0x186bf7=this['_getOrderInContent'](_0x323627['view']['targetRect']);return super['add'](_0x323627,_0x186bf7);}['remove'](_0x2fd5a5){if(!this['has'](_0x2fd5a5))throw new _0x2cc838('annotationcollection-not-existing-item',null);this['stopListening'](_0x2fd5a5['view']['focusTracker']),this['stopListening'](_0x2fd5a5['focusableElements']);for(const _0x5599ec of _0x2fd5a5['focusableElements'])this['_focusTracker']['remove'](_0x5599ec);return this['_viewToAnnotation']['delete'](_0x2fd5a5['view']),this['_innerViewToAnnotation']['delete'](_0x2fd5a5['innerView']),super['remove'](_0x2fd5a5);}['getByInnerView'](_0x3aa678){return this['_innerViewToAnnotation']['get'](_0x3aa678);}['getByView'](_0x291a80){return this['_viewToAnnotation']['get'](_0x291a80);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x212247 of this)_0x212247['updateTargetRect']();this['_sort']();}['_sort'](){const _0xcfbabb=Array['from'](this)['sort']((_0x5e891e,_0x25639a)=>w(_0x5e891e['view']['targetRect'],_0x25639a['view']['targetRect']));for(let _0x2e2df1=_0xcfbabb['length']-0x1;_0x2e2df1>0x0;_0x2e2df1--){const _0x1b413f=_0xcfbabb[_0x2e2df1];_0x2e2df1!==this['getIndex'](_0x1b413f)&&(this['remove'](_0x1b413f),this['add'](_0x1b413f));}}['_getOrderInContent'](_0x26c8a0){let _0x322991=0x0;if(!_0x26c8a0)return this['length'];for(const _0x1a1d44 of this){const _0x57bf20=_0x1a1d44['view']['targetRect'];if(_0x57bf20){if(w(_0x26c8a0,_0x57bf20)<0x0)return _0x322991;_0x322991++;}}return _0x322991;}}function v({source:_0x2511a4,target:_0x15d8e2,filter:_0x46c3cd}){for(const _0xf35631 of _0x2511a4)_0x46c3cd(_0xf35631)&&_0x15d8e2['add'](_0xf35631);_0x15d8e2['listenTo'](_0x2511a4,'add',(_0x18607d,_0x46de61)=>{_0x46c3cd(_0x46de61)&&_0x15d8e2['add'](_0x46de61);}),_0x15d8e2['listenTo'](_0x2511a4,'remove',(_0x313e63,_0x46f317)=>{_0x15d8e2['has'](_0x46f317)&&_0x15d8e2['remove'](_0x46f317);});}function w(_0x43df97,_0x548646){if(null===_0x43df97&&null===_0x548646)return 0x0;if(null===_0x43df97)return-0x1;if(null===_0x548646)return 0x1;const _0x47b642=_0x43df97['top']-_0x548646['top'];return 0x0==_0x47b642?_0x43df97['left']-_0x548646['left']:_0x47b642;}class y extends _0x313b3a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2cba8e){if(super(_0x2cba8e),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2cba8e instanceof _0x1b0da7){const _0x202c45=_0x2cba8e['locale'];_0x2cba8e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x282cc7){this['collection']['add'](_0x282cc7);}['remove'](_0x512f76){this['collection']['remove'](_0x512f76),_0x512f76['destroy']();}['refreshVisibility'](){for(const _0x429346 of this['collection'])_0x429346['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x523e7e){return this['collection']['getByInnerView'](_0x523e7e);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x14aaf1 of this['collection'])_0x14aaf1['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1a5e1d){this['fire']('_activateAnnotation',_0x1a5e1d);}['createAnnotation'](_0x59d73b){return new T(_0x59d73b);}['createAnnotationView'](_0x1336b0,_0x27063c){return new E(_0x1336b0,_0x27063c);}['_addActiveAnnotation'](_0xaa2b91){const _0x59cc6d=new Set(this['activeAnnotations']);_0x59cc6d['add'](_0xaa2b91),this['activeAnnotations']=_0x59cc6d;}['_removeActiveAnnotation'](_0x322bde){const _0x595ed7=new Set(this['activeAnnotations']);_0x595ed7['delete'](_0x322bde),this['activeAnnotations']=_0x595ed7;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2ff525=this['collection'],_0x1c0f90=this['_visibleAnnotations'];function _0x44577d(_0x104620){const _0xccf3f=_0x104620['source'];_0xccf3f['isVisible']&&!_0x1c0f90['has'](_0xccf3f)?_0x1c0f90['add'](_0xccf3f):!_0xccf3f['isVisible']&&_0x1c0f90['has'](_0xccf3f)&&_0x1c0f90['remove'](_0xccf3f),_0xccf3f['view']['focusTracker']['remove'](_0xccf3f['view']['element']),_0xccf3f['view']['focusTracker']['add'](_0xccf3f['view']['element']);}this['listenTo'](_0x2ff525,'add',(_0x2ba171,_0x280fbb)=>{_0x280fbb['isVisible']&&_0x1c0f90['add'](_0x280fbb),this['listenTo'](_0x280fbb,'change:isVisible',_0x44577d);}),this['listenTo'](_0x2ff525,'remove',(_0x10317f,_0x2abbfb)=>{_0x1c0f90['has'](_0x2abbfb)&&_0x1c0f90['remove'](_0x2abbfb),this['stopListening'](_0x2abbfb,'change:isVisible',_0x44577d);});}['_setupEnterAnnotationKeystroke'](){const _0x1b112e=_0x13b3a4=>{_0x13b3a4['on']('ready',()=>{_0x13b3a4['keystrokes']['set'](_0xab76d7,(_0x19f6b4,_0x26da4c)=>{const _0x36a249=_0x1f0347(this['activeAnnotations']['values']());_0x36a249&&(_0x36a249['view']['focus'](),_0x26da4c());});});};this['context']instanceof _0x1b0da7?_0x1b112e(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x483d77,_0x1cc392)=>{_0x1b112e(_0x1cc392);});}['_setupEscapeAnnotationHandling'](){const _0x7675ce=_0x4c36f5=>{const _0x491e55=_0x4c36f5['source'],_0x3c839c=[];let _0x12e2ac;if(Array['isArray'](_0x491e55['target'])){_0x12e2ac=_0x491e55['target'][0x0],this['context']instanceof _0x1b0da7?_0x3c839c['push'](this['context']):this['context']['editors']&&_0x3c839c['push'](...this['context']['editors']);for(const _0x4352c8 of _0x3c839c)for(const _0x548820 of _0x4352c8['editing']['view']['domRoots']['values']())if(_0x548820['contains'](_0x12e2ac))return void _0x4352c8['editing']['view']['focus']();_0x12e2ac['focus']();}};this['listenTo'](this['collection'],'add',(_0x3885f9,_0x3b24ee)=>{this['listenTo'](_0x3b24ee,'escape',_0x7675ce,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x250485,_0x1b0cb9)=>{this['stopListening'](_0x1b0cb9,'escape',_0x7675ce);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x313b3a{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d9f3f){super(_0x1d9f3f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1de600=this['context']['config'];_0x1de600['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1de600['define']('comments.maxThreadTotalWeight',0x1f4),_0x1de600['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1de600['define']('comments.CommentThreadView',gt),_0x1de600['define']('comments.CommentView',Tt),_0x1de600['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3e6a0f=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x43b616,_0x41bbff)=>this['_addCommentThread'](_0x41bbff)),this['on']('submitCommentThread',(_0x2898ba,_0x1a7f02)=>this['_submitCommentThread'](_0x1a7f02)),this['on']('resolveCommentThread',(_0x1b4c3b,_0x225427)=>this['_resolveCommentThread'](_0x225427)),this['on']('resolveCommentThread',(_0x389864,_0x3fdb64)=>this['_updateActiveAnnotation'](_0x3fdb64),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x464074,_0x2f90de)=>this['_reopenCommentThread'](_0x2f90de)),this['on']('reopenCommentThread',(_0xf6026e,_0x473db0)=>this['_updateActiveAnnotation'](_0x473db0),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2cb463,_0x43694f)=>this['_removeCommentThread'](_0x43694f)),this['on']('updateCommentThread',(_0x30155c,_0x4d0b70)=>this['_updateCommentThread'](_0x4d0b70)),this['on']('updateCommentThread',(_0x104534,_0x4503ec)=>this['_updateActiveAnnotation'](_0x4503ec),{'priority':'lowest'}),this['on']('addComment',(_0x429761,_0x187d8b)=>this['_addComment'](_0x187d8b)),this['on']('updateComment',(_0x1c9c1b,_0x6d219)=>this['_updateComment'](_0x6d219)),this['on']('removeComment',(_0x2fd058,_0x50ee69)=>this['_removeComment'](_0x50ee69)),this['on']('addComment',(_0x5ccaac,{threadId:_0x1204cc,isFromAdapter:_0x15f698})=>{if(_0x15f698)return;const _0x878528=this['getCommentThread'](_0x1204cc),_0x26eaa1=_0x878528&&this['_threadToController']['get'](_0x878528);_0x26eaa1&&_0x26eaa1['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3e6a0f,'change:activeAnnotations',(_0x4c3673,_0x146ddb,_0x2139a0)=>{const _0x39ae80=Array['from'](_0x2139a0)['map'](_0x22095a=>this['_viewToController']['get'](_0x22095a['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x39ae80?_0x39ae80['model']:null;});}set['adapter'](_0x51ac0d){if(this['_adapter'])throw new _0x2cc838('commentsrepository-adapter-already-set');this['_adapter']=_0x51ac0d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x1e368a=_t,threadId:_0x340333=_0x2f2703(),comments:_0xa773a5=[],unlinkedAt:_0x3e1a7e=null,resolvedAt:_0xb2935d=null,resolvedBy:_0x9f6504=null,target:_0x233369=null,context:_0x11dd4a=null,attributes:_0x39f0b3={},isResolvable:_0x4d1840=!0x0,isSubmitted:_0x20fb8f=!0x1,isFromAdapter:_0x5590f9=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x1e368a),{'channelId':_0x1e368a,'threadId':_0x340333,'comments':_0xa773a5,'unlinkedAt':_0x3e1a7e,'resolvedAt':_0xb2935d,'resolvedBy':_0x9f6504,'target':_0x233369,'context':_0x11dd4a,'attributes':_0x39f0b3,'isFromAdapter':_0x5590f9,'isResolvable':_0x4d1840,'isSubmitted':_0x20fb8f}),this['getCommentThread'](_0x340333);}['openNewCommentThread']({channelId:_0x2b0852=_t,threadId:_0x1bc2df=_0x2f2703(),target:_0x245776,context:_0x4581c8=null,isResolvable:_0x550b36=!0x0}){if(this['_readOnlyChannels']['has'](_0x2b0852)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x245776)throw new _0x2cc838('commentsrepository-missing-target');const _0x1a81f7=this['addCommentThread']({'channelId':_0x2b0852,'threadId':_0x1bc2df,'target':_0x245776,'context':_0x4581c8,'isResolvable':_0x550b36});if(!_0x1a81f7)return null;const _0x3fd01d=this['_threadToController']['get'](_0x1a81f7),_0x53ad3f=_0x3fd01d['view']['commentThreadInputView']['commentInputView'],_0x17674a=this['context']['plugins']['get'](y),_0x5b1a9e=_0x17674a['getByInnerView'](_0x3fd01d['view']);return _0x17674a['activate'](_0x5b1a9e),_0x53ad3f['once']('editorReady',()=>_0x53ad3f['focus']()),_0x1a81f7;}['hasCommentThread'](_0x3662f3){if('string'!=typeof _0x3662f3)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3662f3);}['updateCommentThread']({channelId:_0x3ce1c1=_t,threadId:_0x306dab,context:_0x5c066f,unlinkedAt:_0x4d2b1f,attributes:_0xd74564,isFromAdapter:_0x373e92=!0x1}){return this['fire'](Nt('updateCommentThread',_0x3ce1c1),{'channelId':_0x3ce1c1,'threadId':_0x306dab,'context':_0x5c066f,'unlinkedAt':_0x4d2b1f,'attributes':_0xd74564,'isFromAdapter':_0x373e92}),this['getCommentThread'](_0x306dab);}['getCommentThread'](_0x133ae0){if('string'!=typeof _0x133ae0)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x133ae0);}['fetchCommentThread']({channelId:_0x36ae3b,threadId:_0xd509d6}={}){const _0x2b2aea=this['getCommentThread'](_0xd509d6);if(_0x2b2aea)return Promise['resolve'](_0x2b2aea);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2cc838('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x36ae3b,'threadId':_0xd509d6})['then'](_0x1db47e=>this['hasCommentThread'](_0xd509d6)?this['getCommentThread'](_0xd509d6):_0x1db47e?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x36ae3b},_0x1db47e)):void 0x0)['catch'](_0x1fa9a5=>{throw console['error'](_0x1fa9a5),new _0x2cc838('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x18daf9,skipNotAttached:_0x2a4a0c=!0x1,skipEmpty:_0x40342a=!0x1,toJSON:_0x36b320=!0x1}={}){const _0x5ada87=[];for(const _0x19901d of this['_threads']['values']())_0x18daf9&&_0x19901d['channelId']!==_0x18daf9||_0x2a4a0c&&!_0x19901d['isAttached']||_0x40342a&&0x0===_0x19901d['length']||_0x5ada87['push'](_0x19901d);return _0x36b320?_0x5ada87['map'](_0x433d71=>_0x433d71['toJSON']()):_0x5ada87;}['getAnnotationForCommentThread'](_0x3a2271){const _0xb5d3fa=this['_threadToController']['get'](_0x3a2271);if(!_0xb5d3fa)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0xb5d3fa['view'])||null;}['getCommentThreadForAnnotation'](_0x1c3f88){const _0x65278b=this['_viewToController']['get'](_0x1c3f88['innerView']);return _0x65278b?_0x65278b['model']:null;}['setActiveCommentThread'](_0x104c64){const _0x42cd6e=this['context']['plugins']['get'](y);if(!_0x104c64)return void(this['activeCommentThread']&&_0x42cd6e['deactivateAll']());const _0x314961=this['getCommentThread'](_0x104c64);if(!_0x314961)throw new _0x2cc838('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x104c64});if(!this['_threadToController']['has'](_0x314961))throw new _0x2cc838('commentsrepository-active-not-attached',null,{'threadId':_0x104c64});const _0x45d1a8=_0x42cd6e['getByInnerView'](this['_threadToController']['get'](_0x314961)['view']);_0x42cd6e['activate'](_0x45d1a8);}['switchReadOnly'](_0x4ff0cb,_0x15c0ac){_0x4ff0cb?this['_readOnlyChannels']['add'](_0x15c0ac):this['_readOnlyChannels']['delete'](_0x15c0ac),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x366db0){return this['_readOnlyChannels']['has'](_0x366db0)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3a1a9c,_0x453abc){return new vt(_0x3a1a9c,_0x453abc);}['setPermissions'](_0x35908c,_0x29e493=_t){this['_permissions']['set'](_0x29e493,_0x35908c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3006cc=_t){return this['_permissions']['has'](_0x3006cc)?this['_permissions']['get'](_0x3006cc):bt;}['_addCommentThread']({channelId:_0x2c63b1,threadId:_0x2bb0ae,comments:_0x36d6ed,unlinkedAt:_0x36cb6e,resolvedAt:_0x3d966c,resolvedBy:_0x4caee0,target:_0x74044d,context:_0x140c19,attributes:_0x599ded,isFromAdapter:_0x5e63ed,isResolvable:_0x37ff82,isSubmitted:_0x48b3b4}){if('string'!=typeof _0x2bb0ae)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2bb0ae});if(this['hasCommentThread'](_0x2bb0ae))throw new _0x2cc838('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2bb0ae});const _0x5b7ccd=new pi(this,{'channelId':_0x2c63b1,'id':_0x2bb0ae,'context':_0x140c19,'attributes':_0x599ded,'unlinkedAt':_0x36cb6e,'resolvedAt':_0x3d966c,'resolvedBy':_0x4caee0?this['context']['plugins']['get'](it)['getUser'](_0x4caee0):null,'isResolvable':_0x37ff82,'isSubmitted':_0x48b3b4||_0x5e63ed});this['_threads']['set'](_0x2bb0ae,_0x5b7ccd);for(const _0x1a4b05 of _0x36d6ed)_0x5b7ccd['_add'](this['_createNewComment']({'threadId':_0x2bb0ae,..._0x1a4b05}));return _0x74044d&&_0x5b7ccd['attachTo'](_0x74044d),_0x5e63ed||!_0x5b7ccd['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2c63b1,'threadId':_0x2bb0ae});}['_submitCommentThread']({channelId:_0x1a5dc2,threadId:_0x359933}){if(!this['hasCommentThread'](_0x359933))throw new _0x2cc838('commentsrepository-missing-comment-thread',this);const _0x885caa=this['getCommentThread'](_0x359933);if(_0x885caa['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4ed894,comments:_0x1682a4,resolvedAt:_0x38ef5e,resolvedBy:_0x3336ac,context:_0xc22ed9,attributes:_0x25a084}=_0x885caa,_0x2265c5=this['context']['plugins']['get']('PendingActions'),_0x4df3eb=_0x2265c5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1a5dc2,'threadId':_0x4ed894,'comments':_0x1682a4['map'](_0x10df11=>_0x10df11['toJSON']()),'resolvedAt':_0x38ef5e,'resolvedBy':_0x3336ac?_0x3336ac['id']:_0x3336ac,'context':_0xc22ed9,'attributes':_0x25a084})['then'](({comments:_0x5bfd9a})=>{_0x2265c5['remove'](_0x4df3eb);for(const _0xcffd94 of _0x5bfd9a)this['_updateComment']({'channelId':_0x1a5dc2,'threadId':_0x359933,'commentId':_0xcffd94['commentId'],'createdAt':_0xcffd94['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x35c6a3=>{throw console['error'](_0x35c6a3),new _0x2cc838('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5c0b3b,target:_0xb5933f}){const _0x35739e=this['getCommentThread'](_0x5c0b3b);if(!_0x35739e)throw new _0x2cc838('commentsrepository-attach-missing-comment-thread',this);const _0x4b68c0=this['context']['plugins']['get']('PendingActions'),_0x5f082a=this['context']['plugins']['get'](y),_0x643f2a=this['_createCommentThreadView'](_0x35739e),_0x32cdef=new vt(_0x35739e,_0x643f2a);let _0xdea1ec=null;_0x643f2a['on']('change:isDirty',(_0x133b51,_0x4e3ea8,_0x5e4292)=>{_0x5e4292?_0xdea1ec=_0x4b68c0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xdea1ec&&(_0x4b68c0['remove'](_0xdea1ec),_0xdea1ec=null);}),this['_threadToController']['set'](_0x35739e,_0x32cdef),this['_viewToController']['set'](_0x643f2a,_0x32cdef);const _0x1bac2b=new E(this['context']['locale'],_0x643f2a);_0x1bac2b['bind']('length')['to'](_0x643f2a),_0x1bac2b['bind']('isDirty')['to'](_0x643f2a,'isDirty',_0x643f2a,'length',(_0x55abde,_0x2d0421)=>_0x55abde||!_0x2d0421),_0x1bac2b['bind']('isActive')['to'](_0x643f2a),_0x1bac2b['type']='comment';const _0x5b2f90=new T({'view':_0x1bac2b,'target':_0xb5933f,'type':'comment','isVisible':!_0x35739e['archivedAt']&&!!('function'==typeof _0xb5933f?_0xb5933f():_0xb5933f)});return _0x643f2a['on']('escape',()=>{_0x5b2f90['fire']('escape');}),this['_bindAnnotationToEditors'](_0x643f2a,_0x5b2f90),_0x5f082a['add'](_0x5b2f90),_0x5b2f90;}['_bindAnnotationToEditors'](_0x5dd4c4,_0x33c517){this['listenTo'](_0x5dd4c4,'editorReady',(_0x71ca53,_0x18fa47)=>{const _0x2e20d8=_0x18fa47['ui']['view']['body']['bodyCollectionContainer'];_0x33c517['focusableElements']['add'](_0x2e20d8),this['context']instanceof _0x1b0da7&&this['context']['ui']['focusTracker']['add'](_0x2e20d8);},{'priority':'highest'}),this['listenTo'](_0x5dd4c4,'editorDestroyed',(_0x486ede,_0x34b132)=>{const _0x7c219d=_0x34b132['ui']['view']['body']['bodyCollectionContainer'];_0x33c517['focusableElements']['has'](_0x7c219d)&&_0x33c517['focusableElements']['remove'](_0x7c219d),this['context']instanceof _0x1b0da7&&this['context']['ui']['focusTracker']['remove'](_0x7c219d);});}['_unbindEditors'](_0x433011){this['stopListening'](_0x433011,'editorReady'),this['stopListening'](_0x433011,'editorDestroyed');}['_createCommentThreadView'](_0xeb81a2){const _0x1e24ff=this['context']['plugins']['get'](it),{config:_0x4dd957,locale:_0x4c03c6}=this['context'],_0x457ef5=pt(_0x4dd957['get']('locale'),_0x4c03c6);return new(0x0,(_0x4dd957['get']('comments'))['CommentThreadView'])(_0x4c03c6,_0xeb81a2,_0x1e24ff['me'],{'editorConfig':{..._0x4dd957['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4dd957['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4dd957['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4dd957['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4dd957['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x457ef5,'CommentView':_0x4dd957['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x311a4c,channelId:_0x124212,resolvedAt:_0x2224de,resolvedBy:_0x55dc81,isFromAdapter:_0x4a157b}){if(!this['hasCommentThread'](_0x311a4c))throw new _0x2cc838('commentsrepository-missing-comment-thread',null,{'threadId':_0x311a4c});const _0x395305=this['getCommentThread'](_0x311a4c);if(_0x395305['isResolved'])throw new _0x2cc838('commentsrepository-resolved-comment-thread',null,{'threadId':_0x311a4c});const _0x2a0a00=this['context']['plugins']['get'](it);if(_0x395305['resolvedBy']=_0x2a0a00['getUser'](_0x55dc81),_0x395305['resolvedAt']=_0x2224de,_0x4a157b||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3bdec3=this['context']['plugins']['get']('PendingActions'),_0x2413a7=_0x3bdec3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x124212,'threadId':_0x311a4c})['then'](({resolvedAt:_0x25d09b,resolvedBy:_0x347dbc})=>{_0x3bdec3['remove'](_0x2413a7),_0x395305['resolvedBy']['id']!==_0x347dbc&&(_0x395305['resolvedBy']=_0x2a0a00['getUser'](_0x347dbc)),_0x395305['resolvedAt']=_0x25d09b;})['catch'](_0x5b1c6a=>{throw console['error'](_0x5b1c6a),new _0x2cc838('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x440a68,channelId:_0x5621c4,isFromAdapter:_0x31fbb5}){if(!this['hasCommentThread'](_0x440a68))throw new _0x2cc838('commentsrepository-missing-comment-thread',null,{'threadId':_0x440a68});const _0x467dc6=this['getCommentThread'](_0x440a68);if(!_0x467dc6['isResolved'])throw new _0x2cc838('commentsrepository-reopen-comment-thread',null,{'threadId':_0x440a68});if(_0x467dc6['resolvedBy']=null,_0x467dc6['resolvedAt']=null,_0x31fbb5||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x388925=this['context']['plugins']['get']('PendingActions'),_0x94694f=_0x388925['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5621c4,'threadId':_0x440a68})['then'](()=>_0x388925['remove'](_0x94694f))['catch'](_0x193fef=>{throw console['error'](_0x193fef),new _0x2cc838('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2e0665,isFromAdapter:_0xb82c23}){const _0x3bd9b2=this['getCommentThread'](_0x2e0665);if(!_0x3bd9b2)throw new _0x2cc838('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2e0665),this['_threads']['delete'](_0x2e0665),!_0x3bd9b2['isSubmitted']||_0xb82c23||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x37e4a8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x42da1e}=_0x3bd9b2,_0x34a2d6=_0x37e4a8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x42da1e,'threadId':_0x2e0665})['then'](()=>_0x37e4a8['remove'](_0x34a2d6))['catch'](_0xe21051=>{throw console['error'](_0xe21051),new _0x2cc838('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5580c4,unlinkedAt:_0xd18a94,context:_0x5002a1,attributes:_0x2af075,isFromAdapter:_0x2a9806}){if('string'!=typeof _0x5580c4)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5580c4});if(!this['hasCommentThread'](_0x5580c4))throw new _0x2cc838('commentsrepository-missing-comment-thread',null,{'threadId':_0x5580c4});const _0x37c6f4=this['getCommentThread'](_0x5580c4);let _0x5753f8=!0x1;if(void 0x0!==_0x5002a1&&_0x37c6f4['context']!==_0x5002a1&&(_0x37c6f4['context']=_0x5002a1,_0x5753f8=!0x0),void 0x0!==_0xd18a94&&_0x37c6f4['unlinkedAt']!==_0xd18a94&&(_0x37c6f4['unlinkedAt']=_0xd18a94,_0x5753f8=!0x0),_0x2af075&&!At(_0x2af075,_0x37c6f4['attributes'])&&(_0x37c6f4['attributes']=_0x2af075,_0x5753f8=!0x0),!_0x5753f8)return Promise['resolve']();if(!_0x37c6f4['isSubmitted']||_0x2a9806||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x12cdfd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1960ea}=_0x37c6f4,_0x3130b9=_0x12cdfd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1960ea,'threadId':_0x5580c4,'context':_0x5002a1,'unlinkedAt':_0xd18a94,'attributes':_0x2af075})['then'](()=>_0x12cdfd['remove'](_0x3130b9))['catch'](_0x282009=>{throw console['error'](_0x282009),new _0x2cc838('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1c9296){const _0x136334=this['context']['plugins']['get'](y),_0x34d49c=this['getCommentThread'](_0x1c9296);if(_0x34d49c['_isAttached']=!0x1,this['_threadToController']['has'](_0x34d49c)){const _0x7ac81a=this['_threadToController']['get'](_0x34d49c),_0x11803b=_0x7ac81a['view'],_0x147111=_0x136334['getByInnerView'](_0x11803b);this['_threadToController']['delete'](_0x34d49c),this['_viewToController']['delete'](_0x11803b),_0x147111&&_0x136334['remove'](_0x147111),_0x7ac81a['destroy'](),_0x11803b['destroy']()['then'](()=>{this['_unbindEditors'](_0x11803b);});}}['_updateActiveAnnotation']({threadId:_0x420b0b,resolvedAt:_0x321b9d,unlinkedAt:_0x33da56}){const _0x48df13=!!_0x321b9d,_0x1e383c=this['context']['plugins']['get'](y),_0x588714=this['getCommentThread'](_0x420b0b);if(this['_threadToController']['has'](_0x588714)){const _0xcd8249=this['_threadToController']['get'](_0x588714)['view'],_0x20eb6d=_0x1e383c['getByInnerView'](_0xcd8249);_0x20eb6d&&(_0x48df13&&_0x1e383c['_removeActiveAnnotation'](_0x20eb6d),_0x33da56?_0x20eb6d['isVisible']=!0x1:_0x20eb6d['refreshVisibility']());}}['_getExternalAuthor'](_0x4964e6){const _0x2a2ac3=this['context']['plugins']['get'](it),_0x5e18c5=It('external:'+_0x4964e6),_0x35e5cb=_0x2a2ac3['getUser'](_0x5e18c5);return _0x35e5cb||_0x2a2ac3['addUser']({'id':_0x5e18c5,'name':_0x4964e6});}['_createNewComment']({threadId:_0x4aa1d0,commentId:_0x17de47=_0x2f2703(),content:_0x3cb91e,authorId:_0x5996b6,createdAt:_0x5055df,attributes:_0x3103f8}){if('string'!=typeof _0x17de47)throw new _0x2cc838('commentsrepository-invalid-commentid');if('string'!=typeof _0x5996b6)throw new _0x2cc838('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3cb91e||!_0x3cb91e['trim']())throw new _0x2cc838('commentsrepository-invalid-comment-content');const _0x3df70f=this['context']['plugins']['get'](it)['getUser'](_0x5996b6);if(!_0x3df70f)throw new _0x2cc838('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5996b6});let _0x4c012e=null,_0x14a3a7=_0x5055df;return _0x3103f8?.['@external']&&(_0x4c012e=this['_getExternalAuthor'](_0x3103f8['@external']['authorName']),_0x14a3a7=new Date(_0x3103f8['@external']['createdAt'])),new wi(this,{'threadId':_0x4aa1d0,'id':_0x17de47,'author':_0x4c012e||_0x3df70f,'creator':_0x3df70f,'content':_0x3cb91e,'createdAt':_0x5055df,'authoredAt':_0x14a3a7,'attributes':_0x3103f8});}['_addComment'](_0x461791){let {threadId:_0x126779,content:_0x5a11ed,attributes:_0x400258,isFromAdapter:_0x16fc00}=_0x461791;const _0x36ad83=this['getCommentThread'](_0x461791['threadId']);if(!_0x36ad83)throw new _0x2cc838('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2b482f=this['_createNewComment'](_0x461791),{id:_0x2ce3ba}=_0x2b482f;if(_0x36ad83['_add'](_0x2b482f),_0x16fc00||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x36ad83['isSubmitted'])return Promise['resolve']();const _0x644f06=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7f0dfd}=_0x36ad83,_0x4442c9=_0x644f06['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x400258||(_0x400258={}),this['adapter']['addComment']({'channelId':_0x7f0dfd,'threadId':_0x126779,'commentId':_0x2ce3ba,'content':_0x5a11ed,'attributes':_0x400258})['then'](_0x3ed7a4=>{_0x644f06['remove'](_0x4442c9),_0x3ed7a4&&this['_updateComment']({'channelId':_0x7f0dfd,'threadId':_0x126779,'commentId':_0x2ce3ba,'createdAt':_0x3ed7a4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x218f6a=>{throw console['error'](_0x218f6a),new _0x2cc838('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x237e1c,commentId:_0x20a46b,content:_0x324278,createdAt:_0x5284aa,attributes:_0x31b146,isFromAdapter:_0x2d03d3}){if(void 0x0!==_0x324278&&('string'!=typeof _0x324278||!_0x324278['trim']()['length']))throw new _0x2cc838('commentsrepository-update-comment-invalid-content');const _0x2229c1=this['getCommentThread'](_0x237e1c),_0x28efca=_0x2229c1['getComment'](_0x20a46b);if(!_0x28efca)throw new _0x2cc838('commentsrepository-update-missing-comment',this);let _0x39778f=!0x1;if(_0x324278&&_0x324278!==_0x28efca['content']&&(_0x28efca['isEditable']||_0x2d03d3)&&(_0x28efca['content']=_0x324278,_0x39778f=!0x0),_0x5284aa&&_0x5284aa!==_0x28efca['createdAt']&&(_0x28efca['createdAt']=_0x5284aa,_0x28efca['attributes']&&_0x28efca['attributes']['@external']||(_0x28efca['authoredAt']=_0x5284aa),_0x39778f=!0x0),_0x31b146&&!At(_0x31b146,_0x28efca['attributes'])&&(_0x28efca['attributes']=_0x31b146,_0x39778f=!0x0),!_0x39778f)return Promise['resolve']();if(_0x2229c1['fire']('commentUpdated'),_0x2d03d3||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2eb26b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x21d050}=this['getCommentThread'](_0x28efca['threadId']),_0x5b6f46=_0x2eb26b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x21d050,'threadId':_0x237e1c,'commentId':_0x20a46b,'content':_0x324278,'attributes':_0x31b146})['then'](()=>_0x2eb26b['remove'](_0x5b6f46))['catch'](_0xf34a9e=>{throw console['error'](_0xf34a9e),new _0x2cc838('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x4de302,commentId:_0x33aa7c,isFromAdapter:_0x49af17}){const _0x16d18a=this['getCommentThread'](_0x4de302),_0x372d50=_0x16d18a['getComment'](_0x33aa7c);if(!_0x372d50)throw new _0x2cc838('commentsrepository-remove-missing-comment',this);if(_0x16d18a['_remove'](_0x372d50),_0x49af17||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3c3c5c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2b95c3}=_0x16d18a,_0x240bc2=_0x3c3c5c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2b95c3,'threadId':_0x4de302,'commentId':_0x33aa7c})['then'](()=>_0x3c3c5c['remove'](_0x240bc2))['catch'](_0x5a80d8=>{throw console['error'](_0x5a80d8),new _0x2cc838('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x3e3063(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1d6b0c,_0x336b10){super();const _0x259979=_0x1d6b0c['context']['plugins']['get'](it)['me'],_0x3d7dfc=_0x1d6b0c['getCommentThread'](_0x336b10['threadId']),_0x3599d2=0x0===_0x3d7dfc['comments']['length'],_0x5b6421=_0x259979===_0x336b10['author'];this['id']=_0x336b10['id'],this['threadId']=_0x336b10['threadId'],this['author']=_0x336b10['author'],this['creator']=_0x336b10['creator'],this['isExternal']=Boolean(_0x336b10['attributes']&&_0x336b10['attributes']['@external']),this['set']('content',_0x336b10['content']),this['createdAt']=_0x336b10['createdAt']||new Date(),this['set']('authoredAt',_0x336b10['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3d7dfc,'resolvedAt'),this['set']('attributes',_0x336b10['attributes']||{}),this['bind']('isEditable')['to'](_0x1d6b0c,'_permissions',()=>{const _0x235912=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['write'],_0x2163a1=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['modifyAll'];return _0x5b6421&&_0x235912||!_0x5b6421&&_0x2163a1;}),this['bind']('isRemovable')['to'](_0x3d7dfc,'isRemovable',_0x1d6b0c,'_permissions',_0x4b388c=>{const _0x145af3=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['write'],_0x7ae242=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['modifyAll'];return _0x5b6421&&_0x145af3||_0x4b388c&&_0x3599d2||!_0x5b6421&&_0x7ae242&&!_0x3599d2;}),this['bind']('isReadOnly')['to'](_0x3d7dfc,'isReadOnly'),this['_repository']=_0x1d6b0c;}get['weight'](){return Math['max'](function(_0x1b1fc3){const _0x379083=document['createElement']('div');return _0x379083['innerHTML']=_0x1b1fc3,_0x379083['textContent']['length'];}(this['content']),0xc8);}['update'](_0x409c36){const {threadId:_0x5aa64d,id:_0x2931ca}=this;if(!this['_repository']['hasCommentThread'](_0x5aa64d))throw new _0x2cc838('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x545c3d}=this['_repository']['getCommentThread'](_0x5aa64d);this['_repository']['fire'](Nt('updateComment',_0x545c3d,_0x5aa64d),{'channelId':_0x545c3d,'threadId':_0x5aa64d,'commentId':_0x2931ca,..._0x409c36});}['setAttribute'](_0x38d147,_0x345dda){const _0xf2f29b=wt(this['attributes']);yt(_0xf2f29b,_0x38d147,_0x345dda),this['update']({'attributes':_0xf2f29b});}['removeAttribute'](_0x13aace){const _0x159bc5=wt(this['attributes']);Ct(_0x159bc5,_0x13aace),this['update']({'attributes':_0x159bc5});}['remove'](_0x51ef2c={}){if(!_0x51ef2c['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xd15db4,id:_0x5f2af1}=this;if(!this['_repository']['hasCommentThread'](_0xd15db4))throw new _0x2cc838('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x157531}=this['_repository']['getCommentThread'](_0xd15db4);this['_repository']['fire'](Nt('removeComment',_0x157531,_0xd15db4),{'channelId':_0x157531,'threadId':_0xd15db4,'commentId':_0x5f2af1,..._0x51ef2c});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x446f02,..._0x18e2e3){for(const _0x2da497 of _0x18e2e3)void 0x0!==_0x2da497&&(_0x446f02+=':'+String(_0x2da497));return _0x446f02;}class ot extends _0x2d7805{constructor(_0x26b13f){super(_0x26b13f),this['set']('hasContent',!0x1);}['refresh'](){const _0x6319cc=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x38c2e8 of _0x6319cc['getRanges']())if(this['_hasContent'](_0x38c2e8))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3fe051=_0x2f2703(),ranges:_0x1c3139,comment:_0x40888f}={}){const _0x200a12=this['editor']['model'],_0x11e3d7=_0x1c3139??Array['from'](_0x200a12['document']['selection']['getRanges']()),_0x438a8b=[];for(const _0x1f90e5 of _0x11e3d7)this['_hasContent'](_0x1f90e5)&&_0x438a8b['push'](this['_trimToContent'](_0x1f90e5));if(!_0x438a8b['length'])throw new _0x2cc838('addcommentthreadcommand-incorrect-ranges',null);_0x40888f&&this['_createCommentThread'](_0x3fe051,_0x40888f),this['_createMarkersFromRanges'](_0x3fe051,_0x438a8b,!!_0x40888f);}['_createMarkersFromRanges'](_0x35c67b,_0x5df179,_0x462ada){this['editor']['model']['change'](_0x40e172=>{for(const _0x3fc86e of _0x5df179){const _0x21f19a=_0x2f2703()['substr'](0x1,0x5),_0x5369f1='comment:'+_0x35c67b+':'+_0x21f19a;_0x40e172['addMarker'](_0x5369f1,{'range':_0x3fc86e,'usingOperation':_0x462ada,'affectsData':_0x462ada});}});}['_createCommentThread'](_0x3d801c,_0x2f3266){const _0x1d4643=this['editor']['plugins']['get']('CommentsRepository'),_0x5450f7=this['editor']['config']['get']('collaboration.channelId'),_0x3c73c0=this['editor']['plugins']['get']('Users')['me'];if(!_0x3c73c0)throw new _0x2cc838('addcommentthreadcommand-user-not-found',null);_0x1d4643['addCommentThread']({'threadId':_0x3d801c,'channelId':_0x5450f7,'comments':[{'authorId':_0x3c73c0['id'],'content':_0x2f3266,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x386fa0){for(const _0x226cc7 of _0x386fa0['getItems']())if(this['_itemIsContent'](_0x226cc7))return!0x0;return!0x1;}['_itemIsContent'](_0x7d4818){return _0x7d4818['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x7d4818)&&!_0x7d4818['is']('element','tableCell');}['_trimToContent'](_0x2df054){const _0x42fa2e=_0x3c503a=>!this['_itemIsContent'](_0x3c503a['item']),_0x1d7c2b=_0x2df054['start']['getLastMatchingPosition'](_0x42fa2e),_0x1e9e78=_0x2df054['end']['getLastMatchingPosition'](_0x42fa2e,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1d7c2b,_0x1e9e78);}}class b extends _0x6d2056{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5cacc0){super(_0x5cacc0),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1a93d5=this['editor'],_0x577d18=_0x1a93d5['model']['document']['selection'],_0x2db02d=_0x35ab00(()=>this['refreshSelectedViews'](),0xa);_0x577d18['on']('change:range',(_0x420110,_0xb5d22a)=>{_0xb5d22a['directChange']&&(_0x2db02d['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1a93d5['editing']['view']['document'],'change:isFocused',(_0x5f2459,_0xa02d20,_0x2c7bdf)=>{_0x2c7bdf&&_0x2db02d();}),this['listenTo'](_0x1a93d5['ui']['focusTracker'],'change:isFocused',(_0x562331,_0x1997a9,_0x33ba2e)=>{_0x33ba2e||this['fire']('blur',{'isAnnotationTracked':_0x528ca6=>this['_editorAnnotationsData']['has'](_0x528ca6['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5136db){if(this['_editorAnnotations']['has'](_0x5136db['view']))return;this['_editorAnnotations']['add'](_0x5136db['view']),this['editor']['ui']['focusTracker']['add'](_0x5136db['view']['element']);const _0x5a3a6c=this['editor']['plugins']['get'](y);this['listenTo'](_0x5a3a6c['collection'],'remove',(_0x33c2f4,_0x3aa74a)=>{this['editor']['ui']['focusTracker']['remove'](_0x3aa74a['view']['element']),this['_editorAnnotations']['delete'](_0x3aa74a['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x311e74){if('function'!=typeof _0x311e74)throw new _0x2cc838('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x311e74);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xdfd8a3,annotations:_0x1f60c9}){const _0x2fd4b0=[],_0x19a129=this['editor']['model']['document']['selection'],_0x5f25c5=Array['from'](_0x19a129['getRanges']());for(const [_0x460ccf,_0x379443]of this['_editorAnnotationsData']){const _0x27694d=_0x1bb795(_0x379443),_0x4eddc3=_0x1f60c9['getByInnerView'](_0x460ccf);_0x27694d&&_0x4eddc3&&_0x2fd4b0['push']({'annotation':_0x4eddc3,'range':_0x27694d});}function _0x1bb795(_0x856fc7){for(const _0xdf69ee of _0x856fc7)for(const _0x3f261d of _0x5f25c5)if(_0xdf69ee['containsRange'](_0x3f261d,!_0x19a129['isCollapsed']))return _0xdf69ee;return null;}return _0x2fd4b0['sort']((_0x33f35e,_0x5c7b23)=>{const _0x5cd4cb=_0x33f35e['range'],_0x4fd2db=_0x5c7b23['range'];if(!_0x5cd4cb['isEqual'](_0x4fd2db)){if(_0x5cd4cb['containsRange'](_0x4fd2db,!0x0))return 0x1;if(_0x4fd2db['containsRange'](_0x5cd4cb,!0x0))return-0x1;}return _0x33f35e['annotation']==_0xdfd8a3?-0x1:_0x5c7b23['annotation']==_0xdfd8a3?0x1:0x0;})['map'](_0x48041c=>_0x48041c['annotation']);}get['_editorAnnotationsData'](){const _0x555290=new Map();for(const _0x308995 of Array['from'](this['_dataCollectors']))for(const [_0x16d12b,_0x2049ad]of _0x308995())_0x555290['set'](_0x16d12b,_0x2049ad);return _0x555290;}}class st extends _0x6d2056{['afterInit'](){const _0x303441=this['editor'];if(!_0x303441['plugins']['has']('RestrictedEditingModeEditing'))return;_0x303441['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x6d2056{constructor(_0x37e932){super(_0x37e932),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2affe0=this['editor'],_0x130d98=_0x2affe0['commands']['get']('importWord'),_0x190fae=_0x2affe0['plugins']['get'](it);_0x130d98&&(_0x130d98['on']('execute',(_0x1dc417,[,_0x3c03bf])=>{_0x3c03bf['collaboration_features']={'comments':!0x0,'user_id':_0x190fae['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x130d98,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x55ea29,_0x12e940){const {comment_threads:_0x378425}=_0x12e940;_0x378425&&_0x378425['forEach'](({thread_id:_0x1524fc,comments:_0x3fea25,is_resolved:_0x462d3d})=>{const _0x16c0e6=new Date(),_0x504d04=_0x3fea25['map'](({author:_0x115b71,content:_0x2de15c,created_at:_0x2b075f})=>({'content':_0x2de15c,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x16c0e6,'attributes':{'@external':{'authorName':_0x115b71,'createdAt':_0x2b075f?new Date(_0x2b075f):new Date(),'source':'importWord'}}})),_0x3b29ef=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3b29ef,'threadId':_0x1524fc,'comments':_0x504d04,'resolvedAt':_0x462d3d?_0x16c0e6:null});});}}class at extends _0x6d2056{constructor(_0x37d336){super(_0x37d336),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5f4077=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5f4077,'contentInsertion',(_0x3367a7,_0x6e2b0d)=>this['_removeMarkersWithoutThreads'](_0x6e2b0d['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x6353e7){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x6353e7;const _0x3f422d=this['editor']['plugins']['get']('CommentsRepository');for(const _0x11e984 of _0x6353e7['keys']()){const [_0x286918,_0x44e6c0]=_0x11e984['split'](':');'comment'!=_0x286918||_0x3f422d['hasCommentThread'](_0x44e6c0)||_0x6353e7['delete'](_0x11e984);}return _0x6353e7;}['_registerMarkerInClipboardPipeline'](){const _0x47c247=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x49c1a5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x49c1a5&&_0x47c247['_registerMarkerToCopy']('comment',_0x49c1a5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x2715af){switch(_0x2715af){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5ec4d9){const _0x411889=_0x5ec4d9['split'](':');return{'group':_0x411889[0x0],'id':_0x411889[0x1],'part':_0x411889[0x2]};}class ut extends _0x6d2056{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3cd63e,_0xc19e64)=>{if(!_0xc19e64['options']['showCommentHighlights'])return null;if(_0xc19e64['options']['ignoreResolvedComments']){const {id:_0x3fd657}=ft(_0x3cd63e['markerName']),_0xdf495a=this['editor']['plugins']['get'](o);if(_0xdf495a['getCommentThread'](_0x3fd657)?.['isResolved']&&_0x3cd63e['item'])return _0xc19e64['consumable']['consume'](_0x3cd63e['item'],'addMarker:'+_0x3cd63e['markerName']),_0xc19e64['consumable']['consume'](_0x3cd63e['item'],'removeMarker:'+_0x3cd63e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5ef63f=>{_0x5ef63f['on']('addMarker:comment',(_0x1efc0,_0x4830bf,_0x1e2ed8)=>{if(!_0x1e2ed8['options']['showCommentHighlights'])return;const _0x3e2922=_0x4830bf['item'];if(!_0x3e2922)return;const _0xf27d0c=_0x1e2ed8['mapper']['toViewElement'](_0x3e2922);this['editor']['model']['schema']['isObject'](_0x3e2922)&&_0xf27d0c&&!_0xf27d0c['getCustomProperty']('widget')&&_0xf27d0c['is']('containerElement')&&_0x3d60c9(_0xf27d0c,_0x1e2ed8['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5dfe9c,{writer:_0x3c5e1d,options:_0x443a9a})=>{if(!_0x443a9a['showCommentHighlights'])return null;const _0x21d98e=_0x3c5e1d['createContainerElement']('div'),_0x220705=_0x3c5e1d['createEmptyElement']('hr');return _0x3c5e1d['addClass']('ck-horizontal-line',_0x21d98e),_0x3c5e1d['insert'](_0x3c5e1d['createPositionAt'](_0x21d98e,0x0),_0x220705),_0x21d98e;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x488cea,{writer:_0x500da2,options:_0x4a5502})=>{if(!_0x4a5502['showCommentHighlights'])return null;const _0x1928b3=_0x500da2['createContainerElement']('span'),_0x798e5b=_0x500da2['createEmptyElement']('img');return _0x500da2['addClass']('image-inline',_0x1928b3),_0x500da2['insert'](_0x500da2['createPositionAt'](_0x1928b3,0x0),_0x798e5b),_0x1928b3;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x66de85,{writer:_0x4a1721,options:_0x21f5b1})=>{if(_0x21f5b1['showCommentHighlights'])return _0x4a1721['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2aeb2e,_0x3f820f,_0x3c8bad)=>{_0x3c8bad['options']['showCommentHighlights']&&_0x2aeb2e['stop']();},{'priority':'high'});}}class r extends _0x6d2056{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19f109){super(_0x19f109),this['set']('isThreadsLoadingPaused',!0x0),_0x19f109['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1ae9e9,_0x47d2bb,_0x545352,_0x458feb)=>{const _0x4bc907=_0x19f109['plugins']['get'](o),_0x445479=_0x545352?ft(_0x545352)['id']:null;_0x19f109['model']['change'](()=>{if(_0x445479){const _0x5e7bce=this['getAllMarkersForId'](_0x445479);for(const _0x37e73a of _0x5e7bce)_0x19f109['editing']['reconvertMarker'](_0x37e73a);}if(_0x458feb){const {id:_0x170730}=ft(_0x458feb),_0x242bc1=_0x4bc907['getCommentThread'](_0x170730);if(_0x242bc1&&_0x242bc1['unlinkedAt'])return;if(_0x242bc1&&!_0x242bc1['isAttached'])return;const _0x2fe6be=this['getAllMarkersForId'](_0x170730);for(const _0x1a256c of _0x2fe6be)_0x19f109['editing']['reconvertMarker'](_0x1a256c);}}),_0x445479&&this['scrollToThreadMarker'](_0x445479);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x1d719c=this['editor'],_0x2e5829=_0x1d719c['plugins']['get'](o),_0x50a6cb=_0x1d719c['config']['get']('collaboration.channelId'),_0x287056=_0x2e5829['getCommentThreads']()['filter'](_0x147bcd=>_0x147bcd['channelId']!==_0x50a6cb);_0x1d719c['commands']['add']('addCommentThread',new ot(_0x1d719c)),this['listenTo'](_0x1d719c,'change:isReadOnly',(_0x23088a,_0xb1dd5b,_0x5aa870)=>{_0x2e5829['switchReadOnly'](_0x5aa870,_0x1d719c['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2e5829,dt('addCommentThread',_0x50a6cb),(_0x21e911,{threadId:_0x4fde66})=>{const _0x2ec32b=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4fde66);_0x2ec32b?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4fde66);}),this['listenTo'](_0x2e5829,dt('removeCommentThread',_0x50a6cb),(_0xa77f0f,{threadId:_0x138d87})=>{_0x1d719c['model']['enqueueChange']({'isUndoable':!0x1},_0x1ef85f=>{const _0x80e49a=this['getAllMarkersForId'](_0x138d87);for(const _0x54166b of _0x80e49a)_0x1ef85f['removeMarker'](_0x54166b);});}),this['listenTo'](_0x2e5829,dt('resolveCommentThread',_0x50a6cb),(_0x5025c4,{threadId:_0x5d19c7})=>{(this['_reconvertMarkers'](_0x5d19c7),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5d19c7)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2e5829,dt('reopenCommentThread',_0x50a6cb),(_0x44d82a,{threadId:_0xf4d149})=>{this['_reconvertMarkers'](_0xf4d149);},{'priority':'low'}),this['listenTo'](_0x2e5829,dt('addComment',_0x50a6cb),(_0x18b3f8,{threadId:_0x305dcf,isFromAdapter:_0x38e46c})=>{const _0x40d75f=this['getAllMarkersForId'](_0x305dcf);if(_0x38e46c||0x0==_0x40d75f['length']||!_0x2e5829['hasCommentThread'](_0x305dcf))return;0x1===_0x2e5829['getCommentThread'](_0x305dcf)['length']&&_0x1d719c['model']['enqueueChange']({'isUndoable':!0x1},_0x495897=>{for(const _0x43d822 of _0x40d75f)_0x495897['updateMarker'](_0x43d822,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x287056);}['afterInit'](){!async function(_0xa7ae8e){const _0x12ccfd=_0x304d83([0x4d,0x4e,0x4c,0x45,0x4f,0x50,0x57,0x58,0x5a,0x69,0x6f,0x68,0x31,0x54,0x38,0x70,0x56,0x75,0x77,0x61,0x6c,0x65,0x34,0x39,0x76,0x32,0x37,0x42,0x36,0x6b,0x6a,0x52,0x6d,0x49,0x51,0x63,0x78,0x62,0x47,0x48,0x30,0x59,0x79,0x7a,0x66,0x4a,0x46,0x41,0x43,0x4b,0x71,0x44,0x53,0x6e,0x73,0x64,0x35,0x33,0x74,0x55,0x72,0x67]),_0x331356=0x213e51b3,_0x4b7f02=0x213923e3^_0x331356,_0x6ec92=window[_0x304d83([0x44,0x61,0x74,0x65])][_0x304d83([0x6e,0x6f,0x77])](),_0x424d62=_0xa7ae8e[_0x304d83([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x43e1ac=new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17eaf3=>{_0x424d62[_0x304d83([0x6f,0x6e,0x63,0x65])](_0x304d83([0x72,0x65,0x61,0x64,0x79]),_0x17eaf3);}),_0x357450={[_0x304d83([0x6b,0x74,0x79])]:_0x304d83([0x45,0x43]),[_0x304d83([0x75,0x73,0x65])]:_0x304d83([0x73,0x69,0x67]),[_0x304d83([0x63,0x72,0x76])]:_0x304d83([0x50,0x2d,0x32,0x35,0x36]),[_0x304d83([0x78])]:_0x304d83([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]),[_0x304d83([0x79])]:_0x304d83([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]),[_0x304d83([0x61,0x6c,0x67])]:_0x304d83([0x45,0x53,0x32,0x35,0x36])},_0x5e04d2=_0x424d62[_0x304d83([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x304d83([0x67,0x65,0x74])](_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x405082(){let _0x1d1137,_0x3197ac=null,_0x3733b3=null;try{if(_0x5e04d2==_0x304d83([0x47,0x50,0x4c]))return _0x304d83([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1d1137=_0x1de278(),!_0x1d1137)return _0x304d83([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1d1137[_0x304d83([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3733b3=_0x1efa49(_0x1d1137[_0x304d83([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1d1137[_0x304d83([0x6a,0x74,0x69])])),await _0x9817e2()?_0xf3b585()?_0x181661()?_0x304d83([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x363c0b()?(_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x304d83([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3197ac=_0x17916a(_0x304d83([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x304d83([0x74,0x72,0x69,0x61,0x6c])&&(_0x3197ac=_0x17916a(_0x304d83([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x53d50c()):_0x304d83([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x304d83([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x304d83([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x304d83([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x181661(){const _0xae1d08=[_0x304d83([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x304d83([0x74,0x72,0x69,0x61,0x6c])][_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x6ec92/0x3e8:0xe10*_0x4b7f02;return _0x1d1137[_0x304d83([0x65,0x78,0x70])]<_0xae1d08;}function _0xf3b585(){const _0x539bab=_0x1d1137[_0x304d83([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x539bab)return!0x1;if(_0x539bab[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x2a])))return!0x0;if(_0x539bab[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x43,0x4d,0x54])))return!0x0;if(_0x539bab[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x52,0x43,0x4d,0x54]))){if(_0x172e89())return!0x0;if(_0x2b2120()||_0x3fe7d3())return!0x0;}return!0x1;}function _0x363c0b(){const _0x51d234=_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x51d234||0x0==_0x51d234[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xb6c678}=new URL(window[_0x304d83([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x51d234[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb6c678))return!0x0;const _0x368735=_0xb6c678[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e]));return _0x51d234[_0x304d83([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3e0402=>_0x3e0402[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x2a])))[_0x304d83([0x6d,0x61,0x70])](_0x22dba3=>_0x22dba3[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e])))[_0x304d83([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x11d016=>_0x11d016[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x368735[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x304d83([0x6d,0x61,0x70])](_0x885145=>Array(_0x368735[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x885145[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x304d83([0x66,0x69,0x6c,0x6c])](_0x885145[0x0]===_0x304d83([0x2a])?_0x304d83([0x2a]):'')[_0x304d83([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x885145))[_0x304d83([0x73,0x6f,0x6d,0x65])](_0x483ccf=>_0x368735[_0x304d83([0x65,0x76,0x65,0x72,0x79])]((_0x5ad9e4,_0x457276)=>_0x483ccf[_0x457276]===_0x5ad9e4||_0x483ccf[_0x457276]===_0x304d83([0x2a])));}function _0x53d50c(){return _0x3197ac&&_0x3733b3?new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3bd79c,_0x5bbb0e)=>{_0x3197ac[_0x304d83([0x74,0x68,0x65,0x6e])](_0x3bd79c,_0x5bbb0e),_0x3733b3[_0x304d83([0x74,0x68,0x65,0x6e])](_0x5e97ee=>{_0x5e97ee!=_0x304d83([0x56,0x61,0x6c,0x69,0x64])&&_0x3bd79c(_0x5e97ee);},_0x5bbb0e);}):_0x3197ac||_0x3733b3||_0x304d83([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1efa49(_0x4248ee,_0x5e72b6){return new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2cf861=>{if(_0x52cb22())return _0x2cf861(_0x304d83([0x56,0x61,0x6c,0x69,0x64]));_0x35b36a(),_0x424d62[_0x304d83([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x304d83([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x23b7f0=!0x1;const _0x6d5627=_0x2f2703();function _0x24fe69(_0x5a6d5d){return!!_0x5a6d5d&&(typeof _0x5a6d5d===_0x304d83([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5a6d5d===_0x304d83([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5a6d5d[_0x304d83([0x74,0x68,0x65,0x6e])]===_0x304d83([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5a6d5d[_0x304d83([0x63,0x61,0x74,0x63,0x68])]===_0x304d83([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1b3caf(_0x1e9b86){_0x488172(_0x1e9b86)[_0x304d83([0x74,0x68,0x65,0x6e])](_0xfa2d1d=>{if(!_0xfa2d1d||_0xfa2d1d[_0x304d83([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x304d83([0x6f,0x6b]))return _0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1da36b(_0x40651f(_0x6d5627+_0x5e72b6))!=_0xfa2d1d[_0x304d83([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x304d83([0x56,0x61,0x6c,0x69,0x64]);})[_0x304d83([0x74,0x68,0x65,0x6e])](_0x2375c3=>(_0x2a61e3(),_0x2375c3),()=>{const _0x5065b8=_0x5d6aa8();return null==_0x5065b8?(_0x2a61e3(),_0x304d83([0x56,0x61,0x6c,0x69,0x64])):_0x304d83(_0x6ec92-_0x5065b8>(0x532d5b3^_0x331356)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x304d83([0x74,0x68,0x65,0x6e])](_0x2cf861)[_0x304d83([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2cf861(_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4d8fc5=0x2108bf33^_0x331356;function _0x2a61e3(){const _0x127877=_0x304d83([0x6c,0x6c,0x63,0x74,0x2d])+_0x1da36b(_0x40651f(_0x4248ee)),_0x39c817=_0x10813a(_0x1da36b(window[_0x304d83([0x4d,0x61,0x74,0x68])][_0x304d83([0x63,0x65,0x69,0x6c])](_0x6ec92/_0x4d8fc5)));window[_0x304d83([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x304d83([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x127877,_0x39c817);}function _0x5d6aa8(){const _0xd4226c=_0x304d83([0x6c,0x6c,0x63,0x74,0x2d])+_0x1da36b(_0x40651f(_0x4248ee)),_0xbd8371=window[_0x304d83([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x304d83([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd4226c);return _0xbd8371?window[_0x304d83([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10813a(_0xbd8371),0x10)*_0x4d8fc5:null;}function _0x488172(_0x1ef958){return new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xccc14a,_0x2c7ca5)=>{_0x1ef958[_0x304d83([0x74,0x68,0x65,0x6e])](_0xccc14a,_0x2c7ca5),window[_0x304d83([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2c7ca5,0x213f8573^_0x331356);});}}_0x424d62[_0x304d83([0x6f,0x6e])](_0x304d83([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1f4f76,_0x1f8f78)=>{if(_0x1f8f78[0x0]!=_0x4248ee)return _0x2cf861(_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1f8f78[0x1]={..._0x1f8f78[0x1],[_0x304d83([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x6d5627};},{[_0x304d83([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x304d83([0x68,0x69,0x67,0x68])}),_0x424d62[_0x304d83([0x6f,0x6e])](_0x304d83([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x469193=>{_0x24fe69(_0x469193[_0x304d83([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x23b7f0=!0x0,_0x1b3caf(_0x469193[_0x304d83([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x304d83([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x304d83([0x6c,0x6f,0x77])}),_0x43e1ac[_0x304d83([0x74,0x68,0x65,0x6e])](()=>{_0x23b7f0||_0x2cf861(_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52cb22(){return _0x424d62[_0x304d83([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x304d83([0x76,0x69,0x65,0x77])][_0x304d83([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x304d83([0x61,0x75,0x74,0x6f]);}function _0x35b36a(){_0x424d62[_0x304d83([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x304d83([0x76,0x69,0x65,0x77])][_0x304d83([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x304d83([0x61,0x75,0x74,0x6f]);}}function _0x17916a(_0x29fd5c){const _0x24eeaa=[new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xcf5a9=>setTimeout(_0xcf5a9,0x21376f7f^_0x331356)),_0x43e1ac[_0x304d83([0x74,0x68,0x65,0x6e])](()=>new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ae218=>{let _0x1cd314=0x0;_0x424d62[_0x304d83([0x6d,0x6f,0x64,0x65,0x6c])][_0x304d83([0x6f,0x6e])](_0x304d83([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x420d62,_0x37773a)=>{_0x37773a[0x0][_0x304d83([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1cd314++,_0x1cd314==(0x213e504b^_0x331356)&&(_0x3ae218(),_0x420d62[_0x304d83([0x6f,0x66,0x66])]());});}))];return window[_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x304d83([0x72,0x61,0x63,0x65])](_0x24eeaa)[_0x304d83([0x74,0x68,0x65,0x6e])](()=>_0x29fd5c);}async function _0x310f4c(){await _0x43e1ac,_0x424d62[_0x304d83([0x6d,0x6f,0x64,0x65,0x6c])][_0x304d83([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1d866f,_0x424d62[_0x304d83([0x6d,0x6f,0x64,0x65,0x6c])][_0x304d83([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1d866f,_0x424d62[_0x304d83([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x304d83([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x172e89(){return _0x4b4645(_0x304d83([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4be3c2(_0x304d83([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x304d83([0x73,0x74,0x61,0x74,0x65])]==_0x304d83([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2b2120(){return _0x4b4645(_0x304d83([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x3fe7d3(){return _0x4b4645(_0x304d83([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x110dab(_0x548920){const _0x8b67b4=_0x1abb03();_0x424d62[_0x8b67b4]=_0x304d83([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x548920,_0x548920!=_0x304d83([0x56,0x61,0x6c,0x69,0x64])&&_0x310f4c();}function _0x1abb03(){const _0x242662=window[_0x304d83([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x304d83([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x304d83([0x6e,0x6f,0x77])]())[_0x304d83([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x304d83([0x2e]),'');let _0x3777e2=_0x304d83([0x4d]);for(let _0x63065c=0x0;_0x63065c<_0x242662[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x63065c+=0x2){let _0x1788db=window[_0x304d83([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x242662[_0x304d83([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x63065c,_0x63065c+0x2));_0x1788db>=_0x12ccfd[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1788db-=_0x12ccfd[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3777e2+=_0x12ccfd[_0x1788db];}return _0x3777e2;}function _0x1de278(){const _0x1e0a58=_0x5e04d2[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e]));if(0x3!=_0x1e0a58[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3a4654(_0x1e0a58[0x1]);function _0x3a4654(_0x29d4e9){const _0x10d3a7=_0x21d067(_0x29d4e9);return _0x10d3a7&&_0x45f574()?_0x10d3a7:null;function _0x45f574(){const _0x29de8d=_0x10d3a7[_0x304d83([0x6a,0x74,0x69])],_0x3cbb77=window[_0x304d83([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x29de8d[_0x304d83([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x29de8d[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2e3cd6={..._0x10d3a7,[_0x304d83([0x6a,0x74,0x69])]:_0x29de8d[_0x304d83([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x29de8d[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2e3cd6[_0x304d83([0x76,0x63])],_0x40651f(_0x2e3cd6)==_0x3cbb77;}}}async function _0x9817e2(){let _0x2d7d2a=!0x0;try{const _0x552126=_0x5e04d2[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e])),[_0x4794c7,_0x4555a0,_0x10d7e6]=_0x552126;return _0x131d58(_0x4794c7),await _0x2b0b8e(_0x4794c7,_0x4555a0,_0x10d7e6),_0x2d7d2a;}catch{return!0x1;}function _0x131d58(_0x2c09c2){const _0x3c8684=_0x21d067(_0x2c09c2);_0x3c8684&&_0x3c8684[_0x304d83([0x61,0x6c,0x67])]==_0x304d83([0x45,0x53,0x32,0x35,0x36])||(_0x2d7d2a=!0x1);}async function _0x2b0b8e(_0x460701,_0x51f79c,_0x43a74b){const _0x516afc=window[_0x304d83([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x304d83([0x66,0x72,0x6f,0x6d])](_0x181b7f(_0x43a74b),_0x3e2977=>_0x3e2977[_0x304d83([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x157fca=new window[(_0x304d83([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x304d83([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x460701+_0x304d83([0x2e])+_0x51f79c),_0x49802c=window[_0x304d83([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x304d83([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x49802c)return;const _0x1429ef=await _0x49802c[_0x304d83([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x304d83([0x6a,0x77,0x6b]),_0x357450,{[_0x304d83([0x6e,0x61,0x6d,0x65])]:_0x304d83([0x45,0x43,0x44,0x53,0x41]),[_0x304d83([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x304d83([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x304d83([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x49802c[_0x304d83([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x304d83([0x6e,0x61,0x6d,0x65])]:_0x304d83([0x45,0x43,0x44,0x53,0x41]),[_0x304d83([0x68,0x61,0x73,0x68])]:{[_0x304d83([0x6e,0x61,0x6d,0x65])]:_0x304d83([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1429ef,_0x516afc,_0x157fca)||(_0x2d7d2a=!0x1);}}function _0x21d067(_0x183199){return _0x183199[_0x304d83([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x304d83([0x65,0x79]))?JSON[_0x304d83([0x70,0x61,0x72,0x73,0x65])](_0x181b7f(_0x183199)):null;}function _0x181b7f(_0x46741e){return window[_0x304d83([0x61,0x74,0x6f,0x62])](_0x46741e[_0x304d83([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x304d83([0x2b]))[_0x304d83([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x304d83([0x2f])));}function _0x40651f(_0x154f50){let _0x5eeaf9=0x1505;function _0x1e5977(_0x5edae6){for(let _0x134a3e=0x0;_0x134a3e<_0x5edae6[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x134a3e++){const _0x3279ed=_0x5edae6[_0x304d83([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x134a3e);_0x5eeaf9=(_0x5eeaf9<<0x5)+_0x5eeaf9+_0x3279ed,_0x5eeaf9&=_0x5eeaf9;}}function _0x3767b3(_0x5b2c86){Array[_0x304d83([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5b2c86)?_0x5b2c86[_0x304d83([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3767b3):_0x5b2c86&&typeof _0x5b2c86==_0x304d83([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x304d83([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5b2c86)[_0x304d83([0x73,0x6f,0x72,0x74])]()[_0x304d83([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3dbe30,_0x2c5b34])=>{_0x1e5977(_0x3dbe30),_0x3767b3(_0x2c5b34);}):_0x1e5977(window[_0x304d83([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5b2c86));}return _0x3767b3(_0x154f50),_0x5eeaf9>>>0x0;}function _0x1da36b(_0x21d852){return _0x21d852[_0x304d83([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x304d83([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x304d83([0x30]));}function _0x10813a(_0x381c57){return _0x381c57[_0x304d83([0x73,0x70,0x6c,0x69,0x74])]('')[_0x304d83([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x304d83([0x6a,0x6f,0x69,0x6e])]('');}function _0x4b4645(_0x2f39b5){return _0x424d62[_0x304d83([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x304d83([0x68,0x61,0x73])](_0x2f39b5);}function _0x4be3c2(_0x21b6f9){return _0x424d62[_0x304d83([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x304d83([0x67,0x65,0x74])](_0x21b6f9);}function _0x1d866f(){}function _0x304d83(_0x5bc92c){return _0x5bc92c['map'](_0x43f356=>String['fromCharCode'](_0x43f356))['join']('');}_0x110dab(await _0x405082());}(this);}['destroy'](){const _0x52ae2c=this['editor']['plugins']['get'](o),_0x50f4b5=this['editor']['config']['get']('collaboration.channelId');for(const _0x2a836f of _0x52ae2c['getCommentThreads']({'channelId':_0x50f4b5}))_0x52ae2c['_detachCommentThread'](_0x2a836f['id']),_0x52ae2c['_threads']['delete'](_0x2a836f['id']);super['destroy']();}['hasMarkerForId'](_0x5f3969){return this['getAllMarkersForId'](_0x5f3969)['length']>0x0;}['getAllMarkersForId'](_0x4cdd1a){const _0x1cd1f2=[];for(const _0x37d69b of this['editor']['model']['markers'])_0x37d69b['name']['startsWith']('comment:'+_0x4cdd1a)&&_0x1cd1f2['push'](_0x37d69b);return _0x1cd1f2;}['scrollToThreadMarker'](_0x385fc6){setTimeout(()=>{const _0x57ee44=this['_getTargetForId'](_0x385fc6);if(!_0x57ee44)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x385fc6&&nt({'target':_0x57ee44[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2ecedf){this['editor']['model']['change'](()=>{for(const _0x58a451 of this['getAllMarkersForId'](_0x2ecedf))this['editor']['editing']['reconvertMarker'](_0x58a451);});}['_attachArchivedThread'](_0x1d4eb2){const _0xb1127e=this['editor']['plugins']['get'](o),_0x27f775=this['editor']['plugins']['get'](b),_0x3945e6=_0xb1127e['getCommentThread'](_0x1d4eb2);if(!_0x3945e6['isAttached']){const _0x538556=_0x3945e6['attachTo'](()=>this['_getTargetForId'](_0x3945e6['id']));_0x27f775['registerAnnotation'](_0x538556),_0x3945e6['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1f9a55=this['editor'],_0x2ad2d5=_0x1f9a55['plugins']['get'](it);_0x1f9a55['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4460ff,_0x839edf)=>{const {id:_0x225ff1}=ft(_0x4460ff['markerName']),_0x2c8951=_0x1f9a55['plugins']['get'](o)['getCommentThread'](_0x225ff1),_0x3c2b0e=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x225ff1;let _0x4e2d65;if(_0x2c8951&&_0x2c8951['isResolved']&&!_0x3c2b0e&&_0x4460ff['item'])return _0x839edf['consumable']['consume'](_0x4460ff['item'],'addMarker:'+_0x4460ff['markerName']),_0x839edf['consumable']['consume'](_0x4460ff['item'],'removeMarker:'+_0x4460ff['markerName']),null;const _0x909c99=['ck-comment-marker'];return _0x3c2b0e&&_0x909c99['push']('ck-comment-marker--active'),_0x4e2d65=_0x2c8951?.['length']?_0x2c8951['comments']['first']['author']['id']:_0x2ad2d5['me']['id'],{'classes':_0x909c99,'attributes':{'data-comment':_0x225ff1,'data-author-id':_0x4e2d65}};}}),_0x1f9a55['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x55fb8c,{options:_0x4a0571})=>{if(_0x4a0571['showCommentHighlights'])return null;const _0xbdfc2=_0x1f9a55['plugins']['get'](o),_0x485295=_0x1f9a55['model']['markers']['get'](_0x55fb8c),{id:_0x3d7cde,part:_0x1ec587}=ft(_0x55fb8c);return _0x485295&&!_0x485295['affectsData']||_0x4a0571['ignoreResolvedComments']&&_0xbdfc2['getCommentThread'](_0x3d7cde)?.['isResolved']?null:{'group':'comment','name':_0x1ec587?_0x3d7cde+':'+_0x1ec587:_0x3d7cde};}}),_0x1f9a55['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2b06d3,{writer:_0x24cc79})=>_0x24cc79['createElement']('$marker',{'data-name':'comment:'+_0x2b06d3['getAttribute']('id')})}),_0x1f9a55['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x317f1e=this['editor'],_0x23ad3d=_0x317f1e['plugins']['get'](o),_0x4cd130=new Set(),_0x5d2cbb=new Set();_0x317f1e['model']['document']['registerPostFixer'](_0x10824e=>{let _0x624ede=!0x1;for(const {name:_0x319c49,data:_0x35ebb8}of _0x317f1e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x21c8f7,id:_0x2975ec}=ft(_0x319c49);let _0x1c8163=_0x35ebb8['newRange'];if('comment'!==_0x21c8f7||!_0x1c8163)continue;const _0x1dcb85='$graveyard'===_0x1c8163['root']['rootName'];_0x1dcb85||(_0x1c8163=ht(_0x1c8163,_0x317f1e['model']),!_0x1c8163||_0x1c8163['isCollapsed']||!_0x35ebb8['newRange']||_0x1c8163['isEqual'](_0x35ebb8['newRange']))?_0x317f1e['model']['hasContent'](_0x1c8163)&&!_0x1dcb85?this['isThreadsLoadingPaused']?_0x4cd130['add'](_0x319c49):this['_handleThreadMarker'](_0x319c49,_0x2975ec):(_0x5d2cbb['add'](_0x319c49),_0x4cd130['delete'](_0x319c49),_0x10824e['removeMarker'](_0x319c49),_0x624ede=!0x0):(_0x10824e['updateMarker'](_0x319c49,{'range':_0x1c8163}),_0x624ede=!0x0);}return _0x624ede;}),this['on']('change:isThreadsLoadingPaused',(_0x19df27,_0x1bafbc,_0x5164c6)=>{if(!_0x5164c6&&_0x4cd130['size'])for(const _0x1dbae3 of _0x4cd130){const {id:_0xa551ea}=ft(_0x1dbae3);_0x4cd130['delete'](_0x1dbae3),_0x317f1e['model']['markers']['get'](_0x1dbae3)&&this['_handleThreadMarker'](_0x1dbae3,_0xa551ea);}}),this['listenTo'](_0x317f1e['model']['document'],'change',()=>{for(const {name:_0x179f70,data:{newRange:_0x39c386}}of _0x317f1e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2c166c,id:_0x2409f3}=ft(_0x179f70);if('comment'!==_0x2c166c)continue;const _0x2bd6b1=_0x23ad3d['getCommentThread'](_0x2409f3),_0x4cf22a=this['hasMarkerForId'](_0x2409f3);_0x2bd6b1&&(!_0x2bd6b1['_hasTargetInContent']&&_0x39c386&&_0x317f1e['editing']['view']['once']('render',()=>{const _0x142447=_0x317f1e['plugins']['get'](y),_0x1c3806=_0x23ad3d['_threadToController']['get'](_0x2bd6b1)['view'];_0x142447['getByInnerView'](_0x1c3806)['refreshVisibility']();},{'priority':'low'}),_0x2bd6b1['_hasTargetInContent']=_0x4cf22a||!!_0x39c386),_0x39c386||(_0x5d2cbb['add'](_0x179f70),_0x4cd130['delete'](_0x179f70));}for(const _0x5020df of _0x5d2cbb){const {id:_0x439596}=ft(_0x5020df),_0x1a527d=_0x23ad3d['getCommentThread'](_0x439596);if(_0x4cd130['delete'](_0x5020df),!_0x1a527d)continue;const _0x18f362=this['hasMarkerForId'](_0x439596);_0x18f362||_0x1a527d['isSubmitted']?_0x18f362||_0x1a527d['unlinkedAt']||_0x1a527d['setUnlinkedAt'](new Date()):_0x1a527d['remove']();}_0x5d2cbb['clear']();});}['_handleInitialThreads'](_0x33e5e3){_0x33e5e3['forEach'](_0x518d66=>{_0x518d66['unlinkedAt']&&this['_attachArchivedThread'](_0x518d66['id']);});}['_getTargetForId'](_0x102b88){const _0x4601b1=this['editor'],_0x4c9ca7=this['getAllMarkersForId'](_0x102b88);return et(_0x4601b1['editing'],_0x4c9ca7);}['_getTextContext'](_0x5f2e0c){const _0x32732e=this['getAllMarkersForId'](_0x5f2e0c);let _0x31e839='',_0x3866ef=!0x1;for(const _0x43f442 of _0x32732e){const _0x254d4f=_0x43f442['getRange']();for(const _0x4ed73b of Array['from'](_0x254d4f['getItems']()))_0x4ed73b['is']('$textProxy')?(_0x31e839&&_0x3866ef&&(_0x31e839+='\x20',_0x3866ef=!0x1),_0x31e839+=_0x4ed73b['data']):_0x3866ef=!0x0;_0x3866ef=!0x0;}return _0x31e839['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3a566c,_0x1ead6c){const _0x177256=this['editor'],_0x5cb7af=_0x177256['plugins']['get'](o);let _0x4a6985=_0x5cb7af['getCommentThread'](_0x1ead6c);const _0x1dc562=_0x177256['config']['get']('collaboration.channelId'),_0x505375=_0x177256['plugins']['get'](b);if(_0x4a6985&&(_0x4a6985['unlinkedAt']&&_0x4a6985['setUnlinkedAt'](null),_0x4a6985['isAttached']))return _0x4a6985;return!this['getAllMarkersForId'](_0x1ead6c)[0x0]['managedUsingOperations']?_0x177256['editing']['view']['once']('render',()=>{if(_0x5cb7af['getCommentThread'](_0x1ead6c))return;const _0x3819b8=_0x177256['plugins']['get'](y);_0x4a6985=_0x5cb7af['openNewCommentThread']({'channelId':_0x1dc562,'threadId':_0x1ead6c,'target':()=>this['_getTargetForId'](_0x1ead6c),'context':{'type':'text','value':this['_getTextContext'](_0x1ead6c)}});const _0x6c64a0=_0x5cb7af['_threadToController']['get'](_0x4a6985)['view'],_0x3d4761=_0x3819b8['getByInnerView'](_0x6c64a0);_0x3d4761&&_0x505375['registerAnnotation'](_0x3d4761);},{'priority':'low'}):_0x5cb7af['fetchCommentThread']({'channelId':_0x1dc562,'threadId':_0x1ead6c})['then'](_0x422d1f=>{if('destroyed'!==_0x177256['state']){if(_0x4a6985=_0x422d1f,_0x4a6985&&!_0x4a6985['isAttached']){const _0x3dfe31=_0x4a6985['attachTo'](()=>this['_getTargetForId'](_0x1ead6c));_0x505375['registerAnnotation'](_0x3dfe31),_0x4a6985['isResolved']&&this['_reconvertMarkers'](_0x1ead6c);}else{if(!_0x4a6985){const _0x53b2b8=this['getAllMarkersForId'](_0x1ead6c);_0x177256['model']['change'](_0x13654b=>{for(const _0x2b5553 of _0x53b2b8)_0x13654b['removeMarker'](_0x2b5553);});}}}}),_0x4a6985;}['_handleThreadMarker'](_0x2622bc,_0x3d24a9){const _0x1113bc=this['_attachMarkerToThread'](_0x2622bc,_0x3d24a9);_0x1113bc&&!_0x1113bc['context']&&_0x1113bc['setContext']({'type':'text','value':this['_getTextContext'](_0x3d24a9)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3d8664=this['editor'];rt(_0x3d8664['model'],({left:_0x491993,entered:_0xe8c515})=>{for(const _0x63339d of _0x491993)if(mt(_0x63339d)){_0x3d8664['ui']['ariaLiveAnnouncer']['announce'](N(_0x3d8664['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xbd136 of _0xe8c515)if(mt(_0xbd136)){_0x3d8664['ui']['ariaLiveAnnouncer']['announce'](N(_0x3d8664['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x3f042c)));break;}});}}function dt(_0x3148c7,_0x1b724e){return _0x1b724e?_0x3148c7+':'+_0x1b724e:_0x3148c7;}function ht(_0x2338a9,_0xc62eb0){const _0x24dd3f=_0xc62eb0['schema'],_0x527f84=_0xc62eb0['createRange'](_0x2338a9['start']);for(const _0x57e573 of _0x2338a9['getWalker']()){const {type:_0x30d6a1,item:_0x1f8b76,nextPosition:_0x4be4d8}=_0x57e573;if('text'===_0x30d6a1||_0x24dd3f['isObject'](_0x1f8b76)){const _0x74ba77=_0xc62eb0['createPositionBefore'](_0x1f8b76);_0x527f84['isCollapsed']&&(_0x527f84['start']=_0x74ba77),_0x527f84['end']=_0x4be4d8;}}return _0x527f84;}function mt(_0x5193c8){return'comment'===ft(_0x5193c8['name'])['group'];}class s extends _0x6d2056{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x2f8f3b=this['editor'],_0xb6efa2=_0x2f8f3b['plugins']['get'](o),_0x9a7125=_0x2f8f3b['plugins']['get'](r),_0x4d1137=_0x2f8f3b['plugins']['get'](y),_0x45956e=_0x2f8f3b['plugins']['get'](b);_0x2f8f3b['ui']['componentFactory']['add']('comment',()=>{const _0x58d12d=this['_createUIButton'](_0x3596fa);return _0x58d12d['tooltip']=!0x0,_0x58d12d;}),_0x2f8f3b['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1a9c60)),_0x45956e['addSourceCollector'](()=>{const _0x5af8b6=[];for(const [_0x17d0e6,_0x22452a]of _0xb6efa2['_threadToController']){const _0x1efe9d=_0x9a7125['getAllMarkersForId'](_0x17d0e6['id']),_0x3c8307=_0x1efe9d['map'](_0x2b933f=>_0x2b933f['getRange']());_0x1efe9d['length']>0x0&&_0x5af8b6['push']([_0x22452a['view'],_0x3c8307]);}return _0x5af8b6;}),this['listenTo'](_0x4d1137,'change:activeAnnotations',(_0x3ce338,_0x423228,_0x1951f3)=>{const _0x521007=Array['from'](_0x1951f3)['map'](_0x5f45a=>_0x5f45a['innerView'])['find'](_0x167eca=>_0xb6efa2['_viewToController']['has'](_0x167eca));if(!_0x521007)return void(_0x9a7125['activeMarker']=null);const _0x2dfd49=_0xb6efa2['_viewToController']['get'](_0x521007)['model']['id'],_0x5e9eb0='comment:'+_0x2dfd49;_0x2dfd49&&_0x9a7125['hasMarkerForId'](_0x2dfd49)?_0x9a7125['activeMarker']=_0x5e9eb0:_0x9a7125['activeMarker']&&(_0x9a7125['activeMarker']=null);}),this['listenTo'](_0xb6efa2,'removeCommentThread',(_0x1151ae,{threadId:_0x15da74,isFromAdapter:_0x1f7798})=>{!_0x1f7798&&_0x2f8f3b['ui']['focusTracker']['isFocused']&&_0x9a7125['hasMarkerForId'](_0x15da74)&&_0x2f8f3b['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xb6efa2,'addComment',(_0x5b10a,{threadId:_0x58b4fa,isFromAdapter:_0x197a5b})=>{if(_0x197a5b||!_0x9a7125['hasMarkerForId'](_0x58b4fa)||!_0xb6efa2['hasCommentThread'](_0x58b4fa))return;0x1===_0xb6efa2['getCommentThread'](_0x58b4fa)['length']&&(_0x2f8f3b['editing']['view']['focus'](),_0x5b10a['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3704b3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x44c594;for(const _0x307ecf in _0x3704b3){const _0x5e1148=_0x307ecf,_0x4c8464=_0x3704b3[_0x5e1148];if('commentsLicenseKeyValid'==_0x4c8464||'commentsLicenseKeyInvalid'==_0x4c8464||'commentsLicenseKeyExpired'==_0x4c8464||'commentsLicenseKeyDomainLimit'==_0x4c8464||'commentsLicenseKeyNotAllowed'==_0x4c8464||'commentsLicenseKeyEvaluationLimit'==_0x4c8464||'commentsLicenseKeyTrialLimit'==_0x4c8464||'commentsLicenseKeyUsageLimit'==_0x4c8464){delete _0x3704b3[_0x5e1148],_0x44c594=_0x4c8464,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x44c594&&_0x3704b3['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x44c594&&_0x3704b3['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x44c594&&_0x3704b3['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x559659){const _0x15261d=this['editor'],_0x43d48d=new _0x559659(_0x15261d['locale']),_0x59d4cc=_0x15261d['commands']['get']('addCommentThread');return _0x43d48d['set']({'label':N(_0x15261d['locale'],'Comment'),'icon':_0x57f000}),_0x43d48d['bind']('isEnabled')['to'](_0x59d4cc,'hasContent'),this['listenTo'](_0x43d48d,'execute',()=>{_0x59d4cc['execute']();}),_0x43d48d;}}class i extends _0x6d2056{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x566367){super(_0x566367),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3d33f1,_0x50350f,_0x497adc)=>{_0x497adc?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x11701c,_0x2f5f79]of this['editor']['commands'])_0x2f5f79['affectsData']&&'addCommentThread'!==_0x11701c&&_0x2f5f79['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4d8866=this['editor']['editing']['view']['document'];this['listenTo'](_0x4d8866,'cut',_0x4ad505=>_0x4ad505['stop'](),{'priority':'highest'}),this['listenTo'](_0x4d8866,'clipboardInput',_0x44c6be=>_0x44c6be['stop'](),{'priority':'highest'}),this['listenTo'](_0x4d8866,'delete',_0x571952=>_0x571952['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x24f506,_0x877f1d]of this['editor']['commands'])_0x877f1d['affectsData']&&'addCommentThread'!==_0x24f506&&_0x877f1d['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x313b3a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x9aabc0){super(_0x9aabc0),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x52ab13=this['context']['plugins']['get'](y);this['listenTo'](_0x52ab13,'_activateAnnotation',(_0x5cd5d4,_0x201e2b)=>{for(const _0x55c921 of this['activeUIs']){const _0x43d2d9=this['_uis']['get'](_0x55c921);(0x0,this['uisData']['get'](_0x55c921)['filter'])(_0x201e2b)&&_0x43d2d9['setActiveAnnotation'](_0x201e2b);}}),this['listenTo'](_0x52ab13,'_deactivateAllAnnotations',()=>{for(const _0x342714 of this['activeUIs']){this['_uis']['get'](_0x342714)['setActiveAnnotation'](null);}}),this['listenTo'](_0x52ab13['_visibleAnnotations'],'add',(_0x4bfbf8,_0x2187d5)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2187d5);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x50d44d){return this['activeUIs']['has'](_0x50d44d);}['activate'](_0x4e5efb,_0x50250b=this['defaultFilter']){const _0xb8a5e9=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x4e5efb))throw new _0x2cc838('annotationsuis-missing-ui',this,{'uiName':_0x4e5efb});this['isActive'](_0x4e5efb)&&this['deactivate'](_0x4e5efb),this['activeUIs']['add'](_0x4e5efb);const _0x387cbc=new S();v({'source':_0xb8a5e9['_visibleAnnotations'],'target':_0x387cbc,'filter':_0x50250b}),this['uisData']['set'](_0x4e5efb,{'collection':_0x387cbc,'filter':_0x50250b});const _0x14232e=this['_uis']['get'](_0x4e5efb);_0x14232e['attach'](_0x387cbc),this['listenTo'](_0x14232e,'change:activeAnnotation',(_0x16705c,_0x3838a5,_0x9d1ba2,_0x2b690d)=>{_0x2b690d&&_0xb8a5e9['_removeActiveAnnotation'](_0x2b690d),_0x9d1ba2&&_0xb8a5e9['_addActiveAnnotation'](_0x9d1ba2);});}['deactivate'](_0x36f350){if(this['activeUIs']['delete'](_0x36f350),!this['_uis']['has'](_0x36f350))throw new _0x2cc838('annotationsuis-missing-ui',this,{'uiName':_0x36f350});const _0x519ff2=this['_uis']['get'](_0x36f350);_0x519ff2['detach'](),this['stopListening'](_0x519ff2),this['uisData']['get'](_0x36f350)['collection']['destroy'](),this['uisData']['delete'](_0x36f350);}['switchTo'](_0x4a8c27){if(!this['_uis']['has'](_0x4a8c27))throw new _0x2cc838('annotationsuis-missing-ui',this,{'uiName':_0x4a8c27});const _0x49ba88=this['context']['plugins']['get'](y),_0x472a15=Array['from'](_0x49ba88['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4a8c27);const _0x203fc9=this['_uis']['get'](_0x4a8c27);_0x203fc9['setActiveAnnotation'](_0x472a15),_0x203fc9['_setSelectedAnnotations']&&_0x472a15&&_0x203fc9['_setSelectedAnnotations']([_0x472a15]);}['deactivateAll'](){for(const _0x2200fb of this['activeUIs'])this['deactivate'](_0x2200fb);}['register'](_0x25921d,_0x308481){if(this['_uis']['has'](_0x25921d))throw new _0x2cc838('annotationsuis-register-already-registered');if('function'!=typeof _0x308481['attach']||'function'!=typeof _0x308481['detach']||'function'!=typeof _0x308481['setActiveAnnotation'])throw new _0x2cc838('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x25921d,_0x308481);}['refilterAnnotations'](){const _0x106fef=this['context']['plugins']['get'](y)['collection'],_0x151ca6=new Map(),_0x2442cd=Array['from'](this['activeUIs']);for(const _0x1b20a6 of this['activeUIs']){const _0x245255=this['uisData']['get'](_0x1b20a6)['collection'];for(const _0x385237 of _0x245255)_0x151ca6['set'](_0x385237,_0x1b20a6);}for(const _0xd94761 of _0x106fef){const _0x1c168d=_0x151ca6['get'](_0xd94761);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd94761);const _0x3a9808=_0x2442cd['find'](_0x4e2e12=>this['uisData']['get'](_0x4e2e12)['filter'](_0xd94761));_0x1c168d!==_0x3a9808&&(_0x1c168d&&this['uisData']['get'](_0x1c168d)['collection']['remove'](_0xd94761),_0x3a9808&&this['uisData']['get'](_0x3a9808)['collection']['add'](_0xd94761));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd4dc26){const _0x506a87=[];for(const _0x2773b0 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2773b0)['filter'])(_0xd4dc26)&&_0x506a87['push'](_0x2773b0);}if(_0x506a87['length']>0x1)throw new _0x2cc838('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x506a87,'annotationType':_0xd4dc26['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4a02fa){super(_0x4a02fa),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2fb385,_0x12e097)=>_0x2fb385+_0x12e097),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4af58a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4af58a['to']('isAnimationDisabled',_0x36ce81=>_0x36ce81?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4af58a['to']('top',_0x45f7ad=>Ot(_0x45f7ad))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x22993e=this['element']['clientHeight'];_0x22993e&&(this['height']=_0x22993e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x313b3a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8da636){super(_0x8da636),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 _0x550d16=this['context']['config']['get']('sidebar.container');_0x550d16&&this['setContainer'](_0x550d16);}['setContainer'](_0x400a2f){if(!g(_0x400a2f))throw new _0x2cc838('sidebar-setcontainer-invalid-element');this['container']=_0x400a2f;}['_attachToContainer']({viewClass:_0x509097='',spaceBetweenItems:_0x46a409=0x19}={}){if(!g(this['container']))throw new _0x2cc838('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x509097,this['_spaceBetweenItems']=_0x46a409;}['rearrange']({removedAnnotation:_0x92a7e,previousAnnotation:_0x3983c9,nextAnnotation:_0x58de9c}){const _0x1bf15c=this['getSidebarItemView'](_0x92a7e);this['view']['list']['remove'](_0x1bf15c),this['_destroySidebarItemView'](_0x92a7e),_0x3983c9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3983c9)),_0x58de9c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x58de9c)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5276ff,activatedAnnotation:_0x43b569,disableAnimationOnActivatedAnnotation:_0x5837c7}){if(this['_activeAnnotation']=_0x43b569,_0x5276ff){_0x5276ff['isActive']=!0x1;const _0x4f152c=this['getSidebarItemView'](_0x5276ff);_0x4f152c&&_0x5837c7&&(_0x4f152c['isAnimationDisabled']=!0x1);}if(_0x43b569){const _0x40b4d5=this['getSidebarItemView'](_0x43b569);_0x40b4d5&&(_0x43b569['isActive']=!0x0,_0x5837c7&&(_0x40b4d5['isAnimationDisabled']=!0x0,_0x40b4d5['top']+=0x1),this['_alignToTargetRect'](_0x40b4d5));}}['_detachFromContainer'](_0x4bcea9){if(this['view']['element']['remove'](),_0x4bcea9){for(const _0x53bde2 of _0x4bcea9)this['_destroySidebarItemView'](_0x53bde2);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1239fd,_0x23572d){_0x23572d||(_0x23572d=_0x1239fd['view']);const _0x4e4e8f=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4e4e8f,_0x1239fd),this['_annotationToSidebarItemView']['set'](_0x1239fd,_0x4e4e8f),_0x4e4e8f['content']['add'](_0x23572d),this['listenTo'](_0x1239fd['view'],'change:targetRect',(_0x3bafe9,_0x171ee6,_0x4b97af)=>{const _0x1a4275=this['_getTargetTop'](_0x1239fd,_0x4b97af);_0x4e4e8f['_targetTop']!=_0x1a4275&&(_0x4e4e8f['_targetTop']=_0x1a4275,this['_setItemTop'](_0x4e4e8f,_0x1a4275));}),this['listenTo'](_0x4e4e8f,'change:top',()=>{this['_recalculate'](_0x4e4e8f,'top');}),this['listenTo'](_0x4e4e8f,'change:bottom',()=>{this['_recalculate'](_0x4e4e8f,'bottom');}),this['_alignToTargetRect'](_0x4e4e8f);const _0x1d2ef6=this['_getItemBefore'](_0x4e4e8f);if(_0x1d2ef6)this['_alignAfterItem'](_0x1d2ef6,_0x4e4e8f)||this['_alignToTargetRect'](_0x4e4e8f);else this['_alignToTargetRect'](_0x4e4e8f);return this['_updateLastItem'](),this['view']['list']['add'](_0x4e4e8f),_0x4e4e8f;}['_alignForTopChange'](_0x44c6d6){if(!_0x44c6d6['content']['length'])return;const _0x42f434=this['_getItemBefore'](_0x44c6d6);if(!_0x42f434)return;const _0x71d84f=this['_sidebarItemViewToAnnotation']['get'](_0x42f434),_0x2f1c63=this['_activeAnnotation'];_0x2f1c63&&_0x2f1c63===_0x71d84f?this['_alignAfterItem'](_0x42f434,_0x44c6d6):this['_alignBeforeItem'](_0x44c6d6,_0x42f434);}['_alignForBottomChange'](_0xe453ed){if(!_0xe453ed['content']['length'])return;const _0x78ec80=this['_getItemAfter'](_0xe453ed);if(!_0x78ec80)return;const _0x55f295=this['_sidebarItemViewToAnnotation']['get'](_0x78ec80),_0x18b62e=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x1c90d7=this['_activeAnnotation'];_0x1c90d7&&_0x1c90d7===_0x55f295&&_0x18b62e?(this['_alignBeforeItem'](_0x78ec80,_0xe453ed),this['_alignAfterItem'](_0xe453ed,_0x78ec80)):_0x1c90d7&&_0x1c90d7===_0x55f295?this['_alignBeforeItem'](_0x78ec80,_0xe453ed):this['_alignAfterItem'](_0xe453ed,_0x78ec80);}['_recalculate'](_0x98f6f5,_0x30aaaa){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5b1c98,changedProp:_0x35511d}of this['_recalculateBuffer'])'top'===_0x35511d?this['_alignForTopChange'](_0x5b1c98):this['_alignForBottomChange'](_0x5b1c98);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x98f6f5,'changedProp':_0x30aaaa});}['getSidebarItemView'](_0x5a5f4e){return this['_annotationToSidebarItemView']['get'](_0x5a5f4e);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2069c4){const _0x35d871=this['getSidebarItemView'](_0x2069c4);this['stopListening'](_0x35d871),this['stopListening'](_0x2069c4['view']),_0x35d871['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2069c4),this['_sidebarItemViewToAnnotation']['delete'](_0x35d871);}['_createSidebarView'](){const _0x5a73fe=new H(this['context']['locale']);return _0x5a73fe['render'](),this['on']('change:_lastItem',(_0x4ce7e0,_0x11dd81,_0x1041a7,_0x164393)=>{_0x164393&&_0x5a73fe['unbind']('minHeight'),_0x1041a7?_0x5a73fe['bind']('minHeight')['to'](_0x1041a7,'bottom'):_0x5a73fe['minHeight']=null;}),_0x5a73fe;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x44c5ce){const _0x3d33a4=this['_sidebarItemViewToAnnotation']['get'](_0x44c5ce),_0x17ad62=_0x3d33a4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3d33a4)-0x1);return _0x17ad62&&this['getSidebarItemView'](_0x17ad62)||null;}['_getItemAfter'](_0x2c8f40){const _0x4d05ef=this['_sidebarItemViewToAnnotation']['get'](_0x2c8f40),_0x529be6=_0x4d05ef&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4d05ef)+0x1);return _0x529be6&&this['getSidebarItemView'](_0x529be6)||null;}['_alignBeforeItem'](_0x2eecc2,_0x4acc75){_0x2eecc2['updateHeight']();const _0x420fa8=G(_0x4acc75['bottom']+this['_spaceBetweenItems'],_0x2eecc2['top']);return!!_0x420fa8&&(this['_setItemTop'](_0x4acc75,_0x4acc75['top']-_0x420fa8),!0x0);}['_alignAfterItem'](_0x2427f4,_0x300b00){_0x2427f4['updateHeight']();const _0x24b469=G(_0x2427f4['bottom']+this['_spaceBetweenItems'],_0x300b00['top']);return!!_0x24b469&&(this['_setItemTop'](_0x300b00,_0x300b00['top']+_0x24b469,!0x1),!0x0);}['_alignToTargetRect'](_0x1870fe){const _0x57f73b=this['_sidebarItemViewToAnnotation']['get'](_0x1870fe);if(!_0x57f73b||!_0x57f73b['target']||!_0x57f73b['targetRect'])return;const _0x25e925=this['_getTargetTop'](_0x57f73b,_0x57f73b['targetRect']);this['_setItemTop'](_0x1870fe,_0x25e925);}['_getTargetTop'](_0x1769f4,_0x13fd12){if(null===_0x13fd12)return 0x0;if(_0x1769f4['target']instanceof _0x23d655)return _0x13fd12['top'];{const _0x293cfd=new _0x23d655(this['view']['element'])['top'];return _0x13fd12['top']-_0x293cfd;}}['_setItemTop'](_0x4814a5,_0x1286fc,_0x372064=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x372064&&(_0x1286fc=Math['max'](_0x1286fc,this['_getMaxAvailableTop'](_0x4814a5))),_0x4814a5['top']=_0x1286fc;}['_getMaxAvailableTop'](_0x5c7755){let _0x411e9d=this['_getItemBefore'](_0x5c7755),_0x87d2b0=0x0;for(;_0x411e9d;)_0x411e9d['updateHeight'](),_0x87d2b0+=this['_spaceBetweenItems']+_0x411e9d['height'],_0x411e9d=this['_getItemBefore'](_0x411e9d);return _0x87d2b0;}}function G(_0x1686c7,_0x1f3dd4){return Math['max'](_0x1686c7-_0x1f3dd4,0x0);}function g(_0x1bca65){return null!==_0x1bca65&&'object'==typeof _0x1bca65&&0x1===_0x1bca65['nodeType'];}class e extends _0x313b3a{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f02e9){super(_0x3f02e9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4d5d77(),this['_refreshPositioningDebounced']=_0x35ab00(()=>{_0x3f02e9['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x54400a=this['context']['plugins']['get'](j),_0x4fa11d=this['context']['plugins']['get'](z);_0x54400a['register']('wideSidebar',this),_0x4fa11d['container']&&_0x54400a['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x471fa3){if(_0x471fa3===this['activeAnnotation'])return;const _0x4314b8=this['context']['plugins']['get'](z);_0x4314b8['_activeAnnotation']=_0x471fa3;const _0x23cf97=this['activeAnnotation'];_0x4314b8['refresh']({'blurredAnnotation':_0x23cf97,'activatedAnnotation':_0x471fa3}),this['activeAnnotation']=_0x471fa3;}['attach'](_0x2629be){this['annotations']=_0x2629be;const _0x566956=this['context']['plugins']['get'](z);if(_0x566956['_annotations']=_0x2629be,this['isAttached'])throw new _0x2cc838('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x566956,'set:container',()=>{this['detach'](),this['listenTo'](_0x566956,'change:container',_0x429a44=>{_0x429a44['off'](),this['attach'](_0x2629be);});}),_0x566956['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5049a9=_0x154657=>{_0x154657['updateTargetRect'](),_0x566956['addAnnotation'](_0x154657);};for(const _0x560402 of _0x2629be)_0x5049a9(_0x560402);this['listenTo'](_0x2629be,'add',(_0xb779b8,_0x4ba3d2)=>{_0x5049a9(_0x4ba3d2);}),this['listenTo'](_0x2629be,'remove',(_0x30bc13,_0x3fe25d,_0x33b27a)=>{_0x566956['rearrange']({'removedAnnotation':_0x3fe25d,'previousAnnotation':_0x2629be['get'](_0x33b27a-0x1),'nextAnnotation':_0x2629be['get'](_0x33b27a+0x1)}),_0x3fe25d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2629be,'focus',(_0x5c666b,_0x56f0d1)=>{this['setActiveAnnotation'](_0x56f0d1);}),this['listenTo'](_0x2629be,'blur',()=>{this['setActiveAnnotation'](null);});const _0x17fb3e=this['context']instanceof _0x4d6295?this['context']['editors']:new _0x4d5d77([this['context']]);for(const _0x2c1871 of _0x17fb3e)this['_integrateWithEditorAnnotations'](_0x2c1871);this['listenTo'](_0x17fb3e,'add',(_0x3783b5,_0x57b570)=>{this['listenTo'](_0x57b570,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x57b570);});}),this['listenTo'](_0x17fb3e,'remove',(_0x560550,_0x33a77c)=>{_0x33a77c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x33a77c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2cc838('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4e0c44=this['context']['plugins']['get'](z);_0x4e0c44['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4e0c44),this['stopListening'](this['annotations']),this['context']instanceof _0x4d6295&&this['stopListening'](this['context']['editors']);for(const _0x49744d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x49744d);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5c18ab){if(!_0x5c18ab['plugins']['has']('EditorAnnotations'))return;const _0xce7772=_0x5c18ab['plugins']['get']('EditorAnnotations'),_0x4da1ec=()=>{const _0x33d335=_0xce7772['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x33d335[0x0]||null);};this['listenTo'](_0xce7772,'refresh',_0x4da1ec),this['listenTo'](_0xce7772,'blur',(_0x3d909e,{isAnnotationTracked:_0x53715b})=>{this['activeAnnotation']&&_0x53715b(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xce7772,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5a2856=>{_0xce7772['hasDomSelection']()&&(_0x4da1ec(),_0x5a2856['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xce7772);}['_destroyEditorAnnotationsIntegration'](_0x255caf){this['stopListening'](_0x255caf),this['_editorAnnotations']['remove'](_0x255caf);}}class C extends _0x3596fa{['counterView'];constructor(_0x4af072){super(_0x4af072);const _0x3ef960=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x384288,_0x233280)=>_0x384288?'...':_0x233280['toString']()),this['set']('annotationType',''),this['icon']=_0x57f000,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3ef960['to']('annotationType',_0xa86949=>'ck-annotation-counter__badge--'+_0xa86949),_0x3ef960['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3ef960['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x313b3a{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a7865){super(_0x3a7865),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1147f3())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4d5d77(),this['_refreshPositioningDebounced']=_0x35ab00(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4e9d65(this['context']['locale']),this['balloonPanelView']=new _0x39affa(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5ca996){this['annotations']=_0x5ca996;const _0x12ba04=this['context']['plugins']['get'](z),_0x6a7807=this['balloonPanelView'];if(_0x12ba04['_annotations']=_0x5ca996,this['isAttached'])throw new _0x2cc838('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x12ba04,'set:container',()=>{this['detach'](),this['listenTo'](_0x12ba04,'change:container',_0x40eb76=>{_0x40eb76['off'](),this['attach'](_0x5ca996);});}),_0x12ba04['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x499e2b=_0x4b2d9d=>{const _0x5048fc=new C(this['context']['locale']);_0x12ba04['addAnnotation'](_0x4b2d9d,_0x5048fc),this['_annotationToNarrowView']['set'](_0x4b2d9d,_0x5048fc),_0x5048fc['bind']('isDirty','annotationType','number')['to'](_0x4b2d9d['view'],'isDirty','type','length'),_0x5048fc['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x6a7807['content']['first']!==_0x4b2d9d['view']?(this['_showBalloon'](_0x4b2d9d),_0x4b2d9d['view']['element']['focus'](),this['setActiveAnnotation'](_0x4b2d9d)):this['setActiveAnnotation'](null);});};for(const _0x55af2f of _0x5ca996)_0x499e2b(_0x55af2f);this['listenTo'](_0x5ca996,'add',(_0x494d0b,_0x1fed91)=>{_0x499e2b(_0x1fed91);}),this['listenTo'](_0x5ca996,'remove',(_0x31d462,_0x50dd92,_0xdc309c)=>{this['_annotationToNarrowView']['get'](_0x50dd92)['destroy'](),this['_annotationToNarrowView']['delete'](_0x50dd92),_0x12ba04['rearrange']({'removedAnnotation':_0x50dd92,'previousAnnotation':_0x5ca996['get'](_0xdc309c-0x1),'nextAnnotation':_0x5ca996['get'](_0xdc309c+0x1)}),_0x50dd92===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5ca996,'focus',(_0x3772f1,_0x19c9c5)=>{this['setActiveAnnotation'](_0x19c9c5);}),this['listenTo'](_0x5ca996,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3cadc0,_0x1e1a95)=>{_0x1e1a95['keyCode']===_0x2ff53f['esc']&&_0x6a7807['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x6a7807['content']['first']),this['_hideBalloon'](),_0x1e1a95['stopPropagation'](),_0x1e1a95['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x551c9f,_0x2af19c)=>{const _0x3f2eca=_0x2af19c['target'];_0x6a7807['isVisible']&&_0x6a7807['element']['contains'](_0x3f2eca)||_0x12ba04['view']['element']['contains'](_0x3f2eca)||_0x551c9f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3bb35c=>_0x3bb35c['contains'](_0x3f2eca))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x38debb=this['context']instanceof _0x4d6295?this['context']['editors']:new _0x4d5d77([this['context']]);for(const _0x4a1e58 of _0x38debb)this['_integrateWithEditorAnnotations'](_0x4a1e58);this['listenTo'](_0x38debb,'add',(_0x56f237,_0x5abb60)=>{this['listenTo'](_0x5abb60,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5abb60);});}),this['listenTo'](_0x38debb,'remove',(_0x3bdbb3,_0x3cd6e9)=>{_0x3cd6e9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3cd6e9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x299718){if(_0x299718===this['activeAnnotation'])return;const _0x1c2727=this['context']['plugins']['get'](z);if(_0x1c2727['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x299718,'disableAnimationOnActivatedAnnotation':!0x0}),_0x299718)_0x1c2727['getSidebarItemView'](_0x299718)?this['_showBalloon'](_0x299718):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x299718;}['detach'](){if(!this['isAttached'])throw new _0x2cc838('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x767511=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3fe185=>_0x3fe185['destroy']()),this['_annotationToNarrowView']['clear'](),_0x767511['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4d6295&&this['stopListening'](this['context']['editors']);for(const _0x47cd7d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x47cd7d);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'](_0x577d41){if(!_0x577d41['plugins']['has']('EditorAnnotations'))return;const _0x19e132=_0x577d41['plugins']['get']('EditorAnnotations'),_0x1e06a7=this['context']['plugins']['get'](z),_0x565b0f=this['annotations'],_0x3c69b3=this['balloonPanelView'],_0x2d9d3f=()=>{const _0x13f94=_0x19e132['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x13f94),this['setActiveAnnotation'](_0x13f94[0x0]||null);};this['listenTo'](_0x19e132,'refresh',_0x2d9d3f),this['listenTo'](_0x19e132,'blur',(_0x17a773,{isAnnotationTracked:_0x3aa3d1})=>{this['activeAnnotation']&&_0x3aa3d1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x19e132,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x565b0f,'blur',_0x1877fd=>{_0x19e132['hasDomSelection']()&&_0x1877fd['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x14ad26,_0x1ef8a0)=>{const _0x1f318d=_0x1ef8a0['target'];_0x3c69b3['isVisible']&&_0x3c69b3['element']['contains'](_0x1f318d)||_0x1e06a7['view']['element']['contains'](_0x1f318d)||this['activeAnnotation']&&_0x19e132['hasDomSelection']()&&(_0x2d9d3f(),_0x14ad26['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x19e132);}['_destroyEditorAnnotationsIntegration'](_0xe56195){_0xe56195&&(this['stopListening'](_0xe56195),this['_editorAnnotations']['remove'](_0xe56195));}['_setSelectedAnnotations'](_0x58ef4d){for(const _0x1442ea of this['_selectedAnnotations'])_0x58ef4d['includes'](_0x1442ea)||this['_manuallyClosedAnnotationViews']['delete'](_0x1442ea['view']);this['_selectedAnnotations']=_0x58ef4d;}['_refreshPositioning'](){const _0x5a3f61=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5a3f61['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2838bf){if(this['_manuallyClosedAnnotationViews']['has'](_0x2838bf['view']))return;const _0xe7337c=this['balloonPanelView']['content']['first'];_0xe7337c!==_0x2838bf['view']?(_0xe7337c&&this['_detachListeners'](_0xe7337c),this['_attachListeners'](_0x2838bf['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2838bf['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x6f5e9c=this['balloonPanelView']['content']['first'],_0x2679a9=_0x6f5e9c&&this['annotations']['getByView'](_0x6f5e9c);if(!_0x2679a9||!this['_annotationToNarrowView']['has'](_0x2679a9))return;const _0x3d35fd=this['_annotationToNarrowView']['get'](_0x2679a9)['element'],_0x5bc0f0=(function(){const _0x5e30ad=_0x39affa['defaultPositions'];return[_0x5e30ad['southArrowNorthEast'],_0x5e30ad['northArrowSouthEast'],_0x5e30ad['southArrowNorth'],_0x5e30ad['northArrowSouth'],_0x5e30ad['southArrowNorthWest'],_0x5e30ad['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3d35fd,'positions':_0x5bc0f0});}['_hideBalloon'](){const _0xe771f=this['balloonPanelView'],_0x3d877b=_0xe771f['content']['first'];_0x3d877b&&(this['_detachListeners'](_0x3d877b),_0xe771f['unpin'](),_0xe771f['content']['clear']());}['_attachListeners'](_0x136575){this['listenTo'](_0x136575,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x136575,'Esc',(_0x3a3c69,_0x55aa9d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x136575),this['_hideBalloon'](),_0x55aa9d();});}['_detachListeners'](_0x3069a1){this['stopListening'](_0x3069a1);}}class c extends _0x6d2056{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x1b4ef4,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ed044){super(_0x4ed044),_0x4ed044['editing']['view']['addObserver'](_0x21fed6),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4ed044['plugins']['get'](_0x1b4ef4),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3703e3=this['editor']['plugins']['get'](j);_0x3703e3['context']===this['editor']&&(_0x3703e3['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x39a325,_0x59a630)=>{const _0xca0ab=this['_balloon'];if(this['isAttached']&&_0xca0ab['visibleView']){const _0x3f46a6=this['annotations']['getByView'](_0xca0ab['visibleView']);_0x3f46a6&&this['_closeAnnotation'](_0x3f46a6),_0x59a630();}}));}['afterInit'](){const _0x210c6b=this['editor']['plugins']['get'](j);_0x210c6b['context']===this['editor']&&(_0x210c6b['hasActive']()||_0x210c6b['switchTo']('inline'));}['setActiveAnnotation'](_0x2047c7){_0x2047c7!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2047c7&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2047c7)&&this['_addAnnotationToBalloon'](_0x2047c7,!0x0),_0x2047c7['isActive']=!0x0),_0x2047c7||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2047c7);}['attach'](_0x4d952e){this['annotations']=_0x4d952e;const _0x51f0a4=this['editor']['plugins']['get'](j),_0x38fd2c=this['_balloon'];if(this['isAttached'])throw new _0x2cc838('inlineannotations-attach-already-attached',this);if(_0x51f0a4['context']!==this['editor'])throw new _0x2cc838('inlineannotations-not-allowed-with-context',this);const _0x35b35c=this['editor']['plugins']['get'](b);this['listenTo'](_0x35b35c,'refresh',()=>{const _0xacaeda=_0x35b35c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2c81c8,_0x89363b;!this['_forceRefresh']&&(_0x2c81c8=_0xacaeda,_0x89363b=this['_selectedAnnotations'],_0x2c81c8['length']===_0x89363b['length']&&_0x2c81c8['every'](_0x326fdf=>_0x89363b['includes'](_0x326fdf)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xacaeda),this['setActiveAnnotation'](_0xacaeda[0x0]||null));}),this['listenTo'](_0x35b35c,'blur',(_0x48fc41,{isAnnotationTracked:_0x2cfb1e})=>{this['activeAnnotation']&&_0x2cfb1e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3ec74e,_0x247c53,_0x5c24d3)=>{_0x5c24d3||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4d952e,'remove',(_0x4ceebc,_0x3ca461)=>{this['_removeAnnotationFromBalloon'](_0x3ca461),_0x3ca461===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x38fd2c,'change:visibleView',(_0x2aa3dc,_0x780442,_0x456258,_0x4ef989)=>{_0x4ef989&&this['stopListening'](_0x4ef989);const _0x5a0b41=_0x4d952e['getByView'](_0x456258);_0x456258&&_0x5a0b41&&(this['listenTo'](_0x456258,'change:height',()=>{_0x38fd2c['updatePosition']();}),this['listenTo'](_0x456258,'Esc',()=>{this['_closeAnnotation'](_0x5a0b41),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5a0b41&&this['setActiveAnnotation'](_0x5a0b41));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x38fd2c['visibleView']&&(_0x4d952e['getByView'](_0x38fd2c['visibleView'])&&_0x38fd2c['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 _0x2cc838('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4a4419 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4a4419);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x23a031){for(const _0x133809 of this['_selectedAnnotations'])_0x23a031['includes'](_0x133809)||this['_manuallyClosed']['delete'](_0x133809);for(const _0x38515c of this['annotations'])_0x23a031['includes'](_0x38515c)||this['_removeAnnotationFromBalloon'](_0x38515c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x7cff2a of _0x23a031)this['_addAnnotationToBalloon'](_0x7cff2a);}this['_selectedAnnotations']=_0x23a031;}['_addAnnotationToBalloon'](_0x1e5f41,_0x18e27e=!0x1){this['_manuallyClosed']['has'](_0x1e5f41)||(this['_addedAnnotations']['has'](_0x1e5f41)||this['_balloon']['hasView'](_0x1e5f41['view'])||(this['_addedAnnotations']['add'](_0x1e5f41),this['_balloon']['add']({'stackId':_0x1e5f41['view']['id'],'view':_0x1e5f41['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1e5f41)}})),_0x18e27e&&this['_balloon']['showStack'](_0x1e5f41['view']['id']));}['_getBalloonTargetForAnnotation'](_0x50af96){const _0x41bc50=_0x50af96['target'],_0x214e47=this['editor']['editing']['view'],_0x4eb01e=_0x214e47['document']['selection']['getFirstRange'](),_0x5bf77b=_0x214e47['domConverter']['viewRangeToDom'](_0x4eb01e);if(_0x5bf77b['collapse'](!0x0),_0x41bc50){if(_0x41bc50 instanceof _0x23d655)return _0x41bc50;let _0x18248b=[];for(const _0x4d4028 of _0x41bc50)_0x18248b['push'](...F(_0x4d4028['getClientRects']()));_0x18248b=function(_0xdb2d6c){const _0x4f1589=[];let _0x212d78=_0xdb2d6c[0x0];for(let _0x4e9c66=0x1;_0x4e9c66<_0xdb2d6c['length'];_0x4e9c66++)P(_0x212d78,_0xdb2d6c[_0x4e9c66])?_0x212d78['width']+=_0xdb2d6c[_0x4e9c66]['width']:(_0x4f1589['push'](_0x212d78),_0x212d78=_0xdb2d6c[_0x4e9c66]);return _0x4f1589['push'](_0x212d78),_0x4f1589;}(_0x18248b);const _0x509881=_0x5bf77b['getBoundingClientRect']();return _0x18248b['find'](_0x1a6993=>_0x1a6993['top']<=_0x509881['top']&&_0x1a6993['bottom']>=_0x509881['bottom']&&_0x1a6993['left']<=_0x509881['left']&&_0x1a6993['right']>=_0x509881['right'])||_0x18248b[0x0];}return _0x50af96['targetRect']||_0x5bf77b;}['_removeAnnotationFromBalloon'](_0x156637){this['_addedAnnotations']['has'](_0x156637)&&this['_balloon']['hasView'](_0x156637['view'])&&(this['_addedAnnotations']['delete'](_0x156637),this['_balloon']['remove'](_0x156637['view']));}['_closeAnnotation'](_0x25bb98){this['_manuallyClosed']['add'](_0x25bb98),this['_removeAnnotationFromBalloon'](_0x25bb98);}}function F(_0x43f9e2){return Array['from'](_0x43f9e2)['map'](DOMRect['fromRect']);}function P(_0x41e1f6,_0x1f2a9a){return _0x41e1f6['top']===_0x1f2a9a['top']&&_0x41e1f6['bottom']===_0x1f2a9a['bottom']&&_0x41e1f6['right']===_0x1f2a9a['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x59eb73,_0x4acc80){super(_0x59eb73),this['set']('isEmpty',!_0x4acc80['length']),this['focusTracker']=new _0x5f12d6(),this['_annotationViews']=_0x4acc80,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x349db7({'focusables':_0x4acc80,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4acc80,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4acc80,'remove',(_0x3cb408,_0x13bf88)=>{_0x13bf88['isActive']&&this['focus'](),_0x4acc80['length']||(this['isEmpty']=!0x0);});const _0x44f767=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x59eb73,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4acc80},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x44f767['if']('isEmpty','ck-hidden',_0x334b7d=>!_0x334b7d)]},'children':[{'text':N(_0x59eb73,'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 _0x50aa33 of this['_annotationViews'])this['focusTracker']['add'](_0x50aa33['element']);this['_annotationViews']['on']('change',(_0x1ac178,{added:_0x20346d,removed:_0x1ab8f0})=>{for(const _0x3a0723 of _0x20346d)this['focusTracker']['add'](_0x3a0723['element']);for(const _0x1b3225 of _0x1ab8f0)this['focusTracker']['remove'](_0x1b3225['element']);});}}class p extends _0x313b3a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x315d89){super(_0x315d89),this['archivedThreads']=new _0x4d5d77();}['init'](){const _0x45b28e=this['context'],_0x4b007b=_0x45b28e['plugins']['get'](o),_0x239699=_0x45b28e['plugins']['get'](y);this['listenTo'](_0x4b007b,'addCommentThread',(_0x2c5df0,{threadId:_0x1124e6})=>{const _0x1daf16=_0x4b007b['getCommentThread'](_0x1124e6);_0x1daf16['archivedAt']&&this['archivedThreads']['add'](_0x1daf16,this['_calculatePosition'](_0x1daf16['archivedAt'])),this['listenTo'](_0x1daf16,'change:archivedAt',(_0x4528a8,_0xa4cc2c,_0x34df2e)=>{_0x34df2e?this['archivedThreads']['has'](_0x1daf16)||this['archivedThreads']['add'](_0x1daf16,this['_calculatePosition'](_0x1daf16['archivedAt'])):this['archivedThreads']['has'](_0x1daf16)&&this['archivedThreads']['remove'](_0x1daf16);});}),this['listenTo'](_0x4b007b,'removeCommentThread',(_0x1d8344,{threadId:_0x44d6d3})=>{const _0x238b68=_0x4b007b['getCommentThread'](_0x44d6d3);this['stopListening'](_0x238b68),this['archivedThreads']['has'](_0x238b68)&&this['archivedThreads']['remove'](_0x238b68);},{'priority':'highest'}),this['listenTo'](_0x239699['collection'],'focus',(_0x35fbe8,_0x26dd81)=>{_0x26dd81['isVisible']||(_0x26dd81['isActive']=!0x0,_0x239699['activate'](_0x26dd81));});}['_calculatePosition'](_0x3b83d2){const _0x3b1ccf=[...this['archivedThreads']]['findIndex'](_0x1738c3=>_0x1738c3['archivedAt']<_0x3b83d2);return _0x3b1ccf>-0x1?_0x3b1ccf:this['archivedThreads']['length'];}}class a extends _0x6d2056{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x1c0817];}constructor(_0x569f94){super(_0x569f94),this['annotationViews']=new _0x118739(),this['_pendingThreads']=[];}['init'](){const _0x44c2c8=this['editor'],_0x584148=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x44c2c8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3596fa,!0x0)),_0x44c2c8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2df3da=this['_createCommentsArchiveButton'](_0x1a9c60);return _0x2df3da['set']({'role':'menuitemcheckbox'}),_0x2df3da;});const _0x3b40a4=_0x44c2c8['plugins']['get'](p),_0x4e8042=_0x44c2c8['plugins']['get']('Annotations'),_0x21d232=_0x44c2c8['plugins']['get']('CommentsRepository');_0x3b40a4['archivedThreads']['forEach'](_0x35f226=>{this['_handleNewThread'](_0x35f226);}),this['listenTo'](_0x3b40a4['archivedThreads'],'add',(_0x350847,_0x5cb7d4)=>{this['_handleNewThread'](_0x5cb7d4);}),this['listenTo'](_0x4e8042['collection'],'add',(_0x4817d1,_0x5cd8fb)=>{const _0x394964=this['_pendingThreads']['find'](_0x448732=>{const _0xbd08fd=_0x21d232['_threadToController']['get'](_0x448732);return _0xbd08fd&&_0x5cd8fb['innerView']===_0xbd08fd['view'];});if(_0x394964){const _0xed0e18=this['_calculatePosition'](_0x394964['archivedAt']);this['_addAnnotationToArchive'](_0x5cd8fb,_0xed0e18),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x394964),0x1);}}),this['listenTo'](_0x3b40a4['archivedThreads'],'remove',(_0x5ca7cf,_0x31be4b)=>{const _0x1f6da9=_0x44c2c8['config']['get']('collaboration.channelId');if(!_0x1f6da9||_0x31be4b['channelId']===_0x1f6da9){if(this['_pendingThreads']['includes'](_0x31be4b))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x31be4b),0x1);else{const _0xd50263=_0x21d232['_threadToController']['get'](_0x31be4b),_0x4d15aa=_0x4e8042['getByInnerView'](_0xd50263['view']);this['annotationViews']['remove'](_0x4d15aa['view']),this['stopListening'](_0x4d15aa),this['stopListening'](_0x4d15aa['focusableElements']);}}}),this['listenTo'](_0x4e8042['collection'],'add',(_0x5866df,_0x38d40d)=>{this['listenTo'](_0x38d40d,'escape',_0x584148);}),this['listenTo'](_0x4e8042['collection'],'remove',(_0x575b80,_0x199bbf)=>{this['stopListening'](_0x199bbf,'escape',_0x584148);});}['_addAnnotationToArchive'](_0x5bc0bb,_0x31818c){this['listenTo'](_0x5bc0bb,'set:isVisible',_0x41beff=>{_0x41beff['return']=!0x1,_0x41beff['stop']();}),this['annotationViews']['add'](_0x5bc0bb['view'],_0x31818c);}['_handleNewThread'](_0x28c644){const _0x32b28a=this['editor']['plugins']['get']('CommentsRepository'),_0x20e116=this['editor']['plugins']['get']('Annotations'),_0x441390=this['editor']['config']['get']('collaboration.channelId');if(!_0x441390||_0x28c644['channelId']===_0x441390){const _0x3f7682=_0x32b28a['_threadToController']['get'](_0x28c644);if(!_0x3f7682)return void this['_pendingThreads']['push'](_0x28c644);const _0x1292d4=this['_calculatePosition'](_0x28c644['archivedAt']),_0x3ce210=_0x20e116['getByInnerView'](_0x3f7682['view']);_0x3ce210['isVisible']&&_0x20e116['_visibleAnnotations']['remove'](_0x3ce210),this['_addAnnotationToArchive'](_0x3ce210,_0x1292d4);}}['_calculatePosition'](_0x4f2769){const _0x43b7c4=this['editor']['config']['get']('collaboration.channelId'),_0x5476e7=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x7f07af=>_0x7f07af['channelId']===_0x43b7c4)['findIndex'](_0x43de74=>_0x43de74['archivedAt']<_0x4f2769);return _0x5476e7<0x0||_0x5476e7>this['annotationViews']['length']?this['annotationViews']['length']:_0x5476e7-0x1;}['_toggleDialog'](){const _0x15a40a=this['editor'],_0xa4d6f7=_0x15a40a['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x15a40a['locale'],this['annotationViews'])),'commentsArchive'===_0xa4d6f7['id']?_0xa4d6f7['hide']():_0xa4d6f7['show']({'id':'commentsArchive','title':N(_0x15a40a['locale'],'COMMENTS_ARCHIVE'),'icon':_0x445ed3,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x324a55['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x499f0c,_0x4e5979=!0x1){const _0x1226ac=this['editor']['locale'],_0x356caf=this['editor']['plugins']['get']('Dialog'),_0x562cba=new _0x499f0c(_0x1226ac);return _0x562cba['bind']('isEnabled')['to'](this,'isEnabled'),_0x562cba['bind']('isOn')['to'](_0x356caf,'id',_0xd02979=>'commentsArchive'===_0xd02979),_0x562cba['set']({'label':N(_0x1226ac,'COMMENTS_ARCHIVE'),'icon':_0x445ed3,'isToggleable':!0x0}),_0x4e5979&&(_0x562cba['tooltip']=!0x0),this['listenTo'](_0x562cba,'execute',()=>this['_toggleDialog']()),_0x562cba;}['_hideDialogOnAnnotationEscape']=_0x31a8d9=>{const _0x1b4615=_0x31a8d9['source'];if(!this['annotationViews']['has'](_0x1b4615['view']))return;const _0x3ace16=this['editor']['plugins']['get']('Dialog');_0x3ace16['isOpen']&&'commentsArchive'===_0x3ace16['id']&&(_0x3ace16['hide'](),_0x31a8d9['stop']());};}class gi extends _0x6d2056{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x3f102e,ContextPlugin as _0x277ff3,PendingActions as lt,Command as _0x15890d,Plugin as _0x4c92ab,Context as _0x5b3bc4}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x310f56,uid as _0x1856ab,KeystrokeHandler as jt,FocusTracker as _0x113483,diff as _0x18fed8,Collection as _0x103649,Rect as _0x512b1c,CKEditorError as _0x520596,first as _0x138fb7,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x246f33,keyCodes as _0xbd1837}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x7543d2,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x3e2885,trimHtml as _0x23764c,LateFocusDropdownButtonView as _0x2d0000,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x489e01}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x32bc5d}from'es-toolkit/compat';import{IconUndo as _0x575807,IconCheck as _0x2fd253,IconPencil as _0x1c81ed,IconRemoveComment as _0x28cd5d,IconThreeVerticalDots as _0x4af9a1,IconAddComment as _0x11cf91,IconCommentsArchive as _0xcc94f1}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x5ac25d,ButtonView as _0x30c4c4,ViewCollection as _0x46647b,createDropdown as _0x39b7d6,ListView as _0x3b4d65,focusChildOnDropdownOpen as _0x51b775,ListItemView as _0xcde4fd,MenuBarMenuListItemButtonView as _0xb1b43c,BodyCollection as _0x4ce3b6,BalloonPanelView as _0xe6d8f9,ContextualBalloon as _0x24fe15,Dialog as _0x2a8576,DialogViewPosition as _0x14f8cf}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x2573f0}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 _0x2e7c05}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x57745c}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x310f56(){['model'];['view'];constructor(_0x6dfa71,_0x2ad797){super(),this['model']=_0x6dfa71,this['model']['_isAttached']=!0x0,this['view']=_0x2ad797,this['listenTo'](_0x2ad797,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x2ad797,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x2ad797,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x2ad797,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x2ad797,'addComment',(_0x22ca63,_0x5357b8)=>this['addComment'](_0x5357b8)),this['listenTo'](_0x2ad797,'updateComment',(_0x3ca195,_0x1b6971,_0x4f35c1)=>this['updateComment'](_0x1b6971,_0x4f35c1)),this['listenTo'](_0x2ad797,'removeComment',(_0x370ad6,_0x1fdb5d)=>this['removeComment'](_0x1fdb5d));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x7169ab){this['model']['addComment']({'content':_0x7169ab,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x575528,_0x7f517d){this['model']['getComment'](_0x575528)['update']({'content':_0x7f517d});}['removeComment'](_0x669f2b){this['model']['getComment'](_0x669f2b)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x5a2351,_0x3542fe,_0x57c68c){const t=_0x5a2351['t'];switch(_0x3542fe){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'},_0x57c68c);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'},_0x57c68c);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'},_0x57c68c);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'},_0x57c68c);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x57c68c);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'},_0x57c68c);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'},_0x57c68c);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'},_0x57c68c);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(_0x435230,_0x50d7e0){super(_0x435230);const _0x395c89=_0x1856ab();this['main']=this['createCollection'](),this['editable']=new $t(_0x435230,_0x50d7e0,void 0x0,{'label':()=>N(_0x435230,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x435230['uiLanguageDirection'],'lang':_0x435230['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x395c89},'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 Ft extends Ut{['view'];constructor(_0x2ccbe){super(_0x2ccbe),this['view']=new Vt(_0x2ccbe['locale'],_0x2ccbe['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2b74ba=this['editor']['editing']['view'],_0x459db1=this['view']['editable'],_0x45085b=_0x2b74ba['document']['getRoot']();_0x459db1['name']=_0x45085b['rootName'],this['view']['render']();const _0x1b2c6=_0x459db1['element'];this['setEditableElement'](_0x459db1['name'],_0x1b2c6),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2b74ba['attachDomRoot'](_0x1b2c6),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x310f56(_0x3f102e){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x3090ac={}){function _0x2cda92(_0x105113){return _0x105113['map'](_0x9a223b=>String['fromCharCode'](_0x9a223b))['join']('');}(_0x3090ac=Object['assign']({},_0x3090ac))['plugins']||(_0x3090ac['plugins']=Rt['defaultPlugins']),super(_0x3090ac),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2cda92([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2cda92([0x76,0x69,0x65,0x77])][_0x2cda92([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2cda92([0x61,0x75,0x74,0x6f]),this[_0x2cda92([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2cda92([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2cda92([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2cda92([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2cda92([0x6f,0x6b])});}['create'](){const _0x46bce6=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x46bce6))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x25f3d3=>{const _0x574f59=this['model']['document']['getRoot'](),_0x580238=_0x574f59&&_0x574f59['getChild'](_0x574f59['childCount']-0x1);_0x25f3d3['setSelection'](_0x580238,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x53d5dc=this['editing']['view'],_0x5eb060=_0x53d5dc['document']['getRoot'](),_0x5270f9=_0x5eb060['getChild'](0x0);_0x5eb060['childCount']>0x1||!_0x5270f9||'p'!=_0x5270f9['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x53d5dc,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5270f9['placeholder']=this['placeholder']),St({'view':_0x53d5dc,'element':_0x5270f9,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5270f9);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x34488e,_0x1184d3={}){super(_0x34488e),this['editor']=null,this['_editorConfig']=_0x1184d3,this['set']('value',_0x1184d3['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x34488e,'Reply...')),this['set']('submitLabel',N(_0x34488e,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x113483(),this['focusCycler']=new _0x5ac25d({'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',(_0x50a3c6,_0x3691f4)=>{this['cancelButtonView']['fire']('execute'),_0x3691f4();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3fd3d8,_0x5825ad)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5825ad());}),this['on']('submit',(_0xfde0d9,_0x349763)=>{_0x349763['length']>0xfde8?(alert(N(_0x34488e,'TOO_LONG_COMMENT_ALERT',[_0x349763['length'],0xfde8])),_0xfde0d9['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 _0x1b26ee=this['editor'];this['element']['insertBefore'](_0x1b26ee['ui']['element'],this['element']['firstChild']),_0x1b26ee['model']['document']['on']('change',()=>this['value']=_0x1b26ee['getData']()),_0x1b26ee['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1b26ee['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1c6f75){-0x1===_0x1c6f75?(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:_0x3cbc27}=this,_0x18b6ff=new _0x30c4c4(_0x3cbc27);return _0x18b6ff['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x18b6ff['withText']=!0x0,_0x18b6ff['bind']('label')['to'](this,'submitLabel'),_0x18b6ff['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x18b6ff['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5ee964,_0x4b702e)=>!_0x4b702e&&!!_0x5ee964['trim']()),_0x18b6ff;}['_createCancelButton'](){const {locale:_0x9ebbf9}=this,_0x2932f0=new _0x30c4c4(_0x9ebbf9);return _0x2932f0['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2932f0['label']=N(_0x9ebbf9,'Cancel'),_0x2932f0['withText']=!0x0,_0x2932f0['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2932f0;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3b2e8f=>{this['focusTracker']['add'](_0x3b2e8f['element']);}),this['focusables']['on']('change',(_0xf68abe,_0x1fe5c4)=>{for(const _0x142b36 of Array['from'](_0x1fe5c4['added'])['reverse']())this['focusTracker']['add'](_0x142b36['element']);});}}class ie extends kt{constructor(_0x3f705d,_0x420973,_0x54971d){super(_0x3f705d),this['commentInputView']=new os(_0x3f705d,_0x54971d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x11c4b6,_0x1323ed)=>_0x11c4b6||!!_0x1323ed),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 _0x7543d2(_0x3f705d,_0x420973),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'](_0x6328e4){this['commentInputView']['focus'](_0x6328e4);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x175c88,_0x232669)=>{const {submitButtonView:_0x306cbe,cancelButtonView:_0x484817,editor:_0x1eebbd}=this['commentInputView'];[_0x306cbe['element'],_0x484817['element'],_0x1eebbd?_0x1eebbd['editing']['view']['getDomRoot']():null]['filter'](_0x2b03bf=>_0x2b03bf)['some'](_0x170ba5=>_0x170ba5['contains'](_0x232669['target']))||(this['focus'](),_0x232669['preventDefault']());});}}class rs extends kt{constructor(_0xe91176){super(_0xe91176);const _0x9d58ca=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x9d58ca['to']('count',_0x2840ab=>N(_0xe91176,'NUMBER_OF_COMMENTS',_0x2840ab))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x33f12c,_0x348ef8,_0x540e4a){super(_0x33f12c);const _0x45980f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x348ef8['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x348ef8,this['_config']=_0x540e4a,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x113483(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5ac25d({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x30c67a=>this['commentViews']['map'](_0x3c8dd7=>_0x3c8dd7['element'])['includes'](_0x30c67a['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x33f12c),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x19e95b=>_0x19e95b-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5f59aa of _0x348ef8['comments'])this['_handleNewCommentModel'](_0x5f59aa);this['_handleInfoComment'](),this['listenTo'](_0x348ef8['comments'],'add',(_0x17f15d,_0xe47599)=>{const _0x4b71bb=this['_calculatePosition'](_0xe47599);this['length']++,this['_handleNewCommentModel'](_0xe47599,_0x4b71bb),this['refreshVisibleViews']();}),this['listenTo'](_0x348ef8['comments'],'remove',(_0x284e25,_0x55cf55)=>{this['length']--,this['_handleRemoveCommentModel'](_0x55cf55),this['refreshVisibleViews']();}),this['listenTo'](_0x348ef8,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x348ef8,'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',_0x45980f['if']('length','ck-hidden',_0x79a1a5=>!_0x79a1a5)],'aria-label':N(_0x33f12c,'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'](_0x4f93fe){-0x1===_0x4f93fe?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x31c1b5 of this['commentViews'])_0x31c1b5['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x365590,_0x3304e8){const _0x553d24=new this['_config']['CommentView'](this['locale'],_0x365590,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x553d24['viewUid']=_0x365590['id'],_0x553d24['delegate']('removeComment')['to'](this),_0x553d24['delegate']('updateComment')['to'](this),_0x553d24['delegate']('resolveCommentThread')['to'](this),_0x553d24['delegate']('editorReady')['to'](this),_0x553d24['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x553d24,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x553d24,_0x3304e8);}['_calculatePosition'](_0x370fd3){const _0x378f68=this['_model']['_findOptimalIndex'](_0x370fd3);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x370fd3['authoredAt']?_0x378f68-0x1:_0x378f68:_0x378f68-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x361e4c={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x361e4c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x361e4c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5b94d8){const _0x5cffac=this['commentViews']['remove'](_0x5b94d8['id']);this['stopListening'](_0x5cffac),_0x5cffac['isEditMode']&&this['_updateHasDirtyComment'](),_0x5cffac['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x560ba1=>_0x560ba1['isEditMode']);}['_rearrangeCollapse'](){const _0x209cad=function(_0x50e2eb){const _0x58a82f=new _0x103649();for(const _0x14e1b2 of _0x50e2eb)_0x58a82f['add'](_0x14e1b2);return _0x58a82f;}(this['commentViews']),_0x113264=this['_collapsedCommentsView']['count'];for(let _0x17a57f=0x1;_0x17a57f<=_0x113264;_0x17a57f++)_0x209cad['remove'](0x1);for(const _0x3fb956 of _0x209cad)_0x3fb956['collapse']();_0x113264>0x0&&_0x209cad['add'](this['_collapsedCommentsView'],0x1),ns(_0x18fed8(Array['from'](this['visibleViews']),Array['from'](_0x209cad)),this['visibleViews'],_0x209cad);}['_rearrangeExpand'](){ns(_0x18fed8(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x432ea5 of this['visibleViews'])_0x432ea5['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4908bb=>{this['focusTracker']['add'](_0x4908bb['element']),this['keystrokes']['listenTo'](_0x4908bb['element']);}),this['commentViews']['on']('change',(_0x5234b4,_0x576179)=>{for(const _0x6b1217 of _0x576179['removed'])this['focusTracker']['remove'](_0x6b1217['element']),this['keystrokes']['stopListening'](_0x6b1217['element']);for(const _0x255b96 of Array['from'](_0x576179['added'])['reverse']())this['focusTracker']['add'](_0x255b96['element']),this['keystrokes']['listenTo'](_0x255b96['element']);});}}function ns(_0x3210d7,_0x4bbaa7,_0x54fc29){let _0x293063=0x0;for(const _0x35fc68 of _0x3210d7)switch(_0x35fc68){case'insert':_0x4bbaa7['add'](_0x54fc29['get'](_0x293063),_0x293063),_0x293063++;break;case'delete':_0x4bbaa7['remove'](_0x293063);break;case'equal':_0x293063++;}}class oe extends kt{constructor(_0x369ca4){super(_0x369ca4);const _0x4b2358=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4b2358['to']('contextValue',_0x511bab=>N(_0x369ca4,'THREAD_CONTEXT_LABEL',_0x511bab)),'tabindex':-0x1},'children':[{'text':_0x4b2358['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1db540,_0x5a450c){super(_0x1db540);const _0x29a1aa=this['bindTemplate'];this['_model']=_0x5a450c,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x113483(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5ac25d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1c1c10=>!!_0x1c1c10),this['bind']('contextValue')['to'](this['_model'],'context',_0xe7a22a=>_0xe7a22a&&_0xe7a22a['value']?this['_trimContextValue'](_0xe7a22a['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x29a1aa['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 _0x2b3c09=new _0x30c4c4(this['locale']);return _0x2b3c09['label']=N(this['locale'],'Reopen'),_0x2b3c09['tooltip']=N(this['locale'],'Reopen'),_0x2b3c09['icon']=_0x575807,_0x2b3c09['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1d1ded=>!_0x1d1ded),_0x2b3c09['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x56d5ad,_0x30e0d1)=>_0x56d5ad&&_0x30e0d1),_0x2b3c09['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2b3c09;}['_trimContextValue'](_0x3c4884){if(_0x3c4884['length']<0x96)return _0x3c4884;const _0x31469c=_0x3c4884['lastIndexOf']('\x20',0x93);return _0x3c4884['substring'](0x0,_0x31469c>-0x1?_0x31469c:0x93)+'...';}['_attachContextActions'](){const _0x3ba5b6=this['element']['querySelector']('.ck-context'),_0x119af3=_0x3ba5b6['querySelector']('.ck-context__value');this['listenTo'](_0x3ba5b6,'mouseenter',()=>{_0x119af3['offsetWidth']<_0x119af3['scrollWidth']&&_0x3ba5b6['classList']['add']('overlay');}),this['listenTo'](_0x3ba5b6,'mouseleave',()=>{_0x3ba5b6['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3f4710 of this['focusables'])this['focusTracker']['add'](_0x3f4710['element']),this['keystrokes']['listenTo'](_0x3f4710['element']);}['_createContextView'](){const _0x5039ea=new oe(this['locale']);return _0x5039ea['bind']('contextValue')['to'](this),_0x5039ea;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x10d1a5,_0x506bba,_0x2a1c47,_0x51e348){super(_0x10d1a5),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x506bba,this['_localUser']=_0x2a1c47,this['_config']=_0x51e348,this['commentThreadHeaderView']=new Yt(_0x10d1a5,_0x506bba),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x10d1a5,N(_0x10d1a5,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x10d1a5,_0x506bba,Object['assign']({'CommentView':this['_config']['CommentView']},_0x51e348)),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',(_0x57ab7b,_0x35bdf7)=>_0x57ab7b||!!_0x35bdf7),this['bind']('isUnlinked')['to'](_0x506bba,'unlinkedAt',_0xa2ef50=>!!_0xa2ef50),this['bind']('ariaLabel')['to'](this,'length',_0x436252=>{const _0x343fad=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x436252,_0x343fad]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x113483(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5ac25d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x45662b=>_0x45662b['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 _0x2b1fc9=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2fdc37=_0x2b1fc9['commentInputView'];return _0x2b1fc9['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2fdc37,'value',(_0x34893b,_0x2f2b80,_0x211831,_0x205fc1,_0x5aec5b)=>!!_0x5aec5b||!!_0x205fc1&&_0x211831&&!_0x2f2b80||_0x34893b&&_0x211831&&!_0x2f2b80),_0x2fdc37['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2ff2eb,_0x593301,_0x28d3be)=>{let _0x247deb;return _0x247deb=_0x28d3be&&_0x593301?'Reply\x20to\x20reopen\x20discussion...':_0x2ff2eb?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x247deb);}),_0x2fdc37['bind']('submitLabel')['to'](this,'length',_0x2ed901=>N(this['locale'],_0x2ed901?'Reply':'Comment')),_0x2fdc37['on']('submit',(_0x2c3001,_0x24757c)=>{this['fire']('addComment',_0x24757c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2fdc37['on']('cancel',()=>{this['focus']();}),_0x2fdc37['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2fdc37['on']('cancel',_0x59c7a9=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x59c7a9['stop']());}),this['on']('change:isActive',(_0x1c5538,_0x4846e8,_0x10efa8)=>{_0x10efa8||this['length']||_0x2fdc37['value']||this['fire']('removeCommentThread');}),_0x2b1fc9;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x187b5b,_0x5828a8,_0x87c864,_0x38c39b){super(_0x187b5b,_0x5828a8,_0x87c864,_0x38c39b),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x187b5b,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x288ade,_0x41a013,_0x2b4556)=>{_0x2b4556||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x192142,_0x1cbddc,_0x4a6458)=>{_0x4a6458&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3e515a=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3e515a['if']('isActive','ck-thread--active'),_0x3e515a['if']('isUnlinked','ck-thread--unlinked'),_0x3e515a['if']('isConfirm','ck-thread--remove-confirmation'),_0x3e515a['to']('actionIndicator',_0x1e3d6c=>_0x1e3d6c?'ck-thread--'+_0x1e3d6c:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3e515a['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 _0x2a66d6 of this['commentsListView']['commentViews'])_0x2a66d6['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x962c36}=this,_0x1529ee=this['commentsListView']['commentViews']['get'](0x0);_0x1529ee===this['_boundFirstCommentView']||_0x1529ee['isSystemComment']||(this['_boundFirstCommentView']=_0x1529ee,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1529ee,'actionIndicator',_0x545a81=>'remove'===_0x545a81?'remove':null),_0x1529ee['placeholder']=N(_0x962c36,'Write\x20a\x20comment...'),_0x1529ee['removeButton']['on']('execute',_0x4a7a1e=>{_0x4a7a1e['stop'](),this['showConfirm'](N(_0x962c36,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1529ee['focus']();}),_0x1529ee['actionBar']['add'](this['resolveButton'],0x0),_0x1529ee['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x44ddac=new _0x3e2885(this['locale']);return _0x44ddac['label']=N(this['locale'],'Resolve'),_0x44ddac['tooltip']=N(this['locale'],'Resolve'),_0x44ddac['icon']=_0x2fd253,_0x44ddac['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x44ddac['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x104c23=>!_0x104c23),_0x44ddac['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1db779,_0x581afe)=>_0x1db779&&!_0x581afe),_0x44ddac['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x44ddac;}['_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(_0x33bfaf){super(_0x33bfaf),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x140d02,_0x5682db,_0x2e64c2)=>{this['element']['innerHTML']=_0x2e64c2;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1bf7f5,_0xb0e262,_0xf25425){super(_0x1bf7f5),this['_model']=_0xb0e262,this['_config']=_0xf25425,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0xb0e262,'content',_0xb0e262,'authoredAt',(_0x2ac269,_0x2734db)=>N(_0x1bf7f5,'COMMENT_ARIA_LABEL',[_0xb0e262['author']['name'],_0xf25425['formatDateTime'](_0x2734db),new DOMParser()['parseFromString'](_0x2ac269,'text/html')['body']['textContent'],_0xb0e262['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x1bf7f5,N(_0x1bf7f5,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x46647b(),this['focusTracker']=new _0x113483(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5ac25d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e138a=>_0x3e138a['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x1314ec=new es(this['locale']);return _0x1314ec['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x535645,_0x89120c)=>_0x89120c?_0x23764c(_0x535645,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x535645),_0x1314ec;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x40431a=new os(this['locale'],this['_config']['editorConfig']);return _0x40431a['value']=this['_model']['content'],_0x40431a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x40431a['submitLabel']=N(this['locale'],'Save'),_0x40431a['on']('submit',(_0x3822c0,_0x216036)=>{this['fire']('updateComment',this['_model']['id'],_0x216036),this['switchToDisplayMode'](),this['focus']();}),_0x40431a['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x40431a['once']('editorReady',()=>{_0x40431a['focus']();}),_0x40431a['createEditor'](),_0x40431a['delegate']('editorReady')['to'](this),_0x40431a['delegate']('editorDestroyed')['to'](this),_0x40431a;}['_setupKeyboardNavigation'](){const _0x413308=this['element'];this['keystrokes']['listenTo'](_0x413308);for(const _0x20a08e of this['focusables'])this['focusTracker']['add'](_0x20a08e['element']),this['keystrokes']['listenTo'](_0x20a08e['element']);this['focusables']['on']('change',(_0x4c9368,_0x59ad44)=>{for(const _0x41ec58 of _0x59ad44['removed'])this['focusTracker']['remove'](_0x41ec58['element']),this['keystrokes']['stopListening'](_0x41ec58['element']);for(const _0x4799d1 of _0x59ad44['added'])this['focusTracker']['add'](_0x4799d1['element']),this['keystrokes']['listenTo'](_0x4799d1['element']);}),this['keystrokes']['set']('enter',(_0x4e7066,_0x2c7027)=>{_0x413308===_0x4e7066['target']&&(this['focusCycler']['focusFirst'](),_0x2c7027());}),this['keystrokes']['set']('esc',(_0x418188,_0x4b6743)=>{_0x413308!==_0x418188['target']&&(this['focus'](),_0x4b6743());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x26879f,_0x2136d9,_0x5b0c17){super(_0x26879f,_0x2136d9,_0x5b0c17),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x26879f,'Reply...')),this['bind']('authoredAt')['to'](_0x2136d9),this['bind']('resolvedAt')['to'](_0x2136d9),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 _0x7543d2(_0x26879f,_0x2136d9['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2136d9,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x174a5b=this['bindTemplate'],_0x2c06c5=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x174a5b['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x174a5b['to']('authoredAt',_0x1e7c7d=>this['_config']['formatDateTime'](_0x1e7c7d))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x174a5b['if']('isEditMode','ck-comment__actions--hidden'),_0x174a5b['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']&&_0x2c06c5['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x174a5b['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x174a5b['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x174a5b['if']('isEditMode','ck-comment--edit'),_0x174a5b['if']('isSystemComment','ck-comment--info'),_0x174a5b['to']('actionIndicator',_0x504794=>_0x504794?'ck-comment--'+_0x504794:'')],'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':_0x2c06c5}]}]};}['_createEditButton'](){const _0x3c646a=new _0x30c4c4(this['locale']);return _0x3c646a['label']=N(this['locale'],'Edit'),_0x3c646a['icon']=_0x1c81ed,_0x3c646a['withText']=!0x0,_0x3c646a['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x3c646a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4658f8=>!_0x4658f8),_0x3c646a['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x3c646a['on']('execute',()=>this['switchToEditMode']()),_0x3c646a;}['_createRemoveButton'](){const _0x1fa166=new _0x30c4c4(this['locale']);return _0x1fa166['label']=N(this['locale'],'Remove'),_0x1fa166['icon']=_0x28cd5d,_0x1fa166['withText']=!0x0,_0x1fa166['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1fa166['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x38f7d1=>!_0x38f7d1),_0x1fa166['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1fa166['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1fa166;}['_createDropdown'](){const _0x1d1c1f=_0x39b7d6(this['locale'],_0x2d0000),_0x5bdcc7=_0x1d1c1f['panelView']['children'],_0x4204e7=new _0x3b4d65(this['locale']),_0x48947c=_0x1d1c1f['bindTemplate'];_0x51b775(_0x1d1c1f,()=>this['items']['find'](_0x2dcda9=>_0x2dcda9['isVisible'])),_0x1d1c1f['extendTemplate']({'attributes':{'class':[_0x48947c['if']('isVisible','ck-hidden',_0x32dc83=>!_0x32dc83)]}});const _0x3232a7=(_0x9372cd,_0x46963b=-0x1)=>{const _0x5f3bda=new _0xcde4fd(this['locale']);_0x5f3bda['children']['add'](_0x9372cd);const _0x283ac3=_0x46963b>-0x1?_0x46963b:_0x4204e7['items']['length'];_0x4204e7['items']['add'](_0x5f3bda,_0x283ac3);const _0x4dc796=Array['from'](this['items']);_0x1d1c1f['unbind']('isEnabled','isVisible'),_0x1d1c1f['bind']('isEnabled')['toMany'](_0x4dc796,'isEnabled',(..._0x54613d)=>_0x54613d['some'](_0x37de84=>_0x37de84)),_0x1d1c1f['bind']('isVisible')['toMany'](_0x4dc796,'isVisible',(..._0x3e4f7a)=>_0x3e4f7a['some'](_0x2f5d29=>_0x2f5d29));};_0x1d1c1f['panelPosition']='sw',_0x1d1c1f['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x4af9a1});for(const _0x238456 of this['items'])_0x3232a7(_0x238456);return _0x5bdcc7['add'](_0x4204e7),_0x1d1c1f['listenTo'](this['items'],'add',(_0x24a9d5,_0x19e216,_0x54cb27)=>{_0x3232a7(_0x19e216,_0x54cb27);}),_0x1d1c1f['listenTo'](this['items'],'remove',(_0x1279de,_0xa34a9a,_0x14ad0a)=>{_0x4204e7['items']['remove'](_0x14ad0a);}),_0x1d1c1f;}['_attachActions'](_0x55a951,_0x55807c){const _0x29699f=_0x55a951&&_0x55a951['element'];_0x29699f&&(this['listenTo'](_0x29699f,'mouseenter',()=>this['actionIndicator']=_0x55807c),this['listenTo'](_0x29699f,'focus',()=>this['actionIndicator']=_0x55807c),this['listenTo'](_0x29699f,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x29699f,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x46848a=super['_createCommentInputView']();return _0x46848a['bind']('placeholder')['to'](this),_0x46848a;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x5e1a11){const _0x2041de=Dt(_0x5e1a11,0x1e),_0x2c6943=new MutationObserver(_0x101183=>{for(const _0x1aab2d of _0x101183)('attributes'==_0x1aab2d['type']&&'class'==_0x1aab2d['attributeName']||'childList'==_0x1aab2d['type']||'characterData'==_0x1aab2d['type'])&&_0x2041de();});return{'attach'(_0x50f631){_0x2c6943['observe'](_0x50f631,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x2c6943['disconnect'](),_0x2041de['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x46786d,_0x57e42a){super(_0x46786d),this['id']=_0x1856ab(),this['focusTracker']=new _0x113483(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x4dbb8b,_0x53f2a6)=>this['fire']('Esc',_0x53f2a6)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x57e42a),this['mainView']=_0x57e42a;const _0x35065e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x35065e['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 _0x3afdae=this['element']['clientHeight'];_0x3afdae&&(this['height']=_0x3afdae);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x310f56(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5f113f,target:_0x3367e8,type:_0x2fc850,isVisible:_0x23bb45=!0x0}){super(),this['view']=_0x5f113f,this['view']['element']||this['view']['render'](),this['_type']=_0x2fc850,this['_target']=_0x3367e8,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x103649([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5785f1,_0x24ae3d)=>{this['view']['focusTracker']['add'](_0x24ae3d);}),this['focusableElements']['on']('remove',(_0x3f2317,_0x27602e)=>{this['view']['focusTracker']['remove'](_0x27602e);}),this['set']('isVisible',_0x23bb45);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x536ddc=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x536ddc),_0x536ddc;}get['targetRect'](){const _0x54d983=this['target'];if(null===_0x54d983)return null;if(_0x54d983 instanceof _0x512b1c)return _0x54d983;const _0x18c19d=_0x54d983['filter'](_0x4f702b=>function(_0x2183da){const _0x10c345=_0x2183da['offsetParent'];if(_0x10c345)return!0x0;const _0x2aee91=_0x2183da['getClientRects']()['item'](0x0);return!!_0x2aee91;}(_0x4f702b));return 0x0===_0x18c19d['length']?null:new _0x512b1c(_0x18c19d[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1242d7){this['view']['isActive']=_0x1242d7,this['view']['mainView']['isActive']=_0x1242d7;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0xc0d7d7){if(!(null===_0xc0d7d7||_0xc0d7d7 instanceof _0x512b1c||Array['isArray'](_0xc0d7d7)&&_0xc0d7d7['every'](_0x106222=>fi(_0x106222))))throw new _0x520596('annotation-invalid-target',null,{'target':_0xc0d7d7});}['_getNormalizedTarget'](){const _0x40789b='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x40789b)?[_0x40789b]:_0x40789b;}}function fi(_0x25f736){return null!==_0x25f736&&'object'==typeof _0x25f736&&'nodeType'in _0x25f736&&0x1===_0x25f736['nodeType'];}class S extends _0x103649{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x27b937=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x113483(),this['_focusTracker']['on']('change:isFocused',(_0x4d6094,_0x1bda56,_0x5f3847)=>{_0x5f3847||this['fire']('blur');});for(const _0x14989f of _0x27b937)this['add'](_0x14989f);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x35282f){if(this['has'](_0x35282f))throw new _0x520596('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x35282f['innerView'],_0x35282f),this['_viewToAnnotation']['set'](_0x35282f['view'],_0x35282f);for(const _0x448d1c of _0x35282f['focusableElements'])this['_focusTracker']['add'](_0x448d1c);this['listenTo'](_0x35282f['focusableElements'],'add',(_0x15b852,_0xf68466)=>{this['_focusTracker']['add'](_0xf68466);}),this['listenTo'](_0x35282f['focusableElements'],'remove',(_0x4a7dc0,_0xafe80d)=>{this['_focusTracker']['remove'](_0xafe80d);}),this['listenTo'](_0x35282f['view']['focusTracker'],'change:isFocused',(_0x44fdf6,_0x2e9a80,_0x23c81c)=>{_0x23c81c&&this['fire']('focus',_0x35282f);}),_0x35282f['updateTargetRect']();const _0x58ea83=this['_getOrderInContent'](_0x35282f['view']['targetRect']);return super['add'](_0x35282f,_0x58ea83);}['remove'](_0x2c124d){if(!this['has'](_0x2c124d))throw new _0x520596('annotationcollection-not-existing-item',null);this['stopListening'](_0x2c124d['view']['focusTracker']),this['stopListening'](_0x2c124d['focusableElements']);for(const _0x2c4bbb of _0x2c124d['focusableElements'])this['_focusTracker']['remove'](_0x2c4bbb);return this['_viewToAnnotation']['delete'](_0x2c124d['view']),this['_innerViewToAnnotation']['delete'](_0x2c124d['innerView']),super['remove'](_0x2c124d);}['getByInnerView'](_0x70f4f8){return this['_innerViewToAnnotation']['get'](_0x70f4f8);}['getByView'](_0x3a7f14){return this['_viewToAnnotation']['get'](_0x3a7f14);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x12fd60 of this)_0x12fd60['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1c2999=Array['from'](this)['sort']((_0x11648c,_0x1e5e5c)=>w(_0x11648c['view']['targetRect'],_0x1e5e5c['view']['targetRect']));for(let _0x1ea34c=_0x1c2999['length']-0x1;_0x1ea34c>0x0;_0x1ea34c--){const _0x4f2705=_0x1c2999[_0x1ea34c];_0x1ea34c!==this['getIndex'](_0x4f2705)&&(this['remove'](_0x4f2705),this['add'](_0x4f2705));}}['_getOrderInContent'](_0x442523){let _0x3e724a=0x0;if(!_0x442523)return this['length'];for(const _0x459549 of this){const _0x79c18c=_0x459549['view']['targetRect'];if(_0x79c18c){if(w(_0x442523,_0x79c18c)<0x0)return _0x3e724a;_0x3e724a++;}}return _0x3e724a;}}function v({source:_0x37ddcc,target:_0x250036,filter:_0x354b48}){for(const _0x5326ff of _0x37ddcc)_0x354b48(_0x5326ff)&&_0x250036['add'](_0x5326ff);_0x250036['listenTo'](_0x37ddcc,'add',(_0x5efcb6,_0x21236c)=>{_0x354b48(_0x21236c)&&_0x250036['add'](_0x21236c);}),_0x250036['listenTo'](_0x37ddcc,'remove',(_0xd95b6d,_0x3fbb93)=>{_0x250036['has'](_0x3fbb93)&&_0x250036['remove'](_0x3fbb93);});}function w(_0x111e02,_0x34c3e4){if(null===_0x111e02&&null===_0x34c3e4)return 0x0;if(null===_0x111e02)return-0x1;if(null===_0x34c3e4)return 0x1;const _0x2cfeb3=_0x111e02['top']-_0x34c3e4['top'];return 0x0==_0x2cfeb3?_0x111e02['left']-_0x34c3e4['left']:_0x2cfeb3;}class y extends _0x277ff3{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x58e4a6){if(super(_0x58e4a6),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x58e4a6 instanceof _0x3f102e){const _0x4d720c=_0x58e4a6['locale'];_0x58e4a6['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x4d720c,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x4d720c,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x4d720c,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x4d720c,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x4d720c,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x4d720c,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x4d720c,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x28e3d9){this['collection']['add'](_0x28e3d9);}['remove'](_0xc04205){this['collection']['remove'](_0xc04205),_0xc04205['destroy']();}['refreshVisibility'](){for(const _0x5df7e8 of this['collection'])_0x5df7e8['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x402d3d){return this['collection']['getByInnerView'](_0x402d3d);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1565b3 of this['collection'])_0x1565b3['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3281bd){this['fire']('_activateAnnotation',_0x3281bd);}['createAnnotation'](_0x3dc162){return new T(_0x3dc162);}['createAnnotationView'](_0x2a7895,_0x3f1edf){return new E(_0x2a7895,_0x3f1edf);}['_addActiveAnnotation'](_0xfcb7a6){const _0x24f103=new Set(this['activeAnnotations']);_0x24f103['add'](_0xfcb7a6),this['activeAnnotations']=_0x24f103;}['_removeActiveAnnotation'](_0x161b45){const _0x247a0d=new Set(this['activeAnnotations']);_0x247a0d['delete'](_0x161b45),this['activeAnnotations']=_0x247a0d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3a5289=this['collection'],_0x302458=this['_visibleAnnotations'];function _0xf90d02(_0x433840){const _0x371c87=_0x433840['source'];_0x371c87['isVisible']&&!_0x302458['has'](_0x371c87)?_0x302458['add'](_0x371c87):!_0x371c87['isVisible']&&_0x302458['has'](_0x371c87)&&_0x302458['remove'](_0x371c87),_0x371c87['view']['focusTracker']['remove'](_0x371c87['view']['element']),_0x371c87['view']['focusTracker']['add'](_0x371c87['view']['element']);}this['listenTo'](_0x3a5289,'add',(_0x403627,_0xa6fe13)=>{_0xa6fe13['isVisible']&&_0x302458['add'](_0xa6fe13),this['listenTo'](_0xa6fe13,'change:isVisible',_0xf90d02);}),this['listenTo'](_0x3a5289,'remove',(_0x31d7c2,_0x5770d5)=>{_0x302458['has'](_0x5770d5)&&_0x302458['remove'](_0x5770d5),this['stopListening'](_0x5770d5,'change:isVisible',_0xf90d02);});}['_setupEnterAnnotationKeystroke'](){const _0x5f3b7b=_0xe4a479=>{_0xe4a479['on']('ready',()=>{_0xe4a479['keystrokes']['set'](_0x2e7c05,(_0x4fa97a,_0x685fdd)=>{const _0x4820fa=_0x138fb7(this['activeAnnotations']['values']());_0x4820fa&&(_0x4820fa['view']['focus'](),_0x685fdd());});});};this['context']instanceof _0x3f102e?_0x5f3b7b(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x17550f,_0x4e06f3)=>{_0x5f3b7b(_0x4e06f3);});}['_setupEscapeAnnotationHandling'](){const _0x3e8cea=_0xf65d3f=>{const _0x5d3f37=_0xf65d3f['source'],_0x2160d5=[];let _0x276769;if(Array['isArray'](_0x5d3f37['target'])){_0x276769=_0x5d3f37['target'][0x0],this['context']instanceof _0x3f102e?_0x2160d5['push'](this['context']):this['context']['editors']&&_0x2160d5['push'](...this['context']['editors']);for(const _0xbb09f9 of _0x2160d5)for(const _0xcb832e of _0xbb09f9['editing']['view']['domRoots']['values']())if(_0xcb832e['contains'](_0x276769))return void _0xbb09f9['editing']['view']['focus']();_0x276769['focus']();}};this['listenTo'](this['collection'],'add',(_0x521aba,_0x699016)=>{this['listenTo'](_0x699016,'escape',_0x3e8cea,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x410e21,_0x4c9295)=>{this['stopListening'](_0x4c9295,'escape',_0x3e8cea);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x277ff3{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b4aa8){super(_0x2b4aa8),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1f071e=this['context']['config'];_0x1f071e['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1f071e['define']('comments.maxThreadTotalWeight',0x1f4),_0x1f071e['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1f071e['define']('comments.CommentThreadView',gt),_0x1f071e['define']('comments.CommentView',Tt),_0x1f071e['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x37fea0=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x493e0a,_0x1abcb6)=>this['_addCommentThread'](_0x1abcb6)),this['on']('submitCommentThread',(_0x296d3d,_0xf975b9)=>this['_submitCommentThread'](_0xf975b9)),this['on']('resolveCommentThread',(_0x5f2cf7,_0x488fce)=>this['_resolveCommentThread'](_0x488fce)),this['on']('resolveCommentThread',(_0x12013a,_0x19c796)=>this['_updateActiveAnnotation'](_0x19c796),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x32cb75,_0x8a547a)=>this['_reopenCommentThread'](_0x8a547a)),this['on']('reopenCommentThread',(_0x5581b3,_0x10d656)=>this['_updateActiveAnnotation'](_0x10d656),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2fe2e5,_0x207e19)=>this['_removeCommentThread'](_0x207e19)),this['on']('updateCommentThread',(_0x4aea91,_0x24228a)=>this['_updateCommentThread'](_0x24228a)),this['on']('updateCommentThread',(_0x138f07,_0x111b63)=>this['_updateActiveAnnotation'](_0x111b63),{'priority':'lowest'}),this['on']('addComment',(_0xc2994a,_0x3b0f92)=>this['_addComment'](_0x3b0f92)),this['on']('updateComment',(_0x1ea252,_0x30db6c)=>this['_updateComment'](_0x30db6c)),this['on']('removeComment',(_0x53cf88,_0x1e3304)=>this['_removeComment'](_0x1e3304)),this['on']('addComment',(_0x304411,{threadId:_0x3217e2,isFromAdapter:_0x61481c})=>{if(_0x61481c)return;const _0x9b93a5=this['getCommentThread'](_0x3217e2),_0xfb429b=_0x9b93a5&&this['_threadToController']['get'](_0x9b93a5);_0xfb429b&&_0xfb429b['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x37fea0,'change:activeAnnotations',(_0x154754,_0x40f065,_0x195b54)=>{const _0x54a8d2=Array['from'](_0x195b54)['map'](_0x46ad70=>this['_viewToController']['get'](_0x46ad70['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x54a8d2?_0x54a8d2['model']:null;});}set['adapter'](_0x14ed11){if(this['_adapter'])throw new _0x520596('commentsrepository-adapter-already-set');this['_adapter']=_0x14ed11;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2c4482=_t,threadId:_0x324cb3=_0x1856ab(),comments:_0x3448dc=[],unlinkedAt:_0x426fc0=null,resolvedAt:_0x56e43a=null,resolvedBy:_0x447017=null,target:_0x3d31e2=null,context:_0x263626=null,attributes:_0x5943cb={},isResolvable:_0x112f60=!0x0,isSubmitted:_0x3a920c=!0x1,isFromAdapter:_0xebd0fd=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x2c4482),{'channelId':_0x2c4482,'threadId':_0x324cb3,'comments':_0x3448dc,'unlinkedAt':_0x426fc0,'resolvedAt':_0x56e43a,'resolvedBy':_0x447017,'target':_0x3d31e2,'context':_0x263626,'attributes':_0x5943cb,'isFromAdapter':_0xebd0fd,'isResolvable':_0x112f60,'isSubmitted':_0x3a920c}),this['getCommentThread'](_0x324cb3);}['openNewCommentThread']({channelId:_0x4370d7=_t,threadId:_0x199967=_0x1856ab(),target:_0x34bc93,context:_0x2eb050=null,isResolvable:_0xb18228=!0x0}){if(this['_readOnlyChannels']['has'](_0x4370d7)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x34bc93)throw new _0x520596('commentsrepository-missing-target');const _0x268342=this['addCommentThread']({'channelId':_0x4370d7,'threadId':_0x199967,'target':_0x34bc93,'context':_0x2eb050,'isResolvable':_0xb18228});if(!_0x268342)return null;const _0x68a303=this['_threadToController']['get'](_0x268342),_0x4f2316=_0x68a303['view']['commentThreadInputView']['commentInputView'],_0x2d6fd7=this['context']['plugins']['get'](y),_0x3688f6=_0x2d6fd7['getByInnerView'](_0x68a303['view']);return _0x2d6fd7['activate'](_0x3688f6),_0x4f2316['once']('editorReady',()=>_0x4f2316['focus']()),_0x268342;}['hasCommentThread'](_0x8667b5){if('string'!=typeof _0x8667b5)throw new _0x520596('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x8667b5);}['updateCommentThread']({channelId:_0x16c626=_t,threadId:_0x3f97a7,context:_0x18b7fc,unlinkedAt:_0x55fc5e,attributes:_0x5959ad,isFromAdapter:_0x431a22=!0x1}){return this['fire'](Nt('updateCommentThread',_0x16c626),{'channelId':_0x16c626,'threadId':_0x3f97a7,'context':_0x18b7fc,'unlinkedAt':_0x55fc5e,'attributes':_0x5959ad,'isFromAdapter':_0x431a22}),this['getCommentThread'](_0x3f97a7);}['getCommentThread'](_0x5194d8){if('string'!=typeof _0x5194d8)throw new _0x520596('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5194d8);}['fetchCommentThread']({channelId:_0x4f147b,threadId:_0x33b2b2}={}){const _0x574b39=this['getCommentThread'](_0x33b2b2);if(_0x574b39)return Promise['resolve'](_0x574b39);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x520596('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4f147b,'threadId':_0x33b2b2})['then'](_0x53cd2a=>this['hasCommentThread'](_0x33b2b2)?this['getCommentThread'](_0x33b2b2):_0x53cd2a?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4f147b},_0x53cd2a)):void 0x0)['catch'](_0x202b88=>{throw console['error'](_0x202b88),new _0x520596('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2ce36,skipNotAttached:_0x20fc8b=!0x1,skipEmpty:_0x15cfff=!0x1,toJSON:_0x51e0f7=!0x1}={}){const _0x5bf03a=[];for(const _0x1bc553 of this['_threads']['values']())_0x2ce36&&_0x1bc553['channelId']!==_0x2ce36||_0x20fc8b&&!_0x1bc553['isAttached']||_0x15cfff&&0x0===_0x1bc553['length']||_0x5bf03a['push'](_0x1bc553);return _0x51e0f7?_0x5bf03a['map'](_0x38ea93=>_0x38ea93['toJSON']()):_0x5bf03a;}['getAnnotationForCommentThread'](_0xf918c9){const _0x12abb1=this['_threadToController']['get'](_0xf918c9);if(!_0x12abb1)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x12abb1['view'])||null;}['getCommentThreadForAnnotation'](_0x56c4e9){const _0x49f9c3=this['_viewToController']['get'](_0x56c4e9['innerView']);return _0x49f9c3?_0x49f9c3['model']:null;}['setActiveCommentThread'](_0x310d9b){const _0x192ff1=this['context']['plugins']['get'](y);if(!_0x310d9b)return void(this['activeCommentThread']&&_0x192ff1['deactivateAll']());const _0x53b50e=this['getCommentThread'](_0x310d9b);if(!_0x53b50e)throw new _0x520596('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x310d9b});if(!this['_threadToController']['has'](_0x53b50e))throw new _0x520596('commentsrepository-active-not-attached',null,{'threadId':_0x310d9b});const _0x2892f9=_0x192ff1['getByInnerView'](this['_threadToController']['get'](_0x53b50e)['view']);_0x192ff1['activate'](_0x2892f9);}['switchReadOnly'](_0x809a70,_0x43a6d3){_0x809a70?this['_readOnlyChannels']['add'](_0x43a6d3):this['_readOnlyChannels']['delete'](_0x43a6d3),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xbed7ff){return this['_readOnlyChannels']['has'](_0xbed7ff)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x7f36ed,_0xb97961){return new vt(_0x7f36ed,_0xb97961);}['setPermissions'](_0x1008d8,_0x1be90b=_t){this['_permissions']['set'](_0x1be90b,_0x1008d8),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5e1137=_t){return this['_permissions']['has'](_0x5e1137)?this['_permissions']['get'](_0x5e1137):bt;}['_addCommentThread']({channelId:_0x5e459d,threadId:_0x1ddb3d,comments:_0x46aae7,unlinkedAt:_0xc45377,resolvedAt:_0x44d82f,resolvedBy:_0x2183c5,target:_0x483d7b,context:_0x465314,attributes:_0xb54833,isFromAdapter:_0x247600,isResolvable:_0x4cbd84,isSubmitted:_0x2d36d5}){if('string'!=typeof _0x1ddb3d)throw new _0x520596('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1ddb3d});if(this['hasCommentThread'](_0x1ddb3d))throw new _0x520596('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1ddb3d});const _0x88deb7=new pi(this,{'channelId':_0x5e459d,'id':_0x1ddb3d,'context':_0x465314,'attributes':_0xb54833,'unlinkedAt':_0xc45377,'resolvedAt':_0x44d82f,'resolvedBy':_0x2183c5?this['context']['plugins']['get'](it)['getUser'](_0x2183c5):null,'isResolvable':_0x4cbd84,'isSubmitted':_0x2d36d5||_0x247600});this['_threads']['set'](_0x1ddb3d,_0x88deb7);for(const _0x189f43 of _0x46aae7)_0x88deb7['_add'](this['_createNewComment']({'threadId':_0x1ddb3d,..._0x189f43}));return _0x483d7b&&_0x88deb7['attachTo'](_0x483d7b),_0x247600||!_0x88deb7['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5e459d,'threadId':_0x1ddb3d});}['_submitCommentThread']({channelId:_0x212e6e,threadId:_0x1e45f1}){if(!this['hasCommentThread'](_0x1e45f1))throw new _0x520596('commentsrepository-missing-comment-thread',this);const _0x23f98e=this['getCommentThread'](_0x1e45f1);if(_0x23f98e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x419065,comments:_0x427eb9,resolvedAt:_0x2a0854,resolvedBy:_0x64b9be,context:_0x4d8e44,attributes:_0x3758f5}=_0x23f98e,_0x18259e=this['context']['plugins']['get']('PendingActions'),_0x110dbe=_0x18259e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x212e6e,'threadId':_0x419065,'comments':_0x427eb9['map'](_0x203951=>_0x203951['toJSON']()),'resolvedAt':_0x2a0854,'resolvedBy':_0x64b9be?_0x64b9be['id']:_0x64b9be,'context':_0x4d8e44,'attributes':_0x3758f5})['then'](({comments:_0x51f54c})=>{_0x18259e['remove'](_0x110dbe);for(const _0x151abc of _0x51f54c)this['_updateComment']({'channelId':_0x212e6e,'threadId':_0x1e45f1,'commentId':_0x151abc['commentId'],'createdAt':_0x151abc['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x409a98=>{throw console['error'](_0x409a98),new _0x520596('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4e3b0e,target:_0x3e035e}){const _0x5780df=this['getCommentThread'](_0x4e3b0e);if(!_0x5780df)throw new _0x520596('commentsrepository-attach-missing-comment-thread',this);const _0x5d60d6=this['context']['plugins']['get']('PendingActions'),_0x17aca5=this['context']['plugins']['get'](y),_0x466e66=this['_createCommentThreadView'](_0x5780df),_0xa97858=new vt(_0x5780df,_0x466e66);let _0x4d561d=null;_0x466e66['on']('change:isDirty',(_0x4ede0c,_0xc1e188,_0x398585)=>{_0x398585?_0x4d561d=_0x5d60d6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4d561d&&(_0x5d60d6['remove'](_0x4d561d),_0x4d561d=null);}),this['_threadToController']['set'](_0x5780df,_0xa97858),this['_viewToController']['set'](_0x466e66,_0xa97858);const _0x40a0db=new E(this['context']['locale'],_0x466e66);_0x40a0db['bind']('length')['to'](_0x466e66),_0x40a0db['bind']('isDirty')['to'](_0x466e66,'isDirty',_0x466e66,'length',(_0x4a37f2,_0x107c02)=>_0x4a37f2||!_0x107c02),_0x40a0db['bind']('isActive')['to'](_0x466e66),_0x40a0db['type']='comment';const _0x1fcc55=new T({'view':_0x40a0db,'target':_0x3e035e,'type':'comment','isVisible':!_0x5780df['archivedAt']&&!!('function'==typeof _0x3e035e?_0x3e035e():_0x3e035e)});return _0x466e66['on']('escape',()=>{_0x1fcc55['fire']('escape');}),this['_bindAnnotationToEditors'](_0x466e66,_0x1fcc55),_0x17aca5['add'](_0x1fcc55),_0x1fcc55;}['_bindAnnotationToEditors'](_0x1fa346,_0x1efbf6){this['listenTo'](_0x1fa346,'editorReady',(_0x12ccdb,_0xcb30df)=>{const _0x30ff7c=_0xcb30df['ui']['view']['body']['bodyCollectionContainer'];_0x1efbf6['focusableElements']['add'](_0x30ff7c),this['context']instanceof _0x3f102e&&this['context']['ui']['focusTracker']['add'](_0x30ff7c);},{'priority':'highest'}),this['listenTo'](_0x1fa346,'editorDestroyed',(_0x4b8f51,_0x20ffe2)=>{const _0x2122b5=_0x20ffe2['ui']['view']['body']['bodyCollectionContainer'];_0x1efbf6['focusableElements']['has'](_0x2122b5)&&_0x1efbf6['focusableElements']['remove'](_0x2122b5),this['context']instanceof _0x3f102e&&this['context']['ui']['focusTracker']['remove'](_0x2122b5);});}['_unbindEditors'](_0x27d28d){this['stopListening'](_0x27d28d,'editorReady'),this['stopListening'](_0x27d28d,'editorDestroyed');}['_createCommentThreadView'](_0x1ad1d2){const _0x507f8a=this['context']['plugins']['get'](it),{config:_0x135aec,locale:_0x5c375a}=this['context'],_0x3918ae=pt(_0x135aec['get']('locale'),_0x5c375a);return new(0x0,(_0x135aec['get']('comments'))['CommentThreadView'])(_0x5c375a,_0x1ad1d2,_0x507f8a['me'],{'editorConfig':{..._0x135aec['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x135aec['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x135aec['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x135aec['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x135aec['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3918ae,'CommentView':_0x135aec['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x39bc94,channelId:_0x3ea03b,resolvedAt:_0x84603b,resolvedBy:_0x2e86fc,isFromAdapter:_0x167078}){if(!this['hasCommentThread'](_0x39bc94))throw new _0x520596('commentsrepository-missing-comment-thread',null,{'threadId':_0x39bc94});const _0x366004=this['getCommentThread'](_0x39bc94);if(_0x366004['isResolved'])throw new _0x520596('commentsrepository-resolved-comment-thread',null,{'threadId':_0x39bc94});const _0x3f495c=this['context']['plugins']['get'](it);if(_0x366004['resolvedBy']=_0x3f495c['getUser'](_0x2e86fc),_0x366004['resolvedAt']=_0x84603b,_0x167078||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x385243=this['context']['plugins']['get']('PendingActions'),_0x4c3b06=_0x385243['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3ea03b,'threadId':_0x39bc94})['then'](({resolvedAt:_0x3e7a46,resolvedBy:_0x12589a})=>{_0x385243['remove'](_0x4c3b06),_0x366004['resolvedBy']['id']!==_0x12589a&&(_0x366004['resolvedBy']=_0x3f495c['getUser'](_0x12589a)),_0x366004['resolvedAt']=_0x3e7a46;})['catch'](_0x38acd0=>{throw console['error'](_0x38acd0),new _0x520596('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2bbe31,channelId:_0x3a4e8e,isFromAdapter:_0x34bd1f}){if(!this['hasCommentThread'](_0x2bbe31))throw new _0x520596('commentsrepository-missing-comment-thread',null,{'threadId':_0x2bbe31});const _0x71c2ad=this['getCommentThread'](_0x2bbe31);if(!_0x71c2ad['isResolved'])throw new _0x520596('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2bbe31});if(_0x71c2ad['resolvedBy']=null,_0x71c2ad['resolvedAt']=null,_0x34bd1f||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5684c9=this['context']['plugins']['get']('PendingActions'),_0x101f34=_0x5684c9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3a4e8e,'threadId':_0x2bbe31})['then'](()=>_0x5684c9['remove'](_0x101f34))['catch'](_0x3d2786=>{throw console['error'](_0x3d2786),new _0x520596('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x536eb2,isFromAdapter:_0x5a6a8b}){const _0xcf40f7=this['getCommentThread'](_0x536eb2);if(!_0xcf40f7)throw new _0x520596('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x536eb2),this['_threads']['delete'](_0x536eb2),!_0xcf40f7['isSubmitted']||_0x5a6a8b||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x169f18=this['context']['plugins']['get']('PendingActions'),{channelId:_0x46dcae}=_0xcf40f7,_0x194685=_0x169f18['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x46dcae,'threadId':_0x536eb2})['then'](()=>_0x169f18['remove'](_0x194685))['catch'](_0x5adbca=>{throw console['error'](_0x5adbca),new _0x520596('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5e5404,unlinkedAt:_0x25ea10,context:_0x58856d,attributes:_0x13f433,isFromAdapter:_0x21ac1d}){if('string'!=typeof _0x5e5404)throw new _0x520596('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5e5404});if(!this['hasCommentThread'](_0x5e5404))throw new _0x520596('commentsrepository-missing-comment-thread',null,{'threadId':_0x5e5404});const _0x2dc913=this['getCommentThread'](_0x5e5404);let _0x3145f7=!0x1;if(void 0x0!==_0x58856d&&_0x2dc913['context']!==_0x58856d&&(_0x2dc913['context']=_0x58856d,_0x3145f7=!0x0),void 0x0!==_0x25ea10&&_0x2dc913['unlinkedAt']!==_0x25ea10&&(_0x2dc913['unlinkedAt']=_0x25ea10,_0x3145f7=!0x0),_0x13f433&&!At(_0x13f433,_0x2dc913['attributes'])&&(_0x2dc913['attributes']=_0x13f433,_0x3145f7=!0x0),!_0x3145f7)return Promise['resolve']();if(!_0x2dc913['isSubmitted']||_0x21ac1d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x59110e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ba11f}=_0x2dc913,_0x42c7c1=_0x59110e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1ba11f,'threadId':_0x5e5404,'context':_0x58856d,'unlinkedAt':_0x25ea10,'attributes':_0x13f433})['then'](()=>_0x59110e['remove'](_0x42c7c1))['catch'](_0x250104=>{throw console['error'](_0x250104),new _0x520596('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x306b77){const _0xb40a16=this['context']['plugins']['get'](y),_0x30b47b=this['getCommentThread'](_0x306b77);if(_0x30b47b['_isAttached']=!0x1,this['_threadToController']['has'](_0x30b47b)){const _0x472b1e=this['_threadToController']['get'](_0x30b47b),_0x385e91=_0x472b1e['view'],_0x4da08f=_0xb40a16['getByInnerView'](_0x385e91);this['_threadToController']['delete'](_0x30b47b),this['_viewToController']['delete'](_0x385e91),_0x4da08f&&_0xb40a16['remove'](_0x4da08f),_0x472b1e['destroy'](),_0x385e91['destroy']()['then'](()=>{this['_unbindEditors'](_0x385e91);});}}['_updateActiveAnnotation']({threadId:_0x3d398b,resolvedAt:_0x526eeb,unlinkedAt:_0x56c0bf}){const _0x597129=!!_0x526eeb,_0x5ef03f=this['context']['plugins']['get'](y),_0x24b4a2=this['getCommentThread'](_0x3d398b);if(this['_threadToController']['has'](_0x24b4a2)){const _0x1d1477=this['_threadToController']['get'](_0x24b4a2)['view'],_0x52297f=_0x5ef03f['getByInnerView'](_0x1d1477);_0x52297f&&(_0x597129&&_0x5ef03f['_removeActiveAnnotation'](_0x52297f),_0x56c0bf?_0x52297f['isVisible']=!0x1:_0x52297f['refreshVisibility']());}}['_getExternalAuthor'](_0x47269b){const _0xbf1f9c=this['context']['plugins']['get'](it),_0x4dca13=It('external:'+_0x47269b),_0x446ce5=_0xbf1f9c['getUser'](_0x4dca13);return _0x446ce5||_0xbf1f9c['addUser']({'id':_0x4dca13,'name':_0x47269b});}['_createNewComment']({threadId:_0x207d28,commentId:_0xd19f6=_0x1856ab(),content:_0x334342,authorId:_0x165346,createdAt:_0x4bfcfa,attributes:_0x12822f}){if('string'!=typeof _0xd19f6)throw new _0x520596('commentsrepository-invalid-commentid');if('string'!=typeof _0x165346)throw new _0x520596('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x334342||!_0x334342['trim']())throw new _0x520596('commentsrepository-invalid-comment-content');const _0xe181c0=this['context']['plugins']['get'](it)['getUser'](_0x165346);if(!_0xe181c0)throw new _0x520596('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x165346});let _0x5ab21d=null,_0x59f68b=_0x4bfcfa;return _0x12822f?.['@external']&&(_0x5ab21d=this['_getExternalAuthor'](_0x12822f['@external']['authorName']),_0x59f68b=new Date(_0x12822f['@external']['createdAt'])),new wi(this,{'threadId':_0x207d28,'id':_0xd19f6,'author':_0x5ab21d||_0xe181c0,'creator':_0xe181c0,'content':_0x334342,'createdAt':_0x4bfcfa,'authoredAt':_0x59f68b,'attributes':_0x12822f});}['_addComment'](_0x3e3f5c){let {threadId:_0x1ee6cc,content:_0x89807f,attributes:_0x4a42a9,isFromAdapter:_0x39b2e2}=_0x3e3f5c;const _0x4b2620=this['getCommentThread'](_0x3e3f5c['threadId']);if(!_0x4b2620)throw new _0x520596('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3c8a8f=this['_createNewComment'](_0x3e3f5c),{id:_0x3f3b8b}=_0x3c8a8f;if(_0x4b2620['_add'](_0x3c8a8f),_0x39b2e2||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4b2620['isSubmitted'])return Promise['resolve']();const _0x5bde11=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1d5b9f}=_0x4b2620,_0x4287e5=_0x5bde11['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4a42a9||(_0x4a42a9={}),this['adapter']['addComment']({'channelId':_0x1d5b9f,'threadId':_0x1ee6cc,'commentId':_0x3f3b8b,'content':_0x89807f,'attributes':_0x4a42a9})['then'](_0xf3b023=>{_0x5bde11['remove'](_0x4287e5),_0xf3b023&&this['_updateComment']({'channelId':_0x1d5b9f,'threadId':_0x1ee6cc,'commentId':_0x3f3b8b,'createdAt':_0xf3b023['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5d08c5=>{throw console['error'](_0x5d08c5),new _0x520596('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0xb0d1e8,commentId:_0xc63afc,content:_0x3b8710,createdAt:_0x489b33,attributes:_0x3ddbda,isFromAdapter:_0x40df01}){if(void 0x0!==_0x3b8710&&('string'!=typeof _0x3b8710||!_0x3b8710['trim']()['length']))throw new _0x520596('commentsrepository-update-comment-invalid-content');const _0x567f74=this['getCommentThread'](_0xb0d1e8),_0x1cd4a4=_0x567f74['getComment'](_0xc63afc);if(!_0x1cd4a4)throw new _0x520596('commentsrepository-update-missing-comment',this);let _0x28ed2a=!0x1;if(_0x3b8710&&_0x3b8710!==_0x1cd4a4['content']&&(_0x1cd4a4['isEditable']||_0x40df01)&&(_0x1cd4a4['content']=_0x3b8710,_0x28ed2a=!0x0),_0x489b33&&_0x489b33!==_0x1cd4a4['createdAt']&&(_0x1cd4a4['createdAt']=_0x489b33,_0x1cd4a4['attributes']&&_0x1cd4a4['attributes']['@external']||(_0x1cd4a4['authoredAt']=_0x489b33),_0x28ed2a=!0x0),_0x3ddbda&&!At(_0x3ddbda,_0x1cd4a4['attributes'])&&(_0x1cd4a4['attributes']=_0x3ddbda,_0x28ed2a=!0x0),!_0x28ed2a)return Promise['resolve']();if(_0x567f74['fire']('commentUpdated'),_0x40df01||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x407c29=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3106ac}=this['getCommentThread'](_0x1cd4a4['threadId']),_0x32fa0d=_0x407c29['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3106ac,'threadId':_0xb0d1e8,'commentId':_0xc63afc,'content':_0x3b8710,'attributes':_0x3ddbda})['then'](()=>_0x407c29['remove'](_0x32fa0d))['catch'](_0x22ad0b=>{throw console['error'](_0x22ad0b),new _0x520596('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x16e219,commentId:_0x2cb074,isFromAdapter:_0x137e38}){const _0x2d42ad=this['getCommentThread'](_0x16e219),_0x6a8465=_0x2d42ad['getComment'](_0x2cb074);if(!_0x6a8465)throw new _0x520596('commentsrepository-remove-missing-comment',this);if(_0x2d42ad['_remove'](_0x6a8465),_0x137e38||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x46935d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5fddb1}=_0x2d42ad,_0x21dc40=_0x46935d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5fddb1,'threadId':_0x16e219,'commentId':_0x2cb074})['then'](()=>_0x46935d['remove'](_0x21dc40))['catch'](_0x228de6=>{throw console['error'](_0x228de6),new _0x520596('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x310f56(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x54d294,_0x416074){super();const _0x2b4ad0=_0x416074['isResolvable'];this['channelId']=_0x416074['channelId'],this['id']=_0x416074['id'],this['comments']=new _0x103649(),this['_repository']=_0x54d294,this['_isAttached']=!0x1,this['_isSubmitted']=_0x416074['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x54d294,'_permissions',_0x54d294,'_readOnlyChannels',()=>_0x54d294['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x54d294,'_permissions',()=>_0x54d294['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x54d294,'_permissions',()=>{const _0x3d06e1=_0x54d294['getPermissions'](this['channelId']);return _0x3d06e1['write']||_0x3d06e1['admin'];}),this['bind']('isResolvable')['to'](_0x54d294,'_permissions',()=>_0x2b4ad0&&_0x54d294['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x416074['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x3be592,_0x8f2869)=>_0x3be592?_0x8f2869?_0x3be592<_0x8f2869?_0x3be592:_0x8f2869:_0x3be592:_0x8f2869),this['set']('unlinkedAt',_0x416074['unlinkedAt']||null),this['set']('resolvedAt',_0x416074['resolvedAt']||null),this['set']('resolvedBy',_0x416074['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1a0afc=>!!_0x1a0afc),this['set']('attributes',_0x416074['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2a3b8b,_0x203250)=>_0x2a3b8b+_0x203250['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x15ea10,id:_0x2d9abf}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x15ea10),{'channelId':_0x15ea10,'threadId':_0x2d9abf});}['setUnlinkedAt'](_0x1cdfe7){this['_update']({'unlinkedAt':_0x1cdfe7});}['resolve']({resolvedAt:_0x322940=new Date(),resolvedBy:_0x4cab10=null,isFromAdapter:_0x5450b2=!0x1}={}){const _0x541a58=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x34b1ad,id:_0x15a619}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x34b1ad),{'channelId':_0x34b1ad,'threadId':_0x15a619,'resolvedAt':_0x322940,'resolvedBy':_0x4cab10||_0x541a58['id'],'isFromAdapter':_0x5450b2});}['reopen']({isFromAdapter:_0x133506=!0x1}={}){const {channelId:_0x201815,id:_0x1b3a97}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x201815),{'channelId':_0x201815,'threadId':_0x1b3a97,'isFromAdapter':_0x133506});}['setContext'](_0x532f87){this['context']||this['_update']({'context':_0x532f87});}['setAttribute'](_0x136147,_0x238298){const _0x54229d=wt(this['attributes']);yt(_0x54229d,_0x136147,_0x238298),this['_update']({'attributes':_0x54229d});}['removeAttribute'](_0x16a79d){const _0x114b3b=wt(this['attributes']);Ct(_0x114b3b,_0x16a79d),this['_update']({'attributes':_0x114b3b});}['remove']({isFromAdapter:_0xd1a656=!0x1}={}){const {channelId:_0x231722,id:_0x173f86}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x231722),{'channelId':_0x231722,'threadId':_0x173f86,'isFromAdapter':_0xd1a656});}['attachTo'](_0x2753c7){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2753c7});}['addComment'](_0x2df759){const {channelId:_0x1d0edd,id:_0x429ad6}=this;this['_repository']['fire'](Nt('addComment',_0x1d0edd,_0x429ad6),Object['assign']({'channelId':_0x1d0edd,'threadId':_0x429ad6},_0x2df759));}['getComment'](_0x5c10d2){if('string'!=typeof _0x5c10d2)throw new _0x520596('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5c10d2});return this['comments']['get'](_0x5c10d2);}['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'](_0xa0ae3b=>_0xa0ae3b['toJSON']()),'attributes':this['attributes']};}['_add'](_0x3bbe8d){return this['listenTo'](_0x3bbe8d,'change:authoredAt',()=>{const _0x578108=this['_findOptimalIndex'](_0x3bbe8d),_0x41b52f=this['comments'];_0x578108-0x1!=_0x41b52f['getIndex'](_0x3bbe8d)&&_0x578108+0x1!=_0x41b52f['getIndex'](_0x3bbe8d)&&(this['_remove'](_0x3bbe8d),this['_add'](_0x3bbe8d));}),this['comments']['add'](_0x3bbe8d,this['_findOptimalIndex'](_0x3bbe8d));}['_update'](_0x563652){const {channelId:_0x28c507,id:_0x3d93cb}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x28c507),{..._0x563652,'channelId':_0x28c507,'threadId':_0x3d93cb});}['_remove'](_0x1e09b6){return this['stopListening'](_0x1e09b6),_0x1e09b6['destroy'](),this['comments']['remove'](_0x1e09b6);}['_findOptimalIndex'](_0x5d17ae){const _0x41736d=this['comments']['find'](_0x2c7c7e=>new Date(_0x2c7c7e['authoredAt'])['getTime']()>new Date(_0x5d17ae['authoredAt'])['getTime']());return _0x41736d?this['comments']['getIndex'](_0x41736d):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x310f56(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0xf91c31,_0x722cd2){super();const _0x57f71f=_0xf91c31['context']['plugins']['get'](it)['me'],_0x7cad1d=_0xf91c31['getCommentThread'](_0x722cd2['threadId']),_0x4c72ea=0x0===_0x7cad1d['comments']['length'],_0x1678b8=_0x57f71f===_0x722cd2['author'];this['id']=_0x722cd2['id'],this['threadId']=_0x722cd2['threadId'],this['author']=_0x722cd2['author'],this['creator']=_0x722cd2['creator'],this['isExternal']=Boolean(_0x722cd2['attributes']&&_0x722cd2['attributes']['@external']),this['set']('content',_0x722cd2['content']),this['createdAt']=_0x722cd2['createdAt']||new Date(),this['set']('authoredAt',_0x722cd2['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x7cad1d,'resolvedAt'),this['set']('attributes',_0x722cd2['attributes']||{}),this['bind']('isEditable')['to'](_0xf91c31,'_permissions',()=>{const _0x283d00=_0xf91c31['getPermissions'](_0x7cad1d['channelId'])['write'],_0x53ba0f=_0xf91c31['getPermissions'](_0x7cad1d['channelId'])['modifyAll'];return _0x1678b8&&_0x283d00||!_0x1678b8&&_0x53ba0f;}),this['bind']('isRemovable')['to'](_0x7cad1d,'isRemovable',_0xf91c31,'_permissions',_0x4a2c6a=>{const _0x543946=_0xf91c31['getPermissions'](_0x7cad1d['channelId'])['write'],_0x1c0d47=_0xf91c31['getPermissions'](_0x7cad1d['channelId'])['modifyAll'];return _0x1678b8&&_0x543946||_0x4a2c6a&&_0x4c72ea||!_0x1678b8&&_0x1c0d47&&!_0x4c72ea;}),this['bind']('isReadOnly')['to'](_0x7cad1d,'isReadOnly'),this['_repository']=_0xf91c31;}get['weight'](){return Math['max'](function(_0xd6aa2a){const _0x47a071=document['createElement']('div');return _0x47a071['innerHTML']=_0xd6aa2a,_0x47a071['textContent']['length'];}(this['content']),0xc8);}['update'](_0x42f440){const {threadId:_0x1950fc,id:_0x3b455f}=this;if(!this['_repository']['hasCommentThread'](_0x1950fc))throw new _0x520596('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3c290a}=this['_repository']['getCommentThread'](_0x1950fc);this['_repository']['fire'](Nt('updateComment',_0x3c290a,_0x1950fc),{'channelId':_0x3c290a,'threadId':_0x1950fc,'commentId':_0x3b455f,..._0x42f440});}['setAttribute'](_0x480313,_0x8a038b){const _0x7e8c06=wt(this['attributes']);yt(_0x7e8c06,_0x480313,_0x8a038b),this['update']({'attributes':_0x7e8c06});}['removeAttribute'](_0x36471b){const _0x26acfd=wt(this['attributes']);Ct(_0x26acfd,_0x36471b),this['update']({'attributes':_0x26acfd});}['remove'](_0x4af0f5={}){if(!_0x4af0f5['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x15c6e5,id:_0x146ad1}=this;if(!this['_repository']['hasCommentThread'](_0x15c6e5))throw new _0x520596('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2c449c}=this['_repository']['getCommentThread'](_0x15c6e5);this['_repository']['fire'](Nt('removeComment',_0x2c449c,_0x15c6e5),{'channelId':_0x2c449c,'threadId':_0x15c6e5,'commentId':_0x146ad1,..._0x4af0f5});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x35f52b,..._0x2db781){for(const _0x346f51 of _0x2db781)void 0x0!==_0x346f51&&(_0x35f52b+=':'+String(_0x346f51));return _0x35f52b;}class ot extends _0x15890d{constructor(_0xc1d964){super(_0xc1d964),this['set']('hasContent',!0x1);}['refresh'](){const _0x1cab14=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x27a3e9 of _0x1cab14['getRanges']())if(this['_hasContent'](_0x27a3e9))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x201178=_0x1856ab(),ranges:_0x287db0,comment:_0x1630d8}={}){const _0x3ee444=this['editor']['model'],_0x28df48=_0x287db0??Array['from'](_0x3ee444['document']['selection']['getRanges']()),_0x1ab7cd=[];for(const _0x773d81 of _0x28df48)this['_hasContent'](_0x773d81)&&_0x1ab7cd['push'](this['_trimToContent'](_0x773d81));if(!_0x1ab7cd['length'])throw new _0x520596('addcommentthreadcommand-incorrect-ranges',null);_0x1630d8&&this['_createCommentThread'](_0x201178,_0x1630d8),this['_createMarkersFromRanges'](_0x201178,_0x1ab7cd,!!_0x1630d8);}['_createMarkersFromRanges'](_0x54d6c7,_0x39e6a6,_0x105489){this['editor']['model']['change'](_0x2cdfda=>{for(const _0x295e60 of _0x39e6a6){const _0x5042da=_0x1856ab()['substr'](0x1,0x5),_0x1805c4='comment:'+_0x54d6c7+':'+_0x5042da;_0x2cdfda['addMarker'](_0x1805c4,{'range':_0x295e60,'usingOperation':_0x105489,'affectsData':_0x105489});}});}['_createCommentThread'](_0x27bea3,_0x3637c0){const _0x473caf=this['editor']['plugins']['get']('CommentsRepository'),_0x49c94d=this['editor']['config']['get']('collaboration.channelId'),_0x574f2e=this['editor']['plugins']['get']('Users')['me'];if(!_0x574f2e)throw new _0x520596('addcommentthreadcommand-user-not-found',null);_0x473caf['addCommentThread']({'threadId':_0x27bea3,'channelId':_0x49c94d,'comments':[{'authorId':_0x574f2e['id'],'content':_0x3637c0,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4063ad){for(const _0x140b66 of _0x4063ad['getItems']())if(this['_itemIsContent'](_0x140b66))return!0x0;return!0x1;}['_itemIsContent'](_0x3a2122){return _0x3a2122['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3a2122)&&!_0x3a2122['is']('element','tableCell');}['_trimToContent'](_0x538800){const _0x4b92ef=_0x166c52=>!this['_itemIsContent'](_0x166c52['item']),_0x1b32d0=_0x538800['start']['getLastMatchingPosition'](_0x4b92ef),_0x43f97c=_0x538800['end']['getLastMatchingPosition'](_0x4b92ef,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1b32d0,_0x43f97c);}}class b extends _0x4c92ab{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3b62c6){super(_0x3b62c6),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x19b642=this['editor'],_0x43021d=_0x19b642['model']['document']['selection'],_0x3b8b83=_0x32bc5d(()=>this['refreshSelectedViews'](),0xa);_0x43021d['on']('change:range',(_0x2e04f1,_0x11e9a3)=>{_0x11e9a3['directChange']&&(_0x3b8b83['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x19b642['editing']['view']['document'],'change:isFocused',(_0x2c02e8,_0x34b9ff,_0x3088d3)=>{_0x3088d3&&_0x3b8b83();}),this['listenTo'](_0x19b642['ui']['focusTracker'],'change:isFocused',(_0x2f718f,_0x5b2ac6,_0x5416f1)=>{_0x5416f1||this['fire']('blur',{'isAnnotationTracked':_0x5a9856=>this['_editorAnnotationsData']['has'](_0x5a9856['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3a9f0a){if(this['_editorAnnotations']['has'](_0x3a9f0a['view']))return;this['_editorAnnotations']['add'](_0x3a9f0a['view']),this['editor']['ui']['focusTracker']['add'](_0x3a9f0a['view']['element']);const _0xa873f2=this['editor']['plugins']['get'](y);this['listenTo'](_0xa873f2['collection'],'remove',(_0x1d047a,_0xc11314)=>{this['editor']['ui']['focusTracker']['remove'](_0xc11314['view']['element']),this['_editorAnnotations']['delete'](_0xc11314['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x3f5415){if('function'!=typeof _0x3f5415)throw new _0x520596('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x3f5415);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xcc1b8e,annotations:_0x1fb406}){const _0x5ec4df=[],_0x1053fd=this['editor']['model']['document']['selection'],_0x18f69a=Array['from'](_0x1053fd['getRanges']());for(const [_0x2402bf,_0x3dca1f]of this['_editorAnnotationsData']){const _0x4e6b35=_0x58cc67(_0x3dca1f),_0x32550b=_0x1fb406['getByInnerView'](_0x2402bf);_0x4e6b35&&_0x32550b&&_0x5ec4df['push']({'annotation':_0x32550b,'range':_0x4e6b35});}function _0x58cc67(_0x499aa6){for(const _0xe436df of _0x499aa6)for(const _0x18c882 of _0x18f69a)if(_0xe436df['containsRange'](_0x18c882,!_0x1053fd['isCollapsed']))return _0xe436df;return null;}return _0x5ec4df['sort']((_0x5fd65f,_0x563cdb)=>{const _0x20e434=_0x5fd65f['range'],_0x380d53=_0x563cdb['range'];if(!_0x20e434['isEqual'](_0x380d53)){if(_0x20e434['containsRange'](_0x380d53,!0x0))return 0x1;if(_0x380d53['containsRange'](_0x20e434,!0x0))return-0x1;}return _0x5fd65f['annotation']==_0xcc1b8e?-0x1:_0x563cdb['annotation']==_0xcc1b8e?0x1:0x0;})['map'](_0x39df6a=>_0x39df6a['annotation']);}get['_editorAnnotationsData'](){const _0xc56f08=new Map();for(const _0x42f6a3 of Array['from'](this['_dataCollectors']))for(const [_0x2135bc,_0xe35473]of _0x42f6a3())_0xc56f08['set'](_0x2135bc,_0xe35473);return _0xc56f08;}}class st extends _0x4c92ab{['afterInit'](){const _0x568f14=this['editor'];if(!_0x568f14['plugins']['has']('RestrictedEditingModeEditing'))return;_0x568f14['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4c92ab{constructor(_0xacffee){super(_0xacffee),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x5cd0da=this['editor'],_0x174854=_0x5cd0da['commands']['get']('importWord'),_0x5d9c02=_0x5cd0da['plugins']['get'](it);_0x174854&&(_0x174854['on']('execute',(_0x45e1fa,[,_0x161f91])=>{_0x161f91['collaboration_features']={'comments':!0x0,'user_id':_0x5d9c02['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x174854,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0xf093ab,_0x244bf5){const {comment_threads:_0x3be3e4}=_0x244bf5;_0x3be3e4&&_0x3be3e4['forEach'](({thread_id:_0x4ac1c4,comments:_0x66bbe6,is_resolved:_0x21e71b})=>{const _0x7aaeb2=new Date(),_0x3b2414=_0x66bbe6['map'](({author:_0x34edc0,content:_0x18a3ca,created_at:_0x384d64})=>({'content':_0x18a3ca,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x7aaeb2,'attributes':{'@external':{'authorName':_0x34edc0,'createdAt':_0x384d64?new Date(_0x384d64):new Date(),'source':'importWord'}}})),_0x3e11a9=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3e11a9,'threadId':_0x4ac1c4,'comments':_0x3b2414,'resolvedAt':_0x21e71b?_0x7aaeb2:null});});}}class at extends _0x4c92ab{constructor(_0x262ae2){super(_0x262ae2),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x178282=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x178282,'contentInsertion',(_0x1121af,_0xe42057)=>this['_removeMarkersWithoutThreads'](_0xe42057['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x52446b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x52446b;const _0x4ec957=this['editor']['plugins']['get']('CommentsRepository');for(const _0x34b368 of _0x52446b['keys']()){const [_0x7c0054,_0x53dd85]=_0x34b368['split'](':');'comment'!=_0x7c0054||_0x4ec957['hasCommentThread'](_0x53dd85)||_0x52446b['delete'](_0x34b368);}return _0x52446b;}['_registerMarkerInClipboardPipeline'](){const _0x1dbbba=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x424412=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x424412&&_0x1dbbba['_registerMarkerToCopy']('comment',_0x424412);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x536ea8){switch(_0x536ea8){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x3a4da0){const _0x358326=_0x3a4da0['split'](':');return{'group':_0x358326[0x0],'id':_0x358326[0x1],'part':_0x358326[0x2]};}class ut extends _0x4c92ab{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xc92e55,_0x38105a)=>{if(!_0x38105a['options']['showCommentHighlights'])return null;if(_0x38105a['options']['ignoreResolvedComments']){const {id:_0x2fca15}=ft(_0xc92e55['markerName']),_0xf5b0cf=this['editor']['plugins']['get'](o);if(_0xf5b0cf['getCommentThread'](_0x2fca15)?.['isResolved']&&_0xc92e55['item'])return _0x38105a['consumable']['consume'](_0xc92e55['item'],'addMarker:'+_0xc92e55['markerName']),_0x38105a['consumable']['consume'](_0xc92e55['item'],'removeMarker:'+_0xc92e55['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1dd4f0=>{_0x1dd4f0['on']('addMarker:comment',(_0x1e5fc4,_0xf0cbf4,_0x208ec5)=>{if(!_0x208ec5['options']['showCommentHighlights'])return;const _0x4276d2=_0xf0cbf4['item'];if(!_0x4276d2)return;const _0x48ec29=_0x208ec5['mapper']['toViewElement'](_0x4276d2);this['editor']['model']['schema']['isObject'](_0x4276d2)&&_0x48ec29&&!_0x48ec29['getCustomProperty']('widget')&&_0x48ec29['is']('containerElement')&&_0x57745c(_0x48ec29,_0x208ec5['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3e2dfa,{writer:_0x1554b8,options:_0x4bdf1d})=>{if(!_0x4bdf1d['showCommentHighlights'])return null;const _0x56073b=_0x1554b8['createContainerElement']('div'),_0x3016bf=_0x1554b8['createEmptyElement']('hr');return _0x1554b8['addClass']('ck-horizontal-line',_0x56073b),_0x1554b8['insert'](_0x1554b8['createPositionAt'](_0x56073b,0x0),_0x3016bf),_0x56073b;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x49e53f,{writer:_0x5ada0e,options:_0x473ec1})=>{if(!_0x473ec1['showCommentHighlights'])return null;const _0x59fb81=_0x5ada0e['createContainerElement']('span'),_0x5a845c=_0x5ada0e['createEmptyElement']('img');return _0x5ada0e['addClass']('image-inline',_0x59fb81),_0x5ada0e['insert'](_0x5ada0e['createPositionAt'](_0x59fb81,0x0),_0x5a845c),_0x59fb81;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2ea308,{writer:_0x277a1c,options:_0x3e82a3})=>{if(_0x3e82a3['showCommentHighlights'])return _0x277a1c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x5c5419,_0xea143,_0x426cc3)=>{_0x426cc3['options']['showCommentHighlights']&&_0x5c5419['stop']();},{'priority':'high'});}}class r extends _0x4c92ab{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1944bd){super(_0x1944bd),this['set']('isThreadsLoadingPaused',!0x0),_0x1944bd['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x45df71,_0x3df45c,_0x4e3d6,_0x148c06)=>{const _0x561f4b=_0x1944bd['plugins']['get'](o),_0xcc9688=_0x4e3d6?ft(_0x4e3d6)['id']:null;_0x1944bd['model']['change'](()=>{if(_0xcc9688){const _0x277f06=this['getAllMarkersForId'](_0xcc9688);for(const _0x21c8bc of _0x277f06)_0x1944bd['editing']['reconvertMarker'](_0x21c8bc);}if(_0x148c06){const {id:_0x4be2c9}=ft(_0x148c06),_0x69548d=_0x561f4b['getCommentThread'](_0x4be2c9);if(_0x69548d&&_0x69548d['unlinkedAt'])return;if(_0x69548d&&!_0x69548d['isAttached'])return;const _0x3b2e90=this['getAllMarkersForId'](_0x4be2c9);for(const _0x189dca of _0x3b2e90)_0x1944bd['editing']['reconvertMarker'](_0x189dca);}}),_0xcc9688&&this['scrollToThreadMarker'](_0xcc9688);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x34568e=this['editor'],_0x270760=_0x34568e['plugins']['get'](o),_0x3d4784=_0x34568e['config']['get']('collaboration.channelId'),_0x27cbab=_0x270760['getCommentThreads']()['filter'](_0x3fbd4d=>_0x3fbd4d['channelId']!==_0x3d4784);_0x34568e['commands']['add']('addCommentThread',new ot(_0x34568e)),this['listenTo'](_0x34568e,'change:isReadOnly',(_0x325577,_0x13e586,_0x2c077f)=>{_0x270760['switchReadOnly'](_0x2c077f,_0x34568e['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x270760,dt('addCommentThread',_0x3d4784),(_0x175985,{threadId:_0x551721})=>{const _0x50160d=this['editor']['plugins']['get'](o)['getCommentThread'](_0x551721);_0x50160d?.['unlinkedAt']&&this['_attachArchivedThread'](_0x551721);}),this['listenTo'](_0x270760,dt('removeCommentThread',_0x3d4784),(_0x4344b2,{threadId:_0x2705b4})=>{_0x34568e['model']['enqueueChange']({'isUndoable':!0x1},_0x4b322e=>{const _0x4c1032=this['getAllMarkersForId'](_0x2705b4);for(const _0xc483ce of _0x4c1032)_0x4b322e['removeMarker'](_0xc483ce);});}),this['listenTo'](_0x270760,dt('resolveCommentThread',_0x3d4784),(_0x1aeb18,{threadId:_0xf0f225})=>{(this['_reconvertMarkers'](_0xf0f225),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0xf0f225)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x270760,dt('reopenCommentThread',_0x3d4784),(_0x2a9ab6,{threadId:_0x1c75ef})=>{this['_reconvertMarkers'](_0x1c75ef);},{'priority':'low'}),this['listenTo'](_0x270760,dt('addComment',_0x3d4784),(_0x118338,{threadId:_0x2d51d2,isFromAdapter:_0x356d51})=>{const _0x11da9e=this['getAllMarkersForId'](_0x2d51d2);if(_0x356d51||0x0==_0x11da9e['length']||!_0x270760['hasCommentThread'](_0x2d51d2))return;0x1===_0x270760['getCommentThread'](_0x2d51d2)['length']&&_0x34568e['model']['enqueueChange']({'isUndoable':!0x1},_0x24c24d=>{for(const _0x2ac204 of _0x11da9e)_0x24c24d['updateMarker'](_0x2ac204,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x27cbab);}['afterInit'](){!async function(_0x124af9){const _0x1cdac5=_0x5be7d9([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x4f7970=0x73460ab3,_0x17f311=0x734178db^_0x4f7970,_0x4a3958=window[_0x5be7d9([0x44,0x61,0x74,0x65])][_0x5be7d9([0x6e,0x6f,0x77])](),_0x256d1a=_0x124af9[_0x5be7d9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4a6e91=new window[(_0x5be7d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x338d85=>{_0x256d1a[_0x5be7d9([0x6f,0x6e,0x63,0x65])](_0x5be7d9([0x72,0x65,0x61,0x64,0x79]),_0x338d85);}),_0x182f8b={[_0x5be7d9([0x6b,0x74,0x79])]:_0x5be7d9([0x45,0x43]),[_0x5be7d9([0x75,0x73,0x65])]:_0x5be7d9([0x73,0x69,0x67]),[_0x5be7d9([0x63,0x72,0x76])]:_0x5be7d9([0x50,0x2d,0x32,0x35,0x36]),[_0x5be7d9([0x78])]:_0x5be7d9([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]),[_0x5be7d9([0x79])]:_0x5be7d9([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]),[_0x5be7d9([0x61,0x6c,0x67])]:_0x5be7d9([0x45,0x53,0x32,0x35,0x36])},_0x1ff2c4=_0x256d1a[_0x5be7d9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5be7d9([0x67,0x65,0x74])](_0x5be7d9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x256ac8(){let _0x1edd42,_0x495ce9=null,_0x50f520=null;try{if(_0x1ff2c4==_0x5be7d9([0x47,0x50,0x4c]))return _0x5be7d9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1edd42=_0x2cf342(),!_0x1edd42)return _0x5be7d9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1edd42[_0x5be7d9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x50f520=_0x903dc4(_0x1edd42[_0x5be7d9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1edd42[_0x5be7d9([0x6a,0x74,0x69])])),await _0x2ecace()?_0x4e35e5()?_0x4a8464()?_0x5be7d9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x261971()?(_0x1edd42[_0x5be7d9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5be7d9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x495ce9=_0x869633(_0x5be7d9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1edd42[_0x5be7d9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5be7d9([0x74,0x72,0x69,0x61,0x6c])&&(_0x495ce9=_0x869633(_0x5be7d9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x13aa21()):_0x5be7d9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5be7d9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5be7d9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5be7d9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4a8464(){const _0x294a13=[_0x5be7d9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5be7d9([0x74,0x72,0x69,0x61,0x6c])][_0x5be7d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1edd42[_0x5be7d9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4a3958/0x3e8:0xe10*_0x17f311;return _0x1edd42[_0x5be7d9([0x65,0x78,0x70])]<_0x294a13;}function _0x4e35e5(){const _0x4eddd2=_0x1edd42[_0x5be7d9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4eddd2)return!0x1;if(_0x4eddd2[_0x5be7d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5be7d9([0x2a])))return!0x0;if(_0x4eddd2[_0x5be7d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5be7d9([0x43,0x4d,0x54])))return!0x0;if(_0x4eddd2[_0x5be7d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5be7d9([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x3bf711())return!0x0;if(_0x4eddd2[_0x5be7d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5be7d9([0x52,0x43,0x4d,0x54]))){if(_0x4f38aa())return!0x0;if(_0x43439a()||_0x111737())return!0x0;}return!0x1;}function _0x261971(){const _0x91379f=_0x1edd42[_0x5be7d9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x91379f||0x0==_0x91379f[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x11b7cd}=new URL(window[_0x5be7d9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x91379f[_0x5be7d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11b7cd))return!0x0;const _0x1a31f4=_0x11b7cd[_0x5be7d9([0x73,0x70,0x6c,0x69,0x74])](_0x5be7d9([0x2e]));return _0x91379f[_0x5be7d9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d8ad8=>_0x2d8ad8[_0x5be7d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5be7d9([0x2a])))[_0x5be7d9([0x6d,0x61,0x70])](_0x364ffa=>_0x364ffa[_0x5be7d9([0x73,0x70,0x6c,0x69,0x74])](_0x5be7d9([0x2e])))[_0x5be7d9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x39c56b=>_0x39c56b[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1a31f4[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5be7d9([0x6d,0x61,0x70])](_0x22b419=>Array(_0x1a31f4[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x22b419[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5be7d9([0x66,0x69,0x6c,0x6c])](_0x22b419[0x0]===_0x5be7d9([0x2a])?_0x5be7d9([0x2a]):'')[_0x5be7d9([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x22b419))[_0x5be7d9([0x73,0x6f,0x6d,0x65])](_0x55ae28=>_0x1a31f4[_0x5be7d9([0x65,0x76,0x65,0x72,0x79])]((_0x207dcc,_0x4437d7)=>_0x55ae28[_0x4437d7]===_0x207dcc||_0x55ae28[_0x4437d7]===_0x5be7d9([0x2a])));}function _0x13aa21(){return _0x495ce9&&_0x50f520?new window[(_0x5be7d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x13b6dc,_0x30fee3)=>{_0x495ce9[_0x5be7d9([0x74,0x68,0x65,0x6e])](_0x13b6dc,_0x30fee3),_0x50f520[_0x5be7d9([0x74,0x68,0x65,0x6e])](_0x56fb05=>{_0x56fb05!=_0x5be7d9([0x56,0x61,0x6c,0x69,0x64])&&_0x13b6dc(_0x56fb05);},_0x30fee3);}):_0x495ce9||_0x50f520||_0x5be7d9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x903dc4(_0x416cef,_0x53b4b0){return new window[(_0x5be7d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xed20e=>{if(_0x11f410())return _0xed20e(_0x5be7d9([0x56,0x61,0x6c,0x69,0x64]));_0x2150d6(),_0x256d1a[_0x5be7d9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5be7d9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1d69a8=!0x1;const _0x1853df=_0x1856ab();function _0xe1f71e(_0x4f82d2){return!!_0x4f82d2&&(typeof _0x4f82d2===_0x5be7d9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4f82d2===_0x5be7d9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4f82d2[_0x5be7d9([0x74,0x68,0x65,0x6e])]===_0x5be7d9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4f82d2[_0x5be7d9([0x63,0x61,0x74,0x63,0x68])]===_0x5be7d9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xd7e2c1(_0x433ad9){_0x49a4c6(_0x433ad9)[_0x5be7d9([0x74,0x68,0x65,0x6e])](_0x5d98d4=>{if(!_0x5d98d4||_0x5d98d4[_0x5be7d9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5be7d9([0x6f,0x6b]))return _0x5be7d9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x475953(_0x20297c(_0x1853df+_0x53b4b0))!=_0x5d98d4[_0x5be7d9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5be7d9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5be7d9([0x56,0x61,0x6c,0x69,0x64]);})[_0x5be7d9([0x74,0x68,0x65,0x6e])](_0x49ca46=>(_0x184d30(),_0x49ca46),()=>{const _0x248108=_0x377604();return null==_0x248108?(_0x184d30(),_0x5be7d9([0x56,0x61,0x6c,0x69,0x64])):_0x5be7d9(_0x4a3958-_0x248108>(0x574a8eb3^_0x4f7970)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5be7d9([0x74,0x68,0x65,0x6e])](_0xed20e)[_0x5be7d9([0x63,0x61,0x74,0x63,0x68])](()=>{_0xed20e(_0x5be7d9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x48ad3e=0x7370e433^_0x4f7970;function _0x184d30(){const _0x4817b6=_0x5be7d9([0x6c,0x6c,0x63,0x74,0x2d])+_0x475953(_0x20297c(_0x416cef)),_0x35be00=_0x7a9f52(_0x475953(window[_0x5be7d9([0x4d,0x61,0x74,0x68])][_0x5be7d9([0x63,0x65,0x69,0x6c])](_0x4a3958/_0x48ad3e)));window[_0x5be7d9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5be7d9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4817b6,_0x35be00);}function _0x377604(){const _0x18440d=_0x5be7d9([0x6c,0x6c,0x63,0x74,0x2d])+_0x475953(_0x20297c(_0x416cef)),_0x2f00e6=window[_0x5be7d9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5be7d9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x18440d);return _0x2f00e6?window[_0x5be7d9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x7a9f52(_0x2f00e6),0x10)*_0x48ad3e:null;}function _0x49a4c6(_0x500263){return new window[(_0x5be7d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x408faa,_0x4931e2)=>{_0x500263[_0x5be7d9([0x74,0x68,0x65,0x6e])](_0x408faa,_0x4931e2),window[_0x5be7d9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4931e2,0x7347de73^_0x4f7970);});}}_0x256d1a[_0x5be7d9([0x6f,0x6e])](_0x5be7d9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5ef6ec,_0x2aa2a8)=>{if(_0x2aa2a8[0x0]!=_0x416cef)return _0xed20e(_0x5be7d9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2aa2a8[0x1]={..._0x2aa2a8[0x1],[_0x5be7d9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1853df};},{[_0x5be7d9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5be7d9([0x68,0x69,0x67,0x68])}),_0x256d1a[_0x5be7d9([0x6f,0x6e])](_0x5be7d9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x51f9d5=>{_0xe1f71e(_0x51f9d5[_0x5be7d9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1d69a8=!0x0,_0xd7e2c1(_0x51f9d5[_0x5be7d9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5be7d9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5be7d9([0x6c,0x6f,0x77])}),_0x4a6e91[_0x5be7d9([0x74,0x68,0x65,0x6e])](()=>{_0x1d69a8||_0xed20e(_0x5be7d9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x11f410(){return _0x256d1a[_0x5be7d9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5be7d9([0x76,0x69,0x65,0x77])][_0x5be7d9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5be7d9([0x61,0x75,0x74,0x6f]);}function _0x2150d6(){_0x256d1a[_0x5be7d9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5be7d9([0x76,0x69,0x65,0x77])][_0x5be7d9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5be7d9([0x61,0x75,0x74,0x6f]);}}function _0x869633(_0x3f4405){const _0x1598df=[new window[(_0x5be7d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x39cf2c=>setTimeout(_0x39cf2c,0x734f347f^_0x4f7970)),_0x4a6e91[_0x5be7d9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5be7d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x86eab0=>{let _0x4dadfd=0x0;_0x256d1a[_0x5be7d9([0x6d,0x6f,0x64,0x65,0x6c])][_0x5be7d9([0x6f,0x6e])](_0x5be7d9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x59f1cb,_0x225719)=>{_0x225719[0x0][_0x5be7d9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4dadfd++,_0x4dadfd==(0x73460b4b^_0x4f7970)&&(_0x86eab0(),_0x59f1cb[_0x5be7d9([0x6f,0x66,0x66])]());});}))];return window[_0x5be7d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5be7d9([0x72,0x61,0x63,0x65])](_0x1598df)[_0x5be7d9([0x74,0x68,0x65,0x6e])](()=>_0x3f4405);}async function _0x4c7d7a(){await _0x4a6e91,_0x256d1a[_0x5be7d9([0x6d,0x6f,0x64,0x65,0x6c])][_0x5be7d9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4ca911,_0x256d1a[_0x5be7d9([0x6d,0x6f,0x64,0x65,0x6c])][_0x5be7d9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4ca911,_0x256d1a[_0x5be7d9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5be7d9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3bf711(){return window[_0x5be7d9([0x67,0x6c,0x6f,0x62])]&&window[_0x5be7d9([0x67,0x6c,0x6f,0x62])][_0x5be7d9([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x4f38aa(){return _0x51483a(_0x5be7d9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1217be(_0x5be7d9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5be7d9([0x73,0x74,0x61,0x74,0x65])]==_0x5be7d9([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x43439a(){return _0x51483a(_0x5be7d9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x111737(){return _0x51483a(_0x5be7d9([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x519ee8(_0x4560f2){const _0x22e572=_0x52703b();_0x256d1a[_0x22e572]=_0x5be7d9([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4560f2,_0x4560f2!=_0x5be7d9([0x56,0x61,0x6c,0x69,0x64])&&_0x4c7d7a();}function _0x52703b(){const _0x363d43=window[_0x5be7d9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5be7d9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5be7d9([0x6e,0x6f,0x77])]())[_0x5be7d9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5be7d9([0x2e]),'');let _0x5d9df2=_0x5be7d9([0x4b]);for(let _0x31ddab=0x0;_0x31ddab<_0x363d43[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x31ddab+=0x2){let _0x38116b=window[_0x5be7d9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x363d43[_0x5be7d9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x31ddab,_0x31ddab+0x2));_0x38116b>=_0x1cdac5[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x38116b-=_0x1cdac5[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5d9df2+=_0x1cdac5[_0x38116b];}return _0x5d9df2;}function _0x2cf342(){const _0x127268=_0x1ff2c4[_0x5be7d9([0x73,0x70,0x6c,0x69,0x74])](_0x5be7d9([0x2e]));if(0x3!=_0x127268[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2fb681(_0x127268[0x1]);function _0x2fb681(_0x350ea6){const _0x3b6edc=_0xb1a8(_0x350ea6);return _0x3b6edc&&_0x3964c5()?_0x3b6edc:null;function _0x3964c5(){const _0x32d865=_0x3b6edc[_0x5be7d9([0x6a,0x74,0x69])],_0x20ac41=window[_0x5be7d9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x32d865[_0x5be7d9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x32d865[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x31b9fe={..._0x3b6edc,[_0x5be7d9([0x6a,0x74,0x69])]:_0x32d865[_0x5be7d9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x32d865[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x31b9fe[_0x5be7d9([0x76,0x63])],_0x20297c(_0x31b9fe)==_0x20ac41;}}}async function _0x2ecace(){let _0x13f120=!0x0;try{const _0x32d940=_0x1ff2c4[_0x5be7d9([0x73,0x70,0x6c,0x69,0x74])](_0x5be7d9([0x2e])),[_0x462bc2,_0x24d263,_0x997b81]=_0x32d940;return _0xc78b5(_0x462bc2),await _0x2e2633(_0x462bc2,_0x24d263,_0x997b81),_0x13f120;}catch{return!0x1;}function _0xc78b5(_0x224ea1){const _0x39d550=_0xb1a8(_0x224ea1);_0x39d550&&_0x39d550[_0x5be7d9([0x61,0x6c,0x67])]==_0x5be7d9([0x45,0x53,0x32,0x35,0x36])||(_0x13f120=!0x1);}async function _0x2e2633(_0x5bb739,_0x44bde6,_0x30481d){const _0x36d0fd=window[_0x5be7d9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5be7d9([0x66,0x72,0x6f,0x6d])](_0x14c713(_0x30481d),_0x4a1508=>_0x4a1508[_0x5be7d9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x409754=new window[(_0x5be7d9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5be7d9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5bb739+_0x5be7d9([0x2e])+_0x44bde6),_0x49125a=window[_0x5be7d9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5be7d9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x49125a)return;const _0x4216b6=await _0x49125a[_0x5be7d9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5be7d9([0x6a,0x77,0x6b]),_0x182f8b,{[_0x5be7d9([0x6e,0x61,0x6d,0x65])]:_0x5be7d9([0x45,0x43,0x44,0x53,0x41]),[_0x5be7d9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5be7d9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5be7d9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x49125a[_0x5be7d9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5be7d9([0x6e,0x61,0x6d,0x65])]:_0x5be7d9([0x45,0x43,0x44,0x53,0x41]),[_0x5be7d9([0x68,0x61,0x73,0x68])]:{[_0x5be7d9([0x6e,0x61,0x6d,0x65])]:_0x5be7d9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4216b6,_0x36d0fd,_0x409754)||(_0x13f120=!0x1);}}function _0xb1a8(_0x8049fd){return _0x8049fd[_0x5be7d9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5be7d9([0x65,0x79]))?JSON[_0x5be7d9([0x70,0x61,0x72,0x73,0x65])](_0x14c713(_0x8049fd)):null;}function _0x14c713(_0x17d1e){return window[_0x5be7d9([0x61,0x74,0x6f,0x62])](_0x17d1e[_0x5be7d9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5be7d9([0x2b]))[_0x5be7d9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5be7d9([0x2f])));}function _0x20297c(_0x3a8a39){let _0x3ebba5=0x1505;function _0x4e4c5c(_0x5e5af8){for(let _0x493ad7=0x0;_0x493ad7<_0x5e5af8[_0x5be7d9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x493ad7++){const _0x553162=_0x5e5af8[_0x5be7d9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x493ad7);_0x3ebba5=(_0x3ebba5<<0x5)+_0x3ebba5+_0x553162,_0x3ebba5&=_0x3ebba5;}}function _0xc9450b(_0x35f661){Array[_0x5be7d9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x35f661)?_0x35f661[_0x5be7d9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xc9450b):_0x35f661&&typeof _0x35f661==_0x5be7d9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5be7d9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x35f661)[_0x5be7d9([0x73,0x6f,0x72,0x74])]()[_0x5be7d9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x47cfb1,_0x1c34fb])=>{_0x4e4c5c(_0x47cfb1),_0xc9450b(_0x1c34fb);}):_0x4e4c5c(window[_0x5be7d9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x35f661));}return _0xc9450b(_0x3a8a39),_0x3ebba5>>>0x0;}function _0x475953(_0xdf56fb){return _0xdf56fb[_0x5be7d9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5be7d9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5be7d9([0x30]));}function _0x7a9f52(_0x33220b){return _0x33220b[_0x5be7d9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5be7d9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5be7d9([0x6a,0x6f,0x69,0x6e])]('');}function _0x51483a(_0x29b524){return _0x256d1a[_0x5be7d9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5be7d9([0x68,0x61,0x73])](_0x29b524);}function _0x1217be(_0x5c395e){return _0x256d1a[_0x5be7d9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5be7d9([0x67,0x65,0x74])](_0x5c395e);}function _0x4ca911(){}function _0x5be7d9(_0x11cd80){return _0x11cd80['map'](_0x2c749c=>String['fromCharCode'](_0x2c749c))['join']('');}_0x519ee8(await _0x256ac8());}(this);}['destroy'](){const _0x34457e=this['editor']['plugins']['get'](o),_0x117a3f=this['editor']['config']['get']('collaboration.channelId');for(const _0x2fd651 of _0x34457e['getCommentThreads']({'channelId':_0x117a3f}))_0x34457e['_detachCommentThread'](_0x2fd651['id']),_0x34457e['_threads']['delete'](_0x2fd651['id']);super['destroy']();}['hasMarkerForId'](_0x28a23b){return this['getAllMarkersForId'](_0x28a23b)['length']>0x0;}['getAllMarkersForId'](_0x5c01f2){const _0x2ddb1b=[];for(const _0x24aa39 of this['editor']['model']['markers'])_0x24aa39['name']['startsWith']('comment:'+_0x5c01f2)&&_0x2ddb1b['push'](_0x24aa39);return _0x2ddb1b;}['scrollToThreadMarker'](_0xd32c86){setTimeout(()=>{const _0x4f7a3d=this['_getTargetForId'](_0xd32c86);if(!_0x4f7a3d)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0xd32c86&&nt({'target':_0x4f7a3d[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x36bd82){this['editor']['model']['change'](()=>{for(const _0x45911a of this['getAllMarkersForId'](_0x36bd82))this['editor']['editing']['reconvertMarker'](_0x45911a);});}['_attachArchivedThread'](_0x352537){const _0x375cde=this['editor']['plugins']['get'](o),_0x5be0d8=this['editor']['plugins']['get'](b),_0x570b85=_0x375cde['getCommentThread'](_0x352537);if(!_0x570b85['isAttached']){const _0x7691b0=_0x570b85['attachTo'](()=>this['_getTargetForId'](_0x570b85['id']));_0x5be0d8['registerAnnotation'](_0x7691b0),_0x570b85['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x39854c=this['editor'],_0x61efc5=_0x39854c['plugins']['get'](it);_0x39854c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xa30db7,_0x820898)=>{const {id:_0x8f825f}=ft(_0xa30db7['markerName']),_0x51012f=_0x39854c['plugins']['get'](o)['getCommentThread'](_0x8f825f),_0x3925be=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x8f825f;let _0x12bdec;if(_0x51012f&&_0x51012f['isResolved']&&!_0x3925be&&_0xa30db7['item'])return _0x820898['consumable']['consume'](_0xa30db7['item'],'addMarker:'+_0xa30db7['markerName']),_0x820898['consumable']['consume'](_0xa30db7['item'],'removeMarker:'+_0xa30db7['markerName']),null;const _0x526689=['ck-comment-marker'];return _0x3925be&&_0x526689['push']('ck-comment-marker--active'),_0x12bdec=_0x51012f?.['length']?_0x51012f['comments']['first']['author']['id']:_0x61efc5['me']['id'],{'classes':_0x526689,'attributes':{'data-comment':_0x8f825f,'data-author-id':_0x12bdec}};}}),_0x39854c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x158fe7,{options:_0x219c4f})=>{if(_0x219c4f['showCommentHighlights'])return null;const _0x9f301=_0x39854c['plugins']['get'](o),_0x148d45=_0x39854c['model']['markers']['get'](_0x158fe7),{id:_0x5e6bd0,part:_0x498d56}=ft(_0x158fe7);return _0x148d45&&!_0x148d45['affectsData']||_0x219c4f['ignoreResolvedComments']&&_0x9f301['getCommentThread'](_0x5e6bd0)?.['isResolved']?null:{'group':'comment','name':_0x498d56?_0x5e6bd0+':'+_0x498d56:_0x5e6bd0};}}),_0x39854c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x50407e,{writer:_0x44eb3e})=>_0x44eb3e['createElement']('$marker',{'data-name':'comment:'+_0x50407e['getAttribute']('id')})}),_0x39854c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0xd321e3=this['editor'],_0x5d77dd=_0xd321e3['plugins']['get'](o),_0x1f1d28=new Set(),_0x54d406=new Set();_0xd321e3['model']['document']['registerPostFixer'](_0x2e70c2=>{let _0x2b27ef=!0x1;for(const {name:_0x51427e,data:_0x4fb6db}of _0xd321e3['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1f25df,id:_0x2bdfea}=ft(_0x51427e);let _0x5daced=_0x4fb6db['newRange'];if('comment'!==_0x1f25df||!_0x5daced)continue;const _0x3eca74='$graveyard'===_0x5daced['root']['rootName'];_0x3eca74||(_0x5daced=ht(_0x5daced,_0xd321e3['model']),!_0x5daced||_0x5daced['isCollapsed']||!_0x4fb6db['newRange']||_0x5daced['isEqual'](_0x4fb6db['newRange']))?_0xd321e3['model']['hasContent'](_0x5daced)&&!_0x3eca74?this['isThreadsLoadingPaused']?_0x1f1d28['add'](_0x51427e):this['_handleThreadMarker'](_0x51427e,_0x2bdfea):(_0x54d406['add'](_0x51427e),_0x1f1d28['delete'](_0x51427e),_0x2e70c2['removeMarker'](_0x51427e),_0x2b27ef=!0x0):(_0x2e70c2['updateMarker'](_0x51427e,{'range':_0x5daced}),_0x2b27ef=!0x0);}return _0x2b27ef;}),this['on']('change:isThreadsLoadingPaused',(_0x4620fb,_0x173a7b,_0x54fb40)=>{if(!_0x54fb40&&_0x1f1d28['size'])for(const _0x2d1c1f of _0x1f1d28){const {id:_0x38c755}=ft(_0x2d1c1f);_0x1f1d28['delete'](_0x2d1c1f),_0xd321e3['model']['markers']['get'](_0x2d1c1f)&&this['_handleThreadMarker'](_0x2d1c1f,_0x38c755);}}),this['listenTo'](_0xd321e3['model']['document'],'change',()=>{for(const {name:_0x3397c8,data:{newRange:_0x1426a5}}of _0xd321e3['model']['document']['differ']['getChangedMarkers']()){const {group:_0x988aa3,id:_0x2c8e53}=ft(_0x3397c8);if('comment'!==_0x988aa3)continue;const _0x1dd29e=_0x5d77dd['getCommentThread'](_0x2c8e53),_0x2eb93f=this['hasMarkerForId'](_0x2c8e53);_0x1dd29e&&(!_0x1dd29e['_hasTargetInContent']&&_0x1426a5&&_0xd321e3['editing']['view']['once']('render',()=>{const _0x44193c=_0xd321e3['plugins']['get'](y),_0x1828dc=_0x5d77dd['_threadToController']['get'](_0x1dd29e)['view'];_0x44193c['getByInnerView'](_0x1828dc)['refreshVisibility']();},{'priority':'low'}),_0x1dd29e['_hasTargetInContent']=_0x2eb93f||!!_0x1426a5),_0x1426a5||(_0x54d406['add'](_0x3397c8),_0x1f1d28['delete'](_0x3397c8));}for(const _0x4a83f2 of _0x54d406){const {id:_0x1556a3}=ft(_0x4a83f2),_0x1eec97=_0x5d77dd['getCommentThread'](_0x1556a3);if(_0x1f1d28['delete'](_0x4a83f2),!_0x1eec97)continue;const _0x294936=this['hasMarkerForId'](_0x1556a3);_0x294936||_0x1eec97['isSubmitted']?_0x294936||_0x1eec97['unlinkedAt']||_0x1eec97['setUnlinkedAt'](new Date()):_0x1eec97['remove']();}_0x54d406['clear']();});}['_handleInitialThreads'](_0x53b604){_0x53b604['forEach'](_0x170d52=>{_0x170d52['unlinkedAt']&&this['_attachArchivedThread'](_0x170d52['id']);});}['_getTargetForId'](_0x29020d){const _0x23b9ed=this['editor'],_0x13a4ec=this['getAllMarkersForId'](_0x29020d);return et(_0x23b9ed['editing'],_0x13a4ec);}['_getTextContext'](_0x136e53){const _0x39e928=this['getAllMarkersForId'](_0x136e53);let _0x1f7b0b='',_0xbb29be=!0x1;for(const _0x88b3d6 of _0x39e928){const _0x463ecb=_0x88b3d6['getRange']();for(const _0x1104b8 of Array['from'](_0x463ecb['getItems']()))_0x1104b8['is']('$textProxy')?(_0x1f7b0b&&_0xbb29be&&(_0x1f7b0b+='\x20',_0xbb29be=!0x1),_0x1f7b0b+=_0x1104b8['data']):_0xbb29be=!0x0;_0xbb29be=!0x0;}return _0x1f7b0b['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x32534f,_0x2493ce){const _0x249349=this['editor'],_0x2ca683=_0x249349['plugins']['get'](o);let _0x1799e0=_0x2ca683['getCommentThread'](_0x2493ce);const _0x156ee6=_0x249349['config']['get']('collaboration.channelId'),_0xfd9569=_0x249349['plugins']['get'](b);if(_0x1799e0&&(_0x1799e0['unlinkedAt']&&_0x1799e0['setUnlinkedAt'](null),_0x1799e0['isAttached']))return _0x1799e0;return!this['getAllMarkersForId'](_0x2493ce)[0x0]['managedUsingOperations']?_0x249349['editing']['view']['once']('render',()=>{if(_0x2ca683['getCommentThread'](_0x2493ce))return;const _0x27dde3=_0x249349['plugins']['get'](y);_0x1799e0=_0x2ca683['openNewCommentThread']({'channelId':_0x156ee6,'threadId':_0x2493ce,'target':()=>this['_getTargetForId'](_0x2493ce),'context':{'type':'text','value':this['_getTextContext'](_0x2493ce)}});const _0x374437=_0x2ca683['_threadToController']['get'](_0x1799e0)['view'],_0x34307b=_0x27dde3['getByInnerView'](_0x374437);_0x34307b&&_0xfd9569['registerAnnotation'](_0x34307b);},{'priority':'low'}):_0x2ca683['fetchCommentThread']({'channelId':_0x156ee6,'threadId':_0x2493ce})['then'](_0x56e4a3=>{if('destroyed'!==_0x249349['state']){if(_0x1799e0=_0x56e4a3,_0x1799e0&&!_0x1799e0['isAttached']){const _0x24e056=_0x1799e0['attachTo'](()=>this['_getTargetForId'](_0x2493ce));_0xfd9569['registerAnnotation'](_0x24e056),_0x1799e0['isResolved']&&this['_reconvertMarkers'](_0x2493ce);}else{if(!_0x1799e0){const _0x6ec672=this['getAllMarkersForId'](_0x2493ce);_0x249349['model']['change'](_0x56f65a=>{for(const _0x4c2468 of _0x6ec672)_0x56f65a['removeMarker'](_0x4c2468);});}}}}),_0x1799e0;}['_handleThreadMarker'](_0x3c90ba,_0x51bd66){const _0x4305ec=this['_attachMarkerToThread'](_0x3c90ba,_0x51bd66);_0x4305ec&&!_0x4305ec['context']&&_0x4305ec['setContext']({'type':'text','value':this['_getTextContext'](_0x51bd66)});}['_initAriaMarkerChangeAnnouncements'](){const _0x2b0d52=this['editor'];rt(_0x2b0d52['model'],({left:_0x4d98a1,entered:_0x4ca72f})=>{for(const _0x87064b of _0x4d98a1)if(mt(_0x87064b)){_0x2b0d52['ui']['ariaLiveAnnouncer']['announce'](N(_0x2b0d52['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x52bceb of _0x4ca72f)if(mt(_0x52bceb)){_0x2b0d52['ui']['ariaLiveAnnouncer']['announce'](N(_0x2b0d52['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x489e01)));break;}});}}function dt(_0x538ea3,_0xc5859){return _0xc5859?_0x538ea3+':'+_0xc5859:_0x538ea3;}function ht(_0x18e8af,_0x331915){const _0x2c79f9=_0x331915['schema'],_0x3fa3ce=_0x331915['createRange'](_0x18e8af['start']);for(const _0x3cdd1e of _0x18e8af['getWalker']()){const {type:_0x38b10a,item:_0x2b8ffa,nextPosition:_0x14dde0}=_0x3cdd1e;if('text'===_0x38b10a||_0x2c79f9['isObject'](_0x2b8ffa)){const _0x3c2aa4=_0x331915['createPositionBefore'](_0x2b8ffa);_0x3fa3ce['isCollapsed']&&(_0x3fa3ce['start']=_0x3c2aa4),_0x3fa3ce['end']=_0x14dde0;}}return _0x3fa3ce;}function mt(_0x30cbf6){return'comment'===ft(_0x30cbf6['name'])['group'];}class s extends _0x4c92ab{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x35e696=this['editor'],_0x18314a=_0x35e696['plugins']['get'](o),_0x1febd9=_0x35e696['plugins']['get'](r),_0x203bb6=_0x35e696['plugins']['get'](y),_0x445d0f=_0x35e696['plugins']['get'](b);_0x35e696['ui']['componentFactory']['add']('comment',()=>{const _0x3c48df=this['_createUIButton'](_0x30c4c4);return _0x3c48df['tooltip']=!0x0,_0x3c48df;}),_0x35e696['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0xb1b43c)),_0x445d0f['addSourceCollector'](()=>{const _0x1f2bd1=[];for(const [_0x54e1c6,_0x1a0c50]of _0x18314a['_threadToController']){const _0x496fdc=_0x1febd9['getAllMarkersForId'](_0x54e1c6['id']),_0x3d4682=_0x496fdc['map'](_0x3ffefd=>_0x3ffefd['getRange']());_0x496fdc['length']>0x0&&_0x1f2bd1['push']([_0x1a0c50['view'],_0x3d4682]);}return _0x1f2bd1;}),this['listenTo'](_0x203bb6,'change:activeAnnotations',(_0xc5430,_0x2f16db,_0x26b0f2)=>{const _0x1e67e5=Array['from'](_0x26b0f2)['map'](_0x458857=>_0x458857['innerView'])['find'](_0x1122bc=>_0x18314a['_viewToController']['has'](_0x1122bc));if(!_0x1e67e5)return void(_0x1febd9['activeMarker']=null);const _0xbc478a=_0x18314a['_viewToController']['get'](_0x1e67e5)['model']['id'],_0x5dcdfa='comment:'+_0xbc478a;_0xbc478a&&_0x1febd9['hasMarkerForId'](_0xbc478a)?_0x1febd9['activeMarker']=_0x5dcdfa:_0x1febd9['activeMarker']&&(_0x1febd9['activeMarker']=null);}),this['listenTo'](_0x18314a,'removeCommentThread',(_0x2fd6b1,{threadId:_0x371aae,isFromAdapter:_0x285a63})=>{!_0x285a63&&_0x35e696['ui']['focusTracker']['isFocused']&&_0x1febd9['hasMarkerForId'](_0x371aae)&&_0x35e696['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x18314a,'addComment',(_0x42f7d0,{threadId:_0x7602fa,isFromAdapter:_0x58cd33})=>{if(_0x58cd33||!_0x1febd9['hasMarkerForId'](_0x7602fa)||!_0x18314a['hasCommentThread'](_0x7602fa))return;0x1===_0x18314a['getCommentThread'](_0x7602fa)['length']&&(_0x35e696['editing']['view']['focus'](),_0x42f7d0['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x25d310=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2baa80;for(const _0xa73360 in _0x25d310){const _0x3a38ce=_0xa73360,_0x2d1ebc=_0x25d310[_0x3a38ce];if('commentsLicenseKeyValid'==_0x2d1ebc||'commentsLicenseKeyInvalid'==_0x2d1ebc||'commentsLicenseKeyExpired'==_0x2d1ebc||'commentsLicenseKeyDomainLimit'==_0x2d1ebc||'commentsLicenseKeyNotAllowed'==_0x2d1ebc||'commentsLicenseKeyEvaluationLimit'==_0x2d1ebc||'commentsLicenseKeyTrialLimit'==_0x2d1ebc||'commentsLicenseKeyUsageLimit'==_0x2d1ebc){delete _0x25d310[_0x3a38ce],_0x2baa80=_0x2d1ebc,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2baa80&&_0x25d310['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2baa80&&_0x25d310['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2baa80&&_0x25d310['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2baa80&&_0x25d310['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2baa80&&_0x25d310['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x2baa80&&_0x25d310['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x2baa80&&_0x25d310['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3be5fd){const _0x157cc0=this['editor'],_0x59cad2=new _0x3be5fd(_0x157cc0['locale']),_0x565e5e=_0x157cc0['commands']['get']('addCommentThread');return _0x59cad2['set']({'label':N(_0x157cc0['locale'],'Comment'),'icon':_0x11cf91}),_0x59cad2['bind']('isEnabled')['to'](_0x565e5e,'hasContent'),this['listenTo'](_0x59cad2,'execute',()=>{_0x565e5e['execute']();}),_0x59cad2;}}class i extends _0x4c92ab{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x4cca90){super(_0x4cca90),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x9b73a5,_0x508d85,_0x4d3d67)=>{_0x4d3d67?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4ea57b,_0x456446]of this['editor']['commands'])_0x456446['affectsData']&&'addCommentThread'!==_0x4ea57b&&_0x456446['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0xa3f44=this['editor']['editing']['view']['document'];this['listenTo'](_0xa3f44,'cut',_0x2ea79b=>_0x2ea79b['stop'](),{'priority':'highest'}),this['listenTo'](_0xa3f44,'clipboardInput',_0x55d602=>_0x55d602['stop'](),{'priority':'highest'}),this['listenTo'](_0xa3f44,'delete',_0x21b8de=>_0x21b8de['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3977ff,_0x4aabaf]of this['editor']['commands'])_0x4aabaf['affectsData']&&'addCommentThread'!==_0x3977ff&&_0x4aabaf['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x277ff3{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b5e9f){super(_0x1b5e9f),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2066cc=this['context']['plugins']['get'](y);this['listenTo'](_0x2066cc,'_activateAnnotation',(_0x18f392,_0xd4fa54)=>{for(const _0x3bcea5 of this['activeUIs']){const _0x15b64a=this['_uis']['get'](_0x3bcea5);(0x0,this['uisData']['get'](_0x3bcea5)['filter'])(_0xd4fa54)&&_0x15b64a['setActiveAnnotation'](_0xd4fa54);}}),this['listenTo'](_0x2066cc,'_deactivateAllAnnotations',()=>{for(const _0x4033f3 of this['activeUIs']){this['_uis']['get'](_0x4033f3)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2066cc['_visibleAnnotations'],'add',(_0x1c4abf,_0x1014ea)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1014ea);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1e2202){return this['activeUIs']['has'](_0x1e2202);}['activate'](_0x437d6d,_0x11db63=this['defaultFilter']){const _0x16ae9e=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x437d6d))throw new _0x520596('annotationsuis-missing-ui',this,{'uiName':_0x437d6d});this['isActive'](_0x437d6d)&&this['deactivate'](_0x437d6d),this['activeUIs']['add'](_0x437d6d);const _0x3f7699=new S();v({'source':_0x16ae9e['_visibleAnnotations'],'target':_0x3f7699,'filter':_0x11db63}),this['uisData']['set'](_0x437d6d,{'collection':_0x3f7699,'filter':_0x11db63});const _0x3982b4=this['_uis']['get'](_0x437d6d);_0x3982b4['attach'](_0x3f7699),this['listenTo'](_0x3982b4,'change:activeAnnotation',(_0x1b25bc,_0x197181,_0x4e3461,_0x4b73b5)=>{_0x4b73b5&&_0x16ae9e['_removeActiveAnnotation'](_0x4b73b5),_0x4e3461&&_0x16ae9e['_addActiveAnnotation'](_0x4e3461);});}['deactivate'](_0x23ee4b){if(this['activeUIs']['delete'](_0x23ee4b),!this['_uis']['has'](_0x23ee4b))throw new _0x520596('annotationsuis-missing-ui',this,{'uiName':_0x23ee4b});const _0x5b923c=this['_uis']['get'](_0x23ee4b);_0x5b923c['detach'](),this['stopListening'](_0x5b923c),this['uisData']['get'](_0x23ee4b)['collection']['destroy'](),this['uisData']['delete'](_0x23ee4b);}['switchTo'](_0x13e1bd){if(!this['_uis']['has'](_0x13e1bd))throw new _0x520596('annotationsuis-missing-ui',this,{'uiName':_0x13e1bd});const _0x204392=this['context']['plugins']['get'](y),_0x1aa3b1=Array['from'](_0x204392['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x13e1bd);const _0x10e615=this['_uis']['get'](_0x13e1bd);_0x10e615['setActiveAnnotation'](_0x1aa3b1),_0x10e615['_setSelectedAnnotations']&&_0x1aa3b1&&_0x10e615['_setSelectedAnnotations']([_0x1aa3b1]);}['deactivateAll'](){for(const _0x2b653b of this['activeUIs'])this['deactivate'](_0x2b653b);}['register'](_0x233b99,_0x42a26a){if(this['_uis']['has'](_0x233b99))throw new _0x520596('annotationsuis-register-already-registered');if('function'!=typeof _0x42a26a['attach']||'function'!=typeof _0x42a26a['detach']||'function'!=typeof _0x42a26a['setActiveAnnotation'])throw new _0x520596('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x233b99,_0x42a26a);}['refilterAnnotations'](){const _0x53eb91=this['context']['plugins']['get'](y)['collection'],_0x56d134=new Map(),_0x435aa8=Array['from'](this['activeUIs']);for(const _0xa372d7 of this['activeUIs']){const _0x292561=this['uisData']['get'](_0xa372d7)['collection'];for(const _0x162281 of _0x292561)_0x56d134['set'](_0x162281,_0xa372d7);}for(const _0xd02b04 of _0x53eb91){const _0x346597=_0x56d134['get'](_0xd02b04);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd02b04);const _0x163bff=_0x435aa8['find'](_0x4685cc=>this['uisData']['get'](_0x4685cc)['filter'](_0xd02b04));_0x346597!==_0x163bff&&(_0x346597&&this['uisData']['get'](_0x346597)['collection']['remove'](_0xd02b04),_0x163bff&&this['uisData']['get'](_0x163bff)['collection']['add'](_0xd02b04));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x56a9f1){const _0x348817=[];for(const _0x3f6ca7 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3f6ca7)['filter'])(_0x56a9f1)&&_0x348817['push'](_0x3f6ca7);}if(_0x348817['length']>0x1)throw new _0x520596('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x348817,'annotationType':_0x56a9f1['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0xba3167){super(_0xba3167);const _0xad88ee=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 _0x113483(),this['focusCycler']=new _0x5ac25d({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0xad88ee['to']('class')],'style':{'minHeight':_0xad88ee['to']('minHeight',_0xa9c389=>'number'==typeof _0xa9c389?_i(_0xa9c389+0xa):null)},'dir':_0xba3167['uiLanguageDirection'],'role':'application','aria-label':N(_0xba3167,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0xba3167,'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',_0x1a2ff1=>{this['_updateItemPositionInFocusables'](_0x1a2ff1['source']);}),this['list']['forEach'](_0x359c5f=>{this['focusTracker']['add'](_0x359c5f['element']),this['_updateItemPositionInFocusables'](_0x359c5f);}),this['list']['on']('change',(_0x2f8af9,_0x65e093)=>{for(const _0xc3c825 of _0x65e093['removed'])this['focusTracker']['remove'](_0xc3c825['element']),this['focusables']['remove'](_0xc3c825);for(const _0x1045b8 of _0x65e093['added'])this['focusTracker']['add'](_0x1045b8['element']),this['_updateItemPositionInFocusables'](_0x1045b8);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x36767a){const _0x2d60de=this['focusables']['getIndex'](_0x36767a);let _0x19c957,_0x503312;for(const _0x3d6018 of this['focusables'])if(_0x36767a['top']<_0x3d6018['top']){_0x19c957=_0x3d6018;break;}if(_0x503312=_0x19c957?this['focusables']['getIndex'](_0x19c957):this['focusables']['length'],-0x1!==_0x2d60de){if(_0x2d60de===_0x503312-0x1)return;this['focusables']['remove'](_0x36767a),_0x503312=_0x19c957?this['focusables']['getIndex'](_0x19c957):this['focusables']['length'];}this['focusables']['add'](_0x36767a,_0x503312);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x406304){super(_0x406304),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x80cbe1,_0xb993a1)=>_0x80cbe1+_0xb993a1),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4bb487=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4bb487['to']('isAnimationDisabled',_0xc920a5=>_0xc920a5?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4bb487['to']('top',_0x30d8bd=>Ot(_0x30d8bd))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4a3390=this['element']['clientHeight'];_0x4a3390&&(this['height']=_0x4a3390);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x277ff3{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43382f){super(_0x43382f),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 _0x5556ee=this['context']['config']['get']('sidebar.container');_0x5556ee&&this['setContainer'](_0x5556ee);}['setContainer'](_0x1d0478){if(!g(_0x1d0478))throw new _0x520596('sidebar-setcontainer-invalid-element');this['container']=_0x1d0478;}['_attachToContainer']({viewClass:_0x1b0493='',spaceBetweenItems:_0x4d6707=0x19}={}){if(!g(this['container']))throw new _0x520596('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1b0493,this['_spaceBetweenItems']=_0x4d6707;}['rearrange']({removedAnnotation:_0x1a751a,previousAnnotation:_0x425ea1,nextAnnotation:_0x62d1e2}){const _0x54ede0=this['getSidebarItemView'](_0x1a751a);this['view']['list']['remove'](_0x54ede0),this['_destroySidebarItemView'](_0x1a751a),_0x425ea1&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x425ea1)),_0x62d1e2&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x62d1e2)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1ffcdf,activatedAnnotation:_0x25dd15,disableAnimationOnActivatedAnnotation:_0x2ac91c}){if(this['_activeAnnotation']=_0x25dd15,_0x1ffcdf){_0x1ffcdf['isActive']=!0x1;const _0x42fd53=this['getSidebarItemView'](_0x1ffcdf);_0x42fd53&&_0x2ac91c&&(_0x42fd53['isAnimationDisabled']=!0x1);}if(_0x25dd15){const _0x50c248=this['getSidebarItemView'](_0x25dd15);_0x50c248&&(_0x25dd15['isActive']=!0x0,_0x2ac91c&&(_0x50c248['isAnimationDisabled']=!0x0,_0x50c248['top']+=0x1),this['_alignToTargetRect'](_0x50c248));}}['_detachFromContainer'](_0x24c185){if(this['view']['element']['remove'](),_0x24c185){for(const _0x5e18d9 of _0x24c185)this['_destroySidebarItemView'](_0x5e18d9);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3dc36a,_0x50aed9){_0x50aed9||(_0x50aed9=_0x3dc36a['view']);const _0x4438ef=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4438ef,_0x3dc36a),this['_annotationToSidebarItemView']['set'](_0x3dc36a,_0x4438ef),_0x4438ef['content']['add'](_0x50aed9),this['listenTo'](_0x3dc36a['view'],'change:targetRect',(_0x4312b9,_0x200b75,_0x41ee8e)=>{const _0x1f42e9=this['_getTargetTop'](_0x3dc36a,_0x41ee8e);_0x4438ef['_targetTop']!=_0x1f42e9&&(_0x4438ef['_targetTop']=_0x1f42e9,this['_setItemTop'](_0x4438ef,_0x1f42e9));}),this['listenTo'](_0x4438ef,'change:top',()=>{this['_recalculate'](_0x4438ef,'top');}),this['listenTo'](_0x4438ef,'change:bottom',()=>{this['_recalculate'](_0x4438ef,'bottom');}),this['_alignToTargetRect'](_0x4438ef);const _0x4a6eb7=this['_getItemBefore'](_0x4438ef);if(_0x4a6eb7)this['_alignAfterItem'](_0x4a6eb7,_0x4438ef)||this['_alignToTargetRect'](_0x4438ef);else this['_alignToTargetRect'](_0x4438ef);return this['_updateLastItem'](),this['view']['list']['add'](_0x4438ef),_0x4438ef;}['_alignForTopChange'](_0x564350){if(!_0x564350['content']['length'])return;const _0x3b4ace=this['_getItemBefore'](_0x564350);if(!_0x3b4ace)return;const _0x3120c8=this['_sidebarItemViewToAnnotation']['get'](_0x3b4ace),_0x42250f=this['_activeAnnotation'];_0x42250f&&_0x42250f===_0x3120c8?this['_alignAfterItem'](_0x3b4ace,_0x564350):this['_alignBeforeItem'](_0x564350,_0x3b4ace);}['_alignForBottomChange'](_0x2ef260){if(!_0x2ef260['content']['length'])return;const _0x120bf2=this['_getItemAfter'](_0x2ef260);if(!_0x120bf2)return;const _0x585d8c=this['_sidebarItemViewToAnnotation']['get'](_0x120bf2),_0x25e86d=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5353e2=this['_activeAnnotation'];_0x5353e2&&_0x5353e2===_0x585d8c&&_0x25e86d?(this['_alignBeforeItem'](_0x120bf2,_0x2ef260),this['_alignAfterItem'](_0x2ef260,_0x120bf2)):_0x5353e2&&_0x5353e2===_0x585d8c?this['_alignBeforeItem'](_0x120bf2,_0x2ef260):this['_alignAfterItem'](_0x2ef260,_0x120bf2);}['_recalculate'](_0x301313,_0x56e474){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x45690b,changedProp:_0x1fc5ba}of this['_recalculateBuffer'])'top'===_0x1fc5ba?this['_alignForTopChange'](_0x45690b):this['_alignForBottomChange'](_0x45690b);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x301313,'changedProp':_0x56e474});}['getSidebarItemView'](_0x41be7b){return this['_annotationToSidebarItemView']['get'](_0x41be7b);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2b9407){const _0x1085e1=this['getSidebarItemView'](_0x2b9407);this['stopListening'](_0x1085e1),this['stopListening'](_0x2b9407['view']),_0x1085e1['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2b9407),this['_sidebarItemViewToAnnotation']['delete'](_0x1085e1);}['_createSidebarView'](){const _0x43f551=new H(this['context']['locale']);return _0x43f551['render'](),this['on']('change:_lastItem',(_0x21bfd2,_0x4311ee,_0x2fe801,_0x2bc88e)=>{_0x2bc88e&&_0x43f551['unbind']('minHeight'),_0x2fe801?_0x43f551['bind']('minHeight')['to'](_0x2fe801,'bottom'):_0x43f551['minHeight']=null;}),_0x43f551;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5732af){const _0x3f458e=this['_sidebarItemViewToAnnotation']['get'](_0x5732af),_0x23638d=_0x3f458e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3f458e)-0x1);return _0x23638d&&this['getSidebarItemView'](_0x23638d)||null;}['_getItemAfter'](_0x4c4bb3){const _0x5f2a15=this['_sidebarItemViewToAnnotation']['get'](_0x4c4bb3),_0x29cb8f=_0x5f2a15&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5f2a15)+0x1);return _0x29cb8f&&this['getSidebarItemView'](_0x29cb8f)||null;}['_alignBeforeItem'](_0x1768ee,_0x45ba8b){_0x1768ee['updateHeight']();const _0x3356b8=G(_0x45ba8b['bottom']+this['_spaceBetweenItems'],_0x1768ee['top']);return!!_0x3356b8&&(this['_setItemTop'](_0x45ba8b,_0x45ba8b['top']-_0x3356b8),!0x0);}['_alignAfterItem'](_0x548f19,_0x3e17f3){_0x548f19['updateHeight']();const _0x3c3142=G(_0x548f19['bottom']+this['_spaceBetweenItems'],_0x3e17f3['top']);return!!_0x3c3142&&(this['_setItemTop'](_0x3e17f3,_0x3e17f3['top']+_0x3c3142,!0x1),!0x0);}['_alignToTargetRect'](_0x173d11){const _0x418995=this['_sidebarItemViewToAnnotation']['get'](_0x173d11);if(!_0x418995||!_0x418995['target']||!_0x418995['targetRect'])return;const _0x418f08=this['_getTargetTop'](_0x418995,_0x418995['targetRect']);this['_setItemTop'](_0x173d11,_0x418f08);}['_getTargetTop'](_0x26613b,_0x255a58){if(null===_0x255a58)return 0x0;if(_0x26613b['target']instanceof _0x512b1c)return _0x255a58['top'];{const _0x43b470=new _0x512b1c(this['view']['element'])['top'];return _0x255a58['top']-_0x43b470;}}['_setItemTop'](_0x85e2c,_0x37192b,_0x1acfab=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1acfab&&(_0x37192b=Math['max'](_0x37192b,this['_getMaxAvailableTop'](_0x85e2c))),_0x85e2c['top']=_0x37192b;}['_getMaxAvailableTop'](_0x2059f2){let _0x23ed39=this['_getItemBefore'](_0x2059f2),_0x3f9cab=0x0;for(;_0x23ed39;)_0x23ed39['updateHeight'](),_0x3f9cab+=this['_spaceBetweenItems']+_0x23ed39['height'],_0x23ed39=this['_getItemBefore'](_0x23ed39);return _0x3f9cab;}}function G(_0x196d41,_0x5bbf8e){return Math['max'](_0x196d41-_0x5bbf8e,0x0);}function g(_0x15484d){return null!==_0x15484d&&'object'==typeof _0x15484d&&0x1===_0x15484d['nodeType'];}class e extends _0x277ff3{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x220c6f){super(_0x220c6f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x103649(),this['_refreshPositioningDebounced']=_0x32bc5d(()=>{_0x220c6f['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4bb525=this['context']['plugins']['get'](j),_0x27cbd5=this['context']['plugins']['get'](z);_0x4bb525['register']('wideSidebar',this),_0x27cbd5['container']&&_0x4bb525['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x504d10){if(_0x504d10===this['activeAnnotation'])return;const _0x39eb04=this['context']['plugins']['get'](z);_0x39eb04['_activeAnnotation']=_0x504d10;const _0x4a5c2b=this['activeAnnotation'];_0x39eb04['refresh']({'blurredAnnotation':_0x4a5c2b,'activatedAnnotation':_0x504d10}),this['activeAnnotation']=_0x504d10;}['attach'](_0x10229e){this['annotations']=_0x10229e;const _0x29652e=this['context']['plugins']['get'](z);if(_0x29652e['_annotations']=_0x10229e,this['isAttached'])throw new _0x520596('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x29652e,'set:container',()=>{this['detach'](),this['listenTo'](_0x29652e,'change:container',_0x46b087=>{_0x46b087['off'](),this['attach'](_0x10229e);});}),_0x29652e['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x55bfff=_0x9ac842=>{_0x9ac842['updateTargetRect'](),_0x29652e['addAnnotation'](_0x9ac842);};for(const _0x3e3725 of _0x10229e)_0x55bfff(_0x3e3725);this['listenTo'](_0x10229e,'add',(_0x2dd9ac,_0x3ad343)=>{_0x55bfff(_0x3ad343);}),this['listenTo'](_0x10229e,'remove',(_0x46a607,_0x1c7dfe,_0x593f95)=>{_0x29652e['rearrange']({'removedAnnotation':_0x1c7dfe,'previousAnnotation':_0x10229e['get'](_0x593f95-0x1),'nextAnnotation':_0x10229e['get'](_0x593f95+0x1)}),_0x1c7dfe===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x10229e,'focus',(_0x454a8c,_0x193f1f)=>{this['setActiveAnnotation'](_0x193f1f);}),this['listenTo'](_0x10229e,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3b306a=this['context']instanceof _0x5b3bc4?this['context']['editors']:new _0x103649([this['context']]);for(const _0x57738c of _0x3b306a)this['_integrateWithEditorAnnotations'](_0x57738c);this['listenTo'](_0x3b306a,'add',(_0x49a824,_0x3f9aa9)=>{this['listenTo'](_0x3f9aa9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3f9aa9);});}),this['listenTo'](_0x3b306a,'remove',(_0x5cf7f1,_0x2a90fc)=>{_0x2a90fc['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2a90fc['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x520596('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x46d850=this['context']['plugins']['get'](z);_0x46d850['_detachFromContainer'](this['annotations']),this['stopListening'](_0x46d850),this['stopListening'](this['annotations']),this['context']instanceof _0x5b3bc4&&this['stopListening'](this['context']['editors']);for(const _0xc41af4 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xc41af4);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0xdeb0c8){if(!_0xdeb0c8['plugins']['has']('EditorAnnotations'))return;const _0x370e71=_0xdeb0c8['plugins']['get']('EditorAnnotations'),_0x2fb7b9=()=>{const _0x28fff8=_0x370e71['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x28fff8[0x0]||null);};this['listenTo'](_0x370e71,'refresh',_0x2fb7b9),this['listenTo'](_0x370e71,'blur',(_0x1e8263,{isAnnotationTracked:_0x139f98})=>{this['activeAnnotation']&&_0x139f98(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x370e71,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x54e9d8=>{_0x370e71['hasDomSelection']()&&(_0x2fb7b9(),_0x54e9d8['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x370e71);}['_destroyEditorAnnotationsIntegration'](_0x3c9e2e){this['stopListening'](_0x3c9e2e),this['_editorAnnotations']['remove'](_0x3c9e2e);}}class C extends _0x30c4c4{['counterView'];constructor(_0x14ee83){super(_0x14ee83);const _0xa2683c=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4fa6d8,_0x55724f)=>_0x4fa6d8?'...':_0x55724f['toString']()),this['set']('annotationType',''),this['icon']=_0x11cf91,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xa2683c['to']('annotationType',_0x22793e=>'ck-annotation-counter__badge--'+_0x22793e),_0xa2683c['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xa2683c['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x277ff3{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e81bc){super(_0x5e81bc),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x246f33())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x103649(),this['_refreshPositioningDebounced']=_0x32bc5d(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4ce3b6(this['context']['locale']),this['balloonPanelView']=new _0xe6d8f9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x4aeb4b){this['annotations']=_0x4aeb4b;const _0x1ebfef=this['context']['plugins']['get'](z),_0x21403f=this['balloonPanelView'];if(_0x1ebfef['_annotations']=_0x4aeb4b,this['isAttached'])throw new _0x520596('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1ebfef,'set:container',()=>{this['detach'](),this['listenTo'](_0x1ebfef,'change:container',_0x41b771=>{_0x41b771['off'](),this['attach'](_0x4aeb4b);});}),_0x1ebfef['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2dec6a=_0x471522=>{const _0x4e3931=new C(this['context']['locale']);_0x1ebfef['addAnnotation'](_0x471522,_0x4e3931),this['_annotationToNarrowView']['set'](_0x471522,_0x4e3931),_0x4e3931['bind']('isDirty','annotationType','number')['to'](_0x471522['view'],'isDirty','type','length'),_0x4e3931['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x21403f['content']['first']!==_0x471522['view']?(this['_showBalloon'](_0x471522),_0x471522['view']['element']['focus'](),this['setActiveAnnotation'](_0x471522)):this['setActiveAnnotation'](null);});};for(const _0x365fbf of _0x4aeb4b)_0x2dec6a(_0x365fbf);this['listenTo'](_0x4aeb4b,'add',(_0xc85201,_0x2be9ef)=>{_0x2dec6a(_0x2be9ef);}),this['listenTo'](_0x4aeb4b,'remove',(_0x24d0d2,_0x6ab9cf,_0x14f133)=>{this['_annotationToNarrowView']['get'](_0x6ab9cf)['destroy'](),this['_annotationToNarrowView']['delete'](_0x6ab9cf),_0x1ebfef['rearrange']({'removedAnnotation':_0x6ab9cf,'previousAnnotation':_0x4aeb4b['get'](_0x14f133-0x1),'nextAnnotation':_0x4aeb4b['get'](_0x14f133+0x1)}),_0x6ab9cf===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x4aeb4b,'focus',(_0x2977dc,_0x40a70c)=>{this['setActiveAnnotation'](_0x40a70c);}),this['listenTo'](_0x4aeb4b,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2e41b6,_0x2b7bcf)=>{_0x2b7bcf['keyCode']===_0xbd1837['esc']&&_0x21403f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x21403f['content']['first']),this['_hideBalloon'](),_0x2b7bcf['stopPropagation'](),_0x2b7bcf['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x388c18,_0x2be35f)=>{const _0x14c61e=_0x2be35f['target'];_0x21403f['isVisible']&&_0x21403f['element']['contains'](_0x14c61e)||_0x1ebfef['view']['element']['contains'](_0x14c61e)||_0x388c18['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x35dee0=>_0x35dee0['contains'](_0x14c61e))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x30183f=this['context']instanceof _0x5b3bc4?this['context']['editors']:new _0x103649([this['context']]);for(const _0x2f1201 of _0x30183f)this['_integrateWithEditorAnnotations'](_0x2f1201);this['listenTo'](_0x30183f,'add',(_0x3435a6,_0x288942)=>{this['listenTo'](_0x288942,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x288942);});}),this['listenTo'](_0x30183f,'remove',(_0x589921,_0x3ae15d)=>{_0x3ae15d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3ae15d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x161ae){if(_0x161ae===this['activeAnnotation'])return;const _0x482c85=this['context']['plugins']['get'](z);if(_0x482c85['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x161ae,'disableAnimationOnActivatedAnnotation':!0x0}),_0x161ae)_0x482c85['getSidebarItemView'](_0x161ae)?this['_showBalloon'](_0x161ae):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x161ae;}['detach'](){if(!this['isAttached'])throw new _0x520596('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x54b438=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5d96ea=>_0x5d96ea['destroy']()),this['_annotationToNarrowView']['clear'](),_0x54b438['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5b3bc4&&this['stopListening'](this['context']['editors']);for(const _0x8016a1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x8016a1);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'](_0x4aafa0){if(!_0x4aafa0['plugins']['has']('EditorAnnotations'))return;const _0x24bed8=_0x4aafa0['plugins']['get']('EditorAnnotations'),_0x5657e7=this['context']['plugins']['get'](z),_0x2bd5f3=this['annotations'],_0xc502a4=this['balloonPanelView'],_0x4fae1d=()=>{const _0x4e855e=_0x24bed8['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4e855e),this['setActiveAnnotation'](_0x4e855e[0x0]||null);};this['listenTo'](_0x24bed8,'refresh',_0x4fae1d),this['listenTo'](_0x24bed8,'blur',(_0x11189b,{isAnnotationTracked:_0x25f4d1})=>{this['activeAnnotation']&&_0x25f4d1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x24bed8,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2bd5f3,'blur',_0x476f93=>{_0x24bed8['hasDomSelection']()&&_0x476f93['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xab5e88,_0x8da13d)=>{const _0x3a6468=_0x8da13d['target'];_0xc502a4['isVisible']&&_0xc502a4['element']['contains'](_0x3a6468)||_0x5657e7['view']['element']['contains'](_0x3a6468)||this['activeAnnotation']&&_0x24bed8['hasDomSelection']()&&(_0x4fae1d(),_0xab5e88['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x24bed8);}['_destroyEditorAnnotationsIntegration'](_0x2c9ac4){_0x2c9ac4&&(this['stopListening'](_0x2c9ac4),this['_editorAnnotations']['remove'](_0x2c9ac4));}['_setSelectedAnnotations'](_0x1adc39){for(const _0x10dcd3 of this['_selectedAnnotations'])_0x1adc39['includes'](_0x10dcd3)||this['_manuallyClosedAnnotationViews']['delete'](_0x10dcd3['view']);this['_selectedAnnotations']=_0x1adc39;}['_refreshPositioning'](){const _0x280163=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x280163['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xa6bff3){if(this['_manuallyClosedAnnotationViews']['has'](_0xa6bff3['view']))return;const _0x4472f3=this['balloonPanelView']['content']['first'];_0x4472f3!==_0xa6bff3['view']?(_0x4472f3&&this['_detachListeners'](_0x4472f3),this['_attachListeners'](_0xa6bff3['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xa6bff3['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x489e3c=this['balloonPanelView']['content']['first'],_0x13e982=_0x489e3c&&this['annotations']['getByView'](_0x489e3c);if(!_0x13e982||!this['_annotationToNarrowView']['has'](_0x13e982))return;const _0x4cc149=this['_annotationToNarrowView']['get'](_0x13e982)['element'],_0x186053=(function(){const _0x35081e=_0xe6d8f9['defaultPositions'];return[_0x35081e['southArrowNorthEast'],_0x35081e['northArrowSouthEast'],_0x35081e['southArrowNorth'],_0x35081e['northArrowSouth'],_0x35081e['southArrowNorthWest'],_0x35081e['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x4cc149,'positions':_0x186053});}['_hideBalloon'](){const _0x525758=this['balloonPanelView'],_0x196ad3=_0x525758['content']['first'];_0x196ad3&&(this['_detachListeners'](_0x196ad3),_0x525758['unpin'](),_0x525758['content']['clear']());}['_attachListeners'](_0x2100f0){this['listenTo'](_0x2100f0,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2100f0,'Esc',(_0x258870,_0x105d7b)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2100f0),this['_hideBalloon'](),_0x105d7b();});}['_detachListeners'](_0x2577a2){this['stopListening'](_0x2577a2);}}class c extends _0x4c92ab{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x24fe15,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e2313){super(_0x5e2313),_0x5e2313['editing']['view']['addObserver'](_0x2573f0),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5e2313['plugins']['get'](_0x24fe15),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x449ad9=this['editor']['plugins']['get'](j);_0x449ad9['context']===this['editor']&&(_0x449ad9['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x37cb33,_0x123921)=>{const _0x1f2330=this['_balloon'];if(this['isAttached']&&_0x1f2330['visibleView']){const _0x41d9a2=this['annotations']['getByView'](_0x1f2330['visibleView']);_0x41d9a2&&this['_closeAnnotation'](_0x41d9a2),_0x123921();}}));}['afterInit'](){const _0x3ee708=this['editor']['plugins']['get'](j);_0x3ee708['context']===this['editor']&&(_0x3ee708['hasActive']()||_0x3ee708['switchTo']('inline'));}['setActiveAnnotation'](_0x2cea66){_0x2cea66!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2cea66&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2cea66)&&this['_addAnnotationToBalloon'](_0x2cea66,!0x0),_0x2cea66['isActive']=!0x0),_0x2cea66||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2cea66);}['attach'](_0x221cd4){this['annotations']=_0x221cd4;const _0x2c6883=this['editor']['plugins']['get'](j),_0x801f9f=this['_balloon'];if(this['isAttached'])throw new _0x520596('inlineannotations-attach-already-attached',this);if(_0x2c6883['context']!==this['editor'])throw new _0x520596('inlineannotations-not-allowed-with-context',this);const _0x4adbdf=this['editor']['plugins']['get'](b);this['listenTo'](_0x4adbdf,'refresh',()=>{const _0x33f8ef=_0x4adbdf['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0xb505a7,_0x19cfe1;!this['_forceRefresh']&&(_0xb505a7=_0x33f8ef,_0x19cfe1=this['_selectedAnnotations'],_0xb505a7['length']===_0x19cfe1['length']&&_0xb505a7['every'](_0x4fbf40=>_0x19cfe1['includes'](_0x4fbf40)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x33f8ef),this['setActiveAnnotation'](_0x33f8ef[0x0]||null));}),this['listenTo'](_0x4adbdf,'blur',(_0x9dc6f8,{isAnnotationTracked:_0x42d6c0})=>{this['activeAnnotation']&&_0x42d6c0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x40946e,_0xb3f549,_0x1a0268)=>{_0x1a0268||this['setActiveAnnotation'](null);}),this['listenTo'](_0x221cd4,'remove',(_0x4fb429,_0xf6a2b7)=>{this['_removeAnnotationFromBalloon'](_0xf6a2b7),_0xf6a2b7===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x801f9f,'change:visibleView',(_0x104063,_0x151116,_0x5125e8,_0x3d521b)=>{_0x3d521b&&this['stopListening'](_0x3d521b);const _0x5dd44d=_0x221cd4['getByView'](_0x5125e8);_0x5125e8&&_0x5dd44d&&(this['listenTo'](_0x5125e8,'change:height',()=>{_0x801f9f['updatePosition']();}),this['listenTo'](_0x5125e8,'Esc',()=>{this['_closeAnnotation'](_0x5dd44d),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5dd44d&&this['setActiveAnnotation'](_0x5dd44d));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x801f9f['visibleView']&&(_0x221cd4['getByView'](_0x801f9f['visibleView'])&&_0x801f9f['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 _0x520596('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x34eefe of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x34eefe);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0xf8f65f){for(const _0x598fdb of this['_selectedAnnotations'])_0xf8f65f['includes'](_0x598fdb)||this['_manuallyClosed']['delete'](_0x598fdb);for(const _0x26293a of this['annotations'])_0xf8f65f['includes'](_0x26293a)||this['_removeAnnotationFromBalloon'](_0x26293a);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x244cd2 of _0xf8f65f)this['_addAnnotationToBalloon'](_0x244cd2);}this['_selectedAnnotations']=_0xf8f65f;}['_addAnnotationToBalloon'](_0x5ed1cf,_0x1fd4fe=!0x1){this['_manuallyClosed']['has'](_0x5ed1cf)||(this['_addedAnnotations']['has'](_0x5ed1cf)||this['_balloon']['hasView'](_0x5ed1cf['view'])||(this['_addedAnnotations']['add'](_0x5ed1cf),this['_balloon']['add']({'stackId':_0x5ed1cf['view']['id'],'view':_0x5ed1cf['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5ed1cf)}})),_0x1fd4fe&&this['_balloon']['showStack'](_0x5ed1cf['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4509af){const _0x5847df=_0x4509af['target'],_0x4c027a=this['editor']['editing']['view'],_0x540a4c=_0x4c027a['document']['selection']['getFirstRange'](),_0x43d051=_0x4c027a['domConverter']['viewRangeToDom'](_0x540a4c);if(_0x43d051['collapse'](!0x0),_0x5847df){if(_0x5847df instanceof _0x512b1c)return _0x5847df;let _0x182401=[];for(const _0x595495 of _0x5847df)_0x182401['push'](...F(_0x595495['getClientRects']()));_0x182401=function(_0x271365){const _0x51b938=[];let _0x1d269a=_0x271365[0x0];for(let _0x48a169=0x1;_0x48a169<_0x271365['length'];_0x48a169++)P(_0x1d269a,_0x271365[_0x48a169])?_0x1d269a['width']+=_0x271365[_0x48a169]['width']:(_0x51b938['push'](_0x1d269a),_0x1d269a=_0x271365[_0x48a169]);return _0x51b938['push'](_0x1d269a),_0x51b938;}(_0x182401);const _0x59487d=_0x43d051['getBoundingClientRect']();return _0x182401['find'](_0x4f7222=>_0x4f7222['top']<=_0x59487d['top']&&_0x4f7222['bottom']>=_0x59487d['bottom']&&_0x4f7222['left']<=_0x59487d['left']&&_0x4f7222['right']>=_0x59487d['right'])||_0x182401[0x0];}return _0x4509af['targetRect']||_0x43d051;}['_removeAnnotationFromBalloon'](_0x37e2d8){this['_addedAnnotations']['has'](_0x37e2d8)&&this['_balloon']['hasView'](_0x37e2d8['view'])&&(this['_addedAnnotations']['delete'](_0x37e2d8),this['_balloon']['remove'](_0x37e2d8['view']));}['_closeAnnotation'](_0x9d397d){this['_manuallyClosed']['add'](_0x9d397d),this['_removeAnnotationFromBalloon'](_0x9d397d);}}function F(_0x157687){return Array['from'](_0x157687)['map'](DOMRect['fromRect']);}function P(_0x383f4d,_0x3cfb54){return _0x383f4d['top']===_0x3cfb54['top']&&_0x383f4d['bottom']===_0x3cfb54['bottom']&&_0x383f4d['right']===_0x3cfb54['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0xd1b6cf,_0x19cf02){super(_0xd1b6cf),this['set']('isEmpty',!_0x19cf02['length']),this['focusTracker']=new _0x113483(),this['_annotationViews']=_0x19cf02,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x5ac25d({'focusables':_0x19cf02,'focusTracker':this['focusTracker']}),this['listenTo'](_0x19cf02,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x19cf02,'remove',(_0x355d2b,_0x47762b)=>{_0x47762b['isActive']&&this['focus'](),_0x19cf02['length']||(this['isEmpty']=!0x0);});const _0x51b83b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0xd1b6cf,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x19cf02},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x51b83b['if']('isEmpty','ck-hidden',_0xd904dc=>!_0xd904dc)]},'children':[{'text':N(_0xd1b6cf,'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 _0x251a16 of this['_annotationViews'])this['focusTracker']['add'](_0x251a16['element']);this['_annotationViews']['on']('change',(_0x38b1c8,{added:_0x45c1e9,removed:_0x1c8d13})=>{for(const _0x5f2b13 of _0x45c1e9)this['focusTracker']['add'](_0x5f2b13['element']);for(const _0x4ad5b4 of _0x1c8d13)this['focusTracker']['remove'](_0x4ad5b4['element']);});}}class p extends _0x277ff3{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x455153){super(_0x455153),this['archivedThreads']=new _0x103649();}['init'](){const _0x1a9356=this['context'],_0x90a4e3=_0x1a9356['plugins']['get'](o),_0x5f3f92=_0x1a9356['plugins']['get'](y);this['listenTo'](_0x90a4e3,'addCommentThread',(_0x32eb11,{threadId:_0x153fda})=>{const _0x51772e=_0x90a4e3['getCommentThread'](_0x153fda);_0x51772e['archivedAt']&&this['archivedThreads']['add'](_0x51772e,this['_calculatePosition'](_0x51772e['archivedAt'])),this['listenTo'](_0x51772e,'change:archivedAt',(_0x48546a,_0x5b43e6,_0x138611)=>{_0x138611?this['archivedThreads']['has'](_0x51772e)||this['archivedThreads']['add'](_0x51772e,this['_calculatePosition'](_0x51772e['archivedAt'])):this['archivedThreads']['has'](_0x51772e)&&this['archivedThreads']['remove'](_0x51772e);});}),this['listenTo'](_0x90a4e3,'removeCommentThread',(_0x52ec91,{threadId:_0x7467eb})=>{const _0x14c208=_0x90a4e3['getCommentThread'](_0x7467eb);this['stopListening'](_0x14c208),this['archivedThreads']['has'](_0x14c208)&&this['archivedThreads']['remove'](_0x14c208);},{'priority':'highest'}),this['listenTo'](_0x5f3f92['collection'],'focus',(_0x3d4204,_0x915f7a)=>{_0x915f7a['isVisible']||(_0x915f7a['isActive']=!0x0,_0x5f3f92['activate'](_0x915f7a));});}['_calculatePosition'](_0x1ffe46){const _0x1eda5f=[...this['archivedThreads']]['findIndex'](_0x590463=>_0x590463['archivedAt']<_0x1ffe46);return _0x1eda5f>-0x1?_0x1eda5f:this['archivedThreads']['length'];}}class a extends _0x4c92ab{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x2a8576];}constructor(_0x198e18){super(_0x198e18),this['annotationViews']=new _0x46647b(),this['_pendingThreads']=[];}['init'](){const _0x48dd5d=this['editor'],_0x5b99bb=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x48dd5d['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x30c4c4,!0x0)),_0x48dd5d['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x586763=this['_createCommentsArchiveButton'](_0xb1b43c);return _0x586763['set']({'role':'menuitemcheckbox'}),_0x586763;});const _0x38124a=_0x48dd5d['plugins']['get'](p),_0x3eb350=_0x48dd5d['plugins']['get']('Annotations'),_0x4e2cda=_0x48dd5d['plugins']['get']('CommentsRepository');_0x38124a['archivedThreads']['forEach'](_0x5a28d8=>{this['_handleNewThread'](_0x5a28d8);}),this['listenTo'](_0x38124a['archivedThreads'],'add',(_0xd0aaf5,_0x24102d)=>{this['_handleNewThread'](_0x24102d);}),this['listenTo'](_0x3eb350['collection'],'add',(_0x5cbb44,_0x468fca)=>{const _0x3dedc0=this['_pendingThreads']['find'](_0x515c82=>{const _0x3c2701=_0x4e2cda['_threadToController']['get'](_0x515c82);return _0x3c2701&&_0x468fca['innerView']===_0x3c2701['view'];});if(_0x3dedc0){const _0x1d0291=this['_calculatePosition'](_0x3dedc0['archivedAt']);this['_addAnnotationToArchive'](_0x468fca,_0x1d0291),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3dedc0),0x1);}}),this['listenTo'](_0x38124a['archivedThreads'],'remove',(_0x299612,_0x39034b)=>{const _0x3de72e=_0x48dd5d['config']['get']('collaboration.channelId');if(!_0x3de72e||_0x39034b['channelId']===_0x3de72e){if(this['_pendingThreads']['includes'](_0x39034b))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x39034b),0x1);else{const _0x535556=_0x4e2cda['_threadToController']['get'](_0x39034b),_0x3446d0=_0x3eb350['getByInnerView'](_0x535556['view']);this['annotationViews']['remove'](_0x3446d0['view']),this['stopListening'](_0x3446d0),this['stopListening'](_0x3446d0['focusableElements']);}}}),this['listenTo'](_0x3eb350['collection'],'add',(_0x46d985,_0x348234)=>{this['listenTo'](_0x348234,'escape',_0x5b99bb);}),this['listenTo'](_0x3eb350['collection'],'remove',(_0x143534,_0x194b51)=>{this['stopListening'](_0x194b51,'escape',_0x5b99bb);});}['_addAnnotationToArchive'](_0x1fd3a0,_0x15f24e){this['listenTo'](_0x1fd3a0,'set:isVisible',_0x4a67bd=>{_0x4a67bd['return']=!0x1,_0x4a67bd['stop']();}),this['annotationViews']['add'](_0x1fd3a0['view'],_0x15f24e);}['_handleNewThread'](_0x142343){const _0x20d45d=this['editor']['plugins']['get']('CommentsRepository'),_0x24683e=this['editor']['plugins']['get']('Annotations'),_0x2ee63d=this['editor']['config']['get']('collaboration.channelId');if(!_0x2ee63d||_0x142343['channelId']===_0x2ee63d){const _0x3cf765=_0x20d45d['_threadToController']['get'](_0x142343);if(!_0x3cf765)return void this['_pendingThreads']['push'](_0x142343);const _0x501d94=this['_calculatePosition'](_0x142343['archivedAt']),_0x17b442=_0x24683e['getByInnerView'](_0x3cf765['view']);_0x17b442['isVisible']&&_0x24683e['_visibleAnnotations']['remove'](_0x17b442),this['_addAnnotationToArchive'](_0x17b442,_0x501d94);}}['_calculatePosition'](_0x15f82f){const _0x30fbb1=this['editor']['config']['get']('collaboration.channelId'),_0x32b0ba=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2a04c6=>_0x2a04c6['channelId']===_0x30fbb1)['findIndex'](_0x2f1dc3=>_0x2f1dc3['archivedAt']<_0x15f82f);return _0x32b0ba<0x0||_0x32b0ba>this['annotationViews']['length']?this['annotationViews']['length']:_0x32b0ba-0x1;}['_toggleDialog'](){const _0x908578=this['editor'],_0xf0c2dc=_0x908578['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x908578['locale'],this['annotationViews'])),'commentsArchive'===_0xf0c2dc['id']?_0xf0c2dc['hide']():_0xf0c2dc['show']({'id':'commentsArchive','title':N(_0x908578['locale'],'COMMENTS_ARCHIVE'),'icon':_0xcc94f1,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x14f8cf['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x3ea75c,_0x27510d=!0x1){const _0x57966e=this['editor']['locale'],_0x3dd201=this['editor']['plugins']['get']('Dialog'),_0x222ea0=new _0x3ea75c(_0x57966e);return _0x222ea0['bind']('isEnabled')['to'](this,'isEnabled'),_0x222ea0['bind']('isOn')['to'](_0x3dd201,'id',_0x32f2bb=>'commentsArchive'===_0x32f2bb),_0x222ea0['set']({'label':N(_0x57966e,'COMMENTS_ARCHIVE'),'icon':_0xcc94f1,'isToggleable':!0x0}),_0x27510d&&(_0x222ea0['tooltip']=!0x0),this['listenTo'](_0x222ea0,'execute',()=>this['_toggleDialog']()),_0x222ea0;}['_hideDialogOnAnnotationEscape']=_0x4980c0=>{const _0x143612=_0x4980c0['source'];if(!this['annotationViews']['has'](_0x143612['view']))return;const _0x3fa5ed=this['editor']['plugins']['get']('Dialog');_0x3fa5ed['isOpen']&&'commentsArchive'===_0x3fa5ed['id']&&(_0x3fa5ed['hide'](),_0x4980c0['stop']());};}class gi extends _0x4c92ab{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|