@ckeditor/ckeditor5-comments 48.0.1-alpha.0 → 48.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -11
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>kt)());constructor(_0x38f89e={}){function _0x1b6aa1(_0x41362c){return _0x41362c['map'](_0x41c4e2=>String['fromCharCode'](_0x41c4e2))['join']('');}(_0x38f89e=Object['assign']({},_0x38f89e))['plugins']||(_0x38f89e['plugins']=Ot['defaultPlugins']),super(_0x38f89e),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x1b6aa1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1b6aa1([0x76,0x69,0x65,0x77])][_0x1b6aa1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1b6aa1([0x61,0x75,0x74,0x6f]),this[_0x1b6aa1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1b6aa1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1b6aa1([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1b6aa1([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1b6aa1([0x6f,0x6b])});}['create'](){const _0x208c9e=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x208c9e))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x301b36=>{const _0x55d99e=this['model']['document']['getRoot'](),_0x22471b=_0x55d99e&&_0x55d99e['getChild'](_0x55d99e['childCount']-0x1);_0x301b36['setSelection'](_0x22471b,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x4dfa0b=this['editing']['view'],_0x1c1035=_0x4dfa0b['document']['getRoot'](),_0x3c987b=_0x1c1035['getChild'](0x0);_0x1c1035['childCount']>0x1||!_0x3c987b||'p'!=_0x3c987b['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x4dfa0b,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3c987b['placeholder']=this['placeholder']),ut({'view':_0x4dfa0b,'element':_0x3c987b,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3c987b);}}class Mt extends _0x719be3{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3f1dea,_0xf255c5={}){super(_0x3f1dea),this['editor']=null,this['_editorConfig']=_0xf255c5,this['set']('value',_0xf255c5['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x3f1dea,'Reply...')),this['set']('submitLabel',bt(_0x3f1dea,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x212e53(),this['focusTracker']=new _0x340c23(),this['focusCycler']=new _0x567dee({'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',(_0x3ca5ef,_0x3782b6)=>{this['cancelButtonView']['fire']('execute'),_0x3782b6();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5357c1,_0x5e29cf)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5e29cf());}),this['on']('submit',(_0x2d0b0e,_0xea5a00)=>{_0xea5a00['length']>0xfde8?(alert(bt(_0x3f1dea,'TOO_LONG_COMMENT_ALERT',[_0xea5a00['length'],0xfde8])),_0x2d0b0e['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1cbebf=this['editor'];this['element']['insertBefore'](_0x1cbebf['ui']['element'],this['element']['firstChild']),_0x1cbebf['model']['document']['on']('change',()=>this['value']=_0x1cbebf['getData']()),_0x1cbebf['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1cbebf['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x39abc8){-0x1===_0x39abc8?(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:_0x3ece0e}=this,_0x25c17b=new _0x542a2(_0x3ece0e);return _0x25c17b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x25c17b['withText']=!0x0,_0x25c17b['bind']('label')['to'](this,'submitLabel'),_0x25c17b['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x25c17b['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2c36ca,_0x1539a6)=>!_0x1539a6&&!!_0x2c36ca['trim']()),_0x25c17b;}['_createCancelButton'](){const {locale:_0x590e75}=this,_0x11f472=new _0x542a2(_0x590e75);return _0x11f472['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x11f472['label']=bt(_0x590e75,'Cancel'),_0x11f472['withText']=!0x0,_0x11f472['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x11f472;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x44a8d8=>{this['focusTracker']['add'](_0x44a8d8['element']);}),this['focusables']['on']('change',(_0x17afd7,_0x4ba833)=>{for(const _0x191580 of Array['from'](_0x4ba833['added'])['reverse']())this['focusTracker']['add'](_0x191580['element']);});}}class Rt extends _0x719be3{constructor(_0x14323a,_0x6878b5,_0x10c850){super(_0x14323a),this['commentInputView']=new Mt(_0x14323a,_0x10c850),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1d7b2e,_0x35752b)=>_0x1d7b2e||!!_0x35752b),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 _0x348ff9(_0x14323a,_0x6878b5),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'](_0x52ea47){this['commentInputView']['focus'](_0x52ea47);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2806cd,_0x202662)=>{const {submitButtonView:_0x1cf8f2,cancelButtonView:_0x26bb70,editor:_0x15f5db}=this['commentInputView'];[_0x1cf8f2['element'],_0x26bb70['element'],_0x15f5db?_0x15f5db['editing']['view']['getDomRoot']():null]['filter'](_0x538633=>_0x538633)['some'](_0x32c469=>_0x32c469['contains'](_0x202662['target']))||(this['focus'](),_0x202662['preventDefault']());});}}class xt extends _0x719be3{constructor(_0x338f82){super(_0x338f82);const _0x345c6d=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x345c6d['to']('count',_0x5837cb=>bt(_0x338f82,'NUMBER_OF_COMMENTS',_0x5837cb))}]});}}class St extends _0x719be3{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x585da9,_0x5c714b,_0x60caa0){super(_0x585da9);const _0x1e9a82=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5c714b['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5c714b,this['_config']=_0x60caa0,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x340c23(),this['keystrokes']=new _0x212e53(),this['focusCycler']=new _0x567dee({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2d037d=>this['commentViews']['map'](_0x27cf39=>_0x27cf39['element'])['includes'](_0x2d037d['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x585da9),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xa1df93=>_0xa1df93-this['_config']['maxCommentsWhenCollapsed']);for(const _0x3c4a4c of _0x5c714b['comments'])this['_handleNewCommentModel'](_0x3c4a4c);this['_handleInfoComment'](),this['listenTo'](_0x5c714b['comments'],'add',(_0x265de4,_0x35355b)=>{const _0xd982cf=this['_calculatePosition'](_0x35355b);this['length']++,this['_handleNewCommentModel'](_0x35355b,_0xd982cf),this['refreshVisibleViews']();}),this['listenTo'](_0x5c714b['comments'],'remove',(_0x551822,_0x421876)=>{this['length']--,this['_handleRemoveCommentModel'](_0x421876),this['refreshVisibleViews']();}),this['listenTo'](_0x5c714b,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5c714b,'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',_0x1e9a82['if']('length','ck-hidden',_0x2a448a=>!_0x2a448a)],'aria-label':bt(_0x585da9,'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'](_0x371a06){-0x1===_0x371a06?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4e69f9 of this['commentViews'])_0x4e69f9['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3fe51e,_0x27014e){const _0x352d26=new this['_config']['CommentView'](this['locale'],_0x3fe51e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x352d26['viewUid']=_0x3fe51e['id'],_0x352d26['delegate']('removeComment')['to'](this),_0x352d26['delegate']('updateComment')['to'](this),_0x352d26['delegate']('resolveCommentThread')['to'](this),_0x352d26['delegate']('editorReady')['to'](this),_0x352d26['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x352d26,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x352d26,_0x27014e);}['_calculatePosition'](_0x3f0e2f){const _0x31b7e3=this['_model']['_findOptimalIndex'](_0x3f0e2f);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3f0e2f['authoredAt']?_0x31b7e3-0x1:_0x31b7e3:_0x31b7e3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x54e242={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x54e242,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x54e242));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x6d02e){const _0x386deb=this['commentViews']['remove'](_0x6d02e['id']);this['stopListening'](_0x386deb),_0x386deb['isEditMode']&&this['_updateHasDirtyComment'](),_0x386deb['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1b632e=>_0x1b632e['isEditMode']);}['_rearrangeCollapse'](){const _0x486b3f=function(_0x130f26){const _0x10f375=new _0x2ed34f();for(const _0x3d205e of _0x130f26)_0x10f375['add'](_0x3d205e);return _0x10f375;}(this['commentViews']),_0x2f2c49=this['_collapsedCommentsView']['count'];for(let _0x22c053=0x1;_0x22c053<=_0x2f2c49;_0x22c053++)_0x486b3f['remove'](0x1);for(const _0x37abcc of _0x486b3f)_0x37abcc['collapse']();_0x2f2c49>0x0&&_0x486b3f['add'](this['_collapsedCommentsView'],0x1),Pt(_0x32dd70(Array['from'](this['visibleViews']),Array['from'](_0x486b3f)),this['visibleViews'],_0x486b3f);}['_rearrangeExpand'](){Pt(_0x32dd70(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x193253 of this['visibleViews'])_0x193253['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5d0b3c=>{this['focusTracker']['add'](_0x5d0b3c['element']),this['keystrokes']['listenTo'](_0x5d0b3c['element']);}),this['commentViews']['on']('change',(_0xd4865,_0x5c7ce5)=>{for(const _0x104189 of _0x5c7ce5['removed'])this['focusTracker']['remove'](_0x104189['element']),this['keystrokes']['stopListening'](_0x104189['element']);for(const _0x2cf1d7 of Array['from'](_0x5c7ce5['added'])['reverse']())this['focusTracker']['add'](_0x2cf1d7['element']),this['keystrokes']['listenTo'](_0x2cf1d7['element']);});}}function Pt(_0x2cd5d6,_0x56cf37,_0x6ad570){let _0x452f0f=0x0;for(const _0x22c0e9 of _0x2cd5d6)switch(_0x22c0e9){case'insert':_0x56cf37['add'](_0x6ad570['get'](_0x452f0f),_0x452f0f),_0x452f0f++;break;case'delete':_0x56cf37['remove'](_0x452f0f);break;case'equal':_0x452f0f++;}}class Lt extends _0x719be3{constructor(_0x39318f){super(_0x39318f);const _0x58ffc1=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x58ffc1['to']('contextValue',_0x3aec2b=>bt(_0x39318f,'THREAD_CONTEXT_LABEL',_0x3aec2b)),'tabindex':-0x1},'children':[{'text':_0x58ffc1['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x719be3{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5a8269,_0x241aaa){super(_0x5a8269);const _0x273f9c=this['bindTemplate'];this['_model']=_0x241aaa,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x340c23(),this['keystrokes']=new _0x212e53(),this['focusCycler']=new _0x567dee({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3c88ef=>!!_0x3c88ef),this['bind']('contextValue')['to'](this['_model'],'context',_0xa5b576=>_0xa5b576&&_0xa5b576['value']?this['_trimContextValue'](_0xa5b576['value']):bt(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',_0x273f9c['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 _0x3a2024=new _0x542a2(this['locale']);return _0x3a2024['label']=bt(this['locale'],'Reopen'),_0x3a2024['tooltip']=bt(this['locale'],'Reopen'),_0x3a2024['icon']=_0x216496,_0x3a2024['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x48a90f=>!_0x48a90f),_0x3a2024['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x51de7e,_0x52c74e)=>_0x51de7e&&_0x52c74e),_0x3a2024['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3a2024;}['_trimContextValue'](_0x30f888){if(_0x30f888['length']<0x96)return _0x30f888;const _0x2a1b40=_0x30f888['lastIndexOf']('\x20',0x93);return _0x30f888['substring'](0x0,_0x2a1b40>-0x1?_0x2a1b40:0x93)+'...';}['_attachContextActions'](){const _0x346b4c=this['element']['querySelector']('.ck-context'),_0x4383dd=_0x346b4c['querySelector']('.ck-context__value');this['listenTo'](_0x346b4c,'mouseenter',()=>{_0x4383dd['offsetWidth']<_0x4383dd['scrollWidth']&&_0x346b4c['classList']['add']('overlay');}),this['listenTo'](_0x346b4c,'mouseleave',()=>{_0x346b4c['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x1e7337 of this['focusables'])this['focusTracker']['add'](_0x1e7337['element']),this['keystrokes']['listenTo'](_0x1e7337['element']);}['_createContextView'](){const _0x379bcb=new Lt(this['locale']);return _0x379bcb['bind']('contextValue')['to'](this),_0x379bcb;}}class Vt extends _0x719be3{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x411822,_0x58ab18,_0x1950b6,_0x2df51c){super(_0x411822),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x58ab18,this['_localUser']=_0x1950b6,this['_config']=_0x2df51c,this['commentThreadHeaderView']=new Dt(_0x411822,_0x58ab18),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x1f142b(_0x411822,bt(_0x411822,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x411822,_0x58ab18,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2df51c)),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',(_0x467860,_0x54f28d)=>_0x467860||!!_0x54f28d),this['bind']('isUnlinked')['to'](_0x58ab18,'unlinkedAt',_0x4e8014=>!!_0x4e8014),this['bind']('ariaLabel')['to'](this,'length',_0x50a740=>{const _0x4bfb05=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x50a740,_0x4bfb05]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x340c23(),this['keystrokes']=new _0x212e53(),this['focusCycler']=new _0x567dee({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x480629=>_0x480629['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x4af483(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x24e7eb=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x96ffd7=_0x24e7eb['commentInputView'];return _0x24e7eb['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x96ffd7,'value',(_0x47a2c1,_0x4f3171,_0x3585bd,_0x3f9246,_0x5cbc9b)=>!!_0x5cbc9b||!!_0x3f9246&&_0x3585bd&&!_0x4f3171||_0x47a2c1&&_0x3585bd&&!_0x4f3171),_0x96ffd7['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2ee940,_0x2c6598,_0xd79c38)=>{let _0xb6184c;return _0xb6184c=_0xd79c38&&_0x2c6598?'Reply\x20to\x20reopen\x20discussion...':_0x2ee940?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0xb6184c);}),_0x96ffd7['bind']('submitLabel')['to'](this,'length',_0x17a156=>bt(this['locale'],_0x17a156?'Reply':'Comment')),_0x96ffd7['on']('submit',(_0x549dbe,_0x58628c)=>{this['fire']('addComment',_0x58628c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x96ffd7['on']('cancel',()=>{this['focus']();}),_0x96ffd7['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x96ffd7['on']('cancel',_0x4aa006=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4aa006['stop']());}),this['on']('change:isActive',(_0x51ca4a,_0x584398,_0x536600)=>{_0x536600||this['length']||_0x96ffd7['value']||this['fire']('removeCommentThread');}),_0x24e7eb;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x5d3602(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3e8081,target:_0x589980,type:_0x2e7eef,isVisible:_0x6d5d1c=!0x0}){super(),this['view']=_0x3e8081,this['view']['element']||this['view']['render'](),this['_type']=_0x2e7eef,this['_target']=_0x589980,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2ed34f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x191c7d,_0x5a376a)=>{this['view']['focusTracker']['add'](_0x5a376a);}),this['focusableElements']['on']('remove',(_0x41280a,_0x1419aa)=>{this['view']['focusTracker']['remove'](_0x1419aa);}),this['set']('isVisible',_0x6d5d1c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x10e464=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x10e464),_0x10e464;}get['targetRect'](){const _0x157b8e=this['target'];if(null===_0x157b8e)return null;if(_0x157b8e instanceof _0x1a3832)return _0x157b8e;const _0x123637=_0x157b8e['filter'](_0x2b11df=>function(_0x155571){const _0x10164f=_0x155571['offsetParent'];if(_0x10164f)return!0x0;const _0x4cc023=_0x155571['getClientRects']()['item'](0x0);return!!_0x4cc023;}(_0x2b11df));return 0x0===_0x123637['length']?null:_0x1a3832['getDomElementRects'](_0x123637[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x11b70a){this['view']['isActive']=_0x11b70a,this['view']['mainView']['isActive']=_0x11b70a;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4e2d14){if(!(null===_0x4e2d14||_0x4e2d14 instanceof _0x1a3832||Array['isArray'](_0x4e2d14)&&_0x4e2d14['every'](_0x1488d2=>Gt(_0x1488d2))))throw new _0x36d19a('annotation-invalid-target',null,{'target':_0x4e2d14});}['_getNormalizedTarget'](){const _0x37be8b='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x37be8b)?[_0x37be8b]:_0x37be8b;}}function Gt(_0x53b8f8){return null!==_0x53b8f8&&'object'==typeof _0x53b8f8&&'nodeType'in _0x53b8f8&&0x1===_0x53b8f8['nodeType'];}class jt extends _0x2ed34f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x45ad09=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x340c23(),this['_focusTracker']['on']('change:isFocused',(_0x5ed13b,_0x133917,_0x566d76)=>{_0x566d76||this['fire']('blur');});for(const _0x337e53 of _0x45ad09)this['add'](_0x337e53);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x270358){if(this['has'](_0x270358))throw new _0x36d19a('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x270358['innerView'],_0x270358),this['_viewToAnnotation']['set'](_0x270358['view'],_0x270358);for(const _0x1d2dd4 of _0x270358['focusableElements'])this['_focusTracker']['add'](_0x1d2dd4);this['listenTo'](_0x270358['focusableElements'],'add',(_0x389ac7,_0x38bf1b)=>{this['_focusTracker']['add'](_0x38bf1b);}),this['listenTo'](_0x270358['focusableElements'],'remove',(_0x422ecc,_0x471a58)=>{this['_focusTracker']['remove'](_0x471a58);}),this['listenTo'](_0x270358['view']['focusTracker'],'change:isFocused',(_0x372e7f,_0x5c116e,_0x410a15)=>{_0x410a15&&this['fire']('focus',_0x270358);}),_0x270358['updateTargetRect']();const _0x311136=this['_getOrderInContent'](_0x270358['view']['targetRect']);return super['add'](_0x270358,_0x311136);}['remove'](_0x47e93c){if(!this['has'](_0x47e93c))throw new _0x36d19a('annotationcollection-not-existing-item',null);this['stopListening'](_0x47e93c['view']['focusTracker']),this['stopListening'](_0x47e93c['focusableElements']);for(const _0x3347b5 of _0x47e93c['focusableElements'])this['_focusTracker']['remove'](_0x3347b5);return this['_viewToAnnotation']['delete'](_0x47e93c['view']),this['_innerViewToAnnotation']['delete'](_0x47e93c['innerView']),super['remove'](_0x47e93c);}['getByInnerView'](_0x45c49){return this['_innerViewToAnnotation']['get'](_0x45c49);}['getByView'](_0x11a607){return this['_viewToAnnotation']['get'](_0x11a607);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x387654 of this)_0x387654['updateTargetRect']();this['_sort']();}['_sort'](){const _0x55df7c=Array['from'](this)['sort']((_0x1c0067,_0x3e69de)=>qt(_0x1c0067['view']['targetRect'],_0x3e69de['view']['targetRect']));for(let _0x4eaa56=_0x55df7c['length']-0x1;_0x4eaa56>0x0;_0x4eaa56--){const _0x1af353=_0x55df7c[_0x4eaa56];_0x4eaa56!==this['getIndex'](_0x1af353)&&(this['remove'](_0x1af353),this['add'](_0x1af353));}}['_getOrderInContent'](_0x521b6e){let _0x38ebc5=0x0;if(!_0x521b6e)return this['length'];for(const _0x43edc6 of this){const _0x5e04f3=_0x43edc6['view']['targetRect'];if(_0x5e04f3){if(qt(_0x521b6e,_0x5e04f3)<0x0)return _0x38ebc5;_0x38ebc5++;}}return _0x38ebc5;}}function Xt({source:_0x51f014,target:_0x2c966e,filter:_0x9464d}){for(const _0x454cea of _0x51f014)_0x9464d(_0x454cea)&&_0x2c966e['add'](_0x454cea);_0x2c966e['listenTo'](_0x51f014,'add',(_0x5d52dd,_0x21fb15)=>{_0x9464d(_0x21fb15)&&_0x2c966e['add'](_0x21fb15);}),_0x2c966e['listenTo'](_0x51f014,'remove',(_0x3a2efa,_0x5738d8)=>{_0x2c966e['has'](_0x5738d8)&&_0x2c966e['remove'](_0x5738d8);});}function qt(_0x4300dd,_0x16da6b){if(null===_0x4300dd&&null===_0x16da6b)return 0x0;if(null===_0x4300dd)return-0x1;if(null===_0x16da6b)return 0x1;const _0x5891ec=_0x4300dd['top']-_0x16da6b['top'];return 0x0==_0x5891ec?_0x4300dd['left']-_0x16da6b['left']:_0x5891ec;}class $t extends _0x3d766a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4110aa){if(super(_0x4110aa),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4110aa instanceof _0x3bb28c){const _0x54b614=_0x4110aa['locale'];_0x4110aa['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x45fb4b){this['collection']['add'](_0x45fb4b);}['remove'](_0x22eb40){this['collection']['remove'](_0x22eb40),_0x22eb40['destroy']();}['refreshVisibility'](){for(const _0x5257d3 of this['collection'])_0x5257d3['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3348bd){return this['collection']['getByInnerView'](_0x3348bd);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x28bf95 of this['collection'])_0x28bf95['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x20be98){this['fire']('_activateAnnotation',_0x20be98);}['createAnnotation'](_0x281a0f){return new Yt(_0x281a0f);}['createAnnotationView'](_0x1e39eb,_0x4a338c){return new Kt(_0x1e39eb,_0x4a338c);}['_addActiveAnnotation'](_0x30bdf9){const _0x1b1e3c=new Set(this['activeAnnotations']);_0x1b1e3c['add'](_0x30bdf9),this['activeAnnotations']=_0x1b1e3c;}['_removeActiveAnnotation'](_0x33cf7a){const _0x2e82e6=new Set(this['activeAnnotations']);_0x2e82e6['delete'](_0x33cf7a),this['activeAnnotations']=_0x2e82e6;}['_bindAnnotationsToVisibleAnnotations'](){const _0x572cb0=this['collection'],_0x31f23f=this['_visibleAnnotations'];function _0x3be762(_0x337a95){const _0x4dd796=_0x337a95['source'];_0x4dd796['isVisible']&&!_0x31f23f['has'](_0x4dd796)?_0x31f23f['add'](_0x4dd796):!_0x4dd796['isVisible']&&_0x31f23f['has'](_0x4dd796)&&_0x31f23f['remove'](_0x4dd796),_0x4dd796['view']['focusTracker']['remove'](_0x4dd796['view']['element']),_0x4dd796['view']['focusTracker']['add'](_0x4dd796['view']['element']);}this['listenTo'](_0x572cb0,'add',(_0x7c6ed7,_0x324c76)=>{_0x324c76['isVisible']&&_0x31f23f['add'](_0x324c76),this['listenTo'](_0x324c76,'change:isVisible',_0x3be762);}),this['listenTo'](_0x572cb0,'remove',(_0xa11440,_0x5c4075)=>{_0x31f23f['has'](_0x5c4075)&&_0x31f23f['remove'](_0x5c4075),this['stopListening'](_0x5c4075,'change:isVisible',_0x3be762);});}['_setupEnterAnnotationKeystroke'](){const _0x1bad99=_0x1dc0e3=>{_0x1dc0e3['on']('ready',()=>{_0x1dc0e3['keystrokes']['set'](_0x46e7bf,(_0x2e6f4a,_0x4dc92b)=>{const _0x42ed8e=_0x2ca59a(this['activeAnnotations']['values']());_0x42ed8e&&(_0x42ed8e['view']['focus'](),_0x4dc92b());});});};this['context']instanceof _0x3bb28c?_0x1bad99(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1db877,_0x3aa080)=>{_0x1bad99(_0x3aa080);});}['_setupEscapeAnnotationHandling'](){const _0x348d21=_0x4eb17f=>{const _0x3714a9=_0x4eb17f['source'],_0x9c3b1b=[];let _0x42a925;if(Array['isArray'](_0x3714a9['target'])){_0x42a925=_0x3714a9['target'][0x0],this['context']instanceof _0x3bb28c?_0x9c3b1b['push'](this['context']):this['context']['editors']&&_0x9c3b1b['push'](...this['context']['editors']);for(const _0x57cedd of _0x9c3b1b)for(const _0x2daace of _0x57cedd['editing']['view']['domRoots']['values']())if(_0x2daace['contains'](_0x42a925))return void _0x57cedd['editing']['view']['focus']();_0x42a925['focus']();}};this['listenTo'](this['collection'],'add',(_0x15aae8,_0x426a07)=>{this['listenTo'](_0x426a07,'escape',_0x348d21,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x38b7e7,_0x488ade)=>{this['stopListening'](_0x488ade,'escape',_0x348d21);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x3d766a{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x582bd3,_0xdd578];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdd5e6c){super(_0xdd5e6c),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x18a0e8=this['context']['config'];_0x18a0e8['define']('comments.maxCommentsWhenCollapsed',0x2),_0x18a0e8['define']('comments.maxThreadTotalWeight',0x1f4),_0x18a0e8['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x18a0e8['define']('comments.CommentThreadView',Bt),_0x18a0e8['define']('comments.CommentView',Ut),_0x18a0e8['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5e7f2f=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2bb979,_0x38b36e)=>this['_addCommentThread'](_0x38b36e)),this['on']('submitCommentThread',(_0x1b0342,_0xb03c00)=>this['_submitCommentThread'](_0xb03c00)),this['on']('resolveCommentThread',(_0x375605,_0x4aad21)=>this['_resolveCommentThread'](_0x4aad21)),this['on']('resolveCommentThread',(_0x448582,_0x5e3fcc)=>this['_updateActiveAnnotation'](_0x5e3fcc),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3b4daf,_0x36dd5b)=>this['_reopenCommentThread'](_0x36dd5b)),this['on']('reopenCommentThread',(_0x229183,_0x537ec7)=>this['_updateActiveAnnotation'](_0x537ec7),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5739ce,_0x40f9c3)=>this['_removeCommentThread'](_0x40f9c3)),this['on']('updateCommentThread',(_0x264add,_0x59fde9)=>this['_updateCommentThread'](_0x59fde9)),this['on']('updateCommentThread',(_0x541057,_0x327c9d)=>this['_updateActiveAnnotation'](_0x327c9d),{'priority':'lowest'}),this['on']('addComment',(_0x20c39a,_0x4a0c44)=>this['_addComment'](_0x4a0c44)),this['on']('updateComment',(_0x2ecf7b,_0x16cb4a)=>this['_updateComment'](_0x16cb4a)),this['on']('removeComment',(_0x39594c,_0x588e4a)=>this['_removeComment'](_0x588e4a)),this['on']('addComment',(_0x15f26c,{threadId:_0x5d0b8a,isFromAdapter:_0x2b7430})=>{if(_0x2b7430)return;const _0x17a182=this['getCommentThread'](_0x5d0b8a),_0xb0fd02=_0x17a182&&this['_threadToController']['get'](_0x17a182);_0xb0fd02&&_0xb0fd02['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5e7f2f,'change:activeAnnotations',(_0x41ad0d,_0x198332,_0x1516f2)=>{const _0x2cb850=Array['from'](_0x1516f2)['map'](_0x498310=>this['_viewToController']['get'](_0x498310['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x2cb850?_0x2cb850['model']:null;});}set['adapter'](_0x2de291){if(this['_adapter'])throw new _0x36d19a('commentsrepository-adapter-already-set');this['_adapter']=_0x2de291;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x216d50=zt,threadId:_0x57ec34=_0x17d94f(),comments:_0x26aa3b=[],unlinkedAt:_0xafa559=null,resolvedAt:_0xacd504=null,resolvedBy:_0x52fbc9=null,target:_0x3c13c5=null,context:_0x264a0f=null,attributes:_0x483911={},isResolvable:_0x44c53c=!0x0,isSubmitted:_0x429c33=!0x1,isFromAdapter:_0x47413c=!0x1}={}){return this['fire'](ii('addCommentThread',_0x216d50),{'channelId':_0x216d50,'threadId':_0x57ec34,'comments':_0x26aa3b,'unlinkedAt':_0xafa559,'resolvedAt':_0xacd504,'resolvedBy':_0x52fbc9,'target':_0x3c13c5,'context':_0x264a0f,'attributes':_0x483911,'isFromAdapter':_0x47413c,'isResolvable':_0x44c53c,'isSubmitted':_0x429c33}),this['getCommentThread'](_0x57ec34);}['openNewCommentThread']({channelId:_0x7de5a6=zt,threadId:_0x5ce34d=_0x17d94f(),target:_0x11c346,context:_0x426c58=null,isResolvable:_0xae6f33=!0x0}){if(this['_readOnlyChannels']['has'](_0x7de5a6)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x11c346)throw new _0x36d19a('commentsrepository-missing-target');const _0x31f41e=this['addCommentThread']({'channelId':_0x7de5a6,'threadId':_0x5ce34d,'target':_0x11c346,'context':_0x426c58,'isResolvable':_0xae6f33});if(!_0x31f41e)return null;const _0x1dbde=this['_threadToController']['get'](_0x31f41e),_0x20bda=_0x1dbde['view']['commentThreadInputView']['commentInputView'],_0x5eee26=this['context']['plugins']['get']($t),_0x48983f=_0x5eee26['getByInnerView'](_0x1dbde['view']);return _0x5eee26['activate'](_0x48983f),_0x20bda['once']('editorReady',()=>_0x20bda['focus']()),_0x31f41e;}['hasCommentThread'](_0x22fb4e){if('string'!=typeof _0x22fb4e)throw new _0x36d19a('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x22fb4e);}['updateCommentThread']({channelId:_0x316cbc=zt,threadId:_0x42c5d0,context:_0x58f8f9,unlinkedAt:_0x34908b,attributes:_0x742286,isFromAdapter:_0x760925=!0x1}){return this['fire'](ii('updateCommentThread',_0x316cbc),{'channelId':_0x316cbc,'threadId':_0x42c5d0,'context':_0x58f8f9,'unlinkedAt':_0x34908b,'attributes':_0x742286,'isFromAdapter':_0x760925}),this['getCommentThread'](_0x42c5d0);}['getCommentThread'](_0x526a58){if('string'!=typeof _0x526a58)throw new _0x36d19a('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x526a58);}['fetchCommentThread']({channelId:_0x2a97ad,threadId:_0x3a7403}={}){const _0x5cd985=this['getCommentThread'](_0x3a7403);if(_0x5cd985)return Promise['resolve'](_0x5cd985);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x36d19a('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2a97ad,'threadId':_0x3a7403})['then'](_0xe9d47b=>this['hasCommentThread'](_0x3a7403)?this['getCommentThread'](_0x3a7403):_0xe9d47b?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2a97ad},_0xe9d47b)):void 0x0)['catch'](_0x3aaed7=>{throw console['error'](_0x3aaed7),new _0x36d19a('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x38e3cc,skipNotAttached:_0x2f22d2=!0x1,skipEmpty:_0x9f4270=!0x1,toJSON:_0xe9bd3c=!0x1}={}){const _0x2dc741=[];for(const _0x53b9c1 of this['_threads']['values']())_0x38e3cc&&_0x53b9c1['channelId']!==_0x38e3cc||_0x2f22d2&&!_0x53b9c1['isAttached']||_0x9f4270&&0x0===_0x53b9c1['length']||_0x2dc741['push'](_0x53b9c1);return _0xe9bd3c?_0x2dc741['map'](_0x1d09a0=>_0x1d09a0['toJSON']()):_0x2dc741;}['getAnnotationForCommentThread'](_0x26684e){const _0x46cea5=this['_threadToController']['get'](_0x26684e);if(!_0x46cea5)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x46cea5['view'])||null;}['getCommentThreadForAnnotation'](_0x69f012){const _0x2b2dd5=this['_viewToController']['get'](_0x69f012['innerView']);return _0x2b2dd5?_0x2b2dd5['model']:null;}['setActiveCommentThread'](_0x270ad1){const _0x204229=this['context']['plugins']['get']($t);if(!_0x270ad1)return void(this['activeCommentThread']&&_0x204229['deactivateAll']());const _0x54143b=this['getCommentThread'](_0x270ad1);if(!_0x54143b)throw new _0x36d19a('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x270ad1});if(!this['_threadToController']['has'](_0x54143b))throw new _0x36d19a('commentsrepository-active-not-attached',null,{'threadId':_0x270ad1});const _0x37282d=_0x204229['getByInnerView'](this['_threadToController']['get'](_0x54143b)['view']);_0x204229['activate'](_0x37282d);}['switchReadOnly'](_0x49569d,_0x419162){_0x49569d?this['_readOnlyChannels']['add'](_0x419162):this['_readOnlyChannels']['delete'](_0x419162),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4b6238){return this['_readOnlyChannels']['has'](_0x4b6238)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x21b111,_0x191259){return new It(_0x21b111,_0x191259);}['setPermissions'](_0x2cdc4a,_0x4d9c40=zt){this['_permissions']['set'](_0x4d9c40,_0x2cdc4a),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x436774=zt){return this['_permissions']['has'](_0x436774)?this['_permissions']['get'](_0x436774):Jt;}['_addCommentThread']({channelId:_0x372674,threadId:_0x2ad022,comments:_0x1885f0,unlinkedAt:_0x3b46b3,resolvedAt:_0x12f319,resolvedBy:_0x42cb50,target:_0x5a01c9,context:_0x18028b,attributes:_0x34fb19,isFromAdapter:_0x11e73e,isResolvable:_0x591bef,isSubmitted:_0x45d688}){if('string'!=typeof _0x2ad022)throw new _0x36d19a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2ad022});if(this['hasCommentThread'](_0x2ad022))throw new _0x36d19a('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2ad022});const _0x32e936=new Zt(this,{'channelId':_0x372674,'id':_0x2ad022,'context':_0x18028b,'attributes':_0x34fb19,'unlinkedAt':_0x3b46b3,'resolvedAt':_0x12f319,'resolvedBy':_0x42cb50?this['context']['plugins']['get'](_0xdd578)['getUser'](_0x42cb50):null,'isResolvable':_0x591bef,'isSubmitted':_0x45d688||_0x11e73e});this['_threads']['set'](_0x2ad022,_0x32e936);for(const _0x42f162 of _0x1885f0)_0x32e936['_add'](this['_createNewComment']({'threadId':_0x2ad022,..._0x42f162}));return _0x5a01c9&&_0x32e936['attachTo'](_0x5a01c9),_0x11e73e||!_0x32e936['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x372674,'threadId':_0x2ad022});}['_submitCommentThread']({channelId:_0x29fe8a,threadId:_0x4eaac6}){if(!this['hasCommentThread'](_0x4eaac6))throw new _0x36d19a('commentsrepository-missing-comment-thread',this);const _0x2bb223=this['getCommentThread'](_0x4eaac6);if(_0x2bb223['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x575256,comments:_0x5a20f7,resolvedAt:_0x6b17fd,resolvedBy:_0x43e95d,context:_0x555770,attributes:_0x3254ec}=_0x2bb223,_0x3c4949=this['context']['plugins']['get']('PendingActions'),_0x33ec4f=_0x3c4949['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x29fe8a,'threadId':_0x575256,'comments':_0x5a20f7['map'](_0x1ef7c1=>_0x1ef7c1['toJSON']()),'resolvedAt':_0x6b17fd,'resolvedBy':_0x43e95d?_0x43e95d['id']:_0x43e95d,'context':_0x555770,'attributes':_0x3254ec})['then'](({comments:_0x34d864})=>{_0x3c4949['remove'](_0x33ec4f);for(const _0x3d7247 of _0x34d864)this['_updateComment']({'channelId':_0x29fe8a,'threadId':_0x4eaac6,'commentId':_0x3d7247['commentId'],'createdAt':_0x3d7247['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5ccce5=>{throw console['error'](_0x5ccce5),new _0x36d19a('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x42c037,target:_0x262aa8}){const _0x277ad5=this['getCommentThread'](_0x42c037);if(!_0x277ad5)throw new _0x36d19a('commentsrepository-attach-missing-comment-thread',this);const _0xe31af3=this['context']['plugins']['get']('PendingActions'),_0x1b6da6=this['context']['plugins']['get']($t),_0x5a666a=this['_createCommentThreadView'](_0x277ad5),_0x2aafc6=new It(_0x277ad5,_0x5a666a);let _0x1b496b=null;_0x5a666a['on']('change:isDirty',(_0x151acc,_0x4c0ded,_0x3764ad)=>{_0x3764ad?_0x1b496b=_0xe31af3['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1b496b&&(_0xe31af3['remove'](_0x1b496b),_0x1b496b=null);}),this['_threadToController']['set'](_0x277ad5,_0x2aafc6),this['_viewToController']['set'](_0x5a666a,_0x2aafc6);const _0x2a94cf=new Kt(this['context']['locale'],_0x5a666a);_0x2a94cf['bind']('length')['to'](_0x5a666a),_0x2a94cf['bind']('isDirty')['to'](_0x5a666a,'isDirty',_0x5a666a,'length',(_0x45739c,_0x346669)=>_0x45739c||!_0x346669),_0x2a94cf['bind']('isActive')['to'](_0x5a666a),_0x2a94cf['type']='comment';const _0xaf92b2=new Yt({'view':_0x2a94cf,'target':_0x262aa8,'type':'comment','isVisible':!_0x277ad5['archivedAt']&&!!('function'==typeof _0x262aa8?_0x262aa8():_0x262aa8)});return _0x5a666a['on']('escape',()=>{_0xaf92b2['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5a666a,_0xaf92b2),_0x1b6da6['add'](_0xaf92b2),_0xaf92b2;}['_bindAnnotationToEditors'](_0x47cb86,_0x32e238){this['listenTo'](_0x47cb86,'editorReady',(_0x4e8334,_0x2ed5d4)=>{const _0x4371a7=_0x2ed5d4['ui']['view']['body']['bodyCollectionContainer'];_0x32e238['focusableElements']['add'](_0x4371a7),this['context']instanceof _0x3bb28c&&this['context']['ui']['focusTracker']['add'](_0x4371a7);},{'priority':'highest'}),this['listenTo'](_0x47cb86,'editorDestroyed',(_0x23706c,_0x365df0)=>{const _0x2ce509=_0x365df0['ui']['view']['body']['bodyCollectionContainer'];_0x32e238['focusableElements']['has'](_0x2ce509)&&_0x32e238['focusableElements']['remove'](_0x2ce509),this['context']instanceof _0x3bb28c&&this['context']['ui']['focusTracker']['remove'](_0x2ce509);});}['_unbindEditors'](_0x92ad14){this['stopListening'](_0x92ad14,'editorReady'),this['stopListening'](_0x92ad14,'editorDestroyed');}['_createCommentThreadView'](_0x78e39f){const _0x51cd69=this['context']['plugins']['get'](_0xdd578),{config:_0x440717,locale:_0x14c302}=this['context'],_0x158780=_0x3a0881(_0x440717['get']('locale'),_0x14c302);return new(0x0,(_0x440717['get']('comments'))['CommentThreadView'])(_0x14c302,_0x78e39f,_0x51cd69['me'],{'editorConfig':{..._0x440717['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x440717['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x440717['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x440717['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x440717['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x158780,'CommentView':_0x440717['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x29670f,channelId:_0x2f1fd9,resolvedAt:_0x1640a8,resolvedBy:_0x1409b8,isFromAdapter:_0x266ade}){if(!this['hasCommentThread'](_0x29670f))throw new _0x36d19a('commentsrepository-missing-comment-thread',null,{'threadId':_0x29670f});const _0x57a710=this['getCommentThread'](_0x29670f);if(_0x57a710['isResolved'])throw new _0x36d19a('commentsrepository-resolved-comment-thread',null,{'threadId':_0x29670f});const _0x5eb0af=this['context']['plugins']['get'](_0xdd578);if(_0x57a710['resolvedBy']=_0x5eb0af['getUser'](_0x1409b8),_0x57a710['resolvedAt']=_0x1640a8,_0x266ade||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x21773c=this['context']['plugins']['get']('PendingActions'),_0x241d96=_0x21773c['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2f1fd9,'threadId':_0x29670f})['then'](({resolvedAt:_0x3fc8b4,resolvedBy:_0x124a1d})=>{_0x21773c['remove'](_0x241d96),_0x57a710['resolvedBy']['id']!==_0x124a1d&&(_0x57a710['resolvedBy']=_0x5eb0af['getUser'](_0x124a1d)),_0x57a710['resolvedAt']=_0x3fc8b4;})['catch'](_0x1bb899=>{throw console['error'](_0x1bb899),new _0x36d19a('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4a02ab,channelId:_0x1f08e8,isFromAdapter:_0x4710d7}){if(!this['hasCommentThread'](_0x4a02ab))throw new _0x36d19a('commentsrepository-missing-comment-thread',null,{'threadId':_0x4a02ab});const _0x1e1421=this['getCommentThread'](_0x4a02ab);if(!_0x1e1421['isResolved'])throw new _0x36d19a('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4a02ab});if(_0x1e1421['resolvedBy']=null,_0x1e1421['resolvedAt']=null,_0x4710d7||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xe92ce9=this['context']['plugins']['get']('PendingActions'),_0x4ac6a9=_0xe92ce9['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1f08e8,'threadId':_0x4a02ab})['then'](()=>_0xe92ce9['remove'](_0x4ac6a9))['catch'](_0xd5784=>{throw console['error'](_0xd5784),new _0x36d19a('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4d0042,isFromAdapter:_0x9ec494}){const _0x565c77=this['getCommentThread'](_0x4d0042);if(!_0x565c77)throw new _0x36d19a('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4d0042),this['_threads']['delete'](_0x4d0042),!_0x565c77['isSubmitted']||_0x9ec494||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5b629c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1d5d55}=_0x565c77,_0x2b3a93=_0x5b629c['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1d5d55,'threadId':_0x4d0042})['then'](()=>_0x5b629c['remove'](_0x2b3a93))['catch'](_0x3d9438=>{throw console['error'](_0x3d9438),new _0x36d19a('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4a3819,unlinkedAt:_0x21c294,context:_0x489ba8,attributes:_0x218631,isFromAdapter:_0x31506e}){if('string'!=typeof _0x4a3819)throw new _0x36d19a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4a3819});if(!this['hasCommentThread'](_0x4a3819))throw new _0x36d19a('commentsrepository-missing-comment-thread',null,{'threadId':_0x4a3819});const _0x1ac25=this['getCommentThread'](_0x4a3819);let _0x5cfb40=!0x1;if(void 0x0!==_0x489ba8&&_0x1ac25['context']!==_0x489ba8&&(_0x1ac25['context']=_0x489ba8,_0x5cfb40=!0x0),void 0x0!==_0x21c294&&_0x1ac25['unlinkedAt']!==_0x21c294&&(_0x1ac25['unlinkedAt']=_0x21c294,_0x5cfb40=!0x0),_0x218631&&!_0x2de9c5(_0x218631,_0x1ac25['attributes'])&&(_0x1ac25['attributes']=_0x218631,_0x5cfb40=!0x0),!_0x5cfb40)return Promise['resolve']();if(!_0x1ac25['isSubmitted']||_0x31506e||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xad5471=this['context']['plugins']['get']('PendingActions'),{channelId:_0x538c0a}=_0x1ac25,_0x14033a=_0xad5471['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x538c0a,'threadId':_0x4a3819,'context':_0x489ba8,'unlinkedAt':_0x21c294,'attributes':_0x218631})['then'](()=>_0xad5471['remove'](_0x14033a))['catch'](_0x13ea5f=>{throw console['error'](_0x13ea5f),new _0x36d19a('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x10028f){const _0x272a56=this['context']['plugins']['get']($t),_0xf70fd9=this['getCommentThread'](_0x10028f);if(_0xf70fd9['_isAttached']=!0x1,this['_threadToController']['has'](_0xf70fd9)){const _0x3f1fa3=this['_threadToController']['get'](_0xf70fd9),_0x4dd4af=_0x3f1fa3['view'],_0x55ea7f=_0x272a56['getByInnerView'](_0x4dd4af);this['_threadToController']['delete'](_0xf70fd9),this['_viewToController']['delete'](_0x4dd4af),_0x55ea7f&&_0x272a56['remove'](_0x55ea7f),_0x3f1fa3['destroy'](),_0x4dd4af['destroy']()['then'](()=>{this['_unbindEditors'](_0x4dd4af);});}}['_updateActiveAnnotation']({threadId:_0x571f69,resolvedAt:_0x380034,unlinkedAt:_0x294384}){const _0x4735fc=!!_0x380034,_0x483f65=this['context']['plugins']['get']($t),_0x61e06=this['getCommentThread'](_0x571f69);if(this['_threadToController']['has'](_0x61e06)){const _0x51fee1=this['_threadToController']['get'](_0x61e06)['view'],_0x1de130=_0x483f65['getByInnerView'](_0x51fee1);_0x1de130&&(_0x4735fc&&_0x483f65['_removeActiveAnnotation'](_0x1de130),_0x294384?_0x1de130['isVisible']=!0x1:_0x1de130['refreshVisibility']());}}['_getExternalAuthor'](_0x512d8c){const _0x1de5ce=this['context']['plugins']['get'](_0xdd578),_0x10eea4=_0x3066e4('external:'+_0x512d8c),_0x4aec65=_0x1de5ce['getUser'](_0x10eea4);return _0x4aec65||_0x1de5ce['addUser']({'id':_0x10eea4,'name':_0x512d8c});}['_createNewComment']({threadId:_0x183e15,commentId:_0x33ff70=_0x17d94f(),content:_0x33417a,authorId:_0x476d26,createdAt:_0x189b9d,attributes:_0x2ecfee}){if('string'!=typeof _0x33ff70)throw new _0x36d19a('commentsrepository-invalid-commentid');if('string'!=typeof _0x476d26)throw new _0x36d19a('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x33417a||!_0x33417a['trim']())throw new _0x36d19a('commentsrepository-invalid-comment-content');const _0xefea28=this['context']['plugins']['get'](_0xdd578)['getUser'](_0x476d26);if(!_0xefea28)throw new _0x36d19a('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x476d26});let _0x388b59=null,_0x1bbb94=_0x189b9d;return _0x2ecfee?.['@external']&&(_0x388b59=this['_getExternalAuthor'](_0x2ecfee['@external']['authorName']),_0x1bbb94=new Date(_0x2ecfee['@external']['createdAt'])),new ti(this,{'threadId':_0x183e15,'id':_0x33ff70,'author':_0x388b59||_0xefea28,'creator':_0xefea28,'content':_0x33417a,'createdAt':_0x189b9d,'authoredAt':_0x1bbb94,'attributes':_0x2ecfee});}['_addComment'](_0x425bdf){let {threadId:_0x12857d,content:_0x43447a,attributes:_0x24cdd8,isFromAdapter:_0x244f20}=_0x425bdf;const _0x5caea7=this['getCommentThread'](_0x425bdf['threadId']);if(!_0x5caea7)throw new _0x36d19a('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x507b57=this['_createNewComment'](_0x425bdf),{id:_0x5c7cc6}=_0x507b57;if(_0x5caea7['_add'](_0x507b57),_0x244f20||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5caea7['isSubmitted'])return Promise['resolve']();const _0xd49dd5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x206461}=_0x5caea7,_0x17ff8e=_0xd49dd5['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x24cdd8||(_0x24cdd8={}),this['adapter']['addComment']({'channelId':_0x206461,'threadId':_0x12857d,'commentId':_0x5c7cc6,'content':_0x43447a,'attributes':_0x24cdd8})['then'](_0x1685db=>{_0xd49dd5['remove'](_0x17ff8e),_0x1685db&&this['_updateComment']({'channelId':_0x206461,'threadId':_0x12857d,'commentId':_0x5c7cc6,'createdAt':_0x1685db['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x37611f=>{throw console['error'](_0x37611f),new _0x36d19a('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4cea4,commentId:_0x237d48,content:_0x19a60f,createdAt:_0x4bb479,attributes:_0x47ccd2,isFromAdapter:_0x5928e9}){if(void 0x0!==_0x19a60f&&('string'!=typeof _0x19a60f||!_0x19a60f['trim']()['length']))throw new _0x36d19a('commentsrepository-update-comment-invalid-content');const _0x17395e=this['getCommentThread'](_0x4cea4),_0x426d1b=_0x17395e['getComment'](_0x237d48);if(!_0x426d1b)throw new _0x36d19a('commentsrepository-update-missing-comment',this);let _0x2e05d4=!0x1;if(_0x19a60f&&_0x19a60f!==_0x426d1b['content']&&(_0x426d1b['isEditable']||_0x5928e9)&&(_0x426d1b['content']=_0x19a60f,_0x2e05d4=!0x0),_0x4bb479&&_0x4bb479!==_0x426d1b['createdAt']&&(_0x426d1b['createdAt']=_0x4bb479,_0x426d1b['attributes']&&_0x426d1b['attributes']['@external']||(_0x426d1b['authoredAt']=_0x4bb479),_0x2e05d4=!0x0),_0x47ccd2&&!_0x2de9c5(_0x47ccd2,_0x426d1b['attributes'])&&(_0x426d1b['attributes']=_0x47ccd2,_0x2e05d4=!0x0),!_0x2e05d4)return Promise['resolve']();if(_0x17395e['fire']('commentUpdated'),_0x5928e9||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xdc10c6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x28c5c3}=this['getCommentThread'](_0x426d1b['threadId']),_0xcaac3e=_0xdc10c6['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x28c5c3,'threadId':_0x4cea4,'commentId':_0x237d48,'content':_0x19a60f,'attributes':_0x47ccd2})['then'](()=>_0xdc10c6['remove'](_0xcaac3e))['catch'](_0xa6a12c=>{throw console['error'](_0xa6a12c),new _0x36d19a('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x108580,commentId:_0x5520f,isFromAdapter:_0x522b22}){const _0x36dc32=this['getCommentThread'](_0x108580),_0x2feb58=_0x36dc32['getComment'](_0x5520f);if(!_0x2feb58)throw new _0x36d19a('commentsrepository-remove-missing-comment',this);if(_0x36dc32['_remove'](_0x2feb58),_0x522b22||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4e3dd5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5cb0b5}=_0x36dc32,_0x535847=_0x4e3dd5['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5cb0b5,'threadId':_0x108580,'commentId':_0x5520f})['then'](()=>_0x4e3dd5['remove'](_0x535847))['catch'](_0xc6cb4a=>{throw console['error'](_0xc6cb4a),new _0x36d19a('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x5d3602(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x65c0c1,_0x3632ac){super();const _0x430e62=_0x65c0c1['context']['plugins']['get'](_0xdd578)['me'],_0x49c066=_0x65c0c1['getCommentThread'](_0x3632ac['threadId']),_0x4296a7=0x0===_0x49c066['comments']['length'],_0x9636b2=_0x430e62===_0x3632ac['author'];this['id']=_0x3632ac['id'],this['threadId']=_0x3632ac['threadId'],this['author']=_0x3632ac['author'],this['creator']=_0x3632ac['creator'],this['isExternal']=Boolean(_0x3632ac['attributes']&&_0x3632ac['attributes']['@external']),this['set']('content',_0x3632ac['content']),this['createdAt']=_0x3632ac['createdAt']||new Date(),this['set']('authoredAt',_0x3632ac['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x49c066,'resolvedAt'),this['set']('attributes',_0x3632ac['attributes']||{}),this['bind']('isEditable')['to'](_0x65c0c1,'_permissions',()=>{const _0xc2246f=_0x65c0c1['getPermissions'](_0x49c066['channelId'])['write'],_0x5b8919=_0x65c0c1['getPermissions'](_0x49c066['channelId'])['modifyAll'];return _0x9636b2&&_0xc2246f||!_0x9636b2&&_0x5b8919;}),this['bind']('isRemovable')['to'](_0x49c066,'isRemovable',_0x65c0c1,'_permissions',_0x9cc6a9=>{const _0xdc3693=_0x65c0c1['getPermissions'](_0x49c066['channelId'])['write'],_0x4d028a=_0x65c0c1['getPermissions'](_0x49c066['channelId'])['modifyAll'];return _0x9636b2&&_0xdc3693||_0x9cc6a9&&_0x4296a7||!_0x9636b2&&_0x4d028a&&!_0x4296a7;}),this['bind']('isReadOnly')['to'](_0x49c066,'isReadOnly'),this['_repository']=_0x65c0c1;}get['weight'](){return Math['max'](function(_0x233a74){const _0xd49b2c=document['createElement']('div');return _0xd49b2c['innerHTML']=_0x233a74,_0xd49b2c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x40ce64){const {threadId:_0x334b1d,id:_0x27fddb}=this;if(!this['_repository']['hasCommentThread'](_0x334b1d))throw new _0x36d19a('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x78c9ca}=this['_repository']['getCommentThread'](_0x334b1d);this['_repository']['fire'](ii('updateComment',_0x78c9ca,_0x334b1d),{'channelId':_0x78c9ca,'threadId':_0x334b1d,'commentId':_0x27fddb,..._0x40ce64});}['setAttribute'](_0x25a758,_0x51f5e4){const _0x4422d9=_0x38963a(this['attributes']);_0x5f0b07(_0x4422d9,_0x25a758,_0x51f5e4),this['update']({'attributes':_0x4422d9});}['removeAttribute'](_0x3287c8){const _0x283e61=_0x38963a(this['attributes']);_0x333a25(_0x283e61,_0x3287c8),this['update']({'attributes':_0x283e61});}['remove'](_0x1af0c9={}){if(!_0x1af0c9['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x10f0ea,id:_0x259e43}=this;if(!this['_repository']['hasCommentThread'](_0x10f0ea))throw new _0x36d19a('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1d5a4f}=this['_repository']['getCommentThread'](_0x10f0ea);this['_repository']['fire'](ii('removeComment',_0x1d5a4f,_0x10f0ea),{'channelId':_0x1d5a4f,'threadId':_0x10f0ea,'commentId':_0x259e43,..._0x1af0c9});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x2f01d6,..._0x2c95cf){for(const _0x28ba68 of _0x2c95cf)void 0x0!==_0x28ba68&&(_0x2f01d6+=':'+String(_0x28ba68));return _0x2f01d6;}class ei extends _0x11a9d9{constructor(_0x3e1540){super(_0x3e1540),this['set']('hasContent',!0x1);}['refresh'](){const _0x49680f=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x589d6c of _0x49680f['getRanges']())if(this['_hasContent'](_0x589d6c))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x560233=_0x17d94f(),ranges:_0x4c93d5,comment:_0x19a4ac}={}){const _0x418336=this['editor']['model'],_0x99e83f=_0x4c93d5??Array['from'](_0x418336['document']['selection']['getRanges']()),_0x3c13fa=[];for(const _0x5c2c7d of _0x99e83f)this['_hasContent'](_0x5c2c7d)&&_0x3c13fa['push'](this['_trimToContent'](_0x5c2c7d));if(!_0x3c13fa['length'])throw new _0x36d19a('addcommentthreadcommand-incorrect-ranges',null);_0x19a4ac&&this['_createCommentThread'](_0x560233,_0x19a4ac),this['_createMarkersFromRanges'](_0x560233,_0x3c13fa,!!_0x19a4ac);}['_createMarkersFromRanges'](_0x1586f1,_0x47b606,_0x256582){this['editor']['model']['change'](_0x1fbbeb=>{for(const _0x8cd2ed of _0x47b606){const _0xc776f5=_0x17d94f()['substr'](0x1,0x5),_0x15f8c4='comment:'+_0x1586f1+':'+_0xc776f5;_0x1fbbeb['addMarker'](_0x15f8c4,{'range':_0x8cd2ed,'usingOperation':_0x256582,'affectsData':_0x256582});}});}['_createCommentThread'](_0x2dae61,_0x68a74c){const _0x4ae639=this['editor']['plugins']['get']('CommentsRepository'),_0x479567=this['editor']['config']['get']('collaboration.channelId'),_0x1cdd52=this['editor']['plugins']['get']('Users')['me'];if(!_0x1cdd52)throw new _0x36d19a('addcommentthreadcommand-user-not-found',null);_0x4ae639['addCommentThread']({'threadId':_0x2dae61,'channelId':_0x479567,'comments':[{'authorId':_0x1cdd52['id'],'content':_0x68a74c,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x20aac2){for(const _0x17c3e7 of _0x20aac2['getItems']())if(this['_itemIsContent'](_0x17c3e7))return!0x0;return!0x1;}['_itemIsContent'](_0x3f2e3d){return _0x3f2e3d['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3f2e3d)&&!_0x3f2e3d['is']('element','tableCell');}['_trimToContent'](_0x2f5b83){const _0x38f0fa=_0x5bada5=>!this['_itemIsContent'](_0x5bada5['item']),_0x2e0ad5=_0x2f5b83['start']['getLastMatchingPosition'](_0x38f0fa),_0x1e42c3=_0x2f5b83['end']['getLastMatchingPosition'](_0x38f0fa,{'direction':'backward'});return this['editor']['model']['createRange'](_0x2e0ad5,_0x1e42c3);}}class si extends _0x3eacd6{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e59cb){super(_0x4e59cb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1e6f76=this['editor'],_0x5c9ebc=_0x1e6f76['model']['document']['selection'],_0x140aae=_0x58129b(()=>this['refreshSelectedViews'](),0xa);_0x5c9ebc['on']('change:range',(_0x250bcc,_0x4df021)=>{_0x4df021['directChange']&&(_0x140aae['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1e6f76['editing']['view']['document'],'change:isFocused',(_0x5365a8,_0x1a17cb,_0x64197c)=>{_0x64197c&&_0x140aae();}),this['listenTo'](_0x1e6f76['ui']['focusTracker'],'change:isFocused',(_0x13788c,_0x4221b9,_0x33f580)=>{_0x33f580||this['fire']('blur',{'isAnnotationTracked':_0x53b828=>this['_editorAnnotationsData']['has'](_0x53b828['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x334a08){if(this['_editorAnnotations']['has'](_0x334a08['view']))return;this['_editorAnnotations']['add'](_0x334a08['view']),this['editor']['ui']['focusTracker']['add'](_0x334a08['view']['element']);const _0x156ba4=this['editor']['plugins']['get']($t);this['listenTo'](_0x156ba4['collection'],'remove',(_0x2e3c9c,_0x7ec48)=>{this['editor']['ui']['focusTracker']['remove'](_0x7ec48['view']['element']),this['_editorAnnotations']['delete'](_0x7ec48['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x5b25b8){if('function'!=typeof _0x5b25b8)throw new _0x36d19a('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x5b25b8);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4996bc,annotations:_0x5ba5dd}){const _0x3dbe01=[],_0x59d155=this['editor']['model']['document']['selection'],_0x4f8ca5=Array['from'](_0x59d155['getRanges']());for(const [_0x3d2915,_0x1f4b85]of this['_editorAnnotationsData']){const _0x1425cb=_0x53da96(_0x1f4b85),_0x2dd430=_0x5ba5dd['getByInnerView'](_0x3d2915);_0x1425cb&&_0x2dd430&&_0x3dbe01['push']({'annotation':_0x2dd430,'range':_0x1425cb});}function _0x53da96(_0x4fa179){for(const _0x2ffa71 of _0x4fa179)for(const _0x4190e5 of _0x4f8ca5)if(_0x2ffa71['containsRange'](_0x4190e5,!_0x59d155['isCollapsed']))return _0x2ffa71;return null;}return _0x3dbe01['sort']((_0x44f94d,_0x3d5308)=>{const _0x2df59e=_0x44f94d['range'],_0x129546=_0x3d5308['range'];if(!_0x2df59e['isEqual'](_0x129546)){if(_0x2df59e['containsRange'](_0x129546,!0x0))return 0x1;if(_0x129546['containsRange'](_0x2df59e,!0x0))return-0x1;}return _0x44f94d['annotation']==_0x4996bc?-0x1:_0x3d5308['annotation']==_0x4996bc?0x1:0x0;})['map'](_0x409f48=>_0x409f48['annotation']);}get['_editorAnnotationsData'](){const _0x3a64f8=new Map();for(const _0x473d22 of Array['from'](this['_dataCollectors']))for(const [_0x2f2b8c,_0x4ec636]of _0x473d22())_0x3a64f8['set'](_0x2f2b8c,_0x4ec636);return _0x3a64f8;}}class ni extends _0x3eacd6{['afterInit'](){const _0x4fd3a5=this['editor'];if(!_0x4fd3a5['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4fd3a5['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x3eacd6{constructor(_0x84ce05){super(_0x84ce05),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x42f9a8=this['editor'],_0x1501a3=_0x42f9a8['commands']['get']('importWord'),_0x112f9f=_0x42f9a8['plugins']['get'](_0xdd578);_0x1501a3&&(_0x1501a3['on']('execute',(_0x373f80,[,_0xb5d5c3])=>{_0xb5d5c3['collaboration_features']={'comments':!0x0,'user_id':_0x112f9f['me']['id']};},{'priority':_0x9cf61['high']+0xa}),this['listenTo'](_0x1501a3,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2ecb31,_0x4156b2){const {comment_threads:_0x33c3df}=_0x4156b2;_0x33c3df&&_0x33c3df['forEach'](({thread_id:_0x3fe318,comments:_0x3cd78b,is_resolved:_0x3b38c2})=>{const _0x72d70=new Date(),_0x299306=_0x3cd78b['map'](({author:_0x131b5d,content:_0x24ea27,created_at:_0x52a7b0})=>({'content':_0x24ea27,'authorId':this['editor']['plugins']['get'](_0xdd578)['me']['id'],'createdAt':_0x72d70,'attributes':{'@external':{'authorName':_0x131b5d,'createdAt':_0x52a7b0?new Date(_0x52a7b0):new Date(),'source':'importWord'}}})),_0x4ac713=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x4ac713,'threadId':_0x3fe318,'comments':_0x299306,'resolvedAt':_0x3b38c2?_0x72d70:null});});}}class ri extends _0x3eacd6{constructor(_0x45121a){super(_0x45121a),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x298302=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x298302,'contentInsertion',(_0x4b9c4b,_0x5d0d7a)=>this['_removeMarkersWithoutThreads'](_0x5d0d7a['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x7fa8bf){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x7fa8bf;const _0x73163c=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2d4fab of _0x7fa8bf['keys']()){const [_0x1ca848,_0x3b9831]=_0x2d4fab['split'](':');'comment'!=_0x1ca848||_0x73163c['hasCommentThread'](_0x3b9831)||_0x7fa8bf['delete'](_0x2d4fab);}return _0x7fa8bf;}['_registerMarkerInClipboardPipeline'](){const _0x115f99=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3fde22=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3fde22&&_0x115f99['_registerMarkerToCopy']('comment',_0x3fde22);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x454b4e){switch(_0x454b4e){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x213e0a){const _0x14a2b0=_0x213e0a['split'](':');return{'group':_0x14a2b0[0x0],'id':_0x14a2b0[0x1],'part':_0x14a2b0[0x2]};}class ai extends _0x3eacd6{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4cd7b5,_0x5cf5fc)=>{if(!_0x5cf5fc['options']['showCommentHighlights'])return null;if(_0x5cf5fc['options']['ignoreResolvedComments']){const {id:_0x2ca46f}=hi(_0x4cd7b5['markerName']),_0xd25c05=this['editor']['plugins']['get'](Qt);if(_0xd25c05['getCommentThread'](_0x2ca46f)?.['isResolved']&&_0x4cd7b5['item'])return _0x5cf5fc['consumable']['consume'](_0x4cd7b5['item'],'addMarker:'+_0x4cd7b5['markerName']),_0x5cf5fc['consumable']['consume'](_0x4cd7b5['item'],'removeMarker:'+_0x4cd7b5['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1cdcd0=>{_0x1cdcd0['on']('addMarker:comment',(_0x5c7104,_0xd3af0a,_0x1a0ba5)=>{if(!_0x1a0ba5['options']['showCommentHighlights'])return;const _0x10661b=_0xd3af0a['item'];if(!_0x10661b)return;const _0x575f90=_0x1a0ba5['mapper']['toViewElement'](_0x10661b);this['editor']['model']['schema']['isObject'](_0x10661b)&&_0x575f90&&!_0x575f90['getCustomProperty']('widget')&&_0x575f90['is']('containerElement')&&Ct(_0x575f90,_0x1a0ba5['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1d3dc0,{writer:_0xc1a998,options:_0x1473d8})=>{if(!_0x1473d8['showCommentHighlights'])return null;const _0x2a3a34=_0xc1a998['createContainerElement']('div'),_0x28f8c7=_0xc1a998['createEmptyElement']('hr');return _0xc1a998['addClass']('ck-horizontal-line',_0x2a3a34),_0xc1a998['insert'](_0xc1a998['createPositionAt'](_0x2a3a34,0x0),_0x28f8c7),_0x2a3a34;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2abd31,{writer:_0x4ceced,options:_0x4d953b})=>{if(!_0x4d953b['showCommentHighlights'])return null;const _0x1915fd=_0x4ceced['createContainerElement']('span'),_0x808964=_0x4ceced['createEmptyElement']('img');return _0x4ceced['addClass']('image-inline',_0x1915fd),_0x4ceced['insert'](_0x4ceced['createPositionAt'](_0x1915fd,0x0),_0x808964),_0x1915fd;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x43d53e,{writer:_0x479489,options:_0x3f6a72})=>{if(_0x3f6a72['showCommentHighlights'])return _0x479489['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4ae6ef,_0xc486d9,_0x58fc7d)=>{_0x58fc7d['options']['showCommentHighlights']&&_0x4ae6ef['stop']();},{'priority':'high'});}}class ci extends _0x3eacd6{static get['requires'](){return[Qt,si,_0xdd578,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f3176){super(_0x2f3176),this['set']('isThreadsLoadingPaused',!0x0),_0x2f3176['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x246ab2,_0x456363,_0x4b4b6b,_0x3d39fd)=>{const _0x1990e2=_0x2f3176['plugins']['get'](Qt),_0x21469d=_0x4b4b6b?hi(_0x4b4b6b)['id']:null;_0x2f3176['model']['change'](()=>{if(_0x21469d){const _0x1401c7=this['getAllMarkersForId'](_0x21469d);for(const _0x4f46c1 of _0x1401c7)_0x2f3176['editing']['reconvertMarker'](_0x4f46c1);}if(_0x3d39fd){const {id:_0x3d82c7}=hi(_0x3d39fd),_0x3c28ed=_0x1990e2['getCommentThread'](_0x3d82c7);if(_0x3c28ed&&_0x3c28ed['unlinkedAt'])return;if(_0x3c28ed&&!_0x3c28ed['isAttached'])return;const _0x417fc5=this['getAllMarkersForId'](_0x3d82c7);for(const _0x1f9400 of _0x417fc5)_0x2f3176['editing']['reconvertMarker'](_0x1f9400);}}),_0x21469d&&this['scrollToThreadMarker'](_0x21469d);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4740ee=this['editor'],_0x197fe5=_0x4740ee['plugins']['get'](Qt),_0x13dec7=_0x4740ee['config']['get']('collaboration.channelId'),_0x3c3aa0=_0x197fe5['getCommentThreads']()['filter'](_0x548517=>_0x548517['channelId']!==_0x13dec7);_0x4740ee['commands']['add']('addCommentThread',new ei(_0x4740ee)),this['listenTo'](_0x4740ee,'change:isReadOnly',(_0x39bdeb,_0x140d6a,_0x4c0f74)=>{_0x197fe5['switchReadOnly'](_0x4c0f74,_0x4740ee['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x197fe5,di('addCommentThread',_0x13dec7),(_0x4fc90f,{threadId:_0x2bc9d})=>{const _0x5dbae5=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x2bc9d);_0x5dbae5?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2bc9d);}),this['listenTo'](_0x197fe5,di('removeCommentThread',_0x13dec7),(_0x5aa955,{threadId:_0x115b4d})=>{_0x4740ee['model']['enqueueChange']({'isUndoable':!0x1},_0x425689=>{const _0x361bc4=this['getAllMarkersForId'](_0x115b4d);for(const _0x2aec44 of _0x361bc4)_0x425689['removeMarker'](_0x2aec44);});}),this['listenTo'](_0x197fe5,di('resolveCommentThread',_0x13dec7),(_0x951c3d,{threadId:_0x37536c})=>{(this['_reconvertMarkers'](_0x37536c),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x37536c)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x197fe5,di('reopenCommentThread',_0x13dec7),(_0x52c653,{threadId:_0xd59611})=>{this['_reconvertMarkers'](_0xd59611);},{'priority':'low'}),this['listenTo'](_0x197fe5,di('addComment',_0x13dec7),(_0xe39335,{threadId:_0x47b55e,isFromAdapter:_0x130f7b})=>{const _0x2425fd=this['getAllMarkersForId'](_0x47b55e);if(_0x130f7b||0x0==_0x2425fd['length']||!_0x197fe5['hasCommentThread'](_0x47b55e))return;0x1===_0x197fe5['getCommentThread'](_0x47b55e)['length']&&_0x4740ee['model']['enqueueChange']({'isUndoable':!0x1},_0x2b4268=>{for(const _0x85c51c of _0x2425fd)_0x2b4268['updateMarker'](_0x85c51c,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3c3aa0);}['afterInit'](){!async function(_0x5473d5){const _0x11fe09=_0x37b3c([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x3beddd=0x73460ab3,_0x2b7e83=0x73418d53^_0x3beddd,_0x214814=window[_0x37b3c([0x44,0x61,0x74,0x65])][_0x37b3c([0x6e,0x6f,0x77])](),_0x5baae6=_0x5473d5[_0x37b3c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1384ca=new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b4eed=>{_0x5baae6[_0x37b3c([0x6f,0x6e,0x63,0x65])](_0x37b3c([0x72,0x65,0x61,0x64,0x79]),_0x4b4eed);}),_0x3f60d8={[_0x37b3c([0x6b,0x74,0x79])]:_0x37b3c([0x45,0x43]),[_0x37b3c([0x75,0x73,0x65])]:_0x37b3c([0x73,0x69,0x67]),[_0x37b3c([0x63,0x72,0x76])]:_0x37b3c([0x50,0x2d,0x32,0x35,0x36]),[_0x37b3c([0x78])]:_0x37b3c([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]),[_0x37b3c([0x79])]:_0x37b3c([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]),[_0x37b3c([0x61,0x6c,0x67])]:_0x37b3c([0x45,0x53,0x32,0x35,0x36])},_0x4fd7cd=_0x5baae6[_0x37b3c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x37b3c([0x67,0x65,0x74])](_0x37b3c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x45732c(){let _0x37f7a,_0x334e4b=null,_0x4a5a58=null;try{if(_0x4fd7cd==_0x37b3c([0x47,0x50,0x4c]))return _0x37b3c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x37f7a=_0x30b38a(),!_0x37f7a)return _0x37b3c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x37f7a[_0x37b3c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4a5a58=_0xc307f8(_0x37f7a[_0x37b3c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x37f7a[_0x37b3c([0x6a,0x74,0x69])])),await _0x3c4b09()?_0x363174()?_0x40ca35()?_0x37b3c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5ba59a()?(_0x37f7a[_0x37b3c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x37b3c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x334e4b=_0xbb3967(_0x37b3c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x53a1b3()):_0x37b3c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x37b3c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x37b3c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x37b3c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x40ca35(){const _0x288441=[_0x37b3c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x37b3c([0x74,0x72,0x69,0x61,0x6c])][_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37f7a[_0x37b3c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x214814/0x3e8:0xe10*_0x2b7e83;return _0x37f7a[_0x37b3c([0x65,0x78,0x70])]<_0x288441;}function _0x363174(){const _0x812a68=_0x37f7a[_0x37b3c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x812a68)return!0x1;if(_0x812a68[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37b3c([0x2a])))return!0x0;if(_0x812a68[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37b3c([0x43,0x4d,0x54])))return!0x0;if(_0x812a68[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37b3c([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x5bdb3f())return!0x0;if(_0x812a68[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37b3c([0x52,0x43,0x4d,0x54]))){if(_0x17931d())return!0x0;if(_0x28009d()||_0x214d61())return!0x0;}return!0x1;}function _0x5ba59a(){const _0x41229c=_0x37f7a[_0x37b3c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x41229c||0x0==_0x41229c[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3d6bac}=new URL(window[_0x37b3c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x41229c[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d6bac))return!0x0;const _0x131aab=_0x3d6bac[_0x37b3c([0x73,0x70,0x6c,0x69,0x74])](_0x37b3c([0x2e]));return _0x41229c[_0x37b3c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2114ae=>_0x2114ae[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37b3c([0x2a])))[_0x37b3c([0x6d,0x61,0x70])](_0x6c2764=>_0x6c2764[_0x37b3c([0x73,0x70,0x6c,0x69,0x74])](_0x37b3c([0x2e])))[_0x37b3c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x34b24e=>_0x34b24e[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x131aab[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x37b3c([0x6d,0x61,0x70])](_0x464a68=>Array(_0x131aab[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x464a68[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x37b3c([0x66,0x69,0x6c,0x6c])](_0x464a68[0x0]===_0x37b3c([0x2a])?_0x37b3c([0x2a]):'')[_0x37b3c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x464a68))[_0x37b3c([0x73,0x6f,0x6d,0x65])](_0x35551b=>_0x131aab[_0x37b3c([0x65,0x76,0x65,0x72,0x79])]((_0x298b2b,_0x2e5f3e)=>_0x35551b[_0x2e5f3e]===_0x298b2b||_0x35551b[_0x2e5f3e]===_0x37b3c([0x2a])));}function _0x53a1b3(){return _0x334e4b&&_0x4a5a58?new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x49a49a,_0xf7f41d)=>{_0x334e4b[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x49a49a,_0xf7f41d),_0x4a5a58[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x52e078=>{_0x52e078!=_0x37b3c([0x56,0x61,0x6c,0x69,0x64])&&_0x49a49a(_0x52e078);},_0xf7f41d);}):_0x334e4b||_0x4a5a58||_0x37b3c([0x56,0x61,0x6c,0x69,0x64]);}}function _0xc307f8(_0x3790d7,_0x1ab890){return new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43edbd=>{if(_0x40ace4())return _0x43edbd(_0x37b3c([0x56,0x61,0x6c,0x69,0x64]));_0x34e464(),_0x5baae6[_0x37b3c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x37b3c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2d146a=!0x1;const _0x349330=_0x17d94f();function _0x1420ec(_0x41f6af){return!!_0x41f6af&&(typeof _0x41f6af===_0x37b3c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x41f6af===_0x37b3c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x41f6af[_0x37b3c([0x74,0x68,0x65,0x6e])]===_0x37b3c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x41f6af[_0x37b3c([0x63,0x61,0x74,0x63,0x68])]===_0x37b3c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x461159(_0x437866){_0x522e5c(_0x437866)[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x12d0ab=>{if(!_0x12d0ab||_0x12d0ab[_0x37b3c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x37b3c([0x6f,0x6b]))return _0x37b3c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x10e51c(_0x57039f(_0x349330+_0x1ab890))!=_0x12d0ab[_0x37b3c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x37b3c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x37b3c([0x56,0x61,0x6c,0x69,0x64]);})[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x245125=>(_0x47304c(),_0x245125),()=>{const _0x16c621=_0x11780f();return null==_0x16c621?(_0x47304c(),_0x37b3c([0x56,0x61,0x6c,0x69,0x64])):_0x37b3c(_0x214814-_0x16c621>(0x574a8eb3^_0x3beddd)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x43edbd)[_0x37b3c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x43edbd(_0x37b3c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x457134=0x7370e433^_0x3beddd;function _0x47304c(){const _0x5ed8fa=_0x37b3c([0x6c,0x6c,0x63,0x74,0x2d])+_0x10e51c(_0x57039f(_0x3790d7)),_0x2ad861=_0x313413(_0x10e51c(window[_0x37b3c([0x4d,0x61,0x74,0x68])][_0x37b3c([0x63,0x65,0x69,0x6c])](_0x214814/_0x457134)));window[_0x37b3c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37b3c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5ed8fa,_0x2ad861);}function _0x11780f(){const _0x33c971=_0x37b3c([0x6c,0x6c,0x63,0x74,0x2d])+_0x10e51c(_0x57039f(_0x3790d7)),_0x1daca3=window[_0x37b3c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37b3c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x33c971);return _0x1daca3?window[_0x37b3c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x313413(_0x1daca3),0x10)*_0x457134:null;}function _0x522e5c(_0x114bed){return new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23dfac,_0x2c3808)=>{_0x114bed[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x23dfac,_0x2c3808),window[_0x37b3c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2c3808,0x7347de73^_0x3beddd);});}}_0x5baae6[_0x37b3c([0x6f,0x6e])](_0x37b3c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x235fca,_0x28ea08)=>{if(_0x28ea08[0x0]!=_0x3790d7)return _0x43edbd(_0x37b3c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x28ea08[0x1]={..._0x28ea08[0x1],[_0x37b3c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x349330};},{[_0x37b3c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37b3c([0x68,0x69,0x67,0x68])}),_0x5baae6[_0x37b3c([0x6f,0x6e])](_0x37b3c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x47650e=>{_0x1420ec(_0x47650e[_0x37b3c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2d146a=!0x0,_0x461159(_0x47650e[_0x37b3c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x37b3c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37b3c([0x6c,0x6f,0x77])}),_0x1384ca[_0x37b3c([0x74,0x68,0x65,0x6e])](()=>{_0x2d146a||_0x43edbd(_0x37b3c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x40ace4(){return _0x5baae6[_0x37b3c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37b3c([0x76,0x69,0x65,0x77])][_0x37b3c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x37b3c([0x61,0x75,0x74,0x6f]);}function _0x34e464(){_0x5baae6[_0x37b3c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37b3c([0x76,0x69,0x65,0x77])][_0x37b3c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x37b3c([0x61,0x75,0x74,0x6f]);}}function _0xbb3967(_0x285660){const _0x375739=[new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x42b124=>setTimeout(_0x42b124,0x734f347f^_0x3beddd)),_0x1384ca[_0x37b3c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x94e908=>{let _0x5a1fe3=0x0;_0x5baae6[_0x37b3c([0x6d,0x6f,0x64,0x65,0x6c])][_0x37b3c([0x6f,0x6e])](_0x37b3c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2d7a5d,_0x29221b)=>{_0x29221b[0x0][_0x37b3c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5a1fe3++,_0x5a1fe3==(0x73460f5b^_0x3beddd)&&(_0x94e908(),_0x2d7a5d[_0x37b3c([0x6f,0x66,0x66])]());});}))];return window[_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x37b3c([0x72,0x61,0x63,0x65])](_0x375739)[_0x37b3c([0x74,0x68,0x65,0x6e])](()=>_0x285660);}async function _0x42eb41(){await _0x1384ca,_0x5baae6[_0x37b3c([0x6d,0x6f,0x64,0x65,0x6c])][_0x37b3c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x81a223,_0x5baae6[_0x37b3c([0x6d,0x6f,0x64,0x65,0x6c])][_0x37b3c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x81a223,_0x5baae6[_0x37b3c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x37b3c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5bdb3f(){return window[_0x37b3c([0x67,0x6c,0x6f,0x62])]&&window[_0x37b3c([0x67,0x6c,0x6f,0x62])][_0x37b3c([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x17931d(){return _0x4157d7(_0x37b3c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4fdf77(_0x37b3c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x37b3c([0x73,0x74,0x61,0x74,0x65])]==_0x37b3c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x28009d(){return _0x4157d7(_0x37b3c([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 _0x214d61(){return _0x4157d7(_0x37b3c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x6e10af(_0x3edafa){const _0x445519=_0x4439a8();_0x5baae6[_0x445519]=_0x37b3c([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3edafa,_0x3edafa!=_0x37b3c([0x56,0x61,0x6c,0x69,0x64])&&_0x42eb41();}function _0x4439a8(){const _0x8d190f=window[_0x37b3c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x37b3c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x37b3c([0x6e,0x6f,0x77])]())[_0x37b3c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x37b3c([0x2e]),'');let _0x35f1f4=_0x37b3c([0x4b]);for(let _0x14b71e=0x0;_0x14b71e<_0x8d190f[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x14b71e+=0x2){let _0x17158b=window[_0x37b3c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x8d190f[_0x37b3c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x14b71e,_0x14b71e+0x2));_0x17158b>=_0x11fe09[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x17158b-=_0x11fe09[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x35f1f4+=_0x11fe09[_0x17158b];}return _0x35f1f4;}function _0x30b38a(){const _0x32307c=_0x4fd7cd[_0x37b3c([0x73,0x70,0x6c,0x69,0x74])](_0x37b3c([0x2e]));if(0x3!=_0x32307c[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5282a7(_0x32307c[0x1]);function _0x5282a7(_0x5e6796){const _0x68cb05=_0x53606a(_0x5e6796);return _0x68cb05&&_0x1c2261()?_0x68cb05:null;function _0x1c2261(){const _0x388d57=_0x68cb05[_0x37b3c([0x6a,0x74,0x69])],_0x57fb07=window[_0x37b3c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x388d57[_0x37b3c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x388d57[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x303070={..._0x68cb05,[_0x37b3c([0x6a,0x74,0x69])]:_0x388d57[_0x37b3c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x388d57[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x303070[_0x37b3c([0x76,0x63])],_0x57039f(_0x303070)==_0x57fb07;}}}async function _0x3c4b09(){let _0x24a70d=!0x0;try{const _0x387481=_0x4fd7cd[_0x37b3c([0x73,0x70,0x6c,0x69,0x74])](_0x37b3c([0x2e])),[_0x58b3c7,_0xad2338,_0x1724e5]=_0x387481;return _0x85b062(_0x58b3c7),await _0x222af4(_0x58b3c7,_0xad2338,_0x1724e5),_0x24a70d;}catch{return!0x1;}function _0x85b062(_0x5d543b){const _0x52c36f=_0x53606a(_0x5d543b);_0x52c36f&&_0x52c36f[_0x37b3c([0x61,0x6c,0x67])]==_0x37b3c([0x45,0x53,0x32,0x35,0x36])||(_0x24a70d=!0x1);}async function _0x222af4(_0x2ba035,_0x242799,_0x1b44fc){const _0x56709a=window[_0x37b3c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x37b3c([0x66,0x72,0x6f,0x6d])](_0x479258(_0x1b44fc),_0x518a1f=>_0x518a1f[_0x37b3c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x181232=new window[(_0x37b3c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x37b3c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2ba035+_0x37b3c([0x2e])+_0x242799),_0x2a0f90=window[_0x37b3c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x37b3c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2a0f90)return;const _0x3dba1d=await _0x2a0f90[_0x37b3c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x37b3c([0x6a,0x77,0x6b]),_0x3f60d8,{[_0x37b3c([0x6e,0x61,0x6d,0x65])]:_0x37b3c([0x45,0x43,0x44,0x53,0x41]),[_0x37b3c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x37b3c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x37b3c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2a0f90[_0x37b3c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x37b3c([0x6e,0x61,0x6d,0x65])]:_0x37b3c([0x45,0x43,0x44,0x53,0x41]),[_0x37b3c([0x68,0x61,0x73,0x68])]:{[_0x37b3c([0x6e,0x61,0x6d,0x65])]:_0x37b3c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3dba1d,_0x56709a,_0x181232)||(_0x24a70d=!0x1);}}function _0x53606a(_0x27d7ff){return _0x27d7ff[_0x37b3c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x37b3c([0x65,0x79]))?JSON[_0x37b3c([0x70,0x61,0x72,0x73,0x65])](_0x479258(_0x27d7ff)):null;}function _0x479258(_0x48ad16){return window[_0x37b3c([0x61,0x74,0x6f,0x62])](_0x48ad16[_0x37b3c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x37b3c([0x2b]))[_0x37b3c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x37b3c([0x2f])));}function _0x57039f(_0x7e2c23){let _0x10ee37=0x1505;function _0x2b3350(_0x5838c7){for(let _0x2bd1d7=0x0;_0x2bd1d7<_0x5838c7[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2bd1d7++){const _0x30f958=_0x5838c7[_0x37b3c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2bd1d7);_0x10ee37=(_0x10ee37<<0x5)+_0x10ee37+_0x30f958,_0x10ee37&=_0x10ee37;}}function _0x43b1ee(_0x23c796){Array[_0x37b3c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x23c796)?_0x23c796[_0x37b3c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x43b1ee):_0x23c796&&typeof _0x23c796==_0x37b3c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x37b3c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x23c796)[_0x37b3c([0x73,0x6f,0x72,0x74])]()[_0x37b3c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x365862,_0x409846])=>{_0x2b3350(_0x365862),_0x43b1ee(_0x409846);}):_0x2b3350(window[_0x37b3c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x23c796));}return _0x43b1ee(_0x7e2c23),_0x10ee37>>>0x0;}function _0x10e51c(_0xb1b4bd){return _0xb1b4bd[_0x37b3c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x37b3c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x37b3c([0x30]));}function _0x313413(_0x737c35){return _0x737c35[_0x37b3c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x37b3c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x37b3c([0x6a,0x6f,0x69,0x6e])]('');}function _0x4157d7(_0x2d931f){return _0x5baae6[_0x37b3c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x37b3c([0x68,0x61,0x73])](_0x2d931f);}function _0x4fdf77(_0x6c5df7){return _0x5baae6[_0x37b3c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x37b3c([0x67,0x65,0x74])](_0x6c5df7);}function _0x81a223(){}function _0x37b3c(_0x1f5afa){return _0x1f5afa['map'](_0x122ea8=>String['fromCharCode'](_0x122ea8))['join']('');}_0x6e10af(await _0x45732c());}(this);}['destroy'](){const _0x463738=this['editor']['plugins']['get'](Qt),_0x3cf29e=this['editor']['config']['get']('collaboration.channelId');for(const _0x31213f of _0x463738['getCommentThreads']({'channelId':_0x3cf29e}))_0x463738['_detachCommentThread'](_0x31213f['id']),_0x463738['_threads']['delete'](_0x31213f['id']);super['destroy']();}['hasMarkerForId'](_0x22fc84){return this['getAllMarkersForId'](_0x22fc84)['length']>0x0;}['getAllMarkersForId'](_0x595615){const _0x3fdf63=[];for(const _0x48ffb8 of this['editor']['model']['markers'])_0x48ffb8['name']['startsWith']('comment:'+_0x595615)&&_0x3fdf63['push'](_0x48ffb8);return _0x3fdf63;}['scrollToThreadMarker'](_0x2e8aa3){setTimeout(()=>{const _0x23f8f1=this['_getTargetForId'](_0x2e8aa3);if(!_0x23f8f1)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x2e8aa3&&_0x12c9fb({'target':_0x23f8f1[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5c938f){this['editor']['model']['change'](()=>{for(const _0x1572b3 of this['getAllMarkersForId'](_0x5c938f))this['editor']['editing']['reconvertMarker'](_0x1572b3);});}['_attachArchivedThread'](_0x145d02){const _0x582760=this['editor']['plugins']['get'](Qt),_0x571d78=this['editor']['plugins']['get'](si),_0x58c318=_0x582760['getCommentThread'](_0x145d02);if(!_0x58c318['isAttached']){const _0x17a35a=_0x58c318['attachTo'](()=>this['_getTargetForId'](_0x58c318['id']));_0x571d78['registerAnnotation'](_0x17a35a),_0x58c318['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x37e74c=this['editor'],_0x39ff5f=_0x37e74c['plugins']['get'](_0xdd578);_0x37e74c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xd18f96,_0x4ad110)=>{const {id:_0x120e80}=hi(_0xd18f96['markerName']),_0x55c267=_0x37e74c['plugins']['get'](Qt)['getCommentThread'](_0x120e80),_0x50b746=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x120e80;let _0x7a750d;if(_0x55c267&&_0x55c267['isResolved']&&!_0x50b746&&_0xd18f96['item'])return _0x4ad110['consumable']['consume'](_0xd18f96['item'],'addMarker:'+_0xd18f96['markerName']),_0x4ad110['consumable']['consume'](_0xd18f96['item'],'removeMarker:'+_0xd18f96['markerName']),null;const _0x189b99=['ck-comment-marker'];return _0x50b746&&_0x189b99['push']('ck-comment-marker--active'),_0x7a750d=_0x55c267?.['length']?_0x55c267['comments']['first']['author']['id']:_0x39ff5f['me']['id'],{'classes':_0x189b99,'attributes':{'data-comment':_0x120e80,'data-author-id':_0x7a750d}};}}),_0x37e74c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xc941ec,{options:_0x5bf99c})=>{if(_0x5bf99c['showCommentHighlights'])return null;const _0x2d9038=_0x37e74c['plugins']['get'](Qt),_0x416496=_0x37e74c['model']['markers']['get'](_0xc941ec),{id:_0x3406d1,part:_0x544e7e}=hi(_0xc941ec);return _0x416496&&!_0x416496['affectsData']||_0x5bf99c['ignoreResolvedComments']&&_0x2d9038['getCommentThread'](_0x3406d1)?.['isResolved']?null:{'group':'comment','name':_0x544e7e?_0x3406d1+':'+_0x544e7e:_0x3406d1};}}),_0x37e74c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x558847,{writer:_0x2f10cb})=>_0x2f10cb['createElement']('$marker',{'data-name':'comment:'+_0x558847['getAttribute']('id')})}),_0x37e74c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x220de9=this['editor'],_0x4d85e9=_0x220de9['plugins']['get'](Qt),_0x581a93=new Set(),_0x107d13=new Set();_0x220de9['model']['document']['registerPostFixer'](_0x57c9c9=>{let _0x9da9b8=!0x1;for(const {name:_0x25b89f,data:_0x437bfa}of _0x220de9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x432613,id:_0x42703f}=hi(_0x25b89f);let _0x491c29=_0x437bfa['newRange'];if('comment'!==_0x432613||!_0x491c29)continue;const _0x32acb0='$graveyard'===_0x491c29['root']['rootName'];_0x32acb0||(_0x491c29=li(_0x491c29,_0x220de9['model']),!_0x491c29||_0x491c29['isCollapsed']||!_0x437bfa['newRange']||_0x491c29['isEqual'](_0x437bfa['newRange']))?_0x220de9['model']['hasContent'](_0x491c29)&&!_0x32acb0?this['isThreadsLoadingPaused']?_0x581a93['add'](_0x25b89f):this['_handleThreadMarker'](_0x25b89f,_0x42703f):(_0x107d13['add'](_0x25b89f),_0x581a93['delete'](_0x25b89f),_0x57c9c9['removeMarker'](_0x25b89f),_0x9da9b8=!0x0):(_0x57c9c9['updateMarker'](_0x25b89f,{'range':_0x491c29}),_0x9da9b8=!0x0);}return _0x9da9b8;}),this['on']('change:isThreadsLoadingPaused',(_0x5167de,_0x84ad7a,_0x3a320e)=>{if(!_0x3a320e&&_0x581a93['size'])for(const _0x4b7c18 of _0x581a93){const {id:_0x51cedd}=hi(_0x4b7c18);_0x581a93['delete'](_0x4b7c18),_0x220de9['model']['markers']['get'](_0x4b7c18)&&this['_handleThreadMarker'](_0x4b7c18,_0x51cedd);}}),this['listenTo'](_0x220de9['model']['document'],'change',()=>{for(const {name:_0x56c0be,data:{newRange:_0x22dbcc}}of _0x220de9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5d82d4,id:_0x2c859a}=hi(_0x56c0be);if('comment'!==_0x5d82d4)continue;const _0x3cb59b=_0x4d85e9['getCommentThread'](_0x2c859a),_0x185e08=this['hasMarkerForId'](_0x2c859a);_0x3cb59b&&(!_0x3cb59b['_hasTargetInContent']&&_0x22dbcc&&_0x220de9['editing']['view']['once']('render',()=>{const _0x5c2fbf=_0x220de9['plugins']['get']($t),_0xf4b6ba=_0x4d85e9['_threadToController']['get'](_0x3cb59b)['view'];_0x5c2fbf['getByInnerView'](_0xf4b6ba)['refreshVisibility']();},{'priority':'low'}),_0x3cb59b['_hasTargetInContent']=_0x185e08||!!_0x22dbcc),_0x22dbcc||(_0x107d13['add'](_0x56c0be),_0x581a93['delete'](_0x56c0be));}for(const _0x24ab21 of _0x107d13){const {id:_0x18d1ad}=hi(_0x24ab21),_0x2d7bcf=_0x4d85e9['getCommentThread'](_0x18d1ad);if(_0x581a93['delete'](_0x24ab21),!_0x2d7bcf)continue;const _0x4287d9=this['hasMarkerForId'](_0x18d1ad);_0x4287d9||_0x2d7bcf['isSubmitted']?_0x4287d9||_0x2d7bcf['unlinkedAt']||_0x2d7bcf['setUnlinkedAt'](new Date()):_0x2d7bcf['remove']();}_0x107d13['clear']();});}['_handleInitialThreads'](_0x662107){_0x662107['forEach'](_0x2249cf=>{_0x2249cf['unlinkedAt']&&this['_attachArchivedThread'](_0x2249cf['id']);});}['_getTargetForId'](_0x455a7c){const _0x5d2398=this['editor'],_0x3f27e6=this['getAllMarkersForId'](_0x455a7c);return _0x29895f(_0x5d2398['editing'],_0x3f27e6);}['_getTextContext'](_0x5556f6){const _0x4bc392=this['getAllMarkersForId'](_0x5556f6);let _0x41c7d3='',_0x153ad0=!0x1;for(const _0x23f97e of _0x4bc392){const _0x2834f6=_0x23f97e['getRange']();for(const _0x3822fa of Array['from'](_0x2834f6['getItems']()))_0x3822fa['is']('$textProxy')?(_0x41c7d3&&_0x153ad0&&(_0x41c7d3+='\x20',_0x153ad0=!0x1),_0x41c7d3+=_0x3822fa['data']):_0x153ad0=!0x0;_0x153ad0=!0x0;}return _0x41c7d3['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5b036f,_0x4063bd){const _0x3214fe=this['editor'],_0x5ec04f=_0x3214fe['plugins']['get'](Qt);let _0x412845=_0x5ec04f['getCommentThread'](_0x4063bd);const _0x465a6e=_0x3214fe['config']['get']('collaboration.channelId'),_0x5e8d6d=_0x3214fe['plugins']['get'](si);if(_0x412845&&(_0x412845['unlinkedAt']&&_0x412845['setUnlinkedAt'](null),_0x412845['isAttached']))return _0x412845;return!this['getAllMarkersForId'](_0x4063bd)[0x0]['managedUsingOperations']?_0x3214fe['editing']['view']['once']('render',()=>{if(_0x5ec04f['getCommentThread'](_0x4063bd))return;const _0x416344=_0x3214fe['plugins']['get']($t);_0x412845=_0x5ec04f['openNewCommentThread']({'channelId':_0x465a6e,'threadId':_0x4063bd,'target':()=>this['_getTargetForId'](_0x4063bd),'context':{'type':'text','value':this['_getTextContext'](_0x4063bd)}});const _0x544c7a=_0x5ec04f['_threadToController']['get'](_0x412845)['view'],_0x4674eb=_0x416344['getByInnerView'](_0x544c7a);_0x4674eb&&_0x5e8d6d['registerAnnotation'](_0x4674eb);},{'priority':'low'}):_0x5ec04f['fetchCommentThread']({'channelId':_0x465a6e,'threadId':_0x4063bd})['then'](_0x3e10f0=>{if('destroyed'!==_0x3214fe['state']){if(_0x412845=_0x3e10f0,_0x412845&&!_0x412845['isAttached']){const _0x2a50b3=_0x412845['attachTo'](()=>this['_getTargetForId'](_0x4063bd));_0x5e8d6d['registerAnnotation'](_0x2a50b3),_0x412845['isResolved']&&this['_reconvertMarkers'](_0x4063bd);}else{if(!_0x412845){const _0x59ba86=this['getAllMarkersForId'](_0x4063bd);_0x3214fe['model']['change'](_0xf4d275=>{for(const _0x4ec3c4 of _0x59ba86)_0xf4d275['removeMarker'](_0x4ec3c4);});}}}}),_0x412845;}['_handleThreadMarker'](_0x33c963,_0x2188f7){const _0x452576=this['_attachMarkerToThread'](_0x33c963,_0x2188f7);_0x452576&&!_0x452576['context']&&_0x452576['setContext']({'type':'text','value':this['_getTextContext'](_0x2188f7)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4be283=this['editor'];_0x316fd3(_0x4be283['model'],({left:_0x159728,entered:_0xc79b99})=>{for(const _0x1ad2b5 of _0x159728)if(ui(_0x1ad2b5)){_0x4be283['ui']['ariaLiveAnnouncer']['announce'](bt(_0x4be283['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4bf756 of _0xc79b99)if(ui(_0x4bf756)){_0x4be283['ui']['ariaLiveAnnouncer']['announce'](bt(_0x4be283['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x57757a(_0x46e7bf)));break;}});}}function di(_0x2b01c0,_0x2ea458){return _0x2ea458?_0x2b01c0+':'+_0x2ea458:_0x2b01c0;}function li(_0x10bf67,_0x4506d0){const _0x36953f=_0x4506d0['schema'],_0x5d5f9a=_0x4506d0['createRange'](_0x10bf67['start']);for(const _0x3411b2 of _0x10bf67['getWalker']()){const {type:_0x486a40,item:_0x5af265,nextPosition:_0x42b830}=_0x3411b2;if('text'===_0x486a40||_0x36953f['isObject'](_0x5af265)){const _0x30445d=_0x4506d0['createPositionBefore'](_0x5af265);_0x5d5f9a['isCollapsed']&&(_0x5d5f9a['start']=_0x30445d),_0x5d5f9a['end']=_0x42b830;}}return _0x5d5f9a;}function ui(_0x2ce202){return'comment'===hi(_0x2ce202['name'])['group'];}class mi extends _0x3eacd6{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x365599=this['editor'],_0x5a89c4=_0x365599['plugins']['get'](Qt),_0x3f0eee=_0x365599['plugins']['get'](ci),_0xb4bbbc=_0x365599['plugins']['get']($t),_0x2cfcb6=_0x365599['plugins']['get'](si);_0x365599['ui']['componentFactory']['add']('comment',()=>{const _0x346f6a=this['_createUIButton'](_0x542a2);return _0x346f6a['tooltip']=!0x0,_0x346f6a;}),_0x365599['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x2cfcb6['addSourceCollector'](()=>{const _0x3de9db=[];for(const [_0x27c0f4,_0x587bb4]of _0x5a89c4['_threadToController']){const _0x1c76d2=_0x3f0eee['getAllMarkersForId'](_0x27c0f4['id']),_0x3021d4=_0x1c76d2['map'](_0x21acbe=>_0x21acbe['getRange']());_0x1c76d2['length']>0x0&&_0x3de9db['push']([_0x587bb4['view'],_0x3021d4]);}return _0x3de9db;}),this['listenTo'](_0xb4bbbc,'change:activeAnnotations',(_0x4dab4c,_0x461272,_0x48c1b8)=>{const _0x155fb8=Array['from'](_0x48c1b8)['map'](_0x32e7bf=>_0x32e7bf['innerView'])['find'](_0x4ed0f7=>_0x5a89c4['_viewToController']['has'](_0x4ed0f7));if(!_0x155fb8)return void(_0x3f0eee['activeMarker']=null);const _0x55aae8=_0x5a89c4['_viewToController']['get'](_0x155fb8)['model']['id'],_0x22d072='comment:'+_0x55aae8;_0x55aae8&&_0x3f0eee['hasMarkerForId'](_0x55aae8)?_0x3f0eee['activeMarker']=_0x22d072:_0x3f0eee['activeMarker']&&(_0x3f0eee['activeMarker']=null);}),this['listenTo'](_0x5a89c4,'removeCommentThread',(_0x309b7b,{threadId:_0x2596c0,isFromAdapter:_0x383b01})=>{!_0x383b01&&_0x365599['ui']['focusTracker']['isFocused']&&_0x3f0eee['hasMarkerForId'](_0x2596c0)&&_0x365599['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x5a89c4,'addComment',(_0x3969a1,{threadId:_0x1bbfab,isFromAdapter:_0x4e5c42})=>{if(_0x4e5c42||!_0x3f0eee['hasMarkerForId'](_0x1bbfab)||!_0x5a89c4['hasCommentThread'](_0x1bbfab))return;0x1===_0x5a89c4['getCommentThread'](_0x1bbfab)['length']&&(_0x365599['editing']['view']['focus'](),_0x3969a1['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x14e7f2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1e0432;for(const _0x83b5c1 in _0x14e7f2){const _0x233b60=_0x83b5c1,_0x368373=_0x14e7f2[_0x233b60];if('commentsLicenseKeyValid'==_0x368373||'commentsLicenseKeyInvalid'==_0x368373||'commentsLicenseKeyExpired'==_0x368373||'commentsLicenseKeyDomainLimit'==_0x368373||'commentsLicenseKeyNotAllowed'==_0x368373||'commentsLicenseKeyEvaluationLimit'==_0x368373||'commentsLicenseKeyUsageLimit'==_0x368373){delete _0x14e7f2[_0x233b60],_0x1e0432=_0x368373,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1e0432&&_0x14e7f2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1e0432&&_0x14e7f2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1e0432&&_0x14e7f2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1e0432&&_0x14e7f2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1e0432&&_0x14e7f2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1e0432&&_0x14e7f2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xa33dc1){const _0x116719=this['editor'],_0x2f571f=new _0xa33dc1(_0x116719['locale']),_0x2958af=_0x116719['commands']['get']('addCommentThread');return _0x2f571f['set']({'label':bt(_0x116719['locale'],'Comment'),'icon':_0x49bd39}),_0x2f571f['bind']('isEnabled')['to'](_0x2958af,'isEnabled',_0x2958af,'hasContent',(_0x20020e,_0x3bae3c)=>_0x20020e&&_0x3bae3c),this['listenTo'](_0x2f571f,'execute',()=>{_0x2958af['execute']();}),_0x2f571f;}}class fi extends _0x3eacd6{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x3c24bf){super(_0x3c24bf),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x28afa3,_0x502453,_0x59c93)=>{_0x59c93?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2c8ff6,_0x1a1338]of this['editor']['commands'])_0x1a1338['affectsData']&&'addCommentThread'!==_0x2c8ff6&&_0x1a1338['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x106d89=this['editor']['editing']['view']['document'];this['listenTo'](_0x106d89,'cut',_0x1d0a66=>_0x1d0a66['stop'](),{'priority':'highest'}),this['listenTo'](_0x106d89,'clipboardInput',_0x615608=>_0x615608['stop'](),{'priority':'highest'}),this['listenTo'](_0x106d89,'delete',_0x15bb78=>_0x15bb78['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x48a4b7,_0x14148a]of this['editor']['commands'])_0x14148a['affectsData']&&'addCommentThread'!==_0x48a4b7&&_0x14148a['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x3d766a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1a880c){super(_0x1a880c),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3c7b36=this['context']['plugins']['get']($t);this['listenTo'](_0x3c7b36,'_activateAnnotation',(_0x5ad534,_0x56009f)=>{for(const _0x557bc6 of this['activeUIs']){const _0x4d0f66=this['_uis']['get'](_0x557bc6);(0x0,this['uisData']['get'](_0x557bc6)['filter'])(_0x56009f)&&_0x4d0f66['setActiveAnnotation'](_0x56009f);}}),this['listenTo'](_0x3c7b36,'_deactivateAllAnnotations',()=>{for(const _0xea7e23 of this['activeUIs']){this['_uis']['get'](_0xea7e23)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3c7b36['_visibleAnnotations'],'add',(_0x5857f1,_0x4edf8a)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4edf8a);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5ec1c5){return this['activeUIs']['has'](_0x5ec1c5);}['activate'](_0x23c6b5,_0x4caf50=this['defaultFilter']){const _0x1c9b0a=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x23c6b5))throw new _0x36d19a('annotationsuis-missing-ui',this,{'uiName':_0x23c6b5});this['isActive'](_0x23c6b5)&&this['deactivate'](_0x23c6b5),this['activeUIs']['add'](_0x23c6b5);const _0x5ab8df=new jt();Xt({'source':_0x1c9b0a['_visibleAnnotations'],'target':_0x5ab8df,'filter':_0x4caf50}),this['uisData']['set'](_0x23c6b5,{'collection':_0x5ab8df,'filter':_0x4caf50});const _0x28f502=this['_uis']['get'](_0x23c6b5);_0x28f502['attach'](_0x5ab8df),this['listenTo'](_0x28f502,'change:activeAnnotation',(_0x11d6c6,_0x53e8c4,_0x2466f0,_0x15ff8e)=>{_0x15ff8e&&_0x1c9b0a['_removeActiveAnnotation'](_0x15ff8e),_0x2466f0&&_0x1c9b0a['_addActiveAnnotation'](_0x2466f0);});}['deactivate'](_0x4d8e02){if(this['activeUIs']['delete'](_0x4d8e02),!this['_uis']['has'](_0x4d8e02))throw new _0x36d19a('annotationsuis-missing-ui',this,{'uiName':_0x4d8e02});const _0x4d8733=this['_uis']['get'](_0x4d8e02);_0x4d8733['detach'](),this['stopListening'](_0x4d8733),this['uisData']['get'](_0x4d8e02)['collection']['destroy'](),this['uisData']['delete'](_0x4d8e02);}['switchTo'](_0xc9332b){if(!this['_uis']['has'](_0xc9332b))throw new _0x36d19a('annotationsuis-missing-ui',this,{'uiName':_0xc9332b});const _0x398cbc=this['context']['plugins']['get']($t),_0x5e2cf1=Array['from'](_0x398cbc['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xc9332b);const _0x57d5c7=this['_uis']['get'](_0xc9332b);_0x57d5c7['setActiveAnnotation'](_0x5e2cf1),_0x57d5c7['_setSelectedAnnotations']&&_0x5e2cf1&&_0x57d5c7['_setSelectedAnnotations']([_0x5e2cf1]);}['deactivateAll'](){for(const _0x305508 of this['activeUIs'])this['deactivate'](_0x305508);}['register'](_0x35a6f9,_0x1b3b5c){if(this['_uis']['has'](_0x35a6f9))throw new _0x36d19a('annotationsuis-register-already-registered');if('function'!=typeof _0x1b3b5c['attach']||'function'!=typeof _0x1b3b5c['detach']||'function'!=typeof _0x1b3b5c['setActiveAnnotation'])throw new _0x36d19a('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x35a6f9,_0x1b3b5c);}['refilterAnnotations'](){const _0x31f2dd=this['context']['plugins']['get']($t)['collection'],_0x486c3e=new Map(),_0x47b705=Array['from'](this['activeUIs']);for(const _0x5daa5b of this['activeUIs']){const _0x36500e=this['uisData']['get'](_0x5daa5b)['collection'];for(const _0x4c729 of _0x36500e)_0x486c3e['set'](_0x4c729,_0x5daa5b);}for(const _0x2e99ef of _0x31f2dd){const _0x5d1c53=_0x486c3e['get'](_0x2e99ef);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2e99ef);const _0x4d8c3b=_0x47b705['find'](_0x34f6c1=>this['uisData']['get'](_0x34f6c1)['filter'](_0x2e99ef));_0x5d1c53!==_0x4d8c3b&&(_0x5d1c53&&this['uisData']['get'](_0x5d1c53)['collection']['remove'](_0x2e99ef),_0x4d8c3b&&this['uisData']['get'](_0x4d8c3b)['collection']['add'](_0x2e99ef));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x185967){const _0x8ebf11=[];for(const _0xf1670c of this['activeUIs']){(0x0,this['uisData']['get'](_0xf1670c)['filter'])(_0x185967)&&_0x8ebf11['push'](_0xf1670c);}if(_0x8ebf11['length']>0x1)throw new _0x36d19a('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x8ebf11,'annotationType':_0x185967['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x23edf6('px');class Ai extends _0x719be3{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x435ef7){super(_0x435ef7),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0xcf9b93,_0xc5ae09)=>_0xcf9b93+_0xc5ae09),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4c06ce=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4c06ce['to']('isAnimationDisabled',_0x4e369c=>_0x4e369c?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4c06ce['to']('top',_0x54cc75=>gi(_0x54cc75))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2e4f5e=this['element']['clientHeight'];_0x2e4f5e&&(this['height']=_0x2e4f5e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x3d766a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4cbb56){super(_0x4cbb56),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 _0x126374=this['context']['config']['get']('sidebar.container');_0x126374&&this['setContainer'](_0x126374);}['setContainer'](_0x1a54a8){if(!yi(_0x1a54a8))throw new _0x36d19a('sidebar-setcontainer-invalid-element');this['container']=_0x1a54a8;}['_attachToContainer']({viewClass:_0x2110f2='',spaceBetweenItems:_0x4066a6=0x19}={}){if(!yi(this['container']))throw new _0x36d19a('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2110f2,this['_spaceBetweenItems']=_0x4066a6;}['rearrange']({removedAnnotation:_0xe6264e,previousAnnotation:_0x2c74db,nextAnnotation:_0x3284ce}){const _0x3be5fc=this['getSidebarItemView'](_0xe6264e);this['view']['list']['remove'](_0x3be5fc),this['_destroySidebarItemView'](_0xe6264e),_0x2c74db&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2c74db)),_0x3284ce&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3284ce)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x514630,activatedAnnotation:_0x1c87a3,disableAnimationOnActivatedAnnotation:_0x187a05}){if(this['_activeAnnotation']=_0x1c87a3,_0x514630){_0x514630['isActive']=!0x1;const _0x239e54=this['getSidebarItemView'](_0x514630);_0x239e54&&_0x187a05&&(_0x239e54['isAnimationDisabled']=!0x1);}if(_0x1c87a3){const _0x12f142=this['getSidebarItemView'](_0x1c87a3);_0x12f142&&(_0x1c87a3['isActive']=!0x0,_0x187a05&&(_0x12f142['isAnimationDisabled']=!0x0,_0x12f142['top']+=0x1),this['_alignToTargetRect'](_0x12f142));}}['_detachFromContainer'](_0x5c1161){if(this['view']['element']['remove'](),_0x5c1161){for(const _0x33e7d7 of _0x5c1161)this['_destroySidebarItemView'](_0x33e7d7);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2c67f5,_0x1b1e70){_0x1b1e70||(_0x1b1e70=_0x2c67f5['view']);const _0x154381=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x154381,_0x2c67f5),this['_annotationToSidebarItemView']['set'](_0x2c67f5,_0x154381),_0x154381['content']['add'](_0x1b1e70),this['listenTo'](_0x2c67f5['view'],'change:targetRect',(_0x25c549,_0x39e50c,_0x5be84a)=>{const _0x5b700c=this['_getTargetTop'](_0x2c67f5,_0x5be84a);_0x154381['_targetTop']!=_0x5b700c&&(_0x154381['_targetTop']=_0x5b700c,this['_setItemTop'](_0x154381,_0x5b700c));}),this['listenTo'](_0x154381,'change:top',()=>{this['_recalculate'](_0x154381,'top');}),this['listenTo'](_0x154381,'change:bottom',()=>{this['_recalculate'](_0x154381,'bottom');}),this['_alignToTargetRect'](_0x154381);const _0x466125=this['_getItemBefore'](_0x154381);if(_0x466125)this['_alignAfterItem'](_0x466125,_0x154381)||this['_alignToTargetRect'](_0x154381);else this['_alignToTargetRect'](_0x154381);return this['_updateLastItem'](),this['view']['list']['add'](_0x154381),_0x154381;}['_alignForTopChange'](_0x3bada6){if(!_0x3bada6['content']['length'])return;const _0xaf1ae8=this['_getItemBefore'](_0x3bada6);if(!_0xaf1ae8)return;const _0x1b1b18=this['_sidebarItemViewToAnnotation']['get'](_0xaf1ae8),_0x1ed5ef=this['_activeAnnotation'];_0x1ed5ef&&_0x1ed5ef===_0x1b1b18?this['_alignAfterItem'](_0xaf1ae8,_0x3bada6):this['_alignBeforeItem'](_0x3bada6,_0xaf1ae8);}['_alignForBottomChange'](_0x4bed5a){if(!_0x4bed5a['content']['length'])return;const _0x1072fa=this['_getItemAfter'](_0x4bed5a);if(!_0x1072fa)return;const _0x560cb6=this['_sidebarItemViewToAnnotation']['get'](_0x1072fa),_0x1ae35b=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4c1a84=this['_activeAnnotation'];_0x4c1a84&&_0x4c1a84===_0x560cb6&&_0x1ae35b?(this['_alignBeforeItem'](_0x1072fa,_0x4bed5a),this['_alignAfterItem'](_0x4bed5a,_0x1072fa)):_0x4c1a84&&_0x4c1a84===_0x560cb6?this['_alignBeforeItem'](_0x1072fa,_0x4bed5a):this['_alignAfterItem'](_0x4bed5a,_0x1072fa);}['_recalculate'](_0xeed1cb,_0xe2a85c){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x53171b,changedProp:_0x3e9cf8}of this['_recalculateBuffer'])'top'===_0x3e9cf8?this['_alignForTopChange'](_0x53171b):this['_alignForBottomChange'](_0x53171b);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xeed1cb,'changedProp':_0xe2a85c});}['getSidebarItemView'](_0x1bdcd6){return this['_annotationToSidebarItemView']['get'](_0x1bdcd6);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1035c7){const _0x4028b6=this['getSidebarItemView'](_0x1035c7);this['stopListening'](_0x4028b6),this['stopListening'](_0x1035c7['view']),_0x4028b6['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1035c7),this['_sidebarItemViewToAnnotation']['delete'](_0x4028b6);}['_createSidebarView'](){const _0x439144=new _i(this['context']['locale']);return _0x439144['render'](),this['on']('change:_lastItem',(_0x24dd7c,_0x38a541,_0x23904d,_0x52ef5d)=>{_0x52ef5d&&_0x439144['unbind']('minHeight'),_0x23904d?_0x439144['bind']('minHeight')['to'](_0x23904d,'bottom'):_0x439144['minHeight']=null;}),_0x439144;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x25fe82){const _0x43ded3=this['_sidebarItemViewToAnnotation']['get'](_0x25fe82),_0x5a8911=_0x43ded3&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x43ded3)-0x1);return _0x5a8911&&this['getSidebarItemView'](_0x5a8911)||null;}['_getItemAfter'](_0x20733f){const _0x5ed69e=this['_sidebarItemViewToAnnotation']['get'](_0x20733f),_0x5661d9=_0x5ed69e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5ed69e)+0x1);return _0x5661d9&&this['getSidebarItemView'](_0x5661d9)||null;}['_alignBeforeItem'](_0x4d8a06,_0x4992e9){_0x4d8a06['updateHeight']();const _0xd322b7=vi(_0x4992e9['bottom']+this['_spaceBetweenItems'],_0x4d8a06['top']);return!!_0xd322b7&&(this['_setItemTop'](_0x4992e9,_0x4992e9['top']-_0xd322b7),!0x0);}['_alignAfterItem'](_0xab9c26,_0x37e41a){_0xab9c26['updateHeight']();const _0x538c66=vi(_0xab9c26['bottom']+this['_spaceBetweenItems'],_0x37e41a['top']);return!!_0x538c66&&(this['_setItemTop'](_0x37e41a,_0x37e41a['top']+_0x538c66,!0x1),!0x0);}['_alignToTargetRect'](_0x2ce39f){const _0x42101c=this['_sidebarItemViewToAnnotation']['get'](_0x2ce39f);if(!_0x42101c||!_0x42101c['target']||!_0x42101c['targetRect'])return;const _0x585686=this['_getTargetTop'](_0x42101c,_0x42101c['targetRect']);this['_setItemTop'](_0x2ce39f,_0x585686);}['_getTargetTop'](_0x596e16,_0x30a736){if(null===_0x30a736)return 0x0;if(_0x596e16['target']instanceof _0x1a3832)return _0x30a736['top'];{const _0x5e6467=new _0x1a3832(this['view']['element'])['top'];return _0x30a736['top']-_0x5e6467;}}['_setItemTop'](_0x3c584b,_0x192b3e,_0x39bc23=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x39bc23&&(_0x192b3e=Math['max'](_0x192b3e,this['_getMaxAvailableTop'](_0x3c584b))),_0x3c584b['top']=_0x192b3e;}['_getMaxAvailableTop'](_0x753b6e){let _0x4bbbc1=this['_getItemBefore'](_0x753b6e),_0xabf849=0x0;for(;_0x4bbbc1;)_0x4bbbc1['updateHeight'](),_0xabf849+=this['_spaceBetweenItems']+_0x4bbbc1['height'],_0x4bbbc1=this['_getItemBefore'](_0x4bbbc1);return _0xabf849;}}function vi(_0x1fbff3,_0x3954db){return Math['max'](_0x1fbff3-_0x3954db,0x0);}function yi(_0x4c206e){return null!==_0x4c206e&&'object'==typeof _0x4c206e&&0x1===_0x4c206e['nodeType'];}class Ci extends _0x3d766a{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19adc8){super(_0x19adc8),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2ed34f(),this['_refreshPositioningDebounced']=_0x58129b(()=>{_0x19adc8['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x319cd6=this['context']['plugins']['get'](pi),_0x106816=this['context']['plugins']['get'](Ti);_0x319cd6['register']('wideSidebar',this),_0x106816['container']&&_0x319cd6['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x12daf1){if(_0x12daf1===this['activeAnnotation'])return;const _0x318a81=this['context']['plugins']['get'](Ti);_0x318a81['_activeAnnotation']=_0x12daf1;const _0x3f8caf=this['activeAnnotation'];_0x318a81['refresh']({'blurredAnnotation':_0x3f8caf,'activatedAnnotation':_0x12daf1}),this['activeAnnotation']=_0x12daf1;}['attach'](_0x54234d){this['annotations']=_0x54234d;const _0x4c00e6=this['context']['plugins']['get'](Ti);if(_0x4c00e6['_annotations']=_0x54234d,this['isAttached'])throw new _0x36d19a('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4c00e6,'set:container',()=>{this['detach'](),this['listenTo'](_0x4c00e6,'change:container',_0xfae379=>{_0xfae379['off'](),this['attach'](_0x54234d);});}),_0x4c00e6['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4a85ae=_0x110f14=>{_0x110f14['updateTargetRect'](),_0x4c00e6['addAnnotation'](_0x110f14);};for(const _0x4f8e85 of _0x54234d)_0x4a85ae(_0x4f8e85);this['listenTo'](_0x54234d,'add',(_0x3f9223,_0x41be15)=>{_0x4a85ae(_0x41be15);}),this['listenTo'](_0x54234d,'remove',(_0x54e466,_0x561764,_0x67b2d9)=>{_0x4c00e6['rearrange']({'removedAnnotation':_0x561764,'previousAnnotation':_0x54234d['get'](_0x67b2d9-0x1),'nextAnnotation':_0x54234d['get'](_0x67b2d9+0x1)}),_0x561764===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x54234d,'focus',(_0x47754c,_0x416aec)=>{this['setActiveAnnotation'](_0x416aec);}),this['listenTo'](_0x54234d,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1e0811=this['context']instanceof _0x35effb?this['context']['editors']:new _0x2ed34f([this['context']]);for(const _0x4c4874 of _0x1e0811)this['_integrateWithEditorAnnotations'](_0x4c4874);this['listenTo'](_0x1e0811,'add',(_0x43ffcb,_0x5a73a6)=>{this['listenTo'](_0x5a73a6,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5a73a6);});}),this['listenTo'](_0x1e0811,'remove',(_0x40322a,_0x3a7a43)=>{_0x3a7a43['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3a7a43['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x36d19a('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2cc596=this['context']['plugins']['get'](Ti);_0x2cc596['_detachFromContainer'](this['annotations']),this['stopListening'](_0x2cc596),this['stopListening'](this['annotations']),this['context']instanceof _0x35effb&&this['stopListening'](this['context']['editors']);for(const _0x3abbeb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3abbeb);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4d24fe){if(!_0x4d24fe['plugins']['has']('EditorAnnotations'))return;const _0x3e7e35=_0x4d24fe['plugins']['get']('EditorAnnotations'),_0x35d9b9=()=>{const _0x2a0a0e=_0x3e7e35['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2a0a0e[0x0]||null);};this['listenTo'](_0x3e7e35,'refresh',_0x35d9b9),this['listenTo'](_0x3e7e35,'blur',(_0xb3d794,{isAnnotationTracked:_0xeaafb8})=>{this['activeAnnotation']&&_0xeaafb8(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3e7e35,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3ac4e1=>{_0x3e7e35['hasDomSelection']()&&(_0x35d9b9(),_0x3ac4e1['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3e7e35);}['_destroyEditorAnnotationsIntegration'](_0x3397b4){this['stopListening'](_0x3397b4),this['_editorAnnotations']['remove'](_0x3397b4);}}class Ii extends _0x542a2{['counterView'];constructor(_0x10f1c5){super(_0x10f1c5);const _0x1442f7=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x7d1698,_0x269d8a)=>_0x7d1698?'...':_0x269d8a['toString']()),this['set']('annotationType',''),this['icon']=_0x49bd39,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x719be3(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1442f7['to']('annotationType',_0x52f2ce=>'ck-annotation-counter__badge--'+_0x52f2ce),_0x1442f7['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1442f7['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x3d766a{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b9f72){super(_0x5b9f72),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x17b3bd())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2ed34f(),this['_refreshPositioningDebounced']=_0x58129b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xf80a90){this['annotations']=_0xf80a90;const _0x2eb8c5=this['context']['plugins']['get'](Ti),_0x3077e6=this['balloonPanelView'];if(_0x2eb8c5['_annotations']=_0xf80a90,this['isAttached'])throw new _0x36d19a('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2eb8c5,'set:container',()=>{this['detach'](),this['listenTo'](_0x2eb8c5,'change:container',_0x18745c=>{_0x18745c['off'](),this['attach'](_0xf80a90);});}),_0x2eb8c5['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x146d2a=_0x5bd264=>{const _0x5a0569=new Ii(this['context']['locale']);_0x2eb8c5['addAnnotation'](_0x5bd264,_0x5a0569),this['_annotationToNarrowView']['set'](_0x5bd264,_0x5a0569),_0x5a0569['bind']('isDirty','annotationType','number')['to'](_0x5bd264['view'],'isDirty','type','length'),_0x5a0569['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3077e6['content']['first']!==_0x5bd264['view']?(this['_showBalloon'](_0x5bd264),_0x5bd264['view']['element']['focus'](),this['setActiveAnnotation'](_0x5bd264)):this['setActiveAnnotation'](null);});};for(const _0x229ffe of _0xf80a90)_0x146d2a(_0x229ffe);this['listenTo'](_0xf80a90,'add',(_0x4bfbe8,_0x39cbcb)=>{_0x146d2a(_0x39cbcb);}),this['listenTo'](_0xf80a90,'remove',(_0x40f98b,_0x53d883,_0x30b161)=>{this['_annotationToNarrowView']['get'](_0x53d883)['destroy'](),this['_annotationToNarrowView']['delete'](_0x53d883),_0x2eb8c5['rearrange']({'removedAnnotation':_0x53d883,'previousAnnotation':_0xf80a90['get'](_0x30b161-0x1),'nextAnnotation':_0xf80a90['get'](_0x30b161+0x1)}),_0x53d883===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xf80a90,'focus',(_0x141dfd,_0x216468)=>{this['setActiveAnnotation'](_0x216468);}),this['listenTo'](_0xf80a90,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x5537b8,_0x50154e)=>{_0x50154e['keyCode']===_0x41b313['esc']&&_0x3077e6['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3077e6['content']['first']),this['_hideBalloon'](),_0x50154e['stopPropagation'](),_0x50154e['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x475335,_0x307dbd)=>{const _0x1de63f=_0x307dbd['target'];_0x3077e6['isVisible']&&_0x3077e6['element']['contains'](_0x1de63f)||_0x2eb8c5['view']['element']['contains'](_0x1de63f)||_0x475335['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x571af1=>_0x571af1['contains'](_0x1de63f))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3b6c9a=this['context']instanceof _0x35effb?this['context']['editors']:new _0x2ed34f([this['context']]);for(const _0xa3c763 of _0x3b6c9a)this['_integrateWithEditorAnnotations'](_0xa3c763);this['listenTo'](_0x3b6c9a,'add',(_0x467c40,_0x996310)=>{this['listenTo'](_0x996310,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x996310);});}),this['listenTo'](_0x3b6c9a,'remove',(_0x27862d,_0x5d8000)=>{_0x5d8000['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5d8000['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5ddbd8){if(_0x5ddbd8===this['activeAnnotation'])return;const _0x437f01=this['context']['plugins']['get'](Ti);if(_0x437f01['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5ddbd8,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5ddbd8)_0x437f01['getSidebarItemView'](_0x5ddbd8)?this['_showBalloon'](_0x5ddbd8):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5ddbd8;}['detach'](){if(!this['isAttached'])throw new _0x36d19a('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x31374b=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x40c0e2=>_0x40c0e2['destroy']()),this['_annotationToNarrowView']['clear'](),_0x31374b['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x35effb&&this['stopListening'](this['context']['editors']);for(const _0x16e66e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x16e66e);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'](_0x35561a){if(!_0x35561a['plugins']['has']('EditorAnnotations'))return;const _0x277f2c=_0x35561a['plugins']['get']('EditorAnnotations'),_0x48fd15=this['context']['plugins']['get'](Ti),_0xca5e11=this['annotations'],_0x45b099=this['balloonPanelView'],_0x2f132b=()=>{const _0x528e2d=_0x277f2c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x528e2d),this['setActiveAnnotation'](_0x528e2d[0x0]||null);};this['listenTo'](_0x277f2c,'refresh',_0x2f132b),this['listenTo'](_0x277f2c,'blur',(_0x1c3b17,{isAnnotationTracked:_0x291f0e})=>{this['activeAnnotation']&&_0x291f0e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x277f2c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xca5e11,'blur',_0x13e4a6=>{_0x277f2c['hasDomSelection']()&&_0x13e4a6['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xe9af7d,_0x519df9)=>{const _0x36f817=_0x519df9['target'];_0x45b099['isVisible']&&_0x45b099['element']['contains'](_0x36f817)||_0x48fd15['view']['element']['contains'](_0x36f817)||this['activeAnnotation']&&_0x277f2c['hasDomSelection']()&&(_0x2f132b(),_0xe9af7d['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x277f2c);}['_destroyEditorAnnotationsIntegration'](_0x2348d4){_0x2348d4&&(this['stopListening'](_0x2348d4),this['_editorAnnotations']['remove'](_0x2348d4));}['_setSelectedAnnotations'](_0x232edb){for(const _0x4f38ac of this['_selectedAnnotations'])_0x232edb['includes'](_0x4f38ac)||this['_manuallyClosedAnnotationViews']['delete'](_0x4f38ac['view']);this['_selectedAnnotations']=_0x232edb;}['_refreshPositioning'](){const _0x32a414=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x32a414['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xa36852){if(this['_manuallyClosedAnnotationViews']['has'](_0xa36852['view']))return;const _0x10a07d=this['balloonPanelView']['content']['first'];_0x10a07d!==_0xa36852['view']?(_0x10a07d&&this['_detachListeners'](_0x10a07d),this['_attachListeners'](_0xa36852['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xa36852['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x297712=this['balloonPanelView']['content']['first'],_0x4d4b87=_0x297712&&this['annotations']['getByView'](_0x297712);if(!_0x4d4b87||!this['_annotationToNarrowView']['has'](_0x4d4b87))return;const _0x5e9512=this['_annotationToNarrowView']['get'](_0x4d4b87)['element'],_0x58bff8=(function(){const _0x406378=ht['defaultPositions'];return[_0x406378['southArrowNorthEast'],_0x406378['northArrowSouthEast'],_0x406378['southArrowNorth'],_0x406378['northArrowSouth'],_0x406378['southArrowNorthWest'],_0x406378['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5e9512,'positions':_0x58bff8});}['_hideBalloon'](){const _0x1061b6=this['balloonPanelView'],_0x13b94a=_0x1061b6['content']['first'];_0x13b94a&&(this['_detachListeners'](_0x13b94a),_0x1061b6['unpin'](),_0x1061b6['content']['clear']());}['_attachListeners'](_0x2e1dc6){this['listenTo'](_0x2e1dc6,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2e1dc6,'Esc',(_0x32130a,_0x594e7c)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2e1dc6),this['_hideBalloon'](),_0x594e7c();});}['_detachListeners'](_0x18ec21){this['stopListening'](_0x18ec21);}}class Ei extends _0x3eacd6{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x257a48){super(_0x257a48),_0x257a48['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x257a48['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x58129b(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x38340a=this['editor']['plugins']['get'](pi);_0x38340a['context']===this['editor']&&(_0x38340a['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1f57d0,_0x129a4e)=>{const _0x27b643=this['_balloon'];if(this['isAttached']&&_0x27b643['visibleView']){const _0x1d5e74=this['annotations']['getByView'](_0x27b643['visibleView']);_0x1d5e74&&this['_closeAnnotation'](_0x1d5e74),_0x129a4e();}}));}['afterInit'](){const _0x441d0b=this['editor']['plugins']['get'](pi);_0x441d0b['context']===this['editor']&&(_0x441d0b['hasActive']()||_0x441d0b['switchTo']('inline'));}['setActiveAnnotation'](_0x40d4db){_0x40d4db!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x40d4db&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x40d4db)&&this['_addAnnotationToBalloon'](_0x40d4db,!0x0),_0x40d4db['isActive']=!0x0),_0x40d4db||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x40d4db);}['attach'](_0x478788){this['annotations']=_0x478788;const _0x4120e0=this['editor']['plugins']['get'](pi),_0x1b5397=this['_balloon'];if(this['isAttached'])throw new _0x36d19a('inlineannotations-attach-already-attached',this);if(_0x4120e0['context']!==this['editor'])throw new _0x36d19a('inlineannotations-not-allowed-with-context',this);const _0x1bc918=this['editor']['plugins']['get'](si);this['listenTo'](_0x1bc918,'refresh',()=>{const _0x570213=_0x1bc918['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2f07ea,_0x38ef71;!this['_forceRefresh']&&(_0x2f07ea=_0x570213,_0x38ef71=this['_selectedAnnotations'],_0x2f07ea['length']===_0x38ef71['length']&&_0x2f07ea['every'](_0x17876a=>_0x38ef71['includes'](_0x17876a)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x570213),this['setActiveAnnotation'](_0x570213[0x0]||null));}),this['listenTo'](_0x1bc918,'blur',(_0x4f9d4c,{isAnnotationTracked:_0x17f086})=>{this['activeAnnotation']&&_0x17f086(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1bc918,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x435dd0,_0x7face9,_0x10896d)=>{_0x10896d||this['setActiveAnnotation'](null);}),this['listenTo'](_0x478788,'remove',(_0x2b4553,_0x358c3f)=>{this['_removeAnnotationFromBalloon'](_0x358c3f),_0x358c3f===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1b5397,'change:visibleView',(_0x34e992,_0x579dba,_0x5973a6,_0x54f6fd)=>{_0x54f6fd&&this['stopListening'](_0x54f6fd);const _0x44ff00=_0x478788['getByView'](_0x5973a6);_0x5973a6&&_0x44ff00&&(this['listenTo'](_0x5973a6,'change:height',()=>{_0x1b5397['updatePosition']();}),this['listenTo'](_0x5973a6,'Esc',()=>{this['_closeAnnotation'](_0x44ff00),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x44ff00&&this['setActiveAnnotation'](_0x44ff00));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1b5397['visibleView']&&(_0x478788['getByView'](_0x1b5397['visibleView'])&&_0x1b5397['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 _0x36d19a('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2e1a23 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2e1a23);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x5aec1f){for(const _0x5bc849 of this['_selectedAnnotations'])_0x5aec1f['includes'](_0x5bc849)||this['_manuallyClosed']['delete'](_0x5bc849);for(const _0x5c2065 of this['annotations'])_0x5aec1f['includes'](_0x5c2065)||this['_removeAnnotationFromBalloon'](_0x5c2065);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x25e4d8 of _0x5aec1f)this['_addAnnotationToBalloon'](_0x25e4d8);}this['_selectedAnnotations']=_0x5aec1f;}['_addAnnotationToBalloon'](_0x16e7e4,_0x82ca76=!0x1){this['_manuallyClosed']['has'](_0x16e7e4)||(this['_addedAnnotations']['has'](_0x16e7e4)||this['_balloon']['hasView'](_0x16e7e4['view'])||(this['_addedAnnotations']['add'](_0x16e7e4),this['_balloon']['add']({'stackId':_0x16e7e4['view']['id'],'view':_0x16e7e4['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x16e7e4)}})),_0x82ca76&&this['_balloon']['showStack'](_0x16e7e4['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5bd7aa){const _0x487bac=_0x5bd7aa['target'],_0x409663=this['editor']['editing']['view'],_0x2d6940=_0x409663['document']['selection']['getFirstRange'](),_0x2611a5=_0x409663['domConverter']['viewRangeToDom'](_0x2d6940);if(_0x2611a5['collapse'](!0x0),_0x487bac){if(_0x487bac instanceof _0x1a3832)return _0x487bac;let _0x57105d=[];for(const _0x5782ad of _0x487bac)_0x57105d['push'](..._0x1a3832['getDomElementRects'](_0x5782ad));_0x57105d=function(_0x7d9ba2){const _0x2f49f3=[];let _0xc41593=_0x7d9ba2[0x0];for(let _0x8e563c=0x1;_0x8e563c<_0x7d9ba2['length'];_0x8e563c++)if(Ni(_0xc41593,_0x7d9ba2[_0x8e563c])){const _0x3f7428=_0x7d9ba2[_0x8e563c]['width'];_0xc41593['width']+=_0x3f7428,_0xc41593['right']+=_0x3f7428;}else _0x2f49f3['push'](_0xc41593),_0xc41593=_0x7d9ba2[_0x8e563c];return _0x2f49f3['push'](_0xc41593),_0x2f49f3;}(_0x57105d);const _0x391b57=_0x2611a5['getBoundingClientRect']();return _0x57105d['find'](_0x1faa45=>_0x1faa45['top']<=_0x391b57['top']&&_0x1faa45['bottom']>=_0x391b57['bottom']&&_0x1faa45['left']<=_0x391b57['left']&&_0x1faa45['right']>=_0x391b57['right'])||_0x57105d[0x0];}return _0x5bd7aa['targetRect']||_0x2611a5;}['_removeAnnotationFromBalloon'](_0x1d4126){this['_addedAnnotations']['has'](_0x1d4126)&&this['_balloon']['hasView'](_0x1d4126['view'])&&(this['_addedAnnotations']['delete'](_0x1d4126),this['_balloon']['remove'](_0x1d4126['view']));}['_closeAnnotation'](_0x5ee62d){this['_manuallyClosed']['add'](_0x5ee62d),this['_removeAnnotationFromBalloon'](_0x5ee62d);}}function Ni(_0xd3c792,_0x483f61){return _0xd3c792['top']===_0x483f61['top']&&_0xd3c792['bottom']===_0x483f61['bottom']&&_0xd3c792['right']===_0x483f61['left'];}class ki extends _0x719be3{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x29f2ee,_0x4b1fd3){super(_0x29f2ee),this['set']('isEmpty',!_0x4b1fd3['length']),this['focusTracker']=new _0x340c23(),this['_annotationViews']=_0x4b1fd3,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x567dee({'focusables':_0x4b1fd3,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4b1fd3,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4b1fd3,'remove',(_0x78aa96,_0x556ae8)=>{_0x556ae8['isActive']&&this['focus'](),_0x4b1fd3['length']||(this['isEmpty']=!0x0);});const _0x49e476=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x29f2ee,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4b1fd3},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x49e476['if']('isEmpty','ck-hidden',_0x4bf1e3=>!_0x4bf1e3)]},'children':[{'text':bt(_0x29f2ee,'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 _0xff82b2 of this['_annotationViews'])this['focusTracker']['add'](_0xff82b2['element']);this['_annotationViews']['on']('change',(_0x2522fe,{added:_0x310ca6,removed:_0xad03bf})=>{for(const _0x1b80a8 of _0x310ca6)this['focusTracker']['add'](_0x1b80a8['element']);for(const _0x430229 of _0xad03bf)this['focusTracker']['remove'](_0x430229['element']);});}}class Oi extends _0x3d766a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x1f7b60){super(_0x1f7b60),this['archivedThreads']=new _0x2ed34f();}['init'](){const _0x36fc8f=this['context'],_0x45d907=_0x36fc8f['plugins']['get'](Qt),_0x21d1d2=_0x36fc8f['plugins']['get']($t);this['listenTo'](_0x45d907,'addCommentThread',(_0x2aee12,{threadId:_0x533242})=>{const _0x3d44df=_0x45d907['getCommentThread'](_0x533242);_0x3d44df['archivedAt']&&this['archivedThreads']['add'](_0x3d44df,this['_calculatePosition'](_0x3d44df['archivedAt'])),this['listenTo'](_0x3d44df,'change:archivedAt',(_0x4c8be6,_0x285ff2,_0x3b71f0)=>{_0x3b71f0?this['archivedThreads']['has'](_0x3d44df)||this['archivedThreads']['add'](_0x3d44df,this['_calculatePosition'](_0x3d44df['archivedAt'])):this['archivedThreads']['has'](_0x3d44df)&&this['archivedThreads']['remove'](_0x3d44df);});}),this['listenTo'](_0x45d907,'removeCommentThread',(_0x6113f0,{threadId:_0xf82166})=>{const _0x3c81fb=_0x45d907['getCommentThread'](_0xf82166);this['stopListening'](_0x3c81fb),this['archivedThreads']['has'](_0x3c81fb)&&this['archivedThreads']['remove'](_0x3c81fb);},{'priority':'highest'}),this['listenTo'](_0x21d1d2['collection'],'focus',(_0x34d6ee,_0x50cc4b)=>{_0x50cc4b['isVisible']||(_0x50cc4b['isActive']=!0x0,_0x21d1d2['activate'](_0x50cc4b));});}['_calculatePosition'](_0x3ac557){const _0x1b5d2a=[...this['archivedThreads']]['findIndex'](_0xb41f4c=>_0xb41f4c['archivedAt']<_0x3ac557);return _0x1b5d2a>-0x1?_0x1b5d2a:this['archivedThreads']['length'];}}class Mi extends _0x3eacd6{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x177bfe){super(_0x177bfe),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x1d2cdc=this['editor'],_0x5a734e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1d2cdc['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x542a2,!0x0)),_0x1d2cdc['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x54a667=this['_createCommentsArchiveButton'](ot);return _0x54a667['set']({'role':'menuitemcheckbox'}),_0x54a667;});const _0x45c41b=_0x1d2cdc['plugins']['get'](Oi),_0xdb700b=_0x1d2cdc['plugins']['get']('Annotations'),_0x49bc3e=_0x1d2cdc['plugins']['get']('CommentsRepository');_0x45c41b['archivedThreads']['forEach'](_0x44b4fa=>{this['_handleNewThread'](_0x44b4fa);}),this['listenTo'](_0x45c41b['archivedThreads'],'add',(_0x5cccf4,_0x5d34ad)=>{this['_handleNewThread'](_0x5d34ad);}),this['listenTo'](_0xdb700b['collection'],'add',(_0x403c60,_0x2825ee)=>{const _0x5c5d9b=this['_pendingThreads']['find'](_0x2aae33=>{const _0x53a3bd=_0x49bc3e['_threadToController']['get'](_0x2aae33);return _0x53a3bd&&_0x2825ee['innerView']===_0x53a3bd['view'];});if(_0x5c5d9b){const _0x32370d=this['_calculatePosition'](_0x5c5d9b['archivedAt']);this['_addAnnotationToArchive'](_0x2825ee,_0x32370d),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5c5d9b),0x1);}}),this['listenTo'](_0x45c41b['archivedThreads'],'remove',(_0x406345,_0x3fbc7e)=>{const _0xab02f9=_0x1d2cdc['config']['get']('collaboration.channelId');if(!_0xab02f9||_0x3fbc7e['channelId']===_0xab02f9){if(this['_pendingThreads']['includes'](_0x3fbc7e))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3fbc7e),0x1);else{const _0xf55ca4=_0x49bc3e['_threadToController']['get'](_0x3fbc7e),_0x5effd9=_0xdb700b['getByInnerView'](_0xf55ca4['view']);this['annotationViews']['remove'](_0x5effd9['view']),this['stopListening'](_0x5effd9),this['stopListening'](_0x5effd9['focusableElements']);}}}),this['listenTo'](_0xdb700b['collection'],'add',(_0x4bef0c,_0x53ddf1)=>{this['listenTo'](_0x53ddf1,'escape',_0x5a734e);}),this['listenTo'](_0xdb700b['collection'],'remove',(_0x237a40,_0x5b6fd3)=>{this['stopListening'](_0x5b6fd3,'escape',_0x5a734e);});}['_addAnnotationToArchive'](_0x481c81,_0x2bf0f6){this['listenTo'](_0x481c81,'set:isVisible',_0x10a195=>{_0x10a195['return']=!0x1,_0x10a195['stop']();}),this['annotationViews']['add'](_0x481c81['view'],_0x2bf0f6);}['_handleNewThread'](_0x4d062c){const _0x15ced6=this['editor']['plugins']['get']('CommentsRepository'),_0x53e926=this['editor']['plugins']['get']('Annotations'),_0x56b947=this['editor']['config']['get']('collaboration.channelId');if(!_0x56b947||_0x4d062c['channelId']===_0x56b947){const _0x1c21a9=_0x15ced6['_threadToController']['get'](_0x4d062c);if(!_0x1c21a9)return void this['_pendingThreads']['push'](_0x4d062c);const _0x3f74b7=this['_calculatePosition'](_0x4d062c['archivedAt']),_0xb22ac7=_0x53e926['getByInnerView'](_0x1c21a9['view']);_0xb22ac7['isVisible']&&_0x53e926['_visibleAnnotations']['remove'](_0xb22ac7),this['_addAnnotationToArchive'](_0xb22ac7,_0x3f74b7);}}['_calculatePosition'](_0x28e0f8){const _0x5a0bbf=this['editor']['config']['get']('collaboration.channelId'),_0x5c6d65=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x23f6ce=>_0x23f6ce['channelId']===_0x5a0bbf)['findIndex'](_0xc424a=>_0xc424a['archivedAt']<_0x28e0f8);return _0x5c6d65<0x0||_0x5c6d65>this['annotationViews']['length']?this['annotationViews']['length']:_0x5c6d65-0x1;}['_toggleDialog'](){const _0x3c5bf5=this['editor'],_0x19a2c0=_0x3c5bf5['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x3c5bf5['locale'],this['annotationViews'])),'commentsArchive'===_0x19a2c0['id']?_0x19a2c0['hide']():_0x19a2c0['show']({'id':'commentsArchive','title':bt(_0x3c5bf5['locale'],'COMMENTS_ARCHIVE'),'icon':_0x500afa,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x462bac,_0x7a9b77=!0x1){const _0x4ef386=this['editor']['locale'],_0x369bd3=this['editor']['plugins']['get']('Dialog'),_0x4b9151=new _0x462bac(_0x4ef386);return _0x4b9151['bind']('isEnabled')['to'](this,'isEnabled'),_0x4b9151['bind']('isOn')['to'](_0x369bd3,'id',_0x3ce027=>'commentsArchive'===_0x3ce027),_0x4b9151['set']({'label':bt(_0x4ef386,'COMMENTS_ARCHIVE'),'icon':_0x500afa,'isToggleable':!0x0}),_0x7a9b77&&(_0x4b9151['tooltip']=!0x0),this['listenTo'](_0x4b9151,'execute',()=>this['_toggleDialog']()),_0x4b9151;}['_hideDialogOnAnnotationEscape']=_0x201910=>{const _0x2d1599=_0x201910['source'];if(!this['annotationViews']['has'](_0x2d1599['view']))return;const _0xfde797=this['editor']['plugins']['get']('Dialog');_0xfde797['isOpen']&&'commentsArchive'===_0xfde797['id']&&(_0xfde797['hide'](),_0x201910['stop']());};}class Ri extends _0x3eacd6{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x57726a,ContextPlugin as _0x4d5b57,PendingActions as _0x18ca69,Command as _0x5583eb,Plugin as _0x801ec5,Context as _0x258154}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x42988b,uid as _0x31c322,KeystrokeHandler as _0x2ed91d,FocusTracker as _0x420295,diff as _0x1bd15e,Collection as _0x33b63a,Rect as _0x36753e,CKEditorError as _0x3bea1e,first as _0x459cc4,priorities as _0x22038f,scrollViewportToShowTarget as _0x27ab9e,getEnvKeystrokeText as _0x222009,toUnit as _0x1228ab,DomEmitterMixin as _0x540581,keyCodes as _0x1032dc}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x4a96c9,AriaDescriptionView as _0x524c95,setupThreadKeyboardNavigation as _0x2f67fc,ConfirmMixin as _0x17b422,LateFocusButtonView as _0x33523d,trimHtml as _0x554b81,LateFocusDropdownButtonView as _0x59dc1b,FOCUS_ANNOTATION_KEYSTROKE as _0x27a185,Users as _0x2d9be6,getDateTimeFormatter as _0x512d77,hashObject as _0x4e69f,getAllMarkersDomElementsSorted as _0xc01965,surroundingMarkersDetector as _0x593340}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x509b0c,cloneDeep as _0x46f210,set as _0x3442a5,unset as _0x3867e8,isEqual as _0x45517a,debounce as _0x5c43ed}from'es-toolkit/compat';import{IconUndo as _0x133b59,IconCheck as _0x405b5c,IconPencil as _0x25143b,IconRemoveComment as _0x1f4fda,IconThreeVerticalDots as _0x52173e,IconAddComment as _0x2a3eab,IconCommentsArchive as _0x3d6f82}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x11e07f,InlineEditableUIView as _0x48cc3e,EditorUI as _0x5f393a,View as _0x31aaeb,FocusCycler as _0x24a5b3,ButtonView as _0x407247,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x42988b(){['model'];['view'];constructor(_0x5449af,_0x2d2091){super(),this['model']=_0x5449af,this['model']['_isAttached']=!0x0,this['view']=_0x2d2091,this['listenTo'](_0x2d2091,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x2d2091,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x2d2091,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x2d2091,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x2d2091,'addComment',(_0x579bfc,_0x3fa128)=>this['addComment'](_0x3fa128)),this['listenTo'](_0x2d2091,'updateComment',(_0x23f409,_0x37e55e,_0x56a24c)=>this['updateComment'](_0x37e55e,_0x56a24c)),this['listenTo'](_0x2d2091,'removeComment',(_0x55e7c4,_0x43e116)=>this['removeComment'](_0x43e116));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3e290a){this['model']['addComment']({'content':_0x3e290a,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3df6af,_0x4293bd){this['model']['getComment'](_0x3df6af)['update']({'content':_0x4293bd});}['removeComment'](_0x1a7b3f){this['model']['getComment'](_0x1a7b3f)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0xd083ab,_0x7e04f1,_0xe97276){const t=_0xd083ab['t'];switch(_0x7e04f1){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'},_0xe97276);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'},_0xe97276);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'},_0xe97276);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'},_0xe97276);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0xe97276);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'},_0xe97276);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'},_0xe97276);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'},_0xe97276);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 Et extends _0x11e07f{['main'];['editable'];constructor(_0x279ae3,_0x6c7bc1){super(_0x279ae3);const _0x538804=_0x31c322();this['main']=this['createCollection'](),this['editable']=new _0x48cc3e(_0x279ae3,_0x6c7bc1,void 0x0,{'label':()=>bt(_0x279ae3,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x279ae3['uiLanguageDirection'],'lang':_0x279ae3['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x538804},'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 Nt extends _0x5f393a{['view'];constructor(_0x4432f7){super(_0x4432f7),this['view']=new Et(_0x4432f7['locale'],_0x4432f7['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1b0600=this['editor']['editing']['view'],_0xc5cd32=this['view']['editable'],_0x37506b=_0x1b0600['document']['getRoot']();_0xc5cd32['name']=_0x37506b['rootName'],this['view']['render']();const _0x88cc99=_0xc5cd32['element'];this['setEditableElement'](_0xc5cd32['name'],_0x88cc99),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1b0600['attachDomRoot'](_0x88cc99),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x42988b(_0x57726a){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>kt)());constructor(_0x59a07c={}){function _0x135a44(_0x39e83e){return _0x39e83e['map'](_0x18535=>String['fromCharCode'](_0x18535))['join']('');}(_0x59a07c=Object['assign']({},_0x59a07c))['plugins']||(_0x59a07c['plugins']=Ot['defaultPlugins']),super(_0x59a07c),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x135a44([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x135a44([0x76,0x69,0x65,0x77])][_0x135a44([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x135a44([0x61,0x75,0x74,0x6f]),this[_0x135a44([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x135a44([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x135a44([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x135a44([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x135a44([0x6f,0x6b])});}['create'](){const _0x5d3353=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5d3353))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4cc3fb=>{const _0x50c9d6=this['model']['document']['getRoot'](),_0x297759=_0x50c9d6&&_0x50c9d6['getChild'](_0x50c9d6['childCount']-0x1);_0x4cc3fb['setSelection'](_0x297759,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x30c9d4=this['editing']['view'],_0x5cc916=_0x30c9d4['document']['getRoot'](),_0x20c645=_0x5cc916['getChild'](0x0);_0x5cc916['childCount']>0x1||!_0x20c645||'p'!=_0x20c645['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x30c9d4,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x20c645['placeholder']=this['placeholder']),ut({'view':_0x30c9d4,'element':_0x20c645,'keepOnFocus':!0x0}),this['placeholderElement']=_0x20c645);}}class Mt extends _0x31aaeb{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x22736f,_0x505a46={}){super(_0x22736f),this['editor']=null,this['_editorConfig']=_0x505a46,this['set']('value',_0x505a46['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x22736f,'Reply...')),this['set']('submitLabel',bt(_0x22736f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x2ed91d(),this['focusTracker']=new _0x420295(),this['focusCycler']=new _0x24a5b3({'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',(_0x5f4525,_0x71bab8)=>{this['cancelButtonView']['fire']('execute'),_0x71bab8();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2d2007,_0x108b0c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x108b0c());}),this['on']('submit',(_0x5b7269,_0x228771)=>{_0x228771['length']>0xfde8?(alert(bt(_0x22736f,'TOO_LONG_COMMENT_ALERT',[_0x228771['length'],0xfde8])),_0x5b7269['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x55e397=this['editor'];this['element']['insertBefore'](_0x55e397['ui']['element'],this['element']['firstChild']),_0x55e397['model']['document']['on']('change',()=>this['value']=_0x55e397['getData']()),_0x55e397['bind']('placeholder')['to'](this),this['focusables']['add'](_0x55e397['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x86f835){-0x1===_0x86f835?(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:_0x417889}=this,_0x5095d6=new _0x407247(_0x417889);return _0x5095d6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5095d6['withText']=!0x0,_0x5095d6['bind']('label')['to'](this,'submitLabel'),_0x5095d6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5095d6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2c0029,_0x250259)=>!_0x250259&&!!_0x2c0029['trim']()),_0x5095d6;}['_createCancelButton'](){const {locale:_0x37d42b}=this,_0x249444=new _0x407247(_0x37d42b);return _0x249444['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x249444['label']=bt(_0x37d42b,'Cancel'),_0x249444['withText']=!0x0,_0x249444['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x249444;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x15e11d=>{this['focusTracker']['add'](_0x15e11d['element']);}),this['focusables']['on']('change',(_0x2a7397,_0x25e3d8)=>{for(const _0x157eb9 of Array['from'](_0x25e3d8['added'])['reverse']())this['focusTracker']['add'](_0x157eb9['element']);});}}class Rt extends _0x31aaeb{constructor(_0x6c5739,_0x115bb2,_0x175c45){super(_0x6c5739),this['commentInputView']=new Mt(_0x6c5739,_0x175c45),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0xf73a6d,_0x2342c1)=>_0xf73a6d||!!_0x2342c1),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 _0x4a96c9(_0x6c5739,_0x115bb2),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'](_0x233ba8){this['commentInputView']['focus'](_0x233ba8);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2db33f,_0x4b761e)=>{const {submitButtonView:_0x2f0bd6,cancelButtonView:_0x28ac3a,editor:_0x39914f}=this['commentInputView'];[_0x2f0bd6['element'],_0x28ac3a['element'],_0x39914f?_0x39914f['editing']['view']['getDomRoot']():null]['filter'](_0x130368=>_0x130368)['some'](_0x1cf0cc=>_0x1cf0cc['contains'](_0x4b761e['target']))||(this['focus'](),_0x4b761e['preventDefault']());});}}class xt extends _0x31aaeb{constructor(_0x15da0f){super(_0x15da0f);const _0x3a9684=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3a9684['to']('count',_0x3ed4c5=>bt(_0x15da0f,'NUMBER_OF_COMMENTS',_0x3ed4c5))}]});}}class St extends _0x31aaeb{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x10a160,_0x2acb16,_0x4aeaa6){super(_0x10a160);const _0x20b84a=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2acb16['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2acb16,this['_config']=_0x4aeaa6,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x420295(),this['keystrokes']=new _0x2ed91d(),this['focusCycler']=new _0x24a5b3({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x438432=>this['commentViews']['map'](_0x3f70f6=>_0x3f70f6['element'])['includes'](_0x438432['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x10a160),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x21bc31=>_0x21bc31-this['_config']['maxCommentsWhenCollapsed']);for(const _0x3d7cec of _0x2acb16['comments'])this['_handleNewCommentModel'](_0x3d7cec);this['_handleInfoComment'](),this['listenTo'](_0x2acb16['comments'],'add',(_0x1fa38f,_0x46bb5a)=>{const _0x46a8c2=this['_calculatePosition'](_0x46bb5a);this['length']++,this['_handleNewCommentModel'](_0x46bb5a,_0x46a8c2),this['refreshVisibleViews']();}),this['listenTo'](_0x2acb16['comments'],'remove',(_0x2dce27,_0x4f4b88)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4f4b88),this['refreshVisibleViews']();}),this['listenTo'](_0x2acb16,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2acb16,'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',_0x20b84a['if']('length','ck-hidden',_0x36933c=>!_0x36933c)],'aria-label':bt(_0x10a160,'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'](_0x5d3902){-0x1===_0x5d3902?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x20de50 of this['commentViews'])_0x20de50['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4e7bfa,_0x1ddef5){const _0x47d580=new this['_config']['CommentView'](this['locale'],_0x4e7bfa,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x47d580['viewUid']=_0x4e7bfa['id'],_0x47d580['delegate']('removeComment')['to'](this),_0x47d580['delegate']('updateComment')['to'](this),_0x47d580['delegate']('resolveCommentThread')['to'](this),_0x47d580['delegate']('editorReady')['to'](this),_0x47d580['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x47d580,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x47d580,_0x1ddef5);}['_calculatePosition'](_0x53c9ad){const _0x4974f1=this['_model']['_findOptimalIndex'](_0x53c9ad);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x53c9ad['authoredAt']?_0x4974f1-0x1:_0x4974f1:_0x4974f1-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x552e2d={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x552e2d,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x552e2d));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x211d34){const _0x1bf487=this['commentViews']['remove'](_0x211d34['id']);this['stopListening'](_0x1bf487),_0x1bf487['isEditMode']&&this['_updateHasDirtyComment'](),_0x1bf487['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x14442a=>_0x14442a['isEditMode']);}['_rearrangeCollapse'](){const _0x3d90a7=function(_0x591a41){const _0xaa60ee=new _0x33b63a();for(const _0xf62c0d of _0x591a41)_0xaa60ee['add'](_0xf62c0d);return _0xaa60ee;}(this['commentViews']),_0x135813=this['_collapsedCommentsView']['count'];for(let _0x4f8512=0x1;_0x4f8512<=_0x135813;_0x4f8512++)_0x3d90a7['remove'](0x1);for(const _0x4967ab of _0x3d90a7)_0x4967ab['collapse']();_0x135813>0x0&&_0x3d90a7['add'](this['_collapsedCommentsView'],0x1),Pt(_0x1bd15e(Array['from'](this['visibleViews']),Array['from'](_0x3d90a7)),this['visibleViews'],_0x3d90a7);}['_rearrangeExpand'](){Pt(_0x1bd15e(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x5f3d7a of this['visibleViews'])_0x5f3d7a['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2d691f=>{this['focusTracker']['add'](_0x2d691f['element']),this['keystrokes']['listenTo'](_0x2d691f['element']);}),this['commentViews']['on']('change',(_0x8ba832,_0x5acde8)=>{for(const _0x41ed99 of _0x5acde8['removed'])this['focusTracker']['remove'](_0x41ed99['element']),this['keystrokes']['stopListening'](_0x41ed99['element']);for(const _0x4e6ae3 of Array['from'](_0x5acde8['added'])['reverse']())this['focusTracker']['add'](_0x4e6ae3['element']),this['keystrokes']['listenTo'](_0x4e6ae3['element']);});}}function Pt(_0x189d6f,_0x5447e6,_0x4429c7){let _0x4ccff0=0x0;for(const _0x221e59 of _0x189d6f)switch(_0x221e59){case'insert':_0x5447e6['add'](_0x4429c7['get'](_0x4ccff0),_0x4ccff0),_0x4ccff0++;break;case'delete':_0x5447e6['remove'](_0x4ccff0);break;case'equal':_0x4ccff0++;}}class Lt extends _0x31aaeb{constructor(_0x160120){super(_0x160120);const _0x5e8c66=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5e8c66['to']('contextValue',_0x5e1105=>bt(_0x160120,'THREAD_CONTEXT_LABEL',_0x5e1105)),'tabindex':-0x1},'children':[{'text':_0x5e8c66['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x31aaeb{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x92b5c0,_0xac9431){super(_0x92b5c0);const _0x26db47=this['bindTemplate'];this['_model']=_0xac9431,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x420295(),this['keystrokes']=new _0x2ed91d(),this['focusCycler']=new _0x24a5b3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3c8cc2=>!!_0x3c8cc2),this['bind']('contextValue')['to'](this['_model'],'context',_0x1fc3a4=>_0x1fc3a4&&_0x1fc3a4['value']?this['_trimContextValue'](_0x1fc3a4['value']):bt(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',_0x26db47['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 _0x38a7be=new _0x407247(this['locale']);return _0x38a7be['label']=bt(this['locale'],'Reopen'),_0x38a7be['tooltip']=bt(this['locale'],'Reopen'),_0x38a7be['icon']=_0x133b59,_0x38a7be['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x23e7ef=>!_0x23e7ef),_0x38a7be['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3bf501,_0xa07cbb)=>_0x3bf501&&_0xa07cbb),_0x38a7be['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x38a7be;}['_trimContextValue'](_0x361ef2){if(_0x361ef2['length']<0x96)return _0x361ef2;const _0x4f5956=_0x361ef2['lastIndexOf']('\x20',0x93);return _0x361ef2['substring'](0x0,_0x4f5956>-0x1?_0x4f5956:0x93)+'...';}['_attachContextActions'](){const _0x17ff24=this['element']['querySelector']('.ck-context'),_0x3d4307=_0x17ff24['querySelector']('.ck-context__value');this['listenTo'](_0x17ff24,'mouseenter',()=>{_0x3d4307['offsetWidth']<_0x3d4307['scrollWidth']&&_0x17ff24['classList']['add']('overlay');}),this['listenTo'](_0x17ff24,'mouseleave',()=>{_0x17ff24['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x570877 of this['focusables'])this['focusTracker']['add'](_0x570877['element']),this['keystrokes']['listenTo'](_0x570877['element']);}['_createContextView'](){const _0x2ff85e=new Lt(this['locale']);return _0x2ff85e['bind']('contextValue')['to'](this),_0x2ff85e;}}class Vt extends _0x31aaeb{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x391b6a,_0xca1d80,_0x3bfbc5,_0x3044ef){super(_0x391b6a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xca1d80,this['_localUser']=_0x3bfbc5,this['_config']=_0x3044ef,this['commentThreadHeaderView']=new Dt(_0x391b6a,_0xca1d80),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x524c95(_0x391b6a,bt(_0x391b6a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x391b6a,_0xca1d80,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3044ef)),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',(_0x2c4383,_0x4b9e59)=>_0x2c4383||!!_0x4b9e59),this['bind']('isUnlinked')['to'](_0xca1d80,'unlinkedAt',_0x388d15=>!!_0x388d15),this['bind']('ariaLabel')['to'](this,'length',_0x30d4f4=>{const _0x4c9d9f=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x30d4f4,_0x4c9d9f]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x420295(),this['keystrokes']=new _0x2ed91d(),this['focusCycler']=new _0x24a5b3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2fd8e3=>_0x2fd8e3['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x2f67fc(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1260be=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2be422=_0x1260be['commentInputView'];return _0x1260be['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2be422,'value',(_0x596946,_0x21a1dd,_0x37bd41,_0x433680,_0x5bcf26)=>!!_0x5bcf26||!!_0x433680&&_0x37bd41&&!_0x21a1dd||_0x596946&&_0x37bd41&&!_0x21a1dd),_0x2be422['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x549db2,_0x53ca29,_0x2f3caa)=>{let _0x2c960a;return _0x2c960a=_0x2f3caa&&_0x53ca29?'Reply\x20to\x20reopen\x20discussion...':_0x549db2?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x2c960a);}),_0x2be422['bind']('submitLabel')['to'](this,'length',_0x171ca9=>bt(this['locale'],_0x171ca9?'Reply':'Comment')),_0x2be422['on']('submit',(_0x2c741b,_0xe6c0af)=>{this['fire']('addComment',_0xe6c0af),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2be422['on']('cancel',()=>{this['focus']();}),_0x2be422['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2be422['on']('cancel',_0xb68418=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xb68418['stop']());}),this['on']('change:isActive',(_0x20b724,_0x1efdff,_0xbb969b)=>{_0xbb969b||this['length']||_0x2be422['value']||this['fire']('removeCommentThread');}),_0x1260be;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x17b422(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4fc95b,_0x17f18a,_0x2349e2,_0x34b040){super(_0x4fc95b,_0x17f18a,_0x2349e2,_0x34b040),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4fc95b,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x45798a,_0x23d04c,_0x5a3419)=>{_0x5a3419||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x492c68,_0x20c3fb,_0x458b99)=>{_0x458b99&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5509ea=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5509ea['if']('isActive','ck-thread--active'),_0x5509ea['if']('isUnlinked','ck-thread--unlinked'),_0x5509ea['to']('actionIndicator',_0x5db6fc=>_0x5db6fc?'ck-thread--'+_0x5db6fc:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5509ea['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 _0x306f73 of this['commentsListView']['commentViews'])_0x306f73['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x25597a}=this,_0x2c327f=this['commentsListView']['commentViews']['get'](0x0);_0x2c327f===this['_boundFirstCommentView']||_0x2c327f['isSystemComment']||(this['_boundFirstCommentView']=_0x2c327f,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2c327f,'actionIndicator',_0x3a487d=>'remove'===_0x3a487d?'remove':null),_0x2c327f['placeholder']=bt(_0x25597a,'Write\x20a\x20comment...'),_0x2c327f['removeButton']['on']('execute',_0x922018=>{_0x922018['stop'](),this['showConfirm'](bt(_0x25597a,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2c327f['focus']();}),_0x2c327f['actionBar']['add'](this['resolveButton'],0x0),_0x2c327f['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x116388=new _0x33523d(this['locale']);return _0x116388['label']=bt(this['locale'],'Resolve'),_0x116388['tooltip']=bt(this['locale'],'Resolve'),_0x116388['icon']=_0x405b5c,_0x116388['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x116388['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2327f2=>!_0x2327f2),_0x116388['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x289d5a,_0x47229d)=>_0x289d5a&&!_0x47229d),_0x116388['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x116388;}['_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 Ht extends _0x31aaeb{constructor(_0x25b7e4){super(_0x25b7e4),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x4b4cb1,_0x2a6ba0,_0xed0960)=>{this['element']['innerHTML']=_0xed0960;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x31aaeb{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x4f2a20,_0x39f45d,_0x114a13){super(_0x4f2a20),this['_model']=_0x39f45d,this['_config']=_0x114a13,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x39f45d,'content',_0x39f45d,'authoredAt',(_0x57add8,_0x37b625)=>bt(_0x4f2a20,'COMMENT_ARIA_LABEL',[_0x39f45d['author']['name'],_0x114a13['formatDateTime'](_0x37b625),new DOMParser()['parseFromString'](_0x57add8,'text/html')['body']['textContent'],_0x39f45d['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x524c95(_0x4f2a20,bt(_0x4f2a20,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x420295(),this['keystrokes']=new _0x2ed91d(),this['focusCycler']=new _0x24a5b3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5d2a2a=>_0x5d2a2a['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']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x6c8563=new Ht(this['locale']);return _0x6c8563['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x18180f,_0x282bb0)=>_0x282bb0?_0x554b81(_0x18180f,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x18180f),_0x6c8563;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x54c751=new Mt(this['locale'],this['_config']['editorConfig']);return _0x54c751['value']=this['_model']['content'],_0x54c751['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x54c751['submitLabel']=bt(this['locale'],'Save'),_0x54c751['on']('submit',(_0x444112,_0x1bf938)=>{this['fire']('updateComment',this['_model']['id'],_0x1bf938),this['switchToDisplayMode'](),this['focus']();}),_0x54c751['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x54c751['once']('editorReady',()=>{_0x54c751['focus']();}),_0x54c751['createEditor'](),_0x54c751['delegate']('editorReady')['to'](this),_0x54c751['delegate']('editorDestroyed')['to'](this),_0x54c751;}['_setupKeyboardNavigation'](){const _0x1a4840=this['element'];this['keystrokes']['listenTo'](_0x1a4840);for(const _0x325b90 of this['focusables'])this['focusTracker']['add'](_0x325b90['element']),this['keystrokes']['listenTo'](_0x325b90['element']);this['focusables']['on']('change',(_0x41f512,_0x45c5b8)=>{for(const _0x311f80 of _0x45c5b8['removed'])this['focusTracker']['remove'](_0x311f80['element']),this['keystrokes']['stopListening'](_0x311f80['element']);for(const _0x115abd of _0x45c5b8['added'])this['focusTracker']['add'](_0x115abd['element']),this['keystrokes']['listenTo'](_0x115abd['element']);}),this['keystrokes']['set']('enter',(_0x41c99e,_0x2f783f)=>{_0x1a4840===_0x41c99e['target']&&(this['focusCycler']['focusFirst'](),_0x2f783f());}),this['keystrokes']['set']('esc',(_0x489c68,_0x63ee9)=>{_0x1a4840!==_0x489c68['target']&&(this['focus'](),_0x63ee9());});}}class Ut extends/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x17b422(Ft){['actionBar'];['userView'];constructor(_0x4c113c,_0xfbd0b5,_0x407129){super(_0x4c113c,_0xfbd0b5,_0x407129),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0x4c113c,'Reply...')),this['bind']('authoredAt')['to'](_0xfbd0b5),this['bind']('resolvedAt')['to'](_0xfbd0b5),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 _0x4a96c9(_0x4c113c,_0xfbd0b5['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0xfbd0b5,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x2e9b02=this['bindTemplate'],_0xdaecb8=[{'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':_0x2e9b02['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x2e9b02['to']('authoredAt',_0x925735=>this['_config']['formatDateTime'](_0x925735))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x2e9b02['if']('isEditMode','ck-comment__actions--hidden'),_0x2e9b02['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']&&_0xdaecb8['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x2e9b02['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x2e9b02['if']('isEditMode','ck-comment--edit'),_0x2e9b02['if']('isSystemComment','ck-comment--info'),_0x2e9b02['to']('actionIndicator',_0x3e1fc2=>_0x3e1fc2?'ck-comment--'+_0x3e1fc2:'')],'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':_0xdaecb8}]}]};}['_createEditButton'](){const _0x36a74a=new _0x407247(this['locale']);return _0x36a74a['label']=bt(this['locale'],'Edit'),_0x36a74a['icon']=_0x25143b,_0x36a74a['withText']=!0x0,_0x36a74a['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x36a74a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5c6173=>!_0x5c6173),_0x36a74a['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x36a74a['on']('execute',()=>this['switchToEditMode']()),_0x36a74a;}['_createRemoveButton'](){const _0x44c3cc=new _0x407247(this['locale']);return _0x44c3cc['label']=bt(this['locale'],'Remove'),_0x44c3cc['icon']=_0x1f4fda,_0x44c3cc['withText']=!0x0,_0x44c3cc['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x44c3cc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x16e5db=>!_0x16e5db),_0x44c3cc['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x44c3cc['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x44c3cc;}['_createDropdown'](){const _0x1fa936=it(this['locale'],_0x59dc1b),_0x388aae=_0x1fa936['panelView']['children'],_0x330fcb=new et(this['locale']),_0x764e81=_0x1fa936['bindTemplate'];st(_0x1fa936,()=>this['items']['find'](_0x23e39d=>_0x23e39d['isVisible'])),_0x1fa936['extendTemplate']({'attributes':{'class':[_0x764e81['if']('isVisible','ck-hidden',_0xcf930f=>!_0xcf930f)]}});const _0x25cff3=(_0x1e6403,_0x24cd2d=-0x1)=>{const _0x3affbe=new nt(this['locale']);_0x3affbe['children']['add'](_0x1e6403);const _0x32e082=_0x24cd2d>-0x1?_0x24cd2d:_0x330fcb['items']['length'];_0x330fcb['items']['add'](_0x3affbe,_0x32e082);const _0x3f81c9=Array['from'](this['items']);_0x1fa936['unbind']('isEnabled','isVisible'),_0x1fa936['bind']('isEnabled')['toMany'](_0x3f81c9,'isEnabled',(..._0xf2dfa6)=>_0xf2dfa6['some'](_0x505ea6=>_0x505ea6)),_0x1fa936['bind']('isVisible')['toMany'](_0x3f81c9,'isVisible',(..._0x1501db)=>_0x1501db['some'](_0x13bb7a=>_0x13bb7a));};_0x1fa936['panelPosition']='sw',_0x1fa936['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x52173e});for(const _0x18b731 of this['items'])_0x25cff3(_0x18b731);return _0x388aae['add'](_0x330fcb),_0x1fa936['listenTo'](this['items'],'add',(_0x158eab,_0x36d713,_0x33fb86)=>{_0x25cff3(_0x36d713,_0x33fb86);}),_0x1fa936['listenTo'](this['items'],'remove',(_0x2daaf5,_0x2eaee8,_0x95f936)=>{_0x330fcb['items']['remove'](_0x95f936);}),_0x1fa936;}['_attachActions'](_0x4b3511,_0x40794a){const _0x335cd9=_0x4b3511&&_0x4b3511['element'];_0x335cd9&&(this['listenTo'](_0x335cd9,'mouseenter',()=>this['actionIndicator']=_0x40794a),this['listenTo'](_0x335cd9,'focus',()=>this['actionIndicator']=_0x40794a),this['listenTo'](_0x335cd9,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x335cd9,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3dd510=super['_createCommentInputView']();return _0x3dd510['bind']('placeholder')['to'](this),_0x3dd510;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x3664df){const _0x58adfa=_0x509b0c(_0x3664df,0x1e),_0x40cb73=new MutationObserver(_0x43351f=>{for(const _0x4c18ba of _0x43351f)('attributes'==_0x4c18ba['type']&&'class'==_0x4c18ba['attributeName']||'childList'==_0x4c18ba['type']||'characterData'==_0x4c18ba['type'])&&_0x58adfa();});return{'attach'(_0x3afcb7){_0x40cb73['observe'](_0x3afcb7,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x40cb73['disconnect'](),_0x58adfa['cancel']();}};}class Kt extends _0x31aaeb{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x35f475,_0x5bcfa2){super(_0x35f475),this['id']=_0x31c322(),this['focusTracker']=new _0x420295(),this['keystrokes']=new _0x2ed91d(),this['keystrokes']['set']('Esc',(_0x2d3862,_0x2674c7)=>this['fire']('Esc',_0x2674c7)),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']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x5bcfa2),this['mainView']=_0x5bcfa2;const _0xeb6ece=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xeb6ece['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 _0x1823fc=this['element']['clientHeight'];_0x1823fc&&(this['height']=_0x1823fc);}}class Yt extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x42988b(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x27968a,target:_0x1a1ebe,type:_0x4b61a0,isVisible:_0x26686b=!0x0}){super(),this['view']=_0x27968a,this['view']['element']||this['view']['render'](),this['_type']=_0x4b61a0,this['_target']=_0x1a1ebe,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x33b63a([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x218711,_0x2bf11f)=>{this['view']['focusTracker']['add'](_0x2bf11f);}),this['focusableElements']['on']('remove',(_0x31ff95,_0x3d205f)=>{this['view']['focusTracker']['remove'](_0x3d205f);}),this['set']('isVisible',_0x26686b);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x48d4d5=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x48d4d5),_0x48d4d5;}get['targetRect'](){const _0x65922b=this['target'];if(null===_0x65922b)return null;if(_0x65922b instanceof _0x36753e)return _0x65922b;const _0x575305=_0x65922b['filter'](_0x16a86a=>function(_0x4f7b6b){const _0x56004e=_0x4f7b6b['offsetParent'];if(_0x56004e)return!0x0;const _0x32d3b3=_0x4f7b6b['getClientRects']()['item'](0x0);return!!_0x32d3b3;}(_0x16a86a));return 0x0===_0x575305['length']?null:_0x36753e['getDomElementRects'](_0x575305[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3f77eb){this['view']['isActive']=_0x3f77eb,this['view']['mainView']['isActive']=_0x3f77eb;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x20f096){if(!(null===_0x20f096||_0x20f096 instanceof _0x36753e||Array['isArray'](_0x20f096)&&_0x20f096['every'](_0x36d0fb=>Gt(_0x36d0fb))))throw new _0x3bea1e('annotation-invalid-target',null,{'target':_0x20f096});}['_getNormalizedTarget'](){const _0x47bce9='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x47bce9)?[_0x47bce9]:_0x47bce9;}}function Gt(_0x1fbe36){return null!==_0x1fbe36&&'object'==typeof _0x1fbe36&&'nodeType'in _0x1fbe36&&0x1===_0x1fbe36['nodeType'];}class jt extends _0x33b63a{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x10e3dc=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x420295(),this['_focusTracker']['on']('change:isFocused',(_0x3ffb6e,_0x46dd76,_0x1d5009)=>{_0x1d5009||this['fire']('blur');});for(const _0x5fcb29 of _0x10e3dc)this['add'](_0x5fcb29);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x238f9f){if(this['has'](_0x238f9f))throw new _0x3bea1e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x238f9f['innerView'],_0x238f9f),this['_viewToAnnotation']['set'](_0x238f9f['view'],_0x238f9f);for(const _0x3f9b5a of _0x238f9f['focusableElements'])this['_focusTracker']['add'](_0x3f9b5a);this['listenTo'](_0x238f9f['focusableElements'],'add',(_0x2d8342,_0x32a94a)=>{this['_focusTracker']['add'](_0x32a94a);}),this['listenTo'](_0x238f9f['focusableElements'],'remove',(_0x5e758e,_0x401de1)=>{this['_focusTracker']['remove'](_0x401de1);}),this['listenTo'](_0x238f9f['view']['focusTracker'],'change:isFocused',(_0x5933f7,_0x373f9f,_0x4039a0)=>{_0x4039a0&&this['fire']('focus',_0x238f9f);}),_0x238f9f['updateTargetRect']();const _0x5106a7=this['_getOrderInContent'](_0x238f9f['view']['targetRect']);return super['add'](_0x238f9f,_0x5106a7);}['remove'](_0x3ea8a1){if(!this['has'](_0x3ea8a1))throw new _0x3bea1e('annotationcollection-not-existing-item',null);this['stopListening'](_0x3ea8a1['view']['focusTracker']),this['stopListening'](_0x3ea8a1['focusableElements']);for(const _0x4fed27 of _0x3ea8a1['focusableElements'])this['_focusTracker']['remove'](_0x4fed27);return this['_viewToAnnotation']['delete'](_0x3ea8a1['view']),this['_innerViewToAnnotation']['delete'](_0x3ea8a1['innerView']),super['remove'](_0x3ea8a1);}['getByInnerView'](_0x10c8f5){return this['_innerViewToAnnotation']['get'](_0x10c8f5);}['getByView'](_0x1e6eb9){return this['_viewToAnnotation']['get'](_0x1e6eb9);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2af389 of this)_0x2af389['updateTargetRect']();this['_sort']();}['_sort'](){const _0x33ca40=Array['from'](this)['sort']((_0x2b604b,_0x1645fb)=>qt(_0x2b604b['view']['targetRect'],_0x1645fb['view']['targetRect']));for(let _0xb7c10d=_0x33ca40['length']-0x1;_0xb7c10d>0x0;_0xb7c10d--){const _0x24c447=_0x33ca40[_0xb7c10d];_0xb7c10d!==this['getIndex'](_0x24c447)&&(this['remove'](_0x24c447),this['add'](_0x24c447));}}['_getOrderInContent'](_0x29d9ae){let _0x105bf2=0x0;if(!_0x29d9ae)return this['length'];for(const _0x565e60 of this){const _0x5f215b=_0x565e60['view']['targetRect'];if(_0x5f215b){if(qt(_0x29d9ae,_0x5f215b)<0x0)return _0x105bf2;_0x105bf2++;}}return _0x105bf2;}}function Xt({source:_0x39e9af,target:_0x584798,filter:_0x5bf251}){for(const _0x580e2f of _0x39e9af)_0x5bf251(_0x580e2f)&&_0x584798['add'](_0x580e2f);_0x584798['listenTo'](_0x39e9af,'add',(_0x1cf4de,_0xa3dbaa)=>{_0x5bf251(_0xa3dbaa)&&_0x584798['add'](_0xa3dbaa);}),_0x584798['listenTo'](_0x39e9af,'remove',(_0x408ed7,_0x19554c)=>{_0x584798['has'](_0x19554c)&&_0x584798['remove'](_0x19554c);});}function qt(_0x360f4e,_0xdc74dc){if(null===_0x360f4e&&null===_0xdc74dc)return 0x0;if(null===_0x360f4e)return-0x1;if(null===_0xdc74dc)return 0x1;const _0x9df743=_0x360f4e['top']-_0xdc74dc['top'];return 0x0==_0x9df743?_0x360f4e['left']-_0xdc74dc['left']:_0x9df743;}class $t extends _0x4d5b57{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4b29d){if(super(_0x4b29d),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4b29d instanceof _0x57726a){const _0x1bf8c7=_0x4b29d['locale'];_0x4b29d['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x1bf8c7,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x1bf8c7,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x1bf8c7,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x1bf8c7,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x1bf8c7,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x1bf8c7,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x1bf8c7,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x24949b){this['collection']['add'](_0x24949b);}['remove'](_0x4eaf83){this['collection']['remove'](_0x4eaf83),_0x4eaf83['destroy']();}['refreshVisibility'](){for(const _0x26a757 of this['collection'])_0x26a757['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x281122){return this['collection']['getByInnerView'](_0x281122);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x465047 of this['collection'])_0x465047['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x8a9e9){this['fire']('_activateAnnotation',_0x8a9e9);}['createAnnotation'](_0x122bb4){return new Yt(_0x122bb4);}['createAnnotationView'](_0x563e9c,_0x17ebb0){return new Kt(_0x563e9c,_0x17ebb0);}['_addActiveAnnotation'](_0xce31d7){const _0x4fb68f=new Set(this['activeAnnotations']);_0x4fb68f['add'](_0xce31d7),this['activeAnnotations']=_0x4fb68f;}['_removeActiveAnnotation'](_0x1657b7){const _0x4a10c3=new Set(this['activeAnnotations']);_0x4a10c3['delete'](_0x1657b7),this['activeAnnotations']=_0x4a10c3;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1c070e=this['collection'],_0x2a3712=this['_visibleAnnotations'];function _0x4ead7f(_0x508635){const _0x62241d=_0x508635['source'];_0x62241d['isVisible']&&!_0x2a3712['has'](_0x62241d)?_0x2a3712['add'](_0x62241d):!_0x62241d['isVisible']&&_0x2a3712['has'](_0x62241d)&&_0x2a3712['remove'](_0x62241d),_0x62241d['view']['focusTracker']['remove'](_0x62241d['view']['element']),_0x62241d['view']['focusTracker']['add'](_0x62241d['view']['element']);}this['listenTo'](_0x1c070e,'add',(_0x4edb79,_0x483072)=>{_0x483072['isVisible']&&_0x2a3712['add'](_0x483072),this['listenTo'](_0x483072,'change:isVisible',_0x4ead7f);}),this['listenTo'](_0x1c070e,'remove',(_0x4fb3af,_0x1e8ebf)=>{_0x2a3712['has'](_0x1e8ebf)&&_0x2a3712['remove'](_0x1e8ebf),this['stopListening'](_0x1e8ebf,'change:isVisible',_0x4ead7f);});}['_setupEnterAnnotationKeystroke'](){const _0x4e5653=_0x2154a3=>{_0x2154a3['on']('ready',()=>{_0x2154a3['keystrokes']['set'](_0x27a185,(_0x1bd614,_0x41b81f)=>{const _0x40cc19=_0x459cc4(this['activeAnnotations']['values']());_0x40cc19&&(_0x40cc19['view']['focus'](),_0x41b81f());});});};this['context']instanceof _0x57726a?_0x4e5653(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x47164f,_0x131431)=>{_0x4e5653(_0x131431);});}['_setupEscapeAnnotationHandling'](){const _0x3212aa=_0x40ea0b=>{const _0xcdc498=_0x40ea0b['source'],_0x3c01e1=[];let _0x25e10a;if(Array['isArray'](_0xcdc498['target'])){_0x25e10a=_0xcdc498['target'][0x0],this['context']instanceof _0x57726a?_0x3c01e1['push'](this['context']):this['context']['editors']&&_0x3c01e1['push'](...this['context']['editors']);for(const _0x1f75d6 of _0x3c01e1)for(const _0x11a0c1 of _0x1f75d6['editing']['view']['domRoots']['values']())if(_0x11a0c1['contains'](_0x25e10a))return void _0x1f75d6['editing']['view']['focus']();_0x25e10a['focus']();}};this['listenTo'](this['collection'],'add',(_0x3a1344,_0x2e5f3f)=>{this['listenTo'](_0x2e5f3f,'escape',_0x3212aa,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x499e0a,_0x350e64)=>{this['stopListening'](_0x350e64,'escape',_0x3212aa);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x4d5b57{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x18ca69,_0x2d9be6];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f92a6){super(_0x4f92a6),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1e4aae=this['context']['config'];_0x1e4aae['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1e4aae['define']('comments.maxThreadTotalWeight',0x1f4),_0x1e4aae['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1e4aae['define']('comments.CommentThreadView',Bt),_0x1e4aae['define']('comments.CommentView',Ut),_0x1e4aae['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4eb5ba=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x253eb6,_0x1d912a)=>this['_addCommentThread'](_0x1d912a)),this['on']('submitCommentThread',(_0x5766de,_0x2d3e12)=>this['_submitCommentThread'](_0x2d3e12)),this['on']('resolveCommentThread',(_0x556f6e,_0x41f955)=>this['_resolveCommentThread'](_0x41f955)),this['on']('resolveCommentThread',(_0x2ee191,_0x2d029e)=>this['_updateActiveAnnotation'](_0x2d029e),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xa5de2b,_0x575ff2)=>this['_reopenCommentThread'](_0x575ff2)),this['on']('reopenCommentThread',(_0xa67d7b,_0x397623)=>this['_updateActiveAnnotation'](_0x397623),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x6f72d4,_0x40f612)=>this['_removeCommentThread'](_0x40f612)),this['on']('updateCommentThread',(_0x4a271d,_0x4c5730)=>this['_updateCommentThread'](_0x4c5730)),this['on']('updateCommentThread',(_0x480653,_0x496242)=>this['_updateActiveAnnotation'](_0x496242),{'priority':'lowest'}),this['on']('addComment',(_0x1a342b,_0x1e1289)=>this['_addComment'](_0x1e1289)),this['on']('updateComment',(_0x7d5704,_0x4cd05c)=>this['_updateComment'](_0x4cd05c)),this['on']('removeComment',(_0x917b7e,_0x5dbb32)=>this['_removeComment'](_0x5dbb32)),this['on']('addComment',(_0x261ef5,{threadId:_0x2641e0,isFromAdapter:_0x32b414})=>{if(_0x32b414)return;const _0x2967d5=this['getCommentThread'](_0x2641e0),_0x57a958=_0x2967d5&&this['_threadToController']['get'](_0x2967d5);_0x57a958&&_0x57a958['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4eb5ba,'change:activeAnnotations',(_0x2a1dbe,_0x40de21,_0x523e1e)=>{const _0x139618=Array['from'](_0x523e1e)['map'](_0x2f8838=>this['_viewToController']['get'](_0x2f8838['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x139618?_0x139618['model']:null;});}set['adapter'](_0x1fa04f){if(this['_adapter'])throw new _0x3bea1e('commentsrepository-adapter-already-set');this['_adapter']=_0x1fa04f;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xa246f2=zt,threadId:_0xcbc4df=_0x31c322(),comments:_0x14b225=[],unlinkedAt:_0x4d12cd=null,resolvedAt:_0x479c5a=null,resolvedBy:_0x461460=null,target:_0x4e4b62=null,context:_0x632e03=null,attributes:_0x1ae2f2={},isResolvable:_0x4256d4=!0x0,isSubmitted:_0x1e7aaa=!0x1,isFromAdapter:_0x4c239b=!0x1}={}){return this['fire'](ii('addCommentThread',_0xa246f2),{'channelId':_0xa246f2,'threadId':_0xcbc4df,'comments':_0x14b225,'unlinkedAt':_0x4d12cd,'resolvedAt':_0x479c5a,'resolvedBy':_0x461460,'target':_0x4e4b62,'context':_0x632e03,'attributes':_0x1ae2f2,'isFromAdapter':_0x4c239b,'isResolvable':_0x4256d4,'isSubmitted':_0x1e7aaa}),this['getCommentThread'](_0xcbc4df);}['openNewCommentThread']({channelId:_0x53c127=zt,threadId:_0x102d66=_0x31c322(),target:_0x58a0f1,context:_0x49c473=null,isResolvable:_0x14e30c=!0x0}){if(this['_readOnlyChannels']['has'](_0x53c127)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x58a0f1)throw new _0x3bea1e('commentsrepository-missing-target');const _0x21d54e=this['addCommentThread']({'channelId':_0x53c127,'threadId':_0x102d66,'target':_0x58a0f1,'context':_0x49c473,'isResolvable':_0x14e30c});if(!_0x21d54e)return null;const _0x5c39dd=this['_threadToController']['get'](_0x21d54e),_0x544222=_0x5c39dd['view']['commentThreadInputView']['commentInputView'],_0x526575=this['context']['plugins']['get']($t),_0x7bbc53=_0x526575['getByInnerView'](_0x5c39dd['view']);return _0x526575['activate'](_0x7bbc53),_0x544222['once']('editorReady',()=>_0x544222['focus']()),_0x21d54e;}['hasCommentThread'](_0x4a1a38){if('string'!=typeof _0x4a1a38)throw new _0x3bea1e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4a1a38);}['updateCommentThread']({channelId:_0x5d46d8=zt,threadId:_0x1e0d3d,context:_0x5b05e6,unlinkedAt:_0x4a1207,attributes:_0x2c4cef,isFromAdapter:_0x53306b=!0x1}){return this['fire'](ii('updateCommentThread',_0x5d46d8),{'channelId':_0x5d46d8,'threadId':_0x1e0d3d,'context':_0x5b05e6,'unlinkedAt':_0x4a1207,'attributes':_0x2c4cef,'isFromAdapter':_0x53306b}),this['getCommentThread'](_0x1e0d3d);}['getCommentThread'](_0x37f958){if('string'!=typeof _0x37f958)throw new _0x3bea1e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x37f958);}['fetchCommentThread']({channelId:_0x34c246,threadId:_0x24d55b}={}){const _0x346f46=this['getCommentThread'](_0x24d55b);if(_0x346f46)return Promise['resolve'](_0x346f46);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3bea1e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x34c246,'threadId':_0x24d55b})['then'](_0x10c3de=>this['hasCommentThread'](_0x24d55b)?this['getCommentThread'](_0x24d55b):_0x10c3de?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x34c246},_0x10c3de)):void 0x0)['catch'](_0x55658b=>{throw console['error'](_0x55658b),new _0x3bea1e('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x3c1d70,skipNotAttached:_0x89b461=!0x1,skipEmpty:_0x439489=!0x1,toJSON:_0x1c38f4=!0x1}={}){const _0x29aa32=[];for(const _0x4aa60f of this['_threads']['values']())_0x3c1d70&&_0x4aa60f['channelId']!==_0x3c1d70||_0x89b461&&!_0x4aa60f['isAttached']||_0x439489&&0x0===_0x4aa60f['length']||_0x29aa32['push'](_0x4aa60f);return _0x1c38f4?_0x29aa32['map'](_0x59622e=>_0x59622e['toJSON']()):_0x29aa32;}['getAnnotationForCommentThread'](_0x276002){const _0x214b71=this['_threadToController']['get'](_0x276002);if(!_0x214b71)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x214b71['view'])||null;}['getCommentThreadForAnnotation'](_0x5ad667){const _0x425b1a=this['_viewToController']['get'](_0x5ad667['innerView']);return _0x425b1a?_0x425b1a['model']:null;}['setActiveCommentThread'](_0x64de7){const _0x4803a7=this['context']['plugins']['get']($t);if(!_0x64de7)return void(this['activeCommentThread']&&_0x4803a7['deactivateAll']());const _0x30ee55=this['getCommentThread'](_0x64de7);if(!_0x30ee55)throw new _0x3bea1e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x64de7});if(!this['_threadToController']['has'](_0x30ee55))throw new _0x3bea1e('commentsrepository-active-not-attached',null,{'threadId':_0x64de7});const _0x2f5585=_0x4803a7['getByInnerView'](this['_threadToController']['get'](_0x30ee55)['view']);_0x4803a7['activate'](_0x2f5585);}['switchReadOnly'](_0x485ecb,_0x569787){_0x485ecb?this['_readOnlyChannels']['add'](_0x569787):this['_readOnlyChannels']['delete'](_0x569787),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x115b71){return this['_readOnlyChannels']['has'](_0x115b71)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1f6f6e,_0x36aec6){return new It(_0x1f6f6e,_0x36aec6);}['setPermissions'](_0x3fdc9e,_0x1f4603=zt){this['_permissions']['set'](_0x1f4603,_0x3fdc9e),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x49ca62=zt){return this['_permissions']['has'](_0x49ca62)?this['_permissions']['get'](_0x49ca62):Jt;}['_addCommentThread']({channelId:_0x3cb65f,threadId:_0x25dbb8,comments:_0x379dd7,unlinkedAt:_0x1a11a7,resolvedAt:_0x1eeae9,resolvedBy:_0x59429d,target:_0x52438b,context:_0x31b2de,attributes:_0x479866,isFromAdapter:_0x534416,isResolvable:_0x46cfa8,isSubmitted:_0x3b98db}){if('string'!=typeof _0x25dbb8)throw new _0x3bea1e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x25dbb8});if(this['hasCommentThread'](_0x25dbb8))throw new _0x3bea1e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x25dbb8});const _0xef1501=new Zt(this,{'channelId':_0x3cb65f,'id':_0x25dbb8,'context':_0x31b2de,'attributes':_0x479866,'unlinkedAt':_0x1a11a7,'resolvedAt':_0x1eeae9,'resolvedBy':_0x59429d?this['context']['plugins']['get'](_0x2d9be6)['getUser'](_0x59429d):null,'isResolvable':_0x46cfa8,'isSubmitted':_0x3b98db||_0x534416});this['_threads']['set'](_0x25dbb8,_0xef1501);for(const _0x313cbb of _0x379dd7)_0xef1501['_add'](this['_createNewComment']({'threadId':_0x25dbb8,..._0x313cbb}));return _0x52438b&&_0xef1501['attachTo'](_0x52438b),_0x534416||!_0xef1501['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3cb65f,'threadId':_0x25dbb8});}['_submitCommentThread']({channelId:_0x5c1f8b,threadId:_0x78b2f2}){if(!this['hasCommentThread'](_0x78b2f2))throw new _0x3bea1e('commentsrepository-missing-comment-thread',this);const _0x28beeb=this['getCommentThread'](_0x78b2f2);if(_0x28beeb['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x273d0d,comments:_0x20ac8,resolvedAt:_0x551495,resolvedBy:_0x8b0559,context:_0x1f4a52,attributes:_0x3fd661}=_0x28beeb,_0x4fdb61=this['context']['plugins']['get']('PendingActions'),_0x3b7e33=_0x4fdb61['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x5c1f8b,'threadId':_0x273d0d,'comments':_0x20ac8['map'](_0x5eb81a=>_0x5eb81a['toJSON']()),'resolvedAt':_0x551495,'resolvedBy':_0x8b0559?_0x8b0559['id']:_0x8b0559,'context':_0x1f4a52,'attributes':_0x3fd661})['then'](({comments:_0x1a465a})=>{_0x4fdb61['remove'](_0x3b7e33);for(const _0x2f4e30 of _0x1a465a)this['_updateComment']({'channelId':_0x5c1f8b,'threadId':_0x78b2f2,'commentId':_0x2f4e30['commentId'],'createdAt':_0x2f4e30['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x255938=>{throw console['error'](_0x255938),new _0x3bea1e('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2016bf,target:_0x14aa63}){const _0x27388f=this['getCommentThread'](_0x2016bf);if(!_0x27388f)throw new _0x3bea1e('commentsrepository-attach-missing-comment-thread',this);const _0x77ac41=this['context']['plugins']['get']('PendingActions'),_0x23c769=this['context']['plugins']['get']($t),_0x9a377e=this['_createCommentThreadView'](_0x27388f),_0x1b6253=new It(_0x27388f,_0x9a377e);let _0x1d7c82=null;_0x9a377e['on']('change:isDirty',(_0x2a4126,_0x1f9f2a,_0x6c17ef)=>{_0x6c17ef?_0x1d7c82=_0x77ac41['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1d7c82&&(_0x77ac41['remove'](_0x1d7c82),_0x1d7c82=null);}),this['_threadToController']['set'](_0x27388f,_0x1b6253),this['_viewToController']['set'](_0x9a377e,_0x1b6253);const _0x377b94=new Kt(this['context']['locale'],_0x9a377e);_0x377b94['bind']('length')['to'](_0x9a377e),_0x377b94['bind']('isDirty')['to'](_0x9a377e,'isDirty',_0x9a377e,'length',(_0x249804,_0x477d2d)=>_0x249804||!_0x477d2d),_0x377b94['bind']('isActive')['to'](_0x9a377e),_0x377b94['type']='comment';const _0x4e2aec=new Yt({'view':_0x377b94,'target':_0x14aa63,'type':'comment','isVisible':!_0x27388f['archivedAt']&&!!('function'==typeof _0x14aa63?_0x14aa63():_0x14aa63)});return _0x9a377e['on']('escape',()=>{_0x4e2aec['fire']('escape');}),this['_bindAnnotationToEditors'](_0x9a377e,_0x4e2aec),_0x23c769['add'](_0x4e2aec),_0x4e2aec;}['_bindAnnotationToEditors'](_0x3a65cb,_0x127b86){this['listenTo'](_0x3a65cb,'editorReady',(_0x4043ba,_0x7988ab)=>{const _0x8d4381=_0x7988ab['ui']['view']['body']['bodyCollectionContainer'];_0x127b86['focusableElements']['add'](_0x8d4381),this['context']instanceof _0x57726a&&this['context']['ui']['focusTracker']['add'](_0x8d4381);},{'priority':'highest'}),this['listenTo'](_0x3a65cb,'editorDestroyed',(_0x1da8bb,_0x1c8019)=>{const _0x4b8db6=_0x1c8019['ui']['view']['body']['bodyCollectionContainer'];_0x127b86['focusableElements']['has'](_0x4b8db6)&&_0x127b86['focusableElements']['remove'](_0x4b8db6),this['context']instanceof _0x57726a&&this['context']['ui']['focusTracker']['remove'](_0x4b8db6);});}['_unbindEditors'](_0x237d70){this['stopListening'](_0x237d70,'editorReady'),this['stopListening'](_0x237d70,'editorDestroyed');}['_createCommentThreadView'](_0x15d506){const _0x455090=this['context']['plugins']['get'](_0x2d9be6),{config:_0x3739e5,locale:_0xd5299c}=this['context'],_0x20c9d5=_0x512d77(_0x3739e5['get']('locale'),_0xd5299c);return new(0x0,(_0x3739e5['get']('comments'))['CommentThreadView'])(_0xd5299c,_0x15d506,_0x455090['me'],{'editorConfig':{..._0x3739e5['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3739e5['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3739e5['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3739e5['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3739e5['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x20c9d5,'CommentView':_0x3739e5['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3bab41,channelId:_0x3f31c4,resolvedAt:_0xc17c18,resolvedBy:_0x378097,isFromAdapter:_0x46b671}){if(!this['hasCommentThread'](_0x3bab41))throw new _0x3bea1e('commentsrepository-missing-comment-thread',null,{'threadId':_0x3bab41});const _0x5c7399=this['getCommentThread'](_0x3bab41);if(_0x5c7399['isResolved'])throw new _0x3bea1e('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3bab41});const _0x589597=this['context']['plugins']['get'](_0x2d9be6);if(_0x5c7399['resolvedBy']=_0x589597['getUser'](_0x378097),_0x5c7399['resolvedAt']=_0xc17c18,_0x46b671||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3e12c0=this['context']['plugins']['get']('PendingActions'),_0x482ff7=_0x3e12c0['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3f31c4,'threadId':_0x3bab41})['then'](({resolvedAt:_0x1b65b0,resolvedBy:_0x3bc21c})=>{_0x3e12c0['remove'](_0x482ff7),_0x5c7399['resolvedBy']['id']!==_0x3bc21c&&(_0x5c7399['resolvedBy']=_0x589597['getUser'](_0x3bc21c)),_0x5c7399['resolvedAt']=_0x1b65b0;})['catch'](_0x5a4331=>{throw console['error'](_0x5a4331),new _0x3bea1e('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5a9b0b,channelId:_0x791b49,isFromAdapter:_0x5318dd}){if(!this['hasCommentThread'](_0x5a9b0b))throw new _0x3bea1e('commentsrepository-missing-comment-thread',null,{'threadId':_0x5a9b0b});const _0x69a536=this['getCommentThread'](_0x5a9b0b);if(!_0x69a536['isResolved'])throw new _0x3bea1e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5a9b0b});if(_0x69a536['resolvedBy']=null,_0x69a536['resolvedAt']=null,_0x5318dd||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2e4952=this['context']['plugins']['get']('PendingActions'),_0x13a3ca=_0x2e4952['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x791b49,'threadId':_0x5a9b0b})['then'](()=>_0x2e4952['remove'](_0x13a3ca))['catch'](_0x1f4a5c=>{throw console['error'](_0x1f4a5c),new _0x3bea1e('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x56b8aa,isFromAdapter:_0x42376b}){const _0x26882a=this['getCommentThread'](_0x56b8aa);if(!_0x26882a)throw new _0x3bea1e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x56b8aa),this['_threads']['delete'](_0x56b8aa),!_0x26882a['isSubmitted']||_0x42376b||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3b3edc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4afadb}=_0x26882a,_0x78a21a=_0x3b3edc['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4afadb,'threadId':_0x56b8aa})['then'](()=>_0x3b3edc['remove'](_0x78a21a))['catch'](_0x25ca1c=>{throw console['error'](_0x25ca1c),new _0x3bea1e('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x25d5de,unlinkedAt:_0x1b6c0a,context:_0x315e06,attributes:_0x23e94c,isFromAdapter:_0x2d2abd}){if('string'!=typeof _0x25d5de)throw new _0x3bea1e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x25d5de});if(!this['hasCommentThread'](_0x25d5de))throw new _0x3bea1e('commentsrepository-missing-comment-thread',null,{'threadId':_0x25d5de});const _0x1f0348=this['getCommentThread'](_0x25d5de);let _0x56a098=!0x1;if(void 0x0!==_0x315e06&&_0x1f0348['context']!==_0x315e06&&(_0x1f0348['context']=_0x315e06,_0x56a098=!0x0),void 0x0!==_0x1b6c0a&&_0x1f0348['unlinkedAt']!==_0x1b6c0a&&(_0x1f0348['unlinkedAt']=_0x1b6c0a,_0x56a098=!0x0),_0x23e94c&&!_0x45517a(_0x23e94c,_0x1f0348['attributes'])&&(_0x1f0348['attributes']=_0x23e94c,_0x56a098=!0x0),!_0x56a098)return Promise['resolve']();if(!_0x1f0348['isSubmitted']||_0x2d2abd||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x30bcaf=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1e70b1}=_0x1f0348,_0x2e8149=_0x30bcaf['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1e70b1,'threadId':_0x25d5de,'context':_0x315e06,'unlinkedAt':_0x1b6c0a,'attributes':_0x23e94c})['then'](()=>_0x30bcaf['remove'](_0x2e8149))['catch'](_0x3ca5ad=>{throw console['error'](_0x3ca5ad),new _0x3bea1e('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4ff817){const _0x597d5e=this['context']['plugins']['get']($t),_0x598adb=this['getCommentThread'](_0x4ff817);if(_0x598adb['_isAttached']=!0x1,this['_threadToController']['has'](_0x598adb)){const _0xcf328=this['_threadToController']['get'](_0x598adb),_0x59d8c6=_0xcf328['view'],_0x5e92f2=_0x597d5e['getByInnerView'](_0x59d8c6);this['_threadToController']['delete'](_0x598adb),this['_viewToController']['delete'](_0x59d8c6),_0x5e92f2&&_0x597d5e['remove'](_0x5e92f2),_0xcf328['destroy'](),_0x59d8c6['destroy']()['then'](()=>{this['_unbindEditors'](_0x59d8c6);});}}['_updateActiveAnnotation']({threadId:_0x4c22d7,resolvedAt:_0x4269b4,unlinkedAt:_0x4acf1d}){const _0x183083=!!_0x4269b4,_0x322f14=this['context']['plugins']['get']($t),_0x58f131=this['getCommentThread'](_0x4c22d7);if(this['_threadToController']['has'](_0x58f131)){const _0x17408c=this['_threadToController']['get'](_0x58f131)['view'],_0xf5d10b=_0x322f14['getByInnerView'](_0x17408c);_0xf5d10b&&(_0x183083&&_0x322f14['_removeActiveAnnotation'](_0xf5d10b),_0x4acf1d?_0xf5d10b['isVisible']=!0x1:_0xf5d10b['refreshVisibility']());}}['_getExternalAuthor'](_0x4ef878){const _0x262fc5=this['context']['plugins']['get'](_0x2d9be6),_0x3bb8d0=_0x4e69f('external:'+_0x4ef878),_0x430764=_0x262fc5['getUser'](_0x3bb8d0);return _0x430764||_0x262fc5['addUser']({'id':_0x3bb8d0,'name':_0x4ef878});}['_createNewComment']({threadId:_0x9870e9,commentId:_0x128473=_0x31c322(),content:_0x1a6ea2,authorId:_0x1d811c,createdAt:_0x25459e,attributes:_0x5554a9}){if('string'!=typeof _0x128473)throw new _0x3bea1e('commentsrepository-invalid-commentid');if('string'!=typeof _0x1d811c)throw new _0x3bea1e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1a6ea2||!_0x1a6ea2['trim']())throw new _0x3bea1e('commentsrepository-invalid-comment-content');const _0x465c00=this['context']['plugins']['get'](_0x2d9be6)['getUser'](_0x1d811c);if(!_0x465c00)throw new _0x3bea1e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1d811c});let _0x27707e=null,_0x5b1fc3=_0x25459e;return _0x5554a9?.['@external']&&(_0x27707e=this['_getExternalAuthor'](_0x5554a9['@external']['authorName']),_0x5b1fc3=new Date(_0x5554a9['@external']['createdAt'])),new ti(this,{'threadId':_0x9870e9,'id':_0x128473,'author':_0x27707e||_0x465c00,'creator':_0x465c00,'content':_0x1a6ea2,'createdAt':_0x25459e,'authoredAt':_0x5b1fc3,'attributes':_0x5554a9});}['_addComment'](_0x1d25e){let {threadId:_0x142c84,content:_0x2a31bc,attributes:_0x29a13f,isFromAdapter:_0x335eba}=_0x1d25e;const _0x3d5be2=this['getCommentThread'](_0x1d25e['threadId']);if(!_0x3d5be2)throw new _0x3bea1e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x24bb0f=this['_createNewComment'](_0x1d25e),{id:_0x59fd89}=_0x24bb0f;if(_0x3d5be2['_add'](_0x24bb0f),_0x335eba||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3d5be2['isSubmitted'])return Promise['resolve']();const _0x54d113=this['context']['plugins']['get']('PendingActions'),{channelId:_0x283ce1}=_0x3d5be2,_0x1083e5=_0x54d113['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x29a13f||(_0x29a13f={}),this['adapter']['addComment']({'channelId':_0x283ce1,'threadId':_0x142c84,'commentId':_0x59fd89,'content':_0x2a31bc,'attributes':_0x29a13f})['then'](_0x5effe9=>{_0x54d113['remove'](_0x1083e5),_0x5effe9&&this['_updateComment']({'channelId':_0x283ce1,'threadId':_0x142c84,'commentId':_0x59fd89,'createdAt':_0x5effe9['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x553122=>{throw console['error'](_0x553122),new _0x3bea1e('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x38d9fb,commentId:_0x5a8c72,content:_0xe23a0e,createdAt:_0x21da4f,attributes:_0x4d3028,isFromAdapter:_0x4b3f7e}){if(void 0x0!==_0xe23a0e&&('string'!=typeof _0xe23a0e||!_0xe23a0e['trim']()['length']))throw new _0x3bea1e('commentsrepository-update-comment-invalid-content');const _0xd0899a=this['getCommentThread'](_0x38d9fb),_0x390da9=_0xd0899a['getComment'](_0x5a8c72);if(!_0x390da9)throw new _0x3bea1e('commentsrepository-update-missing-comment',this);let _0x2f211f=!0x1;if(_0xe23a0e&&_0xe23a0e!==_0x390da9['content']&&(_0x390da9['isEditable']||_0x4b3f7e)&&(_0x390da9['content']=_0xe23a0e,_0x2f211f=!0x0),_0x21da4f&&_0x21da4f!==_0x390da9['createdAt']&&(_0x390da9['createdAt']=_0x21da4f,_0x390da9['attributes']&&_0x390da9['attributes']['@external']||(_0x390da9['authoredAt']=_0x21da4f),_0x2f211f=!0x0),_0x4d3028&&!_0x45517a(_0x4d3028,_0x390da9['attributes'])&&(_0x390da9['attributes']=_0x4d3028,_0x2f211f=!0x0),!_0x2f211f)return Promise['resolve']();if(_0xd0899a['fire']('commentUpdated'),_0x4b3f7e||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x82bddb=this['context']['plugins']['get']('PendingActions'),{channelId:_0x467b7b}=this['getCommentThread'](_0x390da9['threadId']),_0x456ed5=_0x82bddb['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x467b7b,'threadId':_0x38d9fb,'commentId':_0x5a8c72,'content':_0xe23a0e,'attributes':_0x4d3028})['then'](()=>_0x82bddb['remove'](_0x456ed5))['catch'](_0x9af9b0=>{throw console['error'](_0x9af9b0),new _0x3bea1e('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x24f51c,commentId:_0x353173,isFromAdapter:_0x660d79}){const _0x522aa4=this['getCommentThread'](_0x24f51c),_0x5e31ea=_0x522aa4['getComment'](_0x353173);if(!_0x5e31ea)throw new _0x3bea1e('commentsrepository-remove-missing-comment',this);if(_0x522aa4['_remove'](_0x5e31ea),_0x660d79||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3e446b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2051ff}=_0x522aa4,_0x1a56c5=_0x3e446b['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2051ff,'threadId':_0x24f51c,'commentId':_0x353173})['then'](()=>_0x3e446b['remove'](_0x1a56c5))['catch'](_0x25af8a=>{throw console['error'](_0x25af8a),new _0x3bea1e('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x42988b(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x2284ed,_0x1d7e2b){super();const _0x4809f7=_0x1d7e2b['isResolvable'];this['channelId']=_0x1d7e2b['channelId'],this['id']=_0x1d7e2b['id'],this['comments']=new _0x33b63a(),this['_repository']=_0x2284ed,this['_isAttached']=!0x1,this['_isSubmitted']=_0x1d7e2b['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2284ed,'_permissions',_0x2284ed,'_readOnlyChannels',()=>_0x2284ed['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2284ed,'_permissions',()=>_0x2284ed['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2284ed,'_permissions',()=>{const _0x2f57b8=_0x2284ed['getPermissions'](this['channelId']);return _0x2f57b8['write']||_0x2f57b8['admin'];}),this['bind']('isResolvable')['to'](_0x2284ed,'_permissions',()=>_0x4809f7&&_0x2284ed['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x1d7e2b['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5c0464,_0x3efa64)=>_0x5c0464?_0x3efa64?_0x5c0464<_0x3efa64?_0x5c0464:_0x3efa64:_0x5c0464:_0x3efa64),this['set']('unlinkedAt',_0x1d7e2b['unlinkedAt']||null),this['set']('resolvedAt',_0x1d7e2b['resolvedAt']||null),this['set']('resolvedBy',_0x1d7e2b['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x147ac3=>!!_0x147ac3),this['set']('attributes',_0x1d7e2b['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x4267ea,_0x3884aa)=>_0x4267ea+_0x3884aa['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x3c0336,id:_0x3687aa}=this;this['_repository']['fire'](ii('submitCommentThread',_0x3c0336),{'channelId':_0x3c0336,'threadId':_0x3687aa});}['setUnlinkedAt'](_0x15e11e){this['_update']({'unlinkedAt':_0x15e11e});}['resolve']({resolvedAt:_0x6e8b02=new Date(),resolvedBy:_0x17116f='',isFromAdapter:_0x307bc4=!0x1}={}){const _0x5e64fc=this['_repository']['context']['plugins']['get'](_0x2d9be6)['me'],{channelId:_0xcc2a3,id:_0x11f8e8}=this;this['_repository']['fire'](ii('resolveCommentThread',_0xcc2a3),{'channelId':_0xcc2a3,'threadId':_0x11f8e8,'resolvedAt':_0x6e8b02,'resolvedBy':_0x17116f||_0x5e64fc['id'],'isFromAdapter':_0x307bc4});}['reopen']({isFromAdapter:_0x1c8640=!0x1}={}){const {channelId:_0x5df1e1,id:_0x2a4887}=this;this['_repository']['fire'](ii('reopenCommentThread',_0x5df1e1),{'channelId':_0x5df1e1,'threadId':_0x2a4887,'isFromAdapter':_0x1c8640});}['setContext'](_0x1133d1){this['context']||this['_update']({'context':_0x1133d1});}['setAttribute'](_0x2e626a,_0x30d5e0){const _0x256e0=_0x46f210(this['attributes']);_0x3442a5(_0x256e0,_0x2e626a,_0x30d5e0),this['_update']({'attributes':_0x256e0});}['removeAttribute'](_0x3df584){const _0x46d564=_0x46f210(this['attributes']);_0x3867e8(_0x46d564,_0x3df584),this['_update']({'attributes':_0x46d564});}['remove']({isFromAdapter:_0x131709=!0x1}={}){const {channelId:_0x49730e,id:_0x4d6041}=this;this['_repository']['fire'](ii('removeCommentThread',_0x49730e),{'channelId':_0x49730e,'threadId':_0x4d6041,'isFromAdapter':_0x131709});}['attachTo'](_0x3f38c2){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x3f38c2});}['addComment'](_0x365717){const {channelId:_0x31266d,id:_0x157c92}=this;this['_repository']['fire'](ii('addComment',_0x31266d,_0x157c92),Object['assign']({'channelId':_0x31266d,'threadId':_0x157c92},_0x365717));}['getComment'](_0x2922b7){if('string'!=typeof _0x2922b7)throw new _0x3bea1e('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x2922b7});return this['comments']['get'](_0x2922b7);}['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'](_0x21697d=>_0x21697d['toJSON']()),'attributes':this['attributes']};}['_add'](_0x3965eb){return this['listenTo'](_0x3965eb,'change:authoredAt',()=>{const _0x19c535=this['_findOptimalIndex'](_0x3965eb),_0x288078=this['comments'];_0x19c535-0x1!=_0x288078['getIndex'](_0x3965eb)&&_0x19c535+0x1!=_0x288078['getIndex'](_0x3965eb)&&(this['_remove'](_0x3965eb),this['_add'](_0x3965eb));}),this['comments']['add'](_0x3965eb,this['_findOptimalIndex'](_0x3965eb));}['_update'](_0xbf19f){const {channelId:_0x2305a4,id:_0x676dfb}=this;this['_repository']['fire'](ii('updateCommentThread',_0x2305a4),{..._0xbf19f,'channelId':_0x2305a4,'threadId':_0x676dfb});}['_remove'](_0x500e5b){return this['stopListening'](_0x500e5b),_0x500e5b['destroy'](),this['comments']['remove'](_0x500e5b);}['_findOptimalIndex'](_0x227fda){const _0x3fa06d=this['comments']['find'](_0x27b78f=>new Date(_0x27b78f['authoredAt'])['getTime']()>new Date(_0x227fda['authoredAt'])['getTime']());return _0x3fa06d?this['comments']['getIndex'](_0x3fa06d):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x42988b(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2dd9a1,_0x167e27){super();const _0x1c872b=_0x2dd9a1['context']['plugins']['get'](_0x2d9be6)['me'],_0x5f01e4=_0x2dd9a1['getCommentThread'](_0x167e27['threadId']),_0x361337=0x0===_0x5f01e4['comments']['length'],_0x180733=_0x1c872b===_0x167e27['author'];this['id']=_0x167e27['id'],this['threadId']=_0x167e27['threadId'],this['author']=_0x167e27['author'],this['creator']=_0x167e27['creator'],this['isExternal']=Boolean(_0x167e27['attributes']&&_0x167e27['attributes']['@external']),this['set']('content',_0x167e27['content']),this['createdAt']=_0x167e27['createdAt']||new Date(),this['set']('authoredAt',_0x167e27['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5f01e4,'resolvedAt'),this['set']('attributes',_0x167e27['attributes']||{}),this['bind']('isEditable')['to'](_0x2dd9a1,'_permissions',()=>{const _0xbde679=_0x2dd9a1['getPermissions'](_0x5f01e4['channelId'])['write'],_0x1ffdee=_0x2dd9a1['getPermissions'](_0x5f01e4['channelId'])['modifyAll'];return _0x180733&&_0xbde679||!_0x180733&&_0x1ffdee;}),this['bind']('isRemovable')['to'](_0x5f01e4,'isRemovable',_0x2dd9a1,'_permissions',_0x4bc8c4=>{const _0x4010da=_0x2dd9a1['getPermissions'](_0x5f01e4['channelId'])['write'],_0x85a041=_0x2dd9a1['getPermissions'](_0x5f01e4['channelId'])['modifyAll'];return _0x180733&&_0x4010da||_0x4bc8c4&&_0x361337||!_0x180733&&_0x85a041&&!_0x361337;}),this['bind']('isReadOnly')['to'](_0x5f01e4,'isReadOnly'),this['_repository']=_0x2dd9a1;}get['weight'](){return Math['max'](function(_0x3a5b9c){const _0x3a6cfe=document['createElement']('div');return _0x3a6cfe['innerHTML']=_0x3a5b9c,_0x3a6cfe['textContent']['length'];}(this['content']),0xc8);}['update'](_0x116d49){const {threadId:_0x36a946,id:_0x42e273}=this;if(!this['_repository']['hasCommentThread'](_0x36a946))throw new _0x3bea1e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x27a828}=this['_repository']['getCommentThread'](_0x36a946);this['_repository']['fire'](ii('updateComment',_0x27a828,_0x36a946),{'channelId':_0x27a828,'threadId':_0x36a946,'commentId':_0x42e273,..._0x116d49});}['setAttribute'](_0x5f42d2,_0x15a60f){const _0x248951=_0x46f210(this['attributes']);_0x3442a5(_0x248951,_0x5f42d2,_0x15a60f),this['update']({'attributes':_0x248951});}['removeAttribute'](_0x5b3b4f){const _0x2b3874=_0x46f210(this['attributes']);_0x3867e8(_0x2b3874,_0x5b3b4f),this['update']({'attributes':_0x2b3874});}['remove'](_0x3bf692={}){if(!_0x3bf692['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x482845,id:_0x4c3990}=this;if(!this['_repository']['hasCommentThread'](_0x482845))throw new _0x3bea1e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1209db}=this['_repository']['getCommentThread'](_0x482845);this['_repository']['fire'](ii('removeComment',_0x1209db,_0x482845),{'channelId':_0x1209db,'threadId':_0x482845,'commentId':_0x4c3990,..._0x3bf692});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x287190,..._0x266115){for(const _0x5db8f3 of _0x266115)void 0x0!==_0x5db8f3&&(_0x287190+=':'+String(_0x5db8f3));return _0x287190;}class ei extends _0x5583eb{constructor(_0x14428b){super(_0x14428b),this['set']('hasContent',!0x1);}['refresh'](){const _0x58bdde=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4942da of _0x58bdde['getRanges']())if(this['_hasContent'](_0x4942da))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3b31ae=_0x31c322(),ranges:_0x9d32d0,comment:_0x48efba}={}){const _0x1cc81a=this['editor']['model'],_0x407ae5=_0x9d32d0??Array['from'](_0x1cc81a['document']['selection']['getRanges']()),_0x4f2ffd=[];for(const _0x12b48e of _0x407ae5)this['_hasContent'](_0x12b48e)&&_0x4f2ffd['push'](this['_trimToContent'](_0x12b48e));if(!_0x4f2ffd['length'])throw new _0x3bea1e('addcommentthreadcommand-incorrect-ranges',null);_0x48efba&&this['_createCommentThread'](_0x3b31ae,_0x48efba),this['_createMarkersFromRanges'](_0x3b31ae,_0x4f2ffd,!!_0x48efba);}['_createMarkersFromRanges'](_0x2095eb,_0x4c39ed,_0x4e22f3){this['editor']['model']['change'](_0x221b60=>{for(const _0x100a2d of _0x4c39ed){const _0x3790b2=_0x31c322()['substr'](0x1,0x5),_0x511a1c='comment:'+_0x2095eb+':'+_0x3790b2;_0x221b60['addMarker'](_0x511a1c,{'range':_0x100a2d,'usingOperation':_0x4e22f3,'affectsData':_0x4e22f3});}});}['_createCommentThread'](_0x3fdd87,_0x48cdaf){const _0x56d8ab=this['editor']['plugins']['get']('CommentsRepository'),_0x1e95bb=this['editor']['config']['get']('collaboration.channelId'),_0x5be347=this['editor']['plugins']['get']('Users')['me'];if(!_0x5be347)throw new _0x3bea1e('addcommentthreadcommand-user-not-found',null);_0x56d8ab['addCommentThread']({'threadId':_0x3fdd87,'channelId':_0x1e95bb,'comments':[{'authorId':_0x5be347['id'],'content':_0x48cdaf,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x1b4092){for(const _0x1a649b of _0x1b4092['getItems']())if(this['_itemIsContent'](_0x1a649b))return!0x0;return!0x1;}['_itemIsContent'](_0x5aeaaa){return _0x5aeaaa['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5aeaaa)&&!_0x5aeaaa['is']('element','tableCell');}['_trimToContent'](_0xecc969){const _0x3e520d=_0xe29973=>!this['_itemIsContent'](_0xe29973['item']),_0x37c9b5=_0xecc969['start']['getLastMatchingPosition'](_0x3e520d),_0x4eda8f=_0xecc969['end']['getLastMatchingPosition'](_0x3e520d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x37c9b5,_0x4eda8f);}}class si extends _0x801ec5{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x536fba){super(_0x536fba),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xda3ba6=this['editor'],_0x24ad50=_0xda3ba6['model']['document']['selection'],_0x345d66=_0x5c43ed(()=>this['refreshSelectedViews'](),0xa);_0x24ad50['on']('change:range',(_0x98c0b4,_0x4e77c8)=>{_0x4e77c8['directChange']&&(_0x345d66['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xda3ba6['editing']['view']['document'],'change:isFocused',(_0x5697df,_0x34d8df,_0x5efc90)=>{_0x5efc90&&_0x345d66();}),this['listenTo'](_0xda3ba6['ui']['focusTracker'],'change:isFocused',(_0x11785d,_0x521b92,_0x31a0ef)=>{_0x31a0ef||this['fire']('blur',{'isAnnotationTracked':_0x3f3575=>this['_editorAnnotationsData']['has'](_0x3f3575['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3fc00e){if(this['_editorAnnotations']['has'](_0x3fc00e['view']))return;this['_editorAnnotations']['add'](_0x3fc00e['view']),this['editor']['ui']['focusTracker']['add'](_0x3fc00e['view']['element']);const _0x46518c=this['editor']['plugins']['get']($t);this['listenTo'](_0x46518c['collection'],'remove',(_0x16dccd,_0x5ea685)=>{this['editor']['ui']['focusTracker']['remove'](_0x5ea685['view']['element']),this['_editorAnnotations']['delete'](_0x5ea685['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2d950e){if('function'!=typeof _0x2d950e)throw new _0x3bea1e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2d950e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x35f960,annotations:_0x1cac35}){const _0x402746=[],_0x2a8e3c=this['editor']['model']['document']['selection'],_0x17f16b=Array['from'](_0x2a8e3c['getRanges']());for(const [_0x2642f2,_0x4dda84]of this['_editorAnnotationsData']){const _0x59beee=_0x25d271(_0x4dda84),_0xa342c5=_0x1cac35['getByInnerView'](_0x2642f2);_0x59beee&&_0xa342c5&&_0x402746['push']({'annotation':_0xa342c5,'range':_0x59beee});}function _0x25d271(_0x2d2690){for(const _0x248ba6 of _0x2d2690)for(const _0x476323 of _0x17f16b)if(_0x248ba6['containsRange'](_0x476323,!_0x2a8e3c['isCollapsed']))return _0x248ba6;return null;}return _0x402746['sort']((_0x23f99d,_0x13f14c)=>{const _0x53796d=_0x23f99d['range'],_0x184214=_0x13f14c['range'];if(!_0x53796d['isEqual'](_0x184214)){if(_0x53796d['containsRange'](_0x184214,!0x0))return 0x1;if(_0x184214['containsRange'](_0x53796d,!0x0))return-0x1;}return _0x23f99d['annotation']==_0x35f960?-0x1:_0x13f14c['annotation']==_0x35f960?0x1:0x0;})['map'](_0x16ddf5=>_0x16ddf5['annotation']);}get['_editorAnnotationsData'](){const _0x3a884f=new Map();for(const _0x240484 of Array['from'](this['_dataCollectors']))for(const [_0xf63f46,_0x201707]of _0x240484())_0x3a884f['set'](_0xf63f46,_0x201707);return _0x3a884f;}}class ni extends _0x801ec5{['afterInit'](){const _0x2d5b9e=this['editor'];if(!_0x2d5b9e['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2d5b9e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x801ec5{constructor(_0xab0007){super(_0xab0007),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1d2ac7=this['editor'],_0x23ba36=_0x1d2ac7['commands']['get']('importWord'),_0x13b7cd=_0x1d2ac7['plugins']['get'](_0x2d9be6);_0x23ba36&&(_0x23ba36['on']('execute',(_0x4febb3,[,_0x2a2ea2])=>{_0x2a2ea2['collaboration_features']={'comments':!0x0,'user_id':_0x13b7cd['me']['id']};},{'priority':_0x22038f['high']+0xa}),this['listenTo'](_0x23ba36,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x572902,_0xe5c661){const {comment_threads:_0x465ccb}=_0xe5c661;_0x465ccb&&_0x465ccb['forEach'](({thread_id:_0x39f0e7,comments:_0x5ddefb,is_resolved:_0x13291f})=>{const _0x2b10a0=new Date(),_0x29c41a=_0x5ddefb['map'](({author:_0x69a7fa,content:_0x378c0b,created_at:_0x16bc99})=>({'content':_0x378c0b,'authorId':this['editor']['plugins']['get'](_0x2d9be6)['me']['id'],'createdAt':_0x2b10a0,'attributes':{'@external':{'authorName':_0x69a7fa,'createdAt':_0x16bc99?new Date(_0x16bc99):new Date(),'source':'importWord'}}})),_0x1163fd=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x1163fd,'threadId':_0x39f0e7,'comments':_0x29c41a,'resolvedAt':_0x13291f?_0x2b10a0:null});});}}class ri extends _0x801ec5{constructor(_0x2247db){super(_0x2247db),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x4ac799=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4ac799,'contentInsertion',(_0x117284,_0x10eef7)=>this['_removeMarkersWithoutThreads'](_0x10eef7['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x287045){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x287045;const _0x3da031=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1eb485 of _0x287045['keys']()){const [_0x711a0a,_0x1a4608]=_0x1eb485['split'](':');'comment'!=_0x711a0a||_0x3da031['hasCommentThread'](_0x1a4608)||_0x287045['delete'](_0x1eb485);}return _0x287045;}['_registerMarkerInClipboardPipeline'](){const _0xbf4257=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3d241e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3d241e&&_0xbf4257['_registerMarkerToCopy']('comment',_0x3d241e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1c7678){switch(_0x1c7678){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x750768){const _0x2723ae=_0x750768['split'](':');return{'group':_0x2723ae[0x0],'id':_0x2723ae[0x1],'part':_0x2723ae[0x2]};}class ai extends _0x801ec5{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3545c7,_0xfae368)=>{if(!_0xfae368['options']['showCommentHighlights'])return null;if(_0xfae368['options']['ignoreResolvedComments']){const {id:_0x25c9e2}=hi(_0x3545c7['markerName']),_0x320d02=this['editor']['plugins']['get'](Qt);if(_0x320d02['getCommentThread'](_0x25c9e2)?.['isResolved']&&_0x3545c7['item'])return _0xfae368['consumable']['consume'](_0x3545c7['item'],'addMarker:'+_0x3545c7['markerName']),_0xfae368['consumable']['consume'](_0x3545c7['item'],'removeMarker:'+_0x3545c7['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1a047a=>{_0x1a047a['on']('addMarker:comment',(_0x5116c0,_0x232a8d,_0xd152ea)=>{if(!_0xd152ea['options']['showCommentHighlights'])return;const _0x5c9e07=_0x232a8d['item'];if(!_0x5c9e07)return;const _0x33f6ed=_0xd152ea['mapper']['toViewElement'](_0x5c9e07);this['editor']['model']['schema']['isObject'](_0x5c9e07)&&_0x33f6ed&&!_0x33f6ed['getCustomProperty']('widget')&&_0x33f6ed['is']('containerElement')&&Ct(_0x33f6ed,_0xd152ea['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0xead3f1,{writer:_0x991617,options:_0x157bf7})=>{if(!_0x157bf7['showCommentHighlights'])return null;const _0x5a0ffa=_0x991617['createContainerElement']('div'),_0x185edb=_0x991617['createEmptyElement']('hr');return _0x991617['addClass']('ck-horizontal-line',_0x5a0ffa),_0x991617['insert'](_0x991617['createPositionAt'](_0x5a0ffa,0x0),_0x185edb),_0x5a0ffa;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x374a3d,{writer:_0x971903,options:_0x46033f})=>{if(!_0x46033f['showCommentHighlights'])return null;const _0x48d869=_0x971903['createContainerElement']('span'),_0x59d229=_0x971903['createEmptyElement']('img');return _0x971903['addClass']('image-inline',_0x48d869),_0x971903['insert'](_0x971903['createPositionAt'](_0x48d869,0x0),_0x59d229),_0x48d869;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1fa53b,{writer:_0xf51c46,options:_0x193f98})=>{if(_0x193f98['showCommentHighlights'])return _0xf51c46['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x40ebba,_0x2cfcba,_0x4eedd9)=>{_0x4eedd9['options']['showCommentHighlights']&&_0x40ebba['stop']();},{'priority':'high'});}}class ci extends _0x801ec5{static get['requires'](){return[Qt,si,_0x2d9be6,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3bc582){super(_0x3bc582),this['set']('isThreadsLoadingPaused',!0x0),_0x3bc582['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x33fb99,_0x4db036,_0xcfee4c,_0x30a28a)=>{const _0x1a0fcb=_0x3bc582['plugins']['get'](Qt),_0x5af156=_0xcfee4c?hi(_0xcfee4c)['id']:null;_0x3bc582['model']['change'](()=>{if(_0x5af156){const _0x3eaad0=this['getAllMarkersForId'](_0x5af156);for(const _0x1cae1d of _0x3eaad0)_0x3bc582['editing']['reconvertMarker'](_0x1cae1d);}if(_0x30a28a){const {id:_0x4340e8}=hi(_0x30a28a),_0x1819f=_0x1a0fcb['getCommentThread'](_0x4340e8);if(_0x1819f&&_0x1819f['unlinkedAt'])return;if(_0x1819f&&!_0x1819f['isAttached'])return;const _0xe52ce3=this['getAllMarkersForId'](_0x4340e8);for(const _0x5b8816 of _0xe52ce3)_0x3bc582['editing']['reconvertMarker'](_0x5b8816);}}),_0x5af156&&this['scrollToThreadMarker'](_0x5af156);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x50115c=this['editor'],_0x370a25=_0x50115c['plugins']['get'](Qt),_0x4c0418=_0x50115c['config']['get']('collaboration.channelId'),_0x38841=_0x370a25['getCommentThreads']()['filter'](_0x49307f=>_0x49307f['channelId']!==_0x4c0418);_0x50115c['commands']['add']('addCommentThread',new ei(_0x50115c)),this['listenTo'](_0x50115c,'change:isReadOnly',(_0x294c2a,_0x42cbeb,_0x4f2c6b)=>{_0x370a25['switchReadOnly'](_0x4f2c6b,_0x50115c['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x370a25,di('addCommentThread',_0x4c0418),(_0x3863e3,{threadId:_0x25cd0a})=>{const _0xae4084=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x25cd0a);_0xae4084?.['unlinkedAt']&&this['_attachArchivedThread'](_0x25cd0a);}),this['listenTo'](_0x370a25,di('removeCommentThread',_0x4c0418),(_0x362076,{threadId:_0x4d74cb})=>{_0x50115c['model']['enqueueChange']({'isUndoable':!0x1},_0xa67af8=>{const _0x32c7de=this['getAllMarkersForId'](_0x4d74cb);for(const _0x283426 of _0x32c7de)_0xa67af8['removeMarker'](_0x283426);});}),this['listenTo'](_0x370a25,di('resolveCommentThread',_0x4c0418),(_0x265d2b,{threadId:_0x1c5f1c})=>{(this['_reconvertMarkers'](_0x1c5f1c),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x1c5f1c)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x370a25,di('reopenCommentThread',_0x4c0418),(_0x424efa,{threadId:_0x394e9c})=>{this['_reconvertMarkers'](_0x394e9c);},{'priority':'low'}),this['listenTo'](_0x370a25,di('addComment',_0x4c0418),(_0x2cde0c,{threadId:_0x24790e,isFromAdapter:_0x453441})=>{const _0x2d0838=this['getAllMarkersForId'](_0x24790e);if(_0x453441||0x0==_0x2d0838['length']||!_0x370a25['hasCommentThread'](_0x24790e))return;0x1===_0x370a25['getCommentThread'](_0x24790e)['length']&&_0x50115c['model']['enqueueChange']({'isUndoable':!0x1},_0x229a1a=>{for(const _0x45e1ff of _0x2d0838)_0x229a1a['updateMarker'](_0x45e1ff,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x38841);}['afterInit'](){!async function(_0x8dee6c){const _0x5042ad=_0x9384f9([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x10213b=0x73460ab3,_0x43f19c=0x73418d4b^_0x10213b,_0x17af42=window[_0x9384f9([0x44,0x61,0x74,0x65])][_0x9384f9([0x6e,0x6f,0x77])](),_0x67541a=_0x8dee6c[_0x9384f9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4bd943=new window[(_0x9384f9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x430d79=>{_0x67541a[_0x9384f9([0x6f,0x6e,0x63,0x65])](_0x9384f9([0x72,0x65,0x61,0x64,0x79]),_0x430d79);}),_0x17a609={[_0x9384f9([0x6b,0x74,0x79])]:_0x9384f9([0x45,0x43]),[_0x9384f9([0x75,0x73,0x65])]:_0x9384f9([0x73,0x69,0x67]),[_0x9384f9([0x63,0x72,0x76])]:_0x9384f9([0x50,0x2d,0x32,0x35,0x36]),[_0x9384f9([0x78])]:_0x9384f9([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]),[_0x9384f9([0x79])]:_0x9384f9([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]),[_0x9384f9([0x61,0x6c,0x67])]:_0x9384f9([0x45,0x53,0x32,0x35,0x36])},_0x2e75c5=_0x67541a[_0x9384f9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x9384f9([0x67,0x65,0x74])](_0x9384f9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x534937(){let _0xb48542,_0x5b36e5=null,_0x458794=null;try{if(_0x2e75c5==_0x9384f9([0x47,0x50,0x4c]))return _0x9384f9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xb48542=_0x177870(),!_0xb48542)return _0x9384f9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xb48542[_0x9384f9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x458794=_0x1ef62e(_0xb48542[_0x9384f9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xb48542[_0x9384f9([0x6a,0x74,0x69])])),await _0x18aed5()?_0x53b769()?_0x2b4eec()?_0x9384f9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3bf022()?(_0xb48542[_0x9384f9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x9384f9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5b36e5=_0x28715c(_0x9384f9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x19a872()):_0x9384f9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x9384f9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x9384f9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x9384f9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2b4eec(){const _0x276b24=[_0x9384f9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x9384f9([0x74,0x72,0x69,0x61,0x6c])][_0x9384f9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb48542[_0x9384f9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x17af42/0x3e8:0xe10*_0x43f19c;return _0xb48542[_0x9384f9([0x65,0x78,0x70])]<_0x276b24;}function _0x53b769(){const _0x113f75=_0xb48542[_0x9384f9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x113f75)return!0x1;if(_0x113f75[_0x9384f9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9384f9([0x2a])))return!0x0;if(_0x113f75[_0x9384f9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9384f9([0x43,0x4d,0x54])))return!0x0;if(_0x113f75[_0x9384f9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9384f9([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0xe614aa())return!0x0;if(_0x113f75[_0x9384f9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9384f9([0x52,0x43,0x4d,0x54]))){if(_0x59bfa5())return!0x0;if(_0x49b0f9()||_0x37eb5e())return!0x0;}return!0x1;}function _0x3bf022(){const _0x2bb1cf=_0xb48542[_0x9384f9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2bb1cf||0x0==_0x2bb1cf[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x381b50}=new URL(window[_0x9384f9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2bb1cf[_0x9384f9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x381b50))return!0x0;const _0x5cbbf8=_0x381b50[_0x9384f9([0x73,0x70,0x6c,0x69,0x74])](_0x9384f9([0x2e]));return _0x2bb1cf[_0x9384f9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5bb9fb=>_0x5bb9fb[_0x9384f9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9384f9([0x2a])))[_0x9384f9([0x6d,0x61,0x70])](_0x398290=>_0x398290[_0x9384f9([0x73,0x70,0x6c,0x69,0x74])](_0x9384f9([0x2e])))[_0x9384f9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xc25bca=>_0xc25bca[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5cbbf8[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x9384f9([0x6d,0x61,0x70])](_0x3cd5bb=>Array(_0x5cbbf8[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3cd5bb[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x9384f9([0x66,0x69,0x6c,0x6c])](_0x3cd5bb[0x0]===_0x9384f9([0x2a])?_0x9384f9([0x2a]):'')[_0x9384f9([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3cd5bb))[_0x9384f9([0x73,0x6f,0x6d,0x65])](_0x3baf90=>_0x5cbbf8[_0x9384f9([0x65,0x76,0x65,0x72,0x79])]((_0x47ea95,_0x14b649)=>_0x3baf90[_0x14b649]===_0x47ea95||_0x3baf90[_0x14b649]===_0x9384f9([0x2a])));}function _0x19a872(){return _0x5b36e5&&_0x458794?new window[(_0x9384f9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1bf16b,_0x10ba1a)=>{_0x5b36e5[_0x9384f9([0x74,0x68,0x65,0x6e])](_0x1bf16b,_0x10ba1a),_0x458794[_0x9384f9([0x74,0x68,0x65,0x6e])](_0x2e4b91=>{_0x2e4b91!=_0x9384f9([0x56,0x61,0x6c,0x69,0x64])&&_0x1bf16b(_0x2e4b91);},_0x10ba1a);}):_0x5b36e5||_0x458794||_0x9384f9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1ef62e(_0x160920,_0x2b74a9){return new window[(_0x9384f9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ac61c=>{if(_0x38fba8())return _0x2ac61c(_0x9384f9([0x56,0x61,0x6c,0x69,0x64]));_0x842096(),_0x67541a[_0x9384f9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x9384f9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x92244a=!0x1;const _0x203c11=_0x31c322();function _0x51f447(_0x480d2f){return!!_0x480d2f&&(typeof _0x480d2f===_0x9384f9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x480d2f===_0x9384f9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x480d2f[_0x9384f9([0x74,0x68,0x65,0x6e])]===_0x9384f9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x480d2f[_0x9384f9([0x63,0x61,0x74,0x63,0x68])]===_0x9384f9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1fc8b6(_0x12c10d){_0x18d535(_0x12c10d)[_0x9384f9([0x74,0x68,0x65,0x6e])](_0x15264b=>{if(!_0x15264b||_0x15264b[_0x9384f9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x9384f9([0x6f,0x6b]))return _0x9384f9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x40570a(_0xf0fb49(_0x203c11+_0x2b74a9))!=_0x15264b[_0x9384f9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x9384f9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x9384f9([0x56,0x61,0x6c,0x69,0x64]);})[_0x9384f9([0x74,0x68,0x65,0x6e])](_0x249add=>(_0x5fe9a7(),_0x249add),()=>{const _0x4be669=_0x4142a8();return null==_0x4be669?(_0x5fe9a7(),_0x9384f9([0x56,0x61,0x6c,0x69,0x64])):_0x9384f9(_0x17af42-_0x4be669>(0x574a8eb3^_0x10213b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x9384f9([0x74,0x68,0x65,0x6e])](_0x2ac61c)[_0x9384f9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2ac61c(_0x9384f9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4ba99e=0x7370e433^_0x10213b;function _0x5fe9a7(){const _0x111bba=_0x9384f9([0x6c,0x6c,0x63,0x74,0x2d])+_0x40570a(_0xf0fb49(_0x160920)),_0x1d9e6f=_0x3f984f(_0x40570a(window[_0x9384f9([0x4d,0x61,0x74,0x68])][_0x9384f9([0x63,0x65,0x69,0x6c])](_0x17af42/_0x4ba99e)));window[_0x9384f9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x9384f9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x111bba,_0x1d9e6f);}function _0x4142a8(){const _0xe2b5eb=_0x9384f9([0x6c,0x6c,0x63,0x74,0x2d])+_0x40570a(_0xf0fb49(_0x160920)),_0x24a468=window[_0x9384f9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x9384f9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xe2b5eb);return _0x24a468?window[_0x9384f9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f984f(_0x24a468),0x10)*_0x4ba99e:null;}function _0x18d535(_0x3c04cb){return new window[(_0x9384f9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x418b97,_0x55b5bb)=>{_0x3c04cb[_0x9384f9([0x74,0x68,0x65,0x6e])](_0x418b97,_0x55b5bb),window[_0x9384f9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x55b5bb,0x7347de73^_0x10213b);});}}_0x67541a[_0x9384f9([0x6f,0x6e])](_0x9384f9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x79b321,_0xb9933a)=>{if(_0xb9933a[0x0]!=_0x160920)return _0x2ac61c(_0x9384f9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xb9933a[0x1]={..._0xb9933a[0x1],[_0x9384f9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x203c11};},{[_0x9384f9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x9384f9([0x68,0x69,0x67,0x68])}),_0x67541a[_0x9384f9([0x6f,0x6e])](_0x9384f9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x49fc82=>{_0x51f447(_0x49fc82[_0x9384f9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x92244a=!0x0,_0x1fc8b6(_0x49fc82[_0x9384f9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x9384f9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x9384f9([0x6c,0x6f,0x77])}),_0x4bd943[_0x9384f9([0x74,0x68,0x65,0x6e])](()=>{_0x92244a||_0x2ac61c(_0x9384f9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x38fba8(){return _0x67541a[_0x9384f9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x9384f9([0x76,0x69,0x65,0x77])][_0x9384f9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x9384f9([0x61,0x75,0x74,0x6f]);}function _0x842096(){_0x67541a[_0x9384f9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x9384f9([0x76,0x69,0x65,0x77])][_0x9384f9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x9384f9([0x61,0x75,0x74,0x6f]);}}function _0x28715c(_0x5c2a55){const _0x2ee61a=[new window[(_0x9384f9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24bd5d=>setTimeout(_0x24bd5d,0x734f347f^_0x10213b)),_0x4bd943[_0x9384f9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x9384f9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47c9c1=>{let _0x2121d3=0x0;_0x67541a[_0x9384f9([0x6d,0x6f,0x64,0x65,0x6c])][_0x9384f9([0x6f,0x6e])](_0x9384f9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2c98dc,_0x1fda56)=>{_0x1fda56[0x0][_0x9384f9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2121d3++,_0x2121d3==(0x73460f5b^_0x10213b)&&(_0x47c9c1(),_0x2c98dc[_0x9384f9([0x6f,0x66,0x66])]());});}))];return window[_0x9384f9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x9384f9([0x72,0x61,0x63,0x65])](_0x2ee61a)[_0x9384f9([0x74,0x68,0x65,0x6e])](()=>_0x5c2a55);}async function _0x441f5c(){await _0x4bd943,_0x67541a[_0x9384f9([0x6d,0x6f,0x64,0x65,0x6c])][_0x9384f9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x33dbf1,_0x67541a[_0x9384f9([0x6d,0x6f,0x64,0x65,0x6c])][_0x9384f9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x33dbf1,_0x67541a[_0x9384f9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x9384f9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xe614aa(){return window[_0x9384f9([0x67,0x6c,0x6f,0x62])]&&window[_0x9384f9([0x67,0x6c,0x6f,0x62])][_0x9384f9([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x59bfa5(){return _0x1d9a6b(_0x9384f9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4e7ae7(_0x9384f9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x9384f9([0x73,0x74,0x61,0x74,0x65])]==_0x9384f9([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x49b0f9(){return _0x1d9a6b(_0x9384f9([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 _0x37eb5e(){return _0x1d9a6b(_0x9384f9([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2153fc(_0x504271){const _0x5756d7=_0x49351a();_0x67541a[_0x5756d7]=_0x9384f9([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x504271,_0x504271!=_0x9384f9([0x56,0x61,0x6c,0x69,0x64])&&_0x441f5c();}function _0x49351a(){const _0x507d32=window[_0x9384f9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x9384f9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x9384f9([0x6e,0x6f,0x77])]())[_0x9384f9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x9384f9([0x2e]),'');let _0x1cc2a7=_0x9384f9([0x4b]);for(let _0x4de175=0x0;_0x4de175<_0x507d32[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4de175+=0x2){let _0x4db475=window[_0x9384f9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x507d32[_0x9384f9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4de175,_0x4de175+0x2));_0x4db475>=_0x5042ad[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4db475-=_0x5042ad[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1cc2a7+=_0x5042ad[_0x4db475];}return _0x1cc2a7;}function _0x177870(){const _0x64b870=_0x2e75c5[_0x9384f9([0x73,0x70,0x6c,0x69,0x74])](_0x9384f9([0x2e]));if(0x3!=_0x64b870[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x59c36e(_0x64b870[0x1]);function _0x59c36e(_0x43e038){const _0x38742a=_0x31ce25(_0x43e038);return _0x38742a&&_0x65ccbf()?_0x38742a:null;function _0x65ccbf(){const _0x44a508=_0x38742a[_0x9384f9([0x6a,0x74,0x69])],_0xa77e4d=window[_0x9384f9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x44a508[_0x9384f9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x44a508[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1c0c5d={..._0x38742a,[_0x9384f9([0x6a,0x74,0x69])]:_0x44a508[_0x9384f9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x44a508[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1c0c5d[_0x9384f9([0x76,0x63])],_0xf0fb49(_0x1c0c5d)==_0xa77e4d;}}}async function _0x18aed5(){let _0x26d4b6=!0x0;try{const _0x4a85e9=_0x2e75c5[_0x9384f9([0x73,0x70,0x6c,0x69,0x74])](_0x9384f9([0x2e])),[_0x227ca1,_0x5a76a3,_0x156a4e]=_0x4a85e9;return _0x946873(_0x227ca1),await _0x1eeb20(_0x227ca1,_0x5a76a3,_0x156a4e),_0x26d4b6;}catch{return!0x1;}function _0x946873(_0x11d45f){const _0x5bd28b=_0x31ce25(_0x11d45f);_0x5bd28b&&_0x5bd28b[_0x9384f9([0x61,0x6c,0x67])]==_0x9384f9([0x45,0x53,0x32,0x35,0x36])||(_0x26d4b6=!0x1);}async function _0x1eeb20(_0x212d54,_0x50ba1c,_0x43b21c){const _0x3d7b83=window[_0x9384f9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x9384f9([0x66,0x72,0x6f,0x6d])](_0x5f1790(_0x43b21c),_0x409075=>_0x409075[_0x9384f9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1f7b5e=new window[(_0x9384f9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x9384f9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x212d54+_0x9384f9([0x2e])+_0x50ba1c),_0x4ffa22=window[_0x9384f9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x9384f9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4ffa22)return;const _0x4ca7c5=await _0x4ffa22[_0x9384f9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x9384f9([0x6a,0x77,0x6b]),_0x17a609,{[_0x9384f9([0x6e,0x61,0x6d,0x65])]:_0x9384f9([0x45,0x43,0x44,0x53,0x41]),[_0x9384f9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x9384f9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x9384f9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4ffa22[_0x9384f9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x9384f9([0x6e,0x61,0x6d,0x65])]:_0x9384f9([0x45,0x43,0x44,0x53,0x41]),[_0x9384f9([0x68,0x61,0x73,0x68])]:{[_0x9384f9([0x6e,0x61,0x6d,0x65])]:_0x9384f9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4ca7c5,_0x3d7b83,_0x1f7b5e)||(_0x26d4b6=!0x1);}}function _0x31ce25(_0x5b55ce){return _0x5b55ce[_0x9384f9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x9384f9([0x65,0x79]))?JSON[_0x9384f9([0x70,0x61,0x72,0x73,0x65])](_0x5f1790(_0x5b55ce)):null;}function _0x5f1790(_0x43d849){return window[_0x9384f9([0x61,0x74,0x6f,0x62])](_0x43d849[_0x9384f9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x9384f9([0x2b]))[_0x9384f9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x9384f9([0x2f])));}function _0xf0fb49(_0x287706){let _0x167b1e=0x1505;function _0x1a3b17(_0xc95d43){for(let _0x10c322=0x0;_0x10c322<_0xc95d43[_0x9384f9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x10c322++){const _0x4dc2e3=_0xc95d43[_0x9384f9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x10c322);_0x167b1e=(_0x167b1e<<0x5)+_0x167b1e+_0x4dc2e3,_0x167b1e&=_0x167b1e;}}function _0x3389eb(_0x22ed5a){Array[_0x9384f9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x22ed5a)?_0x22ed5a[_0x9384f9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3389eb):_0x22ed5a&&typeof _0x22ed5a==_0x9384f9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x9384f9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x22ed5a)[_0x9384f9([0x73,0x6f,0x72,0x74])]()[_0x9384f9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5de3ca,_0x5539bb])=>{_0x1a3b17(_0x5de3ca),_0x3389eb(_0x5539bb);}):_0x1a3b17(window[_0x9384f9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x22ed5a));}return _0x3389eb(_0x287706),_0x167b1e>>>0x0;}function _0x40570a(_0x13ca59){return _0x13ca59[_0x9384f9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x9384f9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x9384f9([0x30]));}function _0x3f984f(_0x569db1){return _0x569db1[_0x9384f9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x9384f9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x9384f9([0x6a,0x6f,0x69,0x6e])]('');}function _0x1d9a6b(_0x107f49){return _0x67541a[_0x9384f9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x9384f9([0x68,0x61,0x73])](_0x107f49);}function _0x4e7ae7(_0x2c1d00){return _0x67541a[_0x9384f9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x9384f9([0x67,0x65,0x74])](_0x2c1d00);}function _0x33dbf1(){}function _0x9384f9(_0xd9a9e2){return _0xd9a9e2['map'](_0x18a26e=>String['fromCharCode'](_0x18a26e))['join']('');}_0x2153fc(await _0x534937());}(this);}['destroy'](){const _0x10a84b=this['editor']['plugins']['get'](Qt),_0x1df3ee=this['editor']['config']['get']('collaboration.channelId');for(const _0x4ac30a of _0x10a84b['getCommentThreads']({'channelId':_0x1df3ee}))_0x10a84b['_detachCommentThread'](_0x4ac30a['id']),_0x10a84b['_threads']['delete'](_0x4ac30a['id']);super['destroy']();}['hasMarkerForId'](_0x276476){return this['getAllMarkersForId'](_0x276476)['length']>0x0;}['getAllMarkersForId'](_0x2b9915){const _0x263a56=[];for(const _0x9b146f of this['editor']['model']['markers'])_0x9b146f['name']['startsWith']('comment:'+_0x2b9915)&&_0x263a56['push'](_0x9b146f);return _0x263a56;}['scrollToThreadMarker'](_0x85ef3b){setTimeout(()=>{const _0x417d87=this['_getTargetForId'](_0x85ef3b);if(!_0x417d87)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x85ef3b&&_0x27ab9e({'target':_0x417d87[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x58fcd3){this['editor']['model']['change'](()=>{for(const _0x47667e of this['getAllMarkersForId'](_0x58fcd3))this['editor']['editing']['reconvertMarker'](_0x47667e);});}['_attachArchivedThread'](_0x4c14f4){const _0x29b5d2=this['editor']['plugins']['get'](Qt),_0x2e7669=this['editor']['plugins']['get'](si),_0x1d3851=_0x29b5d2['getCommentThread'](_0x4c14f4);if(!_0x1d3851['isAttached']){const _0x78e9a1=_0x1d3851['attachTo'](()=>this['_getTargetForId'](_0x1d3851['id']));_0x2e7669['registerAnnotation'](_0x78e9a1),_0x1d3851['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x29344c=this['editor'],_0x99dbfe=_0x29344c['plugins']['get'](_0x2d9be6);_0x29344c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x50c2c1,_0x1171a8)=>{const {id:_0x182754}=hi(_0x50c2c1['markerName']),_0x24a8a2=_0x29344c['plugins']['get'](Qt)['getCommentThread'](_0x182754),_0x349f97=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x182754;let _0x3ae1dc;if(_0x24a8a2&&_0x24a8a2['isResolved']&&!_0x349f97&&_0x50c2c1['item'])return _0x1171a8['consumable']['consume'](_0x50c2c1['item'],'addMarker:'+_0x50c2c1['markerName']),_0x1171a8['consumable']['consume'](_0x50c2c1['item'],'removeMarker:'+_0x50c2c1['markerName']),null;const _0x4a16e4=['ck-comment-marker'];return _0x349f97&&_0x4a16e4['push']('ck-comment-marker--active'),_0x3ae1dc=_0x24a8a2?.['length']?_0x24a8a2['comments']['first']['author']['id']:_0x99dbfe['me']['id'],{'classes':_0x4a16e4,'attributes':{'data-comment':_0x182754,'data-author-id':_0x3ae1dc}};}}),_0x29344c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x12e4cf,{options:_0x4ef3b6})=>{if(_0x4ef3b6['showCommentHighlights'])return null;const _0x3e5f1e=_0x29344c['plugins']['get'](Qt),_0x3d0004=_0x29344c['model']['markers']['get'](_0x12e4cf),{id:_0x2fde8d,part:_0xb93449}=hi(_0x12e4cf);return _0x3d0004&&!_0x3d0004['affectsData']||_0x4ef3b6['ignoreResolvedComments']&&_0x3e5f1e['getCommentThread'](_0x2fde8d)?.['isResolved']?null:{'group':'comment','name':_0xb93449?_0x2fde8d+':'+_0xb93449:_0x2fde8d};}}),_0x29344c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x58160e,{writer:_0x51e8a4})=>_0x51e8a4['createElement']('$marker',{'data-name':'comment:'+_0x58160e['getAttribute']('id')})}),_0x29344c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3174d3=this['editor'],_0x2242b9=_0x3174d3['plugins']['get'](Qt),_0x40566d=new Set(),_0x58f26a=new Set();_0x3174d3['model']['document']['registerPostFixer'](_0x9c1be7=>{let _0x15e969=!0x1;for(const {name:_0x444e09,data:_0x1b4f67}of _0x3174d3['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4d9c5a,id:_0x5d59d6}=hi(_0x444e09);let _0x4280b1=_0x1b4f67['newRange'];if('comment'!==_0x4d9c5a||!_0x4280b1)continue;const _0x1018c5='$graveyard'===_0x4280b1['root']['rootName'];_0x1018c5||(_0x4280b1=li(_0x4280b1,_0x3174d3['model']),!_0x4280b1||_0x4280b1['isCollapsed']||!_0x1b4f67['newRange']||_0x4280b1['isEqual'](_0x1b4f67['newRange']))?_0x3174d3['model']['hasContent'](_0x4280b1)&&!_0x1018c5?this['isThreadsLoadingPaused']?_0x40566d['add'](_0x444e09):this['_handleThreadMarker'](_0x444e09,_0x5d59d6):(_0x58f26a['add'](_0x444e09),_0x40566d['delete'](_0x444e09),_0x9c1be7['removeMarker'](_0x444e09),_0x15e969=!0x0):(_0x9c1be7['updateMarker'](_0x444e09,{'range':_0x4280b1}),_0x15e969=!0x0);}return _0x15e969;}),this['on']('change:isThreadsLoadingPaused',(_0x28091e,_0x347d49,_0x12ed05)=>{if(!_0x12ed05&&_0x40566d['size'])for(const _0x36b802 of _0x40566d){const {id:_0x137533}=hi(_0x36b802);_0x40566d['delete'](_0x36b802),_0x3174d3['model']['markers']['get'](_0x36b802)&&this['_handleThreadMarker'](_0x36b802,_0x137533);}}),this['listenTo'](_0x3174d3['model']['document'],'change',()=>{for(const {name:_0x415a8b,data:{newRange:_0x4ef144}}of _0x3174d3['model']['document']['differ']['getChangedMarkers']()){const {group:_0xe2a115,id:_0x618097}=hi(_0x415a8b);if('comment'!==_0xe2a115)continue;const _0x9a9877=_0x2242b9['getCommentThread'](_0x618097),_0x504513=this['hasMarkerForId'](_0x618097);_0x9a9877&&(!_0x9a9877['_hasTargetInContent']&&_0x4ef144&&_0x3174d3['editing']['view']['once']('render',()=>{const _0x5ae980=_0x3174d3['plugins']['get']($t),_0x5ce150=_0x2242b9['_threadToController']['get'](_0x9a9877)['view'];_0x5ae980['getByInnerView'](_0x5ce150)['refreshVisibility']();},{'priority':'low'}),_0x9a9877['_hasTargetInContent']=_0x504513||!!_0x4ef144),_0x4ef144||(_0x58f26a['add'](_0x415a8b),_0x40566d['delete'](_0x415a8b));}for(const _0x513efd of _0x58f26a){const {id:_0x5ccb92}=hi(_0x513efd),_0x32e88b=_0x2242b9['getCommentThread'](_0x5ccb92);if(_0x40566d['delete'](_0x513efd),!_0x32e88b)continue;const _0x281dc6=this['hasMarkerForId'](_0x5ccb92);_0x281dc6||_0x32e88b['isSubmitted']?_0x281dc6||_0x32e88b['unlinkedAt']||_0x32e88b['setUnlinkedAt'](new Date()):_0x32e88b['remove']();}_0x58f26a['clear']();});}['_handleInitialThreads'](_0x277adc){_0x277adc['forEach'](_0x12b368=>{_0x12b368['unlinkedAt']&&this['_attachArchivedThread'](_0x12b368['id']);});}['_getTargetForId'](_0x1c09d0){const _0x17c2a0=this['editor'],_0x11dc69=this['getAllMarkersForId'](_0x1c09d0);return _0xc01965(_0x17c2a0['editing'],_0x11dc69);}['_getTextContext'](_0xa7154c){const _0x329484=this['getAllMarkersForId'](_0xa7154c);let _0x45ad4e='',_0x21e93c=!0x1;for(const _0x5a1fbb of _0x329484){const _0x5ee7d0=_0x5a1fbb['getRange']();for(const _0x507c00 of Array['from'](_0x5ee7d0['getItems']()))_0x507c00['is']('$textProxy')?(_0x45ad4e&&_0x21e93c&&(_0x45ad4e+='\x20',_0x21e93c=!0x1),_0x45ad4e+=_0x507c00['data']):_0x21e93c=!0x0;_0x21e93c=!0x0;}return _0x45ad4e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x57d614,_0x272d27){const _0x4ae38f=this['editor'],_0x2c6921=_0x4ae38f['plugins']['get'](Qt);let _0x13c2fd=_0x2c6921['getCommentThread'](_0x272d27);const _0x1932e3=_0x4ae38f['config']['get']('collaboration.channelId'),_0x56dd0c=_0x4ae38f['plugins']['get'](si);if(_0x13c2fd&&(_0x13c2fd['unlinkedAt']&&_0x13c2fd['setUnlinkedAt'](null),_0x13c2fd['isAttached']))return _0x13c2fd;return!this['getAllMarkersForId'](_0x272d27)[0x0]['managedUsingOperations']?_0x4ae38f['editing']['view']['once']('render',()=>{if(_0x2c6921['getCommentThread'](_0x272d27))return;const _0x549da3=_0x4ae38f['plugins']['get']($t);_0x13c2fd=_0x2c6921['openNewCommentThread']({'channelId':_0x1932e3,'threadId':_0x272d27,'target':()=>this['_getTargetForId'](_0x272d27),'context':{'type':'text','value':this['_getTextContext'](_0x272d27)}});const _0x40d9a6=_0x2c6921['_threadToController']['get'](_0x13c2fd)['view'],_0x3b8bbd=_0x549da3['getByInnerView'](_0x40d9a6);_0x3b8bbd&&_0x56dd0c['registerAnnotation'](_0x3b8bbd);},{'priority':'low'}):_0x2c6921['fetchCommentThread']({'channelId':_0x1932e3,'threadId':_0x272d27})['then'](_0x56d994=>{if('destroyed'!==_0x4ae38f['state']){if(_0x13c2fd=_0x56d994,_0x13c2fd&&!_0x13c2fd['isAttached']){const _0x1e472b=_0x13c2fd['attachTo'](()=>this['_getTargetForId'](_0x272d27));_0x56dd0c['registerAnnotation'](_0x1e472b),_0x13c2fd['isResolved']&&this['_reconvertMarkers'](_0x272d27);}else{if(!_0x13c2fd){const _0x1c743a=this['getAllMarkersForId'](_0x272d27);_0x4ae38f['model']['change'](_0x163505=>{for(const _0x412ef0 of _0x1c743a)_0x163505['removeMarker'](_0x412ef0);});}}}}),_0x13c2fd;}['_handleThreadMarker'](_0x26be58,_0x154006){const _0x5555a3=this['_attachMarkerToThread'](_0x26be58,_0x154006);_0x5555a3&&!_0x5555a3['context']&&_0x5555a3['setContext']({'type':'text','value':this['_getTextContext'](_0x154006)});}['_initAriaMarkerChangeAnnouncements'](){const _0x449b46=this['editor'];_0x593340(_0x449b46['model'],({left:_0x825715,entered:_0x4301c2})=>{for(const _0x15a3b2 of _0x825715)if(ui(_0x15a3b2)){_0x449b46['ui']['ariaLiveAnnouncer']['announce'](bt(_0x449b46['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x324abf of _0x4301c2)if(ui(_0x324abf)){_0x449b46['ui']['ariaLiveAnnouncer']['announce'](bt(_0x449b46['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x222009(_0x27a185)));break;}});}}function di(_0x1338f9,_0x447385){return _0x447385?_0x1338f9+':'+_0x447385:_0x1338f9;}function li(_0x458d29,_0x21cb94){const _0xd9da39=_0x21cb94['schema'],_0x4e40cc=_0x21cb94['createRange'](_0x458d29['start']);for(const _0x27db1e of _0x458d29['getWalker']()){const {type:_0x4edb47,item:_0x3ccb44,nextPosition:_0x27894b}=_0x27db1e;if('text'===_0x4edb47||_0xd9da39['isObject'](_0x3ccb44)){const _0x26b9be=_0x21cb94['createPositionBefore'](_0x3ccb44);_0x4e40cc['isCollapsed']&&(_0x4e40cc['start']=_0x26b9be),_0x4e40cc['end']=_0x27894b;}}return _0x4e40cc;}function ui(_0x271b91){return'comment'===hi(_0x271b91['name'])['group'];}class mi extends _0x801ec5{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x1e471e=this['editor'],_0x5a5784=_0x1e471e['plugins']['get'](Qt),_0x389c09=_0x1e471e['plugins']['get'](ci),_0x2a9c1f=_0x1e471e['plugins']['get']($t),_0x1d7dd8=_0x1e471e['plugins']['get'](si);_0x1e471e['ui']['componentFactory']['add']('comment',()=>{const _0x4706cb=this['_createUIButton'](_0x407247);return _0x4706cb['tooltip']=!0x0,_0x4706cb;}),_0x1e471e['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x1d7dd8['addSourceCollector'](()=>{const _0x23067f=[];for(const [_0x3cd23d,_0x2929fe]of _0x5a5784['_threadToController']){const _0x3e1add=_0x389c09['getAllMarkersForId'](_0x3cd23d['id']),_0x43b4b6=_0x3e1add['map'](_0x4e7c0e=>_0x4e7c0e['getRange']());_0x3e1add['length']>0x0&&_0x23067f['push']([_0x2929fe['view'],_0x43b4b6]);}return _0x23067f;}),this['listenTo'](_0x2a9c1f,'change:activeAnnotations',(_0x4bea2a,_0x173fa5,_0xa4b714)=>{const _0x24b5c3=Array['from'](_0xa4b714)['map'](_0x4897ef=>_0x4897ef['innerView'])['find'](_0x5cc91=>_0x5a5784['_viewToController']['has'](_0x5cc91));if(!_0x24b5c3)return void(_0x389c09['activeMarker']=null);const _0x1bf036=_0x5a5784['_viewToController']['get'](_0x24b5c3)['model']['id'],_0x1cb8cc='comment:'+_0x1bf036;_0x1bf036&&_0x389c09['hasMarkerForId'](_0x1bf036)?_0x389c09['activeMarker']=_0x1cb8cc:_0x389c09['activeMarker']&&(_0x389c09['activeMarker']=null);}),this['listenTo'](_0x5a5784,'removeCommentThread',(_0x23b8ba,{threadId:_0x460a4c,isFromAdapter:_0x6841e0})=>{!_0x6841e0&&_0x1e471e['ui']['focusTracker']['isFocused']&&_0x389c09['hasMarkerForId'](_0x460a4c)&&_0x1e471e['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x5a5784,'addComment',(_0x12ede7,{threadId:_0x5d0312,isFromAdapter:_0x13501c})=>{if(_0x13501c||!_0x389c09['hasMarkerForId'](_0x5d0312)||!_0x5a5784['hasCommentThread'](_0x5d0312))return;0x1===_0x5a5784['getCommentThread'](_0x5d0312)['length']&&(_0x1e471e['editing']['view']['focus'](),_0x12ede7['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x58a77a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x492b7e;for(const _0x454eae in _0x58a77a){const _0x3b9749=_0x454eae,_0x235f5c=_0x58a77a[_0x3b9749];if('commentsLicenseKeyValid'==_0x235f5c||'commentsLicenseKeyInvalid'==_0x235f5c||'commentsLicenseKeyExpired'==_0x235f5c||'commentsLicenseKeyDomainLimit'==_0x235f5c||'commentsLicenseKeyNotAllowed'==_0x235f5c||'commentsLicenseKeyEvaluationLimit'==_0x235f5c||'commentsLicenseKeyUsageLimit'==_0x235f5c){delete _0x58a77a[_0x3b9749],_0x492b7e=_0x235f5c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x492b7e&&_0x58a77a['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x492b7e&&_0x58a77a['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x492b7e&&_0x58a77a['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x492b7e&&_0x58a77a['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x492b7e&&_0x58a77a['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x492b7e&&_0x58a77a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3a5285){const _0x43686a=this['editor'],_0x2f9342=new _0x3a5285(_0x43686a['locale']),_0x481ebc=_0x43686a['commands']['get']('addCommentThread');return _0x2f9342['set']({'label':bt(_0x43686a['locale'],'Comment'),'icon':_0x2a3eab}),_0x2f9342['bind']('isEnabled')['to'](_0x481ebc,'isEnabled',_0x481ebc,'hasContent',(_0x3fc6d3,_0x5f360c)=>_0x3fc6d3&&_0x5f360c),this['listenTo'](_0x2f9342,'execute',()=>{_0x481ebc['execute']();}),_0x2f9342;}}class fi extends _0x801ec5{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x435851){super(_0x435851),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x41f387,_0x367401,_0x1c7799)=>{_0x1c7799?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x3d65de,_0x2e84e2]of this['editor']['commands'])_0x2e84e2['affectsData']&&'addCommentThread'!==_0x3d65de&&_0x2e84e2['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x33e3bf=this['editor']['editing']['view']['document'];this['listenTo'](_0x33e3bf,'cut',_0x552d68=>_0x552d68['stop'](),{'priority':'highest'}),this['listenTo'](_0x33e3bf,'clipboardInput',_0x3b1847=>_0x3b1847['stop'](),{'priority':'highest'}),this['listenTo'](_0x33e3bf,'delete',_0x2cc393=>_0x2cc393['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x42e3f4,_0x4e0d1d]of this['editor']['commands'])_0x4e0d1d['affectsData']&&'addCommentThread'!==_0x42e3f4&&_0x4e0d1d['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x4d5b57{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x13f551){super(_0x13f551),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0xee3127=this['context']['plugins']['get']($t);this['listenTo'](_0xee3127,'_activateAnnotation',(_0x1f7293,_0x1f046e)=>{for(const _0x3e4f78 of this['activeUIs']){const _0x171b60=this['_uis']['get'](_0x3e4f78);(0x0,this['uisData']['get'](_0x3e4f78)['filter'])(_0x1f046e)&&_0x171b60['setActiveAnnotation'](_0x1f046e);}}),this['listenTo'](_0xee3127,'_deactivateAllAnnotations',()=>{for(const _0x39b478 of this['activeUIs']){this['_uis']['get'](_0x39b478)['setActiveAnnotation'](null);}}),this['listenTo'](_0xee3127['_visibleAnnotations'],'add',(_0x4c4ab2,_0x51e2ba)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x51e2ba);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4a06e1){return this['activeUIs']['has'](_0x4a06e1);}['activate'](_0x23bbfb,_0x5bbe55=this['defaultFilter']){const _0x3eb440=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x23bbfb))throw new _0x3bea1e('annotationsuis-missing-ui',this,{'uiName':_0x23bbfb});this['isActive'](_0x23bbfb)&&this['deactivate'](_0x23bbfb),this['activeUIs']['add'](_0x23bbfb);const _0x2e5621=new jt();Xt({'source':_0x3eb440['_visibleAnnotations'],'target':_0x2e5621,'filter':_0x5bbe55}),this['uisData']['set'](_0x23bbfb,{'collection':_0x2e5621,'filter':_0x5bbe55});const _0x55a1f3=this['_uis']['get'](_0x23bbfb);_0x55a1f3['attach'](_0x2e5621),this['listenTo'](_0x55a1f3,'change:activeAnnotation',(_0x3b6497,_0x32adca,_0xaa7af0,_0x3c394b)=>{_0x3c394b&&_0x3eb440['_removeActiveAnnotation'](_0x3c394b),_0xaa7af0&&_0x3eb440['_addActiveAnnotation'](_0xaa7af0);});}['deactivate'](_0x2240b4){if(this['activeUIs']['delete'](_0x2240b4),!this['_uis']['has'](_0x2240b4))throw new _0x3bea1e('annotationsuis-missing-ui',this,{'uiName':_0x2240b4});const _0x130040=this['_uis']['get'](_0x2240b4);_0x130040['detach'](),this['stopListening'](_0x130040),this['uisData']['get'](_0x2240b4)['collection']['destroy'](),this['uisData']['delete'](_0x2240b4);}['switchTo'](_0x31d1e6){if(!this['_uis']['has'](_0x31d1e6))throw new _0x3bea1e('annotationsuis-missing-ui',this,{'uiName':_0x31d1e6});const _0x236371=this['context']['plugins']['get']($t),_0x12dd51=Array['from'](_0x236371['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x31d1e6);const _0x2cd0f5=this['_uis']['get'](_0x31d1e6);_0x2cd0f5['setActiveAnnotation'](_0x12dd51),_0x2cd0f5['_setSelectedAnnotations']&&_0x12dd51&&_0x2cd0f5['_setSelectedAnnotations']([_0x12dd51]);}['deactivateAll'](){for(const _0x5909b8 of this['activeUIs'])this['deactivate'](_0x5909b8);}['register'](_0xa16941,_0x3b8015){if(this['_uis']['has'](_0xa16941))throw new _0x3bea1e('annotationsuis-register-already-registered');if('function'!=typeof _0x3b8015['attach']||'function'!=typeof _0x3b8015['detach']||'function'!=typeof _0x3b8015['setActiveAnnotation'])throw new _0x3bea1e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0xa16941,_0x3b8015);}['refilterAnnotations'](){const _0x106d54=this['context']['plugins']['get']($t)['collection'],_0x4f5849=new Map(),_0x2e9b83=Array['from'](this['activeUIs']);for(const _0x46994b of this['activeUIs']){const _0x3d5d43=this['uisData']['get'](_0x46994b)['collection'];for(const _0x4d9aba of _0x3d5d43)_0x4f5849['set'](_0x4d9aba,_0x46994b);}for(const _0x43ebd8 of _0x106d54){const _0x4775d0=_0x4f5849['get'](_0x43ebd8);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x43ebd8);const _0x30a917=_0x2e9b83['find'](_0x3d3aa0=>this['uisData']['get'](_0x3d3aa0)['filter'](_0x43ebd8));_0x4775d0!==_0x30a917&&(_0x4775d0&&this['uisData']['get'](_0x4775d0)['collection']['remove'](_0x43ebd8),_0x30a917&&this['uisData']['get'](_0x30a917)['collection']['add'](_0x43ebd8));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x562e03){const _0x2541ec=[];for(const _0x51b6f2 of this['activeUIs']){(0x0,this['uisData']['get'](_0x51b6f2)['filter'])(_0x562e03)&&_0x2541ec['push'](_0x51b6f2);}if(_0x2541ec['length']>0x1)throw new _0x3bea1e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2541ec,'annotationType':_0x562e03['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x1228ab('px');class _i extends _0x31aaeb{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x1f2b7a){super(_0x1f2b7a);const _0x2ac1da=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 _0x420295(),this['focusCycler']=new _0x24a5b3({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2ac1da['to']('class')],'style':{'minHeight':_0x2ac1da['to']('minHeight',_0x186ebd=>'number'==typeof _0x186ebd?wi(_0x186ebd+0xa):null)},'dir':_0x1f2b7a['uiLanguageDirection'],'role':'application','aria-label':bt(_0x1f2b7a,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x1f2b7a,'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',_0x599b8d=>{this['_updateItemPositionInFocusables'](_0x599b8d['source']);}),this['list']['forEach'](_0x560c1c=>{this['focusTracker']['add'](_0x560c1c['element']),this['_updateItemPositionInFocusables'](_0x560c1c);}),this['list']['on']('change',(_0x1d9e51,_0x3cdfae)=>{for(const _0x598834 of _0x3cdfae['removed'])this['focusTracker']['remove'](_0x598834['element']),this['focusables']['remove'](_0x598834);for(const _0x4c1d65 of _0x3cdfae['added'])this['focusTracker']['add'](_0x4c1d65['element']),this['_updateItemPositionInFocusables'](_0x4c1d65);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x254174){const _0x82608f=this['focusables']['getIndex'](_0x254174);let _0x2cd28b,_0x3fedcd;for(const _0xc02c08 of this['focusables'])if(_0x254174['top']<_0xc02c08['top']){_0x2cd28b=_0xc02c08;break;}if(_0x3fedcd=_0x2cd28b?this['focusables']['getIndex'](_0x2cd28b):this['focusables']['length'],-0x1!==_0x82608f){if(_0x82608f===_0x3fedcd-0x1)return;this['focusables']['remove'](_0x254174),_0x3fedcd=_0x2cd28b?this['focusables']['getIndex'](_0x2cd28b):this['focusables']['length'];}this['focusables']['add'](_0x254174,_0x3fedcd);}}const gi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x1228ab('px');class Ai extends _0x31aaeb{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x560479){super(_0x560479),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x46f0a9,_0x2904a3)=>_0x46f0a9+_0x2904a3),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x135f44=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x135f44['to']('isAnimationDisabled',_0x12ef08=>_0x12ef08?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x135f44['to']('top',_0x3f1cab=>gi(_0x3f1cab))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3ef690=this['element']['clientHeight'];_0x3ef690&&(this['height']=_0x3ef690);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x4d5b57{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x23c412){super(_0x23c412),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 _0x2aac2a=this['context']['config']['get']('sidebar.container');_0x2aac2a&&this['setContainer'](_0x2aac2a);}['setContainer'](_0x48589e){if(!yi(_0x48589e))throw new _0x3bea1e('sidebar-setcontainer-invalid-element');this['container']=_0x48589e;}['_attachToContainer']({viewClass:_0x45a563='',spaceBetweenItems:_0x3f1c90=0x19}={}){if(!yi(this['container']))throw new _0x3bea1e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x45a563,this['_spaceBetweenItems']=_0x3f1c90;}['rearrange']({removedAnnotation:_0x55169d,previousAnnotation:_0x126ba6,nextAnnotation:_0x4072d7}){const _0x59aae8=this['getSidebarItemView'](_0x55169d);this['view']['list']['remove'](_0x59aae8),this['_destroySidebarItemView'](_0x55169d),_0x126ba6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x126ba6)),_0x4072d7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4072d7)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xdf010c,activatedAnnotation:_0xaa2023,disableAnimationOnActivatedAnnotation:_0x4d981c}){if(this['_activeAnnotation']=_0xaa2023,_0xdf010c){_0xdf010c['isActive']=!0x1;const _0x4204c9=this['getSidebarItemView'](_0xdf010c);_0x4204c9&&_0x4d981c&&(_0x4204c9['isAnimationDisabled']=!0x1);}if(_0xaa2023){const _0x437a52=this['getSidebarItemView'](_0xaa2023);_0x437a52&&(_0xaa2023['isActive']=!0x0,_0x4d981c&&(_0x437a52['isAnimationDisabled']=!0x0,_0x437a52['top']+=0x1),this['_alignToTargetRect'](_0x437a52));}}['_detachFromContainer'](_0x5d0a79){if(this['view']['element']['remove'](),_0x5d0a79){for(const _0x33cee8 of _0x5d0a79)this['_destroySidebarItemView'](_0x33cee8);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x343c2e,_0x5093ab){_0x5093ab||(_0x5093ab=_0x343c2e['view']);const _0x25314f=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x25314f,_0x343c2e),this['_annotationToSidebarItemView']['set'](_0x343c2e,_0x25314f),_0x25314f['content']['add'](_0x5093ab),this['listenTo'](_0x343c2e['view'],'change:targetRect',(_0x45f3a3,_0x31a7ea,_0x58a982)=>{const _0x297d6b=this['_getTargetTop'](_0x343c2e,_0x58a982);_0x25314f['_targetTop']!=_0x297d6b&&(_0x25314f['_targetTop']=_0x297d6b,this['_setItemTop'](_0x25314f,_0x297d6b));}),this['listenTo'](_0x25314f,'change:top',()=>{this['_recalculate'](_0x25314f,'top');}),this['listenTo'](_0x25314f,'change:bottom',()=>{this['_recalculate'](_0x25314f,'bottom');}),this['_alignToTargetRect'](_0x25314f);const _0x51a287=this['_getItemBefore'](_0x25314f);if(_0x51a287)this['_alignAfterItem'](_0x51a287,_0x25314f)||this['_alignToTargetRect'](_0x25314f);else this['_alignToTargetRect'](_0x25314f);return this['_updateLastItem'](),this['view']['list']['add'](_0x25314f),_0x25314f;}['_alignForTopChange'](_0x36478c){if(!_0x36478c['content']['length'])return;const _0x292cb9=this['_getItemBefore'](_0x36478c);if(!_0x292cb9)return;const _0xa8c4c7=this['_sidebarItemViewToAnnotation']['get'](_0x292cb9),_0x3266ce=this['_activeAnnotation'];_0x3266ce&&_0x3266ce===_0xa8c4c7?this['_alignAfterItem'](_0x292cb9,_0x36478c):this['_alignBeforeItem'](_0x36478c,_0x292cb9);}['_alignForBottomChange'](_0x343963){if(!_0x343963['content']['length'])return;const _0x14e04c=this['_getItemAfter'](_0x343963);if(!_0x14e04c)return;const _0x4edaa1=this['_sidebarItemViewToAnnotation']['get'](_0x14e04c),_0x207225=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x1a87d2=this['_activeAnnotation'];_0x1a87d2&&_0x1a87d2===_0x4edaa1&&_0x207225?(this['_alignBeforeItem'](_0x14e04c,_0x343963),this['_alignAfterItem'](_0x343963,_0x14e04c)):_0x1a87d2&&_0x1a87d2===_0x4edaa1?this['_alignBeforeItem'](_0x14e04c,_0x343963):this['_alignAfterItem'](_0x343963,_0x14e04c);}['_recalculate'](_0x325305,_0x55ce40){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x899d30,changedProp:_0x2807ae}of this['_recalculateBuffer'])'top'===_0x2807ae?this['_alignForTopChange'](_0x899d30):this['_alignForBottomChange'](_0x899d30);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x325305,'changedProp':_0x55ce40});}['getSidebarItemView'](_0xa7b4f4){return this['_annotationToSidebarItemView']['get'](_0xa7b4f4);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3ce0fa){const _0x3ee3a6=this['getSidebarItemView'](_0x3ce0fa);this['stopListening'](_0x3ee3a6),this['stopListening'](_0x3ce0fa['view']),_0x3ee3a6['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3ce0fa),this['_sidebarItemViewToAnnotation']['delete'](_0x3ee3a6);}['_createSidebarView'](){const _0x147c92=new _i(this['context']['locale']);return _0x147c92['render'](),this['on']('change:_lastItem',(_0x28708e,_0x3d513a,_0x3605a9,_0xf13de0)=>{_0xf13de0&&_0x147c92['unbind']('minHeight'),_0x3605a9?_0x147c92['bind']('minHeight')['to'](_0x3605a9,'bottom'):_0x147c92['minHeight']=null;}),_0x147c92;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0xadbe68){const _0x31b3d1=this['_sidebarItemViewToAnnotation']['get'](_0xadbe68),_0x446742=_0x31b3d1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x31b3d1)-0x1);return _0x446742&&this['getSidebarItemView'](_0x446742)||null;}['_getItemAfter'](_0x366ceb){const _0x597644=this['_sidebarItemViewToAnnotation']['get'](_0x366ceb),_0x26f2d9=_0x597644&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x597644)+0x1);return _0x26f2d9&&this['getSidebarItemView'](_0x26f2d9)||null;}['_alignBeforeItem'](_0x1b64ea,_0x32cf28){_0x1b64ea['updateHeight']();const _0x491e75=vi(_0x32cf28['bottom']+this['_spaceBetweenItems'],_0x1b64ea['top']);return!!_0x491e75&&(this['_setItemTop'](_0x32cf28,_0x32cf28['top']-_0x491e75),!0x0);}['_alignAfterItem'](_0x9cf9f5,_0x39eacf){_0x9cf9f5['updateHeight']();const _0x10fddf=vi(_0x9cf9f5['bottom']+this['_spaceBetweenItems'],_0x39eacf['top']);return!!_0x10fddf&&(this['_setItemTop'](_0x39eacf,_0x39eacf['top']+_0x10fddf,!0x1),!0x0);}['_alignToTargetRect'](_0xbca229){const _0x4c978e=this['_sidebarItemViewToAnnotation']['get'](_0xbca229);if(!_0x4c978e||!_0x4c978e['target']||!_0x4c978e['targetRect'])return;const _0x5612dd=this['_getTargetTop'](_0x4c978e,_0x4c978e['targetRect']);this['_setItemTop'](_0xbca229,_0x5612dd);}['_getTargetTop'](_0xf133f6,_0x29cf0d){if(null===_0x29cf0d)return 0x0;if(_0xf133f6['target']instanceof _0x36753e)return _0x29cf0d['top'];{const _0x41b444=new _0x36753e(this['view']['element'])['top'];return _0x29cf0d['top']-_0x41b444;}}['_setItemTop'](_0x4b0a82,_0x44685a,_0x5be89b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5be89b&&(_0x44685a=Math['max'](_0x44685a,this['_getMaxAvailableTop'](_0x4b0a82))),_0x4b0a82['top']=_0x44685a;}['_getMaxAvailableTop'](_0x4a6c85){let _0x8c2d1f=this['_getItemBefore'](_0x4a6c85),_0x99ea63=0x0;for(;_0x8c2d1f;)_0x8c2d1f['updateHeight'](),_0x99ea63+=this['_spaceBetweenItems']+_0x8c2d1f['height'],_0x8c2d1f=this['_getItemBefore'](_0x8c2d1f);return _0x99ea63;}}function vi(_0xdcbe09,_0x12562e){return Math['max'](_0xdcbe09-_0x12562e,0x0);}function yi(_0x798a1b){return null!==_0x798a1b&&'object'==typeof _0x798a1b&&0x1===_0x798a1b['nodeType'];}class Ci extends _0x4d5b57{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x21800f){super(_0x21800f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x33b63a(),this['_refreshPositioningDebounced']=_0x5c43ed(()=>{_0x21800f['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1e566d=this['context']['plugins']['get'](pi),_0x1002ae=this['context']['plugins']['get'](Ti);_0x1e566d['register']('wideSidebar',this),_0x1002ae['container']&&_0x1e566d['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x237aa5){if(_0x237aa5===this['activeAnnotation'])return;const _0xbfdfa8=this['context']['plugins']['get'](Ti);_0xbfdfa8['_activeAnnotation']=_0x237aa5;const _0x330ea5=this['activeAnnotation'];_0xbfdfa8['refresh']({'blurredAnnotation':_0x330ea5,'activatedAnnotation':_0x237aa5}),this['activeAnnotation']=_0x237aa5;}['attach'](_0x156144){this['annotations']=_0x156144;const _0x2c7ac7=this['context']['plugins']['get'](Ti);if(_0x2c7ac7['_annotations']=_0x156144,this['isAttached'])throw new _0x3bea1e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2c7ac7,'set:container',()=>{this['detach'](),this['listenTo'](_0x2c7ac7,'change:container',_0x2c2d5b=>{_0x2c2d5b['off'](),this['attach'](_0x156144);});}),_0x2c7ac7['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1c2f95=_0xc983e0=>{_0xc983e0['updateTargetRect'](),_0x2c7ac7['addAnnotation'](_0xc983e0);};for(const _0x2e256c of _0x156144)_0x1c2f95(_0x2e256c);this['listenTo'](_0x156144,'add',(_0x3df523,_0xf2c205)=>{_0x1c2f95(_0xf2c205);}),this['listenTo'](_0x156144,'remove',(_0x21aa73,_0x392ef3,_0x5262d2)=>{_0x2c7ac7['rearrange']({'removedAnnotation':_0x392ef3,'previousAnnotation':_0x156144['get'](_0x5262d2-0x1),'nextAnnotation':_0x156144['get'](_0x5262d2+0x1)}),_0x392ef3===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x156144,'focus',(_0xe3966,_0x1f8bb1)=>{this['setActiveAnnotation'](_0x1f8bb1);}),this['listenTo'](_0x156144,'blur',()=>{this['setActiveAnnotation'](null);});const _0x52abd8=this['context']instanceof _0x258154?this['context']['editors']:new _0x33b63a([this['context']]);for(const _0x1ac99f of _0x52abd8)this['_integrateWithEditorAnnotations'](_0x1ac99f);this['listenTo'](_0x52abd8,'add',(_0x3bf719,_0x197bda)=>{this['listenTo'](_0x197bda,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x197bda);});}),this['listenTo'](_0x52abd8,'remove',(_0x21a33f,_0x29ac0c)=>{_0x29ac0c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x29ac0c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3bea1e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x229a9b=this['context']['plugins']['get'](Ti);_0x229a9b['_detachFromContainer'](this['annotations']),this['stopListening'](_0x229a9b),this['stopListening'](this['annotations']),this['context']instanceof _0x258154&&this['stopListening'](this['context']['editors']);for(const _0x344a7a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x344a7a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x28641e){if(!_0x28641e['plugins']['has']('EditorAnnotations'))return;const _0xb87853=_0x28641e['plugins']['get']('EditorAnnotations'),_0x5bbaa0=()=>{const _0x1ffaf2=_0xb87853['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1ffaf2[0x0]||null);};this['listenTo'](_0xb87853,'refresh',_0x5bbaa0),this['listenTo'](_0xb87853,'blur',(_0x4e043b,{isAnnotationTracked:_0x320d1a})=>{this['activeAnnotation']&&_0x320d1a(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xb87853,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x43d476=>{_0xb87853['hasDomSelection']()&&(_0x5bbaa0(),_0x43d476['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xb87853);}['_destroyEditorAnnotationsIntegration'](_0x197afa){this['stopListening'](_0x197afa),this['_editorAnnotations']['remove'](_0x197afa);}}class Ii extends _0x407247{['counterView'];constructor(_0x380bfb){super(_0x380bfb);const _0x489222=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0xe5d837,_0x1bc060)=>_0xe5d837?'...':_0x1bc060['toString']()),this['set']('annotationType',''),this['icon']=_0x2a3eab,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x31aaeb(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x489222['to']('annotationType',_0x358c27=>'ck-annotation-counter__badge--'+_0x358c27),_0x489222['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x489222['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x4d5b57{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xd2259d){super(_0xd2259d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x540581())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x33b63a(),this['_refreshPositioningDebounced']=_0x5c43ed(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x4fe44d){this['annotations']=_0x4fe44d;const _0x20b9e3=this['context']['plugins']['get'](Ti),_0x2968e7=this['balloonPanelView'];if(_0x20b9e3['_annotations']=_0x4fe44d,this['isAttached'])throw new _0x3bea1e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x20b9e3,'set:container',()=>{this['detach'](),this['listenTo'](_0x20b9e3,'change:container',_0x43b5fd=>{_0x43b5fd['off'](),this['attach'](_0x4fe44d);});}),_0x20b9e3['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3890ab=_0x291020=>{const _0x25704f=new Ii(this['context']['locale']);_0x20b9e3['addAnnotation'](_0x291020,_0x25704f),this['_annotationToNarrowView']['set'](_0x291020,_0x25704f),_0x25704f['bind']('isDirty','annotationType','number')['to'](_0x291020['view'],'isDirty','type','length'),_0x25704f['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2968e7['content']['first']!==_0x291020['view']?(this['_showBalloon'](_0x291020),_0x291020['view']['element']['focus'](),this['setActiveAnnotation'](_0x291020)):this['setActiveAnnotation'](null);});};for(const _0x4cafbb of _0x4fe44d)_0x3890ab(_0x4cafbb);this['listenTo'](_0x4fe44d,'add',(_0x4b3dad,_0xafd82d)=>{_0x3890ab(_0xafd82d);}),this['listenTo'](_0x4fe44d,'remove',(_0x401409,_0x51ab4c,_0x5a41fc)=>{this['_annotationToNarrowView']['get'](_0x51ab4c)['destroy'](),this['_annotationToNarrowView']['delete'](_0x51ab4c),_0x20b9e3['rearrange']({'removedAnnotation':_0x51ab4c,'previousAnnotation':_0x4fe44d['get'](_0x5a41fc-0x1),'nextAnnotation':_0x4fe44d['get'](_0x5a41fc+0x1)}),_0x51ab4c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x4fe44d,'focus',(_0x1ced5e,_0x5c613a)=>{this['setActiveAnnotation'](_0x5c613a);}),this['listenTo'](_0x4fe44d,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4a8b21,_0x578b11)=>{_0x578b11['keyCode']===_0x1032dc['esc']&&_0x2968e7['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2968e7['content']['first']),this['_hideBalloon'](),_0x578b11['stopPropagation'](),_0x578b11['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5b6b02,_0x307bc5)=>{const _0x50703c=_0x307bc5['target'];_0x2968e7['isVisible']&&_0x2968e7['element']['contains'](_0x50703c)||_0x20b9e3['view']['element']['contains'](_0x50703c)||_0x5b6b02['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x57db17=>_0x57db17['contains'](_0x50703c))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x503b89=this['context']instanceof _0x258154?this['context']['editors']:new _0x33b63a([this['context']]);for(const _0x4bd047 of _0x503b89)this['_integrateWithEditorAnnotations'](_0x4bd047);this['listenTo'](_0x503b89,'add',(_0x8a59e8,_0xd958b4)=>{this['listenTo'](_0xd958b4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xd958b4);});}),this['listenTo'](_0x503b89,'remove',(_0x3cb1be,_0x17c5c0)=>{_0x17c5c0['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x17c5c0['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x449faf){if(_0x449faf===this['activeAnnotation'])return;const _0x1a2b4c=this['context']['plugins']['get'](Ti);if(_0x1a2b4c['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x449faf,'disableAnimationOnActivatedAnnotation':!0x0}),_0x449faf)_0x1a2b4c['getSidebarItemView'](_0x449faf)?this['_showBalloon'](_0x449faf):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x449faf;}['detach'](){if(!this['isAttached'])throw new _0x3bea1e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5f1bee=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x81eb16=>_0x81eb16['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5f1bee['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x258154&&this['stopListening'](this['context']['editors']);for(const _0x42760a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x42760a);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'](_0x23be3d){if(!_0x23be3d['plugins']['has']('EditorAnnotations'))return;const _0x1185ce=_0x23be3d['plugins']['get']('EditorAnnotations'),_0x25c900=this['context']['plugins']['get'](Ti),_0x5449d0=this['annotations'],_0x392dae=this['balloonPanelView'],_0x25bb4c=()=>{const _0x8de7f4=_0x1185ce['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x8de7f4),this['setActiveAnnotation'](_0x8de7f4[0x0]||null);};this['listenTo'](_0x1185ce,'refresh',_0x25bb4c),this['listenTo'](_0x1185ce,'blur',(_0x3ae42d,{isAnnotationTracked:_0x111d94})=>{this['activeAnnotation']&&_0x111d94(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1185ce,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x5449d0,'blur',_0x7d2a45=>{_0x1185ce['hasDomSelection']()&&_0x7d2a45['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1bee6d,_0xb7e105)=>{const _0x49174f=_0xb7e105['target'];_0x392dae['isVisible']&&_0x392dae['element']['contains'](_0x49174f)||_0x25c900['view']['element']['contains'](_0x49174f)||this['activeAnnotation']&&_0x1185ce['hasDomSelection']()&&(_0x25bb4c(),_0x1bee6d['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1185ce);}['_destroyEditorAnnotationsIntegration'](_0x31640e){_0x31640e&&(this['stopListening'](_0x31640e),this['_editorAnnotations']['remove'](_0x31640e));}['_setSelectedAnnotations'](_0x4bd659){for(const _0x1c18da of this['_selectedAnnotations'])_0x4bd659['includes'](_0x1c18da)||this['_manuallyClosedAnnotationViews']['delete'](_0x1c18da['view']);this['_selectedAnnotations']=_0x4bd659;}['_refreshPositioning'](){const _0x6f4aa0=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x6f4aa0['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x23d902){if(this['_manuallyClosedAnnotationViews']['has'](_0x23d902['view']))return;const _0x394de4=this['balloonPanelView']['content']['first'];_0x394de4!==_0x23d902['view']?(_0x394de4&&this['_detachListeners'](_0x394de4),this['_attachListeners'](_0x23d902['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x23d902['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1f04c4=this['balloonPanelView']['content']['first'],_0x2fac0f=_0x1f04c4&&this['annotations']['getByView'](_0x1f04c4);if(!_0x2fac0f||!this['_annotationToNarrowView']['has'](_0x2fac0f))return;const _0x5e4e45=this['_annotationToNarrowView']['get'](_0x2fac0f)['element'],_0x4bf3c2=(function(){const _0x5bef02=ht['defaultPositions'];return[_0x5bef02['southArrowNorthEast'],_0x5bef02['northArrowSouthEast'],_0x5bef02['southArrowNorth'],_0x5bef02['northArrowSouth'],_0x5bef02['southArrowNorthWest'],_0x5bef02['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5e4e45,'positions':_0x4bf3c2});}['_hideBalloon'](){const _0x2a3152=this['balloonPanelView'],_0x37ad3a=_0x2a3152['content']['first'];_0x37ad3a&&(this['_detachListeners'](_0x37ad3a),_0x2a3152['unpin'](),_0x2a3152['content']['clear']());}['_attachListeners'](_0xf012b6){this['listenTo'](_0xf012b6,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xf012b6,'Esc',(_0x9613e8,_0xfb3588)=>{this['_manuallyClosedAnnotationViews']['add'](_0xf012b6),this['_hideBalloon'](),_0xfb3588();});}['_detachListeners'](_0x1cab60){this['stopListening'](_0x1cab60);}}class Ei extends _0x801ec5{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4fad4f){super(_0x4fad4f),_0x4fad4f['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4fad4f['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5c43ed(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x15a461=this['editor']['plugins']['get'](pi);_0x15a461['context']===this['editor']&&(_0x15a461['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1809cd,_0x89b58e)=>{const _0x466c3b=this['_balloon'];if(this['isAttached']&&_0x466c3b['visibleView']){const _0x1a060f=this['annotations']['getByView'](_0x466c3b['visibleView']);_0x1a060f&&this['_closeAnnotation'](_0x1a060f),_0x89b58e();}}));}['afterInit'](){const _0x568ba8=this['editor']['plugins']['get'](pi);_0x568ba8['context']===this['editor']&&(_0x568ba8['hasActive']()||_0x568ba8['switchTo']('inline'));}['setActiveAnnotation'](_0x2f6cf3){_0x2f6cf3!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2f6cf3&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2f6cf3)&&this['_addAnnotationToBalloon'](_0x2f6cf3,!0x0),_0x2f6cf3['isActive']=!0x0),_0x2f6cf3||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2f6cf3);}['attach'](_0x18e869){this['annotations']=_0x18e869;const _0x4cf481=this['editor']['plugins']['get'](pi),_0x4aeb16=this['_balloon'];if(this['isAttached'])throw new _0x3bea1e('inlineannotations-attach-already-attached',this);if(_0x4cf481['context']!==this['editor'])throw new _0x3bea1e('inlineannotations-not-allowed-with-context',this);const _0x314c78=this['editor']['plugins']['get'](si);this['listenTo'](_0x314c78,'refresh',()=>{const _0x50624b=_0x314c78['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x775a12,_0x1c8502;!this['_forceRefresh']&&(_0x775a12=_0x50624b,_0x1c8502=this['_selectedAnnotations'],_0x775a12['length']===_0x1c8502['length']&&_0x775a12['every'](_0x12c33c=>_0x1c8502['includes'](_0x12c33c)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x50624b),this['setActiveAnnotation'](_0x50624b[0x0]||null));}),this['listenTo'](_0x314c78,'blur',(_0x2dd85b,{isAnnotationTracked:_0x530d1b})=>{this['activeAnnotation']&&_0x530d1b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x314c78,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x47fa04,_0x4878fe,_0x10a008)=>{_0x10a008||this['setActiveAnnotation'](null);}),this['listenTo'](_0x18e869,'remove',(_0xe5639d,_0x25237a)=>{this['_removeAnnotationFromBalloon'](_0x25237a),_0x25237a===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4aeb16,'change:visibleView',(_0x542ab7,_0x4a71a2,_0x2ab4e8,_0x12d897)=>{_0x12d897&&this['stopListening'](_0x12d897);const _0x54d714=_0x18e869['getByView'](_0x2ab4e8);_0x2ab4e8&&_0x54d714&&(this['listenTo'](_0x2ab4e8,'change:height',()=>{_0x4aeb16['updatePosition']();}),this['listenTo'](_0x2ab4e8,'Esc',()=>{this['_closeAnnotation'](_0x54d714),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x54d714&&this['setActiveAnnotation'](_0x54d714));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4aeb16['visibleView']&&(_0x18e869['getByView'](_0x4aeb16['visibleView'])&&_0x4aeb16['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 _0x3bea1e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x22f715 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x22f715);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3ff6bc){for(const _0x371247 of this['_selectedAnnotations'])_0x3ff6bc['includes'](_0x371247)||this['_manuallyClosed']['delete'](_0x371247);for(const _0x211079 of this['annotations'])_0x3ff6bc['includes'](_0x211079)||this['_removeAnnotationFromBalloon'](_0x211079);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x56f923 of _0x3ff6bc)this['_addAnnotationToBalloon'](_0x56f923);}this['_selectedAnnotations']=_0x3ff6bc;}['_addAnnotationToBalloon'](_0x57e766,_0x33f358=!0x1){this['_manuallyClosed']['has'](_0x57e766)||(this['_addedAnnotations']['has'](_0x57e766)||this['_balloon']['hasView'](_0x57e766['view'])||(this['_addedAnnotations']['add'](_0x57e766),this['_balloon']['add']({'stackId':_0x57e766['view']['id'],'view':_0x57e766['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x57e766)}})),_0x33f358&&this['_balloon']['showStack'](_0x57e766['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4864d2){const _0x2c3bbb=_0x4864d2['target'],_0x51a6d0=this['editor']['editing']['view'],_0x4d28f2=_0x51a6d0['document']['selection']['getFirstRange'](),_0x3d29a5=_0x51a6d0['domConverter']['viewRangeToDom'](_0x4d28f2);if(_0x3d29a5['collapse'](!0x0),_0x2c3bbb){if(_0x2c3bbb instanceof _0x36753e)return _0x2c3bbb;let _0x1a8801=[];for(const _0x5e7a2c of _0x2c3bbb)_0x1a8801['push'](..._0x36753e['getDomElementRects'](_0x5e7a2c));_0x1a8801=function(_0x202951){const _0x19e884=[];let _0x436316=_0x202951[0x0];for(let _0x80b975=0x1;_0x80b975<_0x202951['length'];_0x80b975++)if(Ni(_0x436316,_0x202951[_0x80b975])){const _0x2c239a=_0x202951[_0x80b975]['width'];_0x436316['width']+=_0x2c239a,_0x436316['right']+=_0x2c239a;}else _0x19e884['push'](_0x436316),_0x436316=_0x202951[_0x80b975];return _0x19e884['push'](_0x436316),_0x19e884;}(_0x1a8801);const _0x1935dc=_0x3d29a5['getBoundingClientRect']();return _0x1a8801['find'](_0x1b866e=>_0x1b866e['top']<=_0x1935dc['top']&&_0x1b866e['bottom']>=_0x1935dc['bottom']&&_0x1b866e['left']<=_0x1935dc['left']&&_0x1b866e['right']>=_0x1935dc['right'])||_0x1a8801[0x0];}return _0x4864d2['targetRect']||_0x3d29a5;}['_removeAnnotationFromBalloon'](_0x360837){this['_addedAnnotations']['has'](_0x360837)&&this['_balloon']['hasView'](_0x360837['view'])&&(this['_addedAnnotations']['delete'](_0x360837),this['_balloon']['remove'](_0x360837['view']));}['_closeAnnotation'](_0x842ff1){this['_manuallyClosed']['add'](_0x842ff1),this['_removeAnnotationFromBalloon'](_0x842ff1);}}function Ni(_0x344d05,_0x565562){return _0x344d05['top']===_0x565562['top']&&_0x344d05['bottom']===_0x565562['bottom']&&_0x344d05['right']===_0x565562['left'];}class ki extends _0x31aaeb{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1b2582,_0x22ec84){super(_0x1b2582),this['set']('isEmpty',!_0x22ec84['length']),this['focusTracker']=new _0x420295(),this['_annotationViews']=_0x22ec84,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x24a5b3({'focusables':_0x22ec84,'focusTracker':this['focusTracker']}),this['listenTo'](_0x22ec84,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x22ec84,'remove',(_0x50ba59,_0x573a04)=>{_0x573a04['isActive']&&this['focus'](),_0x22ec84['length']||(this['isEmpty']=!0x0);});const _0x20dabe=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x1b2582,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x22ec84},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x20dabe['if']('isEmpty','ck-hidden',_0x1fc00a=>!_0x1fc00a)]},'children':[{'text':bt(_0x1b2582,'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 _0x5660d7 of this['_annotationViews'])this['focusTracker']['add'](_0x5660d7['element']);this['_annotationViews']['on']('change',(_0x24c208,{added:_0x1026d0,removed:_0x6755d9})=>{for(const _0xf05d38 of _0x1026d0)this['focusTracker']['add'](_0xf05d38['element']);for(const _0x96e158 of _0x6755d9)this['focusTracker']['remove'](_0x96e158['element']);});}}class Oi extends _0x4d5b57{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x35eda6){super(_0x35eda6),this['archivedThreads']=new _0x33b63a();}['init'](){const _0x5cdbf4=this['context'],_0x4b52ad=_0x5cdbf4['plugins']['get'](Qt),_0x271901=_0x5cdbf4['plugins']['get']($t);this['listenTo'](_0x4b52ad,'addCommentThread',(_0x3737cf,{threadId:_0x330420})=>{const _0x3baa2f=_0x4b52ad['getCommentThread'](_0x330420);_0x3baa2f['archivedAt']&&this['archivedThreads']['add'](_0x3baa2f,this['_calculatePosition'](_0x3baa2f['archivedAt'])),this['listenTo'](_0x3baa2f,'change:archivedAt',(_0x518d01,_0x2ab085,_0x360522)=>{_0x360522?this['archivedThreads']['has'](_0x3baa2f)||this['archivedThreads']['add'](_0x3baa2f,this['_calculatePosition'](_0x3baa2f['archivedAt'])):this['archivedThreads']['has'](_0x3baa2f)&&this['archivedThreads']['remove'](_0x3baa2f);});}),this['listenTo'](_0x4b52ad,'removeCommentThread',(_0x323c81,{threadId:_0x50e25b})=>{const _0x41dd28=_0x4b52ad['getCommentThread'](_0x50e25b);this['stopListening'](_0x41dd28),this['archivedThreads']['has'](_0x41dd28)&&this['archivedThreads']['remove'](_0x41dd28);},{'priority':'highest'}),this['listenTo'](_0x271901['collection'],'focus',(_0x215e34,_0x5bb8c0)=>{_0x5bb8c0['isVisible']||(_0x5bb8c0['isActive']=!0x0,_0x271901['activate'](_0x5bb8c0));});}['_calculatePosition'](_0x14bba4){const _0x14b7eb=[...this['archivedThreads']]['findIndex'](_0x2a9190=>_0x2a9190['archivedAt']<_0x14bba4);return _0x14b7eb>-0x1?_0x14b7eb:this['archivedThreads']['length'];}}class Mi extends _0x801ec5{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x3298ef){super(_0x3298ef),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x2f005c=this['editor'],_0x59f268=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2f005c['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x407247,!0x0)),_0x2f005c['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x16f3e4=this['_createCommentsArchiveButton'](ot);return _0x16f3e4['set']({'role':'menuitemcheckbox'}),_0x16f3e4;});const _0x49f8e8=_0x2f005c['plugins']['get'](Oi),_0x4faafb=_0x2f005c['plugins']['get']('Annotations'),_0x7aa5c4=_0x2f005c['plugins']['get']('CommentsRepository');_0x49f8e8['archivedThreads']['forEach'](_0x36fc99=>{this['_handleNewThread'](_0x36fc99);}),this['listenTo'](_0x49f8e8['archivedThreads'],'add',(_0x57a909,_0x3cc6ab)=>{this['_handleNewThread'](_0x3cc6ab);}),this['listenTo'](_0x4faafb['collection'],'add',(_0x588fb0,_0x18e802)=>{const _0x60a852=this['_pendingThreads']['find'](_0x13c68c=>{const _0x185564=_0x7aa5c4['_threadToController']['get'](_0x13c68c);return _0x185564&&_0x18e802['innerView']===_0x185564['view'];});if(_0x60a852){const _0x140072=this['_calculatePosition'](_0x60a852['archivedAt']);this['_addAnnotationToArchive'](_0x18e802,_0x140072),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x60a852),0x1);}}),this['listenTo'](_0x49f8e8['archivedThreads'],'remove',(_0x5c67ab,_0x297fa8)=>{const _0x59b7b4=_0x2f005c['config']['get']('collaboration.channelId');if(!_0x59b7b4||_0x297fa8['channelId']===_0x59b7b4){if(this['_pendingThreads']['includes'](_0x297fa8))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x297fa8),0x1);else{const _0x5dc5a0=_0x7aa5c4['_threadToController']['get'](_0x297fa8),_0x2bacdb=_0x4faafb['getByInnerView'](_0x5dc5a0['view']);this['annotationViews']['remove'](_0x2bacdb['view']),this['stopListening'](_0x2bacdb),this['stopListening'](_0x2bacdb['focusableElements']);}}}),this['listenTo'](_0x4faafb['collection'],'add',(_0x8362c5,_0x35e437)=>{this['listenTo'](_0x35e437,'escape',_0x59f268);}),this['listenTo'](_0x4faafb['collection'],'remove',(_0x46c269,_0x435c17)=>{this['stopListening'](_0x435c17,'escape',_0x59f268);});}['_addAnnotationToArchive'](_0x45db89,_0x30cbb4){this['listenTo'](_0x45db89,'set:isVisible',_0x5ca834=>{_0x5ca834['return']=!0x1,_0x5ca834['stop']();}),this['annotationViews']['add'](_0x45db89['view'],_0x30cbb4);}['_handleNewThread'](_0x4403df){const _0x1c293f=this['editor']['plugins']['get']('CommentsRepository'),_0x5e18bf=this['editor']['plugins']['get']('Annotations'),_0x1761f4=this['editor']['config']['get']('collaboration.channelId');if(!_0x1761f4||_0x4403df['channelId']===_0x1761f4){const _0x2b8e5e=_0x1c293f['_threadToController']['get'](_0x4403df);if(!_0x2b8e5e)return void this['_pendingThreads']['push'](_0x4403df);const _0x522755=this['_calculatePosition'](_0x4403df['archivedAt']),_0x342683=_0x5e18bf['getByInnerView'](_0x2b8e5e['view']);_0x342683['isVisible']&&_0x5e18bf['_visibleAnnotations']['remove'](_0x342683),this['_addAnnotationToArchive'](_0x342683,_0x522755);}}['_calculatePosition'](_0x157c45){const _0x54c135=this['editor']['config']['get']('collaboration.channelId'),_0x486462=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x41e78a=>_0x41e78a['channelId']===_0x54c135)['findIndex'](_0x5ed047=>_0x5ed047['archivedAt']<_0x157c45);return _0x486462<0x0||_0x486462>this['annotationViews']['length']?this['annotationViews']['length']:_0x486462-0x1;}['_toggleDialog'](){const _0xe0de99=this['editor'],_0xc9412=_0xe0de99['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0xe0de99['locale'],this['annotationViews'])),'commentsArchive'===_0xc9412['id']?_0xc9412['hide']():_0xc9412['show']({'id':'commentsArchive','title':bt(_0xe0de99['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3d6f82,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x363c36,_0x1cd0ae=!0x1){const _0x23f3e7=this['editor']['locale'],_0x1757b6=this['editor']['plugins']['get']('Dialog'),_0x3c213f=new _0x363c36(_0x23f3e7);return _0x3c213f['bind']('isEnabled')['to'](this,'isEnabled'),_0x3c213f['bind']('isOn')['to'](_0x1757b6,'id',_0x1eb1af=>'commentsArchive'===_0x1eb1af),_0x3c213f['set']({'label':bt(_0x23f3e7,'COMMENTS_ARCHIVE'),'icon':_0x3d6f82,'isToggleable':!0x0}),_0x1cd0ae&&(_0x3c213f['tooltip']=!0x0),this['listenTo'](_0x3c213f,'execute',()=>this['_toggleDialog']()),_0x3c213f;}['_hideDialogOnAnnotationEscape']=_0x430642=>{const _0x542217=_0x430642['source'];if(!this['annotationViews']['has'](_0x542217['view']))return;const _0x5784d7=this['editor']['plugins']['get']('Dialog');_0x5784d7['isOpen']&&'commentsArchive'===_0x5784d7['id']&&(_0x5784d7['hide'](),_0x430642['stop']());};}class Ri extends _0x801ec5{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|