@ckeditor/ckeditor5-comments 48.3.0-alpha.5 → 48.3.0-alpha.7
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/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 +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Ot)());constructor(_0x2d0ece={}){(_0x2d0ece=Object['assign']({},_0x2d0ece))['plugins']||(_0x2d0ece['plugins']=CommentEditor['defaultPlugins']),super(_0x2d0ece),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0x5b0904=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5b0904))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x28d0a6=>{const _0x39d90b=this['model']['document']['getRoot'](),_0x1e084c=_0x39d90b&&_0x39d90b['getChild'](_0x39d90b['childCount']-0x1);_0x28d0a6['setSelection'](_0x1e084c,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x4fe02b=this['editing']['view'],_0x4a627a=_0x4fe02b['document']['getRoot'](),_0x2b3678=_0x4a627a['getChild'](0x0);_0x4a627a['childCount']>0x1||!_0x2b3678||'p'!=_0x2b3678['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x4fe02b,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2b3678['placeholder']=this['placeholder']),ut({'view':_0x4fe02b,'element':_0x2b3678,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2b3678);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x416c1c,_0x3bca66={}){super(_0x416c1c),this['editor']=null,this['_editorConfig']=_0x3bca66,this['set']('value',_0x3bca66['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x416c1c,'Reply...')),this['set']('submitLabel',Et(_0x416c1c,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x3d7c37(),this['focusTracker']=new _0x18a754(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2f4ff6=>!_0x2f4ff6['defaultPrevented']},'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',(_0x2fb027,_0x3d7f29)=>{this['cancelButtonView']['fire']('execute'),_0x3d7f29();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5c32b6,_0x23114b)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x23114b());}),this['on']('submit',(_0x294e8c,_0x2c924b)=>{_0x2c924b['length']>0xfde8?(alert(Et(_0x416c1c,'TOO_LONG_COMMENT_ALERT',[_0x2c924b['length'],0xfde8])),_0x294e8c['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x59bc54=this['editor'];this['element']['insertBefore'](_0x59bc54['ui']['element'],this['element']['firstChild']),_0x59bc54['model']['document']['on']('change',()=>this['value']=_0x59bc54['getData']()),_0x59bc54['bind']('placeholder')['to'](this),this['focusables']['add'](_0x59bc54['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x13df6c){-0x1===_0x13df6c?(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:_0xb97c69}=this,_0x105509=new _0x51f5d3(_0xb97c69);return _0x105509['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x105509['withText']=!0x0,_0x105509['bind']('label')['to'](this,'submitLabel'),_0x105509['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x105509['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x3355cc,_0x2cc0c6)=>!_0x2cc0c6&&!!_0x3355cc['trim']()),_0x105509;}['_createCancelButton'](){const {locale:_0xc551fd}=this,_0x249437=new _0x51f5d3(_0xc551fd);return _0x249437['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x249437['label']=Et(_0xc551fd,'Cancel'),_0x249437['withText']=!0x0,_0x249437['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x249437;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x1fe02b=>{this['focusTracker']['add'](_0x1fe02b['element']);}),this['focusables']['on']('change',(_0x5a0267,_0x573947)=>{for(const _0x3b9266 of Array['from'](_0x573947['added'])['reverse']())this['focusTracker']['add'](_0x3b9266['element']);});}},xt=class extends ht{constructor(_0xde642e,_0x4f68d6,_0x530929){super(_0xde642e),this['commentInputView']=new St(_0xde642e,_0x530929),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x179226,_0x5eec5b)=>_0x179226||!!_0x5eec5b),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 _0x4a9420(_0xde642e,_0x4f68d6),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'](_0x4d93c7){this['commentInputView']['focus'](_0x4d93c7);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x538d85,_0x496ea4)=>{const {submitButtonView:_0x1ef2c2,cancelButtonView:_0xabfc55,editor:_0x57a55f}=this['commentInputView'];[_0x1ef2c2['element'],_0xabfc55['element'],_0x57a55f?_0x57a55f['editing']['view']['getDomRoot']():null]['filter'](_0x3cc68b=>_0x3cc68b)['some'](_0x251e03=>_0x251e03['contains'](_0x496ea4['target']))||(this['focus'](),_0x496ea4['preventDefault']());});}},Pt=class extends ht{constructor(_0x4497e3){super(_0x4497e3);const _0x13bb43=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x13bb43['to']('count',_0x59169d=>Et(_0x4497e3,'NUMBER_OF_COMMENTS',_0x59169d))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x9ae0d8,_0x662c84,_0x56373d){super(_0x9ae0d8);const _0x3b5538=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x662c84['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x662c84,this['_config']=_0x56373d,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x18a754(),this['keystrokes']=new _0x3d7c37(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4f3804=>this['commentViews']['map'](_0x354c4e=>_0x354c4e['element'])['includes'](_0x4f3804['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x9ae0d8),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x79f39e=>_0x79f39e-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2161c2 of _0x662c84['comments'])this['_handleNewCommentModel'](_0x2161c2);this['_handleInfoComment'](),this['listenTo'](_0x662c84['comments'],'add',(_0x19faf0,_0x483256)=>{const _0x50cb2d=this['_calculatePosition'](_0x483256);this['length']++,this['_handleNewCommentModel'](_0x483256,_0x50cb2d),this['refreshVisibleViews']();}),this['listenTo'](_0x662c84['comments'],'remove',(_0xc4e3a5,_0x566246)=>{this['length']--,this['_handleRemoveCommentModel'](_0x566246),this['refreshVisibleViews']();}),this['listenTo'](_0x662c84,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x662c84,'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',_0x3b5538['if']('length','ck-hidden',_0x1fd4e8=>!_0x1fd4e8)],'aria-label':Et(_0x9ae0d8,'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'](_0x3f6988){-0x1===_0x3f6988?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1e0334 of this['commentViews'])_0x1e0334['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x223adf,_0xb25b13){const _0x1a7f15=new this['_config']['CommentView'](this['locale'],_0x223adf,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1a7f15['viewUid']=_0x223adf['id'],_0x1a7f15['delegate']('removeComment')['to'](this),_0x1a7f15['delegate']('updateComment')['to'](this),_0x1a7f15['delegate']('resolveCommentThread')['to'](this),_0x1a7f15['delegate']('editorReady')['to'](this),_0x1a7f15['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1a7f15,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1a7f15,_0xb25b13);}['_calculatePosition'](_0x1daa8a){const _0x1c64b0=this['_model']['_findOptimalIndex'](_0x1daa8a);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1daa8a['authoredAt']?_0x1c64b0-0x1:_0x1c64b0:_0x1c64b0-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xa798a0={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0xa798a0,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xa798a0));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3f3c19){const _0x294474=this['commentViews']['remove'](_0x3f3c19['id']);this['stopListening'](_0x294474),_0x294474['isEditMode']&&this['_updateHasDirtyComment'](),_0x294474['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x108e5e=>_0x108e5e['isEditMode']);}['_rearrangeCollapse'](){const _0x598000=function(_0x4a8dbd){const _0x1a0997=new _0x43910f();for(const _0x2eb226 of _0x4a8dbd)_0x1a0997['add'](_0x2eb226);return _0x1a0997;}(this['commentViews']),_0x1278b8=this['_collapsedCommentsView']['count'];for(let _0x4e37aa=0x1;_0x4e37aa<=_0x1278b8;_0x4e37aa++)_0x598000['remove'](0x1);for(const _0xf44a1f of _0x598000)_0xf44a1f['collapse']();_0x1278b8>0x0&&_0x598000['add'](this['_collapsedCommentsView'],0x1),Dt(_0x112006(Array['from'](this['visibleViews']),Array['from'](_0x598000)),this['visibleViews'],_0x598000);}['_rearrangeExpand'](){Dt(_0x112006(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x5dfe65 of this['visibleViews'])_0x5dfe65['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x476554=>{this['focusTracker']['add'](_0x476554['element']),this['keystrokes']['listenTo'](_0x476554['element']);}),this['commentViews']['on']('change',(_0x362041,_0x37ccab)=>{for(const _0x55c601 of _0x37ccab['removed'])this['focusTracker']['remove'](_0x55c601['element']),this['keystrokes']['stopListening'](_0x55c601['element']);for(const _0x375b61 of Array['from'](_0x37ccab['added'])['reverse']())this['focusTracker']['add'](_0x375b61['element']),this['keystrokes']['listenTo'](_0x375b61['element']);});}};function Dt(_0x4bb862,_0x441ed7,_0x187352){let _0x3d239b=0x0;for(const _0x47d3ae of _0x4bb862)switch(_0x47d3ae){case'insert':_0x441ed7['add'](_0x187352['get'](_0x3d239b),_0x3d239b),_0x3d239b++;break;case'delete':_0x441ed7['remove'](_0x3d239b);break;case'equal':_0x3d239b++;}}var Vt=class extends ht{constructor(_0x1a8f95){super(_0x1a8f95);const _0xbeed2e=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xbeed2e['to']('contextValue',_0x436d69=>Et(_0x1a8f95,'THREAD_CONTEXT_LABEL',_0x436d69)),'tabindex':-0x1},'children':[{'text':_0xbeed2e['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x58c77d,_0x307dfe){super(_0x58c77d);const _0x508ef7=this['bindTemplate'];this['_model']=_0x307dfe,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x18a754(),this['keystrokes']=new _0x3d7c37(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3ec849=>!!_0x3ec849),this['bind']('contextValue')['to'](this['_model'],'context',_0x525af6=>_0x525af6&&_0x525af6['value']?this['_trimContextValue'](_0x525af6['value']):Et(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',_0x508ef7['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 _0x3726ed=new _0x51f5d3(this['locale']);return _0x3726ed['label']=Et(this['locale'],'Reopen'),_0x3726ed['tooltip']=Et(this['locale'],'Reopen'),_0x3726ed['icon']=_0x547353,_0x3726ed['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1f6625=>!_0x1f6625),_0x3726ed['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xd6646c,_0x16c9e6)=>_0xd6646c&&_0x16c9e6),_0x3726ed['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3726ed;}['_trimContextValue'](_0x33bf0c){if(_0x33bf0c['length']<0x96)return _0x33bf0c;const _0x2e2246=_0x33bf0c['lastIndexOf']('\x20',0x93);return _0x33bf0c['substring'](0x0,_0x2e2246>-0x1?_0x2e2246:0x93)+'...';}['_attachContextActions'](){const _0xd487f1=this['element']['querySelector']('.ck-context'),_0x6f48c5=_0xd487f1['querySelector']('.ck-context__value');this['listenTo'](_0xd487f1,'mouseenter',()=>{_0x6f48c5['offsetWidth']<_0x6f48c5['scrollWidth']&&_0xd487f1['classList']['add']('overlay');}),this['listenTo'](_0xd487f1,'mouseleave',()=>{_0xd487f1['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xd170d2 of this['focusables'])this['focusTracker']['add'](_0xd170d2['element']),this['keystrokes']['listenTo'](_0xd170d2['element']);}['_createContextView'](){const _0x42dc23=new Vt(this['locale']);return _0x42dc23['bind']('contextValue')['to'](this),_0x42dc23;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5ae30c,_0x27adda,_0x33df91,_0x129edf){super(_0x5ae30c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x27adda,this['_localUser']=_0x33df91,this['_config']=_0x129edf,this['commentThreadHeaderView']=new Bt(_0x5ae30c,_0x27adda),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x3dbd57(_0x5ae30c,Et(_0x5ae30c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x5ae30c,_0x27adda,Object['assign']({'CommentView':this['_config']['CommentView']},_0x129edf)),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',(_0x46a7ce,_0x1c42cf)=>_0x46a7ce||!!_0x1c42cf),this['bind']('isUnlinked')['to'](_0x27adda,'unlinkedAt',_0x3f1cfb=>!!_0x3f1cfb);let _0x3c978c=null;const _0x12ddaf=()=>{const _0x4d0357=this['_model']['comments']['first']||null;_0x4d0357!==_0x3c978c&&(_0x3c978c&&this['stopListening'](_0x3c978c,'change:content'),_0x3c978c=_0x4d0357,_0x4d0357&&this['listenTo'](_0x4d0357,'change:content',_0x12ddaf));const _0x4f481d=_0x4d0357?_0x4d0357['author']['name']:this['_localUser']['name'],_0x350bcd=_0x4d0357?new DOMParser()['parseFromString'](_0xaf539c(_0x4d0357['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x46a320=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x4f481d]);this['set']('ariaLabel',_0x350bcd?_0x46a320+'\x20'+_0x350bcd:_0x46a320);};this['listenTo'](this['_model']['comments'],'change',_0x12ddaf),_0x12ddaf(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x18a754(),this['keystrokes']=new _0x3d7c37(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5b1a8e=>_0x5b1a8e['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x1b415a(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1a7bdf=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x640a74=_0x1a7bdf['commentInputView'];return _0x1a7bdf['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x640a74,'value',(_0x38ee63,_0x5913c5,_0x55dd48,_0x110003,_0xaf4f82)=>!!_0xaf4f82||!!_0x110003&&_0x55dd48&&!_0x5913c5||_0x38ee63&&_0x55dd48&&!_0x5913c5),_0x640a74['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2877f9,_0x3fd0e4,_0x3d3c8c)=>{let _0x2ec23a;return _0x2ec23a=_0x3d3c8c&&_0x3fd0e4?'Reply\x20to\x20reopen\x20discussion...':_0x2877f9?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x2ec23a);}),_0x640a74['bind']('submitLabel')['to'](this,'length',_0x309a1b=>Et(this['locale'],_0x309a1b?'Reply':'Comment')),_0x640a74['on']('submit',(_0x3fc334,_0x159f3c)=>{this['fire']('addComment',_0x159f3c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x640a74['on']('cancel',()=>{this['focus']();}),_0x640a74['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x640a74['on']('cancel',_0x1f220a=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1f220a['stop']());}),this['on']('change:isActive',(_0x59a672,_0x5a8bc6,_0x3f77bf)=>{_0x3f77bf||this['length']||_0x640a74['value']||this['fire']('removeCommentThread');}),_0x1a7bdf;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x5cdce0();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3a8ef5,target:_0xdd601c,type:_0x2eb204,isVisible:_0x1dd393=!0x0}){super(),this['view']=_0x3a8ef5,this['view']['element']||this['view']['render'](),this['_type']=_0x2eb204,this['_target']=_0xdd601c,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x43910f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xdb36c,_0x36c19b)=>{this['view']['focusTracker']['add'](_0x36c19b);}),this['focusableElements']['on']('remove',(_0x238902,_0x110a78)=>{this['view']['focusTracker']['remove'](_0x110a78);}),this['set']('isVisible',_0x1dd393);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x562d74=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x562d74),_0x562d74;}get['targetRect'](){const _0x1afb4f=this['target'];if(null===_0x1afb4f)return null;if(_0x1afb4f instanceof _0x7f9fe4)return _0x1afb4f;const _0x2b0392=_0x1afb4f['filter'](_0x142f51=>function(_0x3c2859){return!!_0x3c2859['offsetParent']||!!_0x3c2859['getClientRects']()['item'](0x0);}(_0x142f51));return 0x0===_0x2b0392['length']?null:_0x7f9fe4['getDomElementRects'](_0x2b0392[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1b2f4a){this['view']['isActive']=_0x1b2f4a,this['view']['mainView']['isActive']=_0x1b2f4a;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x2042f2){if(!(null===_0x2042f2||_0x2042f2 instanceof _0x7f9fe4||Array['isArray'](_0x2042f2)&&_0x2042f2['every'](_0x5dcba3=>zt(_0x5dcba3))))throw new _0x4b20e3('annotation-invalid-target',null,{'target':_0x2042f2});}['_getNormalizedTarget'](){const _0x348057='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x348057)?[_0x348057]:_0x348057;}};function zt(_0x4d389e){return null!==_0x4d389e&&'object'==typeof _0x4d389e&&'nodeType'in _0x4d389e&&0x1===_0x4d389e['nodeType'];}var Jt=class extends _0x43910f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3fcc88=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x18a754(),this['_focusTracker']['on']('change:isFocused',(_0x3f455f,_0x6273fb,_0x1d1c56)=>{_0x1d1c56||this['fire']('blur');});for(const _0x2079fd of _0x3fcc88)this['add'](_0x2079fd);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x149646){if(this['has'](_0x149646))throw new _0x4b20e3('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x149646['innerView'],_0x149646),this['_viewToAnnotation']['set'](_0x149646['view'],_0x149646);for(const _0x23d510 of _0x149646['focusableElements'])this['_focusTracker']['add'](_0x23d510);if(this['listenTo'](_0x149646['focusableElements'],'add',(_0x4a3afc,_0x3934bf)=>{this['_focusTracker']['add'](_0x3934bf);}),this['listenTo'](_0x149646['focusableElements'],'remove',(_0x2a7e4c,_0x4e7020)=>{this['_focusTracker']['remove'](_0x4e7020);}),this['listenTo'](_0x149646['view']['focusTracker'],'change:isFocused',(_0x23f534,_0x4ca5f9,_0x2fffa9)=>{_0x2fffa9&&this['fire']('focus',_0x149646);}),_0x149646['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x3bb79f of this)_0x3bb79f['updateTargetRect']();}const _0x2e344d=this['_getOrderInContent'](_0x149646['view']['targetRect']);return super['add'](_0x149646,_0x2e344d);}['remove'](_0x29d981){if(!this['has'](_0x29d981))throw new _0x4b20e3('annotationcollection-not-existing-item',null);this['stopListening'](_0x29d981['view']['focusTracker']),this['stopListening'](_0x29d981['focusableElements']);for(const _0x44f5dc of _0x29d981['focusableElements'])this['_focusTracker']['remove'](_0x44f5dc);return this['_viewToAnnotation']['delete'](_0x29d981['view']),this['_innerViewToAnnotation']['delete'](_0x29d981['innerView']),super['remove'](_0x29d981);}['getByInnerView'](_0x170e70){return this['_innerViewToAnnotation']['get'](_0x170e70);}['getByView'](_0x4841fd){return this['_viewToAnnotation']['get'](_0x4841fd);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x11bd5c of this)_0x11bd5c['updateTargetRect']();this['_sort']();}['_sort'](){const _0xe3f470=Array['from'](this)['sort']((_0xd84bcd,_0x261be8)=>Zt(_0xd84bcd['view']['targetRect'],_0x261be8['view']['targetRect']));for(let _0x229287=_0xe3f470['length']-0x1;_0x229287>0x0;_0x229287--){const _0x5e34e6=_0xe3f470[_0x229287];_0x229287!==this['getIndex'](_0x5e34e6)&&(this['remove'](_0x5e34e6),this['add'](_0x5e34e6));}}['_getOrderInContent'](_0x1f803f){let _0x46b1dd=0x0;if(!_0x1f803f)return this['length'];for(const _0x1b9ab7 of this){const _0x5e250f=_0x1b9ab7['view']['targetRect'];if(_0x5e250f){if(Zt(_0x1f803f,_0x5e250f)<0x0)return _0x46b1dd;_0x46b1dd++;}}return _0x46b1dd;}['_areCachedRectsStale'](){const _0x1d4ac8=this['get'](0x0);if(!_0x1d4ac8)return!0x1;const _0x3ffddb=_0x1d4ac8['view']['targetRect'],_0x4b7c43=_0x1d4ac8['targetRect'];return!(!_0x3ffddb||!_0x4b7c43)&&(_0x3ffddb['top']!==_0x4b7c43['top']||_0x3ffddb['left']!==_0x4b7c43['left']);}};function Qt({source:_0x5e8e5e,target:_0x14fd51,filter:_0x5e50b9}){for(const _0x3e0fb2 of _0x5e8e5e)_0x5e50b9(_0x3e0fb2)&&_0x14fd51['add'](_0x3e0fb2);_0x14fd51['listenTo'](_0x5e8e5e,'add',(_0x3a83a4,_0x4a3ede)=>{_0x5e50b9(_0x4a3ede)&&_0x14fd51['add'](_0x4a3ede);}),_0x14fd51['listenTo'](_0x5e8e5e,'remove',(_0x4299e9,_0x1039bf)=>{_0x14fd51['has'](_0x1039bf)&&_0x14fd51['remove'](_0x1039bf);});}function Zt(_0x16531e,_0x5488c8){if(null===_0x16531e&&null===_0x5488c8)return 0x0;if(null===_0x16531e)return-0x1;if(null===_0x5488c8)return 0x1;const _0x4a84e0=_0x16531e['top']-_0x5488c8['top'];return 0x0==_0x4a84e0?_0x16531e['left']-_0x5488c8['left']:_0x4a84e0;}var ti=class extends _0x1011c1{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x50c65a){if(super(_0x50c65a),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x50c65a instanceof _0x53fa41){const _0x3477d7=_0x50c65a['locale'];_0x50c65a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2ce5be){this['collection']['add'](_0x2ce5be);}['remove'](_0x1d69e0){this['collection']['remove'](_0x1d69e0),_0x1d69e0['destroy']();}['refreshVisibility'](){for(const _0x570a8d of this['collection'])_0x570a8d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3fb0b3){return this['collection']['getByInnerView'](_0x3fb0b3);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2014c5 of this['collection'])_0x2014c5['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1a4e1b){this['fire']('_activateAnnotation',_0x1a4e1b);}['createAnnotation'](_0x19a8a0){return new $t(_0x19a8a0);}['createAnnotationView'](_0x89e465,_0x192515){return new qt(_0x89e465,_0x192515);}['_addActiveAnnotation'](_0x29a199){const _0x4e7f18=new Set(this['activeAnnotations']);_0x4e7f18['add'](_0x29a199),this['activeAnnotations']=_0x4e7f18;}['_removeActiveAnnotation'](_0x4cbb0a){const _0x3cbf92=new Set(this['activeAnnotations']);_0x3cbf92['delete'](_0x4cbb0a),this['activeAnnotations']=_0x3cbf92;}['_bindAnnotationsToVisibleAnnotations'](){const _0x53bc1c=this['collection'],_0x2333b6=this['_visibleAnnotations'];function _0x50b145(_0x12b1c9){const _0x3c7394=_0x12b1c9['source'];_0x3c7394['isVisible']&&!_0x2333b6['has'](_0x3c7394)?_0x2333b6['add'](_0x3c7394):!_0x3c7394['isVisible']&&_0x2333b6['has'](_0x3c7394)&&_0x2333b6['remove'](_0x3c7394),_0x3c7394['view']['focusTracker']['remove'](_0x3c7394['view']['element']),_0x3c7394['view']['focusTracker']['add'](_0x3c7394['view']['element']);}this['listenTo'](_0x53bc1c,'add',(_0x2834be,_0x3fb3e8)=>{_0x3fb3e8['isVisible']&&_0x2333b6['add'](_0x3fb3e8),this['listenTo'](_0x3fb3e8,'change:isVisible',_0x50b145);}),this['listenTo'](_0x53bc1c,'remove',(_0x38461d,_0x567446)=>{_0x2333b6['has'](_0x567446)&&_0x2333b6['remove'](_0x567446),this['stopListening'](_0x567446,'change:isVisible',_0x50b145);});}['_setupEnterAnnotationKeystroke'](){const _0x2a956c=_0x192e81=>{_0x192e81['on']('ready',()=>{_0x192e81['keystrokes']['set'](_0x21a0db,(_0x9ce82d,_0x4e9ec8)=>{const _0x5667c4=_0x4149c8(this['activeAnnotations']['values']());_0x5667c4&&(_0x5667c4['view']['focus'](),_0x4e9ec8());});});};this['context']instanceof _0x53fa41?_0x2a956c(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3587f1,_0x22a8ff)=>{_0x2a956c(_0x22a8ff);});}['_setupEscapeAnnotationHandling'](){const _0x24d9cf=_0x469ab8=>{const _0x5ab381=_0x469ab8['source'],_0x2a31f3=[];let _0x2b65be;if(Array['isArray'](_0x5ab381['target'])){_0x2b65be=_0x5ab381['target'][0x0],this['context']instanceof _0x53fa41?_0x2a31f3['push'](this['context']):this['context']['editors']&&_0x2a31f3['push'](...this['context']['editors']);for(const _0x16e10d of _0x2a31f3)for(const _0x4ca598 of _0x16e10d['editing']['view']['domRoots']['values']())if(_0x4ca598['contains'](_0x2b65be))return void _0x16e10d['editing']['view']['focus']();_0x2b65be['focus']();}};this['listenTo'](this['collection'],'add',(_0x4a6996,_0x4d59b5)=>{this['listenTo'](_0x4d59b5,'escape',_0x24d9cf,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x13bba2,_0xead261)=>{this['stopListening'](_0xead261,'escape',_0x24d9cf);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x5cdce0();var oi=class extends _0x1011c1{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x193707,_0x43683a];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f1991){super(_0x1f1991),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x310a35=this['context']['config'];_0x310a35['define']('comments.maxCommentsWhenCollapsed',0x2),_0x310a35['define']('comments.maxThreadTotalWeight',0x1f4),_0x310a35['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x310a35['define']('comments.CommentThreadView',Ut),_0x310a35['define']('comments.CommentView',Yt),_0x310a35['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x26b45f=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4adafa,_0x4f3ca4)=>this['_addCommentThread'](_0x4f3ca4)),this['on']('submitCommentThread',(_0x2dc085,_0x3ecdc8)=>this['_submitCommentThread'](_0x3ecdc8)),this['on']('resolveCommentThread',(_0x38c882,_0x2d6d47)=>this['_resolveCommentThread'](_0x2d6d47)),this['on']('resolveCommentThread',(_0x20f922,_0x33fae5)=>this['_updateActiveAnnotation'](_0x33fae5),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x22bad2,_0x23533c)=>this['_reopenCommentThread'](_0x23533c)),this['on']('reopenCommentThread',(_0x54d2bd,_0x490065)=>this['_updateActiveAnnotation'](_0x490065),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2ccc69,_0x3305e9)=>this['_removeCommentThread'](_0x3305e9)),this['on']('updateCommentThread',(_0x383adb,_0x1cb83b)=>this['_updateCommentThread'](_0x1cb83b)),this['on']('updateCommentThread',(_0x1e56b3,_0x5b2b7b)=>this['_updateActiveAnnotation'](_0x5b2b7b),{'priority':'lowest'}),this['on']('addComment',(_0x53982c,_0x7404ba)=>this['_addComment'](_0x7404ba)),this['on']('updateComment',(_0x18343d,_0x14c060)=>this['_updateComment'](_0x14c060)),this['on']('removeComment',(_0x2553ae,_0x3638b)=>this['_removeComment'](_0x3638b)),this['on']('addComment',(_0x1a6d52,{threadId:_0x438ebd,isFromAdapter:_0x248e79})=>{if(_0x248e79)return;const _0x4ad129=this['getCommentThread'](_0x438ebd),_0xf1abac=_0x4ad129&&this['_threadToController']['get'](_0x4ad129);_0xf1abac&&_0xf1abac['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x26b45f,'change:activeAnnotations',(_0x4b3a8f,_0x39f795,_0x105b96)=>{const _0x431d9c=Array['from'](_0x105b96)['map'](_0x58a277=>this['_viewToController']['get'](_0x58a277['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x431d9c?_0x431d9c['model']:null;});}set['adapter'](_0x380151){if(this['_adapter'])throw new _0x4b20e3('commentsrepository-adapter-already-set');this['_adapter']=_0x380151;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3640dd=ii,threadId:_0x3886a7=_0x2624e4(),comments:_0xaf5cf6=[],unlinkedAt:_0x1454f9=null,resolvedAt:_0x2e191d=null,resolvedBy:_0x3ed211=null,target:_0x3caff1=null,context:_0xa61496=null,attributes:_0x5ce3b5={},isResolvable:_0x39d10a=!0x0,isSubmitted:_0x50ad98=!0x1,isFromAdapter:_0xa14603=!0x1}={}){return this['fire'](ai('addCommentThread',_0x3640dd),{'channelId':_0x3640dd,'threadId':_0x3886a7,'comments':_0xaf5cf6,'unlinkedAt':_0x1454f9,'resolvedAt':_0x2e191d,'resolvedBy':_0x3ed211,'target':_0x3caff1,'context':_0xa61496,'attributes':_0x5ce3b5,'isFromAdapter':_0xa14603,'isResolvable':_0x39d10a,'isSubmitted':_0x50ad98}),this['getCommentThread'](_0x3886a7);}['openNewCommentThread']({channelId:_0x3fe77c=ii,threadId:_0x273b28=_0x2624e4(),target:_0x4ed589,context:_0x1e5235=null,isResolvable:_0x35888a=!0x0}){if(this['_readOnlyChannels']['has'](_0x3fe77c)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4ed589)throw new _0x4b20e3('commentsrepository-missing-target');const _0x4628d5=this['addCommentThread']({'channelId':_0x3fe77c,'threadId':_0x273b28,'target':_0x4ed589,'context':_0x1e5235,'isResolvable':_0x35888a});if(!_0x4628d5)return null;const _0xff8b8b=this['_threadToController']['get'](_0x4628d5),_0x503c49=_0xff8b8b['view']['commentThreadInputView']['commentInputView'],_0x3281a0=this['context']['plugins']['get'](ti),_0x392490=_0x3281a0['getByInnerView'](_0xff8b8b['view']);return _0x3281a0['activate'](_0x392490),_0x503c49['once']('editorReady',()=>_0x503c49['focus']()),_0x4628d5;}['hasCommentThread'](_0x783ba2){if('string'!=typeof _0x783ba2)throw new _0x4b20e3('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x783ba2);}['updateCommentThread']({channelId:_0x1bed84=ii,threadId:_0x467ddf,context:_0x448eaf,unlinkedAt:_0x56bf73,attributes:_0x417e3b,isFromAdapter:_0x23ad14=!0x1}){return this['fire'](ai('updateCommentThread',_0x1bed84),{'channelId':_0x1bed84,'threadId':_0x467ddf,'context':_0x448eaf,'unlinkedAt':_0x56bf73,'attributes':_0x417e3b,'isFromAdapter':_0x23ad14}),this['getCommentThread'](_0x467ddf);}['getCommentThread'](_0x116c9d){if('string'!=typeof _0x116c9d)throw new _0x4b20e3('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x116c9d);}['fetchCommentThread']({channelId:_0x360f4a,threadId:_0x56fe27}={}){const _0x4d6d41=this['getCommentThread'](_0x56fe27);if(_0x4d6d41)return Promise['resolve'](_0x4d6d41);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4b20e3('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x360f4a,'threadId':_0x56fe27})['then'](_0x620826=>this['hasCommentThread'](_0x56fe27)?this['getCommentThread'](_0x56fe27):_0x620826?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x360f4a},_0x620826)):void 0x0)['catch'](_0x14de4b=>{throw console['error'](_0x14de4b),new _0x4b20e3('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4dbc4f,skipNotAttached:_0x40aeac=!0x1,skipEmpty:_0x5841e5=!0x1,toJSON:_0x59b837=!0x1}={}){const _0x1b3609=[];for(const _0x6a8b2b of this['_threads']['values']())_0x4dbc4f&&_0x6a8b2b['channelId']!==_0x4dbc4f||_0x40aeac&&!_0x6a8b2b['isAttached']||_0x5841e5&&0x0===_0x6a8b2b['length']||_0x1b3609['push'](_0x6a8b2b);return _0x59b837?_0x1b3609['map'](_0x441d69=>_0x441d69['toJSON']()):_0x1b3609;}['getAnnotationForCommentThread'](_0x3d3e6a){const _0x58a69e=this['_threadToController']['get'](_0x3d3e6a);return _0x58a69e&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x58a69e['view'])||null;}['getCommentThreadForAnnotation'](_0x4d0b22){const _0x371e3f=this['_viewToController']['get'](_0x4d0b22['innerView']);return _0x371e3f?_0x371e3f['model']:null;}['setActiveCommentThread'](_0xbbe02){const _0x1dac6b=this['context']['plugins']['get'](ti);if(!_0xbbe02)return void(this['activeCommentThread']&&_0x1dac6b['deactivateAll']());const _0x5fd87e=this['getCommentThread'](_0xbbe02);if(!_0x5fd87e)throw new _0x4b20e3('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xbbe02});if(!this['_threadToController']['has'](_0x5fd87e))throw new _0x4b20e3('commentsrepository-active-not-attached',null,{'threadId':_0xbbe02});const _0x1e7f3b=_0x1dac6b['getByInnerView'](this['_threadToController']['get'](_0x5fd87e)['view']);_0x1dac6b['activate'](_0x1e7f3b);}['switchReadOnly'](_0x1f77b5,_0x180328){_0x1f77b5?this['_readOnlyChannels']['add'](_0x180328):this['_readOnlyChannels']['delete'](_0x180328),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2a9036){return this['_readOnlyChannels']['has'](_0x2a9036)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x451d32,_0x35bad1){return new bt(_0x451d32,_0x35bad1);}['setPermissions'](_0x4079f7,_0x36b9fe=ii){this['_permissions']['set'](_0x36b9fe,_0x4079f7),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x395c31=ii){return this['_permissions']['has'](_0x395c31)?this['_permissions']['get'](_0x395c31):ei;}['_addCommentThread']({channelId:_0x220192,threadId:_0x112cd7,comments:_0x127613,unlinkedAt:_0x3836ad,resolvedAt:_0x561484,resolvedBy:_0x55c0f9,target:_0x39607e,context:_0x69e0e8,attributes:_0x3185ed,isFromAdapter:_0x2e209a,isResolvable:_0x4b26a2,isSubmitted:_0x1a706a}){if('string'!=typeof _0x112cd7)throw new _0x4b20e3('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x112cd7});if(this['hasCommentThread'](_0x112cd7))throw new _0x4b20e3('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x112cd7});const _0x16fd5f=new ri(this,{'channelId':_0x220192,'id':_0x112cd7,'context':_0x69e0e8,'attributes':_0x3185ed,'unlinkedAt':_0x3836ad,'resolvedAt':_0x561484,'resolvedBy':_0x55c0f9?this['context']['plugins']['get'](_0x43683a)['getUser'](_0x55c0f9):null,'isResolvable':_0x4b26a2,'isSubmitted':_0x1a706a||_0x2e209a});this['_threads']['set'](_0x112cd7,_0x16fd5f);for(const _0x150792 of _0x127613)_0x16fd5f['_add'](this['_createNewComment']({'threadId':_0x112cd7,..._0x150792}));return _0x39607e&&_0x16fd5f['attachTo'](_0x39607e),_0x2e209a||!_0x16fd5f['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x220192,'threadId':_0x112cd7});}['_submitCommentThread']({channelId:_0x30e4dd,threadId:_0x422b23}){if(!this['hasCommentThread'](_0x422b23))throw new _0x4b20e3('commentsrepository-missing-comment-thread',this);const _0x5aafbf=this['getCommentThread'](_0x422b23);if(_0x5aafbf['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2c1bc1,comments:_0x16890d,resolvedAt:_0x3e7f3f,resolvedBy:_0x274218,context:_0x409d37,attributes:_0x486e27}=_0x5aafbf,_0x33458d=this['context']['plugins']['get']('PendingActions'),_0x263881=_0x33458d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x30e4dd,'threadId':_0x2c1bc1,'comments':_0x16890d['map'](_0x42999c=>_0x42999c['toJSON']()),'resolvedAt':_0x3e7f3f,'resolvedBy':_0x274218?_0x274218['id']:_0x274218,'context':_0x409d37,'attributes':_0x486e27})['then'](({comments:_0x319e0e})=>{_0x33458d['remove'](_0x263881);for(const _0x1ff9c4 of _0x319e0e)this['_updateComment']({'channelId':_0x30e4dd,'threadId':_0x422b23,'commentId':_0x1ff9c4['commentId'],'createdAt':_0x1ff9c4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2c84ba=>{throw console['error'](_0x2c84ba),new _0x4b20e3('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x305dd9,target:_0x490b23}){const _0x3b60b7=this['getCommentThread'](_0x305dd9);if(!_0x3b60b7)throw new _0x4b20e3('commentsrepository-attach-missing-comment-thread',this);const _0x1bc1e7=this['context']['plugins']['get']('PendingActions'),_0x1b5a6f=this['context']['plugins']['get'](ti),_0x16df8b=this['_createCommentThreadView'](_0x3b60b7),_0x551d74=new bt(_0x3b60b7,_0x16df8b);let _0x34a3dd=null;_0x16df8b['on']('change:isDirty',(_0x5c69e9,_0x4ececd,_0x1e510d)=>{_0x1e510d?_0x34a3dd=_0x1bc1e7['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x34a3dd&&(_0x1bc1e7['remove'](_0x34a3dd),_0x34a3dd=null);}),this['_threadToController']['set'](_0x3b60b7,_0x551d74),this['_viewToController']['set'](_0x16df8b,_0x551d74);const _0x35e129=new qt(this['context']['locale'],_0x16df8b);_0x35e129['bind']('length')['to'](_0x16df8b),_0x35e129['bind']('isDirty')['to'](_0x16df8b,'isDirty',_0x16df8b,'length',(_0x398aa9,_0x48976f)=>_0x398aa9||!_0x48976f),_0x35e129['bind']('isActive')['to'](_0x16df8b),_0x35e129['type']='comment';const _0x267074=new $t({'view':_0x35e129,'target':_0x490b23,'type':'comment','isVisible':!_0x3b60b7['archivedAt']&&!!('function'==typeof _0x490b23?_0x490b23():_0x490b23)});return _0x16df8b['on']('escape',()=>{_0x267074['fire']('escape');}),this['_bindAnnotationToEditors'](_0x16df8b,_0x267074),_0x1b5a6f['add'](_0x267074),_0x267074;}['_bindAnnotationToEditors'](_0x25a2cf,_0x31cf40){this['listenTo'](_0x25a2cf,'editorReady',(_0x29c049,_0x26e549)=>{const _0x4775af=_0x26e549['ui']['view']['body']['bodyCollectionContainer'];_0x31cf40['focusableElements']['add'](_0x4775af),this['context']instanceof _0x53fa41&&this['context']['ui']['focusTracker']['add'](_0x4775af);},{'priority':'highest'}),this['listenTo'](_0x25a2cf,'editorDestroyed',(_0x3fbfcf,_0x2e7719)=>{const _0x2dc198=_0x2e7719['ui']['view']['body']['bodyCollectionContainer'];_0x31cf40['focusableElements']['has'](_0x2dc198)&&_0x31cf40['focusableElements']['remove'](_0x2dc198),this['context']instanceof _0x53fa41&&this['context']['ui']['focusTracker']['remove'](_0x2dc198);});}['_unbindEditors'](_0x240c42){this['stopListening'](_0x240c42,'editorReady'),this['stopListening'](_0x240c42,'editorDestroyed');}['_createCommentThreadView'](_0x4cd5b1){const _0x447e6e=this['context']['plugins']['get'](_0x43683a),{config:_0x392a9f,locale:_0x3f9c59}=this['context'],_0x21b1fc=_0x48eac5(_0x392a9f['get']('locale'),_0x3f9c59);return new(0x0,(_0x392a9f['get']('comments'))['CommentThreadView'])(_0x3f9c59,_0x4cd5b1,_0x447e6e['me'],{'editorConfig':{..._0x392a9f['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x392a9f['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x392a9f['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x392a9f['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x392a9f['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x21b1fc,'CommentView':_0x392a9f['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x527b99,channelId:_0x18e3b5,resolvedAt:_0x4d38c3,resolvedBy:_0x3bb7a5,isFromAdapter:_0x55daa5}){if(!this['hasCommentThread'](_0x527b99))throw new _0x4b20e3('commentsrepository-missing-comment-thread',null,{'threadId':_0x527b99});const _0x1448ef=this['getCommentThread'](_0x527b99);if(_0x1448ef['isResolved'])throw new _0x4b20e3('commentsrepository-resolved-comment-thread',null,{'threadId':_0x527b99});const _0x43f336=this['context']['plugins']['get'](_0x43683a);if(_0x1448ef['resolvedBy']=_0x43f336['getUser'](_0x3bb7a5),_0x1448ef['resolvedAt']=_0x4d38c3,_0x55daa5||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x476ea6=this['context']['plugins']['get']('PendingActions'),_0x39f7c2=_0x476ea6['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x18e3b5,'threadId':_0x527b99})['then'](({resolvedAt:_0x79b98,resolvedBy:_0x1d5b3e})=>{_0x476ea6['remove'](_0x39f7c2),_0x1448ef['resolvedBy']['id']!==_0x1d5b3e&&(_0x1448ef['resolvedBy']=_0x43f336['getUser'](_0x1d5b3e)),_0x1448ef['resolvedAt']=_0x79b98;})['catch'](_0x4fe91d=>{throw console['error'](_0x4fe91d),new _0x4b20e3('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5edd76,channelId:_0x4e5f22,isFromAdapter:_0x8c189b}){if(!this['hasCommentThread'](_0x5edd76))throw new _0x4b20e3('commentsrepository-missing-comment-thread',null,{'threadId':_0x5edd76});const _0x7eecda=this['getCommentThread'](_0x5edd76);if(!_0x7eecda['isResolved'])throw new _0x4b20e3('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5edd76});if(_0x7eecda['resolvedBy']=null,_0x7eecda['resolvedAt']=null,_0x8c189b||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x17073f=this['context']['plugins']['get']('PendingActions'),_0x31ef02=_0x17073f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4e5f22,'threadId':_0x5edd76})['then'](()=>_0x17073f['remove'](_0x31ef02))['catch'](_0x10365a=>{throw console['error'](_0x10365a),new _0x4b20e3('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x572a45,isFromAdapter:_0x4d8384}){const _0x5d0753=this['getCommentThread'](_0x572a45);if(!_0x5d0753)throw new _0x4b20e3('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x572a45),this['_threads']['delete'](_0x572a45),!_0x5d0753['isSubmitted']||_0x4d8384||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x50d9d1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x491dab}=_0x5d0753,_0x58b473=_0x50d9d1['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x491dab,'threadId':_0x572a45})['then'](()=>_0x50d9d1['remove'](_0x58b473))['catch'](_0x1d7be3=>{throw console['error'](_0x1d7be3),new _0x4b20e3('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x412448,unlinkedAt:_0x29c0f0,context:_0xc67322,attributes:_0x7140be,isFromAdapter:_0x5bcd92}){if('string'!=typeof _0x412448)throw new _0x4b20e3('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x412448});if(!this['hasCommentThread'](_0x412448))throw new _0x4b20e3('commentsrepository-missing-comment-thread',null,{'threadId':_0x412448});const _0xb38a4e=this['getCommentThread'](_0x412448);let _0x1c5339=!0x1;if(void 0x0!==_0xc67322&&_0xb38a4e['context']!==_0xc67322&&(_0xb38a4e['context']=_0xc67322,_0x1c5339=!0x0),void 0x0!==_0x29c0f0&&_0xb38a4e['unlinkedAt']!==_0x29c0f0&&(_0xb38a4e['unlinkedAt']=_0x29c0f0,_0x1c5339=!0x0),_0x7140be&&!_0x127d94(_0x7140be,_0xb38a4e['attributes'])&&(_0xb38a4e['attributes']=_0x7140be,_0x1c5339=!0x0),!_0x1c5339)return Promise['resolve']();if(!_0xb38a4e['isSubmitted']||_0x5bcd92||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x884bce=this['context']['plugins']['get']('PendingActions'),{channelId:_0x512cca}=_0xb38a4e,_0x302a5e=_0x884bce['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x512cca,'threadId':_0x412448,'context':_0xc67322,'unlinkedAt':_0x29c0f0,'attributes':_0x7140be})['then'](()=>_0x884bce['remove'](_0x302a5e))['catch'](_0x459677=>{throw console['error'](_0x459677),new _0x4b20e3('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xc9ef79){const _0x366f70=this['context']['plugins']['get'](ti),_0x523ac4=this['getCommentThread'](_0xc9ef79);if(_0x523ac4['_isAttached']=!0x1,this['_threadToController']['has'](_0x523ac4)){const _0x1697e6=this['_threadToController']['get'](_0x523ac4),_0x3bba18=_0x1697e6['view'],_0x24af57=_0x366f70['getByInnerView'](_0x3bba18);this['_threadToController']['delete'](_0x523ac4),this['_viewToController']['delete'](_0x3bba18),_0x24af57&&_0x366f70['remove'](_0x24af57),_0x1697e6['destroy'](),_0x3bba18['destroy']()['then'](()=>{this['_unbindEditors'](_0x3bba18);});}}['_updateActiveAnnotation']({threadId:_0x31502b,resolvedAt:_0x17777a,unlinkedAt:_0x49bfd0}){const _0x2ace3c=!!_0x17777a,_0x59fe4b=this['context']['plugins']['get'](ti),_0x4e1af1=this['getCommentThread'](_0x31502b);if(this['_threadToController']['has'](_0x4e1af1)){const _0x1d4490=this['_threadToController']['get'](_0x4e1af1)['view'],_0x513d3b=_0x59fe4b['getByInnerView'](_0x1d4490);_0x513d3b&&(_0x2ace3c&&_0x59fe4b['_removeActiveAnnotation'](_0x513d3b),_0x49bfd0?_0x513d3b['isVisible']=!0x1:_0x513d3b['refreshVisibility']());}}['_getExternalAuthor'](_0x5defe4){const _0x1dc624=this['context']['plugins']['get'](_0x43683a),_0x26903a=_0x495ee9('external:'+_0x5defe4),_0x10b6f4=_0x1dc624['getUser'](_0x26903a);return _0x10b6f4||_0x1dc624['addUser']({'id':_0x26903a,'name':_0x5defe4});}['_createNewComment']({threadId:_0x2f09b8,commentId:_0x1e6758=_0x2624e4(),content:_0x2a79e2,authorId:_0x3556c9,createdAt:_0x48fbce,attributes:_0x25f45d}){if('string'!=typeof _0x1e6758)throw new _0x4b20e3('commentsrepository-invalid-commentid');if('string'!=typeof _0x3556c9)throw new _0x4b20e3('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2a79e2||!_0x2a79e2['trim']())throw new _0x4b20e3('commentsrepository-invalid-comment-content');const _0x54aa6a=this['context']['plugins']['get'](_0x43683a)['getUser'](_0x3556c9);if(!_0x54aa6a)throw new _0x4b20e3('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3556c9});let _0x142342=null,_0x4cb95a=_0x48fbce;return _0x25f45d?.['@external']&&(_0x142342=this['_getExternalAuthor'](_0x25f45d['@external']['authorName']),_0x4cb95a=new Date(_0x25f45d['@external']['createdAt'])),new hi(this,{'threadId':_0x2f09b8,'id':_0x1e6758,'author':_0x142342||_0x54aa6a,'creator':_0x54aa6a,'content':_0x2a79e2,'createdAt':_0x48fbce,'authoredAt':_0x4cb95a,'attributes':_0x25f45d});}['_addComment'](_0x3ff215){let {threadId:_0x9bc25e,content:_0x20689b,attributes:_0x6f2d8b,isFromAdapter:_0x3cd798}=_0x3ff215;const _0x28a4ed=this['getCommentThread'](_0x3ff215['threadId']);if(!_0x28a4ed)throw new _0x4b20e3('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3b9aa4=this['_createNewComment'](_0x3ff215),{id:_0x5de685}=_0x3b9aa4;if(_0x28a4ed['_add'](_0x3b9aa4),_0x3cd798||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x28a4ed['isSubmitted'])return Promise['resolve']();const _0x2d63bc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x182cd4}=_0x28a4ed,_0x5cb37a=_0x2d63bc['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x6f2d8b||(_0x6f2d8b={}),this['adapter']['addComment']({'channelId':_0x182cd4,'threadId':_0x9bc25e,'commentId':_0x5de685,'content':_0x20689b,'attributes':_0x6f2d8b})['then'](_0x51267e=>{_0x2d63bc['remove'](_0x5cb37a),_0x51267e&&this['_updateComment']({'channelId':_0x182cd4,'threadId':_0x9bc25e,'commentId':_0x5de685,'createdAt':_0x51267e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1c58bc=>{throw console['error'](_0x1c58bc),new _0x4b20e3('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5c3cd7,commentId:_0x6b5bf0,content:_0x5c8e5c,createdAt:_0x48b440,attributes:_0x236f37,isFromAdapter:_0x59506a}){if(void 0x0!==_0x5c8e5c&&('string'!=typeof _0x5c8e5c||!_0x5c8e5c['trim']()['length']))throw new _0x4b20e3('commentsrepository-update-comment-invalid-content');const _0x592c32=this['getCommentThread'](_0x5c3cd7),_0x25e78b=_0x592c32['getComment'](_0x6b5bf0);if(!_0x25e78b)throw new _0x4b20e3('commentsrepository-update-missing-comment',this);let _0x380046=!0x1;if(_0x5c8e5c&&_0x5c8e5c!==_0x25e78b['content']&&(_0x25e78b['isEditable']||_0x59506a)&&(_0x25e78b['content']=_0x5c8e5c,_0x380046=!0x0),_0x48b440&&_0x48b440!==_0x25e78b['createdAt']&&(_0x25e78b['createdAt']=_0x48b440,_0x25e78b['isExternal']||(_0x25e78b['authoredAt']=_0x48b440),_0x380046=!0x0),_0x236f37&&!_0x127d94(_0x236f37,_0x25e78b['attributes'])&&(_0x25e78b['attributes']=_0x236f37,_0x380046=!0x0),!_0x380046)return Promise['resolve']();if(_0x592c32['fire']('commentUpdated'),_0x59506a||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2c3753=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3017a8}=this['getCommentThread'](_0x25e78b['threadId']),_0x32bfc4=_0x2c3753['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3017a8,'threadId':_0x5c3cd7,'commentId':_0x6b5bf0,'content':_0x5c8e5c,'attributes':_0x236f37})['then'](()=>_0x2c3753['remove'](_0x32bfc4))['catch'](_0x49be45=>{throw console['error'](_0x49be45),new _0x4b20e3('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1cccc2,commentId:_0x4566a9,isFromAdapter:_0xf26bb2}){const _0x311c9e=this['getCommentThread'](_0x1cccc2),_0x27d1a4=_0x311c9e['getComment'](_0x4566a9);if(!_0x27d1a4)throw new _0x4b20e3('commentsrepository-remove-missing-comment',this);if(_0x311c9e['_remove'](_0x27d1a4),_0xf26bb2||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1c4ffa=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23f2dd}=_0x311c9e,_0x1a00f7=_0x1c4ffa['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x23f2dd,'threadId':_0x1cccc2,'commentId':_0x4566a9})['then'](()=>_0x1c4ffa['remove'](_0x1a00f7))['catch'](_0x952a43=>{throw console['error'](_0x952a43),new _0x4b20e3('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3d44f7,_0x4304ec){super();const _0x29e613=_0x4304ec['isResolvable'];this['channelId']=_0x4304ec['channelId'],this['id']=_0x4304ec['id'],this['comments']=new _0x43910f(),this['_repository']=_0x3d44f7,this['_isAttached']=!0x1,this['_isSubmitted']=_0x4304ec['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3d44f7,'_permissions',_0x3d44f7,'_readOnlyChannels',()=>_0x3d44f7['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3d44f7,'_permissions',()=>_0x3d44f7['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3d44f7,'_permissions',()=>{const _0xc0f24c=_0x3d44f7['getPermissions'](this['channelId']);return _0xc0f24c['write']||_0xc0f24c['admin'];}),this['bind']('isResolvable')['to'](_0x3d44f7,'_permissions',()=>_0x29e613&&_0x3d44f7['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x4304ec['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2fee61,_0x3cfb6a)=>_0x2fee61?_0x3cfb6a?_0x2fee61<_0x3cfb6a?_0x2fee61:_0x3cfb6a:_0x2fee61:_0x3cfb6a),this['set']('unlinkedAt',_0x4304ec['unlinkedAt']||null),this['set']('resolvedAt',_0x4304ec['resolvedAt']||null),this['set']('resolvedBy',_0x4304ec['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5b5a71=>!!_0x5b5a71),this['set']('attributes',_0x4304ec['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x226a84,_0x32e3b1)=>_0x226a84+_0x32e3b1['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2ab679,id:_0x3342ed}=this;this['_repository']['fire'](ai('submitCommentThread',_0x2ab679),{'channelId':_0x2ab679,'threadId':_0x3342ed});}['setUnlinkedAt'](_0x489db7){this['_update']({'unlinkedAt':_0x489db7});}['resolve']({resolvedAt:_0x1fad02=new Date(),resolvedBy:_0x16357d='',isFromAdapter:_0x19c7ce=!0x1}={}){const _0x26891b=this['_repository']['context']['plugins']['get'](_0x43683a)['me'],{channelId:_0x1b4ec2,id:_0x947b76}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x1b4ec2),{'channelId':_0x1b4ec2,'threadId':_0x947b76,'resolvedAt':_0x1fad02,'resolvedBy':_0x16357d||_0x26891b['id'],'isFromAdapter':_0x19c7ce});}['reopen']({isFromAdapter:_0x3be46e=!0x1}={}){const {channelId:_0x2d3b41,id:_0xada258}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x2d3b41),{'channelId':_0x2d3b41,'threadId':_0xada258,'isFromAdapter':_0x3be46e});}['setContext'](_0x357a97){this['context']||this['_update']({'context':_0x357a97});}['setAttribute'](_0x2ba054,_0x57ec2f){const _0x50cadd=_0x569f09(this['attributes']);_0x47947d(_0x50cadd,_0x2ba054,_0x57ec2f),this['_update']({'attributes':_0x50cadd});}['removeAttribute'](_0x2e9b27){const _0x3ff09a=_0x569f09(this['attributes']);_0xc401c1(_0x3ff09a,_0x2e9b27),this['_update']({'attributes':_0x3ff09a});}['remove']({isFromAdapter:_0x570c85=!0x1}={}){const {channelId:_0x3e95c2,id:_0x265612}=this;this['_repository']['fire'](ai('removeCommentThread',_0x3e95c2),{'channelId':_0x3e95c2,'threadId':_0x265612,'isFromAdapter':_0x570c85});}['attachTo'](_0x112a04){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x112a04});}['addComment'](_0x370219){const {channelId:_0x10ab99,id:_0x37b23f}=this;this['_repository']['fire'](ai('addComment',_0x10ab99,_0x37b23f),Object['assign']({'channelId':_0x10ab99,'threadId':_0x37b23f},_0x370219));}['getComment'](_0x4808be){if('string'!=typeof _0x4808be)throw new _0x4b20e3('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x4808be});return this['comments']['get'](_0x4808be);}['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'](_0x2450f9=>_0x2450f9['toJSON']()),'attributes':this['attributes']};}['_add'](_0x18f649){return this['listenTo'](_0x18f649,'change:authoredAt',()=>{const _0x344644=this['_findOptimalIndex'](_0x18f649),_0x2aa4e9=this['comments'];_0x344644-0x1!=_0x2aa4e9['getIndex'](_0x18f649)&&_0x344644+0x1!=_0x2aa4e9['getIndex'](_0x18f649)&&(this['_remove'](_0x18f649),this['_add'](_0x18f649));}),this['comments']['add'](_0x18f649,this['_findOptimalIndex'](_0x18f649));}['_update'](_0x1e4487){const {channelId:_0x578da6,id:_0xda277b}=this;this['_repository']['fire'](ai('updateCommentThread',_0x578da6),{..._0x1e4487,'channelId':_0x578da6,'threadId':_0xda277b});}['_remove'](_0x351dea){return this['stopListening'](_0x351dea),_0x351dea['destroy'](),this['comments']['remove'](_0x351dea);}['_findOptimalIndex'](_0x244a5f){const _0x47470b=this['comments']['find'](_0x551e31=>new Date(_0x551e31['authoredAt'])['getTime']()>new Date(_0x244a5f['authoredAt'])['getTime']());return _0x47470b?this['comments']['getIndex'](_0x47470b):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x2fd80d,_0x45b563){super();const _0x58208a=_0x2fd80d['context']['plugins']['get'](_0x43683a)['me'],_0x708942=_0x2fd80d['getCommentThread'](_0x45b563['threadId']),_0x5767a1=0x0===_0x708942['comments']['length'],_0x5b677b=_0x58208a===_0x45b563['author'];this['id']=_0x45b563['id'],this['threadId']=_0x45b563['threadId'],this['author']=_0x45b563['author'],this['creator']=_0x45b563['creator'],this['set']('content',_0x45b563['content']),this['createdAt']=_0x45b563['createdAt']||new Date(),this['set']('authoredAt',_0x45b563['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x708942,'resolvedAt'),this['set']('attributes',_0x45b563['attributes']||{}),this['bind']('isEditable')['to'](_0x2fd80d,'_permissions',()=>{const _0x213a92=_0x2fd80d['getPermissions'](_0x708942['channelId'])['write'],_0x565ac9=_0x2fd80d['getPermissions'](_0x708942['channelId'])['modifyAll'];return _0x5b677b&&_0x213a92||!_0x5b677b&&_0x565ac9;}),this['bind']('isRemovable')['to'](_0x708942,'isRemovable',_0x2fd80d,'_permissions',_0x14ffc5=>{const _0x37f38b=_0x2fd80d['getPermissions'](_0x708942['channelId'])['write'],_0x8373f2=_0x2fd80d['getPermissions'](_0x708942['channelId'])['modifyAll'];return _0x5b677b&&_0x37f38b||_0x14ffc5&&_0x5767a1||!_0x5b677b&&_0x8373f2&&!_0x5767a1;}),this['bind']('isReadOnly')['to'](_0x708942,'isReadOnly'),this['_repository']=_0x2fd80d;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0xa3fdfa){const _0x567451=document['createElement']('div');return _0x567451['innerHTML']=_0xa3fdfa,_0x567451['textContent']['length'];}(this['content']),0xc8);}['update'](_0x422205){const {threadId:_0x51a8fa,id:_0x3ed4da}=this;if(!this['_repository']['hasCommentThread'](_0x51a8fa))throw new _0x4b20e3('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4e75cf}=this['_repository']['getCommentThread'](_0x51a8fa);this['_repository']['fire'](ai('updateComment',_0x4e75cf,_0x51a8fa),{'channelId':_0x4e75cf,'threadId':_0x51a8fa,'commentId':_0x3ed4da,..._0x422205});}['setAttribute'](_0x2c3bb8,_0x3c46ec){const _0x32f400=_0x569f09(this['attributes']);_0x47947d(_0x32f400,_0x2c3bb8,_0x3c46ec),this['update']({'attributes':_0x32f400});}['removeAttribute'](_0x5de1ad){const _0x90576e=_0x569f09(this['attributes']);_0xc401c1(_0x90576e,_0x5de1ad),this['update']({'attributes':_0x90576e});}['remove'](_0x5dc0c2={}){if(!_0x5dc0c2['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4191f7,id:_0x5e3007}=this;if(!this['_repository']['hasCommentThread'](_0x4191f7))throw new _0x4b20e3('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xc54cd}=this['_repository']['getCommentThread'](_0x4191f7);this['_repository']['fire'](ai('removeComment',_0xc54cd,_0x4191f7),{'channelId':_0xc54cd,'threadId':_0x4191f7,'commentId':_0x5e3007,..._0x5dc0c2});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x38fdb8,..._0x282b66){for(const _0x12b35d of _0x282b66)void 0x0!==_0x12b35d&&(_0x38fdb8+=':'+String(_0x12b35d));return _0x38fdb8;}var ci=class extends _0x3ccdb2{constructor(_0xb80e0){super(_0xb80e0),this['set']('hasContent',!0x1);}['refresh'](){const _0x50cd6b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x10760e of _0x50cd6b['getRanges']())if(this['_hasContent'](_0x10760e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3d806a=_0x2624e4(),ranges:_0x4632a4,comment:_0x49995e}={}){const _0x21cf59=this['editor']['model'],_0x4639d7=_0x4632a4??Array['from'](_0x21cf59['document']['selection']['getRanges']()),_0x6aebfc=[];for(const _0x101817 of _0x4639d7)this['_hasContent'](_0x101817)&&_0x6aebfc['push'](this['_trimToContent'](_0x101817));if(!_0x6aebfc['length'])throw new _0x4b20e3('addcommentthreadcommand-incorrect-ranges',null);_0x49995e&&this['_createCommentThread'](_0x3d806a,_0x49995e),this['_createMarkersFromRanges'](_0x3d806a,_0x6aebfc,!!_0x49995e);}['_createMarkersFromRanges'](_0x44eb5b,_0x267753,_0x18ee87){this['editor']['model']['change'](_0x15bd62=>{for(const _0x103727 of _0x267753){const _0x274cb4='comment:'+_0x44eb5b+':'+_0x2624e4()['substr'](0x1,0x5);_0x15bd62['addMarker'](_0x274cb4,{'range':_0x103727,'usingOperation':_0x18ee87,'affectsData':_0x18ee87});}});}['_createCommentThread'](_0x1cb239,_0x3cd5c5){const _0x572614=this['editor']['plugins']['get']('CommentsRepository'),_0x16cced=this['editor']['config']['get']('collaboration.channelId'),_0xa090eb=this['editor']['plugins']['get']('Users')['me'];if(!_0xa090eb)throw new _0x4b20e3('addcommentthreadcommand-user-not-found',null);_0x572614['addCommentThread']({'threadId':_0x1cb239,'channelId':_0x16cced,'comments':[{'authorId':_0xa090eb['id'],'content':_0x3cd5c5,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x76550f){for(const _0x27d197 of _0x76550f['getItems']())if(this['_itemIsContent'](_0x27d197))return!0x0;return!0x1;}['_itemIsContent'](_0x49f786){return _0x49f786['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x49f786)&&!_0x49f786['is']('element','tableCell');}['_trimToContent'](_0x43fdf5){const _0xcadedf=_0x101aaf=>!this['_itemIsContent'](_0x101aaf['item']),_0x4bb526=_0x43fdf5['start']['getLastMatchingPosition'](_0xcadedf),_0x3f7b97=_0x43fdf5['end']['getLastMatchingPosition'](_0xcadedf,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4bb526,_0x3f7b97);}},di=class extends _0x26bf82{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x427131){super(_0x427131),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1a8636=this['editor'],_0x587009=_0x1a8636['model']['document']['selection'],_0x48c15c=_0x3b137b(()=>this['refreshSelectedViews'](),0xa);_0x587009['on']('change:range',(_0x341917,_0x3330ff)=>{_0x3330ff['directChange']&&(_0x48c15c['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1a8636['editing']['view']['document'],'change:isFocused',(_0x3b9ff6,_0x49e400,_0x222bc4)=>{_0x222bc4&&_0x48c15c();}),this['listenTo'](_0x1a8636['ui']['focusTracker'],'change:isFocused',(_0x471d0b,_0x472f4e,_0xabbdb9)=>{_0xabbdb9||this['fire']('blur',{'isAnnotationTracked':_0xf53c75=>this['_editorAnnotationsData']['has'](_0xf53c75['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1ddd58){if(this['_editorAnnotations']['has'](_0x1ddd58['view']))return;this['_editorAnnotations']['add'](_0x1ddd58['view']),this['editor']['ui']['focusTracker']['add'](_0x1ddd58['view']['element']);const _0x3afa16=this['editor']['plugins']['get'](ti);this['listenTo'](_0x3afa16['collection'],'remove',(_0x1071de,_0x380b7d)=>{this['editor']['ui']['focusTracker']['remove'](_0x380b7d['view']['element']),this['_editorAnnotations']['delete'](_0x380b7d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x16c393){if('function'!=typeof _0x16c393)throw new _0x4b20e3('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x16c393);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2cf171,annotations:_0x3af47e}){const _0x162854=[],_0x47dcce=this['editor']['model']['document']['selection'],_0x3a4cdc=Array['from'](_0x47dcce['getRanges']());for(const [_0x44d85b,_0x5f541a]of this['_editorAnnotationsData']){const _0x4e6a03=_0x24d49d(_0x5f541a),_0x41ccfe=_0x3af47e['getByInnerView'](_0x44d85b);_0x4e6a03&&_0x41ccfe&&_0x162854['push']({'annotation':_0x41ccfe,'range':_0x4e6a03});}function _0x24d49d(_0x90bb08){for(const _0x46b589 of _0x90bb08)for(const _0x206dc3 of _0x3a4cdc)if(_0x46b589['containsRange'](_0x206dc3,!_0x47dcce['isCollapsed']))return _0x46b589;return null;}return _0x162854['sort']((_0x3d3569,_0xcc278f)=>{const _0x39be94=_0x3d3569['range'],_0x4a7a01=_0xcc278f['range'];if(!_0x39be94['isEqual'](_0x4a7a01)){if(_0x39be94['containsRange'](_0x4a7a01,!0x0))return 0x1;if(_0x4a7a01['containsRange'](_0x39be94,!0x0))return-0x1;}return _0x3d3569['annotation']==_0x2cf171?-0x1:_0xcc278f['annotation']==_0x2cf171?0x1:0x0;})['map'](_0x496462=>_0x496462['annotation']);}get['_editorAnnotationsData'](){const _0x1ed1ee=new Map();for(const _0x17af81 of Array['from'](this['_dataCollectors']))for(const [_0x35b950,_0x3a56a0]of _0x17af81())_0x1ed1ee['set'](_0x35b950,_0x3a56a0);return _0x1ed1ee;}},li=class extends _0x26bf82{['afterInit'](){const _0x427bfe=this['editor'];_0x427bfe['plugins']['has']('RestrictedEditingModeEditing')&&_0x427bfe['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x26bf82{constructor(_0x453a4a){super(_0x453a4a),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x182386=this['editor'],_0x18b592=_0x182386['commands']['get']('importWord'),_0x8c4d5a=_0x182386['plugins']['get'](_0x43683a);_0x18b592&&(_0x18b592['on']('execute',(_0x8ca7c7,[,_0x55c200])=>{_0x55c200['collaboration_features']={'comments':!0x0,'user_id':_0x8c4d5a['me']['id']};},{'priority':_0x18bc67['high']+0xa}),this['listenTo'](_0x18b592,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0xf4b899,_0xc4a0fd){const {comment_threads:_0x5ce04a}=_0xc4a0fd;_0x5ce04a&&_0x5ce04a['forEach'](({thread_id:_0x2e8429,comments:_0x4fe467,is_resolved:_0x606530})=>{const _0x5b51d2=new Date(),_0x4d8f0e=_0x4fe467['map'](({author:_0x3184b2,content:_0x25a5e2,created_at:_0x39f271})=>({'content':_0x25a5e2,'authorId':this['editor']['plugins']['get'](_0x43683a)['me']['id'],'createdAt':_0x5b51d2,'attributes':{'@external':{'authorName':_0x3184b2,'createdAt':_0x39f271?new Date(_0x39f271):new Date(),'source':'importWord'}}})),_0x2a6b33=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x2a6b33,'threadId':_0x2e8429,'comments':_0x4d8f0e,'resolvedAt':_0x606530?_0x5b51d2:null});});}},ui=class extends _0x26bf82{constructor(_0x4bb399){super(_0x4bb399),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x2d43f6=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2d43f6,'contentInsertion',(_0x541f87,_0x21ea0e)=>this['_removeMarkersWithoutThreads'](_0x21ea0e['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2febbd){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2febbd;const _0x444f64=this['editor']['plugins']['get']('CommentsRepository');for(const _0xe545ee of _0x2febbd['keys']()){const [_0x2a727f,_0x1aa200]=_0xe545ee['split'](':');'comment'!=_0x2a727f||_0x444f64['hasCommentThread'](_0x1aa200)||_0x2febbd['delete'](_0xe545ee);}return _0x2febbd;}['_registerMarkerInClipboardPipeline'](){const _0x5ced82=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5f47ea=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5f47ea&&_0x5ced82['_registerMarkerToCopy']('comment',_0x5f47ea);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x502f6e){switch(_0x502f6e){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x476acd){const _0x488ebe=_0x476acd['split'](':');return{'group':_0x488ebe[0x0],'id':_0x488ebe[0x1],'part':_0x488ebe[0x2]};}var pi=class extends _0x26bf82{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x30859e,_0xa865ab)=>{if(!_0xa865ab['options']['showCommentHighlights'])return null;if(_0xa865ab['options']['ignoreResolvedComments']){const {id:_0x8761ca}=fi(_0x30859e['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x8761ca)?.['isResolved']&&_0x30859e['item'])return _0xa865ab['consumable']['consume'](_0x30859e['item'],'addMarker:'+_0x30859e['markerName']),_0xa865ab['consumable']['consume'](_0x30859e['item'],'removeMarker:'+_0x30859e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x52f21c=>{_0x52f21c['on']('addMarker:comment',(_0x31e4dc,_0x3ef7e8,_0x46925d)=>{if(!_0x46925d['options']['showCommentHighlights'])return;const _0x369f41=_0x3ef7e8['item'];if(!_0x369f41)return;const _0x5e961b=_0x46925d['mapper']['toViewElement'](_0x369f41);this['editor']['model']['schema']['isObject'](_0x369f41)&&_0x5e961b&&!_0x5e961b['getCustomProperty']('widget')&&_0x5e961b['is']('containerElement')&&Ct(_0x5e961b,_0x46925d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1266f3,{writer:_0x229188,options:_0x148ddd})=>{if(!_0x148ddd['showCommentHighlights'])return null;const _0x57adf1=_0x229188['createContainerElement']('div'),_0x4741d1=_0x229188['createEmptyElement']('hr');return _0x229188['addClass']('ck-horizontal-line',_0x57adf1),_0x229188['insert'](_0x229188['createPositionAt'](_0x57adf1,0x0),_0x4741d1),_0x57adf1;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x31cc85,{writer:_0x449d25,options:_0x27e1e0})=>{if(!_0x27e1e0['showCommentHighlights'])return null;const _0x4f583e=_0x449d25['createContainerElement']('span'),_0x21b8a6=_0x449d25['createEmptyElement']('img');return _0x449d25['addClass']('image-inline',_0x4f583e),_0x449d25['insert'](_0x449d25['createPositionAt'](_0x4f583e,0x0),_0x21b8a6),_0x4f583e;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x4c4806,{writer:_0x1279d3,options:_0x4330a4})=>{if(_0x4330a4['showCommentHighlights'])return _0x1279d3['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x52cd62,_0x4fed9f,_0x468045)=>{_0x468045['options']['showCommentHighlights']&&_0x52cd62['stop']();},{'priority':'high'});}},wi=class extends _0x26bf82{static get['requires'](){return[oi,di,_0x43683a,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f6285){super(_0x4f6285),this['set']('isThreadsLoadingPaused',!0x0),_0x4f6285['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1b314a,_0x498503,_0x48c0c6,_0x2b8154)=>{const _0x32ad0f=_0x4f6285['plugins']['get'](oi),_0x5c1ff9=_0x48c0c6?fi(_0x48c0c6)['id']:null;_0x4f6285['model']['change'](()=>{if(_0x5c1ff9){const _0x5ca5ac=this['getAllMarkersForId'](_0x5c1ff9);for(const _0x5748d0 of _0x5ca5ac)_0x4f6285['editing']['reconvertMarker'](_0x5748d0);}if(_0x2b8154){const {id:_0x402e93}=fi(_0x2b8154),_0x2e3e73=_0x32ad0f['getCommentThread'](_0x402e93);if(_0x2e3e73&&_0x2e3e73['unlinkedAt'])return;if(_0x2e3e73&&!_0x2e3e73['isAttached'])return;const _0x1874d4=this['getAllMarkersForId'](_0x402e93);for(const _0x1652bd of _0x1874d4)_0x4f6285['editing']['reconvertMarker'](_0x1652bd);}}),_0x5c1ff9&&this['scrollToThreadMarker'](_0x5c1ff9);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x34f5b9=this['editor'],_0x472f03=_0x34f5b9['plugins']['get'](oi),_0x3354cc=_0x34f5b9['config']['get']('collaboration.channelId'),_0x221dd1=_0x472f03['getCommentThreads']()['filter'](_0x5d5b51=>_0x5d5b51['channelId']!==_0x3354cc);_0x34f5b9['commands']['add']('addCommentThread',new ci(_0x34f5b9)),this['listenTo'](_0x34f5b9,'change:isReadOnly',(_0x54ae9e,_0x27164d,_0x2cba41)=>{_0x472f03['switchReadOnly'](_0x2cba41,_0x34f5b9['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x472f03,gi('addCommentThread',_0x3354cc),(_0x223822,{threadId:_0x445d30})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x445d30)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x445d30);}),this['listenTo'](_0x472f03,gi('removeCommentThread',_0x3354cc),(_0x296ccf,{threadId:_0x1b961})=>{_0x34f5b9['model']['enqueueChange']({'isUndoable':!0x1},_0x19ffaf=>{const _0xc71bcd=this['getAllMarkersForId'](_0x1b961);for(const _0x1f4b9c of _0xc71bcd)_0x19ffaf['removeMarker'](_0x1f4b9c);});}),this['listenTo'](_0x472f03,gi('resolveCommentThread',_0x3354cc),(_0x5ea2a1,{threadId:_0x87be75})=>{this['_reconvertMarkers'](_0x87be75);const _0x4324e1=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x4324e1['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x87be75)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x472f03,gi('reopenCommentThread',_0x3354cc),(_0x2b7430,{threadId:_0x3b452d})=>{this['_reconvertMarkers'](_0x3b452d);},{'priority':'low'}),this['listenTo'](_0x472f03,gi('addComment',_0x3354cc),(_0x199bc7,{threadId:_0x561c05,isFromAdapter:_0x5ed0d7})=>{const _0x337220=this['getAllMarkersForId'](_0x561c05);!_0x5ed0d7&&0x0!=_0x337220['length']&&_0x472f03['hasCommentThread'](_0x561c05)&&0x1===_0x472f03['getCommentThread'](_0x561c05)['length']&&_0x34f5b9['model']['enqueueChange']({'isUndoable':!0x1},_0x3f9ec0=>{for(const _0x464fc7 of _0x337220)_0x3f9ec0['updateMarker'](_0x464fc7,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x221dd1);}['afterInit'](){!async function(_0x2256bb){const _0x476ce3='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x297618=0x78e40,_0x19ab68=window['Date']['now'](),_0x53ff6e=_0x2256bb['editor'],_0x221172=new window['Promise'](_0x1dc257=>{_0x53ff6e['once']('ready',_0x1dc257);}),_0x10885f={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x3801dd=_0x53ff6e['config']['get']('licenseKey');async function _0xa04508(){let _0x2e72dc,_0x7c1d66=null,_0x2f841d=null;try{return'GPL'==_0x3801dd?'NotAllowed':(_0x2e72dc=_0x171407(),_0x2e72dc?(_0x2e72dc['usageEndpoint']&&(_0x2f841d=_0x262109(_0x2e72dc['usageEndpoint'],_0x2e72dc['jti'])),await _0x163d2d()?_0x1b8624()?_0x16de1c()?'Expired':_0x33f46a()?('evaluation'==_0x2e72dc['licenseType']&&(_0x7c1d66=_0x4caaa9('EvaluationLimit')),await _0x7fa439()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x16de1c(){const _0x417eef=['evaluation','trial']['includes'](_0x2e72dc['licenseType'])?_0x19ab68/0x3e8:0xe10*_0x297618;return _0x2e72dc['exp']<_0x417eef;}function _0x1b8624(){const _0x5bb21a=_0x2e72dc['features'];if(!_0x5bb21a)return!0x1;if(_0x5bb21a['includes']('*'))return!0x0;if(_0x5bb21a['includes']('CMT'))return!0x0;if(_0x5bb21a['includes']('TRILIUM')&&_0x2dc0e8())return!0x0;if(_0x5bb21a['includes']('RCMT')){if(_0x1e70ce())return!0x0;if(_0x1fdb69()||_0x76abb3())return!0x0;}return!0x1;}function _0x33f46a(){const _0x4d9842=_0x2e72dc['licensedHosts'];if(!_0x4d9842||0x0==_0x4d9842['length'])return!0x0;const {hostname:_0x1a5713}=new URL(window['location']['href']);if(_0x4d9842['includes'](_0x1a5713))return!0x0;const _0x13df35=_0x1a5713['split']('.');return _0x4d9842['filter'](_0x582bdf=>_0x582bdf['includes']('*'))['map'](_0x4d2f26=>_0x4d2f26['split']('.'))['filter'](_0x21da72=>_0x21da72['length']<=_0x13df35['length'])['map'](_0xbb1ee8=>Array(_0x13df35['length']-_0xbb1ee8['length'])['fill']('*'===_0xbb1ee8[0x0]?'*':'')['concat'](_0xbb1ee8))['some'](_0x27c20e=>_0x13df35['every']((_0x412d3a,_0x9dd870)=>_0x27c20e[_0x9dd870]===_0x412d3a||'*'===_0x27c20e[_0x9dd870]));}function _0x7fa439(){return _0x7c1d66&&_0x2f841d?new window['Promise']((_0x261552,_0x4449ef)=>{_0x7c1d66['then'](_0x261552,_0x4449ef),_0x2f841d['then'](_0x12b96f=>{'Valid'!=_0x12b96f&&_0x261552(_0x12b96f);},_0x4449ef);}):_0x7c1d66||_0x2f841d||'Valid';}}function _0x262109(_0x25b7fe,_0x24890a){return new window['Promise'](_0x4db168=>{if(_0x2f7541())return _0x4db168('Valid');_0x1e4a86(),_0x53ff6e['decorate']('_sendUsageRequest');let _0x3bbedf=!0x1;const _0x277f6e=_0x2624e4();function _0x4d6e2e(_0x5593cb){return!!_0x5593cb&&('object'==typeof _0x5593cb||'function'==typeof _0x5593cb)&&'function'==typeof _0x5593cb['then']&&'function'==typeof _0x5593cb['catch'];}function _0x487b01(_0x100524){_0x35125d(_0x100524)['then'](_0x43ef78=>_0x43ef78&&'ok'==_0x43ef78['status']?_0x4bc2e7(_0x5c1285(_0x277f6e+_0x24890a))!=_0x43ef78['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x124bce=>(_0x4e2c15(),_0x124bce),()=>{const _0x148e2f=_0x3c94a0();return null==_0x148e2f?(_0x4e2c15(),'Valid'):_0x19ab68-_0x148e2f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4db168)['catch'](()=>{_0x4db168('UsageLimit');});const _0x2b77a4=0x36ee80;function _0x4e2c15(){const _0x35508a='llct-'+_0x4bc2e7(_0x5c1285(_0x25b7fe)),_0x32bd08=_0x504dc0(_0x4bc2e7(window['Math']['ceil'](_0x19ab68/_0x2b77a4)));window['localStorage']['setItem'](_0x35508a,_0x32bd08);}function _0x3c94a0(){const _0x519c14='llct-'+_0x4bc2e7(_0x5c1285(_0x25b7fe)),_0x57e983=window['localStorage']['getItem'](_0x519c14);return _0x57e983?window['parseInt'](_0x504dc0(_0x57e983),0x10)*_0x2b77a4:null;}function _0x35125d(_0x1b7297){return new window['Promise']((_0x132aef,_0x3ef776)=>{_0x1b7297['then'](_0x132aef,_0x3ef776),window['setTimeout'](_0x3ef776,0x1d4c0);});}}_0x53ff6e['on']('_sendUsageRequest',(_0x48dfa2,_0x37b7d0)=>{if(_0x37b7d0[0x0]!=_0x25b7fe)return _0x4db168('UsageLimit');_0x37b7d0[0x1]={..._0x37b7d0[0x1],'requestId':_0x277f6e};},{'priority':'high'}),_0x53ff6e['on']('_sendUsageRequest',_0x594678=>{_0x4d6e2e(_0x594678['return'])&&(_0x3bbedf=!0x0,_0x487b01(_0x594678['return']));},{'priority':'low'}),_0x221172['then'](()=>{_0x3bbedf||_0x4db168('UsageLimit');});});function _0x2f7541(){return'auto'==_0x53ff6e['editing']['view']['_overlayModeHint'];}function _0x1e4a86(){_0x53ff6e['editing']['view']['_overlayModeHint']='auto';}}function _0x4caaa9(_0x53355e){const _0x216612=[new window['Promise'](_0x3e2e7c=>setTimeout(_0x3e2e7c,0x93ecc)),_0x221172['then'](()=>new window['Promise'](_0x4b41f8=>{let _0x2f01ed=0x0;_0x53ff6e['model']['on']('applyOperation',(_0x1444cf,_0x5e6d08)=>{_0x5e6d08[0x0]['isDocumentOperation']&&_0x2f01ed++,0x5e8==_0x2f01ed&&(_0x4b41f8(),_0x1444cf['off']());});}))];return window['Promise']['race'](_0x216612)['then'](()=>_0x53355e);}async function _0x2713ea(){await _0x221172,_0x53ff6e['model']['change']=_0x54532f,_0x53ff6e['model']['enqueueChange']=_0x54532f,_0x53ff6e['enableReadOnlyMode']('model');}function _0x2dc0e8(){return window['glob']&&window['glob']['triliumVersion'];}function _0x1e70ce(){return _0x19dce3('WebSocketGateway')&&'connected'==_0x3c12d4('WebSocketGateway')['state'];}function _0x1fdb69(){return _0x19dce3('RevisionViewerIntegration');}function _0x76abb3(){return _0x19dce3('TrackChangesDataGetter');}function _0x22742e(_0x3371c6){const _0x2d2506=_0x4f485();_0x53ff6e[_0x2d2506]='commentsLicenseKey'+_0x3371c6,'Valid'!=_0x3371c6&&_0x2713ea();}function _0x4f485(){const _0x144fca=window['String'](window['performance']['now']())['replace']('.','');let _0x315150='K';for(let _0x2da7b0=0x0;_0x2da7b0<_0x144fca['length'];_0x2da7b0+=0x2){let _0x2a064f=window['parseInt'](_0x144fca['substring'](_0x2da7b0,_0x2da7b0+0x2));_0x2a064f>=0x3e&&(_0x2a064f-=0x3e),_0x315150+=_0x476ce3[_0x2a064f];}return _0x315150;}function _0x171407(){const _0x3d075f=_0x3801dd['split']('.');if(0x3!=_0x3d075f['length'])return null;return _0x1973da(_0x3d075f[0x1]);function _0x1973da(_0x54b3cd){const _0x6f4a94=_0x5c9793(_0x54b3cd);return _0x6f4a94&&_0x48eb48()?_0x6f4a94:null;function _0x48eb48(){const _0x4ff884=_0x6f4a94['jti'],_0x19e040=window['parseInt'](_0x4ff884['substring'](_0x4ff884['length']-0x8),0x10),_0x2bdda6={..._0x6f4a94,'jti':_0x4ff884['substring'](0x0,_0x4ff884['length']-0x8)};return delete _0x2bdda6['vc'],_0x5c1285(_0x2bdda6)==_0x19e040;}}}async function _0x163d2d(){let _0x590c38=!0x0;try{const [_0x142d1e,_0x411d3c,_0x13d83e]=_0x3801dd['split']('.');return _0x340559(_0x142d1e),await _0x510b6d(_0x142d1e,_0x411d3c,_0x13d83e),_0x590c38;}catch{return!0x1;}function _0x340559(_0x5a0bc3){const _0x529cb3=_0x5c9793(_0x5a0bc3);_0x529cb3&&'ES256'==_0x529cb3['alg']||(_0x590c38=!0x1);}async function _0x510b6d(_0x373bf4,_0x4e0633,_0x1fefda){const _0x5c6c87=window['Uint8Array']['from'](_0x5aed62(_0x1fefda),_0x189b14=>_0x189b14['charCodeAt'](0x0)),_0x582757=new window['TextEncoder']()['encode'](_0x373bf4+'.'+_0x4e0633),_0x4429ff=window['crypto']['subtle'];if(!_0x4429ff)return;const _0x42bb6b=await _0x4429ff['importKey']('jwk',_0x10885f,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4429ff['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x42bb6b,_0x5c6c87,_0x582757)||(_0x590c38=!0x1);}}function _0x5c9793(_0x18860a){return _0x18860a['startsWith']('ey')?JSON['parse'](_0x5aed62(_0x18860a)):null;}function _0x5aed62(_0x7f9355){return window['atob'](_0x7f9355['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5c1285(_0x12b400){let _0x2c0f14=0x1505;function _0x1c077d(_0x561d1b){for(let _0x406855=0x0;_0x406855<_0x561d1b['length'];_0x406855++){const _0x15c1a6=_0x561d1b['charCodeAt'](_0x406855);_0x2c0f14=(_0x2c0f14<<0x5)+_0x2c0f14+_0x15c1a6,_0x2c0f14&=_0x2c0f14;}}function _0x399507(_0x1e746a){Array['isArray'](_0x1e746a)?_0x1e746a['forEach'](_0x399507):_0x1e746a&&'object'==typeof _0x1e746a?Object['entries'](_0x1e746a)['sort']()['forEach'](([_0x10ad8a,_0x21d056])=>{_0x1c077d(_0x10ad8a),_0x399507(_0x21d056);}):_0x1c077d(window['String'](_0x1e746a));}return _0x399507(_0x12b400),_0x2c0f14>>>0x0;}function _0x4bc2e7(_0xb51d91){return _0xb51d91['toString'](0x10)['padStart'](0x8,'0');}function _0x504dc0(_0x17da11){return _0x17da11['split']('')['reverse']()['join']('');}function _0x19dce3(_0x546743){return _0x53ff6e['plugins']['has'](_0x546743);}function _0x3c12d4(_0xa4df08){return _0x53ff6e['plugins']['get'](_0xa4df08);}function _0x54532f(){}_0x22742e(await _0xa04508());}(this);}['destroy'](){const _0x390a90=this['editor']['plugins']['get'](oi),_0x249901=this['editor']['config']['get']('collaboration.channelId');for(const _0x2812c8 of _0x390a90['getCommentThreads']({'channelId':_0x249901}))_0x390a90['_detachCommentThread'](_0x2812c8['id']),_0x390a90['_threads']['delete'](_0x2812c8['id']);super['destroy']();}['hasMarkerForId'](_0x5740a3){return this['getAllMarkersForId'](_0x5740a3)['length']>0x0;}['getAllMarkersForId'](_0x1864c9){const _0x5d9926=[];for(const _0x26f0e3 of this['editor']['model']['markers'])_0x26f0e3['name']['startsWith']('comment:'+_0x1864c9)&&_0x5d9926['push'](_0x26f0e3);return _0x5d9926;}['scrollToThreadMarker'](_0x124d67){setTimeout(()=>{const _0x3c3492=this['_getTargetForId'](_0x124d67);_0x3c3492&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x124d67&&_0x5c2280({'target':_0x3c3492[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x542320){this['editor']['model']['change'](()=>{for(const _0x5c60dd of this['getAllMarkersForId'](_0x542320))this['editor']['editing']['reconvertMarker'](_0x5c60dd);});}['_attachArchivedThread'](_0x532870){const _0x4ebe25=this['editor']['plugins']['get'](oi),_0x10d517=this['editor']['plugins']['get'](di),_0x43c1c3=_0x4ebe25['getCommentThread'](_0x532870);if(!_0x43c1c3['isAttached']){const _0x2acfa1=_0x43c1c3['attachTo'](()=>this['_getTargetForId'](_0x43c1c3['id']));_0x10d517['registerAnnotation'](_0x2acfa1),_0x43c1c3['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xe7ad0c=this['editor'],_0xa91b13=_0xe7ad0c['plugins']['get'](_0x43683a);_0xe7ad0c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x20c8d9,_0x2afdf4)=>{const {id:_0x4a933a}=fi(_0x20c8d9['markerName']),_0x51c8e9=_0xe7ad0c['plugins']['get'](oi)['getCommentThread'](_0x4a933a),_0x5b8409=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x4a933a;let _0x423e48;if(_0x51c8e9&&_0x51c8e9['isResolved']&&!_0x5b8409&&_0x20c8d9['item'])return _0x2afdf4['consumable']['consume'](_0x20c8d9['item'],'addMarker:'+_0x20c8d9['markerName']),_0x2afdf4['consumable']['consume'](_0x20c8d9['item'],'removeMarker:'+_0x20c8d9['markerName']),null;const _0x227305=['ck-comment-marker'];return _0x5b8409&&_0x227305['push']('ck-comment-marker--active'),_0x423e48=_0x51c8e9?.['length']?_0x51c8e9['comments']['first']['author']['id']:_0xa91b13['me']['id'],{'classes':_0x227305,'attributes':{'data-comment':_0x4a933a,'data-author-id':_0x423e48}};}}),_0xe7ad0c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x179db9,{options:_0x12f428})=>{if(_0x12f428['showCommentHighlights'])return null;const _0x220157=_0xe7ad0c['plugins']['get'](oi),_0x455d58=_0xe7ad0c['model']['markers']['get'](_0x179db9),{id:_0x30ecde,part:_0x4ba5ed}=fi(_0x179db9);return _0x455d58&&!_0x455d58['affectsData']||_0x12f428['ignoreResolvedComments']&&_0x220157['getCommentThread'](_0x30ecde)?.['isResolved']?null:{'group':'comment','name':_0x4ba5ed?_0x30ecde+':'+_0x4ba5ed:_0x30ecde};}}),_0xe7ad0c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x50d0eb,{writer:_0x36c3b3})=>_0x36c3b3['createElement']('$marker',{'data-name':'comment:'+_0x50d0eb['getAttribute']('id')})}),_0xe7ad0c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x27c5fd=this['editor'],_0x25c8ee=_0x27c5fd['plugins']['get'](oi),_0x46575b=new Set(),_0x48a2e8=new Set();_0x27c5fd['model']['document']['registerPostFixer'](_0x5c5b10=>{let _0x2216af=!0x1;for(const {name:_0xec7aac,data:_0x5aa004}of _0x27c5fd['model']['document']['differ']['getChangedMarkers']()){const {group:_0x304be2,id:_0x101329}=fi(_0xec7aac);let _0x3fb8ab=_0x5aa004['newRange'];if('comment'!==_0x304be2||!_0x3fb8ab)continue;const _0x325aff='$graveyard'===_0x3fb8ab['root']['rootName'];_0x325aff||(_0x3fb8ab=_i(_0x3fb8ab,_0x27c5fd['model']),!_0x3fb8ab||_0x3fb8ab['isCollapsed']||!_0x5aa004['newRange']||_0x3fb8ab['isEqual'](_0x5aa004['newRange']))?_0x27c5fd['model']['hasContent'](_0x3fb8ab)&&!_0x325aff?this['isThreadsLoadingPaused']?_0x46575b['add'](_0xec7aac):this['_handleThreadMarker'](_0xec7aac,_0x101329):(_0x48a2e8['add'](_0xec7aac),_0x46575b['delete'](_0xec7aac),_0x5c5b10['removeMarker'](_0xec7aac),_0x2216af=!0x0):(_0x5c5b10['updateMarker'](_0xec7aac,{'range':_0x3fb8ab}),_0x2216af=!0x0);}return _0x2216af;}),this['on']('change:isThreadsLoadingPaused',(_0x571885,_0x4e7bd4,_0x55887e)=>{if(!_0x55887e&&_0x46575b['size'])for(const _0x1893fa of _0x46575b){const {id:_0x225d05}=fi(_0x1893fa);_0x46575b['delete'](_0x1893fa),_0x27c5fd['model']['markers']['get'](_0x1893fa)&&this['_handleThreadMarker'](_0x1893fa,_0x225d05);}}),this['listenTo'](_0x27c5fd['model']['document'],'change',()=>{for(const {name:_0x133ca9,data:{newRange:_0xc37f75}}of _0x27c5fd['model']['document']['differ']['getChangedMarkers']()){const {group:_0x47c8c8,id:_0xf9a868}=fi(_0x133ca9);if('comment'!==_0x47c8c8)continue;const _0x4b9488=_0x25c8ee['getCommentThread'](_0xf9a868),_0x1e188a=this['hasMarkerForId'](_0xf9a868);_0x4b9488&&(!_0x4b9488['_hasTargetInContent']&&_0xc37f75&&_0x27c5fd['editing']['view']['once']('render',()=>{const _0x402dd7=_0x27c5fd['plugins']['get'](ti),_0x4cfcc7=_0x25c8ee['_threadToController']['get'](_0x4b9488)['view'];_0x402dd7['getByInnerView'](_0x4cfcc7)['refreshVisibility']();},{'priority':'low'}),_0x4b9488['_hasTargetInContent']=_0x1e188a||!!_0xc37f75),_0xc37f75||(_0x48a2e8['add'](_0x133ca9),_0x46575b['delete'](_0x133ca9));}for(const _0xe7983f of _0x48a2e8){const {id:_0x386761}=fi(_0xe7983f),_0x4de62d=_0x25c8ee['getCommentThread'](_0x386761);if(_0x46575b['delete'](_0xe7983f),!_0x4de62d)continue;const _0x1c60a4=this['hasMarkerForId'](_0x386761);_0x1c60a4||_0x4de62d['isSubmitted']?_0x1c60a4||_0x4de62d['unlinkedAt']||_0x4de62d['setUnlinkedAt'](new Date()):_0x4de62d['remove']();}_0x48a2e8['clear']();});}['_handleInitialThreads'](_0xc0ebe5){_0xc0ebe5['forEach'](_0x252125=>{_0x252125['unlinkedAt']&&this['_attachArchivedThread'](_0x252125['id']);});}['_getTargetForId'](_0x1aa267){const _0x2fad2a=this['editor'],_0x54ab0b=this['getAllMarkersForId'](_0x1aa267);return _0x3d538b(_0x2fad2a['editing'],_0x54ab0b);}['_getTextContext'](_0x5b1999){const _0x560ff2=this['getAllMarkersForId'](_0x5b1999);let _0x652a1a='',_0x45a890=!0x1;for(const _0x483b73 of _0x560ff2){const _0x4fbc3a=_0x483b73['getRange']();for(const _0x40390a of Array['from'](_0x4fbc3a['getItems']()))_0x40390a['is']('$textProxy')?(_0x652a1a&&_0x45a890&&(_0x652a1a+='\x20',_0x45a890=!0x1),_0x652a1a+=_0x40390a['data']):_0x45a890=!0x0;_0x45a890=!0x0;}return _0x652a1a['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2b32b0,_0x16c6fc){const _0x39ee37=this['editor'],_0x53695f=_0x39ee37['plugins']['get'](oi);let _0x310657=_0x53695f['getCommentThread'](_0x16c6fc);const _0x58e2bf=_0x39ee37['config']['get']('collaboration.channelId'),_0x4b1d6c=_0x39ee37['plugins']['get'](di);return _0x310657&&(_0x310657['unlinkedAt']&&_0x310657['setUnlinkedAt'](null),_0x310657['isAttached'])||(this['getAllMarkersForId'](_0x16c6fc)[0x0]['managedUsingOperations']?_0x53695f['fetchCommentThread']({'channelId':_0x58e2bf,'threadId':_0x16c6fc})['then'](_0x41caf1=>{if('destroyed'!==_0x39ee37['state']){if(_0x310657=_0x41caf1,_0x310657&&!_0x310657['isAttached']){const _0x4d3239=_0x310657['attachTo'](()=>this['_getTargetForId'](_0x16c6fc));_0x4b1d6c['registerAnnotation'](_0x4d3239),_0x310657['isResolved']&&this['_reconvertMarkers'](_0x16c6fc);}else{if(!_0x310657){const _0x2e35cc=this['getAllMarkersForId'](_0x16c6fc);_0x39ee37['model']['change'](_0xb53728=>{for(const _0x43d202 of _0x2e35cc)_0xb53728['removeMarker'](_0x43d202);});}}}}):_0x39ee37['editing']['view']['once']('render',()=>{if(_0x53695f['getCommentThread'](_0x16c6fc))return;const _0x301cab=_0x39ee37['plugins']['get'](ti);_0x310657=_0x53695f['openNewCommentThread']({'channelId':_0x58e2bf,'threadId':_0x16c6fc,'target':()=>this['_getTargetForId'](_0x16c6fc),'context':{'type':'text','value':this['_getTextContext'](_0x16c6fc)}});const _0x9f6119=_0x53695f['_threadToController']['get'](_0x310657)['view'],_0x3726a7=_0x301cab['getByInnerView'](_0x9f6119);_0x3726a7&&_0x4b1d6c['registerAnnotation'](_0x3726a7);},{'priority':'low'})),_0x310657;}['_handleThreadMarker'](_0x22e876,_0x566e46){const _0x5c13eb=this['_attachMarkerToThread'](_0x22e876,_0x566e46);_0x5c13eb&&!_0x5c13eb['context']&&_0x5c13eb['setContext']({'type':'text','value':this['_getTextContext'](_0x566e46)});}['_initAriaMarkerChangeAnnouncements'](){const _0x576fe7=this['editor'];_0x10c08c(_0x576fe7['model'],({left:_0x4e5aa0,entered:_0x31b0e8})=>{for(const _0x4e61ae of _0x4e5aa0)if(Ai(_0x4e61ae)){_0x576fe7['ui']['ariaLiveAnnouncer']['announce'](Et(_0x576fe7['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x50adbd of _0x31b0e8)if(Ai(_0x50adbd)){_0x576fe7['ui']['ariaLiveAnnouncer']['announce'](Et(_0x576fe7['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x3b42df(_0x21a0db)));break;}});}};function gi(_0x5669f9,_0x48cff5){return _0x48cff5?_0x5669f9+':'+_0x48cff5:_0x5669f9;}function _i(_0x2f357d,_0x3cfcc1){const _0x1503ec=_0x3cfcc1['schema'],_0x271bb8=_0x3cfcc1['createRange'](_0x2f357d['start']);for(const _0x4299a1 of _0x2f357d['getWalker']()){const {type:_0x1b8798,item:_0x150ba6,nextPosition:_0x372067}=_0x4299a1;if('text'===_0x1b8798||_0x1503ec['isObject'](_0x150ba6)){const _0x446825=_0x3cfcc1['createPositionBefore'](_0x150ba6);_0x271bb8['isCollapsed']&&(_0x271bb8['start']=_0x446825),_0x271bb8['end']=_0x372067;}}return _0x271bb8;}function Ai(_0x2c65ae){return'comment'===fi(_0x2c65ae['name'])['group'];}var vi=class extends _0x26bf82{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0x53a253=this['editor'],_0x44c0b4=_0x53a253['plugins']['get'](oi),_0x31e048=_0x53a253['plugins']['get'](wi),_0x25e56c=_0x53a253['plugins']['get'](ti),_0x543a25=_0x53a253['plugins']['get'](di);_0x53a253['ui']['componentFactory']['add']('comment',()=>{const _0x4e263a=this['_createUIButton'](_0x51f5d3);return _0x4e263a['tooltip']=!0x0,_0x4e263a;}),_0x53a253['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x543a25['addSourceCollector'](()=>{const _0x3d7bdb=[];for(const [_0x10f4ba,_0x592e0c]of _0x44c0b4['_threadToController']){const _0x3fd207=_0x31e048['getAllMarkersForId'](_0x10f4ba['id']),_0x28bf7a=_0x3fd207['map'](_0x2f4eca=>_0x2f4eca['getRange']());_0x3fd207['length']>0x0&&_0x3d7bdb['push']([_0x592e0c['view'],_0x28bf7a]);}return _0x3d7bdb;}),this['listenTo'](_0x25e56c,'change:activeAnnotations',(_0x41bff9,_0x542d49,_0x24b5fb)=>{const _0xc3b03a=Array['from'](_0x24b5fb)['map'](_0x3e1509=>_0x3e1509['innerView'])['find'](_0x3ad1d2=>_0x44c0b4['_viewToController']['has'](_0x3ad1d2));if(!_0xc3b03a)return void(_0x31e048['activeMarker']=null);const _0x5f2922=_0x44c0b4['_viewToController']['get'](_0xc3b03a)['model']['id'],_0x597dd5='comment:'+_0x5f2922;_0x5f2922&&_0x31e048['hasMarkerForId'](_0x5f2922)?_0x31e048['activeMarker']=_0x597dd5:_0x31e048['activeMarker']&&(_0x31e048['activeMarker']=null);}),this['listenTo'](_0x44c0b4,'removeCommentThread',(_0x59c407,{threadId:_0x547e52,isFromAdapter:_0x343181})=>{!_0x343181&&_0x53a253['ui']['focusTracker']['isFocused']&&_0x31e048['hasMarkerForId'](_0x547e52)&&_0x53a253['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x44c0b4,'addComment',(_0x41d4a7,{threadId:_0x39bda3,isFromAdapter:_0x128338})=>{!_0x128338&&_0x31e048['hasMarkerForId'](_0x39bda3)&&_0x44c0b4['hasCommentThread'](_0x39bda3)&&0x1===_0x44c0b4['getCommentThread'](_0x39bda3)['length']&&(_0x53a253['editing']['view']['focus'](),_0x41d4a7['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xa47b4a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3c68b9;for(const _0x522bee in _0xa47b4a){const _0x1c2b97=_0x522bee,_0x238e09=_0xa47b4a[_0x1c2b97];if('commentsLicenseKeyValid'==_0x238e09||'commentsLicenseKeyInvalid'==_0x238e09||'commentsLicenseKeyExpired'==_0x238e09||'commentsLicenseKeyDomainLimit'==_0x238e09||'commentsLicenseKeyNotAllowed'==_0x238e09||'commentsLicenseKeyEvaluationLimit'==_0x238e09||'commentsLicenseKeyUsageLimit'==_0x238e09){delete _0xa47b4a[_0x1c2b97],_0x3c68b9=_0x238e09,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x258bc5){const _0x2a4eb1=this['editor'],_0x5780c9=new _0x258bc5(_0x2a4eb1['locale']),_0x5e7aa3=_0x2a4eb1['commands']['get']('addCommentThread');return _0x5780c9['set']({'label':Et(_0x2a4eb1['locale'],'Comment'),'icon':_0xc2915e}),_0x5780c9['bind']('isEnabled')['to'](_0x5e7aa3,'isEnabled',_0x5e7aa3,'hasContent',(_0x2a4203,_0x2b2954)=>_0x2a4203&&_0x2b2954),this['listenTo'](_0x5780c9,'execute',()=>{_0x5e7aa3['execute']();}),_0x5780c9;}},yi=class extends _0x26bf82{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x5bdbf0){super(_0x5bdbf0),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2ed253,_0x5d08be,_0x3b3428)=>{_0x3b3428?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4433fe,_0x55431c]of this['editor']['commands'])_0x55431c['affectsData']&&'addCommentThread'!==_0x4433fe&&_0x55431c['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 _0x33dd58=this['editor']['editing']['view']['document'];this['listenTo'](_0x33dd58,'cut',_0x5cb26a=>_0x5cb26a['stop'](),{'priority':'highest'}),this['listenTo'](_0x33dd58,'clipboardInput',_0x37fe81=>_0x37fe81['stop'](),{'priority':'highest'}),this['listenTo'](_0x33dd58,'delete',_0x14deeb=>_0x14deeb['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x298b13,_0x6dba61]of this['editor']['commands'])_0x6dba61['affectsData']&&'addCommentThread'!==_0x298b13&&_0x6dba61['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']);}},Ti=class extends _0x1011c1{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c7d36){super(_0x1c7d36),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x449011=this['context']['plugins']['get'](ti);this['listenTo'](_0x449011,'_activateAnnotation',(_0x28055e,_0x3216ac)=>{for(const _0x22387e of this['activeUIs']){const _0x48c761=this['_uis']['get'](_0x22387e);(0x0,this['uisData']['get'](_0x22387e)['filter'])(_0x3216ac)&&_0x48c761['setActiveAnnotation'](_0x3216ac);}}),this['listenTo'](_0x449011,'_deactivateAllAnnotations',()=>{for(const _0x41b71a of this['activeUIs'])this['_uis']['get'](_0x41b71a)['setActiveAnnotation'](null);}),this['listenTo'](_0x449011['_visibleAnnotations'],'add',(_0x445acb,_0x50747f)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x50747f);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x37a380){return this['activeUIs']['has'](_0x37a380);}['activate'](_0x59510c,_0x3cb8a4=this['defaultFilter']){const _0x87a407=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x59510c))throw new _0x4b20e3('annotationsuis-missing-ui',this,{'uiName':_0x59510c});this['isActive'](_0x59510c)&&this['deactivate'](_0x59510c),this['activeUIs']['add'](_0x59510c);const _0x50dd12=new Jt();Qt({'source':_0x87a407['_visibleAnnotations'],'target':_0x50dd12,'filter':_0x3cb8a4}),this['uisData']['set'](_0x59510c,{'collection':_0x50dd12,'filter':_0x3cb8a4});const _0x3800d7=this['_uis']['get'](_0x59510c);_0x3800d7['attach'](_0x50dd12),this['listenTo'](_0x3800d7,'change:activeAnnotation',(_0x4c4a28,_0x493f89,_0x1ccef2,_0x2a664f)=>{_0x2a664f&&_0x87a407['_removeActiveAnnotation'](_0x2a664f),_0x1ccef2&&_0x87a407['_addActiveAnnotation'](_0x1ccef2);});}['deactivate'](_0x528e1f){if(this['activeUIs']['delete'](_0x528e1f),!this['_uis']['has'](_0x528e1f))throw new _0x4b20e3('annotationsuis-missing-ui',this,{'uiName':_0x528e1f});const _0x489841=this['_uis']['get'](_0x528e1f);_0x489841['detach'](),this['stopListening'](_0x489841),this['uisData']['get'](_0x528e1f)['collection']['destroy'](),this['uisData']['delete'](_0x528e1f);}['switchTo'](_0x2f311f){if(!this['_uis']['has'](_0x2f311f))throw new _0x4b20e3('annotationsuis-missing-ui',this,{'uiName':_0x2f311f});const _0x16018e=this['context']['plugins']['get'](ti),_0x34f7e8=Array['from'](_0x16018e['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2f311f);const _0x7cd6b3=this['_uis']['get'](_0x2f311f);_0x7cd6b3['setActiveAnnotation'](_0x34f7e8),_0x7cd6b3['_setSelectedAnnotations']&&_0x34f7e8&&_0x7cd6b3['_setSelectedAnnotations']([_0x34f7e8]);}['deactivateAll'](){for(const _0x3f27ae of this['activeUIs'])this['deactivate'](_0x3f27ae);}['register'](_0x167b11,_0x49c937){if(this['_uis']['has'](_0x167b11))throw new _0x4b20e3('annotationsuis-register-already-registered');if('function'!=typeof _0x49c937['attach']||'function'!=typeof _0x49c937['detach']||'function'!=typeof _0x49c937['setActiveAnnotation'])throw new _0x4b20e3('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x167b11,_0x49c937);}['refilterAnnotations'](){const _0x1bf4a1=this['context']['plugins']['get'](ti)['collection'],_0x4a3dd6=new Map(),_0x543267=Array['from'](this['activeUIs']);for(const _0x564c89 of this['activeUIs']){const _0x4ee3c5=this['uisData']['get'](_0x564c89)['collection'];for(const _0x4aab6f of _0x4ee3c5)_0x4a3dd6['set'](_0x4aab6f,_0x564c89);}for(const _0x4df82e of _0x1bf4a1){const _0x1d60d4=_0x4a3dd6['get'](_0x4df82e);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4df82e);const _0x3a0bf7=_0x543267['find'](_0x40313=>this['uisData']['get'](_0x40313)['filter'](_0x4df82e));_0x1d60d4!==_0x3a0bf7&&(_0x1d60d4&&this['uisData']['get'](_0x1d60d4)['collection']['remove'](_0x4df82e),_0x3a0bf7&&this['uisData']['get'](_0x3a0bf7)['collection']['add'](_0x4df82e));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x47bcac){const _0x1e4979=[];for(const _0x453375 of this['activeUIs']){(0x0,this['uisData']['get'](_0x453375)['filter'])(_0x47bcac)&&_0x1e4979['push'](_0x453375);}if(_0x1e4979['length']>0x1)throw new _0x4b20e3('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1e4979,'annotationType':_0x47bcac['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x373a58('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3cbe8e){super(_0x3cbe8e),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x50b863,_0x1c6112)=>_0x50b863+_0x1c6112),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x39180f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x39180f['to']('isAnimationDisabled',_0x2ee72d=>_0x2ee72d?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x39180f['to']('top',_0x554dfb=>bi(_0x554dfb))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x199d71=this['element']['clientHeight'];_0x199d71&&(this['height']=_0x199d71);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x1011c1{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x235804){super(_0x235804),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 _0x55a673=this['context']['config']['get']('sidebar.container');_0x55a673&&this['setContainer'](_0x55a673);}['setContainer'](_0x36f2ab){if(!Oi(_0x36f2ab))throw new _0x4b20e3('sidebar-setcontainer-invalid-element');this['container']=_0x36f2ab;}['_attachToContainer']({viewClass:_0x436ff7='',spaceBetweenItems:_0x12c845=0x19}={}){if(!Oi(this['container']))throw new _0x4b20e3('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x436ff7,this['_spaceBetweenItems']=_0x12c845;}['rearrange']({removedAnnotation:_0x172e8a,previousAnnotation:_0x145942,nextAnnotation:_0x3b6171}){const _0xd3e015=this['getSidebarItemView'](_0x172e8a);this['view']['list']['remove'](_0xd3e015),this['_destroySidebarItemView'](_0x172e8a),_0x145942&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x145942)),_0x3b6171&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3b6171)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1f3c0a,activatedAnnotation:_0x5af626,disableAnimationOnActivatedAnnotation:_0x3d52f9}){if(this['_activeAnnotation']=_0x5af626,_0x1f3c0a){_0x1f3c0a['isActive']=!0x1;const _0x3e6872=this['getSidebarItemView'](_0x1f3c0a);_0x3e6872&&_0x3d52f9&&(_0x3e6872['isAnimationDisabled']=!0x1);}if(_0x5af626){const _0x475432=this['getSidebarItemView'](_0x5af626);_0x475432&&(_0x5af626['isActive']=!0x0,_0x3d52f9&&(_0x475432['isAnimationDisabled']=!0x0,_0x475432['top']+=0x1),this['_alignToTargetRect'](_0x475432));}}['_detachFromContainer'](_0x581083){if(this['view']['element']['remove'](),_0x581083){for(const _0x15cb86 of _0x581083)this['_destroySidebarItemView'](_0x15cb86);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x831a00,_0xc2812e){_0xc2812e||(_0xc2812e=_0x831a00['view']);const _0x1bd646=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1bd646,_0x831a00),this['_annotationToSidebarItemView']['set'](_0x831a00,_0x1bd646),_0x1bd646['content']['add'](_0xc2812e),this['listenTo'](_0x831a00['view'],'change:targetRect',(_0x4cfd91,_0x201f9b,_0x159946)=>{const _0x3cba84=this['_getTargetTop'](_0x831a00,_0x159946);_0x1bd646['_targetTop']!=_0x3cba84&&(_0x1bd646['_targetTop']=_0x3cba84,this['_setItemTop'](_0x1bd646,_0x3cba84));}),this['listenTo'](_0x1bd646,'change:top',()=>{this['_recalculate'](_0x1bd646,'top');}),this['listenTo'](_0x1bd646,'change:bottom',()=>{this['_recalculate'](_0x1bd646,'bottom');}),this['_alignToTargetRect'](_0x1bd646);const _0x5ee11c=this['_getItemBefore'](_0x1bd646);return _0x5ee11c&&this['_alignAfterItem'](_0x5ee11c,_0x1bd646)||this['_alignToTargetRect'](_0x1bd646),this['_updateLastItem'](),this['view']['list']['add'](_0x1bd646),_0x1bd646;}['_alignForTopChange'](_0x561b67){if(!_0x561b67['content']['length'])return;const _0x4a864e=this['_getItemBefore'](_0x561b67);if(!_0x4a864e)return;const _0x113b2a=this['_sidebarItemViewToAnnotation']['get'](_0x4a864e),_0x451f58=this['_activeAnnotation'];_0x451f58&&_0x451f58===_0x113b2a?this['_alignAfterItem'](_0x4a864e,_0x561b67):this['_alignBeforeItem'](_0x561b67,_0x4a864e);}['_alignForBottomChange'](_0xa4f357){if(!_0xa4f357['content']['length'])return;const _0x1343a3=this['_getItemAfter'](_0xa4f357);if(!_0x1343a3)return;const _0x3df8bf=this['_sidebarItemViewToAnnotation']['get'](_0x1343a3),_0x53a02d=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x13899e=this['_activeAnnotation'];_0x13899e&&_0x13899e===_0x3df8bf&&_0x53a02d?(this['_alignBeforeItem'](_0x1343a3,_0xa4f357),this['_alignAfterItem'](_0xa4f357,_0x1343a3)):_0x13899e&&_0x13899e===_0x3df8bf?this['_alignBeforeItem'](_0x1343a3,_0xa4f357):this['_alignAfterItem'](_0xa4f357,_0x1343a3);}['_recalculate'](_0x1311f5,_0x441cfd){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x53dd0c,changedProp:_0x173fe0}of this['_recalculateBuffer'])'top'===_0x173fe0?this['_alignForTopChange'](_0x53dd0c):this['_alignForBottomChange'](_0x53dd0c);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1311f5,'changedProp':_0x441cfd});}['getSidebarItemView'](_0x4f1132){return this['_annotationToSidebarItemView']['get'](_0x4f1132);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x40e3bd){const _0x3d068b=this['getSidebarItemView'](_0x40e3bd);this['stopListening'](_0x3d068b),this['stopListening'](_0x40e3bd['view']),_0x3d068b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x40e3bd),this['_sidebarItemViewToAnnotation']['delete'](_0x3d068b);}['_createSidebarView'](){const _0x172f2a=new Ii(this['context']['locale']);return _0x172f2a['render'](),this['on']('change:_lastItem',(_0x2f4214,_0xb5bb02,_0x14b540,_0x1e9c51)=>{_0x1e9c51&&_0x172f2a['unbind']('minHeight'),_0x14b540?_0x172f2a['bind']('minHeight')['to'](_0x14b540,'bottom'):_0x172f2a['minHeight']=null;}),_0x172f2a;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x220765){const _0x30bf55=this['_sidebarItemViewToAnnotation']['get'](_0x220765),_0x272e40=_0x30bf55&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x30bf55)-0x1);return _0x272e40&&this['getSidebarItemView'](_0x272e40)||null;}['_getItemAfter'](_0x559363){const _0x356af1=this['_sidebarItemViewToAnnotation']['get'](_0x559363),_0x527758=_0x356af1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x356af1)+0x1);return _0x527758&&this['getSidebarItemView'](_0x527758)||null;}['_alignBeforeItem'](_0x469b86,_0x878ac1){_0x469b86['updateHeight']();const _0x52099d=Ni(_0x878ac1['bottom']+this['_spaceBetweenItems'],_0x469b86['top']);return!!_0x52099d&&(this['_setItemTop'](_0x878ac1,_0x878ac1['top']-_0x52099d),!0x0);}['_alignAfterItem'](_0x185496,_0x2135f1){_0x185496['updateHeight']();const _0x728d52=Ni(_0x185496['bottom']+this['_spaceBetweenItems'],_0x2135f1['top']);return!!_0x728d52&&(this['_setItemTop'](_0x2135f1,_0x2135f1['top']+_0x728d52,!0x1),!0x0);}['_alignToTargetRect'](_0x571fff){const _0x5c9f71=this['_sidebarItemViewToAnnotation']['get'](_0x571fff);if(!_0x5c9f71||!_0x5c9f71['target']||!_0x5c9f71['targetRect'])return;const _0x597847=this['_getTargetTop'](_0x5c9f71,_0x5c9f71['targetRect']);this['_setItemTop'](_0x571fff,_0x597847);}['_getTargetTop'](_0x560224,_0x21631a){if(null===_0x21631a)return 0x0;if(_0x560224['target']instanceof _0x7f9fe4)return _0x21631a['top'];{const _0x267497=new _0x7f9fe4(this['view']['element'])['top'];return _0x21631a['top']-_0x267497;}}['_setItemTop'](_0x38a9aa,_0x310a82,_0x1e0858=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1e0858&&(_0x310a82=Math['max'](_0x310a82,this['_getMaxAvailableTop'](_0x38a9aa))),_0x38a9aa['top']=_0x310a82;}['_getMaxAvailableTop'](_0x205d3b){let _0x1f96c8=this['_getItemBefore'](_0x205d3b),_0x6072e7=0x0;for(;_0x1f96c8;)_0x1f96c8['updateHeight'](),_0x6072e7+=this['_spaceBetweenItems']+_0x1f96c8['height'],_0x1f96c8=this['_getItemBefore'](_0x1f96c8);return _0x6072e7;}};function Ni(_0x551d19,_0x5563bf){return Math['max'](_0x551d19-_0x5563bf,0x0);}function Oi(_0x66c853){return null!==_0x66c853&&'object'==typeof _0x66c853&&0x1===_0x66c853['nodeType'];}var Mi=class extends _0x1011c1{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54426e){super(_0x54426e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x43910f(),this['_refreshPositioningDebounced']=_0x3b137b(()=>{_0x54426e['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x31282c=this['context']['plugins']['get'](Ti),_0xfacd4=this['context']['plugins']['get'](ki);_0x31282c['register']('wideSidebar',this),_0xfacd4['container']&&_0x31282c['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5ead7c){if(_0x5ead7c===this['activeAnnotation'])return;const _0x884105=this['context']['plugins']['get'](ki);_0x884105['_activeAnnotation']=_0x5ead7c;const _0x469d69=this['activeAnnotation'];_0x884105['refresh']({'blurredAnnotation':_0x469d69,'activatedAnnotation':_0x5ead7c}),this['activeAnnotation']=_0x5ead7c;}['attach'](_0x4bfce2){this['annotations']=_0x4bfce2;const _0x36b50f=this['context']['plugins']['get'](ki);if(_0x36b50f['_annotations']=_0x4bfce2,this['isAttached'])throw new _0x4b20e3('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x36b50f,'set:container',()=>{this['detach'](),this['listenTo'](_0x36b50f,'change:container',_0x49e1a3=>{_0x49e1a3['off'](),this['attach'](_0x4bfce2);});}),_0x36b50f['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5676ed=_0x3e8ce5=>{_0x3e8ce5['updateTargetRect'](),_0x36b50f['addAnnotation'](_0x3e8ce5);};for(const _0x1e80f4 of _0x4bfce2)_0x5676ed(_0x1e80f4);this['listenTo'](_0x4bfce2,'add',(_0x49be55,_0x3dbc58)=>{_0x5676ed(_0x3dbc58);}),this['listenTo'](_0x4bfce2,'remove',(_0x24de1a,_0x273038,_0x3fef11)=>{_0x36b50f['rearrange']({'removedAnnotation':_0x273038,'previousAnnotation':_0x4bfce2['get'](_0x3fef11-0x1),'nextAnnotation':_0x4bfce2['get'](_0x3fef11+0x1)}),_0x273038===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4bfce2,'focus',(_0x4c5d49,_0x3146ca)=>{this['setActiveAnnotation'](_0x3146ca);}),this['listenTo'](_0x4bfce2,'blur',()=>{this['setActiveAnnotation'](null);});const _0xf8fa68=this['context']instanceof _0x152474?this['context']['editors']:new _0x43910f([this['context']]);for(const _0x2daae3 of _0xf8fa68)this['_integrateWithEditorAnnotations'](_0x2daae3);this['listenTo'](_0xf8fa68,'add',(_0x442dec,_0x1f1e54)=>{this['listenTo'](_0x1f1e54,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1f1e54);});}),this['listenTo'](_0xf8fa68,'remove',(_0xd06ce,_0x4b6e49)=>{_0x4b6e49['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4b6e49['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4b20e3('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3fe018=this['context']['plugins']['get'](ki);_0x3fe018['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3fe018),this['stopListening'](this['annotations']),this['context']instanceof _0x152474&&this['stopListening'](this['context']['editors']);for(const _0x353f71 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x353f71);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4b604a){if(!_0x4b604a['plugins']['has']('EditorAnnotations'))return;const _0x2959c6=_0x4b604a['plugins']['get']('EditorAnnotations'),_0x819b5=()=>{const _0x592b66=_0x2959c6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x592b66[0x0]||null);};this['listenTo'](_0x2959c6,'refresh',_0x819b5),this['listenTo'](_0x2959c6,'blur',(_0x255983,{isAnnotationTracked:_0xfa559e})=>{this['activeAnnotation']&&_0xfa559e(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2959c6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x265d29=>{_0x2959c6['hasDomSelection']()&&(_0x819b5(),_0x265d29['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2959c6);}['_destroyEditorAnnotationsIntegration'](_0x4286bd){this['stopListening'](_0x4286bd),this['_editorAnnotations']['remove'](_0x4286bd);}},Ri=class extends _0x51f5d3{['counterView'];constructor(_0x526f46){super(_0x526f46);const _0xf34c2f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4de6ad,_0x1d7ea8)=>_0x4de6ad?'...':_0x1d7ea8['toString']()),this['set']('annotationType',''),this['icon']=_0xc2915e,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xf34c2f['to']('annotationType',_0x193d79=>'ck-annotation-counter__badge--'+_0x193d79),_0xf34c2f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xf34c2f['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x1011c1{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ef81d){super(_0x4ef81d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x2df34d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x43910f(),this['_refreshPositioningDebounced']=_0x3b137b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0xa3d6f8(this['context']['locale']),this['balloonPanelView']=new _0x157332(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2f9012){this['annotations']=_0x2f9012;const _0x58eac9=this['context']['plugins']['get'](ki),_0x4db87b=this['balloonPanelView'];if(_0x58eac9['_annotations']=_0x2f9012,this['isAttached'])throw new _0x4b20e3('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x58eac9,'set:container',()=>{this['detach'](),this['listenTo'](_0x58eac9,'change:container',_0xcb0c13=>{_0xcb0c13['off'](),this['attach'](_0x2f9012);});}),_0x58eac9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5c9ecd=_0x281563=>{const _0x6de51d=new Ri(this['context']['locale']);_0x58eac9['addAnnotation'](_0x281563,_0x6de51d),this['_annotationToNarrowView']['set'](_0x281563,_0x6de51d),_0x6de51d['bind']('isDirty','annotationType','number')['to'](_0x281563['view'],'isDirty','type','length'),_0x6de51d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4db87b['content']['first']!==_0x281563['view']?(this['_showBalloon'](_0x281563),_0x281563['view']['element']['focus'](),this['setActiveAnnotation'](_0x281563)):this['setActiveAnnotation'](null);});};for(const _0x180f1c of _0x2f9012)_0x5c9ecd(_0x180f1c);this['listenTo'](_0x2f9012,'add',(_0x1d2223,_0x52892c)=>{_0x5c9ecd(_0x52892c);}),this['listenTo'](_0x2f9012,'remove',(_0x44827c,_0x1be35e,_0x235967)=>{this['_annotationToNarrowView']['get'](_0x1be35e)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1be35e),_0x58eac9['rearrange']({'removedAnnotation':_0x1be35e,'previousAnnotation':_0x2f9012['get'](_0x235967-0x1),'nextAnnotation':_0x2f9012['get'](_0x235967+0x1)}),_0x1be35e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2f9012,'focus',(_0x4d99a6,_0x57c2c4)=>{this['setActiveAnnotation'](_0x57c2c4);}),this['listenTo'](_0x2f9012,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x71d6a1,_0x1ac7fa)=>{_0x1ac7fa['keyCode']===_0x5595a6['esc']&&_0x4db87b['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4db87b['content']['first']),this['_hideBalloon'](),_0x1ac7fa['stopPropagation'](),_0x1ac7fa['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x224541,_0x3b5675)=>{const _0x4813d8=_0x3b5675['target'];_0x4db87b['isVisible']&&_0x4db87b['element']['contains'](_0x4813d8)||_0x58eac9['view']['element']['contains'](_0x4813d8)||_0x224541['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4cdff3=>_0x4cdff3['contains'](_0x4813d8))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x217586=this['context']instanceof _0x152474?this['context']['editors']:new _0x43910f([this['context']]);for(const _0x512af6 of _0x217586)this['_integrateWithEditorAnnotations'](_0x512af6);this['listenTo'](_0x217586,'add',(_0x461ec8,_0x5e597d)=>{this['listenTo'](_0x5e597d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5e597d);});}),this['listenTo'](_0x217586,'remove',(_0x46de9a,_0x3bd711)=>{_0x3bd711['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3bd711['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0xe08a67){if(_0xe08a67===this['activeAnnotation'])return;const _0x74df1b=this['context']['plugins']['get'](ki);_0x74df1b['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0xe08a67,'disableAnimationOnActivatedAnnotation':!0x0}),_0xe08a67&&_0x74df1b['getSidebarItemView'](_0xe08a67)?this['_showBalloon'](_0xe08a67):this['_hideBalloon'](),this['activeAnnotation']=_0xe08a67;}['detach'](){if(!this['isAttached'])throw new _0x4b20e3('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xb5da0a=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x8f2222=>_0x8f2222['destroy']()),this['_annotationToNarrowView']['clear'](),_0xb5da0a['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x152474&&this['stopListening'](this['context']['editors']);for(const _0xe3cd04 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xe3cd04);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'](_0x2105a6){if(!_0x2105a6['plugins']['has']('EditorAnnotations'))return;const _0x297a20=_0x2105a6['plugins']['get']('EditorAnnotations'),_0x27c625=this['context']['plugins']['get'](ki),_0x2fbccc=this['annotations'],_0x1584a9=this['balloonPanelView'],_0xd9dc48=()=>{const _0x314db2=_0x297a20['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x314db2),this['setActiveAnnotation'](_0x314db2[0x0]||null);};this['listenTo'](_0x297a20,'refresh',_0xd9dc48),this['listenTo'](_0x297a20,'blur',(_0x44a063,{isAnnotationTracked:_0x23d73a})=>{this['activeAnnotation']&&_0x23d73a(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x297a20,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2fbccc,'blur',_0x417afc=>{_0x297a20['hasDomSelection']()&&_0x417afc['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xfd38b2,_0x431018)=>{const _0x48f1a2=_0x431018['target'];_0x1584a9['isVisible']&&_0x1584a9['element']['contains'](_0x48f1a2)||_0x27c625['view']['element']['contains'](_0x48f1a2)||this['activeAnnotation']&&_0x297a20['hasDomSelection']()&&(_0xd9dc48(),_0xfd38b2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x297a20);}['_destroyEditorAnnotationsIntegration'](_0x2a09a9){_0x2a09a9&&(this['stopListening'](_0x2a09a9),this['_editorAnnotations']['remove'](_0x2a09a9));}['_setSelectedAnnotations'](_0x37cea9){for(const _0x381b16 of this['_selectedAnnotations'])_0x37cea9['includes'](_0x381b16)||this['_manuallyClosedAnnotationViews']['delete'](_0x381b16['view']);this['_selectedAnnotations']=_0x37cea9;}['_refreshPositioning'](){const _0x22e95b=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x22e95b['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1bf4af){if(this['_manuallyClosedAnnotationViews']['has'](_0x1bf4af['view']))return;const _0x41b1d6=this['balloonPanelView']['content']['first'];_0x41b1d6!==_0x1bf4af['view']?(_0x41b1d6&&this['_detachListeners'](_0x41b1d6),this['_attachListeners'](_0x1bf4af['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1bf4af['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x45fd0f=this['balloonPanelView']['content']['first'],_0x109c7f=_0x45fd0f&&this['annotations']['getByView'](_0x45fd0f);if(!_0x109c7f||!this['_annotationToNarrowView']['has'](_0x109c7f))return;const _0x261b4c=this['_annotationToNarrowView']['get'](_0x109c7f)['element'],_0x2dc8a8=(function(){const _0x46a08e=_0x157332['defaultPositions'];return[_0x46a08e['southArrowNorthEast'],_0x46a08e['northArrowSouthEast'],_0x46a08e['southArrowNorth'],_0x46a08e['northArrowSouth'],_0x46a08e['southArrowNorthWest'],_0x46a08e['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x261b4c,'positions':_0x2dc8a8});}['_hideBalloon'](){const _0x32dc71=this['balloonPanelView'],_0x223cc6=_0x32dc71['content']['first'];_0x223cc6&&(this['_detachListeners'](_0x223cc6),_0x32dc71['unpin'](),_0x32dc71['content']['clear']());}['_attachListeners'](_0x3749ab){this['listenTo'](_0x3749ab,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3749ab,'Esc',(_0x2b81bc,_0x19e5ce)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3749ab),this['_hideBalloon'](),_0x19e5ce();});}['_detachListeners'](_0x32371d){this['stopListening'](_0x32371d);}},xi=class extends _0x26bf82{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x49e2c8,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x297b4e){super(_0x297b4e),_0x297b4e['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x297b4e['plugins']['get'](_0x49e2c8),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x3b137b(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x467d28=this['editor']['plugins']['get'](Ti);_0x467d28['context']===this['editor']&&(_0x467d28['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x439ab4,_0x296fe9)=>{const _0x42f46c=this['_balloon'];if(this['isAttached']&&_0x42f46c['visibleView']){const _0x405884=this['annotations']['getByView'](_0x42f46c['visibleView']);_0x405884&&this['_closeAnnotation'](_0x405884),_0x296fe9();}}));}['afterInit'](){const _0x1f5026=this['editor']['plugins']['get'](Ti);_0x1f5026['context']===this['editor']&&(_0x1f5026['hasActive']()||_0x1f5026['switchTo']('inline'));}['setActiveAnnotation'](_0x22a8b3){_0x22a8b3!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x22a8b3&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x22a8b3)&&this['_addAnnotationToBalloon'](_0x22a8b3,!0x0),_0x22a8b3['isActive']=!0x0),_0x22a8b3||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x22a8b3);}['attach'](_0x1c0988){this['annotations']=_0x1c0988;const _0x588171=this['editor']['plugins']['get'](Ti),_0x59f083=this['_balloon'];if(this['isAttached'])throw new _0x4b20e3('inlineannotations-attach-already-attached',this);if(_0x588171['context']!==this['editor'])throw new _0x4b20e3('inlineannotations-not-allowed-with-context',this);const _0x3d74d3=this['editor']['plugins']['get'](di);this['listenTo'](_0x3d74d3,'refresh',()=>{const _0x3c9934=_0x3d74d3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2c9c3b,_0x7b4083;!this['_forceRefresh']&&(_0x2c9c3b=_0x3c9934,_0x7b4083=this['_selectedAnnotations'],_0x2c9c3b['length']===_0x7b4083['length']&&_0x2c9c3b['every'](_0x233a90=>_0x7b4083['includes'](_0x233a90)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3c9934),this['setActiveAnnotation'](_0x3c9934[0x0]||null));}),this['listenTo'](_0x3d74d3,'blur',(_0x1460dc,{isAnnotationTracked:_0xd1f324})=>{this['activeAnnotation']&&_0xd1f324(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3d74d3,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2aa64d,_0x5030e2,_0x33e726)=>{_0x33e726||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1c0988,'remove',(_0x4cd9c1,_0x31cae5)=>{this['_removeAnnotationFromBalloon'](_0x31cae5),_0x31cae5===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x59f083,'change:visibleView',(_0x209e7c,_0x454759,_0x57649e,_0x5458fb)=>{_0x5458fb&&this['stopListening'](_0x5458fb);const _0x1e6771=_0x1c0988['getByView'](_0x57649e);_0x57649e&&_0x1e6771&&(this['listenTo'](_0x57649e,'change:height',()=>{_0x59f083['updatePosition']();}),this['listenTo'](_0x57649e,'Esc',()=>{this['_closeAnnotation'](_0x1e6771),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1e6771&&this['setActiveAnnotation'](_0x1e6771));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x59f083['visibleView']&&_0x1c0988['getByView'](_0x59f083['visibleView'])&&_0x59f083['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 _0x4b20e3('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x534b8f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x534b8f);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3079a8){for(const _0x388561 of this['_selectedAnnotations'])_0x3079a8['includes'](_0x388561)||this['_manuallyClosed']['delete'](_0x388561);for(const _0x8eecee of this['annotations'])_0x3079a8['includes'](_0x8eecee)||this['_removeAnnotationFromBalloon'](_0x8eecee);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x170a62 of _0x3079a8)this['_addAnnotationToBalloon'](_0x170a62);}this['_selectedAnnotations']=_0x3079a8;}['_addAnnotationToBalloon'](_0x40bf9a,_0x426752=!0x1){this['_manuallyClosed']['has'](_0x40bf9a)||(this['_addedAnnotations']['has'](_0x40bf9a)||this['_balloon']['hasView'](_0x40bf9a['view'])||(this['_addedAnnotations']['add'](_0x40bf9a),this['_balloon']['add']({'stackId':_0x40bf9a['view']['id'],'view':_0x40bf9a['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x40bf9a)}})),_0x426752&&this['_balloon']['showStack'](_0x40bf9a['view']['id']));}['_getBalloonTargetForAnnotation'](_0x259049){const _0x4aefec=_0x259049['target'],_0x82ccd3=this['editor']['editing']['view'],_0x5a8ce9=_0x82ccd3['document']['selection']['getFirstRange'](),_0x4646c6=_0x82ccd3['domConverter']['viewRangeToDom'](_0x5a8ce9);if(_0x4646c6['collapse'](!0x0),_0x4aefec){if(_0x4aefec instanceof _0x7f9fe4)return _0x4aefec;let _0x3b4c9c=[];for(const _0x53172f of _0x4aefec)_0x3b4c9c['push'](..._0x7f9fe4['getDomElementRects'](_0x53172f));_0x3b4c9c=function(_0x235573){const _0x4fef52=[];let _0x33d2c4=_0x235573[0x0];for(let _0x1a1313=0x1;_0x1a1313<_0x235573['length'];_0x1a1313++)if(Pi(_0x33d2c4,_0x235573[_0x1a1313])){const _0x3e40e1=_0x235573[_0x1a1313]['width'];_0x33d2c4['width']+=_0x3e40e1,_0x33d2c4['right']+=_0x3e40e1;}else _0x4fef52['push'](_0x33d2c4),_0x33d2c4=_0x235573[_0x1a1313];return _0x4fef52['push'](_0x33d2c4),_0x4fef52;}(_0x3b4c9c);const _0x3c0976=_0x4646c6['getBoundingClientRect']();return _0x3b4c9c['find'](_0x2138d1=>_0x2138d1['top']<=_0x3c0976['top']&&_0x2138d1['bottom']>=_0x3c0976['bottom']&&_0x2138d1['left']<=_0x3c0976['left']&&_0x2138d1['right']>=_0x3c0976['right'])||_0x3b4c9c[0x0];}return _0x259049['targetRect']||_0x4646c6;}['_removeAnnotationFromBalloon'](_0x5c1e32){this['_addedAnnotations']['has'](_0x5c1e32)&&this['_balloon']['hasView'](_0x5c1e32['view'])&&(this['_addedAnnotations']['delete'](_0x5c1e32),this['_balloon']['remove'](_0x5c1e32['view']));}['_closeAnnotation'](_0x324717){this['_manuallyClosed']['add'](_0x324717),this['_removeAnnotationFromBalloon'](_0x324717);}};function Pi(_0x5e8eda,_0x3768ce){return _0x5e8eda['top']===_0x3768ce['top']&&_0x5e8eda['bottom']===_0x3768ce['bottom']&&_0x5e8eda['right']===_0x3768ce['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x30496c,_0x1d80a8){super(_0x30496c),this['set']('isEmpty',!_0x1d80a8['length']),this['focusTracker']=new _0x18a754(),this['_annotationViews']=_0x1d80a8,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x1d80a8,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1d80a8,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1d80a8,'remove',(_0x523b38,_0x2c0179)=>{_0x2c0179['isActive']&&this['focus'](),_0x1d80a8['length']||(this['isEmpty']=!0x0);});const _0x2d6d5f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x30496c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1d80a8},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2d6d5f['if']('isEmpty','ck-hidden',_0x202f08=>!_0x202f08)]},'children':[{'text':Et(_0x30496c,'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 _0x2add94 of this['_annotationViews'])this['focusTracker']['add'](_0x2add94['element']);this['_annotationViews']['on']('change',(_0x230cd5,{added:_0x535703,removed:_0x31eb89})=>{for(const _0x10b8d7 of _0x535703)this['focusTracker']['add'](_0x10b8d7['element']);for(const _0x16a374 of _0x31eb89)this['focusTracker']['remove'](_0x16a374['element']);});}},Di=class extends _0x1011c1{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x3f0e20){super(_0x3f0e20),this['archivedThreads']=new _0x43910f();}['init'](){const _0x2da686=this['context'],_0x2fb657=_0x2da686['plugins']['get'](oi),_0x45aea1=_0x2da686['plugins']['get'](ti);this['listenTo'](_0x2fb657,'addCommentThread',(_0x223fe3,{threadId:_0x5b9d9e})=>{const _0xbe38f8=_0x2fb657['getCommentThread'](_0x5b9d9e);_0xbe38f8['archivedAt']&&this['archivedThreads']['add'](_0xbe38f8,this['_calculatePosition'](_0xbe38f8['archivedAt'])),this['listenTo'](_0xbe38f8,'change:archivedAt',(_0x35e429,_0x144577,_0x58e33e)=>{_0x58e33e?this['archivedThreads']['has'](_0xbe38f8)||this['archivedThreads']['add'](_0xbe38f8,this['_calculatePosition'](_0xbe38f8['archivedAt'])):this['archivedThreads']['has'](_0xbe38f8)&&this['archivedThreads']['remove'](_0xbe38f8);});}),this['listenTo'](_0x2fb657,'removeCommentThread',(_0x426c1f,{threadId:_0x321388})=>{const _0x474ae0=_0x2fb657['getCommentThread'](_0x321388);this['stopListening'](_0x474ae0),this['archivedThreads']['has'](_0x474ae0)&&this['archivedThreads']['remove'](_0x474ae0);},{'priority':'highest'}),this['listenTo'](_0x45aea1['collection'],'focus',(_0x12e77b,_0x4d6561)=>{_0x4d6561['isVisible']||(_0x4d6561['isActive']=!0x0,_0x45aea1['activate'](_0x4d6561));});}['_calculatePosition'](_0xa4e520){const _0x2d0e87=[...this['archivedThreads']]['findIndex'](_0x2b0f3d=>_0x2b0f3d['archivedAt']<_0xa4e520);return _0x2d0e87>-0x1?_0x2d0e87:this['archivedThreads']['length'];}},Vi=class extends _0x26bf82{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x57da65];}constructor(_0x3b813e){super(_0x3b813e),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x4c231c=this['editor'],_0x5cbf37=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4c231c['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x51f5d3,!0x0)),_0x4c231c['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x57bacf=this['_createCommentsArchiveButton'](rt);return _0x57bacf['set']({'role':'menuitemcheckbox'}),_0x57bacf;});const _0x4e8517=_0x4c231c['plugins']['get'](Di),_0x4c603c=_0x4c231c['plugins']['get']('Annotations'),_0x56c554=_0x4c231c['plugins']['get']('CommentsRepository');_0x4e8517['archivedThreads']['forEach'](_0x122457=>{this['_handleNewThread'](_0x122457);}),this['listenTo'](_0x4e8517['archivedThreads'],'add',(_0x26c895,_0x11eabb)=>{this['_handleNewThread'](_0x11eabb);}),this['listenTo'](_0x4c603c['collection'],'add',(_0x539019,_0x539821)=>{const _0x5cca01=this['_pendingThreads']['find'](_0x12c6b8=>{const _0x409254=_0x56c554['_threadToController']['get'](_0x12c6b8);return _0x409254&&_0x539821['innerView']===_0x409254['view'];});if(_0x5cca01){const _0x1c3732=this['_calculatePosition'](_0x5cca01['archivedAt']);this['_addAnnotationToArchive'](_0x539821,_0x1c3732),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5cca01),0x1);}}),this['listenTo'](_0x4e8517['archivedThreads'],'remove',(_0x529c91,_0xacacbd)=>{const _0x149d5c=_0x4c231c['config']['get']('collaboration.channelId');if(!_0x149d5c||_0xacacbd['channelId']===_0x149d5c){if(this['_pendingThreads']['includes'](_0xacacbd))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xacacbd),0x1);else{const _0x54fc1e=_0x56c554['_threadToController']['get'](_0xacacbd),_0x314f41=_0x4c603c['getByInnerView'](_0x54fc1e['view']);this['annotationViews']['remove'](_0x314f41['view']),this['stopListening'](_0x314f41),this['stopListening'](_0x314f41['focusableElements']);}}}),this['listenTo'](_0x4c603c['collection'],'add',(_0x29b5b5,_0x51122b)=>{this['listenTo'](_0x51122b,'escape',_0x5cbf37);}),this['listenTo'](_0x4c603c['collection'],'remove',(_0x27928d,_0x3efd84)=>{this['stopListening'](_0x3efd84,'escape',_0x5cbf37);});}['_addAnnotationToArchive'](_0x265e08,_0x353419){this['listenTo'](_0x265e08,'set:isVisible',_0x31cb16=>{_0x31cb16['return']=!0x1,_0x31cb16['stop']();}),this['annotationViews']['add'](_0x265e08['view'],_0x353419);}['_handleNewThread'](_0xbea59){const _0xf68356=this['editor']['plugins']['get']('CommentsRepository'),_0x1919df=this['editor']['plugins']['get']('Annotations'),_0x5f40f3=this['editor']['config']['get']('collaboration.channelId');if(!_0x5f40f3||_0xbea59['channelId']===_0x5f40f3){const _0x30ca44=_0xf68356['_threadToController']['get'](_0xbea59);if(!_0x30ca44)return void this['_pendingThreads']['push'](_0xbea59);const _0x12d31a=this['_calculatePosition'](_0xbea59['archivedAt']),_0x5209ab=_0x1919df['getByInnerView'](_0x30ca44['view']);_0x5209ab['isVisible']&&_0x1919df['_visibleAnnotations']['remove'](_0x5209ab),this['_addAnnotationToArchive'](_0x5209ab,_0x12d31a);}}['_calculatePosition'](_0x44b7e7){const _0x35b27a=this['editor']['config']['get']('collaboration.channelId'),_0x11af0f=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x471573=>_0x471573['channelId']===_0x35b27a)['findIndex'](_0x526de7=>_0x526de7['archivedAt']<_0x44b7e7);return _0x11af0f<0x0||_0x11af0f>this['annotationViews']['length']?this['annotationViews']['length']:_0x11af0f-0x1;}['_toggleDialog'](){const _0x4201d2=this['editor'],_0x25a24b=_0x4201d2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x4201d2['locale'],this['annotationViews'])),'commentsArchive'===_0x25a24b['id']?_0x25a24b['hide']():_0x25a24b['show']({'id':'commentsArchive','title':Et(_0x4201d2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4d5995,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5568d7['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x41158e,_0x48e944=!0x1){const _0x45cd60=this['editor']['locale'],_0x5da1ed=this['editor']['plugins']['get']('Dialog'),_0x45b706=new _0x41158e(_0x45cd60);return _0x45b706['bind']('isEnabled')['to'](this,'isEnabled'),_0x45b706['bind']('isOn')['to'](_0x5da1ed,'id',_0x382333=>'commentsArchive'===_0x382333),_0x45b706['set']({'label':Et(_0x45cd60,'COMMENTS_ARCHIVE'),'icon':_0x4d5995,'isToggleable':!0x0}),_0x48e944&&(_0x45b706['tooltip']=!0x0),this['listenTo'](_0x45b706,'execute',()=>this['_toggleDialog']()),_0x45b706;}['_hideDialogOnAnnotationEscape']=_0x24160c=>{const _0x9294dc=_0x24160c['source'];if(!this['annotationViews']['has'](_0x9294dc['view']))return;const _0x532e0b=this['editor']['plugins']['get']('Dialog');_0x532e0b['isOpen']&&'commentsArchive'===_0x532e0b['id']&&(_0x532e0b['hide'](),_0x24160c['stop']());};},Bi=class extends _0x26bf82{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
|
|
23
|
+
import{Command as _0x54d867,Context as _0x429018,ContextPlugin as _0x388472,Editor as _0x5df8d8,PendingActions as _0x35ca69,Plugin as _0x1228a1}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x3cac4c,Collection as _0x5c875e,DomEmitterMixin as _0xff39d,FocusTracker as _0x57589a,KeystrokeHandler as _0x6e4d4a,ObservableMixin as _0x181a7c,Rect as _0x50fe83,diff as _0x5c96b4,first as _0x48775c,getEnvKeystrokeText as _0x3d03a9,keyCodes as _0x161b1f,priorities as _0x5f4140,scrollViewportToShowTarget as _0x5199,toUnit as _0xe08cc4,uid as _0x238ccd}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x1a41e7,ConfirmMixin as _0x10bd48,FOCUS_ANNOTATION_KEYSTROKE as _0x4a902b,LateFocusButtonView as _0x470ff8,LateFocusDropdownButtonView as _0x4802c0,UserView as _0x19feda,Users as _0x52cabf,getAllMarkersDomElementsSorted as _0x30db39,getDateTimeFormatter as _0x5330d2,hashObject as _0x31a5a3,setupThreadKeyboardNavigation as _0x57b841,surroundingMarkersDetector as _0x56b924,trimHtml as _0x260955}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x2cf7e4,debounce as _0x55ca5d,isEqual as _0x4074d8,set as _0x27c082,throttle as _0x5e5c2f,unset as _0xeea9c4}from'es-toolkit/compat';import{IconAddComment as _0x232043,IconCheck as _0x10acf0,IconCommentsArchive as _0x49f299,IconPencil as _0x16d61c,IconRemoveComment as _0x5dcef3,IconThreeVerticalDots as _0x4443a6,IconUndo as _0x431f9a}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x230065,BodyCollection as _0x31232d,ButtonView as _0x3a0b06,ContextualBalloon as _0x4bf11d,Dialog as _0x13db02,DialogViewPosition as _0x2718da,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x181a7c();var bt=class extends It{['model'];['view'];constructor(_0x3da8b9,_0x373d18){super(),this['model']=_0x3da8b9,this['model']['_isAttached']=!0x0,this['view']=_0x373d18,this['listenTo'](_0x373d18,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x373d18,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x373d18,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x373d18,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x373d18,'addComment',(_0x4b01ba,_0x93fe8c)=>this['addComment'](_0x93fe8c)),this['listenTo'](_0x373d18,'updateComment',(_0x562e6a,_0x24c5d8,_0xf0dc98)=>this['updateComment'](_0x24c5d8,_0xf0dc98)),this['listenTo'](_0x373d18,'removeComment',(_0x39cae2,_0xf38b59)=>this['removeComment'](_0xf38b59));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x256cdd){this['model']['addComment']({'content':_0x256cdd,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xd90564,_0x3a8471){this['model']['getComment'](_0xd90564)['update']({'content':_0x3a8471});}['removeComment'](_0x339b29){this['model']['getComment'](_0x339b29)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x11c5a5,_0x18e1ff,_0x26c7f2){const t=_0x11c5a5['t'];switch(_0x18e1ff){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'},_0x26c7f2);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x26c7f2);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'},_0x26c7f2);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'},_0x26c7f2);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x26c7f2);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'},_0x26c7f2);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'},_0x26c7f2);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'},_0x26c7f2);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'';}}var kt=class extends it{['main'];['editable'];constructor(_0x425017,_0x3165c3){super(_0x425017);const _0x8529aa=_0x238ccd();this['main']=this['createCollection'](),this['editable']=new st(_0x425017,_0x3165c3,void 0x0,{'label':()=>Et(_0x425017,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x425017['uiLanguageDirection'],'lang':_0x425017['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x8529aa},'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']();}},Nt=class extends tt{['view'];constructor(_0x43d25b){super(_0x43d25b),this['view']=new kt(_0x43d25b['locale'],_0x43d25b['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x8ff8e2=this['editor']['editing']['view'],_0x4081ef=this['view']['editable'];_0x4081ef['name']=_0x8ff8e2['document']['getRoot']()['rootName'],this['view']['render']();const _0x37c33b=_0x4081ef['element'];this['setEditableElement'](_0x4081ef['name'],_0x37c33b),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x8ff8e2['attachDomRoot'](_0x37c33b),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x181a7c(_0x5df8d8);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Ot)());constructor(_0x3f0f93={}){(_0x3f0f93=Object['assign']({},_0x3f0f93))['plugins']||(_0x3f0f93['plugins']=CommentEditor['defaultPlugins']),super(_0x3f0f93),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0xeb6133=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xeb6133))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2da7c9=>{const _0x11e8d2=this['model']['document']['getRoot'](),_0x2ecd46=_0x11e8d2&&_0x11e8d2['getChild'](_0x11e8d2['childCount']-0x1);_0x2da7c9['setSelection'](_0x2ecd46,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x28af66=this['editing']['view'],_0x4ab45c=_0x28af66['document']['getRoot'](),_0x44cd92=_0x4ab45c['getChild'](0x0);_0x4ab45c['childCount']>0x1||!_0x44cd92||'p'!=_0x44cd92['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x28af66,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x44cd92['placeholder']=this['placeholder']),ut({'view':_0x28af66,'element':_0x44cd92,'keepOnFocus':!0x0}),this['placeholderElement']=_0x44cd92);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x31f79f,_0x4cd582={}){super(_0x31f79f),this['editor']=null,this['_editorConfig']=_0x4cd582,this['set']('value',_0x4cd582['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x31f79f,'Reply...')),this['set']('submitLabel',Et(_0x31f79f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x6e4d4a(),this['focusTracker']=new _0x57589a(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3aa677=>!_0x3aa677['defaultPrevented']},'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',(_0x24590d,_0x6c0dd2)=>{this['cancelButtonView']['fire']('execute'),_0x6c0dd2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4f9825,_0x4179bf)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4179bf());}),this['on']('submit',(_0x1523e6,_0xb09355)=>{_0xb09355['length']>0xfde8?(alert(Et(_0x31f79f,'TOO_LONG_COMMENT_ALERT',[_0xb09355['length'],0xfde8])),_0x1523e6['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2f1560=this['editor'];this['element']['insertBefore'](_0x2f1560['ui']['element'],this['element']['firstChild']),_0x2f1560['model']['document']['on']('change',()=>this['value']=_0x2f1560['getData']()),_0x2f1560['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2f1560['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3236f7){-0x1===_0x3236f7?(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:_0x1a012b}=this,_0x1a53a6=new _0x3a0b06(_0x1a012b);return _0x1a53a6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1a53a6['withText']=!0x0,_0x1a53a6['bind']('label')['to'](this,'submitLabel'),_0x1a53a6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1a53a6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x537925,_0x3fe20a)=>!_0x3fe20a&&!!_0x537925['trim']()),_0x1a53a6;}['_createCancelButton'](){const {locale:_0x2b897c}=this,_0x168cfa=new _0x3a0b06(_0x2b897c);return _0x168cfa['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x168cfa['label']=Et(_0x2b897c,'Cancel'),_0x168cfa['withText']=!0x0,_0x168cfa['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x168cfa;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5a7eb1=>{this['focusTracker']['add'](_0x5a7eb1['element']);}),this['focusables']['on']('change',(_0x1b2bd6,_0x559826)=>{for(const _0x112986 of Array['from'](_0x559826['added'])['reverse']())this['focusTracker']['add'](_0x112986['element']);});}},xt=class extends ht{constructor(_0x53e202,_0x128a7b,_0x97ca73){super(_0x53e202),this['commentInputView']=new St(_0x53e202,_0x97ca73),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x31bddb,_0x3c8f4a)=>_0x31bddb||!!_0x3c8f4a),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 _0x19feda(_0x53e202,_0x128a7b),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'](_0x47b998){this['commentInputView']['focus'](_0x47b998);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1f2adc,_0x479b28)=>{const {submitButtonView:_0x351110,cancelButtonView:_0x15e003,editor:_0x59c0ba}=this['commentInputView'];[_0x351110['element'],_0x15e003['element'],_0x59c0ba?_0x59c0ba['editing']['view']['getDomRoot']():null]['filter'](_0x5b4d82=>_0x5b4d82)['some'](_0x1ae42e=>_0x1ae42e['contains'](_0x479b28['target']))||(this['focus'](),_0x479b28['preventDefault']());});}},Pt=class extends ht{constructor(_0x5cff02){super(_0x5cff02);const _0x49d78f=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x49d78f['to']('count',_0x2f8f88=>Et(_0x5cff02,'NUMBER_OF_COMMENTS',_0x2f8f88))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x27b303,_0x2e0aed,_0x556ce1){super(_0x27b303);const _0x594ac9=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2e0aed['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2e0aed,this['_config']=_0x556ce1,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x57589a(),this['keystrokes']=new _0x6e4d4a(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2c7bb5=>this['commentViews']['map'](_0x9a07d7=>_0x9a07d7['element'])['includes'](_0x2c7bb5['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x27b303),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1ead9e=>_0x1ead9e-this['_config']['maxCommentsWhenCollapsed']);for(const _0x17ca53 of _0x2e0aed['comments'])this['_handleNewCommentModel'](_0x17ca53);this['_handleInfoComment'](),this['listenTo'](_0x2e0aed['comments'],'add',(_0x313c8c,_0xda2a38)=>{const _0x3021cb=this['_calculatePosition'](_0xda2a38);this['length']++,this['_handleNewCommentModel'](_0xda2a38,_0x3021cb),this['refreshVisibleViews']();}),this['listenTo'](_0x2e0aed['comments'],'remove',(_0x4ba7af,_0xc9573f)=>{this['length']--,this['_handleRemoveCommentModel'](_0xc9573f),this['refreshVisibleViews']();}),this['listenTo'](_0x2e0aed,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2e0aed,'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',_0x594ac9['if']('length','ck-hidden',_0x19c4b6=>!_0x19c4b6)],'aria-label':Et(_0x27b303,'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'](_0x55708f){-0x1===_0x55708f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1f88e4 of this['commentViews'])_0x1f88e4['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4525b2,_0xabbd7e){const _0x574add=new this['_config']['CommentView'](this['locale'],_0x4525b2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x574add['viewUid']=_0x4525b2['id'],_0x574add['delegate']('removeComment')['to'](this),_0x574add['delegate']('updateComment')['to'](this),_0x574add['delegate']('resolveCommentThread')['to'](this),_0x574add['delegate']('editorReady')['to'](this),_0x574add['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x574add,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x574add,_0xabbd7e);}['_calculatePosition'](_0x280be4){const _0xa0c202=this['_model']['_findOptimalIndex'](_0x280be4);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x280be4['authoredAt']?_0xa0c202-0x1:_0xa0c202:_0xa0c202-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x256c09={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x256c09,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x256c09));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x37b6c6){const _0x4b4aa6=this['commentViews']['remove'](_0x37b6c6['id']);this['stopListening'](_0x4b4aa6),_0x4b4aa6['isEditMode']&&this['_updateHasDirtyComment'](),_0x4b4aa6['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1f7601=>_0x1f7601['isEditMode']);}['_rearrangeCollapse'](){const _0x44fba0=function(_0x207f01){const _0x4df0c0=new _0x5c875e();for(const _0x1c66bf of _0x207f01)_0x4df0c0['add'](_0x1c66bf);return _0x4df0c0;}(this['commentViews']),_0x2d9d0f=this['_collapsedCommentsView']['count'];for(let _0x145e1c=0x1;_0x145e1c<=_0x2d9d0f;_0x145e1c++)_0x44fba0['remove'](0x1);for(const _0xef1062 of _0x44fba0)_0xef1062['collapse']();_0x2d9d0f>0x0&&_0x44fba0['add'](this['_collapsedCommentsView'],0x1),Dt(_0x5c96b4(Array['from'](this['visibleViews']),Array['from'](_0x44fba0)),this['visibleViews'],_0x44fba0);}['_rearrangeExpand'](){Dt(_0x5c96b4(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xb37099 of this['visibleViews'])_0xb37099['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x556938=>{this['focusTracker']['add'](_0x556938['element']),this['keystrokes']['listenTo'](_0x556938['element']);}),this['commentViews']['on']('change',(_0x136cea,_0x3e7629)=>{for(const _0x486424 of _0x3e7629['removed'])this['focusTracker']['remove'](_0x486424['element']),this['keystrokes']['stopListening'](_0x486424['element']);for(const _0x7b132b of Array['from'](_0x3e7629['added'])['reverse']())this['focusTracker']['add'](_0x7b132b['element']),this['keystrokes']['listenTo'](_0x7b132b['element']);});}};function Dt(_0x189184,_0x486d07,_0xcb11b2){let _0xfc20b6=0x0;for(const _0x519e58 of _0x189184)switch(_0x519e58){case'insert':_0x486d07['add'](_0xcb11b2['get'](_0xfc20b6),_0xfc20b6),_0xfc20b6++;break;case'delete':_0x486d07['remove'](_0xfc20b6);break;case'equal':_0xfc20b6++;}}var Vt=class extends ht{constructor(_0x279fc2){super(_0x279fc2);const _0x4bd9d3=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4bd9d3['to']('contextValue',_0x1be60a=>Et(_0x279fc2,'THREAD_CONTEXT_LABEL',_0x1be60a)),'tabindex':-0x1},'children':[{'text':_0x4bd9d3['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4c7f3c,_0x3cfc08){super(_0x4c7f3c);const _0x3687b1=this['bindTemplate'];this['_model']=_0x3cfc08,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x57589a(),this['keystrokes']=new _0x6e4d4a(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x253348=>!!_0x253348),this['bind']('contextValue')['to'](this['_model'],'context',_0x598866=>_0x598866&&_0x598866['value']?this['_trimContextValue'](_0x598866['value']):Et(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',_0x3687b1['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 _0x571b4a=new _0x3a0b06(this['locale']);return _0x571b4a['label']=Et(this['locale'],'Reopen'),_0x571b4a['tooltip']=Et(this['locale'],'Reopen'),_0x571b4a['icon']=_0x431f9a,_0x571b4a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x33e2eb=>!_0x33e2eb),_0x571b4a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x566747,_0xdd1434)=>_0x566747&&_0xdd1434),_0x571b4a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x571b4a;}['_trimContextValue'](_0x596be7){if(_0x596be7['length']<0x96)return _0x596be7;const _0x52818e=_0x596be7['lastIndexOf']('\x20',0x93);return _0x596be7['substring'](0x0,_0x52818e>-0x1?_0x52818e:0x93)+'...';}['_attachContextActions'](){const _0x495c87=this['element']['querySelector']('.ck-context'),_0x46bbdf=_0x495c87['querySelector']('.ck-context__value');this['listenTo'](_0x495c87,'mouseenter',()=>{_0x46bbdf['offsetWidth']<_0x46bbdf['scrollWidth']&&_0x495c87['classList']['add']('overlay');}),this['listenTo'](_0x495c87,'mouseleave',()=>{_0x495c87['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4c23a5 of this['focusables'])this['focusTracker']['add'](_0x4c23a5['element']),this['keystrokes']['listenTo'](_0x4c23a5['element']);}['_createContextView'](){const _0x38743f=new Vt(this['locale']);return _0x38743f['bind']('contextValue')['to'](this),_0x38743f;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x588ae7,_0x52e80b,_0x399f73,_0xdd0150){super(_0x588ae7),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x52e80b,this['_localUser']=_0x399f73,this['_config']=_0xdd0150,this['commentThreadHeaderView']=new Bt(_0x588ae7,_0x52e80b),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x1a41e7(_0x588ae7,Et(_0x588ae7,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x588ae7,_0x52e80b,Object['assign']({'CommentView':this['_config']['CommentView']},_0xdd0150)),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',(_0x49fa2d,_0x1eafe4)=>_0x49fa2d||!!_0x1eafe4),this['bind']('isUnlinked')['to'](_0x52e80b,'unlinkedAt',_0x5c109e=>!!_0x5c109e);let _0x3d7bd6=null;const _0x5d0da3=()=>{const _0x46a978=this['_model']['comments']['first']||null;_0x46a978!==_0x3d7bd6&&(_0x3d7bd6&&this['stopListening'](_0x3d7bd6,'change:content'),_0x3d7bd6=_0x46a978,_0x46a978&&this['listenTo'](_0x46a978,'change:content',_0x5d0da3));const _0x57ed4d=_0x46a978?_0x46a978['author']['name']:this['_localUser']['name'],_0x1fe5c5=_0x46a978?new DOMParser()['parseFromString'](_0x260955(_0x46a978['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0xe423d4=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x57ed4d]);this['set']('ariaLabel',_0x1fe5c5?_0xe423d4+'\x20'+_0x1fe5c5:_0xe423d4);};this['listenTo'](this['_model']['comments'],'change',_0x5d0da3),_0x5d0da3(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x57589a(),this['keystrokes']=new _0x6e4d4a(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x352d1d=>_0x352d1d['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x57b841(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xe5f283=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x48e63d=_0xe5f283['commentInputView'];return _0xe5f283['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x48e63d,'value',(_0x6e2f,_0x19946b,_0x294fcf,_0x3175ff,_0x258693)=>!!_0x258693||!!_0x3175ff&&_0x294fcf&&!_0x19946b||_0x6e2f&&_0x294fcf&&!_0x19946b),_0x48e63d['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4d35a8,_0x28271d,_0x573686)=>{let _0xd5c596;return _0xd5c596=_0x573686&&_0x28271d?'Reply\x20to\x20reopen\x20discussion...':_0x4d35a8?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0xd5c596);}),_0x48e63d['bind']('submitLabel')['to'](this,'length',_0x2cc043=>Et(this['locale'],_0x2cc043?'Reply':'Comment')),_0x48e63d['on']('submit',(_0x313bc7,_0xfbec71)=>{this['fire']('addComment',_0xfbec71),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x48e63d['on']('cancel',()=>{this['focus']();}),_0x48e63d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x48e63d['on']('cancel',_0x3c3891=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3c3891['stop']());}),this['on']('change:isActive',(_0x4f80ea,_0x3e5bbe,_0xf02bb3)=>{_0xf02bb3||this['length']||_0x48e63d['value']||this['fire']('removeCommentThread');}),_0xe5f283;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x10bd48(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x31206e,_0x460ebe,_0x5b844f,_0x3a4ad4){super(_0x31206e,_0x460ebe,_0x5b844f,_0x3a4ad4),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x31206e,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x155694,_0x4c4a75,_0x10eea3)=>{_0x10eea3||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1b82ed,_0xe8efd8,_0x554f97)=>{_0x554f97&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x59a35c=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x59a35c['if']('isActive','ck-thread--active'),_0x59a35c['if']('isUnlinked','ck-thread--unlinked'),_0x59a35c['to']('actionIndicator',_0xacfce4=>_0xacfce4?'ck-thread--'+_0xacfce4:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x59a35c['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 _0x2d5263 of this['commentsListView']['commentViews'])_0x2d5263['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5017a9}=this,_0x2d322a=this['commentsListView']['commentViews']['get'](0x0);_0x2d322a===this['_boundFirstCommentView']||_0x2d322a['isSystemComment']||(this['_boundFirstCommentView']=_0x2d322a,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2d322a,'actionIndicator',_0x2837ba=>'remove'===_0x2837ba?'remove':null),_0x2d322a['placeholder']=Et(_0x5017a9,'Write\x20a\x20comment...'),_0x2d322a['removeButton']['on']('execute',_0x426363=>{_0x426363['stop'](),this['showConfirm'](Et(_0x5017a9,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2d322a['focus']();}),_0x2d322a['actionBar']['add'](this['resolveButton'],0x0),_0x2d322a['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x35fce5=new _0x470ff8(this['locale']);return _0x35fce5['label']=Et(this['locale'],'Resolve'),_0x35fce5['tooltip']=Et(this['locale'],'Resolve'),_0x35fce5['icon']=_0x10acf0,_0x35fce5['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x35fce5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1dda89=>!_0x1dda89),_0x35fce5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5af41b,_0x8db376)=>_0x5af41b&&!_0x8db376),_0x35fce5['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x35fce5;}['_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']));}},Wt=class extends ht{constructor(_0x148a18){super(_0x148a18),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x133f21,_0x380a7b,_0x3db7ee)=>{this['element']['innerHTML']=_0x3db7ee;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1c354b,_0x15d8d4,_0x5ea88a){super(_0x1c354b),this['_model']=_0x15d8d4,this['_config']=_0x5ea88a,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x15d8d4,'content',_0x15d8d4,'authoredAt',(_0x9ecc74,_0x147fac)=>Et(_0x1c354b,'COMMENT_ARIA_LABEL',[_0x15d8d4['author']['name'],_0x5ea88a['formatDateTime'](_0x147fac),new DOMParser()['parseFromString'](_0x9ecc74,'text/html')['body']['textContent'],_0x15d8d4['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x1a41e7(_0x1c354b,Et(_0x1c354b,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x57589a(),this['keystrokes']=new _0x6e4d4a(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x173e34=>_0x173e34['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x49a395=new Wt(this['locale']);return _0x49a395['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x570ea0,_0x251fa0)=>_0x251fa0?_0x260955(_0x570ea0,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x570ea0),_0x49a395;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0xcbb9ac=new St(this['locale'],this['_config']['editorConfig']);return _0xcbb9ac['value']=this['_model']['content'],_0xcbb9ac['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xcbb9ac['submitLabel']=Et(this['locale'],'Save'),_0xcbb9ac['on']('submit',(_0x25fd26,_0xf928d3)=>{this['fire']('updateComment',this['_model']['id'],_0xf928d3),this['switchToDisplayMode'](),this['focus']();}),_0xcbb9ac['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0xcbb9ac['once']('editorReady',()=>{_0xcbb9ac['focus']();}),_0xcbb9ac['createEditor'](),_0xcbb9ac['delegate']('editorReady')['to'](this),_0xcbb9ac['delegate']('editorDestroyed')['to'](this),_0xcbb9ac;}['_setupKeyboardNavigation'](){const _0x31055c=this['element'];this['keystrokes']['listenTo'](_0x31055c);for(const _0x37d0f0 of this['focusables'])this['focusTracker']['add'](_0x37d0f0['element']),this['keystrokes']['listenTo'](_0x37d0f0['element']);this['focusables']['on']('change',(_0x38a7f3,_0x351e7c)=>{for(const _0x24bcde of _0x351e7c['removed'])this['focusTracker']['remove'](_0x24bcde['element']),this['keystrokes']['stopListening'](_0x24bcde['element']);for(const _0x29f26f of _0x351e7c['added'])this['focusTracker']['add'](_0x29f26f['element']),this['keystrokes']['listenTo'](_0x29f26f['element']);}),this['keystrokes']['set']('enter',(_0x4fd467,_0x273e81)=>{_0x31055c===_0x4fd467['target']&&(this['focusCycler']['focusFirst'](),_0x273e81());}),this['keystrokes']['set']('esc',(_0x596e96,_0x1057ad)=>{_0x31055c!==_0x596e96['target']&&(this['focus'](),_0x1057ad());});}};const Gt=/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x10bd48(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x21badc,_0x3c0892,_0x1ce561){super(_0x21badc,_0x3c0892,_0x1ce561),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x21badc,'Reply...')),this['bind']('authoredAt')['to'](_0x3c0892),this['bind']('resolvedAt')['to'](_0x3c0892),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 _0x19feda(_0x21badc,_0x3c0892['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3c0892,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1e7df9=this['bindTemplate'],_0x4c0d3d=[{'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':_0x1e7df9['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1e7df9['to']('authoredAt',_0x4b5270=>this['_config']['formatDateTime'](_0x4b5270))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1e7df9['if']('isEditMode','ck-comment__actions--hidden'),_0x1e7df9['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']&&_0x4c0d3d['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x1e7df9['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1e7df9['if']('isEditMode','ck-comment--edit'),_0x1e7df9['if']('isSystemComment','ck-comment--info'),_0x1e7df9['to']('actionIndicator',_0x21a266=>_0x21a266?'ck-comment--'+_0x21a266:'')],'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':_0x4c0d3d}]}]};}['_createEditButton'](){const _0xcd46a4=new _0x3a0b06(this['locale']);return _0xcd46a4['label']=Et(this['locale'],'Edit'),_0xcd46a4['icon']=_0x16d61c,_0xcd46a4['withText']=!0x0,_0xcd46a4['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xcd46a4['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2a6c04=>!_0x2a6c04),_0xcd46a4['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xcd46a4['on']('execute',()=>this['switchToEditMode']()),_0xcd46a4;}['_createRemoveButton'](){const _0x1e8d42=new _0x3a0b06(this['locale']);return _0x1e8d42['label']=Et(this['locale'],'Remove'),_0x1e8d42['icon']=_0x5dcef3,_0x1e8d42['withText']=!0x0,_0x1e8d42['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1e8d42['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x30b9fa=>!_0x30b9fa),_0x1e8d42['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1e8d42['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1e8d42;}['_createDropdown'](){const _0x3e9a41=ct(this['locale'],_0x4802c0),_0x3275c1=_0x3e9a41['panelView']['children'],_0x3af4c2=new ot(this['locale']),_0x50b4e6=_0x3e9a41['bindTemplate'];dt(_0x3e9a41,()=>this['items']['find'](_0xf4ef48=>_0xf4ef48['isVisible'])),_0x3e9a41['extendTemplate']({'attributes':{'class':[_0x50b4e6['if']('isVisible','ck-hidden',_0x40f03b=>!_0x40f03b)]}});const _0x54a155=(_0x52551a,_0x5585d6=-0x1)=>{const _0x5d012a=new nt(this['locale']);_0x5d012a['children']['add'](_0x52551a);const _0x408565=_0x5585d6>-0x1?_0x5585d6:_0x3af4c2['items']['length'];_0x3af4c2['items']['add'](_0x5d012a,_0x408565);const _0x32c709=Array['from'](this['items']);_0x3e9a41['unbind']('isEnabled','isVisible'),_0x3e9a41['bind']('isEnabled')['toMany'](_0x32c709,'isEnabled',(..._0x342b87)=>_0x342b87['some'](_0x207e5e=>_0x207e5e)),_0x3e9a41['bind']('isVisible')['toMany'](_0x32c709,'isVisible',(..._0x340f0a)=>_0x340f0a['some'](_0x65a9a3=>_0x65a9a3));};_0x3e9a41['panelPosition']='sw',_0x3e9a41['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x4443a6});for(const _0x48fd8e of this['items'])_0x54a155(_0x48fd8e);return _0x3275c1['add'](_0x3af4c2),_0x3e9a41['listenTo'](this['items'],'add',(_0x3c0f2e,_0x47bab9,_0xfcd03e)=>{_0x54a155(_0x47bab9,_0xfcd03e);}),_0x3e9a41['listenTo'](this['items'],'remove',(_0x15240a,_0x33f709,_0x378a03)=>{_0x3af4c2['items']['remove'](_0x378a03);}),_0x3e9a41;}['_attachActions'](_0xd08b80,_0x252b9f){const _0x5e0456=_0xd08b80&&_0xd08b80['element'];_0x5e0456&&(this['listenTo'](_0x5e0456,'mouseenter',()=>this['actionIndicator']=_0x252b9f),this['listenTo'](_0x5e0456,'focus',()=>this['actionIndicator']=_0x252b9f),this['listenTo'](_0x5e0456,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5e0456,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x58895d=super['_createCommentInputView']();return _0x58895d['bind']('placeholder')['to'](this),_0x58895d;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x32c79a){const _0x4fb55e=_0x5e5c2f(_0x32c79a,0x1e),_0x46025a=new MutationObserver(_0x2020b0=>{for(const _0x35b63d of _0x2020b0)('attributes'==_0x35b63d['type']&&'class'==_0x35b63d['attributeName']||'childList'==_0x35b63d['type']||'characterData'==_0x35b63d['type'])&&_0x4fb55e();});return{'attach'(_0x7c517f){_0x46025a['observe'](_0x7c517f,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x46025a['disconnect'](),_0x4fb55e['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x1e8758,_0x5db820){super(_0x1e8758),this['id']=_0x238ccd(),this['focusTracker']=new _0x57589a(),this['keystrokes']=new _0x6e4d4a(),this['keystrokes']['set']('Esc',(_0x20ae90,_0x14f7fc)=>this['fire']('Esc',_0x14f7fc)),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'](_0x5db820),this['mainView']=_0x5db820;const _0x3d39d2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3d39d2['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 _0x3f9470=this['element']['clientHeight'];_0x3f9470&&(this['height']=_0x3f9470);}};const jt=/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x181a7c();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x11f100,target:_0x8d26be,type:_0x4542a2,isVisible:_0x4aaa45=!0x0}){super(),this['view']=_0x11f100,this['view']['element']||this['view']['render'](),this['_type']=_0x4542a2,this['_target']=_0x8d26be,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5c875e([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5bcdf2,_0x429530)=>{this['view']['focusTracker']['add'](_0x429530);}),this['focusableElements']['on']('remove',(_0x5d3b17,_0x4b310b)=>{this['view']['focusTracker']['remove'](_0x4b310b);}),this['set']('isVisible',_0x4aaa45);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x50b967=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x50b967),_0x50b967;}get['targetRect'](){const _0x1a945f=this['target'];if(null===_0x1a945f)return null;if(_0x1a945f instanceof _0x50fe83)return _0x1a945f;const _0x137b83=_0x1a945f['filter'](_0x3d2adb=>function(_0x236bd8){return!!_0x236bd8['offsetParent']||!!_0x236bd8['getClientRects']()['item'](0x0);}(_0x3d2adb));return 0x0===_0x137b83['length']?null:_0x50fe83['getDomElementRects'](_0x137b83[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x15a619){this['view']['isActive']=_0x15a619,this['view']['mainView']['isActive']=_0x15a619;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x14b17a){if(!(null===_0x14b17a||_0x14b17a instanceof _0x50fe83||Array['isArray'](_0x14b17a)&&_0x14b17a['every'](_0x2c5d4d=>zt(_0x2c5d4d))))throw new _0x3cac4c('annotation-invalid-target',null,{'target':_0x14b17a});}['_getNormalizedTarget'](){const _0x560bb2='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x560bb2)?[_0x560bb2]:_0x560bb2;}};function zt(_0x3cdec8){return null!==_0x3cdec8&&'object'==typeof _0x3cdec8&&'nodeType'in _0x3cdec8&&0x1===_0x3cdec8['nodeType'];}var Jt=class extends _0x5c875e{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x129a1b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x57589a(),this['_focusTracker']['on']('change:isFocused',(_0x1c5266,_0x588d8f,_0x10c7c8)=>{_0x10c7c8||this['fire']('blur');});for(const _0x2862df of _0x129a1b)this['add'](_0x2862df);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x299af5){if(this['has'](_0x299af5))throw new _0x3cac4c('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x299af5['innerView'],_0x299af5),this['_viewToAnnotation']['set'](_0x299af5['view'],_0x299af5);for(const _0x1ad3f8 of _0x299af5['focusableElements'])this['_focusTracker']['add'](_0x1ad3f8);if(this['listenTo'](_0x299af5['focusableElements'],'add',(_0x376bf9,_0x345484)=>{this['_focusTracker']['add'](_0x345484);}),this['listenTo'](_0x299af5['focusableElements'],'remove',(_0x5da7f3,_0x341f0a)=>{this['_focusTracker']['remove'](_0x341f0a);}),this['listenTo'](_0x299af5['view']['focusTracker'],'change:isFocused',(_0x30d4c9,_0x145cb2,_0x4e062b)=>{_0x4e062b&&this['fire']('focus',_0x299af5);}),_0x299af5['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x33aaf0 of this)_0x33aaf0['updateTargetRect']();}const _0x96fdd1=this['_getOrderInContent'](_0x299af5['view']['targetRect']);return super['add'](_0x299af5,_0x96fdd1);}['remove'](_0x368bad){if(!this['has'](_0x368bad))throw new _0x3cac4c('annotationcollection-not-existing-item',null);this['stopListening'](_0x368bad['view']['focusTracker']),this['stopListening'](_0x368bad['focusableElements']);for(const _0x17a9bd of _0x368bad['focusableElements'])this['_focusTracker']['remove'](_0x17a9bd);return this['_viewToAnnotation']['delete'](_0x368bad['view']),this['_innerViewToAnnotation']['delete'](_0x368bad['innerView']),super['remove'](_0x368bad);}['getByInnerView'](_0x4d3efe){return this['_innerViewToAnnotation']['get'](_0x4d3efe);}['getByView'](_0x3a3744){return this['_viewToAnnotation']['get'](_0x3a3744);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3bdb0e of this)_0x3bdb0e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4962db=Array['from'](this)['sort']((_0x490ce5,_0x10ad79)=>Zt(_0x490ce5['view']['targetRect'],_0x10ad79['view']['targetRect']));for(let _0x25fa6c=_0x4962db['length']-0x1;_0x25fa6c>0x0;_0x25fa6c--){const _0x28309f=_0x4962db[_0x25fa6c];_0x25fa6c!==this['getIndex'](_0x28309f)&&(this['remove'](_0x28309f),this['add'](_0x28309f));}}['_getOrderInContent'](_0x54c704){let _0x3666a2=0x0;if(!_0x54c704)return this['length'];for(const _0x44f763 of this){const _0x414c30=_0x44f763['view']['targetRect'];if(_0x414c30){if(Zt(_0x54c704,_0x414c30)<0x0)return _0x3666a2;_0x3666a2++;}}return _0x3666a2;}['_areCachedRectsStale'](){const _0x1c9d71=this['get'](0x0);if(!_0x1c9d71)return!0x1;const _0x54e0da=_0x1c9d71['view']['targetRect'],_0x39e6c0=_0x1c9d71['targetRect'];return!(!_0x54e0da||!_0x39e6c0)&&(_0x54e0da['top']!==_0x39e6c0['top']||_0x54e0da['left']!==_0x39e6c0['left']);}};function Qt({source:_0x168d0d,target:_0x2e5ec1,filter:_0x1dfce8}){for(const _0x5d900f of _0x168d0d)_0x1dfce8(_0x5d900f)&&_0x2e5ec1['add'](_0x5d900f);_0x2e5ec1['listenTo'](_0x168d0d,'add',(_0x4fe40e,_0x27619d)=>{_0x1dfce8(_0x27619d)&&_0x2e5ec1['add'](_0x27619d);}),_0x2e5ec1['listenTo'](_0x168d0d,'remove',(_0x2cc2bc,_0x296ea3)=>{_0x2e5ec1['has'](_0x296ea3)&&_0x2e5ec1['remove'](_0x296ea3);});}function Zt(_0x4bf63c,_0x29c056){if(null===_0x4bf63c&&null===_0x29c056)return 0x0;if(null===_0x4bf63c)return-0x1;if(null===_0x29c056)return 0x1;const _0x4252b3=_0x4bf63c['top']-_0x29c056['top'];return 0x0==_0x4252b3?_0x4bf63c['left']-_0x29c056['left']:_0x4252b3;}var ti=class extends _0x388472{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x50e0d3){if(super(_0x50e0d3),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x50e0d3 instanceof _0x5df8d8){const _0x3869d3=_0x50e0d3['locale'];_0x50e0d3['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x142bd5){this['collection']['add'](_0x142bd5);}['remove'](_0x432352){this['collection']['remove'](_0x432352),_0x432352['destroy']();}['refreshVisibility'](){for(const _0xe3797 of this['collection'])_0xe3797['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x331a62){return this['collection']['getByInnerView'](_0x331a62);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2e9c5c of this['collection'])_0x2e9c5c['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x44d838){this['fire']('_activateAnnotation',_0x44d838);}['createAnnotation'](_0x55f694){return new $t(_0x55f694);}['createAnnotationView'](_0x30e2d3,_0x511c34){return new qt(_0x30e2d3,_0x511c34);}['_addActiveAnnotation'](_0x1b0a4f){const _0x3d0c12=new Set(this['activeAnnotations']);_0x3d0c12['add'](_0x1b0a4f),this['activeAnnotations']=_0x3d0c12;}['_removeActiveAnnotation'](_0x2ed181){const _0x3ef71a=new Set(this['activeAnnotations']);_0x3ef71a['delete'](_0x2ed181),this['activeAnnotations']=_0x3ef71a;}['_bindAnnotationsToVisibleAnnotations'](){const _0x456a41=this['collection'],_0x2ca952=this['_visibleAnnotations'];function _0x243b94(_0x855abe){const _0x348d00=_0x855abe['source'];_0x348d00['isVisible']&&!_0x2ca952['has'](_0x348d00)?_0x2ca952['add'](_0x348d00):!_0x348d00['isVisible']&&_0x2ca952['has'](_0x348d00)&&_0x2ca952['remove'](_0x348d00),_0x348d00['view']['focusTracker']['remove'](_0x348d00['view']['element']),_0x348d00['view']['focusTracker']['add'](_0x348d00['view']['element']);}this['listenTo'](_0x456a41,'add',(_0x16d5fe,_0x1c465a)=>{_0x1c465a['isVisible']&&_0x2ca952['add'](_0x1c465a),this['listenTo'](_0x1c465a,'change:isVisible',_0x243b94);}),this['listenTo'](_0x456a41,'remove',(_0x39cf52,_0xdbcce3)=>{_0x2ca952['has'](_0xdbcce3)&&_0x2ca952['remove'](_0xdbcce3),this['stopListening'](_0xdbcce3,'change:isVisible',_0x243b94);});}['_setupEnterAnnotationKeystroke'](){const _0x48ef02=_0x58a062=>{_0x58a062['on']('ready',()=>{_0x58a062['keystrokes']['set'](_0x4a902b,(_0x3cbf98,_0x4ce1a5)=>{const _0x47baed=_0x48775c(this['activeAnnotations']['values']());_0x47baed&&(_0x47baed['view']['focus'](),_0x4ce1a5());});});};this['context']instanceof _0x5df8d8?_0x48ef02(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2a954b,_0x50f7e6)=>{_0x48ef02(_0x50f7e6);});}['_setupEscapeAnnotationHandling'](){const _0x19da4d=_0x54b560=>{const _0x47d9b8=_0x54b560['source'],_0x3996fe=[];let _0x2a77aa;if(Array['isArray'](_0x47d9b8['target'])){_0x2a77aa=_0x47d9b8['target'][0x0],this['context']instanceof _0x5df8d8?_0x3996fe['push'](this['context']):this['context']['editors']&&_0x3996fe['push'](...this['context']['editors']);for(const _0x1d073d of _0x3996fe)for(const _0x1e9ece of _0x1d073d['editing']['view']['domRoots']['values']())if(_0x1e9ece['contains'](_0x2a77aa))return void _0x1d073d['editing']['view']['focus']();_0x2a77aa['focus']();}};this['listenTo'](this['collection'],'add',(_0x9473db,_0x25718d)=>{this['listenTo'](_0x25718d,'escape',_0x19da4d,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5d4377,_0x4fb5b8)=>{this['stopListening'](_0x4fb5b8,'escape',_0x19da4d);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x181a7c(),ni=/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x181a7c();var oi=class extends _0x388472{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x35ca69,_0x52cabf];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x12c36e){super(_0x12c36e),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x55dc69=this['context']['config'];_0x55dc69['define']('comments.maxCommentsWhenCollapsed',0x2),_0x55dc69['define']('comments.maxThreadTotalWeight',0x1f4),_0x55dc69['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x55dc69['define']('comments.CommentThreadView',Ut),_0x55dc69['define']('comments.CommentView',Yt),_0x55dc69['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xa88459=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2be2ec,_0x37aefd)=>this['_addCommentThread'](_0x37aefd)),this['on']('submitCommentThread',(_0x57a0d7,_0x54c531)=>this['_submitCommentThread'](_0x54c531)),this['on']('resolveCommentThread',(_0xfa7dc1,_0x190fd7)=>this['_resolveCommentThread'](_0x190fd7)),this['on']('resolveCommentThread',(_0x4cbe46,_0x310cc9)=>this['_updateActiveAnnotation'](_0x310cc9),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x6dcd69,_0x570659)=>this['_reopenCommentThread'](_0x570659)),this['on']('reopenCommentThread',(_0x4cdcbf,_0xcb25e1)=>this['_updateActiveAnnotation'](_0xcb25e1),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5520b6,_0x1fd1c6)=>this['_removeCommentThread'](_0x1fd1c6)),this['on']('updateCommentThread',(_0x20758b,_0x32ae77)=>this['_updateCommentThread'](_0x32ae77)),this['on']('updateCommentThread',(_0x5a3341,_0xc6c7b5)=>this['_updateActiveAnnotation'](_0xc6c7b5),{'priority':'lowest'}),this['on']('addComment',(_0x5a9078,_0x2595a3)=>this['_addComment'](_0x2595a3)),this['on']('updateComment',(_0xe37c6a,_0x22d8cd)=>this['_updateComment'](_0x22d8cd)),this['on']('removeComment',(_0x7206a7,_0x3ae3d8)=>this['_removeComment'](_0x3ae3d8)),this['on']('addComment',(_0x45dce5,{threadId:_0x2d63bf,isFromAdapter:_0x4a9d63})=>{if(_0x4a9d63)return;const _0x46e535=this['getCommentThread'](_0x2d63bf),_0x5e9530=_0x46e535&&this['_threadToController']['get'](_0x46e535);_0x5e9530&&_0x5e9530['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xa88459,'change:activeAnnotations',(_0x1d0eec,_0x163de1,_0x5ef0dc)=>{const _0x1818e9=Array['from'](_0x5ef0dc)['map'](_0x56cbcf=>this['_viewToController']['get'](_0x56cbcf['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1818e9?_0x1818e9['model']:null;});}set['adapter'](_0x310c86){if(this['_adapter'])throw new _0x3cac4c('commentsrepository-adapter-already-set');this['_adapter']=_0x310c86;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x66a0ac=ii,threadId:_0x32edf0=_0x238ccd(),comments:_0x27504e=[],unlinkedAt:_0x55bdd8=null,resolvedAt:_0x5395d1=null,resolvedBy:_0x32940e=null,target:_0x462dbd=null,context:_0x368ddf=null,attributes:_0x2cd8b6={},isResolvable:_0x1c8e08=!0x0,isSubmitted:_0x3ef4f6=!0x1,isFromAdapter:_0x329ace=!0x1}={}){return this['fire'](ai('addCommentThread',_0x66a0ac),{'channelId':_0x66a0ac,'threadId':_0x32edf0,'comments':_0x27504e,'unlinkedAt':_0x55bdd8,'resolvedAt':_0x5395d1,'resolvedBy':_0x32940e,'target':_0x462dbd,'context':_0x368ddf,'attributes':_0x2cd8b6,'isFromAdapter':_0x329ace,'isResolvable':_0x1c8e08,'isSubmitted':_0x3ef4f6}),this['getCommentThread'](_0x32edf0);}['openNewCommentThread']({channelId:_0x40a928=ii,threadId:_0x166f41=_0x238ccd(),target:_0x4198c2,context:_0x4609cf=null,isResolvable:_0x3acd46=!0x0}){if(this['_readOnlyChannels']['has'](_0x40a928)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4198c2)throw new _0x3cac4c('commentsrepository-missing-target');const _0x2fb341=this['addCommentThread']({'channelId':_0x40a928,'threadId':_0x166f41,'target':_0x4198c2,'context':_0x4609cf,'isResolvable':_0x3acd46});if(!_0x2fb341)return null;const _0x3b5fe8=this['_threadToController']['get'](_0x2fb341),_0x144e42=_0x3b5fe8['view']['commentThreadInputView']['commentInputView'],_0x2fb9d8=this['context']['plugins']['get'](ti),_0x5be878=_0x2fb9d8['getByInnerView'](_0x3b5fe8['view']);return _0x2fb9d8['activate'](_0x5be878),_0x144e42['once']('editorReady',()=>_0x144e42['focus']()),_0x2fb341;}['hasCommentThread'](_0x24a000){if('string'!=typeof _0x24a000)throw new _0x3cac4c('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x24a000);}['updateCommentThread']({channelId:_0x7885a0=ii,threadId:_0xaf3a38,context:_0x403c30,unlinkedAt:_0x235a9a,attributes:_0x1f3e6e,isFromAdapter:_0x2b3d75=!0x1}){return this['fire'](ai('updateCommentThread',_0x7885a0),{'channelId':_0x7885a0,'threadId':_0xaf3a38,'context':_0x403c30,'unlinkedAt':_0x235a9a,'attributes':_0x1f3e6e,'isFromAdapter':_0x2b3d75}),this['getCommentThread'](_0xaf3a38);}['getCommentThread'](_0x59c543){if('string'!=typeof _0x59c543)throw new _0x3cac4c('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x59c543);}['fetchCommentThread']({channelId:_0x41f944,threadId:_0x2329cb}={}){const _0x4d1a21=this['getCommentThread'](_0x2329cb);if(_0x4d1a21)return Promise['resolve'](_0x4d1a21);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3cac4c('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x41f944,'threadId':_0x2329cb})['then'](_0xc5006a=>this['hasCommentThread'](_0x2329cb)?this['getCommentThread'](_0x2329cb):_0xc5006a?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x41f944},_0xc5006a)):void 0x0)['catch'](_0x58e2e2=>{throw console['error'](_0x58e2e2),new _0x3cac4c('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x24b6aa,skipNotAttached:_0x4863c7=!0x1,skipEmpty:_0x1a7d6c=!0x1,toJSON:_0x56df03=!0x1}={}){const _0x4baba9=[];for(const _0x27d440 of this['_threads']['values']())_0x24b6aa&&_0x27d440['channelId']!==_0x24b6aa||_0x4863c7&&!_0x27d440['isAttached']||_0x1a7d6c&&0x0===_0x27d440['length']||_0x4baba9['push'](_0x27d440);return _0x56df03?_0x4baba9['map'](_0x31d571=>_0x31d571['toJSON']()):_0x4baba9;}['getAnnotationForCommentThread'](_0x186609){const _0x420877=this['_threadToController']['get'](_0x186609);return _0x420877&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x420877['view'])||null;}['getCommentThreadForAnnotation'](_0x22fd54){const _0x8ce293=this['_viewToController']['get'](_0x22fd54['innerView']);return _0x8ce293?_0x8ce293['model']:null;}['setActiveCommentThread'](_0x4817eb){const _0x296c84=this['context']['plugins']['get'](ti);if(!_0x4817eb)return void(this['activeCommentThread']&&_0x296c84['deactivateAll']());const _0x33ef6f=this['getCommentThread'](_0x4817eb);if(!_0x33ef6f)throw new _0x3cac4c('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4817eb});if(!this['_threadToController']['has'](_0x33ef6f))throw new _0x3cac4c('commentsrepository-active-not-attached',null,{'threadId':_0x4817eb});const _0x31cbe1=_0x296c84['getByInnerView'](this['_threadToController']['get'](_0x33ef6f)['view']);_0x296c84['activate'](_0x31cbe1);}['switchReadOnly'](_0xcc9836,_0x26e4f2){_0xcc9836?this['_readOnlyChannels']['add'](_0x26e4f2):this['_readOnlyChannels']['delete'](_0x26e4f2),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5c6618){return this['_readOnlyChannels']['has'](_0x5c6618)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x8840b4,_0x49d7ae){return new bt(_0x8840b4,_0x49d7ae);}['setPermissions'](_0x1d6479,_0x50e5b1=ii){this['_permissions']['set'](_0x50e5b1,_0x1d6479),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4d3bd5=ii){return this['_permissions']['has'](_0x4d3bd5)?this['_permissions']['get'](_0x4d3bd5):ei;}['_addCommentThread']({channelId:_0x155bcb,threadId:_0x52b503,comments:_0x5daba6,unlinkedAt:_0x227bc2,resolvedAt:_0x5bc910,resolvedBy:_0x1b842a,target:_0x615138,context:_0x24c73c,attributes:_0x1f2384,isFromAdapter:_0x3f2d88,isResolvable:_0x335396,isSubmitted:_0x471c0c}){if('string'!=typeof _0x52b503)throw new _0x3cac4c('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x52b503});if(this['hasCommentThread'](_0x52b503))throw new _0x3cac4c('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x52b503});const _0x23a5a8=new ri(this,{'channelId':_0x155bcb,'id':_0x52b503,'context':_0x24c73c,'attributes':_0x1f2384,'unlinkedAt':_0x227bc2,'resolvedAt':_0x5bc910,'resolvedBy':_0x1b842a?this['context']['plugins']['get'](_0x52cabf)['getUser'](_0x1b842a):null,'isResolvable':_0x335396,'isSubmitted':_0x471c0c||_0x3f2d88});this['_threads']['set'](_0x52b503,_0x23a5a8);for(const _0xfcf10a of _0x5daba6)_0x23a5a8['_add'](this['_createNewComment']({'threadId':_0x52b503,..._0xfcf10a}));return _0x615138&&_0x23a5a8['attachTo'](_0x615138),_0x3f2d88||!_0x23a5a8['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x155bcb,'threadId':_0x52b503});}['_submitCommentThread']({channelId:_0x294ef5,threadId:_0x98b4de}){if(!this['hasCommentThread'](_0x98b4de))throw new _0x3cac4c('commentsrepository-missing-comment-thread',this);const _0x34532e=this['getCommentThread'](_0x98b4de);if(_0x34532e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4ccbcf,comments:_0x58afc7,resolvedAt:_0x1dac28,resolvedBy:_0x5827d0,context:_0x488b76,attributes:_0x2329e0}=_0x34532e,_0x503067=this['context']['plugins']['get']('PendingActions'),_0x5922b4=_0x503067['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x294ef5,'threadId':_0x4ccbcf,'comments':_0x58afc7['map'](_0x2a285f=>_0x2a285f['toJSON']()),'resolvedAt':_0x1dac28,'resolvedBy':_0x5827d0?_0x5827d0['id']:_0x5827d0,'context':_0x488b76,'attributes':_0x2329e0})['then'](({comments:_0x545de5})=>{_0x503067['remove'](_0x5922b4);for(const _0x4d8f0c of _0x545de5)this['_updateComment']({'channelId':_0x294ef5,'threadId':_0x98b4de,'commentId':_0x4d8f0c['commentId'],'createdAt':_0x4d8f0c['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x242ba3=>{throw console['error'](_0x242ba3),new _0x3cac4c('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x32251d,target:_0x295f77}){const _0x256152=this['getCommentThread'](_0x32251d);if(!_0x256152)throw new _0x3cac4c('commentsrepository-attach-missing-comment-thread',this);const _0x2d3c70=this['context']['plugins']['get']('PendingActions'),_0x2eb2f8=this['context']['plugins']['get'](ti),_0x224a2d=this['_createCommentThreadView'](_0x256152),_0x4d54cf=new bt(_0x256152,_0x224a2d);let _0x1a66b9=null;_0x224a2d['on']('change:isDirty',(_0xa0941b,_0x392351,_0x151431)=>{_0x151431?_0x1a66b9=_0x2d3c70['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1a66b9&&(_0x2d3c70['remove'](_0x1a66b9),_0x1a66b9=null);}),this['_threadToController']['set'](_0x256152,_0x4d54cf),this['_viewToController']['set'](_0x224a2d,_0x4d54cf);const _0x4fd2a0=new qt(this['context']['locale'],_0x224a2d);_0x4fd2a0['bind']('length')['to'](_0x224a2d),_0x4fd2a0['bind']('isDirty')['to'](_0x224a2d,'isDirty',_0x224a2d,'length',(_0x1efb8e,_0x282b36)=>_0x1efb8e||!_0x282b36),_0x4fd2a0['bind']('isActive')['to'](_0x224a2d),_0x4fd2a0['type']='comment';const _0x133d73=new $t({'view':_0x4fd2a0,'target':_0x295f77,'type':'comment','isVisible':!_0x256152['archivedAt']&&!!('function'==typeof _0x295f77?_0x295f77():_0x295f77)});return _0x224a2d['on']('escape',()=>{_0x133d73['fire']('escape');}),this['_bindAnnotationToEditors'](_0x224a2d,_0x133d73),_0x2eb2f8['add'](_0x133d73),_0x133d73;}['_bindAnnotationToEditors'](_0x466ec4,_0x486559){this['listenTo'](_0x466ec4,'editorReady',(_0x2c49b1,_0x37e922)=>{const _0x4e7797=_0x37e922['ui']['view']['body']['bodyCollectionContainer'];_0x486559['focusableElements']['add'](_0x4e7797),this['context']instanceof _0x5df8d8&&this['context']['ui']['focusTracker']['add'](_0x4e7797);},{'priority':'highest'}),this['listenTo'](_0x466ec4,'editorDestroyed',(_0x20abfb,_0x4de655)=>{const _0x18b7c4=_0x4de655['ui']['view']['body']['bodyCollectionContainer'];_0x486559['focusableElements']['has'](_0x18b7c4)&&_0x486559['focusableElements']['remove'](_0x18b7c4),this['context']instanceof _0x5df8d8&&this['context']['ui']['focusTracker']['remove'](_0x18b7c4);});}['_unbindEditors'](_0x56cd4a){this['stopListening'](_0x56cd4a,'editorReady'),this['stopListening'](_0x56cd4a,'editorDestroyed');}['_createCommentThreadView'](_0x17ca91){const _0x1a0267=this['context']['plugins']['get'](_0x52cabf),{config:_0x193ddf,locale:_0x3fa70a}=this['context'],_0x280cbe=_0x5330d2(_0x193ddf['get']('locale'),_0x3fa70a);return new(0x0,(_0x193ddf['get']('comments'))['CommentThreadView'])(_0x3fa70a,_0x17ca91,_0x1a0267['me'],{'editorConfig':{..._0x193ddf['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x193ddf['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x193ddf['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x193ddf['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x193ddf['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x280cbe,'CommentView':_0x193ddf['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x11d275,channelId:_0x13c6ca,resolvedAt:_0x249e05,resolvedBy:_0x4c645d,isFromAdapter:_0x9e8e34}){if(!this['hasCommentThread'](_0x11d275))throw new _0x3cac4c('commentsrepository-missing-comment-thread',null,{'threadId':_0x11d275});const _0x85bace=this['getCommentThread'](_0x11d275);if(_0x85bace['isResolved'])throw new _0x3cac4c('commentsrepository-resolved-comment-thread',null,{'threadId':_0x11d275});const _0x57d693=this['context']['plugins']['get'](_0x52cabf);if(_0x85bace['resolvedBy']=_0x57d693['getUser'](_0x4c645d),_0x85bace['resolvedAt']=_0x249e05,_0x9e8e34||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x48ae0c=this['context']['plugins']['get']('PendingActions'),_0x15d96d=_0x48ae0c['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x13c6ca,'threadId':_0x11d275})['then'](({resolvedAt:_0x5951cc,resolvedBy:_0x37c61c})=>{_0x48ae0c['remove'](_0x15d96d),_0x85bace['resolvedBy']['id']!==_0x37c61c&&(_0x85bace['resolvedBy']=_0x57d693['getUser'](_0x37c61c)),_0x85bace['resolvedAt']=_0x5951cc;})['catch'](_0x43f8e3=>{throw console['error'](_0x43f8e3),new _0x3cac4c('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x553af3,channelId:_0x1e2fcb,isFromAdapter:_0x340b05}){if(!this['hasCommentThread'](_0x553af3))throw new _0x3cac4c('commentsrepository-missing-comment-thread',null,{'threadId':_0x553af3});const _0x3085b1=this['getCommentThread'](_0x553af3);if(!_0x3085b1['isResolved'])throw new _0x3cac4c('commentsrepository-reopen-comment-thread',null,{'threadId':_0x553af3});if(_0x3085b1['resolvedBy']=null,_0x3085b1['resolvedAt']=null,_0x340b05||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5ab6e2=this['context']['plugins']['get']('PendingActions'),_0xa6b996=_0x5ab6e2['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1e2fcb,'threadId':_0x553af3})['then'](()=>_0x5ab6e2['remove'](_0xa6b996))['catch'](_0x579a8f=>{throw console['error'](_0x579a8f),new _0x3cac4c('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4d54dc,isFromAdapter:_0x27aff8}){const _0x2ad2de=this['getCommentThread'](_0x4d54dc);if(!_0x2ad2de)throw new _0x3cac4c('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4d54dc),this['_threads']['delete'](_0x4d54dc),!_0x2ad2de['isSubmitted']||_0x27aff8||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x14f943=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2482e9}=_0x2ad2de,_0x1c65a8=_0x14f943['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2482e9,'threadId':_0x4d54dc})['then'](()=>_0x14f943['remove'](_0x1c65a8))['catch'](_0x3fedb2=>{throw console['error'](_0x3fedb2),new _0x3cac4c('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3fae5f,unlinkedAt:_0x132b38,context:_0x2f5d7e,attributes:_0x5b205e,isFromAdapter:_0x120e0a}){if('string'!=typeof _0x3fae5f)throw new _0x3cac4c('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3fae5f});if(!this['hasCommentThread'](_0x3fae5f))throw new _0x3cac4c('commentsrepository-missing-comment-thread',null,{'threadId':_0x3fae5f});const _0x397de3=this['getCommentThread'](_0x3fae5f);let _0x1fef01=!0x1;if(void 0x0!==_0x2f5d7e&&_0x397de3['context']!==_0x2f5d7e&&(_0x397de3['context']=_0x2f5d7e,_0x1fef01=!0x0),void 0x0!==_0x132b38&&_0x397de3['unlinkedAt']!==_0x132b38&&(_0x397de3['unlinkedAt']=_0x132b38,_0x1fef01=!0x0),_0x5b205e&&!_0x4074d8(_0x5b205e,_0x397de3['attributes'])&&(_0x397de3['attributes']=_0x5b205e,_0x1fef01=!0x0),!_0x1fef01)return Promise['resolve']();if(!_0x397de3['isSubmitted']||_0x120e0a||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1c4295=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2882a7}=_0x397de3,_0x40aa44=_0x1c4295['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2882a7,'threadId':_0x3fae5f,'context':_0x2f5d7e,'unlinkedAt':_0x132b38,'attributes':_0x5b205e})['then'](()=>_0x1c4295['remove'](_0x40aa44))['catch'](_0x13a20e=>{throw console['error'](_0x13a20e),new _0x3cac4c('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3e949b){const _0x563d7f=this['context']['plugins']['get'](ti),_0xaaf207=this['getCommentThread'](_0x3e949b);if(_0xaaf207['_isAttached']=!0x1,this['_threadToController']['has'](_0xaaf207)){const _0x2c9a70=this['_threadToController']['get'](_0xaaf207),_0x568452=_0x2c9a70['view'],_0xcc4cee=_0x563d7f['getByInnerView'](_0x568452);this['_threadToController']['delete'](_0xaaf207),this['_viewToController']['delete'](_0x568452),_0xcc4cee&&_0x563d7f['remove'](_0xcc4cee),_0x2c9a70['destroy'](),_0x568452['destroy']()['then'](()=>{this['_unbindEditors'](_0x568452);});}}['_updateActiveAnnotation']({threadId:_0x1974b5,resolvedAt:_0x53abbe,unlinkedAt:_0x93ada4}){const _0x5c3da6=!!_0x53abbe,_0x3bff41=this['context']['plugins']['get'](ti),_0x24e58d=this['getCommentThread'](_0x1974b5);if(this['_threadToController']['has'](_0x24e58d)){const _0x5f3148=this['_threadToController']['get'](_0x24e58d)['view'],_0x4d3fda=_0x3bff41['getByInnerView'](_0x5f3148);_0x4d3fda&&(_0x5c3da6&&_0x3bff41['_removeActiveAnnotation'](_0x4d3fda),_0x93ada4?_0x4d3fda['isVisible']=!0x1:_0x4d3fda['refreshVisibility']());}}['_getExternalAuthor'](_0x4ca12e){const _0x503f03=this['context']['plugins']['get'](_0x52cabf),_0x1cc334=_0x31a5a3('external:'+_0x4ca12e),_0x2257b0=_0x503f03['getUser'](_0x1cc334);return _0x2257b0||_0x503f03['addUser']({'id':_0x1cc334,'name':_0x4ca12e});}['_createNewComment']({threadId:_0xea8341,commentId:_0x3db99b=_0x238ccd(),content:_0x49f3fe,authorId:_0x22d53f,createdAt:_0x5b63db,attributes:_0x38e73c}){if('string'!=typeof _0x3db99b)throw new _0x3cac4c('commentsrepository-invalid-commentid');if('string'!=typeof _0x22d53f)throw new _0x3cac4c('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x49f3fe||!_0x49f3fe['trim']())throw new _0x3cac4c('commentsrepository-invalid-comment-content');const _0x577063=this['context']['plugins']['get'](_0x52cabf)['getUser'](_0x22d53f);if(!_0x577063)throw new _0x3cac4c('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x22d53f});let _0x56c096=null,_0xdfef55=_0x5b63db;return _0x38e73c?.['@external']&&(_0x56c096=this['_getExternalAuthor'](_0x38e73c['@external']['authorName']),_0xdfef55=new Date(_0x38e73c['@external']['createdAt'])),new hi(this,{'threadId':_0xea8341,'id':_0x3db99b,'author':_0x56c096||_0x577063,'creator':_0x577063,'content':_0x49f3fe,'createdAt':_0x5b63db,'authoredAt':_0xdfef55,'attributes':_0x38e73c});}['_addComment'](_0x23c204){let {threadId:_0x9add53,content:_0x49472a,attributes:_0x139f57,isFromAdapter:_0x5a6fd9}=_0x23c204;const _0xcd64be=this['getCommentThread'](_0x23c204['threadId']);if(!_0xcd64be)throw new _0x3cac4c('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1bd04e=this['_createNewComment'](_0x23c204),{id:_0x3847f6}=_0x1bd04e;if(_0xcd64be['_add'](_0x1bd04e),_0x5a6fd9||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0xcd64be['isSubmitted'])return Promise['resolve']();const _0x2da2a3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x191404}=_0xcd64be,_0x2a6f3f=_0x2da2a3['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x139f57||(_0x139f57={}),this['adapter']['addComment']({'channelId':_0x191404,'threadId':_0x9add53,'commentId':_0x3847f6,'content':_0x49472a,'attributes':_0x139f57})['then'](_0x16b1c0=>{_0x2da2a3['remove'](_0x2a6f3f),_0x16b1c0&&this['_updateComment']({'channelId':_0x191404,'threadId':_0x9add53,'commentId':_0x3847f6,'createdAt':_0x16b1c0['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x555fa0=>{throw console['error'](_0x555fa0),new _0x3cac4c('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x1cce74,commentId:_0x25f1cd,content:_0x1d49c8,createdAt:_0x580965,attributes:_0x416d21,isFromAdapter:_0x63da4e}){if(void 0x0!==_0x1d49c8&&('string'!=typeof _0x1d49c8||!_0x1d49c8['trim']()['length']))throw new _0x3cac4c('commentsrepository-update-comment-invalid-content');const _0x4f746b=this['getCommentThread'](_0x1cce74),_0x24e73d=_0x4f746b['getComment'](_0x25f1cd);if(!_0x24e73d)throw new _0x3cac4c('commentsrepository-update-missing-comment',this);let _0x517493=!0x1;if(_0x1d49c8&&_0x1d49c8!==_0x24e73d['content']&&(_0x24e73d['isEditable']||_0x63da4e)&&(_0x24e73d['content']=_0x1d49c8,_0x517493=!0x0),_0x580965&&_0x580965!==_0x24e73d['createdAt']&&(_0x24e73d['createdAt']=_0x580965,_0x24e73d['isExternal']||(_0x24e73d['authoredAt']=_0x580965),_0x517493=!0x0),_0x416d21&&!_0x4074d8(_0x416d21,_0x24e73d['attributes'])&&(_0x24e73d['attributes']=_0x416d21,_0x517493=!0x0),!_0x517493)return Promise['resolve']();if(_0x4f746b['fire']('commentUpdated'),_0x63da4e||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xf8e636=this['context']['plugins']['get']('PendingActions'),{channelId:_0x20c993}=this['getCommentThread'](_0x24e73d['threadId']),_0x4def98=_0xf8e636['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x20c993,'threadId':_0x1cce74,'commentId':_0x25f1cd,'content':_0x1d49c8,'attributes':_0x416d21})['then'](()=>_0xf8e636['remove'](_0x4def98))['catch'](_0x47f044=>{throw console['error'](_0x47f044),new _0x3cac4c('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xd53e10,commentId:_0x3d8041,isFromAdapter:_0x549663}){const _0x54c2a6=this['getCommentThread'](_0xd53e10),_0x435033=_0x54c2a6['getComment'](_0x3d8041);if(!_0x435033)throw new _0x3cac4c('commentsrepository-remove-missing-comment',this);if(_0x54c2a6['_remove'](_0x435033),_0x549663||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4b8032=this['context']['plugins']['get']('PendingActions'),{channelId:_0x443f51}=_0x54c2a6,_0x18ffbc=_0x4b8032['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x443f51,'threadId':_0xd53e10,'commentId':_0x3d8041})['then'](()=>_0x4b8032['remove'](_0x18ffbc))['catch'](_0x1f5d94=>{throw console['error'](_0x1f5d94),new _0x3cac4c('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x267814,_0x2b9dd2){super();const _0x7c0712=_0x2b9dd2['isResolvable'];this['channelId']=_0x2b9dd2['channelId'],this['id']=_0x2b9dd2['id'],this['comments']=new _0x5c875e(),this['_repository']=_0x267814,this['_isAttached']=!0x1,this['_isSubmitted']=_0x2b9dd2['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x267814,'_permissions',_0x267814,'_readOnlyChannels',()=>_0x267814['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x267814,'_permissions',()=>_0x267814['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x267814,'_permissions',()=>{const _0x1a9286=_0x267814['getPermissions'](this['channelId']);return _0x1a9286['write']||_0x1a9286['admin'];}),this['bind']('isResolvable')['to'](_0x267814,'_permissions',()=>_0x7c0712&&_0x267814['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x2b9dd2['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2af22e,_0x1f8f1b)=>_0x2af22e?_0x1f8f1b?_0x2af22e<_0x1f8f1b?_0x2af22e:_0x1f8f1b:_0x2af22e:_0x1f8f1b),this['set']('unlinkedAt',_0x2b9dd2['unlinkedAt']||null),this['set']('resolvedAt',_0x2b9dd2['resolvedAt']||null),this['set']('resolvedBy',_0x2b9dd2['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4581ae=>!!_0x4581ae),this['set']('attributes',_0x2b9dd2['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x219607,_0x6b808a)=>_0x219607+_0x6b808a['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x33c401,id:_0x81c7ca}=this;this['_repository']['fire'](ai('submitCommentThread',_0x33c401),{'channelId':_0x33c401,'threadId':_0x81c7ca});}['setUnlinkedAt'](_0x4b8209){this['_update']({'unlinkedAt':_0x4b8209});}['resolve']({resolvedAt:_0x3372f6=new Date(),resolvedBy:_0x27c2dd='',isFromAdapter:_0x52835f=!0x1}={}){const _0xaa8535=this['_repository']['context']['plugins']['get'](_0x52cabf)['me'],{channelId:_0x7370f8,id:_0x37ab8a}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x7370f8),{'channelId':_0x7370f8,'threadId':_0x37ab8a,'resolvedAt':_0x3372f6,'resolvedBy':_0x27c2dd||_0xaa8535['id'],'isFromAdapter':_0x52835f});}['reopen']({isFromAdapter:_0x4f381a=!0x1}={}){const {channelId:_0x3d2134,id:_0x4f8939}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x3d2134),{'channelId':_0x3d2134,'threadId':_0x4f8939,'isFromAdapter':_0x4f381a});}['setContext'](_0x2f3eb3){this['context']||this['_update']({'context':_0x2f3eb3});}['setAttribute'](_0x354897,_0xa92176){const _0x590adc=_0x2cf7e4(this['attributes']);_0x27c082(_0x590adc,_0x354897,_0xa92176),this['_update']({'attributes':_0x590adc});}['removeAttribute'](_0x2700b3){const _0xd07c39=_0x2cf7e4(this['attributes']);_0xeea9c4(_0xd07c39,_0x2700b3),this['_update']({'attributes':_0xd07c39});}['remove']({isFromAdapter:_0x4c193a=!0x1}={}){const {channelId:_0x350a60,id:_0x12451f}=this;this['_repository']['fire'](ai('removeCommentThread',_0x350a60),{'channelId':_0x350a60,'threadId':_0x12451f,'isFromAdapter':_0x4c193a});}['attachTo'](_0xf080de){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0xf080de});}['addComment'](_0x42ee67){const {channelId:_0x24b7fa,id:_0x2bf35d}=this;this['_repository']['fire'](ai('addComment',_0x24b7fa,_0x2bf35d),Object['assign']({'channelId':_0x24b7fa,'threadId':_0x2bf35d},_0x42ee67));}['getComment'](_0x539ece){if('string'!=typeof _0x539ece)throw new _0x3cac4c('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x539ece});return this['comments']['get'](_0x539ece);}['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'](_0x2ba58e=>_0x2ba58e['toJSON']()),'attributes':this['attributes']};}['_add'](_0x88a9fd){return this['listenTo'](_0x88a9fd,'change:authoredAt',()=>{const _0x73ff49=this['_findOptimalIndex'](_0x88a9fd),_0x71ddf9=this['comments'];_0x73ff49-0x1!=_0x71ddf9['getIndex'](_0x88a9fd)&&_0x73ff49+0x1!=_0x71ddf9['getIndex'](_0x88a9fd)&&(this['_remove'](_0x88a9fd),this['_add'](_0x88a9fd));}),this['comments']['add'](_0x88a9fd,this['_findOptimalIndex'](_0x88a9fd));}['_update'](_0x508232){const {channelId:_0x3d61b6,id:_0x46054d}=this;this['_repository']['fire'](ai('updateCommentThread',_0x3d61b6),{..._0x508232,'channelId':_0x3d61b6,'threadId':_0x46054d});}['_remove'](_0x208354){return this['stopListening'](_0x208354),_0x208354['destroy'](),this['comments']['remove'](_0x208354);}['_findOptimalIndex'](_0x332d83){const _0x56b98c=this['comments']['find'](_0x95aa7=>new Date(_0x95aa7['authoredAt'])['getTime']()>new Date(_0x332d83['authoredAt'])['getTime']());return _0x56b98c?this['comments']['getIndex'](_0x56b98c):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x3a914e,_0x298306){super();const _0x41eed8=_0x3a914e['context']['plugins']['get'](_0x52cabf)['me'],_0x1bb2a0=_0x3a914e['getCommentThread'](_0x298306['threadId']),_0x49d414=0x0===_0x1bb2a0['comments']['length'],_0x1461c5=_0x41eed8===_0x298306['author'];this['id']=_0x298306['id'],this['threadId']=_0x298306['threadId'],this['author']=_0x298306['author'],this['creator']=_0x298306['creator'],this['set']('content',_0x298306['content']),this['createdAt']=_0x298306['createdAt']||new Date(),this['set']('authoredAt',_0x298306['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1bb2a0,'resolvedAt'),this['set']('attributes',_0x298306['attributes']||{}),this['bind']('isEditable')['to'](_0x3a914e,'_permissions',()=>{const _0x4d3a7d=_0x3a914e['getPermissions'](_0x1bb2a0['channelId'])['write'],_0x18a0bc=_0x3a914e['getPermissions'](_0x1bb2a0['channelId'])['modifyAll'];return _0x1461c5&&_0x4d3a7d||!_0x1461c5&&_0x18a0bc;}),this['bind']('isRemovable')['to'](_0x1bb2a0,'isRemovable',_0x3a914e,'_permissions',_0x15d34c=>{const _0x274ae6=_0x3a914e['getPermissions'](_0x1bb2a0['channelId'])['write'],_0x1f1a1b=_0x3a914e['getPermissions'](_0x1bb2a0['channelId'])['modifyAll'];return _0x1461c5&&_0x274ae6||_0x15d34c&&_0x49d414||!_0x1461c5&&_0x1f1a1b&&!_0x49d414;}),this['bind']('isReadOnly')['to'](_0x1bb2a0,'isReadOnly'),this['_repository']=_0x3a914e;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x41cee6){const _0x3bf180=document['createElement']('div');return _0x3bf180['innerHTML']=_0x41cee6,_0x3bf180['textContent']['length'];}(this['content']),0xc8);}['update'](_0x35721e){const {threadId:_0x41ffb8,id:_0x1fcca3}=this;if(!this['_repository']['hasCommentThread'](_0x41ffb8))throw new _0x3cac4c('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x32b69b}=this['_repository']['getCommentThread'](_0x41ffb8);this['_repository']['fire'](ai('updateComment',_0x32b69b,_0x41ffb8),{'channelId':_0x32b69b,'threadId':_0x41ffb8,'commentId':_0x1fcca3,..._0x35721e});}['setAttribute'](_0x52b116,_0x243ddb){const _0x3bfb9b=_0x2cf7e4(this['attributes']);_0x27c082(_0x3bfb9b,_0x52b116,_0x243ddb),this['update']({'attributes':_0x3bfb9b});}['removeAttribute'](_0x1c1f34){const _0x2075b8=_0x2cf7e4(this['attributes']);_0xeea9c4(_0x2075b8,_0x1c1f34),this['update']({'attributes':_0x2075b8});}['remove'](_0x168d67={}){if(!_0x168d67['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x49fac8,id:_0x236afc}=this;if(!this['_repository']['hasCommentThread'](_0x49fac8))throw new _0x3cac4c('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4de300}=this['_repository']['getCommentThread'](_0x49fac8);this['_repository']['fire'](ai('removeComment',_0x4de300,_0x49fac8),{'channelId':_0x4de300,'threadId':_0x49fac8,'commentId':_0x236afc,..._0x168d67});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x474856,..._0x3e3004){for(const _0x2e671f of _0x3e3004)void 0x0!==_0x2e671f&&(_0x474856+=':'+String(_0x2e671f));return _0x474856;}var ci=class extends _0x54d867{constructor(_0x327cd1){super(_0x327cd1),this['set']('hasContent',!0x1);}['refresh'](){const _0x458cce=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x569f1b of _0x458cce['getRanges']())if(this['_hasContent'](_0x569f1b))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x357631=_0x238ccd(),ranges:_0x5c98d2,comment:_0x4062c2}={}){const _0x21de1e=this['editor']['model'],_0x59c2f6=_0x5c98d2??Array['from'](_0x21de1e['document']['selection']['getRanges']()),_0x55e6b8=[];for(const _0x528e4f of _0x59c2f6)this['_hasContent'](_0x528e4f)&&_0x55e6b8['push'](this['_trimToContent'](_0x528e4f));if(!_0x55e6b8['length'])throw new _0x3cac4c('addcommentthreadcommand-incorrect-ranges',null);_0x4062c2&&this['_createCommentThread'](_0x357631,_0x4062c2),this['_createMarkersFromRanges'](_0x357631,_0x55e6b8,!!_0x4062c2);}['_createMarkersFromRanges'](_0x20d658,_0x5e1a19,_0x4a5e32){this['editor']['model']['change'](_0x4095f8=>{for(const _0x3dd711 of _0x5e1a19){const _0x3fd115='comment:'+_0x20d658+':'+_0x238ccd()['substr'](0x1,0x5);_0x4095f8['addMarker'](_0x3fd115,{'range':_0x3dd711,'usingOperation':_0x4a5e32,'affectsData':_0x4a5e32});}});}['_createCommentThread'](_0x1e11cc,_0xba76f9){const _0x4168b8=this['editor']['plugins']['get']('CommentsRepository'),_0x54fd0b=this['editor']['config']['get']('collaboration.channelId'),_0x2a321a=this['editor']['plugins']['get']('Users')['me'];if(!_0x2a321a)throw new _0x3cac4c('addcommentthreadcommand-user-not-found',null);_0x4168b8['addCommentThread']({'threadId':_0x1e11cc,'channelId':_0x54fd0b,'comments':[{'authorId':_0x2a321a['id'],'content':_0xba76f9,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x5b5f8b){for(const _0x5eb0d6 of _0x5b5f8b['getItems']())if(this['_itemIsContent'](_0x5eb0d6))return!0x0;return!0x1;}['_itemIsContent'](_0x186775){return _0x186775['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x186775)&&!_0x186775['is']('element','tableCell');}['_trimToContent'](_0x5369f4){const _0x2ba389=_0xc3d75b=>!this['_itemIsContent'](_0xc3d75b['item']),_0xd3c9e8=_0x5369f4['start']['getLastMatchingPosition'](_0x2ba389),_0x18c985=_0x5369f4['end']['getLastMatchingPosition'](_0x2ba389,{'direction':'backward'});return this['editor']['model']['createRange'](_0xd3c9e8,_0x18c985);}},di=class extends _0x1228a1{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x37a415){super(_0x37a415),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xdb10bd=this['editor'],_0x728c56=_0xdb10bd['model']['document']['selection'],_0xc9e6ce=_0x55ca5d(()=>this['refreshSelectedViews'](),0xa);_0x728c56['on']('change:range',(_0x3b47e6,_0x3a58f3)=>{_0x3a58f3['directChange']&&(_0xc9e6ce['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xdb10bd['editing']['view']['document'],'change:isFocused',(_0xa1ba5c,_0x38f16b,_0x15585a)=>{_0x15585a&&_0xc9e6ce();}),this['listenTo'](_0xdb10bd['ui']['focusTracker'],'change:isFocused',(_0x46103a,_0x485e9d,_0x21c5c6)=>{_0x21c5c6||this['fire']('blur',{'isAnnotationTracked':_0x2bd8ca=>this['_editorAnnotationsData']['has'](_0x2bd8ca['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x313cab){if(this['_editorAnnotations']['has'](_0x313cab['view']))return;this['_editorAnnotations']['add'](_0x313cab['view']),this['editor']['ui']['focusTracker']['add'](_0x313cab['view']['element']);const _0x126298=this['editor']['plugins']['get'](ti);this['listenTo'](_0x126298['collection'],'remove',(_0x3b3a61,_0x31ffc7)=>{this['editor']['ui']['focusTracker']['remove'](_0x31ffc7['view']['element']),this['_editorAnnotations']['delete'](_0x31ffc7['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x15b513){if('function'!=typeof _0x15b513)throw new _0x3cac4c('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x15b513);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4c178f,annotations:_0x253d0c}){const _0x30bbd2=[],_0xefe185=this['editor']['model']['document']['selection'],_0x2eebd8=Array['from'](_0xefe185['getRanges']());for(const [_0x59f7a7,_0x75b967]of this['_editorAnnotationsData']){const _0xa12f7f=_0x1543db(_0x75b967),_0x31882f=_0x253d0c['getByInnerView'](_0x59f7a7);_0xa12f7f&&_0x31882f&&_0x30bbd2['push']({'annotation':_0x31882f,'range':_0xa12f7f});}function _0x1543db(_0x5741e3){for(const _0x40d715 of _0x5741e3)for(const _0x59e98f of _0x2eebd8)if(_0x40d715['containsRange'](_0x59e98f,!_0xefe185['isCollapsed']))return _0x40d715;return null;}return _0x30bbd2['sort']((_0x56e81d,_0x1fefcc)=>{const _0x1f188a=_0x56e81d['range'],_0x51fb38=_0x1fefcc['range'];if(!_0x1f188a['isEqual'](_0x51fb38)){if(_0x1f188a['containsRange'](_0x51fb38,!0x0))return 0x1;if(_0x51fb38['containsRange'](_0x1f188a,!0x0))return-0x1;}return _0x56e81d['annotation']==_0x4c178f?-0x1:_0x1fefcc['annotation']==_0x4c178f?0x1:0x0;})['map'](_0x3aba41=>_0x3aba41['annotation']);}get['_editorAnnotationsData'](){const _0x4a14ad=new Map();for(const _0x389bfe of Array['from'](this['_dataCollectors']))for(const [_0x3fc11d,_0x867175]of _0x389bfe())_0x4a14ad['set'](_0x3fc11d,_0x867175);return _0x4a14ad;}},li=class extends _0x1228a1{['afterInit'](){const _0x22cac3=this['editor'];_0x22cac3['plugins']['has']('RestrictedEditingModeEditing')&&_0x22cac3['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x1228a1{constructor(_0x21f2e3){super(_0x21f2e3),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x45aa8f=this['editor'],_0x3ea765=_0x45aa8f['commands']['get']('importWord'),_0x1dccb0=_0x45aa8f['plugins']['get'](_0x52cabf);_0x3ea765&&(_0x3ea765['on']('execute',(_0xfac127,[,_0x3ce540])=>{_0x3ce540['collaboration_features']={'comments':!0x0,'user_id':_0x1dccb0['me']['id']};},{'priority':_0x5f4140['high']+0xa}),this['listenTo'](_0x3ea765,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x13a86c,_0x5aae2c){const {comment_threads:_0x405727}=_0x5aae2c;_0x405727&&_0x405727['forEach'](({thread_id:_0x36857f,comments:_0x398cd1,is_resolved:_0x42967b})=>{const _0x389d51=new Date(),_0x4d71ac=_0x398cd1['map'](({author:_0x406e85,content:_0x520b76,created_at:_0x35e3e1})=>({'content':_0x520b76,'authorId':this['editor']['plugins']['get'](_0x52cabf)['me']['id'],'createdAt':_0x389d51,'attributes':{'@external':{'authorName':_0x406e85,'createdAt':_0x35e3e1?new Date(_0x35e3e1):new Date(),'source':'importWord'}}})),_0x585e39=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x585e39,'threadId':_0x36857f,'comments':_0x4d71ac,'resolvedAt':_0x42967b?_0x389d51:null});});}},ui=class extends _0x1228a1{constructor(_0x2bf838){super(_0x2bf838),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x535c4e=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x535c4e,'contentInsertion',(_0x59d704,_0x44ac78)=>this['_removeMarkersWithoutThreads'](_0x44ac78['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4a1f57){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4a1f57;const _0x3d426d=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1413f6 of _0x4a1f57['keys']()){const [_0x39bcd6,_0x4bc816]=_0x1413f6['split'](':');'comment'!=_0x39bcd6||_0x3d426d['hasCommentThread'](_0x4bc816)||_0x4a1f57['delete'](_0x1413f6);}return _0x4a1f57;}['_registerMarkerInClipboardPipeline'](){const _0x4d6941=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4537e1=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4537e1&&_0x4d6941['_registerMarkerToCopy']('comment',_0x4537e1);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x370159){switch(_0x370159){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x315ea8){const _0x4d1f06=_0x315ea8['split'](':');return{'group':_0x4d1f06[0x0],'id':_0x4d1f06[0x1],'part':_0x4d1f06[0x2]};}var pi=class extends _0x1228a1{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x45514a,_0x53e316)=>{if(!_0x53e316['options']['showCommentHighlights'])return null;if(_0x53e316['options']['ignoreResolvedComments']){const {id:_0x37fde2}=fi(_0x45514a['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x37fde2)?.['isResolved']&&_0x45514a['item'])return _0x53e316['consumable']['consume'](_0x45514a['item'],'addMarker:'+_0x45514a['markerName']),_0x53e316['consumable']['consume'](_0x45514a['item'],'removeMarker:'+_0x45514a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5b2941=>{_0x5b2941['on']('addMarker:comment',(_0x350a2c,_0x4bca31,_0xf17947)=>{if(!_0xf17947['options']['showCommentHighlights'])return;const _0x49d1ec=_0x4bca31['item'];if(!_0x49d1ec)return;const _0x489c43=_0xf17947['mapper']['toViewElement'](_0x49d1ec);this['editor']['model']['schema']['isObject'](_0x49d1ec)&&_0x489c43&&!_0x489c43['getCustomProperty']('widget')&&_0x489c43['is']('containerElement')&&Ct(_0x489c43,_0xf17947['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4a49de,{writer:_0x154af5,options:_0x490fad})=>{if(!_0x490fad['showCommentHighlights'])return null;const _0x381fde=_0x154af5['createContainerElement']('div'),_0x2e805f=_0x154af5['createEmptyElement']('hr');return _0x154af5['addClass']('ck-horizontal-line',_0x381fde),_0x154af5['insert'](_0x154af5['createPositionAt'](_0x381fde,0x0),_0x2e805f),_0x381fde;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5c8041,{writer:_0x5f4cdd,options:_0x3403da})=>{if(!_0x3403da['showCommentHighlights'])return null;const _0x14d0dc=_0x5f4cdd['createContainerElement']('span'),_0x2e04a4=_0x5f4cdd['createEmptyElement']('img');return _0x5f4cdd['addClass']('image-inline',_0x14d0dc),_0x5f4cdd['insert'](_0x5f4cdd['createPositionAt'](_0x14d0dc,0x0),_0x2e04a4),_0x14d0dc;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1d7057,{writer:_0x206af7,options:_0x34199b})=>{if(_0x34199b['showCommentHighlights'])return _0x206af7['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x5729f1,_0x21fa75,_0x32712c)=>{_0x32712c['options']['showCommentHighlights']&&_0x5729f1['stop']();},{'priority':'high'});}},wi=class extends _0x1228a1{static get['requires'](){return[oi,di,_0x52cabf,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x371699){super(_0x371699),this['set']('isThreadsLoadingPaused',!0x0),_0x371699['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x167f9a,_0x5e6042,_0xeb71e8,_0x75479f)=>{const _0x47a131=_0x371699['plugins']['get'](oi),_0x298a67=_0xeb71e8?fi(_0xeb71e8)['id']:null;_0x371699['model']['change'](()=>{if(_0x298a67){const _0x18318b=this['getAllMarkersForId'](_0x298a67);for(const _0x459364 of _0x18318b)_0x371699['editing']['reconvertMarker'](_0x459364);}if(_0x75479f){const {id:_0x5007f1}=fi(_0x75479f),_0x430d4f=_0x47a131['getCommentThread'](_0x5007f1);if(_0x430d4f&&_0x430d4f['unlinkedAt'])return;if(_0x430d4f&&!_0x430d4f['isAttached'])return;const _0x426245=this['getAllMarkersForId'](_0x5007f1);for(const _0x2550d7 of _0x426245)_0x371699['editing']['reconvertMarker'](_0x2550d7);}}),_0x298a67&&this['scrollToThreadMarker'](_0x298a67);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x165492=this['editor'],_0x3f83db=_0x165492['plugins']['get'](oi),_0x4ae279=_0x165492['config']['get']('collaboration.channelId'),_0x2b1e18=_0x3f83db['getCommentThreads']()['filter'](_0x4e6b2b=>_0x4e6b2b['channelId']!==_0x4ae279);_0x165492['commands']['add']('addCommentThread',new ci(_0x165492)),this['listenTo'](_0x165492,'change:isReadOnly',(_0x44da99,_0x40c44d,_0xcd71cb)=>{_0x3f83db['switchReadOnly'](_0xcd71cb,_0x165492['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3f83db,gi('addCommentThread',_0x4ae279),(_0x4d927e,{threadId:_0x5d40cc})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x5d40cc)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5d40cc);}),this['listenTo'](_0x3f83db,gi('removeCommentThread',_0x4ae279),(_0x437499,{threadId:_0x50d5f3})=>{_0x165492['model']['enqueueChange']({'isUndoable':!0x1},_0x2378ea=>{const _0x4abe1b=this['getAllMarkersForId'](_0x50d5f3);for(const _0x18c3b2 of _0x4abe1b)_0x2378ea['removeMarker'](_0x18c3b2);});}),this['listenTo'](_0x3f83db,gi('resolveCommentThread',_0x4ae279),(_0x26fe4a,{threadId:_0x267a70})=>{this['_reconvertMarkers'](_0x267a70);const _0x5c7e19=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x5c7e19['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x267a70)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3f83db,gi('reopenCommentThread',_0x4ae279),(_0x7fc1b0,{threadId:_0x5a34b3})=>{this['_reconvertMarkers'](_0x5a34b3);},{'priority':'low'}),this['listenTo'](_0x3f83db,gi('addComment',_0x4ae279),(_0x14b8b3,{threadId:_0x49819c,isFromAdapter:_0x13c3e9})=>{const _0x5c0633=this['getAllMarkersForId'](_0x49819c);!_0x13c3e9&&0x0!=_0x5c0633['length']&&_0x3f83db['hasCommentThread'](_0x49819c)&&0x1===_0x3f83db['getCommentThread'](_0x49819c)['length']&&_0x165492['model']['enqueueChange']({'isUndoable':!0x1},_0x2a904e=>{for(const _0x12e68a of _0x5c0633)_0x2a904e['updateMarker'](_0x12e68a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x2b1e18);}['afterInit'](){!async function(_0x24f1a7){const _0x55a86d='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x1efb72=0x78e70,_0x4c282d=window['Date']['now'](),_0x5e3fcc=_0x24f1a7['editor'],_0x325639=new window['Promise'](_0x3afe8a=>{_0x5e3fcc['once']('ready',_0x3afe8a);}),_0x32385b={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x40876b=_0x5e3fcc['config']['get']('licenseKey');async function _0x1e73e3(){let _0x20d36a,_0x2b5271=null,_0x35107a=null;try{return'GPL'==_0x40876b?'NotAllowed':(_0x20d36a=_0x29f0b0(),_0x20d36a?(_0x20d36a['usageEndpoint']&&(_0x35107a=_0x4a4572(_0x20d36a['usageEndpoint'],_0x20d36a['jti'])),await _0x4457ad()?_0x1f382f()?_0x321672()?'Expired':_0x37ddb8()?('evaluation'==_0x20d36a['licenseType']&&(_0x2b5271=_0x4c9b94('EvaluationLimit')),await _0x41e65e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x321672(){const _0x3409f6=['evaluation','trial']['includes'](_0x20d36a['licenseType'])?_0x4c282d/0x3e8:0xe10*_0x1efb72;return _0x20d36a['exp']<_0x3409f6;}function _0x1f382f(){const _0x2fa294=_0x20d36a['features'];if(!_0x2fa294)return!0x1;if(_0x2fa294['includes']('*'))return!0x0;if(_0x2fa294['includes']('CMT'))return!0x0;if(_0x2fa294['includes']('TRILIUM')&&_0x2d0985())return!0x0;if(_0x2fa294['includes']('RCMT')){if(_0x1b6ba7())return!0x0;if(_0xf40fc1()||_0x3fef77())return!0x0;}return!0x1;}function _0x37ddb8(){const _0x3ff0b5=_0x20d36a['licensedHosts'];if(!_0x3ff0b5||0x0==_0x3ff0b5['length'])return!0x0;const {hostname:_0x54a62e}=new URL(window['location']['href']);if(_0x3ff0b5['includes'](_0x54a62e))return!0x0;const _0x4d3758=_0x54a62e['split']('.');return _0x3ff0b5['filter'](_0x247081=>_0x247081['includes']('*'))['map'](_0xa47028=>_0xa47028['split']('.'))['filter'](_0x33f617=>_0x33f617['length']<=_0x4d3758['length'])['map'](_0x16f77f=>Array(_0x4d3758['length']-_0x16f77f['length'])['fill']('*'===_0x16f77f[0x0]?'*':'')['concat'](_0x16f77f))['some'](_0x45b9b4=>_0x4d3758['every']((_0x4cd335,_0x14d516)=>_0x45b9b4[_0x14d516]===_0x4cd335||'*'===_0x45b9b4[_0x14d516]));}function _0x41e65e(){return _0x2b5271&&_0x35107a?new window['Promise']((_0x370e6d,_0xa2d898)=>{_0x2b5271['then'](_0x370e6d,_0xa2d898),_0x35107a['then'](_0x1076fb=>{'Valid'!=_0x1076fb&&_0x370e6d(_0x1076fb);},_0xa2d898);}):_0x2b5271||_0x35107a||'Valid';}}function _0x4a4572(_0x596fe3,_0x44fa4a){return new window['Promise'](_0x43c832=>{if(_0x590f60())return _0x43c832('Valid');_0x350d57(),_0x5e3fcc['decorate']('_sendUsageRequest');let _0x3c174f=!0x1;const _0x47b47d=_0x238ccd();function _0x52d800(_0x496f8e){return!!_0x496f8e&&('object'==typeof _0x496f8e||'function'==typeof _0x496f8e)&&'function'==typeof _0x496f8e['then']&&'function'==typeof _0x496f8e['catch'];}function _0x1d474f(_0x5e8e93){_0x3e2ccf(_0x5e8e93)['then'](_0x5d6b67=>_0x5d6b67&&'ok'==_0x5d6b67['status']?_0xb427d1(_0x52248a(_0x47b47d+_0x44fa4a))!=_0x5d6b67['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x333c0e=>(_0x11350c(),_0x333c0e),()=>{const _0x19b00d=_0x972383();return null==_0x19b00d?(_0x11350c(),'Valid'):_0x4c282d-_0x19b00d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x43c832)['catch'](()=>{_0x43c832('UsageLimit');});const _0x24e02a=0x36ee80;function _0x11350c(){const _0x446d11='llct-'+_0xb427d1(_0x52248a(_0x596fe3)),_0x118207=_0x32dd74(_0xb427d1(window['Math']['ceil'](_0x4c282d/_0x24e02a)));window['localStorage']['setItem'](_0x446d11,_0x118207);}function _0x972383(){const _0x9c3e61='llct-'+_0xb427d1(_0x52248a(_0x596fe3)),_0x1cfbe4=window['localStorage']['getItem'](_0x9c3e61);return _0x1cfbe4?window['parseInt'](_0x32dd74(_0x1cfbe4),0x10)*_0x24e02a:null;}function _0x3e2ccf(_0x186052){return new window['Promise']((_0x3c9dea,_0x2396eb)=>{_0x186052['then'](_0x3c9dea,_0x2396eb),window['setTimeout'](_0x2396eb,0x1d4c0);});}}_0x5e3fcc['on']('_sendUsageRequest',(_0x367c4c,_0xd29ebd)=>{if(_0xd29ebd[0x0]!=_0x596fe3)return _0x43c832('UsageLimit');_0xd29ebd[0x1]={..._0xd29ebd[0x1],'requestId':_0x47b47d};},{'priority':'high'}),_0x5e3fcc['on']('_sendUsageRequest',_0x297b90=>{_0x52d800(_0x297b90['return'])&&(_0x3c174f=!0x0,_0x1d474f(_0x297b90['return']));},{'priority':'low'}),_0x325639['then'](()=>{_0x3c174f||_0x43c832('UsageLimit');});});function _0x590f60(){return'auto'==_0x5e3fcc['editing']['view']['_overlayModeHint'];}function _0x350d57(){_0x5e3fcc['editing']['view']['_overlayModeHint']='auto';}}function _0x4c9b94(_0x34b4ee){const _0x27b3cd=[new window['Promise'](_0xe66fbe=>setTimeout(_0xe66fbe,0x93ecc)),_0x325639['then'](()=>new window['Promise'](_0x5dc772=>{let _0x425a9f=0x0;_0x5e3fcc['model']['on']('applyOperation',(_0x48aaf9,_0x1ebf41)=>{_0x1ebf41[0x0]['isDocumentOperation']&&_0x425a9f++,0x5e8==_0x425a9f&&(_0x5dc772(),_0x48aaf9['off']());});}))];return window['Promise']['race'](_0x27b3cd)['then'](()=>_0x34b4ee);}async function _0x5d0c7f(){await _0x325639,_0x5e3fcc['model']['change']=_0xadfb26,_0x5e3fcc['model']['enqueueChange']=_0xadfb26,_0x5e3fcc['enableReadOnlyMode']('model');}function _0x2d0985(){return window['glob']&&window['glob']['triliumVersion'];}function _0x1b6ba7(){return _0x39818f('WebSocketGateway')&&'connected'==_0x84d1bc('WebSocketGateway')['state'];}function _0xf40fc1(){return _0x39818f('RevisionViewerIntegration');}function _0x3fef77(){return _0x39818f('TrackChangesDataGetter');}function _0x501230(_0x39fa72){const _0x349f12=_0x4a9403();_0x5e3fcc[_0x349f12]='commentsLicenseKey'+_0x39fa72,'Valid'!=_0x39fa72&&_0x5d0c7f();}function _0x4a9403(){const _0x5ba4b6=window['String'](window['performance']['now']())['replace']('.','');let _0x518b5c='K';for(let _0x4bb710=0x0;_0x4bb710<_0x5ba4b6['length'];_0x4bb710+=0x2){let _0x14a55d=window['parseInt'](_0x5ba4b6['substring'](_0x4bb710,_0x4bb710+0x2));_0x14a55d>=0x3e&&(_0x14a55d-=0x3e),_0x518b5c+=_0x55a86d[_0x14a55d];}return _0x518b5c;}function _0x29f0b0(){const _0x2ed3c6=_0x40876b['split']('.');if(0x3!=_0x2ed3c6['length'])return null;return _0x1378f8(_0x2ed3c6[0x1]);function _0x1378f8(_0x44ca05){const _0xf5906f=_0x3768e1(_0x44ca05);return _0xf5906f&&_0x1cc813()?_0xf5906f:null;function _0x1cc813(){const _0x4c17f8=_0xf5906f['jti'],_0x2f965c=window['parseInt'](_0x4c17f8['substring'](_0x4c17f8['length']-0x8),0x10),_0x341af0={..._0xf5906f,'jti':_0x4c17f8['substring'](0x0,_0x4c17f8['length']-0x8)};return delete _0x341af0['vc'],_0x52248a(_0x341af0)==_0x2f965c;}}}async function _0x4457ad(){let _0x452bb5=!0x0;try{const [_0x7747c6,_0x15285a,_0x52df0d]=_0x40876b['split']('.');return _0x246304(_0x7747c6),await _0x325f3c(_0x7747c6,_0x15285a,_0x52df0d),_0x452bb5;}catch{return!0x1;}function _0x246304(_0xe1b046){const _0x2bf24e=_0x3768e1(_0xe1b046);_0x2bf24e&&'ES256'==_0x2bf24e['alg']||(_0x452bb5=!0x1);}async function _0x325f3c(_0x122e4a,_0x41efef,_0x1ffc92){const _0x24b7df=window['Uint8Array']['from'](_0x49f244(_0x1ffc92),_0x1259d9=>_0x1259d9['charCodeAt'](0x0)),_0x143199=new window['TextEncoder']()['encode'](_0x122e4a+'.'+_0x41efef),_0x4c83bd=window['crypto']['subtle'];if(!_0x4c83bd)return;const _0x580eb4=await _0x4c83bd['importKey']('jwk',_0x32385b,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4c83bd['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x580eb4,_0x24b7df,_0x143199)||(_0x452bb5=!0x1);}}function _0x3768e1(_0x5db959){return _0x5db959['startsWith']('ey')?JSON['parse'](_0x49f244(_0x5db959)):null;}function _0x49f244(_0x47d56a){return window['atob'](_0x47d56a['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x52248a(_0x545105){let _0x1fd645=0x1505;function _0x1d11ed(_0x34ab6a){for(let _0x4a501c=0x0;_0x4a501c<_0x34ab6a['length'];_0x4a501c++){const _0x5bdfe1=_0x34ab6a['charCodeAt'](_0x4a501c);_0x1fd645=(_0x1fd645<<0x5)+_0x1fd645+_0x5bdfe1,_0x1fd645&=_0x1fd645;}}function _0x444302(_0x7828b2){Array['isArray'](_0x7828b2)?_0x7828b2['forEach'](_0x444302):_0x7828b2&&'object'==typeof _0x7828b2?Object['entries'](_0x7828b2)['sort']()['forEach'](([_0x415c19,_0x282f73])=>{_0x1d11ed(_0x415c19),_0x444302(_0x282f73);}):_0x1d11ed(window['String'](_0x7828b2));}return _0x444302(_0x545105),_0x1fd645>>>0x0;}function _0xb427d1(_0x13095e){return _0x13095e['toString'](0x10)['padStart'](0x8,'0');}function _0x32dd74(_0x264b93){return _0x264b93['split']('')['reverse']()['join']('');}function _0x39818f(_0xd8091){return _0x5e3fcc['plugins']['has'](_0xd8091);}function _0x84d1bc(_0x162414){return _0x5e3fcc['plugins']['get'](_0x162414);}function _0xadfb26(){}_0x501230(await _0x1e73e3());}(this);}['destroy'](){const _0x702988=this['editor']['plugins']['get'](oi),_0xab9b1c=this['editor']['config']['get']('collaboration.channelId');for(const _0x4e615e of _0x702988['getCommentThreads']({'channelId':_0xab9b1c}))_0x702988['_detachCommentThread'](_0x4e615e['id']),_0x702988['_threads']['delete'](_0x4e615e['id']);super['destroy']();}['hasMarkerForId'](_0x5cb301){return this['getAllMarkersForId'](_0x5cb301)['length']>0x0;}['getAllMarkersForId'](_0x40b7bb){const _0x3234a5=[];for(const _0x1e85b4 of this['editor']['model']['markers'])_0x1e85b4['name']['startsWith']('comment:'+_0x40b7bb)&&_0x3234a5['push'](_0x1e85b4);return _0x3234a5;}['scrollToThreadMarker'](_0x5e834e){setTimeout(()=>{const _0x52b6cd=this['_getTargetForId'](_0x5e834e);_0x52b6cd&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x5e834e&&_0x5199({'target':_0x52b6cd[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xb3e5d5){this['editor']['model']['change'](()=>{for(const _0x49de76 of this['getAllMarkersForId'](_0xb3e5d5))this['editor']['editing']['reconvertMarker'](_0x49de76);});}['_attachArchivedThread'](_0x40dc88){const _0x30dded=this['editor']['plugins']['get'](oi),_0x4cde7e=this['editor']['plugins']['get'](di),_0x4e49a3=_0x30dded['getCommentThread'](_0x40dc88);if(!_0x4e49a3['isAttached']){const _0x5651ca=_0x4e49a3['attachTo'](()=>this['_getTargetForId'](_0x4e49a3['id']));_0x4cde7e['registerAnnotation'](_0x5651ca),_0x4e49a3['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xc49471=this['editor'],_0x14d19c=_0xc49471['plugins']['get'](_0x52cabf);_0xc49471['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d098b,_0xdbfbc4)=>{const {id:_0xbc5953}=fi(_0x5d098b['markerName']),_0x3ad435=_0xc49471['plugins']['get'](oi)['getCommentThread'](_0xbc5953),_0x4feee2=this['activeMarker']&&fi(this['activeMarker'])['id']===_0xbc5953;let _0x38de86;if(_0x3ad435&&_0x3ad435['isResolved']&&!_0x4feee2&&_0x5d098b['item'])return _0xdbfbc4['consumable']['consume'](_0x5d098b['item'],'addMarker:'+_0x5d098b['markerName']),_0xdbfbc4['consumable']['consume'](_0x5d098b['item'],'removeMarker:'+_0x5d098b['markerName']),null;const _0x298ee7=['ck-comment-marker'];return _0x4feee2&&_0x298ee7['push']('ck-comment-marker--active'),_0x38de86=_0x3ad435?.['length']?_0x3ad435['comments']['first']['author']['id']:_0x14d19c['me']['id'],{'classes':_0x298ee7,'attributes':{'data-comment':_0xbc5953,'data-author-id':_0x38de86}};}}),_0xc49471['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5606a1,{options:_0x379a40})=>{if(_0x379a40['showCommentHighlights'])return null;const _0x27aa27=_0xc49471['plugins']['get'](oi),_0x79c324=_0xc49471['model']['markers']['get'](_0x5606a1),{id:_0x46024e,part:_0x139264}=fi(_0x5606a1);return _0x79c324&&!_0x79c324['affectsData']||_0x379a40['ignoreResolvedComments']&&_0x27aa27['getCommentThread'](_0x46024e)?.['isResolved']?null:{'group':'comment','name':_0x139264?_0x46024e+':'+_0x139264:_0x46024e};}}),_0xc49471['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0xbf9fe2,{writer:_0x2c7818})=>_0x2c7818['createElement']('$marker',{'data-name':'comment:'+_0xbf9fe2['getAttribute']('id')})}),_0xc49471['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3c8d47=this['editor'],_0x331bce=_0x3c8d47['plugins']['get'](oi),_0x4d236e=new Set(),_0x2e1a26=new Set();_0x3c8d47['model']['document']['registerPostFixer'](_0x277a9d=>{let _0x226120=!0x1;for(const {name:_0x612ebe,data:_0x4edb5c}of _0x3c8d47['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2cc378,id:_0x2edd62}=fi(_0x612ebe);let _0x3824f0=_0x4edb5c['newRange'];if('comment'!==_0x2cc378||!_0x3824f0)continue;const _0x57fbc9='$graveyard'===_0x3824f0['root']['rootName'];_0x57fbc9||(_0x3824f0=_i(_0x3824f0,_0x3c8d47['model']),!_0x3824f0||_0x3824f0['isCollapsed']||!_0x4edb5c['newRange']||_0x3824f0['isEqual'](_0x4edb5c['newRange']))?_0x3c8d47['model']['hasContent'](_0x3824f0)&&!_0x57fbc9?this['isThreadsLoadingPaused']?_0x4d236e['add'](_0x612ebe):this['_handleThreadMarker'](_0x612ebe,_0x2edd62):(_0x2e1a26['add'](_0x612ebe),_0x4d236e['delete'](_0x612ebe),_0x277a9d['removeMarker'](_0x612ebe),_0x226120=!0x0):(_0x277a9d['updateMarker'](_0x612ebe,{'range':_0x3824f0}),_0x226120=!0x0);}return _0x226120;}),this['on']('change:isThreadsLoadingPaused',(_0x1d48b2,_0x23ec90,_0x39cdf3)=>{if(!_0x39cdf3&&_0x4d236e['size'])for(const _0x6e20aa of _0x4d236e){const {id:_0x17951a}=fi(_0x6e20aa);_0x4d236e['delete'](_0x6e20aa),_0x3c8d47['model']['markers']['get'](_0x6e20aa)&&this['_handleThreadMarker'](_0x6e20aa,_0x17951a);}}),this['listenTo'](_0x3c8d47['model']['document'],'change',()=>{for(const {name:_0x2d8c4f,data:{newRange:_0x5edeca}}of _0x3c8d47['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5d015b,id:_0x20bf96}=fi(_0x2d8c4f);if('comment'!==_0x5d015b)continue;const _0x55fe8a=_0x331bce['getCommentThread'](_0x20bf96),_0x15391c=this['hasMarkerForId'](_0x20bf96);_0x55fe8a&&(!_0x55fe8a['_hasTargetInContent']&&_0x5edeca&&_0x3c8d47['editing']['view']['once']('render',()=>{const _0x3f0b27=_0x3c8d47['plugins']['get'](ti),_0x5d6916=_0x331bce['_threadToController']['get'](_0x55fe8a)['view'];_0x3f0b27['getByInnerView'](_0x5d6916)['refreshVisibility']();},{'priority':'low'}),_0x55fe8a['_hasTargetInContent']=_0x15391c||!!_0x5edeca),_0x5edeca||(_0x2e1a26['add'](_0x2d8c4f),_0x4d236e['delete'](_0x2d8c4f));}for(const _0x192496 of _0x2e1a26){const {id:_0x138a67}=fi(_0x192496),_0x4b0a4b=_0x331bce['getCommentThread'](_0x138a67);if(_0x4d236e['delete'](_0x192496),!_0x4b0a4b)continue;const _0x129e6d=this['hasMarkerForId'](_0x138a67);_0x129e6d||_0x4b0a4b['isSubmitted']?_0x129e6d||_0x4b0a4b['unlinkedAt']||_0x4b0a4b['setUnlinkedAt'](new Date()):_0x4b0a4b['remove']();}_0x2e1a26['clear']();});}['_handleInitialThreads'](_0x5318c7){_0x5318c7['forEach'](_0x49e058=>{_0x49e058['unlinkedAt']&&this['_attachArchivedThread'](_0x49e058['id']);});}['_getTargetForId'](_0x1d6f53){const _0x41a302=this['editor'],_0x5b2f17=this['getAllMarkersForId'](_0x1d6f53);return _0x30db39(_0x41a302['editing'],_0x5b2f17);}['_getTextContext'](_0x589321){const _0x1c26eb=this['getAllMarkersForId'](_0x589321);let _0x360978='',_0x4d5341=!0x1;for(const _0x2095b2 of _0x1c26eb){const _0x577a33=_0x2095b2['getRange']();for(const _0x2f3ccc of Array['from'](_0x577a33['getItems']()))_0x2f3ccc['is']('$textProxy')?(_0x360978&&_0x4d5341&&(_0x360978+='\x20',_0x4d5341=!0x1),_0x360978+=_0x2f3ccc['data']):_0x4d5341=!0x0;_0x4d5341=!0x0;}return _0x360978['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5c2082,_0x2c67ed){const _0x29524f=this['editor'],_0x57fcc7=_0x29524f['plugins']['get'](oi);let _0x7d3c6f=_0x57fcc7['getCommentThread'](_0x2c67ed);const _0x159e25=_0x29524f['config']['get']('collaboration.channelId'),_0x467f21=_0x29524f['plugins']['get'](di);return _0x7d3c6f&&(_0x7d3c6f['unlinkedAt']&&_0x7d3c6f['setUnlinkedAt'](null),_0x7d3c6f['isAttached'])||(this['getAllMarkersForId'](_0x2c67ed)[0x0]['managedUsingOperations']?_0x57fcc7['fetchCommentThread']({'channelId':_0x159e25,'threadId':_0x2c67ed})['then'](_0x35e159=>{if('destroyed'!==_0x29524f['state']){if(_0x7d3c6f=_0x35e159,_0x7d3c6f&&!_0x7d3c6f['isAttached']){const _0x2e067f=_0x7d3c6f['attachTo'](()=>this['_getTargetForId'](_0x2c67ed));_0x467f21['registerAnnotation'](_0x2e067f),_0x7d3c6f['isResolved']&&this['_reconvertMarkers'](_0x2c67ed);}else{if(!_0x7d3c6f){const _0x449b34=this['getAllMarkersForId'](_0x2c67ed);_0x29524f['model']['change'](_0x4aea54=>{for(const _0x1bda26 of _0x449b34)_0x4aea54['removeMarker'](_0x1bda26);});}}}}):_0x29524f['editing']['view']['once']('render',()=>{if(_0x57fcc7['getCommentThread'](_0x2c67ed))return;const _0x1c32f4=_0x29524f['plugins']['get'](ti);_0x7d3c6f=_0x57fcc7['openNewCommentThread']({'channelId':_0x159e25,'threadId':_0x2c67ed,'target':()=>this['_getTargetForId'](_0x2c67ed),'context':{'type':'text','value':this['_getTextContext'](_0x2c67ed)}});const _0x1a871e=_0x57fcc7['_threadToController']['get'](_0x7d3c6f)['view'],_0x317883=_0x1c32f4['getByInnerView'](_0x1a871e);_0x317883&&_0x467f21['registerAnnotation'](_0x317883);},{'priority':'low'})),_0x7d3c6f;}['_handleThreadMarker'](_0x1218f9,_0x10d130){const _0x94a591=this['_attachMarkerToThread'](_0x1218f9,_0x10d130);_0x94a591&&!_0x94a591['context']&&_0x94a591['setContext']({'type':'text','value':this['_getTextContext'](_0x10d130)});}['_initAriaMarkerChangeAnnouncements'](){const _0xe00e53=this['editor'];_0x56b924(_0xe00e53['model'],({left:_0x53c0c6,entered:_0x4b45fb})=>{for(const _0x256609 of _0x53c0c6)if(Ai(_0x256609)){_0xe00e53['ui']['ariaLiveAnnouncer']['announce'](Et(_0xe00e53['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4ed70d of _0x4b45fb)if(Ai(_0x4ed70d)){_0xe00e53['ui']['ariaLiveAnnouncer']['announce'](Et(_0xe00e53['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x3d03a9(_0x4a902b)));break;}});}};function gi(_0x211953,_0x344f26){return _0x344f26?_0x211953+':'+_0x344f26:_0x211953;}function _i(_0x20b97a,_0x141fba){const _0x5d72a2=_0x141fba['schema'],_0x32c9ef=_0x141fba['createRange'](_0x20b97a['start']);for(const _0x9ef311 of _0x20b97a['getWalker']()){const {type:_0x1d798b,item:_0x232be4,nextPosition:_0x167db5}=_0x9ef311;if('text'===_0x1d798b||_0x5d72a2['isObject'](_0x232be4)){const _0x3d1c68=_0x141fba['createPositionBefore'](_0x232be4);_0x32c9ef['isCollapsed']&&(_0x32c9ef['start']=_0x3d1c68),_0x32c9ef['end']=_0x167db5;}}return _0x32c9ef;}function Ai(_0x2239b9){return'comment'===fi(_0x2239b9['name'])['group'];}var vi=class extends _0x1228a1{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0xf466f0=this['editor'],_0x195736=_0xf466f0['plugins']['get'](oi),_0x90025c=_0xf466f0['plugins']['get'](wi),_0x381d8b=_0xf466f0['plugins']['get'](ti),_0x58013b=_0xf466f0['plugins']['get'](di);_0xf466f0['ui']['componentFactory']['add']('comment',()=>{const _0x387d65=this['_createUIButton'](_0x3a0b06);return _0x387d65['tooltip']=!0x0,_0x387d65;}),_0xf466f0['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x58013b['addSourceCollector'](()=>{const _0x8bd220=[];for(const [_0x1af581,_0x1faec1]of _0x195736['_threadToController']){const _0x20ff1a=_0x90025c['getAllMarkersForId'](_0x1af581['id']),_0x4de617=_0x20ff1a['map'](_0x136a60=>_0x136a60['getRange']());_0x20ff1a['length']>0x0&&_0x8bd220['push']([_0x1faec1['view'],_0x4de617]);}return _0x8bd220;}),this['listenTo'](_0x381d8b,'change:activeAnnotations',(_0x491be8,_0x5c38c1,_0x478907)=>{const _0x546142=Array['from'](_0x478907)['map'](_0x1e0ca5=>_0x1e0ca5['innerView'])['find'](_0x4965ee=>_0x195736['_viewToController']['has'](_0x4965ee));if(!_0x546142)return void(_0x90025c['activeMarker']=null);const _0x415f3c=_0x195736['_viewToController']['get'](_0x546142)['model']['id'],_0x1d5b69='comment:'+_0x415f3c;_0x415f3c&&_0x90025c['hasMarkerForId'](_0x415f3c)?_0x90025c['activeMarker']=_0x1d5b69:_0x90025c['activeMarker']&&(_0x90025c['activeMarker']=null);}),this['listenTo'](_0x195736,'removeCommentThread',(_0x13c7a8,{threadId:_0x2ffa28,isFromAdapter:_0x536e1f})=>{!_0x536e1f&&_0xf466f0['ui']['focusTracker']['isFocused']&&_0x90025c['hasMarkerForId'](_0x2ffa28)&&_0xf466f0['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x195736,'addComment',(_0x38c18,{threadId:_0x5c10b3,isFromAdapter:_0x3cca3c})=>{!_0x3cca3c&&_0x90025c['hasMarkerForId'](_0x5c10b3)&&_0x195736['hasCommentThread'](_0x5c10b3)&&0x1===_0x195736['getCommentThread'](_0x5c10b3)['length']&&(_0xf466f0['editing']['view']['focus'](),_0x38c18['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x40a1fa=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2581b0;for(const _0x25068f in _0x40a1fa){const _0x4f66f3=_0x25068f,_0x3c960c=_0x40a1fa[_0x4f66f3];if('commentsLicenseKeyValid'==_0x3c960c||'commentsLicenseKeyInvalid'==_0x3c960c||'commentsLicenseKeyExpired'==_0x3c960c||'commentsLicenseKeyDomainLimit'==_0x3c960c||'commentsLicenseKeyNotAllowed'==_0x3c960c||'commentsLicenseKeyEvaluationLimit'==_0x3c960c||'commentsLicenseKeyUsageLimit'==_0x3c960c){delete _0x40a1fa[_0x4f66f3],_0x2581b0=_0x3c960c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2581b0&&_0x40a1fa['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2581b0&&_0x40a1fa['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2581b0&&_0x40a1fa['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2581b0&&_0x40a1fa['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2581b0&&_0x40a1fa['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x2581b0&&_0x40a1fa['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xb041c8){const _0x17ef36=this['editor'],_0x1730f1=new _0xb041c8(_0x17ef36['locale']),_0x24e795=_0x17ef36['commands']['get']('addCommentThread');return _0x1730f1['set']({'label':Et(_0x17ef36['locale'],'Comment'),'icon':_0x232043}),_0x1730f1['bind']('isEnabled')['to'](_0x24e795,'isEnabled',_0x24e795,'hasContent',(_0x278c16,_0x125eb3)=>_0x278c16&&_0x125eb3),this['listenTo'](_0x1730f1,'execute',()=>{_0x24e795['execute']();}),_0x1730f1;}},yi=class extends _0x1228a1{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x589e97){super(_0x589e97),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x433477,_0x26e391,_0x1b707b)=>{_0x1b707b?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x5c3625,_0x28d066]of this['editor']['commands'])_0x28d066['affectsData']&&'addCommentThread'!==_0x5c3625&&_0x28d066['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 _0xc09eff=this['editor']['editing']['view']['document'];this['listenTo'](_0xc09eff,'cut',_0x3d3679=>_0x3d3679['stop'](),{'priority':'highest'}),this['listenTo'](_0xc09eff,'clipboardInput',_0xf39262=>_0xf39262['stop'](),{'priority':'highest'}),this['listenTo'](_0xc09eff,'delete',_0x3011ac=>_0x3011ac['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x30bb1c,_0x42ed5a]of this['editor']['commands'])_0x42ed5a['affectsData']&&'addCommentThread'!==_0x30bb1c&&_0x42ed5a['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']);}},Ti=class extends _0x388472{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x13d3c1){super(_0x13d3c1),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x46ebc9=this['context']['plugins']['get'](ti);this['listenTo'](_0x46ebc9,'_activateAnnotation',(_0x1690c3,_0x597146)=>{for(const _0xf4cee7 of this['activeUIs']){const _0xd5f114=this['_uis']['get'](_0xf4cee7);(0x0,this['uisData']['get'](_0xf4cee7)['filter'])(_0x597146)&&_0xd5f114['setActiveAnnotation'](_0x597146);}}),this['listenTo'](_0x46ebc9,'_deactivateAllAnnotations',()=>{for(const _0x4174f2 of this['activeUIs'])this['_uis']['get'](_0x4174f2)['setActiveAnnotation'](null);}),this['listenTo'](_0x46ebc9['_visibleAnnotations'],'add',(_0x592c3b,_0x522b77)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x522b77);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4c5e30){return this['activeUIs']['has'](_0x4c5e30);}['activate'](_0x56e180,_0x5801c3=this['defaultFilter']){const _0xed658a=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x56e180))throw new _0x3cac4c('annotationsuis-missing-ui',this,{'uiName':_0x56e180});this['isActive'](_0x56e180)&&this['deactivate'](_0x56e180),this['activeUIs']['add'](_0x56e180);const _0xb23b20=new Jt();Qt({'source':_0xed658a['_visibleAnnotations'],'target':_0xb23b20,'filter':_0x5801c3}),this['uisData']['set'](_0x56e180,{'collection':_0xb23b20,'filter':_0x5801c3});const _0x217b25=this['_uis']['get'](_0x56e180);_0x217b25['attach'](_0xb23b20),this['listenTo'](_0x217b25,'change:activeAnnotation',(_0x5d3161,_0x414736,_0x3f35f8,_0x5d3026)=>{_0x5d3026&&_0xed658a['_removeActiveAnnotation'](_0x5d3026),_0x3f35f8&&_0xed658a['_addActiveAnnotation'](_0x3f35f8);});}['deactivate'](_0x219b74){if(this['activeUIs']['delete'](_0x219b74),!this['_uis']['has'](_0x219b74))throw new _0x3cac4c('annotationsuis-missing-ui',this,{'uiName':_0x219b74});const _0x32d16f=this['_uis']['get'](_0x219b74);_0x32d16f['detach'](),this['stopListening'](_0x32d16f),this['uisData']['get'](_0x219b74)['collection']['destroy'](),this['uisData']['delete'](_0x219b74);}['switchTo'](_0x528a81){if(!this['_uis']['has'](_0x528a81))throw new _0x3cac4c('annotationsuis-missing-ui',this,{'uiName':_0x528a81});const _0x580542=this['context']['plugins']['get'](ti),_0x25785b=Array['from'](_0x580542['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x528a81);const _0x19961e=this['_uis']['get'](_0x528a81);_0x19961e['setActiveAnnotation'](_0x25785b),_0x19961e['_setSelectedAnnotations']&&_0x25785b&&_0x19961e['_setSelectedAnnotations']([_0x25785b]);}['deactivateAll'](){for(const _0x44a49e of this['activeUIs'])this['deactivate'](_0x44a49e);}['register'](_0x40f184,_0x5c4d37){if(this['_uis']['has'](_0x40f184))throw new _0x3cac4c('annotationsuis-register-already-registered');if('function'!=typeof _0x5c4d37['attach']||'function'!=typeof _0x5c4d37['detach']||'function'!=typeof _0x5c4d37['setActiveAnnotation'])throw new _0x3cac4c('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x40f184,_0x5c4d37);}['refilterAnnotations'](){const _0x2c8eec=this['context']['plugins']['get'](ti)['collection'],_0x332850=new Map(),_0x8efb56=Array['from'](this['activeUIs']);for(const _0x20e146 of this['activeUIs']){const _0x116fc3=this['uisData']['get'](_0x20e146)['collection'];for(const _0x12046a of _0x116fc3)_0x332850['set'](_0x12046a,_0x20e146);}for(const _0x408f73 of _0x2c8eec){const _0x3bf293=_0x332850['get'](_0x408f73);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x408f73);const _0x347f5d=_0x8efb56['find'](_0x1474b2=>this['uisData']['get'](_0x1474b2)['filter'](_0x408f73));_0x3bf293!==_0x347f5d&&(_0x3bf293&&this['uisData']['get'](_0x3bf293)['collection']['remove'](_0x408f73),_0x347f5d&&this['uisData']['get'](_0x347f5d)['collection']['add'](_0x408f73));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x457f6b){const _0x54865c=[];for(const _0x8b3625 of this['activeUIs']){(0x0,this['uisData']['get'](_0x8b3625)['filter'])(_0x457f6b)&&_0x54865c['push'](_0x8b3625);}if(_0x54865c['length']>0x1)throw new _0x3cac4c('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x54865c,'annotationType':_0x457f6b['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0xe08cc4('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x38b32f){super(_0x38b32f);const _0x12bbab=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 _0x57589a(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x12bbab['to']('class')],'style':{'minHeight':_0x12bbab['to']('minHeight',_0x16f581=>'number'==typeof _0x16f581?Ci(_0x16f581+0xa):null)},'dir':_0x38b32f['uiLanguageDirection'],'role':'application','aria-label':Et(_0x38b32f,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x38b32f,'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',_0x3c8a22=>{this['_updateItemPositionInFocusables'](_0x3c8a22['source']);}),this['list']['forEach'](_0x4ddfa0=>{this['focusTracker']['add'](_0x4ddfa0['element']),this['_updateItemPositionInFocusables'](_0x4ddfa0);}),this['list']['on']('change',(_0x355bb7,_0x2fde81)=>{for(const _0x460b53 of _0x2fde81['removed'])this['focusTracker']['remove'](_0x460b53['element']),this['focusables']['remove'](_0x460b53);for(const _0x442533 of _0x2fde81['added'])this['focusTracker']['add'](_0x442533['element']),this['_updateItemPositionInFocusables'](_0x442533);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1f4789){const _0x39e8fd=this['focusables']['getIndex'](_0x1f4789);let _0x482fbd,_0x46524a;for(const _0x95cc29 of this['focusables'])if(_0x1f4789['top']<_0x95cc29['top']){_0x482fbd=_0x95cc29;break;}if(_0x46524a=_0x482fbd?this['focusables']['getIndex'](_0x482fbd):this['focusables']['length'],-0x1!==_0x39e8fd){if(_0x39e8fd===_0x46524a-0x1)return;this['focusables']['remove'](_0x1f4789),_0x46524a=_0x482fbd?this['focusables']['getIndex'](_0x482fbd):this['focusables']['length'];}this['focusables']['add'](_0x1f4789,_0x46524a);}};const bi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0xe08cc4('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0xa26bd9){super(_0xa26bd9),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x11c1d8,_0x249196)=>_0x11c1d8+_0x249196),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x11bb9d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x11bb9d['to']('isAnimationDisabled',_0x4344ef=>_0x4344ef?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x11bb9d['to']('top',_0x4e5919=>bi(_0x4e5919))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x46ad9f=this['element']['clientHeight'];_0x46ad9f&&(this['height']=_0x46ad9f);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x388472{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x21a05b){super(_0x21a05b),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 _0x41e79f=this['context']['config']['get']('sidebar.container');_0x41e79f&&this['setContainer'](_0x41e79f);}['setContainer'](_0xe73390){if(!Oi(_0xe73390))throw new _0x3cac4c('sidebar-setcontainer-invalid-element');this['container']=_0xe73390;}['_attachToContainer']({viewClass:_0x533818='',spaceBetweenItems:_0x2cfebe=0x19}={}){if(!Oi(this['container']))throw new _0x3cac4c('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x533818,this['_spaceBetweenItems']=_0x2cfebe;}['rearrange']({removedAnnotation:_0xe5864e,previousAnnotation:_0x4a7088,nextAnnotation:_0x244023}){const _0x47e5e3=this['getSidebarItemView'](_0xe5864e);this['view']['list']['remove'](_0x47e5e3),this['_destroySidebarItemView'](_0xe5864e),_0x4a7088&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4a7088)),_0x244023&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x244023)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x28f5b4,activatedAnnotation:_0x50cf35,disableAnimationOnActivatedAnnotation:_0x83c11e}){if(this['_activeAnnotation']=_0x50cf35,_0x28f5b4){_0x28f5b4['isActive']=!0x1;const _0x46552a=this['getSidebarItemView'](_0x28f5b4);_0x46552a&&_0x83c11e&&(_0x46552a['isAnimationDisabled']=!0x1);}if(_0x50cf35){const _0x4af8e5=this['getSidebarItemView'](_0x50cf35);_0x4af8e5&&(_0x50cf35['isActive']=!0x0,_0x83c11e&&(_0x4af8e5['isAnimationDisabled']=!0x0,_0x4af8e5['top']+=0x1),this['_alignToTargetRect'](_0x4af8e5));}}['_detachFromContainer'](_0x500f95){if(this['view']['element']['remove'](),_0x500f95){for(const _0x278cf6 of _0x500f95)this['_destroySidebarItemView'](_0x278cf6);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x175740,_0x3f6744){_0x3f6744||(_0x3f6744=_0x175740['view']);const _0xa9bf92=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xa9bf92,_0x175740),this['_annotationToSidebarItemView']['set'](_0x175740,_0xa9bf92),_0xa9bf92['content']['add'](_0x3f6744),this['listenTo'](_0x175740['view'],'change:targetRect',(_0x44d50c,_0x5bdf18,_0x5ab078)=>{const _0x125729=this['_getTargetTop'](_0x175740,_0x5ab078);_0xa9bf92['_targetTop']!=_0x125729&&(_0xa9bf92['_targetTop']=_0x125729,this['_setItemTop'](_0xa9bf92,_0x125729));}),this['listenTo'](_0xa9bf92,'change:top',()=>{this['_recalculate'](_0xa9bf92,'top');}),this['listenTo'](_0xa9bf92,'change:bottom',()=>{this['_recalculate'](_0xa9bf92,'bottom');}),this['_alignToTargetRect'](_0xa9bf92);const _0x71ae40=this['_getItemBefore'](_0xa9bf92);return _0x71ae40&&this['_alignAfterItem'](_0x71ae40,_0xa9bf92)||this['_alignToTargetRect'](_0xa9bf92),this['_updateLastItem'](),this['view']['list']['add'](_0xa9bf92),_0xa9bf92;}['_alignForTopChange'](_0x29a434){if(!_0x29a434['content']['length'])return;const _0x13ee9e=this['_getItemBefore'](_0x29a434);if(!_0x13ee9e)return;const _0x1edd8c=this['_sidebarItemViewToAnnotation']['get'](_0x13ee9e),_0x4088ff=this['_activeAnnotation'];_0x4088ff&&_0x4088ff===_0x1edd8c?this['_alignAfterItem'](_0x13ee9e,_0x29a434):this['_alignBeforeItem'](_0x29a434,_0x13ee9e);}['_alignForBottomChange'](_0x405b42){if(!_0x405b42['content']['length'])return;const _0x48ec0d=this['_getItemAfter'](_0x405b42);if(!_0x48ec0d)return;const _0x1e1e1c=this['_sidebarItemViewToAnnotation']['get'](_0x48ec0d),_0x31eb36=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x32866c=this['_activeAnnotation'];_0x32866c&&_0x32866c===_0x1e1e1c&&_0x31eb36?(this['_alignBeforeItem'](_0x48ec0d,_0x405b42),this['_alignAfterItem'](_0x405b42,_0x48ec0d)):_0x32866c&&_0x32866c===_0x1e1e1c?this['_alignBeforeItem'](_0x48ec0d,_0x405b42):this['_alignAfterItem'](_0x405b42,_0x48ec0d);}['_recalculate'](_0x27796a,_0x5d4a96){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x224673,changedProp:_0xce111f}of this['_recalculateBuffer'])'top'===_0xce111f?this['_alignForTopChange'](_0x224673):this['_alignForBottomChange'](_0x224673);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x27796a,'changedProp':_0x5d4a96});}['getSidebarItemView'](_0xb987e9){return this['_annotationToSidebarItemView']['get'](_0xb987e9);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1101e1){const _0xcbb904=this['getSidebarItemView'](_0x1101e1);this['stopListening'](_0xcbb904),this['stopListening'](_0x1101e1['view']),_0xcbb904['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1101e1),this['_sidebarItemViewToAnnotation']['delete'](_0xcbb904);}['_createSidebarView'](){const _0x4095dd=new Ii(this['context']['locale']);return _0x4095dd['render'](),this['on']('change:_lastItem',(_0x8b2283,_0x1d95fb,_0x1df10e,_0x9c113b)=>{_0x9c113b&&_0x4095dd['unbind']('minHeight'),_0x1df10e?_0x4095dd['bind']('minHeight')['to'](_0x1df10e,'bottom'):_0x4095dd['minHeight']=null;}),_0x4095dd;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4a5814){const _0x3924d7=this['_sidebarItemViewToAnnotation']['get'](_0x4a5814),_0x19ef7d=_0x3924d7&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3924d7)-0x1);return _0x19ef7d&&this['getSidebarItemView'](_0x19ef7d)||null;}['_getItemAfter'](_0x3b9ff0){const _0x3ef7ae=this['_sidebarItemViewToAnnotation']['get'](_0x3b9ff0),_0x30c36e=_0x3ef7ae&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3ef7ae)+0x1);return _0x30c36e&&this['getSidebarItemView'](_0x30c36e)||null;}['_alignBeforeItem'](_0x2f5563,_0x4f584c){_0x2f5563['updateHeight']();const _0x344cb6=Ni(_0x4f584c['bottom']+this['_spaceBetweenItems'],_0x2f5563['top']);return!!_0x344cb6&&(this['_setItemTop'](_0x4f584c,_0x4f584c['top']-_0x344cb6),!0x0);}['_alignAfterItem'](_0x5cf344,_0xb0d950){_0x5cf344['updateHeight']();const _0x20ac10=Ni(_0x5cf344['bottom']+this['_spaceBetweenItems'],_0xb0d950['top']);return!!_0x20ac10&&(this['_setItemTop'](_0xb0d950,_0xb0d950['top']+_0x20ac10,!0x1),!0x0);}['_alignToTargetRect'](_0x1bc1fb){const _0x4a4968=this['_sidebarItemViewToAnnotation']['get'](_0x1bc1fb);if(!_0x4a4968||!_0x4a4968['target']||!_0x4a4968['targetRect'])return;const _0x57d605=this['_getTargetTop'](_0x4a4968,_0x4a4968['targetRect']);this['_setItemTop'](_0x1bc1fb,_0x57d605);}['_getTargetTop'](_0x4a3b83,_0x334539){if(null===_0x334539)return 0x0;if(_0x4a3b83['target']instanceof _0x50fe83)return _0x334539['top'];{const _0x4e0922=new _0x50fe83(this['view']['element'])['top'];return _0x334539['top']-_0x4e0922;}}['_setItemTop'](_0x233c66,_0x3b6274,_0x58272b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x58272b&&(_0x3b6274=Math['max'](_0x3b6274,this['_getMaxAvailableTop'](_0x233c66))),_0x233c66['top']=_0x3b6274;}['_getMaxAvailableTop'](_0x1a8ef3){let _0x196616=this['_getItemBefore'](_0x1a8ef3),_0x6d67bf=0x0;for(;_0x196616;)_0x196616['updateHeight'](),_0x6d67bf+=this['_spaceBetweenItems']+_0x196616['height'],_0x196616=this['_getItemBefore'](_0x196616);return _0x6d67bf;}};function Ni(_0x4c2d23,_0x21799f){return Math['max'](_0x4c2d23-_0x21799f,0x0);}function Oi(_0x400d02){return null!==_0x400d02&&'object'==typeof _0x400d02&&0x1===_0x400d02['nodeType'];}var Mi=class extends _0x388472{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a76df){super(_0x3a76df),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5c875e(),this['_refreshPositioningDebounced']=_0x55ca5d(()=>{_0x3a76df['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1a5862=this['context']['plugins']['get'](Ti),_0x253e1d=this['context']['plugins']['get'](ki);_0x1a5862['register']('wideSidebar',this),_0x253e1d['container']&&_0x1a5862['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x41eda3){if(_0x41eda3===this['activeAnnotation'])return;const _0x3c36ba=this['context']['plugins']['get'](ki);_0x3c36ba['_activeAnnotation']=_0x41eda3;const _0x1a332c=this['activeAnnotation'];_0x3c36ba['refresh']({'blurredAnnotation':_0x1a332c,'activatedAnnotation':_0x41eda3}),this['activeAnnotation']=_0x41eda3;}['attach'](_0x4bab55){this['annotations']=_0x4bab55;const _0x2d5606=this['context']['plugins']['get'](ki);if(_0x2d5606['_annotations']=_0x4bab55,this['isAttached'])throw new _0x3cac4c('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2d5606,'set:container',()=>{this['detach'](),this['listenTo'](_0x2d5606,'change:container',_0x63fa26=>{_0x63fa26['off'](),this['attach'](_0x4bab55);});}),_0x2d5606['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x554ae5=_0x32654f=>{_0x32654f['updateTargetRect'](),_0x2d5606['addAnnotation'](_0x32654f);};for(const _0x306fc3 of _0x4bab55)_0x554ae5(_0x306fc3);this['listenTo'](_0x4bab55,'add',(_0x1b7d4c,_0x1ae6ec)=>{_0x554ae5(_0x1ae6ec);}),this['listenTo'](_0x4bab55,'remove',(_0x395a23,_0x582542,_0x2877ea)=>{_0x2d5606['rearrange']({'removedAnnotation':_0x582542,'previousAnnotation':_0x4bab55['get'](_0x2877ea-0x1),'nextAnnotation':_0x4bab55['get'](_0x2877ea+0x1)}),_0x582542===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4bab55,'focus',(_0x2fb504,_0x6c4e38)=>{this['setActiveAnnotation'](_0x6c4e38);}),this['listenTo'](_0x4bab55,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4219e1=this['context']instanceof _0x429018?this['context']['editors']:new _0x5c875e([this['context']]);for(const _0x4687a6 of _0x4219e1)this['_integrateWithEditorAnnotations'](_0x4687a6);this['listenTo'](_0x4219e1,'add',(_0x2c0922,_0x444b6b)=>{this['listenTo'](_0x444b6b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x444b6b);});}),this['listenTo'](_0x4219e1,'remove',(_0x5e60ba,_0x29e44a)=>{_0x29e44a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x29e44a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3cac4c('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5215f9=this['context']['plugins']['get'](ki);_0x5215f9['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5215f9),this['stopListening'](this['annotations']),this['context']instanceof _0x429018&&this['stopListening'](this['context']['editors']);for(const _0x44ba0e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x44ba0e);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2945ce){if(!_0x2945ce['plugins']['has']('EditorAnnotations'))return;const _0xd776b0=_0x2945ce['plugins']['get']('EditorAnnotations'),_0x53c3a8=()=>{const _0x2fe1e9=_0xd776b0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2fe1e9[0x0]||null);};this['listenTo'](_0xd776b0,'refresh',_0x53c3a8),this['listenTo'](_0xd776b0,'blur',(_0xd469bd,{isAnnotationTracked:_0xe8e23d})=>{this['activeAnnotation']&&_0xe8e23d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xd776b0,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3e2d5f=>{_0xd776b0['hasDomSelection']()&&(_0x53c3a8(),_0x3e2d5f['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xd776b0);}['_destroyEditorAnnotationsIntegration'](_0x4321a9){this['stopListening'](_0x4321a9),this['_editorAnnotations']['remove'](_0x4321a9);}},Ri=class extends _0x3a0b06{['counterView'];constructor(_0x3f4705){super(_0x3f4705);const _0x384ab0=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x534caf,_0x528f4b)=>_0x534caf?'...':_0x528f4b['toString']()),this['set']('annotationType',''),this['icon']=_0x232043,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x384ab0['to']('annotationType',_0x27a27f=>'ck-annotation-counter__badge--'+_0x27a27f),_0x384ab0['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x384ab0['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x388472{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1eed10){super(_0x1eed10),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xff39d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5c875e(),this['_refreshPositioningDebounced']=_0x55ca5d(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x31232d(this['context']['locale']),this['balloonPanelView']=new _0x230065(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5d8cf8){this['annotations']=_0x5d8cf8;const _0x518aa8=this['context']['plugins']['get'](ki),_0x3782a8=this['balloonPanelView'];if(_0x518aa8['_annotations']=_0x5d8cf8,this['isAttached'])throw new _0x3cac4c('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x518aa8,'set:container',()=>{this['detach'](),this['listenTo'](_0x518aa8,'change:container',_0x50fe5d=>{_0x50fe5d['off'](),this['attach'](_0x5d8cf8);});}),_0x518aa8['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1bc772=_0x50af29=>{const _0x272644=new Ri(this['context']['locale']);_0x518aa8['addAnnotation'](_0x50af29,_0x272644),this['_annotationToNarrowView']['set'](_0x50af29,_0x272644),_0x272644['bind']('isDirty','annotationType','number')['to'](_0x50af29['view'],'isDirty','type','length'),_0x272644['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3782a8['content']['first']!==_0x50af29['view']?(this['_showBalloon'](_0x50af29),_0x50af29['view']['element']['focus'](),this['setActiveAnnotation'](_0x50af29)):this['setActiveAnnotation'](null);});};for(const _0x346767 of _0x5d8cf8)_0x1bc772(_0x346767);this['listenTo'](_0x5d8cf8,'add',(_0x2d710a,_0x2c6cee)=>{_0x1bc772(_0x2c6cee);}),this['listenTo'](_0x5d8cf8,'remove',(_0x361701,_0x1a3aa0,_0x276b5a)=>{this['_annotationToNarrowView']['get'](_0x1a3aa0)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1a3aa0),_0x518aa8['rearrange']({'removedAnnotation':_0x1a3aa0,'previousAnnotation':_0x5d8cf8['get'](_0x276b5a-0x1),'nextAnnotation':_0x5d8cf8['get'](_0x276b5a+0x1)}),_0x1a3aa0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5d8cf8,'focus',(_0x5bfa35,_0x16b82e)=>{this['setActiveAnnotation'](_0x16b82e);}),this['listenTo'](_0x5d8cf8,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x38d4d3,_0x2251df)=>{_0x2251df['keyCode']===_0x161b1f['esc']&&_0x3782a8['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3782a8['content']['first']),this['_hideBalloon'](),_0x2251df['stopPropagation'](),_0x2251df['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5db6cc,_0x1fa8d7)=>{const _0x2d917e=_0x1fa8d7['target'];_0x3782a8['isVisible']&&_0x3782a8['element']['contains'](_0x2d917e)||_0x518aa8['view']['element']['contains'](_0x2d917e)||_0x5db6cc['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x17b7d9=>_0x17b7d9['contains'](_0x2d917e))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xae59cf=this['context']instanceof _0x429018?this['context']['editors']:new _0x5c875e([this['context']]);for(const _0x1adb4e of _0xae59cf)this['_integrateWithEditorAnnotations'](_0x1adb4e);this['listenTo'](_0xae59cf,'add',(_0x47c6bb,_0x3ec4d1)=>{this['listenTo'](_0x3ec4d1,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3ec4d1);});}),this['listenTo'](_0xae59cf,'remove',(_0x159474,_0x423ecc)=>{_0x423ecc['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x423ecc['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x450e8d){if(_0x450e8d===this['activeAnnotation'])return;const _0xaaeab=this['context']['plugins']['get'](ki);_0xaaeab['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x450e8d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x450e8d&&_0xaaeab['getSidebarItemView'](_0x450e8d)?this['_showBalloon'](_0x450e8d):this['_hideBalloon'](),this['activeAnnotation']=_0x450e8d;}['detach'](){if(!this['isAttached'])throw new _0x3cac4c('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5b5c69=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1a0b4e=>_0x1a0b4e['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5b5c69['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x429018&&this['stopListening'](this['context']['editors']);for(const _0x25deea of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x25deea);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'](_0x43356c){if(!_0x43356c['plugins']['has']('EditorAnnotations'))return;const _0x31efde=_0x43356c['plugins']['get']('EditorAnnotations'),_0x14cac5=this['context']['plugins']['get'](ki),_0x3c0706=this['annotations'],_0x27c556=this['balloonPanelView'],_0x1b56f2=()=>{const _0x363f27=_0x31efde['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x363f27),this['setActiveAnnotation'](_0x363f27[0x0]||null);};this['listenTo'](_0x31efde,'refresh',_0x1b56f2),this['listenTo'](_0x31efde,'blur',(_0xb01f48,{isAnnotationTracked:_0x4d1046})=>{this['activeAnnotation']&&_0x4d1046(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x31efde,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3c0706,'blur',_0xaa4100=>{_0x31efde['hasDomSelection']()&&_0xaa4100['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1c99f9,_0x44970e)=>{const _0x20e020=_0x44970e['target'];_0x27c556['isVisible']&&_0x27c556['element']['contains'](_0x20e020)||_0x14cac5['view']['element']['contains'](_0x20e020)||this['activeAnnotation']&&_0x31efde['hasDomSelection']()&&(_0x1b56f2(),_0x1c99f9['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x31efde);}['_destroyEditorAnnotationsIntegration'](_0x2091df){_0x2091df&&(this['stopListening'](_0x2091df),this['_editorAnnotations']['remove'](_0x2091df));}['_setSelectedAnnotations'](_0x1fa355){for(const _0x1f2c28 of this['_selectedAnnotations'])_0x1fa355['includes'](_0x1f2c28)||this['_manuallyClosedAnnotationViews']['delete'](_0x1f2c28['view']);this['_selectedAnnotations']=_0x1fa355;}['_refreshPositioning'](){const _0x227ba9=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x227ba9['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xc3ec8f){if(this['_manuallyClosedAnnotationViews']['has'](_0xc3ec8f['view']))return;const _0x2a426b=this['balloonPanelView']['content']['first'];_0x2a426b!==_0xc3ec8f['view']?(_0x2a426b&&this['_detachListeners'](_0x2a426b),this['_attachListeners'](_0xc3ec8f['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xc3ec8f['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3dd383=this['balloonPanelView']['content']['first'],_0x5c9885=_0x3dd383&&this['annotations']['getByView'](_0x3dd383);if(!_0x5c9885||!this['_annotationToNarrowView']['has'](_0x5c9885))return;const _0x26ddb4=this['_annotationToNarrowView']['get'](_0x5c9885)['element'],_0x3aa266=(function(){const _0x359038=_0x230065['defaultPositions'];return[_0x359038['southArrowNorthEast'],_0x359038['northArrowSouthEast'],_0x359038['southArrowNorth'],_0x359038['northArrowSouth'],_0x359038['southArrowNorthWest'],_0x359038['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x26ddb4,'positions':_0x3aa266});}['_hideBalloon'](){const _0xea34ef=this['balloonPanelView'],_0x4a1570=_0xea34ef['content']['first'];_0x4a1570&&(this['_detachListeners'](_0x4a1570),_0xea34ef['unpin'](),_0xea34ef['content']['clear']());}['_attachListeners'](_0x66f0ab){this['listenTo'](_0x66f0ab,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x66f0ab,'Esc',(_0x2e3106,_0x32cddb)=>{this['_manuallyClosedAnnotationViews']['add'](_0x66f0ab),this['_hideBalloon'](),_0x32cddb();});}['_detachListeners'](_0x1bba91){this['stopListening'](_0x1bba91);}},xi=class extends _0x1228a1{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x4bf11d,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x423e80){super(_0x423e80),_0x423e80['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x423e80['plugins']['get'](_0x4bf11d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x55ca5d(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0xdb329=this['editor']['plugins']['get'](Ti);_0xdb329['context']===this['editor']&&(_0xdb329['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x239e8f,_0x4a522a)=>{const _0x4e25dc=this['_balloon'];if(this['isAttached']&&_0x4e25dc['visibleView']){const _0x5f076e=this['annotations']['getByView'](_0x4e25dc['visibleView']);_0x5f076e&&this['_closeAnnotation'](_0x5f076e),_0x4a522a();}}));}['afterInit'](){const _0x451c79=this['editor']['plugins']['get'](Ti);_0x451c79['context']===this['editor']&&(_0x451c79['hasActive']()||_0x451c79['switchTo']('inline'));}['setActiveAnnotation'](_0x1075ee){_0x1075ee!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1075ee&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1075ee)&&this['_addAnnotationToBalloon'](_0x1075ee,!0x0),_0x1075ee['isActive']=!0x0),_0x1075ee||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1075ee);}['attach'](_0x18b1e8){this['annotations']=_0x18b1e8;const _0x1920f9=this['editor']['plugins']['get'](Ti),_0x54f3ed=this['_balloon'];if(this['isAttached'])throw new _0x3cac4c('inlineannotations-attach-already-attached',this);if(_0x1920f9['context']!==this['editor'])throw new _0x3cac4c('inlineannotations-not-allowed-with-context',this);const _0x430647=this['editor']['plugins']['get'](di);this['listenTo'](_0x430647,'refresh',()=>{const _0x4003aa=_0x430647['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1c33de,_0x44a52c;!this['_forceRefresh']&&(_0x1c33de=_0x4003aa,_0x44a52c=this['_selectedAnnotations'],_0x1c33de['length']===_0x44a52c['length']&&_0x1c33de['every'](_0x18c6a3=>_0x44a52c['includes'](_0x18c6a3)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4003aa),this['setActiveAnnotation'](_0x4003aa[0x0]||null));}),this['listenTo'](_0x430647,'blur',(_0x5dc6f7,{isAnnotationTracked:_0x4b11e0})=>{this['activeAnnotation']&&_0x4b11e0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x430647,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2127ad,_0x5e9f8f,_0x45f19a)=>{_0x45f19a||this['setActiveAnnotation'](null);}),this['listenTo'](_0x18b1e8,'remove',(_0x3b1e0c,_0xa0b43)=>{this['_removeAnnotationFromBalloon'](_0xa0b43),_0xa0b43===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x54f3ed,'change:visibleView',(_0x3414e0,_0x21df80,_0xdc0d43,_0x2745d1)=>{_0x2745d1&&this['stopListening'](_0x2745d1);const _0x553780=_0x18b1e8['getByView'](_0xdc0d43);_0xdc0d43&&_0x553780&&(this['listenTo'](_0xdc0d43,'change:height',()=>{_0x54f3ed['updatePosition']();}),this['listenTo'](_0xdc0d43,'Esc',()=>{this['_closeAnnotation'](_0x553780),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x553780&&this['setActiveAnnotation'](_0x553780));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x54f3ed['visibleView']&&_0x18b1e8['getByView'](_0x54f3ed['visibleView'])&&_0x54f3ed['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 _0x3cac4c('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x173325 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x173325);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x271417){for(const _0x8dd0f1 of this['_selectedAnnotations'])_0x271417['includes'](_0x8dd0f1)||this['_manuallyClosed']['delete'](_0x8dd0f1);for(const _0x699ee8 of this['annotations'])_0x271417['includes'](_0x699ee8)||this['_removeAnnotationFromBalloon'](_0x699ee8);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x48c603 of _0x271417)this['_addAnnotationToBalloon'](_0x48c603);}this['_selectedAnnotations']=_0x271417;}['_addAnnotationToBalloon'](_0x24a083,_0x558975=!0x1){this['_manuallyClosed']['has'](_0x24a083)||(this['_addedAnnotations']['has'](_0x24a083)||this['_balloon']['hasView'](_0x24a083['view'])||(this['_addedAnnotations']['add'](_0x24a083),this['_balloon']['add']({'stackId':_0x24a083['view']['id'],'view':_0x24a083['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x24a083)}})),_0x558975&&this['_balloon']['showStack'](_0x24a083['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4c5ddc){const _0x4eb3fb=_0x4c5ddc['target'],_0x1352c2=this['editor']['editing']['view'],_0x3082a8=_0x1352c2['document']['selection']['getFirstRange'](),_0x14eb7c=_0x1352c2['domConverter']['viewRangeToDom'](_0x3082a8);if(_0x14eb7c['collapse'](!0x0),_0x4eb3fb){if(_0x4eb3fb instanceof _0x50fe83)return _0x4eb3fb;let _0x25293f=[];for(const _0x2c17c5 of _0x4eb3fb)_0x25293f['push'](..._0x50fe83['getDomElementRects'](_0x2c17c5));_0x25293f=function(_0x1a7065){const _0x5b4b30=[];let _0x2ef16e=_0x1a7065[0x0];for(let _0x5940fb=0x1;_0x5940fb<_0x1a7065['length'];_0x5940fb++)if(Pi(_0x2ef16e,_0x1a7065[_0x5940fb])){const _0x43fbb4=_0x1a7065[_0x5940fb]['width'];_0x2ef16e['width']+=_0x43fbb4,_0x2ef16e['right']+=_0x43fbb4;}else _0x5b4b30['push'](_0x2ef16e),_0x2ef16e=_0x1a7065[_0x5940fb];return _0x5b4b30['push'](_0x2ef16e),_0x5b4b30;}(_0x25293f);const _0x2cc3e0=_0x14eb7c['getBoundingClientRect']();return _0x25293f['find'](_0x2ee006=>_0x2ee006['top']<=_0x2cc3e0['top']&&_0x2ee006['bottom']>=_0x2cc3e0['bottom']&&_0x2ee006['left']<=_0x2cc3e0['left']&&_0x2ee006['right']>=_0x2cc3e0['right'])||_0x25293f[0x0];}return _0x4c5ddc['targetRect']||_0x14eb7c;}['_removeAnnotationFromBalloon'](_0x2d62d0){this['_addedAnnotations']['has'](_0x2d62d0)&&this['_balloon']['hasView'](_0x2d62d0['view'])&&(this['_addedAnnotations']['delete'](_0x2d62d0),this['_balloon']['remove'](_0x2d62d0['view']));}['_closeAnnotation'](_0x29937f){this['_manuallyClosed']['add'](_0x29937f),this['_removeAnnotationFromBalloon'](_0x29937f);}};function Pi(_0x54657e,_0x440c3d){return _0x54657e['top']===_0x440c3d['top']&&_0x54657e['bottom']===_0x440c3d['bottom']&&_0x54657e['right']===_0x440c3d['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x15b935,_0x170448){super(_0x15b935),this['set']('isEmpty',!_0x170448['length']),this['focusTracker']=new _0x57589a(),this['_annotationViews']=_0x170448,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x170448,'focusTracker':this['focusTracker']}),this['listenTo'](_0x170448,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x170448,'remove',(_0x2fb8a5,_0x38fde8)=>{_0x38fde8['isActive']&&this['focus'](),_0x170448['length']||(this['isEmpty']=!0x0);});const _0x11fa3c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x15b935,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x170448},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x11fa3c['if']('isEmpty','ck-hidden',_0x1ba73f=>!_0x1ba73f)]},'children':[{'text':Et(_0x15b935,'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 _0x10bcd8 of this['_annotationViews'])this['focusTracker']['add'](_0x10bcd8['element']);this['_annotationViews']['on']('change',(_0x2ec111,{added:_0x172f61,removed:_0x202718})=>{for(const _0x4f43cc of _0x172f61)this['focusTracker']['add'](_0x4f43cc['element']);for(const _0x29ac4d of _0x202718)this['focusTracker']['remove'](_0x29ac4d['element']);});}},Di=class extends _0x388472{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x59008a){super(_0x59008a),this['archivedThreads']=new _0x5c875e();}['init'](){const _0x319fd2=this['context'],_0x20fee7=_0x319fd2['plugins']['get'](oi),_0xdf139d=_0x319fd2['plugins']['get'](ti);this['listenTo'](_0x20fee7,'addCommentThread',(_0x2db58e,{threadId:_0x4c6cb4})=>{const _0x145163=_0x20fee7['getCommentThread'](_0x4c6cb4);_0x145163['archivedAt']&&this['archivedThreads']['add'](_0x145163,this['_calculatePosition'](_0x145163['archivedAt'])),this['listenTo'](_0x145163,'change:archivedAt',(_0x3e1063,_0x5eb1e9,_0x49a9a4)=>{_0x49a9a4?this['archivedThreads']['has'](_0x145163)||this['archivedThreads']['add'](_0x145163,this['_calculatePosition'](_0x145163['archivedAt'])):this['archivedThreads']['has'](_0x145163)&&this['archivedThreads']['remove'](_0x145163);});}),this['listenTo'](_0x20fee7,'removeCommentThread',(_0x5828cb,{threadId:_0x5a6e3f})=>{const _0x590482=_0x20fee7['getCommentThread'](_0x5a6e3f);this['stopListening'](_0x590482),this['archivedThreads']['has'](_0x590482)&&this['archivedThreads']['remove'](_0x590482);},{'priority':'highest'}),this['listenTo'](_0xdf139d['collection'],'focus',(_0x11aa57,_0x1811c0)=>{_0x1811c0['isVisible']||(_0x1811c0['isActive']=!0x0,_0xdf139d['activate'](_0x1811c0));});}['_calculatePosition'](_0xeab401){const _0x28b5c0=[...this['archivedThreads']]['findIndex'](_0x247d00=>_0x247d00['archivedAt']<_0xeab401);return _0x28b5c0>-0x1?_0x28b5c0:this['archivedThreads']['length'];}},Vi=class extends _0x1228a1{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x13db02];}constructor(_0x26e53b){super(_0x26e53b),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x99ef5=this['editor'],_0x377339=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x99ef5['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3a0b06,!0x0)),_0x99ef5['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1d2395=this['_createCommentsArchiveButton'](rt);return _0x1d2395['set']({'role':'menuitemcheckbox'}),_0x1d2395;});const _0x4de2f4=_0x99ef5['plugins']['get'](Di),_0x4db810=_0x99ef5['plugins']['get']('Annotations'),_0x34cb2f=_0x99ef5['plugins']['get']('CommentsRepository');_0x4de2f4['archivedThreads']['forEach'](_0x242d84=>{this['_handleNewThread'](_0x242d84);}),this['listenTo'](_0x4de2f4['archivedThreads'],'add',(_0x4778ad,_0x1f34f2)=>{this['_handleNewThread'](_0x1f34f2);}),this['listenTo'](_0x4db810['collection'],'add',(_0x79691e,_0x295352)=>{const _0x43e593=this['_pendingThreads']['find'](_0x1a7c34=>{const _0x4dee7e=_0x34cb2f['_threadToController']['get'](_0x1a7c34);return _0x4dee7e&&_0x295352['innerView']===_0x4dee7e['view'];});if(_0x43e593){const _0xe3616f=this['_calculatePosition'](_0x43e593['archivedAt']);this['_addAnnotationToArchive'](_0x295352,_0xe3616f),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x43e593),0x1);}}),this['listenTo'](_0x4de2f4['archivedThreads'],'remove',(_0x45149c,_0x44358d)=>{const _0x584a09=_0x99ef5['config']['get']('collaboration.channelId');if(!_0x584a09||_0x44358d['channelId']===_0x584a09){if(this['_pendingThreads']['includes'](_0x44358d))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x44358d),0x1);else{const _0x46d30c=_0x34cb2f['_threadToController']['get'](_0x44358d),_0x4037fe=_0x4db810['getByInnerView'](_0x46d30c['view']);this['annotationViews']['remove'](_0x4037fe['view']),this['stopListening'](_0x4037fe),this['stopListening'](_0x4037fe['focusableElements']);}}}),this['listenTo'](_0x4db810['collection'],'add',(_0x1d53d1,_0x296a74)=>{this['listenTo'](_0x296a74,'escape',_0x377339);}),this['listenTo'](_0x4db810['collection'],'remove',(_0x4d19e6,_0x2b93a)=>{this['stopListening'](_0x2b93a,'escape',_0x377339);});}['_addAnnotationToArchive'](_0x41b899,_0x42e973){this['listenTo'](_0x41b899,'set:isVisible',_0xdee290=>{_0xdee290['return']=!0x1,_0xdee290['stop']();}),this['annotationViews']['add'](_0x41b899['view'],_0x42e973);}['_handleNewThread'](_0x2e53a8){const _0xdcf5e3=this['editor']['plugins']['get']('CommentsRepository'),_0x5b2af1=this['editor']['plugins']['get']('Annotations'),_0x136e77=this['editor']['config']['get']('collaboration.channelId');if(!_0x136e77||_0x2e53a8['channelId']===_0x136e77){const _0x11c7ac=_0xdcf5e3['_threadToController']['get'](_0x2e53a8);if(!_0x11c7ac)return void this['_pendingThreads']['push'](_0x2e53a8);const _0x3e91d2=this['_calculatePosition'](_0x2e53a8['archivedAt']),_0x377754=_0x5b2af1['getByInnerView'](_0x11c7ac['view']);_0x377754['isVisible']&&_0x5b2af1['_visibleAnnotations']['remove'](_0x377754),this['_addAnnotationToArchive'](_0x377754,_0x3e91d2);}}['_calculatePosition'](_0x6966f3){const _0x29263a=this['editor']['config']['get']('collaboration.channelId'),_0x90a19c=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x3d40fd=>_0x3d40fd['channelId']===_0x29263a)['findIndex'](_0x5e1bee=>_0x5e1bee['archivedAt']<_0x6966f3);return _0x90a19c<0x0||_0x90a19c>this['annotationViews']['length']?this['annotationViews']['length']:_0x90a19c-0x1;}['_toggleDialog'](){const _0x224797=this['editor'],_0x56d388=_0x224797['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x224797['locale'],this['annotationViews'])),'commentsArchive'===_0x56d388['id']?_0x56d388['hide']():_0x56d388['show']({'id':'commentsArchive','title':Et(_0x224797['locale'],'COMMENTS_ARCHIVE'),'icon':_0x49f299,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x2718da['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x34bd45,_0x2484a4=!0x1){const _0x2614a1=this['editor']['locale'],_0x584651=this['editor']['plugins']['get']('Dialog'),_0x2afe70=new _0x34bd45(_0x2614a1);return _0x2afe70['bind']('isEnabled')['to'](this,'isEnabled'),_0x2afe70['bind']('isOn')['to'](_0x584651,'id',_0x3f069b=>'commentsArchive'===_0x3f069b),_0x2afe70['set']({'label':Et(_0x2614a1,'COMMENTS_ARCHIVE'),'icon':_0x49f299,'isToggleable':!0x0}),_0x2484a4&&(_0x2afe70['tooltip']=!0x0),this['listenTo'](_0x2afe70,'execute',()=>this['_toggleDialog']()),_0x2afe70;}['_hideDialogOnAnnotationEscape']=_0x34674d=>{const _0x2a1371=_0x34674d['source'];if(!this['annotationViews']['has'](_0x2a1371['view']))return;const _0x35d8cb=this['editor']['plugins']['get']('Dialog');_0x35d8cb['isOpen']&&'commentsArchive'===_0x35d8cb['id']&&(_0x35d8cb['hide'](),_0x34674d['stop']());};},Bi=class extends _0x1228a1{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
|