@ckeditor/ckeditor5-comments 47.7.2-alpha.0 → 47.7.3-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 +19 -19
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x19fb1c={}){function _0x38dad6(_0x306cb6){return _0x306cb6['map'](_0x3e9608=>String['fromCharCode'](_0x3e9608))['join']('');}(_0x19fb1c=Object['assign']({},_0x19fb1c))['plugins']||(_0x19fb1c['plugins']=hs['defaultPlugins']),super(_0x19fb1c),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x38dad6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x38dad6([0x76,0x69,0x65,0x77])][_0x38dad6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x38dad6([0x61,0x75,0x74,0x6f]),this[_0x38dad6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x38dad6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x38dad6([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x38dad6([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x38dad6([0x6f,0x6b])});}['create'](){const _0xc08008=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xc08008))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1f5b31=>{const _0x1b6335=this['model']['document']['getRoot'](),_0x47e305=_0x1b6335&&_0x1b6335['getChild'](_0x1b6335['childCount']-0x1);_0x1f5b31['setSelection'](_0x47e305,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x370b73=this['editing']['view'],_0xdba07c=_0x370b73['document']['getRoot'](),_0x1314c5=_0xdba07c['getChild'](0x0);_0xdba07c['childCount']>0x1||!_0x1314c5||'p'!=_0x1314c5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x370b73,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1314c5['placeholder']=this['placeholder']),Ft({'view':_0x370b73,'element':_0x1314c5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1314c5);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x25db87,_0x2fd2bc={}){super(_0x25db87),this['editor']=null,this['_editorConfig']=_0x2fd2bc,this['set']('value',_0x2fd2bc['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x25db87,'Reply...')),this['set']('submitLabel',N(_0x25db87,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4fd6f9(),this['focusCycler']=new _0x439bb2({'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',(_0x3e72a7,_0x3c4948)=>{this['cancelButtonView']['fire']('execute'),_0x3c4948();}),this['keystrokes']['set']('Ctrl+Enter',(_0xcd1bf9,_0x147a14)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x147a14());}),this['on']('submit',(_0xc96e02,_0x49e66b)=>{_0x49e66b['length']>0xfde8?(alert(N(_0x25db87,'TOO_LONG_COMMENT_ALERT',[_0x49e66b['length'],0xfde8])),_0xc96e02['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x41daac=this['editor'];this['element']['insertBefore'](_0x41daac['ui']['element'],this['element']['firstChild']),_0x41daac['model']['document']['on']('change',()=>this['value']=_0x41daac['getData']()),_0x41daac['bind']('placeholder')['to'](this),this['focusables']['add'](_0x41daac['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x35cd10){-0x1===_0x35cd10?(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:_0x482709}=this,_0x22fb4e=new _0x3487c4(_0x482709);return _0x22fb4e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x22fb4e['withText']=!0x0,_0x22fb4e['bind']('label')['to'](this,'submitLabel'),_0x22fb4e['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x22fb4e['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x446eb7,_0x4395ee)=>!_0x4395ee&&!!_0x446eb7['trim']()),_0x22fb4e;}['_createCancelButton'](){const {locale:_0x21935e}=this,_0x24d5f1=new _0x3487c4(_0x21935e);return _0x24d5f1['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x24d5f1['label']=N(_0x21935e,'Cancel'),_0x24d5f1['withText']=!0x0,_0x24d5f1['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x24d5f1;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3f8315=>{this['focusTracker']['add'](_0x3f8315['element']);}),this['focusables']['on']('change',(_0x243428,_0x131ed7)=>{for(const _0x6f7845 of Array['from'](_0x131ed7['added'])['reverse']())this['focusTracker']['add'](_0x6f7845['element']);});}}class ie extends kt{constructor(_0x32fb3c,_0x1c942b,_0x563524){super(_0x32fb3c),this['commentInputView']=new es(_0x32fb3c,_0x563524),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5f184b,_0x24f962)=>_0x5f184b||!!_0x24f962),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 _0x2540bd(_0x32fb3c,_0x1c942b),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'](_0x33ca6e){this['commentInputView']['focus'](_0x33ca6e);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x293697,_0x44d4ca)=>{const {submitButtonView:_0x3c6a25,cancelButtonView:_0x3eacf5,editor:_0x17c1bc}=this['commentInputView'];[_0x3c6a25['element'],_0x3eacf5['element'],_0x17c1bc?_0x17c1bc['editing']['view']['getDomRoot']():null]['filter'](_0xb6978f=>_0xb6978f)['some'](_0x16e1da=>_0x16e1da['contains'](_0x44d4ca['target']))||(this['focus'](),_0x44d4ca['preventDefault']());});}}class rs extends kt{constructor(_0x3b3053){super(_0x3b3053);const _0x24cf66=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x24cf66['to']('count',_0x32728b=>N(_0x3b3053,'NUMBER_OF_COMMENTS',_0x32728b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3db2fb,_0x5b08ab,_0x5f0459){super(_0x3db2fb);const _0x177101=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5b08ab['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5b08ab,this['_config']=_0x5f0459,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4fd6f9(),this['keystrokes']=new jt(),this['focusCycler']=new _0x439bb2({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x264333=>this['commentViews']['map'](_0x1a7f0c=>_0x1a7f0c['element'])['includes'](_0x264333['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x3db2fb),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x11169d=>_0x11169d-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4eda4b of _0x5b08ab['comments'])this['_handleNewCommentModel'](_0x4eda4b);this['_handleInfoComment'](),this['listenTo'](_0x5b08ab['comments'],'add',(_0x3b23de,_0x440b77)=>{const _0x34ec31=this['_calculatePosition'](_0x440b77);this['length']++,this['_handleNewCommentModel'](_0x440b77,_0x34ec31),this['refreshVisibleViews']();}),this['listenTo'](_0x5b08ab['comments'],'remove',(_0x1fd347,_0x1108e8)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1108e8),this['refreshVisibleViews']();}),this['listenTo'](_0x5b08ab,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5b08ab,'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',_0x177101['if']('length','ck-hidden',_0x4521d8=>!_0x4521d8)],'aria-label':N(_0x3db2fb,'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'](_0x595f0e){-0x1===_0x595f0e?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4ecd12 of this['commentViews'])_0x4ecd12['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x53e6cf,_0x893a3f){const _0xe17bcd=new this['_config']['CommentView'](this['locale'],_0x53e6cf,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0xe17bcd['viewUid']=_0x53e6cf['id'],_0xe17bcd['delegate']('removeComment')['to'](this),_0xe17bcd['delegate']('updateComment')['to'](this),_0xe17bcd['delegate']('resolveCommentThread')['to'](this),_0xe17bcd['delegate']('editorReady')['to'](this),_0xe17bcd['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0xe17bcd,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0xe17bcd,_0x893a3f);}['_calculatePosition'](_0x29c27d){const _0x459f6e=this['_model']['_findOptimalIndex'](_0x29c27d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x29c27d['authoredAt']?_0x459f6e-0x1:_0x459f6e:_0x459f6e-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x57ee8a={'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'],_0x57ee8a,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x57ee8a));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x285d68){const _0x5208e3=this['commentViews']['remove'](_0x285d68['id']);this['stopListening'](_0x5208e3),_0x5208e3['isEditMode']&&this['_updateHasDirtyComment'](),_0x5208e3['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x13f5a8=>_0x13f5a8['isEditMode']);}['_rearrangeCollapse'](){const _0x3cfe4d=function(_0x4022c4){const _0x2e5873=new _0x328140();for(const _0x3a0ba8 of _0x4022c4)_0x2e5873['add'](_0x3a0ba8);return _0x2e5873;}(this['commentViews']),_0x4e2c16=this['_collapsedCommentsView']['count'];for(let _0xc06686=0x1;_0xc06686<=_0x4e2c16;_0xc06686++)_0x3cfe4d['remove'](0x1);for(const _0x22a483 of _0x3cfe4d)_0x22a483['collapse']();_0x4e2c16>0x0&&_0x3cfe4d['add'](this['_collapsedCommentsView'],0x1),ns(_0x49f0bf(Array['from'](this['visibleViews']),Array['from'](_0x3cfe4d)),this['visibleViews'],_0x3cfe4d);}['_rearrangeExpand'](){ns(_0x49f0bf(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2da520 of this['visibleViews'])_0x2da520['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2dda1c=>{this['focusTracker']['add'](_0x2dda1c['element']),this['keystrokes']['listenTo'](_0x2dda1c['element']);}),this['commentViews']['on']('change',(_0x18e174,_0x33c09a)=>{for(const _0x319e6f of _0x33c09a['removed'])this['focusTracker']['remove'](_0x319e6f['element']),this['keystrokes']['stopListening'](_0x319e6f['element']);for(const _0x2e1f72 of Array['from'](_0x33c09a['added'])['reverse']())this['focusTracker']['add'](_0x2e1f72['element']),this['keystrokes']['listenTo'](_0x2e1f72['element']);});}}function ns(_0x28703a,_0x2d7ce8,_0x551702){let _0x279ba7=0x0;for(const _0x133b5e of _0x28703a)switch(_0x133b5e){case'insert':_0x2d7ce8['add'](_0x551702['get'](_0x279ba7),_0x279ba7),_0x279ba7++;break;case'delete':_0x2d7ce8['remove'](_0x279ba7);break;case'equal':_0x279ba7++;}}class oe extends kt{constructor(_0x1bf6fe){super(_0x1bf6fe);const _0x3ede10=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3ede10['to']('contextValue',_0x5bd4d1=>N(_0x1bf6fe,'THREAD_CONTEXT_LABEL',_0x5bd4d1)),'tabindex':-0x1},'children':[{'text':_0x3ede10['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3c0df3,_0x45330b){super(_0x3c0df3);const _0x241da0=this['bindTemplate'];this['_model']=_0x45330b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4fd6f9(),this['keystrokes']=new jt(),this['focusCycler']=new _0x439bb2({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3f4af1=>!!_0x3f4af1),this['bind']('contextValue')['to'](this['_model'],'context',_0x4d161f=>_0x4d161f&&_0x4d161f['value']?this['_trimContextValue'](_0x4d161f['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',_0x241da0['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 _0x49ea79=new _0x3487c4(this['locale']);return _0x49ea79['label']=N(this['locale'],'Reopen'),_0x49ea79['tooltip']=N(this['locale'],'Reopen'),_0x49ea79['icon']=_0x4adba4,_0x49ea79['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xd080a=>!_0xd080a),_0x49ea79['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x56df00,_0x150c5a)=>_0x56df00&&_0x150c5a),_0x49ea79['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x49ea79;}['_trimContextValue'](_0x48fa76){if(_0x48fa76['length']<0x96)return _0x48fa76;const _0x145c1d=_0x48fa76['lastIndexOf']('\x20',0x93);return _0x48fa76['substring'](0x0,_0x145c1d>-0x1?_0x145c1d:0x93)+'...';}['_attachContextActions'](){const _0x1b61aa=this['element']['querySelector']('.ck-context'),_0x316220=_0x1b61aa['querySelector']('.ck-context__value');this['listenTo'](_0x1b61aa,'mouseenter',()=>{_0x316220['offsetWidth']<_0x316220['scrollWidth']&&_0x1b61aa['classList']['add']('overlay');}),this['listenTo'](_0x1b61aa,'mouseleave',()=>{_0x1b61aa['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xbd9eca of this['focusables'])this['focusTracker']['add'](_0xbd9eca['element']),this['keystrokes']['listenTo'](_0xbd9eca['element']);}['_createContextView'](){const _0x5e047b=new oe(this['locale']);return _0x5e047b['bind']('contextValue')['to'](this),_0x5e047b;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5879e3,_0x20ff31,_0x362aa4,_0x5706e0){super(_0x5879e3),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x20ff31,this['_localUser']=_0x362aa4,this['_config']=_0x5706e0,this['commentThreadHeaderView']=new Xt(_0x5879e3,_0x20ff31),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5879e3,N(_0x5879e3,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5879e3,_0x20ff31,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5706e0)),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',(_0xae7c41,_0x3b5ac4)=>_0xae7c41||!!_0x3b5ac4),this['bind']('isUnlinked')['to'](_0x20ff31,'unlinkedAt',_0x4638f1=>!!_0x4638f1),this['bind']('ariaLabel')['to'](this,'length',_0x38c6ce=>{const _0x5a8975=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x38c6ce,_0x5a8975]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4fd6f9(),this['keystrokes']=new jt(),this['focusCycler']=new _0x439bb2({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x347ba5=>_0x347ba5['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2bf4c2=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5b7969=_0x2bf4c2['commentInputView'];return _0x2bf4c2['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5b7969,'value',(_0x2ba06a,_0x53f088,_0x367e26,_0x8960ec,_0x147669)=>!!_0x147669||!!_0x8960ec&&_0x367e26&&!_0x53f088||_0x2ba06a&&_0x367e26&&!_0x53f088),_0x5b7969['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x27213a,_0xfec167,_0x48f179)=>{let _0xbf3b1d;return _0xbf3b1d=_0x48f179&&_0xfec167?'Reply\x20to\x20reopen\x20discussion...':_0x27213a?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0xbf3b1d);}),_0x5b7969['bind']('submitLabel')['to'](this,'length',_0x3775c4=>N(this['locale'],_0x3775c4?'Reply':'Comment')),_0x5b7969['on']('submit',(_0x185829,_0x467c46)=>{this['fire']('addComment',_0x467c46),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5b7969['on']('cancel',()=>{this['focus']();}),_0x5b7969['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5b7969['on']('cancel',_0xb8c99f=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xb8c99f['stop']());}),this['on']('change:isActive',(_0x296a7b,_0x2f4d54,_0x230e3c)=>{_0x230e3c||this['length']||_0x5b7969['value']||this['fire']('removeCommentThread');}),_0x2bf4c2;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x37aab7(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x18adc1,target:_0x9021bb,type:_0x2b8a7a,isVisible:_0x21b687=!0x0}){super(),this['view']=_0x18adc1,this['view']['element']||this['view']['render'](),this['_type']=_0x2b8a7a,this['_target']=_0x9021bb,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x328140([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4bc83c,_0x18a57d)=>{this['view']['focusTracker']['add'](_0x18a57d);}),this['focusableElements']['on']('remove',(_0x391b68,_0x123e66)=>{this['view']['focusTracker']['remove'](_0x123e66);}),this['set']('isVisible',_0x21b687);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x22c633=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x22c633),_0x22c633;}get['targetRect'](){const _0x159b60=this['target'];if(null===_0x159b60)return null;if(_0x159b60 instanceof _0x578f30)return _0x159b60;const _0x3aeeb9=_0x159b60['filter'](_0x2ca62f=>function(_0x59746b){const _0x2a7909=_0x59746b['offsetParent'];if(_0x2a7909)return!0x0;const _0x43776a=_0x59746b['getClientRects']()['item'](0x0);return!!_0x43776a;}(_0x2ca62f));return 0x0===_0x3aeeb9['length']?null:new _0x578f30(_0x3aeeb9[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x15e49c){this['view']['isActive']=_0x15e49c,this['view']['mainView']['isActive']=_0x15e49c;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4df933){if(!(null===_0x4df933||_0x4df933 instanceof _0x578f30||Array['isArray'](_0x4df933)&&_0x4df933['every'](_0x415156=>re(_0x415156))))throw new _0x5199cf('annotation-invalid-target',null,{'target':_0x4df933});}['_getNormalizedTarget'](){const _0x31a656='function'==typeof this['_target']?this['_target']():this['_target'];return re(_0x31a656)?[_0x31a656]:_0x31a656;}}function re(_0x5c8fb6){return null!==_0x5c8fb6&&'object'==typeof _0x5c8fb6&&'nodeType'in _0x5c8fb6&&0x1===_0x5c8fb6['nodeType'];}class S extends _0x328140{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x43a36d=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4fd6f9(),this['_focusTracker']['on']('change:isFocused',(_0x2b11ee,_0x5b873f,_0x3c9ebb)=>{_0x3c9ebb||this['fire']('blur');});for(const _0x43895c of _0x43a36d)this['add'](_0x43895c);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x293603){if(this['has'](_0x293603))throw new _0x5199cf('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x293603['innerView'],_0x293603),this['_viewToAnnotation']['set'](_0x293603['view'],_0x293603);for(const _0x25e46a of _0x293603['focusableElements'])this['_focusTracker']['add'](_0x25e46a);this['listenTo'](_0x293603['focusableElements'],'add',(_0x38ed8f,_0x110fff)=>{this['_focusTracker']['add'](_0x110fff);}),this['listenTo'](_0x293603['focusableElements'],'remove',(_0x400ad6,_0x1cd802)=>{this['_focusTracker']['remove'](_0x1cd802);}),this['listenTo'](_0x293603['view']['focusTracker'],'change:isFocused',(_0x3c45dc,_0x45298b,_0x1f06d3)=>{_0x1f06d3&&this['fire']('focus',_0x293603);}),_0x293603['updateTargetRect']();const _0x594766=this['_getOrderInContent'](_0x293603['view']['targetRect']);return super['add'](_0x293603,_0x594766);}['remove'](_0x5ebf23){if(!this['has'](_0x5ebf23))throw new _0x5199cf('annotationcollection-not-existing-item',null);this['stopListening'](_0x5ebf23['view']['focusTracker']),this['stopListening'](_0x5ebf23['focusableElements']);for(const _0x10fa32 of _0x5ebf23['focusableElements'])this['_focusTracker']['remove'](_0x10fa32);return this['_viewToAnnotation']['delete'](_0x5ebf23['view']),this['_innerViewToAnnotation']['delete'](_0x5ebf23['innerView']),super['remove'](_0x5ebf23);}['getByInnerView'](_0x35672e){return this['_innerViewToAnnotation']['get'](_0x35672e);}['getByView'](_0xe3e188){return this['_viewToAnnotation']['get'](_0xe3e188);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1f9f6e of this)_0x1f9f6e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x5bf7fc=Array['from'](this)['sort']((_0x1b91f1,_0x5f59e5)=>w(_0x1b91f1['view']['targetRect'],_0x5f59e5['view']['targetRect']));for(let _0x4024d1=_0x5bf7fc['length']-0x1;_0x4024d1>0x0;_0x4024d1--){const _0x565def=_0x5bf7fc[_0x4024d1];_0x4024d1!==this['getIndex'](_0x565def)&&(this['remove'](_0x565def),this['add'](_0x565def));}}['_getOrderInContent'](_0x3c31ce){let _0x51e947=0x0;if(!_0x3c31ce)return this['length'];for(const _0x1ba71a of this){const _0x2f938f=_0x1ba71a['view']['targetRect'];if(_0x2f938f){if(w(_0x3c31ce,_0x2f938f)<0x0)return _0x51e947;_0x51e947++;}}return _0x51e947;}}function v({source:_0x39e434,target:_0x29b8ac,filter:_0x172158}){for(const _0x2ee884 of _0x39e434)_0x172158(_0x2ee884)&&_0x29b8ac['add'](_0x2ee884);_0x29b8ac['listenTo'](_0x39e434,'add',(_0x188f6f,_0x5be3d2)=>{_0x172158(_0x5be3d2)&&_0x29b8ac['add'](_0x5be3d2);}),_0x29b8ac['listenTo'](_0x39e434,'remove',(_0x5d60e8,_0x5842ce)=>{_0x29b8ac['has'](_0x5842ce)&&_0x29b8ac['remove'](_0x5842ce);});}function w(_0x12d300,_0x32f50f){if(null===_0x12d300&&null===_0x32f50f)return 0x0;if(null===_0x12d300)return-0x1;if(null===_0x32f50f)return 0x1;const _0x219d0c=_0x12d300['top']-_0x32f50f['top'];return 0x0==_0x219d0c?_0x12d300['left']-_0x32f50f['left']:_0x219d0c;}class y extends _0x816dec{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4c2912){if(super(_0x4c2912),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4c2912 instanceof _0x25b851){const _0x396871=_0x4c2912['locale'];_0x4c2912['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4d494d){this['collection']['add'](_0x4d494d);}['remove'](_0x511220){this['collection']['remove'](_0x511220),_0x511220['destroy']();}['refreshVisibility'](){for(const _0x28917e of this['collection'])_0x28917e['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x31e444){return this['collection']['getByInnerView'](_0x31e444);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x236863 of this['collection'])_0x236863['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3c6c43){this['fire']('_activateAnnotation',_0x3c6c43);}['createAnnotation'](_0x45e23c){return new T(_0x45e23c);}['createAnnotationView'](_0x92749e,_0x4c0327){return new E(_0x92749e,_0x4c0327);}['_addActiveAnnotation'](_0x47f819){const _0x4bc75c=new Set(this['activeAnnotations']);_0x4bc75c['add'](_0x47f819),this['activeAnnotations']=_0x4bc75c;}['_removeActiveAnnotation'](_0x77bfa0){const _0x2b07ab=new Set(this['activeAnnotations']);_0x2b07ab['delete'](_0x77bfa0),this['activeAnnotations']=_0x2b07ab;}['_bindAnnotationsToVisibleAnnotations'](){const _0x160bf9=this['collection'],_0x433d69=this['_visibleAnnotations'];function _0x341f5d(_0x497d5b){const _0x50798f=_0x497d5b['source'];_0x50798f['isVisible']&&!_0x433d69['has'](_0x50798f)?_0x433d69['add'](_0x50798f):!_0x50798f['isVisible']&&_0x433d69['has'](_0x50798f)&&_0x433d69['remove'](_0x50798f),_0x50798f['view']['focusTracker']['remove'](_0x50798f['view']['element']),_0x50798f['view']['focusTracker']['add'](_0x50798f['view']['element']);}this['listenTo'](_0x160bf9,'add',(_0x2b1900,_0x4c017a)=>{_0x4c017a['isVisible']&&_0x433d69['add'](_0x4c017a),this['listenTo'](_0x4c017a,'change:isVisible',_0x341f5d);}),this['listenTo'](_0x160bf9,'remove',(_0x41ebdc,_0xa91a60)=>{_0x433d69['has'](_0xa91a60)&&_0x433d69['remove'](_0xa91a60),this['stopListening'](_0xa91a60,'change:isVisible',_0x341f5d);});}['_setupEnterAnnotationKeystroke'](){const _0x24f7a1=_0x3e718e=>{_0x3e718e['on']('ready',()=>{_0x3e718e['keystrokes']['set'](_0x430625,(_0x4ff2ab,_0x555190)=>{const _0xa4935c=_0x153d6a(this['activeAnnotations']['values']());_0xa4935c&&(_0xa4935c['view']['focus'](),_0x555190());});});};this['context']instanceof _0x25b851?_0x24f7a1(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1790eb,_0x10c84a)=>{_0x24f7a1(_0x10c84a);});}['_setupEscapeAnnotationHandling'](){const _0x179e3c=_0x57628a=>{const _0x4fd45e=_0x57628a['source'],_0x1c7671=[];let _0x35e5f8;if(Array['isArray'](_0x4fd45e['target'])){_0x35e5f8=_0x4fd45e['target'][0x0],this['context']instanceof _0x25b851?_0x1c7671['push'](this['context']):this['context']['editors']&&_0x1c7671['push'](...this['context']['editors']);for(const _0x5026f7 of _0x1c7671)for(const _0x29e56f of _0x5026f7['editing']['view']['domRoots']['values']())if(_0x29e56f['contains'](_0x35e5f8))return void _0x5026f7['editing']['view']['focus']();_0x35e5f8['focus']();}};this['listenTo'](this['collection'],'add',(_0x90bd6e,_0x16ed28)=>{this['listenTo'](_0x16ed28,'escape',_0x179e3c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1788e6,_0x58850a)=>{this['stopListening'](_0x58850a,'escape',_0x179e3c);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x816dec{['_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(_0x1dd337){super(_0x1dd337),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5951d9=this['context']['config'];_0x5951d9['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5951d9['define']('comments.maxThreadTotalWeight',0x1f4),_0x5951d9['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5951d9['define']('comments.CommentThreadView',gt),_0x5951d9['define']('comments.CommentView',Tt),_0x5951d9['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1d55cc=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5b51f0,_0x3c9181)=>this['_addCommentThread'](_0x3c9181)),this['on']('submitCommentThread',(_0x505a91,_0x42cc20)=>this['_submitCommentThread'](_0x42cc20)),this['on']('resolveCommentThread',(_0x32c2de,_0x1c81b7)=>this['_resolveCommentThread'](_0x1c81b7)),this['on']('resolveCommentThread',(_0x1e9535,_0xc3926d)=>this['_updateActiveAnnotation'](_0xc3926d),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x152302,_0x43883b)=>this['_reopenCommentThread'](_0x43883b)),this['on']('reopenCommentThread',(_0x469910,_0x1ba7f4)=>this['_updateActiveAnnotation'](_0x1ba7f4),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2cdbfc,_0x5c9aa6)=>this['_removeCommentThread'](_0x5c9aa6)),this['on']('updateCommentThread',(_0x38eec2,_0x4a07af)=>this['_updateCommentThread'](_0x4a07af)),this['on']('updateCommentThread',(_0x29975c,_0x1269e9)=>this['_updateActiveAnnotation'](_0x1269e9),{'priority':'lowest'}),this['on']('addComment',(_0x5bd12d,_0x21e02b)=>this['_addComment'](_0x21e02b)),this['on']('updateComment',(_0x2c8005,_0xa94d33)=>this['_updateComment'](_0xa94d33)),this['on']('removeComment',(_0x5d26f3,_0x3db694)=>this['_removeComment'](_0x3db694)),this['on']('addComment',(_0x5bb1a3,{threadId:_0x2d9dfb,isFromAdapter:_0x53e3f5})=>{if(_0x53e3f5)return;const _0xf91ea0=this['getCommentThread'](_0x2d9dfb),_0x1736e8=_0xf91ea0&&this['_threadToController']['get'](_0xf91ea0);_0x1736e8&&_0x1736e8['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1d55cc,'change:activeAnnotations',(_0x567fc3,_0x2eb232,_0x212dbd)=>{const _0x132cac=Array['from'](_0x212dbd)['map'](_0x34c53c=>this['_viewToController']['get'](_0x34c53c['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x132cac?_0x132cac['model']:null;});}set['adapter'](_0x4df0c5){if(this['_adapter'])throw new _0x5199cf('commentsrepository-adapter-already-set');this['_adapter']=_0x4df0c5;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x1324d6=_t,threadId:_0x12aa8b=_0x4e4b92(),comments:_0x4d0a27=[],unlinkedAt:_0x3aa1ec=null,resolvedAt:_0x499056=null,resolvedBy:_0x7c4265=null,target:_0x1d7c9a=null,context:_0xf66e2e=null,attributes:_0x2b3ab2={},isResolvable:_0x25bef0=!0x0,isSubmitted:_0x53ccf2=!0x1,isFromAdapter:_0xbf289b=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x1324d6),{'channelId':_0x1324d6,'threadId':_0x12aa8b,'comments':_0x4d0a27,'unlinkedAt':_0x3aa1ec,'resolvedAt':_0x499056,'resolvedBy':_0x7c4265,'target':_0x1d7c9a,'context':_0xf66e2e,'attributes':_0x2b3ab2,'isFromAdapter':_0xbf289b,'isResolvable':_0x25bef0,'isSubmitted':_0x53ccf2}),this['getCommentThread'](_0x12aa8b);}['openNewCommentThread']({channelId:_0x123325=_t,threadId:_0x4e88aa=_0x4e4b92(),target:_0x4734dd,context:_0x42b8c9=null,isResolvable:_0x3044b2=!0x0}){if(this['_readOnlyChannels']['has'](_0x123325)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4734dd)throw new _0x5199cf('commentsrepository-missing-target');const _0x11d082=this['addCommentThread']({'channelId':_0x123325,'threadId':_0x4e88aa,'target':_0x4734dd,'context':_0x42b8c9,'isResolvable':_0x3044b2});if(!_0x11d082)return null;const _0x183d33=this['_threadToController']['get'](_0x11d082),_0x2d6c20=_0x183d33['view']['commentThreadInputView']['commentInputView'],_0x31995f=this['context']['plugins']['get'](y),_0xe0adaf=_0x31995f['getByInnerView'](_0x183d33['view']);return _0x31995f['activate'](_0xe0adaf),_0x2d6c20['once']('editorReady',()=>_0x2d6c20['focus']()),_0x11d082;}['hasCommentThread'](_0xde226b){if('string'!=typeof _0xde226b)throw new _0x5199cf('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xde226b);}['updateCommentThread']({channelId:_0x48c423=_t,threadId:_0x25d844,context:_0x4360d3,unlinkedAt:_0x5969eb,attributes:_0x292402,isFromAdapter:_0x41eee0=!0x1}){return this['fire'](Nt('updateCommentThread',_0x48c423),{'channelId':_0x48c423,'threadId':_0x25d844,'context':_0x4360d3,'unlinkedAt':_0x5969eb,'attributes':_0x292402,'isFromAdapter':_0x41eee0}),this['getCommentThread'](_0x25d844);}['getCommentThread'](_0x431a67){if('string'!=typeof _0x431a67)throw new _0x5199cf('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x431a67);}['fetchCommentThread']({channelId:_0x11daaa,threadId:_0x24d482}={}){const _0x3d9d6c=this['getCommentThread'](_0x24d482);if(_0x3d9d6c)return Promise['resolve'](_0x3d9d6c);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5199cf('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x11daaa,'threadId':_0x24d482})['then'](_0x309646=>this['hasCommentThread'](_0x24d482)?this['getCommentThread'](_0x24d482):_0x309646?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x11daaa},_0x309646)):void 0x0)['catch'](_0x5b0846=>{throw console['error'](_0x5b0846),new _0x5199cf('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5a632a,skipNotAttached:_0x4ff37d=!0x1,skipEmpty:_0x57427f=!0x1,toJSON:_0x3657f7=!0x1}={}){const _0x3337eb=[];for(const _0x3be420 of this['_threads']['values']())_0x5a632a&&_0x3be420['channelId']!==_0x5a632a||_0x4ff37d&&!_0x3be420['isAttached']||_0x57427f&&0x0===_0x3be420['length']||_0x3337eb['push'](_0x3be420);return _0x3657f7?_0x3337eb['map'](_0x5d3c22=>_0x5d3c22['toJSON']()):_0x3337eb;}['getAnnotationForCommentThread'](_0x4cc211){const _0x489adf=this['_threadToController']['get'](_0x4cc211);if(!_0x489adf)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x489adf['view'])||null;}['getCommentThreadForAnnotation'](_0x5bd7c1){const _0x5d17af=this['_viewToController']['get'](_0x5bd7c1['innerView']);return _0x5d17af?_0x5d17af['model']:null;}['setActiveCommentThread'](_0x1b2558){const _0xf6926f=this['context']['plugins']['get'](y);if(!_0x1b2558)return void(this['activeCommentThread']&&_0xf6926f['deactivateAll']());const _0x42fe13=this['getCommentThread'](_0x1b2558);if(!_0x42fe13)throw new _0x5199cf('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1b2558});if(!this['_threadToController']['has'](_0x42fe13))throw new _0x5199cf('commentsrepository-active-not-attached',null,{'threadId':_0x1b2558});const _0x302e09=_0xf6926f['getByInnerView'](this['_threadToController']['get'](_0x42fe13)['view']);_0xf6926f['activate'](_0x302e09);}['switchReadOnly'](_0x34f98b,_0x555c47){_0x34f98b?this['_readOnlyChannels']['add'](_0x555c47):this['_readOnlyChannels']['delete'](_0x555c47),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4063cc){return this['_readOnlyChannels']['has'](_0x4063cc)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2f6a45,_0x45e847){return new vt(_0x2f6a45,_0x45e847);}['setPermissions'](_0x4fb58,_0x3c60b6=_t){this['_permissions']['set'](_0x3c60b6,_0x4fb58),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x37b230=_t){return this['_permissions']['has'](_0x37b230)?this['_permissions']['get'](_0x37b230):bt;}['_addCommentThread']({channelId:_0x344ecb,threadId:_0xc48d41,comments:_0x3b6716,unlinkedAt:_0x64c914,resolvedAt:_0x4dcdc9,resolvedBy:_0x2b6d79,target:_0x35b82e,context:_0x472811,attributes:_0x730446,isFromAdapter:_0x519f07,isResolvable:_0x3b1a93,isSubmitted:_0x4c3946}){if('string'!=typeof _0xc48d41)throw new _0x5199cf('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xc48d41});if(this['hasCommentThread'](_0xc48d41))throw new _0x5199cf('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xc48d41});const _0x236a70=new CommentThread(this,{'channelId':_0x344ecb,'id':_0xc48d41,'context':_0x472811,'attributes':_0x730446,'unlinkedAt':_0x64c914,'resolvedAt':_0x4dcdc9,'resolvedBy':_0x2b6d79?this['context']['plugins']['get'](it)['getUser'](_0x2b6d79):null,'isResolvable':_0x3b1a93,'isSubmitted':_0x4c3946||_0x519f07});this['_threads']['set'](_0xc48d41,_0x236a70);for(const _0x1150ee of _0x3b6716)_0x236a70['_add'](this['_createNewComment']({'threadId':_0xc48d41,..._0x1150ee}));return _0x35b82e&&_0x236a70['attachTo'](_0x35b82e),_0x519f07||!_0x236a70['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x344ecb,'threadId':_0xc48d41});}['_submitCommentThread']({channelId:_0x819bf2,threadId:_0x5e4778}){if(!this['hasCommentThread'](_0x5e4778))throw new _0x5199cf('commentsrepository-missing-comment-thread',this);const _0x15eac1=this['getCommentThread'](_0x5e4778);if(_0x15eac1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x27586c,comments:_0x5d0747,resolvedAt:_0x5a4eb4,resolvedBy:_0x1e265b,context:_0x4f1a2e,attributes:_0x367859}=_0x15eac1,_0x9166c2=this['context']['plugins']['get']('PendingActions'),_0x3a22d0=_0x9166c2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x819bf2,'threadId':_0x27586c,'comments':_0x5d0747['map'](_0x230b88=>_0x230b88['toJSON']()),'resolvedAt':_0x5a4eb4,'resolvedBy':_0x1e265b?_0x1e265b['id']:_0x1e265b,'context':_0x4f1a2e,'attributes':_0x367859})['then'](({comments:_0xaa0c3d})=>{_0x9166c2['remove'](_0x3a22d0);for(const _0x2958c1 of _0xaa0c3d)this['_updateComment']({'channelId':_0x819bf2,'threadId':_0x5e4778,'commentId':_0x2958c1['commentId'],'createdAt':_0x2958c1['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2d6714=>{throw console['error'](_0x2d6714),new _0x5199cf('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x50ddb3,target:_0x93c50b}){const _0x38eb55=this['getCommentThread'](_0x50ddb3);if(!_0x38eb55)throw new _0x5199cf('commentsrepository-attach-missing-comment-thread',this);const _0x427db6=this['context']['plugins']['get']('PendingActions'),_0x1757b4=this['context']['plugins']['get'](y),_0x3d96ab=this['_createCommentThreadView'](_0x38eb55),_0x401c18=new vt(_0x38eb55,_0x3d96ab);let _0x8ba508=null;_0x3d96ab['on']('change:isDirty',(_0x6e2377,_0x55b042,_0x2ca1ee)=>{_0x2ca1ee?_0x8ba508=_0x427db6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x8ba508&&(_0x427db6['remove'](_0x8ba508),_0x8ba508=null);}),this['_threadToController']['set'](_0x38eb55,_0x401c18),this['_viewToController']['set'](_0x3d96ab,_0x401c18);const _0x492c86=new E(this['context']['locale'],_0x3d96ab);_0x492c86['bind']('length')['to'](_0x3d96ab),_0x492c86['bind']('isDirty')['to'](_0x3d96ab,'isDirty',_0x3d96ab,'length',(_0x5c809f,_0xb783f2)=>_0x5c809f||!_0xb783f2),_0x492c86['bind']('isActive')['to'](_0x3d96ab),_0x492c86['type']='comment';const _0x1443ce=new T({'view':_0x492c86,'target':_0x93c50b,'type':'comment','isVisible':!_0x38eb55['archivedAt']&&!!('function'==typeof _0x93c50b?_0x93c50b():_0x93c50b)});return _0x3d96ab['on']('escape',()=>{_0x1443ce['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3d96ab,_0x1443ce),_0x1757b4['add'](_0x1443ce),_0x1443ce;}['_bindAnnotationToEditors'](_0x18152c,_0x1b38f7){this['listenTo'](_0x18152c,'editorReady',(_0x32687f,_0x2b2609)=>{const _0x5bd65a=_0x2b2609['ui']['view']['body']['bodyCollectionContainer'];_0x1b38f7['focusableElements']['add'](_0x5bd65a),this['context']instanceof _0x25b851&&this['context']['ui']['focusTracker']['add'](_0x5bd65a);},{'priority':'highest'}),this['listenTo'](_0x18152c,'editorDestroyed',(_0x489ef3,_0x3d649a)=>{const _0x48474e=_0x3d649a['ui']['view']['body']['bodyCollectionContainer'];_0x1b38f7['focusableElements']['has'](_0x48474e)&&_0x1b38f7['focusableElements']['remove'](_0x48474e),this['context']instanceof _0x25b851&&this['context']['ui']['focusTracker']['remove'](_0x48474e);});}['_unbindEditors'](_0x529f4a){this['stopListening'](_0x529f4a,'editorReady'),this['stopListening'](_0x529f4a,'editorDestroyed');}['_createCommentThreadView'](_0x5e69b0){const _0x3f42bf=this['context']['plugins']['get'](it),{config:_0x476b76,locale:_0x42ab32}=this['context'],_0x5428eb=pt(_0x476b76['get']('locale'),_0x42ab32);return new(0x0,(_0x476b76['get']('comments'))['CommentThreadView'])(_0x42ab32,_0x5e69b0,_0x3f42bf['me'],{'editorConfig':{..._0x476b76['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x476b76['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x476b76['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x476b76['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x476b76['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5428eb,'CommentView':_0x476b76['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x8185c8,channelId:_0x489615,resolvedAt:_0x4bd3e2,resolvedBy:_0x4073da,isFromAdapter:_0x53b53f}){if(!this['hasCommentThread'](_0x8185c8))throw new _0x5199cf('commentsrepository-missing-comment-thread',null,{'threadId':_0x8185c8});const _0x3713ca=this['getCommentThread'](_0x8185c8);if(_0x3713ca['isResolved'])throw new _0x5199cf('commentsrepository-resolved-comment-thread',null,{'threadId':_0x8185c8});const _0x3a2652=this['context']['plugins']['get'](it);if(_0x3713ca['resolvedBy']=_0x3a2652['getUser'](_0x4073da),_0x3713ca['resolvedAt']=_0x4bd3e2,_0x53b53f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1c54c0=this['context']['plugins']['get']('PendingActions'),_0x36edca=_0x1c54c0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x489615,'threadId':_0x8185c8})['then'](({resolvedAt:_0x2705e1,resolvedBy:_0x555d11})=>{_0x1c54c0['remove'](_0x36edca),_0x3713ca['resolvedBy']['id']!==_0x555d11&&(_0x3713ca['resolvedBy']=_0x3a2652['getUser'](_0x555d11)),_0x3713ca['resolvedAt']=_0x2705e1;})['catch'](_0x4b8cdf=>{throw console['error'](_0x4b8cdf),new _0x5199cf('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2c4f28,channelId:_0x2fdc66,isFromAdapter:_0x13f0ae}){if(!this['hasCommentThread'](_0x2c4f28))throw new _0x5199cf('commentsrepository-missing-comment-thread',null,{'threadId':_0x2c4f28});const _0x3a8fc2=this['getCommentThread'](_0x2c4f28);if(!_0x3a8fc2['isResolved'])throw new _0x5199cf('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2c4f28});if(_0x3a8fc2['resolvedBy']=null,_0x3a8fc2['resolvedAt']=null,_0x13f0ae||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x9da324=this['context']['plugins']['get']('PendingActions'),_0x791410=_0x9da324['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2fdc66,'threadId':_0x2c4f28})['then'](()=>_0x9da324['remove'](_0x791410))['catch'](_0x180571=>{throw console['error'](_0x180571),new _0x5199cf('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x35cdb1,isFromAdapter:_0x50c2f5}){const _0x1db696=this['getCommentThread'](_0x35cdb1);if(!_0x1db696)throw new _0x5199cf('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x35cdb1),this['_threads']['delete'](_0x35cdb1),!_0x1db696['isSubmitted']||_0x50c2f5||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x56a57c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1f0acf}=_0x1db696,_0x211aa2=_0x56a57c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1f0acf,'threadId':_0x35cdb1})['then'](()=>_0x56a57c['remove'](_0x211aa2))['catch'](_0x57a029=>{throw console['error'](_0x57a029),new _0x5199cf('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2d8ba6,unlinkedAt:_0xb2591b,context:_0x34c54c,attributes:_0x3955b2,isFromAdapter:_0x109f71}){if('string'!=typeof _0x2d8ba6)throw new _0x5199cf('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2d8ba6});if(!this['hasCommentThread'](_0x2d8ba6))throw new _0x5199cf('commentsrepository-missing-comment-thread',null,{'threadId':_0x2d8ba6});const _0x30286b=this['getCommentThread'](_0x2d8ba6);let _0x19e445=!0x1;if(void 0x0!==_0x34c54c&&_0x30286b['context']!==_0x34c54c&&(_0x30286b['context']=_0x34c54c,_0x19e445=!0x0),void 0x0!==_0xb2591b&&_0x30286b['unlinkedAt']!==_0xb2591b&&(_0x30286b['unlinkedAt']=_0xb2591b,_0x19e445=!0x0),_0x3955b2&&!At(_0x3955b2,_0x30286b['attributes'])&&(_0x30286b['attributes']=_0x3955b2,_0x19e445=!0x0),!_0x19e445)return Promise['resolve']();if(!_0x30286b['isSubmitted']||_0x109f71||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x403d84=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7d6ea7}=_0x30286b,_0x1bc1c4=_0x403d84['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x7d6ea7,'threadId':_0x2d8ba6,'context':_0x34c54c,'unlinkedAt':_0xb2591b,'attributes':_0x3955b2})['then'](()=>_0x403d84['remove'](_0x1bc1c4))['catch'](_0x519a26=>{throw console['error'](_0x519a26),new _0x5199cf('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1ee473){const _0x1ee16c=this['context']['plugins']['get'](y),_0x3c5c68=this['getCommentThread'](_0x1ee473);if(_0x3c5c68['_isAttached']=!0x1,this['_threadToController']['has'](_0x3c5c68)){const _0x4659b3=this['_threadToController']['get'](_0x3c5c68),_0x5e8276=_0x4659b3['view'],_0x5f151a=_0x1ee16c['getByInnerView'](_0x5e8276);this['_threadToController']['delete'](_0x3c5c68),this['_viewToController']['delete'](_0x5e8276),_0x5f151a&&_0x1ee16c['remove'](_0x5f151a),_0x4659b3['destroy'](),_0x5e8276['destroy']()['then'](()=>{this['_unbindEditors'](_0x5e8276);});}}['_updateActiveAnnotation']({threadId:_0x29e5ca,resolvedAt:_0x23bd11,unlinkedAt:_0xfb23d1}){const _0x3378b4=!!_0x23bd11,_0x3c5650=this['context']['plugins']['get'](y),_0x2adfb0=this['getCommentThread'](_0x29e5ca);if(this['_threadToController']['has'](_0x2adfb0)){const _0x5177b4=this['_threadToController']['get'](_0x2adfb0)['view'],_0x1c373f=_0x3c5650['getByInnerView'](_0x5177b4);_0x1c373f&&(_0x3378b4&&_0x3c5650['_removeActiveAnnotation'](_0x1c373f),_0xfb23d1?_0x1c373f['isVisible']=!0x1:_0x1c373f['refreshVisibility']());}}['_getExternalAuthor'](_0x5e0145){const _0x1de437=this['context']['plugins']['get'](it),_0x5bc061=It('external:'+_0x5e0145),_0x1e003a=_0x1de437['getUser'](_0x5bc061);return _0x1e003a||_0x1de437['addUser']({'id':_0x5bc061,'name':_0x5e0145});}['_createNewComment']({threadId:_0x2ef5a3,commentId:_0x476bc9=_0x4e4b92(),content:_0x5a14f9,authorId:_0x5535b0,createdAt:_0x1603b4,attributes:_0xc30a81}){if('string'!=typeof _0x476bc9)throw new _0x5199cf('commentsrepository-invalid-commentid');if('string'!=typeof _0x5535b0)throw new _0x5199cf('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5a14f9||!_0x5a14f9['trim']())throw new _0x5199cf('commentsrepository-invalid-comment-content');const _0xcb6030=this['context']['plugins']['get'](it)['getUser'](_0x5535b0);if(!_0xcb6030)throw new _0x5199cf('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5535b0});let _0x3a24c9=null,_0x5adb79=_0x1603b4;return _0xc30a81?.['@external']&&(_0x3a24c9=this['_getExternalAuthor'](_0xc30a81['@external']['authorName']),_0x5adb79=new Date(_0xc30a81['@external']['createdAt'])),new Comment(this,{'threadId':_0x2ef5a3,'id':_0x476bc9,'author':_0x3a24c9||_0xcb6030,'creator':_0xcb6030,'content':_0x5a14f9,'createdAt':_0x1603b4,'authoredAt':_0x5adb79,'attributes':_0xc30a81});}['_addComment'](_0x1e7648){let {threadId:_0x2b0388,content:_0x31c854,attributes:_0xf352eb,isFromAdapter:_0x476f1b}=_0x1e7648;const _0x53a0e5=this['getCommentThread'](_0x1e7648['threadId']);if(!_0x53a0e5)throw new _0x5199cf('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x24dc77=this['_createNewComment'](_0x1e7648),{id:_0x4e7250}=_0x24dc77;if(_0x53a0e5['_add'](_0x24dc77),_0x476f1b||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x53a0e5['isSubmitted'])return Promise['resolve']();const _0x46aa5f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x21d2de}=_0x53a0e5,_0x20d5f2=_0x46aa5f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xf352eb||(_0xf352eb={}),this['adapter']['addComment']({'channelId':_0x21d2de,'threadId':_0x2b0388,'commentId':_0x4e7250,'content':_0x31c854,'attributes':_0xf352eb})['then'](_0x1ac97f=>{_0x46aa5f['remove'](_0x20d5f2),_0x1ac97f&&this['_updateComment']({'channelId':_0x21d2de,'threadId':_0x2b0388,'commentId':_0x4e7250,'createdAt':_0x1ac97f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xd467e5=>{throw console['error'](_0xd467e5),new _0x5199cf('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x532ed6,commentId:_0x5c923a,content:_0x5bac60,createdAt:_0x5a040a,attributes:_0x364296,isFromAdapter:_0x22f06c}){if(void 0x0!==_0x5bac60&&('string'!=typeof _0x5bac60||!_0x5bac60['trim']()['length']))throw new _0x5199cf('commentsrepository-update-comment-invalid-content');const _0x3d937a=this['getCommentThread'](_0x532ed6),_0x109bdc=_0x3d937a['getComment'](_0x5c923a);if(!_0x109bdc)throw new _0x5199cf('commentsrepository-update-missing-comment',this);let _0x5c047b=!0x1;if(_0x5bac60&&_0x5bac60!==_0x109bdc['content']&&(_0x109bdc['isEditable']||_0x22f06c)&&(_0x109bdc['content']=_0x5bac60,_0x5c047b=!0x0),_0x5a040a&&_0x5a040a!==_0x109bdc['createdAt']&&(_0x109bdc['createdAt']=_0x5a040a,_0x109bdc['attributes']&&_0x109bdc['attributes']['@external']||(_0x109bdc['authoredAt']=_0x5a040a),_0x5c047b=!0x0),_0x364296&&!At(_0x364296,_0x109bdc['attributes'])&&(_0x109bdc['attributes']=_0x364296,_0x5c047b=!0x0),!_0x5c047b)return Promise['resolve']();if(_0x3d937a['fire']('commentUpdated'),_0x22f06c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x54630c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3b0376}=this['getCommentThread'](_0x109bdc['threadId']),_0x2166b4=_0x54630c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3b0376,'threadId':_0x532ed6,'commentId':_0x5c923a,'content':_0x5bac60,'attributes':_0x364296})['then'](()=>_0x54630c['remove'](_0x2166b4))['catch'](_0x31e4cd=>{throw console['error'](_0x31e4cd),new _0x5199cf('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x2e5537,commentId:_0x1868f2,isFromAdapter:_0x86a345}){const _0x53470c=this['getCommentThread'](_0x2e5537),_0x3a14fb=_0x53470c['getComment'](_0x1868f2);if(!_0x3a14fb)throw new _0x5199cf('commentsrepository-remove-missing-comment',this);if(_0x53470c['_remove'](_0x3a14fb),_0x86a345||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4a1099=this['context']['plugins']['get']('PendingActions'),{channelId:_0xb7f3b3}=_0x53470c,_0x18d5b4=_0x4a1099['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xb7f3b3,'threadId':_0x2e5537,'commentId':_0x1868f2})['then'](()=>_0x4a1099['remove'](_0x18d5b4))['catch'](_0x391ad1=>{throw console['error'](_0x391ad1),new _0x5199cf('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x37aab7(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5585fb,_0x2acade){super();const _0x5ab7b2=_0x5585fb['context']['plugins']['get'](it)['me'],_0x1fca62=_0x5585fb['getCommentThread'](_0x2acade['threadId']),_0x674e03=0x0===_0x1fca62['comments']['length'],_0x2da0c3=_0x5ab7b2===_0x2acade['author'];this['id']=_0x2acade['id'],this['threadId']=_0x2acade['threadId'],this['author']=_0x2acade['author'],this['creator']=_0x2acade['creator'],this['isExternal']=Boolean(_0x2acade['attributes']&&_0x2acade['attributes']['@external']),this['set']('content',_0x2acade['content']),this['createdAt']=_0x2acade['createdAt']||new Date(),this['set']('authoredAt',_0x2acade['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1fca62,'resolvedAt'),this['set']('attributes',_0x2acade['attributes']||{}),this['bind']('isEditable')['to'](_0x5585fb,'_permissions',()=>{const _0x37c3f1=_0x5585fb['getPermissions'](_0x1fca62['channelId'])['write'],_0x37014a=_0x5585fb['getPermissions'](_0x1fca62['channelId'])['modifyAll'];return _0x2da0c3&&_0x37c3f1||!_0x2da0c3&&_0x37014a;}),this['bind']('isRemovable')['to'](_0x1fca62,'isRemovable',_0x5585fb,'_permissions',_0x31f08c=>{const _0x4b9193=_0x5585fb['getPermissions'](_0x1fca62['channelId'])['write'],_0x268cbc=_0x5585fb['getPermissions'](_0x1fca62['channelId'])['modifyAll'];return _0x2da0c3&&_0x4b9193||_0x31f08c&&_0x674e03||!_0x2da0c3&&_0x268cbc&&!_0x674e03;}),this['bind']('isReadOnly')['to'](_0x1fca62,'isReadOnly'),this['_repository']=_0x5585fb;}get['weight'](){return Math['max'](function(_0x2ef2a3){const _0x25a0c9=document['createElement']('div');return _0x25a0c9['innerHTML']=_0x2ef2a3,_0x25a0c9['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3f9c89){const {threadId:_0x5ef9e9,id:_0x5e0ca5}=this;if(!this['_repository']['hasCommentThread'](_0x5ef9e9))throw new _0x5199cf('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x295a1a}=this['_repository']['getCommentThread'](_0x5ef9e9);this['_repository']['fire'](Nt('updateComment',_0x295a1a,_0x5ef9e9),{'channelId':_0x295a1a,'threadId':_0x5ef9e9,'commentId':_0x5e0ca5,..._0x3f9c89});}['setAttribute'](_0x11df54,_0x329fb1){const _0x23cf31=wt(this['attributes']);yt(_0x23cf31,_0x11df54,_0x329fb1),this['update']({'attributes':_0x23cf31});}['removeAttribute'](_0x38d221){const _0x1c3e3b=wt(this['attributes']);Ct(_0x1c3e3b,_0x38d221),this['update']({'attributes':_0x1c3e3b});}['remove'](_0x5476ec={}){if(!_0x5476ec['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x138090,id:_0x4e526a}=this;if(!this['_repository']['hasCommentThread'](_0x138090))throw new _0x5199cf('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x3bcbf7}=this['_repository']['getCommentThread'](_0x138090);this['_repository']['fire'](Nt('removeComment',_0x3bcbf7,_0x138090),{'channelId':_0x3bcbf7,'threadId':_0x138090,'commentId':_0x4e526a,..._0x5476ec});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x5ae764,..._0x1aee34){for(const _0x1fe1b7 of _0x1aee34)void 0x0!==_0x1fe1b7&&(_0x5ae764+=':'+String(_0x1fe1b7));return _0x5ae764;}class ot extends _0x37e591{constructor(_0x44f2c8){super(_0x44f2c8),this['set']('hasContent',!0x1);}['refresh'](){const _0x4be83b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2c651f of _0x4be83b['getRanges']())if(this['_hasContent'](_0x2c651f))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x141c5e=_0x4e4b92(),ranges:_0x4d4b42,comment:_0x4c5e2d}={}){const _0x289a28=this['editor']['model'],_0x19ec15=_0x4d4b42??Array['from'](_0x289a28['document']['selection']['getRanges']()),_0xe60151=[];for(const _0x3ad0cf of _0x19ec15)this['_hasContent'](_0x3ad0cf)&&_0xe60151['push'](this['_trimToContent'](_0x3ad0cf));if(!_0xe60151['length'])throw new _0x5199cf('addcommentthreadcommand-incorrect-ranges',null);_0x4c5e2d&&this['_createCommentThread'](_0x141c5e,_0x4c5e2d),this['_createMarkersFromRanges'](_0x141c5e,_0xe60151,!!_0x4c5e2d);}['_createMarkersFromRanges'](_0x5b27af,_0x13c8a9,_0x1d0a48){this['editor']['model']['change'](_0x14cd10=>{for(const _0x1764f6 of _0x13c8a9){const _0x54b42c=_0x4e4b92()['substr'](0x1,0x5),_0x3071a7='comment:'+_0x5b27af+':'+_0x54b42c;_0x14cd10['addMarker'](_0x3071a7,{'range':_0x1764f6,'usingOperation':_0x1d0a48,'affectsData':_0x1d0a48});}});}['_createCommentThread'](_0x24c1e1,_0x425e0b){const _0x101cb3=this['editor']['plugins']['get']('CommentsRepository'),_0x3308a8=this['editor']['config']['get']('collaboration.channelId'),_0x52bdf1=this['editor']['plugins']['get']('Users')['me'];if(!_0x52bdf1)throw new _0x5199cf('addcommentthreadcommand-user-not-found',null);_0x101cb3['addCommentThread']({'threadId':_0x24c1e1,'channelId':_0x3308a8,'comments':[{'authorId':_0x52bdf1['id'],'content':_0x425e0b,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x47f7cf){for(const _0x471f7f of _0x47f7cf['getItems']())if(this['_itemIsContent'](_0x471f7f))return!0x0;return!0x1;}['_itemIsContent'](_0x29ea88){return _0x29ea88['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x29ea88)&&!_0x29ea88['is']('element','tableCell');}['_trimToContent'](_0x417d8a){const _0x1513d9=_0x3cc8dd=>!this['_itemIsContent'](_0x3cc8dd['item']),_0x1c784f=_0x417d8a['start']['getLastMatchingPosition'](_0x1513d9),_0x463c82=_0x417d8a['end']['getLastMatchingPosition'](_0x1513d9,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1c784f,_0x463c82);}}class b extends _0x3456c4{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x18f13a){super(_0x18f13a),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xcd338e=this['editor'],_0x4fe8b0=_0xcd338e['model']['document']['selection'],_0x3d462b=_0x9c41f3(()=>this['refreshSelectedViews'](),0xa);_0x4fe8b0['on']('change:range',(_0x15f8c9,_0x28eb17)=>{_0x28eb17['directChange']&&(_0x3d462b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xcd338e['editing']['view']['document'],'change:isFocused',(_0xdc510e,_0x18b23f,_0x512e8c)=>{_0x512e8c&&_0x3d462b();}),this['listenTo'](_0xcd338e['ui']['focusTracker'],'change:isFocused',(_0x6d33a9,_0x559552,_0x34ddb4)=>{_0x34ddb4||this['fire']('blur',{'isAnnotationTracked':_0x1bb3d3=>this['_editorAnnotationsData']['has'](_0x1bb3d3['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4ce865){if(this['_editorAnnotations']['has'](_0x4ce865['view']))return;this['_editorAnnotations']['add'](_0x4ce865['view']),this['editor']['ui']['focusTracker']['add'](_0x4ce865['view']['element']);const _0x2ed3a5=this['editor']['plugins']['get'](y);this['listenTo'](_0x2ed3a5['collection'],'remove',(_0x40823a,_0x1201b0)=>{this['editor']['ui']['focusTracker']['remove'](_0x1201b0['view']['element']),this['_editorAnnotations']['delete'](_0x1201b0['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1f7586){if('function'!=typeof _0x1f7586)throw new _0x5199cf('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1f7586);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x11edce,annotations:_0x363579}){const _0x4dd83d=[],_0x379f6c=this['editor']['model']['document']['selection'],_0x430f56=Array['from'](_0x379f6c['getRanges']());for(const [_0x2125a4,_0x1d73eb]of this['_editorAnnotationsData']){const _0xaf5b57=_0x1666df(_0x1d73eb),_0x43451a=_0x363579['getByInnerView'](_0x2125a4);_0xaf5b57&&_0x43451a&&_0x4dd83d['push']({'annotation':_0x43451a,'range':_0xaf5b57});}function _0x1666df(_0x255ad2){for(const _0x1ed151 of _0x255ad2)for(const _0x4ff40b of _0x430f56)if(_0x1ed151['containsRange'](_0x4ff40b,!_0x379f6c['isCollapsed']))return _0x1ed151;return null;}return _0x4dd83d['sort']((_0x95fcfb,_0x28c965)=>{const _0x1dcf8f=_0x95fcfb['range'],_0x5e256a=_0x28c965['range'];if(!_0x1dcf8f['isEqual'](_0x5e256a)){if(_0x1dcf8f['containsRange'](_0x5e256a,!0x0))return 0x1;if(_0x5e256a['containsRange'](_0x1dcf8f,!0x0))return-0x1;}return _0x95fcfb['annotation']==_0x11edce?-0x1:_0x28c965['annotation']==_0x11edce?0x1:0x0;})['map'](_0x15a2ef=>_0x15a2ef['annotation']);}get['_editorAnnotationsData'](){const _0x452cb1=new Map();for(const _0xfb79bf of Array['from'](this['_dataCollectors']))for(const [_0x387d4f,_0x20243d]of _0xfb79bf())_0x452cb1['set'](_0x387d4f,_0x20243d);return _0x452cb1;}}class st extends _0x3456c4{['afterInit'](){const _0x48be66=this['editor'];if(!_0x48be66['plugins']['has']('RestrictedEditingModeEditing'))return;_0x48be66['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3456c4{constructor(_0x58b443){super(_0x58b443),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1f0156=this['editor'],_0x15117c=_0x1f0156['commands']['get']('importWord'),_0x4a2dda=_0x1f0156['plugins']['get'](it);_0x15117c&&(_0x15117c['on']('execute',(_0x22b1ad,[,_0x5bbe46])=>{_0x5bbe46['collaboration_features']={'comments':!0x0,'user_id':_0x4a2dda['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x15117c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x222efb,_0x399f77){const {comment_threads:_0xdb3529}=_0x399f77;_0xdb3529&&_0xdb3529['forEach'](({thread_id:_0x24472e,comments:_0x1eade9,is_resolved:_0x435be4})=>{const _0xaa425f=new Date(),_0x3f9564=_0x1eade9['map'](({author:_0x1e5f12,content:_0x958543,created_at:_0x2c64ca})=>({'content':_0x958543,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0xaa425f,'attributes':{'@external':{'authorName':_0x1e5f12,'createdAt':_0x2c64ca?new Date(_0x2c64ca):new Date(),'source':'importWord'}}})),_0x1f0789=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1f0789,'threadId':_0x24472e,'comments':_0x3f9564,'resolvedAt':_0x435be4?_0xaa425f:null});});}}class at extends _0x3456c4{constructor(_0x20838c){super(_0x20838c),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x12ddfb=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x12ddfb,'contentInsertion',(_0x2b8c39,_0x2566a6)=>this['_removeMarkersWithoutThreads'](_0x2566a6['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3f3354){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3f3354;const _0x183d4f=this['editor']['plugins']['get']('CommentsRepository');for(const _0x56746c of _0x3f3354['keys']()){const [_0x5c9a60,_0x4a82da]=_0x56746c['split'](':');'comment'!=_0x5c9a60||_0x183d4f['hasCommentThread'](_0x4a82da)||_0x3f3354['delete'](_0x56746c);}return _0x3f3354;}['_registerMarkerInClipboardPipeline'](){const _0x34cf3e=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x271e5b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x271e5b&&_0x34cf3e['_registerMarkerToCopy']('comment',_0x271e5b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4de3fc){switch(_0x4de3fc){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x2857ab){const _0x37d2c9=_0x2857ab['split'](':');return{'group':_0x37d2c9[0x0],'id':_0x37d2c9[0x1],'part':_0x37d2c9[0x2]};}class ut extends _0x3456c4{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xe79604,_0x5d508d)=>{if(!_0x5d508d['options']['showCommentHighlights'])return null;if(_0x5d508d['options']['ignoreResolvedComments']){const {id:_0x125c98}=ft(_0xe79604['markerName']),_0x3d0a16=this['editor']['plugins']['get'](o);if(_0x3d0a16['getCommentThread'](_0x125c98)?.['isResolved']&&_0xe79604['item'])return _0x5d508d['consumable']['consume'](_0xe79604['item'],'addMarker:'+_0xe79604['markerName']),_0x5d508d['consumable']['consume'](_0xe79604['item'],'removeMarker:'+_0xe79604['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xa3418=>{_0xa3418['on']('addMarker:comment',(_0x317d20,_0x1b6058,_0x33b264)=>{if(!_0x33b264['options']['showCommentHighlights'])return;const _0x511ab5=_0x1b6058['item'];if(!_0x511ab5)return;const _0x362011=_0x33b264['mapper']['toViewElement'](_0x511ab5);this['editor']['model']['schema']['isObject'](_0x511ab5)&&_0x362011&&!_0x362011['getCustomProperty']('widget')&&_0x362011['is']('containerElement')&&_0x3779fa(_0x362011,_0x33b264['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x48197d,{writer:_0x424752,options:_0x55d384})=>{if(!_0x55d384['showCommentHighlights'])return null;const _0x1be6ab=_0x424752['createContainerElement']('div'),_0x2fe6e3=_0x424752['createEmptyElement']('hr');return _0x424752['addClass']('ck-horizontal-line',_0x1be6ab),_0x424752['insert'](_0x424752['createPositionAt'](_0x1be6ab,0x0),_0x2fe6e3),_0x1be6ab;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x12cf59,{writer:_0x41f586,options:_0x1248d7})=>{if(!_0x1248d7['showCommentHighlights'])return null;const _0x176e96=_0x41f586['createContainerElement']('span'),_0x3514b6=_0x41f586['createEmptyElement']('img');return _0x41f586['addClass']('image-inline',_0x176e96),_0x41f586['insert'](_0x41f586['createPositionAt'](_0x176e96,0x0),_0x3514b6),_0x176e96;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5bda76,{writer:_0x3f28d0,options:_0x3ceb27})=>{if(_0x3ceb27['showCommentHighlights'])return _0x3f28d0['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x278c58,_0x2685c7,_0x1d07a0)=>{_0x1d07a0['options']['showCommentHighlights']&&_0x278c58['stop']();},{'priority':'high'});}}class r extends _0x3456c4{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(_0x37f28f){super(_0x37f28f),this['set']('isThreadsLoadingPaused',!0x0),_0x37f28f['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4bc0f4,_0x1fee18,_0x2be4d3,_0x450108)=>{const _0x2c7be9=_0x37f28f['plugins']['get'](o),_0x33ebdb=_0x2be4d3?ft(_0x2be4d3)['id']:null;_0x37f28f['model']['change'](()=>{if(_0x33ebdb){const _0x55c50b=this['getAllMarkersForId'](_0x33ebdb);for(const _0x526f89 of _0x55c50b)_0x37f28f['editing']['reconvertMarker'](_0x526f89);}if(_0x450108){const {id:_0x4d18f2}=ft(_0x450108),_0x237b46=_0x2c7be9['getCommentThread'](_0x4d18f2);if(_0x237b46&&_0x237b46['unlinkedAt'])return;if(_0x237b46&&!_0x237b46['isAttached'])return;const _0x3b6df4=this['getAllMarkersForId'](_0x4d18f2);for(const _0x39f7c3 of _0x3b6df4)_0x37f28f['editing']['reconvertMarker'](_0x39f7c3);}}),_0x33ebdb&&this['scrollToThreadMarker'](_0x33ebdb);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x3ce04d=this['editor'],_0x5b6e61=_0x3ce04d['plugins']['get'](o),_0x240199=_0x3ce04d['config']['get']('collaboration.channelId'),_0xd5ea3f=_0x5b6e61['getCommentThreads']()['filter'](_0x2bcfdd=>_0x2bcfdd['channelId']!==_0x240199);_0x3ce04d['commands']['add']('addCommentThread',new ot(_0x3ce04d)),this['listenTo'](_0x3ce04d,'change:isReadOnly',(_0x448fa9,_0x1c008c,_0x25ad23)=>{_0x5b6e61['switchReadOnly'](_0x25ad23,_0x3ce04d['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x5b6e61,dt('addCommentThread',_0x240199),(_0x2a539c,{threadId:_0x5bcbc8})=>{const _0x10c3e1=this['editor']['plugins']['get'](o)['getCommentThread'](_0x5bcbc8);_0x10c3e1?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5bcbc8);}),this['listenTo'](_0x5b6e61,dt('removeCommentThread',_0x240199),(_0x3a61b4,{threadId:_0x4f416d})=>{_0x3ce04d['model']['enqueueChange']({'isUndoable':!0x1},_0x1c4fff=>{const _0x16a42c=this['getAllMarkersForId'](_0x4f416d);for(const _0x514ec7 of _0x16a42c)_0x1c4fff['removeMarker'](_0x514ec7);});}),this['listenTo'](_0x5b6e61,dt('resolveCommentThread',_0x240199),(_0x3f3a5e,{threadId:_0x679f2})=>{(this['_reconvertMarkers'](_0x679f2),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x679f2)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x5b6e61,dt('reopenCommentThread',_0x240199),(_0x437c86,{threadId:_0xc05d4e})=>{this['_reconvertMarkers'](_0xc05d4e);},{'priority':'low'}),this['listenTo'](_0x5b6e61,dt('addComment',_0x240199),(_0x117a7e,{threadId:_0x4258e4,isFromAdapter:_0x3d2b26})=>{const _0x4972ad=this['getAllMarkersForId'](_0x4258e4);if(_0x3d2b26||0x0==_0x4972ad['length']||!_0x5b6e61['hasCommentThread'](_0x4258e4))return;0x1===_0x5b6e61['getCommentThread'](_0x4258e4)['length']&&_0x3ce04d['model']['enqueueChange']({'isUndoable':!0x1},_0xc87d78=>{for(const _0x697778 of _0x4972ad)_0xc87d78['updateMarker'](_0x697778,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xd5ea3f);}['afterInit'](){!async function(_0x41d13d){const _0x3df9df=_0x5965dd([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]),_0x555ac2=0x73460ab3,_0x49f0d3=0x73418093^_0x555ac2,_0x5f4308=window[_0x5965dd([0x44,0x61,0x74,0x65])][_0x5965dd([0x6e,0x6f,0x77])](),_0x58b191=_0x41d13d[_0x5965dd([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x34b964=new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55615f=>{_0x58b191[_0x5965dd([0x6f,0x6e,0x63,0x65])](_0x5965dd([0x72,0x65,0x61,0x64,0x79]),_0x55615f);}),_0x37a2f4={[_0x5965dd([0x6b,0x74,0x79])]:_0x5965dd([0x45,0x43]),[_0x5965dd([0x75,0x73,0x65])]:_0x5965dd([0x73,0x69,0x67]),[_0x5965dd([0x63,0x72,0x76])]:_0x5965dd([0x50,0x2d,0x32,0x35,0x36]),[_0x5965dd([0x78])]:_0x5965dd([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]),[_0x5965dd([0x79])]:_0x5965dd([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]),[_0x5965dd([0x61,0x6c,0x67])]:_0x5965dd([0x45,0x53,0x32,0x35,0x36])},_0x16d486=_0x58b191[_0x5965dd([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5965dd([0x67,0x65,0x74])](_0x5965dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x301589(){let _0x358088,_0x392204=null,_0x266c4a=null;try{if(_0x16d486==_0x5965dd([0x47,0x50,0x4c]))return _0x5965dd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x358088=_0x3efb0c(),!_0x358088)return _0x5965dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x358088[_0x5965dd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x266c4a=_0x2c617c(_0x358088[_0x5965dd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x358088[_0x5965dd([0x6a,0x74,0x69])])),await _0x4ce0e8()?_0x348630()?_0x5cd0be()?_0x5965dd([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x494400()?(_0x358088[_0x5965dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5965dd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x392204=_0x5344fd(_0x5965dd([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x371722()):_0x5965dd([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5965dd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5965dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5965dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5cd0be(){const _0x5a719d=[_0x5965dd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5965dd([0x74,0x72,0x69,0x61,0x6c])][_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x358088[_0x5965dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5f4308/0x3e8:0xe10*_0x49f0d3;return _0x358088[_0x5965dd([0x65,0x78,0x70])]<_0x5a719d;}function _0x348630(){const _0x27f42e=_0x358088[_0x5965dd([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x27f42e)return!0x1;if(_0x27f42e[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5965dd([0x2a])))return!0x0;if(_0x27f42e[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5965dd([0x43,0x4d,0x54])))return!0x0;if(_0x27f42e[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5965dd([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4f85fe())return!0x0;if(_0x27f42e[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5965dd([0x52,0x43,0x4d,0x54]))){if(_0x521333())return!0x0;if(_0x1a430d()||_0x42d35f())return!0x0;}return!0x1;}function _0x494400(){const _0x9c9506=_0x358088[_0x5965dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x9c9506||0x0==_0x9c9506[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1c7597}=new URL(window[_0x5965dd([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x9c9506[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c7597))return!0x0;const _0x5ce448=_0x1c7597[_0x5965dd([0x73,0x70,0x6c,0x69,0x74])](_0x5965dd([0x2e]));return _0x9c9506[_0x5965dd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x575549=>_0x575549[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5965dd([0x2a])))[_0x5965dd([0x6d,0x61,0x70])](_0x203ce7=>_0x203ce7[_0x5965dd([0x73,0x70,0x6c,0x69,0x74])](_0x5965dd([0x2e])))[_0x5965dd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x21d99d=>_0x21d99d[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5ce448[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5965dd([0x6d,0x61,0x70])](_0x384008=>Array(_0x5ce448[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x384008[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5965dd([0x66,0x69,0x6c,0x6c])](_0x384008[0x0]===_0x5965dd([0x2a])?_0x5965dd([0x2a]):'')[_0x5965dd([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x384008))[_0x5965dd([0x73,0x6f,0x6d,0x65])](_0x16ddca=>_0x5ce448[_0x5965dd([0x65,0x76,0x65,0x72,0x79])]((_0x35ca86,_0x4188fc)=>_0x16ddca[_0x4188fc]===_0x35ca86||_0x16ddca[_0x4188fc]===_0x5965dd([0x2a])));}function _0x371722(){return _0x392204&&_0x266c4a?new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x519798,_0x5d2f2f)=>{_0x392204[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x519798,_0x5d2f2f),_0x266c4a[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x29aa77=>{_0x29aa77!=_0x5965dd([0x56,0x61,0x6c,0x69,0x64])&&_0x519798(_0x29aa77);},_0x5d2f2f);}):_0x392204||_0x266c4a||_0x5965dd([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2c617c(_0x3839af,_0x1a5e9c){return new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1cbd5f=>{if(_0x2050f5())return _0x1cbd5f(_0x5965dd([0x56,0x61,0x6c,0x69,0x64]));_0x3613e0(),_0x58b191[_0x5965dd([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5965dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x9c7b5d=!0x1;const _0x1a57b2=_0x4e4b92();function _0x6b85a1(_0x2798fb){return!!_0x2798fb&&(typeof _0x2798fb===_0x5965dd([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2798fb===_0x5965dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2798fb[_0x5965dd([0x74,0x68,0x65,0x6e])]===_0x5965dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2798fb[_0x5965dd([0x63,0x61,0x74,0x63,0x68])]===_0x5965dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x47c510(_0x1879d9){_0x110d4c(_0x1879d9)[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x385fc4=>{if(!_0x385fc4||_0x385fc4[_0x5965dd([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5965dd([0x6f,0x6b]))return _0x5965dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x14d1d6(_0x4146db(_0x1a57b2+_0x1a5e9c))!=_0x385fc4[_0x5965dd([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5965dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5965dd([0x56,0x61,0x6c,0x69,0x64]);})[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x1f34ed=>(_0x37c84a(),_0x1f34ed),()=>{const _0x54e3d3=_0x1f05d9();return null==_0x54e3d3?(_0x37c84a(),_0x5965dd([0x56,0x61,0x6c,0x69,0x64])):_0x5965dd(_0x5f4308-_0x54e3d3>(0x574a8eb3^_0x555ac2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x1cbd5f)[_0x5965dd([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1cbd5f(_0x5965dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x32e589=0x7370e433^_0x555ac2;function _0x37c84a(){const _0x3b42bb=_0x5965dd([0x6c,0x6c,0x63,0x74,0x2d])+_0x14d1d6(_0x4146db(_0x3839af)),_0x44eabc=_0x16c8e3(_0x14d1d6(window[_0x5965dd([0x4d,0x61,0x74,0x68])][_0x5965dd([0x63,0x65,0x69,0x6c])](_0x5f4308/_0x32e589)));window[_0x5965dd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5965dd([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b42bb,_0x44eabc);}function _0x1f05d9(){const _0x1191fa=_0x5965dd([0x6c,0x6c,0x63,0x74,0x2d])+_0x14d1d6(_0x4146db(_0x3839af)),_0x4234fd=window[_0x5965dd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5965dd([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1191fa);return _0x4234fd?window[_0x5965dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x16c8e3(_0x4234fd),0x10)*_0x32e589:null;}function _0x110d4c(_0x57e957){return new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x33e07b,_0x164870)=>{_0x57e957[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x33e07b,_0x164870),window[_0x5965dd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x164870,0x7347de73^_0x555ac2);});}}_0x58b191[_0x5965dd([0x6f,0x6e])](_0x5965dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5ad2fc,_0x480286)=>{if(_0x480286[0x0]!=_0x3839af)return _0x1cbd5f(_0x5965dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x480286[0x1]={..._0x480286[0x1],[_0x5965dd([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1a57b2};},{[_0x5965dd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5965dd([0x68,0x69,0x67,0x68])}),_0x58b191[_0x5965dd([0x6f,0x6e])](_0x5965dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2cbe66=>{_0x6b85a1(_0x2cbe66[_0x5965dd([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x9c7b5d=!0x0,_0x47c510(_0x2cbe66[_0x5965dd([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5965dd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5965dd([0x6c,0x6f,0x77])}),_0x34b964[_0x5965dd([0x74,0x68,0x65,0x6e])](()=>{_0x9c7b5d||_0x1cbd5f(_0x5965dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2050f5(){return _0x58b191[_0x5965dd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5965dd([0x76,0x69,0x65,0x77])][_0x5965dd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5965dd([0x61,0x75,0x74,0x6f]);}function _0x3613e0(){_0x58b191[_0x5965dd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5965dd([0x76,0x69,0x65,0x77])][_0x5965dd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5965dd([0x61,0x75,0x74,0x6f]);}}function _0x5344fd(_0x559592){const _0x12bea7=[new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x209e80=>setTimeout(_0x209e80,0x734f347f^_0x555ac2)),_0x34b964[_0x5965dd([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17a4bf=>{let _0x1b372e=0x0;_0x58b191[_0x5965dd([0x6d,0x6f,0x64,0x65,0x6c])][_0x5965dd([0x6f,0x6e])](_0x5965dd([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x269c71,_0x433cab)=>{_0x433cab[0x0][_0x5965dd([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1b372e++,_0x1b372e==(0x73460f5b^_0x555ac2)&&(_0x17a4bf(),_0x269c71[_0x5965dd([0x6f,0x66,0x66])]());});}))];return window[_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5965dd([0x72,0x61,0x63,0x65])](_0x12bea7)[_0x5965dd([0x74,0x68,0x65,0x6e])](()=>_0x559592);}async function _0x2628cf(){await _0x34b964,_0x58b191[_0x5965dd([0x6d,0x6f,0x64,0x65,0x6c])][_0x5965dd([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4b34aa,_0x58b191[_0x5965dd([0x6d,0x6f,0x64,0x65,0x6c])][_0x5965dd([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4b34aa,_0x58b191[_0x5965dd([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5965dd([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4f85fe(){return window[_0x5965dd([0x67,0x6c,0x6f,0x62])]&&window[_0x5965dd([0x67,0x6c,0x6f,0x62])][_0x5965dd([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x521333(){return _0x1bb8d1(_0x5965dd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x47d5bf(_0x5965dd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5965dd([0x73,0x74,0x61,0x74,0x65])]==_0x5965dd([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1a430d(){return _0x1bb8d1(_0x5965dd([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 _0x42d35f(){return _0x1bb8d1(_0x5965dd([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5bc2ee(_0x2ad510){const _0x4ef83e=_0x58ccba();_0x58b191[_0x4ef83e]=_0x5965dd([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2ad510,_0x2ad510!=_0x5965dd([0x56,0x61,0x6c,0x69,0x64])&&_0x2628cf();}function _0x58ccba(){const _0x12f016=window[_0x5965dd([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5965dd([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5965dd([0x6e,0x6f,0x77])]())[_0x5965dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5965dd([0x2e]),'');let _0x262914=_0x5965dd([0x4b]);for(let _0x5c441e=0x0;_0x5c441e<_0x12f016[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5c441e+=0x2){let _0x4a225b=window[_0x5965dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x12f016[_0x5965dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5c441e,_0x5c441e+0x2));_0x4a225b>=_0x3df9df[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4a225b-=_0x3df9df[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x262914+=_0x3df9df[_0x4a225b];}return _0x262914;}function _0x3efb0c(){const _0x32518c=_0x16d486[_0x5965dd([0x73,0x70,0x6c,0x69,0x74])](_0x5965dd([0x2e]));if(0x3!=_0x32518c[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xe6e605(_0x32518c[0x1]);function _0xe6e605(_0x3d0432){const _0x3b3854=_0xd50de1(_0x3d0432);return _0x3b3854&&_0x259acb()?_0x3b3854:null;function _0x259acb(){const _0x2ed4e2=_0x3b3854[_0x5965dd([0x6a,0x74,0x69])],_0x59e36f=window[_0x5965dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2ed4e2[_0x5965dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2ed4e2[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5e0aa0={..._0x3b3854,[_0x5965dd([0x6a,0x74,0x69])]:_0x2ed4e2[_0x5965dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2ed4e2[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5e0aa0[_0x5965dd([0x76,0x63])],_0x4146db(_0x5e0aa0)==_0x59e36f;}}}async function _0x4ce0e8(){let _0x5f1129=!0x0;try{const _0x14f0b7=_0x16d486[_0x5965dd([0x73,0x70,0x6c,0x69,0x74])](_0x5965dd([0x2e])),[_0x5c0acf,_0x3aceac,_0x10d358]=_0x14f0b7;return _0x440b24(_0x5c0acf),await _0x8143c5(_0x5c0acf,_0x3aceac,_0x10d358),_0x5f1129;}catch{return!0x1;}function _0x440b24(_0x28f62f){const _0x199206=_0xd50de1(_0x28f62f);_0x199206&&_0x199206[_0x5965dd([0x61,0x6c,0x67])]==_0x5965dd([0x45,0x53,0x32,0x35,0x36])||(_0x5f1129=!0x1);}async function _0x8143c5(_0x543db6,_0x4fde99,_0x224941){const _0x39f821=window[_0x5965dd([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5965dd([0x66,0x72,0x6f,0x6d])](_0x372edd(_0x224941),_0x1b9ea6=>_0x1b9ea6[_0x5965dd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2b526b=new window[(_0x5965dd([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5965dd([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x543db6+_0x5965dd([0x2e])+_0x4fde99),_0xad8b6f=window[_0x5965dd([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5965dd([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xad8b6f)return;const _0x34a365=await _0xad8b6f[_0x5965dd([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5965dd([0x6a,0x77,0x6b]),_0x37a2f4,{[_0x5965dd([0x6e,0x61,0x6d,0x65])]:_0x5965dd([0x45,0x43,0x44,0x53,0x41]),[_0x5965dd([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5965dd([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5965dd([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xad8b6f[_0x5965dd([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5965dd([0x6e,0x61,0x6d,0x65])]:_0x5965dd([0x45,0x43,0x44,0x53,0x41]),[_0x5965dd([0x68,0x61,0x73,0x68])]:{[_0x5965dd([0x6e,0x61,0x6d,0x65])]:_0x5965dd([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x34a365,_0x39f821,_0x2b526b)||(_0x5f1129=!0x1);}}function _0xd50de1(_0x487e7a){return _0x487e7a[_0x5965dd([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5965dd([0x65,0x79]))?JSON[_0x5965dd([0x70,0x61,0x72,0x73,0x65])](_0x372edd(_0x487e7a)):null;}function _0x372edd(_0x2d8e58){return window[_0x5965dd([0x61,0x74,0x6f,0x62])](_0x2d8e58[_0x5965dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5965dd([0x2b]))[_0x5965dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5965dd([0x2f])));}function _0x4146db(_0xf3bc3e){let _0xaf18aa=0x1505;function _0x5c0c14(_0x45ca92){for(let _0x1ffbff=0x0;_0x1ffbff<_0x45ca92[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ffbff++){const _0x4f351=_0x45ca92[_0x5965dd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1ffbff);_0xaf18aa=(_0xaf18aa<<0x5)+_0xaf18aa+_0x4f351,_0xaf18aa&=_0xaf18aa;}}function _0x28e0d8(_0x333341){Array[_0x5965dd([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x333341)?_0x333341[_0x5965dd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x28e0d8):_0x333341&&typeof _0x333341==_0x5965dd([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5965dd([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x333341)[_0x5965dd([0x73,0x6f,0x72,0x74])]()[_0x5965dd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5d6e0e,_0x39c5aa])=>{_0x5c0c14(_0x5d6e0e),_0x28e0d8(_0x39c5aa);}):_0x5c0c14(window[_0x5965dd([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x333341));}return _0x28e0d8(_0xf3bc3e),_0xaf18aa>>>0x0;}function _0x14d1d6(_0x58e75d){return _0x58e75d[_0x5965dd([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5965dd([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5965dd([0x30]));}function _0x16c8e3(_0x312600){return _0x312600[_0x5965dd([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5965dd([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5965dd([0x6a,0x6f,0x69,0x6e])]('');}function _0x1bb8d1(_0x203684){return _0x58b191[_0x5965dd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5965dd([0x68,0x61,0x73])](_0x203684);}function _0x47d5bf(_0xc22f1e){return _0x58b191[_0x5965dd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5965dd([0x67,0x65,0x74])](_0xc22f1e);}function _0x4b34aa(){}function _0x5965dd(_0x25e439){return _0x25e439['map'](_0x5a98fb=>String['fromCharCode'](_0x5a98fb))['join']('');}_0x5bc2ee(await _0x301589());}(this);}['destroy'](){const _0x2bdd07=this['editor']['plugins']['get'](o),_0x5e07e2=this['editor']['config']['get']('collaboration.channelId');for(const _0x5e2a8e of _0x2bdd07['getCommentThreads']({'channelId':_0x5e07e2}))_0x2bdd07['_detachCommentThread'](_0x5e2a8e['id']),_0x2bdd07['_threads']['delete'](_0x5e2a8e['id']);super['destroy']();}['hasMarkerForId'](_0x581327){return this['getAllMarkersForId'](_0x581327)['length']>0x0;}['getAllMarkersForId'](_0x41d2dc){const _0x49491c=[];for(const _0x14de7d of this['editor']['model']['markers'])_0x14de7d['name']['startsWith']('comment:'+_0x41d2dc)&&_0x49491c['push'](_0x14de7d);return _0x49491c;}['scrollToThreadMarker'](_0x2c23e1){setTimeout(()=>{const _0x18dd85=this['_getTargetForId'](_0x2c23e1);if(!_0x18dd85)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2c23e1&&nt({'target':_0x18dd85[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3b479b){this['editor']['model']['change'](()=>{for(const _0x2fc63f of this['getAllMarkersForId'](_0x3b479b))this['editor']['editing']['reconvertMarker'](_0x2fc63f);});}['_attachArchivedThread'](_0x2608cc){const _0x45da9f=this['editor']['plugins']['get'](o),_0x62da13=this['editor']['plugins']['get'](b),_0x1dcd9e=_0x45da9f['getCommentThread'](_0x2608cc);if(!_0x1dcd9e['isAttached']){const _0x2a2ffc=_0x1dcd9e['attachTo'](()=>this['_getTargetForId'](_0x1dcd9e['id']));_0x62da13['registerAnnotation'](_0x2a2ffc),_0x1dcd9e['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x327ffd=this['editor'],_0x326967=_0x327ffd['plugins']['get'](it);_0x327ffd['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x115860,_0x3fa199)=>{const {id:_0x259d3e}=ft(_0x115860['markerName']),_0x31a66a=_0x327ffd['plugins']['get'](o)['getCommentThread'](_0x259d3e),_0x4a4208=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x259d3e;let _0x5ac08b;if(_0x31a66a&&_0x31a66a['isResolved']&&!_0x4a4208&&_0x115860['item'])return _0x3fa199['consumable']['consume'](_0x115860['item'],'addMarker:'+_0x115860['markerName']),_0x3fa199['consumable']['consume'](_0x115860['item'],'removeMarker:'+_0x115860['markerName']),null;const _0x3d4501=['ck-comment-marker'];return _0x4a4208&&_0x3d4501['push']('ck-comment-marker--active'),_0x5ac08b=_0x31a66a?.['length']?_0x31a66a['comments']['first']['author']['id']:_0x326967['me']['id'],{'classes':_0x3d4501,'attributes':{'data-comment':_0x259d3e,'data-author-id':_0x5ac08b}};}}),_0x327ffd['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x917661,{options:_0x71ae00})=>{if(_0x71ae00['showCommentHighlights'])return null;const _0xce3fd6=_0x327ffd['plugins']['get'](o),_0x1f118d=_0x327ffd['model']['markers']['get'](_0x917661),{id:_0x54ccae,part:_0x5821fd}=ft(_0x917661);return _0x1f118d&&!_0x1f118d['affectsData']||_0x71ae00['ignoreResolvedComments']&&_0xce3fd6['getCommentThread'](_0x54ccae)?.['isResolved']?null:{'group':'comment','name':_0x5821fd?_0x54ccae+':'+_0x5821fd:_0x54ccae};}}),_0x327ffd['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3a8437,{writer:_0x3d8018})=>_0x3d8018['createElement']('$marker',{'data-name':'comment:'+_0x3a8437['getAttribute']('id')})}),_0x327ffd['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x19b6d2=this['editor'],_0x1d9c1c=_0x19b6d2['plugins']['get'](o),_0x4cb8ae=new Set(),_0xa42114=new Set();_0x19b6d2['model']['document']['registerPostFixer'](_0x578e02=>{let _0x45332a=!0x1;for(const {name:_0x69314e,data:_0x293b52}of _0x19b6d2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5e338e,id:_0x2450e6}=ft(_0x69314e);let _0x4b0425=_0x293b52['newRange'];if('comment'!==_0x5e338e||!_0x4b0425)continue;const _0x4c150a='$graveyard'===_0x4b0425['root']['rootName'];_0x4c150a||(_0x4b0425=ht(_0x4b0425,_0x19b6d2['model']),!_0x4b0425||_0x4b0425['isCollapsed']||!_0x293b52['newRange']||_0x4b0425['isEqual'](_0x293b52['newRange']))?_0x19b6d2['model']['hasContent'](_0x4b0425)&&!_0x4c150a?this['isThreadsLoadingPaused']?_0x4cb8ae['add'](_0x69314e):this['_handleThreadMarker'](_0x69314e,_0x2450e6):(_0xa42114['add'](_0x69314e),_0x4cb8ae['delete'](_0x69314e),_0x578e02['removeMarker'](_0x69314e),_0x45332a=!0x0):(_0x578e02['updateMarker'](_0x69314e,{'range':_0x4b0425}),_0x45332a=!0x0);}return _0x45332a;}),this['on']('change:isThreadsLoadingPaused',(_0x22198d,_0x3d0233,_0x248584)=>{if(!_0x248584&&_0x4cb8ae['size'])for(const _0x5675af of _0x4cb8ae){const {id:_0x3b5885}=ft(_0x5675af);_0x4cb8ae['delete'](_0x5675af),_0x19b6d2['model']['markers']['get'](_0x5675af)&&this['_handleThreadMarker'](_0x5675af,_0x3b5885);}}),this['listenTo'](_0x19b6d2['model']['document'],'change',()=>{for(const {name:_0x553961,data:{newRange:_0x18e265}}of _0x19b6d2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x42841c,id:_0x5e8da2}=ft(_0x553961);if('comment'!==_0x42841c)continue;const _0x4b5b35=_0x1d9c1c['getCommentThread'](_0x5e8da2),_0xa8c597=this['hasMarkerForId'](_0x5e8da2);_0x4b5b35&&(!_0x4b5b35['_hasTargetInContent']&&_0x18e265&&_0x19b6d2['editing']['view']['once']('render',()=>{const _0x246689=_0x19b6d2['plugins']['get'](y),_0x7a4a1d=_0x1d9c1c['_threadToController']['get'](_0x4b5b35)['view'];_0x246689['getByInnerView'](_0x7a4a1d)['refreshVisibility']();},{'priority':'low'}),_0x4b5b35['_hasTargetInContent']=_0xa8c597||!!_0x18e265),_0x18e265||(_0xa42114['add'](_0x553961),_0x4cb8ae['delete'](_0x553961));}for(const _0x1b067d of _0xa42114){const {id:_0x2e2766}=ft(_0x1b067d),_0x255664=_0x1d9c1c['getCommentThread'](_0x2e2766);if(_0x4cb8ae['delete'](_0x1b067d),!_0x255664)continue;const _0x7fe8e9=this['hasMarkerForId'](_0x2e2766);_0x7fe8e9||_0x255664['isSubmitted']?_0x7fe8e9||_0x255664['unlinkedAt']||_0x255664['setUnlinkedAt'](new Date()):_0x255664['remove']();}_0xa42114['clear']();});}['_handleInitialThreads'](_0x16ec21){_0x16ec21['forEach'](_0xc17c95=>{_0xc17c95['unlinkedAt']&&this['_attachArchivedThread'](_0xc17c95['id']);});}['_getTargetForId'](_0x624b78){const _0x294ab0=this['editor'],_0x251aaa=this['getAllMarkersForId'](_0x624b78);return et(_0x294ab0['editing'],_0x251aaa);}['_getTextContext'](_0x1f6a81){const _0x2ce032=this['getAllMarkersForId'](_0x1f6a81);let _0x48b7c1='',_0x33d3fe=!0x1;for(const _0x29b096 of _0x2ce032){const _0x10615=_0x29b096['getRange']();for(const _0x3f3c25 of Array['from'](_0x10615['getItems']()))_0x3f3c25['is']('$textProxy')?(_0x48b7c1&&_0x33d3fe&&(_0x48b7c1+='\x20',_0x33d3fe=!0x1),_0x48b7c1+=_0x3f3c25['data']):_0x33d3fe=!0x0;_0x33d3fe=!0x0;}return _0x48b7c1['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x34e206,_0x26c8c2){const _0x2a08fd=this['editor'],_0x33ec7b=_0x2a08fd['plugins']['get'](o);let _0x402534=_0x33ec7b['getCommentThread'](_0x26c8c2);const _0x4968bd=_0x2a08fd['config']['get']('collaboration.channelId'),_0x1f2145=_0x2a08fd['plugins']['get'](b);if(_0x402534&&(_0x402534['unlinkedAt']&&_0x402534['setUnlinkedAt'](null),_0x402534['isAttached']))return _0x402534;return!this['getAllMarkersForId'](_0x26c8c2)[0x0]['managedUsingOperations']?_0x2a08fd['editing']['view']['once']('render',()=>{if(_0x33ec7b['getCommentThread'](_0x26c8c2))return;const _0x431318=_0x2a08fd['plugins']['get'](y);_0x402534=_0x33ec7b['openNewCommentThread']({'channelId':_0x4968bd,'threadId':_0x26c8c2,'target':()=>this['_getTargetForId'](_0x26c8c2),'context':{'type':'text','value':this['_getTextContext'](_0x26c8c2)}});const _0x5cd9ce=_0x33ec7b['_threadToController']['get'](_0x402534)['view'],_0x44ef02=_0x431318['getByInnerView'](_0x5cd9ce);_0x44ef02&&_0x1f2145['registerAnnotation'](_0x44ef02);},{'priority':'low'}):_0x33ec7b['fetchCommentThread']({'channelId':_0x4968bd,'threadId':_0x26c8c2})['then'](_0x3550e3=>{if('destroyed'!==_0x2a08fd['state']){if(_0x402534=_0x3550e3,_0x402534&&!_0x402534['isAttached']){const _0x5cb9e4=_0x402534['attachTo'](()=>this['_getTargetForId'](_0x26c8c2));_0x1f2145['registerAnnotation'](_0x5cb9e4),_0x402534['isResolved']&&this['_reconvertMarkers'](_0x26c8c2);}else{if(!_0x402534){const _0x16cad7=this['getAllMarkersForId'](_0x26c8c2);_0x2a08fd['model']['change'](_0x2834ec=>{for(const _0x372600 of _0x16cad7)_0x2834ec['removeMarker'](_0x372600);});}}}}),_0x402534;}['_handleThreadMarker'](_0x8939ce,_0x2064e2){const _0x17f620=this['_attachMarkerToThread'](_0x8939ce,_0x2064e2);_0x17f620&&!_0x17f620['context']&&_0x17f620['setContext']({'type':'text','value':this['_getTextContext'](_0x2064e2)});}['_initAriaMarkerChangeAnnouncements'](){const _0x42ddec=this['editor'];rt(_0x42ddec['model'],({left:_0x150811,entered:_0x207b3d})=>{for(const _0x3c9a34 of _0x150811)if(mt(_0x3c9a34)){_0x42ddec['ui']['ariaLiveAnnouncer']['announce'](N(_0x42ddec['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3a4e8d of _0x207b3d)if(mt(_0x3a4e8d)){_0x42ddec['ui']['ariaLiveAnnouncer']['announce'](N(_0x42ddec['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x465426)));break;}});}}function dt(_0x5461d7,_0x57d112){return _0x57d112?_0x5461d7+':'+_0x57d112:_0x5461d7;}function ht(_0x336471,_0xae1fb4){const _0x1acddc=_0xae1fb4['schema'],_0x2651f1=_0xae1fb4['createRange'](_0x336471['start']);for(const _0x4d40a7 of _0x336471['getWalker']()){const {type:_0x393938,item:_0x21bbd7,nextPosition:_0x283825}=_0x4d40a7;if('text'===_0x393938||_0x1acddc['isObject'](_0x21bbd7)){const _0x5a4921=_0xae1fb4['createPositionBefore'](_0x21bbd7);_0x2651f1['isCollapsed']&&(_0x2651f1['start']=_0x5a4921),_0x2651f1['end']=_0x283825;}}return _0x2651f1;}function mt(_0x21ce54){return'comment'===ft(_0x21ce54['name'])['group'];}class s extends _0x3456c4{['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 _0xfcae99=this['editor'],_0x441d14=_0xfcae99['plugins']['get'](o),_0x517ef3=_0xfcae99['plugins']['get'](r),_0x45861e=_0xfcae99['plugins']['get'](y),_0x262146=_0xfcae99['plugins']['get'](b);_0xfcae99['ui']['componentFactory']['add']('comment',()=>{const _0x1ff61b=this['_createUIButton'](_0x3487c4);return _0x1ff61b['tooltip']=!0x0,_0x1ff61b;}),_0xfcae99['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x2bf5f4)),_0x262146['addSourceCollector'](()=>{const _0x4899eb=[];for(const [_0x5df7b0,_0x374834]of _0x441d14['_threadToController']){const _0x3e0e8b=_0x517ef3['getAllMarkersForId'](_0x5df7b0['id']),_0x3c1244=_0x3e0e8b['map'](_0x102290=>_0x102290['getRange']());_0x3e0e8b['length']>0x0&&_0x4899eb['push']([_0x374834['view'],_0x3c1244]);}return _0x4899eb;}),this['listenTo'](_0x45861e,'change:activeAnnotations',(_0x53eaa8,_0x544d71,_0x1bbc99)=>{const _0x4c0e45=Array['from'](_0x1bbc99)['map'](_0x395de4=>_0x395de4['innerView'])['find'](_0x1285e2=>_0x441d14['_viewToController']['has'](_0x1285e2));if(!_0x4c0e45)return void(_0x517ef3['activeMarker']=null);const _0x471f91=_0x441d14['_viewToController']['get'](_0x4c0e45)['model']['id'],_0x1811a2='comment:'+_0x471f91;_0x471f91&&_0x517ef3['hasMarkerForId'](_0x471f91)?_0x517ef3['activeMarker']=_0x1811a2:_0x517ef3['activeMarker']&&(_0x517ef3['activeMarker']=null);}),this['listenTo'](_0x441d14,'removeCommentThread',(_0x42213c,{threadId:_0x1a5c71,isFromAdapter:_0x5eb4fc})=>{!_0x5eb4fc&&_0xfcae99['ui']['focusTracker']['isFocused']&&_0x517ef3['hasMarkerForId'](_0x1a5c71)&&_0xfcae99['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x441d14,'addComment',(_0xa13d9c,{threadId:_0xc0f765,isFromAdapter:_0x58df90})=>{if(_0x58df90||!_0x517ef3['hasMarkerForId'](_0xc0f765)||!_0x441d14['hasCommentThread'](_0xc0f765))return;0x1===_0x441d14['getCommentThread'](_0xc0f765)['length']&&(_0xfcae99['editing']['view']['focus'](),_0xa13d9c['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3251f0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x18f473;for(const _0x9cff5 in _0x3251f0){const _0x182c23=_0x9cff5,_0xe1dd89=_0x3251f0[_0x182c23];if('commentsLicenseKeyValid'==_0xe1dd89||'commentsLicenseKeyInvalid'==_0xe1dd89||'commentsLicenseKeyExpired'==_0xe1dd89||'commentsLicenseKeyDomainLimit'==_0xe1dd89||'commentsLicenseKeyNotAllowed'==_0xe1dd89||'commentsLicenseKeyEvaluationLimit'==_0xe1dd89||'commentsLicenseKeyUsageLimit'==_0xe1dd89){delete _0x3251f0[_0x182c23],_0x18f473=_0xe1dd89,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x18f473&&_0x3251f0['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x18f473&&_0x3251f0['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x18f473&&_0x3251f0['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x18f473&&_0x3251f0['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x18f473&&_0x3251f0['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x18f473&&_0x3251f0['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3dd0f3){const _0x3fb3e8=this['editor'],_0x3fcf7f=new _0x3dd0f3(_0x3fb3e8['locale']),_0x297916=_0x3fb3e8['commands']['get']('addCommentThread');return _0x3fcf7f['set']({'label':N(_0x3fb3e8['locale'],'Comment'),'icon':_0x13d93d}),_0x3fcf7f['bind']('isEnabled')['to'](_0x297916,'isEnabled',_0x297916,'hasContent',(_0x5c648a,_0x5a1bc5)=>_0x5c648a&&_0x5a1bc5),this['listenTo'](_0x3fcf7f,'execute',()=>{_0x297916['execute']();}),_0x3fcf7f;}}class i extends _0x3456c4{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x278e81){super(_0x278e81),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x470e32,_0x4d3798,_0x3233bc)=>{_0x3233bc?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x52b243,_0x201b48]of this['editor']['commands'])_0x201b48['affectsData']&&'addCommentThread'!==_0x52b243&&_0x201b48['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4cbfdf=this['editor']['editing']['view']['document'];this['listenTo'](_0x4cbfdf,'cut',_0x3319cf=>_0x3319cf['stop'](),{'priority':'highest'}),this['listenTo'](_0x4cbfdf,'clipboardInput',_0x383507=>_0x383507['stop'](),{'priority':'highest'}),this['listenTo'](_0x4cbfdf,'delete',_0x1a0527=>_0x1a0527['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x35f577,_0x379a4d]of this['editor']['commands'])_0x379a4d['affectsData']&&'addCommentThread'!==_0x35f577&&_0x379a4d['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x816dec{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2809ac){super(_0x2809ac),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1debe6=this['context']['plugins']['get'](y);this['listenTo'](_0x1debe6,'_activateAnnotation',(_0x4d93c1,_0x4f968b)=>{for(const _0x2908d0 of this['activeUIs']){const _0x46d23b=this['_uis']['get'](_0x2908d0);(0x0,this['uisData']['get'](_0x2908d0)['filter'])(_0x4f968b)&&_0x46d23b['setActiveAnnotation'](_0x4f968b);}}),this['listenTo'](_0x1debe6,'_deactivateAllAnnotations',()=>{for(const _0x470192 of this['activeUIs']){this['_uis']['get'](_0x470192)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1debe6['_visibleAnnotations'],'add',(_0x2e92be,_0x1b2902)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1b2902);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5b41a4){return this['activeUIs']['has'](_0x5b41a4);}['activate'](_0x3930b5,_0x5e12c1=this['defaultFilter']){const _0x487558=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3930b5))throw new _0x5199cf('annotationsuis-missing-ui',this,{'uiName':_0x3930b5});this['isActive'](_0x3930b5)&&this['deactivate'](_0x3930b5),this['activeUIs']['add'](_0x3930b5);const _0x5ca980=new S();v({'source':_0x487558['_visibleAnnotations'],'target':_0x5ca980,'filter':_0x5e12c1}),this['uisData']['set'](_0x3930b5,{'collection':_0x5ca980,'filter':_0x5e12c1});const _0x18de45=this['_uis']['get'](_0x3930b5);_0x18de45['attach'](_0x5ca980),this['listenTo'](_0x18de45,'change:activeAnnotation',(_0x55f104,_0x5c4802,_0x1a181e,_0x440edc)=>{_0x440edc&&_0x487558['_removeActiveAnnotation'](_0x440edc),_0x1a181e&&_0x487558['_addActiveAnnotation'](_0x1a181e);});}['deactivate'](_0x49bc41){if(this['activeUIs']['delete'](_0x49bc41),!this['_uis']['has'](_0x49bc41))throw new _0x5199cf('annotationsuis-missing-ui',this,{'uiName':_0x49bc41});const _0x4afe5f=this['_uis']['get'](_0x49bc41);_0x4afe5f['detach'](),this['stopListening'](_0x4afe5f),this['uisData']['get'](_0x49bc41)['collection']['destroy'](),this['uisData']['delete'](_0x49bc41);}['switchTo'](_0x56c7df){if(!this['_uis']['has'](_0x56c7df))throw new _0x5199cf('annotationsuis-missing-ui',this,{'uiName':_0x56c7df});const _0x2a38e1=this['context']['plugins']['get'](y),_0x62de6=Array['from'](_0x2a38e1['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x56c7df);const _0x550b72=this['_uis']['get'](_0x56c7df);_0x550b72['setActiveAnnotation'](_0x62de6),_0x550b72['_setSelectedAnnotations']&&_0x62de6&&_0x550b72['_setSelectedAnnotations']([_0x62de6]);}['deactivateAll'](){for(const _0x17f0f1 of this['activeUIs'])this['deactivate'](_0x17f0f1);}['register'](_0x1bf89a,_0xfa2275){if(this['_uis']['has'](_0x1bf89a))throw new _0x5199cf('annotationsuis-register-already-registered');if('function'!=typeof _0xfa2275['attach']||'function'!=typeof _0xfa2275['detach']||'function'!=typeof _0xfa2275['setActiveAnnotation'])throw new _0x5199cf('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1bf89a,_0xfa2275);}['refilterAnnotations'](){const _0x1d7a45=this['context']['plugins']['get'](y)['collection'],_0x1d1fcd=new Map(),_0x52b640=Array['from'](this['activeUIs']);for(const _0x4c3b18 of this['activeUIs']){const _0x19f107=this['uisData']['get'](_0x4c3b18)['collection'];for(const _0x223ea1 of _0x19f107)_0x1d1fcd['set'](_0x223ea1,_0x4c3b18);}for(const _0x3c47ed of _0x1d7a45){const _0x1edda2=_0x1d1fcd['get'](_0x3c47ed);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3c47ed);const _0x22f967=_0x52b640['find'](_0x291144=>this['uisData']['get'](_0x291144)['filter'](_0x3c47ed));_0x1edda2!==_0x22f967&&(_0x1edda2&&this['uisData']['get'](_0x1edda2)['collection']['remove'](_0x3c47ed),_0x22f967&&this['uisData']['get'](_0x22f967)['collection']['add'](_0x3c47ed));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4a52fe){const _0x888c43=[];for(const _0x21d4e5 of this['activeUIs']){(0x0,this['uisData']['get'](_0x21d4e5)['filter'])(_0x4a52fe)&&_0x888c43['push'](_0x21d4e5);}if(_0x888c43['length']>0x1)throw new _0x5199cf('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x888c43,'annotationType':_0x4a52fe['type']});}}const he=/* #__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(_0x3455be){super(_0x3455be),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x46271c,_0x3feeb6)=>_0x46271c+_0x3feeb6),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5da9e3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5da9e3['to']('isAnimationDisabled',_0x563e35=>_0x563e35?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5da9e3['to']('top',_0x3a3ef1=>Ot(_0x3a3ef1))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x25a77c=this['element']['clientHeight'];_0x25a77c&&(this['height']=_0x25a77c);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x816dec{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x50bf3f){super(_0x50bf3f),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 _0x51f58a=this['context']['config']['get']('sidebar.container');_0x51f58a&&this['setContainer'](_0x51f58a);}['setContainer'](_0x32d83d){if(!g(_0x32d83d))throw new _0x5199cf('sidebar-setcontainer-invalid-element');this['container']=_0x32d83d;}['_attachToContainer']({viewClass:_0x18d163='',spaceBetweenItems:_0x499048=0x19}={}){if(!g(this['container']))throw new _0x5199cf('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x18d163,this['_spaceBetweenItems']=_0x499048;}['rearrange']({removedAnnotation:_0x1cfaa1,previousAnnotation:_0x2bd870,nextAnnotation:_0x3eeee9}){const _0x4eb6e8=this['getSidebarItemView'](_0x1cfaa1);this['view']['list']['remove'](_0x4eb6e8),this['_destroySidebarItemView'](_0x1cfaa1),_0x2bd870&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2bd870)),_0x3eeee9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3eeee9)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2b1a7d,activatedAnnotation:_0x2ce51a,disableAnimationOnActivatedAnnotation:_0x155224}){if(this['_activeAnnotation']=_0x2ce51a,_0x2b1a7d){_0x2b1a7d['isActive']=!0x1;const _0x5f53c8=this['getSidebarItemView'](_0x2b1a7d);_0x5f53c8&&_0x155224&&(_0x5f53c8['isAnimationDisabled']=!0x1);}if(_0x2ce51a){const _0x720b9a=this['getSidebarItemView'](_0x2ce51a);_0x720b9a&&(_0x2ce51a['isActive']=!0x0,_0x155224&&(_0x720b9a['isAnimationDisabled']=!0x0,_0x720b9a['top']+=0x1),this['_alignToTargetRect'](_0x720b9a));}}['_detachFromContainer'](_0x24ee38){if(this['view']['element']['remove'](),_0x24ee38){for(const _0x59a70e of _0x24ee38)this['_destroySidebarItemView'](_0x59a70e);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xbcdf98,_0x2ed141){_0x2ed141||(_0x2ed141=_0xbcdf98['view']);const _0x32a09c=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x32a09c,_0xbcdf98),this['_annotationToSidebarItemView']['set'](_0xbcdf98,_0x32a09c),_0x32a09c['content']['add'](_0x2ed141),this['listenTo'](_0xbcdf98['view'],'change:targetRect',(_0x2d64e5,_0x4e800b,_0xb6d33c)=>{const _0x679b91=this['_getTargetTop'](_0xbcdf98,_0xb6d33c);_0x32a09c['_targetTop']!=_0x679b91&&(_0x32a09c['_targetTop']=_0x679b91,this['_setItemTop'](_0x32a09c,_0x679b91));}),this['listenTo'](_0x32a09c,'change:top',()=>{this['_recalculate'](_0x32a09c,'top');}),this['listenTo'](_0x32a09c,'change:bottom',()=>{this['_recalculate'](_0x32a09c,'bottom');}),this['_alignToTargetRect'](_0x32a09c);const _0x22f037=this['_getItemBefore'](_0x32a09c);if(_0x22f037)this['_alignAfterItem'](_0x22f037,_0x32a09c)||this['_alignToTargetRect'](_0x32a09c);else this['_alignToTargetRect'](_0x32a09c);return this['_updateLastItem'](),this['view']['list']['add'](_0x32a09c),_0x32a09c;}['_alignForTopChange'](_0x52a8f6){if(!_0x52a8f6['content']['length'])return;const _0x11af2b=this['_getItemBefore'](_0x52a8f6);if(!_0x11af2b)return;const _0x3ae634=this['_sidebarItemViewToAnnotation']['get'](_0x11af2b),_0x3961cd=this['_activeAnnotation'];_0x3961cd&&_0x3961cd===_0x3ae634?this['_alignAfterItem'](_0x11af2b,_0x52a8f6):this['_alignBeforeItem'](_0x52a8f6,_0x11af2b);}['_alignForBottomChange'](_0x1e5e8c){if(!_0x1e5e8c['content']['length'])return;const _0x391b65=this['_getItemAfter'](_0x1e5e8c);if(!_0x391b65)return;const _0x2916a7=this['_sidebarItemViewToAnnotation']['get'](_0x391b65),_0x4693d9=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x15f9b4=this['_activeAnnotation'];_0x15f9b4&&_0x15f9b4===_0x2916a7&&_0x4693d9?(this['_alignBeforeItem'](_0x391b65,_0x1e5e8c),this['_alignAfterItem'](_0x1e5e8c,_0x391b65)):_0x15f9b4&&_0x15f9b4===_0x2916a7?this['_alignBeforeItem'](_0x391b65,_0x1e5e8c):this['_alignAfterItem'](_0x1e5e8c,_0x391b65);}['_recalculate'](_0x380621,_0x5e81b0){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x418480,changedProp:_0x2871c7}of this['_recalculateBuffer'])'top'===_0x2871c7?this['_alignForTopChange'](_0x418480):this['_alignForBottomChange'](_0x418480);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x380621,'changedProp':_0x5e81b0});}['getSidebarItemView'](_0x227391){return this['_annotationToSidebarItemView']['get'](_0x227391);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x47aa4e){const _0x4e10ca=this['getSidebarItemView'](_0x47aa4e);this['stopListening'](_0x4e10ca),this['stopListening'](_0x47aa4e['view']),_0x4e10ca['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x47aa4e),this['_sidebarItemViewToAnnotation']['delete'](_0x4e10ca);}['_createSidebarView'](){const _0x36f706=new H(this['context']['locale']);return _0x36f706['render'](),this['on']('change:_lastItem',(_0x920869,_0x39e0fd,_0x2e73e0,_0x332c76)=>{_0x332c76&&_0x36f706['unbind']('minHeight'),_0x2e73e0?_0x36f706['bind']('minHeight')['to'](_0x2e73e0,'bottom'):_0x36f706['minHeight']=null;}),_0x36f706;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x295c7e){const _0x699071=this['_sidebarItemViewToAnnotation']['get'](_0x295c7e),_0x30ab34=_0x699071&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x699071)-0x1);return _0x30ab34&&this['getSidebarItemView'](_0x30ab34)||null;}['_getItemAfter'](_0x27fa43){const _0x204e8c=this['_sidebarItemViewToAnnotation']['get'](_0x27fa43),_0x388b82=_0x204e8c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x204e8c)+0x1);return _0x388b82&&this['getSidebarItemView'](_0x388b82)||null;}['_alignBeforeItem'](_0x5b3ecb,_0x538fe2){_0x5b3ecb['updateHeight']();const _0x2f8fd4=G(_0x538fe2['bottom']+this['_spaceBetweenItems'],_0x5b3ecb['top']);return!!_0x2f8fd4&&(this['_setItemTop'](_0x538fe2,_0x538fe2['top']-_0x2f8fd4),!0x0);}['_alignAfterItem'](_0x48c485,_0x430f97){_0x48c485['updateHeight']();const _0x19ab8d=G(_0x48c485['bottom']+this['_spaceBetweenItems'],_0x430f97['top']);return!!_0x19ab8d&&(this['_setItemTop'](_0x430f97,_0x430f97['top']+_0x19ab8d,!0x1),!0x0);}['_alignToTargetRect'](_0x3cd52e){const _0x24b4aa=this['_sidebarItemViewToAnnotation']['get'](_0x3cd52e);if(!_0x24b4aa||!_0x24b4aa['target']||!_0x24b4aa['targetRect'])return;const _0x4a805a=this['_getTargetTop'](_0x24b4aa,_0x24b4aa['targetRect']);this['_setItemTop'](_0x3cd52e,_0x4a805a);}['_getTargetTop'](_0x5f2442,_0x43f122){if(null===_0x43f122)return 0x0;if(_0x5f2442['target']instanceof _0x578f30)return _0x43f122['top'];{const _0x4ddc11=new _0x578f30(this['view']['element'])['top'];return _0x43f122['top']-_0x4ddc11;}}['_setItemTop'](_0x5d9b27,_0x31f38c,_0x7ad0f5=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x7ad0f5&&(_0x31f38c=Math['max'](_0x31f38c,this['_getMaxAvailableTop'](_0x5d9b27))),_0x5d9b27['top']=_0x31f38c;}['_getMaxAvailableTop'](_0xbcdb75){let _0x36348a=this['_getItemBefore'](_0xbcdb75),_0x4ae104=0x0;for(;_0x36348a;)_0x36348a['updateHeight'](),_0x4ae104+=this['_spaceBetweenItems']+_0x36348a['height'],_0x36348a=this['_getItemBefore'](_0x36348a);return _0x4ae104;}}function G(_0x440006,_0x43a43d){return Math['max'](_0x440006-_0x43a43d,0x0);}function g(_0x304ae4){return null!==_0x304ae4&&'object'==typeof _0x304ae4&&0x1===_0x304ae4['nodeType'];}class e extends _0x816dec{['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(_0x1733fb){super(_0x1733fb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x328140(),this['_refreshPositioningDebounced']=_0x9c41f3(()=>{_0x1733fb['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x16c460=this['context']['plugins']['get'](j),_0x252e91=this['context']['plugins']['get'](z);_0x16c460['register']('wideSidebar',this),_0x252e91['container']&&_0x16c460['switchTo']('wideSidebar');}['setActiveAnnotation'](_0xe34440){if(_0xe34440===this['activeAnnotation'])return;const _0x41526b=this['context']['plugins']['get'](z);_0x41526b['_activeAnnotation']=_0xe34440;const _0x38e8ef=this['activeAnnotation'];_0x41526b['refresh']({'blurredAnnotation':_0x38e8ef,'activatedAnnotation':_0xe34440}),this['activeAnnotation']=_0xe34440;}['attach'](_0x14aa6c){this['annotations']=_0x14aa6c;const _0x26f2e0=this['context']['plugins']['get'](z);if(_0x26f2e0['_annotations']=_0x14aa6c,this['isAttached'])throw new _0x5199cf('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x26f2e0,'set:container',()=>{this['detach'](),this['listenTo'](_0x26f2e0,'change:container',_0xf26d63=>{_0xf26d63['off'](),this['attach'](_0x14aa6c);});}),_0x26f2e0['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x46a868=_0x502eff=>{_0x502eff['updateTargetRect'](),_0x26f2e0['addAnnotation'](_0x502eff);};for(const _0x56f5db of _0x14aa6c)_0x46a868(_0x56f5db);this['listenTo'](_0x14aa6c,'add',(_0x3893f7,_0x549c20)=>{_0x46a868(_0x549c20);}),this['listenTo'](_0x14aa6c,'remove',(_0x7604cb,_0x3efd8c,_0x5e2fb5)=>{_0x26f2e0['rearrange']({'removedAnnotation':_0x3efd8c,'previousAnnotation':_0x14aa6c['get'](_0x5e2fb5-0x1),'nextAnnotation':_0x14aa6c['get'](_0x5e2fb5+0x1)}),_0x3efd8c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x14aa6c,'focus',(_0x5ba56e,_0x133291)=>{this['setActiveAnnotation'](_0x133291);}),this['listenTo'](_0x14aa6c,'blur',()=>{this['setActiveAnnotation'](null);});const _0x69b3ff=this['context']instanceof _0x30418b?this['context']['editors']:new _0x328140([this['context']]);for(const _0x47e869 of _0x69b3ff)this['_integrateWithEditorAnnotations'](_0x47e869);this['listenTo'](_0x69b3ff,'add',(_0x4cc976,_0x38db58)=>{this['listenTo'](_0x38db58,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x38db58);});}),this['listenTo'](_0x69b3ff,'remove',(_0x3bec6b,_0x448834)=>{_0x448834['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x448834['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5199cf('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1d8a3=this['context']['plugins']['get'](z);_0x1d8a3['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1d8a3),this['stopListening'](this['annotations']),this['context']instanceof _0x30418b&&this['stopListening'](this['context']['editors']);for(const _0x419f40 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x419f40);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3001cc){if(!_0x3001cc['plugins']['has']('EditorAnnotations'))return;const _0x52f45a=_0x3001cc['plugins']['get']('EditorAnnotations'),_0x3b184b=()=>{const _0x18ef0f=_0x52f45a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x18ef0f[0x0]||null);};this['listenTo'](_0x52f45a,'refresh',_0x3b184b),this['listenTo'](_0x52f45a,'blur',(_0x3e4c0a,{isAnnotationTracked:_0x5cb563})=>{this['activeAnnotation']&&_0x5cb563(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x52f45a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1abfe3=>{_0x52f45a['hasDomSelection']()&&(_0x3b184b(),_0x1abfe3['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x52f45a);}['_destroyEditorAnnotationsIntegration'](_0x4f2a86){this['stopListening'](_0x4f2a86),this['_editorAnnotations']['remove'](_0x4f2a86);}}class C extends _0x3487c4{['counterView'];constructor(_0x4f5f9d){super(_0x4f5f9d);const _0xfef9bc=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x41e478,_0x2f3a04)=>_0x41e478?'...':_0x2f3a04['toString']()),this['set']('annotationType',''),this['icon']=_0x13d93d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xfef9bc['to']('annotationType',_0x57556c=>'ck-annotation-counter__badge--'+_0x57556c),_0xfef9bc['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xfef9bc['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x816dec{['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(_0x20dcfd){super(_0x20dcfd),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x102c7a())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x328140(),this['_refreshPositioningDebounced']=_0x9c41f3(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3ead9c(this['context']['locale']),this['balloonPanelView']=new _0x32c4b2(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3d502b){this['annotations']=_0x3d502b;const _0x2353e5=this['context']['plugins']['get'](z),_0x327b23=this['balloonPanelView'];if(_0x2353e5['_annotations']=_0x3d502b,this['isAttached'])throw new _0x5199cf('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2353e5,'set:container',()=>{this['detach'](),this['listenTo'](_0x2353e5,'change:container',_0x1ed3fb=>{_0x1ed3fb['off'](),this['attach'](_0x3d502b);});}),_0x2353e5['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xcc001=_0x5cdc5e=>{const _0x3815d0=new C(this['context']['locale']);_0x2353e5['addAnnotation'](_0x5cdc5e,_0x3815d0),this['_annotationToNarrowView']['set'](_0x5cdc5e,_0x3815d0),_0x3815d0['bind']('isDirty','annotationType','number')['to'](_0x5cdc5e['view'],'isDirty','type','length'),_0x3815d0['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x327b23['content']['first']!==_0x5cdc5e['view']?(this['_showBalloon'](_0x5cdc5e),_0x5cdc5e['view']['element']['focus'](),this['setActiveAnnotation'](_0x5cdc5e)):this['setActiveAnnotation'](null);});};for(const _0x4438c8 of _0x3d502b)_0xcc001(_0x4438c8);this['listenTo'](_0x3d502b,'add',(_0x178f27,_0x31535c)=>{_0xcc001(_0x31535c);}),this['listenTo'](_0x3d502b,'remove',(_0x4d8556,_0x3ff287,_0x3eb677)=>{this['_annotationToNarrowView']['get'](_0x3ff287)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3ff287),_0x2353e5['rearrange']({'removedAnnotation':_0x3ff287,'previousAnnotation':_0x3d502b['get'](_0x3eb677-0x1),'nextAnnotation':_0x3d502b['get'](_0x3eb677+0x1)}),_0x3ff287===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3d502b,'focus',(_0x2fe50d,_0x28ccb4)=>{this['setActiveAnnotation'](_0x28ccb4);}),this['listenTo'](_0x3d502b,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2571ab,_0x57b0cf)=>{_0x57b0cf['keyCode']===_0x453b9a['esc']&&_0x327b23['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x327b23['content']['first']),this['_hideBalloon'](),_0x57b0cf['stopPropagation'](),_0x57b0cf['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1dad70,_0x33e1c1)=>{const _0x1eb866=_0x33e1c1['target'];_0x327b23['isVisible']&&_0x327b23['element']['contains'](_0x1eb866)||_0x2353e5['view']['element']['contains'](_0x1eb866)||_0x1dad70['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x1edf11=>_0x1edf11['contains'](_0x1eb866))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x57fd72=this['context']instanceof _0x30418b?this['context']['editors']:new _0x328140([this['context']]);for(const _0x49d0c9 of _0x57fd72)this['_integrateWithEditorAnnotations'](_0x49d0c9);this['listenTo'](_0x57fd72,'add',(_0x4de253,_0x5f4d20)=>{this['listenTo'](_0x5f4d20,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5f4d20);});}),this['listenTo'](_0x57fd72,'remove',(_0x364584,_0x3bf594)=>{_0x3bf594['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3bf594['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3d0e1a){if(_0x3d0e1a===this['activeAnnotation'])return;const _0x19671d=this['context']['plugins']['get'](z);if(_0x19671d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3d0e1a,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3d0e1a)_0x19671d['getSidebarItemView'](_0x3d0e1a)?this['_showBalloon'](_0x3d0e1a):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3d0e1a;}['detach'](){if(!this['isAttached'])throw new _0x5199cf('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x55ce9d=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3c5ce3=>_0x3c5ce3['destroy']()),this['_annotationToNarrowView']['clear'](),_0x55ce9d['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x30418b&&this['stopListening'](this['context']['editors']);for(const _0x33c0ac of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x33c0ac);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'](_0x93c891){if(!_0x93c891['plugins']['has']('EditorAnnotations'))return;const _0x194bfe=_0x93c891['plugins']['get']('EditorAnnotations'),_0x19a72b=this['context']['plugins']['get'](z),_0x3e68a9=this['annotations'],_0x3eeb8b=this['balloonPanelView'],_0x500b22=()=>{const _0x3f0ea5=_0x194bfe['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x3f0ea5),this['setActiveAnnotation'](_0x3f0ea5[0x0]||null);};this['listenTo'](_0x194bfe,'refresh',_0x500b22),this['listenTo'](_0x194bfe,'blur',(_0x59d867,{isAnnotationTracked:_0x2e89e1})=>{this['activeAnnotation']&&_0x2e89e1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x194bfe,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3e68a9,'blur',_0x2b3304=>{_0x194bfe['hasDomSelection']()&&_0x2b3304['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x19b7b0,_0x589806)=>{const _0x2d3c3c=_0x589806['target'];_0x3eeb8b['isVisible']&&_0x3eeb8b['element']['contains'](_0x2d3c3c)||_0x19a72b['view']['element']['contains'](_0x2d3c3c)||this['activeAnnotation']&&_0x194bfe['hasDomSelection']()&&(_0x500b22(),_0x19b7b0['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x194bfe);}['_destroyEditorAnnotationsIntegration'](_0x31f653){_0x31f653&&(this['stopListening'](_0x31f653),this['_editorAnnotations']['remove'](_0x31f653));}['_setSelectedAnnotations'](_0x5e4051){for(const _0x1c46b7 of this['_selectedAnnotations'])_0x5e4051['includes'](_0x1c46b7)||this['_manuallyClosedAnnotationViews']['delete'](_0x1c46b7['view']);this['_selectedAnnotations']=_0x5e4051;}['_refreshPositioning'](){const _0x368d5d=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x368d5d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x6cd5c){if(this['_manuallyClosedAnnotationViews']['has'](_0x6cd5c['view']))return;const _0x12edb6=this['balloonPanelView']['content']['first'];_0x12edb6!==_0x6cd5c['view']?(_0x12edb6&&this['_detachListeners'](_0x12edb6),this['_attachListeners'](_0x6cd5c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x6cd5c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x275fe=this['balloonPanelView']['content']['first'],_0x334317=_0x275fe&&this['annotations']['getByView'](_0x275fe);if(!_0x334317||!this['_annotationToNarrowView']['has'](_0x334317))return;const _0x25a512=this['_annotationToNarrowView']['get'](_0x334317)['element'],_0x40bea9=(function(){const _0x1a673a=_0x32c4b2['defaultPositions'];return[_0x1a673a['southArrowNorthEast'],_0x1a673a['northArrowSouthEast'],_0x1a673a['southArrowNorth'],_0x1a673a['northArrowSouth'],_0x1a673a['southArrowNorthWest'],_0x1a673a['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x25a512,'positions':_0x40bea9});}['_hideBalloon'](){const _0x113bde=this['balloonPanelView'],_0x27005b=_0x113bde['content']['first'];_0x27005b&&(this['_detachListeners'](_0x27005b),_0x113bde['unpin'](),_0x113bde['content']['clear']());}['_attachListeners'](_0x724b7a){this['listenTo'](_0x724b7a,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x724b7a,'Esc',(_0x4bb23f,_0x545ddc)=>{this['_manuallyClosedAnnotationViews']['add'](_0x724b7a),this['_hideBalloon'](),_0x545ddc();});}['_detachListeners'](_0x2ac819){this['stopListening'](_0x2ac819);}}class c extends _0x3456c4{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0xcf4250,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e5cbe){super(_0x1e5cbe),_0x1e5cbe['editing']['view']['addObserver'](_0x3b3a72),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1e5cbe['plugins']['get'](_0xcf4250),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x9c41f3(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x572df2=this['editor']['plugins']['get'](j);_0x572df2['context']===this['editor']&&(_0x572df2['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x7c6aac,_0x4094dc)=>{const _0x484086=this['_balloon'];if(this['isAttached']&&_0x484086['visibleView']){const _0x3de86e=this['annotations']['getByView'](_0x484086['visibleView']);_0x3de86e&&this['_closeAnnotation'](_0x3de86e),_0x4094dc();}}));}['afterInit'](){const _0x58415a=this['editor']['plugins']['get'](j);_0x58415a['context']===this['editor']&&(_0x58415a['hasActive']()||_0x58415a['switchTo']('inline'));}['setActiveAnnotation'](_0xaa82d3){_0xaa82d3!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0xaa82d3&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0xaa82d3)&&this['_addAnnotationToBalloon'](_0xaa82d3,!0x0),_0xaa82d3['isActive']=!0x0),_0xaa82d3||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0xaa82d3);}['attach'](_0x3f4a94){this['annotations']=_0x3f4a94;const _0x1492f0=this['editor']['plugins']['get'](j),_0xee24d0=this['_balloon'];if(this['isAttached'])throw new _0x5199cf('inlineannotations-attach-already-attached',this);if(_0x1492f0['context']!==this['editor'])throw new _0x5199cf('inlineannotations-not-allowed-with-context',this);const _0x31e7fd=this['editor']['plugins']['get'](b);this['listenTo'](_0x31e7fd,'refresh',()=>{const _0x1b93d5=_0x31e7fd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x5e5087,_0xcf67a5;!this['_forceRefresh']&&(_0x5e5087=_0x1b93d5,_0xcf67a5=this['_selectedAnnotations'],_0x5e5087['length']===_0xcf67a5['length']&&_0x5e5087['every'](_0x1d2803=>_0xcf67a5['includes'](_0x1d2803)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1b93d5),this['setActiveAnnotation'](_0x1b93d5[0x0]||null));}),this['listenTo'](_0x31e7fd,'blur',(_0x48eb73,{isAnnotationTracked:_0x268c2a})=>{this['activeAnnotation']&&_0x268c2a(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x31e7fd,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1b5abb,_0x2443cb,_0x5cf91c)=>{_0x5cf91c||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3f4a94,'remove',(_0x3ff071,_0x169246)=>{this['_removeAnnotationFromBalloon'](_0x169246),_0x169246===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xee24d0,'change:visibleView',(_0x2e5e76,_0x545677,_0x3239ef,_0x3727c0)=>{_0x3727c0&&this['stopListening'](_0x3727c0);const _0x3918de=_0x3f4a94['getByView'](_0x3239ef);_0x3239ef&&_0x3918de&&(this['listenTo'](_0x3239ef,'change:height',()=>{_0xee24d0['updatePosition']();}),this['listenTo'](_0x3239ef,'Esc',()=>{this['_closeAnnotation'](_0x3918de),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3918de&&this['setActiveAnnotation'](_0x3918de));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xee24d0['visibleView']&&(_0x3f4a94['getByView'](_0xee24d0['visibleView'])&&_0xee24d0['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 _0x5199cf('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2a777b of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2a777b);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x36ecf6){for(const _0x37c09f of this['_selectedAnnotations'])_0x36ecf6['includes'](_0x37c09f)||this['_manuallyClosed']['delete'](_0x37c09f);for(const _0x3e6616 of this['annotations'])_0x36ecf6['includes'](_0x3e6616)||this['_removeAnnotationFromBalloon'](_0x3e6616);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x44b95b of _0x36ecf6)this['_addAnnotationToBalloon'](_0x44b95b);}this['_selectedAnnotations']=_0x36ecf6;}['_addAnnotationToBalloon'](_0xe7cc99,_0x4a39a9=!0x1){this['_manuallyClosed']['has'](_0xe7cc99)||(this['_addedAnnotations']['has'](_0xe7cc99)||this['_balloon']['hasView'](_0xe7cc99['view'])||(this['_addedAnnotations']['add'](_0xe7cc99),this['_balloon']['add']({'stackId':_0xe7cc99['view']['id'],'view':_0xe7cc99['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xe7cc99)}})),_0x4a39a9&&this['_balloon']['showStack'](_0xe7cc99['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2c18f7){const _0x59f3ca=_0x2c18f7['target'],_0x179242=this['editor']['editing']['view'],_0x50eb44=_0x179242['document']['selection']['getFirstRange'](),_0x104000=_0x179242['domConverter']['viewRangeToDom'](_0x50eb44);if(_0x104000['collapse'](!0x0),_0x59f3ca){if(_0x59f3ca instanceof _0x578f30)return _0x59f3ca;let _0x180bd9=[];for(const _0x580c7a of _0x59f3ca)_0x180bd9['push'](...F(_0x580c7a['getClientRects']()));_0x180bd9=function(_0xbadea3){const _0x5c1a93=[];let _0xe367b=_0xbadea3[0x0];for(let _0x3a4a1b=0x1;_0x3a4a1b<_0xbadea3['length'];_0x3a4a1b++)P(_0xe367b,_0xbadea3[_0x3a4a1b])?_0xe367b['width']+=_0xbadea3[_0x3a4a1b]['width']:(_0x5c1a93['push'](_0xe367b),_0xe367b=_0xbadea3[_0x3a4a1b]);return _0x5c1a93['push'](_0xe367b),_0x5c1a93;}(_0x180bd9);const _0x4d04cc=_0x104000['getBoundingClientRect']();return _0x180bd9['find'](_0x324f9e=>_0x324f9e['top']<=_0x4d04cc['top']&&_0x324f9e['bottom']>=_0x4d04cc['bottom']&&_0x324f9e['left']<=_0x4d04cc['left']&&_0x324f9e['right']>=_0x4d04cc['right'])||_0x180bd9[0x0];}return _0x2c18f7['targetRect']||_0x104000;}['_removeAnnotationFromBalloon'](_0x366c23){this['_addedAnnotations']['has'](_0x366c23)&&this['_balloon']['hasView'](_0x366c23['view'])&&(this['_addedAnnotations']['delete'](_0x366c23),this['_balloon']['remove'](_0x366c23['view']));}['_closeAnnotation'](_0x428186){this['_manuallyClosed']['add'](_0x428186),this['_removeAnnotationFromBalloon'](_0x428186);}}function F(_0x3a1b22){return Array['from'](_0x3a1b22)['map'](DOMRect['fromRect']);}function P(_0x44d74e,_0x1ad265){return _0x44d74e['top']===_0x1ad265['top']&&_0x44d74e['bottom']===_0x1ad265['bottom']&&_0x44d74e['right']===_0x1ad265['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0xac2299,_0x45a59c){super(_0xac2299),this['set']('isEmpty',!_0x45a59c['length']),this['focusTracker']=new _0x4fd6f9(),this['_annotationViews']=_0x45a59c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x439bb2({'focusables':_0x45a59c,'focusTracker':this['focusTracker']}),this['listenTo'](_0x45a59c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x45a59c,'remove',(_0x221675,_0x2e1486)=>{_0x2e1486['isActive']&&this['focus'](),_0x45a59c['length']||(this['isEmpty']=!0x0);});const _0x5cf573=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0xac2299,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x45a59c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5cf573['if']('isEmpty','ck-hidden',_0x57dee5=>!_0x57dee5)]},'children':[{'text':N(_0xac2299,'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 _0x548f90 of this['_annotationViews'])this['focusTracker']['add'](_0x548f90['element']);this['_annotationViews']['on']('change',(_0x38e0c8,{added:_0x1de2e4,removed:_0x3ef2d9})=>{for(const _0x4534f7 of _0x1de2e4)this['focusTracker']['add'](_0x4534f7['element']);for(const _0x511106 of _0x3ef2d9)this['focusTracker']['remove'](_0x511106['element']);});}}class p extends _0x816dec{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5e1751){super(_0x5e1751),this['archivedThreads']=new _0x328140();}['init'](){const _0x45f636=this['context'],_0x2bb854=_0x45f636['plugins']['get'](o),_0x4070f6=_0x45f636['plugins']['get'](y);this['listenTo'](_0x2bb854,'addCommentThread',(_0x2cdb8a,{threadId:_0x3d0a27})=>{const _0x3eaecd=_0x2bb854['getCommentThread'](_0x3d0a27);_0x3eaecd['archivedAt']&&this['archivedThreads']['add'](_0x3eaecd,this['_calculatePosition'](_0x3eaecd['archivedAt'])),this['listenTo'](_0x3eaecd,'change:archivedAt',(_0x215cdf,_0x17cf08,_0x25356)=>{_0x25356?this['archivedThreads']['has'](_0x3eaecd)||this['archivedThreads']['add'](_0x3eaecd,this['_calculatePosition'](_0x3eaecd['archivedAt'])):this['archivedThreads']['has'](_0x3eaecd)&&this['archivedThreads']['remove'](_0x3eaecd);});}),this['listenTo'](_0x2bb854,'removeCommentThread',(_0xd8f7f6,{threadId:_0x15d772})=>{const _0x4f2699=_0x2bb854['getCommentThread'](_0x15d772);this['stopListening'](_0x4f2699),this['archivedThreads']['has'](_0x4f2699)&&this['archivedThreads']['remove'](_0x4f2699);},{'priority':'highest'}),this['listenTo'](_0x4070f6['collection'],'focus',(_0x1b7b13,_0x5174eb)=>{_0x5174eb['isVisible']||(_0x5174eb['isActive']=!0x0,_0x4070f6['activate'](_0x5174eb));});}['_calculatePosition'](_0x5eefa4){const _0x390d4b=[...this['archivedThreads']]['findIndex'](_0x50a674=>_0x50a674['archivedAt']<_0x5eefa4);return _0x390d4b>-0x1?_0x390d4b:this['archivedThreads']['length'];}}class a extends _0x3456c4{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x12cfd4];}constructor(_0x43c286){super(_0x43c286),this['annotationViews']=new _0x1539d8(),this['_pendingThreads']=[];}['init'](){const _0x7ec276=this['editor'],_0x548125=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x7ec276['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3487c4,!0x0)),_0x7ec276['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x303c78=this['_createCommentsArchiveButton'](_0x2bf5f4);return _0x303c78['set']({'role':'menuitemcheckbox'}),_0x303c78;});const _0xdb956d=_0x7ec276['plugins']['get'](p),_0x2c857b=_0x7ec276['plugins']['get']('Annotations'),_0x1becc7=_0x7ec276['plugins']['get']('CommentsRepository');_0xdb956d['archivedThreads']['forEach'](_0x1ef51d=>{this['_handleNewThread'](_0x1ef51d);}),this['listenTo'](_0xdb956d['archivedThreads'],'add',(_0x154952,_0x41954a)=>{this['_handleNewThread'](_0x41954a);}),this['listenTo'](_0x2c857b['collection'],'add',(_0x44aaa8,_0x2758e2)=>{const _0x231e20=this['_pendingThreads']['find'](_0x38bf53=>{const _0x228a18=_0x1becc7['_threadToController']['get'](_0x38bf53);return _0x228a18&&_0x2758e2['innerView']===_0x228a18['view'];});if(_0x231e20){const _0x4862c9=this['_calculatePosition'](_0x231e20['archivedAt']);this['_addAnnotationToArchive'](_0x2758e2,_0x4862c9),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x231e20),0x1);}}),this['listenTo'](_0xdb956d['archivedThreads'],'remove',(_0x3a15cc,_0x2cd1e3)=>{const _0x12f9b3=_0x7ec276['config']['get']('collaboration.channelId');if(!_0x12f9b3||_0x2cd1e3['channelId']===_0x12f9b3){if(this['_pendingThreads']['includes'](_0x2cd1e3))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2cd1e3),0x1);else{const _0x223872=_0x1becc7['_threadToController']['get'](_0x2cd1e3),_0x41e903=_0x2c857b['getByInnerView'](_0x223872['view']);this['annotationViews']['remove'](_0x41e903['view']),this['stopListening'](_0x41e903),this['stopListening'](_0x41e903['focusableElements']);}}}),this['listenTo'](_0x2c857b['collection'],'add',(_0x1bba06,_0xc6be8e)=>{this['listenTo'](_0xc6be8e,'escape',_0x548125);}),this['listenTo'](_0x2c857b['collection'],'remove',(_0x2146ed,_0x5a2234)=>{this['stopListening'](_0x5a2234,'escape',_0x548125);});}['_addAnnotationToArchive'](_0xb11825,_0x18ee8a){this['listenTo'](_0xb11825,'set:isVisible',_0x194c87=>{_0x194c87['return']=!0x1,_0x194c87['stop']();}),this['annotationViews']['add'](_0xb11825['view'],_0x18ee8a);}['_handleNewThread'](_0x3aeff2){const _0x5c5e9d=this['editor']['plugins']['get']('CommentsRepository'),_0x3bf35c=this['editor']['plugins']['get']('Annotations'),_0x38af07=this['editor']['config']['get']('collaboration.channelId');if(!_0x38af07||_0x3aeff2['channelId']===_0x38af07){const _0x35bb82=_0x5c5e9d['_threadToController']['get'](_0x3aeff2);if(!_0x35bb82)return void this['_pendingThreads']['push'](_0x3aeff2);const _0x50227d=this['_calculatePosition'](_0x3aeff2['archivedAt']),_0x278b9d=_0x3bf35c['getByInnerView'](_0x35bb82['view']);_0x278b9d['isVisible']&&_0x3bf35c['_visibleAnnotations']['remove'](_0x278b9d),this['_addAnnotationToArchive'](_0x278b9d,_0x50227d);}}['_calculatePosition'](_0x2ec552){const _0x5dd884=this['editor']['config']['get']('collaboration.channelId'),_0x2af204=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x21a4a3=>_0x21a4a3['channelId']===_0x5dd884)['findIndex'](_0x5c4c44=>_0x5c4c44['archivedAt']<_0x2ec552);return _0x2af204<0x0||_0x2af204>this['annotationViews']['length']?this['annotationViews']['length']:_0x2af204-0x1;}['_toggleDialog'](){const _0x45ffe5=this['editor'],_0x416f24=_0x45ffe5['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x45ffe5['locale'],this['annotationViews'])),'commentsArchive'===_0x416f24['id']?_0x416f24['hide']():_0x416f24['show']({'id':'commentsArchive','title':N(_0x45ffe5['locale'],'COMMENTS_ARCHIVE'),'icon':_0xeb0d29,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x31a583['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x56a06d,_0x419f60=!0x1){const _0x4058b7=this['editor']['locale'],_0x3c6934=this['editor']['plugins']['get']('Dialog'),_0x2c98ba=new _0x56a06d(_0x4058b7);return _0x2c98ba['bind']('isEnabled')['to'](this,'isEnabled'),_0x2c98ba['bind']('isOn')['to'](_0x3c6934,'id',_0x561896=>'commentsArchive'===_0x561896),_0x2c98ba['set']({'label':N(_0x4058b7,'COMMENTS_ARCHIVE'),'icon':_0xeb0d29,'isToggleable':!0x0}),_0x419f60&&(_0x2c98ba['tooltip']=!0x0),this['listenTo'](_0x2c98ba,'execute',()=>this['_toggleDialog']()),_0x2c98ba;}['_hideDialogOnAnnotationEscape']=_0x1e79c7=>{const _0x3db0ce=_0x1e79c7['source'];if(!this['annotationViews']['has'](_0x3db0ce['view']))return;const _0x2fada1=this['editor']['plugins']['get']('Dialog');_0x2fada1['isOpen']&&'commentsArchive'===_0x2fada1['id']&&(_0x2fada1['hide'](),_0x1e79c7['stop']());};}class Comments extends _0x3456c4{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,Comment,CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x3f1d3e,ContextPlugin as _0x31c274,PendingActions as lt,Command as _0x21b16f,Plugin as _0x54d97b,Context as _0x3bc62d}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3e3135,uid as _0x2d6822,KeystrokeHandler as jt,FocusTracker as _0x4b2a0a,diff as _0x354261,Collection as _0x17fbc7,Rect as _0xfcb820,CKEditorError as _0x4aef9b,first as _0x3a059c,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x567b6c,keyCodes as _0x9de3a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x5c0f58,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x520f75,trimHtml as ts,LateFocusDropdownButtonView as _0x4fe876,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x370f0a}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,cloneDeep as wt,set as yt,unset as Ct,isEqual as At,debounce as _0x1e5060}from'es-toolkit/compat';import{IconUndo as _0x233475,IconCheck as _0x1c8780,IconPencil as _0x43fb32,IconRemoveComment as _0x3d6769,IconThreeVerticalDots as _0x2f08a6,IconAddComment as _0x302b28,IconCommentsArchive as _0x512a11}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x1ab4f9,ButtonView as _0x177eb7,ViewCollection as _0x4104d5,createDropdown as _0x5071f5,ListView as _0x2b1bbc,focusChildOnDropdownOpen as _0x31b86d,ListItemView as _0x480466,MenuBarMenuListItemButtonView as _0x50f430,BodyCollection as _0x5d956a,BalloonPanelView as _0x1ab431,ContextualBalloon as _0x128450,Dialog as _0x4ffb8b,DialogViewPosition as _0x4717fb}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x54081c}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x2e9853}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x3abfff}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3e3135(){['model'];['view'];constructor(_0x4d0b59,_0x12c1ad){super(),this['model']=_0x4d0b59,this['model']['_isAttached']=!0x0,this['view']=_0x12c1ad,this['listenTo'](_0x12c1ad,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x12c1ad,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x12c1ad,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x12c1ad,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x12c1ad,'addComment',(_0x3072c0,_0x540471)=>this['addComment'](_0x540471)),this['listenTo'](_0x12c1ad,'updateComment',(_0x5b7e3d,_0x5a1e72,_0x108fd2)=>this['updateComment'](_0x5a1e72,_0x108fd2)),this['listenTo'](_0x12c1ad,'removeComment',(_0x298833,_0xd1296a)=>this['removeComment'](_0xd1296a));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1e710c){this['model']['addComment']({'content':_0x1e710c,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3a6c8a,_0x209c5a){this['model']['getComment'](_0x3a6c8a)['update']({'content':_0x209c5a});}['removeComment'](_0x374a3d){this['model']['getComment'](_0x374a3d)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x1e840d,_0x4ef47b,_0x132492){const t=_0x1e840d['t'];switch(_0x4ef47b){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'},_0x132492);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'},_0x132492);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'},_0x132492);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'},_0x132492);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x132492);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'},_0x132492);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'},_0x132492);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'},_0x132492);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x14016f,_0x27d7e0){super(_0x14016f);const _0x56997c=_0x2d6822();this['main']=this['createCollection'](),this['editable']=new Vt(_0x14016f,_0x27d7e0,void 0x0,{'label':()=>N(_0x14016f,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x14016f['uiLanguageDirection'],'lang':_0x14016f['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x56997c},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x2590ec){super(_0x2590ec),this['view']=new Rt(_0x2590ec['locale'],_0x2590ec['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2409b8=this['editor']['editing']['view'],_0x10ed07=this['view']['editable'],_0x5db615=_0x2409b8['document']['getRoot']();_0x10ed07['name']=_0x5db615['rootName'],this['view']['render']();const _0x456799=_0x10ed07['element'];this['setEditableElement'](_0x10ed07['name'],_0x456799),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2409b8['attachDomRoot'](_0x456799),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3e3135(_0x3f1d3e){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x16dae2={}){function _0x521dd1(_0x46e374){return _0x46e374['map'](_0x50410e=>String['fromCharCode'](_0x50410e))['join']('');}(_0x16dae2=Object['assign']({},_0x16dae2))['plugins']||(_0x16dae2['plugins']=hs['defaultPlugins']),super(_0x16dae2),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x521dd1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x521dd1([0x76,0x69,0x65,0x77])][_0x521dd1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x521dd1([0x61,0x75,0x74,0x6f]),this[_0x521dd1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x521dd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x521dd1([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x521dd1([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x521dd1([0x6f,0x6b])});}['create'](){const _0x2a852a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2a852a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1faae3=>{const _0x38526a=this['model']['document']['getRoot'](),_0x4d426c=_0x38526a&&_0x38526a['getChild'](_0x38526a['childCount']-0x1);_0x1faae3['setSelection'](_0x4d426c,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xe0011=this['editing']['view'],_0x48f9f6=_0xe0011['document']['getRoot'](),_0x5037c4=_0x48f9f6['getChild'](0x0);_0x48f9f6['childCount']>0x1||!_0x5037c4||'p'!=_0x5037c4['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0xe0011,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5037c4['placeholder']=this['placeholder']),Ft({'view':_0xe0011,'element':_0x5037c4,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5037c4);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4df6a6,_0x23ac6d={}){super(_0x4df6a6),this['editor']=null,this['_editorConfig']=_0x23ac6d,this['set']('value',_0x23ac6d['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x4df6a6,'Reply...')),this['set']('submitLabel',N(_0x4df6a6,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4b2a0a(),this['focusCycler']=new _0x1ab4f9({'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',(_0x1b9047,_0x49c005)=>{this['cancelButtonView']['fire']('execute'),_0x49c005();}),this['keystrokes']['set']('Ctrl+Enter',(_0x80db17,_0x22f6d0)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x22f6d0());}),this['on']('submit',(_0x4be53b,_0x545abe)=>{_0x545abe['length']>0xfde8?(alert(N(_0x4df6a6,'TOO_LONG_COMMENT_ALERT',[_0x545abe['length'],0xfde8])),_0x4be53b['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x34ebfb=this['editor'];this['element']['insertBefore'](_0x34ebfb['ui']['element'],this['element']['firstChild']),_0x34ebfb['model']['document']['on']('change',()=>this['value']=_0x34ebfb['getData']()),_0x34ebfb['bind']('placeholder')['to'](this),this['focusables']['add'](_0x34ebfb['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x43df8f){-0x1===_0x43df8f?(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:_0x1e1f10}=this,_0x28dd41=new _0x177eb7(_0x1e1f10);return _0x28dd41['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x28dd41['withText']=!0x0,_0x28dd41['bind']('label')['to'](this,'submitLabel'),_0x28dd41['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x28dd41['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5db13c,_0x106899)=>!_0x106899&&!!_0x5db13c['trim']()),_0x28dd41;}['_createCancelButton'](){const {locale:_0x344e9c}=this,_0x1be353=new _0x177eb7(_0x344e9c);return _0x1be353['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1be353['label']=N(_0x344e9c,'Cancel'),_0x1be353['withText']=!0x0,_0x1be353['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1be353;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x41ec94=>{this['focusTracker']['add'](_0x41ec94['element']);}),this['focusables']['on']('change',(_0x316e9d,_0x226de4)=>{for(const _0x350f65 of Array['from'](_0x226de4['added'])['reverse']())this['focusTracker']['add'](_0x350f65['element']);});}}class ie extends kt{constructor(_0x3bb039,_0x2f503e,_0x3ff150){super(_0x3bb039),this['commentInputView']=new es(_0x3bb039,_0x3ff150),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x189bfe,_0x7e1dbb)=>_0x189bfe||!!_0x7e1dbb),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 _0x5c0f58(_0x3bb039,_0x2f503e),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'](_0x50b748){this['commentInputView']['focus'](_0x50b748);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x339ad5,_0x12ba8f)=>{const {submitButtonView:_0x4ff7df,cancelButtonView:_0x1e3467,editor:_0x36df6a}=this['commentInputView'];[_0x4ff7df['element'],_0x1e3467['element'],_0x36df6a?_0x36df6a['editing']['view']['getDomRoot']():null]['filter'](_0x5ae68d=>_0x5ae68d)['some'](_0x26f641=>_0x26f641['contains'](_0x12ba8f['target']))||(this['focus'](),_0x12ba8f['preventDefault']());});}}class rs extends kt{constructor(_0x329f63){super(_0x329f63);const _0x4ccc16=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4ccc16['to']('count',_0x34ed38=>N(_0x329f63,'NUMBER_OF_COMMENTS',_0x34ed38))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x37f80a,_0x226e80,_0x76c928){super(_0x37f80a);const _0x2d10dd=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x226e80['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x226e80,this['_config']=_0x76c928,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4b2a0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ab4f9({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x58c47c=>this['commentViews']['map'](_0x4ffe67=>_0x4ffe67['element'])['includes'](_0x58c47c['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x37f80a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3a2549=>_0x3a2549-this['_config']['maxCommentsWhenCollapsed']);for(const _0x352ec1 of _0x226e80['comments'])this['_handleNewCommentModel'](_0x352ec1);this['_handleInfoComment'](),this['listenTo'](_0x226e80['comments'],'add',(_0x1f29b5,_0x5fd903)=>{const _0x16e35a=this['_calculatePosition'](_0x5fd903);this['length']++,this['_handleNewCommentModel'](_0x5fd903,_0x16e35a),this['refreshVisibleViews']();}),this['listenTo'](_0x226e80['comments'],'remove',(_0x45fb07,_0x130870)=>{this['length']--,this['_handleRemoveCommentModel'](_0x130870),this['refreshVisibleViews']();}),this['listenTo'](_0x226e80,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x226e80,'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',_0x2d10dd['if']('length','ck-hidden',_0x8299c8=>!_0x8299c8)],'aria-label':N(_0x37f80a,'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'](_0xd2ee48){-0x1===_0xd2ee48?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x12d09c of this['commentViews'])_0x12d09c['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1ebdd1,_0x3d11e3){const _0x55310f=new this['_config']['CommentView'](this['locale'],_0x1ebdd1,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x55310f['viewUid']=_0x1ebdd1['id'],_0x55310f['delegate']('removeComment')['to'](this),_0x55310f['delegate']('updateComment')['to'](this),_0x55310f['delegate']('resolveCommentThread')['to'](this),_0x55310f['delegate']('editorReady')['to'](this),_0x55310f['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x55310f,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x55310f,_0x3d11e3);}['_calculatePosition'](_0xa471f9){const _0x344075=this['_model']['_findOptimalIndex'](_0xa471f9);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xa471f9['authoredAt']?_0x344075-0x1:_0x344075:_0x344075-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x24fa98={'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'],_0x24fa98,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x24fa98));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1f1158){const _0x7d9136=this['commentViews']['remove'](_0x1f1158['id']);this['stopListening'](_0x7d9136),_0x7d9136['isEditMode']&&this['_updateHasDirtyComment'](),_0x7d9136['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3e7e20=>_0x3e7e20['isEditMode']);}['_rearrangeCollapse'](){const _0x4c5a7d=function(_0x101e33){const _0x44c866=new _0x17fbc7();for(const _0x402280 of _0x101e33)_0x44c866['add'](_0x402280);return _0x44c866;}(this['commentViews']),_0x4fe262=this['_collapsedCommentsView']['count'];for(let _0x357879=0x1;_0x357879<=_0x4fe262;_0x357879++)_0x4c5a7d['remove'](0x1);for(const _0x4312b4 of _0x4c5a7d)_0x4312b4['collapse']();_0x4fe262>0x0&&_0x4c5a7d['add'](this['_collapsedCommentsView'],0x1),ns(_0x354261(Array['from'](this['visibleViews']),Array['from'](_0x4c5a7d)),this['visibleViews'],_0x4c5a7d);}['_rearrangeExpand'](){ns(_0x354261(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x54b55b of this['visibleViews'])_0x54b55b['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1bd3fb=>{this['focusTracker']['add'](_0x1bd3fb['element']),this['keystrokes']['listenTo'](_0x1bd3fb['element']);}),this['commentViews']['on']('change',(_0x343d24,_0x1b7a54)=>{for(const _0x90358b of _0x1b7a54['removed'])this['focusTracker']['remove'](_0x90358b['element']),this['keystrokes']['stopListening'](_0x90358b['element']);for(const _0x242eb2 of Array['from'](_0x1b7a54['added'])['reverse']())this['focusTracker']['add'](_0x242eb2['element']),this['keystrokes']['listenTo'](_0x242eb2['element']);});}}function ns(_0x20052a,_0x2f29f0,_0x526967){let _0x35aac6=0x0;for(const _0x4683d7 of _0x20052a)switch(_0x4683d7){case'insert':_0x2f29f0['add'](_0x526967['get'](_0x35aac6),_0x35aac6),_0x35aac6++;break;case'delete':_0x2f29f0['remove'](_0x35aac6);break;case'equal':_0x35aac6++;}}class oe extends kt{constructor(_0x23c584){super(_0x23c584);const _0x568480=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x568480['to']('contextValue',_0x5b1919=>N(_0x23c584,'THREAD_CONTEXT_LABEL',_0x5b1919)),'tabindex':-0x1},'children':[{'text':_0x568480['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x552a39,_0x271195){super(_0x552a39);const _0x583fa1=this['bindTemplate'];this['_model']=_0x271195,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4b2a0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ab4f9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x2e5fa8=>!!_0x2e5fa8),this['bind']('contextValue')['to'](this['_model'],'context',_0x5001e9=>_0x5001e9&&_0x5001e9['value']?this['_trimContextValue'](_0x5001e9['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',_0x583fa1['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 _0x87d80b=new _0x177eb7(this['locale']);return _0x87d80b['label']=N(this['locale'],'Reopen'),_0x87d80b['tooltip']=N(this['locale'],'Reopen'),_0x87d80b['icon']=_0x233475,_0x87d80b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1c0ed1=>!_0x1c0ed1),_0x87d80b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x14818c,_0x2d1d3b)=>_0x14818c&&_0x2d1d3b),_0x87d80b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x87d80b;}['_trimContextValue'](_0x1c590a){if(_0x1c590a['length']<0x96)return _0x1c590a;const _0xce067d=_0x1c590a['lastIndexOf']('\x20',0x93);return _0x1c590a['substring'](0x0,_0xce067d>-0x1?_0xce067d:0x93)+'...';}['_attachContextActions'](){const _0x257d8c=this['element']['querySelector']('.ck-context'),_0x3b350e=_0x257d8c['querySelector']('.ck-context__value');this['listenTo'](_0x257d8c,'mouseenter',()=>{_0x3b350e['offsetWidth']<_0x3b350e['scrollWidth']&&_0x257d8c['classList']['add']('overlay');}),this['listenTo'](_0x257d8c,'mouseleave',()=>{_0x257d8c['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2b90eb of this['focusables'])this['focusTracker']['add'](_0x2b90eb['element']),this['keystrokes']['listenTo'](_0x2b90eb['element']);}['_createContextView'](){const _0x2dafd2=new oe(this['locale']);return _0x2dafd2['bind']('contextValue')['to'](this),_0x2dafd2;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x58b3f0,_0x42192b,_0x23bfe8,_0x182d1c){super(_0x58b3f0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x42192b,this['_localUser']=_0x23bfe8,this['_config']=_0x182d1c,this['commentThreadHeaderView']=new Xt(_0x58b3f0,_0x42192b),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x58b3f0,N(_0x58b3f0,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x58b3f0,_0x42192b,Object['assign']({'CommentView':this['_config']['CommentView']},_0x182d1c)),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',(_0x202aa3,_0x4a8683)=>_0x202aa3||!!_0x4a8683),this['bind']('isUnlinked')['to'](_0x42192b,'unlinkedAt',_0x4d9c83=>!!_0x4d9c83),this['bind']('ariaLabel')['to'](this,'length',_0x425225=>{const _0x34efe8=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x425225,_0x34efe8]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4b2a0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ab4f9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x23da56=>_0x23da56['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2542c1=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x22c29f=_0x2542c1['commentInputView'];return _0x2542c1['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x22c29f,'value',(_0x3dfac4,_0x5acf9b,_0x5dfc38,_0x3c694c,_0x230ea4)=>!!_0x230ea4||!!_0x3c694c&&_0x5dfc38&&!_0x5acf9b||_0x3dfac4&&_0x5dfc38&&!_0x5acf9b),_0x22c29f['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x24a28a,_0x3ad59b,_0x3ae3ba)=>{let _0x5b3efc;return _0x5b3efc=_0x3ae3ba&&_0x3ad59b?'Reply\x20to\x20reopen\x20discussion...':_0x24a28a?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5b3efc);}),_0x22c29f['bind']('submitLabel')['to'](this,'length',_0x4c3333=>N(this['locale'],_0x4c3333?'Reply':'Comment')),_0x22c29f['on']('submit',(_0x534e05,_0x563ead)=>{this['fire']('addComment',_0x563ead),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x22c29f['on']('cancel',()=>{this['focus']();}),_0x22c29f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x22c29f['on']('cancel',_0x4502a4=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4502a4['stop']());}),this['on']('change:isActive',(_0xa4d9d0,_0x2c7fef,_0x444f13)=>{_0x444f13||this['length']||_0x22c29f['value']||this['fire']('removeCommentThread');}),_0x2542c1;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0xb3a8c,_0x533189,_0x2455fb,_0x3cd672){super(_0xb3a8c,_0x533189,_0x2455fb,_0x3cd672),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xb3a8c,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3c3544,_0x96e09b,_0xb74af)=>{_0xb74af||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x6880be,_0x59ca69,_0xe837d7)=>{_0xe837d7&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x22bb63=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x22bb63['if']('isActive','ck-thread--active'),_0x22bb63['if']('isUnlinked','ck-thread--unlinked'),_0x22bb63['to']('actionIndicator',_0x1d0205=>_0x1d0205?'ck-thread--'+_0x1d0205:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x22bb63['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 _0xb26264 of this['commentsListView']['commentViews'])_0xb26264['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x2d03e9}=this,_0xdca83c=this['commentsListView']['commentViews']['get'](0x0);_0xdca83c===this['_boundFirstCommentView']||_0xdca83c['isSystemComment']||(this['_boundFirstCommentView']=_0xdca83c,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0xdca83c,'actionIndicator',_0x53d546=>'remove'===_0x53d546?'remove':null),_0xdca83c['placeholder']=N(_0x2d03e9,'Write\x20a\x20comment...'),_0xdca83c['removeButton']['on']('execute',_0x47090b=>{_0x47090b['stop'](),this['showConfirm'](N(_0x2d03e9,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0xdca83c['focus']();}),_0xdca83c['actionBar']['add'](this['resolveButton'],0x0),_0xdca83c['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x289a8c=new _0x520f75(this['locale']);return _0x289a8c['label']=N(this['locale'],'Resolve'),_0x289a8c['tooltip']=N(this['locale'],'Resolve'),_0x289a8c['icon']=_0x1c8780,_0x289a8c['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x289a8c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x277017=>!_0x277017),_0x289a8c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2b7b54,_0x37c070)=>_0x2b7b54&&!_0x37c070),_0x289a8c['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x289a8c;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x385b0c){super(_0x385b0c),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1d428c,_0x31b6bd,_0x142ca6)=>{this['element']['innerHTML']=_0x142ca6;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x2809b6,_0x52d4b3,_0x1e14ee){super(_0x2809b6),this['_model']=_0x52d4b3,this['_config']=_0x1e14ee,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x52d4b3,'content',_0x52d4b3,'authoredAt',(_0x22fb36,_0x814e1a)=>N(_0x2809b6,'COMMENT_ARIA_LABEL',[_0x52d4b3['author']['name'],_0x1e14ee['formatDateTime'](_0x814e1a),new DOMParser()['parseFromString'](_0x22fb36,'text/html')['body']['textContent'],_0x52d4b3['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x2809b6,N(_0x2809b6,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x4104d5(),this['focusTracker']=new _0x4b2a0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ab4f9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x51a185=>_0x51a185['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 _0x5c46f1=new is(this['locale']);return _0x5c46f1['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x26ec80,_0x1ff5f9)=>_0x1ff5f9?ts(_0x26ec80,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x26ec80),_0x5c46f1;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x3b83a5=new es(this['locale'],this['_config']['editorConfig']);return _0x3b83a5['value']=this['_model']['content'],_0x3b83a5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3b83a5['submitLabel']=N(this['locale'],'Save'),_0x3b83a5['on']('submit',(_0x1d0fe4,_0x5f2c8b)=>{this['fire']('updateComment',this['_model']['id'],_0x5f2c8b),this['switchToDisplayMode'](),this['focus']();}),_0x3b83a5['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x3b83a5['once']('editorReady',()=>{_0x3b83a5['focus']();}),_0x3b83a5['createEditor'](),_0x3b83a5['delegate']('editorReady')['to'](this),_0x3b83a5['delegate']('editorDestroyed')['to'](this),_0x3b83a5;}['_setupKeyboardNavigation'](){const _0x23ae40=this['element'];this['keystrokes']['listenTo'](_0x23ae40);for(const _0x241757 of this['focusables'])this['focusTracker']['add'](_0x241757['element']),this['keystrokes']['listenTo'](_0x241757['element']);this['focusables']['on']('change',(_0x295458,_0x34a0b2)=>{for(const _0x5a5fea of _0x34a0b2['removed'])this['focusTracker']['remove'](_0x5a5fea['element']),this['keystrokes']['stopListening'](_0x5a5fea['element']);for(const _0x154055 of _0x34a0b2['added'])this['focusTracker']['add'](_0x154055['element']),this['keystrokes']['listenTo'](_0x154055['element']);}),this['keystrokes']['set']('enter',(_0x168b60,_0x178513)=>{_0x23ae40===_0x168b60['target']&&(this['focusCycler']['focusFirst'](),_0x178513());}),this['keystrokes']['set']('esc',(_0x24bb74,_0x436efa)=>{_0x23ae40!==_0x24bb74['target']&&(this['focus'](),_0x436efa());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x3ffe59,_0x56f836,_0x59f5e1){super(_0x3ffe59,_0x56f836,_0x59f5e1),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x3ffe59,'Reply...')),this['bind']('authoredAt')['to'](_0x56f836),this['bind']('resolvedAt')['to'](_0x56f836),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 _0x5c0f58(_0x3ffe59,_0x56f836['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x56f836,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x48e7f3=this['bindTemplate'],_0x2bb337=[{'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':_0x48e7f3['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x48e7f3['to']('authoredAt',_0x1db55d=>this['_config']['formatDateTime'](_0x1db55d))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x48e7f3['if']('isEditMode','ck-comment__actions--hidden'),_0x48e7f3['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']&&_0x2bb337['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x48e7f3['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x48e7f3['if']('isEditMode','ck-comment--edit'),_0x48e7f3['if']('isSystemComment','ck-comment--info'),_0x48e7f3['to']('actionIndicator',_0x23c9ff=>_0x23c9ff?'ck-comment--'+_0x23c9ff:'')],'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':_0x2bb337}]}]};}['_createEditButton'](){const _0x1199b5=new _0x177eb7(this['locale']);return _0x1199b5['label']=N(this['locale'],'Edit'),_0x1199b5['icon']=_0x43fb32,_0x1199b5['withText']=!0x0,_0x1199b5['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1199b5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4b21d5=>!_0x4b21d5),_0x1199b5['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1199b5['on']('execute',()=>this['switchToEditMode']()),_0x1199b5;}['_createRemoveButton'](){const _0x10fb2d=new _0x177eb7(this['locale']);return _0x10fb2d['label']=N(this['locale'],'Remove'),_0x10fb2d['icon']=_0x3d6769,_0x10fb2d['withText']=!0x0,_0x10fb2d['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x10fb2d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x241bc0=>!_0x241bc0),_0x10fb2d['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x10fb2d['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x10fb2d;}['_createDropdown'](){const _0x332f64=_0x5071f5(this['locale'],_0x4fe876),_0x19ea2c=_0x332f64['panelView']['children'],_0x2c1f0c=new _0x2b1bbc(this['locale']),_0x578b6d=_0x332f64['bindTemplate'];_0x31b86d(_0x332f64,()=>this['items']['find'](_0x5e6c9a=>_0x5e6c9a['isVisible'])),_0x332f64['extendTemplate']({'attributes':{'class':[_0x578b6d['if']('isVisible','ck-hidden',_0x2e4677=>!_0x2e4677)]}});const _0x26d38a=(_0x2202fe,_0x350fdc=-0x1)=>{const _0x2b7104=new _0x480466(this['locale']);_0x2b7104['children']['add'](_0x2202fe);const _0x46cf60=_0x350fdc>-0x1?_0x350fdc:_0x2c1f0c['items']['length'];_0x2c1f0c['items']['add'](_0x2b7104,_0x46cf60);const _0x5b328c=Array['from'](this['items']);_0x332f64['unbind']('isEnabled','isVisible'),_0x332f64['bind']('isEnabled')['toMany'](_0x5b328c,'isEnabled',(..._0x1e7de1)=>_0x1e7de1['some'](_0xc180a5=>_0xc180a5)),_0x332f64['bind']('isVisible')['toMany'](_0x5b328c,'isVisible',(..._0x370011)=>_0x370011['some'](_0x29f259=>_0x29f259));};_0x332f64['panelPosition']='sw',_0x332f64['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x2f08a6});for(const _0x2d2c98 of this['items'])_0x26d38a(_0x2d2c98);return _0x19ea2c['add'](_0x2c1f0c),_0x332f64['listenTo'](this['items'],'add',(_0x52d300,_0x248d14,_0x2edded)=>{_0x26d38a(_0x248d14,_0x2edded);}),_0x332f64['listenTo'](this['items'],'remove',(_0x545e4d,_0x3837ec,_0x3f1a8d)=>{_0x2c1f0c['items']['remove'](_0x3f1a8d);}),_0x332f64;}['_attachActions'](_0x52cb20,_0x48cd29){const _0x53b0ee=_0x52cb20&&_0x52cb20['element'];_0x53b0ee&&(this['listenTo'](_0x53b0ee,'mouseenter',()=>this['actionIndicator']=_0x48cd29),this['listenTo'](_0x53b0ee,'focus',()=>this['actionIndicator']=_0x48cd29),this['listenTo'](_0x53b0ee,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x53b0ee,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x375dd1=super['_createCommentInputView']();return _0x375dd1['bind']('placeholder')['to'](this),_0x375dd1;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x28f34a){const _0x26e09c=Dt(_0x28f34a,0x1e),_0x33df3b=new MutationObserver(_0x40ecfa=>{for(const _0x5a0d87 of _0x40ecfa)('attributes'==_0x5a0d87['type']&&'class'==_0x5a0d87['attributeName']||'childList'==_0x5a0d87['type']||'characterData'==_0x5a0d87['type'])&&_0x26e09c();});return{'attach'(_0x5064af){_0x33df3b['observe'](_0x5064af,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x33df3b['disconnect'](),_0x26e09c['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x22f654,_0x402bb6){super(_0x22f654),this['id']=_0x2d6822(),this['focusTracker']=new _0x4b2a0a(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x274c14,_0x5358cb)=>this['fire']('Esc',_0x5358cb)),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'](_0x402bb6),this['mainView']=_0x402bb6;const _0x408cb1=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x408cb1['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 _0x49b808=this['element']['clientHeight'];_0x49b808&&(this['height']=_0x49b808);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3e3135(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x303a0e,target:_0xd4bf94,type:_0x36518d,isVisible:_0x272a11=!0x0}){super(),this['view']=_0x303a0e,this['view']['element']||this['view']['render'](),this['_type']=_0x36518d,this['_target']=_0xd4bf94,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x17fbc7([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x205ce5,_0x416c48)=>{this['view']['focusTracker']['add'](_0x416c48);}),this['focusableElements']['on']('remove',(_0x7178c7,_0x543885)=>{this['view']['focusTracker']['remove'](_0x543885);}),this['set']('isVisible',_0x272a11);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x41566b=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x41566b),_0x41566b;}get['targetRect'](){const _0x1eb655=this['target'];if(null===_0x1eb655)return null;if(_0x1eb655 instanceof _0xfcb820)return _0x1eb655;const _0x160595=_0x1eb655['filter'](_0x29e797=>function(_0x3f4756){const _0x548cd3=_0x3f4756['offsetParent'];if(_0x548cd3)return!0x0;const _0x3d1c93=_0x3f4756['getClientRects']()['item'](0x0);return!!_0x3d1c93;}(_0x29e797));return 0x0===_0x160595['length']?null:new _0xfcb820(_0x160595[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5ad3cc){this['view']['isActive']=_0x5ad3cc,this['view']['mainView']['isActive']=_0x5ad3cc;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x1b7532){if(!(null===_0x1b7532||_0x1b7532 instanceof _0xfcb820||Array['isArray'](_0x1b7532)&&_0x1b7532['every'](_0x1b5ca4=>re(_0x1b5ca4))))throw new _0x4aef9b('annotation-invalid-target',null,{'target':_0x1b7532});}['_getNormalizedTarget'](){const _0xf354d7='function'==typeof this['_target']?this['_target']():this['_target'];return re(_0xf354d7)?[_0xf354d7]:_0xf354d7;}}function re(_0x5704b0){return null!==_0x5704b0&&'object'==typeof _0x5704b0&&'nodeType'in _0x5704b0&&0x1===_0x5704b0['nodeType'];}class S extends _0x17fbc7{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x210258=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4b2a0a(),this['_focusTracker']['on']('change:isFocused',(_0x30f2a3,_0xd35aae,_0x4dd2fc)=>{_0x4dd2fc||this['fire']('blur');});for(const _0x603b21 of _0x210258)this['add'](_0x603b21);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3d4fce){if(this['has'](_0x3d4fce))throw new _0x4aef9b('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3d4fce['innerView'],_0x3d4fce),this['_viewToAnnotation']['set'](_0x3d4fce['view'],_0x3d4fce);for(const _0x497f7a of _0x3d4fce['focusableElements'])this['_focusTracker']['add'](_0x497f7a);this['listenTo'](_0x3d4fce['focusableElements'],'add',(_0x481212,_0x157203)=>{this['_focusTracker']['add'](_0x157203);}),this['listenTo'](_0x3d4fce['focusableElements'],'remove',(_0x55eb21,_0x34efe9)=>{this['_focusTracker']['remove'](_0x34efe9);}),this['listenTo'](_0x3d4fce['view']['focusTracker'],'change:isFocused',(_0x4dcf45,_0x18bf45,_0x3d3b3b)=>{_0x3d3b3b&&this['fire']('focus',_0x3d4fce);}),_0x3d4fce['updateTargetRect']();const _0x8ca630=this['_getOrderInContent'](_0x3d4fce['view']['targetRect']);return super['add'](_0x3d4fce,_0x8ca630);}['remove'](_0x193614){if(!this['has'](_0x193614))throw new _0x4aef9b('annotationcollection-not-existing-item',null);this['stopListening'](_0x193614['view']['focusTracker']),this['stopListening'](_0x193614['focusableElements']);for(const _0xf5d5 of _0x193614['focusableElements'])this['_focusTracker']['remove'](_0xf5d5);return this['_viewToAnnotation']['delete'](_0x193614['view']),this['_innerViewToAnnotation']['delete'](_0x193614['innerView']),super['remove'](_0x193614);}['getByInnerView'](_0x28dbec){return this['_innerViewToAnnotation']['get'](_0x28dbec);}['getByView'](_0x854e94){return this['_viewToAnnotation']['get'](_0x854e94);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x183449 of this)_0x183449['updateTargetRect']();this['_sort']();}['_sort'](){const _0x56625e=Array['from'](this)['sort']((_0x5ae6ab,_0x12f95d)=>w(_0x5ae6ab['view']['targetRect'],_0x12f95d['view']['targetRect']));for(let _0x1c7775=_0x56625e['length']-0x1;_0x1c7775>0x0;_0x1c7775--){const _0x5261bb=_0x56625e[_0x1c7775];_0x1c7775!==this['getIndex'](_0x5261bb)&&(this['remove'](_0x5261bb),this['add'](_0x5261bb));}}['_getOrderInContent'](_0x38ca61){let _0x5c4110=0x0;if(!_0x38ca61)return this['length'];for(const _0x5d9486 of this){const _0x23ca64=_0x5d9486['view']['targetRect'];if(_0x23ca64){if(w(_0x38ca61,_0x23ca64)<0x0)return _0x5c4110;_0x5c4110++;}}return _0x5c4110;}}function v({source:_0x38674d,target:_0x45b0b9,filter:_0x13b367}){for(const _0x552621 of _0x38674d)_0x13b367(_0x552621)&&_0x45b0b9['add'](_0x552621);_0x45b0b9['listenTo'](_0x38674d,'add',(_0x5f8ed3,_0x1982b0)=>{_0x13b367(_0x1982b0)&&_0x45b0b9['add'](_0x1982b0);}),_0x45b0b9['listenTo'](_0x38674d,'remove',(_0x2ce90f,_0x248dd6)=>{_0x45b0b9['has'](_0x248dd6)&&_0x45b0b9['remove'](_0x248dd6);});}function w(_0x14c99c,_0x21fd4b){if(null===_0x14c99c&&null===_0x21fd4b)return 0x0;if(null===_0x14c99c)return-0x1;if(null===_0x21fd4b)return 0x1;const _0x3d6448=_0x14c99c['top']-_0x21fd4b['top'];return 0x0==_0x3d6448?_0x14c99c['left']-_0x21fd4b['left']:_0x3d6448;}class y extends _0x31c274{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19107c){if(super(_0x19107c),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x19107c instanceof _0x3f1d3e){const _0x58c5fd=_0x19107c['locale'];_0x19107c['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x58c5fd,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x58c5fd,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x58c5fd,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x58c5fd,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x58c5fd,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x58c5fd,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x58c5fd,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x36f5dd){this['collection']['add'](_0x36f5dd);}['remove'](_0x1babbf){this['collection']['remove'](_0x1babbf),_0x1babbf['destroy']();}['refreshVisibility'](){for(const _0x1da28e of this['collection'])_0x1da28e['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x517c97){return this['collection']['getByInnerView'](_0x517c97);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4dabfa of this['collection'])_0x4dabfa['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x59a5e8){this['fire']('_activateAnnotation',_0x59a5e8);}['createAnnotation'](_0xf43114){return new T(_0xf43114);}['createAnnotationView'](_0x4f6a17,_0x3d6826){return new E(_0x4f6a17,_0x3d6826);}['_addActiveAnnotation'](_0x394186){const _0x9ec084=new Set(this['activeAnnotations']);_0x9ec084['add'](_0x394186),this['activeAnnotations']=_0x9ec084;}['_removeActiveAnnotation'](_0x22d32a){const _0x464b62=new Set(this['activeAnnotations']);_0x464b62['delete'](_0x22d32a),this['activeAnnotations']=_0x464b62;}['_bindAnnotationsToVisibleAnnotations'](){const _0x580dea=this['collection'],_0x73ad91=this['_visibleAnnotations'];function _0x4fd5ef(_0xd87ac3){const _0x518387=_0xd87ac3['source'];_0x518387['isVisible']&&!_0x73ad91['has'](_0x518387)?_0x73ad91['add'](_0x518387):!_0x518387['isVisible']&&_0x73ad91['has'](_0x518387)&&_0x73ad91['remove'](_0x518387),_0x518387['view']['focusTracker']['remove'](_0x518387['view']['element']),_0x518387['view']['focusTracker']['add'](_0x518387['view']['element']);}this['listenTo'](_0x580dea,'add',(_0x498915,_0x1e743f)=>{_0x1e743f['isVisible']&&_0x73ad91['add'](_0x1e743f),this['listenTo'](_0x1e743f,'change:isVisible',_0x4fd5ef);}),this['listenTo'](_0x580dea,'remove',(_0x239952,_0x474bfc)=>{_0x73ad91['has'](_0x474bfc)&&_0x73ad91['remove'](_0x474bfc),this['stopListening'](_0x474bfc,'change:isVisible',_0x4fd5ef);});}['_setupEnterAnnotationKeystroke'](){const _0x1b63eb=_0x23c529=>{_0x23c529['on']('ready',()=>{_0x23c529['keystrokes']['set'](_0x2e9853,(_0x497cef,_0x307114)=>{const _0x5ad78d=_0x3a059c(this['activeAnnotations']['values']());_0x5ad78d&&(_0x5ad78d['view']['focus'](),_0x307114());});});};this['context']instanceof _0x3f1d3e?_0x1b63eb(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xb4aa72,_0x523d04)=>{_0x1b63eb(_0x523d04);});}['_setupEscapeAnnotationHandling'](){const _0x168544=_0x149a0c=>{const _0x443f9b=_0x149a0c['source'],_0x242c8b=[];let _0x52c029;if(Array['isArray'](_0x443f9b['target'])){_0x52c029=_0x443f9b['target'][0x0],this['context']instanceof _0x3f1d3e?_0x242c8b['push'](this['context']):this['context']['editors']&&_0x242c8b['push'](...this['context']['editors']);for(const _0x13a0e6 of _0x242c8b)for(const _0xc170ca of _0x13a0e6['editing']['view']['domRoots']['values']())if(_0xc170ca['contains'](_0x52c029))return void _0x13a0e6['editing']['view']['focus']();_0x52c029['focus']();}};this['listenTo'](this['collection'],'add',(_0x2764fb,_0x28f88d)=>{this['listenTo'](_0x28f88d,'escape',_0x168544,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5bfd48,_0x3b7d77)=>{this['stopListening'](_0x3b7d77,'escape',_0x168544);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x31c274{['_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(_0x584bd4){super(_0x584bd4),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1e4e32=this['context']['config'];_0x1e4e32['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1e4e32['define']('comments.maxThreadTotalWeight',0x1f4),_0x1e4e32['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1e4e32['define']('comments.CommentThreadView',gt),_0x1e4e32['define']('comments.CommentView',Tt),_0x1e4e32['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x560776=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4ce5a4,_0xa85600)=>this['_addCommentThread'](_0xa85600)),this['on']('submitCommentThread',(_0xe8d4c5,_0x5927e1)=>this['_submitCommentThread'](_0x5927e1)),this['on']('resolveCommentThread',(_0x3e8664,_0x4d9d7e)=>this['_resolveCommentThread'](_0x4d9d7e)),this['on']('resolveCommentThread',(_0x30e4d2,_0x365e94)=>this['_updateActiveAnnotation'](_0x365e94),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x182eaa,_0x7b9c11)=>this['_reopenCommentThread'](_0x7b9c11)),this['on']('reopenCommentThread',(_0x3b3513,_0x36a4da)=>this['_updateActiveAnnotation'](_0x36a4da),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4e5c41,_0x26d938)=>this['_removeCommentThread'](_0x26d938)),this['on']('updateCommentThread',(_0x24a1a2,_0x3e049c)=>this['_updateCommentThread'](_0x3e049c)),this['on']('updateCommentThread',(_0x5f01ec,_0x3e75c8)=>this['_updateActiveAnnotation'](_0x3e75c8),{'priority':'lowest'}),this['on']('addComment',(_0x27d26f,_0x452f12)=>this['_addComment'](_0x452f12)),this['on']('updateComment',(_0x566e00,_0x1195ab)=>this['_updateComment'](_0x1195ab)),this['on']('removeComment',(_0x4b9a39,_0x39a1c1)=>this['_removeComment'](_0x39a1c1)),this['on']('addComment',(_0x450cf8,{threadId:_0x3a78b2,isFromAdapter:_0x4e8fc9})=>{if(_0x4e8fc9)return;const _0x4299ad=this['getCommentThread'](_0x3a78b2),_0x35a323=_0x4299ad&&this['_threadToController']['get'](_0x4299ad);_0x35a323&&_0x35a323['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x560776,'change:activeAnnotations',(_0x23001a,_0x516464,_0x3bc970)=>{const _0x4c4f00=Array['from'](_0x3bc970)['map'](_0x1e4b06=>this['_viewToController']['get'](_0x1e4b06['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4c4f00?_0x4c4f00['model']:null;});}set['adapter'](_0x3400c2){if(this['_adapter'])throw new _0x4aef9b('commentsrepository-adapter-already-set');this['_adapter']=_0x3400c2;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2f2a33=_t,threadId:_0x20c706=_0x2d6822(),comments:_0x44df39=[],unlinkedAt:_0x1b53e0=null,resolvedAt:_0x30f306=null,resolvedBy:_0x5d7fcf=null,target:_0x582a54=null,context:_0x5899a9=null,attributes:_0x3b9ec1={},isResolvable:_0xb7f760=!0x0,isSubmitted:_0x2f8255=!0x1,isFromAdapter:_0x4efacc=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x2f2a33),{'channelId':_0x2f2a33,'threadId':_0x20c706,'comments':_0x44df39,'unlinkedAt':_0x1b53e0,'resolvedAt':_0x30f306,'resolvedBy':_0x5d7fcf,'target':_0x582a54,'context':_0x5899a9,'attributes':_0x3b9ec1,'isFromAdapter':_0x4efacc,'isResolvable':_0xb7f760,'isSubmitted':_0x2f8255}),this['getCommentThread'](_0x20c706);}['openNewCommentThread']({channelId:_0x37268e=_t,threadId:_0x1dcba7=_0x2d6822(),target:_0x47ad2e,context:_0x5a7238=null,isResolvable:_0x102915=!0x0}){if(this['_readOnlyChannels']['has'](_0x37268e)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x47ad2e)throw new _0x4aef9b('commentsrepository-missing-target');const _0x1cc27e=this['addCommentThread']({'channelId':_0x37268e,'threadId':_0x1dcba7,'target':_0x47ad2e,'context':_0x5a7238,'isResolvable':_0x102915});if(!_0x1cc27e)return null;const _0x16a0dd=this['_threadToController']['get'](_0x1cc27e),_0x3f1e19=_0x16a0dd['view']['commentThreadInputView']['commentInputView'],_0x422363=this['context']['plugins']['get'](y),_0x60ff38=_0x422363['getByInnerView'](_0x16a0dd['view']);return _0x422363['activate'](_0x60ff38),_0x3f1e19['once']('editorReady',()=>_0x3f1e19['focus']()),_0x1cc27e;}['hasCommentThread'](_0x500894){if('string'!=typeof _0x500894)throw new _0x4aef9b('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x500894);}['updateCommentThread']({channelId:_0x561011=_t,threadId:_0x169fba,context:_0xc483d1,unlinkedAt:_0x5368a6,attributes:_0x3d7b52,isFromAdapter:_0x68326d=!0x1}){return this['fire'](Nt('updateCommentThread',_0x561011),{'channelId':_0x561011,'threadId':_0x169fba,'context':_0xc483d1,'unlinkedAt':_0x5368a6,'attributes':_0x3d7b52,'isFromAdapter':_0x68326d}),this['getCommentThread'](_0x169fba);}['getCommentThread'](_0xef718){if('string'!=typeof _0xef718)throw new _0x4aef9b('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0xef718);}['fetchCommentThread']({channelId:_0x439dcf,threadId:_0x2bd6ce}={}){const _0x1d28e9=this['getCommentThread'](_0x2bd6ce);if(_0x1d28e9)return Promise['resolve'](_0x1d28e9);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4aef9b('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x439dcf,'threadId':_0x2bd6ce})['then'](_0x538994=>this['hasCommentThread'](_0x2bd6ce)?this['getCommentThread'](_0x2bd6ce):_0x538994?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x439dcf},_0x538994)):void 0x0)['catch'](_0x5c07d9=>{throw console['error'](_0x5c07d9),new _0x4aef9b('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x31fa1a,skipNotAttached:_0x7df702=!0x1,skipEmpty:_0x4fce11=!0x1,toJSON:_0x5723ea=!0x1}={}){const _0x2dcad2=[];for(const _0x32fbfa of this['_threads']['values']())_0x31fa1a&&_0x32fbfa['channelId']!==_0x31fa1a||_0x7df702&&!_0x32fbfa['isAttached']||_0x4fce11&&0x0===_0x32fbfa['length']||_0x2dcad2['push'](_0x32fbfa);return _0x5723ea?_0x2dcad2['map'](_0x1c3fe2=>_0x1c3fe2['toJSON']()):_0x2dcad2;}['getAnnotationForCommentThread'](_0x14d7ff){const _0x57f44c=this['_threadToController']['get'](_0x14d7ff);if(!_0x57f44c)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x57f44c['view'])||null;}['getCommentThreadForAnnotation'](_0x185413){const _0x4f26b0=this['_viewToController']['get'](_0x185413['innerView']);return _0x4f26b0?_0x4f26b0['model']:null;}['setActiveCommentThread'](_0x31eafa){const _0x4dad61=this['context']['plugins']['get'](y);if(!_0x31eafa)return void(this['activeCommentThread']&&_0x4dad61['deactivateAll']());const _0x57b4e0=this['getCommentThread'](_0x31eafa);if(!_0x57b4e0)throw new _0x4aef9b('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x31eafa});if(!this['_threadToController']['has'](_0x57b4e0))throw new _0x4aef9b('commentsrepository-active-not-attached',null,{'threadId':_0x31eafa});const _0x9ed430=_0x4dad61['getByInnerView'](this['_threadToController']['get'](_0x57b4e0)['view']);_0x4dad61['activate'](_0x9ed430);}['switchReadOnly'](_0x3ba4b2,_0x34e38b){_0x3ba4b2?this['_readOnlyChannels']['add'](_0x34e38b):this['_readOnlyChannels']['delete'](_0x34e38b),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x3fad9c){return this['_readOnlyChannels']['has'](_0x3fad9c)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xcd611e,_0x3e7f5e){return new vt(_0xcd611e,_0x3e7f5e);}['setPermissions'](_0x3cbddd,_0x48d37b=_t){this['_permissions']['set'](_0x48d37b,_0x3cbddd),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1ac454=_t){return this['_permissions']['has'](_0x1ac454)?this['_permissions']['get'](_0x1ac454):bt;}['_addCommentThread']({channelId:_0x6e6737,threadId:_0x58bc28,comments:_0x38bbbf,unlinkedAt:_0x369c92,resolvedAt:_0x42f07e,resolvedBy:_0x17c00d,target:_0x17454d,context:_0xb5c44a,attributes:_0x289367,isFromAdapter:_0x21770c,isResolvable:_0x16ef3f,isSubmitted:_0x2b248c}){if('string'!=typeof _0x58bc28)throw new _0x4aef9b('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x58bc28});if(this['hasCommentThread'](_0x58bc28))throw new _0x4aef9b('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x58bc28});const _0x71eea5=new CommentThread(this,{'channelId':_0x6e6737,'id':_0x58bc28,'context':_0xb5c44a,'attributes':_0x289367,'unlinkedAt':_0x369c92,'resolvedAt':_0x42f07e,'resolvedBy':_0x17c00d?this['context']['plugins']['get'](it)['getUser'](_0x17c00d):null,'isResolvable':_0x16ef3f,'isSubmitted':_0x2b248c||_0x21770c});this['_threads']['set'](_0x58bc28,_0x71eea5);for(const _0x1833f5 of _0x38bbbf)_0x71eea5['_add'](this['_createNewComment']({'threadId':_0x58bc28,..._0x1833f5}));return _0x17454d&&_0x71eea5['attachTo'](_0x17454d),_0x21770c||!_0x71eea5['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x6e6737,'threadId':_0x58bc28});}['_submitCommentThread']({channelId:_0x22a540,threadId:_0x531b8c}){if(!this['hasCommentThread'](_0x531b8c))throw new _0x4aef9b('commentsrepository-missing-comment-thread',this);const _0x274c7f=this['getCommentThread'](_0x531b8c);if(_0x274c7f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x374e6a,comments:_0x3dd480,resolvedAt:_0x2d7778,resolvedBy:_0x5b50a0,context:_0x375dd3,attributes:_0x550cf6}=_0x274c7f,_0x15910e=this['context']['plugins']['get']('PendingActions'),_0x24c601=_0x15910e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x22a540,'threadId':_0x374e6a,'comments':_0x3dd480['map'](_0x541dd6=>_0x541dd6['toJSON']()),'resolvedAt':_0x2d7778,'resolvedBy':_0x5b50a0?_0x5b50a0['id']:_0x5b50a0,'context':_0x375dd3,'attributes':_0x550cf6})['then'](({comments:_0x5bc46a})=>{_0x15910e['remove'](_0x24c601);for(const _0x494a9e of _0x5bc46a)this['_updateComment']({'channelId':_0x22a540,'threadId':_0x531b8c,'commentId':_0x494a9e['commentId'],'createdAt':_0x494a9e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3175eb=>{throw console['error'](_0x3175eb),new _0x4aef9b('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x47e22f,target:_0x51dc96}){const _0x3dd5a7=this['getCommentThread'](_0x47e22f);if(!_0x3dd5a7)throw new _0x4aef9b('commentsrepository-attach-missing-comment-thread',this);const _0x181695=this['context']['plugins']['get']('PendingActions'),_0x373ae3=this['context']['plugins']['get'](y),_0x1a52d5=this['_createCommentThreadView'](_0x3dd5a7),_0x1f6040=new vt(_0x3dd5a7,_0x1a52d5);let _0x29a208=null;_0x1a52d5['on']('change:isDirty',(_0x26b9be,_0x8ffe9e,_0x3669a2)=>{_0x3669a2?_0x29a208=_0x181695['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x29a208&&(_0x181695['remove'](_0x29a208),_0x29a208=null);}),this['_threadToController']['set'](_0x3dd5a7,_0x1f6040),this['_viewToController']['set'](_0x1a52d5,_0x1f6040);const _0x2416f5=new E(this['context']['locale'],_0x1a52d5);_0x2416f5['bind']('length')['to'](_0x1a52d5),_0x2416f5['bind']('isDirty')['to'](_0x1a52d5,'isDirty',_0x1a52d5,'length',(_0x273ed3,_0x3d6b98)=>_0x273ed3||!_0x3d6b98),_0x2416f5['bind']('isActive')['to'](_0x1a52d5),_0x2416f5['type']='comment';const _0x3328bb=new T({'view':_0x2416f5,'target':_0x51dc96,'type':'comment','isVisible':!_0x3dd5a7['archivedAt']&&!!('function'==typeof _0x51dc96?_0x51dc96():_0x51dc96)});return _0x1a52d5['on']('escape',()=>{_0x3328bb['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1a52d5,_0x3328bb),_0x373ae3['add'](_0x3328bb),_0x3328bb;}['_bindAnnotationToEditors'](_0x3efb6f,_0x495e4f){this['listenTo'](_0x3efb6f,'editorReady',(_0x514a66,_0x23f02d)=>{const _0x2ebb87=_0x23f02d['ui']['view']['body']['bodyCollectionContainer'];_0x495e4f['focusableElements']['add'](_0x2ebb87),this['context']instanceof _0x3f1d3e&&this['context']['ui']['focusTracker']['add'](_0x2ebb87);},{'priority':'highest'}),this['listenTo'](_0x3efb6f,'editorDestroyed',(_0x3f6990,_0x7c7fea)=>{const _0x539e25=_0x7c7fea['ui']['view']['body']['bodyCollectionContainer'];_0x495e4f['focusableElements']['has'](_0x539e25)&&_0x495e4f['focusableElements']['remove'](_0x539e25),this['context']instanceof _0x3f1d3e&&this['context']['ui']['focusTracker']['remove'](_0x539e25);});}['_unbindEditors'](_0x4dcbd1){this['stopListening'](_0x4dcbd1,'editorReady'),this['stopListening'](_0x4dcbd1,'editorDestroyed');}['_createCommentThreadView'](_0xd223ed){const _0x5de921=this['context']['plugins']['get'](it),{config:_0x46f2a7,locale:_0xd4005a}=this['context'],_0xc82ec=pt(_0x46f2a7['get']('locale'),_0xd4005a);return new(0x0,(_0x46f2a7['get']('comments'))['CommentThreadView'])(_0xd4005a,_0xd223ed,_0x5de921['me'],{'editorConfig':{..._0x46f2a7['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x46f2a7['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x46f2a7['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x46f2a7['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x46f2a7['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xc82ec,'CommentView':_0x46f2a7['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x28aefe,channelId:_0x544cce,resolvedAt:_0xdb5e08,resolvedBy:_0x2b07c0,isFromAdapter:_0x1fa483}){if(!this['hasCommentThread'](_0x28aefe))throw new _0x4aef9b('commentsrepository-missing-comment-thread',null,{'threadId':_0x28aefe});const _0x7f9c50=this['getCommentThread'](_0x28aefe);if(_0x7f9c50['isResolved'])throw new _0x4aef9b('commentsrepository-resolved-comment-thread',null,{'threadId':_0x28aefe});const _0x5a5f11=this['context']['plugins']['get'](it);if(_0x7f9c50['resolvedBy']=_0x5a5f11['getUser'](_0x2b07c0),_0x7f9c50['resolvedAt']=_0xdb5e08,_0x1fa483||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4531e9=this['context']['plugins']['get']('PendingActions'),_0x438ac9=_0x4531e9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x544cce,'threadId':_0x28aefe})['then'](({resolvedAt:_0x448a0b,resolvedBy:_0x253f32})=>{_0x4531e9['remove'](_0x438ac9),_0x7f9c50['resolvedBy']['id']!==_0x253f32&&(_0x7f9c50['resolvedBy']=_0x5a5f11['getUser'](_0x253f32)),_0x7f9c50['resolvedAt']=_0x448a0b;})['catch'](_0x3722f8=>{throw console['error'](_0x3722f8),new _0x4aef9b('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3879f0,channelId:_0x55c062,isFromAdapter:_0x1475a3}){if(!this['hasCommentThread'](_0x3879f0))throw new _0x4aef9b('commentsrepository-missing-comment-thread',null,{'threadId':_0x3879f0});const _0x5ba967=this['getCommentThread'](_0x3879f0);if(!_0x5ba967['isResolved'])throw new _0x4aef9b('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3879f0});if(_0x5ba967['resolvedBy']=null,_0x5ba967['resolvedAt']=null,_0x1475a3||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1d216f=this['context']['plugins']['get']('PendingActions'),_0x35c241=_0x1d216f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x55c062,'threadId':_0x3879f0})['then'](()=>_0x1d216f['remove'](_0x35c241))['catch'](_0xbd32d9=>{throw console['error'](_0xbd32d9),new _0x4aef9b('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x434a71,isFromAdapter:_0x461232}){const _0x5f0bde=this['getCommentThread'](_0x434a71);if(!_0x5f0bde)throw new _0x4aef9b('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x434a71),this['_threads']['delete'](_0x434a71),!_0x5f0bde['isSubmitted']||_0x461232||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x20829a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3641b1}=_0x5f0bde,_0x2f02fc=_0x20829a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3641b1,'threadId':_0x434a71})['then'](()=>_0x20829a['remove'](_0x2f02fc))['catch'](_0xd8c9da=>{throw console['error'](_0xd8c9da),new _0x4aef9b('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5529cd,unlinkedAt:_0x17e88f,context:_0x32c3f9,attributes:_0x15966b,isFromAdapter:_0x2d6c8f}){if('string'!=typeof _0x5529cd)throw new _0x4aef9b('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5529cd});if(!this['hasCommentThread'](_0x5529cd))throw new _0x4aef9b('commentsrepository-missing-comment-thread',null,{'threadId':_0x5529cd});const _0x13a4ae=this['getCommentThread'](_0x5529cd);let _0x5836d1=!0x1;if(void 0x0!==_0x32c3f9&&_0x13a4ae['context']!==_0x32c3f9&&(_0x13a4ae['context']=_0x32c3f9,_0x5836d1=!0x0),void 0x0!==_0x17e88f&&_0x13a4ae['unlinkedAt']!==_0x17e88f&&(_0x13a4ae['unlinkedAt']=_0x17e88f,_0x5836d1=!0x0),_0x15966b&&!At(_0x15966b,_0x13a4ae['attributes'])&&(_0x13a4ae['attributes']=_0x15966b,_0x5836d1=!0x0),!_0x5836d1)return Promise['resolve']();if(!_0x13a4ae['isSubmitted']||_0x2d6c8f||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x5da956=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1c4b90}=_0x13a4ae,_0x4c101b=_0x5da956['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1c4b90,'threadId':_0x5529cd,'context':_0x32c3f9,'unlinkedAt':_0x17e88f,'attributes':_0x15966b})['then'](()=>_0x5da956['remove'](_0x4c101b))['catch'](_0x1bdd41=>{throw console['error'](_0x1bdd41),new _0x4aef9b('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x17a5b9){const _0x1f8838=this['context']['plugins']['get'](y),_0x5c999a=this['getCommentThread'](_0x17a5b9);if(_0x5c999a['_isAttached']=!0x1,this['_threadToController']['has'](_0x5c999a)){const _0x21dae0=this['_threadToController']['get'](_0x5c999a),_0x5b2e88=_0x21dae0['view'],_0x46aa82=_0x1f8838['getByInnerView'](_0x5b2e88);this['_threadToController']['delete'](_0x5c999a),this['_viewToController']['delete'](_0x5b2e88),_0x46aa82&&_0x1f8838['remove'](_0x46aa82),_0x21dae0['destroy'](),_0x5b2e88['destroy']()['then'](()=>{this['_unbindEditors'](_0x5b2e88);});}}['_updateActiveAnnotation']({threadId:_0x599bd5,resolvedAt:_0x32c5b6,unlinkedAt:_0x35cd60}){const _0x26206e=!!_0x32c5b6,_0x3f69dd=this['context']['plugins']['get'](y),_0x5e3d3d=this['getCommentThread'](_0x599bd5);if(this['_threadToController']['has'](_0x5e3d3d)){const _0x508029=this['_threadToController']['get'](_0x5e3d3d)['view'],_0x1a82f9=_0x3f69dd['getByInnerView'](_0x508029);_0x1a82f9&&(_0x26206e&&_0x3f69dd['_removeActiveAnnotation'](_0x1a82f9),_0x35cd60?_0x1a82f9['isVisible']=!0x1:_0x1a82f9['refreshVisibility']());}}['_getExternalAuthor'](_0x19014d){const _0x4f9c91=this['context']['plugins']['get'](it),_0x17ba70=It('external:'+_0x19014d),_0x444fbb=_0x4f9c91['getUser'](_0x17ba70);return _0x444fbb||_0x4f9c91['addUser']({'id':_0x17ba70,'name':_0x19014d});}['_createNewComment']({threadId:_0x18fbf4,commentId:_0x4f3c6a=_0x2d6822(),content:_0x7a51fd,authorId:_0x558531,createdAt:_0x794373,attributes:_0x5eea11}){if('string'!=typeof _0x4f3c6a)throw new _0x4aef9b('commentsrepository-invalid-commentid');if('string'!=typeof _0x558531)throw new _0x4aef9b('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x7a51fd||!_0x7a51fd['trim']())throw new _0x4aef9b('commentsrepository-invalid-comment-content');const _0x55d7d4=this['context']['plugins']['get'](it)['getUser'](_0x558531);if(!_0x55d7d4)throw new _0x4aef9b('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x558531});let _0x478bd4=null,_0x4ac33f=_0x794373;return _0x5eea11?.['@external']&&(_0x478bd4=this['_getExternalAuthor'](_0x5eea11['@external']['authorName']),_0x4ac33f=new Date(_0x5eea11['@external']['createdAt'])),new Comment(this,{'threadId':_0x18fbf4,'id':_0x4f3c6a,'author':_0x478bd4||_0x55d7d4,'creator':_0x55d7d4,'content':_0x7a51fd,'createdAt':_0x794373,'authoredAt':_0x4ac33f,'attributes':_0x5eea11});}['_addComment'](_0x49bd20){let {threadId:_0x1b8fc4,content:_0x209ef1,attributes:_0x2de1d1,isFromAdapter:_0x358d64}=_0x49bd20;const _0x3f4adc=this['getCommentThread'](_0x49bd20['threadId']);if(!_0x3f4adc)throw new _0x4aef9b('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x31cc46=this['_createNewComment'](_0x49bd20),{id:_0x493b8c}=_0x31cc46;if(_0x3f4adc['_add'](_0x31cc46),_0x358d64||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3f4adc['isSubmitted'])return Promise['resolve']();const _0x2cc7ce=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2d0c3d}=_0x3f4adc,_0x529272=_0x2cc7ce['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2de1d1||(_0x2de1d1={}),this['adapter']['addComment']({'channelId':_0x2d0c3d,'threadId':_0x1b8fc4,'commentId':_0x493b8c,'content':_0x209ef1,'attributes':_0x2de1d1})['then'](_0x503ada=>{_0x2cc7ce['remove'](_0x529272),_0x503ada&&this['_updateComment']({'channelId':_0x2d0c3d,'threadId':_0x1b8fc4,'commentId':_0x493b8c,'createdAt':_0x503ada['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3f56bb=>{throw console['error'](_0x3f56bb),new _0x4aef9b('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x138f44,commentId:_0x2901d8,content:_0x3be703,createdAt:_0x526dc5,attributes:_0x32778c,isFromAdapter:_0x4da6c3}){if(void 0x0!==_0x3be703&&('string'!=typeof _0x3be703||!_0x3be703['trim']()['length']))throw new _0x4aef9b('commentsrepository-update-comment-invalid-content');const _0x6adf3d=this['getCommentThread'](_0x138f44),_0xef4278=_0x6adf3d['getComment'](_0x2901d8);if(!_0xef4278)throw new _0x4aef9b('commentsrepository-update-missing-comment',this);let _0x2dd22d=!0x1;if(_0x3be703&&_0x3be703!==_0xef4278['content']&&(_0xef4278['isEditable']||_0x4da6c3)&&(_0xef4278['content']=_0x3be703,_0x2dd22d=!0x0),_0x526dc5&&_0x526dc5!==_0xef4278['createdAt']&&(_0xef4278['createdAt']=_0x526dc5,_0xef4278['attributes']&&_0xef4278['attributes']['@external']||(_0xef4278['authoredAt']=_0x526dc5),_0x2dd22d=!0x0),_0x32778c&&!At(_0x32778c,_0xef4278['attributes'])&&(_0xef4278['attributes']=_0x32778c,_0x2dd22d=!0x0),!_0x2dd22d)return Promise['resolve']();if(_0x6adf3d['fire']('commentUpdated'),_0x4da6c3||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4c2d5b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x227cb1}=this['getCommentThread'](_0xef4278['threadId']),_0x3c282e=_0x4c2d5b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x227cb1,'threadId':_0x138f44,'commentId':_0x2901d8,'content':_0x3be703,'attributes':_0x32778c})['then'](()=>_0x4c2d5b['remove'](_0x3c282e))['catch'](_0x30a6cb=>{throw console['error'](_0x30a6cb),new _0x4aef9b('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xd7349b,commentId:_0xa2c2c3,isFromAdapter:_0x5a9362}){const _0x51da86=this['getCommentThread'](_0xd7349b),_0x519fb5=_0x51da86['getComment'](_0xa2c2c3);if(!_0x519fb5)throw new _0x4aef9b('commentsrepository-remove-missing-comment',this);if(_0x51da86['_remove'](_0x519fb5),_0x5a9362||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x9792c8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5ca294}=_0x51da86,_0x10573f=_0x9792c8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5ca294,'threadId':_0xd7349b,'commentId':_0xa2c2c3})['then'](()=>_0x9792c8['remove'](_0x10573f))['catch'](_0x3f3693=>{throw console['error'](_0x3f3693),new _0x4aef9b('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3e3135(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x572e4c,_0x157442){super();const _0x23248e=_0x157442['isResolvable'];this['channelId']=_0x157442['channelId'],this['id']=_0x157442['id'],this['comments']=new _0x17fbc7(),this['_repository']=_0x572e4c,this['_isAttached']=!0x1,this['_isSubmitted']=_0x157442['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x572e4c,'_permissions',_0x572e4c,'_readOnlyChannels',()=>_0x572e4c['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x572e4c,'_permissions',()=>_0x572e4c['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x572e4c,'_permissions',()=>{const _0x4dc553=_0x572e4c['getPermissions'](this['channelId']);return _0x4dc553['write']||_0x4dc553['admin'];}),this['bind']('isResolvable')['to'](_0x572e4c,'_permissions',()=>_0x23248e&&_0x572e4c['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x157442['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5ce86c,_0x2e648f)=>_0x5ce86c?_0x2e648f?_0x5ce86c<_0x2e648f?_0x5ce86c:_0x2e648f:_0x5ce86c:_0x2e648f),this['set']('unlinkedAt',_0x157442['unlinkedAt']||null),this['set']('resolvedAt',_0x157442['resolvedAt']||null),this['set']('resolvedBy',_0x157442['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5348d3=>!!_0x5348d3),this['set']('attributes',_0x157442['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x414f17,_0x205576)=>_0x414f17+_0x205576['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x7fb863,id:_0x247e43}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x7fb863),{'channelId':_0x7fb863,'threadId':_0x247e43});}['setUnlinkedAt'](_0x38c60a){this['_update']({'unlinkedAt':_0x38c60a});}['resolve']({resolvedAt:_0x2eb26d=new Date(),resolvedBy:_0x1916aa='',isFromAdapter:_0x5e4c2d=!0x1}={}){const _0x9d513f=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x5de8c8,id:_0x52b210}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x5de8c8),{'channelId':_0x5de8c8,'threadId':_0x52b210,'resolvedAt':_0x2eb26d,'resolvedBy':_0x1916aa||_0x9d513f['id'],'isFromAdapter':_0x5e4c2d});}['reopen']({isFromAdapter:_0x459d77=!0x1}={}){const {channelId:_0x3281c5,id:_0x450f71}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x3281c5),{'channelId':_0x3281c5,'threadId':_0x450f71,'isFromAdapter':_0x459d77});}['setContext'](_0x21c8bd){this['context']||this['_update']({'context':_0x21c8bd});}['setAttribute'](_0x1ff3b3,_0x328548){const _0x1083a5=wt(this['attributes']);yt(_0x1083a5,_0x1ff3b3,_0x328548),this['_update']({'attributes':_0x1083a5});}['removeAttribute'](_0x164798){const _0x604991=wt(this['attributes']);Ct(_0x604991,_0x164798),this['_update']({'attributes':_0x604991});}['remove']({isFromAdapter:_0x3d0ef6=!0x1}={}){const {channelId:_0x439de3,id:_0x229c86}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x439de3),{'channelId':_0x439de3,'threadId':_0x229c86,'isFromAdapter':_0x3d0ef6});}['attachTo'](_0x11c4d4){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x11c4d4});}['addComment'](_0x55a6c9){const {channelId:_0x2f6578,id:_0x36b7e6}=this;this['_repository']['fire'](Nt('addComment',_0x2f6578,_0x36b7e6),Object['assign']({'channelId':_0x2f6578,'threadId':_0x36b7e6},_0x55a6c9));}['getComment'](_0x487ac1){if('string'!=typeof _0x487ac1)throw new _0x4aef9b('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x487ac1});return this['comments']['get'](_0x487ac1);}['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'](_0x173ebc=>_0x173ebc['toJSON']()),'attributes':this['attributes']};}['_add'](_0xe003b0){return this['listenTo'](_0xe003b0,'change:authoredAt',()=>{const _0x46db2d=this['_findOptimalIndex'](_0xe003b0),_0x5b94fd=this['comments'];_0x46db2d-0x1!=_0x5b94fd['getIndex'](_0xe003b0)&&_0x46db2d+0x1!=_0x5b94fd['getIndex'](_0xe003b0)&&(this['_remove'](_0xe003b0),this['_add'](_0xe003b0));}),this['comments']['add'](_0xe003b0,this['_findOptimalIndex'](_0xe003b0));}['_update'](_0x34516b){const {channelId:_0x19ff50,id:_0x519d72}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x19ff50),{..._0x34516b,'channelId':_0x19ff50,'threadId':_0x519d72});}['_remove'](_0x29748c){return this['stopListening'](_0x29748c),_0x29748c['destroy'](),this['comments']['remove'](_0x29748c);}['_findOptimalIndex'](_0x556983){const _0xef58d7=this['comments']['find'](_0x3c32eb=>new Date(_0x3c32eb['authoredAt'])['getTime']()>new Date(_0x556983['authoredAt'])['getTime']());return _0xef58d7?this['comments']['getIndex'](_0xef58d7):this['length'];}}class Comment extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3e3135(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x292046,_0x1123cb){super();const _0x5f4fae=_0x292046['context']['plugins']['get'](it)['me'],_0x51bbb0=_0x292046['getCommentThread'](_0x1123cb['threadId']),_0x337303=0x0===_0x51bbb0['comments']['length'],_0x4c0b3e=_0x5f4fae===_0x1123cb['author'];this['id']=_0x1123cb['id'],this['threadId']=_0x1123cb['threadId'],this['author']=_0x1123cb['author'],this['creator']=_0x1123cb['creator'],this['isExternal']=Boolean(_0x1123cb['attributes']&&_0x1123cb['attributes']['@external']),this['set']('content',_0x1123cb['content']),this['createdAt']=_0x1123cb['createdAt']||new Date(),this['set']('authoredAt',_0x1123cb['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x51bbb0,'resolvedAt'),this['set']('attributes',_0x1123cb['attributes']||{}),this['bind']('isEditable')['to'](_0x292046,'_permissions',()=>{const _0x15612a=_0x292046['getPermissions'](_0x51bbb0['channelId'])['write'],_0x8ecc9f=_0x292046['getPermissions'](_0x51bbb0['channelId'])['modifyAll'];return _0x4c0b3e&&_0x15612a||!_0x4c0b3e&&_0x8ecc9f;}),this['bind']('isRemovable')['to'](_0x51bbb0,'isRemovable',_0x292046,'_permissions',_0x4b023b=>{const _0x1d702a=_0x292046['getPermissions'](_0x51bbb0['channelId'])['write'],_0x542863=_0x292046['getPermissions'](_0x51bbb0['channelId'])['modifyAll'];return _0x4c0b3e&&_0x1d702a||_0x4b023b&&_0x337303||!_0x4c0b3e&&_0x542863&&!_0x337303;}),this['bind']('isReadOnly')['to'](_0x51bbb0,'isReadOnly'),this['_repository']=_0x292046;}get['weight'](){return Math['max'](function(_0x1976e4){const _0x14b877=document['createElement']('div');return _0x14b877['innerHTML']=_0x1976e4,_0x14b877['textContent']['length'];}(this['content']),0xc8);}['update'](_0x496993){const {threadId:_0x338279,id:_0x493679}=this;if(!this['_repository']['hasCommentThread'](_0x338279))throw new _0x4aef9b('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5490d6}=this['_repository']['getCommentThread'](_0x338279);this['_repository']['fire'](Nt('updateComment',_0x5490d6,_0x338279),{'channelId':_0x5490d6,'threadId':_0x338279,'commentId':_0x493679,..._0x496993});}['setAttribute'](_0x375b84,_0xa430ac){const _0x5b40ed=wt(this['attributes']);yt(_0x5b40ed,_0x375b84,_0xa430ac),this['update']({'attributes':_0x5b40ed});}['removeAttribute'](_0x27500b){const _0x286f9f=wt(this['attributes']);Ct(_0x286f9f,_0x27500b),this['update']({'attributes':_0x286f9f});}['remove'](_0x209c16={}){if(!_0x209c16['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x563993,id:_0x339b8e}=this;if(!this['_repository']['hasCommentThread'](_0x563993))throw new _0x4aef9b('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x9aaeab}=this['_repository']['getCommentThread'](_0x563993);this['_repository']['fire'](Nt('removeComment',_0x9aaeab,_0x563993),{'channelId':_0x9aaeab,'threadId':_0x563993,'commentId':_0x339b8e,..._0x209c16});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x53e3ec,..._0x555fe3){for(const _0x5868b9 of _0x555fe3)void 0x0!==_0x5868b9&&(_0x53e3ec+=':'+String(_0x5868b9));return _0x53e3ec;}class ot extends _0x21b16f{constructor(_0x429809){super(_0x429809),this['set']('hasContent',!0x1);}['refresh'](){const _0x52c60d=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2d4be4 of _0x52c60d['getRanges']())if(this['_hasContent'](_0x2d4be4))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x5117b9=_0x2d6822(),ranges:_0x469669,comment:_0x2d95a0}={}){const _0x36c072=this['editor']['model'],_0x280053=_0x469669??Array['from'](_0x36c072['document']['selection']['getRanges']()),_0x4132f2=[];for(const _0x1dbba6 of _0x280053)this['_hasContent'](_0x1dbba6)&&_0x4132f2['push'](this['_trimToContent'](_0x1dbba6));if(!_0x4132f2['length'])throw new _0x4aef9b('addcommentthreadcommand-incorrect-ranges',null);_0x2d95a0&&this['_createCommentThread'](_0x5117b9,_0x2d95a0),this['_createMarkersFromRanges'](_0x5117b9,_0x4132f2,!!_0x2d95a0);}['_createMarkersFromRanges'](_0x196842,_0x51718a,_0x263a1d){this['editor']['model']['change'](_0x4ec5ec=>{for(const _0x490cd1 of _0x51718a){const _0x572da3=_0x2d6822()['substr'](0x1,0x5),_0x15791c='comment:'+_0x196842+':'+_0x572da3;_0x4ec5ec['addMarker'](_0x15791c,{'range':_0x490cd1,'usingOperation':_0x263a1d,'affectsData':_0x263a1d});}});}['_createCommentThread'](_0x3cd335,_0x5e4cf3){const _0x5c692e=this['editor']['plugins']['get']('CommentsRepository'),_0x1634d0=this['editor']['config']['get']('collaboration.channelId'),_0x65a556=this['editor']['plugins']['get']('Users')['me'];if(!_0x65a556)throw new _0x4aef9b('addcommentthreadcommand-user-not-found',null);_0x5c692e['addCommentThread']({'threadId':_0x3cd335,'channelId':_0x1634d0,'comments':[{'authorId':_0x65a556['id'],'content':_0x5e4cf3,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x263c4b){for(const _0x10578a of _0x263c4b['getItems']())if(this['_itemIsContent'](_0x10578a))return!0x0;return!0x1;}['_itemIsContent'](_0x5933f6){return _0x5933f6['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5933f6)&&!_0x5933f6['is']('element','tableCell');}['_trimToContent'](_0x4eb89b){const _0x7369a6=_0x3105cb=>!this['_itemIsContent'](_0x3105cb['item']),_0x43a74c=_0x4eb89b['start']['getLastMatchingPosition'](_0x7369a6),_0x57aa6f=_0x4eb89b['end']['getLastMatchingPosition'](_0x7369a6,{'direction':'backward'});return this['editor']['model']['createRange'](_0x43a74c,_0x57aa6f);}}class b extends _0x54d97b{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x535f4c){super(_0x535f4c),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3567b1=this['editor'],_0x534865=_0x3567b1['model']['document']['selection'],_0xc2665c=_0x1e5060(()=>this['refreshSelectedViews'](),0xa);_0x534865['on']('change:range',(_0x37345d,_0x3f5620)=>{_0x3f5620['directChange']&&(_0xc2665c['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3567b1['editing']['view']['document'],'change:isFocused',(_0x365626,_0x5e1d16,_0x29f254)=>{_0x29f254&&_0xc2665c();}),this['listenTo'](_0x3567b1['ui']['focusTracker'],'change:isFocused',(_0x25faae,_0x1bf53d,_0x5487e0)=>{_0x5487e0||this['fire']('blur',{'isAnnotationTracked':_0x17ae81=>this['_editorAnnotationsData']['has'](_0x17ae81['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4687bc){if(this['_editorAnnotations']['has'](_0x4687bc['view']))return;this['_editorAnnotations']['add'](_0x4687bc['view']),this['editor']['ui']['focusTracker']['add'](_0x4687bc['view']['element']);const _0xa42d28=this['editor']['plugins']['get'](y);this['listenTo'](_0xa42d28['collection'],'remove',(_0x7c9a74,_0x3f71da)=>{this['editor']['ui']['focusTracker']['remove'](_0x3f71da['view']['element']),this['_editorAnnotations']['delete'](_0x3f71da['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1e3260){if('function'!=typeof _0x1e3260)throw new _0x4aef9b('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1e3260);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x43b44b,annotations:_0x62ae7a}){const _0x3dca4f=[],_0x15681e=this['editor']['model']['document']['selection'],_0x2e271c=Array['from'](_0x15681e['getRanges']());for(const [_0x5d2ef0,_0x43df0d]of this['_editorAnnotationsData']){const _0x38f508=_0x459657(_0x43df0d),_0x59b001=_0x62ae7a['getByInnerView'](_0x5d2ef0);_0x38f508&&_0x59b001&&_0x3dca4f['push']({'annotation':_0x59b001,'range':_0x38f508});}function _0x459657(_0x1b037a){for(const _0x344037 of _0x1b037a)for(const _0x5adea8 of _0x2e271c)if(_0x344037['containsRange'](_0x5adea8,!_0x15681e['isCollapsed']))return _0x344037;return null;}return _0x3dca4f['sort']((_0x38b9a2,_0x5ad8a4)=>{const _0x4fc04f=_0x38b9a2['range'],_0x57e9c5=_0x5ad8a4['range'];if(!_0x4fc04f['isEqual'](_0x57e9c5)){if(_0x4fc04f['containsRange'](_0x57e9c5,!0x0))return 0x1;if(_0x57e9c5['containsRange'](_0x4fc04f,!0x0))return-0x1;}return _0x38b9a2['annotation']==_0x43b44b?-0x1:_0x5ad8a4['annotation']==_0x43b44b?0x1:0x0;})['map'](_0x12a0ca=>_0x12a0ca['annotation']);}get['_editorAnnotationsData'](){const _0x9a3568=new Map();for(const _0x1daa08 of Array['from'](this['_dataCollectors']))for(const [_0x41cb5e,_0x3ff912]of _0x1daa08())_0x9a3568['set'](_0x41cb5e,_0x3ff912);return _0x9a3568;}}class st extends _0x54d97b{['afterInit'](){const _0x425358=this['editor'];if(!_0x425358['plugins']['has']('RestrictedEditingModeEditing'))return;_0x425358['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x54d97b{constructor(_0x1e6d1f){super(_0x1e6d1f),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3531b5=this['editor'],_0x2bd603=_0x3531b5['commands']['get']('importWord'),_0x25c21e=_0x3531b5['plugins']['get'](it);_0x2bd603&&(_0x2bd603['on']('execute',(_0xa6f936,[,_0x504be1])=>{_0x504be1['collaboration_features']={'comments':!0x0,'user_id':_0x25c21e['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2bd603,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x3a1b1b,_0x1c49f1){const {comment_threads:_0x366fda}=_0x1c49f1;_0x366fda&&_0x366fda['forEach'](({thread_id:_0x23de4d,comments:_0x288904,is_resolved:_0x5aa9a7})=>{const _0x4df8b1=new Date(),_0x1dac96=_0x288904['map'](({author:_0x1405f8,content:_0x2e2b80,created_at:_0x5ba9a3})=>({'content':_0x2e2b80,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x4df8b1,'attributes':{'@external':{'authorName':_0x1405f8,'createdAt':_0x5ba9a3?new Date(_0x5ba9a3):new Date(),'source':'importWord'}}})),_0x17abc2=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x17abc2,'threadId':_0x23de4d,'comments':_0x1dac96,'resolvedAt':_0x5aa9a7?_0x4df8b1:null});});}}class at extends _0x54d97b{constructor(_0x328cf3){super(_0x328cf3),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x538201=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x538201,'contentInsertion',(_0x571dc2,_0x1bdcb4)=>this['_removeMarkersWithoutThreads'](_0x1bdcb4['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3cf19c){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3cf19c;const _0x38bf84=this['editor']['plugins']['get']('CommentsRepository');for(const _0x539be7 of _0x3cf19c['keys']()){const [_0x363a7c,_0x2a2e7e]=_0x539be7['split'](':');'comment'!=_0x363a7c||_0x38bf84['hasCommentThread'](_0x2a2e7e)||_0x3cf19c['delete'](_0x539be7);}return _0x3cf19c;}['_registerMarkerInClipboardPipeline'](){const _0x2e5785=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x330ea2=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x330ea2&&_0x2e5785['_registerMarkerToCopy']('comment',_0x330ea2);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x31aff1){switch(_0x31aff1){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x565e6e){const _0x710671=_0x565e6e['split'](':');return{'group':_0x710671[0x0],'id':_0x710671[0x1],'part':_0x710671[0x2]};}class ut extends _0x54d97b{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5e18ca,_0x41db6f)=>{if(!_0x41db6f['options']['showCommentHighlights'])return null;if(_0x41db6f['options']['ignoreResolvedComments']){const {id:_0x423d13}=ft(_0x5e18ca['markerName']),_0x59fe13=this['editor']['plugins']['get'](o);if(_0x59fe13['getCommentThread'](_0x423d13)?.['isResolved']&&_0x5e18ca['item'])return _0x41db6f['consumable']['consume'](_0x5e18ca['item'],'addMarker:'+_0x5e18ca['markerName']),_0x41db6f['consumable']['consume'](_0x5e18ca['item'],'removeMarker:'+_0x5e18ca['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4911b7=>{_0x4911b7['on']('addMarker:comment',(_0x318a35,_0x24be9f,_0x34761e)=>{if(!_0x34761e['options']['showCommentHighlights'])return;const _0x3b5f68=_0x24be9f['item'];if(!_0x3b5f68)return;const _0x42958a=_0x34761e['mapper']['toViewElement'](_0x3b5f68);this['editor']['model']['schema']['isObject'](_0x3b5f68)&&_0x42958a&&!_0x42958a['getCustomProperty']('widget')&&_0x42958a['is']('containerElement')&&_0x3abfff(_0x42958a,_0x34761e['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x53b135,{writer:_0x3efa2c,options:_0x5583ad})=>{if(!_0x5583ad['showCommentHighlights'])return null;const _0x308d0b=_0x3efa2c['createContainerElement']('div'),_0x290662=_0x3efa2c['createEmptyElement']('hr');return _0x3efa2c['addClass']('ck-horizontal-line',_0x308d0b),_0x3efa2c['insert'](_0x3efa2c['createPositionAt'](_0x308d0b,0x0),_0x290662),_0x308d0b;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4a9acd,{writer:_0x259de7,options:_0x16d452})=>{if(!_0x16d452['showCommentHighlights'])return null;const _0x1b42c5=_0x259de7['createContainerElement']('span'),_0x60b0a3=_0x259de7['createEmptyElement']('img');return _0x259de7['addClass']('image-inline',_0x1b42c5),_0x259de7['insert'](_0x259de7['createPositionAt'](_0x1b42c5,0x0),_0x60b0a3),_0x1b42c5;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x209c72,{writer:_0x5034c7,options:_0x303ee2})=>{if(_0x303ee2['showCommentHighlights'])return _0x5034c7['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2e7c8f,_0x16bc1b,_0x4a9500)=>{_0x4a9500['options']['showCommentHighlights']&&_0x2e7c8f['stop']();},{'priority':'high'});}}class r extends _0x54d97b{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(_0x1e9e68){super(_0x1e9e68),this['set']('isThreadsLoadingPaused',!0x0),_0x1e9e68['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x53be41,_0x270570,_0xdd4ea0,_0x1f94c0)=>{const _0x61669a=_0x1e9e68['plugins']['get'](o),_0x1d0ae5=_0xdd4ea0?ft(_0xdd4ea0)['id']:null;_0x1e9e68['model']['change'](()=>{if(_0x1d0ae5){const _0x3d9087=this['getAllMarkersForId'](_0x1d0ae5);for(const _0x2b4c45 of _0x3d9087)_0x1e9e68['editing']['reconvertMarker'](_0x2b4c45);}if(_0x1f94c0){const {id:_0x5b0db6}=ft(_0x1f94c0),_0xb559e2=_0x61669a['getCommentThread'](_0x5b0db6);if(_0xb559e2&&_0xb559e2['unlinkedAt'])return;if(_0xb559e2&&!_0xb559e2['isAttached'])return;const _0x3131ba=this['getAllMarkersForId'](_0x5b0db6);for(const _0x4cba7b of _0x3131ba)_0x1e9e68['editing']['reconvertMarker'](_0x4cba7b);}}),_0x1d0ae5&&this['scrollToThreadMarker'](_0x1d0ae5);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xc087b2=this['editor'],_0x39e6e8=_0xc087b2['plugins']['get'](o),_0x3a4882=_0xc087b2['config']['get']('collaboration.channelId'),_0x15f740=_0x39e6e8['getCommentThreads']()['filter'](_0x1433ad=>_0x1433ad['channelId']!==_0x3a4882);_0xc087b2['commands']['add']('addCommentThread',new ot(_0xc087b2)),this['listenTo'](_0xc087b2,'change:isReadOnly',(_0x87d055,_0x5c9df5,_0x16a760)=>{_0x39e6e8['switchReadOnly'](_0x16a760,_0xc087b2['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x39e6e8,dt('addCommentThread',_0x3a4882),(_0x2ced87,{threadId:_0x3ec7af})=>{const _0x224614=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3ec7af);_0x224614?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3ec7af);}),this['listenTo'](_0x39e6e8,dt('removeCommentThread',_0x3a4882),(_0x843a34,{threadId:_0x55fb58})=>{_0xc087b2['model']['enqueueChange']({'isUndoable':!0x1},_0x3acd3d=>{const _0x5996c8=this['getAllMarkersForId'](_0x55fb58);for(const _0x5173e6 of _0x5996c8)_0x3acd3d['removeMarker'](_0x5173e6);});}),this['listenTo'](_0x39e6e8,dt('resolveCommentThread',_0x3a4882),(_0x55eefc,{threadId:_0x8e80e5})=>{(this['_reconvertMarkers'](_0x8e80e5),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x8e80e5)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x39e6e8,dt('reopenCommentThread',_0x3a4882),(_0x40ccce,{threadId:_0x7820f3})=>{this['_reconvertMarkers'](_0x7820f3);},{'priority':'low'}),this['listenTo'](_0x39e6e8,dt('addComment',_0x3a4882),(_0x439bb4,{threadId:_0x32d7dc,isFromAdapter:_0x1f4557})=>{const _0x5c9d3c=this['getAllMarkersForId'](_0x32d7dc);if(_0x1f4557||0x0==_0x5c9d3c['length']||!_0x39e6e8['hasCommentThread'](_0x32d7dc))return;0x1===_0x39e6e8['getCommentThread'](_0x32d7dc)['length']&&_0xc087b2['model']['enqueueChange']({'isUndoable':!0x1},_0x86dfce=>{for(const _0x54316a of _0x5c9d3c)_0x86dfce['updateMarker'](_0x54316a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x15f740);}['afterInit'](){!async function(_0x2e0be4){const _0x1f7411=_0x4d90c5([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]),_0x484926=0x73460ab3,_0x4306ca=0x73418573^_0x484926,_0x2dbe3d=window[_0x4d90c5([0x44,0x61,0x74,0x65])][_0x4d90c5([0x6e,0x6f,0x77])](),_0x540360=_0x2e0be4[_0x4d90c5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4bf5af=new window[(_0x4d90c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13cd8a=>{_0x540360[_0x4d90c5([0x6f,0x6e,0x63,0x65])](_0x4d90c5([0x72,0x65,0x61,0x64,0x79]),_0x13cd8a);}),_0x268893={[_0x4d90c5([0x6b,0x74,0x79])]:_0x4d90c5([0x45,0x43]),[_0x4d90c5([0x75,0x73,0x65])]:_0x4d90c5([0x73,0x69,0x67]),[_0x4d90c5([0x63,0x72,0x76])]:_0x4d90c5([0x50,0x2d,0x32,0x35,0x36]),[_0x4d90c5([0x78])]:_0x4d90c5([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]),[_0x4d90c5([0x79])]:_0x4d90c5([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]),[_0x4d90c5([0x61,0x6c,0x67])]:_0x4d90c5([0x45,0x53,0x32,0x35,0x36])},_0x13e4ee=_0x540360[_0x4d90c5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4d90c5([0x67,0x65,0x74])](_0x4d90c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3d20fe(){let _0x568d5b,_0x38874c=null,_0x347a4b=null;try{if(_0x13e4ee==_0x4d90c5([0x47,0x50,0x4c]))return _0x4d90c5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x568d5b=_0x1af539(),!_0x568d5b)return _0x4d90c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x568d5b[_0x4d90c5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x347a4b=_0x168182(_0x568d5b[_0x4d90c5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x568d5b[_0x4d90c5([0x6a,0x74,0x69])])),await _0x1dab9e()?_0x3f7628()?_0x19fd4f()?_0x4d90c5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x52e698()?(_0x568d5b[_0x4d90c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4d90c5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x38874c=_0x35c555(_0x4d90c5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2d9529()):_0x4d90c5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4d90c5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4d90c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4d90c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x19fd4f(){const _0x3428c8=[_0x4d90c5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4d90c5([0x74,0x72,0x69,0x61,0x6c])][_0x4d90c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x568d5b[_0x4d90c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2dbe3d/0x3e8:0xe10*_0x4306ca;return _0x568d5b[_0x4d90c5([0x65,0x78,0x70])]<_0x3428c8;}function _0x3f7628(){const _0x77b7b8=_0x568d5b[_0x4d90c5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x77b7b8)return!0x1;if(_0x77b7b8[_0x4d90c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d90c5([0x2a])))return!0x0;if(_0x77b7b8[_0x4d90c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d90c5([0x43,0x4d,0x54])))return!0x0;if(_0x77b7b8[_0x4d90c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d90c5([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x3f8ff4())return!0x0;if(_0x77b7b8[_0x4d90c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d90c5([0x52,0x43,0x4d,0x54]))){if(_0x247fe1())return!0x0;if(_0x2a4082()||_0x5d7f8b())return!0x0;}return!0x1;}function _0x52e698(){const _0x28fb45=_0x568d5b[_0x4d90c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x28fb45||0x0==_0x28fb45[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2f5119}=new URL(window[_0x4d90c5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x28fb45[_0x4d90c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2f5119))return!0x0;const _0x5dbe34=_0x2f5119[_0x4d90c5([0x73,0x70,0x6c,0x69,0x74])](_0x4d90c5([0x2e]));return _0x28fb45[_0x4d90c5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x30e7d8=>_0x30e7d8[_0x4d90c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d90c5([0x2a])))[_0x4d90c5([0x6d,0x61,0x70])](_0x9c0b58=>_0x9c0b58[_0x4d90c5([0x73,0x70,0x6c,0x69,0x74])](_0x4d90c5([0x2e])))[_0x4d90c5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x265397=>_0x265397[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5dbe34[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4d90c5([0x6d,0x61,0x70])](_0x148ca8=>Array(_0x5dbe34[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x148ca8[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4d90c5([0x66,0x69,0x6c,0x6c])](_0x148ca8[0x0]===_0x4d90c5([0x2a])?_0x4d90c5([0x2a]):'')[_0x4d90c5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x148ca8))[_0x4d90c5([0x73,0x6f,0x6d,0x65])](_0x58c3db=>_0x5dbe34[_0x4d90c5([0x65,0x76,0x65,0x72,0x79])]((_0x3f0565,_0x328c48)=>_0x58c3db[_0x328c48]===_0x3f0565||_0x58c3db[_0x328c48]===_0x4d90c5([0x2a])));}function _0x2d9529(){return _0x38874c&&_0x347a4b?new window[(_0x4d90c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x732c88,_0x3de9dc)=>{_0x38874c[_0x4d90c5([0x74,0x68,0x65,0x6e])](_0x732c88,_0x3de9dc),_0x347a4b[_0x4d90c5([0x74,0x68,0x65,0x6e])](_0x5e3c19=>{_0x5e3c19!=_0x4d90c5([0x56,0x61,0x6c,0x69,0x64])&&_0x732c88(_0x5e3c19);},_0x3de9dc);}):_0x38874c||_0x347a4b||_0x4d90c5([0x56,0x61,0x6c,0x69,0x64]);}}function _0x168182(_0x26443e,_0x184875){return new window[(_0x4d90c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b1984=>{if(_0x3c085c())return _0x3b1984(_0x4d90c5([0x56,0x61,0x6c,0x69,0x64]));_0x14c6e2(),_0x540360[_0x4d90c5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4d90c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x125f43=!0x1;const _0x4b8f53=_0x2d6822();function _0x4705d6(_0x9bccbb){return!!_0x9bccbb&&(typeof _0x9bccbb===_0x4d90c5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x9bccbb===_0x4d90c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x9bccbb[_0x4d90c5([0x74,0x68,0x65,0x6e])]===_0x4d90c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x9bccbb[_0x4d90c5([0x63,0x61,0x74,0x63,0x68])]===_0x4d90c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x17dc5d(_0x592303){_0x426870(_0x592303)[_0x4d90c5([0x74,0x68,0x65,0x6e])](_0x1d63f5=>{if(!_0x1d63f5||_0x1d63f5[_0x4d90c5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4d90c5([0x6f,0x6b]))return _0x4d90c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3419d4(_0x4056c5(_0x4b8f53+_0x184875))!=_0x1d63f5[_0x4d90c5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4d90c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4d90c5([0x56,0x61,0x6c,0x69,0x64]);})[_0x4d90c5([0x74,0x68,0x65,0x6e])](_0x132e8c=>(_0x5f0c1a(),_0x132e8c),()=>{const _0x4e73cc=_0x3e43f1();return null==_0x4e73cc?(_0x5f0c1a(),_0x4d90c5([0x56,0x61,0x6c,0x69,0x64])):_0x4d90c5(_0x2dbe3d-_0x4e73cc>(0x574a8eb3^_0x484926)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4d90c5([0x74,0x68,0x65,0x6e])](_0x3b1984)[_0x4d90c5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3b1984(_0x4d90c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x253244=0x7370e433^_0x484926;function _0x5f0c1a(){const _0x4bbf30=_0x4d90c5([0x6c,0x6c,0x63,0x74,0x2d])+_0x3419d4(_0x4056c5(_0x26443e)),_0x132ba1=_0x442a46(_0x3419d4(window[_0x4d90c5([0x4d,0x61,0x74,0x68])][_0x4d90c5([0x63,0x65,0x69,0x6c])](_0x2dbe3d/_0x253244)));window[_0x4d90c5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4d90c5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4bbf30,_0x132ba1);}function _0x3e43f1(){const _0x414a50=_0x4d90c5([0x6c,0x6c,0x63,0x74,0x2d])+_0x3419d4(_0x4056c5(_0x26443e)),_0x33e39c=window[_0x4d90c5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4d90c5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x414a50);return _0x33e39c?window[_0x4d90c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x442a46(_0x33e39c),0x10)*_0x253244:null;}function _0x426870(_0x197a12){return new window[(_0x4d90c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x38d76e,_0x4233a7)=>{_0x197a12[_0x4d90c5([0x74,0x68,0x65,0x6e])](_0x38d76e,_0x4233a7),window[_0x4d90c5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4233a7,0x7347de73^_0x484926);});}}_0x540360[_0x4d90c5([0x6f,0x6e])](_0x4d90c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4a7bd4,_0x2c7df4)=>{if(_0x2c7df4[0x0]!=_0x26443e)return _0x3b1984(_0x4d90c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2c7df4[0x1]={..._0x2c7df4[0x1],[_0x4d90c5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4b8f53};},{[_0x4d90c5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4d90c5([0x68,0x69,0x67,0x68])}),_0x540360[_0x4d90c5([0x6f,0x6e])](_0x4d90c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x365486=>{_0x4705d6(_0x365486[_0x4d90c5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x125f43=!0x0,_0x17dc5d(_0x365486[_0x4d90c5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4d90c5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4d90c5([0x6c,0x6f,0x77])}),_0x4bf5af[_0x4d90c5([0x74,0x68,0x65,0x6e])](()=>{_0x125f43||_0x3b1984(_0x4d90c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3c085c(){return _0x540360[_0x4d90c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d90c5([0x76,0x69,0x65,0x77])][_0x4d90c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4d90c5([0x61,0x75,0x74,0x6f]);}function _0x14c6e2(){_0x540360[_0x4d90c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d90c5([0x76,0x69,0x65,0x77])][_0x4d90c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4d90c5([0x61,0x75,0x74,0x6f]);}}function _0x35c555(_0x521c1f){const _0x2a3f21=[new window[(_0x4d90c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf635e2=>setTimeout(_0xf635e2,0x734f347f^_0x484926)),_0x4bf5af[_0x4d90c5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4d90c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xeb5bd1=>{let _0x276089=0x0;_0x540360[_0x4d90c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d90c5([0x6f,0x6e])](_0x4d90c5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x20281b,_0x2d8514)=>{_0x2d8514[0x0][_0x4d90c5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x276089++,_0x276089==(0x73460f5b^_0x484926)&&(_0xeb5bd1(),_0x20281b[_0x4d90c5([0x6f,0x66,0x66])]());});}))];return window[_0x4d90c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4d90c5([0x72,0x61,0x63,0x65])](_0x2a3f21)[_0x4d90c5([0x74,0x68,0x65,0x6e])](()=>_0x521c1f);}async function _0x39ebdb(){await _0x4bf5af,_0x540360[_0x4d90c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d90c5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x43f588,_0x540360[_0x4d90c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d90c5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x43f588,_0x540360[_0x4d90c5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4d90c5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3f8ff4(){return window[_0x4d90c5([0x67,0x6c,0x6f,0x62])]&&window[_0x4d90c5([0x67,0x6c,0x6f,0x62])][_0x4d90c5([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x247fe1(){return _0x4dfb62(_0x4d90c5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x304c5e(_0x4d90c5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4d90c5([0x73,0x74,0x61,0x74,0x65])]==_0x4d90c5([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2a4082(){return _0x4dfb62(_0x4d90c5([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 _0x5d7f8b(){return _0x4dfb62(_0x4d90c5([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5594fb(_0x129ba6){const _0x5b2f01=_0x2400d4();_0x540360[_0x5b2f01]=_0x4d90c5([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x129ba6,_0x129ba6!=_0x4d90c5([0x56,0x61,0x6c,0x69,0x64])&&_0x39ebdb();}function _0x2400d4(){const _0x2285f6=window[_0x4d90c5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4d90c5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4d90c5([0x6e,0x6f,0x77])]())[_0x4d90c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4d90c5([0x2e]),'');let _0x374b36=_0x4d90c5([0x4b]);for(let _0x42fbfc=0x0;_0x42fbfc<_0x2285f6[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x42fbfc+=0x2){let _0x1eced5=window[_0x4d90c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2285f6[_0x4d90c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x42fbfc,_0x42fbfc+0x2));_0x1eced5>=_0x1f7411[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1eced5-=_0x1f7411[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x374b36+=_0x1f7411[_0x1eced5];}return _0x374b36;}function _0x1af539(){const _0x343e85=_0x13e4ee[_0x4d90c5([0x73,0x70,0x6c,0x69,0x74])](_0x4d90c5([0x2e]));if(0x3!=_0x343e85[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x200062(_0x343e85[0x1]);function _0x200062(_0x32a44c){const _0x1cdefc=_0xfa4431(_0x32a44c);return _0x1cdefc&&_0x46e4e3()?_0x1cdefc:null;function _0x46e4e3(){const _0x1065d4=_0x1cdefc[_0x4d90c5([0x6a,0x74,0x69])],_0x4bd58d=window[_0x4d90c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1065d4[_0x4d90c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1065d4[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xe78403={..._0x1cdefc,[_0x4d90c5([0x6a,0x74,0x69])]:_0x1065d4[_0x4d90c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1065d4[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xe78403[_0x4d90c5([0x76,0x63])],_0x4056c5(_0xe78403)==_0x4bd58d;}}}async function _0x1dab9e(){let _0x3ba431=!0x0;try{const _0x2bf6bf=_0x13e4ee[_0x4d90c5([0x73,0x70,0x6c,0x69,0x74])](_0x4d90c5([0x2e])),[_0x4a2926,_0x37ac21,_0x5497b5]=_0x2bf6bf;return _0x479c54(_0x4a2926),await _0x3816b9(_0x4a2926,_0x37ac21,_0x5497b5),_0x3ba431;}catch{return!0x1;}function _0x479c54(_0x2179b4){const _0x1d591e=_0xfa4431(_0x2179b4);_0x1d591e&&_0x1d591e[_0x4d90c5([0x61,0x6c,0x67])]==_0x4d90c5([0x45,0x53,0x32,0x35,0x36])||(_0x3ba431=!0x1);}async function _0x3816b9(_0x45cac3,_0x1139e6,_0x290748){const _0x2eded1=window[_0x4d90c5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4d90c5([0x66,0x72,0x6f,0x6d])](_0x50aec7(_0x290748),_0x391011=>_0x391011[_0x4d90c5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3e0711=new window[(_0x4d90c5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4d90c5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x45cac3+_0x4d90c5([0x2e])+_0x1139e6),_0x389197=window[_0x4d90c5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4d90c5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x389197)return;const _0x3c5040=await _0x389197[_0x4d90c5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4d90c5([0x6a,0x77,0x6b]),_0x268893,{[_0x4d90c5([0x6e,0x61,0x6d,0x65])]:_0x4d90c5([0x45,0x43,0x44,0x53,0x41]),[_0x4d90c5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4d90c5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4d90c5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x389197[_0x4d90c5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4d90c5([0x6e,0x61,0x6d,0x65])]:_0x4d90c5([0x45,0x43,0x44,0x53,0x41]),[_0x4d90c5([0x68,0x61,0x73,0x68])]:{[_0x4d90c5([0x6e,0x61,0x6d,0x65])]:_0x4d90c5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3c5040,_0x2eded1,_0x3e0711)||(_0x3ba431=!0x1);}}function _0xfa4431(_0x3b4793){return _0x3b4793[_0x4d90c5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4d90c5([0x65,0x79]))?JSON[_0x4d90c5([0x70,0x61,0x72,0x73,0x65])](_0x50aec7(_0x3b4793)):null;}function _0x50aec7(_0x7b5894){return window[_0x4d90c5([0x61,0x74,0x6f,0x62])](_0x7b5894[_0x4d90c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4d90c5([0x2b]))[_0x4d90c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4d90c5([0x2f])));}function _0x4056c5(_0x5f2001){let _0x31d67c=0x1505;function _0x128150(_0x30a71c){for(let _0x480975=0x0;_0x480975<_0x30a71c[_0x4d90c5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x480975++){const _0x30ad8d=_0x30a71c[_0x4d90c5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x480975);_0x31d67c=(_0x31d67c<<0x5)+_0x31d67c+_0x30ad8d,_0x31d67c&=_0x31d67c;}}function _0x42d08f(_0x4f90a3){Array[_0x4d90c5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f90a3)?_0x4f90a3[_0x4d90c5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x42d08f):_0x4f90a3&&typeof _0x4f90a3==_0x4d90c5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4d90c5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f90a3)[_0x4d90c5([0x73,0x6f,0x72,0x74])]()[_0x4d90c5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4cebaf,_0x218aa2])=>{_0x128150(_0x4cebaf),_0x42d08f(_0x218aa2);}):_0x128150(window[_0x4d90c5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f90a3));}return _0x42d08f(_0x5f2001),_0x31d67c>>>0x0;}function _0x3419d4(_0x5d06ef){return _0x5d06ef[_0x4d90c5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4d90c5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4d90c5([0x30]));}function _0x442a46(_0x4246fb){return _0x4246fb[_0x4d90c5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4d90c5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4d90c5([0x6a,0x6f,0x69,0x6e])]('');}function _0x4dfb62(_0x426819){return _0x540360[_0x4d90c5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4d90c5([0x68,0x61,0x73])](_0x426819);}function _0x304c5e(_0x56b4a1){return _0x540360[_0x4d90c5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4d90c5([0x67,0x65,0x74])](_0x56b4a1);}function _0x43f588(){}function _0x4d90c5(_0x330ff0){return _0x330ff0['map'](_0x56bc35=>String['fromCharCode'](_0x56bc35))['join']('');}_0x5594fb(await _0x3d20fe());}(this);}['destroy'](){const _0x13ddf1=this['editor']['plugins']['get'](o),_0x26712e=this['editor']['config']['get']('collaboration.channelId');for(const _0x234b29 of _0x13ddf1['getCommentThreads']({'channelId':_0x26712e}))_0x13ddf1['_detachCommentThread'](_0x234b29['id']),_0x13ddf1['_threads']['delete'](_0x234b29['id']);super['destroy']();}['hasMarkerForId'](_0x2e40b2){return this['getAllMarkersForId'](_0x2e40b2)['length']>0x0;}['getAllMarkersForId'](_0x1714bc){const _0x96ca26=[];for(const _0x405605 of this['editor']['model']['markers'])_0x405605['name']['startsWith']('comment:'+_0x1714bc)&&_0x96ca26['push'](_0x405605);return _0x96ca26;}['scrollToThreadMarker'](_0x5f3f66){setTimeout(()=>{const _0x240c25=this['_getTargetForId'](_0x5f3f66);if(!_0x240c25)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5f3f66&&nt({'target':_0x240c25[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x40729b){this['editor']['model']['change'](()=>{for(const _0x45ee5f of this['getAllMarkersForId'](_0x40729b))this['editor']['editing']['reconvertMarker'](_0x45ee5f);});}['_attachArchivedThread'](_0x59d833){const _0x532ed9=this['editor']['plugins']['get'](o),_0x7c954e=this['editor']['plugins']['get'](b),_0x109db5=_0x532ed9['getCommentThread'](_0x59d833);if(!_0x109db5['isAttached']){const _0x1dd23c=_0x109db5['attachTo'](()=>this['_getTargetForId'](_0x109db5['id']));_0x7c954e['registerAnnotation'](_0x1dd23c),_0x109db5['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x2d4406=this['editor'],_0x57f546=_0x2d4406['plugins']['get'](it);_0x2d4406['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x200874,_0x1aeb3f)=>{const {id:_0x29d092}=ft(_0x200874['markerName']),_0x3d5d18=_0x2d4406['plugins']['get'](o)['getCommentThread'](_0x29d092),_0x5ec400=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x29d092;let _0x566899;if(_0x3d5d18&&_0x3d5d18['isResolved']&&!_0x5ec400&&_0x200874['item'])return _0x1aeb3f['consumable']['consume'](_0x200874['item'],'addMarker:'+_0x200874['markerName']),_0x1aeb3f['consumable']['consume'](_0x200874['item'],'removeMarker:'+_0x200874['markerName']),null;const _0x151fa2=['ck-comment-marker'];return _0x5ec400&&_0x151fa2['push']('ck-comment-marker--active'),_0x566899=_0x3d5d18?.['length']?_0x3d5d18['comments']['first']['author']['id']:_0x57f546['me']['id'],{'classes':_0x151fa2,'attributes':{'data-comment':_0x29d092,'data-author-id':_0x566899}};}}),_0x2d4406['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4fbb7f,{options:_0xf0cb3e})=>{if(_0xf0cb3e['showCommentHighlights'])return null;const _0x3b310f=_0x2d4406['plugins']['get'](o),_0x58dd9f=_0x2d4406['model']['markers']['get'](_0x4fbb7f),{id:_0x10ef03,part:_0x589668}=ft(_0x4fbb7f);return _0x58dd9f&&!_0x58dd9f['affectsData']||_0xf0cb3e['ignoreResolvedComments']&&_0x3b310f['getCommentThread'](_0x10ef03)?.['isResolved']?null:{'group':'comment','name':_0x589668?_0x10ef03+':'+_0x589668:_0x10ef03};}}),_0x2d4406['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4df13e,{writer:_0x38a665})=>_0x38a665['createElement']('$marker',{'data-name':'comment:'+_0x4df13e['getAttribute']('id')})}),_0x2d4406['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x225481=this['editor'],_0x4e890f=_0x225481['plugins']['get'](o),_0x48ea7=new Set(),_0x1e8a41=new Set();_0x225481['model']['document']['registerPostFixer'](_0x2436fd=>{let _0x577c21=!0x1;for(const {name:_0x7f43b9,data:_0x1d9ee0}of _0x225481['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3b6f30,id:_0x518174}=ft(_0x7f43b9);let _0x4e4c29=_0x1d9ee0['newRange'];if('comment'!==_0x3b6f30||!_0x4e4c29)continue;const _0x1ea8b9='$graveyard'===_0x4e4c29['root']['rootName'];_0x1ea8b9||(_0x4e4c29=ht(_0x4e4c29,_0x225481['model']),!_0x4e4c29||_0x4e4c29['isCollapsed']||!_0x1d9ee0['newRange']||_0x4e4c29['isEqual'](_0x1d9ee0['newRange']))?_0x225481['model']['hasContent'](_0x4e4c29)&&!_0x1ea8b9?this['isThreadsLoadingPaused']?_0x48ea7['add'](_0x7f43b9):this['_handleThreadMarker'](_0x7f43b9,_0x518174):(_0x1e8a41['add'](_0x7f43b9),_0x48ea7['delete'](_0x7f43b9),_0x2436fd['removeMarker'](_0x7f43b9),_0x577c21=!0x0):(_0x2436fd['updateMarker'](_0x7f43b9,{'range':_0x4e4c29}),_0x577c21=!0x0);}return _0x577c21;}),this['on']('change:isThreadsLoadingPaused',(_0x39b04d,_0x3d73c4,_0x2d4524)=>{if(!_0x2d4524&&_0x48ea7['size'])for(const _0x2c50d8 of _0x48ea7){const {id:_0x11a287}=ft(_0x2c50d8);_0x48ea7['delete'](_0x2c50d8),_0x225481['model']['markers']['get'](_0x2c50d8)&&this['_handleThreadMarker'](_0x2c50d8,_0x11a287);}}),this['listenTo'](_0x225481['model']['document'],'change',()=>{for(const {name:_0x434511,data:{newRange:_0x53b4b5}}of _0x225481['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2f6ec5,id:_0x2f745a}=ft(_0x434511);if('comment'!==_0x2f6ec5)continue;const _0x5374ea=_0x4e890f['getCommentThread'](_0x2f745a),_0x5dd0c2=this['hasMarkerForId'](_0x2f745a);_0x5374ea&&(!_0x5374ea['_hasTargetInContent']&&_0x53b4b5&&_0x225481['editing']['view']['once']('render',()=>{const _0x3eb0cf=_0x225481['plugins']['get'](y),_0x2cb8a5=_0x4e890f['_threadToController']['get'](_0x5374ea)['view'];_0x3eb0cf['getByInnerView'](_0x2cb8a5)['refreshVisibility']();},{'priority':'low'}),_0x5374ea['_hasTargetInContent']=_0x5dd0c2||!!_0x53b4b5),_0x53b4b5||(_0x1e8a41['add'](_0x434511),_0x48ea7['delete'](_0x434511));}for(const _0x6d1bd1 of _0x1e8a41){const {id:_0x4a86bd}=ft(_0x6d1bd1),_0x50c979=_0x4e890f['getCommentThread'](_0x4a86bd);if(_0x48ea7['delete'](_0x6d1bd1),!_0x50c979)continue;const _0x5d59f2=this['hasMarkerForId'](_0x4a86bd);_0x5d59f2||_0x50c979['isSubmitted']?_0x5d59f2||_0x50c979['unlinkedAt']||_0x50c979['setUnlinkedAt'](new Date()):_0x50c979['remove']();}_0x1e8a41['clear']();});}['_handleInitialThreads'](_0x52aa5d){_0x52aa5d['forEach'](_0x9bdf4b=>{_0x9bdf4b['unlinkedAt']&&this['_attachArchivedThread'](_0x9bdf4b['id']);});}['_getTargetForId'](_0x36200b){const _0x24f7e3=this['editor'],_0x1c8f0e=this['getAllMarkersForId'](_0x36200b);return et(_0x24f7e3['editing'],_0x1c8f0e);}['_getTextContext'](_0x32b0bf){const _0x272250=this['getAllMarkersForId'](_0x32b0bf);let _0x4b4496='',_0x53396c=!0x1;for(const _0x5e94b2 of _0x272250){const _0x3aed6e=_0x5e94b2['getRange']();for(const _0x13f93f of Array['from'](_0x3aed6e['getItems']()))_0x13f93f['is']('$textProxy')?(_0x4b4496&&_0x53396c&&(_0x4b4496+='\x20',_0x53396c=!0x1),_0x4b4496+=_0x13f93f['data']):_0x53396c=!0x0;_0x53396c=!0x0;}return _0x4b4496['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x48275f,_0xb6de67){const _0x554420=this['editor'],_0x301c67=_0x554420['plugins']['get'](o);let _0x40e787=_0x301c67['getCommentThread'](_0xb6de67);const _0x1050da=_0x554420['config']['get']('collaboration.channelId'),_0x40ea4b=_0x554420['plugins']['get'](b);if(_0x40e787&&(_0x40e787['unlinkedAt']&&_0x40e787['setUnlinkedAt'](null),_0x40e787['isAttached']))return _0x40e787;return!this['getAllMarkersForId'](_0xb6de67)[0x0]['managedUsingOperations']?_0x554420['editing']['view']['once']('render',()=>{if(_0x301c67['getCommentThread'](_0xb6de67))return;const _0x6e39a7=_0x554420['plugins']['get'](y);_0x40e787=_0x301c67['openNewCommentThread']({'channelId':_0x1050da,'threadId':_0xb6de67,'target':()=>this['_getTargetForId'](_0xb6de67),'context':{'type':'text','value':this['_getTextContext'](_0xb6de67)}});const _0x5c2439=_0x301c67['_threadToController']['get'](_0x40e787)['view'],_0x5e3feb=_0x6e39a7['getByInnerView'](_0x5c2439);_0x5e3feb&&_0x40ea4b['registerAnnotation'](_0x5e3feb);},{'priority':'low'}):_0x301c67['fetchCommentThread']({'channelId':_0x1050da,'threadId':_0xb6de67})['then'](_0x59c176=>{if('destroyed'!==_0x554420['state']){if(_0x40e787=_0x59c176,_0x40e787&&!_0x40e787['isAttached']){const _0x35d43d=_0x40e787['attachTo'](()=>this['_getTargetForId'](_0xb6de67));_0x40ea4b['registerAnnotation'](_0x35d43d),_0x40e787['isResolved']&&this['_reconvertMarkers'](_0xb6de67);}else{if(!_0x40e787){const _0x172006=this['getAllMarkersForId'](_0xb6de67);_0x554420['model']['change'](_0x1963ac=>{for(const _0x12129c of _0x172006)_0x1963ac['removeMarker'](_0x12129c);});}}}}),_0x40e787;}['_handleThreadMarker'](_0x2ffbae,_0x181ccf){const _0x1ac969=this['_attachMarkerToThread'](_0x2ffbae,_0x181ccf);_0x1ac969&&!_0x1ac969['context']&&_0x1ac969['setContext']({'type':'text','value':this['_getTextContext'](_0x181ccf)});}['_initAriaMarkerChangeAnnouncements'](){const _0x13daa3=this['editor'];rt(_0x13daa3['model'],({left:_0x4cb153,entered:_0x52146e})=>{for(const _0x168906 of _0x4cb153)if(mt(_0x168906)){_0x13daa3['ui']['ariaLiveAnnouncer']['announce'](N(_0x13daa3['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x68c213 of _0x52146e)if(mt(_0x68c213)){_0x13daa3['ui']['ariaLiveAnnouncer']['announce'](N(_0x13daa3['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x370f0a)));break;}});}}function dt(_0x428a56,_0xdfa749){return _0xdfa749?_0x428a56+':'+_0xdfa749:_0x428a56;}function ht(_0x1c6a45,_0x4b3d2a){const _0x11d960=_0x4b3d2a['schema'],_0x3f75b5=_0x4b3d2a['createRange'](_0x1c6a45['start']);for(const _0x22c1af of _0x1c6a45['getWalker']()){const {type:_0x4f5228,item:_0xd90633,nextPosition:_0x1ec4a2}=_0x22c1af;if('text'===_0x4f5228||_0x11d960['isObject'](_0xd90633)){const _0xea3e73=_0x4b3d2a['createPositionBefore'](_0xd90633);_0x3f75b5['isCollapsed']&&(_0x3f75b5['start']=_0xea3e73),_0x3f75b5['end']=_0x1ec4a2;}}return _0x3f75b5;}function mt(_0x3dda2a){return'comment'===ft(_0x3dda2a['name'])['group'];}class s extends _0x54d97b{['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 _0x58c53c=this['editor'],_0x3bc904=_0x58c53c['plugins']['get'](o),_0x15b1cc=_0x58c53c['plugins']['get'](r),_0x441a0b=_0x58c53c['plugins']['get'](y),_0x4aff2a=_0x58c53c['plugins']['get'](b);_0x58c53c['ui']['componentFactory']['add']('comment',()=>{const _0x548fce=this['_createUIButton'](_0x177eb7);return _0x548fce['tooltip']=!0x0,_0x548fce;}),_0x58c53c['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x50f430)),_0x4aff2a['addSourceCollector'](()=>{const _0xbb1280=[];for(const [_0x278aa7,_0x671571]of _0x3bc904['_threadToController']){const _0x399fa0=_0x15b1cc['getAllMarkersForId'](_0x278aa7['id']),_0x40440a=_0x399fa0['map'](_0x4a8fbd=>_0x4a8fbd['getRange']());_0x399fa0['length']>0x0&&_0xbb1280['push']([_0x671571['view'],_0x40440a]);}return _0xbb1280;}),this['listenTo'](_0x441a0b,'change:activeAnnotations',(_0x16e4d5,_0x20ae7e,_0x3f7563)=>{const _0x2ea9ea=Array['from'](_0x3f7563)['map'](_0xf204f5=>_0xf204f5['innerView'])['find'](_0x142144=>_0x3bc904['_viewToController']['has'](_0x142144));if(!_0x2ea9ea)return void(_0x15b1cc['activeMarker']=null);const _0x1ffdbf=_0x3bc904['_viewToController']['get'](_0x2ea9ea)['model']['id'],_0x3988c6='comment:'+_0x1ffdbf;_0x1ffdbf&&_0x15b1cc['hasMarkerForId'](_0x1ffdbf)?_0x15b1cc['activeMarker']=_0x3988c6:_0x15b1cc['activeMarker']&&(_0x15b1cc['activeMarker']=null);}),this['listenTo'](_0x3bc904,'removeCommentThread',(_0x53e9fa,{threadId:_0x38cd78,isFromAdapter:_0x5b5980})=>{!_0x5b5980&&_0x58c53c['ui']['focusTracker']['isFocused']&&_0x15b1cc['hasMarkerForId'](_0x38cd78)&&_0x58c53c['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3bc904,'addComment',(_0x326867,{threadId:_0x57081e,isFromAdapter:_0x29b3f8})=>{if(_0x29b3f8||!_0x15b1cc['hasMarkerForId'](_0x57081e)||!_0x3bc904['hasCommentThread'](_0x57081e))return;0x1===_0x3bc904['getCommentThread'](_0x57081e)['length']&&(_0x58c53c['editing']['view']['focus'](),_0x326867['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3dc5e6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x7ad1e0;for(const _0x17fa68 in _0x3dc5e6){const _0x5dd185=_0x17fa68,_0x5985d2=_0x3dc5e6[_0x5dd185];if('commentsLicenseKeyValid'==_0x5985d2||'commentsLicenseKeyInvalid'==_0x5985d2||'commentsLicenseKeyExpired'==_0x5985d2||'commentsLicenseKeyDomainLimit'==_0x5985d2||'commentsLicenseKeyNotAllowed'==_0x5985d2||'commentsLicenseKeyEvaluationLimit'==_0x5985d2||'commentsLicenseKeyUsageLimit'==_0x5985d2){delete _0x3dc5e6[_0x5dd185],_0x7ad1e0=_0x5985d2,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x7ad1e0&&_0x3dc5e6['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x7ad1e0&&_0x3dc5e6['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x7ad1e0&&_0x3dc5e6['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x7ad1e0&&_0x3dc5e6['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x7ad1e0&&_0x3dc5e6['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x7ad1e0&&_0x3dc5e6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x563739){const _0xda2f89=this['editor'],_0x226620=new _0x563739(_0xda2f89['locale']),_0x40e8f9=_0xda2f89['commands']['get']('addCommentThread');return _0x226620['set']({'label':N(_0xda2f89['locale'],'Comment'),'icon':_0x302b28}),_0x226620['bind']('isEnabled')['to'](_0x40e8f9,'isEnabled',_0x40e8f9,'hasContent',(_0x4a56bc,_0x10612d)=>_0x4a56bc&&_0x10612d),this['listenTo'](_0x226620,'execute',()=>{_0x40e8f9['execute']();}),_0x226620;}}class i extends _0x54d97b{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x432b3b){super(_0x432b3b),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x49bbee,_0x24b7ed,_0x26cbbb)=>{_0x26cbbb?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x40a0a0,_0x5285d5]of this['editor']['commands'])_0x5285d5['affectsData']&&'addCommentThread'!==_0x40a0a0&&_0x5285d5['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1c559a=this['editor']['editing']['view']['document'];this['listenTo'](_0x1c559a,'cut',_0x33bf9a=>_0x33bf9a['stop'](),{'priority':'highest'}),this['listenTo'](_0x1c559a,'clipboardInput',_0x73d1ae=>_0x73d1ae['stop'](),{'priority':'highest'}),this['listenTo'](_0x1c559a,'delete',_0x5cb1ce=>_0x5cb1ce['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x1832c0,_0xb85a9f]of this['editor']['commands'])_0xb85a9f['affectsData']&&'addCommentThread'!==_0x1832c0&&_0xb85a9f['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x31c274{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ffe58){super(_0x3ffe58),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x7b3fd3=this['context']['plugins']['get'](y);this['listenTo'](_0x7b3fd3,'_activateAnnotation',(_0x4e6f82,_0x3ffc77)=>{for(const _0x1c70ab of this['activeUIs']){const _0x18fa0a=this['_uis']['get'](_0x1c70ab);(0x0,this['uisData']['get'](_0x1c70ab)['filter'])(_0x3ffc77)&&_0x18fa0a['setActiveAnnotation'](_0x3ffc77);}}),this['listenTo'](_0x7b3fd3,'_deactivateAllAnnotations',()=>{for(const _0x575546 of this['activeUIs']){this['_uis']['get'](_0x575546)['setActiveAnnotation'](null);}}),this['listenTo'](_0x7b3fd3['_visibleAnnotations'],'add',(_0x13e620,_0x4dd989)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4dd989);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x178595){return this['activeUIs']['has'](_0x178595);}['activate'](_0x1997e7,_0x925c94=this['defaultFilter']){const _0x225785=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1997e7))throw new _0x4aef9b('annotationsuis-missing-ui',this,{'uiName':_0x1997e7});this['isActive'](_0x1997e7)&&this['deactivate'](_0x1997e7),this['activeUIs']['add'](_0x1997e7);const _0x5c7351=new S();v({'source':_0x225785['_visibleAnnotations'],'target':_0x5c7351,'filter':_0x925c94}),this['uisData']['set'](_0x1997e7,{'collection':_0x5c7351,'filter':_0x925c94});const _0x51a303=this['_uis']['get'](_0x1997e7);_0x51a303['attach'](_0x5c7351),this['listenTo'](_0x51a303,'change:activeAnnotation',(_0x467616,_0x218fc0,_0x765c37,_0x311948)=>{_0x311948&&_0x225785['_removeActiveAnnotation'](_0x311948),_0x765c37&&_0x225785['_addActiveAnnotation'](_0x765c37);});}['deactivate'](_0x584c24){if(this['activeUIs']['delete'](_0x584c24),!this['_uis']['has'](_0x584c24))throw new _0x4aef9b('annotationsuis-missing-ui',this,{'uiName':_0x584c24});const _0x4c8012=this['_uis']['get'](_0x584c24);_0x4c8012['detach'](),this['stopListening'](_0x4c8012),this['uisData']['get'](_0x584c24)['collection']['destroy'](),this['uisData']['delete'](_0x584c24);}['switchTo'](_0x39e1b9){if(!this['_uis']['has'](_0x39e1b9))throw new _0x4aef9b('annotationsuis-missing-ui',this,{'uiName':_0x39e1b9});const _0x5d9ccf=this['context']['plugins']['get'](y),_0x2df70e=Array['from'](_0x5d9ccf['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x39e1b9);const _0x118332=this['_uis']['get'](_0x39e1b9);_0x118332['setActiveAnnotation'](_0x2df70e),_0x118332['_setSelectedAnnotations']&&_0x2df70e&&_0x118332['_setSelectedAnnotations']([_0x2df70e]);}['deactivateAll'](){for(const _0x381e37 of this['activeUIs'])this['deactivate'](_0x381e37);}['register'](_0x23cd31,_0x101ff4){if(this['_uis']['has'](_0x23cd31))throw new _0x4aef9b('annotationsuis-register-already-registered');if('function'!=typeof _0x101ff4['attach']||'function'!=typeof _0x101ff4['detach']||'function'!=typeof _0x101ff4['setActiveAnnotation'])throw new _0x4aef9b('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x23cd31,_0x101ff4);}['refilterAnnotations'](){const _0xc45dd6=this['context']['plugins']['get'](y)['collection'],_0x4d3139=new Map(),_0x4e5560=Array['from'](this['activeUIs']);for(const _0x595d7e of this['activeUIs']){const _0x4250ad=this['uisData']['get'](_0x595d7e)['collection'];for(const _0x31cb86 of _0x4250ad)_0x4d3139['set'](_0x31cb86,_0x595d7e);}for(const _0x2d4f65 of _0xc45dd6){const _0x7729b6=_0x4d3139['get'](_0x2d4f65);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2d4f65);const _0x25033c=_0x4e5560['find'](_0x382e15=>this['uisData']['get'](_0x382e15)['filter'](_0x2d4f65));_0x7729b6!==_0x25033c&&(_0x7729b6&&this['uisData']['get'](_0x7729b6)['collection']['remove'](_0x2d4f65),_0x25033c&&this['uisData']['get'](_0x25033c)['collection']['add'](_0x2d4f65));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x46cc11){const _0x4e0005=[];for(const _0x1fb4a1 of this['activeUIs']){(0x0,this['uisData']['get'](_0x1fb4a1)['filter'])(_0x46cc11)&&_0x4e0005['push'](_0x1fb4a1);}if(_0x4e0005['length']>0x1)throw new _0x4aef9b('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4e0005,'annotationType':_0x46cc11['type']});}}const he=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4eb724){super(_0x4eb724);const _0x4f6d03=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 _0x4b2a0a(),this['focusCycler']=new _0x1ab4f9({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4f6d03['to']('class')],'style':{'minHeight':_0x4f6d03['to']('minHeight',_0x30a4bb=>'number'==typeof _0x30a4bb?he(_0x30a4bb+0xa):null)},'dir':_0x4eb724['uiLanguageDirection'],'role':'application','aria-label':N(_0x4eb724,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x4eb724,'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',_0x2a861e=>{this['_updateItemPositionInFocusables'](_0x2a861e['source']);}),this['list']['forEach'](_0x27502b=>{this['focusTracker']['add'](_0x27502b['element']),this['_updateItemPositionInFocusables'](_0x27502b);}),this['list']['on']('change',(_0x20de93,_0x4e1b8b)=>{for(const _0x368db5 of _0x4e1b8b['removed'])this['focusTracker']['remove'](_0x368db5['element']),this['focusables']['remove'](_0x368db5);for(const _0x5aa333 of _0x4e1b8b['added'])this['focusTracker']['add'](_0x5aa333['element']),this['_updateItemPositionInFocusables'](_0x5aa333);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0xf94bc8){const _0x213e6a=this['focusables']['getIndex'](_0xf94bc8);let _0x1110e4,_0x3d9d8c;for(const _0x17010d of this['focusables'])if(_0xf94bc8['top']<_0x17010d['top']){_0x1110e4=_0x17010d;break;}if(_0x3d9d8c=_0x1110e4?this['focusables']['getIndex'](_0x1110e4):this['focusables']['length'],-0x1!==_0x213e6a){if(_0x213e6a===_0x3d9d8c-0x1)return;this['focusables']['remove'](_0xf94bc8),_0x3d9d8c=_0x1110e4?this['focusables']['getIndex'](_0x1110e4):this['focusables']['length'];}this['focusables']['add'](_0xf94bc8,_0x3d9d8c);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x111656){super(_0x111656),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2f2faf,_0x515f72)=>_0x2f2faf+_0x515f72),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5df39e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5df39e['to']('isAnimationDisabled',_0x6f7460=>_0x6f7460?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5df39e['to']('top',_0xc527a6=>Ot(_0xc527a6))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4e9f53=this['element']['clientHeight'];_0x4e9f53&&(this['height']=_0x4e9f53);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x31c274{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f8969){super(_0x1f8969),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 _0x2091d0=this['context']['config']['get']('sidebar.container');_0x2091d0&&this['setContainer'](_0x2091d0);}['setContainer'](_0x37b85d){if(!g(_0x37b85d))throw new _0x4aef9b('sidebar-setcontainer-invalid-element');this['container']=_0x37b85d;}['_attachToContainer']({viewClass:_0x12ac5c='',spaceBetweenItems:_0x29c2bd=0x19}={}){if(!g(this['container']))throw new _0x4aef9b('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x12ac5c,this['_spaceBetweenItems']=_0x29c2bd;}['rearrange']({removedAnnotation:_0x4981b5,previousAnnotation:_0x86e84b,nextAnnotation:_0x239949}){const _0x406cb3=this['getSidebarItemView'](_0x4981b5);this['view']['list']['remove'](_0x406cb3),this['_destroySidebarItemView'](_0x4981b5),_0x86e84b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x86e84b)),_0x239949&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x239949)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x355aaf,activatedAnnotation:_0x317c9e,disableAnimationOnActivatedAnnotation:_0x4679d7}){if(this['_activeAnnotation']=_0x317c9e,_0x355aaf){_0x355aaf['isActive']=!0x1;const _0x1328af=this['getSidebarItemView'](_0x355aaf);_0x1328af&&_0x4679d7&&(_0x1328af['isAnimationDisabled']=!0x1);}if(_0x317c9e){const _0x5b8f30=this['getSidebarItemView'](_0x317c9e);_0x5b8f30&&(_0x317c9e['isActive']=!0x0,_0x4679d7&&(_0x5b8f30['isAnimationDisabled']=!0x0,_0x5b8f30['top']+=0x1),this['_alignToTargetRect'](_0x5b8f30));}}['_detachFromContainer'](_0x1fff70){if(this['view']['element']['remove'](),_0x1fff70){for(const _0x340fff of _0x1fff70)this['_destroySidebarItemView'](_0x340fff);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xb311ae,_0x48e9d5){_0x48e9d5||(_0x48e9d5=_0xb311ae['view']);const _0x281418=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x281418,_0xb311ae),this['_annotationToSidebarItemView']['set'](_0xb311ae,_0x281418),_0x281418['content']['add'](_0x48e9d5),this['listenTo'](_0xb311ae['view'],'change:targetRect',(_0x50b843,_0x27f96f,_0x322d17)=>{const _0x5100d5=this['_getTargetTop'](_0xb311ae,_0x322d17);_0x281418['_targetTop']!=_0x5100d5&&(_0x281418['_targetTop']=_0x5100d5,this['_setItemTop'](_0x281418,_0x5100d5));}),this['listenTo'](_0x281418,'change:top',()=>{this['_recalculate'](_0x281418,'top');}),this['listenTo'](_0x281418,'change:bottom',()=>{this['_recalculate'](_0x281418,'bottom');}),this['_alignToTargetRect'](_0x281418);const _0x30d83e=this['_getItemBefore'](_0x281418);if(_0x30d83e)this['_alignAfterItem'](_0x30d83e,_0x281418)||this['_alignToTargetRect'](_0x281418);else this['_alignToTargetRect'](_0x281418);return this['_updateLastItem'](),this['view']['list']['add'](_0x281418),_0x281418;}['_alignForTopChange'](_0xcf801b){if(!_0xcf801b['content']['length'])return;const _0x3c8300=this['_getItemBefore'](_0xcf801b);if(!_0x3c8300)return;const _0x379aa9=this['_sidebarItemViewToAnnotation']['get'](_0x3c8300),_0x3378e9=this['_activeAnnotation'];_0x3378e9&&_0x3378e9===_0x379aa9?this['_alignAfterItem'](_0x3c8300,_0xcf801b):this['_alignBeforeItem'](_0xcf801b,_0x3c8300);}['_alignForBottomChange'](_0x520557){if(!_0x520557['content']['length'])return;const _0x181c0b=this['_getItemAfter'](_0x520557);if(!_0x181c0b)return;const _0x5576ee=this['_sidebarItemViewToAnnotation']['get'](_0x181c0b),_0x2bed32=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x542d77=this['_activeAnnotation'];_0x542d77&&_0x542d77===_0x5576ee&&_0x2bed32?(this['_alignBeforeItem'](_0x181c0b,_0x520557),this['_alignAfterItem'](_0x520557,_0x181c0b)):_0x542d77&&_0x542d77===_0x5576ee?this['_alignBeforeItem'](_0x181c0b,_0x520557):this['_alignAfterItem'](_0x520557,_0x181c0b);}['_recalculate'](_0x5597ab,_0x4f23c1){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x136170,changedProp:_0x1a8633}of this['_recalculateBuffer'])'top'===_0x1a8633?this['_alignForTopChange'](_0x136170):this['_alignForBottomChange'](_0x136170);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5597ab,'changedProp':_0x4f23c1});}['getSidebarItemView'](_0x121df5){return this['_annotationToSidebarItemView']['get'](_0x121df5);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2aceb9){const _0x2d9a1b=this['getSidebarItemView'](_0x2aceb9);this['stopListening'](_0x2d9a1b),this['stopListening'](_0x2aceb9['view']),_0x2d9a1b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2aceb9),this['_sidebarItemViewToAnnotation']['delete'](_0x2d9a1b);}['_createSidebarView'](){const _0x3e9a94=new H(this['context']['locale']);return _0x3e9a94['render'](),this['on']('change:_lastItem',(_0x529920,_0x14d963,_0x282a9e,_0xf1869d)=>{_0xf1869d&&_0x3e9a94['unbind']('minHeight'),_0x282a9e?_0x3e9a94['bind']('minHeight')['to'](_0x282a9e,'bottom'):_0x3e9a94['minHeight']=null;}),_0x3e9a94;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4cc17b){const _0x865ab2=this['_sidebarItemViewToAnnotation']['get'](_0x4cc17b),_0xe1ddf2=_0x865ab2&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x865ab2)-0x1);return _0xe1ddf2&&this['getSidebarItemView'](_0xe1ddf2)||null;}['_getItemAfter'](_0xe18928){const _0x3a1e38=this['_sidebarItemViewToAnnotation']['get'](_0xe18928),_0x23f8c2=_0x3a1e38&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3a1e38)+0x1);return _0x23f8c2&&this['getSidebarItemView'](_0x23f8c2)||null;}['_alignBeforeItem'](_0x92d0b8,_0x53539c){_0x92d0b8['updateHeight']();const _0x22feab=G(_0x53539c['bottom']+this['_spaceBetweenItems'],_0x92d0b8['top']);return!!_0x22feab&&(this['_setItemTop'](_0x53539c,_0x53539c['top']-_0x22feab),!0x0);}['_alignAfterItem'](_0x4db14c,_0xe66560){_0x4db14c['updateHeight']();const _0x56c96f=G(_0x4db14c['bottom']+this['_spaceBetweenItems'],_0xe66560['top']);return!!_0x56c96f&&(this['_setItemTop'](_0xe66560,_0xe66560['top']+_0x56c96f,!0x1),!0x0);}['_alignToTargetRect'](_0x31ceb5){const _0x23dbdb=this['_sidebarItemViewToAnnotation']['get'](_0x31ceb5);if(!_0x23dbdb||!_0x23dbdb['target']||!_0x23dbdb['targetRect'])return;const _0x1d198d=this['_getTargetTop'](_0x23dbdb,_0x23dbdb['targetRect']);this['_setItemTop'](_0x31ceb5,_0x1d198d);}['_getTargetTop'](_0x78c49d,_0x40b4d5){if(null===_0x40b4d5)return 0x0;if(_0x78c49d['target']instanceof _0xfcb820)return _0x40b4d5['top'];{const _0x21a2df=new _0xfcb820(this['view']['element'])['top'];return _0x40b4d5['top']-_0x21a2df;}}['_setItemTop'](_0x2198a1,_0x13c2bf,_0x59829b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x59829b&&(_0x13c2bf=Math['max'](_0x13c2bf,this['_getMaxAvailableTop'](_0x2198a1))),_0x2198a1['top']=_0x13c2bf;}['_getMaxAvailableTop'](_0x1a8833){let _0xacba91=this['_getItemBefore'](_0x1a8833),_0x29080f=0x0;for(;_0xacba91;)_0xacba91['updateHeight'](),_0x29080f+=this['_spaceBetweenItems']+_0xacba91['height'],_0xacba91=this['_getItemBefore'](_0xacba91);return _0x29080f;}}function G(_0x782bee,_0x5f50bc){return Math['max'](_0x782bee-_0x5f50bc,0x0);}function g(_0x1cf78f){return null!==_0x1cf78f&&'object'==typeof _0x1cf78f&&0x1===_0x1cf78f['nodeType'];}class e extends _0x31c274{['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(_0x111067){super(_0x111067),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x17fbc7(),this['_refreshPositioningDebounced']=_0x1e5060(()=>{_0x111067['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1ee2e9=this['context']['plugins']['get'](j),_0x471768=this['context']['plugins']['get'](z);_0x1ee2e9['register']('wideSidebar',this),_0x471768['container']&&_0x1ee2e9['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1e12fd){if(_0x1e12fd===this['activeAnnotation'])return;const _0x55b909=this['context']['plugins']['get'](z);_0x55b909['_activeAnnotation']=_0x1e12fd;const _0x35591d=this['activeAnnotation'];_0x55b909['refresh']({'blurredAnnotation':_0x35591d,'activatedAnnotation':_0x1e12fd}),this['activeAnnotation']=_0x1e12fd;}['attach'](_0xdf28c1){this['annotations']=_0xdf28c1;const _0x4d1cf2=this['context']['plugins']['get'](z);if(_0x4d1cf2['_annotations']=_0xdf28c1,this['isAttached'])throw new _0x4aef9b('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4d1cf2,'set:container',()=>{this['detach'](),this['listenTo'](_0x4d1cf2,'change:container',_0x52d6f0=>{_0x52d6f0['off'](),this['attach'](_0xdf28c1);});}),_0x4d1cf2['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5be4b4=_0x42a397=>{_0x42a397['updateTargetRect'](),_0x4d1cf2['addAnnotation'](_0x42a397);};for(const _0x53fb84 of _0xdf28c1)_0x5be4b4(_0x53fb84);this['listenTo'](_0xdf28c1,'add',(_0x722a7a,_0x2c0221)=>{_0x5be4b4(_0x2c0221);}),this['listenTo'](_0xdf28c1,'remove',(_0x1b84f6,_0xf4f567,_0x1323b6)=>{_0x4d1cf2['rearrange']({'removedAnnotation':_0xf4f567,'previousAnnotation':_0xdf28c1['get'](_0x1323b6-0x1),'nextAnnotation':_0xdf28c1['get'](_0x1323b6+0x1)}),_0xf4f567===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xdf28c1,'focus',(_0x111b30,_0x4e0c91)=>{this['setActiveAnnotation'](_0x4e0c91);}),this['listenTo'](_0xdf28c1,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3d611e=this['context']instanceof _0x3bc62d?this['context']['editors']:new _0x17fbc7([this['context']]);for(const _0x26f814 of _0x3d611e)this['_integrateWithEditorAnnotations'](_0x26f814);this['listenTo'](_0x3d611e,'add',(_0x37f3d3,_0x210fb9)=>{this['listenTo'](_0x210fb9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x210fb9);});}),this['listenTo'](_0x3d611e,'remove',(_0x60fe0b,_0x30791c)=>{_0x30791c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x30791c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4aef9b('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x7bd211=this['context']['plugins']['get'](z);_0x7bd211['_detachFromContainer'](this['annotations']),this['stopListening'](_0x7bd211),this['stopListening'](this['annotations']),this['context']instanceof _0x3bc62d&&this['stopListening'](this['context']['editors']);for(const _0x4ddcf0 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4ddcf0);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x169c91){if(!_0x169c91['plugins']['has']('EditorAnnotations'))return;const _0xe9caac=_0x169c91['plugins']['get']('EditorAnnotations'),_0x3d3d37=()=>{const _0x29ecf6=_0xe9caac['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x29ecf6[0x0]||null);};this['listenTo'](_0xe9caac,'refresh',_0x3d3d37),this['listenTo'](_0xe9caac,'blur',(_0x229f87,{isAnnotationTracked:_0x48e126})=>{this['activeAnnotation']&&_0x48e126(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xe9caac,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x2b987f=>{_0xe9caac['hasDomSelection']()&&(_0x3d3d37(),_0x2b987f['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xe9caac);}['_destroyEditorAnnotationsIntegration'](_0x4da8da){this['stopListening'](_0x4da8da),this['_editorAnnotations']['remove'](_0x4da8da);}}class C extends _0x177eb7{['counterView'];constructor(_0x16e150){super(_0x16e150);const _0xacf9c0=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x15357c,_0xb76687)=>_0x15357c?'...':_0xb76687['toString']()),this['set']('annotationType',''),this['icon']=_0x302b28,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xacf9c0['to']('annotationType',_0x118851=>'ck-annotation-counter__badge--'+_0x118851),_0xacf9c0['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xacf9c0['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x31c274{['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(_0x2e6b1a){super(_0x2e6b1a),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x567b6c())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x17fbc7(),this['_refreshPositioningDebounced']=_0x1e5060(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5d956a(this['context']['locale']),this['balloonPanelView']=new _0x1ab431(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1122ce){this['annotations']=_0x1122ce;const _0x21a431=this['context']['plugins']['get'](z),_0x4e41e3=this['balloonPanelView'];if(_0x21a431['_annotations']=_0x1122ce,this['isAttached'])throw new _0x4aef9b('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x21a431,'set:container',()=>{this['detach'](),this['listenTo'](_0x21a431,'change:container',_0x216d87=>{_0x216d87['off'](),this['attach'](_0x1122ce);});}),_0x21a431['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x58f5df=_0x13df69=>{const _0x1614bd=new C(this['context']['locale']);_0x21a431['addAnnotation'](_0x13df69,_0x1614bd),this['_annotationToNarrowView']['set'](_0x13df69,_0x1614bd),_0x1614bd['bind']('isDirty','annotationType','number')['to'](_0x13df69['view'],'isDirty','type','length'),_0x1614bd['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4e41e3['content']['first']!==_0x13df69['view']?(this['_showBalloon'](_0x13df69),_0x13df69['view']['element']['focus'](),this['setActiveAnnotation'](_0x13df69)):this['setActiveAnnotation'](null);});};for(const _0x40b9cb of _0x1122ce)_0x58f5df(_0x40b9cb);this['listenTo'](_0x1122ce,'add',(_0x4635a4,_0x52a678)=>{_0x58f5df(_0x52a678);}),this['listenTo'](_0x1122ce,'remove',(_0x4e54e1,_0x6bca5e,_0x17de00)=>{this['_annotationToNarrowView']['get'](_0x6bca5e)['destroy'](),this['_annotationToNarrowView']['delete'](_0x6bca5e),_0x21a431['rearrange']({'removedAnnotation':_0x6bca5e,'previousAnnotation':_0x1122ce['get'](_0x17de00-0x1),'nextAnnotation':_0x1122ce['get'](_0x17de00+0x1)}),_0x6bca5e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1122ce,'focus',(_0x4ec26f,_0x1af38e)=>{this['setActiveAnnotation'](_0x1af38e);}),this['listenTo'](_0x1122ce,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x32a729,_0x2afced)=>{_0x2afced['keyCode']===_0x9de3a['esc']&&_0x4e41e3['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4e41e3['content']['first']),this['_hideBalloon'](),_0x2afced['stopPropagation'](),_0x2afced['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x336c6d,_0x5308b2)=>{const _0x9387b3=_0x5308b2['target'];_0x4e41e3['isVisible']&&_0x4e41e3['element']['contains'](_0x9387b3)||_0x21a431['view']['element']['contains'](_0x9387b3)||_0x336c6d['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x2768fa=>_0x2768fa['contains'](_0x9387b3))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1c9582=this['context']instanceof _0x3bc62d?this['context']['editors']:new _0x17fbc7([this['context']]);for(const _0x2a4712 of _0x1c9582)this['_integrateWithEditorAnnotations'](_0x2a4712);this['listenTo'](_0x1c9582,'add',(_0x342bdd,_0x42a6fd)=>{this['listenTo'](_0x42a6fd,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x42a6fd);});}),this['listenTo'](_0x1c9582,'remove',(_0x5e5a10,_0x359eec)=>{_0x359eec['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x359eec['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2cca5d){if(_0x2cca5d===this['activeAnnotation'])return;const _0x3caa38=this['context']['plugins']['get'](z);if(_0x3caa38['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2cca5d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2cca5d)_0x3caa38['getSidebarItemView'](_0x2cca5d)?this['_showBalloon'](_0x2cca5d):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2cca5d;}['detach'](){if(!this['isAttached'])throw new _0x4aef9b('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2a6183=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1b26e3=>_0x1b26e3['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2a6183['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3bc62d&&this['stopListening'](this['context']['editors']);for(const _0x2a4741 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2a4741);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'](_0x2ae227){if(!_0x2ae227['plugins']['has']('EditorAnnotations'))return;const _0x1d9d81=_0x2ae227['plugins']['get']('EditorAnnotations'),_0x557f6c=this['context']['plugins']['get'](z),_0x551a35=this['annotations'],_0x5efbae=this['balloonPanelView'],_0x3f9c6d=()=>{const _0x563a58=_0x1d9d81['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x563a58),this['setActiveAnnotation'](_0x563a58[0x0]||null);};this['listenTo'](_0x1d9d81,'refresh',_0x3f9c6d),this['listenTo'](_0x1d9d81,'blur',(_0x44d791,{isAnnotationTracked:_0xbe327d})=>{this['activeAnnotation']&&_0xbe327d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1d9d81,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x551a35,'blur',_0x547ce8=>{_0x1d9d81['hasDomSelection']()&&_0x547ce8['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x204be9,_0x3b09f3)=>{const _0x5e73d2=_0x3b09f3['target'];_0x5efbae['isVisible']&&_0x5efbae['element']['contains'](_0x5e73d2)||_0x557f6c['view']['element']['contains'](_0x5e73d2)||this['activeAnnotation']&&_0x1d9d81['hasDomSelection']()&&(_0x3f9c6d(),_0x204be9['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1d9d81);}['_destroyEditorAnnotationsIntegration'](_0x29a529){_0x29a529&&(this['stopListening'](_0x29a529),this['_editorAnnotations']['remove'](_0x29a529));}['_setSelectedAnnotations'](_0x308b99){for(const _0x4e1291 of this['_selectedAnnotations'])_0x308b99['includes'](_0x4e1291)||this['_manuallyClosedAnnotationViews']['delete'](_0x4e1291['view']);this['_selectedAnnotations']=_0x308b99;}['_refreshPositioning'](){const _0x5105fd=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5105fd['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x39d394){if(this['_manuallyClosedAnnotationViews']['has'](_0x39d394['view']))return;const _0x36a21d=this['balloonPanelView']['content']['first'];_0x36a21d!==_0x39d394['view']?(_0x36a21d&&this['_detachListeners'](_0x36a21d),this['_attachListeners'](_0x39d394['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x39d394['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4f530f=this['balloonPanelView']['content']['first'],_0x8507c3=_0x4f530f&&this['annotations']['getByView'](_0x4f530f);if(!_0x8507c3||!this['_annotationToNarrowView']['has'](_0x8507c3))return;const _0x30c74d=this['_annotationToNarrowView']['get'](_0x8507c3)['element'],_0x67fd0d=(function(){const _0x4ab0b7=_0x1ab431['defaultPositions'];return[_0x4ab0b7['southArrowNorthEast'],_0x4ab0b7['northArrowSouthEast'],_0x4ab0b7['southArrowNorth'],_0x4ab0b7['northArrowSouth'],_0x4ab0b7['southArrowNorthWest'],_0x4ab0b7['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x30c74d,'positions':_0x67fd0d});}['_hideBalloon'](){const _0x3b6405=this['balloonPanelView'],_0x4a1231=_0x3b6405['content']['first'];_0x4a1231&&(this['_detachListeners'](_0x4a1231),_0x3b6405['unpin'](),_0x3b6405['content']['clear']());}['_attachListeners'](_0x13eb17){this['listenTo'](_0x13eb17,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x13eb17,'Esc',(_0x386b7b,_0x262782)=>{this['_manuallyClosedAnnotationViews']['add'](_0x13eb17),this['_hideBalloon'](),_0x262782();});}['_detachListeners'](_0x287136){this['stopListening'](_0x287136);}}class c extends _0x54d97b{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x128450,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x115933){super(_0x115933),_0x115933['editing']['view']['addObserver'](_0x54081c),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x115933['plugins']['get'](_0x128450),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x1e5060(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x38028f=this['editor']['plugins']['get'](j);_0x38028f['context']===this['editor']&&(_0x38028f['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x6318b1,_0x522147)=>{const _0x25c324=this['_balloon'];if(this['isAttached']&&_0x25c324['visibleView']){const _0x285fb3=this['annotations']['getByView'](_0x25c324['visibleView']);_0x285fb3&&this['_closeAnnotation'](_0x285fb3),_0x522147();}}));}['afterInit'](){const _0x4ad564=this['editor']['plugins']['get'](j);_0x4ad564['context']===this['editor']&&(_0x4ad564['hasActive']()||_0x4ad564['switchTo']('inline'));}['setActiveAnnotation'](_0x4b8c33){_0x4b8c33!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4b8c33&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4b8c33)&&this['_addAnnotationToBalloon'](_0x4b8c33,!0x0),_0x4b8c33['isActive']=!0x0),_0x4b8c33||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4b8c33);}['attach'](_0x586791){this['annotations']=_0x586791;const _0x86de87=this['editor']['plugins']['get'](j),_0x29bf4a=this['_balloon'];if(this['isAttached'])throw new _0x4aef9b('inlineannotations-attach-already-attached',this);if(_0x86de87['context']!==this['editor'])throw new _0x4aef9b('inlineannotations-not-allowed-with-context',this);const _0x2c8100=this['editor']['plugins']['get'](b);this['listenTo'](_0x2c8100,'refresh',()=>{const _0x4f3c74=_0x2c8100['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x893b05,_0xfdbc39;!this['_forceRefresh']&&(_0x893b05=_0x4f3c74,_0xfdbc39=this['_selectedAnnotations'],_0x893b05['length']===_0xfdbc39['length']&&_0x893b05['every'](_0x265b10=>_0xfdbc39['includes'](_0x265b10)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4f3c74),this['setActiveAnnotation'](_0x4f3c74[0x0]||null));}),this['listenTo'](_0x2c8100,'blur',(_0x33af29,{isAnnotationTracked:_0x459d7c})=>{this['activeAnnotation']&&_0x459d7c(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2c8100,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x185a68,_0x5d32a0,_0x44741e)=>{_0x44741e||this['setActiveAnnotation'](null);}),this['listenTo'](_0x586791,'remove',(_0x11aa97,_0x2f9409)=>{this['_removeAnnotationFromBalloon'](_0x2f9409),_0x2f9409===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x29bf4a,'change:visibleView',(_0x10114f,_0x1129e4,_0xbb4491,_0xfc85eb)=>{_0xfc85eb&&this['stopListening'](_0xfc85eb);const _0x557e3f=_0x586791['getByView'](_0xbb4491);_0xbb4491&&_0x557e3f&&(this['listenTo'](_0xbb4491,'change:height',()=>{_0x29bf4a['updatePosition']();}),this['listenTo'](_0xbb4491,'Esc',()=>{this['_closeAnnotation'](_0x557e3f),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x557e3f&&this['setActiveAnnotation'](_0x557e3f));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x29bf4a['visibleView']&&(_0x586791['getByView'](_0x29bf4a['visibleView'])&&_0x29bf4a['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 _0x4aef9b('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x25eba3 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x25eba3);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x16cfef){for(const _0x18b863 of this['_selectedAnnotations'])_0x16cfef['includes'](_0x18b863)||this['_manuallyClosed']['delete'](_0x18b863);for(const _0x422b03 of this['annotations'])_0x16cfef['includes'](_0x422b03)||this['_removeAnnotationFromBalloon'](_0x422b03);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x561d51 of _0x16cfef)this['_addAnnotationToBalloon'](_0x561d51);}this['_selectedAnnotations']=_0x16cfef;}['_addAnnotationToBalloon'](_0x37592b,_0x599718=!0x1){this['_manuallyClosed']['has'](_0x37592b)||(this['_addedAnnotations']['has'](_0x37592b)||this['_balloon']['hasView'](_0x37592b['view'])||(this['_addedAnnotations']['add'](_0x37592b),this['_balloon']['add']({'stackId':_0x37592b['view']['id'],'view':_0x37592b['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x37592b)}})),_0x599718&&this['_balloon']['showStack'](_0x37592b['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2cc255){const _0x229ec3=_0x2cc255['target'],_0x3b2aa4=this['editor']['editing']['view'],_0x417f6c=_0x3b2aa4['document']['selection']['getFirstRange'](),_0x3d9c4b=_0x3b2aa4['domConverter']['viewRangeToDom'](_0x417f6c);if(_0x3d9c4b['collapse'](!0x0),_0x229ec3){if(_0x229ec3 instanceof _0xfcb820)return _0x229ec3;let _0x224b1b=[];for(const _0x3777f2 of _0x229ec3)_0x224b1b['push'](...F(_0x3777f2['getClientRects']()));_0x224b1b=function(_0x71ccf6){const _0x322e33=[];let _0xfbdacc=_0x71ccf6[0x0];for(let _0x477fd5=0x1;_0x477fd5<_0x71ccf6['length'];_0x477fd5++)P(_0xfbdacc,_0x71ccf6[_0x477fd5])?_0xfbdacc['width']+=_0x71ccf6[_0x477fd5]['width']:(_0x322e33['push'](_0xfbdacc),_0xfbdacc=_0x71ccf6[_0x477fd5]);return _0x322e33['push'](_0xfbdacc),_0x322e33;}(_0x224b1b);const _0xea5822=_0x3d9c4b['getBoundingClientRect']();return _0x224b1b['find'](_0x1a1c2f=>_0x1a1c2f['top']<=_0xea5822['top']&&_0x1a1c2f['bottom']>=_0xea5822['bottom']&&_0x1a1c2f['left']<=_0xea5822['left']&&_0x1a1c2f['right']>=_0xea5822['right'])||_0x224b1b[0x0];}return _0x2cc255['targetRect']||_0x3d9c4b;}['_removeAnnotationFromBalloon'](_0x5c8c3a){this['_addedAnnotations']['has'](_0x5c8c3a)&&this['_balloon']['hasView'](_0x5c8c3a['view'])&&(this['_addedAnnotations']['delete'](_0x5c8c3a),this['_balloon']['remove'](_0x5c8c3a['view']));}['_closeAnnotation'](_0x413100){this['_manuallyClosed']['add'](_0x413100),this['_removeAnnotationFromBalloon'](_0x413100);}}function F(_0x2b30be){return Array['from'](_0x2b30be)['map'](DOMRect['fromRect']);}function P(_0x2796b1,_0x33a6c6){return _0x2796b1['top']===_0x33a6c6['top']&&_0x2796b1['bottom']===_0x33a6c6['bottom']&&_0x2796b1['right']===_0x33a6c6['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1371f8,_0xe9962f){super(_0x1371f8),this['set']('isEmpty',!_0xe9962f['length']),this['focusTracker']=new _0x4b2a0a(),this['_annotationViews']=_0xe9962f,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x1ab4f9({'focusables':_0xe9962f,'focusTracker':this['focusTracker']}),this['listenTo'](_0xe9962f,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xe9962f,'remove',(_0x5e678d,_0x3912f6)=>{_0x3912f6['isActive']&&this['focus'](),_0xe9962f['length']||(this['isEmpty']=!0x0);});const _0x598643=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1371f8,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xe9962f},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x598643['if']('isEmpty','ck-hidden',_0x3aec26=>!_0x3aec26)]},'children':[{'text':N(_0x1371f8,'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 _0x1a230c of this['_annotationViews'])this['focusTracker']['add'](_0x1a230c['element']);this['_annotationViews']['on']('change',(_0x5a69f3,{added:_0x3ae73f,removed:_0x534a60})=>{for(const _0x10b208 of _0x3ae73f)this['focusTracker']['add'](_0x10b208['element']);for(const _0x29021a of _0x534a60)this['focusTracker']['remove'](_0x29021a['element']);});}}class p extends _0x31c274{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x23023b){super(_0x23023b),this['archivedThreads']=new _0x17fbc7();}['init'](){const _0x4f45dc=this['context'],_0x5aeac1=_0x4f45dc['plugins']['get'](o),_0x11dc9f=_0x4f45dc['plugins']['get'](y);this['listenTo'](_0x5aeac1,'addCommentThread',(_0x4482a4,{threadId:_0x41d494})=>{const _0xc1cf76=_0x5aeac1['getCommentThread'](_0x41d494);_0xc1cf76['archivedAt']&&this['archivedThreads']['add'](_0xc1cf76,this['_calculatePosition'](_0xc1cf76['archivedAt'])),this['listenTo'](_0xc1cf76,'change:archivedAt',(_0x28f31f,_0x36abdb,_0x398ddf)=>{_0x398ddf?this['archivedThreads']['has'](_0xc1cf76)||this['archivedThreads']['add'](_0xc1cf76,this['_calculatePosition'](_0xc1cf76['archivedAt'])):this['archivedThreads']['has'](_0xc1cf76)&&this['archivedThreads']['remove'](_0xc1cf76);});}),this['listenTo'](_0x5aeac1,'removeCommentThread',(_0x4f4bb3,{threadId:_0x171fec})=>{const _0x441457=_0x5aeac1['getCommentThread'](_0x171fec);this['stopListening'](_0x441457),this['archivedThreads']['has'](_0x441457)&&this['archivedThreads']['remove'](_0x441457);},{'priority':'highest'}),this['listenTo'](_0x11dc9f['collection'],'focus',(_0x49e847,_0x319cb4)=>{_0x319cb4['isVisible']||(_0x319cb4['isActive']=!0x0,_0x11dc9f['activate'](_0x319cb4));});}['_calculatePosition'](_0x1329bc){const _0x1b9a52=[...this['archivedThreads']]['findIndex'](_0x50077a=>_0x50077a['archivedAt']<_0x1329bc);return _0x1b9a52>-0x1?_0x1b9a52:this['archivedThreads']['length'];}}class a extends _0x54d97b{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x4ffb8b];}constructor(_0x1bc169){super(_0x1bc169),this['annotationViews']=new _0x4104d5(),this['_pendingThreads']=[];}['init'](){const _0x45a5ec=this['editor'],_0x508453=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x45a5ec['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x177eb7,!0x0)),_0x45a5ec['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x531b31=this['_createCommentsArchiveButton'](_0x50f430);return _0x531b31['set']({'role':'menuitemcheckbox'}),_0x531b31;});const _0x3b9fe0=_0x45a5ec['plugins']['get'](p),_0x5c311c=_0x45a5ec['plugins']['get']('Annotations'),_0x45c8df=_0x45a5ec['plugins']['get']('CommentsRepository');_0x3b9fe0['archivedThreads']['forEach'](_0x1f5e56=>{this['_handleNewThread'](_0x1f5e56);}),this['listenTo'](_0x3b9fe0['archivedThreads'],'add',(_0x2059d1,_0x4f13c6)=>{this['_handleNewThread'](_0x4f13c6);}),this['listenTo'](_0x5c311c['collection'],'add',(_0x1e889b,_0x2a3c19)=>{const _0x3d89da=this['_pendingThreads']['find'](_0x312797=>{const _0x1d2048=_0x45c8df['_threadToController']['get'](_0x312797);return _0x1d2048&&_0x2a3c19['innerView']===_0x1d2048['view'];});if(_0x3d89da){const _0x170797=this['_calculatePosition'](_0x3d89da['archivedAt']);this['_addAnnotationToArchive'](_0x2a3c19,_0x170797),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3d89da),0x1);}}),this['listenTo'](_0x3b9fe0['archivedThreads'],'remove',(_0x26c941,_0x181dcd)=>{const _0xffcbfc=_0x45a5ec['config']['get']('collaboration.channelId');if(!_0xffcbfc||_0x181dcd['channelId']===_0xffcbfc){if(this['_pendingThreads']['includes'](_0x181dcd))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x181dcd),0x1);else{const _0x32b8c7=_0x45c8df['_threadToController']['get'](_0x181dcd),_0x58f00c=_0x5c311c['getByInnerView'](_0x32b8c7['view']);this['annotationViews']['remove'](_0x58f00c['view']),this['stopListening'](_0x58f00c),this['stopListening'](_0x58f00c['focusableElements']);}}}),this['listenTo'](_0x5c311c['collection'],'add',(_0x6d7281,_0x5abb51)=>{this['listenTo'](_0x5abb51,'escape',_0x508453);}),this['listenTo'](_0x5c311c['collection'],'remove',(_0x2c6d73,_0x51943e)=>{this['stopListening'](_0x51943e,'escape',_0x508453);});}['_addAnnotationToArchive'](_0x38642f,_0x4bc627){this['listenTo'](_0x38642f,'set:isVisible',_0x1c0db0=>{_0x1c0db0['return']=!0x1,_0x1c0db0['stop']();}),this['annotationViews']['add'](_0x38642f['view'],_0x4bc627);}['_handleNewThread'](_0xcfc5cb){const _0x1ffa6f=this['editor']['plugins']['get']('CommentsRepository'),_0x7af37d=this['editor']['plugins']['get']('Annotations'),_0x288064=this['editor']['config']['get']('collaboration.channelId');if(!_0x288064||_0xcfc5cb['channelId']===_0x288064){const _0x4f0eec=_0x1ffa6f['_threadToController']['get'](_0xcfc5cb);if(!_0x4f0eec)return void this['_pendingThreads']['push'](_0xcfc5cb);const _0x5c16e7=this['_calculatePosition'](_0xcfc5cb['archivedAt']),_0x2cdc2c=_0x7af37d['getByInnerView'](_0x4f0eec['view']);_0x2cdc2c['isVisible']&&_0x7af37d['_visibleAnnotations']['remove'](_0x2cdc2c),this['_addAnnotationToArchive'](_0x2cdc2c,_0x5c16e7);}}['_calculatePosition'](_0x49fd59){const _0x54b296=this['editor']['config']['get']('collaboration.channelId'),_0x125423=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x27e6e3=>_0x27e6e3['channelId']===_0x54b296)['findIndex'](_0x18c7b5=>_0x18c7b5['archivedAt']<_0x49fd59);return _0x125423<0x0||_0x125423>this['annotationViews']['length']?this['annotationViews']['length']:_0x125423-0x1;}['_toggleDialog'](){const _0x580cc4=this['editor'],_0x1695a5=_0x580cc4['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x580cc4['locale'],this['annotationViews'])),'commentsArchive'===_0x1695a5['id']?_0x1695a5['hide']():_0x1695a5['show']({'id':'commentsArchive','title':N(_0x580cc4['locale'],'COMMENTS_ARCHIVE'),'icon':_0x512a11,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x4717fb['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2c17b5,_0xda79fd=!0x1){const _0x186d49=this['editor']['locale'],_0x5433d0=this['editor']['plugins']['get']('Dialog'),_0x158d9c=new _0x2c17b5(_0x186d49);return _0x158d9c['bind']('isEnabled')['to'](this,'isEnabled'),_0x158d9c['bind']('isOn')['to'](_0x5433d0,'id',_0x429922=>'commentsArchive'===_0x429922),_0x158d9c['set']({'label':N(_0x186d49,'COMMENTS_ARCHIVE'),'icon':_0x512a11,'isToggleable':!0x0}),_0xda79fd&&(_0x158d9c['tooltip']=!0x0),this['listenTo'](_0x158d9c,'execute',()=>this['_toggleDialog']()),_0x158d9c;}['_hideDialogOnAnnotationEscape']=_0x5e525d=>{const _0x5ec51c=_0x5e525d['source'];if(!this['annotationViews']['has'](_0x5ec51c['view']))return;const _0x4dc811=this['editor']['plugins']['get']('Dialog');_0x4dc811['isOpen']&&'commentsArchive'===_0x4dc811['id']&&(_0x4dc811['hide'](),_0x5e525d['stop']());};}class Comments extends _0x54d97b{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,Comment,CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|