@ckeditor/ckeditor5-comments 45.2.0-alpha.6 → 45.2.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/build/comments.js +1 -1
- package/dist/index.js +9 -9
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x556d29={}){function _0x2614d3(_0x1ef7ea){return _0x1ef7ea['map'](_0x35ff00=>String['fromCharCode'](_0x35ff00))['join']('');}(_0x556d29=Object['assign']({},_0x556d29))['plugins']||(_0x556d29['plugins']=Qt['defaultPlugins']),super(_0x556d29),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2614d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2614d3([0x76,0x69,0x65,0x77])][_0x2614d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2614d3([0x61,0x75,0x74,0x6f]),this[_0x2614d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2614d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2614d3([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2614d3([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2614d3([0x6f,0x6b])});}['create'](){const _0x4c330a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4c330a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3429d6=>{const _0x4f5f5a=this['model']['document']['getRoot'](),_0x3bc900=_0x4f5f5a&&_0x4f5f5a['getChild'](_0x4f5f5a['childCount']-0x1);_0x3429d6['setSelection'](_0x3bc900,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x194915=this['editing']['view'],_0x9a827a=_0x194915['document']['getRoot'](),_0x2e83d1=_0x9a827a['getChild'](0x0);_0x9a827a['childCount']>0x1||!_0x2e83d1||'p'!=_0x2e83d1['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x194915,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2e83d1['placeholder']=this['placeholder']),Ft({'view':_0x194915,'element':_0x2e83d1,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2e83d1);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4efe4b,_0x401cfa={}){super(_0x4efe4b),this['editor']=null,this['_editorConfig']=_0x401cfa,this['set']('value',_0x401cfa['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x4efe4b,'Reply...')),this['set']('submitLabel',E(_0x4efe4b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1096d1(),this['focusCycler']=new _0x47bf62({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x32888a,_0x20abd7)=>{this['cancelButtonView']['fire']('execute'),_0x20abd7();}),this['keystrokes']['set']('Ctrl+Enter',(_0x147e27,_0x13b459)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x13b459());}),this['on']('submit',(_0x84586c,_0x22883d)=>{_0x22883d['length']>0xfde8?(alert(E(_0x4efe4b,'TOO_LONG_COMMENT_ALERT',[_0x22883d['length'],0xfde8])),_0x84586c['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x20821a=this['editor'];this['element']['insertBefore'](_0x20821a['ui']['element'],this['element']['firstChild']),_0x20821a['model']['document']['on']('change',()=>this['value']=_0x20821a['getData']()),_0x20821a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x20821a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x54e363){-0x1===_0x54e363?(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:_0x3395d9}=this,_0xa80d9f=new _0x59b830(_0x3395d9);return _0xa80d9f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xa80d9f['withText']=!0x0,_0xa80d9f['bind']('label')['to'](this,'submitLabel'),_0xa80d9f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xa80d9f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xc7f54b,_0x3c6910)=>!_0x3c6910&&!!_0xc7f54b['trim']()),_0xa80d9f;}['_createCancelButton'](){const {locale:_0x381eee}=this,_0x4af9b7=new _0x59b830(_0x381eee);return _0x4af9b7['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4af9b7['label']=E(_0x381eee,'Cancel'),_0x4af9b7['withText']=!0x0,_0x4af9b7['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4af9b7;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x565959=>{this['focusTracker']['add'](_0x565959['element']);}),this['focusables']['on']('change',(_0x4d9510,_0x37607b)=>{for(const _0x4309ea of Array['from'](_0x37607b['added'])['reverse']())this['focusTracker']['add'](_0x4309ea['element']);});}}class ie extends kt{constructor(_0x3fbd80,_0x568d09,_0x53722a){super(_0x3fbd80),this['commentInputView']=new os(_0x3fbd80,_0x53722a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x54bf95,_0x6a836)=>_0x54bf95||!!_0x6a836),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 _0x1d38bf(_0x3fbd80,_0x568d09),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'](_0x3fc296){this['commentInputView']['focus'](_0x3fc296);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2f6feb,_0x485acd)=>{const {submitButtonView:_0x2fd272,cancelButtonView:_0x2a6dde,editor:_0x12e7f4}=this['commentInputView'];[_0x2fd272['element'],_0x2a6dde['element'],_0x12e7f4?_0x12e7f4['editing']['view']['getDomRoot']():null]['filter'](_0x185512=>_0x185512)['some'](_0xafc9fb=>_0xafc9fb['contains'](_0x485acd['target']))||(this['focus'](),_0x485acd['preventDefault']());});}}class cs extends kt{constructor(_0x370f12){super(_0x370f12);const _0x5a0805=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5a0805['to']('count',_0x771645=>E(_0x370f12,'NUMBER_OF_COMMENTS',_0x771645))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x10c0ce,_0x1326f3,_0x3d32bb){super(_0x10c0ce);const _0x1c3587=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1326f3['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1326f3,this['_config']=_0x3d32bb,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1096d1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47bf62({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3b3bcb=>this['commentViews']['map'](_0x55f86e=>_0x55f86e['element'])['includes'](_0x3b3bcb['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x10c0ce),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x9cef50=>_0x9cef50-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1502d5 of _0x1326f3['comments'])this['_handleNewCommentModel'](_0x1502d5);this['_handleInfoComment'](),this['listenTo'](_0x1326f3['comments'],'add',(_0x13f44e,_0x3df86d)=>{const _0x2def6d=this['_calculatePosition'](_0x3df86d);this['length']++,this['_handleNewCommentModel'](_0x3df86d,_0x2def6d),this['refreshVisibleViews']();}),this['listenTo'](_0x1326f3['comments'],'remove',(_0x2292ce,_0x5eb3af)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5eb3af),this['refreshVisibleViews']();}),this['listenTo'](_0x1326f3,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1326f3,'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',_0x1c3587['if']('length','ck-hidden',_0x51e776=>!_0x51e776)],'aria-label':E(_0x10c0ce,'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'](_0x55e5c2){-0x1===_0x55e5c2?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4da7e5 of this['commentViews'])_0x4da7e5['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x7d8bf9,_0x4a24c8){const _0x4625b2=new this['_config']['CommentView'](this['locale'],_0x7d8bf9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4625b2['viewUid']=_0x7d8bf9['id'],_0x4625b2['delegate']('removeComment')['to'](this),_0x4625b2['delegate']('updateComment')['to'](this),_0x4625b2['delegate']('resolveCommentThread')['to'](this),_0x4625b2['delegate']('editorReady')['to'](this),_0x4625b2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4625b2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4625b2,_0x4a24c8);}['_calculatePosition'](_0x246a7c){const _0x399d8d=this['_model']['_findOptimalIndex'](_0x246a7c);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x246a7c['authoredAt']?_0x399d8d-0x1:_0x399d8d:_0x399d8d-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x486f87={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x486f87,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x486f87));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x110403){const _0x393fbf=this['commentViews']['remove'](_0x110403['id']);this['stopListening'](_0x393fbf),_0x393fbf['isEditMode']&&this['_updateHasDirtyComment'](),_0x393fbf['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5d3d95=>_0x5d3d95['isEditMode']);}['_rearrangeCollapse'](){const _0x5d5131=function(_0x5954e2){const _0x2e208b=new _0x321144();for(const _0x1b17dd of _0x5954e2)_0x2e208b['add'](_0x1b17dd);return _0x2e208b;}(this['commentViews']),_0x3d237c=this['_collapsedCommentsView']['count'];for(let _0x369c6b=0x1;_0x369c6b<=_0x3d237c;_0x369c6b++)_0x5d5131['remove'](0x1);for(const _0x1ef892 of _0x5d5131)_0x1ef892['collapse']();_0x3d237c>0x0&&_0x5d5131['add'](this['_collapsedCommentsView'],0x1),ns(_0x4dd938(Array['from'](this['visibleViews']),Array['from'](_0x5d5131)),this['visibleViews'],_0x5d5131);}['_rearrangeExpand'](){ns(_0x4dd938(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xef8800 of this['visibleViews'])_0xef8800['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2afb1f=>{this['focusTracker']['add'](_0x2afb1f['element']),this['keystrokes']['listenTo'](_0x2afb1f['element']);}),this['commentViews']['on']('change',(_0x42c38e,_0x5030a3)=>{for(const _0x484b71 of _0x5030a3['removed'])this['focusTracker']['remove'](_0x484b71['element']),this['keystrokes']['stopListening'](_0x484b71['element']);for(const _0x5db739 of Array['from'](_0x5030a3['added'])['reverse']())this['focusTracker']['add'](_0x5db739['element']),this['keystrokes']['listenTo'](_0x5db739['element']);});}}function ns(_0x375f4a,_0x175e55,_0x5ee58f){let _0xb02d07=0x0;for(const _0x360349 of _0x375f4a)switch(_0x360349){case'insert':_0x175e55['add'](_0x5ee58f['get'](_0xb02d07),_0xb02d07),_0xb02d07++;break;case'delete':_0x175e55['remove'](_0xb02d07);break;case'equal':_0xb02d07++;}}class as extends kt{constructor(_0x341f7f){super(_0x341f7f);const _0x2ad221=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2ad221['to']('contextValue',_0x480f7e=>E(_0x341f7f,'THREAD_CONTEXT_LABEL',_0x480f7e)),'tabindex':-0x1},'children':[{'text':_0x2ad221['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5b4a18,_0x49cc57){super(_0x5b4a18);const _0x524c72=this['bindTemplate'];this['_model']=_0x49cc57,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1096d1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47bf62({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1e1a19=>!!_0x1e1a19),this['bind']('contextValue')['to'](this['_model'],'context',_0x2b48ec=>_0x2b48ec&&_0x2b48ec['value']?this['_trimContextValue'](_0x2b48ec['value']):E(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',_0x524c72['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 _0x546a9b=new _0x59b830(this['locale']);return _0x546a9b['label']=E(this['locale'],'Reopen'),_0x546a9b['tooltip']=E(this['locale'],'Reopen'),_0x546a9b['icon']=_0x8344d6,_0x546a9b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x31c7b4=>!_0x31c7b4),_0x546a9b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x141872,_0x2d0e14)=>_0x141872&&_0x2d0e14),_0x546a9b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x546a9b;}['_trimContextValue'](_0x2fb2dd){if(_0x2fb2dd['length']<0x96)return _0x2fb2dd;const _0x3c82dd=_0x2fb2dd['lastIndexOf']('\x20',0x93);return _0x2fb2dd['substring'](0x0,_0x3c82dd>-0x1?_0x3c82dd:0x93)+'...';}['_attachContextActions'](){const _0x4831d9=this['element']['querySelector']('.ck-context'),_0x1e44c6=_0x4831d9['querySelector']('.ck-context__value');this['listenTo'](_0x4831d9,'mouseenter',()=>{_0x1e44c6['offsetWidth']<_0x1e44c6['scrollWidth']&&_0x4831d9['classList']['add']('overlay');}),this['listenTo'](_0x4831d9,'mouseleave',()=>{_0x4831d9['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x31501d of this['focusables'])this['focusTracker']['add'](_0x31501d['element']),this['keystrokes']['listenTo'](_0x31501d['element']);}['_createContextView'](){const _0x5c41a8=new as(this['locale']);return _0x5c41a8['bind']('contextValue')['to'](this),_0x5c41a8;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5ae181,_0x364805,_0x407b31,_0x342901){super(_0x5ae181),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x364805,this['_localUser']=_0x407b31,this['_config']=_0x342901,this['commentThreadHeaderView']=new Xt(_0x5ae181,_0x364805),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5ae181,E(_0x5ae181,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5ae181,_0x364805,Object['assign']({'CommentView':this['_config']['CommentView']},_0x342901)),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',(_0x3c2ef2,_0x1c7369)=>_0x3c2ef2||!!_0x1c7369),this['bind']('isUnlinked')['to'](_0x364805,'unlinkedAt',_0x286d65=>!!_0x286d65),this['bind']('ariaLabel')['to'](this,'length',_0x27649a=>{const _0x39036a=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x27649a,_0x39036a]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1096d1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47bf62({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x569379=>_0x569379['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x15ccc5=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2c24ff=_0x15ccc5['commentInputView'];return _0x15ccc5['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2c24ff,'value',(_0x7c8604,_0x455827,_0x3ebcfd,_0x22e6e2,_0x2bd02b)=>!!_0x2bd02b||!!_0x22e6e2&&_0x3ebcfd&&!_0x455827||_0x7c8604&&_0x3ebcfd&&!_0x455827),_0x2c24ff['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5b4dca,_0x55034f,_0x322618)=>{let _0x19d79e;return _0x19d79e=_0x322618&&_0x55034f?'Reply\x20to\x20reopen\x20discussion...':_0x5b4dca?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x19d79e);}),_0x2c24ff['bind']('submitLabel')['to'](this,'length',_0x55c847=>E(this['locale'],_0x55c847?'Reply':'Comment')),_0x2c24ff['on']('submit',(_0x2c0c15,_0x3daca1)=>{this['fire']('addComment',_0x3daca1),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2c24ff['on']('cancel',()=>{this['focus']();}),_0x2c24ff['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2c24ff['on']('cancel',_0x17032a=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x17032a['stop']());}),this['on']('change:isActive',(_0x2a414c,_0x5d5d2f,_0x2be633)=>{_0x2be633||this['length']||_0x2c24ff['value']||this['fire']('removeCommentThread');}),_0x15ccc5;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(hs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x4ba4c4(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1be5c7,target:_0x792421,type:_0x399fa6,isVisible:_0x120e10=!0x0}){super(),this['view']=_0x1be5c7,this['view']['element']||this['view']['render'](),this['_type']=_0x399fa6,this['_target']=_0x792421,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x321144([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1ff7eb,_0x106317)=>{this['view']['focusTracker']['add'](_0x106317);}),this['focusableElements']['on']('remove',(_0x19c681,_0x465417)=>{this['view']['focusTracker']['remove'](_0x465417);}),this['set']('isVisible',_0x120e10);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x33d075=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x33d075),_0x33d075;}get['targetRect'](){const _0x242e36=this['target'];if(null===_0x242e36)return null;if(_0x242e36 instanceof _0x212c58)return _0x242e36;const _0x44b818=_0x242e36['filter'](_0x5086b9=>function(_0x4f31a5){const _0x2f8ee3=_0x4f31a5['offsetParent'];if(_0x2f8ee3)return!0x0;const _0x21f532=_0x4f31a5['getClientRects']()['item'](0x0);return!!_0x21f532;}(_0x5086b9));return 0x0===_0x44b818['length']?null:new _0x212c58(_0x44b818[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x45af8a){this['view']['isActive']=_0x45af8a,this['view']['mainView']['isActive']=_0x45af8a;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x9a4f89){if(!(null===_0x9a4f89||_0x9a4f89 instanceof _0x212c58||Array['isArray'](_0x9a4f89)&&_0x9a4f89['every'](_0xd928bd=>li(_0xd928bd))))throw new _0x5bf711('annotation-invalid-target',null,{'target':_0x9a4f89});}['_getNormalizedTarget'](){const _0x3f9b13='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x3f9b13)?[_0x3f9b13]:_0x3f9b13;}}function li(_0x30d5a4){return null!==_0x30d5a4&&'object'==typeof _0x30d5a4&&'nodeType'in _0x30d5a4&&0x1===_0x30d5a4['nodeType'];}class _ extends _0x321144{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x12687f=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1096d1(),this['_focusTracker']['on']('change:isFocused',(_0x289e60,_0x263286,_0x24b4c6)=>{_0x24b4c6||this['fire']('blur');});for(const _0x30502a of _0x12687f)this['add'](_0x30502a);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4ab441){if(this['has'](_0x4ab441))throw new _0x5bf711('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4ab441['innerView'],_0x4ab441),this['_viewToAnnotation']['set'](_0x4ab441['view'],_0x4ab441);for(const _0x486f6d of _0x4ab441['focusableElements'])this['_focusTracker']['add'](_0x486f6d);this['listenTo'](_0x4ab441['focusableElements'],'add',(_0x529eaa,_0x1f426e)=>{this['_focusTracker']['add'](_0x1f426e);}),this['listenTo'](_0x4ab441['focusableElements'],'remove',(_0x262591,_0x29524d)=>{this['_focusTracker']['remove'](_0x29524d);}),this['listenTo'](_0x4ab441['view']['focusTracker'],'change:isFocused',(_0x4091f2,_0x2a03e3,_0x124772)=>{_0x124772&&this['fire']('focus',_0x4ab441);}),_0x4ab441['updateTargetRect']();const _0x50d125=this['_getOrderInContent'](_0x4ab441['view']['targetRect']);return super['add'](_0x4ab441,_0x50d125);}['remove'](_0x1a8c84){if(!this['has'](_0x1a8c84))throw new _0x5bf711('annotationcollection-not-existing-item',null);this['stopListening'](_0x1a8c84['view']['focusTracker']),this['stopListening'](_0x1a8c84['focusableElements']);for(const _0x1087a9 of _0x1a8c84['focusableElements'])this['_focusTracker']['remove'](_0x1087a9);return this['_viewToAnnotation']['delete'](_0x1a8c84['view']),this['_innerViewToAnnotation']['delete'](_0x1a8c84['innerView']),super['remove'](_0x1a8c84);}['getByInnerView'](_0x24dd6a){return this['_innerViewToAnnotation']['get'](_0x24dd6a);}['getByView'](_0x56e8a1){return this['_viewToAnnotation']['get'](_0x56e8a1);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x10ab1c of this)_0x10ab1c['updateTargetRect']();this['_sort']();}['_sort'](){const _0x23b76c=Array['from'](this)['sort']((_0x12698a,_0x3a668d)=>v(_0x12698a['view']['targetRect'],_0x3a668d['view']['targetRect']));for(let _0x3f296f=_0x23b76c['length']-0x1;_0x3f296f>0x0;_0x3f296f--){const _0x5cc1cb=_0x23b76c[_0x3f296f];_0x3f296f!==this['getIndex'](_0x5cc1cb)&&(this['remove'](_0x5cc1cb),this['add'](_0x5cc1cb));}}['_getOrderInContent'](_0x349420){let _0x4fa541=0x0;if(!_0x349420)return this['length'];for(const _0x3836b6 of this){const _0x3b5fb2=_0x3836b6['view']['targetRect'];if(_0x3b5fb2){if(v(_0x349420,_0x3b5fb2)<0x0)return _0x4fa541;_0x4fa541++;}}return _0x4fa541;}}function v(_0x4d9723,_0x3c214b){if(null===_0x4d9723&&null===_0x3c214b)return 0x0;if(null===_0x4d9723)return-0x1;if(null===_0x3c214b)return 0x1;const _0x27a047=_0x4d9723['top']-_0x3c214b['top'];return 0x0==_0x27a047?_0x4d9723['left']-_0x3c214b['left']:_0x27a047;}class O extends _0x27e7bc{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x363493){if(super(_0x363493),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x363493 instanceof _0x5704e9){const _0x58cd25=_0x363493['locale'];_0x363493['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4c6c11){this['collection']['add'](_0x4c6c11);}['remove'](_0x153640){this['collection']['remove'](_0x153640),_0x153640['destroy']();}['refreshVisibility'](){for(const _0x596445 of this['collection'])_0x596445['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2e18f6){return this['collection']['getByInnerView'](_0x2e18f6);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x43890e of this['collection'])_0x43890e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x297df8){this['fire']('_activateAnnotation',_0x297df8);}['createAnnotation'](_0x4b386e){return new d(_0x4b386e);}['createAnnotationView'](_0x3ebc22,_0x1a62d7){return new S(_0x3ebc22,_0x1a62d7);}['_addActiveAnnotation'](_0x4b4b39){const _0x199fe5=new Set(this['activeAnnotations']);_0x199fe5['add'](_0x4b4b39),this['activeAnnotations']=_0x199fe5;}['_removeActiveAnnotation'](_0x35cd3b){const _0x2a87b9=new Set(this['activeAnnotations']);_0x2a87b9['delete'](_0x35cd3b),this['activeAnnotations']=_0x2a87b9;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4f4d58=this['collection'],_0x238ed9=this['_visibleAnnotations'];function _0x2198a9(_0x40c2b9){const _0x595bdc=_0x40c2b9['source'];_0x595bdc['isVisible']&&!_0x238ed9['has'](_0x595bdc)?_0x238ed9['add'](_0x595bdc):!_0x595bdc['isVisible']&&_0x238ed9['has'](_0x595bdc)&&_0x238ed9['remove'](_0x595bdc),_0x595bdc['view']['focusTracker']['remove'](_0x595bdc['view']['element']),_0x595bdc['view']['focusTracker']['add'](_0x595bdc['view']['element']);}this['listenTo'](_0x4f4d58,'add',(_0x599ea0,_0x5ec638)=>{_0x5ec638['isVisible']&&_0x238ed9['add'](_0x5ec638),this['listenTo'](_0x5ec638,'change:isVisible',_0x2198a9);}),this['listenTo'](_0x4f4d58,'remove',(_0x593589,_0x4b9bf2)=>{_0x238ed9['has'](_0x4b9bf2)&&_0x238ed9['remove'](_0x4b9bf2),this['stopListening'](_0x4b9bf2,'change:isVisible',_0x2198a9);});}['_setupEnterAnnotationKeystroke'](){const _0x59fb4a=_0x999a79=>{_0x999a79['on']('ready',()=>{_0x999a79['keystrokes']['set'](_0x2e9390,(_0x358c7c,_0x487831)=>{const _0x29eea4=_0x1ab4c8(this['activeAnnotations']['values']());_0x29eea4&&(_0x29eea4['view']['focus'](),_0x487831());});});};this['context']instanceof _0x5704e9?_0x59fb4a(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x19c897,_0x43b734)=>{_0x59fb4a(_0x43b734);});}['_setupEscapeAnnotationHandling'](){const _0x173e8c=_0x352d8f=>{const _0xa62ced=_0x352d8f['source'],_0x3010e6=[];let _0x1115e8;if(Array['isArray'](_0xa62ced['target'])){_0x1115e8=_0xa62ced['target'][0x0],this['context']instanceof _0x5704e9?_0x3010e6['push'](this['context']):this['context']['editors']&&_0x3010e6['push'](...this['context']['editors']);for(const _0x19fa9a of _0x3010e6)for(const _0x2589f4 of _0x19fa9a['editing']['view']['domRoots']['values']())if(_0x2589f4['contains'](_0x1115e8))return void _0x19fa9a['editing']['view']['focus']();_0x1115e8['focus']();}};this['listenTo'](this['collection'],'add',(_0xd4e594,_0xda7164)=>{this['listenTo'](_0xda7164,'escape',_0x173e8c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5d57ea,_0xb116ba)=>{this['stopListening'](_0xb116ba,'escape',_0x173e8c);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x27e7bc{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c1c8b){super(_0x1c1c8b),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2c1cf5=this['context']['config'];_0x2c1cf5['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2c1cf5['define']('comments.maxThreadTotalWeight',0x1f4),_0x2c1cf5['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2c1cf5['define']('comments.CommentThreadView',vt),_0x2c1cf5['define']('comments.CommentView',gt),_0x2c1cf5['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xcad046=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0xd6960a,_0x2a85bf)=>this['_addCommentThread'](_0x2a85bf)),this['on']('submitCommentThread',(_0x57bde1,_0x22bf77)=>this['_submitCommentThread'](_0x22bf77)),this['on']('resolveCommentThread',(_0x84a97b,_0x2449aa)=>this['_resolveCommentThread'](_0x2449aa)),this['on']('resolveCommentThread',(_0x4f475a,_0xbf85b)=>this['_updateActiveAnnotation'](_0xbf85b),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xb92d44,_0x55998c)=>this['_reopenCommentThread'](_0x55998c)),this['on']('reopenCommentThread',(_0x48ff28,_0x251a87)=>this['_updateActiveAnnotation'](_0x251a87),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x15068c,_0x11656c)=>this['_removeCommentThread'](_0x11656c)),this['on']('updateCommentThread',(_0x441303,_0x23d6ff)=>this['_updateCommentThread'](_0x23d6ff)),this['on']('updateCommentThread',(_0x3015a9,_0x206d97)=>this['_updateActiveAnnotation'](_0x206d97),{'priority':'lowest'}),this['on']('addComment',(_0x512d64,_0x46d447)=>this['_addComment'](_0x46d447)),this['on']('updateComment',(_0x30279a,_0x4c2caf)=>this['_updateComment'](_0x4c2caf)),this['on']('removeComment',(_0x54fdce,_0x2e667c)=>this['_removeComment'](_0x2e667c)),this['on']('addComment',(_0x5cda80,{threadId:_0x1e27b1,isFromAdapter:_0x9569b6})=>{if(_0x9569b6)return;const _0x1cdf89=this['getCommentThread'](_0x1e27b1),_0x2e691a=_0x1cdf89&&this['_threadToController']['get'](_0x1cdf89);_0x2e691a&&_0x2e691a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xcad046,'change:activeAnnotations',(_0x2cb45c,_0x370757,_0x36a5e5)=>{const _0x37b041=Array['from'](_0x36a5e5)['map'](_0x54750e=>this['_viewToController']['get'](_0x54750e['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x37b041?_0x37b041['model']:null;});}set['adapter'](_0x39b614){if(this['_adapter'])throw new _0x5bf711('commentsrepository-adapter-already-set');this['_adapter']=_0x39b614;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x40ece2=Tt,threadId:_0x2a59e8=_0x5d5a44(),comments:_0x2a8335=[],unlinkedAt:_0xbb2c81=null,resolvedAt:_0x5ec783=null,resolvedBy:_0x2dd005=null,target:_0x444ee9=null,context:_0x16fea7=null,attributes:_0x3ebc53={},isResolvable:_0x1394c2=!0x0,isSubmitted:_0xa92111=!0x1,isFromAdapter:_0x2cce40=!0x1}={}){return this['fire'](bt('addCommentThread',_0x40ece2),{'channelId':_0x40ece2,'threadId':_0x2a59e8,'comments':_0x2a8335,'unlinkedAt':_0xbb2c81,'resolvedAt':_0x5ec783,'resolvedBy':_0x2dd005,'target':_0x444ee9,'context':_0x16fea7,'attributes':_0x3ebc53,'isFromAdapter':_0x2cce40,'isResolvable':_0x1394c2,'isSubmitted':_0xa92111}),this['getCommentThread'](_0x2a59e8);}['openNewCommentThread']({channelId:_0x108c31=Tt,threadId:_0x111908=_0x5d5a44(),target:_0x3d2aa5,context:_0x1726d9=null,isResolvable:_0xb272da=!0x0}){if(this['_readOnlyChannels']['has'](_0x108c31)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3d2aa5)throw new _0x5bf711('commentsrepository-missing-target');const _0x490b31=this['addCommentThread']({'channelId':_0x108c31,'threadId':_0x111908,'target':_0x3d2aa5,'context':_0x1726d9,'isResolvable':_0xb272da});if(!_0x490b31)return null;const _0x553280=this['_threadToController']['get'](_0x490b31),_0x2108c5=_0x553280['view']['commentThreadInputView']['commentInputView'],_0x33b19a=this['context']['plugins']['get'](O),_0x2e0b39=_0x33b19a['getByInnerView'](_0x553280['view']);return _0x33b19a['activate'](_0x2e0b39),_0x2108c5['once']('editorReady',()=>_0x2108c5['focus']()),_0x490b31;}['hasCommentThread'](_0x572ad2){if('string'!=typeof _0x572ad2)throw new _0x5bf711('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x572ad2);}['updateCommentThread']({channelId:_0x66b942=Tt,threadId:_0x453b63,context:_0x58b436,unlinkedAt:_0x5d3790,attributes:_0x756b95,isFromAdapter:_0x1a4d98=!0x1}){return this['fire'](bt('updateCommentThread',_0x66b942),{'channelId':_0x66b942,'threadId':_0x453b63,'context':_0x58b436,'unlinkedAt':_0x5d3790,'attributes':_0x756b95,'isFromAdapter':_0x1a4d98}),this['getCommentThread'](_0x453b63);}['getCommentThread'](_0x54cfb5){if('string'!=typeof _0x54cfb5)throw new _0x5bf711('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x54cfb5);}['fetchCommentThread']({channelId:_0x3e9b98,threadId:_0x2c1786}={}){const _0x5ee506=this['getCommentThread'](_0x2c1786);if(_0x5ee506)return Promise['resolve'](_0x5ee506);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5bf711('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3e9b98,'threadId':_0x2c1786})['then'](_0x53e692=>this['hasCommentThread'](_0x2c1786)?this['getCommentThread'](_0x2c1786):_0x53e692?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3e9b98},_0x53e692)):void 0x0)['catch'](_0x4c73c3=>{throw console['error'](_0x4c73c3),new _0x5bf711('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x178eab,skipNotAttached:_0xa1d199=!0x1,skipEmpty:_0x21f5e8=!0x1,toJSON:_0x2d3ebc=!0x1}={}){const _0x2d3729=[];for(const _0x4bbf30 of this['_threads']['values']())_0x178eab&&_0x4bbf30['channelId']!==_0x178eab||_0xa1d199&&!_0x4bbf30['isAttached']||_0x21f5e8&&0x0===_0x4bbf30['length']||_0x2d3729['push'](_0x4bbf30);return _0x2d3ebc?_0x2d3729['map'](_0x1ad6b6=>_0x1ad6b6['toJSON']()):_0x2d3729;}['setActiveCommentThread'](_0x128f44){const _0x50aba2=this['context']['plugins']['get'](O);if(!_0x128f44)return void(this['activeCommentThread']&&_0x50aba2['deactivateAll']());const _0x9ec89f=this['getCommentThread'](_0x128f44);if(!_0x9ec89f)throw new _0x5bf711('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x128f44});if(!this['_threadToController']['has'](_0x9ec89f))throw new _0x5bf711('commentsrepository-active-not-attached',null,{'threadId':_0x128f44});const _0x3db1eb=_0x50aba2['getByInnerView'](this['_threadToController']['get'](_0x9ec89f)['view']);_0x50aba2['activate'](_0x3db1eb);}['switchReadOnly'](_0x4edb1c,_0x330578){_0x4edb1c?this['_readOnlyChannels']['add'](_0x330578):this['_readOnlyChannels']['delete'](_0x330578),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x44743a){return this['_readOnlyChannels']['has'](_0x44743a)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x56886b,_0x999f59){return new Ct(_0x56886b,_0x999f59);}['setPermissions'](_0x5f425c,_0x5e38ba=Tt){this['_permissions']['set'](_0x5e38ba,_0x5f425c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x299f13=Tt){return this['_permissions']['has'](_0x299f13)?this['_permissions']['get'](_0x299f13):_t;}['_addCommentThread']({channelId:_0x4d642a,threadId:_0xb74e1f,comments:_0x1f6fc4,unlinkedAt:_0x3769ed,resolvedAt:_0x40be3a,resolvedBy:_0x12cb62,target:_0x50315e,context:_0x49a5d0,attributes:_0x40a899,isFromAdapter:_0x1947ab,isResolvable:_0x1fbe55,isSubmitted:_0x69472f}){if('string'!=typeof _0xb74e1f)throw new _0x5bf711('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xb74e1f});if(this['hasCommentThread'](_0xb74e1f))throw new _0x5bf711('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xb74e1f});const _0x222e00=new ui(this,{'channelId':_0x4d642a,'id':_0xb74e1f,'context':_0x49a5d0,'attributes':_0x40a899,'unlinkedAt':_0x3769ed,'resolvedAt':_0x40be3a,'resolvedBy':_0x12cb62?this['context']['plugins']['get'](it)['getUser'](_0x12cb62):null,'isResolvable':_0x1fbe55,'isSubmitted':_0x69472f||_0x1947ab});this['_threads']['set'](_0xb74e1f,_0x222e00);for(const _0x5ec166 of _0x1f6fc4)_0x222e00['_add'](this['_createNewComment']({'threadId':_0xb74e1f,..._0x5ec166}));return _0x50315e&&_0x222e00['attachTo'](_0x50315e),_0x1947ab||!_0x222e00['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4d642a,'threadId':_0xb74e1f});}['_submitCommentThread']({channelId:_0x11dbf0,threadId:_0x55295c}){if(!this['hasCommentThread'](_0x55295c))throw new _0x5bf711('commentsrepository-missing-comment-thread',this);const _0x3dbb6f=this['getCommentThread'](_0x55295c);if(_0x3dbb6f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x11d789,comments:_0x454245,resolvedAt:_0x1f3eb5,resolvedBy:_0x2cc2e8,context:_0x21d862,attributes:_0xc677f7}=_0x3dbb6f,_0xe5ec1e=this['context']['plugins']['get']('PendingActions'),_0x302c22=_0xe5ec1e['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x11dbf0,'threadId':_0x11d789,'comments':_0x454245['map'](_0xe1bdf7=>_0xe1bdf7['toJSON']()),'resolvedAt':_0x1f3eb5,'resolvedBy':_0x2cc2e8?_0x2cc2e8['id']:_0x2cc2e8,'context':_0x21d862,'attributes':_0xc677f7})['then'](({comments:_0x55df1f})=>{_0xe5ec1e['remove'](_0x302c22);for(const _0x2b0dc6 of _0x55df1f)this['_updateComment']({'channelId':_0x11dbf0,'threadId':_0x55295c,'commentId':_0x2b0dc6['commentId'],'createdAt':_0x2b0dc6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1dec9f=>{throw console['error'](_0x1dec9f),new _0x5bf711('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x599b3d,target:_0x880e62}){const _0x1efa5b=this['getCommentThread'](_0x599b3d);if(!_0x1efa5b)throw new _0x5bf711('commentsrepository-attach-missing-comment-thread',this);const _0x56a21d=this['context']['plugins']['get']('PendingActions'),_0x11809e=this['context']['plugins']['get'](O),_0x4bf114=this['_createCommentThreadView'](_0x1efa5b),_0x12b802=new Ct(_0x1efa5b,_0x4bf114);let _0x526c50=null;_0x4bf114['on']('change:isDirty',(_0x2b3ef4,_0x20dcb9,_0xe537f)=>{_0xe537f?_0x526c50=_0x56a21d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x526c50&&(_0x56a21d['remove'](_0x526c50),_0x526c50=null);}),this['_threadToController']['set'](_0x1efa5b,_0x12b802),this['_viewToController']['set'](_0x4bf114,_0x12b802);const _0x41554d=new S(this['context']['locale'],_0x4bf114);_0x41554d['bind']('length')['to'](_0x4bf114),_0x41554d['bind']('isDirty')['to'](_0x4bf114,'isDirty',_0x4bf114,'length',(_0x4e80b8,_0x22d9dc)=>_0x4e80b8||!_0x22d9dc),_0x41554d['bind']('isActive')['to'](_0x4bf114),_0x41554d['type']='comment';const _0x5d6b66=new d({'view':_0x41554d,'target':_0x880e62,'type':'comment','isVisible':!_0x1efa5b['archivedAt']});return _0x4bf114['on']('escape',()=>{_0x5d6b66['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4bf114,_0x5d6b66),_0x11809e['add'](_0x5d6b66),_0x5d6b66;}['_bindAnnotationToEditors'](_0x48d513,_0x3e7d20){this['listenTo'](_0x48d513,'editorReady',(_0x1f8cef,_0x5a7cb6)=>{const _0x5401db=_0x5a7cb6['ui']['view']['body']['bodyCollectionContainer'];_0x3e7d20['focusableElements']['add'](_0x5401db),this['context']instanceof _0x5704e9&&this['context']['ui']['focusTracker']['add'](_0x5401db);},{'priority':'highest'}),this['listenTo'](_0x48d513,'editorDestroyed',(_0xf6df50,_0x5c820c)=>{const _0x283a2a=_0x5c820c['ui']['view']['body']['bodyCollectionContainer'];_0x3e7d20['focusableElements']['has'](_0x283a2a)&&_0x3e7d20['focusableElements']['remove'](_0x283a2a),this['context']instanceof _0x5704e9&&this['context']['ui']['focusTracker']['remove'](_0x283a2a);});}['_unbindEditors'](_0x346946){this['stopListening'](_0x346946,'editorReady'),this['stopListening'](_0x346946,'editorDestroyed');}['_createCommentThreadView'](_0x32bc4a){const _0x3a5ce0=this['context']['plugins']['get'](it),{config:_0x4d102c,locale:_0x18c804}=this['context'],_0x34ade0=lt(_0x4d102c['get']('locale'),_0x18c804);return new(0x0,(_0x4d102c['get']('comments'))['CommentThreadView'])(_0x18c804,_0x32bc4a,_0x3a5ce0['me'],{'editorConfig':{..._0x4d102c['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4d102c['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4d102c['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4d102c['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4d102c['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x34ade0,'CommentView':_0x4d102c['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1b88b4,channelId:_0x67e7b7,resolvedAt:_0x111002,resolvedBy:_0x542a8c,isFromAdapter:_0x45397c}){if(!this['hasCommentThread'](_0x1b88b4))throw new _0x5bf711('commentsrepository-missing-comment-thread',null,{'threadId':_0x1b88b4});const _0x21e33c=this['getCommentThread'](_0x1b88b4);if(_0x21e33c['isResolved'])throw new _0x5bf711('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1b88b4});const _0x209ad0=this['context']['plugins']['get'](it);if(_0x21e33c['resolvedBy']=_0x209ad0['getUser'](_0x542a8c),_0x21e33c['resolvedAt']=_0x111002,_0x45397c||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1604ce=this['context']['plugins']['get']('PendingActions'),_0x22bc0=_0x1604ce['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x67e7b7,'threadId':_0x1b88b4})['then'](({resolvedAt:_0x3088c9,resolvedBy:_0x389cb4})=>{_0x1604ce['remove'](_0x22bc0),_0x21e33c['resolvedBy']['id']!==_0x389cb4&&(_0x21e33c['resolvedBy']=_0x209ad0['getUser'](_0x389cb4)),_0x21e33c['resolvedAt']=_0x3088c9;})['catch'](_0x1d269a=>{throw console['error'](_0x1d269a),new _0x5bf711('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x39f2c6,channelId:_0x31a129,isFromAdapter:_0x46ec84}){if(!this['hasCommentThread'](_0x39f2c6))throw new _0x5bf711('commentsrepository-missing-comment-thread',null,{'threadId':_0x39f2c6});const _0x1f9a2c=this['getCommentThread'](_0x39f2c6);if(!_0x1f9a2c['isResolved'])throw new _0x5bf711('commentsrepository-reopen-comment-thread',null,{'threadId':_0x39f2c6});if(_0x1f9a2c['resolvedBy']=null,_0x1f9a2c['resolvedAt']=null,_0x46ec84||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x208128=this['context']['plugins']['get']('PendingActions'),_0x5f58ef=_0x208128['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x31a129,'threadId':_0x39f2c6})['then'](()=>_0x208128['remove'](_0x5f58ef))['catch'](_0x4536f6=>{throw console['error'](_0x4536f6),new _0x5bf711('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x42db03,isFromAdapter:_0x25f0a8}){const _0x9c3805=this['getCommentThread'](_0x42db03);if(!_0x9c3805)throw new _0x5bf711('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x42db03),this['_threads']['delete'](_0x42db03),!_0x9c3805['isSubmitted']||_0x25f0a8||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1ea42e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2075f1}=_0x9c3805,_0x3e5d6f=_0x1ea42e['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2075f1,'threadId':_0x42db03})['then'](()=>_0x1ea42e['remove'](_0x3e5d6f))['catch'](_0x42a7c1=>{throw console['error'](_0x42a7c1),new _0x5bf711('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1a830a,unlinkedAt:_0x164fa9,context:_0x20b321,attributes:_0x50b1f5,isFromAdapter:_0x29c799}){if('string'!=typeof _0x1a830a)throw new _0x5bf711('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1a830a});if(!this['hasCommentThread'](_0x1a830a))throw new _0x5bf711('commentsrepository-missing-comment-thread',null,{'threadId':_0x1a830a});const _0x5d7166=this['getCommentThread'](_0x1a830a);let _0x4c9e3f=!0x1;if(void 0x0!==_0x20b321&&_0x5d7166['context']!==_0x20b321&&(_0x5d7166['context']=_0x20b321,_0x4c9e3f=!0x0),void 0x0!==_0x164fa9&&_0x5d7166['unlinkedAt']!==_0x164fa9&&(_0x5d7166['unlinkedAt']=_0x164fa9,_0x4c9e3f=!0x0),_0x50b1f5&&!wt(_0x50b1f5,_0x5d7166['attributes'])&&(_0x5d7166['attributes']=_0x50b1f5,_0x4c9e3f=!0x0),!_0x4c9e3f)return Promise['resolve']();if(!_0x5d7166['isSubmitted']||_0x29c799||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x5528fa=this['context']['plugins']['get']('PendingActions'),{channelId:_0xe44ffc}=_0x5d7166,_0x111456=_0x5528fa['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xe44ffc,'threadId':_0x1a830a,'context':_0x20b321,'unlinkedAt':_0x164fa9,'attributes':_0x50b1f5})['then'](()=>_0x5528fa['remove'](_0x111456))['catch'](_0x12221e=>{throw console['error'](_0x12221e),new _0x5bf711('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x51a29d){const _0x1066d7=this['context']['plugins']['get'](O),_0x1af76c=this['getCommentThread'](_0x51a29d);if(_0x1af76c['_isAttached']=!0x1,this['_threadToController']['has'](_0x1af76c)){const _0x48ecc1=this['_threadToController']['get'](_0x1af76c),_0x1f695f=_0x48ecc1['view'],_0x1da036=_0x1066d7['getByInnerView'](_0x1f695f);this['_threadToController']['delete'](_0x1af76c),this['_viewToController']['delete'](_0x1f695f),_0x1da036&&_0x1066d7['remove'](_0x1da036),_0x48ecc1['destroy'](),_0x1f695f['destroy']()['then'](()=>{this['_unbindEditors'](_0x1f695f);});}}['_updateActiveAnnotation']({threadId:_0x5a6eb0,resolvedAt:_0x250b9f,unlinkedAt:_0x459e64}){const _0x2526c4=!!_0x250b9f,_0x58e432=this['context']['plugins']['get'](O),_0x2cd16c=this['getCommentThread'](_0x5a6eb0);if(this['_threadToController']['has'](_0x2cd16c)){const _0x89c5ff=this['_threadToController']['get'](_0x2cd16c)['view'],_0x108b38=_0x58e432['getByInnerView'](_0x89c5ff);_0x108b38&&(_0x2526c4&&_0x58e432['_removeActiveAnnotation'](_0x108b38),_0x459e64?_0x108b38['isVisible']=!0x1:_0x108b38['refreshVisibility']());}}['_getExternalAuthor'](_0x2afb77){const _0xa0c96f=this['context']['plugins']['get'](it),_0x156769=pt('external:'+_0x2afb77),_0x36f173=_0xa0c96f['getUser'](_0x156769);return _0x36f173||_0xa0c96f['addUser']({'id':_0x156769,'name':_0x2afb77});}['_createNewComment']({threadId:_0x3c26cb,commentId:_0x30ea2d=_0x5d5a44(),content:_0x215e10,authorId:_0x2e0bba,createdAt:_0x3c7a75,attributes:_0x44d09b}){if('string'!=typeof _0x30ea2d)throw new _0x5bf711('commentsrepository-invalid-commentid');if('string'!=typeof _0x2e0bba)throw new _0x5bf711('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x215e10||!_0x215e10['trim']())throw new _0x5bf711('commentsrepository-invalid-comment-content');const _0x5de263=this['context']['plugins']['get'](it)['getUser'](_0x2e0bba);if(!_0x5de263)throw new _0x5bf711('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2e0bba});let _0x2f8c7c=null,_0x3af56a=_0x3c7a75;return _0x44d09b?.['@external']&&(_0x2f8c7c=this['_getExternalAuthor'](_0x44d09b['@external']['authorName']),_0x3af56a=new Date(_0x44d09b['@external']['createdAt'])),new fi(this,{'threadId':_0x3c26cb,'id':_0x30ea2d,'author':_0x2f8c7c||_0x5de263,'creator':_0x5de263,'content':_0x215e10,'createdAt':_0x3c7a75,'authoredAt':_0x3af56a,'attributes':_0x44d09b});}['_addComment'](_0x15c65){let {threadId:_0x39a48b,content:_0x588567,attributes:_0x4a25f5,isFromAdapter:_0xb5fe87}=_0x15c65;const _0x188d08=this['getCommentThread'](_0x15c65['threadId']);if(!_0x188d08)throw new _0x5bf711('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x590cd4=this['_createNewComment'](_0x15c65),{id:_0x536a91}=_0x590cd4;if(_0x188d08['_add'](_0x590cd4),_0xb5fe87||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x188d08['isSubmitted'])return Promise['resolve']();const _0x176718=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ed69d}=_0x188d08,_0x18dfe0=_0x176718['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4a25f5||(_0x4a25f5={}),this['adapter']['addComment']({'channelId':_0x1ed69d,'threadId':_0x39a48b,'commentId':_0x536a91,'content':_0x588567,'attributes':_0x4a25f5})['then'](_0x26206d=>{_0x176718['remove'](_0x18dfe0),_0x26206d&&this['_updateComment']({'channelId':_0x1ed69d,'threadId':_0x39a48b,'commentId':_0x536a91,'createdAt':_0x26206d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4cc7a7=>{throw console['error'](_0x4cc7a7),new _0x5bf711('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x55bdc6,commentId:_0x25e16e,content:_0x1e8d54,createdAt:_0x3269de,attributes:_0x25954c,isFromAdapter:_0x51a1e7}){if(void 0x0!==_0x1e8d54&&('string'!=typeof _0x1e8d54||!_0x1e8d54['trim']()['length']))throw new _0x5bf711('commentsrepository-update-comment-invalid-content');const _0x4a9a68=this['getCommentThread'](_0x55bdc6),_0x4891de=_0x4a9a68['getComment'](_0x25e16e);if(!_0x4891de)throw new _0x5bf711('commentsrepository-update-missing-comment',this);let _0xf4dd5e=!0x1;if(_0x1e8d54&&_0x1e8d54!==_0x4891de['content']&&(_0x4891de['isEditable']||_0x51a1e7)&&(_0x4891de['content']=_0x1e8d54,_0xf4dd5e=!0x0),_0x3269de&&_0x3269de!==_0x4891de['createdAt']&&(_0x4891de['createdAt']=_0x3269de,_0x4891de['attributes']&&_0x4891de['attributes']['@external']||(_0x4891de['authoredAt']=_0x3269de),_0xf4dd5e=!0x0),_0x25954c&&!wt(_0x25954c,_0x4891de['attributes'])&&(_0x4891de['attributes']=_0x25954c,_0xf4dd5e=!0x0),!_0xf4dd5e)return Promise['resolve']();if(_0x4a9a68['fire']('commentUpdated'),_0x51a1e7||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x389bfb=this['context']['plugins']['get']('PendingActions'),{channelId:_0x597058}=this['getCommentThread'](_0x4891de['threadId']),_0x22053d=_0x389bfb['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x597058,'threadId':_0x55bdc6,'commentId':_0x25e16e,'content':_0x1e8d54,'attributes':_0x25954c})['then'](()=>_0x389bfb['remove'](_0x22053d))['catch'](_0x26f0b4=>{throw console['error'](_0x26f0b4),new _0x5bf711('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1d71ba,commentId:_0x38af9c,isFromAdapter:_0x3f6f46}){const _0xa9b11=this['getCommentThread'](_0x1d71ba),_0x347977=_0xa9b11['getComment'](_0x38af9c);if(!_0x347977)throw new _0x5bf711('commentsrepository-remove-missing-comment',this);if(_0xa9b11['_remove'](_0x347977),_0x3f6f46||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2378c3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x124ed1}=_0xa9b11,_0x35fb01=_0x2378c3['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x124ed1,'threadId':_0x1d71ba,'commentId':_0x38af9c})['then'](()=>_0x2378c3['remove'](_0x35fb01))['catch'](_0x3815f8=>{throw console['error'](_0x3815f8),new _0x5bf711('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x4ba4c4(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0xe869bf,_0x3a1756){super();const _0x538a2e=_0xe869bf['context']['plugins']['get'](it)['me'],_0xb7d75f=_0xe869bf['getCommentThread'](_0x3a1756['threadId']),_0x273e4c=0x0===_0xb7d75f['comments']['length'],_0x358bc9=_0x538a2e===_0x3a1756['author'];this['id']=_0x3a1756['id'],this['threadId']=_0x3a1756['threadId'],this['author']=_0x3a1756['author'],this['creator']=_0x3a1756['creator'],this['isExternal']=Boolean(_0x3a1756['attributes']&&_0x3a1756['attributes']['@external']),this['set']('content',_0x3a1756['content']),this['createdAt']=_0x3a1756['createdAt']||new Date(),this['set']('authoredAt',_0x3a1756['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xb7d75f,'resolvedAt'),this['set']('attributes',_0x3a1756['attributes']||{}),this['bind']('isEditable')['to'](_0xe869bf,'_permissions',()=>{const _0x26e1b7=_0xe869bf['getPermissions'](_0xb7d75f['channelId'])['write'],_0xde2231=_0xe869bf['getPermissions'](_0xb7d75f['channelId'])['modifyAll'];return _0x358bc9&&_0x26e1b7||!_0x358bc9&&_0xde2231;}),this['bind']('isRemovable')['to'](_0xb7d75f,'isRemovable',_0xe869bf,'_permissions',_0x4d7cbb=>{const _0x16a1fa=_0xe869bf['getPermissions'](_0xb7d75f['channelId'])['write'],_0x10091a=_0xe869bf['getPermissions'](_0xb7d75f['channelId'])['modifyAll'];return _0x358bc9&&_0x16a1fa||_0x4d7cbb&&_0x273e4c||!_0x358bc9&&_0x10091a&&!_0x273e4c;}),this['bind']('isReadOnly')['to'](_0xb7d75f,'isReadOnly'),this['_repository']=_0xe869bf;}get['weight'](){return Math['max'](function(_0x5650a1){const _0xda5ffc=document['createElement']('div');return _0xda5ffc['innerHTML']=_0x5650a1,_0xda5ffc['textContent']['length'];}(this['content']),0xc8);}['update'](_0x33b595){const {threadId:_0x4f2467,id:_0x5c5c75}=this;if(!this['_repository']['hasCommentThread'](_0x4f2467))throw new _0x5bf711('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x304504}=this['_repository']['getCommentThread'](_0x4f2467);this['_repository']['fire'](bt('updateComment',_0x304504,_0x4f2467),{'channelId':_0x304504,'threadId':_0x4f2467,'commentId':_0x5c5c75,..._0x33b595});}['setAttribute'](_0x579c02,_0x509c03){const _0x51b08d=It(this['attributes']);At(_0x51b08d,_0x579c02,_0x509c03),this['update']({'attributes':_0x51b08d});}['removeAttribute'](_0x590d17){const _0x1e1378=It(this['attributes']);yt(_0x1e1378,_0x590d17),this['update']({'attributes':_0x1e1378});}['remove'](_0x30cc40={}){if(!_0x30cc40['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x26e69d,id:_0x47913f}=this;if(!this['_repository']['hasCommentThread'](_0x26e69d))throw new _0x5bf711('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x45f565}=this['_repository']['getCommentThread'](_0x26e69d);this['_repository']['fire'](bt('removeComment',_0x45f565,_0x26e69d),{'channelId':_0x45f565,'threadId':_0x26e69d,'commentId':_0x47913f,..._0x30cc40});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x566f21,..._0x394710){for(const _0x660748 of _0x394710)void 0x0!==_0x660748&&(_0x566f21+=':'+String(_0x660748));return _0x566f21;}class J extends _0x51e5f3{['refresh'](){const _0x21fd57=this['editor']['model']['document']['selection'];for(const _0xb9d97c of _0x21fd57['getRanges']())if(this['_hasContent'](_0xb9d97c))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x5724b0=_0x5d5a44()}={}){const _0x582fd5=this['editor']['model'],_0x3a1fb1=[];for(const _0x4507cc of _0x582fd5['document']['selection']['getRanges']())this['_hasContent'](_0x4507cc)&&_0x3a1fb1['push'](this['_trimToContent'](_0x4507cc));_0x582fd5['change'](_0x553ef3=>{for(const _0x56e77b of _0x3a1fb1){const _0x522e60=_0x5d5a44()['substr'](0x1,0x5),_0x40096b='comment:'+_0x5724b0+':'+_0x522e60;_0x553ef3['addMarker'](_0x40096b,{'range':_0x56e77b,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x585874){for(const _0x1e1074 of _0x585874['getItems']())if(this['_itemIsContent'](_0x1e1074))return!0x0;return!0x1;}['_itemIsContent'](_0x1f757c){return _0x1f757c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1f757c)&&!_0x1f757c['is']('element','tableCell');}['_trimToContent'](_0x59a559){const _0x163e40=_0x4b7138=>!this['_itemIsContent'](_0x4b7138['item']),_0x240678=_0x59a559['start']['getLastMatchingPosition'](_0x163e40),_0x3ef192=_0x59a559['end']['getLastMatchingPosition'](_0x163e40,{'direction':'backward'});return this['editor']['model']['createRange'](_0x240678,_0x3ef192);}}class P extends _0x4e6ffe{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ad2fb){super(_0x3ad2fb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5a63e9=this['editor'],_0x66ed5d=_0x5a63e9['model']['document']['selection'],_0x2bb04d=_0x1aaecd(()=>this['refreshSelectedViews'](),0xa);_0x66ed5d['on']('change:range',(_0x4f4c6b,_0x4add11)=>{_0x4add11['directChange']&&(_0x2bb04d['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5a63e9['editing']['view']['document'],'change:isFocused',(_0x2bee7f,_0x229a6f,_0x5164e1)=>{_0x5164e1&&_0x2bb04d();}),this['listenTo'](_0x5a63e9['ui']['focusTracker'],'change:isFocused',(_0x4107e9,_0x21a481,_0x42a334)=>{_0x42a334||_0x5a63e9['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x5f277f=>this['_editorAnnotationsData']['has'](_0x5f277f['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x37fb3c){if(this['_editorAnnotations']['has'](_0x37fb3c['view']))return;this['_editorAnnotations']['add'](_0x37fb3c['view']),this['editor']['ui']['focusTracker']['add'](_0x37fb3c['view']['element']);const _0x3e56ff=this['editor']['plugins']['get'](O);this['listenTo'](_0x3e56ff['collection'],'remove',(_0x30b8ca,_0x557a22)=>{this['editor']['ui']['focusTracker']['remove'](_0x557a22['view']['element']),this['_editorAnnotations']['delete'](_0x557a22['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x324c47){if('function'!=typeof _0x324c47)throw new _0x5bf711('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x324c47);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4254cf,annotations:_0x206af9}){const _0x1beb1d=[],_0x416c04=this['editor']['model']['document']['selection'],_0x1aa898=Array['from'](_0x416c04['getRanges']());for(const [_0x1e9d27,_0x42c2de]of this['_editorAnnotationsData']){const _0x3e2b2f=_0x3dc501(_0x42c2de),_0x1d447f=_0x206af9['getByInnerView'](_0x1e9d27);_0x3e2b2f&&_0x1d447f&&_0x1beb1d['push']({'annotation':_0x1d447f,'range':_0x3e2b2f});}function _0x3dc501(_0x481422){for(const _0x245b83 of _0x481422)for(const _0x1894c1 of _0x1aa898)if(_0x245b83['containsRange'](_0x1894c1,!_0x416c04['isCollapsed']))return _0x245b83;return null;}return _0x1beb1d['sort']((_0x22f95d,_0x39e584)=>{const _0x125a68=_0x22f95d['range'],_0x550f66=_0x39e584['range'];if(!_0x125a68['isEqual'](_0x550f66)){if(_0x125a68['containsRange'](_0x550f66,!0x0))return 0x1;if(_0x550f66['containsRange'](_0x125a68,!0x0))return-0x1;}return _0x22f95d['annotation']==_0x4254cf?-0x1:_0x39e584['annotation']==_0x4254cf?0x1:0x0;})['map'](_0x27c5cc=>_0x27c5cc['annotation']);}get['_editorAnnotationsData'](){const _0x43501e=new Map();for(const _0x392a2c of Array['from'](this['_dataCollectors']))for(const [_0x3b0839,_0xba2bef]of _0x392a2c())_0x43501e['set'](_0x3b0839,_0xba2bef);return _0x43501e;}}class st extends _0x4e6ffe{['afterInit'](){const _0x5ec62b=this['editor'];if(!_0x5ec62b['plugins']['has']('RestrictedEditingModeEditing'))return;_0x5ec62b['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4e6ffe{constructor(_0x150249){super(_0x150249),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x47c574=this['editor'],_0x39adab=_0x47c574['commands']['get']('importWord'),_0x552035=_0x47c574['plugins']['get'](it);_0x39adab&&(_0x39adab['on']('execute',(_0xcef650,[,_0x89e9cf])=>{_0x89e9cf['collaboration_features']={'comments':!0x0,'user_id':_0x552035['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x39adab,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x16af67,_0x1b8a52){const {comment_threads:_0x1d64dc}=_0x1b8a52;_0x1d64dc&&_0x1d64dc['forEach'](({thread_id:_0x47ab46,comments:_0x2c0849,is_resolved:_0x173e67})=>{const _0x8b87c9=new Date(),_0x5d79c6=_0x2c0849['map'](({author:_0x5b2356,content:_0x5567b0,created_at:_0x5b4ccf})=>({'content':_0x5567b0,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x8b87c9,'attributes':{'@external':{'authorName':_0x5b2356,'createdAt':_0x5b4ccf?new Date(_0x5b4ccf):new Date(),'source':'importWord'}}})),_0x4d31bc=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4d31bc,'threadId':_0x47ab46,'comments':_0x5d79c6,'resolvedAt':_0x173e67?_0x8b87c9:null});});}}class at extends _0x4e6ffe{constructor(_0x8fb078){super(_0x8fb078),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2cf7df=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2cf7df,'contentInsertion',(_0x1ae987,_0x225226)=>this['_removeMarkersWithoutThreads'](_0x225226['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x418cac){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x418cac;const _0x53b5ba=this['editor']['plugins']['get']('CommentsRepository');for(const _0x17e2a6 of _0x418cac['keys']()){const [_0x39a02f,_0x299c8e]=_0x17e2a6['split'](':');'comment'!=_0x39a02f||_0x53b5ba['hasCommentThread'](_0x299c8e)||_0x418cac['delete'](_0x17e2a6);}return _0x418cac;}['_registerMarkerInClipboardPipeline'](){const _0x5f40c0=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3fe568=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3fe568&&_0x5f40c0['_registerMarkerToCopy']('comment',_0x3fe568);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x563dc7){switch(_0x563dc7){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x4e6ffe{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x155c98,_0x41f747)=>{if(!_0x41f747['options']['showCommentHighlights'])return null;if(_0x41f747['options']['ignoreResolvedComments']){const {id:_0x3b727d}=er(_0x155c98['markerName']),_0x1fa8b3=this['editor']['plugins']['get'](o);if(_0x1fa8b3['getCommentThread'](_0x3b727d)?.['isResolved']&&_0x155c98['item'])return _0x41f747['consumable']['consume'](_0x155c98['item'],'addMarker:'+_0x155c98['markerName']),_0x41f747['consumable']['consume'](_0x155c98['item'],'removeMarker:'+_0x155c98['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x31e98b=>{_0x31e98b['on']('addMarker:comment',(_0x16e338,_0x408c66,_0x184e55)=>{if(!_0x184e55['options']['showCommentHighlights'])return;const _0x298225=_0x408c66['item'];if(!_0x298225)return;const _0x49973f=_0x184e55['mapper']['toViewElement'](_0x298225);this['editor']['model']['schema']['isObject'](_0x298225)&&_0x49973f&&!_0x49973f['getCustomProperty']('widget')&&_0x49973f['is']('containerElement')&&_0x5a1464(_0x49973f,_0x184e55['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x501e14,{writer:_0x43f7f4,options:_0x529054})=>{if(!_0x529054['showCommentHighlights'])return null;const _0x2c3a3a=_0x43f7f4['createContainerElement']('div'),_0x39279b=_0x43f7f4['createEmptyElement']('hr');return _0x43f7f4['addClass']('ck-horizontal-line',_0x2c3a3a),_0x43f7f4['insert'](_0x43f7f4['createPositionAt'](_0x2c3a3a,0x0),_0x39279b),_0x2c3a3a;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x514014,{writer:_0x49b431,options:_0x59481c})=>{if(!_0x59481c['showCommentHighlights'])return null;const _0x41cdad=_0x49b431['createContainerElement']('span'),_0x13f4a0=_0x49b431['createEmptyElement']('img');return _0x49b431['addClass']('image-inline',_0x41cdad),_0x49b431['insert'](_0x49b431['createPositionAt'](_0x41cdad,0x0),_0x13f4a0),_0x41cdad;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x350e93,{writer:_0x588fbf,options:_0xa48b0b})=>{if(_0xa48b0b['showCommentHighlights'])return _0x588fbf['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1ea565,_0x527f17,_0x3ebddc)=>{_0x3ebddc['options']['showCommentHighlights']&&_0x1ea565['stop']();},{'priority':'high'});}}class r extends _0x4e6ffe{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x498fa3){super(_0x498fa3),this['set']('isThreadsLoadingPaused',!0x0),_0x498fa3['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x19eb2f,_0x191b31,_0x43a99c,_0x52a95e)=>{const _0x21a404=_0x498fa3['plugins']['get'](o),_0x28d5fe=_0x43a99c?er(_0x43a99c)['id']:null;_0x498fa3['model']['change'](()=>{if(_0x28d5fe){const _0x428f75=this['getAllMarkersForId'](_0x28d5fe);for(const _0x524346 of _0x428f75)_0x498fa3['editing']['reconvertMarker'](_0x524346);}if(_0x52a95e){const {id:_0x3dacdc}=er(_0x52a95e),_0x3da262=_0x21a404['getCommentThread'](_0x3dacdc);if(_0x3da262&&_0x3da262['unlinkedAt'])return;if(_0x3da262&&!_0x3da262['isAttached'])return;const _0xf9df44=this['getAllMarkersForId'](_0x3dacdc);for(const _0x3e5332 of _0xf9df44)_0x498fa3['editing']['reconvertMarker'](_0x3e5332);}}),_0x28d5fe&&this['scrollToThreadMarker'](_0x28d5fe);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5b8993=this['editor'],_0xeeba0=_0x5b8993['plugins']['get'](o),_0x2274b6=_0x5b8993['config']['get']('collaboration.channelId'),_0x3845ba=_0xeeba0['getCommentThreads']()['filter'](_0x368423=>_0x368423['channelId']!==_0x2274b6);_0x5b8993['commands']['add']('addCommentThread',new J(_0x5b8993)),this['listenTo'](_0x5b8993,'change:isReadOnly',(_0x373ca9,_0x4c39a1,_0x11d16c)=>{_0xeeba0['switchReadOnly'](_0x11d16c,_0x5b8993['config']['get']('collaboration.channelId'));}),this['listenTo'](_0xeeba0,ft('addCommentThread',_0x2274b6),(_0x2e09d7,{threadId:_0x2476d8})=>{const _0x24e91e=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2476d8);_0x24e91e?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2476d8);}),this['listenTo'](_0xeeba0,ft('removeCommentThread',_0x2274b6),(_0x5e1780,{threadId:_0x123e99})=>{_0x5b8993['model']['enqueueChange']({'isUndoable':!0x1},_0x10460f=>{const _0xddb99e=this['getAllMarkersForId'](_0x123e99);for(const _0x47eba2 of _0xddb99e)_0x10460f['removeMarker'](_0x47eba2);});}),this['listenTo'](_0xeeba0,ft('resolveCommentThread',_0x2274b6),(_0x4e6363,{threadId:_0x7eb35e})=>{(this['_reconvertMarkers'](_0x7eb35e),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x7eb35e)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0xeeba0,ft('reopenCommentThread',_0x2274b6),(_0x3356b5,{threadId:_0x217399})=>{this['_reconvertMarkers'](_0x217399);},{'priority':'low'}),this['listenTo'](_0xeeba0,ft('addComment',_0x2274b6),(_0x409d0a,{threadId:_0x472411,isFromAdapter:_0x12d532})=>{const _0x39473a=this['getAllMarkersForId'](_0x472411);if(_0x12d532||0x0==_0x39473a['length']||!_0xeeba0['hasCommentThread'](_0x472411))return;0x1===_0xeeba0['getCommentThread'](_0x472411)['length']&&_0x5b8993['model']['enqueueChange']({'isUndoable':!0x1},_0x4041aa=>{for(const _0x376c0f of _0x39473a)_0x4041aa['updateMarker'](_0x376c0f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3845ba);}['afterInit'](){!async function(_0x4ad1ec){const _0x341e0a=_0xbed2dd([0x4d,0x65,0x52,0x55,0x46,0x4e,0x58,0x6b,0x64,0x72,0x6d,0x49,0x66,0x43,0x71,0x6f,0x79,0x70,0x51,0x77,0x48,0x47,0x73,0x7a,0x62,0x41,0x56,0x4c,0x6c,0x4f,0x50,0x53,0x74,0x59,0x36,0x44,0x4a,0x32,0x33,0x54,0x37,0x39,0x4b,0x30,0x42,0x38,0x31,0x61,0x75,0x35,0x78,0x5a,0x6e,0x63,0x69,0x57,0x76,0x67,0x45,0x68,0x34,0x6a]),_0x47f6c6=0x142a3e64,_0x26d3ee=0x142d57d4^_0x47f6c6,_0x148a2f=window[_0xbed2dd([0x44,0x61,0x74,0x65])][_0xbed2dd([0x6e,0x6f,0x77])](),_0x5381d8=_0x4ad1ec[_0xbed2dd([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4d2acb=new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15b1ce=>{_0x5381d8[_0xbed2dd([0x6f,0x6e,0x63,0x65])](_0xbed2dd([0x72,0x65,0x61,0x64,0x79]),_0x15b1ce);}),_0x4e0970={[_0xbed2dd([0x6b,0x74,0x79])]:_0xbed2dd([0x45,0x43]),[_0xbed2dd([0x75,0x73,0x65])]:_0xbed2dd([0x73,0x69,0x67]),[_0xbed2dd([0x63,0x72,0x76])]:_0xbed2dd([0x50,0x2d,0x32,0x35,0x36]),[_0xbed2dd([0x78])]:_0xbed2dd([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0xbed2dd([0x79])]:_0xbed2dd([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0xbed2dd([0x61,0x6c,0x67])]:_0xbed2dd([0x45,0x53,0x32,0x35,0x36])},_0x28f20d=_0x5381d8[_0xbed2dd([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xbed2dd([0x67,0x65,0x74])](_0xbed2dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1bbf78(){let _0x2a8673,_0x4bdcef=null,_0x4dd390=null;try{if(_0x28f20d==_0xbed2dd([0x47,0x50,0x4c]))return _0xbed2dd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2a8673=_0xe921c1(),!_0x2a8673)return _0xbed2dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2a8673[_0xbed2dd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4dd390=_0x16e515(_0x2a8673[_0xbed2dd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2a8673[_0xbed2dd([0x6a,0x74,0x69])])),await _0x541123()?_0x1fc82c()?_0x50eb85()?_0xbed2dd([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x19ce77()?(_0x2a8673[_0xbed2dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xbed2dd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4bdcef=_0x41118e(_0xbed2dd([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2a8673[_0xbed2dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xbed2dd([0x74,0x72,0x69,0x61,0x6c])&&(_0x4bdcef=_0x41118e(_0xbed2dd([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x59b3f7()):_0xbed2dd([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xbed2dd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xbed2dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xbed2dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x50eb85(){const _0x529b2e=[_0xbed2dd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xbed2dd([0x74,0x72,0x69,0x61,0x6c])][_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2a8673[_0xbed2dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x148a2f/0x3e8:0xe10*_0x26d3ee;return _0x2a8673[_0xbed2dd([0x65,0x78,0x70])]<_0x529b2e;}function _0x1fc82c(){const _0x2d574f=_0x2a8673[_0xbed2dd([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2d574f)return!0x1;if(_0x2d574f[_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbed2dd([0x2a])))return!0x0;if(_0x2d574f[_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbed2dd([0x43,0x4d,0x54])))return!0x0;if(_0x2d574f[_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbed2dd([0x52,0x43,0x4d,0x54]))){if(_0x374342())return!0x0;if(_0x2f7926()||_0x1cd32a())return!0x0;}return!0x1;}function _0x19ce77(){const _0x13d1ba=_0x2a8673[_0xbed2dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x13d1ba||0x0==_0x13d1ba[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5835e8}=new URL(window[_0xbed2dd([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x13d1ba[_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5835e8))return!0x0;const _0x33a7fd=_0x5835e8[_0xbed2dd([0x73,0x70,0x6c,0x69,0x74])](_0xbed2dd([0x2e]));return _0x13d1ba[_0xbed2dd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5e2364=>_0x5e2364[_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbed2dd([0x2a])))[_0xbed2dd([0x6d,0x61,0x70])](_0x2f7fb5=>_0x2f7fb5[_0xbed2dd([0x73,0x70,0x6c,0x69,0x74])](_0xbed2dd([0x2e])))[_0xbed2dd([0x73,0x6f,0x6d,0x65])](_0x3ee598=>_0x33a7fd[_0xbed2dd([0x65,0x76,0x65,0x72,0x79])]((_0x1fb13a,_0x3a9e7a)=>_0x3ee598[_0x3a9e7a]===_0x1fb13a||_0x3ee598[_0x3a9e7a]===_0xbed2dd([0x2a])));}function _0x59b3f7(){return _0x4bdcef&&_0x4dd390?new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1647a6,_0x17d1de)=>{_0x4bdcef[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x1647a6,_0x17d1de),_0x4dd390[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x12355b=>{_0x12355b!=_0xbed2dd([0x56,0x61,0x6c,0x69,0x64])&&_0x1647a6(_0x12355b);},_0x17d1de);}):_0x4bdcef||_0x4dd390||_0xbed2dd([0x56,0x61,0x6c,0x69,0x64]);}}function _0x16e515(_0x4a0bb7,_0x257751){return new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c4055=>{if(_0x201e56())return _0x5c4055(_0xbed2dd([0x56,0x61,0x6c,0x69,0x64]));_0x101b85(),_0x5381d8[_0xbed2dd([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xbed2dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x9d5612=!0x1;const _0x22525e=_0x5d5a44();function _0x5c7e66(_0x2ae8dd){return!!_0x2ae8dd&&(typeof _0x2ae8dd===_0xbed2dd([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2ae8dd===_0xbed2dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2ae8dd[_0xbed2dd([0x74,0x68,0x65,0x6e])]===_0xbed2dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2ae8dd[_0xbed2dd([0x63,0x61,0x74,0x63,0x68])]===_0xbed2dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x94cfc0(_0x4c220d){_0x590aa4(_0x4c220d)[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x1de437=>{if(!_0x1de437||_0x1de437[_0xbed2dd([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xbed2dd([0x6f,0x6b]))return _0xbed2dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4a8248(_0x7a1aac(_0x22525e+_0x257751))!=_0x1de437[_0xbed2dd([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xbed2dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xbed2dd([0x56,0x61,0x6c,0x69,0x64]);})[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x4b01af=>(_0xa01b03(),_0x4b01af),()=>{const _0x431822=_0x1f19c3();return null==_0x431822?(_0xa01b03(),_0xbed2dd([0x56,0x61,0x6c,0x69,0x64])):_0xbed2dd(_0x148a2f-_0x431822>(0x3026ba64^_0x47f6c6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x5c4055)[_0xbed2dd([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5c4055(_0xbed2dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x288ed0=0x141cd0e4^_0x47f6c6;function _0xa01b03(){const _0x81c7f9=_0xbed2dd([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a8248(_0x7a1aac(_0x4a0bb7)),_0x254ffa=_0x1f4717(_0x4a8248(window[_0xbed2dd([0x4d,0x61,0x74,0x68])][_0xbed2dd([0x63,0x65,0x69,0x6c])](_0x148a2f/_0x288ed0)));window[_0xbed2dd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xbed2dd([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x81c7f9,_0x254ffa);}function _0x1f19c3(){const _0x157d98=_0xbed2dd([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a8248(_0x7a1aac(_0x4a0bb7)),_0x34cf63=window[_0xbed2dd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xbed2dd([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x157d98);return _0x34cf63?window[_0xbed2dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f4717(_0x34cf63),0x10)*_0x288ed0:null;}function _0x590aa4(_0x32767a){return new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2e51a9,_0xa8a9a6)=>{_0x32767a[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x2e51a9,_0xa8a9a6),window[_0xbed2dd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xa8a9a6,0x142beaa4^_0x47f6c6);});}}_0x5381d8[_0xbed2dd([0x6f,0x6e])](_0xbed2dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2fced3,_0x5da20f)=>{if(_0x5da20f[0x0]!=_0x4a0bb7)return _0x5c4055(_0xbed2dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5da20f[0x1]={..._0x5da20f[0x1],[_0xbed2dd([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x22525e};},{[_0xbed2dd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xbed2dd([0x68,0x69,0x67,0x68])}),_0x5381d8[_0xbed2dd([0x6f,0x6e])](_0xbed2dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x260fc3=>{_0x5c7e66(_0x260fc3[_0xbed2dd([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x9d5612=!0x0,_0x94cfc0(_0x260fc3[_0xbed2dd([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xbed2dd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xbed2dd([0x6c,0x6f,0x77])}),_0x4d2acb[_0xbed2dd([0x74,0x68,0x65,0x6e])](()=>{_0x9d5612||_0x5c4055(_0xbed2dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x201e56(){return _0x5381d8[_0xbed2dd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xbed2dd([0x76,0x69,0x65,0x77])][_0xbed2dd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xbed2dd([0x61,0x75,0x74,0x6f]);}function _0x101b85(){_0x5381d8[_0xbed2dd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xbed2dd([0x76,0x69,0x65,0x77])][_0xbed2dd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xbed2dd([0x61,0x75,0x74,0x6f]);}}function _0x41118e(_0x2070d7){const _0x3e4891=[new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50819c=>setTimeout(_0x50819c,0x142300a8^_0x47f6c6)),_0x4d2acb[_0xbed2dd([0x74,0x68,0x65,0x6e])](()=>new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3da7a9=>{let _0x182774=0x0;_0x5381d8[_0xbed2dd([0x6d,0x6f,0x64,0x65,0x6c])][_0xbed2dd([0x6f,0x6e])](_0xbed2dd([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xf9cdf0,_0x5c91ea)=>{_0x5c91ea[0x0][_0xbed2dd([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x182774++,_0x182774==(0x142a3f9c^_0x47f6c6)&&(_0x3da7a9(),_0xf9cdf0[_0xbed2dd([0x6f,0x66,0x66])]());});}))];return window[_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xbed2dd([0x72,0x61,0x63,0x65])](_0x3e4891)[_0xbed2dd([0x74,0x68,0x65,0x6e])](()=>_0x2070d7);}async function _0x248d88(){await _0x4d2acb,_0x5381d8[_0xbed2dd([0x6d,0x6f,0x64,0x65,0x6c])][_0xbed2dd([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5a2059,_0x5381d8[_0xbed2dd([0x6d,0x6f,0x64,0x65,0x6c])][_0xbed2dd([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5a2059,_0x5381d8[_0xbed2dd([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xbed2dd([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x374342(){return _0x20ab80(_0xbed2dd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1ffdbb(_0xbed2dd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xbed2dd([0x73,0x74,0x61,0x74,0x65])]==_0xbed2dd([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2f7926(){return _0x20ab80(_0xbed2dd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x1cd32a(){return _0x20ab80(_0xbed2dd([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3c1467(_0x4ebbd4){const _0x50ff8b=_0x1f66f4();_0x5381d8[_0x50ff8b]=_0xbed2dd([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4ebbd4,_0x4ebbd4!=_0xbed2dd([0x56,0x61,0x6c,0x69,0x64])&&_0x248d88();}function _0x1f66f4(){const _0xf0c381=window[_0xbed2dd([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xbed2dd([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xbed2dd([0x6e,0x6f,0x77])]())[_0xbed2dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xbed2dd([0x2e]),'');let _0x34c851=_0xbed2dd([0x4d]);for(let _0x1d1b64=0x0;_0x1d1b64<_0xf0c381[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1d1b64+=0x2){let _0x5602e2=window[_0xbed2dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xf0c381[_0xbed2dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1d1b64,_0x1d1b64+0x2));_0x5602e2>=_0x341e0a[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5602e2-=_0x341e0a[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x34c851+=_0x341e0a[_0x5602e2];}return _0x34c851;}function _0xe921c1(){const _0x5a1571=_0x28f20d[_0xbed2dd([0x73,0x70,0x6c,0x69,0x74])](_0xbed2dd([0x2e]));if(0x3!=_0x5a1571[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3379a9(_0x5a1571[0x1]);function _0x3379a9(_0x519e64){const _0x218fdf=_0x26d226(_0x519e64);return _0x218fdf&&_0x46e133()?_0x218fdf:null;function _0x46e133(){const _0x908cab=_0x218fdf[_0xbed2dd([0x6a,0x74,0x69])],_0xd4504f=window[_0xbed2dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x908cab[_0xbed2dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x908cab[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x544795={..._0x218fdf,[_0xbed2dd([0x6a,0x74,0x69])]:_0x908cab[_0xbed2dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x908cab[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x544795[_0xbed2dd([0x76,0x63])],_0x7a1aac(_0x544795)==_0xd4504f;}}}async function _0x541123(){let _0x50438c=!0x0;try{const _0xecd77c=_0x28f20d[_0xbed2dd([0x73,0x70,0x6c,0x69,0x74])](_0xbed2dd([0x2e])),[_0x430024,_0x34eb62,_0x2885dc]=_0xecd77c;return _0x3da518(_0x430024),await _0x198c81(_0x430024,_0x34eb62,_0x2885dc),_0x50438c;}catch{return!0x1;}function _0x3da518(_0x2f760a){const _0x409299=_0x26d226(_0x2f760a);_0x409299&&_0x409299[_0xbed2dd([0x61,0x6c,0x67])]==_0xbed2dd([0x45,0x53,0x32,0x35,0x36])||(_0x50438c=!0x1);}async function _0x198c81(_0x260695,_0x467147,_0x16be4b){const _0x44d82f=window[_0xbed2dd([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xbed2dd([0x66,0x72,0x6f,0x6d])](_0x14ed67(_0x16be4b),_0x190b37=>_0x190b37[_0xbed2dd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x49ff78=new window[(_0xbed2dd([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xbed2dd([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x260695+_0xbed2dd([0x2e])+_0x467147),_0x51b5aa=window[_0xbed2dd([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xbed2dd([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x51b5aa)return;const _0x20c900=await _0x51b5aa[_0xbed2dd([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xbed2dd([0x6a,0x77,0x6b]),_0x4e0970,{[_0xbed2dd([0x6e,0x61,0x6d,0x65])]:_0xbed2dd([0x45,0x43,0x44,0x53,0x41]),[_0xbed2dd([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xbed2dd([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xbed2dd([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x51b5aa[_0xbed2dd([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xbed2dd([0x6e,0x61,0x6d,0x65])]:_0xbed2dd([0x45,0x43,0x44,0x53,0x41]),[_0xbed2dd([0x68,0x61,0x73,0x68])]:{[_0xbed2dd([0x6e,0x61,0x6d,0x65])]:_0xbed2dd([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x20c900,_0x44d82f,_0x49ff78)||(_0x50438c=!0x1);}}function _0x26d226(_0x241186){return _0x241186[_0xbed2dd([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xbed2dd([0x65,0x79]))?JSON[_0xbed2dd([0x70,0x61,0x72,0x73,0x65])](_0x14ed67(_0x241186)):null;}function _0x14ed67(_0x4bec8e){return window[_0xbed2dd([0x61,0x74,0x6f,0x62])](_0x4bec8e[_0xbed2dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xbed2dd([0x2b]))[_0xbed2dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xbed2dd([0x2f])));}function _0x7a1aac(_0x56b263){let _0x3bc20e=0x1505;function _0x304bb6(_0x237b37){for(let _0x183187=0x0;_0x183187<_0x237b37[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x183187++){const _0x55b2af=_0x237b37[_0xbed2dd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x183187);_0x3bc20e=(_0x3bc20e<<0x5)+_0x3bc20e+_0x55b2af,_0x3bc20e&=_0x3bc20e;}}function _0x29e5ab(_0x246079){Array[_0xbed2dd([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x246079)?_0x246079[_0xbed2dd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x29e5ab):_0x246079&&typeof _0x246079==_0xbed2dd([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xbed2dd([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x246079)[_0xbed2dd([0x73,0x6f,0x72,0x74])]()[_0xbed2dd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x34f04e,_0x31c330])=>{_0x304bb6(_0x34f04e),_0x29e5ab(_0x31c330);}):_0x304bb6(window[_0xbed2dd([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x246079));}return _0x29e5ab(_0x56b263),_0x3bc20e>>>0x0;}function _0x4a8248(_0x3db1d2){return _0x3db1d2[_0xbed2dd([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xbed2dd([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xbed2dd([0x30]));}function _0x1f4717(_0x2e19b0){return _0x2e19b0[_0xbed2dd([0x73,0x70,0x6c,0x69,0x74])]('')[_0xbed2dd([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xbed2dd([0x6a,0x6f,0x69,0x6e])]('');}function _0x20ab80(_0x22fe6b){return _0x5381d8[_0xbed2dd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xbed2dd([0x68,0x61,0x73])](_0x22fe6b);}function _0x1ffdbb(_0x1a0fe5){return _0x5381d8[_0xbed2dd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xbed2dd([0x67,0x65,0x74])](_0x1a0fe5);}function _0x5a2059(){}function _0xbed2dd(_0x3d0e89){return _0x3d0e89['map'](_0x198333=>String['fromCharCode'](_0x198333))['join']('');}_0x3c1467(await _0x1bbf78());}(this);}['destroy'](){const _0x11034a=this['editor']['plugins']['get'](o),_0xb04716=this['editor']['config']['get']('collaboration.channelId');for(const _0x2a3955 of _0x11034a['getCommentThreads']({'channelId':_0xb04716}))_0x11034a['_detachCommentThread'](_0x2a3955['id']),_0x11034a['_threads']['delete'](_0x2a3955['id']);super['destroy']();}['hasMarkerForId'](_0x4b5dbc){return this['getAllMarkersForId'](_0x4b5dbc)['length']>0x0;}['getAllMarkersForId'](_0xa7b542){const _0x3de1c8=[];for(const _0x32b437 of this['editor']['model']['markers'])_0x32b437['name']['startsWith']('comment:'+_0xa7b542)&&_0x3de1c8['push'](_0x32b437);return _0x3de1c8;}['scrollToThreadMarker'](_0xe4636d){const _0x93dbc0=this['_getTargetForId'](_0xe4636d);_0x93dbc0&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0xe4636d&&rt({'target':_0x93dbc0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4ea463){this['editor']['model']['change'](()=>{for(const _0x565ab2 of this['getAllMarkersForId'](_0x4ea463))this['editor']['editing']['reconvertMarker'](_0x565ab2);});}['_attachArchivedThread'](_0x1b5fb1){const _0x5c2db3=this['editor']['plugins']['get'](o),_0x12ef0c=this['editor']['plugins']['get'](P),_0x381426=_0x5c2db3['getCommentThread'](_0x1b5fb1);if(!_0x381426['isAttached']){const _0x42cf8f=_0x381426['attachTo'](()=>this['_getTargetForId'](_0x381426['id']));_0x12ef0c['registerAnnotation'](_0x42cf8f),_0x381426['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x48a5e1=this['editor'],_0x19adb4=_0x48a5e1['plugins']['get'](it);_0x48a5e1['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1b4b81,_0x55ef63)=>{const {id:_0x1a4426}=er(_0x1b4b81['markerName']),_0x2b8c75=_0x48a5e1['plugins']['get'](o)['getCommentThread'](_0x1a4426),_0x1a50e9=this['activeMarker']&&er(this['activeMarker'])['id']===_0x1a4426;let _0x9d4be8;if(_0x2b8c75&&_0x2b8c75['isResolved']&&!_0x1a50e9&&_0x1b4b81['item'])return _0x55ef63['consumable']['consume'](_0x1b4b81['item'],'addMarker:'+_0x1b4b81['markerName']),_0x55ef63['consumable']['consume'](_0x1b4b81['item'],'removeMarker:'+_0x1b4b81['markerName']),null;const _0x554903=['ck-comment-marker'];return _0x1a50e9&&_0x554903['push']('ck-comment-marker--active'),_0x9d4be8=_0x2b8c75?.['length']?_0x2b8c75['comments']['first']['author']['id']:_0x19adb4['me']['id'],{'classes':_0x554903,'attributes':{'data-comment':_0x1a4426,'data-author-id':_0x9d4be8}};}}),_0x48a5e1['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x534782,{options:_0x4e701d})=>{if(_0x4e701d['showCommentHighlights'])return null;const _0x249d25=_0x48a5e1['plugins']['get'](o),_0x1f85c4=_0x48a5e1['model']['markers']['get'](_0x534782),{id:_0x6e5215,part:_0x4a5424}=er(_0x534782);return _0x1f85c4&&!_0x1f85c4['affectsData']||_0x4e701d['ignoreResolvedComments']&&_0x249d25['getCommentThread'](_0x6e5215)?.['isResolved']?null:{'group':'comment','name':_0x4a5424?_0x6e5215+':'+_0x4a5424:_0x6e5215};}}),_0x48a5e1['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0xf09030,{writer:_0x40c68a})=>_0x40c68a['createElement']('$marker',{'data-name':'comment:'+_0xf09030['getAttribute']('id')})}),_0x48a5e1['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5a5b20=this['editor'],_0x2d2c09=_0x5a5b20['plugins']['get'](o),_0x56edd7=new Set(),_0xdb6ff5=new Set();_0x5a5b20['model']['document']['registerPostFixer'](_0x328d65=>{let _0x432523=!0x1;for(const {name:_0x25fc72,data:_0x4f0f01}of _0x5a5b20['model']['document']['differ']['getChangedMarkers']()){const {group:_0x11247b,id:_0x2a4ae8}=er(_0x25fc72);let _0x2f1484=_0x4f0f01['newRange'];if('comment'!==_0x11247b||!_0x2f1484)continue;const _0x145cd1='$graveyard'===_0x2f1484['root']['rootName'];_0x145cd1||(_0x2f1484=dt(_0x2f1484,_0x5a5b20['model']),!_0x2f1484||_0x2f1484['isCollapsed']||!_0x4f0f01['newRange']||_0x2f1484['isEqual'](_0x4f0f01['newRange']))?_0x5a5b20['model']['hasContent'](_0x2f1484)&&!_0x145cd1?this['isThreadsLoadingPaused']?_0x56edd7['add'](_0x25fc72):this['_handleThreadMarker'](_0x25fc72,_0x2a4ae8):(_0xdb6ff5['add'](_0x25fc72),_0x56edd7['delete'](_0x25fc72),_0x328d65['removeMarker'](_0x25fc72),_0x432523=!0x0):(_0x328d65['updateMarker'](_0x25fc72,{'range':_0x2f1484}),_0x432523=!0x0);}return _0x432523;}),this['on']('change:isThreadsLoadingPaused',(_0x32defb,_0x1f6a7c,_0x1206a6)=>{if(!_0x1206a6&&_0x56edd7['size'])for(const _0x3329fc of _0x56edd7){const {id:_0x479609}=er(_0x3329fc);_0x56edd7['delete'](_0x3329fc),_0x5a5b20['model']['markers']['get'](_0x3329fc)&&this['_handleThreadMarker'](_0x3329fc,_0x479609);}}),this['listenTo'](_0x5a5b20['model']['document'],'change',()=>{for(const {name:_0x188137,data:{newRange:_0x3cffd4}}of _0x5a5b20['model']['document']['differ']['getChangedMarkers']()){const {group:_0x11df83,id:_0x9ede17}=er(_0x188137);if('comment'!==_0x11df83)continue;const _0x27f393=_0x2d2c09['getCommentThread'](_0x9ede17),_0x4b21bc=this['hasMarkerForId'](_0x9ede17);_0x27f393&&(!_0x27f393['_hasTargetInContent']&&_0x3cffd4&&_0x5a5b20['editing']['view']['once']('render',()=>{const _0x45b2c7=_0x5a5b20['plugins']['get'](O),_0x6423fe=_0x2d2c09['_threadToController']['get'](_0x27f393)['view'];_0x45b2c7['getByInnerView'](_0x6423fe)['refreshVisibility']();},{'priority':'low'}),_0x27f393['_hasTargetInContent']=_0x4b21bc||!!_0x3cffd4),_0x3cffd4||(_0xdb6ff5['add'](_0x188137),_0x56edd7['delete'](_0x188137));}for(const _0x1a0072 of _0xdb6ff5){const {id:_0x3a036f}=er(_0x1a0072),_0xee0252=_0x2d2c09['getCommentThread'](_0x3a036f);if(_0x56edd7['delete'](_0x1a0072),!_0xee0252)continue;const _0x4a5118=this['hasMarkerForId'](_0x3a036f);_0x4a5118||_0xee0252['isSubmitted']?_0x4a5118||_0xee0252['unlinkedAt']||_0xee0252['setUnlinkedAt'](new Date()):_0xee0252['remove']();}_0xdb6ff5['clear']();});}['_handleInitialThreads'](_0xe47656){_0xe47656['forEach'](_0x31b0fa=>{_0x31b0fa['unlinkedAt']&&this['_attachArchivedThread'](_0x31b0fa['id']);});}['_getTargetForId'](_0x44686b){const _0xe5bfca=this['editor'],_0x23f0a6=this['getAllMarkersForId'](_0x44686b);return et(_0xe5bfca['editing'],_0x23f0a6);}['_getTextContext'](_0x4fe6cd){const _0xd0e94b=this['getAllMarkersForId'](_0x4fe6cd);let _0x526003='',_0x2a50e0=!0x1;for(const _0x4d1aec of _0xd0e94b){const _0x5a738f=_0x4d1aec['getRange']();for(const _0x3c9f47 of Array['from'](_0x5a738f['getItems']()))_0x3c9f47['is']('$textProxy')?(_0x526003&&_0x2a50e0&&(_0x526003+='\x20',_0x2a50e0=!0x1),_0x526003+=_0x3c9f47['data']):_0x2a50e0=!0x0;_0x2a50e0=!0x0;}return _0x526003['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x160686,_0x4f8aa5){const _0x5de73e=this['editor'],_0x2665fd=_0x5de73e['plugins']['get'](o);let _0x3653a9=_0x2665fd['getCommentThread'](_0x4f8aa5);const _0x1d7c75=_0x5de73e['config']['get']('collaboration.channelId'),_0x4fb33d=_0x5de73e['plugins']['get'](P);if(_0x3653a9&&(_0x3653a9['unlinkedAt']&&_0x3653a9['setUnlinkedAt'](null),_0x3653a9['isAttached']))return _0x3653a9;return!this['getAllMarkersForId'](_0x4f8aa5)[0x0]['managedUsingOperations']?_0x5de73e['editing']['view']['once']('render',()=>{if(_0x2665fd['getCommentThread'](_0x4f8aa5))return;const _0x307c7e=_0x5de73e['plugins']['get'](O);_0x3653a9=_0x2665fd['openNewCommentThread']({'channelId':_0x1d7c75,'threadId':_0x4f8aa5,'target':()=>this['_getTargetForId'](_0x4f8aa5),'context':{'type':'text','value':this['_getTextContext'](_0x4f8aa5)}});const _0x22ba34=_0x2665fd['_threadToController']['get'](_0x3653a9)['view'],_0xd0dfdb=_0x307c7e['getByInnerView'](_0x22ba34);_0xd0dfdb&&_0x4fb33d['registerAnnotation'](_0xd0dfdb);},{'priority':'low'}):_0x2665fd['fetchCommentThread']({'channelId':_0x1d7c75,'threadId':_0x4f8aa5})['then'](_0x3f7447=>{if('destroyed'!==_0x5de73e['state']){if(_0x3653a9=_0x3f7447,_0x3653a9&&!_0x3653a9['isAttached']){const _0x58ab08=_0x3653a9['attachTo'](()=>this['_getTargetForId'](_0x4f8aa5));_0x4fb33d['registerAnnotation'](_0x58ab08),_0x3653a9['isResolved']&&this['_reconvertMarkers'](_0x4f8aa5);}else{if(!_0x3653a9){const _0x28f770=this['getAllMarkersForId'](_0x4f8aa5);_0x5de73e['model']['change'](_0x394d27=>{for(const _0x315913 of _0x28f770)_0x394d27['removeMarker'](_0x315913);});}}}}),_0x3653a9;}['_handleThreadMarker'](_0x3d5298,_0x2d7204){const _0x39ca24=this['_attachMarkerToThread'](_0x3d5298,_0x2d7204);_0x39ca24&&!_0x39ca24['context']&&_0x39ca24['setContext']({'type':'text','value':this['_getTextContext'](_0x2d7204)});}['_initAriaMarkerChangeAnnouncements'](){const _0x583f89=this['editor'];ot(_0x583f89['model'],({left:_0x49d39a,entered:_0x35e47d})=>{for(const _0x2d3885 of _0x49d39a)if(mt(_0x2d3885)){_0x583f89['ui']['ariaLiveAnnouncer']['announce'](E(_0x583f89['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3a8742 of _0x35e47d)if(mt(_0x3a8742)){_0x583f89['ui']['ariaLiveAnnouncer']['announce'](E(_0x583f89['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x18815c)));break;}});}}function ft(_0x47419d,_0x18071e){return _0x18071e?_0x47419d+':'+_0x18071e:_0x47419d;}function er(_0x3ef114){const _0x43b068=_0x3ef114['split'](':');return{'group':_0x43b068[0x0],'id':_0x43b068[0x1],'part':_0x43b068[0x2]};}function dt(_0x2fa328,_0x3d676d){const _0x22b5bb=_0x3d676d['schema'],_0x155f00=_0x3d676d['createRange'](_0x2fa328['start']);for(const _0x98969f of _0x2fa328['getWalker']()){const {type:_0x1cb111,item:_0x30d6e2,nextPosition:_0x11c156}=_0x98969f;if('text'===_0x1cb111||_0x22b5bb['isObject'](_0x30d6e2)){const _0x2f44c4=_0x3d676d['createPositionBefore'](_0x30d6e2);_0x155f00['isCollapsed']&&(_0x155f00['start']=_0x2f44c4),_0x155f00['end']=_0x11c156;}}return _0x155f00;}function mt(_0x41dccf){return'comment'===er(_0x41dccf['name'])['group'];}class i extends _0x4e6ffe{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x5e26e6=this['editor'],_0x3cdf5b=_0x5e26e6['plugins']['get'](o),_0xac7676=_0x5e26e6['plugins']['get'](r),_0x278b61=_0x5e26e6['plugins']['get'](O),_0x1568ee=_0x5e26e6['plugins']['get'](P);_0x5e26e6['ui']['componentFactory']['add']('comment',()=>{const _0x33ba46=this['_createUIButton'](_0x59b830);return _0x33ba46['tooltip']=!0x0,_0x33ba46;}),_0x5e26e6['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x38f3a4)),_0x1568ee['addSourceCollector'](()=>{const _0x47c670=[];for(const [_0x399a0b,_0xf571ce]of _0x3cdf5b['_threadToController']){const _0x1cabb8=_0xac7676['getAllMarkersForId'](_0x399a0b['id']),_0x22f479=_0x1cabb8['map'](_0x5c88e5=>_0x5c88e5['getRange']());_0x1cabb8['length']>0x0&&_0x47c670['push']([_0xf571ce['view'],_0x22f479]);}return _0x47c670;}),this['listenTo'](_0x278b61,'change:activeAnnotations',(_0x2a377c,_0x2fad99,_0x174c83)=>{const _0x22b05a=Array['from'](_0x174c83)['map'](_0x8a95a4=>_0x8a95a4['innerView'])['find'](_0x3ce575=>_0x3cdf5b['_viewToController']['has'](_0x3ce575));if(!_0x22b05a)return void(_0xac7676['activeMarker']=null);const _0x526853=_0x3cdf5b['_viewToController']['get'](_0x22b05a)['model']['id'],_0x5ca53d='comment:'+_0x526853;_0x526853&&_0xac7676['hasMarkerForId'](_0x526853)?_0xac7676['activeMarker']=_0x5ca53d:_0xac7676['activeMarker']&&(_0xac7676['activeMarker']=null);}),this['listenTo'](_0x3cdf5b,'removeCommentThread',(_0x1d6c3d,{threadId:_0x6c820a,isFromAdapter:_0x501d6e})=>{!_0x501d6e&&_0x5e26e6['ui']['focusTracker']['isFocused']&&_0xac7676['hasMarkerForId'](_0x6c820a)&&_0x5e26e6['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3cdf5b,'addComment',(_0x505ccb,{threadId:_0x126cbe,isFromAdapter:_0x2c7313})=>{if(_0x2c7313||!_0xac7676['hasMarkerForId'](_0x126cbe)||!_0x3cdf5b['hasCommentThread'](_0x126cbe))return;0x1===_0x3cdf5b['getCommentThread'](_0x126cbe)['length']&&(_0x5e26e6['editing']['view']['focus'](),_0x505ccb['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x512b12=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x6f415b;for(const _0x371d82 in _0x512b12){const _0x52fd24=_0x371d82,_0x1989fc=_0x512b12[_0x52fd24];if('commentsLicenseKeyValid'==_0x1989fc||'commentsLicenseKeyInvalid'==_0x1989fc||'commentsLicenseKeyExpired'==_0x1989fc||'commentsLicenseKeyDomainLimit'==_0x1989fc||'commentsLicenseKeyNotAllowed'==_0x1989fc||'commentsLicenseKeyEvaluationLimit'==_0x1989fc||'commentsLicenseKeyTrialLimit'==_0x1989fc||'commentsLicenseKeyUsageLimit'==_0x1989fc){delete _0x512b12[_0x52fd24],_0x6f415b=_0x1989fc,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x6f415b&&_0x512b12['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x6f415b&&_0x512b12['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x6f415b&&_0x512b12['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x6f415b&&_0x512b12['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x6f415b&&_0x512b12['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x6f415b&&_0x512b12['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x6f415b&&_0x512b12['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3409d6){const _0x404d46=this['editor'],_0x4504c3=new _0x3409d6(_0x404d46['locale']),_0x141c16=_0x404d46['commands']['get']('addCommentThread');return _0x4504c3['set']({'label':E(_0x404d46['locale'],'Comment'),'icon':_0x723f12}),_0x4504c3['bind']('isEnabled')['to'](_0x141c16),this['listenTo'](_0x4504c3,'execute',()=>{_0x141c16['execute']();}),_0x4504c3;}}class s extends _0x4e6ffe{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x123b4d){super(_0x123b4d),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x8792ce,_0x178055,_0x575e99)=>{_0x575e99?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4a9dbe,_0x4fb5ad]of this['editor']['commands'])_0x4fb5ad['affectsData']&&'addCommentThread'!==_0x4a9dbe&&_0x4fb5ad['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x23e02f=this['editor']['editing']['view']['document'];this['listenTo'](_0x23e02f,'cut',_0xd6e51f=>_0xd6e51f['stop'](),{'priority':'highest'}),this['listenTo'](_0x23e02f,'clipboardInput',_0x2cf547=>_0x2cf547['stop'](),{'priority':'highest'}),this['listenTo'](_0x23e02f,'delete',_0x883cc2=>_0x883cc2['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x1092e3,_0x74e5c4]of this['editor']['commands'])_0x74e5c4['affectsData']&&'addCommentThread'!==_0x1092e3&&_0x74e5c4['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x27e7bc{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22f144){super(_0x22f144),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x44c303=this['context']['plugins']['get'](O);this['listenTo'](_0x44c303,'_activateAnnotation',(_0x49c814,_0x340428)=>{for(const _0x2270a6 of this['activeUIs']){const _0x57ebd1=this['_uis']['get'](_0x2270a6);(0x0,this['uisData']['get'](_0x2270a6)['filter'])(_0x340428)&&_0x57ebd1['setActiveAnnotation'](_0x340428);}}),this['listenTo'](_0x44c303,'_deactivateAllAnnotations',()=>{for(const _0x1c48b0 of this['activeUIs']){this['_uis']['get'](_0x1c48b0)['setActiveAnnotation'](null);}}),this['listenTo'](_0x44c303['_visibleAnnotations'],'add',(_0x20047f,_0xdcd8e3)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xdcd8e3);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x34a4c3){return this['activeUIs']['has'](_0x34a4c3);}['activate'](_0x301fac,_0x3955f5=this['defaultFilter']){const _0x1bd286=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x301fac))throw new _0x5bf711('annotationsuis-missing-ui',this,{'uiName':_0x301fac});this['isActive'](_0x301fac)&&this['deactivate'](_0x301fac),this['activeUIs']['add'](_0x301fac);const _0x56aea4=new _();!function({source:_0x373b8c,target:_0x2a92ca,filter:_0x5db42a}){for(const _0x545e7a of _0x373b8c)_0x5db42a(_0x545e7a)&&_0x2a92ca['add'](_0x545e7a);_0x2a92ca['listenTo'](_0x373b8c,'add',(_0x2c44ab,_0x56eca3)=>{_0x5db42a(_0x56eca3)&&_0x2a92ca['add'](_0x56eca3);}),_0x2a92ca['listenTo'](_0x373b8c,'remove',(_0x5e77c5,_0x2d449a)=>{_0x2a92ca['has'](_0x2d449a)&&_0x2a92ca['remove'](_0x2d449a);});}({'source':_0x1bd286['_visibleAnnotations'],'target':_0x56aea4,'filter':_0x3955f5}),this['uisData']['set'](_0x301fac,{'collection':_0x56aea4,'filter':_0x3955f5});const _0x185801=this['_uis']['get'](_0x301fac);_0x185801['attach'](_0x56aea4),this['listenTo'](_0x185801,'change:activeAnnotation',(_0x3a2648,_0x24a2a8,_0x40d7f0,_0x22a234)=>{_0x22a234&&_0x1bd286['_removeActiveAnnotation'](_0x22a234),_0x40d7f0&&_0x1bd286['_addActiveAnnotation'](_0x40d7f0);});}['deactivate'](_0x2df04a){if(this['activeUIs']['delete'](_0x2df04a),!this['_uis']['has'](_0x2df04a))throw new _0x5bf711('annotationsuis-missing-ui',this,{'uiName':_0x2df04a});const _0x43c6cf=this['_uis']['get'](_0x2df04a);_0x43c6cf['detach'](),this['stopListening'](_0x43c6cf),this['uisData']['get'](_0x2df04a)['collection']['destroy'](),this['uisData']['delete'](_0x2df04a);}['switchTo'](_0x4dd44e){if(!this['_uis']['has'](_0x4dd44e))throw new _0x5bf711('annotationsuis-missing-ui',this,{'uiName':_0x4dd44e});const _0x268cd9=this['context']['plugins']['get'](O),_0x3111b3=Array['from'](_0x268cd9['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4dd44e);const _0x590ac6=this['_uis']['get'](_0x4dd44e);_0x590ac6['setActiveAnnotation'](_0x3111b3),_0x590ac6['_setSelectedAnnotations']&&_0x3111b3&&_0x590ac6['_setSelectedAnnotations']([_0x3111b3]);}['deactivateAll'](){for(const _0x1e2846 of this['activeUIs'])this['deactivate'](_0x1e2846);}['register'](_0x5c1287,_0x38ad00){if(this['_uis']['has'](_0x5c1287))throw new _0x5bf711('annotationsuis-register-already-registered');if('function'!=typeof _0x38ad00['attach']||'function'!=typeof _0x38ad00['detach']||'function'!=typeof _0x38ad00['setActiveAnnotation'])throw new _0x5bf711('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5c1287,_0x38ad00);}['refilterAnnotations'](){const _0x3c4f06=this['context']['plugins']['get'](O)['collection'],_0x259c9d=new Map(),_0x231c99=Array['from'](this['activeUIs']);for(const _0x54d0fe of this['activeUIs']){const _0x271aec=this['uisData']['get'](_0x54d0fe)['collection'];for(const _0x42f0ae of _0x271aec)_0x259c9d['set'](_0x42f0ae,_0x54d0fe);}for(const _0x3210f5 of _0x3c4f06){const _0x19f812=_0x259c9d['get'](_0x3210f5);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3210f5);const _0x21af37=_0x231c99['find'](_0x5afdc7=>this['uisData']['get'](_0x5afdc7)['filter'](_0x3210f5));_0x19f812!==_0x21af37&&(_0x19f812&&this['uisData']['get'](_0x19f812)['collection']['remove'](_0x3210f5),_0x21af37&&this['uisData']['get'](_0x21af37)['collection']['add'](_0x3210f5));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x29f4f7){const _0x270b2b=[];for(const _0xc3c670 of this['activeUIs']){(0x0,this['uisData']['get'](_0xc3c670)['filter'])(_0x29f4f7)&&_0x270b2b['push'](_0xc3c670);}if(_0x270b2b['length']>0x1)throw new _0x5bf711('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x270b2b,'annotationType':_0x29f4f7['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x494da1){super(_0x494da1);const _0x35ae1a=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 _0x1096d1(),this['focusCycler']=new _0x47bf62({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x35ae1a['to']('class')],'style':{'minHeight':_0x35ae1a['to']('minHeight',_0x5a61ba=>'number'==typeof _0x5a61ba?pi(_0x5a61ba+0xa):null)},'dir':_0x494da1['uiLanguageDirection'],'role':'application','aria-label':E(_0x494da1,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x494da1,'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',_0x46fcc9=>{this['_updateItemPositionInFocusables'](_0x46fcc9['source']);}),this['list']['forEach'](_0x394011=>{this['focusTracker']['add'](_0x394011['element']),this['_updateItemPositionInFocusables'](_0x394011);}),this['list']['on']('change',(_0x570e80,_0x44368c)=>{for(const _0x59ee9e of _0x44368c['removed'])this['focusTracker']['remove'](_0x59ee9e['element']),this['focusables']['remove'](_0x59ee9e);for(const _0x12f9d7 of _0x44368c['added'])this['focusTracker']['add'](_0x12f9d7['element']),this['_updateItemPositionInFocusables'](_0x12f9d7);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x43ac57){const _0xfc23ff=this['focusables']['getIndex'](_0x43ac57);let _0xec8b9f,_0x186fe0;for(const _0x179fcd of this['focusables'])if(_0x43ac57['top']<_0x179fcd['top']){_0xec8b9f=_0x179fcd;break;}if(_0x186fe0=_0xec8b9f?this['focusables']['getIndex'](_0xec8b9f):this['focusables']['length'],-0x1!==_0xfc23ff){if(_0xfc23ff===_0x186fe0-0x1)return;this['focusables']['remove'](_0x43ac57),_0x186fe0=_0xec8b9f?this['focusables']['getIndex'](_0xec8b9f):this['focusables']['length'];}this['focusables']['add'](_0x43ac57,_0x186fe0);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x2ac1da){super(_0x2ac1da),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x56b1b,_0x5f043d)=>_0x56b1b+_0x5f043d),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4c1471=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4c1471['to']('isAnimationDisabled',_0xcf7d3f=>_0xcf7d3f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4c1471['to']('top',_0x814122=>Ht(_0x814122))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5ac2b9=this['element']['clientHeight'];_0x5ac2b9&&(this['height']=_0x5ac2b9);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x27e7bc{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f05d7){super(_0x1f05d7),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 _0x9fc60c=this['context']['config']['get']('sidebar.container');_0x9fc60c&&this['setContainer'](_0x9fc60c);}['setContainer'](_0x1a426e){if(!y(_0x1a426e))throw new _0x5bf711('sidebar-setcontainer-invalid-element');this['container']=_0x1a426e;}['_attachToContainer']({viewClass:_0x4d83b2='',spaceBetweenItems:_0x508266=0x19}={}){if(!y(this['container']))throw new _0x5bf711('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4d83b2,this['_spaceBetweenItems']=_0x508266;}['rearrange']({removedAnnotation:_0x5065aa,previousAnnotation:_0x35a5c0,nextAnnotation:_0x55f5d0}){const _0x4caedf=this['getSidebarItemView'](_0x5065aa);this['view']['list']['remove'](_0x4caedf),this['_destroySidebarItemView'](_0x5065aa),_0x35a5c0&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x35a5c0)),_0x55f5d0&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x55f5d0)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x199860,activatedAnnotation:_0x39776a,disableAnimationOnActivatedAnnotation:_0x399ce2}){if(this['_activeAnnotation']=_0x39776a,_0x199860){_0x199860['isActive']=!0x1;const _0x84b0f7=this['getSidebarItemView'](_0x199860);_0x84b0f7&&_0x399ce2&&(_0x84b0f7['isAnimationDisabled']=!0x1);}if(_0x39776a){const _0x157859=this['getSidebarItemView'](_0x39776a);_0x157859&&(_0x39776a['isActive']=!0x0,_0x399ce2&&(_0x157859['isAnimationDisabled']=!0x0,_0x157859['top']+=0x1),this['_alignToTargetRect'](_0x157859));}}['_detachFromContainer'](_0x3db3a4){if(this['view']['element']['remove'](),_0x3db3a4){for(const _0x597869 of _0x3db3a4)this['_destroySidebarItemView'](_0x597869);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x175332,_0x3cda4c){_0x3cda4c||(_0x3cda4c=_0x175332['view']);const _0x32aaec=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x32aaec,_0x175332),this['_annotationToSidebarItemView']['set'](_0x175332,_0x32aaec),_0x32aaec['content']['add'](_0x3cda4c),this['listenTo'](_0x175332['view'],'change:targetRect',(_0x316599,_0x2b7e9b,_0x34efce)=>{const _0x3f566f=this['_getTargetTop'](_0x175332,_0x34efce);_0x32aaec['_targetTop']!=_0x3f566f&&(_0x32aaec['_targetTop']=_0x3f566f,this['_setItemTop'](_0x32aaec,_0x3f566f));}),this['listenTo'](_0x32aaec,'change:top',()=>{this['_recalculate'](_0x32aaec,'top');}),this['listenTo'](_0x32aaec,'change:bottom',()=>{this['_recalculate'](_0x32aaec,'bottom');}),this['_alignToTargetRect'](_0x32aaec);const _0x10b28f=this['_getItemBefore'](_0x32aaec);if(_0x10b28f)this['_alignAfterItem'](_0x10b28f,_0x32aaec)||this['_alignToTargetRect'](_0x32aaec);else this['_alignToTargetRect'](_0x32aaec);return this['_updateLastItem'](),this['view']['list']['add'](_0x32aaec),_0x32aaec;}['_alignForTopChange'](_0x5ad585){if(!_0x5ad585['content']['length'])return;const _0x2241d5=this['_getItemBefore'](_0x5ad585);if(!_0x2241d5)return;const _0x4661a1=this['_sidebarItemViewToAnnotation']['get'](_0x2241d5),_0x5ee811=this['_activeAnnotation'];_0x5ee811&&_0x5ee811===_0x4661a1?this['_alignAfterItem'](_0x2241d5,_0x5ad585):this['_alignBeforeItem'](_0x5ad585,_0x2241d5);}['_alignForBottomChange'](_0x4116fa){if(!_0x4116fa['content']['length'])return;const _0x4e1789=this['_getItemAfter'](_0x4116fa);if(!_0x4e1789)return;const _0x5e421c=this['_sidebarItemViewToAnnotation']['get'](_0x4e1789),_0x463c43=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xf91826=this['_activeAnnotation'];_0xf91826&&_0xf91826===_0x5e421c&&_0x463c43?(this['_alignBeforeItem'](_0x4e1789,_0x4116fa),this['_alignAfterItem'](_0x4116fa,_0x4e1789)):_0xf91826&&_0xf91826===_0x5e421c?this['_alignBeforeItem'](_0x4e1789,_0x4116fa):this['_alignAfterItem'](_0x4116fa,_0x4e1789);}['_recalculate'](_0x32e039,_0x5dd5a4){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4921ef,changedProp:_0x5816a3}of this['_recalculateBuffer'])'top'===_0x5816a3?this['_alignForTopChange'](_0x4921ef):this['_alignForBottomChange'](_0x4921ef);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x32e039,'changedProp':_0x5dd5a4});}['getSidebarItemView'](_0x572a4c){return this['_annotationToSidebarItemView']['get'](_0x572a4c);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3c9ee4){const _0xfb82b8=this['getSidebarItemView'](_0x3c9ee4);this['stopListening'](_0xfb82b8),this['stopListening'](_0x3c9ee4['view']),_0xfb82b8['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3c9ee4),this['_sidebarItemViewToAnnotation']['delete'](_0xfb82b8);}['_createSidebarView'](){const _0x3d28dd=new F(this['context']['locale']);return _0x3d28dd['render'](),this['on']('change:_lastItem',(_0x422d71,_0x331ceb,_0x3a542f,_0x2f0e20)=>{_0x2f0e20&&_0x3d28dd['unbind']('minHeight'),_0x3a542f?_0x3d28dd['bind']('minHeight')['to'](_0x3a542f,'bottom'):_0x3d28dd['minHeight']=null;}),_0x3d28dd;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x12bd48){const _0x7e5c59=this['_sidebarItemViewToAnnotation']['get'](_0x12bd48),_0xc270ce=_0x7e5c59&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x7e5c59)-0x1);return _0xc270ce&&this['getSidebarItemView'](_0xc270ce)||null;}['_getItemAfter'](_0x78e1c5){const _0x4c02f1=this['_sidebarItemViewToAnnotation']['get'](_0x78e1c5),_0x521d6f=_0x4c02f1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4c02f1)+0x1);return _0x521d6f&&this['getSidebarItemView'](_0x521d6f)||null;}['_alignBeforeItem'](_0x21c61f,_0x1f1552){_0x21c61f['updateHeight']();const _0x48f0cd=R(_0x1f1552['bottom']+this['_spaceBetweenItems'],_0x21c61f['top']);return!!_0x48f0cd&&(this['_setItemTop'](_0x1f1552,_0x1f1552['top']-_0x48f0cd),!0x0);}['_alignAfterItem'](_0x598b6e,_0x3f5f34){_0x598b6e['updateHeight']();const _0x4187e3=R(_0x598b6e['bottom']+this['_spaceBetweenItems'],_0x3f5f34['top']);return!!_0x4187e3&&(this['_setItemTop'](_0x3f5f34,_0x3f5f34['top']+_0x4187e3,!0x1),!0x0);}['_alignToTargetRect'](_0x506f13){const _0x5bb271=this['_sidebarItemViewToAnnotation']['get'](_0x506f13);if(!_0x5bb271||!_0x5bb271['target']||!_0x5bb271['targetRect'])return;const _0x354507=this['_getTargetTop'](_0x5bb271,_0x5bb271['targetRect']);this['_setItemTop'](_0x506f13,_0x354507);}['_getTargetTop'](_0xf68dc0,_0x236bd7){if(null===_0x236bd7)return 0x0;if(_0xf68dc0['target']instanceof _0x212c58)return _0x236bd7['top'];{const _0x3643bf=new _0x212c58(this['view']['element'])['top'];return _0x236bd7['top']-_0x3643bf;}}['_setItemTop'](_0xf3614f,_0x30d256,_0x4bc3a5=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x4bc3a5&&(_0x30d256=Math['max'](_0x30d256,this['_getMaxAvailableTop'](_0xf3614f))),_0xf3614f['top']=_0x30d256;}['_getMaxAvailableTop'](_0x5f3828){let _0x435da9=this['_getItemBefore'](_0x5f3828),_0x52b441=0x0;for(;_0x435da9;)_0x435da9['updateHeight'](),_0x52b441+=this['_spaceBetweenItems']+_0x435da9['height'],_0x435da9=this['_getItemBefore'](_0x435da9);return _0x52b441;}}function R(_0x53e857,_0x51187b){return Math['max'](_0x53e857-_0x51187b,0x0);}function y(_0x302553){return null!==_0x302553&&'object'==typeof _0x302553&&0x1===_0x302553['nodeType'];}class e extends _0x27e7bc{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x204183){super(_0x204183),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x321144(),this['_refreshPositioningDebounced']=_0x1aaecd(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x267d83=this['context']['plugins']['get'](M),_0x19f8ef=this['context']['plugins']['get'](z);_0x267d83['register']('wideSidebar',this),_0x19f8ef['container']&&_0x267d83['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5f490d){if(_0x5f490d===this['activeAnnotation'])return;const _0x1b7469=this['context']['plugins']['get'](z);_0x1b7469['_activeAnnotation']=_0x5f490d;const _0x1666b4=this['activeAnnotation'];_0x1b7469['refresh']({'blurredAnnotation':_0x1666b4,'activatedAnnotation':_0x5f490d}),this['activeAnnotation']=_0x5f490d;}['attach'](_0x69c034){this['annotations']=_0x69c034;const _0x4a4781=this['context']['plugins']['get'](z);if(_0x4a4781['_annotations']=_0x69c034,this['isAttached'])throw new _0x5bf711('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4a4781,'set:container',()=>{this['detach'](),this['listenTo'](_0x4a4781,'change:container',_0x14bbf2=>{_0x14bbf2['off'](),this['attach'](_0x69c034);});}),_0x4a4781['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x21f75f=_0x5a5edd=>{_0x5a5edd['updateTargetRect'](),_0x4a4781['addAnnotation'](_0x5a5edd);};for(const _0x54da77 of _0x69c034)_0x21f75f(_0x54da77);this['listenTo'](_0x69c034,'add',(_0x28c60d,_0x1ec84e)=>{_0x21f75f(_0x1ec84e);}),this['listenTo'](_0x69c034,'remove',(_0x478d3f,_0x57976d,_0x2c3d35)=>{_0x4a4781['rearrange']({'removedAnnotation':_0x57976d,'previousAnnotation':_0x69c034['get'](_0x2c3d35-0x1),'nextAnnotation':_0x69c034['get'](_0x2c3d35+0x1)}),_0x57976d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x69c034,'focus',(_0x35fe6e,_0x1a33a0)=>{this['setActiveAnnotation'](_0x1a33a0);}),this['listenTo'](_0x69c034,'blur',()=>{this['setActiveAnnotation'](null);});const _0x95a2b9=this['context']instanceof _0x4ed3e0?this['context']['editors']:new _0x321144([this['context']]);for(const _0x4f547 of _0x95a2b9)this['_integrateWithEditorAnnotations'](_0x4f547);this['listenTo'](_0x95a2b9,'add',(_0x1b1c6d,_0x2d7c8b)=>{this['listenTo'](_0x2d7c8b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2d7c8b);});}),this['listenTo'](_0x95a2b9,'remove',(_0x5589df,_0x5078f9)=>{_0x5078f9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5078f9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5bf711('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xf99e9e=this['context']['plugins']['get'](z);_0xf99e9e['_detachFromContainer'](this['annotations']),this['stopListening'](_0xf99e9e),this['stopListening'](this['annotations']),this['context']instanceof _0x4ed3e0&&this['stopListening'](this['context']['editors']);for(const _0x384939 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x384939);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5016e1){if(!_0x5016e1['plugins']['has']('EditorAnnotations'))return;const _0x2c4440=_0x5016e1['plugins']['get']('EditorAnnotations'),_0x438705=()=>{const _0x38a31a=_0x2c4440['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x38a31a[0x0]||null);};this['listenTo'](_0x2c4440,'refresh',_0x438705),this['listenTo'](_0x2c4440,'blur',(_0x4d04e9,{isAnnotationTracked:_0xdca90d})=>{this['activeAnnotation']&&_0xdca90d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2c4440,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x21156b=>{_0x2c4440['hasDomSelection']()&&(_0x438705(),_0x21156b['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2c4440);}['_destroyEditorAnnotationsIntegration'](_0x2e22c1){this['stopListening'](_0x2e22c1),this['_editorAnnotations']['remove'](_0x2e22c1);}}class C extends _0x59b830{['counterView'];constructor(_0x3b9f81){super(_0x3b9f81);const _0x1f807f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x265100,_0xda886b)=>_0x265100?'...':_0xda886b['toString']()),this['set']('annotationType',''),this['icon']=_0x723f12,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1f807f['to']('annotationType',_0x537ceb=>'ck-annotation-counter__badge--'+_0x537ceb),_0x1f807f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1f807f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x27e7bc{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5a40ee){super(_0x5a40ee),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x5853c4),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x321144(),this['_refreshPositioningDebounced']=_0x1aaecd(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3b31ed(this['context']['locale']),this['balloonPanelView']=new _0x1c86d3(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x450d7c){this['annotations']=_0x450d7c;const _0x5f0e0e=this['context']['plugins']['get'](z),_0x26dd7f=this['balloonPanelView'];if(_0x5f0e0e['_annotations']=_0x450d7c,this['isAttached'])throw new _0x5bf711('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5f0e0e,'set:container',()=>{this['detach'](),this['listenTo'](_0x5f0e0e,'change:container',_0x414b57=>{_0x414b57['off'](),this['attach'](_0x450d7c);});}),_0x5f0e0e['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x52f7b0=_0x474328=>{const _0x3f153f=new C(this['context']['locale']);_0x5f0e0e['addAnnotation'](_0x474328,_0x3f153f),this['_annotationToNarrowView']['set'](_0x474328,_0x3f153f),_0x3f153f['bind']('isDirty','annotationType','number')['to'](_0x474328['view'],'isDirty','type','length'),_0x3f153f['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x26dd7f['content']['first']!==_0x474328['view']?(this['_showBalloon'](_0x474328),_0x474328['view']['element']['focus'](),this['setActiveAnnotation'](_0x474328)):this['setActiveAnnotation'](null);});};for(const _0x10f2ee of _0x450d7c)_0x52f7b0(_0x10f2ee);this['listenTo'](_0x450d7c,'add',(_0x1325ff,_0x4fd8bb)=>{_0x52f7b0(_0x4fd8bb);}),this['listenTo'](_0x450d7c,'remove',(_0x5ed381,_0xdf3c5e,_0x358605)=>{this['_annotationToNarrowView']['get'](_0xdf3c5e)['destroy'](),this['_annotationToNarrowView']['delete'](_0xdf3c5e),_0x5f0e0e['rearrange']({'removedAnnotation':_0xdf3c5e,'previousAnnotation':_0x450d7c['get'](_0x358605-0x1),'nextAnnotation':_0x450d7c['get'](_0x358605+0x1)}),_0xdf3c5e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x450d7c,'focus',(_0x23ee28,_0x119f64)=>{this['setActiveAnnotation'](_0x119f64);}),this['listenTo'](_0x450d7c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2457a0,_0x574564)=>{_0x574564['keyCode']===_0x414a9a['esc']&&_0x26dd7f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x26dd7f['content']['first']),this['_hideBalloon'](),_0x574564['stopPropagation'](),_0x574564['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x49fd61,_0x306048)=>{const _0x158c90=_0x306048['target'];_0x26dd7f['isVisible']&&_0x26dd7f['element']['contains'](_0x158c90)||_0x5f0e0e['view']['element']['contains'](_0x158c90)||_0x49fd61['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xc029a9=>_0xc029a9['contains'](_0x158c90))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x40c3c9=this['context']instanceof _0x4ed3e0?this['context']['editors']:new _0x321144([this['context']]);for(const _0x773292 of _0x40c3c9)this['_integrateWithEditorAnnotations'](_0x773292);this['listenTo'](_0x40c3c9,'add',(_0x32d1a7,_0xfc8727)=>{this['listenTo'](_0xfc8727,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xfc8727);});}),this['listenTo'](_0x40c3c9,'remove',(_0x356fcc,_0x2b9447)=>{_0x2b9447['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2b9447['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3c9b78){if(_0x3c9b78===this['activeAnnotation'])return;const _0x4b5cb6=this['context']['plugins']['get'](z);if(_0x4b5cb6['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3c9b78,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3c9b78)_0x4b5cb6['getSidebarItemView'](_0x3c9b78)?this['_showBalloon'](_0x3c9b78):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3c9b78;}['detach'](){if(!this['isAttached'])throw new _0x5bf711('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xc1d63e=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xfd6dc9=>_0xfd6dc9['destroy']()),this['_annotationToNarrowView']['clear'](),_0xc1d63e['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4ed3e0&&this['stopListening'](this['context']['editors']);for(const _0x58b403 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x58b403);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'](_0x5a0cb8){if(!_0x5a0cb8['plugins']['has']('EditorAnnotations'))return;const _0x46044a=_0x5a0cb8['plugins']['get']('EditorAnnotations'),_0x3fcc2a=this['context']['plugins']['get'](z),_0x390fa9=this['annotations'],_0x10974a=this['balloonPanelView'],_0x177e0d=()=>{const _0x28fde6=_0x46044a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x28fde6),this['setActiveAnnotation'](_0x28fde6[0x0]||null);};this['listenTo'](_0x46044a,'refresh',_0x177e0d),this['listenTo'](_0x46044a,'blur',(_0x409a1e,{isAnnotationTracked:_0x278410})=>{this['activeAnnotation']&&_0x278410(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x46044a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x390fa9,'blur',_0x20cd17=>{_0x46044a['hasDomSelection']()&&_0x20cd17['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x11b9ac,_0x4ace3c)=>{const _0x1ce63a=_0x4ace3c['target'];_0x10974a['isVisible']&&_0x10974a['element']['contains'](_0x1ce63a)||_0x3fcc2a['view']['element']['contains'](_0x1ce63a)||this['activeAnnotation']&&_0x46044a['hasDomSelection']()&&(_0x177e0d(),_0x11b9ac['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x46044a);}['_destroyEditorAnnotationsIntegration'](_0x542dae){_0x542dae&&(this['stopListening'](_0x542dae),this['_editorAnnotations']['remove'](_0x542dae));}['_setSelectedAnnotations'](_0x4d5805){for(const _0x22bea1 of this['_selectedAnnotations'])_0x4d5805['includes'](_0x22bea1)||this['_manuallyClosedAnnotationViews']['delete'](_0x22bea1['view']);this['_selectedAnnotations']=_0x4d5805;}['_refreshPositioning'](){const _0x410be7=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x410be7['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2facbc){if(this['_manuallyClosedAnnotationViews']['has'](_0x2facbc['view']))return;const _0x1eaeb9=this['balloonPanelView']['content']['first'];_0x1eaeb9!==_0x2facbc['view']?(_0x1eaeb9&&this['_detachListeners'](_0x1eaeb9),this['_attachListeners'](_0x2facbc['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2facbc['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x468cdb=this['balloonPanelView']['content']['first'],_0x5e7bae=_0x468cdb&&this['annotations']['getByView'](_0x468cdb);if(!_0x5e7bae||!this['_annotationToNarrowView']['has'](_0x5e7bae))return;const _0x2a8550=this['_annotationToNarrowView']['get'](_0x5e7bae)['element'],_0x5689d4=(function(){const _0x34cbfe=_0x1c86d3['defaultPositions'];return[_0x34cbfe['southArrowNorthEast'],_0x34cbfe['northArrowSouthEast'],_0x34cbfe['southArrowNorth'],_0x34cbfe['northArrowSouth'],_0x34cbfe['southArrowNorthWest'],_0x34cbfe['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2a8550,'positions':_0x5689d4});}['_hideBalloon'](){const _0x1cd285=this['balloonPanelView'],_0x57395a=_0x1cd285['content']['first'];_0x57395a&&(this['_detachListeners'](_0x57395a),_0x1cd285['unpin'](),_0x1cd285['content']['clear']());}['_attachListeners'](_0x31f461){this['listenTo'](_0x31f461,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x31f461,'Esc',(_0x3c9c6e,_0x5bf3b5)=>{this['_manuallyClosedAnnotationViews']['add'](_0x31f461),this['_hideBalloon'](),_0x5bf3b5();});}['_detachListeners'](_0x50cccf){this['stopListening'](_0x50cccf);}}class c extends _0x4e6ffe{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x114036,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f09c4){super(_0x2f09c4),_0x2f09c4['editing']['view']['addObserver'](_0x5ae565),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2f09c4['plugins']['get'](_0x114036),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x277ba9=this['editor']['plugins']['get'](M);_0x277ba9['context']===this['editor']&&(_0x277ba9['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xa0f0ee,_0x56fdab)=>{const _0x5b70a3=this['_balloon'];if(this['isAttached']&&_0x5b70a3['visibleView']){const _0x3f5c38=this['annotations']['getByView'](_0x5b70a3['visibleView']);_0x3f5c38&&this['_closeAnnotation'](_0x3f5c38),_0x56fdab();}}));}['afterInit'](){const _0x5171f2=this['editor']['plugins']['get'](M);_0x5171f2['context']===this['editor']&&(_0x5171f2['hasActive']()||_0x5171f2['switchTo']('inline'));}['setActiveAnnotation'](_0x336dfe){_0x336dfe!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x336dfe&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x336dfe)&&this['_addAnnotationToBalloon'](_0x336dfe,!0x0),_0x336dfe['isActive']=!0x0),_0x336dfe||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x336dfe);}['attach'](_0x3524e4){this['annotations']=_0x3524e4;const _0x4ae376=this['editor']['plugins']['get'](M),_0x85cd46=this['_balloon'];if(this['isAttached'])throw new _0x5bf711('inlineannotations-attach-already-attached',this);if(_0x4ae376['context']!==this['editor'])throw new _0x5bf711('inlineannotations-not-allowed-with-context',this);const _0x278b3d=this['editor']['plugins']['get'](P);this['listenTo'](_0x278b3d,'refresh',()=>{const _0x611de9=_0x278b3d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x34602b,_0x3237c2;!this['_forceRefresh']&&(_0x34602b=_0x611de9,_0x3237c2=this['_selectedAnnotations'],_0x34602b['length']===_0x3237c2['length']&&_0x34602b['every'](_0x2ee787=>_0x3237c2['includes'](_0x2ee787)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x611de9),this['setActiveAnnotation'](_0x611de9[0x0]||null));}),this['listenTo'](_0x278b3d,'blur',(_0x580a0d,{isAnnotationTracked:_0x3e1a1b})=>{this['activeAnnotation']&&_0x3e1a1b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x424986,_0x442697,_0x1870ba)=>{_0x1870ba||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3524e4,'remove',(_0x386720,_0x37866c)=>{this['_removeAnnotationFromBalloon'](_0x37866c),_0x37866c===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x85cd46,'change:visibleView',(_0x37d726,_0x573a84,_0x40c9b2,_0x43ce71)=>{_0x43ce71&&this['stopListening'](_0x43ce71);const _0xa5fbb=_0x3524e4['getByView'](_0x40c9b2);_0x40c9b2&&_0xa5fbb&&(this['listenTo'](_0x40c9b2,'change:height',()=>{_0x85cd46['updatePosition']();}),this['listenTo'](_0x40c9b2,'Esc',()=>{this['_closeAnnotation'](_0xa5fbb),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xa5fbb&&this['setActiveAnnotation'](_0xa5fbb));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x85cd46['visibleView']&&(_0x3524e4['getByView'](_0x85cd46['visibleView'])&&_0x85cd46['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 _0x5bf711('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x225e45 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x225e45);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x1ea002){for(const _0x56f40c of this['_selectedAnnotations'])_0x1ea002['includes'](_0x56f40c)||this['_manuallyClosed']['delete'](_0x56f40c);for(const _0x187cca of this['annotations'])_0x1ea002['includes'](_0x187cca)||this['_removeAnnotationFromBalloon'](_0x187cca);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1f78df of _0x1ea002)this['_addAnnotationToBalloon'](_0x1f78df);}this['_selectedAnnotations']=_0x1ea002;}['_addAnnotationToBalloon'](_0xb03581,_0x2b0191=!0x1){this['_manuallyClosed']['has'](_0xb03581)||(this['_addedAnnotations']['has'](_0xb03581)||this['_balloon']['hasView'](_0xb03581['view'])||(this['_addedAnnotations']['add'](_0xb03581),this['_balloon']['add']({'stackId':_0xb03581['view']['id'],'view':_0xb03581['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xb03581)}})),_0x2b0191&&this['_balloon']['showStack'](_0xb03581['view']['id']));}['_getBalloonTargetForAnnotation'](_0x16a5c4){const _0x3b0e65=_0x16a5c4['target'],_0x238995=this['editor']['editing']['view'],_0x10b6f2=_0x238995['document']['selection']['getFirstRange'](),_0x3e06ac=_0x238995['domConverter']['viewRangeToDom'](_0x10b6f2);if(_0x3e06ac['collapse'](!0x0),_0x3b0e65){if(_0x3b0e65 instanceof _0x212c58)return _0x3b0e65;let _0x3e26b6=[];for(const _0x24c2f0 of _0x3b0e65)_0x3e26b6['push'](...(_0x45ada5=_0x24c2f0['getClientRects'](),Array['from'](_0x45ada5)['map'](DOMRect['fromRect'])));_0x3e26b6=function(_0x23e04b){const _0x22960=[];let _0x240160=_0x23e04b[0x0];for(let _0x7fcbb2=0x1;_0x7fcbb2<_0x23e04b['length'];_0x7fcbb2++)B(_0x240160,_0x23e04b[_0x7fcbb2])?_0x240160['width']+=_0x23e04b[_0x7fcbb2]['width']:(_0x22960['push'](_0x240160),_0x240160=_0x23e04b[_0x7fcbb2]);return _0x22960['push'](_0x240160),_0x22960;}(_0x3e26b6);const _0x4b2436=_0x3e06ac['getBoundingClientRect']();return _0x3e26b6['find'](_0x58636e=>_0x58636e['top']<=_0x4b2436['top']&&_0x58636e['bottom']>=_0x4b2436['bottom']&&_0x58636e['left']<=_0x4b2436['left']&&_0x58636e['right']>=_0x4b2436['right'])||_0x3e26b6[0x0];}var _0x45ada5;return _0x16a5c4['targetRect']||_0x3e06ac;}['_removeAnnotationFromBalloon'](_0xd76c0e){this['_addedAnnotations']['has'](_0xd76c0e)&&this['_balloon']['hasView'](_0xd76c0e['view'])&&(this['_addedAnnotations']['delete'](_0xd76c0e),this['_balloon']['remove'](_0xd76c0e['view']));}['_closeAnnotation'](_0x33d7cd){this['_manuallyClosed']['add'](_0x33d7cd),this['_removeAnnotationFromBalloon'](_0x33d7cd);}}function B(_0x4d8f5a,_0x2f21bc){return _0x4d8f5a['top']===_0x2f21bc['top']&&_0x4d8f5a['bottom']===_0x2f21bc['bottom']&&_0x4d8f5a['right']===_0x2f21bc['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x3dfa16,_0x21fb7c){super(_0x3dfa16),this['set']('isEmpty',!_0x21fb7c['length']),this['focusTracker']=new _0x1096d1(),this['_annotationViews']=_0x21fb7c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x47bf62({'focusables':_0x21fb7c,'focusTracker':this['focusTracker']}),this['listenTo'](_0x21fb7c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x21fb7c,'remove',(_0x105a77,_0x5174a2)=>{_0x5174a2['isActive']&&this['focus'](),_0x21fb7c['length']||(this['isEmpty']=!0x0);});const _0x57e61c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x3dfa16,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x21fb7c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x57e61c['if']('isEmpty','ck-hidden',_0x239efb=>!_0x239efb)]},'children':[{'text':E(_0x3dfa16,'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 _0x383d6b of this['_annotationViews'])this['focusTracker']['add'](_0x383d6b['element']);this['_annotationViews']['on']('change',(_0x10de00,{added:_0xb55f24,removed:_0x1314a9})=>{for(const _0x469f37 of _0xb55f24)this['focusTracker']['add'](_0x469f37['element']);for(const _0x1bbb9e of _0x1314a9)this['focusTracker']['remove'](_0x1bbb9e['element']);});}}class f extends _0x27e7bc{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x5d2653){super(_0x5d2653),this['archivedThreads']=new _0x321144();}['init'](){const _0x288b84=this['context'],_0x3cca12=_0x288b84['plugins']['get'](o),_0x5c9517=_0x288b84['plugins']['get'](O);this['listenTo'](_0x3cca12,'addCommentThread',(_0x237105,{threadId:_0x21dbb6})=>{const _0x1952a3=_0x3cca12['getCommentThread'](_0x21dbb6);_0x1952a3['archivedAt']&&this['archivedThreads']['add'](_0x1952a3,this['_calculatePosition'](_0x1952a3['archivedAt'])),this['listenTo'](_0x1952a3,'change:archivedAt',(_0x84c03d,_0x7e2d13,_0x448071)=>{_0x448071?this['archivedThreads']['has'](_0x1952a3)||this['archivedThreads']['add'](_0x1952a3,this['_calculatePosition'](_0x1952a3['archivedAt'])):this['archivedThreads']['has'](_0x1952a3)&&this['archivedThreads']['remove'](_0x1952a3);});}),this['listenTo'](_0x3cca12,'removeCommentThread',(_0x3bdfbc,{threadId:_0x38ba3f})=>{const _0x4bc100=_0x3cca12['getCommentThread'](_0x38ba3f);this['stopListening'](_0x4bc100),this['archivedThreads']['has'](_0x4bc100)&&this['archivedThreads']['remove'](_0x4bc100);},{'priority':'highest'}),this['listenTo'](_0x5c9517['collection'],'focus',(_0x19df0f,_0x44944b)=>{_0x44944b['isVisible']||(_0x44944b['isActive']=!0x0,_0x5c9517['activate'](_0x44944b));});}['_calculatePosition'](_0x3083f7){const _0x1c7a77=[...this['archivedThreads']]['findIndex'](_0x2a92e5=>_0x2a92e5['archivedAt']<_0x3083f7);return _0x1c7a77>-0x1?_0x1c7a77:this['archivedThreads']['length'];}}class a extends _0x4e6ffe{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x89b3d0];}constructor(_0x55d959){super(_0x55d959),this['annotationViews']=new _0x265dd7(),this['_pendingThreads']=[];}['init'](){const _0x1a323b=this['editor'],_0x1f734c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1a323b['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x59b830,!0x0)),_0x1a323b['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1c8b7a=this['_createCommentsArchiveButton'](_0x38f3a4);return _0x1c8b7a['set']({'role':'menuitemcheckbox'}),_0x1c8b7a;});const _0x4c96ca=_0x1a323b['plugins']['get'](f),_0x4c1bd9=_0x1a323b['plugins']['get']('Annotations'),_0x3266d4=_0x1a323b['plugins']['get']('CommentsRepository');_0x4c96ca['archivedThreads']['forEach'](_0x38a69d=>{this['_handleNewThread'](_0x38a69d);}),this['listenTo'](_0x4c96ca['archivedThreads'],'add',(_0x2b0d9c,_0x295d49)=>{this['_handleNewThread'](_0x295d49);}),this['listenTo'](_0x4c1bd9['collection'],'add',(_0x1aebd1,_0x12237a)=>{const _0x441b66=this['_pendingThreads']['find'](_0x498bda=>{const _0x50f32d=_0x3266d4['_threadToController']['get'](_0x498bda);return _0x50f32d&&_0x12237a['innerView']===_0x50f32d['view'];});if(_0x441b66){const _0x1a6a21=this['_calculatePosition'](_0x441b66['archivedAt']);this['annotationViews']['add'](_0x12237a['view'],_0x1a6a21),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x441b66),0x1);}}),this['listenTo'](_0x4c96ca['archivedThreads'],'remove',(_0x194ee7,_0x1f6cf9)=>{const _0x4e8970=_0x1a323b['config']['get']('collaboration.channelId');if(!_0x4e8970||_0x1f6cf9['channelId']===_0x4e8970){if(this['_pendingThreads']['includes'](_0x1f6cf9))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1f6cf9),0x1);else{const _0x3c9982=_0x3266d4['_threadToController']['get'](_0x1f6cf9),_0x22e0f7=_0x4c1bd9['getByInnerView'](_0x3c9982['view']);this['annotationViews']['remove'](_0x22e0f7['view']),this['stopListening'](_0x22e0f7['focusableElements']);}}}),this['listenTo'](_0x4c1bd9['collection'],'add',(_0x3635b0,_0x3d35dc)=>{this['listenTo'](_0x3d35dc,'escape',_0x1f734c);}),this['listenTo'](_0x4c1bd9['collection'],'remove',(_0x153c05,_0xe5a258)=>{this['stopListening'](_0xe5a258,'escape',_0x1f734c);});}['_handleNewThread'](_0x7dc87){const _0x1cefc7=this['editor']['plugins']['get']('CommentsRepository'),_0x22d33a=this['editor']['plugins']['get']('Annotations'),_0x56d925=this['editor']['config']['get']('collaboration.channelId');if(!_0x56d925||_0x7dc87['channelId']===_0x56d925){const _0x32c7e1=_0x1cefc7['_threadToController']['get'](_0x7dc87);if(!_0x32c7e1)return void this['_pendingThreads']['push'](_0x7dc87);const _0x34e7be=this['_calculatePosition'](_0x7dc87['archivedAt']),_0x5094d3=_0x22d33a['getByInnerView'](_0x32c7e1['view']);_0x5094d3['isVisible']&&_0x22d33a['_visibleAnnotations']['remove'](_0x5094d3),this['annotationViews']['add'](_0x5094d3['view'],_0x34e7be);}}['_calculatePosition'](_0x317289){const _0x382595=this['editor']['config']['get']('collaboration.channelId'),_0x376864=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x41b3f4=>_0x41b3f4['channelId']===_0x382595)['findIndex'](_0x2727aa=>_0x2727aa['archivedAt']<_0x317289);return _0x376864<0x0||_0x376864>this['annotationViews']['length']?this['annotationViews']['length']:_0x376864-0x1;}['_toggleDialog'](){const _0x9066d8=this['editor'],_0x30ea30=_0x9066d8['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x9066d8['locale'],this['annotationViews'])),'commentsArchive'===_0x30ea30['id']?_0x30ea30['hide']():_0x30ea30['show']({'id':'commentsArchive','title':E(_0x9066d8['locale'],'COMMENTS_ARCHIVE'),'icon':_0x33284a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x45c3e0['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x17858b,_0x563727=!0x1){const _0x578aff=this['editor']['locale'],_0x18ef7c=this['editor']['plugins']['get']('Dialog'),_0x104cce=new _0x17858b(_0x578aff);return _0x104cce['bind']('isEnabled')['to'](this,'isEnabled'),_0x104cce['bind']('isOn')['to'](_0x18ef7c,'id',_0x3e1103=>'commentsArchive'===_0x3e1103),_0x104cce['set']({'label':E(_0x578aff,'COMMENTS_ARCHIVE'),'icon':_0x33284a,'isToggleable':!0x0}),_0x563727&&(_0x104cce['tooltip']=!0x0),this['listenTo'](_0x104cce,'execute',()=>this['_toggleDialog']()),_0x104cce;}['_hideDialogOnAnnotationEscape']=_0x2f3f71=>{const _0x554d4d=_0x2f3f71['source'];if(!this['annotationViews']['has'](_0x554d4d['view']))return;const _0x40af2a=this['editor']['plugins']['get']('Dialog');_0x40af2a['isOpen']&&'commentsArchive'===_0x40af2a['id']&&(_0x40af2a['hide'](),_0x2f3f71['stop']());};}class p extends _0x4e6ffe{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x1431d7,ContextPlugin as _0x253287,PendingActions as ht,Command as _0x1da399,Plugin as _0x345605,Context as _0x284fd0}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x30449f,uid as _0x5f52ef,KeystrokeHandler as jt,FocusTracker as _0x19f40a,diff as _0x196877,Collection as _0x5d031f,Rect as _0x2413b8,CKEditorError as _0x5d5198,first as _0x4fe439,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x4445b8,keyCodes as _0x5946f7}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0xd82a8f,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x579911,trimHtml as _0x17fb5a,LateFocusDropdownButtonView as _0x5b7864,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x27dd91}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x2c8b2c}from'es-toolkit/compat';import{IconUndo as _0xf7047d,IconCheck as _0x3c8f8e,IconPencil as _0x4bbed0,IconRemoveComment as _0x4858a0,IconThreeVerticalDots as _0x50de71,IconAddComment as _0x38689e,IconCommentsArchive as _0x45a11f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x2d6288,ButtonView as _0x306a1b,ViewCollection as _0x2598eb,createDropdown as _0x163b01,ListView as _0x311efb,focusChildOnDropdownOpen as _0x5f2dd6,ListItemView as _0x499425,MenuBarMenuListItemButtonView as _0x24a797,BodyCollection as _0x359834,BalloonPanelView as _0x3a79a4,ContextualBalloon as _0x4e0495,Dialog as _0x1d5c18,DialogViewPosition as _0x32d1cc}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x59c661}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x269987}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x481683}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x30449f(){['model'];['view'];constructor(_0x336f0b,_0x4c6dbe){super(),this['model']=_0x336f0b,this['model']['_isAttached']=!0x0,this['view']=_0x4c6dbe,this['listenTo'](_0x4c6dbe,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4c6dbe,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4c6dbe,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4c6dbe,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4c6dbe,'addComment',(_0xd13ceb,_0x53125b)=>this['addComment'](_0x53125b)),this['listenTo'](_0x4c6dbe,'updateComment',(_0x1db0b9,_0x3896e7,_0x5f2c6e)=>this['updateComment'](_0x3896e7,_0x5f2c6e)),this['listenTo'](_0x4c6dbe,'removeComment',(_0x43738d,_0x4deac0)=>this['removeComment'](_0x4deac0));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1064c3){this['model']['addComment']({'content':_0x1064c3,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x31696c,_0x5c46a1){this['model']['getComment'](_0x31696c)['update']({'content':_0x5c46a1});}['removeComment'](_0x10e844){this['model']['getComment'](_0x10e844)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x2dd648,_0x2b5962,_0x3fe85c){const t=_0x2dd648['t'];switch(_0x2b5962){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'},_0x3fe85c);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x3fe85c);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'},_0x3fe85c);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'},_0x3fe85c);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x3fe85c);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'},_0x3fe85c);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'},_0x3fe85c);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'},_0x3fe85c);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Ut extends Vt{['main'];['editable'];constructor(_0x48adc3,_0x36e391){super(_0x48adc3);const _0x2c13f8=_0x5f52ef();this['main']=this['createCollection'](),this['editable']=new $t(_0x48adc3,_0x36e391,void 0x0,{'label':()=>E(_0x48adc3,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x48adc3['uiLanguageDirection'],'lang':_0x48adc3['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x2c13f8},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Rt{['view'];constructor(_0x25635e){super(_0x25635e),this['view']=new Ut(_0x25635e['locale'],_0x25635e['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1ca744=this['editor']['editing']['view'],_0x52c6b4=this['view']['editable'],_0x37a5a2=_0x1ca744['document']['getRoot']();_0x52c6b4['name']=_0x37a5a2['rootName'],this['view']['render']();const _0x1b773a=_0x52c6b4['element'];this['setEditableElement'](_0x52c6b4['name'],_0x1b773a),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1ca744['attachDomRoot'](_0x1b773a),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x30449f(_0x1431d7){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x9154eb={}){function _0x19aa03(_0xa9da42){return _0xa9da42['map'](_0xcb6c72=>String['fromCharCode'](_0xcb6c72))['join']('');}(_0x9154eb=Object['assign']({},_0x9154eb))['plugins']||(_0x9154eb['plugins']=Qt['defaultPlugins']),super(_0x9154eb),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x19aa03([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x19aa03([0x76,0x69,0x65,0x77])][_0x19aa03([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x19aa03([0x61,0x75,0x74,0x6f]),this[_0x19aa03([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x19aa03([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x19aa03([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x19aa03([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x19aa03([0x6f,0x6b])});}['create'](){const _0xe9abb=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xe9abb))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3d3776=>{const _0x22bc83=this['model']['document']['getRoot'](),_0x38bf6c=_0x22bc83&&_0x22bc83['getChild'](_0x22bc83['childCount']-0x1);_0x3d3776['setSelection'](_0x38bf6c,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x227d7e=this['editing']['view'],_0x4e9c7c=_0x227d7e['document']['getRoot'](),_0x506717=_0x4e9c7c['getChild'](0x0);_0x4e9c7c['childCount']>0x1||!_0x506717||'p'!=_0x506717['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x227d7e,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x506717['placeholder']=this['placeholder']),Ft({'view':_0x227d7e,'element':_0x506717,'keepOnFocus':!0x0}),this['placeholderElement']=_0x506717);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2310ad,_0x4461a6={}){super(_0x2310ad),this['editor']=null,this['_editorConfig']=_0x4461a6,this['set']('value',_0x4461a6['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x2310ad,'Reply...')),this['set']('submitLabel',E(_0x2310ad,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x19f40a(),this['focusCycler']=new _0x2d6288({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x45b760,_0xb135fa)=>{this['cancelButtonView']['fire']('execute'),_0xb135fa();}),this['keystrokes']['set']('Ctrl+Enter',(_0x12059d,_0x5df5f7)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5df5f7());}),this['on']('submit',(_0x22494b,_0xcc8096)=>{_0xcc8096['length']>0xfde8?(alert(E(_0x2310ad,'TOO_LONG_COMMENT_ALERT',[_0xcc8096['length'],0xfde8])),_0x22494b['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x52af78=this['editor'];this['element']['insertBefore'](_0x52af78['ui']['element'],this['element']['firstChild']),_0x52af78['model']['document']['on']('change',()=>this['value']=_0x52af78['getData']()),_0x52af78['bind']('placeholder')['to'](this),this['focusables']['add'](_0x52af78['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5e26a9){-0x1===_0x5e26a9?(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:_0x50f5f9}=this,_0x1cff96=new _0x306a1b(_0x50f5f9);return _0x1cff96['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1cff96['withText']=!0x0,_0x1cff96['bind']('label')['to'](this,'submitLabel'),_0x1cff96['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1cff96['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x282279,_0x51f33f)=>!_0x51f33f&&!!_0x282279['trim']()),_0x1cff96;}['_createCancelButton'](){const {locale:_0x16b582}=this,_0x45a394=new _0x306a1b(_0x16b582);return _0x45a394['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x45a394['label']=E(_0x16b582,'Cancel'),_0x45a394['withText']=!0x0,_0x45a394['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x45a394;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x34a1f5=>{this['focusTracker']['add'](_0x34a1f5['element']);}),this['focusables']['on']('change',(_0x17b087,_0x3128fc)=>{for(const _0x543405 of Array['from'](_0x3128fc['added'])['reverse']())this['focusTracker']['add'](_0x543405['element']);});}}class ie extends kt{constructor(_0x28df7f,_0x3af304,_0x5cb1a1){super(_0x28df7f),this['commentInputView']=new os(_0x28df7f,_0x5cb1a1),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x23c240,_0x298604)=>_0x23c240||!!_0x298604),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 _0xd82a8f(_0x28df7f,_0x3af304),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'](_0x4b5de1){this['commentInputView']['focus'](_0x4b5de1);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x34256e,_0x487394)=>{const {submitButtonView:_0x327192,cancelButtonView:_0x5667a4,editor:_0x42658e}=this['commentInputView'];[_0x327192['element'],_0x5667a4['element'],_0x42658e?_0x42658e['editing']['view']['getDomRoot']():null]['filter'](_0x170c5f=>_0x170c5f)['some'](_0x8dd5a3=>_0x8dd5a3['contains'](_0x487394['target']))||(this['focus'](),_0x487394['preventDefault']());});}}class cs extends kt{constructor(_0x31ae48){super(_0x31ae48);const _0x122391=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x122391['to']('count',_0x53ea94=>E(_0x31ae48,'NUMBER_OF_COMMENTS',_0x53ea94))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x55a43f,_0xd1150f,_0x368c8a){super(_0x55a43f);const _0x3084cb=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xd1150f['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xd1150f,this['_config']=_0x368c8a,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x19f40a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2d6288({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xdf33ff=>this['commentViews']['map'](_0x22184c=>_0x22184c['element'])['includes'](_0xdf33ff['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x55a43f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x298c78=>_0x298c78-this['_config']['maxCommentsWhenCollapsed']);for(const _0x53cf0d of _0xd1150f['comments'])this['_handleNewCommentModel'](_0x53cf0d);this['_handleInfoComment'](),this['listenTo'](_0xd1150f['comments'],'add',(_0x39d66b,_0xaa8ada)=>{const _0x587676=this['_calculatePosition'](_0xaa8ada);this['length']++,this['_handleNewCommentModel'](_0xaa8ada,_0x587676),this['refreshVisibleViews']();}),this['listenTo'](_0xd1150f['comments'],'remove',(_0x37b06e,_0x12d7dc)=>{this['length']--,this['_handleRemoveCommentModel'](_0x12d7dc),this['refreshVisibleViews']();}),this['listenTo'](_0xd1150f,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xd1150f,'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',_0x3084cb['if']('length','ck-hidden',_0x1ca82f=>!_0x1ca82f)],'aria-label':E(_0x55a43f,'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'](_0x44fe5d){-0x1===_0x44fe5d?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x288933 of this['commentViews'])_0x288933['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x192a78,_0x3c0c5f){const _0x13939e=new this['_config']['CommentView'](this['locale'],_0x192a78,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x13939e['viewUid']=_0x192a78['id'],_0x13939e['delegate']('removeComment')['to'](this),_0x13939e['delegate']('updateComment')['to'](this),_0x13939e['delegate']('resolveCommentThread')['to'](this),_0x13939e['delegate']('editorReady')['to'](this),_0x13939e['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x13939e,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x13939e,_0x3c0c5f);}['_calculatePosition'](_0x52bf91){const _0x38fc66=this['_model']['_findOptimalIndex'](_0x52bf91);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x52bf91['authoredAt']?_0x38fc66-0x1:_0x38fc66:_0x38fc66-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3f0acd={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3f0acd,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3f0acd));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3ebebc){const _0xc604f5=this['commentViews']['remove'](_0x3ebebc['id']);this['stopListening'](_0xc604f5),_0xc604f5['isEditMode']&&this['_updateHasDirtyComment'](),_0xc604f5['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0xb6433e=>_0xb6433e['isEditMode']);}['_rearrangeCollapse'](){const _0x176a3f=function(_0x5c7a64){const _0x544ffe=new _0x5d031f();for(const _0x205a0f of _0x5c7a64)_0x544ffe['add'](_0x205a0f);return _0x544ffe;}(this['commentViews']),_0x31eb0c=this['_collapsedCommentsView']['count'];for(let _0xcdf1dc=0x1;_0xcdf1dc<=_0x31eb0c;_0xcdf1dc++)_0x176a3f['remove'](0x1);for(const _0x1e945f of _0x176a3f)_0x1e945f['collapse']();_0x31eb0c>0x0&&_0x176a3f['add'](this['_collapsedCommentsView'],0x1),ns(_0x196877(Array['from'](this['visibleViews']),Array['from'](_0x176a3f)),this['visibleViews'],_0x176a3f);}['_rearrangeExpand'](){ns(_0x196877(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x92f52f of this['visibleViews'])_0x92f52f['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4d69a1=>{this['focusTracker']['add'](_0x4d69a1['element']),this['keystrokes']['listenTo'](_0x4d69a1['element']);}),this['commentViews']['on']('change',(_0x4292ea,_0x1cc83a)=>{for(const _0x30fe4c of _0x1cc83a['removed'])this['focusTracker']['remove'](_0x30fe4c['element']),this['keystrokes']['stopListening'](_0x30fe4c['element']);for(const _0x355be8 of Array['from'](_0x1cc83a['added'])['reverse']())this['focusTracker']['add'](_0x355be8['element']),this['keystrokes']['listenTo'](_0x355be8['element']);});}}function ns(_0x22fc9b,_0x1cbcb7,_0x209323){let _0x564f1a=0x0;for(const _0x4e8cae of _0x22fc9b)switch(_0x4e8cae){case'insert':_0x1cbcb7['add'](_0x209323['get'](_0x564f1a),_0x564f1a),_0x564f1a++;break;case'delete':_0x1cbcb7['remove'](_0x564f1a);break;case'equal':_0x564f1a++;}}class as extends kt{constructor(_0x54a972){super(_0x54a972);const _0x27f36f=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x27f36f['to']('contextValue',_0xe3feee=>E(_0x54a972,'THREAD_CONTEXT_LABEL',_0xe3feee)),'tabindex':-0x1},'children':[{'text':_0x27f36f['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x333797,_0x3e837e){super(_0x333797);const _0x367eca=this['bindTemplate'];this['_model']=_0x3e837e,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x19f40a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2d6288({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x8d1284=>!!_0x8d1284),this['bind']('contextValue')['to'](this['_model'],'context',_0x16155f=>_0x16155f&&_0x16155f['value']?this['_trimContextValue'](_0x16155f['value']):E(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',_0x367eca['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 _0x5a81db=new _0x306a1b(this['locale']);return _0x5a81db['label']=E(this['locale'],'Reopen'),_0x5a81db['tooltip']=E(this['locale'],'Reopen'),_0x5a81db['icon']=_0xf7047d,_0x5a81db['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x94ece=>!_0x94ece),_0x5a81db['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4c1050,_0x3801d1)=>_0x4c1050&&_0x3801d1),_0x5a81db['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5a81db;}['_trimContextValue'](_0x28787c){if(_0x28787c['length']<0x96)return _0x28787c;const _0x1ecab3=_0x28787c['lastIndexOf']('\x20',0x93);return _0x28787c['substring'](0x0,_0x1ecab3>-0x1?_0x1ecab3:0x93)+'...';}['_attachContextActions'](){const _0x3066e8=this['element']['querySelector']('.ck-context'),_0x11a22d=_0x3066e8['querySelector']('.ck-context__value');this['listenTo'](_0x3066e8,'mouseenter',()=>{_0x11a22d['offsetWidth']<_0x11a22d['scrollWidth']&&_0x3066e8['classList']['add']('overlay');}),this['listenTo'](_0x3066e8,'mouseleave',()=>{_0x3066e8['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4c75d0 of this['focusables'])this['focusTracker']['add'](_0x4c75d0['element']),this['keystrokes']['listenTo'](_0x4c75d0['element']);}['_createContextView'](){const _0x4d790a=new as(this['locale']);return _0x4d790a['bind']('contextValue')['to'](this),_0x4d790a;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1b29c3,_0x5ae217,_0x90cfc6,_0x45b888){super(_0x1b29c3),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5ae217,this['_localUser']=_0x90cfc6,this['_config']=_0x45b888,this['commentThreadHeaderView']=new Xt(_0x1b29c3,_0x5ae217),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x1b29c3,E(_0x1b29c3,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1b29c3,_0x5ae217,Object['assign']({'CommentView':this['_config']['CommentView']},_0x45b888)),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',(_0x1ce3b3,_0x11ef64)=>_0x1ce3b3||!!_0x11ef64),this['bind']('isUnlinked')['to'](_0x5ae217,'unlinkedAt',_0x50df5c=>!!_0x50df5c),this['bind']('ariaLabel')['to'](this,'length',_0x34e602=>{const _0x1c1b10=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x34e602,_0x1c1b10]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x19f40a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2d6288({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3bae09=>_0x3bae09['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x42d1a4=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4c16b4=_0x42d1a4['commentInputView'];return _0x42d1a4['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4c16b4,'value',(_0x5eb721,_0x150f83,_0x1d2a1a,_0x566db4,_0x127d30)=>!!_0x127d30||!!_0x566db4&&_0x1d2a1a&&!_0x150f83||_0x5eb721&&_0x1d2a1a&&!_0x150f83),_0x4c16b4['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x15d284,_0x5113d8,_0x5e4627)=>{let _0x4f3a31;return _0x4f3a31=_0x5e4627&&_0x5113d8?'Reply\x20to\x20reopen\x20discussion...':_0x15d284?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x4f3a31);}),_0x4c16b4['bind']('submitLabel')['to'](this,'length',_0x5aca8e=>E(this['locale'],_0x5aca8e?'Reply':'Comment')),_0x4c16b4['on']('submit',(_0x40e758,_0x304d51)=>{this['fire']('addComment',_0x304d51),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4c16b4['on']('cancel',()=>{this['focus']();}),_0x4c16b4['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4c16b4['on']('cancel',_0x1bcaf6=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1bcaf6['stop']());}),this['on']('change:isActive',(_0x1531f1,_0x40ae85,_0x448535)=>{_0x448535||this['length']||_0x4c16b4['value']||this['fire']('removeCommentThread');}),_0x42d1a4;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x94c258,_0x411fb7,_0x1bce27,_0x5eb875){super(_0x94c258,_0x411fb7,_0x1bce27,_0x5eb875),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x94c258,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3e886f,_0x44eb0e,_0x5a4a98)=>{_0x5a4a98||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x41e0e4,_0x3ed0ca,_0x5f0f07)=>{_0x5f0f07&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x1bc16c=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x1bc16c['if']('isActive','ck-thread--active'),_0x1bc16c['if']('isUnlinked','ck-thread--unlinked'),_0x1bc16c['if']('isConfirm','ck-thread--remove-confirmation'),_0x1bc16c['to']('actionIndicator',_0x1ca4c1=>_0x1ca4c1?'ck-thread--'+_0x1ca4c1:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x1bc16c['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 _0x5c80ce of this['commentsListView']['commentViews'])_0x5c80ce['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x443cba}=this,_0x5735f3=this['commentsListView']['commentViews']['get'](0x0);_0x5735f3===this['_boundFirstCommentView']||_0x5735f3['isSystemComment']||(this['_boundFirstCommentView']=_0x5735f3,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x5735f3,'actionIndicator',_0x4ca5cb=>'remove'===_0x4ca5cb?'remove':null),_0x5735f3['placeholder']=E(_0x443cba,'Write\x20a\x20comment...'),_0x5735f3['removeButton']['on']('execute',_0x47858c=>{_0x47858c['stop'](),this['showConfirm'](E(_0x443cba,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x5735f3['focus']();}),_0x5735f3['actionBar']['add'](this['resolveButton'],0x0),_0x5735f3['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2963ca=new _0x579911(this['locale']);return _0x2963ca['label']=E(this['locale'],'Resolve'),_0x2963ca['tooltip']=E(this['locale'],'Resolve'),_0x2963ca['icon']=_0x3c8f8e,_0x2963ca['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2963ca['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5a25a1=>!_0x5a25a1),_0x2963ca['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x114b3a,_0x277c89)=>_0x114b3a&&!_0x277c89),_0x2963ca['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2963ca;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x2908b9){super(_0x2908b9),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x2aa01c,_0x244f9b,_0x167109)=>{this['element']['innerHTML']=_0x167109;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x2abd68,_0x5a957,_0x1a3a60){super(_0x2abd68),this['_model']=_0x5a957,this['_config']=_0x1a3a60,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5a957,'content',_0x5a957,'authoredAt',(_0x3f31b8,_0x2ef186)=>E(_0x2abd68,'COMMENT_ARIA_LABEL',[_0x5a957['author']['name'],_0x1a3a60['formatDateTime'](_0x2ef186),new DOMParser()['parseFromString'](_0x3f31b8,'text/html')['body']['textContent'],_0x5a957['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x2abd68,E(_0x2abd68,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x2598eb(),this['focusTracker']=new _0x19f40a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2d6288({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x18b46a=>_0x18b46a['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']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x424d7c=new es(this['locale']);return _0x424d7c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x36889a,_0x2e61c6)=>_0x2e61c6?_0x17fb5a(_0x36889a,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x36889a),_0x424d7c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0xde4186=new os(this['locale'],this['_config']['editorConfig']);return _0xde4186['value']=this['_model']['content'],_0xde4186['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xde4186['submitLabel']=E(this['locale'],'Save'),_0xde4186['on']('submit',(_0x122b86,_0x39eee5)=>{this['fire']('updateComment',this['_model']['id'],_0x39eee5),this['switchToDisplayMode'](),this['focus']();}),_0xde4186['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0xde4186['once']('editorReady',()=>{_0xde4186['focus']();}),_0xde4186['createEditor'](),_0xde4186['delegate']('editorReady')['to'](this),_0xde4186['delegate']('editorDestroyed')['to'](this),_0xde4186;}['_setupKeyboardNavigation'](){const _0x578f9e=this['element'];this['keystrokes']['listenTo'](_0x578f9e);for(const _0x394612 of this['focusables'])this['focusTracker']['add'](_0x394612['element']),this['keystrokes']['listenTo'](_0x394612['element']);this['focusables']['on']('change',(_0x55bd39,_0x436693)=>{for(const _0x4f3069 of _0x436693['removed'])this['focusTracker']['remove'](_0x4f3069['element']),this['keystrokes']['stopListening'](_0x4f3069['element']);for(const _0x23166b of _0x436693['added'])this['focusTracker']['add'](_0x23166b['element']),this['keystrokes']['listenTo'](_0x23166b['element']);}),this['keystrokes']['set']('enter',(_0x2dbaa5,_0x38428b)=>{_0x578f9e===_0x2dbaa5['target']&&(this['focusCycler']['focusFirst'](),_0x38428b());}),this['keystrokes']['set']('esc',(_0x4e0752,_0x4cc3f3)=>{_0x578f9e!==_0x4e0752['target']&&(this['focus'](),_0x4cc3f3());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0x3a21a6,_0x2c2551,_0x532809){super(_0x3a21a6,_0x2c2551,_0x532809),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x3a21a6,'Reply...')),this['bind']('authoredAt')['to'](_0x2c2551),this['bind']('resolvedAt')['to'](_0x2c2551),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 _0xd82a8f(_0x3a21a6,_0x2c2551['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2c2551,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x52b9fe=this['bindTemplate'],_0x131b2c=[{'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':_0x52b9fe['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x52b9fe['to']('authoredAt',_0x220257=>this['_config']['formatDateTime'](_0x220257))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x52b9fe['if']('isEditMode','ck-comment__actions--hidden'),_0x52b9fe['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']&&_0x131b2c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x52b9fe['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x52b9fe['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x52b9fe['if']('isEditMode','ck-comment--edit'),_0x52b9fe['if']('isSystemComment','ck-comment--info'),_0x52b9fe['to']('actionIndicator',_0xfa8a40=>_0xfa8a40?'ck-comment--'+_0xfa8a40:'')],'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':_0x131b2c}]}]};}['_createEditButton'](){const _0x2204c2=new _0x306a1b(this['locale']);return _0x2204c2['label']=E(this['locale'],'Edit'),_0x2204c2['icon']=_0x4bbed0,_0x2204c2['withText']=!0x0,_0x2204c2['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2204c2['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1e7675=>!_0x1e7675),_0x2204c2['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2204c2['on']('execute',()=>this['switchToEditMode']()),_0x2204c2;}['_createRemoveButton'](){const _0x4eda00=new _0x306a1b(this['locale']);return _0x4eda00['label']=E(this['locale'],'Remove'),_0x4eda00['icon']=_0x4858a0,_0x4eda00['withText']=!0x0,_0x4eda00['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4eda00['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5597d1=>!_0x5597d1),_0x4eda00['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4eda00['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4eda00;}['_createDropdown'](){const _0x1eeb15=_0x163b01(this['locale'],_0x5b7864),_0x490dd5=_0x1eeb15['panelView']['children'],_0x35c6f1=new _0x311efb(this['locale']),_0x464c3a=_0x1eeb15['bindTemplate'];_0x5f2dd6(_0x1eeb15,()=>this['items']['find'](_0x5702d7=>_0x5702d7['isVisible'])),_0x1eeb15['extendTemplate']({'attributes':{'class':[_0x464c3a['if']('isVisible','ck-hidden',_0x3ac13c=>!_0x3ac13c)]}});const _0x4e7d7b=(_0x1fa760,_0x2fe7b2=-0x1)=>{const _0x4a7d59=new _0x499425(this['locale']);_0x4a7d59['children']['add'](_0x1fa760);const _0x154ae2=_0x2fe7b2>-0x1?_0x2fe7b2:_0x35c6f1['items']['length'];_0x35c6f1['items']['add'](_0x4a7d59,_0x154ae2);const _0x155788=Array['from'](this['items']);_0x1eeb15['unbind']('isEnabled','isVisible'),_0x1eeb15['bind']('isEnabled')['toMany'](_0x155788,'isEnabled',(..._0x20bdce)=>_0x20bdce['some'](_0x388e21=>_0x388e21)),_0x1eeb15['bind']('isVisible')['toMany'](_0x155788,'isVisible',(..._0x37d14f)=>_0x37d14f['some'](_0x22f0a7=>_0x22f0a7));};_0x1eeb15['panelPosition']='sw',_0x1eeb15['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x50de71});for(const _0x5d3b74 of this['items'])_0x4e7d7b(_0x5d3b74);return _0x490dd5['add'](_0x35c6f1),_0x1eeb15['listenTo'](this['items'],'add',(_0x440c24,_0xcd5778,_0x1eedf7)=>{_0x4e7d7b(_0xcd5778,_0x1eedf7);}),_0x1eeb15['listenTo'](this['items'],'remove',(_0x39dd6b,_0x3c96b3,_0x12ea91)=>{_0x35c6f1['items']['remove'](_0x12ea91);}),_0x1eeb15;}['_attachActions'](_0xafd01e,_0x32faf7){const _0x4966a4=_0xafd01e&&_0xafd01e['element'];_0x4966a4&&(this['listenTo'](_0x4966a4,'mouseenter',()=>this['actionIndicator']=_0x32faf7),this['listenTo'](_0x4966a4,'focus',()=>this['actionIndicator']=_0x32faf7),this['listenTo'](_0x4966a4,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x4966a4,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3cea89=super['_createCommentInputView']();return _0x3cea89['bind']('placeholder')['to'](this),_0x3cea89;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x57c164){const _0x53cd9d=Dt(_0x57c164,0x1e),_0x5783d2=new MutationObserver(_0x3a99e9=>{for(const _0x323875 of _0x3a99e9)('attributes'==_0x323875['type']&&'class'==_0x323875['attributeName']||'childList'==_0x323875['type']||'characterData'==_0x323875['type'])&&_0x53cd9d();});return{'attach'(_0x31e525){_0x5783d2['observe'](_0x31e525,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5783d2['disconnect'](),_0x53cd9d['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x5bd2d7,_0x395312){super(_0x5bd2d7),this['id']=_0x5f52ef(),this['focusTracker']=new _0x19f40a(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x45170e,_0x29e5af)=>this['fire']('Esc',_0x29e5af)),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']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x395312),this['mainView']=_0x395312;const _0x3be963=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3be963['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 _0x1f1130=this['element']['clientHeight'];_0x1f1130&&(this['height']=_0x1f1130);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x30449f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1a33b2,target:_0x501718,type:_0x45d4ad,isVisible:_0x5322c5=!0x0}){super(),this['view']=_0x1a33b2,this['view']['element']||this['view']['render'](),this['_type']=_0x45d4ad,this['_target']=_0x501718,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5d031f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x56e27e,_0x49069b)=>{this['view']['focusTracker']['add'](_0x49069b);}),this['focusableElements']['on']('remove',(_0x43778a,_0x150444)=>{this['view']['focusTracker']['remove'](_0x150444);}),this['set']('isVisible',_0x5322c5);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x5c0530=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x5c0530),_0x5c0530;}get['targetRect'](){const _0x3139cf=this['target'];if(null===_0x3139cf)return null;if(_0x3139cf instanceof _0x2413b8)return _0x3139cf;const _0x878e78=_0x3139cf['filter'](_0x4b7915=>function(_0x3af7db){const _0x2224a1=_0x3af7db['offsetParent'];if(_0x2224a1)return!0x0;const _0x3c84f7=_0x3af7db['getClientRects']()['item'](0x0);return!!_0x3c84f7;}(_0x4b7915));return 0x0===_0x878e78['length']?null:new _0x2413b8(_0x878e78[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x105ad3){this['view']['isActive']=_0x105ad3,this['view']['mainView']['isActive']=_0x105ad3;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x18c144){if(!(null===_0x18c144||_0x18c144 instanceof _0x2413b8||Array['isArray'](_0x18c144)&&_0x18c144['every'](_0x312cd4=>li(_0x312cd4))))throw new _0x5d5198('annotation-invalid-target',null,{'target':_0x18c144});}['_getNormalizedTarget'](){const _0x130a59='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x130a59)?[_0x130a59]:_0x130a59;}}function li(_0x34ffe9){return null!==_0x34ffe9&&'object'==typeof _0x34ffe9&&'nodeType'in _0x34ffe9&&0x1===_0x34ffe9['nodeType'];}class _ extends _0x5d031f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5a6931=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x19f40a(),this['_focusTracker']['on']('change:isFocused',(_0xdfc1f3,_0x2a0275,_0x4651ed)=>{_0x4651ed||this['fire']('blur');});for(const _0x4ebce3 of _0x5a6931)this['add'](_0x4ebce3);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1f50c3){if(this['has'](_0x1f50c3))throw new _0x5d5198('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1f50c3['innerView'],_0x1f50c3),this['_viewToAnnotation']['set'](_0x1f50c3['view'],_0x1f50c3);for(const _0x1f4ad0 of _0x1f50c3['focusableElements'])this['_focusTracker']['add'](_0x1f4ad0);this['listenTo'](_0x1f50c3['focusableElements'],'add',(_0x26376c,_0x46b1db)=>{this['_focusTracker']['add'](_0x46b1db);}),this['listenTo'](_0x1f50c3['focusableElements'],'remove',(_0x4cdbdc,_0x1006d8)=>{this['_focusTracker']['remove'](_0x1006d8);}),this['listenTo'](_0x1f50c3['view']['focusTracker'],'change:isFocused',(_0x3e382a,_0x1a6b7a,_0x142c5a)=>{_0x142c5a&&this['fire']('focus',_0x1f50c3);}),_0x1f50c3['updateTargetRect']();const _0x32045c=this['_getOrderInContent'](_0x1f50c3['view']['targetRect']);return super['add'](_0x1f50c3,_0x32045c);}['remove'](_0x521960){if(!this['has'](_0x521960))throw new _0x5d5198('annotationcollection-not-existing-item',null);this['stopListening'](_0x521960['view']['focusTracker']),this['stopListening'](_0x521960['focusableElements']);for(const _0x17b678 of _0x521960['focusableElements'])this['_focusTracker']['remove'](_0x17b678);return this['_viewToAnnotation']['delete'](_0x521960['view']),this['_innerViewToAnnotation']['delete'](_0x521960['innerView']),super['remove'](_0x521960);}['getByInnerView'](_0x302aa6){return this['_innerViewToAnnotation']['get'](_0x302aa6);}['getByView'](_0x15940e){return this['_viewToAnnotation']['get'](_0x15940e);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0xbe8dfe of this)_0xbe8dfe['updateTargetRect']();this['_sort']();}['_sort'](){const _0x564e80=Array['from'](this)['sort']((_0x2496bb,_0x65264a)=>v(_0x2496bb['view']['targetRect'],_0x65264a['view']['targetRect']));for(let _0x4fe30f=_0x564e80['length']-0x1;_0x4fe30f>0x0;_0x4fe30f--){const _0x45a61a=_0x564e80[_0x4fe30f];_0x4fe30f!==this['getIndex'](_0x45a61a)&&(this['remove'](_0x45a61a),this['add'](_0x45a61a));}}['_getOrderInContent'](_0x51166f){let _0x35ae6e=0x0;if(!_0x51166f)return this['length'];for(const _0x359500 of this){const _0x142a4a=_0x359500['view']['targetRect'];if(_0x142a4a){if(v(_0x51166f,_0x142a4a)<0x0)return _0x35ae6e;_0x35ae6e++;}}return _0x35ae6e;}}function v(_0x3a1b39,_0x4c5010){if(null===_0x3a1b39&&null===_0x4c5010)return 0x0;if(null===_0x3a1b39)return-0x1;if(null===_0x4c5010)return 0x1;const _0x4574f9=_0x3a1b39['top']-_0x4c5010['top'];return 0x0==_0x4574f9?_0x3a1b39['left']-_0x4c5010['left']:_0x4574f9;}class O extends _0x253287{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xca5233){if(super(_0xca5233),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xca5233 instanceof _0x1431d7){const _0x103d7d=_0xca5233['locale'];_0xca5233['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0xd9dc47){this['collection']['add'](_0xd9dc47);}['remove'](_0x2b01a9){this['collection']['remove'](_0x2b01a9),_0x2b01a9['destroy']();}['refreshVisibility'](){for(const _0x1832ff of this['collection'])_0x1832ff['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x45a22d){return this['collection']['getByInnerView'](_0x45a22d);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xa7a82 of this['collection'])_0xa7a82['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x398c39){this['fire']('_activateAnnotation',_0x398c39);}['createAnnotation'](_0x401d92){return new d(_0x401d92);}['createAnnotationView'](_0x2bca4a,_0x20dbcc){return new S(_0x2bca4a,_0x20dbcc);}['_addActiveAnnotation'](_0x37364f){const _0x265e8e=new Set(this['activeAnnotations']);_0x265e8e['add'](_0x37364f),this['activeAnnotations']=_0x265e8e;}['_removeActiveAnnotation'](_0xfe466d){const _0x5b836c=new Set(this['activeAnnotations']);_0x5b836c['delete'](_0xfe466d),this['activeAnnotations']=_0x5b836c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x411c38=this['collection'],_0x4ced03=this['_visibleAnnotations'];function _0x153199(_0x1e973b){const _0x160841=_0x1e973b['source'];_0x160841['isVisible']&&!_0x4ced03['has'](_0x160841)?_0x4ced03['add'](_0x160841):!_0x160841['isVisible']&&_0x4ced03['has'](_0x160841)&&_0x4ced03['remove'](_0x160841),_0x160841['view']['focusTracker']['remove'](_0x160841['view']['element']),_0x160841['view']['focusTracker']['add'](_0x160841['view']['element']);}this['listenTo'](_0x411c38,'add',(_0x564a6d,_0x188677)=>{_0x188677['isVisible']&&_0x4ced03['add'](_0x188677),this['listenTo'](_0x188677,'change:isVisible',_0x153199);}),this['listenTo'](_0x411c38,'remove',(_0x3f8b3c,_0x2277cd)=>{_0x4ced03['has'](_0x2277cd)&&_0x4ced03['remove'](_0x2277cd),this['stopListening'](_0x2277cd,'change:isVisible',_0x153199);});}['_setupEnterAnnotationKeystroke'](){const _0x209893=_0x4b00f4=>{_0x4b00f4['on']('ready',()=>{_0x4b00f4['keystrokes']['set'](_0x269987,(_0x565eff,_0x4bc872)=>{const _0x59f520=_0x4fe439(this['activeAnnotations']['values']());_0x59f520&&(_0x59f520['view']['focus'](),_0x4bc872());});});};this['context']instanceof _0x1431d7?_0x209893(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2f7aed,_0x5923cd)=>{_0x209893(_0x5923cd);});}['_setupEscapeAnnotationHandling'](){const _0x354dc6=_0x19cf88=>{const _0x4cfe76=_0x19cf88['source'],_0x301a33=[];let _0x2d1a9a;if(Array['isArray'](_0x4cfe76['target'])){_0x2d1a9a=_0x4cfe76['target'][0x0],this['context']instanceof _0x1431d7?_0x301a33['push'](this['context']):this['context']['editors']&&_0x301a33['push'](...this['context']['editors']);for(const _0x41f5d5 of _0x301a33)for(const _0x3543b2 of _0x41f5d5['editing']['view']['domRoots']['values']())if(_0x3543b2['contains'](_0x2d1a9a))return void _0x41f5d5['editing']['view']['focus']();_0x2d1a9a['focus']();}};this['listenTo'](this['collection'],'add',(_0x2c9fdf,_0x42eb3a)=>{this['listenTo'](_0x42eb3a,'escape',_0x354dc6,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x15bb36,_0x21857b)=>{this['stopListening'](_0x21857b,'escape',_0x354dc6);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x253287{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56e3a5){super(_0x56e3a5),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3e752f=this['context']['config'];_0x3e752f['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3e752f['define']('comments.maxThreadTotalWeight',0x1f4),_0x3e752f['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3e752f['define']('comments.CommentThreadView',vt),_0x3e752f['define']('comments.CommentView',gt),_0x3e752f['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1629aa=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0xf86b8d,_0x4822c6)=>this['_addCommentThread'](_0x4822c6)),this['on']('submitCommentThread',(_0x582be0,_0x282cf9)=>this['_submitCommentThread'](_0x282cf9)),this['on']('resolveCommentThread',(_0x35236d,_0xf989f6)=>this['_resolveCommentThread'](_0xf989f6)),this['on']('resolveCommentThread',(_0x11884c,_0x1c0b9f)=>this['_updateActiveAnnotation'](_0x1c0b9f),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x550286,_0x371bad)=>this['_reopenCommentThread'](_0x371bad)),this['on']('reopenCommentThread',(_0x17185b,_0x5cb5ad)=>this['_updateActiveAnnotation'](_0x5cb5ad),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x56e64d,_0x2a0860)=>this['_removeCommentThread'](_0x2a0860)),this['on']('updateCommentThread',(_0x139b27,_0x52e54f)=>this['_updateCommentThread'](_0x52e54f)),this['on']('updateCommentThread',(_0x3a16d7,_0x662c62)=>this['_updateActiveAnnotation'](_0x662c62),{'priority':'lowest'}),this['on']('addComment',(_0x54cf4c,_0x1823f8)=>this['_addComment'](_0x1823f8)),this['on']('updateComment',(_0x337ab9,_0x3596f2)=>this['_updateComment'](_0x3596f2)),this['on']('removeComment',(_0x4fadce,_0x362871)=>this['_removeComment'](_0x362871)),this['on']('addComment',(_0x55f57e,{threadId:_0x390384,isFromAdapter:_0x308c2b})=>{if(_0x308c2b)return;const _0x213655=this['getCommentThread'](_0x390384),_0x440418=_0x213655&&this['_threadToController']['get'](_0x213655);_0x440418&&_0x440418['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1629aa,'change:activeAnnotations',(_0x3e1623,_0x121cbf,_0x2521dd)=>{const _0x62f1c9=Array['from'](_0x2521dd)['map'](_0x2545d9=>this['_viewToController']['get'](_0x2545d9['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x62f1c9?_0x62f1c9['model']:null;});}set['adapter'](_0x289485){if(this['_adapter'])throw new _0x5d5198('commentsrepository-adapter-already-set');this['_adapter']=_0x289485;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x42c49d=Tt,threadId:_0x5a0fbf=_0x5f52ef(),comments:_0x4e36ad=[],unlinkedAt:_0x4c7b56=null,resolvedAt:_0x4f3dbc=null,resolvedBy:_0x369b28=null,target:_0x6b2981=null,context:_0x16ab85=null,attributes:_0x5a7dad={},isResolvable:_0x117b9d=!0x0,isSubmitted:_0x585786=!0x1,isFromAdapter:_0x4c5a8b=!0x1}={}){return this['fire'](bt('addCommentThread',_0x42c49d),{'channelId':_0x42c49d,'threadId':_0x5a0fbf,'comments':_0x4e36ad,'unlinkedAt':_0x4c7b56,'resolvedAt':_0x4f3dbc,'resolvedBy':_0x369b28,'target':_0x6b2981,'context':_0x16ab85,'attributes':_0x5a7dad,'isFromAdapter':_0x4c5a8b,'isResolvable':_0x117b9d,'isSubmitted':_0x585786}),this['getCommentThread'](_0x5a0fbf);}['openNewCommentThread']({channelId:_0x4d314d=Tt,threadId:_0x16f79e=_0x5f52ef(),target:_0x14eba1,context:_0x2a01bc=null,isResolvable:_0x40a83b=!0x0}){if(this['_readOnlyChannels']['has'](_0x4d314d)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x14eba1)throw new _0x5d5198('commentsrepository-missing-target');const _0x325528=this['addCommentThread']({'channelId':_0x4d314d,'threadId':_0x16f79e,'target':_0x14eba1,'context':_0x2a01bc,'isResolvable':_0x40a83b});if(!_0x325528)return null;const _0x17e57a=this['_threadToController']['get'](_0x325528),_0xe1ef73=_0x17e57a['view']['commentThreadInputView']['commentInputView'],_0x39753f=this['context']['plugins']['get'](O),_0x222008=_0x39753f['getByInnerView'](_0x17e57a['view']);return _0x39753f['activate'](_0x222008),_0xe1ef73['once']('editorReady',()=>_0xe1ef73['focus']()),_0x325528;}['hasCommentThread'](_0x186d25){if('string'!=typeof _0x186d25)throw new _0x5d5198('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x186d25);}['updateCommentThread']({channelId:_0x5976e3=Tt,threadId:_0xf16fbe,context:_0x45c581,unlinkedAt:_0x5c0a69,attributes:_0x29386e,isFromAdapter:_0x12be4=!0x1}){return this['fire'](bt('updateCommentThread',_0x5976e3),{'channelId':_0x5976e3,'threadId':_0xf16fbe,'context':_0x45c581,'unlinkedAt':_0x5c0a69,'attributes':_0x29386e,'isFromAdapter':_0x12be4}),this['getCommentThread'](_0xf16fbe);}['getCommentThread'](_0x17b0e6){if('string'!=typeof _0x17b0e6)throw new _0x5d5198('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x17b0e6);}['fetchCommentThread']({channelId:_0x1432b5,threadId:_0x14bde5}={}){const _0xbd091f=this['getCommentThread'](_0x14bde5);if(_0xbd091f)return Promise['resolve'](_0xbd091f);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5d5198('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1432b5,'threadId':_0x14bde5})['then'](_0x4b85c0=>this['hasCommentThread'](_0x14bde5)?this['getCommentThread'](_0x14bde5):_0x4b85c0?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1432b5},_0x4b85c0)):void 0x0)['catch'](_0x16d907=>{throw console['error'](_0x16d907),new _0x5d5198('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2a7928,skipNotAttached:_0xd97464=!0x1,skipEmpty:_0x117891=!0x1,toJSON:_0x4c566f=!0x1}={}){const _0x129eeb=[];for(const _0x1e2d4a of this['_threads']['values']())_0x2a7928&&_0x1e2d4a['channelId']!==_0x2a7928||_0xd97464&&!_0x1e2d4a['isAttached']||_0x117891&&0x0===_0x1e2d4a['length']||_0x129eeb['push'](_0x1e2d4a);return _0x4c566f?_0x129eeb['map'](_0x5e652e=>_0x5e652e['toJSON']()):_0x129eeb;}['setActiveCommentThread'](_0x5405bf){const _0x2db963=this['context']['plugins']['get'](O);if(!_0x5405bf)return void(this['activeCommentThread']&&_0x2db963['deactivateAll']());const _0x2e9838=this['getCommentThread'](_0x5405bf);if(!_0x2e9838)throw new _0x5d5198('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5405bf});if(!this['_threadToController']['has'](_0x2e9838))throw new _0x5d5198('commentsrepository-active-not-attached',null,{'threadId':_0x5405bf});const _0x3a5853=_0x2db963['getByInnerView'](this['_threadToController']['get'](_0x2e9838)['view']);_0x2db963['activate'](_0x3a5853);}['switchReadOnly'](_0x16c4fc,_0x3dfef8){_0x16c4fc?this['_readOnlyChannels']['add'](_0x3dfef8):this['_readOnlyChannels']['delete'](_0x3dfef8),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x18bfbe){return this['_readOnlyChannels']['has'](_0x18bfbe)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4c36c3,_0x25f24e){return new Ct(_0x4c36c3,_0x25f24e);}['setPermissions'](_0x4693ee,_0x1ef310=Tt){this['_permissions']['set'](_0x1ef310,_0x4693ee),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2b5aa9=Tt){return this['_permissions']['has'](_0x2b5aa9)?this['_permissions']['get'](_0x2b5aa9):_t;}['_addCommentThread']({channelId:_0xdb9b1e,threadId:_0x1df77b,comments:_0x184e43,unlinkedAt:_0x21842e,resolvedAt:_0x44b269,resolvedBy:_0x29e019,target:_0x5297cf,context:_0x431f19,attributes:_0x1cacdb,isFromAdapter:_0x190c41,isResolvable:_0x1f1853,isSubmitted:_0x3ef963}){if('string'!=typeof _0x1df77b)throw new _0x5d5198('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1df77b});if(this['hasCommentThread'](_0x1df77b))throw new _0x5d5198('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1df77b});const _0x5130db=new ui(this,{'channelId':_0xdb9b1e,'id':_0x1df77b,'context':_0x431f19,'attributes':_0x1cacdb,'unlinkedAt':_0x21842e,'resolvedAt':_0x44b269,'resolvedBy':_0x29e019?this['context']['plugins']['get'](it)['getUser'](_0x29e019):null,'isResolvable':_0x1f1853,'isSubmitted':_0x3ef963||_0x190c41});this['_threads']['set'](_0x1df77b,_0x5130db);for(const _0x1c8f2a of _0x184e43)_0x5130db['_add'](this['_createNewComment']({'threadId':_0x1df77b,..._0x1c8f2a}));return _0x5297cf&&_0x5130db['attachTo'](_0x5297cf),_0x190c41||!_0x5130db['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0xdb9b1e,'threadId':_0x1df77b});}['_submitCommentThread']({channelId:_0x55bf7d,threadId:_0x3f2e55}){if(!this['hasCommentThread'](_0x3f2e55))throw new _0x5d5198('commentsrepository-missing-comment-thread',this);const _0x55ffde=this['getCommentThread'](_0x3f2e55);if(_0x55ffde['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x25fcc5,comments:_0x372afc,resolvedAt:_0x5e6dc1,resolvedBy:_0x315548,context:_0x319750,attributes:_0x22f68f}=_0x55ffde,_0x57600d=this['context']['plugins']['get']('PendingActions'),_0x42cbef=_0x57600d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x55bf7d,'threadId':_0x25fcc5,'comments':_0x372afc['map'](_0x3bb1d9=>_0x3bb1d9['toJSON']()),'resolvedAt':_0x5e6dc1,'resolvedBy':_0x315548?_0x315548['id']:_0x315548,'context':_0x319750,'attributes':_0x22f68f})['then'](({comments:_0x5f05c5})=>{_0x57600d['remove'](_0x42cbef);for(const _0x533c3d of _0x5f05c5)this['_updateComment']({'channelId':_0x55bf7d,'threadId':_0x3f2e55,'commentId':_0x533c3d['commentId'],'createdAt':_0x533c3d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3333f4=>{throw console['error'](_0x3333f4),new _0x5d5198('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x522388,target:_0x10906d}){const _0x55f105=this['getCommentThread'](_0x522388);if(!_0x55f105)throw new _0x5d5198('commentsrepository-attach-missing-comment-thread',this);const _0x2b4303=this['context']['plugins']['get']('PendingActions'),_0x161103=this['context']['plugins']['get'](O),_0x42533d=this['_createCommentThreadView'](_0x55f105),_0x45874a=new Ct(_0x55f105,_0x42533d);let _0x1c0f09=null;_0x42533d['on']('change:isDirty',(_0x23668b,_0x11064d,_0x2cc22e)=>{_0x2cc22e?_0x1c0f09=_0x2b4303['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1c0f09&&(_0x2b4303['remove'](_0x1c0f09),_0x1c0f09=null);}),this['_threadToController']['set'](_0x55f105,_0x45874a),this['_viewToController']['set'](_0x42533d,_0x45874a);const _0x4a4b45=new S(this['context']['locale'],_0x42533d);_0x4a4b45['bind']('length')['to'](_0x42533d),_0x4a4b45['bind']('isDirty')['to'](_0x42533d,'isDirty',_0x42533d,'length',(_0xbd118e,_0x1f0b6c)=>_0xbd118e||!_0x1f0b6c),_0x4a4b45['bind']('isActive')['to'](_0x42533d),_0x4a4b45['type']='comment';const _0x560e1f=new d({'view':_0x4a4b45,'target':_0x10906d,'type':'comment','isVisible':!_0x55f105['archivedAt']});return _0x42533d['on']('escape',()=>{_0x560e1f['fire']('escape');}),this['_bindAnnotationToEditors'](_0x42533d,_0x560e1f),_0x161103['add'](_0x560e1f),_0x560e1f;}['_bindAnnotationToEditors'](_0x5155fb,_0x5d9346){this['listenTo'](_0x5155fb,'editorReady',(_0x18510a,_0x428c75)=>{const _0x2d528d=_0x428c75['ui']['view']['body']['bodyCollectionContainer'];_0x5d9346['focusableElements']['add'](_0x2d528d),this['context']instanceof _0x1431d7&&this['context']['ui']['focusTracker']['add'](_0x2d528d);},{'priority':'highest'}),this['listenTo'](_0x5155fb,'editorDestroyed',(_0x44c4cf,_0x310dde)=>{const _0x5234d8=_0x310dde['ui']['view']['body']['bodyCollectionContainer'];_0x5d9346['focusableElements']['has'](_0x5234d8)&&_0x5d9346['focusableElements']['remove'](_0x5234d8),this['context']instanceof _0x1431d7&&this['context']['ui']['focusTracker']['remove'](_0x5234d8);});}['_unbindEditors'](_0x508ed3){this['stopListening'](_0x508ed3,'editorReady'),this['stopListening'](_0x508ed3,'editorDestroyed');}['_createCommentThreadView'](_0x416180){const _0x13c30e=this['context']['plugins']['get'](it),{config:_0x7efbb5,locale:_0x4971b4}=this['context'],_0xc3d687=lt(_0x7efbb5['get']('locale'),_0x4971b4);return new(0x0,(_0x7efbb5['get']('comments'))['CommentThreadView'])(_0x4971b4,_0x416180,_0x13c30e['me'],{'editorConfig':{..._0x7efbb5['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x7efbb5['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x7efbb5['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x7efbb5['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x7efbb5['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xc3d687,'CommentView':_0x7efbb5['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3aaf7d,channelId:_0x392d7a,resolvedAt:_0x20913e,resolvedBy:_0x362d17,isFromAdapter:_0x49ae44}){if(!this['hasCommentThread'](_0x3aaf7d))throw new _0x5d5198('commentsrepository-missing-comment-thread',null,{'threadId':_0x3aaf7d});const _0x565428=this['getCommentThread'](_0x3aaf7d);if(_0x565428['isResolved'])throw new _0x5d5198('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3aaf7d});const _0x471187=this['context']['plugins']['get'](it);if(_0x565428['resolvedBy']=_0x471187['getUser'](_0x362d17),_0x565428['resolvedAt']=_0x20913e,_0x49ae44||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4f3475=this['context']['plugins']['get']('PendingActions'),_0x5a104b=_0x4f3475['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x392d7a,'threadId':_0x3aaf7d})['then'](({resolvedAt:_0x5057f1,resolvedBy:_0x3fd750})=>{_0x4f3475['remove'](_0x5a104b),_0x565428['resolvedBy']['id']!==_0x3fd750&&(_0x565428['resolvedBy']=_0x471187['getUser'](_0x3fd750)),_0x565428['resolvedAt']=_0x5057f1;})['catch'](_0x2721d1=>{throw console['error'](_0x2721d1),new _0x5d5198('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x21a08d,channelId:_0x11b6c0,isFromAdapter:_0x42666e}){if(!this['hasCommentThread'](_0x21a08d))throw new _0x5d5198('commentsrepository-missing-comment-thread',null,{'threadId':_0x21a08d});const _0x330dfe=this['getCommentThread'](_0x21a08d);if(!_0x330dfe['isResolved'])throw new _0x5d5198('commentsrepository-reopen-comment-thread',null,{'threadId':_0x21a08d});if(_0x330dfe['resolvedBy']=null,_0x330dfe['resolvedAt']=null,_0x42666e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x461f06=this['context']['plugins']['get']('PendingActions'),_0x583f0f=_0x461f06['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x11b6c0,'threadId':_0x21a08d})['then'](()=>_0x461f06['remove'](_0x583f0f))['catch'](_0x406e9d=>{throw console['error'](_0x406e9d),new _0x5d5198('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x428bbe,isFromAdapter:_0x4afc4a}){const _0x5df961=this['getCommentThread'](_0x428bbe);if(!_0x5df961)throw new _0x5d5198('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x428bbe),this['_threads']['delete'](_0x428bbe),!_0x5df961['isSubmitted']||_0x4afc4a||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x120dca=this['context']['plugins']['get']('PendingActions'),{channelId:_0x41e4c1}=_0x5df961,_0x4cc2e7=_0x120dca['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x41e4c1,'threadId':_0x428bbe})['then'](()=>_0x120dca['remove'](_0x4cc2e7))['catch'](_0x507cba=>{throw console['error'](_0x507cba),new _0x5d5198('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5c7d51,unlinkedAt:_0xa4d378,context:_0x3c1d0,attributes:_0x16445b,isFromAdapter:_0x3a7973}){if('string'!=typeof _0x5c7d51)throw new _0x5d5198('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5c7d51});if(!this['hasCommentThread'](_0x5c7d51))throw new _0x5d5198('commentsrepository-missing-comment-thread',null,{'threadId':_0x5c7d51});const _0x35a10d=this['getCommentThread'](_0x5c7d51);let _0x103dfa=!0x1;if(void 0x0!==_0x3c1d0&&_0x35a10d['context']!==_0x3c1d0&&(_0x35a10d['context']=_0x3c1d0,_0x103dfa=!0x0),void 0x0!==_0xa4d378&&_0x35a10d['unlinkedAt']!==_0xa4d378&&(_0x35a10d['unlinkedAt']=_0xa4d378,_0x103dfa=!0x0),_0x16445b&&!wt(_0x16445b,_0x35a10d['attributes'])&&(_0x35a10d['attributes']=_0x16445b,_0x103dfa=!0x0),!_0x103dfa)return Promise['resolve']();if(!_0x35a10d['isSubmitted']||_0x3a7973||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2461e5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x40e6bd}=_0x35a10d,_0xc35f53=_0x2461e5['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x40e6bd,'threadId':_0x5c7d51,'context':_0x3c1d0,'unlinkedAt':_0xa4d378,'attributes':_0x16445b})['then'](()=>_0x2461e5['remove'](_0xc35f53))['catch'](_0x44810a=>{throw console['error'](_0x44810a),new _0x5d5198('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x162103){const _0x53fb40=this['context']['plugins']['get'](O),_0x4d2d71=this['getCommentThread'](_0x162103);if(_0x4d2d71['_isAttached']=!0x1,this['_threadToController']['has'](_0x4d2d71)){const _0x39a16b=this['_threadToController']['get'](_0x4d2d71),_0x1d9814=_0x39a16b['view'],_0x27c5ab=_0x53fb40['getByInnerView'](_0x1d9814);this['_threadToController']['delete'](_0x4d2d71),this['_viewToController']['delete'](_0x1d9814),_0x27c5ab&&_0x53fb40['remove'](_0x27c5ab),_0x39a16b['destroy'](),_0x1d9814['destroy']()['then'](()=>{this['_unbindEditors'](_0x1d9814);});}}['_updateActiveAnnotation']({threadId:_0x5b5288,resolvedAt:_0x55242b,unlinkedAt:_0x1ab7fe}){const _0x2f8559=!!_0x55242b,_0x4055a6=this['context']['plugins']['get'](O),_0x3629c5=this['getCommentThread'](_0x5b5288);if(this['_threadToController']['has'](_0x3629c5)){const _0x32b600=this['_threadToController']['get'](_0x3629c5)['view'],_0x3cb866=_0x4055a6['getByInnerView'](_0x32b600);_0x3cb866&&(_0x2f8559&&_0x4055a6['_removeActiveAnnotation'](_0x3cb866),_0x1ab7fe?_0x3cb866['isVisible']=!0x1:_0x3cb866['refreshVisibility']());}}['_getExternalAuthor'](_0x4e38e2){const _0x3efff9=this['context']['plugins']['get'](it),_0x30a600=pt('external:'+_0x4e38e2),_0x4d9204=_0x3efff9['getUser'](_0x30a600);return _0x4d9204||_0x3efff9['addUser']({'id':_0x30a600,'name':_0x4e38e2});}['_createNewComment']({threadId:_0x402112,commentId:_0x32ec8c=_0x5f52ef(),content:_0x67a761,authorId:_0x3b13f1,createdAt:_0x4737ac,attributes:_0x3babd7}){if('string'!=typeof _0x32ec8c)throw new _0x5d5198('commentsrepository-invalid-commentid');if('string'!=typeof _0x3b13f1)throw new _0x5d5198('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x67a761||!_0x67a761['trim']())throw new _0x5d5198('commentsrepository-invalid-comment-content');const _0x37ae53=this['context']['plugins']['get'](it)['getUser'](_0x3b13f1);if(!_0x37ae53)throw new _0x5d5198('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3b13f1});let _0x50b24c=null,_0x309f90=_0x4737ac;return _0x3babd7?.['@external']&&(_0x50b24c=this['_getExternalAuthor'](_0x3babd7['@external']['authorName']),_0x309f90=new Date(_0x3babd7['@external']['createdAt'])),new fi(this,{'threadId':_0x402112,'id':_0x32ec8c,'author':_0x50b24c||_0x37ae53,'creator':_0x37ae53,'content':_0x67a761,'createdAt':_0x4737ac,'authoredAt':_0x309f90,'attributes':_0x3babd7});}['_addComment'](_0x4ab5f6){let {threadId:_0x40a242,content:_0x231806,attributes:_0x192397,isFromAdapter:_0x392d7d}=_0x4ab5f6;const _0xbaea12=this['getCommentThread'](_0x4ab5f6['threadId']);if(!_0xbaea12)throw new _0x5d5198('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4d6d40=this['_createNewComment'](_0x4ab5f6),{id:_0x262397}=_0x4d6d40;if(_0xbaea12['_add'](_0x4d6d40),_0x392d7d||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0xbaea12['isSubmitted'])return Promise['resolve']();const _0x11e07a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x523ad3}=_0xbaea12,_0x55eed6=_0x11e07a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x192397||(_0x192397={}),this['adapter']['addComment']({'channelId':_0x523ad3,'threadId':_0x40a242,'commentId':_0x262397,'content':_0x231806,'attributes':_0x192397})['then'](_0x1d22d9=>{_0x11e07a['remove'](_0x55eed6),_0x1d22d9&&this['_updateComment']({'channelId':_0x523ad3,'threadId':_0x40a242,'commentId':_0x262397,'createdAt':_0x1d22d9['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4d77fa=>{throw console['error'](_0x4d77fa),new _0x5d5198('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x9fcfae,commentId:_0x48e14e,content:_0x35cf17,createdAt:_0x15972c,attributes:_0x2c4b4b,isFromAdapter:_0x357380}){if(void 0x0!==_0x35cf17&&('string'!=typeof _0x35cf17||!_0x35cf17['trim']()['length']))throw new _0x5d5198('commentsrepository-update-comment-invalid-content');const _0x3d198b=this['getCommentThread'](_0x9fcfae),_0x362821=_0x3d198b['getComment'](_0x48e14e);if(!_0x362821)throw new _0x5d5198('commentsrepository-update-missing-comment',this);let _0x284ad0=!0x1;if(_0x35cf17&&_0x35cf17!==_0x362821['content']&&(_0x362821['isEditable']||_0x357380)&&(_0x362821['content']=_0x35cf17,_0x284ad0=!0x0),_0x15972c&&_0x15972c!==_0x362821['createdAt']&&(_0x362821['createdAt']=_0x15972c,_0x362821['attributes']&&_0x362821['attributes']['@external']||(_0x362821['authoredAt']=_0x15972c),_0x284ad0=!0x0),_0x2c4b4b&&!wt(_0x2c4b4b,_0x362821['attributes'])&&(_0x362821['attributes']=_0x2c4b4b,_0x284ad0=!0x0),!_0x284ad0)return Promise['resolve']();if(_0x3d198b['fire']('commentUpdated'),_0x357380||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x427b8d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x298737}=this['getCommentThread'](_0x362821['threadId']),_0x11f558=_0x427b8d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x298737,'threadId':_0x9fcfae,'commentId':_0x48e14e,'content':_0x35cf17,'attributes':_0x2c4b4b})['then'](()=>_0x427b8d['remove'](_0x11f558))['catch'](_0x2979e8=>{throw console['error'](_0x2979e8),new _0x5d5198('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x36ad95,commentId:_0x3eb2bf,isFromAdapter:_0x4b995b}){const _0x1f6ed7=this['getCommentThread'](_0x36ad95),_0x15850b=_0x1f6ed7['getComment'](_0x3eb2bf);if(!_0x15850b)throw new _0x5d5198('commentsrepository-remove-missing-comment',this);if(_0x1f6ed7['_remove'](_0x15850b),_0x4b995b||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5124ee=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3d208f}=_0x1f6ed7,_0x22f4cc=_0x5124ee['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3d208f,'threadId':_0x36ad95,'commentId':_0x3eb2bf})['then'](()=>_0x5124ee['remove'](_0x22f4cc))['catch'](_0x283679=>{throw console['error'](_0x283679),new _0x5d5198('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x30449f(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4f8ecb,_0x51845c){super();const _0x3e7601=_0x51845c['isResolvable'];this['channelId']=_0x51845c['channelId'],this['id']=_0x51845c['id'],this['comments']=new _0x5d031f(),this['_repository']=_0x4f8ecb,this['_isAttached']=!0x1,this['_isSubmitted']=_0x51845c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4f8ecb,'_permissions',_0x4f8ecb,'_readOnlyChannels',()=>_0x4f8ecb['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4f8ecb,'_permissions',()=>_0x4f8ecb['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4f8ecb,'_permissions',()=>{const _0x5b049d=_0x4f8ecb['getPermissions'](this['channelId']);return _0x5b049d['write']||_0x5b049d['admin'];}),this['bind']('isResolvable')['to'](_0x4f8ecb,'_permissions',()=>_0x3e7601&&_0x4f8ecb['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x51845c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x53d90a,_0x1ac7c1)=>_0x53d90a?_0x1ac7c1?_0x53d90a<_0x1ac7c1?_0x53d90a:_0x1ac7c1:_0x53d90a:_0x1ac7c1),this['set']('unlinkedAt',_0x51845c['unlinkedAt']||null),this['set']('resolvedAt',_0x51845c['resolvedAt']||null),this['set']('resolvedBy',_0x51845c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0xa07960=>!!_0xa07960),this['set']('attributes',_0x51845c['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x43a3e5,_0x5ab3ed)=>_0x43a3e5+_0x5ab3ed['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x5282f2,id:_0x4a015a}=this;this['_repository']['fire'](bt('submitCommentThread',_0x5282f2),{'channelId':_0x5282f2,'threadId':_0x4a015a});}['setUnlinkedAt'](_0x21b16c){this['_update']({'unlinkedAt':_0x21b16c});}['resolve']({resolvedAt:_0x2196bc=new Date(),resolvedBy:_0x49dc63=null,isFromAdapter:_0xacabc3=!0x1}={}){const _0x55acf4=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x675dcd,id:_0x24fc3f}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x675dcd),{'channelId':_0x675dcd,'threadId':_0x24fc3f,'resolvedAt':_0x2196bc,'resolvedBy':_0x49dc63||_0x55acf4['id'],'isFromAdapter':_0xacabc3});}['reopen']({isFromAdapter:_0x3e7ddf=!0x1}={}){const {channelId:_0x11f050,id:_0x169d30}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x11f050),{'channelId':_0x11f050,'threadId':_0x169d30,'isFromAdapter':_0x3e7ddf});}['setContext'](_0x25d39c){this['context']||this['_update']({'context':_0x25d39c});}['setAttribute'](_0x5992d0,_0x23aa18){const _0x46a17a=It(this['attributes']);At(_0x46a17a,_0x5992d0,_0x23aa18),this['_update']({'attributes':_0x46a17a});}['removeAttribute'](_0x2601cb){const _0x1c4ef1=It(this['attributes']);yt(_0x1c4ef1,_0x2601cb),this['_update']({'attributes':_0x1c4ef1});}['remove']({isFromAdapter:_0x134336=!0x1}={}){const {channelId:_0x2b3815,id:_0x3f1224}=this;this['_repository']['fire'](bt('removeCommentThread',_0x2b3815),{'channelId':_0x2b3815,'threadId':_0x3f1224,'isFromAdapter':_0x134336});}['attachTo'](_0x39e859){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x39e859});}['addComment'](_0x2b94bd){const {channelId:_0x1d5ade,id:_0xd9831a}=this;this['_repository']['fire'](bt('addComment',_0x1d5ade,_0xd9831a),Object['assign']({'channelId':_0x1d5ade,'threadId':_0xd9831a},_0x2b94bd));}['getComment'](_0x472c46){if('string'!=typeof _0x472c46)throw new _0x5d5198('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x472c46});return this['comments']['get'](_0x472c46);}['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'](_0x336dd5=>_0x336dd5['toJSON']()),'attributes':this['attributes']};}['_add'](_0xec9faa){return this['listenTo'](_0xec9faa,'change:authoredAt',()=>{const _0x3770e3=this['_findOptimalIndex'](_0xec9faa),_0x1470f4=this['comments'];_0x3770e3-0x1!=_0x1470f4['getIndex'](_0xec9faa)&&_0x3770e3+0x1!=_0x1470f4['getIndex'](_0xec9faa)&&(this['_remove'](_0xec9faa),this['_add'](_0xec9faa));}),this['comments']['add'](_0xec9faa,this['_findOptimalIndex'](_0xec9faa));}['_update'](_0x8e23d8){const {channelId:_0x4f5426,id:_0xe0b1a5}=this;this['_repository']['fire'](bt('updateCommentThread',_0x4f5426),{..._0x8e23d8,'channelId':_0x4f5426,'threadId':_0xe0b1a5});}['_remove'](_0x449c20){return this['stopListening'](_0x449c20),_0x449c20['destroy'](),this['comments']['remove'](_0x449c20);}['_findOptimalIndex'](_0x347fc1){const _0x3d2b0a=this['comments']['find'](_0x2f8eeb=>new Date(_0x2f8eeb['authoredAt'])['getTime']()>new Date(_0x347fc1['authoredAt'])['getTime']());return _0x3d2b0a?this['comments']['getIndex'](_0x3d2b0a):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x30449f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2c9e07,_0x4b5ee4){super();const _0x50be30=_0x2c9e07['context']['plugins']['get'](it)['me'],_0x57fe4c=_0x2c9e07['getCommentThread'](_0x4b5ee4['threadId']),_0x36323f=0x0===_0x57fe4c['comments']['length'],_0x550dd0=_0x50be30===_0x4b5ee4['author'];this['id']=_0x4b5ee4['id'],this['threadId']=_0x4b5ee4['threadId'],this['author']=_0x4b5ee4['author'],this['creator']=_0x4b5ee4['creator'],this['isExternal']=Boolean(_0x4b5ee4['attributes']&&_0x4b5ee4['attributes']['@external']),this['set']('content',_0x4b5ee4['content']),this['createdAt']=_0x4b5ee4['createdAt']||new Date(),this['set']('authoredAt',_0x4b5ee4['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x57fe4c,'resolvedAt'),this['set']('attributes',_0x4b5ee4['attributes']||{}),this['bind']('isEditable')['to'](_0x2c9e07,'_permissions',()=>{const _0x12066c=_0x2c9e07['getPermissions'](_0x57fe4c['channelId'])['write'],_0x333613=_0x2c9e07['getPermissions'](_0x57fe4c['channelId'])['modifyAll'];return _0x550dd0&&_0x12066c||!_0x550dd0&&_0x333613;}),this['bind']('isRemovable')['to'](_0x57fe4c,'isRemovable',_0x2c9e07,'_permissions',_0x3a5149=>{const _0x53ddbd=_0x2c9e07['getPermissions'](_0x57fe4c['channelId'])['write'],_0x142d78=_0x2c9e07['getPermissions'](_0x57fe4c['channelId'])['modifyAll'];return _0x550dd0&&_0x53ddbd||_0x3a5149&&_0x36323f||!_0x550dd0&&_0x142d78&&!_0x36323f;}),this['bind']('isReadOnly')['to'](_0x57fe4c,'isReadOnly'),this['_repository']=_0x2c9e07;}get['weight'](){return Math['max'](function(_0x22b140){const _0x522b3d=document['createElement']('div');return _0x522b3d['innerHTML']=_0x22b140,_0x522b3d['textContent']['length'];}(this['content']),0xc8);}['update'](_0x558763){const {threadId:_0x36b795,id:_0x4be085}=this;if(!this['_repository']['hasCommentThread'](_0x36b795))throw new _0x5d5198('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x540fa3}=this['_repository']['getCommentThread'](_0x36b795);this['_repository']['fire'](bt('updateComment',_0x540fa3,_0x36b795),{'channelId':_0x540fa3,'threadId':_0x36b795,'commentId':_0x4be085,..._0x558763});}['setAttribute'](_0x4002a7,_0xa6acf8){const _0x53c307=It(this['attributes']);At(_0x53c307,_0x4002a7,_0xa6acf8),this['update']({'attributes':_0x53c307});}['removeAttribute'](_0x178d10){const _0x5a2249=It(this['attributes']);yt(_0x5a2249,_0x178d10),this['update']({'attributes':_0x5a2249});}['remove'](_0x32626f={}){if(!_0x32626f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2dc9ad,id:_0x2a0438}=this;if(!this['_repository']['hasCommentThread'](_0x2dc9ad))throw new _0x5d5198('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xd8935d}=this['_repository']['getCommentThread'](_0x2dc9ad);this['_repository']['fire'](bt('removeComment',_0xd8935d,_0x2dc9ad),{'channelId':_0xd8935d,'threadId':_0x2dc9ad,'commentId':_0x2a0438,..._0x32626f});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x284bf6,..._0x55b6e3){for(const _0x452776 of _0x55b6e3)void 0x0!==_0x452776&&(_0x284bf6+=':'+String(_0x452776));return _0x284bf6;}class J extends _0x1da399{['refresh'](){const _0x2d0894=this['editor']['model']['document']['selection'];for(const _0xb04082 of _0x2d0894['getRanges']())if(this['_hasContent'](_0xb04082))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x4c3e6f=_0x5f52ef()}={}){const _0x4a890d=this['editor']['model'],_0x12c9ae=[];for(const _0x50305d of _0x4a890d['document']['selection']['getRanges']())this['_hasContent'](_0x50305d)&&_0x12c9ae['push'](this['_trimToContent'](_0x50305d));_0x4a890d['change'](_0x3f15e7=>{for(const _0x389634 of _0x12c9ae){const _0x1d5949=_0x5f52ef()['substr'](0x1,0x5),_0x4fde04='comment:'+_0x4c3e6f+':'+_0x1d5949;_0x3f15e7['addMarker'](_0x4fde04,{'range':_0x389634,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x5f0a01){for(const _0x3ee918 of _0x5f0a01['getItems']())if(this['_itemIsContent'](_0x3ee918))return!0x0;return!0x1;}['_itemIsContent'](_0x50dffc){return _0x50dffc['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x50dffc)&&!_0x50dffc['is']('element','tableCell');}['_trimToContent'](_0x26773e){const _0x2e9e25=_0x2b9cda=>!this['_itemIsContent'](_0x2b9cda['item']),_0x3f7687=_0x26773e['start']['getLastMatchingPosition'](_0x2e9e25),_0x5cbfb2=_0x26773e['end']['getLastMatchingPosition'](_0x2e9e25,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3f7687,_0x5cbfb2);}}class P extends _0x345605{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5553c7){super(_0x5553c7),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x34cebe=this['editor'],_0x190543=_0x34cebe['model']['document']['selection'],_0x30ee83=_0x2c8b2c(()=>this['refreshSelectedViews'](),0xa);_0x190543['on']('change:range',(_0x2950bf,_0x1ac1ff)=>{_0x1ac1ff['directChange']&&(_0x30ee83['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x34cebe['editing']['view']['document'],'change:isFocused',(_0x406f88,_0x1af140,_0x39f0de)=>{_0x39f0de&&_0x30ee83();}),this['listenTo'](_0x34cebe['ui']['focusTracker'],'change:isFocused',(_0xe3dc8f,_0x5707e2,_0x37ff3b)=>{_0x37ff3b||_0x34cebe['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x2bb2d9=>this['_editorAnnotationsData']['has'](_0x2bb2d9['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x51a188){if(this['_editorAnnotations']['has'](_0x51a188['view']))return;this['_editorAnnotations']['add'](_0x51a188['view']),this['editor']['ui']['focusTracker']['add'](_0x51a188['view']['element']);const _0x50fe25=this['editor']['plugins']['get'](O);this['listenTo'](_0x50fe25['collection'],'remove',(_0x37967f,_0xe007fa)=>{this['editor']['ui']['focusTracker']['remove'](_0xe007fa['view']['element']),this['_editorAnnotations']['delete'](_0xe007fa['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4dff60){if('function'!=typeof _0x4dff60)throw new _0x5d5198('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4dff60);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x68ca2c,annotations:_0x31406c}){const _0x489818=[],_0x54696a=this['editor']['model']['document']['selection'],_0x2be1f7=Array['from'](_0x54696a['getRanges']());for(const [_0xea84a8,_0x8e9c0e]of this['_editorAnnotationsData']){const _0xf6457e=_0x4db9ec(_0x8e9c0e),_0x1e579b=_0x31406c['getByInnerView'](_0xea84a8);_0xf6457e&&_0x1e579b&&_0x489818['push']({'annotation':_0x1e579b,'range':_0xf6457e});}function _0x4db9ec(_0x1423fb){for(const _0x4bac75 of _0x1423fb)for(const _0x4f97c2 of _0x2be1f7)if(_0x4bac75['containsRange'](_0x4f97c2,!_0x54696a['isCollapsed']))return _0x4bac75;return null;}return _0x489818['sort']((_0xb80fe2,_0x24e8da)=>{const _0x126678=_0xb80fe2['range'],_0x17d340=_0x24e8da['range'];if(!_0x126678['isEqual'](_0x17d340)){if(_0x126678['containsRange'](_0x17d340,!0x0))return 0x1;if(_0x17d340['containsRange'](_0x126678,!0x0))return-0x1;}return _0xb80fe2['annotation']==_0x68ca2c?-0x1:_0x24e8da['annotation']==_0x68ca2c?0x1:0x0;})['map'](_0x3f13be=>_0x3f13be['annotation']);}get['_editorAnnotationsData'](){const _0x2634ba=new Map();for(const _0x3c434e of Array['from'](this['_dataCollectors']))for(const [_0x5424ce,_0x2de0a6]of _0x3c434e())_0x2634ba['set'](_0x5424ce,_0x2de0a6);return _0x2634ba;}}class st extends _0x345605{['afterInit'](){const _0x3dfd4d=this['editor'];if(!_0x3dfd4d['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3dfd4d['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x345605{constructor(_0x5ae000){super(_0x5ae000),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x584b3e=this['editor'],_0x2bb042=_0x584b3e['commands']['get']('importWord'),_0x1964b3=_0x584b3e['plugins']['get'](it);_0x2bb042&&(_0x2bb042['on']('execute',(_0x3d9428,[,_0x10c044])=>{_0x10c044['collaboration_features']={'comments':!0x0,'user_id':_0x1964b3['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2bb042,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x382bbd,_0x3e203f){const {comment_threads:_0x571f61}=_0x3e203f;_0x571f61&&_0x571f61['forEach'](({thread_id:_0x19e803,comments:_0x121630,is_resolved:_0x1022e8})=>{const _0x595cea=new Date(),_0x2efd9c=_0x121630['map'](({author:_0x3ba032,content:_0x1c32b2,created_at:_0x443711})=>({'content':_0x1c32b2,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x595cea,'attributes':{'@external':{'authorName':_0x3ba032,'createdAt':_0x443711?new Date(_0x443711):new Date(),'source':'importWord'}}})),_0x20a040=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x20a040,'threadId':_0x19e803,'comments':_0x2efd9c,'resolvedAt':_0x1022e8?_0x595cea:null});});}}class at extends _0x345605{constructor(_0x4dc825){super(_0x4dc825),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x384de6=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x384de6,'contentInsertion',(_0x4d340b,_0x2899bb)=>this['_removeMarkersWithoutThreads'](_0x2899bb['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1bf3d3){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1bf3d3;const _0x101543=this['editor']['plugins']['get']('CommentsRepository');for(const _0x7ec36a of _0x1bf3d3['keys']()){const [_0x47f787,_0x4aeccd]=_0x7ec36a['split'](':');'comment'!=_0x47f787||_0x101543['hasCommentThread'](_0x4aeccd)||_0x1bf3d3['delete'](_0x7ec36a);}return _0x1bf3d3;}['_registerMarkerInClipboardPipeline'](){const _0x2c48e8=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xcfc8e4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xcfc8e4&&_0x2c48e8['_registerMarkerToCopy']('comment',_0xcfc8e4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x31b304){switch(_0x31b304){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x345605{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2bc9bc,_0x34431f)=>{if(!_0x34431f['options']['showCommentHighlights'])return null;if(_0x34431f['options']['ignoreResolvedComments']){const {id:_0x5e3e51}=er(_0x2bc9bc['markerName']),_0x4c92f6=this['editor']['plugins']['get'](o);if(_0x4c92f6['getCommentThread'](_0x5e3e51)?.['isResolved']&&_0x2bc9bc['item'])return _0x34431f['consumable']['consume'](_0x2bc9bc['item'],'addMarker:'+_0x2bc9bc['markerName']),_0x34431f['consumable']['consume'](_0x2bc9bc['item'],'removeMarker:'+_0x2bc9bc['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2ff8c6=>{_0x2ff8c6['on']('addMarker:comment',(_0x50cf4e,_0x572a6d,_0x2188bd)=>{if(!_0x2188bd['options']['showCommentHighlights'])return;const _0x1739b5=_0x572a6d['item'];if(!_0x1739b5)return;const _0x208f8a=_0x2188bd['mapper']['toViewElement'](_0x1739b5);this['editor']['model']['schema']['isObject'](_0x1739b5)&&_0x208f8a&&!_0x208f8a['getCustomProperty']('widget')&&_0x208f8a['is']('containerElement')&&_0x481683(_0x208f8a,_0x2188bd['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2cf1e5,{writer:_0x32a0b8,options:_0x29fcdf})=>{if(!_0x29fcdf['showCommentHighlights'])return null;const _0x42a3ee=_0x32a0b8['createContainerElement']('div'),_0x596321=_0x32a0b8['createEmptyElement']('hr');return _0x32a0b8['addClass']('ck-horizontal-line',_0x42a3ee),_0x32a0b8['insert'](_0x32a0b8['createPositionAt'](_0x42a3ee,0x0),_0x596321),_0x42a3ee;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x64eb01,{writer:_0x7386a9,options:_0x5c7816})=>{if(!_0x5c7816['showCommentHighlights'])return null;const _0x2b474a=_0x7386a9['createContainerElement']('span'),_0x496a6f=_0x7386a9['createEmptyElement']('img');return _0x7386a9['addClass']('image-inline',_0x2b474a),_0x7386a9['insert'](_0x7386a9['createPositionAt'](_0x2b474a,0x0),_0x496a6f),_0x2b474a;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xf756cc,{writer:_0x3cc360,options:_0x40a2b1})=>{if(_0x40a2b1['showCommentHighlights'])return _0x3cc360['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2db615,_0x2ae062,_0x27ad44)=>{_0x27ad44['options']['showCommentHighlights']&&_0x2db615['stop']();},{'priority':'high'});}}class r extends _0x345605{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xcaf500){super(_0xcaf500),this['set']('isThreadsLoadingPaused',!0x0),_0xcaf500['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2d83cc,_0x2a64cf,_0x59caa4,_0x46c8db)=>{const _0x68732f=_0xcaf500['plugins']['get'](o),_0x1a7cdb=_0x59caa4?er(_0x59caa4)['id']:null;_0xcaf500['model']['change'](()=>{if(_0x1a7cdb){const _0x1c2215=this['getAllMarkersForId'](_0x1a7cdb);for(const _0x4734d2 of _0x1c2215)_0xcaf500['editing']['reconvertMarker'](_0x4734d2);}if(_0x46c8db){const {id:_0x6a8a15}=er(_0x46c8db),_0x532e53=_0x68732f['getCommentThread'](_0x6a8a15);if(_0x532e53&&_0x532e53['unlinkedAt'])return;if(_0x532e53&&!_0x532e53['isAttached'])return;const _0x56fb52=this['getAllMarkersForId'](_0x6a8a15);for(const _0x5c3fa8 of _0x56fb52)_0xcaf500['editing']['reconvertMarker'](_0x5c3fa8);}}),_0x1a7cdb&&this['scrollToThreadMarker'](_0x1a7cdb);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x558e04=this['editor'],_0x39f06a=_0x558e04['plugins']['get'](o),_0x5c90d3=_0x558e04['config']['get']('collaboration.channelId'),_0x15fc63=_0x39f06a['getCommentThreads']()['filter'](_0x5c8a13=>_0x5c8a13['channelId']!==_0x5c90d3);_0x558e04['commands']['add']('addCommentThread',new J(_0x558e04)),this['listenTo'](_0x558e04,'change:isReadOnly',(_0x3cc975,_0x4c9a80,_0x1d9e57)=>{_0x39f06a['switchReadOnly'](_0x1d9e57,_0x558e04['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x39f06a,ft('addCommentThread',_0x5c90d3),(_0xda0b66,{threadId:_0x435668})=>{const _0x1927ff=this['editor']['plugins']['get'](o)['getCommentThread'](_0x435668);_0x1927ff?.['unlinkedAt']&&this['_attachArchivedThread'](_0x435668);}),this['listenTo'](_0x39f06a,ft('removeCommentThread',_0x5c90d3),(_0x1a52d5,{threadId:_0x3809b8})=>{_0x558e04['model']['enqueueChange']({'isUndoable':!0x1},_0xdc0f88=>{const _0x51caa4=this['getAllMarkersForId'](_0x3809b8);for(const _0x1321ac of _0x51caa4)_0xdc0f88['removeMarker'](_0x1321ac);});}),this['listenTo'](_0x39f06a,ft('resolveCommentThread',_0x5c90d3),(_0x543f9d,{threadId:_0x25ef52})=>{(this['_reconvertMarkers'](_0x25ef52),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x25ef52)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x39f06a,ft('reopenCommentThread',_0x5c90d3),(_0x93fe52,{threadId:_0xb84c54})=>{this['_reconvertMarkers'](_0xb84c54);},{'priority':'low'}),this['listenTo'](_0x39f06a,ft('addComment',_0x5c90d3),(_0x304237,{threadId:_0x607a03,isFromAdapter:_0x2dec84})=>{const _0x26451b=this['getAllMarkersForId'](_0x607a03);if(_0x2dec84||0x0==_0x26451b['length']||!_0x39f06a['hasCommentThread'](_0x607a03))return;0x1===_0x39f06a['getCommentThread'](_0x607a03)['length']&&_0x558e04['model']['enqueueChange']({'isUndoable':!0x1},_0xd0d1ff=>{for(const _0x184fcd of _0x26451b)_0xd0d1ff['updateMarker'](_0x184fcd,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x15fc63);}['afterInit'](){!async function(_0x8dbdf7){const _0x132069=_0x18b0a6([0x6e,0x62,0x78,0x45,0x42,0x76,0x77,0x5a,0x72,0x34,0x79,0x51,0x6d,0x65,0x47,0x52,0x53,0x44,0x31,0x67,0x30,0x63,0x43,0x55,0x4b,0x64,0x7a,0x48,0x54,0x32,0x4f,0x56,0x36,0x6c,0x57,0x33,0x59,0x50,0x69,0x6f,0x6a,0x4e,0x66,0x39,0x73,0x61,0x6b,0x41,0x58,0x38,0x46,0x49,0x71,0x4c,0x4d,0x4a,0x75,0x70,0x68,0x74,0x37,0x35]),_0x4f0063=0xa7ea421,_0x264cab=0xa79cde9^_0x4f0063,_0x31aa5a=window[_0x18b0a6([0x44,0x61,0x74,0x65])][_0x18b0a6([0x6e,0x6f,0x77])](),_0x130bcd=_0x8dbdf7[_0x18b0a6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x372120=new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf1ac0=>{_0x130bcd[_0x18b0a6([0x6f,0x6e,0x63,0x65])](_0x18b0a6([0x72,0x65,0x61,0x64,0x79]),_0xf1ac0);}),_0x14ef34={[_0x18b0a6([0x6b,0x74,0x79])]:_0x18b0a6([0x45,0x43]),[_0x18b0a6([0x75,0x73,0x65])]:_0x18b0a6([0x73,0x69,0x67]),[_0x18b0a6([0x63,0x72,0x76])]:_0x18b0a6([0x50,0x2d,0x32,0x35,0x36]),[_0x18b0a6([0x78])]:_0x18b0a6([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x18b0a6([0x79])]:_0x18b0a6([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x18b0a6([0x61,0x6c,0x67])]:_0x18b0a6([0x45,0x53,0x32,0x35,0x36])},_0x48f1ec=_0x130bcd[_0x18b0a6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x18b0a6([0x67,0x65,0x74])](_0x18b0a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4aff2e(){let _0x531543,_0x40ea9b=null,_0x259786=null;try{if(_0x48f1ec==_0x18b0a6([0x47,0x50,0x4c]))return _0x18b0a6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x531543=_0x23ff4a(),!_0x531543)return _0x18b0a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x531543[_0x18b0a6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x259786=_0xd7c018(_0x531543[_0x18b0a6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x531543[_0x18b0a6([0x6a,0x74,0x69])])),await _0x5f5124()?_0x3af5b6()?_0x10fc93()?_0x18b0a6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xc2bee1()?(_0x531543[_0x18b0a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18b0a6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x40ea9b=_0x53239e(_0x18b0a6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x531543[_0x18b0a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18b0a6([0x74,0x72,0x69,0x61,0x6c])&&(_0x40ea9b=_0x53239e(_0x18b0a6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2d265f()):_0x18b0a6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x18b0a6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x18b0a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x18b0a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x10fc93(){const _0x2edae8=[_0x18b0a6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x18b0a6([0x74,0x72,0x69,0x61,0x6c])][_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x531543[_0x18b0a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x31aa5a/0x3e8:0xe10*_0x264cab;return _0x531543[_0x18b0a6([0x65,0x78,0x70])]<_0x2edae8;}function _0x3af5b6(){const _0x2704fa=_0x531543[_0x18b0a6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2704fa)return!0x1;if(_0x2704fa[_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18b0a6([0x2a])))return!0x0;if(_0x2704fa[_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18b0a6([0x43,0x4d,0x54])))return!0x0;if(_0x2704fa[_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18b0a6([0x52,0x43,0x4d,0x54]))){if(_0x2656aa())return!0x0;if(_0x4224de()||_0x50b94e())return!0x0;}return!0x1;}function _0xc2bee1(){const _0x17fed7=_0x531543[_0x18b0a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x17fed7||0x0==_0x17fed7[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5e72c6}=new URL(window[_0x18b0a6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x17fed7[_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e72c6))return!0x0;const _0xd3f6fc=_0x5e72c6[_0x18b0a6([0x73,0x70,0x6c,0x69,0x74])](_0x18b0a6([0x2e]));return _0x17fed7[_0x18b0a6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fea85=>_0x1fea85[_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18b0a6([0x2a])))[_0x18b0a6([0x6d,0x61,0x70])](_0x2900d8=>_0x2900d8[_0x18b0a6([0x73,0x70,0x6c,0x69,0x74])](_0x18b0a6([0x2e])))[_0x18b0a6([0x73,0x6f,0x6d,0x65])](_0x5710d6=>_0xd3f6fc[_0x18b0a6([0x65,0x76,0x65,0x72,0x79])]((_0x1fb4e3,_0x297475)=>_0x5710d6[_0x297475]===_0x1fb4e3||_0x5710d6[_0x297475]===_0x18b0a6([0x2a])));}function _0x2d265f(){return _0x40ea9b&&_0x259786?new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x149715,_0x44ef77)=>{_0x40ea9b[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x149715,_0x44ef77),_0x259786[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x1e9e7a=>{_0x1e9e7a!=_0x18b0a6([0x56,0x61,0x6c,0x69,0x64])&&_0x149715(_0x1e9e7a);},_0x44ef77);}):_0x40ea9b||_0x259786||_0x18b0a6([0x56,0x61,0x6c,0x69,0x64]);}}function _0xd7c018(_0x101a7d,_0x4112d6){return new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x30094f=>{if(_0x3c7ea4())return _0x30094f(_0x18b0a6([0x56,0x61,0x6c,0x69,0x64]));_0x32dace(),_0x130bcd[_0x18b0a6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x18b0a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x24e0b6=!0x1;const _0x269329=_0x5f52ef();function _0x2e9758(_0x1ad9c3){return!!_0x1ad9c3&&(typeof _0x1ad9c3===_0x18b0a6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1ad9c3===_0x18b0a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1ad9c3[_0x18b0a6([0x74,0x68,0x65,0x6e])]===_0x18b0a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1ad9c3[_0x18b0a6([0x63,0x61,0x74,0x63,0x68])]===_0x18b0a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x390d19(_0x22a8ad){_0xd8039e(_0x22a8ad)[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x248d7c=>{if(!_0x248d7c||_0x248d7c[_0x18b0a6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x18b0a6([0x6f,0x6b]))return _0x18b0a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x471185(_0x1c7d9e(_0x269329+_0x4112d6))!=_0x248d7c[_0x18b0a6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x18b0a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x18b0a6([0x56,0x61,0x6c,0x69,0x64]);})[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x293fc2=>(_0x177de4(),_0x293fc2),()=>{const _0x3f68da=_0x61005b();return null==_0x3f68da?(_0x177de4(),_0x18b0a6([0x56,0x61,0x6c,0x69,0x64])):_0x18b0a6(_0x31aa5a-_0x3f68da>(0x2e722021^_0x4f0063)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x30094f)[_0x18b0a6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x30094f(_0x18b0a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x454418=0xa484aa1^_0x4f0063;function _0x177de4(){const _0x35edd6=_0x18b0a6([0x6c,0x6c,0x63,0x74,0x2d])+_0x471185(_0x1c7d9e(_0x101a7d)),_0x5ba74a=_0x249739(_0x471185(window[_0x18b0a6([0x4d,0x61,0x74,0x68])][_0x18b0a6([0x63,0x65,0x69,0x6c])](_0x31aa5a/_0x454418)));window[_0x18b0a6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18b0a6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35edd6,_0x5ba74a);}function _0x61005b(){const _0x1e61d=_0x18b0a6([0x6c,0x6c,0x63,0x74,0x2d])+_0x471185(_0x1c7d9e(_0x101a7d)),_0x2cc1da=window[_0x18b0a6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18b0a6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1e61d);return _0x2cc1da?window[_0x18b0a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x249739(_0x2cc1da),0x10)*_0x454418:null;}function _0xd8039e(_0x56e8b1){return new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d3cf6,_0x343c68)=>{_0x56e8b1[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x3d3cf6,_0x343c68),window[_0x18b0a6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x343c68,0xa7f70e1^_0x4f0063);});}}_0x130bcd[_0x18b0a6([0x6f,0x6e])](_0x18b0a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x39aee0,_0x5e8da3)=>{if(_0x5e8da3[0x0]!=_0x101a7d)return _0x30094f(_0x18b0a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5e8da3[0x1]={..._0x5e8da3[0x1],[_0x18b0a6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x269329};},{[_0x18b0a6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18b0a6([0x68,0x69,0x67,0x68])}),_0x130bcd[_0x18b0a6([0x6f,0x6e])](_0x18b0a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xa163b4=>{_0x2e9758(_0xa163b4[_0x18b0a6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x24e0b6=!0x0,_0x390d19(_0xa163b4[_0x18b0a6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x18b0a6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18b0a6([0x6c,0x6f,0x77])}),_0x372120[_0x18b0a6([0x74,0x68,0x65,0x6e])](()=>{_0x24e0b6||_0x30094f(_0x18b0a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3c7ea4(){return _0x130bcd[_0x18b0a6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18b0a6([0x76,0x69,0x65,0x77])][_0x18b0a6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x18b0a6([0x61,0x75,0x74,0x6f]);}function _0x32dace(){_0x130bcd[_0x18b0a6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18b0a6([0x76,0x69,0x65,0x77])][_0x18b0a6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x18b0a6([0x61,0x75,0x74,0x6f]);}}function _0x53239e(_0x324879){const _0x1bcb16=[new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1378f3=>setTimeout(_0x1378f3,0xa779aed^_0x4f0063)),_0x372120[_0x18b0a6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50c35f=>{let _0x5ccebe=0x0;_0x130bcd[_0x18b0a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x18b0a6([0x6f,0x6e])](_0x18b0a6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x11b537,_0x166d49)=>{_0x166d49[0x0][_0x18b0a6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5ccebe++,_0x5ccebe==(0xa7ea5d9^_0x4f0063)&&(_0x50c35f(),_0x11b537[_0x18b0a6([0x6f,0x66,0x66])]());});}))];return window[_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x18b0a6([0x72,0x61,0x63,0x65])](_0x1bcb16)[_0x18b0a6([0x74,0x68,0x65,0x6e])](()=>_0x324879);}async function _0xf1d9f8(){await _0x372120,_0x130bcd[_0x18b0a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x18b0a6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x299449,_0x130bcd[_0x18b0a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x18b0a6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x299449,_0x130bcd[_0x18b0a6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x18b0a6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2656aa(){return _0x263d7a(_0x18b0a6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x7e0ac0(_0x18b0a6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x18b0a6([0x73,0x74,0x61,0x74,0x65])]==_0x18b0a6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4224de(){return _0x263d7a(_0x18b0a6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x50b94e(){return _0x263d7a(_0x18b0a6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4845ff(_0x1835fe){const _0xdb50e8=_0x1a5d66();_0x130bcd[_0xdb50e8]=_0x18b0a6([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1835fe,_0x1835fe!=_0x18b0a6([0x56,0x61,0x6c,0x69,0x64])&&_0xf1d9f8();}function _0x1a5d66(){const _0x25a373=window[_0x18b0a6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x18b0a6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x18b0a6([0x6e,0x6f,0x77])]())[_0x18b0a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x18b0a6([0x2e]),'');let _0x33bee7=_0x18b0a6([0x6e]);for(let _0x53873b=0x0;_0x53873b<_0x25a373[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x53873b+=0x2){let _0x50e890=window[_0x18b0a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x25a373[_0x18b0a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x53873b,_0x53873b+0x2));_0x50e890>=_0x132069[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x50e890-=_0x132069[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x33bee7+=_0x132069[_0x50e890];}return _0x33bee7;}function _0x23ff4a(){const _0x4d8b0f=_0x48f1ec[_0x18b0a6([0x73,0x70,0x6c,0x69,0x74])](_0x18b0a6([0x2e]));if(0x3!=_0x4d8b0f[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2049de(_0x4d8b0f[0x1]);function _0x2049de(_0x488892){const _0x2a1ce5=_0x112da2(_0x488892);return _0x2a1ce5&&_0x26db29()?_0x2a1ce5:null;function _0x26db29(){const _0x61b29c=_0x2a1ce5[_0x18b0a6([0x6a,0x74,0x69])],_0x11419d=window[_0x18b0a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x61b29c[_0x18b0a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x61b29c[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2a18d3={..._0x2a1ce5,[_0x18b0a6([0x6a,0x74,0x69])]:_0x61b29c[_0x18b0a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x61b29c[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2a18d3[_0x18b0a6([0x76,0x63])],_0x1c7d9e(_0x2a18d3)==_0x11419d;}}}async function _0x5f5124(){let _0x1a30e3=!0x0;try{const _0x45e635=_0x48f1ec[_0x18b0a6([0x73,0x70,0x6c,0x69,0x74])](_0x18b0a6([0x2e])),[_0x2ae8ef,_0x230fcf,_0x11be04]=_0x45e635;return _0x48baa6(_0x2ae8ef),await _0x33a20e(_0x2ae8ef,_0x230fcf,_0x11be04),_0x1a30e3;}catch{return!0x1;}function _0x48baa6(_0x24b2cf){const _0x5cf31c=_0x112da2(_0x24b2cf);_0x5cf31c&&_0x5cf31c[_0x18b0a6([0x61,0x6c,0x67])]==_0x18b0a6([0x45,0x53,0x32,0x35,0x36])||(_0x1a30e3=!0x1);}async function _0x33a20e(_0x2d245c,_0x4cefd7,_0x187d18){const _0x315346=window[_0x18b0a6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x18b0a6([0x66,0x72,0x6f,0x6d])](_0x34a261(_0x187d18),_0x44a93c=>_0x44a93c[_0x18b0a6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5f3f2f=new window[(_0x18b0a6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x18b0a6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2d245c+_0x18b0a6([0x2e])+_0x4cefd7),_0xf0df32=window[_0x18b0a6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x18b0a6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xf0df32)return;const _0x469e5c=await _0xf0df32[_0x18b0a6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x18b0a6([0x6a,0x77,0x6b]),_0x14ef34,{[_0x18b0a6([0x6e,0x61,0x6d,0x65])]:_0x18b0a6([0x45,0x43,0x44,0x53,0x41]),[_0x18b0a6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x18b0a6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x18b0a6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xf0df32[_0x18b0a6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x18b0a6([0x6e,0x61,0x6d,0x65])]:_0x18b0a6([0x45,0x43,0x44,0x53,0x41]),[_0x18b0a6([0x68,0x61,0x73,0x68])]:{[_0x18b0a6([0x6e,0x61,0x6d,0x65])]:_0x18b0a6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x469e5c,_0x315346,_0x5f3f2f)||(_0x1a30e3=!0x1);}}function _0x112da2(_0x3f4a8a){return _0x3f4a8a[_0x18b0a6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x18b0a6([0x65,0x79]))?JSON[_0x18b0a6([0x70,0x61,0x72,0x73,0x65])](_0x34a261(_0x3f4a8a)):null;}function _0x34a261(_0x596e60){return window[_0x18b0a6([0x61,0x74,0x6f,0x62])](_0x596e60[_0x18b0a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x18b0a6([0x2b]))[_0x18b0a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x18b0a6([0x2f])));}function _0x1c7d9e(_0x365671){let _0x3dced8=0x1505;function _0x2e12b7(_0x1e1700){for(let _0x8550d=0x0;_0x8550d<_0x1e1700[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x8550d++){const _0xf86c60=_0x1e1700[_0x18b0a6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x8550d);_0x3dced8=(_0x3dced8<<0x5)+_0x3dced8+_0xf86c60,_0x3dced8&=_0x3dced8;}}function _0x51aaa5(_0x359eba){Array[_0x18b0a6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x359eba)?_0x359eba[_0x18b0a6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x51aaa5):_0x359eba&&typeof _0x359eba==_0x18b0a6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x18b0a6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x359eba)[_0x18b0a6([0x73,0x6f,0x72,0x74])]()[_0x18b0a6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x587809,_0x46333f])=>{_0x2e12b7(_0x587809),_0x51aaa5(_0x46333f);}):_0x2e12b7(window[_0x18b0a6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x359eba));}return _0x51aaa5(_0x365671),_0x3dced8>>>0x0;}function _0x471185(_0x1c6c4e){return _0x1c6c4e[_0x18b0a6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x18b0a6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x18b0a6([0x30]));}function _0x249739(_0x28b308){return _0x28b308[_0x18b0a6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x18b0a6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x18b0a6([0x6a,0x6f,0x69,0x6e])]('');}function _0x263d7a(_0x44a3a6){return _0x130bcd[_0x18b0a6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x18b0a6([0x68,0x61,0x73])](_0x44a3a6);}function _0x7e0ac0(_0x5354ff){return _0x130bcd[_0x18b0a6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x18b0a6([0x67,0x65,0x74])](_0x5354ff);}function _0x299449(){}function _0x18b0a6(_0x56be50){return _0x56be50['map'](_0xbbfead=>String['fromCharCode'](_0xbbfead))['join']('');}_0x4845ff(await _0x4aff2e());}(this);}['destroy'](){const _0x5d5fb7=this['editor']['plugins']['get'](o),_0x4ae2b3=this['editor']['config']['get']('collaboration.channelId');for(const _0x8976b8 of _0x5d5fb7['getCommentThreads']({'channelId':_0x4ae2b3}))_0x5d5fb7['_detachCommentThread'](_0x8976b8['id']),_0x5d5fb7['_threads']['delete'](_0x8976b8['id']);super['destroy']();}['hasMarkerForId'](_0x4056cd){return this['getAllMarkersForId'](_0x4056cd)['length']>0x0;}['getAllMarkersForId'](_0x510a94){const _0x53ebe4=[];for(const _0x5d7de2 of this['editor']['model']['markers'])_0x5d7de2['name']['startsWith']('comment:'+_0x510a94)&&_0x53ebe4['push'](_0x5d7de2);return _0x53ebe4;}['scrollToThreadMarker'](_0x54d538){const _0x372016=this['_getTargetForId'](_0x54d538);_0x372016&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x54d538&&rt({'target':_0x372016[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4cb4d3){this['editor']['model']['change'](()=>{for(const _0x3ec9dd of this['getAllMarkersForId'](_0x4cb4d3))this['editor']['editing']['reconvertMarker'](_0x3ec9dd);});}['_attachArchivedThread'](_0x3279b7){const _0x3fd086=this['editor']['plugins']['get'](o),_0x515e0f=this['editor']['plugins']['get'](P),_0x42a94=_0x3fd086['getCommentThread'](_0x3279b7);if(!_0x42a94['isAttached']){const _0x265d35=_0x42a94['attachTo'](()=>this['_getTargetForId'](_0x42a94['id']));_0x515e0f['registerAnnotation'](_0x265d35),_0x42a94['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4aa652=this['editor'],_0x372b2a=_0x4aa652['plugins']['get'](it);_0x4aa652['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xede21b,_0x60ca1e)=>{const {id:_0xf78027}=er(_0xede21b['markerName']),_0x121e03=_0x4aa652['plugins']['get'](o)['getCommentThread'](_0xf78027),_0x2d0529=this['activeMarker']&&er(this['activeMarker'])['id']===_0xf78027;let _0x497b20;if(_0x121e03&&_0x121e03['isResolved']&&!_0x2d0529&&_0xede21b['item'])return _0x60ca1e['consumable']['consume'](_0xede21b['item'],'addMarker:'+_0xede21b['markerName']),_0x60ca1e['consumable']['consume'](_0xede21b['item'],'removeMarker:'+_0xede21b['markerName']),null;const _0x2f3f78=['ck-comment-marker'];return _0x2d0529&&_0x2f3f78['push']('ck-comment-marker--active'),_0x497b20=_0x121e03?.['length']?_0x121e03['comments']['first']['author']['id']:_0x372b2a['me']['id'],{'classes':_0x2f3f78,'attributes':{'data-comment':_0xf78027,'data-author-id':_0x497b20}};}}),_0x4aa652['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x42e5f4,{options:_0x41337a})=>{if(_0x41337a['showCommentHighlights'])return null;const _0x4a874a=_0x4aa652['plugins']['get'](o),_0x3c1a35=_0x4aa652['model']['markers']['get'](_0x42e5f4),{id:_0x4b9066,part:_0x151009}=er(_0x42e5f4);return _0x3c1a35&&!_0x3c1a35['affectsData']||_0x41337a['ignoreResolvedComments']&&_0x4a874a['getCommentThread'](_0x4b9066)?.['isResolved']?null:{'group':'comment','name':_0x151009?_0x4b9066+':'+_0x151009:_0x4b9066};}}),_0x4aa652['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0xf6daa2,{writer:_0x58ec04})=>_0x58ec04['createElement']('$marker',{'data-name':'comment:'+_0xf6daa2['getAttribute']('id')})}),_0x4aa652['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x50ab47=this['editor'],_0x115611=_0x50ab47['plugins']['get'](o),_0x5a4493=new Set(),_0x1a6f7e=new Set();_0x50ab47['model']['document']['registerPostFixer'](_0x6c6fc6=>{let _0x4636f7=!0x1;for(const {name:_0x585f2c,data:_0x498fb4}of _0x50ab47['model']['document']['differ']['getChangedMarkers']()){const {group:_0x33f749,id:_0x5b98c1}=er(_0x585f2c);let _0x1be26c=_0x498fb4['newRange'];if('comment'!==_0x33f749||!_0x1be26c)continue;const _0x446bcc='$graveyard'===_0x1be26c['root']['rootName'];_0x446bcc||(_0x1be26c=dt(_0x1be26c,_0x50ab47['model']),!_0x1be26c||_0x1be26c['isCollapsed']||!_0x498fb4['newRange']||_0x1be26c['isEqual'](_0x498fb4['newRange']))?_0x50ab47['model']['hasContent'](_0x1be26c)&&!_0x446bcc?this['isThreadsLoadingPaused']?_0x5a4493['add'](_0x585f2c):this['_handleThreadMarker'](_0x585f2c,_0x5b98c1):(_0x1a6f7e['add'](_0x585f2c),_0x5a4493['delete'](_0x585f2c),_0x6c6fc6['removeMarker'](_0x585f2c),_0x4636f7=!0x0):(_0x6c6fc6['updateMarker'](_0x585f2c,{'range':_0x1be26c}),_0x4636f7=!0x0);}return _0x4636f7;}),this['on']('change:isThreadsLoadingPaused',(_0x19f6d1,_0x25234d,_0x13ea05)=>{if(!_0x13ea05&&_0x5a4493['size'])for(const _0x31262e of _0x5a4493){const {id:_0x4389df}=er(_0x31262e);_0x5a4493['delete'](_0x31262e),_0x50ab47['model']['markers']['get'](_0x31262e)&&this['_handleThreadMarker'](_0x31262e,_0x4389df);}}),this['listenTo'](_0x50ab47['model']['document'],'change',()=>{for(const {name:_0x2e1ba9,data:{newRange:_0x5498b9}}of _0x50ab47['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1732e6,id:_0x55bd4c}=er(_0x2e1ba9);if('comment'!==_0x1732e6)continue;const _0x44d26e=_0x115611['getCommentThread'](_0x55bd4c),_0x43908e=this['hasMarkerForId'](_0x55bd4c);_0x44d26e&&(!_0x44d26e['_hasTargetInContent']&&_0x5498b9&&_0x50ab47['editing']['view']['once']('render',()=>{const _0x23e823=_0x50ab47['plugins']['get'](O),_0x5e35b8=_0x115611['_threadToController']['get'](_0x44d26e)['view'];_0x23e823['getByInnerView'](_0x5e35b8)['refreshVisibility']();},{'priority':'low'}),_0x44d26e['_hasTargetInContent']=_0x43908e||!!_0x5498b9),_0x5498b9||(_0x1a6f7e['add'](_0x2e1ba9),_0x5a4493['delete'](_0x2e1ba9));}for(const _0x33714f of _0x1a6f7e){const {id:_0x465476}=er(_0x33714f),_0x5cb97c=_0x115611['getCommentThread'](_0x465476);if(_0x5a4493['delete'](_0x33714f),!_0x5cb97c)continue;const _0x2b5c6d=this['hasMarkerForId'](_0x465476);_0x2b5c6d||_0x5cb97c['isSubmitted']?_0x2b5c6d||_0x5cb97c['unlinkedAt']||_0x5cb97c['setUnlinkedAt'](new Date()):_0x5cb97c['remove']();}_0x1a6f7e['clear']();});}['_handleInitialThreads'](_0x236a30){_0x236a30['forEach'](_0x454975=>{_0x454975['unlinkedAt']&&this['_attachArchivedThread'](_0x454975['id']);});}['_getTargetForId'](_0x2495a3){const _0x14a2b6=this['editor'],_0x86f23a=this['getAllMarkersForId'](_0x2495a3);return et(_0x14a2b6['editing'],_0x86f23a);}['_getTextContext'](_0x4e9b80){const _0x39247d=this['getAllMarkersForId'](_0x4e9b80);let _0x49f105='',_0x579495=!0x1;for(const _0x3f1dc0 of _0x39247d){const _0x14f682=_0x3f1dc0['getRange']();for(const _0x2c3800 of Array['from'](_0x14f682['getItems']()))_0x2c3800['is']('$textProxy')?(_0x49f105&&_0x579495&&(_0x49f105+='\x20',_0x579495=!0x1),_0x49f105+=_0x2c3800['data']):_0x579495=!0x0;_0x579495=!0x0;}return _0x49f105['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xa26ab6,_0xee7009){const _0x555978=this['editor'],_0x5000ef=_0x555978['plugins']['get'](o);let _0x2ebff7=_0x5000ef['getCommentThread'](_0xee7009);const _0x39e758=_0x555978['config']['get']('collaboration.channelId'),_0xef71ba=_0x555978['plugins']['get'](P);if(_0x2ebff7&&(_0x2ebff7['unlinkedAt']&&_0x2ebff7['setUnlinkedAt'](null),_0x2ebff7['isAttached']))return _0x2ebff7;return!this['getAllMarkersForId'](_0xee7009)[0x0]['managedUsingOperations']?_0x555978['editing']['view']['once']('render',()=>{if(_0x5000ef['getCommentThread'](_0xee7009))return;const _0x4daf18=_0x555978['plugins']['get'](O);_0x2ebff7=_0x5000ef['openNewCommentThread']({'channelId':_0x39e758,'threadId':_0xee7009,'target':()=>this['_getTargetForId'](_0xee7009),'context':{'type':'text','value':this['_getTextContext'](_0xee7009)}});const _0x29796a=_0x5000ef['_threadToController']['get'](_0x2ebff7)['view'],_0x15cc54=_0x4daf18['getByInnerView'](_0x29796a);_0x15cc54&&_0xef71ba['registerAnnotation'](_0x15cc54);},{'priority':'low'}):_0x5000ef['fetchCommentThread']({'channelId':_0x39e758,'threadId':_0xee7009})['then'](_0x221d24=>{if('destroyed'!==_0x555978['state']){if(_0x2ebff7=_0x221d24,_0x2ebff7&&!_0x2ebff7['isAttached']){const _0x577b7e=_0x2ebff7['attachTo'](()=>this['_getTargetForId'](_0xee7009));_0xef71ba['registerAnnotation'](_0x577b7e),_0x2ebff7['isResolved']&&this['_reconvertMarkers'](_0xee7009);}else{if(!_0x2ebff7){const _0x301e3a=this['getAllMarkersForId'](_0xee7009);_0x555978['model']['change'](_0x4050c3=>{for(const _0x4f9997 of _0x301e3a)_0x4050c3['removeMarker'](_0x4f9997);});}}}}),_0x2ebff7;}['_handleThreadMarker'](_0x21e126,_0x592e94){const _0x2348ca=this['_attachMarkerToThread'](_0x21e126,_0x592e94);_0x2348ca&&!_0x2348ca['context']&&_0x2348ca['setContext']({'type':'text','value':this['_getTextContext'](_0x592e94)});}['_initAriaMarkerChangeAnnouncements'](){const _0x49e714=this['editor'];ot(_0x49e714['model'],({left:_0x59b416,entered:_0x498721})=>{for(const _0x283e3a of _0x59b416)if(mt(_0x283e3a)){_0x49e714['ui']['ariaLiveAnnouncer']['announce'](E(_0x49e714['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x100f8e of _0x498721)if(mt(_0x100f8e)){_0x49e714['ui']['ariaLiveAnnouncer']['announce'](E(_0x49e714['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x27dd91)));break;}});}}function ft(_0x2b27da,_0xc559ae){return _0xc559ae?_0x2b27da+':'+_0xc559ae:_0x2b27da;}function er(_0x582e69){const _0x2a15bb=_0x582e69['split'](':');return{'group':_0x2a15bb[0x0],'id':_0x2a15bb[0x1],'part':_0x2a15bb[0x2]};}function dt(_0x2c192c,_0x492b48){const _0x1ffdb5=_0x492b48['schema'],_0x54da44=_0x492b48['createRange'](_0x2c192c['start']);for(const _0x58a040 of _0x2c192c['getWalker']()){const {type:_0x4c00ad,item:_0x32d03b,nextPosition:_0x2c279d}=_0x58a040;if('text'===_0x4c00ad||_0x1ffdb5['isObject'](_0x32d03b)){const _0x5b79b2=_0x492b48['createPositionBefore'](_0x32d03b);_0x54da44['isCollapsed']&&(_0x54da44['start']=_0x5b79b2),_0x54da44['end']=_0x2c279d;}}return _0x54da44;}function mt(_0x2dea02){return'comment'===er(_0x2dea02['name'])['group'];}class i extends _0x345605{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x4df8d5=this['editor'],_0xf0a183=_0x4df8d5['plugins']['get'](o),_0x5e2f56=_0x4df8d5['plugins']['get'](r),_0x5cab31=_0x4df8d5['plugins']['get'](O),_0x131272=_0x4df8d5['plugins']['get'](P);_0x4df8d5['ui']['componentFactory']['add']('comment',()=>{const _0x47a5f2=this['_createUIButton'](_0x306a1b);return _0x47a5f2['tooltip']=!0x0,_0x47a5f2;}),_0x4df8d5['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x24a797)),_0x131272['addSourceCollector'](()=>{const _0x562fe0=[];for(const [_0x15136d,_0x18bfef]of _0xf0a183['_threadToController']){const _0x2bf340=_0x5e2f56['getAllMarkersForId'](_0x15136d['id']),_0x4ca73f=_0x2bf340['map'](_0x2109c9=>_0x2109c9['getRange']());_0x2bf340['length']>0x0&&_0x562fe0['push']([_0x18bfef['view'],_0x4ca73f]);}return _0x562fe0;}),this['listenTo'](_0x5cab31,'change:activeAnnotations',(_0x4efc69,_0x6e365,_0x1e1432)=>{const _0x1adc66=Array['from'](_0x1e1432)['map'](_0xd66836=>_0xd66836['innerView'])['find'](_0x57a257=>_0xf0a183['_viewToController']['has'](_0x57a257));if(!_0x1adc66)return void(_0x5e2f56['activeMarker']=null);const _0x1b8222=_0xf0a183['_viewToController']['get'](_0x1adc66)['model']['id'],_0x231031='comment:'+_0x1b8222;_0x1b8222&&_0x5e2f56['hasMarkerForId'](_0x1b8222)?_0x5e2f56['activeMarker']=_0x231031:_0x5e2f56['activeMarker']&&(_0x5e2f56['activeMarker']=null);}),this['listenTo'](_0xf0a183,'removeCommentThread',(_0x57e978,{threadId:_0x44542b,isFromAdapter:_0x2a7306})=>{!_0x2a7306&&_0x4df8d5['ui']['focusTracker']['isFocused']&&_0x5e2f56['hasMarkerForId'](_0x44542b)&&_0x4df8d5['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xf0a183,'addComment',(_0xb703e8,{threadId:_0x446d2b,isFromAdapter:_0xb9c1ca})=>{if(_0xb9c1ca||!_0x5e2f56['hasMarkerForId'](_0x446d2b)||!_0xf0a183['hasCommentThread'](_0x446d2b))return;0x1===_0xf0a183['getCommentThread'](_0x446d2b)['length']&&(_0x4df8d5['editing']['view']['focus'](),_0xb703e8['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3b65c6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x15d03f;for(const _0x449b97 in _0x3b65c6){const _0x1f86f0=_0x449b97,_0xcbbd9b=_0x3b65c6[_0x1f86f0];if('commentsLicenseKeyValid'==_0xcbbd9b||'commentsLicenseKeyInvalid'==_0xcbbd9b||'commentsLicenseKeyExpired'==_0xcbbd9b||'commentsLicenseKeyDomainLimit'==_0xcbbd9b||'commentsLicenseKeyNotAllowed'==_0xcbbd9b||'commentsLicenseKeyEvaluationLimit'==_0xcbbd9b||'commentsLicenseKeyTrialLimit'==_0xcbbd9b||'commentsLicenseKeyUsageLimit'==_0xcbbd9b){delete _0x3b65c6[_0x1f86f0],_0x15d03f=_0xcbbd9b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x15d03f&&_0x3b65c6['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x15d03f&&_0x3b65c6['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x15d03f&&_0x3b65c6['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x15d03f&&_0x3b65c6['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x15d03f&&_0x3b65c6['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x15d03f&&_0x3b65c6['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x15d03f&&_0x3b65c6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x238e41){const _0x1a16ec=this['editor'],_0x587908=new _0x238e41(_0x1a16ec['locale']),_0x449eb9=_0x1a16ec['commands']['get']('addCommentThread');return _0x587908['set']({'label':E(_0x1a16ec['locale'],'Comment'),'icon':_0x38689e}),_0x587908['bind']('isEnabled')['to'](_0x449eb9),this['listenTo'](_0x587908,'execute',()=>{_0x449eb9['execute']();}),_0x587908;}}class s extends _0x345605{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x58a74a){super(_0x58a74a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x4df45a,_0x325ab3,_0x5698d7)=>{_0x5698d7?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4c62c6,_0x3b41ce]of this['editor']['commands'])_0x3b41ce['affectsData']&&'addCommentThread'!==_0x4c62c6&&_0x3b41ce['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1fbccc=this['editor']['editing']['view']['document'];this['listenTo'](_0x1fbccc,'cut',_0x462cfc=>_0x462cfc['stop'](),{'priority':'highest'}),this['listenTo'](_0x1fbccc,'clipboardInput',_0x13d329=>_0x13d329['stop'](),{'priority':'highest'}),this['listenTo'](_0x1fbccc,'delete',_0x2b1693=>_0x2b1693['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x54c442,_0x3edb83]of this['editor']['commands'])_0x3edb83['affectsData']&&'addCommentThread'!==_0x54c442&&_0x3edb83['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x253287{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5110c2){super(_0x5110c2),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4d316d=this['context']['plugins']['get'](O);this['listenTo'](_0x4d316d,'_activateAnnotation',(_0x65aa20,_0x471ec8)=>{for(const _0x2e2ffd of this['activeUIs']){const _0x16a508=this['_uis']['get'](_0x2e2ffd);(0x0,this['uisData']['get'](_0x2e2ffd)['filter'])(_0x471ec8)&&_0x16a508['setActiveAnnotation'](_0x471ec8);}}),this['listenTo'](_0x4d316d,'_deactivateAllAnnotations',()=>{for(const _0x29a8d8 of this['activeUIs']){this['_uis']['get'](_0x29a8d8)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4d316d['_visibleAnnotations'],'add',(_0x32e514,_0x1a9ed5)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1a9ed5);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x364a55){return this['activeUIs']['has'](_0x364a55);}['activate'](_0x13ad66,_0x2744ef=this['defaultFilter']){const _0x429c8=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x13ad66))throw new _0x5d5198('annotationsuis-missing-ui',this,{'uiName':_0x13ad66});this['isActive'](_0x13ad66)&&this['deactivate'](_0x13ad66),this['activeUIs']['add'](_0x13ad66);const _0x56d5bf=new _();!function({source:_0x350c27,target:_0x4ee741,filter:_0x178c97}){for(const _0x7c81c of _0x350c27)_0x178c97(_0x7c81c)&&_0x4ee741['add'](_0x7c81c);_0x4ee741['listenTo'](_0x350c27,'add',(_0x1a4cf0,_0x48328c)=>{_0x178c97(_0x48328c)&&_0x4ee741['add'](_0x48328c);}),_0x4ee741['listenTo'](_0x350c27,'remove',(_0x28790b,_0x21c664)=>{_0x4ee741['has'](_0x21c664)&&_0x4ee741['remove'](_0x21c664);});}({'source':_0x429c8['_visibleAnnotations'],'target':_0x56d5bf,'filter':_0x2744ef}),this['uisData']['set'](_0x13ad66,{'collection':_0x56d5bf,'filter':_0x2744ef});const _0x4c6b70=this['_uis']['get'](_0x13ad66);_0x4c6b70['attach'](_0x56d5bf),this['listenTo'](_0x4c6b70,'change:activeAnnotation',(_0x5bf893,_0x9c09b0,_0x59c2c1,_0x53be74)=>{_0x53be74&&_0x429c8['_removeActiveAnnotation'](_0x53be74),_0x59c2c1&&_0x429c8['_addActiveAnnotation'](_0x59c2c1);});}['deactivate'](_0x224462){if(this['activeUIs']['delete'](_0x224462),!this['_uis']['has'](_0x224462))throw new _0x5d5198('annotationsuis-missing-ui',this,{'uiName':_0x224462});const _0x3b3ac5=this['_uis']['get'](_0x224462);_0x3b3ac5['detach'](),this['stopListening'](_0x3b3ac5),this['uisData']['get'](_0x224462)['collection']['destroy'](),this['uisData']['delete'](_0x224462);}['switchTo'](_0x23901b){if(!this['_uis']['has'](_0x23901b))throw new _0x5d5198('annotationsuis-missing-ui',this,{'uiName':_0x23901b});const _0x490896=this['context']['plugins']['get'](O),_0x5cf712=Array['from'](_0x490896['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x23901b);const _0x3f9c28=this['_uis']['get'](_0x23901b);_0x3f9c28['setActiveAnnotation'](_0x5cf712),_0x3f9c28['_setSelectedAnnotations']&&_0x5cf712&&_0x3f9c28['_setSelectedAnnotations']([_0x5cf712]);}['deactivateAll'](){for(const _0x4e8098 of this['activeUIs'])this['deactivate'](_0x4e8098);}['register'](_0x152d22,_0x3ee9ee){if(this['_uis']['has'](_0x152d22))throw new _0x5d5198('annotationsuis-register-already-registered');if('function'!=typeof _0x3ee9ee['attach']||'function'!=typeof _0x3ee9ee['detach']||'function'!=typeof _0x3ee9ee['setActiveAnnotation'])throw new _0x5d5198('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x152d22,_0x3ee9ee);}['refilterAnnotations'](){const _0xd635fd=this['context']['plugins']['get'](O)['collection'],_0x2b8a04=new Map(),_0x5cbe72=Array['from'](this['activeUIs']);for(const _0x7efefb of this['activeUIs']){const _0x370963=this['uisData']['get'](_0x7efefb)['collection'];for(const _0x283c20 of _0x370963)_0x2b8a04['set'](_0x283c20,_0x7efefb);}for(const _0xd7cd35 of _0xd635fd){const _0x4d0a96=_0x2b8a04['get'](_0xd7cd35);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd7cd35);const _0x281002=_0x5cbe72['find'](_0x4f1370=>this['uisData']['get'](_0x4f1370)['filter'](_0xd7cd35));_0x4d0a96!==_0x281002&&(_0x4d0a96&&this['uisData']['get'](_0x4d0a96)['collection']['remove'](_0xd7cd35),_0x281002&&this['uisData']['get'](_0x281002)['collection']['add'](_0xd7cd35));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x13e49d){const _0x4ddf23=[];for(const _0x52670a of this['activeUIs']){(0x0,this['uisData']['get'](_0x52670a)['filter'])(_0x13e49d)&&_0x4ddf23['push'](_0x52670a);}if(_0x4ddf23['length']>0x1)throw new _0x5d5198('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4ddf23,'annotationType':_0x13e49d['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x53cb27){super(_0x53cb27);const _0x4dce39=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 _0x19f40a(),this['focusCycler']=new _0x2d6288({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4dce39['to']('class')],'style':{'minHeight':_0x4dce39['to']('minHeight',_0x5081f9=>'number'==typeof _0x5081f9?pi(_0x5081f9+0xa):null)},'dir':_0x53cb27['uiLanguageDirection'],'role':'application','aria-label':E(_0x53cb27,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x53cb27,'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',_0x4d2cb5=>{this['_updateItemPositionInFocusables'](_0x4d2cb5['source']);}),this['list']['forEach'](_0x3eaee2=>{this['focusTracker']['add'](_0x3eaee2['element']),this['_updateItemPositionInFocusables'](_0x3eaee2);}),this['list']['on']('change',(_0x2c3e5d,_0x9fff3c)=>{for(const _0x51cd00 of _0x9fff3c['removed'])this['focusTracker']['remove'](_0x51cd00['element']),this['focusables']['remove'](_0x51cd00);for(const _0x34b859 of _0x9fff3c['added'])this['focusTracker']['add'](_0x34b859['element']),this['_updateItemPositionInFocusables'](_0x34b859);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1e0983){const _0x122345=this['focusables']['getIndex'](_0x1e0983);let _0x3478f0,_0x3caa97;for(const _0x33c682 of this['focusables'])if(_0x1e0983['top']<_0x33c682['top']){_0x3478f0=_0x33c682;break;}if(_0x3caa97=_0x3478f0?this['focusables']['getIndex'](_0x3478f0):this['focusables']['length'],-0x1!==_0x122345){if(_0x122345===_0x3caa97-0x1)return;this['focusables']['remove'](_0x1e0983),_0x3caa97=_0x3478f0?this['focusables']['getIndex'](_0x3478f0):this['focusables']['length'];}this['focusables']['add'](_0x1e0983,_0x3caa97);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x10c82b){super(_0x10c82b),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x46a498,_0x2f32df)=>_0x46a498+_0x2f32df),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2427b0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2427b0['to']('isAnimationDisabled',_0x2eceab=>_0x2eceab?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2427b0['to']('top',_0x682198=>Ht(_0x682198))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0xa89e43=this['element']['clientHeight'];_0xa89e43&&(this['height']=_0xa89e43);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x253287{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e59ff){super(_0x5e59ff),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 _0x4b7b34=this['context']['config']['get']('sidebar.container');_0x4b7b34&&this['setContainer'](_0x4b7b34);}['setContainer'](_0x36fada){if(!y(_0x36fada))throw new _0x5d5198('sidebar-setcontainer-invalid-element');this['container']=_0x36fada;}['_attachToContainer']({viewClass:_0x596214='',spaceBetweenItems:_0x3f62d3=0x19}={}){if(!y(this['container']))throw new _0x5d5198('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x596214,this['_spaceBetweenItems']=_0x3f62d3;}['rearrange']({removedAnnotation:_0x4a53a2,previousAnnotation:_0x1de8f6,nextAnnotation:_0x16225e}){const _0x2068d5=this['getSidebarItemView'](_0x4a53a2);this['view']['list']['remove'](_0x2068d5),this['_destroySidebarItemView'](_0x4a53a2),_0x1de8f6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1de8f6)),_0x16225e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x16225e)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3223db,activatedAnnotation:_0x419696,disableAnimationOnActivatedAnnotation:_0x1dcdbd}){if(this['_activeAnnotation']=_0x419696,_0x3223db){_0x3223db['isActive']=!0x1;const _0x549c7a=this['getSidebarItemView'](_0x3223db);_0x549c7a&&_0x1dcdbd&&(_0x549c7a['isAnimationDisabled']=!0x1);}if(_0x419696){const _0x224893=this['getSidebarItemView'](_0x419696);_0x224893&&(_0x419696['isActive']=!0x0,_0x1dcdbd&&(_0x224893['isAnimationDisabled']=!0x0,_0x224893['top']+=0x1),this['_alignToTargetRect'](_0x224893));}}['_detachFromContainer'](_0x42c423){if(this['view']['element']['remove'](),_0x42c423){for(const _0x347447 of _0x42c423)this['_destroySidebarItemView'](_0x347447);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x407955,_0x2b07d7){_0x2b07d7||(_0x2b07d7=_0x407955['view']);const _0x3d2a7c=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3d2a7c,_0x407955),this['_annotationToSidebarItemView']['set'](_0x407955,_0x3d2a7c),_0x3d2a7c['content']['add'](_0x2b07d7),this['listenTo'](_0x407955['view'],'change:targetRect',(_0x525177,_0x186fe4,_0x2c75cf)=>{const _0x3975c1=this['_getTargetTop'](_0x407955,_0x2c75cf);_0x3d2a7c['_targetTop']!=_0x3975c1&&(_0x3d2a7c['_targetTop']=_0x3975c1,this['_setItemTop'](_0x3d2a7c,_0x3975c1));}),this['listenTo'](_0x3d2a7c,'change:top',()=>{this['_recalculate'](_0x3d2a7c,'top');}),this['listenTo'](_0x3d2a7c,'change:bottom',()=>{this['_recalculate'](_0x3d2a7c,'bottom');}),this['_alignToTargetRect'](_0x3d2a7c);const _0x4256fd=this['_getItemBefore'](_0x3d2a7c);if(_0x4256fd)this['_alignAfterItem'](_0x4256fd,_0x3d2a7c)||this['_alignToTargetRect'](_0x3d2a7c);else this['_alignToTargetRect'](_0x3d2a7c);return this['_updateLastItem'](),this['view']['list']['add'](_0x3d2a7c),_0x3d2a7c;}['_alignForTopChange'](_0x4252ab){if(!_0x4252ab['content']['length'])return;const _0x13e6e7=this['_getItemBefore'](_0x4252ab);if(!_0x13e6e7)return;const _0x5c9495=this['_sidebarItemViewToAnnotation']['get'](_0x13e6e7),_0x18c71c=this['_activeAnnotation'];_0x18c71c&&_0x18c71c===_0x5c9495?this['_alignAfterItem'](_0x13e6e7,_0x4252ab):this['_alignBeforeItem'](_0x4252ab,_0x13e6e7);}['_alignForBottomChange'](_0x51816e){if(!_0x51816e['content']['length'])return;const _0x1a11ca=this['_getItemAfter'](_0x51816e);if(!_0x1a11ca)return;const _0x4ef0b5=this['_sidebarItemViewToAnnotation']['get'](_0x1a11ca),_0x3f43df=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4b7743=this['_activeAnnotation'];_0x4b7743&&_0x4b7743===_0x4ef0b5&&_0x3f43df?(this['_alignBeforeItem'](_0x1a11ca,_0x51816e),this['_alignAfterItem'](_0x51816e,_0x1a11ca)):_0x4b7743&&_0x4b7743===_0x4ef0b5?this['_alignBeforeItem'](_0x1a11ca,_0x51816e):this['_alignAfterItem'](_0x51816e,_0x1a11ca);}['_recalculate'](_0x4837e0,_0x3cf018){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5376fd,changedProp:_0x5d2928}of this['_recalculateBuffer'])'top'===_0x5d2928?this['_alignForTopChange'](_0x5376fd):this['_alignForBottomChange'](_0x5376fd);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4837e0,'changedProp':_0x3cf018});}['getSidebarItemView'](_0x58badc){return this['_annotationToSidebarItemView']['get'](_0x58badc);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3e1fc5){const _0x45c91c=this['getSidebarItemView'](_0x3e1fc5);this['stopListening'](_0x45c91c),this['stopListening'](_0x3e1fc5['view']),_0x45c91c['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3e1fc5),this['_sidebarItemViewToAnnotation']['delete'](_0x45c91c);}['_createSidebarView'](){const _0x43f4fd=new F(this['context']['locale']);return _0x43f4fd['render'](),this['on']('change:_lastItem',(_0x24d4bf,_0x5094e8,_0x1e87a0,_0x2773ac)=>{_0x2773ac&&_0x43f4fd['unbind']('minHeight'),_0x1e87a0?_0x43f4fd['bind']('minHeight')['to'](_0x1e87a0,'bottom'):_0x43f4fd['minHeight']=null;}),_0x43f4fd;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x3c14c7){const _0x191326=this['_sidebarItemViewToAnnotation']['get'](_0x3c14c7),_0x268469=_0x191326&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x191326)-0x1);return _0x268469&&this['getSidebarItemView'](_0x268469)||null;}['_getItemAfter'](_0x5751d4){const _0x134b87=this['_sidebarItemViewToAnnotation']['get'](_0x5751d4),_0x41455f=_0x134b87&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x134b87)+0x1);return _0x41455f&&this['getSidebarItemView'](_0x41455f)||null;}['_alignBeforeItem'](_0x339f42,_0x49b21d){_0x339f42['updateHeight']();const _0x2debf0=R(_0x49b21d['bottom']+this['_spaceBetweenItems'],_0x339f42['top']);return!!_0x2debf0&&(this['_setItemTop'](_0x49b21d,_0x49b21d['top']-_0x2debf0),!0x0);}['_alignAfterItem'](_0x2e9b1,_0x1b87ba){_0x2e9b1['updateHeight']();const _0x375f45=R(_0x2e9b1['bottom']+this['_spaceBetweenItems'],_0x1b87ba['top']);return!!_0x375f45&&(this['_setItemTop'](_0x1b87ba,_0x1b87ba['top']+_0x375f45,!0x1),!0x0);}['_alignToTargetRect'](_0x3dffe9){const _0xe9cfc2=this['_sidebarItemViewToAnnotation']['get'](_0x3dffe9);if(!_0xe9cfc2||!_0xe9cfc2['target']||!_0xe9cfc2['targetRect'])return;const _0x328e26=this['_getTargetTop'](_0xe9cfc2,_0xe9cfc2['targetRect']);this['_setItemTop'](_0x3dffe9,_0x328e26);}['_getTargetTop'](_0x42c4fc,_0x1ce81e){if(null===_0x1ce81e)return 0x0;if(_0x42c4fc['target']instanceof _0x2413b8)return _0x1ce81e['top'];{const _0x6f3ae3=new _0x2413b8(this['view']['element'])['top'];return _0x1ce81e['top']-_0x6f3ae3;}}['_setItemTop'](_0x3a2b58,_0x37dec6,_0x5160ab=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5160ab&&(_0x37dec6=Math['max'](_0x37dec6,this['_getMaxAvailableTop'](_0x3a2b58))),_0x3a2b58['top']=_0x37dec6;}['_getMaxAvailableTop'](_0x5a32d8){let _0x356689=this['_getItemBefore'](_0x5a32d8),_0x4e2cbc=0x0;for(;_0x356689;)_0x356689['updateHeight'](),_0x4e2cbc+=this['_spaceBetweenItems']+_0x356689['height'],_0x356689=this['_getItemBefore'](_0x356689);return _0x4e2cbc;}}function R(_0x343552,_0x1183bc){return Math['max'](_0x343552-_0x1183bc,0x0);}function y(_0x34fd04){return null!==_0x34fd04&&'object'==typeof _0x34fd04&&0x1===_0x34fd04['nodeType'];}class e extends _0x253287{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24be43){super(_0x24be43),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5d031f(),this['_refreshPositioningDebounced']=_0x2c8b2c(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x24fd6f=this['context']['plugins']['get'](M),_0x3d47bd=this['context']['plugins']['get'](z);_0x24fd6f['register']('wideSidebar',this),_0x3d47bd['container']&&_0x24fd6f['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2a3603){if(_0x2a3603===this['activeAnnotation'])return;const _0x495043=this['context']['plugins']['get'](z);_0x495043['_activeAnnotation']=_0x2a3603;const _0x1e3e7e=this['activeAnnotation'];_0x495043['refresh']({'blurredAnnotation':_0x1e3e7e,'activatedAnnotation':_0x2a3603}),this['activeAnnotation']=_0x2a3603;}['attach'](_0x143d65){this['annotations']=_0x143d65;const _0x55c713=this['context']['plugins']['get'](z);if(_0x55c713['_annotations']=_0x143d65,this['isAttached'])throw new _0x5d5198('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x55c713,'set:container',()=>{this['detach'](),this['listenTo'](_0x55c713,'change:container',_0x554d78=>{_0x554d78['off'](),this['attach'](_0x143d65);});}),_0x55c713['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x225862=_0x3f4a76=>{_0x3f4a76['updateTargetRect'](),_0x55c713['addAnnotation'](_0x3f4a76);};for(const _0x498c0d of _0x143d65)_0x225862(_0x498c0d);this['listenTo'](_0x143d65,'add',(_0x3c5a06,_0x29038d)=>{_0x225862(_0x29038d);}),this['listenTo'](_0x143d65,'remove',(_0x3d04c1,_0x413523,_0x1ed076)=>{_0x55c713['rearrange']({'removedAnnotation':_0x413523,'previousAnnotation':_0x143d65['get'](_0x1ed076-0x1),'nextAnnotation':_0x143d65['get'](_0x1ed076+0x1)}),_0x413523===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x143d65,'focus',(_0x28d485,_0x206e13)=>{this['setActiveAnnotation'](_0x206e13);}),this['listenTo'](_0x143d65,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4257c3=this['context']instanceof _0x284fd0?this['context']['editors']:new _0x5d031f([this['context']]);for(const _0x4948ad of _0x4257c3)this['_integrateWithEditorAnnotations'](_0x4948ad);this['listenTo'](_0x4257c3,'add',(_0x1a05a4,_0x32da8e)=>{this['listenTo'](_0x32da8e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x32da8e);});}),this['listenTo'](_0x4257c3,'remove',(_0x2c1670,_0x1ea5ef)=>{_0x1ea5ef['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1ea5ef['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5d5198('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x36ad31=this['context']['plugins']['get'](z);_0x36ad31['_detachFromContainer'](this['annotations']),this['stopListening'](_0x36ad31),this['stopListening'](this['annotations']),this['context']instanceof _0x284fd0&&this['stopListening'](this['context']['editors']);for(const _0x37e1ae of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x37e1ae);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1648dc){if(!_0x1648dc['plugins']['has']('EditorAnnotations'))return;const _0x3364d6=_0x1648dc['plugins']['get']('EditorAnnotations'),_0x309fb9=()=>{const _0x1229d5=_0x3364d6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1229d5[0x0]||null);};this['listenTo'](_0x3364d6,'refresh',_0x309fb9),this['listenTo'](_0x3364d6,'blur',(_0xe932ca,{isAnnotationTracked:_0x1899ee})=>{this['activeAnnotation']&&_0x1899ee(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3364d6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x583750=>{_0x3364d6['hasDomSelection']()&&(_0x309fb9(),_0x583750['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3364d6);}['_destroyEditorAnnotationsIntegration'](_0x67c80b){this['stopListening'](_0x67c80b),this['_editorAnnotations']['remove'](_0x67c80b);}}class C extends _0x306a1b{['counterView'];constructor(_0x1aac85){super(_0x1aac85);const _0x167ba9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x52d7b8,_0x43493e)=>_0x52d7b8?'...':_0x43493e['toString']()),this['set']('annotationType',''),this['icon']=_0x38689e,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x167ba9['to']('annotationType',_0x176be4=>'ck-annotation-counter__badge--'+_0x176be4),_0x167ba9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x167ba9['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x253287{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c6e73){super(_0x1c6e73),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x4445b8),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5d031f(),this['_refreshPositioningDebounced']=_0x2c8b2c(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x359834(this['context']['locale']),this['balloonPanelView']=new _0x3a79a4(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x32c463){this['annotations']=_0x32c463;const _0x476f4c=this['context']['plugins']['get'](z),_0x3d453f=this['balloonPanelView'];if(_0x476f4c['_annotations']=_0x32c463,this['isAttached'])throw new _0x5d5198('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x476f4c,'set:container',()=>{this['detach'](),this['listenTo'](_0x476f4c,'change:container',_0x4a7dc9=>{_0x4a7dc9['off'](),this['attach'](_0x32c463);});}),_0x476f4c['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3c0205=_0x284e83=>{const _0x13fad0=new C(this['context']['locale']);_0x476f4c['addAnnotation'](_0x284e83,_0x13fad0),this['_annotationToNarrowView']['set'](_0x284e83,_0x13fad0),_0x13fad0['bind']('isDirty','annotationType','number')['to'](_0x284e83['view'],'isDirty','type','length'),_0x13fad0['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3d453f['content']['first']!==_0x284e83['view']?(this['_showBalloon'](_0x284e83),_0x284e83['view']['element']['focus'](),this['setActiveAnnotation'](_0x284e83)):this['setActiveAnnotation'](null);});};for(const _0x2db23d of _0x32c463)_0x3c0205(_0x2db23d);this['listenTo'](_0x32c463,'add',(_0x196996,_0x58f5a9)=>{_0x3c0205(_0x58f5a9);}),this['listenTo'](_0x32c463,'remove',(_0x4faa7e,_0x126ee8,_0xf4e444)=>{this['_annotationToNarrowView']['get'](_0x126ee8)['destroy'](),this['_annotationToNarrowView']['delete'](_0x126ee8),_0x476f4c['rearrange']({'removedAnnotation':_0x126ee8,'previousAnnotation':_0x32c463['get'](_0xf4e444-0x1),'nextAnnotation':_0x32c463['get'](_0xf4e444+0x1)}),_0x126ee8===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x32c463,'focus',(_0xcce9da,_0xa410a8)=>{this['setActiveAnnotation'](_0xa410a8);}),this['listenTo'](_0x32c463,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x56930b,_0x5b4005)=>{_0x5b4005['keyCode']===_0x5946f7['esc']&&_0x3d453f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3d453f['content']['first']),this['_hideBalloon'](),_0x5b4005['stopPropagation'](),_0x5b4005['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x4576c4,_0x29b9f4)=>{const _0x552afe=_0x29b9f4['target'];_0x3d453f['isVisible']&&_0x3d453f['element']['contains'](_0x552afe)||_0x476f4c['view']['element']['contains'](_0x552afe)||_0x4576c4['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x55c9dc=>_0x55c9dc['contains'](_0x552afe))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x46ba09=this['context']instanceof _0x284fd0?this['context']['editors']:new _0x5d031f([this['context']]);for(const _0x296acf of _0x46ba09)this['_integrateWithEditorAnnotations'](_0x296acf);this['listenTo'](_0x46ba09,'add',(_0x38a0a7,_0x25187e)=>{this['listenTo'](_0x25187e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x25187e);});}),this['listenTo'](_0x46ba09,'remove',(_0xa7bd3b,_0x22af5e)=>{_0x22af5e['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x22af5e['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3f5d8a){if(_0x3f5d8a===this['activeAnnotation'])return;const _0xbd52f0=this['context']['plugins']['get'](z);if(_0xbd52f0['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3f5d8a,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3f5d8a)_0xbd52f0['getSidebarItemView'](_0x3f5d8a)?this['_showBalloon'](_0x3f5d8a):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3f5d8a;}['detach'](){if(!this['isAttached'])throw new _0x5d5198('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1e6cb0=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x40f092=>_0x40f092['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1e6cb0['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x284fd0&&this['stopListening'](this['context']['editors']);for(const _0x1953e0 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1953e0);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'](_0x388f6e){if(!_0x388f6e['plugins']['has']('EditorAnnotations'))return;const _0x3eb6c9=_0x388f6e['plugins']['get']('EditorAnnotations'),_0x15f3bc=this['context']['plugins']['get'](z),_0x23c937=this['annotations'],_0x3644e4=this['balloonPanelView'],_0x281eda=()=>{const _0x4846c4=_0x3eb6c9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4846c4),this['setActiveAnnotation'](_0x4846c4[0x0]||null);};this['listenTo'](_0x3eb6c9,'refresh',_0x281eda),this['listenTo'](_0x3eb6c9,'blur',(_0x55f3e9,{isAnnotationTracked:_0x1a5dac})=>{this['activeAnnotation']&&_0x1a5dac(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3eb6c9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x23c937,'blur',_0x5eb52d=>{_0x3eb6c9['hasDomSelection']()&&_0x5eb52d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x59fcb2,_0x43a1c2)=>{const _0x50460b=_0x43a1c2['target'];_0x3644e4['isVisible']&&_0x3644e4['element']['contains'](_0x50460b)||_0x15f3bc['view']['element']['contains'](_0x50460b)||this['activeAnnotation']&&_0x3eb6c9['hasDomSelection']()&&(_0x281eda(),_0x59fcb2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3eb6c9);}['_destroyEditorAnnotationsIntegration'](_0x596d61){_0x596d61&&(this['stopListening'](_0x596d61),this['_editorAnnotations']['remove'](_0x596d61));}['_setSelectedAnnotations'](_0x21e2d9){for(const _0x19ca74 of this['_selectedAnnotations'])_0x21e2d9['includes'](_0x19ca74)||this['_manuallyClosedAnnotationViews']['delete'](_0x19ca74['view']);this['_selectedAnnotations']=_0x21e2d9;}['_refreshPositioning'](){const _0x3be634=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x3be634['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x354f7c){if(this['_manuallyClosedAnnotationViews']['has'](_0x354f7c['view']))return;const _0x17d29f=this['balloonPanelView']['content']['first'];_0x17d29f!==_0x354f7c['view']?(_0x17d29f&&this['_detachListeners'](_0x17d29f),this['_attachListeners'](_0x354f7c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x354f7c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x2969e9=this['balloonPanelView']['content']['first'],_0x160631=_0x2969e9&&this['annotations']['getByView'](_0x2969e9);if(!_0x160631||!this['_annotationToNarrowView']['has'](_0x160631))return;const _0x4446e4=this['_annotationToNarrowView']['get'](_0x160631)['element'],_0x4a6597=(function(){const _0x20f804=_0x3a79a4['defaultPositions'];return[_0x20f804['southArrowNorthEast'],_0x20f804['northArrowSouthEast'],_0x20f804['southArrowNorth'],_0x20f804['northArrowSouth'],_0x20f804['southArrowNorthWest'],_0x20f804['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x4446e4,'positions':_0x4a6597});}['_hideBalloon'](){const _0x2cf918=this['balloonPanelView'],_0x4f447f=_0x2cf918['content']['first'];_0x4f447f&&(this['_detachListeners'](_0x4f447f),_0x2cf918['unpin'](),_0x2cf918['content']['clear']());}['_attachListeners'](_0x118889){this['listenTo'](_0x118889,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x118889,'Esc',(_0x3fb2d0,_0x4ef42a)=>{this['_manuallyClosedAnnotationViews']['add'](_0x118889),this['_hideBalloon'](),_0x4ef42a();});}['_detachListeners'](_0xd74d56){this['stopListening'](_0xd74d56);}}class c extends _0x345605{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x4e0495,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x38289a){super(_0x38289a),_0x38289a['editing']['view']['addObserver'](_0x59c661),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x38289a['plugins']['get'](_0x4e0495),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x28cb26=this['editor']['plugins']['get'](M);_0x28cb26['context']===this['editor']&&(_0x28cb26['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1177eb,_0x5d88c2)=>{const _0x14817b=this['_balloon'];if(this['isAttached']&&_0x14817b['visibleView']){const _0x3cdbeb=this['annotations']['getByView'](_0x14817b['visibleView']);_0x3cdbeb&&this['_closeAnnotation'](_0x3cdbeb),_0x5d88c2();}}));}['afterInit'](){const _0x3f2e90=this['editor']['plugins']['get'](M);_0x3f2e90['context']===this['editor']&&(_0x3f2e90['hasActive']()||_0x3f2e90['switchTo']('inline'));}['setActiveAnnotation'](_0x1742b4){_0x1742b4!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1742b4&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1742b4)&&this['_addAnnotationToBalloon'](_0x1742b4,!0x0),_0x1742b4['isActive']=!0x0),_0x1742b4||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1742b4);}['attach'](_0xfcb189){this['annotations']=_0xfcb189;const _0x2bc343=this['editor']['plugins']['get'](M),_0xd38505=this['_balloon'];if(this['isAttached'])throw new _0x5d5198('inlineannotations-attach-already-attached',this);if(_0x2bc343['context']!==this['editor'])throw new _0x5d5198('inlineannotations-not-allowed-with-context',this);const _0x16ae21=this['editor']['plugins']['get'](P);this['listenTo'](_0x16ae21,'refresh',()=>{const _0x5a6209=_0x16ae21['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4816ae,_0x4b34f2;!this['_forceRefresh']&&(_0x4816ae=_0x5a6209,_0x4b34f2=this['_selectedAnnotations'],_0x4816ae['length']===_0x4b34f2['length']&&_0x4816ae['every'](_0x597a24=>_0x4b34f2['includes'](_0x597a24)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5a6209),this['setActiveAnnotation'](_0x5a6209[0x0]||null));}),this['listenTo'](_0x16ae21,'blur',(_0x415259,{isAnnotationTracked:_0x553193})=>{this['activeAnnotation']&&_0x553193(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x38e4f8,_0x21ed67,_0x267ac6)=>{_0x267ac6||this['setActiveAnnotation'](null);}),this['listenTo'](_0xfcb189,'remove',(_0xd1f45b,_0x533080)=>{this['_removeAnnotationFromBalloon'](_0x533080),_0x533080===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xd38505,'change:visibleView',(_0x5e428b,_0x537840,_0x342dd6,_0x3a661a)=>{_0x3a661a&&this['stopListening'](_0x3a661a);const _0x36695b=_0xfcb189['getByView'](_0x342dd6);_0x342dd6&&_0x36695b&&(this['listenTo'](_0x342dd6,'change:height',()=>{_0xd38505['updatePosition']();}),this['listenTo'](_0x342dd6,'Esc',()=>{this['_closeAnnotation'](_0x36695b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x36695b&&this['setActiveAnnotation'](_0x36695b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xd38505['visibleView']&&(_0xfcb189['getByView'](_0xd38505['visibleView'])&&_0xd38505['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 _0x5d5198('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1f17a4 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1f17a4);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2fee31){for(const _0x37a42d of this['_selectedAnnotations'])_0x2fee31['includes'](_0x37a42d)||this['_manuallyClosed']['delete'](_0x37a42d);for(const _0x4e30d9 of this['annotations'])_0x2fee31['includes'](_0x4e30d9)||this['_removeAnnotationFromBalloon'](_0x4e30d9);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5717f3 of _0x2fee31)this['_addAnnotationToBalloon'](_0x5717f3);}this['_selectedAnnotations']=_0x2fee31;}['_addAnnotationToBalloon'](_0x1fc5b7,_0xa01794=!0x1){this['_manuallyClosed']['has'](_0x1fc5b7)||(this['_addedAnnotations']['has'](_0x1fc5b7)||this['_balloon']['hasView'](_0x1fc5b7['view'])||(this['_addedAnnotations']['add'](_0x1fc5b7),this['_balloon']['add']({'stackId':_0x1fc5b7['view']['id'],'view':_0x1fc5b7['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1fc5b7)}})),_0xa01794&&this['_balloon']['showStack'](_0x1fc5b7['view']['id']));}['_getBalloonTargetForAnnotation'](_0x20138e){const _0x460736=_0x20138e['target'],_0x5c5b48=this['editor']['editing']['view'],_0x476d76=_0x5c5b48['document']['selection']['getFirstRange'](),_0x4dcbca=_0x5c5b48['domConverter']['viewRangeToDom'](_0x476d76);if(_0x4dcbca['collapse'](!0x0),_0x460736){if(_0x460736 instanceof _0x2413b8)return _0x460736;let _0x2f3556=[];for(const _0x3b8670 of _0x460736)_0x2f3556['push'](...(_0x3bf9ec=_0x3b8670['getClientRects'](),Array['from'](_0x3bf9ec)['map'](DOMRect['fromRect'])));_0x2f3556=function(_0x4cc56b){const _0x2b20e7=[];let _0x2263e0=_0x4cc56b[0x0];for(let _0x26373e=0x1;_0x26373e<_0x4cc56b['length'];_0x26373e++)B(_0x2263e0,_0x4cc56b[_0x26373e])?_0x2263e0['width']+=_0x4cc56b[_0x26373e]['width']:(_0x2b20e7['push'](_0x2263e0),_0x2263e0=_0x4cc56b[_0x26373e]);return _0x2b20e7['push'](_0x2263e0),_0x2b20e7;}(_0x2f3556);const _0x5400a9=_0x4dcbca['getBoundingClientRect']();return _0x2f3556['find'](_0x5cc7df=>_0x5cc7df['top']<=_0x5400a9['top']&&_0x5cc7df['bottom']>=_0x5400a9['bottom']&&_0x5cc7df['left']<=_0x5400a9['left']&&_0x5cc7df['right']>=_0x5400a9['right'])||_0x2f3556[0x0];}var _0x3bf9ec;return _0x20138e['targetRect']||_0x4dcbca;}['_removeAnnotationFromBalloon'](_0x43371d){this['_addedAnnotations']['has'](_0x43371d)&&this['_balloon']['hasView'](_0x43371d['view'])&&(this['_addedAnnotations']['delete'](_0x43371d),this['_balloon']['remove'](_0x43371d['view']));}['_closeAnnotation'](_0x1b9f93){this['_manuallyClosed']['add'](_0x1b9f93),this['_removeAnnotationFromBalloon'](_0x1b9f93);}}function B(_0x2cd9b8,_0x2a941f){return _0x2cd9b8['top']===_0x2a941f['top']&&_0x2cd9b8['bottom']===_0x2a941f['bottom']&&_0x2cd9b8['right']===_0x2a941f['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x11d62e,_0x174de7){super(_0x11d62e),this['set']('isEmpty',!_0x174de7['length']),this['focusTracker']=new _0x19f40a(),this['_annotationViews']=_0x174de7,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2d6288({'focusables':_0x174de7,'focusTracker':this['focusTracker']}),this['listenTo'](_0x174de7,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x174de7,'remove',(_0x48b2c8,_0x3af679)=>{_0x3af679['isActive']&&this['focus'](),_0x174de7['length']||(this['isEmpty']=!0x0);});const _0x309b1d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x11d62e,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x174de7},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x309b1d['if']('isEmpty','ck-hidden',_0x3ac900=>!_0x3ac900)]},'children':[{'text':E(_0x11d62e,'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 _0x379f9b of this['_annotationViews'])this['focusTracker']['add'](_0x379f9b['element']);this['_annotationViews']['on']('change',(_0x1912ed,{added:_0x588ade,removed:_0x166e91})=>{for(const _0x5c6ebd of _0x588ade)this['focusTracker']['add'](_0x5c6ebd['element']);for(const _0x53ee44 of _0x166e91)this['focusTracker']['remove'](_0x53ee44['element']);});}}class f extends _0x253287{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x23ae56){super(_0x23ae56),this['archivedThreads']=new _0x5d031f();}['init'](){const _0x25b944=this['context'],_0x5c1b17=_0x25b944['plugins']['get'](o),_0x28ca4b=_0x25b944['plugins']['get'](O);this['listenTo'](_0x5c1b17,'addCommentThread',(_0x1a443d,{threadId:_0x520629})=>{const _0x5eeea3=_0x5c1b17['getCommentThread'](_0x520629);_0x5eeea3['archivedAt']&&this['archivedThreads']['add'](_0x5eeea3,this['_calculatePosition'](_0x5eeea3['archivedAt'])),this['listenTo'](_0x5eeea3,'change:archivedAt',(_0x3d8c20,_0x1000c0,_0x15783e)=>{_0x15783e?this['archivedThreads']['has'](_0x5eeea3)||this['archivedThreads']['add'](_0x5eeea3,this['_calculatePosition'](_0x5eeea3['archivedAt'])):this['archivedThreads']['has'](_0x5eeea3)&&this['archivedThreads']['remove'](_0x5eeea3);});}),this['listenTo'](_0x5c1b17,'removeCommentThread',(_0x54ebf4,{threadId:_0x514693})=>{const _0xc80671=_0x5c1b17['getCommentThread'](_0x514693);this['stopListening'](_0xc80671),this['archivedThreads']['has'](_0xc80671)&&this['archivedThreads']['remove'](_0xc80671);},{'priority':'highest'}),this['listenTo'](_0x28ca4b['collection'],'focus',(_0x5a1655,_0x353529)=>{_0x353529['isVisible']||(_0x353529['isActive']=!0x0,_0x28ca4b['activate'](_0x353529));});}['_calculatePosition'](_0x469af1){const _0x10f886=[...this['archivedThreads']]['findIndex'](_0x2f09fa=>_0x2f09fa['archivedAt']<_0x469af1);return _0x10f886>-0x1?_0x10f886:this['archivedThreads']['length'];}}class a extends _0x345605{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x1d5c18];}constructor(_0x502223){super(_0x502223),this['annotationViews']=new _0x2598eb(),this['_pendingThreads']=[];}['init'](){const _0xc34df5=this['editor'],_0x50a296=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xc34df5['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x306a1b,!0x0)),_0xc34df5['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4f44bf=this['_createCommentsArchiveButton'](_0x24a797);return _0x4f44bf['set']({'role':'menuitemcheckbox'}),_0x4f44bf;});const _0x3aa77b=_0xc34df5['plugins']['get'](f),_0x2fd2c1=_0xc34df5['plugins']['get']('Annotations'),_0x2c2d54=_0xc34df5['plugins']['get']('CommentsRepository');_0x3aa77b['archivedThreads']['forEach'](_0x3373c4=>{this['_handleNewThread'](_0x3373c4);}),this['listenTo'](_0x3aa77b['archivedThreads'],'add',(_0x8bae11,_0x2a72ed)=>{this['_handleNewThread'](_0x2a72ed);}),this['listenTo'](_0x2fd2c1['collection'],'add',(_0x474f31,_0x5b9155)=>{const _0x47b766=this['_pendingThreads']['find'](_0x3d13df=>{const _0x26a209=_0x2c2d54['_threadToController']['get'](_0x3d13df);return _0x26a209&&_0x5b9155['innerView']===_0x26a209['view'];});if(_0x47b766){const _0x104238=this['_calculatePosition'](_0x47b766['archivedAt']);this['annotationViews']['add'](_0x5b9155['view'],_0x104238),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x47b766),0x1);}}),this['listenTo'](_0x3aa77b['archivedThreads'],'remove',(_0x38a7b1,_0x4131ce)=>{const _0x2177f1=_0xc34df5['config']['get']('collaboration.channelId');if(!_0x2177f1||_0x4131ce['channelId']===_0x2177f1){if(this['_pendingThreads']['includes'](_0x4131ce))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4131ce),0x1);else{const _0x52dc19=_0x2c2d54['_threadToController']['get'](_0x4131ce),_0x357989=_0x2fd2c1['getByInnerView'](_0x52dc19['view']);this['annotationViews']['remove'](_0x357989['view']),this['stopListening'](_0x357989['focusableElements']);}}}),this['listenTo'](_0x2fd2c1['collection'],'add',(_0x13e899,_0x3e52bf)=>{this['listenTo'](_0x3e52bf,'escape',_0x50a296);}),this['listenTo'](_0x2fd2c1['collection'],'remove',(_0x56ab0d,_0x5b1015)=>{this['stopListening'](_0x5b1015,'escape',_0x50a296);});}['_handleNewThread'](_0x2f1cf5){const _0x22f2d7=this['editor']['plugins']['get']('CommentsRepository'),_0x5a005d=this['editor']['plugins']['get']('Annotations'),_0x25ce6d=this['editor']['config']['get']('collaboration.channelId');if(!_0x25ce6d||_0x2f1cf5['channelId']===_0x25ce6d){const _0x7ce31d=_0x22f2d7['_threadToController']['get'](_0x2f1cf5);if(!_0x7ce31d)return void this['_pendingThreads']['push'](_0x2f1cf5);const _0x5e2d4d=this['_calculatePosition'](_0x2f1cf5['archivedAt']),_0x31f3a5=_0x5a005d['getByInnerView'](_0x7ce31d['view']);_0x31f3a5['isVisible']&&_0x5a005d['_visibleAnnotations']['remove'](_0x31f3a5),this['annotationViews']['add'](_0x31f3a5['view'],_0x5e2d4d);}}['_calculatePosition'](_0x5e94bf){const _0x446dc9=this['editor']['config']['get']('collaboration.channelId'),_0x2c54c3=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x178378=>_0x178378['channelId']===_0x446dc9)['findIndex'](_0x2ecd4a=>_0x2ecd4a['archivedAt']<_0x5e94bf);return _0x2c54c3<0x0||_0x2c54c3>this['annotationViews']['length']?this['annotationViews']['length']:_0x2c54c3-0x1;}['_toggleDialog'](){const _0x13f1ed=this['editor'],_0x46a34d=_0x13f1ed['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x13f1ed['locale'],this['annotationViews'])),'commentsArchive'===_0x46a34d['id']?_0x46a34d['hide']():_0x46a34d['show']({'id':'commentsArchive','title':E(_0x13f1ed['locale'],'COMMENTS_ARCHIVE'),'icon':_0x45a11f,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x32d1cc['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x3eec66,_0x1b578f=!0x1){const _0xe3fef3=this['editor']['locale'],_0x4dff52=this['editor']['plugins']['get']('Dialog'),_0x2f7c65=new _0x3eec66(_0xe3fef3);return _0x2f7c65['bind']('isEnabled')['to'](this,'isEnabled'),_0x2f7c65['bind']('isOn')['to'](_0x4dff52,'id',_0x3814e7=>'commentsArchive'===_0x3814e7),_0x2f7c65['set']({'label':E(_0xe3fef3,'COMMENTS_ARCHIVE'),'icon':_0x45a11f,'isToggleable':!0x0}),_0x1b578f&&(_0x2f7c65['tooltip']=!0x0),this['listenTo'](_0x2f7c65,'execute',()=>this['_toggleDialog']()),_0x2f7c65;}['_hideDialogOnAnnotationEscape']=_0x3432c7=>{const _0x3b4f33=_0x3432c7['source'];if(!this['annotationViews']['has'](_0x3b4f33['view']))return;const _0xff260b=this['editor']['plugins']['get']('Dialog');_0xff260b['isOpen']&&'commentsArchive'===_0xff260b['id']&&(_0xff260b['hide'](),_0x3432c7['stop']());};}class p extends _0x345605{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|