@ckeditor/ckeditor5-comments 46.0.1-alpha.3 → 46.0.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x57a239={}){function _0x506606(_0x24888f){return _0x24888f['map'](_0xffa1c=>String['fromCharCode'](_0xffa1c))['join']('');}(_0x57a239=Object['assign']({},_0x57a239))['plugins']||(_0x57a239['plugins']=Rt['defaultPlugins']),super(_0x57a239),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x506606([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x506606([0x76,0x69,0x65,0x77])][_0x506606([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x506606([0x61,0x75,0x74,0x6f]),this[_0x506606([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x506606([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x506606([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x506606([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x506606([0x6f,0x6b])});}['create'](){const _0x5bf901=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5bf901))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3e8e2a=>{const _0xb54ef7=this['model']['document']['getRoot'](),_0x255413=_0xb54ef7&&_0xb54ef7['getChild'](_0xb54ef7['childCount']-0x1);_0x3e8e2a['setSelection'](_0x255413,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x21dfb4=this['editing']['view'],_0x4f825e=_0x21dfb4['document']['getRoot'](),_0x5f3bf1=_0x4f825e['getChild'](0x0);_0x4f825e['childCount']>0x1||!_0x5f3bf1||'p'!=_0x5f3bf1['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x21dfb4,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5f3bf1['placeholder']=this['placeholder']),St({'view':_0x21dfb4,'element':_0x5f3bf1,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5f3bf1);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3d1e5b,_0x4ee255={}){super(_0x3d1e5b),this['editor']=null,this['_editorConfig']=_0x4ee255,this['set']('value',_0x4ee255['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x3d1e5b,'Reply...')),this['set']('submitLabel',N(_0x3d1e5b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x30744a(),this['focusCycler']=new _0x17fb5d({'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',(_0x45d2ab,_0x319e86)=>{this['cancelButtonView']['fire']('execute'),_0x319e86();}),this['keystrokes']['set']('Ctrl+Enter',(_0xb78d5,_0x55116a)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x55116a());}),this['on']('submit',(_0x2888af,_0x5868ca)=>{_0x5868ca['length']>0xfde8?(alert(N(_0x3d1e5b,'TOO_LONG_COMMENT_ALERT',[_0x5868ca['length'],0xfde8])),_0x2888af['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x540357=this['editor'];this['element']['insertBefore'](_0x540357['ui']['element'],this['element']['firstChild']),_0x540357['model']['document']['on']('change',()=>this['value']=_0x540357['getData']()),_0x540357['bind']('placeholder')['to'](this),this['focusables']['add'](_0x540357['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x36e06e){-0x1===_0x36e06e?(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:_0x1ffe5a}=this,_0x3c0499=new _0x4373f8(_0x1ffe5a);return _0x3c0499['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3c0499['withText']=!0x0,_0x3c0499['bind']('label')['to'](this,'submitLabel'),_0x3c0499['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3c0499['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1e0697,_0x383ac9)=>!_0x383ac9&&!!_0x1e0697['trim']()),_0x3c0499;}['_createCancelButton'](){const {locale:_0xe86f31}=this,_0x30721d=new _0x4373f8(_0xe86f31);return _0x30721d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x30721d['label']=N(_0xe86f31,'Cancel'),_0x30721d['withText']=!0x0,_0x30721d['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x30721d;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x330051=>{this['focusTracker']['add'](_0x330051['element']);}),this['focusables']['on']('change',(_0x17cc2e,_0x4161b8)=>{for(const _0x362b65 of Array['from'](_0x4161b8['added'])['reverse']())this['focusTracker']['add'](_0x362b65['element']);});}}class ie extends kt{constructor(_0x32fcb4,_0x58a2cb,_0x445d40){super(_0x32fcb4),this['commentInputView']=new os(_0x32fcb4,_0x445d40),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3d7187,_0x1b055f)=>_0x3d7187||!!_0x1b055f),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 _0x96e7f7(_0x32fcb4,_0x58a2cb),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'](_0x2c2214){this['commentInputView']['focus'](_0x2c2214);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2bdf34,_0x58a184)=>{const {submitButtonView:_0x5a7a7d,cancelButtonView:_0x43daa5,editor:_0x1c96e3}=this['commentInputView'];[_0x5a7a7d['element'],_0x43daa5['element'],_0x1c96e3?_0x1c96e3['editing']['view']['getDomRoot']():null]['filter'](_0x1ae5f0=>_0x1ae5f0)['some'](_0x12c56f=>_0x12c56f['contains'](_0x58a184['target']))||(this['focus'](),_0x58a184['preventDefault']());});}}class rs extends kt{constructor(_0x4b0c71){super(_0x4b0c71);const _0x59b695=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x59b695['to']('count',_0x18a71b=>N(_0x4b0c71,'NUMBER_OF_COMMENTS',_0x18a71b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5f2df3,_0x3dc468,_0x7cd485){super(_0x5f2df3);const _0x22239b=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x3dc468['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x3dc468,this['_config']=_0x7cd485,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x30744a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x17fb5d({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x12272e=>this['commentViews']['map'](_0x3a81d1=>_0x3a81d1['element'])['includes'](_0x12272e['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5f2df3),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xe20f32=>_0xe20f32-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2dbde9 of _0x3dc468['comments'])this['_handleNewCommentModel'](_0x2dbde9);this['_handleInfoComment'](),this['listenTo'](_0x3dc468['comments'],'add',(_0x2c7d6c,_0x4bc965)=>{const _0x2c3883=this['_calculatePosition'](_0x4bc965);this['length']++,this['_handleNewCommentModel'](_0x4bc965,_0x2c3883),this['refreshVisibleViews']();}),this['listenTo'](_0x3dc468['comments'],'remove',(_0xdfec07,_0x2d73c8)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2d73c8),this['refreshVisibleViews']();}),this['listenTo'](_0x3dc468,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x3dc468,'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',_0x22239b['if']('length','ck-hidden',_0x911f85=>!_0x911f85)],'aria-label':N(_0x5f2df3,'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'](_0x1a3cd7){-0x1===_0x1a3cd7?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1ce617 of this['commentViews'])_0x1ce617['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4fbf64,_0x29343f){const _0x1f2b36=new this['_config']['CommentView'](this['locale'],_0x4fbf64,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1f2b36['viewUid']=_0x4fbf64['id'],_0x1f2b36['delegate']('removeComment')['to'](this),_0x1f2b36['delegate']('updateComment')['to'](this),_0x1f2b36['delegate']('resolveCommentThread')['to'](this),_0x1f2b36['delegate']('editorReady')['to'](this),_0x1f2b36['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1f2b36,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1f2b36,_0x29343f);}['_calculatePosition'](_0x5abd40){const _0x348d39=this['_model']['_findOptimalIndex'](_0x5abd40);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5abd40['authoredAt']?_0x348d39-0x1:_0x348d39:_0x348d39-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x1fbeab={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x1fbeab,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x1fbeab));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x14c4a2){const _0x68f69f=this['commentViews']['remove'](_0x14c4a2['id']);this['stopListening'](_0x68f69f),_0x68f69f['isEditMode']&&this['_updateHasDirtyComment'](),_0x68f69f['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x23a26d=>_0x23a26d['isEditMode']);}['_rearrangeCollapse'](){const _0x240f4b=function(_0x4f894b){const _0x4745f4=new _0x4f0cac();for(const _0x1b9e65 of _0x4f894b)_0x4745f4['add'](_0x1b9e65);return _0x4745f4;}(this['commentViews']),_0x585483=this['_collapsedCommentsView']['count'];for(let _0x4bb71b=0x1;_0x4bb71b<=_0x585483;_0x4bb71b++)_0x240f4b['remove'](0x1);for(const _0x12a413 of _0x240f4b)_0x12a413['collapse']();_0x585483>0x0&&_0x240f4b['add'](this['_collapsedCommentsView'],0x1),ns(_0x5b90fe(Array['from'](this['visibleViews']),Array['from'](_0x240f4b)),this['visibleViews'],_0x240f4b);}['_rearrangeExpand'](){ns(_0x5b90fe(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4146c8 of this['visibleViews'])_0x4146c8['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x3b8cb1=>{this['focusTracker']['add'](_0x3b8cb1['element']),this['keystrokes']['listenTo'](_0x3b8cb1['element']);}),this['commentViews']['on']('change',(_0x56b1c6,_0x4537c6)=>{for(const _0x4a017b of _0x4537c6['removed'])this['focusTracker']['remove'](_0x4a017b['element']),this['keystrokes']['stopListening'](_0x4a017b['element']);for(const _0x1ed460 of Array['from'](_0x4537c6['added'])['reverse']())this['focusTracker']['add'](_0x1ed460['element']),this['keystrokes']['listenTo'](_0x1ed460['element']);});}}function ns(_0x52b7ed,_0x56f920,_0x2cad55){let _0xc73bd4=0x0;for(const _0x3de990 of _0x52b7ed)switch(_0x3de990){case'insert':_0x56f920['add'](_0x2cad55['get'](_0xc73bd4),_0xc73bd4),_0xc73bd4++;break;case'delete':_0x56f920['remove'](_0xc73bd4);break;case'equal':_0xc73bd4++;}}class oe extends kt{constructor(_0x87894){super(_0x87894);const _0x3745c4=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3745c4['to']('contextValue',_0x5bfc34=>N(_0x87894,'THREAD_CONTEXT_LABEL',_0x5bfc34)),'tabindex':-0x1},'children':[{'text':_0x3745c4['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1ffef8,_0xef533f){super(_0x1ffef8);const _0x47f1f8=this['bindTemplate'];this['_model']=_0xef533f,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x30744a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x17fb5d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x12e6ad=>!!_0x12e6ad),this['bind']('contextValue')['to'](this['_model'],'context',_0x350020=>_0x350020&&_0x350020['value']?this['_trimContextValue'](_0x350020['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x47f1f8['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 _0x298749=new _0x4373f8(this['locale']);return _0x298749['label']=N(this['locale'],'Reopen'),_0x298749['tooltip']=N(this['locale'],'Reopen'),_0x298749['icon']=_0x6b1282,_0x298749['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x9f40d4=>!_0x9f40d4),_0x298749['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4723e8,_0xd875e1)=>_0x4723e8&&_0xd875e1),_0x298749['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x298749;}['_trimContextValue'](_0x5960a0){if(_0x5960a0['length']<0x96)return _0x5960a0;const _0x3054f7=_0x5960a0['lastIndexOf']('\x20',0x93);return _0x5960a0['substring'](0x0,_0x3054f7>-0x1?_0x3054f7:0x93)+'...';}['_attachContextActions'](){const _0x41eaf1=this['element']['querySelector']('.ck-context'),_0x1ecfcd=_0x41eaf1['querySelector']('.ck-context__value');this['listenTo'](_0x41eaf1,'mouseenter',()=>{_0x1ecfcd['offsetWidth']<_0x1ecfcd['scrollWidth']&&_0x41eaf1['classList']['add']('overlay');}),this['listenTo'](_0x41eaf1,'mouseleave',()=>{_0x41eaf1['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x551163 of this['focusables'])this['focusTracker']['add'](_0x551163['element']),this['keystrokes']['listenTo'](_0x551163['element']);}['_createContextView'](){const _0x234670=new oe(this['locale']);return _0x234670['bind']('contextValue')['to'](this),_0x234670;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x165bc6,_0x316f77,_0x12ae28,_0x3bef8c){super(_0x165bc6),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x316f77,this['_localUser']=_0x12ae28,this['_config']=_0x3bef8c,this['commentThreadHeaderView']=new Yt(_0x165bc6,_0x316f77),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x165bc6,N(_0x165bc6,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x165bc6,_0x316f77,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3bef8c)),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',(_0x1d1333,_0x2cb909)=>_0x1d1333||!!_0x2cb909),this['bind']('isUnlinked')['to'](_0x316f77,'unlinkedAt',_0x1b774d=>!!_0x1b774d),this['bind']('ariaLabel')['to'](this,'length',_0xe68682=>{const _0x5cb6a3=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0xe68682,_0x5cb6a3]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x30744a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x17fb5d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x199caf=>_0x199caf['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x5182cb=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x555bd0=_0x5182cb['commentInputView'];return _0x5182cb['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x555bd0,'value',(_0x4fa120,_0x102031,_0x5f37c8,_0x56c1a9,_0x2e6fc9)=>!!_0x2e6fc9||!!_0x56c1a9&&_0x5f37c8&&!_0x102031||_0x4fa120&&_0x5f37c8&&!_0x102031),_0x555bd0['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x68e68f,_0x476c43,_0x1951b4)=>{let _0x14639a;return _0x14639a=_0x1951b4&&_0x476c43?'Reply\x20to\x20reopen\x20discussion...':_0x68e68f?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x14639a);}),_0x555bd0['bind']('submitLabel')['to'](this,'length',_0x3ec530=>N(this['locale'],_0x3ec530?'Reply':'Comment')),_0x555bd0['on']('submit',(_0x47ea72,_0x2612d6)=>{this['fire']('addComment',_0x2612d6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x555bd0['on']('cancel',()=>{this['focus']();}),_0x555bd0['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x555bd0['on']('cancel',_0x2fcb77=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2fcb77['stop']());}),this['on']('change:isActive',(_0x14b5ed,_0x53b583,_0x17895c)=>{_0x17895c||this['length']||_0x555bd0['value']||this['fire']('removeCommentThread');}),_0x5182cb;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x434911(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x16b85b,target:_0x556672,type:_0x48ee81,isVisible:_0x2d1a98=!0x0}){super(),this['view']=_0x16b85b,this['view']['element']||this['view']['render'](),this['_type']=_0x48ee81,this['_target']=_0x556672,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4f0cac([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x231378,_0x2d1747)=>{this['view']['focusTracker']['add'](_0x2d1747);}),this['focusableElements']['on']('remove',(_0xe412b5,_0x1b32af)=>{this['view']['focusTracker']['remove'](_0x1b32af);}),this['set']('isVisible',_0x2d1a98);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2c7d14=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2c7d14),_0x2c7d14;}get['targetRect'](){const _0x12fde8=this['target'];if(null===_0x12fde8)return null;if(_0x12fde8 instanceof _0x1bd7c4)return _0x12fde8;const _0x230543=_0x12fde8['filter'](_0x3dde32=>function(_0xf52b18){const _0x5a7185=_0xf52b18['offsetParent'];if(_0x5a7185)return!0x0;const _0x4d2b5e=_0xf52b18['getClientRects']()['item'](0x0);return!!_0x4d2b5e;}(_0x3dde32));return 0x0===_0x230543['length']?null:new _0x1bd7c4(_0x230543[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4505c9){this['view']['isActive']=_0x4505c9,this['view']['mainView']['isActive']=_0x4505c9;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x53b419){if(!(null===_0x53b419||_0x53b419 instanceof _0x1bd7c4||Array['isArray'](_0x53b419)&&_0x53b419['every'](_0x549da1=>fi(_0x549da1))))throw new _0x4842d8('annotation-invalid-target',null,{'target':_0x53b419});}['_getNormalizedTarget'](){const _0x425abc='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x425abc)?[_0x425abc]:_0x425abc;}}function fi(_0x3d3a03){return null!==_0x3d3a03&&'object'==typeof _0x3d3a03&&'nodeType'in _0x3d3a03&&0x1===_0x3d3a03['nodeType'];}class S extends _0x4f0cac{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x22611b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x30744a(),this['_focusTracker']['on']('change:isFocused',(_0x55813c,_0x1e99eb,_0x1b46a3)=>{_0x1b46a3||this['fire']('blur');});for(const _0x52750d of _0x22611b)this['add'](_0x52750d);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x17d8fc){if(this['has'](_0x17d8fc))throw new _0x4842d8('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x17d8fc['innerView'],_0x17d8fc),this['_viewToAnnotation']['set'](_0x17d8fc['view'],_0x17d8fc);for(const _0x2fcf48 of _0x17d8fc['focusableElements'])this['_focusTracker']['add'](_0x2fcf48);this['listenTo'](_0x17d8fc['focusableElements'],'add',(_0x2c4b1c,_0x75e343)=>{this['_focusTracker']['add'](_0x75e343);}),this['listenTo'](_0x17d8fc['focusableElements'],'remove',(_0x5bfcc0,_0x503d09)=>{this['_focusTracker']['remove'](_0x503d09);}),this['listenTo'](_0x17d8fc['view']['focusTracker'],'change:isFocused',(_0x336370,_0x55724c,_0x58c16b)=>{_0x58c16b&&this['fire']('focus',_0x17d8fc);}),_0x17d8fc['updateTargetRect']();const _0x553bc4=this['_getOrderInContent'](_0x17d8fc['view']['targetRect']);return super['add'](_0x17d8fc,_0x553bc4);}['remove'](_0x564d11){if(!this['has'](_0x564d11))throw new _0x4842d8('annotationcollection-not-existing-item',null);this['stopListening'](_0x564d11['view']['focusTracker']),this['stopListening'](_0x564d11['focusableElements']);for(const _0x31c453 of _0x564d11['focusableElements'])this['_focusTracker']['remove'](_0x31c453);return this['_viewToAnnotation']['delete'](_0x564d11['view']),this['_innerViewToAnnotation']['delete'](_0x564d11['innerView']),super['remove'](_0x564d11);}['getByInnerView'](_0x38ffc5){return this['_innerViewToAnnotation']['get'](_0x38ffc5);}['getByView'](_0x2e75e7){return this['_viewToAnnotation']['get'](_0x2e75e7);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3f0dff of this)_0x3f0dff['updateTargetRect']();this['_sort']();}['_sort'](){const _0x35af98=Array['from'](this)['sort']((_0x338b33,_0x47788f)=>w(_0x338b33['view']['targetRect'],_0x47788f['view']['targetRect']));for(let _0x1c5431=_0x35af98['length']-0x1;_0x1c5431>0x0;_0x1c5431--){const _0x1200c7=_0x35af98[_0x1c5431];_0x1c5431!==this['getIndex'](_0x1200c7)&&(this['remove'](_0x1200c7),this['add'](_0x1200c7));}}['_getOrderInContent'](_0x55b138){let _0x2ad3fc=0x0;if(!_0x55b138)return this['length'];for(const _0x28ced3 of this){const _0x39c291=_0x28ced3['view']['targetRect'];if(_0x39c291){if(w(_0x55b138,_0x39c291)<0x0)return _0x2ad3fc;_0x2ad3fc++;}}return _0x2ad3fc;}}function v({source:_0x5b2c62,target:_0xeb7ffa,filter:_0x27b045}){for(const _0x4ce3c9 of _0x5b2c62)_0x27b045(_0x4ce3c9)&&_0xeb7ffa['add'](_0x4ce3c9);_0xeb7ffa['listenTo'](_0x5b2c62,'add',(_0x30d428,_0x409fe3)=>{_0x27b045(_0x409fe3)&&_0xeb7ffa['add'](_0x409fe3);}),_0xeb7ffa['listenTo'](_0x5b2c62,'remove',(_0xed011c,_0x1d06c8)=>{_0xeb7ffa['has'](_0x1d06c8)&&_0xeb7ffa['remove'](_0x1d06c8);});}function w(_0x2cda01,_0x26025e){if(null===_0x2cda01&&null===_0x26025e)return 0x0;if(null===_0x2cda01)return-0x1;if(null===_0x26025e)return 0x1;const _0x19a292=_0x2cda01['top']-_0x26025e['top'];return 0x0==_0x19a292?_0x2cda01['left']-_0x26025e['left']:_0x19a292;}class y extends _0x14070b{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19fb8a){if(super(_0x19fb8a),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x19fb8a instanceof _0x4f592b){const _0x4eb7c1=_0x19fb8a['locale'];_0x19fb8a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x9d3370){this['collection']['add'](_0x9d3370);}['remove'](_0x4fc7be){this['collection']['remove'](_0x4fc7be),_0x4fc7be['destroy']();}['refreshVisibility'](){for(const _0x37a011 of this['collection'])_0x37a011['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x4c9bd4){return this['collection']['getByInnerView'](_0x4c9bd4);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x41969d of this['collection'])_0x41969d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x49aeb1){this['fire']('_activateAnnotation',_0x49aeb1);}['createAnnotation'](_0x9d475){return new T(_0x9d475);}['createAnnotationView'](_0x3e5dfe,_0x56ebdc){return new E(_0x3e5dfe,_0x56ebdc);}['_addActiveAnnotation'](_0x34a98c){const _0x4890a1=new Set(this['activeAnnotations']);_0x4890a1['add'](_0x34a98c),this['activeAnnotations']=_0x4890a1;}['_removeActiveAnnotation'](_0x3e30de){const _0xc798e9=new Set(this['activeAnnotations']);_0xc798e9['delete'](_0x3e30de),this['activeAnnotations']=_0xc798e9;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5464c5=this['collection'],_0x226d91=this['_visibleAnnotations'];function _0x2051d2(_0x212381){const _0xe729e4=_0x212381['source'];_0xe729e4['isVisible']&&!_0x226d91['has'](_0xe729e4)?_0x226d91['add'](_0xe729e4):!_0xe729e4['isVisible']&&_0x226d91['has'](_0xe729e4)&&_0x226d91['remove'](_0xe729e4),_0xe729e4['view']['focusTracker']['remove'](_0xe729e4['view']['element']),_0xe729e4['view']['focusTracker']['add'](_0xe729e4['view']['element']);}this['listenTo'](_0x5464c5,'add',(_0x5e6456,_0x594d58)=>{_0x594d58['isVisible']&&_0x226d91['add'](_0x594d58),this['listenTo'](_0x594d58,'change:isVisible',_0x2051d2);}),this['listenTo'](_0x5464c5,'remove',(_0x326a8a,_0x4642dd)=>{_0x226d91['has'](_0x4642dd)&&_0x226d91['remove'](_0x4642dd),this['stopListening'](_0x4642dd,'change:isVisible',_0x2051d2);});}['_setupEnterAnnotationKeystroke'](){const _0x169ce7=_0x10c481=>{_0x10c481['on']('ready',()=>{_0x10c481['keystrokes']['set'](_0x498d8c,(_0x301854,_0x4c7aad)=>{const _0x1f0fe8=_0x243c4e(this['activeAnnotations']['values']());_0x1f0fe8&&(_0x1f0fe8['view']['focus'](),_0x4c7aad());});});};this['context']instanceof _0x4f592b?_0x169ce7(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4092de,_0x293dd7)=>{_0x169ce7(_0x293dd7);});}['_setupEscapeAnnotationHandling'](){const _0x4e97fe=_0x19ffff=>{const _0x56a9f7=_0x19ffff['source'],_0x4ebfee=[];let _0x22d284;if(Array['isArray'](_0x56a9f7['target'])){_0x22d284=_0x56a9f7['target'][0x0],this['context']instanceof _0x4f592b?_0x4ebfee['push'](this['context']):this['context']['editors']&&_0x4ebfee['push'](...this['context']['editors']);for(const _0x39f067 of _0x4ebfee)for(const _0x4d7680 of _0x39f067['editing']['view']['domRoots']['values']())if(_0x4d7680['contains'](_0x22d284))return void _0x39f067['editing']['view']['focus']();_0x22d284['focus']();}};this['listenTo'](this['collection'],'add',(_0x388192,_0x18f432)=>{this['listenTo'](_0x18f432,'escape',_0x4e97fe,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xc82c5e,_0x2637d3)=>{this['stopListening'](_0x2637d3,'escape',_0x4e97fe);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x14070b{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a5152){super(_0x3a5152),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x509d04=this['context']['config'];_0x509d04['define']('comments.maxCommentsWhenCollapsed',0x2),_0x509d04['define']('comments.maxThreadTotalWeight',0x1f4),_0x509d04['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x509d04['define']('comments.CommentThreadView',gt),_0x509d04['define']('comments.CommentView',Tt),_0x509d04['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1c06eb=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x41ef15,_0x3756a8)=>this['_addCommentThread'](_0x3756a8)),this['on']('submitCommentThread',(_0x7d416,_0x4d6892)=>this['_submitCommentThread'](_0x4d6892)),this['on']('resolveCommentThread',(_0x201560,_0x3e20da)=>this['_resolveCommentThread'](_0x3e20da)),this['on']('resolveCommentThread',(_0x5ca6d6,_0x1b46c3)=>this['_updateActiveAnnotation'](_0x1b46c3),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x51c811,_0xe3974f)=>this['_reopenCommentThread'](_0xe3974f)),this['on']('reopenCommentThread',(_0x4bf686,_0x27d7df)=>this['_updateActiveAnnotation'](_0x27d7df),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1e2fbc,_0x4f7a2a)=>this['_removeCommentThread'](_0x4f7a2a)),this['on']('updateCommentThread',(_0x4c3d9d,_0x51f98e)=>this['_updateCommentThread'](_0x51f98e)),this['on']('updateCommentThread',(_0x40dbb2,_0x3ff36c)=>this['_updateActiveAnnotation'](_0x3ff36c),{'priority':'lowest'}),this['on']('addComment',(_0x4ceb92,_0x10c6bf)=>this['_addComment'](_0x10c6bf)),this['on']('updateComment',(_0x545490,_0x67437f)=>this['_updateComment'](_0x67437f)),this['on']('removeComment',(_0xfef3cf,_0x13e13c)=>this['_removeComment'](_0x13e13c)),this['on']('addComment',(_0xfddb2d,{threadId:_0x511b70,isFromAdapter:_0x271481})=>{if(_0x271481)return;const _0x1a34fd=this['getCommentThread'](_0x511b70),_0x5219ba=_0x1a34fd&&this['_threadToController']['get'](_0x1a34fd);_0x5219ba&&_0x5219ba['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1c06eb,'change:activeAnnotations',(_0x253c1a,_0x3b4f31,_0x5db669)=>{const _0x301df3=Array['from'](_0x5db669)['map'](_0x5731b3=>this['_viewToController']['get'](_0x5731b3['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x301df3?_0x301df3['model']:null;});}set['adapter'](_0xecdee1){if(this['_adapter'])throw new _0x4842d8('commentsrepository-adapter-already-set');this['_adapter']=_0xecdee1;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x175f01=_t,threadId:_0x21f7f9=_0x144fe1(),comments:_0x3bb5ed=[],unlinkedAt:_0x4f3fe7=null,resolvedAt:_0x4e11c0=null,resolvedBy:_0x4832e8=null,target:_0x412868=null,context:_0x1b3e2e=null,attributes:_0x1929ce={},isResolvable:_0x5038ea=!0x0,isSubmitted:_0x2d2a5c=!0x1,isFromAdapter:_0x229309=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x175f01),{'channelId':_0x175f01,'threadId':_0x21f7f9,'comments':_0x3bb5ed,'unlinkedAt':_0x4f3fe7,'resolvedAt':_0x4e11c0,'resolvedBy':_0x4832e8,'target':_0x412868,'context':_0x1b3e2e,'attributes':_0x1929ce,'isFromAdapter':_0x229309,'isResolvable':_0x5038ea,'isSubmitted':_0x2d2a5c}),this['getCommentThread'](_0x21f7f9);}['openNewCommentThread']({channelId:_0x34dc04=_t,threadId:_0x397f68=_0x144fe1(),target:_0x2c997e,context:_0x2a4dba=null,isResolvable:_0x4ca181=!0x0}){if(this['_readOnlyChannels']['has'](_0x34dc04)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2c997e)throw new _0x4842d8('commentsrepository-missing-target');const _0x5bcd58=this['addCommentThread']({'channelId':_0x34dc04,'threadId':_0x397f68,'target':_0x2c997e,'context':_0x2a4dba,'isResolvable':_0x4ca181});if(!_0x5bcd58)return null;const _0x1d5b1a=this['_threadToController']['get'](_0x5bcd58),_0x2f2409=_0x1d5b1a['view']['commentThreadInputView']['commentInputView'],_0x267028=this['context']['plugins']['get'](y),_0x48cdf1=_0x267028['getByInnerView'](_0x1d5b1a['view']);return _0x267028['activate'](_0x48cdf1),_0x2f2409['once']('editorReady',()=>_0x2f2409['focus']()),_0x5bcd58;}['hasCommentThread'](_0x2040e9){if('string'!=typeof _0x2040e9)throw new _0x4842d8('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2040e9);}['updateCommentThread']({channelId:_0x2e3d03=_t,threadId:_0x147d54,context:_0x2506fd,unlinkedAt:_0x2be1a4,attributes:_0x4020ba,isFromAdapter:_0x218351=!0x1}){return this['fire'](Nt('updateCommentThread',_0x2e3d03),{'channelId':_0x2e3d03,'threadId':_0x147d54,'context':_0x2506fd,'unlinkedAt':_0x2be1a4,'attributes':_0x4020ba,'isFromAdapter':_0x218351}),this['getCommentThread'](_0x147d54);}['getCommentThread'](_0x47371c){if('string'!=typeof _0x47371c)throw new _0x4842d8('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x47371c);}['fetchCommentThread']({channelId:_0x481fd1,threadId:_0x1d7f11}={}){const _0x53b210=this['getCommentThread'](_0x1d7f11);if(_0x53b210)return Promise['resolve'](_0x53b210);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4842d8('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x481fd1,'threadId':_0x1d7f11})['then'](_0x5569aa=>this['hasCommentThread'](_0x1d7f11)?this['getCommentThread'](_0x1d7f11):_0x5569aa?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x481fd1},_0x5569aa)):void 0x0)['catch'](_0x595159=>{throw console['error'](_0x595159),new _0x4842d8('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2a0468,skipNotAttached:_0x44fc09=!0x1,skipEmpty:_0x4c2ed4=!0x1,toJSON:_0x26d597=!0x1}={}){const _0x3fc334=[];for(const _0x4d2431 of this['_threads']['values']())_0x2a0468&&_0x4d2431['channelId']!==_0x2a0468||_0x44fc09&&!_0x4d2431['isAttached']||_0x4c2ed4&&0x0===_0x4d2431['length']||_0x3fc334['push'](_0x4d2431);return _0x26d597?_0x3fc334['map'](_0x119a2c=>_0x119a2c['toJSON']()):_0x3fc334;}['getAnnotationForCommentThread'](_0x1cc30e){const _0x34bfbd=this['_threadToController']['get'](_0x1cc30e);if(!_0x34bfbd)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x34bfbd['view'])||null;}['getCommentThreadForAnnotation'](_0x4f3ffb){const _0x1c43a5=this['_viewToController']['get'](_0x4f3ffb['innerView']);return _0x1c43a5?_0x1c43a5['model']:null;}['setActiveCommentThread'](_0x390c5e){const _0x3ae12d=this['context']['plugins']['get'](y);if(!_0x390c5e)return void(this['activeCommentThread']&&_0x3ae12d['deactivateAll']());const _0x248583=this['getCommentThread'](_0x390c5e);if(!_0x248583)throw new _0x4842d8('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x390c5e});if(!this['_threadToController']['has'](_0x248583))throw new _0x4842d8('commentsrepository-active-not-attached',null,{'threadId':_0x390c5e});const _0x43b22b=_0x3ae12d['getByInnerView'](this['_threadToController']['get'](_0x248583)['view']);_0x3ae12d['activate'](_0x43b22b);}['switchReadOnly'](_0x1f3000,_0x18cad1){_0x1f3000?this['_readOnlyChannels']['add'](_0x18cad1):this['_readOnlyChannels']['delete'](_0x18cad1),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x55ac67){return this['_readOnlyChannels']['has'](_0x55ac67)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x10db11,_0x3fe42f){return new vt(_0x10db11,_0x3fe42f);}['setPermissions'](_0x336132,_0x36e231=_t){this['_permissions']['set'](_0x36e231,_0x336132),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4e6ec4=_t){return this['_permissions']['has'](_0x4e6ec4)?this['_permissions']['get'](_0x4e6ec4):bt;}['_addCommentThread']({channelId:_0x4822ed,threadId:_0x17df64,comments:_0x3edeae,unlinkedAt:_0xf045b6,resolvedAt:_0x59b83b,resolvedBy:_0xaf28df,target:_0x1913d1,context:_0x29c24c,attributes:_0x18b110,isFromAdapter:_0x2ae956,isResolvable:_0x27af84,isSubmitted:_0x1b2f0b}){if('string'!=typeof _0x17df64)throw new _0x4842d8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x17df64});if(this['hasCommentThread'](_0x17df64))throw new _0x4842d8('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x17df64});const _0x2dbd73=new pi(this,{'channelId':_0x4822ed,'id':_0x17df64,'context':_0x29c24c,'attributes':_0x18b110,'unlinkedAt':_0xf045b6,'resolvedAt':_0x59b83b,'resolvedBy':_0xaf28df?this['context']['plugins']['get'](it)['getUser'](_0xaf28df):null,'isResolvable':_0x27af84,'isSubmitted':_0x1b2f0b||_0x2ae956});this['_threads']['set'](_0x17df64,_0x2dbd73);for(const _0x3aadf2 of _0x3edeae)_0x2dbd73['_add'](this['_createNewComment']({'threadId':_0x17df64,..._0x3aadf2}));return _0x1913d1&&_0x2dbd73['attachTo'](_0x1913d1),_0x2ae956||!_0x2dbd73['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4822ed,'threadId':_0x17df64});}['_submitCommentThread']({channelId:_0x6d2ddd,threadId:_0x66c305}){if(!this['hasCommentThread'](_0x66c305))throw new _0x4842d8('commentsrepository-missing-comment-thread',this);const _0x17b301=this['getCommentThread'](_0x66c305);if(_0x17b301['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x524c5a,comments:_0x1006a6,resolvedAt:_0x2180c0,resolvedBy:_0x4d2f31,context:_0x44d0ea,attributes:_0x5b112c}=_0x17b301,_0x1c0175=this['context']['plugins']['get']('PendingActions'),_0xf93c1b=_0x1c0175['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x6d2ddd,'threadId':_0x524c5a,'comments':_0x1006a6['map'](_0x4f5395=>_0x4f5395['toJSON']()),'resolvedAt':_0x2180c0,'resolvedBy':_0x4d2f31?_0x4d2f31['id']:_0x4d2f31,'context':_0x44d0ea,'attributes':_0x5b112c})['then'](({comments:_0x5af661})=>{_0x1c0175['remove'](_0xf93c1b);for(const _0x57fa6d of _0x5af661)this['_updateComment']({'channelId':_0x6d2ddd,'threadId':_0x66c305,'commentId':_0x57fa6d['commentId'],'createdAt':_0x57fa6d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3d8535=>{throw console['error'](_0x3d8535),new _0x4842d8('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4d8cc4,target:_0x41ff78}){const _0x704974=this['getCommentThread'](_0x4d8cc4);if(!_0x704974)throw new _0x4842d8('commentsrepository-attach-missing-comment-thread',this);const _0x4725bc=this['context']['plugins']['get']('PendingActions'),_0xdcdfb6=this['context']['plugins']['get'](y),_0x4c7c0c=this['_createCommentThreadView'](_0x704974),_0x3bbf49=new vt(_0x704974,_0x4c7c0c);let _0x665aa0=null;_0x4c7c0c['on']('change:isDirty',(_0x26194f,_0x50e1a8,_0xd08664)=>{_0xd08664?_0x665aa0=_0x4725bc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x665aa0&&(_0x4725bc['remove'](_0x665aa0),_0x665aa0=null);}),this['_threadToController']['set'](_0x704974,_0x3bbf49),this['_viewToController']['set'](_0x4c7c0c,_0x3bbf49);const _0x1cdf53=new E(this['context']['locale'],_0x4c7c0c);_0x1cdf53['bind']('length')['to'](_0x4c7c0c),_0x1cdf53['bind']('isDirty')['to'](_0x4c7c0c,'isDirty',_0x4c7c0c,'length',(_0x167638,_0x2e4576)=>_0x167638||!_0x2e4576),_0x1cdf53['bind']('isActive')['to'](_0x4c7c0c),_0x1cdf53['type']='comment';const _0x3b6ee9=new T({'view':_0x1cdf53,'target':_0x41ff78,'type':'comment','isVisible':!_0x704974['archivedAt']&&!!('function'==typeof _0x41ff78?_0x41ff78():_0x41ff78)});return _0x4c7c0c['on']('escape',()=>{_0x3b6ee9['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4c7c0c,_0x3b6ee9),_0xdcdfb6['add'](_0x3b6ee9),_0x3b6ee9;}['_bindAnnotationToEditors'](_0x2a4277,_0x559c98){this['listenTo'](_0x2a4277,'editorReady',(_0x5cf3b9,_0x572fbb)=>{const _0x43574a=_0x572fbb['ui']['view']['body']['bodyCollectionContainer'];_0x559c98['focusableElements']['add'](_0x43574a),this['context']instanceof _0x4f592b&&this['context']['ui']['focusTracker']['add'](_0x43574a);},{'priority':'highest'}),this['listenTo'](_0x2a4277,'editorDestroyed',(_0x1161b3,_0x239eb0)=>{const _0xa11ed6=_0x239eb0['ui']['view']['body']['bodyCollectionContainer'];_0x559c98['focusableElements']['has'](_0xa11ed6)&&_0x559c98['focusableElements']['remove'](_0xa11ed6),this['context']instanceof _0x4f592b&&this['context']['ui']['focusTracker']['remove'](_0xa11ed6);});}['_unbindEditors'](_0x5d7411){this['stopListening'](_0x5d7411,'editorReady'),this['stopListening'](_0x5d7411,'editorDestroyed');}['_createCommentThreadView'](_0x330a03){const _0x442af4=this['context']['plugins']['get'](it),{config:_0x33e4e1,locale:_0x2923b7}=this['context'],_0x3c2c94=pt(_0x33e4e1['get']('locale'),_0x2923b7);return new(0x0,(_0x33e4e1['get']('comments'))['CommentThreadView'])(_0x2923b7,_0x330a03,_0x442af4['me'],{'editorConfig':{..._0x33e4e1['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x33e4e1['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x33e4e1['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x33e4e1['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x33e4e1['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3c2c94,'CommentView':_0x33e4e1['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1f22ee,channelId:_0x26eb69,resolvedAt:_0x2d8734,resolvedBy:_0x7133b0,isFromAdapter:_0x581769}){if(!this['hasCommentThread'](_0x1f22ee))throw new _0x4842d8('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f22ee});const _0x589af1=this['getCommentThread'](_0x1f22ee);if(_0x589af1['isResolved'])throw new _0x4842d8('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1f22ee});const _0x4f5056=this['context']['plugins']['get'](it);if(_0x589af1['resolvedBy']=_0x4f5056['getUser'](_0x7133b0),_0x589af1['resolvedAt']=_0x2d8734,_0x581769||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4cd0af=this['context']['plugins']['get']('PendingActions'),_0x2467f4=_0x4cd0af['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x26eb69,'threadId':_0x1f22ee})['then'](({resolvedAt:_0x459953,resolvedBy:_0xd2a0be})=>{_0x4cd0af['remove'](_0x2467f4),_0x589af1['resolvedBy']['id']!==_0xd2a0be&&(_0x589af1['resolvedBy']=_0x4f5056['getUser'](_0xd2a0be)),_0x589af1['resolvedAt']=_0x459953;})['catch'](_0x3491a4=>{throw console['error'](_0x3491a4),new _0x4842d8('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2630d8,channelId:_0x25277f,isFromAdapter:_0x4ca4bf}){if(!this['hasCommentThread'](_0x2630d8))throw new _0x4842d8('commentsrepository-missing-comment-thread',null,{'threadId':_0x2630d8});const _0x4303ca=this['getCommentThread'](_0x2630d8);if(!_0x4303ca['isResolved'])throw new _0x4842d8('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2630d8});if(_0x4303ca['resolvedBy']=null,_0x4303ca['resolvedAt']=null,_0x4ca4bf||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1ec310=this['context']['plugins']['get']('PendingActions'),_0x4c8186=_0x1ec310['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x25277f,'threadId':_0x2630d8})['then'](()=>_0x1ec310['remove'](_0x4c8186))['catch'](_0x1ec007=>{throw console['error'](_0x1ec007),new _0x4842d8('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x24459c,isFromAdapter:_0x162a6e}){const _0x3aebb2=this['getCommentThread'](_0x24459c);if(!_0x3aebb2)throw new _0x4842d8('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x24459c),this['_threads']['delete'](_0x24459c),!_0x3aebb2['isSubmitted']||_0x162a6e||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x29b5f6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23836f}=_0x3aebb2,_0x32939a=_0x29b5f6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x23836f,'threadId':_0x24459c})['then'](()=>_0x29b5f6['remove'](_0x32939a))['catch'](_0x596e22=>{throw console['error'](_0x596e22),new _0x4842d8('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4da854,unlinkedAt:_0x1a454a,context:_0x45ee87,attributes:_0x1b4100,isFromAdapter:_0x5a2613}){if('string'!=typeof _0x4da854)throw new _0x4842d8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4da854});if(!this['hasCommentThread'](_0x4da854))throw new _0x4842d8('commentsrepository-missing-comment-thread',null,{'threadId':_0x4da854});const _0x41a24e=this['getCommentThread'](_0x4da854);let _0xc67321=!0x1;if(void 0x0!==_0x45ee87&&_0x41a24e['context']!==_0x45ee87&&(_0x41a24e['context']=_0x45ee87,_0xc67321=!0x0),void 0x0!==_0x1a454a&&_0x41a24e['unlinkedAt']!==_0x1a454a&&(_0x41a24e['unlinkedAt']=_0x1a454a,_0xc67321=!0x0),_0x1b4100&&!At(_0x1b4100,_0x41a24e['attributes'])&&(_0x41a24e['attributes']=_0x1b4100,_0xc67321=!0x0),!_0xc67321)return Promise['resolve']();if(!_0x41a24e['isSubmitted']||_0x5a2613||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2cb204=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5c869e}=_0x41a24e,_0x531128=_0x2cb204['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5c869e,'threadId':_0x4da854,'context':_0x45ee87,'unlinkedAt':_0x1a454a,'attributes':_0x1b4100})['then'](()=>_0x2cb204['remove'](_0x531128))['catch'](_0x59e33b=>{throw console['error'](_0x59e33b),new _0x4842d8('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xf36f2b){const _0x26a36b=this['context']['plugins']['get'](y),_0x27455c=this['getCommentThread'](_0xf36f2b);if(_0x27455c['_isAttached']=!0x1,this['_threadToController']['has'](_0x27455c)){const _0x1cb77d=this['_threadToController']['get'](_0x27455c),_0x2eb615=_0x1cb77d['view'],_0x131a15=_0x26a36b['getByInnerView'](_0x2eb615);this['_threadToController']['delete'](_0x27455c),this['_viewToController']['delete'](_0x2eb615),_0x131a15&&_0x26a36b['remove'](_0x131a15),_0x1cb77d['destroy'](),_0x2eb615['destroy']()['then'](()=>{this['_unbindEditors'](_0x2eb615);});}}['_updateActiveAnnotation']({threadId:_0x562e8e,resolvedAt:_0x4c6d8a,unlinkedAt:_0x57be57}){const _0x464cf8=!!_0x4c6d8a,_0x1f092d=this['context']['plugins']['get'](y),_0x1f9641=this['getCommentThread'](_0x562e8e);if(this['_threadToController']['has'](_0x1f9641)){const _0x3a308c=this['_threadToController']['get'](_0x1f9641)['view'],_0x562ed4=_0x1f092d['getByInnerView'](_0x3a308c);_0x562ed4&&(_0x464cf8&&_0x1f092d['_removeActiveAnnotation'](_0x562ed4),_0x57be57?_0x562ed4['isVisible']=!0x1:_0x562ed4['refreshVisibility']());}}['_getExternalAuthor'](_0xef81cb){const _0x1e6886=this['context']['plugins']['get'](it),_0xa519fb=It('external:'+_0xef81cb),_0xac0125=_0x1e6886['getUser'](_0xa519fb);return _0xac0125||_0x1e6886['addUser']({'id':_0xa519fb,'name':_0xef81cb});}['_createNewComment']({threadId:_0x1814d9,commentId:_0x4dc7e1=_0x144fe1(),content:_0xe131fa,authorId:_0x26ff29,createdAt:_0x3142ff,attributes:_0x23662e}){if('string'!=typeof _0x4dc7e1)throw new _0x4842d8('commentsrepository-invalid-commentid');if('string'!=typeof _0x26ff29)throw new _0x4842d8('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xe131fa||!_0xe131fa['trim']())throw new _0x4842d8('commentsrepository-invalid-comment-content');const _0x412e3e=this['context']['plugins']['get'](it)['getUser'](_0x26ff29);if(!_0x412e3e)throw new _0x4842d8('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x26ff29});let _0x586391=null,_0x19c7e0=_0x3142ff;return _0x23662e?.['@external']&&(_0x586391=this['_getExternalAuthor'](_0x23662e['@external']['authorName']),_0x19c7e0=new Date(_0x23662e['@external']['createdAt'])),new wi(this,{'threadId':_0x1814d9,'id':_0x4dc7e1,'author':_0x586391||_0x412e3e,'creator':_0x412e3e,'content':_0xe131fa,'createdAt':_0x3142ff,'authoredAt':_0x19c7e0,'attributes':_0x23662e});}['_addComment'](_0x4caa40){let {threadId:_0x4c4eca,content:_0x5d5d13,attributes:_0x98ef8f,isFromAdapter:_0x1e8a69}=_0x4caa40;const _0x5d2999=this['getCommentThread'](_0x4caa40['threadId']);if(!_0x5d2999)throw new _0x4842d8('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x34601c=this['_createNewComment'](_0x4caa40),{id:_0x2a3632}=_0x34601c;if(_0x5d2999['_add'](_0x34601c),_0x1e8a69||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5d2999['isSubmitted'])return Promise['resolve']();const _0x3e1a84=this['context']['plugins']['get']('PendingActions'),{channelId:_0x44c186}=_0x5d2999,_0x4c5b1e=_0x3e1a84['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x98ef8f||(_0x98ef8f={}),this['adapter']['addComment']({'channelId':_0x44c186,'threadId':_0x4c4eca,'commentId':_0x2a3632,'content':_0x5d5d13,'attributes':_0x98ef8f})['then'](_0x4be15d=>{_0x3e1a84['remove'](_0x4c5b1e),_0x4be15d&&this['_updateComment']({'channelId':_0x44c186,'threadId':_0x4c4eca,'commentId':_0x2a3632,'createdAt':_0x4be15d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xad54e3=>{throw console['error'](_0xad54e3),new _0x4842d8('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3eb26e,commentId:_0x3c3f96,content:_0x5a57af,createdAt:_0x16a995,attributes:_0xadefd1,isFromAdapter:_0xd5ebb2}){if(void 0x0!==_0x5a57af&&('string'!=typeof _0x5a57af||!_0x5a57af['trim']()['length']))throw new _0x4842d8('commentsrepository-update-comment-invalid-content');const _0x4dfc27=this['getCommentThread'](_0x3eb26e),_0x5f3f35=_0x4dfc27['getComment'](_0x3c3f96);if(!_0x5f3f35)throw new _0x4842d8('commentsrepository-update-missing-comment',this);let _0x48a83e=!0x1;if(_0x5a57af&&_0x5a57af!==_0x5f3f35['content']&&(_0x5f3f35['isEditable']||_0xd5ebb2)&&(_0x5f3f35['content']=_0x5a57af,_0x48a83e=!0x0),_0x16a995&&_0x16a995!==_0x5f3f35['createdAt']&&(_0x5f3f35['createdAt']=_0x16a995,_0x5f3f35['attributes']&&_0x5f3f35['attributes']['@external']||(_0x5f3f35['authoredAt']=_0x16a995),_0x48a83e=!0x0),_0xadefd1&&!At(_0xadefd1,_0x5f3f35['attributes'])&&(_0x5f3f35['attributes']=_0xadefd1,_0x48a83e=!0x0),!_0x48a83e)return Promise['resolve']();if(_0x4dfc27['fire']('commentUpdated'),_0xd5ebb2||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5891dc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5cef4c}=this['getCommentThread'](_0x5f3f35['threadId']),_0x3dc8d4=_0x5891dc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5cef4c,'threadId':_0x3eb26e,'commentId':_0x3c3f96,'content':_0x5a57af,'attributes':_0xadefd1})['then'](()=>_0x5891dc['remove'](_0x3dc8d4))['catch'](_0x373d41=>{throw console['error'](_0x373d41),new _0x4842d8('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x198099,commentId:_0x1255e1,isFromAdapter:_0x2bad09}){const _0x4fa80d=this['getCommentThread'](_0x198099),_0x3b5c9b=_0x4fa80d['getComment'](_0x1255e1);if(!_0x3b5c9b)throw new _0x4842d8('commentsrepository-remove-missing-comment',this);if(_0x4fa80d['_remove'](_0x3b5c9b),_0x2bad09||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x46f269=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3b4d4f}=_0x4fa80d,_0xd1727b=_0x46f269['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3b4d4f,'threadId':_0x198099,'commentId':_0x1255e1})['then'](()=>_0x46f269['remove'](_0xd1727b))['catch'](_0x5cdce4=>{throw console['error'](_0x5cdce4),new _0x4842d8('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x434911(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x9d34fc,_0x33effa){super();const _0xe6e276=_0x9d34fc['context']['plugins']['get'](it)['me'],_0x443597=_0x9d34fc['getCommentThread'](_0x33effa['threadId']),_0xeb5587=0x0===_0x443597['comments']['length'],_0x3dee13=_0xe6e276===_0x33effa['author'];this['id']=_0x33effa['id'],this['threadId']=_0x33effa['threadId'],this['author']=_0x33effa['author'],this['creator']=_0x33effa['creator'],this['isExternal']=Boolean(_0x33effa['attributes']&&_0x33effa['attributes']['@external']),this['set']('content',_0x33effa['content']),this['createdAt']=_0x33effa['createdAt']||new Date(),this['set']('authoredAt',_0x33effa['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x443597,'resolvedAt'),this['set']('attributes',_0x33effa['attributes']||{}),this['bind']('isEditable')['to'](_0x9d34fc,'_permissions',()=>{const _0x349337=_0x9d34fc['getPermissions'](_0x443597['channelId'])['write'],_0x4e2fb8=_0x9d34fc['getPermissions'](_0x443597['channelId'])['modifyAll'];return _0x3dee13&&_0x349337||!_0x3dee13&&_0x4e2fb8;}),this['bind']('isRemovable')['to'](_0x443597,'isRemovable',_0x9d34fc,'_permissions',_0x4456ee=>{const _0x37cc4b=_0x9d34fc['getPermissions'](_0x443597['channelId'])['write'],_0x6fac53=_0x9d34fc['getPermissions'](_0x443597['channelId'])['modifyAll'];return _0x3dee13&&_0x37cc4b||_0x4456ee&&_0xeb5587||!_0x3dee13&&_0x6fac53&&!_0xeb5587;}),this['bind']('isReadOnly')['to'](_0x443597,'isReadOnly'),this['_repository']=_0x9d34fc;}get['weight'](){return Math['max'](function(_0x100de2){const _0x9c54cf=document['createElement']('div');return _0x9c54cf['innerHTML']=_0x100de2,_0x9c54cf['textContent']['length'];}(this['content']),0xc8);}['update'](_0x5333f0){const {threadId:_0x2f4048,id:_0x1e231b}=this;if(!this['_repository']['hasCommentThread'](_0x2f4048))throw new _0x4842d8('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x1ff8ae}=this['_repository']['getCommentThread'](_0x2f4048);this['_repository']['fire'](Nt('updateComment',_0x1ff8ae,_0x2f4048),{'channelId':_0x1ff8ae,'threadId':_0x2f4048,'commentId':_0x1e231b,..._0x5333f0});}['setAttribute'](_0xc3069,_0xd3ce57){const _0xef55a5=wt(this['attributes']);yt(_0xef55a5,_0xc3069,_0xd3ce57),this['update']({'attributes':_0xef55a5});}['removeAttribute'](_0x383024){const _0x157b34=wt(this['attributes']);Ct(_0x157b34,_0x383024),this['update']({'attributes':_0x157b34});}['remove'](_0x17ad8d={}){if(!_0x17ad8d['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4fe5e5,id:_0x37602a}=this;if(!this['_repository']['hasCommentThread'](_0x4fe5e5))throw new _0x4842d8('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1a91b8}=this['_repository']['getCommentThread'](_0x4fe5e5);this['_repository']['fire'](Nt('removeComment',_0x1a91b8,_0x4fe5e5),{'channelId':_0x1a91b8,'threadId':_0x4fe5e5,'commentId':_0x37602a,..._0x17ad8d});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x2a1a7f,..._0x4b2926){for(const _0x201126 of _0x4b2926)void 0x0!==_0x201126&&(_0x2a1a7f+=':'+String(_0x201126));return _0x2a1a7f;}class ot extends _0x5e53d9{constructor(_0x26d4b0){super(_0x26d4b0),this['set']('hasContent',!0x1);}['refresh'](){const _0x33fd96=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xf7dec9 of _0x33fd96['getRanges']())if(this['_hasContent'](_0xf7dec9))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x27d9d3=_0x144fe1(),ranges:_0x24be4b,comment:_0x381f02}={}){const _0xdf486e=this['editor']['model'],_0x561c60=_0x24be4b??Array['from'](_0xdf486e['document']['selection']['getRanges']()),_0x1cd7b2=[];for(const _0x4a594f of _0x561c60)this['_hasContent'](_0x4a594f)&&_0x1cd7b2['push'](this['_trimToContent'](_0x4a594f));if(!_0x1cd7b2['length'])throw new _0x4842d8('addcommentthreadcommand-incorrect-ranges',null);_0x381f02&&this['_createCommentThread'](_0x27d9d3,_0x381f02),this['_createMarkersFromRanges'](_0x27d9d3,_0x1cd7b2,!!_0x381f02);}['_createMarkersFromRanges'](_0x45d11d,_0x4e6bff,_0x3cce06){this['editor']['model']['change'](_0x374bc6=>{for(const _0x28e482 of _0x4e6bff){const _0x27c922=_0x144fe1()['substr'](0x1,0x5),_0x42cae4='comment:'+_0x45d11d+':'+_0x27c922;_0x374bc6['addMarker'](_0x42cae4,{'range':_0x28e482,'usingOperation':_0x3cce06,'affectsData':_0x3cce06});}});}['_createCommentThread'](_0x38bb39,_0x1c3671){const _0x2cc7d0=this['editor']['plugins']['get']('CommentsRepository'),_0x5168f2=this['editor']['config']['get']('collaboration.channelId'),_0x1555b8=this['editor']['plugins']['get']('Users')['me'];if(!_0x1555b8)throw new _0x4842d8('addcommentthreadcommand-user-not-found',null);_0x2cc7d0['addCommentThread']({'threadId':_0x38bb39,'channelId':_0x5168f2,'comments':[{'authorId':_0x1555b8['id'],'content':_0x1c3671,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x549bb3){for(const _0x5e35de of _0x549bb3['getItems']())if(this['_itemIsContent'](_0x5e35de))return!0x0;return!0x1;}['_itemIsContent'](_0x2649df){return _0x2649df['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x2649df)&&!_0x2649df['is']('element','tableCell');}['_trimToContent'](_0x5b5dce){const _0x563aac=_0x338b6e=>!this['_itemIsContent'](_0x338b6e['item']),_0x567539=_0x5b5dce['start']['getLastMatchingPosition'](_0x563aac),_0x228a8f=_0x5b5dce['end']['getLastMatchingPosition'](_0x563aac,{'direction':'backward'});return this['editor']['model']['createRange'](_0x567539,_0x228a8f);}}class b extends _0xa4777{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x517f97){super(_0x517f97),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x531427=this['editor'],_0x5194f0=_0x531427['model']['document']['selection'],_0x31e7f1=_0x5adaa1(()=>this['refreshSelectedViews'](),0xa);_0x5194f0['on']('change:range',(_0x22cf27,_0x28ef94)=>{_0x28ef94['directChange']&&(_0x31e7f1['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x531427['editing']['view']['document'],'change:isFocused',(_0x4ea211,_0x150a57,_0x1b9a66)=>{_0x1b9a66&&_0x31e7f1();}),this['listenTo'](_0x531427['ui']['focusTracker'],'change:isFocused',(_0x4fe911,_0x1d5589,_0x426804)=>{_0x426804||this['fire']('blur',{'isAnnotationTracked':_0x1c9a43=>this['_editorAnnotationsData']['has'](_0x1c9a43['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5a6a64){if(this['_editorAnnotations']['has'](_0x5a6a64['view']))return;this['_editorAnnotations']['add'](_0x5a6a64['view']),this['editor']['ui']['focusTracker']['add'](_0x5a6a64['view']['element']);const _0x222bc8=this['editor']['plugins']['get'](y);this['listenTo'](_0x222bc8['collection'],'remove',(_0x1f463e,_0x3aef45)=>{this['editor']['ui']['focusTracker']['remove'](_0x3aef45['view']['element']),this['_editorAnnotations']['delete'](_0x3aef45['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x584b8b){if('function'!=typeof _0x584b8b)throw new _0x4842d8('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x584b8b);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2b2baa,annotations:_0x39f2ea}){const _0x1ef93d=[],_0x1743eb=this['editor']['model']['document']['selection'],_0x4f9400=Array['from'](_0x1743eb['getRanges']());for(const [_0xf24206,_0x2e20de]of this['_editorAnnotationsData']){const _0x5b522b=_0xda26(_0x2e20de),_0x43b5fe=_0x39f2ea['getByInnerView'](_0xf24206);_0x5b522b&&_0x43b5fe&&_0x1ef93d['push']({'annotation':_0x43b5fe,'range':_0x5b522b});}function _0xda26(_0x440fdd){for(const _0x704e85 of _0x440fdd)for(const _0x3dae62 of _0x4f9400)if(_0x704e85['containsRange'](_0x3dae62,!_0x1743eb['isCollapsed']))return _0x704e85;return null;}return _0x1ef93d['sort']((_0x1f6cd2,_0x10bb10)=>{const _0x511fbe=_0x1f6cd2['range'],_0x503cfb=_0x10bb10['range'];if(!_0x511fbe['isEqual'](_0x503cfb)){if(_0x511fbe['containsRange'](_0x503cfb,!0x0))return 0x1;if(_0x503cfb['containsRange'](_0x511fbe,!0x0))return-0x1;}return _0x1f6cd2['annotation']==_0x2b2baa?-0x1:_0x10bb10['annotation']==_0x2b2baa?0x1:0x0;})['map'](_0x417ad2=>_0x417ad2['annotation']);}get['_editorAnnotationsData'](){const _0x38f3da=new Map();for(const _0x3505e8 of Array['from'](this['_dataCollectors']))for(const [_0x224dd3,_0x98ffd9]of _0x3505e8())_0x38f3da['set'](_0x224dd3,_0x98ffd9);return _0x38f3da;}}class st extends _0xa4777{['afterInit'](){const _0x40061c=this['editor'];if(!_0x40061c['plugins']['has']('RestrictedEditingModeEditing'))return;_0x40061c['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0xa4777{constructor(_0x292861){super(_0x292861),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1cabc9=this['editor'],_0x2bd776=_0x1cabc9['commands']['get']('importWord'),_0x4b060b=_0x1cabc9['plugins']['get'](it);_0x2bd776&&(_0x2bd776['on']('execute',(_0xe54496,[,_0x38087d])=>{_0x38087d['collaboration_features']={'comments':!0x0,'user_id':_0x4b060b['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2bd776,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x44b5f7,_0x5933b3){const {comment_threads:_0x194441}=_0x5933b3;_0x194441&&_0x194441['forEach'](({thread_id:_0x1fe888,comments:_0x3c33c9,is_resolved:_0x32da8e})=>{const _0x2f453c=new Date(),_0x529ae1=_0x3c33c9['map'](({author:_0x106516,content:_0x3011e1,created_at:_0x5c7ff5})=>({'content':_0x3011e1,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2f453c,'attributes':{'@external':{'authorName':_0x106516,'createdAt':_0x5c7ff5?new Date(_0x5c7ff5):new Date(),'source':'importWord'}}})),_0x1b0433=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1b0433,'threadId':_0x1fe888,'comments':_0x529ae1,'resolvedAt':_0x32da8e?_0x2f453c:null});});}}class at extends _0xa4777{constructor(_0x55cacb){super(_0x55cacb),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x1a1709=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1a1709,'contentInsertion',(_0x186425,_0x261eb3)=>this['_removeMarkersWithoutThreads'](_0x261eb3['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x244db2){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x244db2;const _0xa73611=this['editor']['plugins']['get']('CommentsRepository');for(const _0x141370 of _0x244db2['keys']()){const [_0x4ece0b,_0x11b44]=_0x141370['split'](':');'comment'!=_0x4ece0b||_0xa73611['hasCommentThread'](_0x11b44)||_0x244db2['delete'](_0x141370);}return _0x244db2;}['_registerMarkerInClipboardPipeline'](){const _0x41d225=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x380a1e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x380a1e&&_0x41d225['_registerMarkerToCopy']('comment',_0x380a1e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x5bd8ed){switch(_0x5bd8ed){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x95c721){const _0x303628=_0x95c721['split'](':');return{'group':_0x303628[0x0],'id':_0x303628[0x1],'part':_0x303628[0x2]};}class ut extends _0xa4777{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3ee9a1,_0x1df87c)=>{if(!_0x1df87c['options']['showCommentHighlights'])return null;if(_0x1df87c['options']['ignoreResolvedComments']){const {id:_0x561352}=ft(_0x3ee9a1['markerName']),_0xac99=this['editor']['plugins']['get'](o);if(_0xac99['getCommentThread'](_0x561352)?.['isResolved']&&_0x3ee9a1['item'])return _0x1df87c['consumable']['consume'](_0x3ee9a1['item'],'addMarker:'+_0x3ee9a1['markerName']),_0x1df87c['consumable']['consume'](_0x3ee9a1['item'],'removeMarker:'+_0x3ee9a1['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x536fa3=>{_0x536fa3['on']('addMarker:comment',(_0x52c8e4,_0x2ab084,_0x2e3bb5)=>{if(!_0x2e3bb5['options']['showCommentHighlights'])return;const _0x5d6cd0=_0x2ab084['item'];if(!_0x5d6cd0)return;const _0x56f907=_0x2e3bb5['mapper']['toViewElement'](_0x5d6cd0);this['editor']['model']['schema']['isObject'](_0x5d6cd0)&&_0x56f907&&!_0x56f907['getCustomProperty']('widget')&&_0x56f907['is']('containerElement')&&_0x2e8f4b(_0x56f907,_0x2e3bb5['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4d90ee,{writer:_0x535a97,options:_0xcc69d1})=>{if(!_0xcc69d1['showCommentHighlights'])return null;const _0x5bb350=_0x535a97['createContainerElement']('div'),_0x320740=_0x535a97['createEmptyElement']('hr');return _0x535a97['addClass']('ck-horizontal-line',_0x5bb350),_0x535a97['insert'](_0x535a97['createPositionAt'](_0x5bb350,0x0),_0x320740),_0x5bb350;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x24944a,{writer:_0x45d0c9,options:_0x49b4fb})=>{if(!_0x49b4fb['showCommentHighlights'])return null;const _0x54a4c7=_0x45d0c9['createContainerElement']('span'),_0x1c668c=_0x45d0c9['createEmptyElement']('img');return _0x45d0c9['addClass']('image-inline',_0x54a4c7),_0x45d0c9['insert'](_0x45d0c9['createPositionAt'](_0x54a4c7,0x0),_0x1c668c),_0x54a4c7;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3a43ef,{writer:_0x104c2e,options:_0x366587})=>{if(_0x366587['showCommentHighlights'])return _0x104c2e['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x41d38a,_0x452473,_0x42070b)=>{_0x42070b['options']['showCommentHighlights']&&_0x41d38a['stop']();},{'priority':'high'});}}class r extends _0xa4777{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20e149){super(_0x20e149),this['set']('isThreadsLoadingPaused',!0x0),_0x20e149['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4a769a,_0x291114,_0x310a86,_0x1dcb12)=>{const _0x31dd03=_0x20e149['plugins']['get'](o),_0x3084b7=_0x310a86?ft(_0x310a86)['id']:null;_0x20e149['model']['change'](()=>{if(_0x3084b7){const _0x51355d=this['getAllMarkersForId'](_0x3084b7);for(const _0x14afc6 of _0x51355d)_0x20e149['editing']['reconvertMarker'](_0x14afc6);}if(_0x1dcb12){const {id:_0x5e49e3}=ft(_0x1dcb12),_0x49c8ef=_0x31dd03['getCommentThread'](_0x5e49e3);if(_0x49c8ef&&_0x49c8ef['unlinkedAt'])return;if(_0x49c8ef&&!_0x49c8ef['isAttached'])return;const _0x419413=this['getAllMarkersForId'](_0x5e49e3);for(const _0x2f24ce of _0x419413)_0x20e149['editing']['reconvertMarker'](_0x2f24ce);}}),_0x3084b7&&this['scrollToThreadMarker'](_0x3084b7);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x505aba=this['editor'],_0x1b1af3=_0x505aba['plugins']['get'](o),_0x1434b3=_0x505aba['config']['get']('collaboration.channelId'),_0x12194a=_0x1b1af3['getCommentThreads']()['filter'](_0x3d90a5=>_0x3d90a5['channelId']!==_0x1434b3);_0x505aba['commands']['add']('addCommentThread',new ot(_0x505aba)),this['listenTo'](_0x505aba,'change:isReadOnly',(_0x446cba,_0x5975bc,_0x185eec)=>{_0x1b1af3['switchReadOnly'](_0x185eec,_0x505aba['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1b1af3,dt('addCommentThread',_0x1434b3),(_0x4538b1,{threadId:_0x276f6d})=>{const _0x5a6328=this['editor']['plugins']['get'](o)['getCommentThread'](_0x276f6d);_0x5a6328?.['unlinkedAt']&&this['_attachArchivedThread'](_0x276f6d);}),this['listenTo'](_0x1b1af3,dt('removeCommentThread',_0x1434b3),(_0x1bca36,{threadId:_0x296831})=>{_0x505aba['model']['enqueueChange']({'isUndoable':!0x1},_0x534f17=>{const _0x4216e8=this['getAllMarkersForId'](_0x296831);for(const _0x25dcd0 of _0x4216e8)_0x534f17['removeMarker'](_0x25dcd0);});}),this['listenTo'](_0x1b1af3,dt('resolveCommentThread',_0x1434b3),(_0x31c1f2,{threadId:_0x26a183})=>{(this['_reconvertMarkers'](_0x26a183),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x26a183)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1b1af3,dt('reopenCommentThread',_0x1434b3),(_0x70a45e,{threadId:_0x1b98bc})=>{this['_reconvertMarkers'](_0x1b98bc);},{'priority':'low'}),this['listenTo'](_0x1b1af3,dt('addComment',_0x1434b3),(_0xc2366a,{threadId:_0x4cbb89,isFromAdapter:_0x1136f9})=>{const _0x2c8723=this['getAllMarkersForId'](_0x4cbb89);if(_0x1136f9||0x0==_0x2c8723['length']||!_0x1b1af3['hasCommentThread'](_0x4cbb89))return;0x1===_0x1b1af3['getCommentThread'](_0x4cbb89)['length']&&_0x505aba['model']['enqueueChange']({'isUndoable':!0x1},_0x29a158=>{for(const _0x4a97f6 of _0x2c8723)_0x29a158['updateMarker'](_0x4a97f6,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x12194a);}['afterInit'](){!async function(_0x9e447){const _0x2beae9=_0xe42463([0x39,0x64,0x6c,0x79,0x38,0x4b,0x37,0x7a,0x4e,0x66,0x63,0x65,0x51,0x44,0x41,0x42,0x4f,0x61,0x77,0x67,0x35,0x78,0x53,0x70,0x71,0x33,0x32,0x6e,0x47,0x30,0x6a,0x4a,0x62,0x58,0x54,0x50,0x6d,0x56,0x59,0x52,0x31,0x45,0x49,0x34,0x75,0x43,0x4d,0x76,0x55,0x69,0x6b,0x72,0x74,0x5a,0x73,0x48,0x46,0x4c,0x68,0x36,0x6f,0x57]),_0x294ac9=0x455e5c9f,_0x59d2e0=0x455933cf^_0x294ac9,_0x498b00=window[_0xe42463([0x44,0x61,0x74,0x65])][_0xe42463([0x6e,0x6f,0x77])](),_0x5f04ef=_0x9e447[_0xe42463([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x364199=new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x49a383=>{_0x5f04ef[_0xe42463([0x6f,0x6e,0x63,0x65])](_0xe42463([0x72,0x65,0x61,0x64,0x79]),_0x49a383);}),_0x459b98={[_0xe42463([0x6b,0x74,0x79])]:_0xe42463([0x45,0x43]),[_0xe42463([0x75,0x73,0x65])]:_0xe42463([0x73,0x69,0x67]),[_0xe42463([0x63,0x72,0x76])]:_0xe42463([0x50,0x2d,0x32,0x35,0x36]),[_0xe42463([0x78])]:_0xe42463([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]),[_0xe42463([0x79])]:_0xe42463([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]),[_0xe42463([0x61,0x6c,0x67])]:_0xe42463([0x45,0x53,0x32,0x35,0x36])},_0x1af692=_0x5f04ef[_0xe42463([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xe42463([0x67,0x65,0x74])](_0xe42463([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x336f75(){let _0x580639,_0x441f09=null,_0xf1f84b=null;try{if(_0x1af692==_0xe42463([0x47,0x50,0x4c]))return _0xe42463([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x580639=_0x48d974(),!_0x580639)return _0xe42463([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x580639[_0xe42463([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xf1f84b=_0x4b7c69(_0x580639[_0xe42463([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x580639[_0xe42463([0x6a,0x74,0x69])])),await _0xc5a36b()?_0x168a20()?_0x339a02()?_0xe42463([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x573562()?(_0x580639[_0xe42463([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xe42463([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x441f09=_0x1373d7(_0xe42463([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x580639[_0xe42463([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xe42463([0x74,0x72,0x69,0x61,0x6c])&&(_0x441f09=_0x1373d7(_0xe42463([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5e013c()):_0xe42463([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xe42463([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xe42463([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xe42463([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x339a02(){const _0x37ab60=[_0xe42463([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xe42463([0x74,0x72,0x69,0x61,0x6c])][_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x580639[_0xe42463([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x498b00/0x3e8:0xe10*_0x59d2e0;return _0x580639[_0xe42463([0x65,0x78,0x70])]<_0x37ab60;}function _0x168a20(){const _0x2e2214=_0x580639[_0xe42463([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2e2214)return!0x1;if(_0x2e2214[_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe42463([0x2a])))return!0x0;if(_0x2e2214[_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe42463([0x43,0x4d,0x54])))return!0x0;if(_0x2e2214[_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe42463([0x52,0x43,0x4d,0x54]))){if(_0x2c6ca0())return!0x0;if(_0x55dde2()||_0x323d44())return!0x0;}return!0x1;}function _0x573562(){const _0x39b6cf=_0x580639[_0xe42463([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x39b6cf||0x0==_0x39b6cf[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1a0a17}=new URL(window[_0xe42463([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x39b6cf[_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a0a17))return!0x0;const _0xaba4c4=_0x1a0a17[_0xe42463([0x73,0x70,0x6c,0x69,0x74])](_0xe42463([0x2e]));return _0x39b6cf[_0xe42463([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b98d3=>_0x5b98d3[_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe42463([0x2a])))[_0xe42463([0x6d,0x61,0x70])](_0x32ee6e=>_0x32ee6e[_0xe42463([0x73,0x70,0x6c,0x69,0x74])](_0xe42463([0x2e])))[_0xe42463([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x51a92a=>_0x51a92a[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xaba4c4[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xe42463([0x6d,0x61,0x70])](_0x4df6fb=>Array(_0xaba4c4[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4df6fb[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xe42463([0x66,0x69,0x6c,0x6c])](_0x4df6fb[0x0]===_0xe42463([0x2a])?_0xe42463([0x2a]):'')[_0xe42463([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4df6fb))[_0xe42463([0x73,0x6f,0x6d,0x65])](_0x41a87e=>_0xaba4c4[_0xe42463([0x65,0x76,0x65,0x72,0x79])]((_0x26d681,_0x24d3cc)=>_0x41a87e[_0x24d3cc]===_0x26d681||_0x41a87e[_0x24d3cc]===_0xe42463([0x2a])));}function _0x5e013c(){return _0x441f09&&_0xf1f84b?new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xfecf39,_0x10554f)=>{_0x441f09[_0xe42463([0x74,0x68,0x65,0x6e])](_0xfecf39,_0x10554f),_0xf1f84b[_0xe42463([0x74,0x68,0x65,0x6e])](_0x50e7e2=>{_0x50e7e2!=_0xe42463([0x56,0x61,0x6c,0x69,0x64])&&_0xfecf39(_0x50e7e2);},_0x10554f);}):_0x441f09||_0xf1f84b||_0xe42463([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4b7c69(_0x164ccb,_0x3d0aa3){return new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3797d2=>{if(_0x2d9edd())return _0x3797d2(_0xe42463([0x56,0x61,0x6c,0x69,0x64]));_0x18969(),_0x5f04ef[_0xe42463([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xe42463([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1991f1=!0x1;const _0x59777d=_0x144fe1();function _0x4e9412(_0x378c16){return!!_0x378c16&&(typeof _0x378c16===_0xe42463([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x378c16===_0xe42463([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x378c16[_0xe42463([0x74,0x68,0x65,0x6e])]===_0xe42463([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x378c16[_0xe42463([0x63,0x61,0x74,0x63,0x68])]===_0xe42463([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1474ec(_0x2f0f57){_0x1694f8(_0x2f0f57)[_0xe42463([0x74,0x68,0x65,0x6e])](_0x2286f5=>{if(!_0x2286f5||_0x2286f5[_0xe42463([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xe42463([0x6f,0x6b]))return _0xe42463([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1b5dc0(_0x49cade(_0x59777d+_0x3d0aa3))!=_0x2286f5[_0xe42463([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xe42463([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xe42463([0x56,0x61,0x6c,0x69,0x64]);})[_0xe42463([0x74,0x68,0x65,0x6e])](_0xdd5097=>(_0x5ee84e(),_0xdd5097),()=>{const _0x22e4e0=_0x3be6ff();return null==_0x22e4e0?(_0x5ee84e(),_0xe42463([0x56,0x61,0x6c,0x69,0x64])):_0xe42463(_0x498b00-_0x22e4e0>(0x6152d89f^_0x294ac9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xe42463([0x74,0x68,0x65,0x6e])](_0x3797d2)[_0xe42463([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3797d2(_0xe42463([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x473bfe=0x4568b21f^_0x294ac9;function _0x5ee84e(){const _0x2f3cbd=_0xe42463([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b5dc0(_0x49cade(_0x164ccb)),_0x34cf51=_0x5cd2d4(_0x1b5dc0(window[_0xe42463([0x4d,0x61,0x74,0x68])][_0xe42463([0x63,0x65,0x69,0x6c])](_0x498b00/_0x473bfe)));window[_0xe42463([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xe42463([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f3cbd,_0x34cf51);}function _0x3be6ff(){const _0x4be979=_0xe42463([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b5dc0(_0x49cade(_0x164ccb)),_0x4cb5c1=window[_0xe42463([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xe42463([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4be979);return _0x4cb5c1?window[_0xe42463([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5cd2d4(_0x4cb5c1),0x10)*_0x473bfe:null;}function _0x1694f8(_0x477d2b){return new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2af40f,_0x3e8fb9)=>{_0x477d2b[_0xe42463([0x74,0x68,0x65,0x6e])](_0x2af40f,_0x3e8fb9),window[_0xe42463([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3e8fb9,0x455f885f^_0x294ac9);});}}_0x5f04ef[_0xe42463([0x6f,0x6e])](_0xe42463([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x861307,_0x1cc036)=>{if(_0x1cc036[0x0]!=_0x164ccb)return _0x3797d2(_0xe42463([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1cc036[0x1]={..._0x1cc036[0x1],[_0xe42463([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x59777d};},{[_0xe42463([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xe42463([0x68,0x69,0x67,0x68])}),_0x5f04ef[_0xe42463([0x6f,0x6e])](_0xe42463([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2d3c7b=>{_0x4e9412(_0x2d3c7b[_0xe42463([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1991f1=!0x0,_0x1474ec(_0x2d3c7b[_0xe42463([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xe42463([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xe42463([0x6c,0x6f,0x77])}),_0x364199[_0xe42463([0x74,0x68,0x65,0x6e])](()=>{_0x1991f1||_0x3797d2(_0xe42463([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2d9edd(){return _0x5f04ef[_0xe42463([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xe42463([0x76,0x69,0x65,0x77])][_0xe42463([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xe42463([0x61,0x75,0x74,0x6f]);}function _0x18969(){_0x5f04ef[_0xe42463([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xe42463([0x76,0x69,0x65,0x77])][_0xe42463([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xe42463([0x61,0x75,0x74,0x6f]);}}function _0x1373d7(_0x170bad){const _0x4a68a5=[new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ddfb2=>setTimeout(_0x3ddfb2,0x45576253^_0x294ac9)),_0x364199[_0xe42463([0x74,0x68,0x65,0x6e])](()=>new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x870ed2=>{let _0x12c44e=0x0;_0x5f04ef[_0xe42463([0x6d,0x6f,0x64,0x65,0x6c])][_0xe42463([0x6f,0x6e])](_0xe42463([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x48e9cc,_0x1ab7ad)=>{_0x1ab7ad[0x0][_0xe42463([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x12c44e++,_0x12c44e==(0x455e5d67^_0x294ac9)&&(_0x870ed2(),_0x48e9cc[_0xe42463([0x6f,0x66,0x66])]());});}))];return window[_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xe42463([0x72,0x61,0x63,0x65])](_0x4a68a5)[_0xe42463([0x74,0x68,0x65,0x6e])](()=>_0x170bad);}async function _0x2d1bf5(){await _0x364199,_0x5f04ef[_0xe42463([0x6d,0x6f,0x64,0x65,0x6c])][_0xe42463([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5d69c6,_0x5f04ef[_0xe42463([0x6d,0x6f,0x64,0x65,0x6c])][_0xe42463([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5d69c6,_0x5f04ef[_0xe42463([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xe42463([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2c6ca0(){return _0x45d035(_0xe42463([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3f7af2(_0xe42463([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xe42463([0x73,0x74,0x61,0x74,0x65])]==_0xe42463([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x55dde2(){return _0x45d035(_0xe42463([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 _0x323d44(){return _0x45d035(_0xe42463([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xe2d630(_0x1ae038){const _0x5551ba=_0x4b5bb1();_0x5f04ef[_0x5551ba]=_0xe42463([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1ae038,_0x1ae038!=_0xe42463([0x56,0x61,0x6c,0x69,0x64])&&_0x2d1bf5();}function _0x4b5bb1(){const _0x169c2b=window[_0xe42463([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xe42463([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xe42463([0x6e,0x6f,0x77])]())[_0xe42463([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xe42463([0x2e]),'');let _0x45506f=_0xe42463([0x64]);for(let _0x10439a=0x0;_0x10439a<_0x169c2b[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x10439a+=0x2){let _0x9ec749=window[_0xe42463([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x169c2b[_0xe42463([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x10439a,_0x10439a+0x2));_0x9ec749>=_0x2beae9[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x9ec749-=_0x2beae9[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x45506f+=_0x2beae9[_0x9ec749];}return _0x45506f;}function _0x48d974(){const _0x55e9e2=_0x1af692[_0xe42463([0x73,0x70,0x6c,0x69,0x74])](_0xe42463([0x2e]));if(0x3!=_0x55e9e2[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x208298(_0x55e9e2[0x1]);function _0x208298(_0x4812c9){const _0x57579b=_0x4f19c6(_0x4812c9);return _0x57579b&&_0x34aea5()?_0x57579b:null;function _0x34aea5(){const _0x117ff8=_0x57579b[_0xe42463([0x6a,0x74,0x69])],_0x5ddde8=window[_0xe42463([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x117ff8[_0xe42463([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x117ff8[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x417a10={..._0x57579b,[_0xe42463([0x6a,0x74,0x69])]:_0x117ff8[_0xe42463([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x117ff8[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x417a10[_0xe42463([0x76,0x63])],_0x49cade(_0x417a10)==_0x5ddde8;}}}async function _0xc5a36b(){let _0x565f07=!0x0;try{const _0x251b61=_0x1af692[_0xe42463([0x73,0x70,0x6c,0x69,0x74])](_0xe42463([0x2e])),[_0x1676d6,_0x51d0b2,_0x4c6df7]=_0x251b61;return _0x1c7249(_0x1676d6),await _0x50fba9(_0x1676d6,_0x51d0b2,_0x4c6df7),_0x565f07;}catch{return!0x1;}function _0x1c7249(_0x437d1e){const _0x22ffe3=_0x4f19c6(_0x437d1e);_0x22ffe3&&_0x22ffe3[_0xe42463([0x61,0x6c,0x67])]==_0xe42463([0x45,0x53,0x32,0x35,0x36])||(_0x565f07=!0x1);}async function _0x50fba9(_0x569b0f,_0x40cebc,_0x5ceae4){const _0x43cb69=window[_0xe42463([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xe42463([0x66,0x72,0x6f,0x6d])](_0x5d2b14(_0x5ceae4),_0x4b9a95=>_0x4b9a95[_0xe42463([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x54ba85=new window[(_0xe42463([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xe42463([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x569b0f+_0xe42463([0x2e])+_0x40cebc),_0x80e59d=window[_0xe42463([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xe42463([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x80e59d)return;const _0x45f50a=await _0x80e59d[_0xe42463([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xe42463([0x6a,0x77,0x6b]),_0x459b98,{[_0xe42463([0x6e,0x61,0x6d,0x65])]:_0xe42463([0x45,0x43,0x44,0x53,0x41]),[_0xe42463([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xe42463([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xe42463([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x80e59d[_0xe42463([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xe42463([0x6e,0x61,0x6d,0x65])]:_0xe42463([0x45,0x43,0x44,0x53,0x41]),[_0xe42463([0x68,0x61,0x73,0x68])]:{[_0xe42463([0x6e,0x61,0x6d,0x65])]:_0xe42463([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x45f50a,_0x43cb69,_0x54ba85)||(_0x565f07=!0x1);}}function _0x4f19c6(_0x5c8af1){return _0x5c8af1[_0xe42463([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xe42463([0x65,0x79]))?JSON[_0xe42463([0x70,0x61,0x72,0x73,0x65])](_0x5d2b14(_0x5c8af1)):null;}function _0x5d2b14(_0x41da9c){return window[_0xe42463([0x61,0x74,0x6f,0x62])](_0x41da9c[_0xe42463([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xe42463([0x2b]))[_0xe42463([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xe42463([0x2f])));}function _0x49cade(_0x440a58){let _0x163d0f=0x1505;function _0x62a177(_0x388452){for(let _0x50437f=0x0;_0x50437f<_0x388452[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x50437f++){const _0xf95ee5=_0x388452[_0xe42463([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x50437f);_0x163d0f=(_0x163d0f<<0x5)+_0x163d0f+_0xf95ee5,_0x163d0f&=_0x163d0f;}}function _0x443d0a(_0x482fb1){Array[_0xe42463([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x482fb1)?_0x482fb1[_0xe42463([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x443d0a):_0x482fb1&&typeof _0x482fb1==_0xe42463([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xe42463([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x482fb1)[_0xe42463([0x73,0x6f,0x72,0x74])]()[_0xe42463([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x50b951,_0x34ab2f])=>{_0x62a177(_0x50b951),_0x443d0a(_0x34ab2f);}):_0x62a177(window[_0xe42463([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x482fb1));}return _0x443d0a(_0x440a58),_0x163d0f>>>0x0;}function _0x1b5dc0(_0xb649b5){return _0xb649b5[_0xe42463([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xe42463([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xe42463([0x30]));}function _0x5cd2d4(_0x31dd7a){return _0x31dd7a[_0xe42463([0x73,0x70,0x6c,0x69,0x74])]('')[_0xe42463([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xe42463([0x6a,0x6f,0x69,0x6e])]('');}function _0x45d035(_0x40ab5b){return _0x5f04ef[_0xe42463([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xe42463([0x68,0x61,0x73])](_0x40ab5b);}function _0x3f7af2(_0x3f0c16){return _0x5f04ef[_0xe42463([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xe42463([0x67,0x65,0x74])](_0x3f0c16);}function _0x5d69c6(){}function _0xe42463(_0x6d1207){return _0x6d1207['map'](_0x508441=>String['fromCharCode'](_0x508441))['join']('');}_0xe2d630(await _0x336f75());}(this);}['destroy'](){const _0x126a77=this['editor']['plugins']['get'](o),_0x434700=this['editor']['config']['get']('collaboration.channelId');for(const _0x4c4d06 of _0x126a77['getCommentThreads']({'channelId':_0x434700}))_0x126a77['_detachCommentThread'](_0x4c4d06['id']),_0x126a77['_threads']['delete'](_0x4c4d06['id']);super['destroy']();}['hasMarkerForId'](_0x269bbd){return this['getAllMarkersForId'](_0x269bbd)['length']>0x0;}['getAllMarkersForId'](_0x30d287){const _0x95269d=[];for(const _0x2aff32 of this['editor']['model']['markers'])_0x2aff32['name']['startsWith']('comment:'+_0x30d287)&&_0x95269d['push'](_0x2aff32);return _0x95269d;}['scrollToThreadMarker'](_0xa7bf1d){setTimeout(()=>{const _0x575270=this['_getTargetForId'](_0xa7bf1d);if(!_0x575270)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0xa7bf1d&&nt({'target':_0x575270[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2eac8e){this['editor']['model']['change'](()=>{for(const _0x593213 of this['getAllMarkersForId'](_0x2eac8e))this['editor']['editing']['reconvertMarker'](_0x593213);});}['_attachArchivedThread'](_0x47cd41){const _0x550f3e=this['editor']['plugins']['get'](o),_0x8d485d=this['editor']['plugins']['get'](b),_0x30658c=_0x550f3e['getCommentThread'](_0x47cd41);if(!_0x30658c['isAttached']){const _0x4a5853=_0x30658c['attachTo'](()=>this['_getTargetForId'](_0x30658c['id']));_0x8d485d['registerAnnotation'](_0x4a5853),_0x30658c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x130055=this['editor'],_0x1be1e2=_0x130055['plugins']['get'](it);_0x130055['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x51811e,_0x430eea)=>{const {id:_0xac996a}=ft(_0x51811e['markerName']),_0x3f135c=_0x130055['plugins']['get'](o)['getCommentThread'](_0xac996a),_0x597145=this['activeMarker']&&ft(this['activeMarker'])['id']===_0xac996a;let _0x29e375;if(_0x3f135c&&_0x3f135c['isResolved']&&!_0x597145&&_0x51811e['item'])return _0x430eea['consumable']['consume'](_0x51811e['item'],'addMarker:'+_0x51811e['markerName']),_0x430eea['consumable']['consume'](_0x51811e['item'],'removeMarker:'+_0x51811e['markerName']),null;const _0x594d46=['ck-comment-marker'];return _0x597145&&_0x594d46['push']('ck-comment-marker--active'),_0x29e375=_0x3f135c?.['length']?_0x3f135c['comments']['first']['author']['id']:_0x1be1e2['me']['id'],{'classes':_0x594d46,'attributes':{'data-comment':_0xac996a,'data-author-id':_0x29e375}};}}),_0x130055['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x18afb3,{options:_0x27995a})=>{if(_0x27995a['showCommentHighlights'])return null;const _0xf53a08=_0x130055['plugins']['get'](o),_0x480b27=_0x130055['model']['markers']['get'](_0x18afb3),{id:_0x45c792,part:_0x21c80e}=ft(_0x18afb3);return _0x480b27&&!_0x480b27['affectsData']||_0x27995a['ignoreResolvedComments']&&_0xf53a08['getCommentThread'](_0x45c792)?.['isResolved']?null:{'group':'comment','name':_0x21c80e?_0x45c792+':'+_0x21c80e:_0x45c792};}}),_0x130055['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5dd9a4,{writer:_0x4fb33f})=>_0x4fb33f['createElement']('$marker',{'data-name':'comment:'+_0x5dd9a4['getAttribute']('id')})}),_0x130055['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3c3bd8=this['editor'],_0x565bb0=_0x3c3bd8['plugins']['get'](o),_0x1b863b=new Set(),_0x27db78=new Set();_0x3c3bd8['model']['document']['registerPostFixer'](_0x5b15e7=>{let _0x532efd=!0x1;for(const {name:_0x1717ee,data:_0x564585}of _0x3c3bd8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x8cb679,id:_0x935602}=ft(_0x1717ee);let _0x48ed1d=_0x564585['newRange'];if('comment'!==_0x8cb679||!_0x48ed1d)continue;const _0x4d637c='$graveyard'===_0x48ed1d['root']['rootName'];_0x4d637c||(_0x48ed1d=ht(_0x48ed1d,_0x3c3bd8['model']),!_0x48ed1d||_0x48ed1d['isCollapsed']||!_0x564585['newRange']||_0x48ed1d['isEqual'](_0x564585['newRange']))?_0x3c3bd8['model']['hasContent'](_0x48ed1d)&&!_0x4d637c?this['isThreadsLoadingPaused']?_0x1b863b['add'](_0x1717ee):this['_handleThreadMarker'](_0x1717ee,_0x935602):(_0x27db78['add'](_0x1717ee),_0x1b863b['delete'](_0x1717ee),_0x5b15e7['removeMarker'](_0x1717ee),_0x532efd=!0x0):(_0x5b15e7['updateMarker'](_0x1717ee,{'range':_0x48ed1d}),_0x532efd=!0x0);}return _0x532efd;}),this['on']('change:isThreadsLoadingPaused',(_0x2e8e26,_0x3b504c,_0x302417)=>{if(!_0x302417&&_0x1b863b['size'])for(const _0x1df183 of _0x1b863b){const {id:_0x249084}=ft(_0x1df183);_0x1b863b['delete'](_0x1df183),_0x3c3bd8['model']['markers']['get'](_0x1df183)&&this['_handleThreadMarker'](_0x1df183,_0x249084);}}),this['listenTo'](_0x3c3bd8['model']['document'],'change',()=>{for(const {name:_0x383081,data:{newRange:_0x3fd130}}of _0x3c3bd8['model']['document']['differ']['getChangedMarkers']()){const {group:_0xa5206d,id:_0x527d20}=ft(_0x383081);if('comment'!==_0xa5206d)continue;const _0x3c846b=_0x565bb0['getCommentThread'](_0x527d20),_0x66e7b3=this['hasMarkerForId'](_0x527d20);_0x3c846b&&(!_0x3c846b['_hasTargetInContent']&&_0x3fd130&&_0x3c3bd8['editing']['view']['once']('render',()=>{const _0x7f8d34=_0x3c3bd8['plugins']['get'](y),_0x36c59a=_0x565bb0['_threadToController']['get'](_0x3c846b)['view'];_0x7f8d34['getByInnerView'](_0x36c59a)['refreshVisibility']();},{'priority':'low'}),_0x3c846b['_hasTargetInContent']=_0x66e7b3||!!_0x3fd130),_0x3fd130||(_0x27db78['add'](_0x383081),_0x1b863b['delete'](_0x383081));}for(const _0x6b0df0 of _0x27db78){const {id:_0xde62b2}=ft(_0x6b0df0),_0x5ea818=_0x565bb0['getCommentThread'](_0xde62b2);if(_0x1b863b['delete'](_0x6b0df0),!_0x5ea818)continue;const _0x46a448=this['hasMarkerForId'](_0xde62b2);_0x46a448||_0x5ea818['isSubmitted']?_0x46a448||_0x5ea818['unlinkedAt']||_0x5ea818['setUnlinkedAt'](new Date()):_0x5ea818['remove']();}_0x27db78['clear']();});}['_handleInitialThreads'](_0x25ba5a){_0x25ba5a['forEach'](_0x211df6=>{_0x211df6['unlinkedAt']&&this['_attachArchivedThread'](_0x211df6['id']);});}['_getTargetForId'](_0x13669d){const _0x3989be=this['editor'],_0x2b3f28=this['getAllMarkersForId'](_0x13669d);return et(_0x3989be['editing'],_0x2b3f28);}['_getTextContext'](_0x4eed0c){const _0x3496ea=this['getAllMarkersForId'](_0x4eed0c);let _0x11eb10='',_0xa9e986=!0x1;for(const _0x2e81fd of _0x3496ea){const _0x520825=_0x2e81fd['getRange']();for(const _0x244fcb of Array['from'](_0x520825['getItems']()))_0x244fcb['is']('$textProxy')?(_0x11eb10&&_0xa9e986&&(_0x11eb10+='\x20',_0xa9e986=!0x1),_0x11eb10+=_0x244fcb['data']):_0xa9e986=!0x0;_0xa9e986=!0x0;}return _0x11eb10['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2d21d0,_0x378509){const _0x42fa07=this['editor'],_0x222aac=_0x42fa07['plugins']['get'](o);let _0x20bf03=_0x222aac['getCommentThread'](_0x378509);const _0x3d2fae=_0x42fa07['config']['get']('collaboration.channelId'),_0x5c50d7=_0x42fa07['plugins']['get'](b);if(_0x20bf03&&(_0x20bf03['unlinkedAt']&&_0x20bf03['setUnlinkedAt'](null),_0x20bf03['isAttached']))return _0x20bf03;return!this['getAllMarkersForId'](_0x378509)[0x0]['managedUsingOperations']?_0x42fa07['editing']['view']['once']('render',()=>{if(_0x222aac['getCommentThread'](_0x378509))return;const _0x1c0005=_0x42fa07['plugins']['get'](y);_0x20bf03=_0x222aac['openNewCommentThread']({'channelId':_0x3d2fae,'threadId':_0x378509,'target':()=>this['_getTargetForId'](_0x378509),'context':{'type':'text','value':this['_getTextContext'](_0x378509)}});const _0x5b57be=_0x222aac['_threadToController']['get'](_0x20bf03)['view'],_0x1f71ff=_0x1c0005['getByInnerView'](_0x5b57be);_0x1f71ff&&_0x5c50d7['registerAnnotation'](_0x1f71ff);},{'priority':'low'}):_0x222aac['fetchCommentThread']({'channelId':_0x3d2fae,'threadId':_0x378509})['then'](_0x448bcf=>{if('destroyed'!==_0x42fa07['state']){if(_0x20bf03=_0x448bcf,_0x20bf03&&!_0x20bf03['isAttached']){const _0x8619cf=_0x20bf03['attachTo'](()=>this['_getTargetForId'](_0x378509));_0x5c50d7['registerAnnotation'](_0x8619cf),_0x20bf03['isResolved']&&this['_reconvertMarkers'](_0x378509);}else{if(!_0x20bf03){const _0x56bf38=this['getAllMarkersForId'](_0x378509);_0x42fa07['model']['change'](_0x25f287=>{for(const _0x1854c2 of _0x56bf38)_0x25f287['removeMarker'](_0x1854c2);});}}}}),_0x20bf03;}['_handleThreadMarker'](_0x34a339,_0x483097){const _0x21441d=this['_attachMarkerToThread'](_0x34a339,_0x483097);_0x21441d&&!_0x21441d['context']&&_0x21441d['setContext']({'type':'text','value':this['_getTextContext'](_0x483097)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5ccf23=this['editor'];rt(_0x5ccf23['model'],({left:_0x3e59d,entered:_0x3eaff8})=>{for(const _0x8b980b of _0x3e59d)if(mt(_0x8b980b)){_0x5ccf23['ui']['ariaLiveAnnouncer']['announce'](N(_0x5ccf23['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x524089 of _0x3eaff8)if(mt(_0x524089)){_0x5ccf23['ui']['ariaLiveAnnouncer']['announce'](N(_0x5ccf23['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x23d791)));break;}});}}function dt(_0xd99e6c,_0x2b328d){return _0x2b328d?_0xd99e6c+':'+_0x2b328d:_0xd99e6c;}function ht(_0x5834f0,_0x5a973b){const _0x43ea56=_0x5a973b['schema'],_0x434f15=_0x5a973b['createRange'](_0x5834f0['start']);for(const _0x20a6cf of _0x5834f0['getWalker']()){const {type:_0x4d65f9,item:_0x30ad36,nextPosition:_0x3a014f}=_0x20a6cf;if('text'===_0x4d65f9||_0x43ea56['isObject'](_0x30ad36)){const _0x46e69f=_0x5a973b['createPositionBefore'](_0x30ad36);_0x434f15['isCollapsed']&&(_0x434f15['start']=_0x46e69f),_0x434f15['end']=_0x3a014f;}}return _0x434f15;}function mt(_0x4d32dd){return'comment'===ft(_0x4d32dd['name'])['group'];}class s extends _0xa4777{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x26d304=this['editor'],_0x52cfe4=_0x26d304['plugins']['get'](o),_0x409524=_0x26d304['plugins']['get'](r),_0x52b1cd=_0x26d304['plugins']['get'](y),_0xb3f002=_0x26d304['plugins']['get'](b);_0x26d304['ui']['componentFactory']['add']('comment',()=>{const _0x3cef17=this['_createUIButton'](_0x4373f8);return _0x3cef17['tooltip']=!0x0,_0x3cef17;}),_0x26d304['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1f2dd5)),_0xb3f002['addSourceCollector'](()=>{const _0x23bdc6=[];for(const [_0xf5d99,_0x5456f4]of _0x52cfe4['_threadToController']){const _0x27a25a=_0x409524['getAllMarkersForId'](_0xf5d99['id']),_0x12728e=_0x27a25a['map'](_0x408844=>_0x408844['getRange']());_0x27a25a['length']>0x0&&_0x23bdc6['push']([_0x5456f4['view'],_0x12728e]);}return _0x23bdc6;}),this['listenTo'](_0x52b1cd,'change:activeAnnotations',(_0x4113f8,_0x35df68,_0x27d98f)=>{const _0x39ffcb=Array['from'](_0x27d98f)['map'](_0xe196d4=>_0xe196d4['innerView'])['find'](_0x595493=>_0x52cfe4['_viewToController']['has'](_0x595493));if(!_0x39ffcb)return void(_0x409524['activeMarker']=null);const _0x1145ca=_0x52cfe4['_viewToController']['get'](_0x39ffcb)['model']['id'],_0x1de347='comment:'+_0x1145ca;_0x1145ca&&_0x409524['hasMarkerForId'](_0x1145ca)?_0x409524['activeMarker']=_0x1de347:_0x409524['activeMarker']&&(_0x409524['activeMarker']=null);}),this['listenTo'](_0x52cfe4,'removeCommentThread',(_0x3c707b,{threadId:_0x4d7902,isFromAdapter:_0x5e8787})=>{!_0x5e8787&&_0x26d304['ui']['focusTracker']['isFocused']&&_0x409524['hasMarkerForId'](_0x4d7902)&&_0x26d304['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x52cfe4,'addComment',(_0x38b6cb,{threadId:_0x1f7443,isFromAdapter:_0x24b298})=>{if(_0x24b298||!_0x409524['hasMarkerForId'](_0x1f7443)||!_0x52cfe4['hasCommentThread'](_0x1f7443))return;0x1===_0x52cfe4['getCommentThread'](_0x1f7443)['length']&&(_0x26d304['editing']['view']['focus'](),_0x38b6cb['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x359369=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3b5595;for(const _0x5474e6 in _0x359369){const _0x247736=_0x5474e6,_0x5a717c=_0x359369[_0x247736];if('commentsLicenseKeyValid'==_0x5a717c||'commentsLicenseKeyInvalid'==_0x5a717c||'commentsLicenseKeyExpired'==_0x5a717c||'commentsLicenseKeyDomainLimit'==_0x5a717c||'commentsLicenseKeyNotAllowed'==_0x5a717c||'commentsLicenseKeyEvaluationLimit'==_0x5a717c||'commentsLicenseKeyTrialLimit'==_0x5a717c||'commentsLicenseKeyUsageLimit'==_0x5a717c){delete _0x359369[_0x247736],_0x3b5595=_0x5a717c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3b5595&&_0x359369['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3b5595&&_0x359369['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3b5595&&_0x359369['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3b5595&&_0x359369['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3b5595&&_0x359369['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x3b5595&&_0x359369['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x3b5595&&_0x359369['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x35a998){const _0x1b3285=this['editor'],_0x5c05d7=new _0x35a998(_0x1b3285['locale']),_0x4d1e39=_0x1b3285['commands']['get']('addCommentThread');return _0x5c05d7['set']({'label':N(_0x1b3285['locale'],'Comment'),'icon':_0x4b2964}),_0x5c05d7['bind']('isEnabled')['to'](_0x4d1e39,'hasContent'),this['listenTo'](_0x5c05d7,'execute',()=>{_0x4d1e39['execute']();}),_0x5c05d7;}}class i extends _0xa4777{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5934b2){super(_0x5934b2),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5a5aa9,_0x378b3b,_0x1362c2)=>{_0x1362c2?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x282d93,_0x3f11c5]of this['editor']['commands'])_0x3f11c5['affectsData']&&'addCommentThread'!==_0x282d93&&_0x3f11c5['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x2ac87f=this['editor']['editing']['view']['document'];this['listenTo'](_0x2ac87f,'cut',_0x13971d=>_0x13971d['stop'](),{'priority':'highest'}),this['listenTo'](_0x2ac87f,'clipboardInput',_0x28f3b6=>_0x28f3b6['stop'](),{'priority':'highest'}),this['listenTo'](_0x2ac87f,'delete',_0x1b9bee=>_0x1b9bee['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x37b6ac,_0x358905]of this['editor']['commands'])_0x358905['affectsData']&&'addCommentThread'!==_0x37b6ac&&_0x358905['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x14070b{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8f6bb8){super(_0x8f6bb8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1d33b1=this['context']['plugins']['get'](y);this['listenTo'](_0x1d33b1,'_activateAnnotation',(_0x27aaf9,_0x34f0f9)=>{for(const _0x224b90 of this['activeUIs']){const _0x34aede=this['_uis']['get'](_0x224b90);(0x0,this['uisData']['get'](_0x224b90)['filter'])(_0x34f0f9)&&_0x34aede['setActiveAnnotation'](_0x34f0f9);}}),this['listenTo'](_0x1d33b1,'_deactivateAllAnnotations',()=>{for(const _0x15138f of this['activeUIs']){this['_uis']['get'](_0x15138f)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1d33b1['_visibleAnnotations'],'add',(_0x117aa7,_0x193a9b)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x193a9b);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2c8cff){return this['activeUIs']['has'](_0x2c8cff);}['activate'](_0x3f2d6e,_0x22c3b3=this['defaultFilter']){const _0x359bba=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3f2d6e))throw new _0x4842d8('annotationsuis-missing-ui',this,{'uiName':_0x3f2d6e});this['isActive'](_0x3f2d6e)&&this['deactivate'](_0x3f2d6e),this['activeUIs']['add'](_0x3f2d6e);const _0xc0b7e4=new S();v({'source':_0x359bba['_visibleAnnotations'],'target':_0xc0b7e4,'filter':_0x22c3b3}),this['uisData']['set'](_0x3f2d6e,{'collection':_0xc0b7e4,'filter':_0x22c3b3});const _0x1d0183=this['_uis']['get'](_0x3f2d6e);_0x1d0183['attach'](_0xc0b7e4),this['listenTo'](_0x1d0183,'change:activeAnnotation',(_0x34c0b9,_0x3d19b4,_0x4271d8,_0x504f4b)=>{_0x504f4b&&_0x359bba['_removeActiveAnnotation'](_0x504f4b),_0x4271d8&&_0x359bba['_addActiveAnnotation'](_0x4271d8);});}['deactivate'](_0x4fab81){if(this['activeUIs']['delete'](_0x4fab81),!this['_uis']['has'](_0x4fab81))throw new _0x4842d8('annotationsuis-missing-ui',this,{'uiName':_0x4fab81});const _0x3c79d5=this['_uis']['get'](_0x4fab81);_0x3c79d5['detach'](),this['stopListening'](_0x3c79d5),this['uisData']['get'](_0x4fab81)['collection']['destroy'](),this['uisData']['delete'](_0x4fab81);}['switchTo'](_0x16ffea){if(!this['_uis']['has'](_0x16ffea))throw new _0x4842d8('annotationsuis-missing-ui',this,{'uiName':_0x16ffea});const _0x302961=this['context']['plugins']['get'](y),_0x4b81d5=Array['from'](_0x302961['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x16ffea);const _0x5a2276=this['_uis']['get'](_0x16ffea);_0x5a2276['setActiveAnnotation'](_0x4b81d5),_0x5a2276['_setSelectedAnnotations']&&_0x4b81d5&&_0x5a2276['_setSelectedAnnotations']([_0x4b81d5]);}['deactivateAll'](){for(const _0x325b04 of this['activeUIs'])this['deactivate'](_0x325b04);}['register'](_0x1306ac,_0x41d8f6){if(this['_uis']['has'](_0x1306ac))throw new _0x4842d8('annotationsuis-register-already-registered');if('function'!=typeof _0x41d8f6['attach']||'function'!=typeof _0x41d8f6['detach']||'function'!=typeof _0x41d8f6['setActiveAnnotation'])throw new _0x4842d8('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1306ac,_0x41d8f6);}['refilterAnnotations'](){const _0x24021b=this['context']['plugins']['get'](y)['collection'],_0x365cb5=new Map(),_0x3e26ca=Array['from'](this['activeUIs']);for(const _0x297bcd of this['activeUIs']){const _0xb5ce86=this['uisData']['get'](_0x297bcd)['collection'];for(const _0x1eae47 of _0xb5ce86)_0x365cb5['set'](_0x1eae47,_0x297bcd);}for(const _0xd48cd1 of _0x24021b){const _0x1d7fb0=_0x365cb5['get'](_0xd48cd1);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd48cd1);const _0x282298=_0x3e26ca['find'](_0x560f02=>this['uisData']['get'](_0x560f02)['filter'](_0xd48cd1));_0x1d7fb0!==_0x282298&&(_0x1d7fb0&&this['uisData']['get'](_0x1d7fb0)['collection']['remove'](_0xd48cd1),_0x282298&&this['uisData']['get'](_0x282298)['collection']['add'](_0xd48cd1));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3631eb){const _0x571f56=[];for(const _0x4a224c of this['activeUIs']){(0x0,this['uisData']['get'](_0x4a224c)['filter'])(_0x3631eb)&&_0x571f56['push'](_0x4a224c);}if(_0x571f56['length']>0x1)throw new _0x4842d8('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x571f56,'annotationType':_0x3631eb['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x151a54){super(_0x151a54),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x45de41,_0x4bb408)=>_0x45de41+_0x4bb408),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x276416=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x276416['to']('isAnimationDisabled',_0x4541e3=>_0x4541e3?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x276416['to']('top',_0x143217=>Ot(_0x143217))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x499d6b=this['element']['clientHeight'];_0x499d6b&&(this['height']=_0x499d6b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x14070b{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44e7e6){super(_0x44e7e6),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 _0x274209=this['context']['config']['get']('sidebar.container');_0x274209&&this['setContainer'](_0x274209);}['setContainer'](_0x5e3333){if(!g(_0x5e3333))throw new _0x4842d8('sidebar-setcontainer-invalid-element');this['container']=_0x5e3333;}['_attachToContainer']({viewClass:_0x1bcacd='',spaceBetweenItems:_0x38fbbb=0x19}={}){if(!g(this['container']))throw new _0x4842d8('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1bcacd,this['_spaceBetweenItems']=_0x38fbbb;}['rearrange']({removedAnnotation:_0x1503c3,previousAnnotation:_0x4a767d,nextAnnotation:_0x32991d}){const _0xd6233f=this['getSidebarItemView'](_0x1503c3);this['view']['list']['remove'](_0xd6233f),this['_destroySidebarItemView'](_0x1503c3),_0x4a767d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4a767d)),_0x32991d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x32991d)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3ebb25,activatedAnnotation:_0x1ee076,disableAnimationOnActivatedAnnotation:_0xc3767c}){if(this['_activeAnnotation']=_0x1ee076,_0x3ebb25){_0x3ebb25['isActive']=!0x1;const _0x355111=this['getSidebarItemView'](_0x3ebb25);_0x355111&&_0xc3767c&&(_0x355111['isAnimationDisabled']=!0x1);}if(_0x1ee076){const _0x162b19=this['getSidebarItemView'](_0x1ee076);_0x162b19&&(_0x1ee076['isActive']=!0x0,_0xc3767c&&(_0x162b19['isAnimationDisabled']=!0x0,_0x162b19['top']+=0x1),this['_alignToTargetRect'](_0x162b19));}}['_detachFromContainer'](_0x5e38ef){if(this['view']['element']['remove'](),_0x5e38ef){for(const _0x42db2f of _0x5e38ef)this['_destroySidebarItemView'](_0x42db2f);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2600d1,_0x53c33a){_0x53c33a||(_0x53c33a=_0x2600d1['view']);const _0x1b30ff=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1b30ff,_0x2600d1),this['_annotationToSidebarItemView']['set'](_0x2600d1,_0x1b30ff),_0x1b30ff['content']['add'](_0x53c33a),this['listenTo'](_0x2600d1['view'],'change:targetRect',(_0x581066,_0x3a28a2,_0x932867)=>{const _0x2b70f5=this['_getTargetTop'](_0x2600d1,_0x932867);_0x1b30ff['_targetTop']!=_0x2b70f5&&(_0x1b30ff['_targetTop']=_0x2b70f5,this['_setItemTop'](_0x1b30ff,_0x2b70f5));}),this['listenTo'](_0x1b30ff,'change:top',()=>{this['_recalculate'](_0x1b30ff,'top');}),this['listenTo'](_0x1b30ff,'change:bottom',()=>{this['_recalculate'](_0x1b30ff,'bottom');}),this['_alignToTargetRect'](_0x1b30ff);const _0x280a7c=this['_getItemBefore'](_0x1b30ff);if(_0x280a7c)this['_alignAfterItem'](_0x280a7c,_0x1b30ff)||this['_alignToTargetRect'](_0x1b30ff);else this['_alignToTargetRect'](_0x1b30ff);return this['_updateLastItem'](),this['view']['list']['add'](_0x1b30ff),_0x1b30ff;}['_alignForTopChange'](_0x4f94ea){if(!_0x4f94ea['content']['length'])return;const _0x818669=this['_getItemBefore'](_0x4f94ea);if(!_0x818669)return;const _0x318f40=this['_sidebarItemViewToAnnotation']['get'](_0x818669),_0x4acd35=this['_activeAnnotation'];_0x4acd35&&_0x4acd35===_0x318f40?this['_alignAfterItem'](_0x818669,_0x4f94ea):this['_alignBeforeItem'](_0x4f94ea,_0x818669);}['_alignForBottomChange'](_0x54870b){if(!_0x54870b['content']['length'])return;const _0x2c6602=this['_getItemAfter'](_0x54870b);if(!_0x2c6602)return;const _0x670d66=this['_sidebarItemViewToAnnotation']['get'](_0x2c6602),_0x42b937=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x66cba9=this['_activeAnnotation'];_0x66cba9&&_0x66cba9===_0x670d66&&_0x42b937?(this['_alignBeforeItem'](_0x2c6602,_0x54870b),this['_alignAfterItem'](_0x54870b,_0x2c6602)):_0x66cba9&&_0x66cba9===_0x670d66?this['_alignBeforeItem'](_0x2c6602,_0x54870b):this['_alignAfterItem'](_0x54870b,_0x2c6602);}['_recalculate'](_0x22ec02,_0x20c77b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x128066,changedProp:_0x86e330}of this['_recalculateBuffer'])'top'===_0x86e330?this['_alignForTopChange'](_0x128066):this['_alignForBottomChange'](_0x128066);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x22ec02,'changedProp':_0x20c77b});}['getSidebarItemView'](_0x4331d3){return this['_annotationToSidebarItemView']['get'](_0x4331d3);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x56efe9){const _0x5a3fd8=this['getSidebarItemView'](_0x56efe9);this['stopListening'](_0x5a3fd8),this['stopListening'](_0x56efe9['view']),_0x5a3fd8['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x56efe9),this['_sidebarItemViewToAnnotation']['delete'](_0x5a3fd8);}['_createSidebarView'](){const _0x559b16=new H(this['context']['locale']);return _0x559b16['render'](),this['on']('change:_lastItem',(_0x29c564,_0x4cc56a,_0x887e77,_0x5d4561)=>{_0x5d4561&&_0x559b16['unbind']('minHeight'),_0x887e77?_0x559b16['bind']('minHeight')['to'](_0x887e77,'bottom'):_0x559b16['minHeight']=null;}),_0x559b16;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x134ce5){const _0x59aac3=this['_sidebarItemViewToAnnotation']['get'](_0x134ce5),_0x315e5c=_0x59aac3&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x59aac3)-0x1);return _0x315e5c&&this['getSidebarItemView'](_0x315e5c)||null;}['_getItemAfter'](_0x264456){const _0x4879ed=this['_sidebarItemViewToAnnotation']['get'](_0x264456),_0x439186=_0x4879ed&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4879ed)+0x1);return _0x439186&&this['getSidebarItemView'](_0x439186)||null;}['_alignBeforeItem'](_0x1536ee,_0x178b97){_0x1536ee['updateHeight']();const _0x375697=G(_0x178b97['bottom']+this['_spaceBetweenItems'],_0x1536ee['top']);return!!_0x375697&&(this['_setItemTop'](_0x178b97,_0x178b97['top']-_0x375697),!0x0);}['_alignAfterItem'](_0x89ca6e,_0x15a478){_0x89ca6e['updateHeight']();const _0x261145=G(_0x89ca6e['bottom']+this['_spaceBetweenItems'],_0x15a478['top']);return!!_0x261145&&(this['_setItemTop'](_0x15a478,_0x15a478['top']+_0x261145,!0x1),!0x0);}['_alignToTargetRect'](_0x47cc6f){const _0x1a0857=this['_sidebarItemViewToAnnotation']['get'](_0x47cc6f);if(!_0x1a0857||!_0x1a0857['target']||!_0x1a0857['targetRect'])return;const _0x9d405=this['_getTargetTop'](_0x1a0857,_0x1a0857['targetRect']);this['_setItemTop'](_0x47cc6f,_0x9d405);}['_getTargetTop'](_0x4dd74d,_0x5a7926){if(null===_0x5a7926)return 0x0;if(_0x4dd74d['target']instanceof _0x1bd7c4)return _0x5a7926['top'];{const _0x44000f=new _0x1bd7c4(this['view']['element'])['top'];return _0x5a7926['top']-_0x44000f;}}['_setItemTop'](_0x2f60fe,_0x325c09,_0x490ea5=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x490ea5&&(_0x325c09=Math['max'](_0x325c09,this['_getMaxAvailableTop'](_0x2f60fe))),_0x2f60fe['top']=_0x325c09;}['_getMaxAvailableTop'](_0x44ae31){let _0x47fbd4=this['_getItemBefore'](_0x44ae31),_0x2067e2=0x0;for(;_0x47fbd4;)_0x47fbd4['updateHeight'](),_0x2067e2+=this['_spaceBetweenItems']+_0x47fbd4['height'],_0x47fbd4=this['_getItemBefore'](_0x47fbd4);return _0x2067e2;}}function G(_0x30c833,_0x5d35fa){return Math['max'](_0x30c833-_0x5d35fa,0x0);}function g(_0x505a5c){return null!==_0x505a5c&&'object'==typeof _0x505a5c&&0x1===_0x505a5c['nodeType'];}class e extends _0x14070b{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10a372){super(_0x10a372),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4f0cac(),this['_refreshPositioningDebounced']=_0x5adaa1(()=>{_0x10a372['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5e2abe=this['context']['plugins']['get'](j),_0x5e522f=this['context']['plugins']['get'](z);_0x5e2abe['register']('wideSidebar',this),_0x5e522f['container']&&_0x5e2abe['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5f4db6){if(_0x5f4db6===this['activeAnnotation'])return;const _0xb010a8=this['context']['plugins']['get'](z);_0xb010a8['_activeAnnotation']=_0x5f4db6;const _0x215f31=this['activeAnnotation'];_0xb010a8['refresh']({'blurredAnnotation':_0x215f31,'activatedAnnotation':_0x5f4db6}),this['activeAnnotation']=_0x5f4db6;}['attach'](_0x4e732a){this['annotations']=_0x4e732a;const _0x4c2751=this['context']['plugins']['get'](z);if(_0x4c2751['_annotations']=_0x4e732a,this['isAttached'])throw new _0x4842d8('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4c2751,'set:container',()=>{this['detach'](),this['listenTo'](_0x4c2751,'change:container',_0x4c1e4f=>{_0x4c1e4f['off'](),this['attach'](_0x4e732a);});}),_0x4c2751['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4f184e=_0x339f4b=>{_0x339f4b['updateTargetRect'](),_0x4c2751['addAnnotation'](_0x339f4b);};for(const _0x49ca68 of _0x4e732a)_0x4f184e(_0x49ca68);this['listenTo'](_0x4e732a,'add',(_0x550af0,_0x514af8)=>{_0x4f184e(_0x514af8);}),this['listenTo'](_0x4e732a,'remove',(_0x83e45,_0x4ab8dc,_0xdaa48e)=>{_0x4c2751['rearrange']({'removedAnnotation':_0x4ab8dc,'previousAnnotation':_0x4e732a['get'](_0xdaa48e-0x1),'nextAnnotation':_0x4e732a['get'](_0xdaa48e+0x1)}),_0x4ab8dc===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4e732a,'focus',(_0x490060,_0x250767)=>{this['setActiveAnnotation'](_0x250767);}),this['listenTo'](_0x4e732a,'blur',()=>{this['setActiveAnnotation'](null);});const _0x29423f=this['context']instanceof _0x50bbf8?this['context']['editors']:new _0x4f0cac([this['context']]);for(const _0x17739c of _0x29423f)this['_integrateWithEditorAnnotations'](_0x17739c);this['listenTo'](_0x29423f,'add',(_0x8dc5d8,_0x418849)=>{this['listenTo'](_0x418849,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x418849);});}),this['listenTo'](_0x29423f,'remove',(_0x3348dc,_0x1bb691)=>{_0x1bb691['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1bb691['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4842d8('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3d1436=this['context']['plugins']['get'](z);_0x3d1436['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3d1436),this['stopListening'](this['annotations']),this['context']instanceof _0x50bbf8&&this['stopListening'](this['context']['editors']);for(const _0x1a0622 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1a0622);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x405e32){if(!_0x405e32['plugins']['has']('EditorAnnotations'))return;const _0x170494=_0x405e32['plugins']['get']('EditorAnnotations'),_0x4df108=()=>{const _0x3eb624=_0x170494['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3eb624[0x0]||null);};this['listenTo'](_0x170494,'refresh',_0x4df108),this['listenTo'](_0x170494,'blur',(_0x357a93,{isAnnotationTracked:_0x2ca721})=>{this['activeAnnotation']&&_0x2ca721(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x170494,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x830818=>{_0x170494['hasDomSelection']()&&(_0x4df108(),_0x830818['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x170494);}['_destroyEditorAnnotationsIntegration'](_0x4a5b95){this['stopListening'](_0x4a5b95),this['_editorAnnotations']['remove'](_0x4a5b95);}}class C extends _0x4373f8{['counterView'];constructor(_0x39f99d){super(_0x39f99d);const _0x21c905=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x409281,_0x150241)=>_0x409281?'...':_0x150241['toString']()),this['set']('annotationType',''),this['icon']=_0x4b2964,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x21c905['to']('annotationType',_0x366d53=>'ck-annotation-counter__badge--'+_0x366d53),_0x21c905['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x21c905['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x14070b{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56d97b){super(_0x56d97b),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x5ce20f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4f0cac(),this['_refreshPositioningDebounced']=_0x5adaa1(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4c3bdf(this['context']['locale']),this['balloonPanelView']=new _0x21e091(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3510a6){this['annotations']=_0x3510a6;const _0x1bb492=this['context']['plugins']['get'](z),_0x11f025=this['balloonPanelView'];if(_0x1bb492['_annotations']=_0x3510a6,this['isAttached'])throw new _0x4842d8('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1bb492,'set:container',()=>{this['detach'](),this['listenTo'](_0x1bb492,'change:container',_0x1a5a64=>{_0x1a5a64['off'](),this['attach'](_0x3510a6);});}),_0x1bb492['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2a5f00=_0x360170=>{const _0x41fe60=new C(this['context']['locale']);_0x1bb492['addAnnotation'](_0x360170,_0x41fe60),this['_annotationToNarrowView']['set'](_0x360170,_0x41fe60),_0x41fe60['bind']('isDirty','annotationType','number')['to'](_0x360170['view'],'isDirty','type','length'),_0x41fe60['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x11f025['content']['first']!==_0x360170['view']?(this['_showBalloon'](_0x360170),_0x360170['view']['element']['focus'](),this['setActiveAnnotation'](_0x360170)):this['setActiveAnnotation'](null);});};for(const _0xce8fa of _0x3510a6)_0x2a5f00(_0xce8fa);this['listenTo'](_0x3510a6,'add',(_0x387987,_0x4b8260)=>{_0x2a5f00(_0x4b8260);}),this['listenTo'](_0x3510a6,'remove',(_0x342bb3,_0x56e443,_0x4fb5c1)=>{this['_annotationToNarrowView']['get'](_0x56e443)['destroy'](),this['_annotationToNarrowView']['delete'](_0x56e443),_0x1bb492['rearrange']({'removedAnnotation':_0x56e443,'previousAnnotation':_0x3510a6['get'](_0x4fb5c1-0x1),'nextAnnotation':_0x3510a6['get'](_0x4fb5c1+0x1)}),_0x56e443===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3510a6,'focus',(_0x1f0608,_0x528d52)=>{this['setActiveAnnotation'](_0x528d52);}),this['listenTo'](_0x3510a6,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3fe333,_0x59d915)=>{_0x59d915['keyCode']===_0x243f97['esc']&&_0x11f025['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x11f025['content']['first']),this['_hideBalloon'](),_0x59d915['stopPropagation'](),_0x59d915['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x52a986,_0x54de5c)=>{const _0x4af3e3=_0x54de5c['target'];_0x11f025['isVisible']&&_0x11f025['element']['contains'](_0x4af3e3)||_0x1bb492['view']['element']['contains'](_0x4af3e3)||_0x52a986['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x31874b=>_0x31874b['contains'](_0x4af3e3))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5043a5=this['context']instanceof _0x50bbf8?this['context']['editors']:new _0x4f0cac([this['context']]);for(const _0x5026c1 of _0x5043a5)this['_integrateWithEditorAnnotations'](_0x5026c1);this['listenTo'](_0x5043a5,'add',(_0x4a8ea6,_0x6954b7)=>{this['listenTo'](_0x6954b7,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x6954b7);});}),this['listenTo'](_0x5043a5,'remove',(_0x47d1c5,_0x335a60)=>{_0x335a60['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x335a60['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0xb63ead){if(_0xb63ead===this['activeAnnotation'])return;const _0x42659d=this['context']['plugins']['get'](z);if(_0x42659d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0xb63ead,'disableAnimationOnActivatedAnnotation':!0x0}),_0xb63ead)_0x42659d['getSidebarItemView'](_0xb63ead)?this['_showBalloon'](_0xb63ead):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0xb63ead;}['detach'](){if(!this['isAttached'])throw new _0x4842d8('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2073d2=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x16f90e=>_0x16f90e['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2073d2['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x50bbf8&&this['stopListening'](this['context']['editors']);for(const _0x25258a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x25258a);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'](_0x1ff382){if(!_0x1ff382['plugins']['has']('EditorAnnotations'))return;const _0x36ff8f=_0x1ff382['plugins']['get']('EditorAnnotations'),_0x3f15a2=this['context']['plugins']['get'](z),_0x59e341=this['annotations'],_0x46d7ca=this['balloonPanelView'],_0x3f2998=()=>{const _0x2df12a=_0x36ff8f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2df12a),this['setActiveAnnotation'](_0x2df12a[0x0]||null);};this['listenTo'](_0x36ff8f,'refresh',_0x3f2998),this['listenTo'](_0x36ff8f,'blur',(_0x2d3e91,{isAnnotationTracked:_0x22c4b9})=>{this['activeAnnotation']&&_0x22c4b9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x36ff8f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x59e341,'blur',_0x1547b9=>{_0x36ff8f['hasDomSelection']()&&_0x1547b9['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x106fd7,_0xf611cd)=>{const _0x3fc9c1=_0xf611cd['target'];_0x46d7ca['isVisible']&&_0x46d7ca['element']['contains'](_0x3fc9c1)||_0x3f15a2['view']['element']['contains'](_0x3fc9c1)||this['activeAnnotation']&&_0x36ff8f['hasDomSelection']()&&(_0x3f2998(),_0x106fd7['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x36ff8f);}['_destroyEditorAnnotationsIntegration'](_0x1578c0){_0x1578c0&&(this['stopListening'](_0x1578c0),this['_editorAnnotations']['remove'](_0x1578c0));}['_setSelectedAnnotations'](_0x5aa796){for(const _0x2ddeab of this['_selectedAnnotations'])_0x5aa796['includes'](_0x2ddeab)||this['_manuallyClosedAnnotationViews']['delete'](_0x2ddeab['view']);this['_selectedAnnotations']=_0x5aa796;}['_refreshPositioning'](){const _0x1a3ef7=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x1a3ef7['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x5b06df){if(this['_manuallyClosedAnnotationViews']['has'](_0x5b06df['view']))return;const _0x387bab=this['balloonPanelView']['content']['first'];_0x387bab!==_0x5b06df['view']?(_0x387bab&&this['_detachListeners'](_0x387bab),this['_attachListeners'](_0x5b06df['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x5b06df['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x10e08a=this['balloonPanelView']['content']['first'],_0x2c532a=_0x10e08a&&this['annotations']['getByView'](_0x10e08a);if(!_0x2c532a||!this['_annotationToNarrowView']['has'](_0x2c532a))return;const _0x59039a=this['_annotationToNarrowView']['get'](_0x2c532a)['element'],_0x5aba8a=(function(){const _0x4ee937=_0x21e091['defaultPositions'];return[_0x4ee937['southArrowNorthEast'],_0x4ee937['northArrowSouthEast'],_0x4ee937['southArrowNorth'],_0x4ee937['northArrowSouth'],_0x4ee937['southArrowNorthWest'],_0x4ee937['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x59039a,'positions':_0x5aba8a});}['_hideBalloon'](){const _0x40db31=this['balloonPanelView'],_0x494ec5=_0x40db31['content']['first'];_0x494ec5&&(this['_detachListeners'](_0x494ec5),_0x40db31['unpin'](),_0x40db31['content']['clear']());}['_attachListeners'](_0x6b6c11){this['listenTo'](_0x6b6c11,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x6b6c11,'Esc',(_0x3b8170,_0x5fe2ed)=>{this['_manuallyClosedAnnotationViews']['add'](_0x6b6c11),this['_hideBalloon'](),_0x5fe2ed();});}['_detachListeners'](_0x5cd57a){this['stopListening'](_0x5cd57a);}}class c extends _0xa4777{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x2817a0,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29596e){super(_0x29596e),_0x29596e['editing']['view']['addObserver'](_0x3d5143),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x29596e['plugins']['get'](_0x2817a0),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x30bad=this['editor']['plugins']['get'](j);_0x30bad['context']===this['editor']&&(_0x30bad['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x31b132,_0x50b6ac)=>{const _0x2e0f19=this['_balloon'];if(this['isAttached']&&_0x2e0f19['visibleView']){const _0x1a2067=this['annotations']['getByView'](_0x2e0f19['visibleView']);_0x1a2067&&this['_closeAnnotation'](_0x1a2067),_0x50b6ac();}}));}['afterInit'](){const _0x1e02fd=this['editor']['plugins']['get'](j);_0x1e02fd['context']===this['editor']&&(_0x1e02fd['hasActive']()||_0x1e02fd['switchTo']('inline'));}['setActiveAnnotation'](_0x140ab5){_0x140ab5!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x140ab5&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x140ab5)&&this['_addAnnotationToBalloon'](_0x140ab5,!0x0),_0x140ab5['isActive']=!0x0),_0x140ab5||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x140ab5);}['attach'](_0x510c95){this['annotations']=_0x510c95;const _0x122d77=this['editor']['plugins']['get'](j),_0x167364=this['_balloon'];if(this['isAttached'])throw new _0x4842d8('inlineannotations-attach-already-attached',this);if(_0x122d77['context']!==this['editor'])throw new _0x4842d8('inlineannotations-not-allowed-with-context',this);const _0x4cef61=this['editor']['plugins']['get'](b);this['listenTo'](_0x4cef61,'refresh',()=>{const _0x130f37=_0x4cef61['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2ea77a,_0x5d4dca;!this['_forceRefresh']&&(_0x2ea77a=_0x130f37,_0x5d4dca=this['_selectedAnnotations'],_0x2ea77a['length']===_0x5d4dca['length']&&_0x2ea77a['every'](_0x4ca2a4=>_0x5d4dca['includes'](_0x4ca2a4)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x130f37),this['setActiveAnnotation'](_0x130f37[0x0]||null));}),this['listenTo'](_0x4cef61,'blur',(_0x369cfd,{isAnnotationTracked:_0x33ce91})=>{this['activeAnnotation']&&_0x33ce91(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x22571e,_0x5b896b,_0x492b7b)=>{_0x492b7b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x510c95,'remove',(_0x3b5525,_0x5b085c)=>{this['_removeAnnotationFromBalloon'](_0x5b085c),_0x5b085c===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x167364,'change:visibleView',(_0x47b96d,_0x320c87,_0x5d3f31,_0x507ca6)=>{_0x507ca6&&this['stopListening'](_0x507ca6);const _0x18b1e2=_0x510c95['getByView'](_0x5d3f31);_0x5d3f31&&_0x18b1e2&&(this['listenTo'](_0x5d3f31,'change:height',()=>{_0x167364['updatePosition']();}),this['listenTo'](_0x5d3f31,'Esc',()=>{this['_closeAnnotation'](_0x18b1e2),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x18b1e2&&this['setActiveAnnotation'](_0x18b1e2));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x167364['visibleView']&&(_0x510c95['getByView'](_0x167364['visibleView'])&&_0x167364['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 _0x4842d8('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xb8aa50 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xb8aa50);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x35394a){for(const _0x1297e9 of this['_selectedAnnotations'])_0x35394a['includes'](_0x1297e9)||this['_manuallyClosed']['delete'](_0x1297e9);for(const _0x362b43 of this['annotations'])_0x35394a['includes'](_0x362b43)||this['_removeAnnotationFromBalloon'](_0x362b43);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x174833 of _0x35394a)this['_addAnnotationToBalloon'](_0x174833);}this['_selectedAnnotations']=_0x35394a;}['_addAnnotationToBalloon'](_0x37b694,_0x181a8f=!0x1){this['_manuallyClosed']['has'](_0x37b694)||(this['_addedAnnotations']['has'](_0x37b694)||this['_balloon']['hasView'](_0x37b694['view'])||(this['_addedAnnotations']['add'](_0x37b694),this['_balloon']['add']({'stackId':_0x37b694['view']['id'],'view':_0x37b694['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x37b694)}})),_0x181a8f&&this['_balloon']['showStack'](_0x37b694['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2f8b25){const _0x403a56=_0x2f8b25['target'],_0x4ba49a=this['editor']['editing']['view'],_0x251cd5=_0x4ba49a['document']['selection']['getFirstRange'](),_0x554c97=_0x4ba49a['domConverter']['viewRangeToDom'](_0x251cd5);if(_0x554c97['collapse'](!0x0),_0x403a56){if(_0x403a56 instanceof _0x1bd7c4)return _0x403a56;let _0x31c2d2=[];for(const _0x4d84cf of _0x403a56)_0x31c2d2['push'](...F(_0x4d84cf['getClientRects']()));_0x31c2d2=function(_0x4925cd){const _0x3eca2a=[];let _0x1550b2=_0x4925cd[0x0];for(let _0x12d199=0x1;_0x12d199<_0x4925cd['length'];_0x12d199++)P(_0x1550b2,_0x4925cd[_0x12d199])?_0x1550b2['width']+=_0x4925cd[_0x12d199]['width']:(_0x3eca2a['push'](_0x1550b2),_0x1550b2=_0x4925cd[_0x12d199]);return _0x3eca2a['push'](_0x1550b2),_0x3eca2a;}(_0x31c2d2);const _0x17f603=_0x554c97['getBoundingClientRect']();return _0x31c2d2['find'](_0x6efe6a=>_0x6efe6a['top']<=_0x17f603['top']&&_0x6efe6a['bottom']>=_0x17f603['bottom']&&_0x6efe6a['left']<=_0x17f603['left']&&_0x6efe6a['right']>=_0x17f603['right'])||_0x31c2d2[0x0];}return _0x2f8b25['targetRect']||_0x554c97;}['_removeAnnotationFromBalloon'](_0x344cfb){this['_addedAnnotations']['has'](_0x344cfb)&&this['_balloon']['hasView'](_0x344cfb['view'])&&(this['_addedAnnotations']['delete'](_0x344cfb),this['_balloon']['remove'](_0x344cfb['view']));}['_closeAnnotation'](_0x28e748){this['_manuallyClosed']['add'](_0x28e748),this['_removeAnnotationFromBalloon'](_0x28e748);}}function F(_0x252eae){return Array['from'](_0x252eae)['map'](DOMRect['fromRect']);}function P(_0x48e53d,_0x5818ae){return _0x48e53d['top']===_0x5818ae['top']&&_0x48e53d['bottom']===_0x5818ae['bottom']&&_0x48e53d['right']===_0x5818ae['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1c6137,_0x162726){super(_0x1c6137),this['set']('isEmpty',!_0x162726['length']),this['focusTracker']=new _0x30744a(),this['_annotationViews']=_0x162726,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x17fb5d({'focusables':_0x162726,'focusTracker':this['focusTracker']}),this['listenTo'](_0x162726,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x162726,'remove',(_0x403f16,_0x358001)=>{_0x358001['isActive']&&this['focus'](),_0x162726['length']||(this['isEmpty']=!0x0);});const _0x288ae5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1c6137,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x162726},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x288ae5['if']('isEmpty','ck-hidden',_0xfc39a8=>!_0xfc39a8)]},'children':[{'text':N(_0x1c6137,'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 _0x52d87e of this['_annotationViews'])this['focusTracker']['add'](_0x52d87e['element']);this['_annotationViews']['on']('change',(_0x2e7517,{added:_0x185d29,removed:_0x11b9d3})=>{for(const _0x49ac02 of _0x185d29)this['focusTracker']['add'](_0x49ac02['element']);for(const _0x4416e1 of _0x11b9d3)this['focusTracker']['remove'](_0x4416e1['element']);});}}class p extends _0x14070b{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x52acf7){super(_0x52acf7),this['archivedThreads']=new _0x4f0cac();}['init'](){const _0x5cc67d=this['context'],_0x550a71=_0x5cc67d['plugins']['get'](o),_0xb63b4=_0x5cc67d['plugins']['get'](y);this['listenTo'](_0x550a71,'addCommentThread',(_0x357806,{threadId:_0x256e1f})=>{const _0x4a9fa0=_0x550a71['getCommentThread'](_0x256e1f);_0x4a9fa0['archivedAt']&&this['archivedThreads']['add'](_0x4a9fa0,this['_calculatePosition'](_0x4a9fa0['archivedAt'])),this['listenTo'](_0x4a9fa0,'change:archivedAt',(_0x525c6b,_0x88a501,_0x440935)=>{_0x440935?this['archivedThreads']['has'](_0x4a9fa0)||this['archivedThreads']['add'](_0x4a9fa0,this['_calculatePosition'](_0x4a9fa0['archivedAt'])):this['archivedThreads']['has'](_0x4a9fa0)&&this['archivedThreads']['remove'](_0x4a9fa0);});}),this['listenTo'](_0x550a71,'removeCommentThread',(_0x128698,{threadId:_0x26c639})=>{const _0x1f5e74=_0x550a71['getCommentThread'](_0x26c639);this['stopListening'](_0x1f5e74),this['archivedThreads']['has'](_0x1f5e74)&&this['archivedThreads']['remove'](_0x1f5e74);},{'priority':'highest'}),this['listenTo'](_0xb63b4['collection'],'focus',(_0x2ddd54,_0x2234a5)=>{_0x2234a5['isVisible']||(_0x2234a5['isActive']=!0x0,_0xb63b4['activate'](_0x2234a5));});}['_calculatePosition'](_0x10335e){const _0x58b138=[...this['archivedThreads']]['findIndex'](_0x10ec21=>_0x10ec21['archivedAt']<_0x10335e);return _0x58b138>-0x1?_0x58b138:this['archivedThreads']['length'];}}class a extends _0xa4777{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x43ab14];}constructor(_0x376dd6){super(_0x376dd6),this['annotationViews']=new _0x2c7739(),this['_pendingThreads']=[];}['init'](){const _0xae32ae=this['editor'],_0xcb4f87=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xae32ae['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4373f8,!0x0)),_0xae32ae['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5d356b=this['_createCommentsArchiveButton'](_0x1f2dd5);return _0x5d356b['set']({'role':'menuitemcheckbox'}),_0x5d356b;});const _0x24c187=_0xae32ae['plugins']['get'](p),_0x4ea27c=_0xae32ae['plugins']['get']('Annotations'),_0x3b3253=_0xae32ae['plugins']['get']('CommentsRepository');_0x24c187['archivedThreads']['forEach'](_0x5e0ad3=>{this['_handleNewThread'](_0x5e0ad3);}),this['listenTo'](_0x24c187['archivedThreads'],'add',(_0x73ba3b,_0x442031)=>{this['_handleNewThread'](_0x442031);}),this['listenTo'](_0x4ea27c['collection'],'add',(_0x2e8053,_0x509ce)=>{const _0x2acabb=this['_pendingThreads']['find'](_0x13f5e2=>{const _0x653c0f=_0x3b3253['_threadToController']['get'](_0x13f5e2);return _0x653c0f&&_0x509ce['innerView']===_0x653c0f['view'];});if(_0x2acabb){const _0xdd41a2=this['_calculatePosition'](_0x2acabb['archivedAt']);this['annotationViews']['add'](_0x509ce['view'],_0xdd41a2),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2acabb),0x1);}}),this['listenTo'](_0x24c187['archivedThreads'],'remove',(_0x3907c8,_0x5a7f3d)=>{const _0x171da5=_0xae32ae['config']['get']('collaboration.channelId');if(!_0x171da5||_0x5a7f3d['channelId']===_0x171da5){if(this['_pendingThreads']['includes'](_0x5a7f3d))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5a7f3d),0x1);else{const _0x216c75=_0x3b3253['_threadToController']['get'](_0x5a7f3d),_0x33d3e1=_0x4ea27c['getByInnerView'](_0x216c75['view']);this['annotationViews']['remove'](_0x33d3e1['view']),this['stopListening'](_0x33d3e1['focusableElements']);}}}),this['listenTo'](_0x4ea27c['collection'],'add',(_0x489412,_0x94ea09)=>{this['listenTo'](_0x94ea09,'escape',_0xcb4f87);}),this['listenTo'](_0x4ea27c['collection'],'remove',(_0x43c5d1,_0x3a4464)=>{this['stopListening'](_0x3a4464,'escape',_0xcb4f87);});}['_handleNewThread'](_0x5ab33e){const _0x30d790=this['editor']['plugins']['get']('CommentsRepository'),_0x3a0844=this['editor']['plugins']['get']('Annotations'),_0x1c47f0=this['editor']['config']['get']('collaboration.channelId');if(!_0x1c47f0||_0x5ab33e['channelId']===_0x1c47f0){const _0x3dfa5b=_0x30d790['_threadToController']['get'](_0x5ab33e);if(!_0x3dfa5b)return void this['_pendingThreads']['push'](_0x5ab33e);const _0x2dcd96=this['_calculatePosition'](_0x5ab33e['archivedAt']),_0x264bc7=_0x3a0844['getByInnerView'](_0x3dfa5b['view']);_0x264bc7['isVisible']&&_0x3a0844['_visibleAnnotations']['remove'](_0x264bc7),this['annotationViews']['add'](_0x264bc7['view'],_0x2dcd96);}}['_calculatePosition'](_0x3efb2f){const _0xce9ca7=this['editor']['config']['get']('collaboration.channelId'),_0x37d683=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x4020d4=>_0x4020d4['channelId']===_0xce9ca7)['findIndex'](_0xf3cc30=>_0xf3cc30['archivedAt']<_0x3efb2f);return _0x37d683<0x0||_0x37d683>this['annotationViews']['length']?this['annotationViews']['length']:_0x37d683-0x1;}['_toggleDialog'](){const _0xe100a1=this['editor'],_0x4f5387=_0xe100a1['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0xe100a1['locale'],this['annotationViews'])),'commentsArchive'===_0x4f5387['id']?_0x4f5387['hide']():_0x4f5387['show']({'id':'commentsArchive','title':N(_0xe100a1['locale'],'COMMENTS_ARCHIVE'),'icon':_0x51da9,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x176cbd['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x17d2fa,_0x3e3b46=!0x1){const _0xdc37b5=this['editor']['locale'],_0x4d66a6=this['editor']['plugins']['get']('Dialog'),_0x49a4d3=new _0x17d2fa(_0xdc37b5);return _0x49a4d3['bind']('isEnabled')['to'](this,'isEnabled'),_0x49a4d3['bind']('isOn')['to'](_0x4d66a6,'id',_0x383afa=>'commentsArchive'===_0x383afa),_0x49a4d3['set']({'label':N(_0xdc37b5,'COMMENTS_ARCHIVE'),'icon':_0x51da9,'isToggleable':!0x0}),_0x3e3b46&&(_0x49a4d3['tooltip']=!0x0),this['listenTo'](_0x49a4d3,'execute',()=>this['_toggleDialog']()),_0x49a4d3;}['_hideDialogOnAnnotationEscape']=_0x281565=>{const _0x215a4e=_0x281565['source'];if(!this['annotationViews']['has'](_0x215a4e['view']))return;const _0x4f76f5=this['editor']['plugins']['get']('Dialog');_0x4f76f5['isOpen']&&'commentsArchive'===_0x4f76f5['id']&&(_0x4f76f5['hide'](),_0x281565['stop']());};}class gi extends _0xa4777{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x27ecd2,ContextPlugin as _0x35edc8,PendingActions as lt,Command as _0x58a655,Plugin as _0x4f8b18,Context as _0x2dec0a}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3d6921,uid as _0xf51739,KeystrokeHandler as jt,FocusTracker as _0x336e57,diff as _0x2f1ce2,Collection as _0x1ed765,Rect as _0x29c0c7,CKEditorError as _0x59f856,first as _0x1a7d5e,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x428cc8,keyCodes as _0x457aae}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x38aed4,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x442e48,trimHtml as _0x350498,LateFocusDropdownButtonView as _0x5638f8,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0xecbc2a}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x489039}from'es-toolkit/compat';import{IconUndo as _0x1e6eac,IconCheck as _0x21f99b,IconPencil as _0x8301b6,IconRemoveComment as _0x1b2265,IconThreeVerticalDots as _0x4068bd,IconAddComment as _0x550872,IconCommentsArchive as _0x1bd544}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x2fdf0a,ButtonView as _0x75c5a1,ViewCollection as _0xb7b669,createDropdown as _0x5664c2,ListView as _0x263abd,focusChildOnDropdownOpen as _0xb0d285,ListItemView as _0x4c63c3,MenuBarMenuListItemButtonView as _0x5086db,BodyCollection as _0x276dde,BalloonPanelView as _0x375243,ContextualBalloon as _0x4ca3ae,Dialog as _0x16b75d,DialogViewPosition as _0x284766}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x1c3042}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x1434a2}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x326193}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3d6921(){['model'];['view'];constructor(_0xb09930,_0x25a2bb){super(),this['model']=_0xb09930,this['model']['_isAttached']=!0x0,this['view']=_0x25a2bb,this['listenTo'](_0x25a2bb,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x25a2bb,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x25a2bb,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x25a2bb,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x25a2bb,'addComment',(_0x39d500,_0xc9337d)=>this['addComment'](_0xc9337d)),this['listenTo'](_0x25a2bb,'updateComment',(_0x3a1005,_0x35bfdd,_0x5bfe22)=>this['updateComment'](_0x35bfdd,_0x5bfe22)),this['listenTo'](_0x25a2bb,'removeComment',(_0x1d45c4,_0xb4dfb3)=>this['removeComment'](_0xb4dfb3));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x739ca9){this['model']['addComment']({'content':_0x739ca9,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2b65a3,_0xa7eb8a){this['model']['getComment'](_0x2b65a3)['update']({'content':_0xa7eb8a});}['removeComment'](_0xffe473){this['model']['getComment'](_0xffe473)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0xc28efb,_0x589b1c,_0x261564){const t=_0xc28efb['t'];switch(_0x589b1c){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'},_0x261564);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'},_0x261564);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'},_0x261564);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'},_0x261564);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x261564);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'},_0x261564);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'},_0x261564);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'},_0x261564);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x3680ca,_0x2496d5){super(_0x3680ca);const _0xe89a0f=_0xf51739();this['main']=this['createCollection'](),this['editable']=new $t(_0x3680ca,_0x2496d5,void 0x0,{'label':()=>N(_0x3680ca,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x3680ca['uiLanguageDirection'],'lang':_0x3680ca['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xe89a0f},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x41f09a){super(_0x41f09a),this['view']=new Vt(_0x41f09a['locale'],_0x41f09a['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x35adb4=this['editor']['editing']['view'],_0x440320=this['view']['editable'],_0x36cafe=_0x35adb4['document']['getRoot']();_0x440320['name']=_0x36cafe['rootName'],this['view']['render']();const _0x282f77=_0x440320['element'];this['setEditableElement'](_0x440320['name'],_0x282f77),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x35adb4['attachDomRoot'](_0x282f77),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3d6921(_0x27ecd2){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x1d29c2={}){function _0x1ccb21(_0x106e6a){return _0x106e6a['map'](_0x529015=>String['fromCharCode'](_0x529015))['join']('');}(_0x1d29c2=Object['assign']({},_0x1d29c2))['plugins']||(_0x1d29c2['plugins']=Rt['defaultPlugins']),super(_0x1d29c2),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x1ccb21([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1ccb21([0x76,0x69,0x65,0x77])][_0x1ccb21([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1ccb21([0x61,0x75,0x74,0x6f]),this[_0x1ccb21([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1ccb21([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1ccb21([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1ccb21([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1ccb21([0x6f,0x6b])});}['create'](){const _0x3405d2=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3405d2))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x7efe49=>{const _0x6fa86=this['model']['document']['getRoot'](),_0x1a86e5=_0x6fa86&&_0x6fa86['getChild'](_0x6fa86['childCount']-0x1);_0x7efe49['setSelection'](_0x1a86e5,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x294c13=this['editing']['view'],_0x549d01=_0x294c13['document']['getRoot'](),_0x5237f3=_0x549d01['getChild'](0x0);_0x549d01['childCount']>0x1||!_0x5237f3||'p'!=_0x5237f3['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x294c13,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5237f3['placeholder']=this['placeholder']),St({'view':_0x294c13,'element':_0x5237f3,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5237f3);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x24cb3d,_0x5583de={}){super(_0x24cb3d),this['editor']=null,this['_editorConfig']=_0x5583de,this['set']('value',_0x5583de['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x24cb3d,'Reply...')),this['set']('submitLabel',N(_0x24cb3d,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x336e57(),this['focusCycler']=new _0x2fdf0a({'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',(_0x59b64a,_0x588232)=>{this['cancelButtonView']['fire']('execute'),_0x588232();}),this['keystrokes']['set']('Ctrl+Enter',(_0x1947ae,_0x26f288)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x26f288());}),this['on']('submit',(_0x54f750,_0x5a337b)=>{_0x5a337b['length']>0xfde8?(alert(N(_0x24cb3d,'TOO_LONG_COMMENT_ALERT',[_0x5a337b['length'],0xfde8])),_0x54f750['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x36c7e8=this['editor'];this['element']['insertBefore'](_0x36c7e8['ui']['element'],this['element']['firstChild']),_0x36c7e8['model']['document']['on']('change',()=>this['value']=_0x36c7e8['getData']()),_0x36c7e8['bind']('placeholder')['to'](this),this['focusables']['add'](_0x36c7e8['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2d56d7){-0x1===_0x2d56d7?(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:_0x3857e7}=this,_0x44887f=new _0x75c5a1(_0x3857e7);return _0x44887f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x44887f['withText']=!0x0,_0x44887f['bind']('label')['to'](this,'submitLabel'),_0x44887f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x44887f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x11afb4,_0x4325dd)=>!_0x4325dd&&!!_0x11afb4['trim']()),_0x44887f;}['_createCancelButton'](){const {locale:_0x4dae9d}=this,_0x297ad0=new _0x75c5a1(_0x4dae9d);return _0x297ad0['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x297ad0['label']=N(_0x4dae9d,'Cancel'),_0x297ad0['withText']=!0x0,_0x297ad0['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x297ad0;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x266cf8=>{this['focusTracker']['add'](_0x266cf8['element']);}),this['focusables']['on']('change',(_0x16c804,_0x383752)=>{for(const _0x5587c7 of Array['from'](_0x383752['added'])['reverse']())this['focusTracker']['add'](_0x5587c7['element']);});}}class ie extends kt{constructor(_0x3e7fd1,_0x4ff455,_0x50e74d){super(_0x3e7fd1),this['commentInputView']=new os(_0x3e7fd1,_0x50e74d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x54459c,_0xe36df1)=>_0x54459c||!!_0xe36df1),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 _0x38aed4(_0x3e7fd1,_0x4ff455),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'](_0x23e599){this['commentInputView']['focus'](_0x23e599);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x515088,_0x4c3926)=>{const {submitButtonView:_0x3e31c0,cancelButtonView:_0x9bac91,editor:_0x2b5c81}=this['commentInputView'];[_0x3e31c0['element'],_0x9bac91['element'],_0x2b5c81?_0x2b5c81['editing']['view']['getDomRoot']():null]['filter'](_0x30199e=>_0x30199e)['some'](_0x19dc1f=>_0x19dc1f['contains'](_0x4c3926['target']))||(this['focus'](),_0x4c3926['preventDefault']());});}}class rs extends kt{constructor(_0x1e4b07){super(_0x1e4b07);const _0x25ee1e=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x25ee1e['to']('count',_0x1a166b=>N(_0x1e4b07,'NUMBER_OF_COMMENTS',_0x1a166b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x265522,_0x219d44,_0xb0995c){super(_0x265522);const _0x54d168=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x219d44['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x219d44,this['_config']=_0xb0995c,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x599b68=>this['commentViews']['map'](_0x218f29=>_0x218f29['element'])['includes'](_0x599b68['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x265522),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2332c1=>_0x2332c1-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4021b1 of _0x219d44['comments'])this['_handleNewCommentModel'](_0x4021b1);this['_handleInfoComment'](),this['listenTo'](_0x219d44['comments'],'add',(_0x16f15b,_0x4a9acc)=>{const _0x244f55=this['_calculatePosition'](_0x4a9acc);this['length']++,this['_handleNewCommentModel'](_0x4a9acc,_0x244f55),this['refreshVisibleViews']();}),this['listenTo'](_0x219d44['comments'],'remove',(_0x1a7025,_0xed0d4b)=>{this['length']--,this['_handleRemoveCommentModel'](_0xed0d4b),this['refreshVisibleViews']();}),this['listenTo'](_0x219d44,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x219d44,'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',_0x54d168['if']('length','ck-hidden',_0x46f183=>!_0x46f183)],'aria-label':N(_0x265522,'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'](_0x3a6960){-0x1===_0x3a6960?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2495ed of this['commentViews'])_0x2495ed['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4cc088,_0x4b82be){const _0x15ce35=new this['_config']['CommentView'](this['locale'],_0x4cc088,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x15ce35['viewUid']=_0x4cc088['id'],_0x15ce35['delegate']('removeComment')['to'](this),_0x15ce35['delegate']('updateComment')['to'](this),_0x15ce35['delegate']('resolveCommentThread')['to'](this),_0x15ce35['delegate']('editorReady')['to'](this),_0x15ce35['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x15ce35,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x15ce35,_0x4b82be);}['_calculatePosition'](_0x33c8c7){const _0x47e4d1=this['_model']['_findOptimalIndex'](_0x33c8c7);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x33c8c7['authoredAt']?_0x47e4d1-0x1:_0x47e4d1:_0x47e4d1-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x550a89={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x550a89,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x550a89));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x234214){const _0x3cc345=this['commentViews']['remove'](_0x234214['id']);this['stopListening'](_0x3cc345),_0x3cc345['isEditMode']&&this['_updateHasDirtyComment'](),_0x3cc345['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x554a97=>_0x554a97['isEditMode']);}['_rearrangeCollapse'](){const _0x535b50=function(_0x4f6a89){const _0x38e746=new _0x1ed765();for(const _0x27241e of _0x4f6a89)_0x38e746['add'](_0x27241e);return _0x38e746;}(this['commentViews']),_0x56b940=this['_collapsedCommentsView']['count'];for(let _0x840702=0x1;_0x840702<=_0x56b940;_0x840702++)_0x535b50['remove'](0x1);for(const _0x5caf49 of _0x535b50)_0x5caf49['collapse']();_0x56b940>0x0&&_0x535b50['add'](this['_collapsedCommentsView'],0x1),ns(_0x2f1ce2(Array['from'](this['visibleViews']),Array['from'](_0x535b50)),this['visibleViews'],_0x535b50);}['_rearrangeExpand'](){ns(_0x2f1ce2(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xd9e63f of this['visibleViews'])_0xd9e63f['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1b175e=>{this['focusTracker']['add'](_0x1b175e['element']),this['keystrokes']['listenTo'](_0x1b175e['element']);}),this['commentViews']['on']('change',(_0x3f0f8b,_0xb1696c)=>{for(const _0x11d14c of _0xb1696c['removed'])this['focusTracker']['remove'](_0x11d14c['element']),this['keystrokes']['stopListening'](_0x11d14c['element']);for(const _0xdfb3b6 of Array['from'](_0xb1696c['added'])['reverse']())this['focusTracker']['add'](_0xdfb3b6['element']),this['keystrokes']['listenTo'](_0xdfb3b6['element']);});}}function ns(_0xa01ce2,_0x373bf4,_0x6e7034){let _0x201f85=0x0;for(const _0x2f53d4 of _0xa01ce2)switch(_0x2f53d4){case'insert':_0x373bf4['add'](_0x6e7034['get'](_0x201f85),_0x201f85),_0x201f85++;break;case'delete':_0x373bf4['remove'](_0x201f85);break;case'equal':_0x201f85++;}}class oe extends kt{constructor(_0xff139c){super(_0xff139c);const _0x5d8058=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5d8058['to']('contextValue',_0x1e9ad6=>N(_0xff139c,'THREAD_CONTEXT_LABEL',_0x1e9ad6)),'tabindex':-0x1},'children':[{'text':_0x5d8058['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x125f04,_0x3eb1b7){super(_0x125f04);const _0x402672=this['bindTemplate'];this['_model']=_0x3eb1b7,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x57aa55=>!!_0x57aa55),this['bind']('contextValue')['to'](this['_model'],'context',_0x47a855=>_0x47a855&&_0x47a855['value']?this['_trimContextValue'](_0x47a855['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x402672['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 _0x20cd9b=new _0x75c5a1(this['locale']);return _0x20cd9b['label']=N(this['locale'],'Reopen'),_0x20cd9b['tooltip']=N(this['locale'],'Reopen'),_0x20cd9b['icon']=_0x1e6eac,_0x20cd9b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x21fdd8=>!_0x21fdd8),_0x20cd9b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3732c5,_0x22c760)=>_0x3732c5&&_0x22c760),_0x20cd9b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x20cd9b;}['_trimContextValue'](_0x5badaa){if(_0x5badaa['length']<0x96)return _0x5badaa;const _0x4f8d94=_0x5badaa['lastIndexOf']('\x20',0x93);return _0x5badaa['substring'](0x0,_0x4f8d94>-0x1?_0x4f8d94:0x93)+'...';}['_attachContextActions'](){const _0x3fc920=this['element']['querySelector']('.ck-context'),_0x2497e5=_0x3fc920['querySelector']('.ck-context__value');this['listenTo'](_0x3fc920,'mouseenter',()=>{_0x2497e5['offsetWidth']<_0x2497e5['scrollWidth']&&_0x3fc920['classList']['add']('overlay');}),this['listenTo'](_0x3fc920,'mouseleave',()=>{_0x3fc920['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x133720 of this['focusables'])this['focusTracker']['add'](_0x133720['element']),this['keystrokes']['listenTo'](_0x133720['element']);}['_createContextView'](){const _0x30f55a=new oe(this['locale']);return _0x30f55a['bind']('contextValue')['to'](this),_0x30f55a;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5df21c,_0x1f1355,_0x469f45,_0x347fba){super(_0x5df21c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1f1355,this['_localUser']=_0x469f45,this['_config']=_0x347fba,this['commentThreadHeaderView']=new Yt(_0x5df21c,_0x1f1355),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x5df21c,N(_0x5df21c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5df21c,_0x1f1355,Object['assign']({'CommentView':this['_config']['CommentView']},_0x347fba)),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',(_0xa2b323,_0x269b57)=>_0xa2b323||!!_0x269b57),this['bind']('isUnlinked')['to'](_0x1f1355,'unlinkedAt',_0xb437c=>!!_0xb437c),this['bind']('ariaLabel')['to'](this,'length',_0x21b707=>{const _0x3243a0=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x21b707,_0x3243a0]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x343dd2=>_0x343dd2['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1f5d27=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x18569d=_0x1f5d27['commentInputView'];return _0x1f5d27['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x18569d,'value',(_0xe8949d,_0x15a08b,_0x469a14,_0x4e2de4,_0x5227c2)=>!!_0x5227c2||!!_0x4e2de4&&_0x469a14&&!_0x15a08b||_0xe8949d&&_0x469a14&&!_0x15a08b),_0x18569d['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x30b9a0,_0x3d4469,_0x1f44bc)=>{let _0x31259c;return _0x31259c=_0x1f44bc&&_0x3d4469?'Reply\x20to\x20reopen\x20discussion...':_0x30b9a0?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x31259c);}),_0x18569d['bind']('submitLabel')['to'](this,'length',_0x42b364=>N(this['locale'],_0x42b364?'Reply':'Comment')),_0x18569d['on']('submit',(_0x479489,_0x14f4cf)=>{this['fire']('addComment',_0x14f4cf),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x18569d['on']('cancel',()=>{this['focus']();}),_0x18569d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x18569d['on']('cancel',_0x30ae1e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x30ae1e['stop']());}),this['on']('change:isActive',(_0x1e7cdd,_0x196211,_0x19281d)=>{_0x19281d||this['length']||_0x18569d['value']||this['fire']('removeCommentThread');}),_0x1f5d27;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x48163d,_0x399048,_0x246f1f,_0x3a44d0){super(_0x48163d,_0x399048,_0x246f1f,_0x3a44d0),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x48163d,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x102f5a,_0x3e2fdf,_0x230cf2)=>{_0x230cf2||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3f469c,_0x4f77a0,_0x1b4f5c)=>{_0x1b4f5c&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x563efa=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x563efa['if']('isActive','ck-thread--active'),_0x563efa['if']('isUnlinked','ck-thread--unlinked'),_0x563efa['if']('isConfirm','ck-thread--remove-confirmation'),_0x563efa['to']('actionIndicator',_0x2b360e=>_0x2b360e?'ck-thread--'+_0x2b360e:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x563efa['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 _0x501d7c of this['commentsListView']['commentViews'])_0x501d7c['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x11bf59}=this,_0x308d53=this['commentsListView']['commentViews']['get'](0x0);_0x308d53===this['_boundFirstCommentView']||_0x308d53['isSystemComment']||(this['_boundFirstCommentView']=_0x308d53,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x308d53,'actionIndicator',_0x1f5502=>'remove'===_0x1f5502?'remove':null),_0x308d53['placeholder']=N(_0x11bf59,'Write\x20a\x20comment...'),_0x308d53['removeButton']['on']('execute',_0x36f489=>{_0x36f489['stop'](),this['showConfirm'](N(_0x11bf59,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x308d53['focus']();}),_0x308d53['actionBar']['add'](this['resolveButton'],0x0),_0x308d53['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xd5b1c8=new _0x442e48(this['locale']);return _0xd5b1c8['label']=N(this['locale'],'Resolve'),_0xd5b1c8['tooltip']=N(this['locale'],'Resolve'),_0xd5b1c8['icon']=_0x21f99b,_0xd5b1c8['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xd5b1c8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xafa41e=>!_0xafa41e),_0xd5b1c8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x47c3b1,_0x38e9bc)=>_0x47c3b1&&!_0x38e9bc),_0xd5b1c8['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xd5b1c8;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x36efe8){super(_0x36efe8),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5c2ac3,_0x42ed4c,_0x1180d7)=>{this['element']['innerHTML']=_0x1180d7;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x2adef2,_0x13ac81,_0x4ed051){super(_0x2adef2),this['_model']=_0x13ac81,this['_config']=_0x4ed051,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x13ac81,'content',_0x13ac81,'authoredAt',(_0x144d1b,_0x4d90ec)=>N(_0x2adef2,'COMMENT_ARIA_LABEL',[_0x13ac81['author']['name'],_0x4ed051['formatDateTime'](_0x4d90ec),new DOMParser()['parseFromString'](_0x144d1b,'text/html')['body']['textContent'],_0x13ac81['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x2adef2,N(_0x2adef2,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xb7b669(),this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x13ef5f=>_0x13ef5f['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x1a3749=new es(this['locale']);return _0x1a3749['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x322280,_0x5ce42f)=>_0x5ce42f?_0x350498(_0x322280,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x322280),_0x1a3749;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x388674=new os(this['locale'],this['_config']['editorConfig']);return _0x388674['value']=this['_model']['content'],_0x388674['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x388674['submitLabel']=N(this['locale'],'Save'),_0x388674['on']('submit',(_0x1edff8,_0xb872d7)=>{this['fire']('updateComment',this['_model']['id'],_0xb872d7),this['switchToDisplayMode'](),this['focus']();}),_0x388674['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x388674['once']('editorReady',()=>{_0x388674['focus']();}),_0x388674['createEditor'](),_0x388674['delegate']('editorReady')['to'](this),_0x388674['delegate']('editorDestroyed')['to'](this),_0x388674;}['_setupKeyboardNavigation'](){const _0x410346=this['element'];this['keystrokes']['listenTo'](_0x410346);for(const _0x3d15e8 of this['focusables'])this['focusTracker']['add'](_0x3d15e8['element']),this['keystrokes']['listenTo'](_0x3d15e8['element']);this['focusables']['on']('change',(_0x1f47eb,_0x344c11)=>{for(const _0x40b29a of _0x344c11['removed'])this['focusTracker']['remove'](_0x40b29a['element']),this['keystrokes']['stopListening'](_0x40b29a['element']);for(const _0x112c10 of _0x344c11['added'])this['focusTracker']['add'](_0x112c10['element']),this['keystrokes']['listenTo'](_0x112c10['element']);}),this['keystrokes']['set']('enter',(_0x149f9a,_0x10c28b)=>{_0x410346===_0x149f9a['target']&&(this['focusCycler']['focusFirst'](),_0x10c28b());}),this['keystrokes']['set']('esc',(_0x228b05,_0x576440)=>{_0x410346!==_0x228b05['target']&&(this['focus'](),_0x576440());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x312871,_0x257610,_0x1c9ea9){super(_0x312871,_0x257610,_0x1c9ea9),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x312871,'Reply...')),this['bind']('authoredAt')['to'](_0x257610),this['bind']('resolvedAt')['to'](_0x257610),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 _0x38aed4(_0x312871,_0x257610['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x257610,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0xf088a0=this['bindTemplate'],_0x3bd068=[{'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':_0xf088a0['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0xf088a0['to']('authoredAt',_0x30da8e=>this['_config']['formatDateTime'](_0x30da8e))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0xf088a0['if']('isEditMode','ck-comment__actions--hidden'),_0xf088a0['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']&&_0x3bd068['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0xf088a0['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0xf088a0['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0xf088a0['if']('isEditMode','ck-comment--edit'),_0xf088a0['if']('isSystemComment','ck-comment--info'),_0xf088a0['to']('actionIndicator',_0x45f726=>_0x45f726?'ck-comment--'+_0x45f726:'')],'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':_0x3bd068}]}]};}['_createEditButton'](){const _0x4ce6dd=new _0x75c5a1(this['locale']);return _0x4ce6dd['label']=N(this['locale'],'Edit'),_0x4ce6dd['icon']=_0x8301b6,_0x4ce6dd['withText']=!0x0,_0x4ce6dd['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x4ce6dd['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x51a036=>!_0x51a036),_0x4ce6dd['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x4ce6dd['on']('execute',()=>this['switchToEditMode']()),_0x4ce6dd;}['_createRemoveButton'](){const _0x174d0d=new _0x75c5a1(this['locale']);return _0x174d0d['label']=N(this['locale'],'Remove'),_0x174d0d['icon']=_0x1b2265,_0x174d0d['withText']=!0x0,_0x174d0d['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x174d0d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5d6a24=>!_0x5d6a24),_0x174d0d['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x174d0d['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x174d0d;}['_createDropdown'](){const _0x376041=_0x5664c2(this['locale'],_0x5638f8),_0xb70e5e=_0x376041['panelView']['children'],_0x4cb38b=new _0x263abd(this['locale']),_0x23897d=_0x376041['bindTemplate'];_0xb0d285(_0x376041,()=>this['items']['find'](_0x325389=>_0x325389['isVisible'])),_0x376041['extendTemplate']({'attributes':{'class':[_0x23897d['if']('isVisible','ck-hidden',_0x5980d4=>!_0x5980d4)]}});const _0x567c4e=(_0x47719f,_0x2fe61f=-0x1)=>{const _0x1dbf06=new _0x4c63c3(this['locale']);_0x1dbf06['children']['add'](_0x47719f);const _0x19c055=_0x2fe61f>-0x1?_0x2fe61f:_0x4cb38b['items']['length'];_0x4cb38b['items']['add'](_0x1dbf06,_0x19c055);const _0x4c0561=Array['from'](this['items']);_0x376041['unbind']('isEnabled','isVisible'),_0x376041['bind']('isEnabled')['toMany'](_0x4c0561,'isEnabled',(..._0x5f481b)=>_0x5f481b['some'](_0x5f2764=>_0x5f2764)),_0x376041['bind']('isVisible')['toMany'](_0x4c0561,'isVisible',(..._0x137dae)=>_0x137dae['some'](_0x4f690d=>_0x4f690d));};_0x376041['panelPosition']='sw',_0x376041['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x4068bd});for(const _0x3ac4e7 of this['items'])_0x567c4e(_0x3ac4e7);return _0xb70e5e['add'](_0x4cb38b),_0x376041['listenTo'](this['items'],'add',(_0xd34051,_0x3a5e72,_0x1616c5)=>{_0x567c4e(_0x3a5e72,_0x1616c5);}),_0x376041['listenTo'](this['items'],'remove',(_0x2df250,_0x1aa851,_0x4ce522)=>{_0x4cb38b['items']['remove'](_0x4ce522);}),_0x376041;}['_attachActions'](_0x12b366,_0x335d67){const _0x550032=_0x12b366&&_0x12b366['element'];_0x550032&&(this['listenTo'](_0x550032,'mouseenter',()=>this['actionIndicator']=_0x335d67),this['listenTo'](_0x550032,'focus',()=>this['actionIndicator']=_0x335d67),this['listenTo'](_0x550032,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x550032,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3bcb38=super['_createCommentInputView']();return _0x3bcb38['bind']('placeholder')['to'](this),_0x3bcb38;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x26dbbf){const _0x136982=Dt(_0x26dbbf,0x1e),_0x10577a=new MutationObserver(_0x122144=>{for(const _0x57fb97 of _0x122144)('attributes'==_0x57fb97['type']&&'class'==_0x57fb97['attributeName']||'childList'==_0x57fb97['type']||'characterData'==_0x57fb97['type'])&&_0x136982();});return{'attach'(_0x752f4d){_0x10577a['observe'](_0x752f4d,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x10577a['disconnect'](),_0x136982['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x434a74,_0x3af482){super(_0x434a74),this['id']=_0xf51739(),this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x1837f9,_0x5e8390)=>this['fire']('Esc',_0x5e8390)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x3af482),this['mainView']=_0x3af482;const _0x2b2f85=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x2b2f85['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 _0x449e4a=this['element']['clientHeight'];_0x449e4a&&(this['height']=_0x449e4a);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3d6921(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x59f459,target:_0xe29a73,type:_0x2ddda2,isVisible:_0xa0bcf8=!0x0}){super(),this['view']=_0x59f459,this['view']['element']||this['view']['render'](),this['_type']=_0x2ddda2,this['_target']=_0xe29a73,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1ed765([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1be175,_0x65a7a8)=>{this['view']['focusTracker']['add'](_0x65a7a8);}),this['focusableElements']['on']('remove',(_0x1d38a6,_0x4fc520)=>{this['view']['focusTracker']['remove'](_0x4fc520);}),this['set']('isVisible',_0xa0bcf8);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x8df51c=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x8df51c),_0x8df51c;}get['targetRect'](){const _0x4a2a98=this['target'];if(null===_0x4a2a98)return null;if(_0x4a2a98 instanceof _0x29c0c7)return _0x4a2a98;const _0x3d1bc7=_0x4a2a98['filter'](_0x5d1dee=>function(_0x31b9d7){const _0x4fdd4d=_0x31b9d7['offsetParent'];if(_0x4fdd4d)return!0x0;const _0xa78424=_0x31b9d7['getClientRects']()['item'](0x0);return!!_0xa78424;}(_0x5d1dee));return 0x0===_0x3d1bc7['length']?null:new _0x29c0c7(_0x3d1bc7[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x35d5d8){this['view']['isActive']=_0x35d5d8,this['view']['mainView']['isActive']=_0x35d5d8;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x20f1b4){if(!(null===_0x20f1b4||_0x20f1b4 instanceof _0x29c0c7||Array['isArray'](_0x20f1b4)&&_0x20f1b4['every'](_0x5721f2=>fi(_0x5721f2))))throw new _0x59f856('annotation-invalid-target',null,{'target':_0x20f1b4});}['_getNormalizedTarget'](){const _0x5ded65='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5ded65)?[_0x5ded65]:_0x5ded65;}}function fi(_0x270903){return null!==_0x270903&&'object'==typeof _0x270903&&'nodeType'in _0x270903&&0x1===_0x270903['nodeType'];}class S extends _0x1ed765{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x46db6b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x336e57(),this['_focusTracker']['on']('change:isFocused',(_0x4d1569,_0x53af99,_0x227823)=>{_0x227823||this['fire']('blur');});for(const _0x3daa21 of _0x46db6b)this['add'](_0x3daa21);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3771c4){if(this['has'](_0x3771c4))throw new _0x59f856('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3771c4['innerView'],_0x3771c4),this['_viewToAnnotation']['set'](_0x3771c4['view'],_0x3771c4);for(const _0x55f936 of _0x3771c4['focusableElements'])this['_focusTracker']['add'](_0x55f936);this['listenTo'](_0x3771c4['focusableElements'],'add',(_0x3dbba6,_0x51137a)=>{this['_focusTracker']['add'](_0x51137a);}),this['listenTo'](_0x3771c4['focusableElements'],'remove',(_0x197dd8,_0x5ee6d0)=>{this['_focusTracker']['remove'](_0x5ee6d0);}),this['listenTo'](_0x3771c4['view']['focusTracker'],'change:isFocused',(_0x1e1a7a,_0x43ff72,_0x293066)=>{_0x293066&&this['fire']('focus',_0x3771c4);}),_0x3771c4['updateTargetRect']();const _0x30cc43=this['_getOrderInContent'](_0x3771c4['view']['targetRect']);return super['add'](_0x3771c4,_0x30cc43);}['remove'](_0x34a44c){if(!this['has'](_0x34a44c))throw new _0x59f856('annotationcollection-not-existing-item',null);this['stopListening'](_0x34a44c['view']['focusTracker']),this['stopListening'](_0x34a44c['focusableElements']);for(const _0x665194 of _0x34a44c['focusableElements'])this['_focusTracker']['remove'](_0x665194);return this['_viewToAnnotation']['delete'](_0x34a44c['view']),this['_innerViewToAnnotation']['delete'](_0x34a44c['innerView']),super['remove'](_0x34a44c);}['getByInnerView'](_0x3c15f0){return this['_innerViewToAnnotation']['get'](_0x3c15f0);}['getByView'](_0x274918){return this['_viewToAnnotation']['get'](_0x274918);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2afe67 of this)_0x2afe67['updateTargetRect']();this['_sort']();}['_sort'](){const _0x31362a=Array['from'](this)['sort']((_0x4fe4ee,_0x597602)=>w(_0x4fe4ee['view']['targetRect'],_0x597602['view']['targetRect']));for(let _0x14e101=_0x31362a['length']-0x1;_0x14e101>0x0;_0x14e101--){const _0x5795d3=_0x31362a[_0x14e101];_0x14e101!==this['getIndex'](_0x5795d3)&&(this['remove'](_0x5795d3),this['add'](_0x5795d3));}}['_getOrderInContent'](_0x14fed3){let _0x2dde8a=0x0;if(!_0x14fed3)return this['length'];for(const _0x2806ce of this){const _0x285aa3=_0x2806ce['view']['targetRect'];if(_0x285aa3){if(w(_0x14fed3,_0x285aa3)<0x0)return _0x2dde8a;_0x2dde8a++;}}return _0x2dde8a;}}function v({source:_0x35dc90,target:_0x309e22,filter:_0x4cc054}){for(const _0xca494a of _0x35dc90)_0x4cc054(_0xca494a)&&_0x309e22['add'](_0xca494a);_0x309e22['listenTo'](_0x35dc90,'add',(_0x146847,_0x176f53)=>{_0x4cc054(_0x176f53)&&_0x309e22['add'](_0x176f53);}),_0x309e22['listenTo'](_0x35dc90,'remove',(_0x2fdc57,_0x25609d)=>{_0x309e22['has'](_0x25609d)&&_0x309e22['remove'](_0x25609d);});}function w(_0x1f8544,_0x22134a){if(null===_0x1f8544&&null===_0x22134a)return 0x0;if(null===_0x1f8544)return-0x1;if(null===_0x22134a)return 0x1;const _0x820c29=_0x1f8544['top']-_0x22134a['top'];return 0x0==_0x820c29?_0x1f8544['left']-_0x22134a['left']:_0x820c29;}class y extends _0x35edc8{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f8d7e){if(super(_0x2f8d7e),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2f8d7e instanceof _0x27ecd2){const _0x1f4791=_0x2f8d7e['locale'];_0x2f8d7e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4e61ae){this['collection']['add'](_0x4e61ae);}['remove'](_0x5e193e){this['collection']['remove'](_0x5e193e),_0x5e193e['destroy']();}['refreshVisibility'](){for(const _0x419b00 of this['collection'])_0x419b00['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x18ba62){return this['collection']['getByInnerView'](_0x18ba62);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1740ec of this['collection'])_0x1740ec['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x411945){this['fire']('_activateAnnotation',_0x411945);}['createAnnotation'](_0x1f4eff){return new T(_0x1f4eff);}['createAnnotationView'](_0x3bb07c,_0x5bc853){return new E(_0x3bb07c,_0x5bc853);}['_addActiveAnnotation'](_0x24f410){const _0x16f68e=new Set(this['activeAnnotations']);_0x16f68e['add'](_0x24f410),this['activeAnnotations']=_0x16f68e;}['_removeActiveAnnotation'](_0x145e5e){const _0x469141=new Set(this['activeAnnotations']);_0x469141['delete'](_0x145e5e),this['activeAnnotations']=_0x469141;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4fff6d=this['collection'],_0x39bd07=this['_visibleAnnotations'];function _0x2f4a63(_0x5abf83){const _0x22ef53=_0x5abf83['source'];_0x22ef53['isVisible']&&!_0x39bd07['has'](_0x22ef53)?_0x39bd07['add'](_0x22ef53):!_0x22ef53['isVisible']&&_0x39bd07['has'](_0x22ef53)&&_0x39bd07['remove'](_0x22ef53),_0x22ef53['view']['focusTracker']['remove'](_0x22ef53['view']['element']),_0x22ef53['view']['focusTracker']['add'](_0x22ef53['view']['element']);}this['listenTo'](_0x4fff6d,'add',(_0x664b6f,_0x502f08)=>{_0x502f08['isVisible']&&_0x39bd07['add'](_0x502f08),this['listenTo'](_0x502f08,'change:isVisible',_0x2f4a63);}),this['listenTo'](_0x4fff6d,'remove',(_0x37eb15,_0x1987ea)=>{_0x39bd07['has'](_0x1987ea)&&_0x39bd07['remove'](_0x1987ea),this['stopListening'](_0x1987ea,'change:isVisible',_0x2f4a63);});}['_setupEnterAnnotationKeystroke'](){const _0x4fcabd=_0x35b890=>{_0x35b890['on']('ready',()=>{_0x35b890['keystrokes']['set'](_0x1434a2,(_0x104999,_0x85772b)=>{const _0x57b9bb=_0x1a7d5e(this['activeAnnotations']['values']());_0x57b9bb&&(_0x57b9bb['view']['focus'](),_0x85772b());});});};this['context']instanceof _0x27ecd2?_0x4fcabd(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xe7582e,_0xd7bc4b)=>{_0x4fcabd(_0xd7bc4b);});}['_setupEscapeAnnotationHandling'](){const _0x5d542d=_0x21c53f=>{const _0x10d867=_0x21c53f['source'],_0x443e1e=[];let _0x5b0b51;if(Array['isArray'](_0x10d867['target'])){_0x5b0b51=_0x10d867['target'][0x0],this['context']instanceof _0x27ecd2?_0x443e1e['push'](this['context']):this['context']['editors']&&_0x443e1e['push'](...this['context']['editors']);for(const _0x4bf68b of _0x443e1e)for(const _0xee3034 of _0x4bf68b['editing']['view']['domRoots']['values']())if(_0xee3034['contains'](_0x5b0b51))return void _0x4bf68b['editing']['view']['focus']();_0x5b0b51['focus']();}};this['listenTo'](this['collection'],'add',(_0x1bf9f9,_0x280fa6)=>{this['listenTo'](_0x280fa6,'escape',_0x5d542d,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4016f2,_0x53eb88)=>{this['stopListening'](_0x53eb88,'escape',_0x5d542d);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x35edc8{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ebb64){super(_0x2ebb64),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x15fd65=this['context']['config'];_0x15fd65['define']('comments.maxCommentsWhenCollapsed',0x2),_0x15fd65['define']('comments.maxThreadTotalWeight',0x1f4),_0x15fd65['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x15fd65['define']('comments.CommentThreadView',gt),_0x15fd65['define']('comments.CommentView',Tt),_0x15fd65['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x575029=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x523525,_0x590a2b)=>this['_addCommentThread'](_0x590a2b)),this['on']('submitCommentThread',(_0x156a27,_0x4b5b17)=>this['_submitCommentThread'](_0x4b5b17)),this['on']('resolveCommentThread',(_0x5ac5a6,_0x58f6dc)=>this['_resolveCommentThread'](_0x58f6dc)),this['on']('resolveCommentThread',(_0x1fe6b7,_0x58bf6f)=>this['_updateActiveAnnotation'](_0x58bf6f),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x34c5a7,_0x6759ba)=>this['_reopenCommentThread'](_0x6759ba)),this['on']('reopenCommentThread',(_0x3892ec,_0xc5c211)=>this['_updateActiveAnnotation'](_0xc5c211),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x443124,_0x3a30fb)=>this['_removeCommentThread'](_0x3a30fb)),this['on']('updateCommentThread',(_0x59810d,_0xc37803)=>this['_updateCommentThread'](_0xc37803)),this['on']('updateCommentThread',(_0x3ae95f,_0x7d4955)=>this['_updateActiveAnnotation'](_0x7d4955),{'priority':'lowest'}),this['on']('addComment',(_0x194499,_0x389e71)=>this['_addComment'](_0x389e71)),this['on']('updateComment',(_0x52a5de,_0x1c8deb)=>this['_updateComment'](_0x1c8deb)),this['on']('removeComment',(_0x2e3901,_0x1fbde4)=>this['_removeComment'](_0x1fbde4)),this['on']('addComment',(_0xf53c4c,{threadId:_0x42a16d,isFromAdapter:_0xdc2bf0})=>{if(_0xdc2bf0)return;const _0x3c5422=this['getCommentThread'](_0x42a16d),_0x2b4f55=_0x3c5422&&this['_threadToController']['get'](_0x3c5422);_0x2b4f55&&_0x2b4f55['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x575029,'change:activeAnnotations',(_0x5af11f,_0x20a7e9,_0x5b076d)=>{const _0x50d153=Array['from'](_0x5b076d)['map'](_0x546ef5=>this['_viewToController']['get'](_0x546ef5['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x50d153?_0x50d153['model']:null;});}set['adapter'](_0x4c9d34){if(this['_adapter'])throw new _0x59f856('commentsrepository-adapter-already-set');this['_adapter']=_0x4c9d34;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x33ecfc=_t,threadId:_0x177604=_0xf51739(),comments:_0x249fb2=[],unlinkedAt:_0x473eb4=null,resolvedAt:_0x315f60=null,resolvedBy:_0x97262c=null,target:_0x3dda98=null,context:_0x19076d=null,attributes:_0x518c58={},isResolvable:_0x39c552=!0x0,isSubmitted:_0x4b4006=!0x1,isFromAdapter:_0x281ab6=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x33ecfc),{'channelId':_0x33ecfc,'threadId':_0x177604,'comments':_0x249fb2,'unlinkedAt':_0x473eb4,'resolvedAt':_0x315f60,'resolvedBy':_0x97262c,'target':_0x3dda98,'context':_0x19076d,'attributes':_0x518c58,'isFromAdapter':_0x281ab6,'isResolvable':_0x39c552,'isSubmitted':_0x4b4006}),this['getCommentThread'](_0x177604);}['openNewCommentThread']({channelId:_0x5d102e=_t,threadId:_0x94ce7f=_0xf51739(),target:_0x62c3c4,context:_0x408e34=null,isResolvable:_0x55338d=!0x0}){if(this['_readOnlyChannels']['has'](_0x5d102e)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x62c3c4)throw new _0x59f856('commentsrepository-missing-target');const _0xa5a061=this['addCommentThread']({'channelId':_0x5d102e,'threadId':_0x94ce7f,'target':_0x62c3c4,'context':_0x408e34,'isResolvable':_0x55338d});if(!_0xa5a061)return null;const _0x5a9f46=this['_threadToController']['get'](_0xa5a061),_0x36650f=_0x5a9f46['view']['commentThreadInputView']['commentInputView'],_0x125755=this['context']['plugins']['get'](y),_0x52544f=_0x125755['getByInnerView'](_0x5a9f46['view']);return _0x125755['activate'](_0x52544f),_0x36650f['once']('editorReady',()=>_0x36650f['focus']()),_0xa5a061;}['hasCommentThread'](_0xfd108d){if('string'!=typeof _0xfd108d)throw new _0x59f856('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xfd108d);}['updateCommentThread']({channelId:_0x4e44fd=_t,threadId:_0x659221,context:_0x165f2c,unlinkedAt:_0x1f12ef,attributes:_0x17758d,isFromAdapter:_0x27d9e0=!0x1}){return this['fire'](Nt('updateCommentThread',_0x4e44fd),{'channelId':_0x4e44fd,'threadId':_0x659221,'context':_0x165f2c,'unlinkedAt':_0x1f12ef,'attributes':_0x17758d,'isFromAdapter':_0x27d9e0}),this['getCommentThread'](_0x659221);}['getCommentThread'](_0x180e95){if('string'!=typeof _0x180e95)throw new _0x59f856('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x180e95);}['fetchCommentThread']({channelId:_0x1e9b1a,threadId:_0x1bad33}={}){const _0x31fe1d=this['getCommentThread'](_0x1bad33);if(_0x31fe1d)return Promise['resolve'](_0x31fe1d);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x59f856('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1e9b1a,'threadId':_0x1bad33})['then'](_0x47dcea=>this['hasCommentThread'](_0x1bad33)?this['getCommentThread'](_0x1bad33):_0x47dcea?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1e9b1a},_0x47dcea)):void 0x0)['catch'](_0x71e1c2=>{throw console['error'](_0x71e1c2),new _0x59f856('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x280a27,skipNotAttached:_0x434672=!0x1,skipEmpty:_0x5c22af=!0x1,toJSON:_0x5cd4ac=!0x1}={}){const _0x3afaa9=[];for(const _0x196c91 of this['_threads']['values']())_0x280a27&&_0x196c91['channelId']!==_0x280a27||_0x434672&&!_0x196c91['isAttached']||_0x5c22af&&0x0===_0x196c91['length']||_0x3afaa9['push'](_0x196c91);return _0x5cd4ac?_0x3afaa9['map'](_0x2783ec=>_0x2783ec['toJSON']()):_0x3afaa9;}['getAnnotationForCommentThread'](_0x2059da){const _0x3db28b=this['_threadToController']['get'](_0x2059da);if(!_0x3db28b)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x3db28b['view'])||null;}['getCommentThreadForAnnotation'](_0x52726a){const _0x36f163=this['_viewToController']['get'](_0x52726a['innerView']);return _0x36f163?_0x36f163['model']:null;}['setActiveCommentThread'](_0xa3a255){const _0x4cefe0=this['context']['plugins']['get'](y);if(!_0xa3a255)return void(this['activeCommentThread']&&_0x4cefe0['deactivateAll']());const _0x24f98a=this['getCommentThread'](_0xa3a255);if(!_0x24f98a)throw new _0x59f856('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xa3a255});if(!this['_threadToController']['has'](_0x24f98a))throw new _0x59f856('commentsrepository-active-not-attached',null,{'threadId':_0xa3a255});const _0x5216a5=_0x4cefe0['getByInnerView'](this['_threadToController']['get'](_0x24f98a)['view']);_0x4cefe0['activate'](_0x5216a5);}['switchReadOnly'](_0x550317,_0x4e8947){_0x550317?this['_readOnlyChannels']['add'](_0x4e8947):this['_readOnlyChannels']['delete'](_0x4e8947),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x182b17){return this['_readOnlyChannels']['has'](_0x182b17)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xcba4f3,_0xe7ea65){return new vt(_0xcba4f3,_0xe7ea65);}['setPermissions'](_0xba8b38,_0x24d212=_t){this['_permissions']['set'](_0x24d212,_0xba8b38),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x15e8ae=_t){return this['_permissions']['has'](_0x15e8ae)?this['_permissions']['get'](_0x15e8ae):bt;}['_addCommentThread']({channelId:_0x11a41c,threadId:_0xae1802,comments:_0x242497,unlinkedAt:_0x3a296f,resolvedAt:_0x50e397,resolvedBy:_0x37f059,target:_0x2eee15,context:_0x156c2b,attributes:_0x538399,isFromAdapter:_0x2a862f,isResolvable:_0x8ab6df,isSubmitted:_0x1fee56}){if('string'!=typeof _0xae1802)throw new _0x59f856('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xae1802});if(this['hasCommentThread'](_0xae1802))throw new _0x59f856('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xae1802});const _0x4b5ca5=new pi(this,{'channelId':_0x11a41c,'id':_0xae1802,'context':_0x156c2b,'attributes':_0x538399,'unlinkedAt':_0x3a296f,'resolvedAt':_0x50e397,'resolvedBy':_0x37f059?this['context']['plugins']['get'](it)['getUser'](_0x37f059):null,'isResolvable':_0x8ab6df,'isSubmitted':_0x1fee56||_0x2a862f});this['_threads']['set'](_0xae1802,_0x4b5ca5);for(const _0x575c88 of _0x242497)_0x4b5ca5['_add'](this['_createNewComment']({'threadId':_0xae1802,..._0x575c88}));return _0x2eee15&&_0x4b5ca5['attachTo'](_0x2eee15),_0x2a862f||!_0x4b5ca5['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x11a41c,'threadId':_0xae1802});}['_submitCommentThread']({channelId:_0x3d75ed,threadId:_0xa81c09}){if(!this['hasCommentThread'](_0xa81c09))throw new _0x59f856('commentsrepository-missing-comment-thread',this);const _0x5a7db7=this['getCommentThread'](_0xa81c09);if(_0x5a7db7['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x1bf3ed,comments:_0x2fa7f2,resolvedAt:_0x444ab1,resolvedBy:_0x2a9f70,context:_0x4d843f,attributes:_0x549ef7}=_0x5a7db7,_0x5c8551=this['context']['plugins']['get']('PendingActions'),_0x3a43c0=_0x5c8551['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3d75ed,'threadId':_0x1bf3ed,'comments':_0x2fa7f2['map'](_0x2cb12b=>_0x2cb12b['toJSON']()),'resolvedAt':_0x444ab1,'resolvedBy':_0x2a9f70?_0x2a9f70['id']:_0x2a9f70,'context':_0x4d843f,'attributes':_0x549ef7})['then'](({comments:_0x4ce7c7})=>{_0x5c8551['remove'](_0x3a43c0);for(const _0x5adebe of _0x4ce7c7)this['_updateComment']({'channelId':_0x3d75ed,'threadId':_0xa81c09,'commentId':_0x5adebe['commentId'],'createdAt':_0x5adebe['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x247bac=>{throw console['error'](_0x247bac),new _0x59f856('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4627dc,target:_0x52ba77}){const _0x2944bc=this['getCommentThread'](_0x4627dc);if(!_0x2944bc)throw new _0x59f856('commentsrepository-attach-missing-comment-thread',this);const _0x4c32cd=this['context']['plugins']['get']('PendingActions'),_0x165700=this['context']['plugins']['get'](y),_0x9b131=this['_createCommentThreadView'](_0x2944bc),_0x13919e=new vt(_0x2944bc,_0x9b131);let _0x2b97a2=null;_0x9b131['on']('change:isDirty',(_0x3dd858,_0x3d57e1,_0x5f3637)=>{_0x5f3637?_0x2b97a2=_0x4c32cd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2b97a2&&(_0x4c32cd['remove'](_0x2b97a2),_0x2b97a2=null);}),this['_threadToController']['set'](_0x2944bc,_0x13919e),this['_viewToController']['set'](_0x9b131,_0x13919e);const _0x5c8bef=new E(this['context']['locale'],_0x9b131);_0x5c8bef['bind']('length')['to'](_0x9b131),_0x5c8bef['bind']('isDirty')['to'](_0x9b131,'isDirty',_0x9b131,'length',(_0x344499,_0x2600d8)=>_0x344499||!_0x2600d8),_0x5c8bef['bind']('isActive')['to'](_0x9b131),_0x5c8bef['type']='comment';const _0xd391d6=new T({'view':_0x5c8bef,'target':_0x52ba77,'type':'comment','isVisible':!_0x2944bc['archivedAt']&&!!('function'==typeof _0x52ba77?_0x52ba77():_0x52ba77)});return _0x9b131['on']('escape',()=>{_0xd391d6['fire']('escape');}),this['_bindAnnotationToEditors'](_0x9b131,_0xd391d6),_0x165700['add'](_0xd391d6),_0xd391d6;}['_bindAnnotationToEditors'](_0x592a41,_0x1ac6a7){this['listenTo'](_0x592a41,'editorReady',(_0xfaaf52,_0x400628)=>{const _0x1777ea=_0x400628['ui']['view']['body']['bodyCollectionContainer'];_0x1ac6a7['focusableElements']['add'](_0x1777ea),this['context']instanceof _0x27ecd2&&this['context']['ui']['focusTracker']['add'](_0x1777ea);},{'priority':'highest'}),this['listenTo'](_0x592a41,'editorDestroyed',(_0x4a4345,_0x3ced4d)=>{const _0x3efca0=_0x3ced4d['ui']['view']['body']['bodyCollectionContainer'];_0x1ac6a7['focusableElements']['has'](_0x3efca0)&&_0x1ac6a7['focusableElements']['remove'](_0x3efca0),this['context']instanceof _0x27ecd2&&this['context']['ui']['focusTracker']['remove'](_0x3efca0);});}['_unbindEditors'](_0x1ea9a5){this['stopListening'](_0x1ea9a5,'editorReady'),this['stopListening'](_0x1ea9a5,'editorDestroyed');}['_createCommentThreadView'](_0x68f6cd){const _0x51cedb=this['context']['plugins']['get'](it),{config:_0x3548ac,locale:_0x870a6b}=this['context'],_0x502a4a=pt(_0x3548ac['get']('locale'),_0x870a6b);return new(0x0,(_0x3548ac['get']('comments'))['CommentThreadView'])(_0x870a6b,_0x68f6cd,_0x51cedb['me'],{'editorConfig':{..._0x3548ac['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3548ac['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3548ac['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3548ac['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3548ac['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x502a4a,'CommentView':_0x3548ac['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2e9cfd,channelId:_0x2bd21f,resolvedAt:_0x232ff1,resolvedBy:_0x314742,isFromAdapter:_0x571d1f}){if(!this['hasCommentThread'](_0x2e9cfd))throw new _0x59f856('commentsrepository-missing-comment-thread',null,{'threadId':_0x2e9cfd});const _0x1fc29c=this['getCommentThread'](_0x2e9cfd);if(_0x1fc29c['isResolved'])throw new _0x59f856('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2e9cfd});const _0x3c808b=this['context']['plugins']['get'](it);if(_0x1fc29c['resolvedBy']=_0x3c808b['getUser'](_0x314742),_0x1fc29c['resolvedAt']=_0x232ff1,_0x571d1f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x23a252=this['context']['plugins']['get']('PendingActions'),_0x43ba95=_0x23a252['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2bd21f,'threadId':_0x2e9cfd})['then'](({resolvedAt:_0x64b021,resolvedBy:_0x37f941})=>{_0x23a252['remove'](_0x43ba95),_0x1fc29c['resolvedBy']['id']!==_0x37f941&&(_0x1fc29c['resolvedBy']=_0x3c808b['getUser'](_0x37f941)),_0x1fc29c['resolvedAt']=_0x64b021;})['catch'](_0x23393e=>{throw console['error'](_0x23393e),new _0x59f856('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2db956,channelId:_0x1a0cb6,isFromAdapter:_0x1a8be3}){if(!this['hasCommentThread'](_0x2db956))throw new _0x59f856('commentsrepository-missing-comment-thread',null,{'threadId':_0x2db956});const _0x24a570=this['getCommentThread'](_0x2db956);if(!_0x24a570['isResolved'])throw new _0x59f856('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2db956});if(_0x24a570['resolvedBy']=null,_0x24a570['resolvedAt']=null,_0x1a8be3||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x59949b=this['context']['plugins']['get']('PendingActions'),_0x34e8c9=_0x59949b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1a0cb6,'threadId':_0x2db956})['then'](()=>_0x59949b['remove'](_0x34e8c9))['catch'](_0x25e3b9=>{throw console['error'](_0x25e3b9),new _0x59f856('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2f3d6b,isFromAdapter:_0x4c42c2}){const _0x3f5f50=this['getCommentThread'](_0x2f3d6b);if(!_0x3f5f50)throw new _0x59f856('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2f3d6b),this['_threads']['delete'](_0x2f3d6b),!_0x3f5f50['isSubmitted']||_0x4c42c2||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1e9603=this['context']['plugins']['get']('PendingActions'),{channelId:_0xfa3176}=_0x3f5f50,_0x360016=_0x1e9603['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xfa3176,'threadId':_0x2f3d6b})['then'](()=>_0x1e9603['remove'](_0x360016))['catch'](_0x5afcde=>{throw console['error'](_0x5afcde),new _0x59f856('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2282b2,unlinkedAt:_0x4060dd,context:_0x1157a8,attributes:_0x26c22c,isFromAdapter:_0x4e551e}){if('string'!=typeof _0x2282b2)throw new _0x59f856('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2282b2});if(!this['hasCommentThread'](_0x2282b2))throw new _0x59f856('commentsrepository-missing-comment-thread',null,{'threadId':_0x2282b2});const _0x15839c=this['getCommentThread'](_0x2282b2);let _0x4a6fcb=!0x1;if(void 0x0!==_0x1157a8&&_0x15839c['context']!==_0x1157a8&&(_0x15839c['context']=_0x1157a8,_0x4a6fcb=!0x0),void 0x0!==_0x4060dd&&_0x15839c['unlinkedAt']!==_0x4060dd&&(_0x15839c['unlinkedAt']=_0x4060dd,_0x4a6fcb=!0x0),_0x26c22c&&!At(_0x26c22c,_0x15839c['attributes'])&&(_0x15839c['attributes']=_0x26c22c,_0x4a6fcb=!0x0),!_0x4a6fcb)return Promise['resolve']();if(!_0x15839c['isSubmitted']||_0x4e551e||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1b3675=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2aa4cb}=_0x15839c,_0x445bc0=_0x1b3675['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2aa4cb,'threadId':_0x2282b2,'context':_0x1157a8,'unlinkedAt':_0x4060dd,'attributes':_0x26c22c})['then'](()=>_0x1b3675['remove'](_0x445bc0))['catch'](_0x4a8746=>{throw console['error'](_0x4a8746),new _0x59f856('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3249bc){const _0x1de10e=this['context']['plugins']['get'](y),_0x2dd731=this['getCommentThread'](_0x3249bc);if(_0x2dd731['_isAttached']=!0x1,this['_threadToController']['has'](_0x2dd731)){const _0x5d3ad4=this['_threadToController']['get'](_0x2dd731),_0x5c5b67=_0x5d3ad4['view'],_0x5d8dec=_0x1de10e['getByInnerView'](_0x5c5b67);this['_threadToController']['delete'](_0x2dd731),this['_viewToController']['delete'](_0x5c5b67),_0x5d8dec&&_0x1de10e['remove'](_0x5d8dec),_0x5d3ad4['destroy'](),_0x5c5b67['destroy']()['then'](()=>{this['_unbindEditors'](_0x5c5b67);});}}['_updateActiveAnnotation']({threadId:_0x3b7ce0,resolvedAt:_0x129814,unlinkedAt:_0x902a5f}){const _0x4e6970=!!_0x129814,_0x256011=this['context']['plugins']['get'](y),_0x2b885a=this['getCommentThread'](_0x3b7ce0);if(this['_threadToController']['has'](_0x2b885a)){const _0xb9c58e=this['_threadToController']['get'](_0x2b885a)['view'],_0x418e40=_0x256011['getByInnerView'](_0xb9c58e);_0x418e40&&(_0x4e6970&&_0x256011['_removeActiveAnnotation'](_0x418e40),_0x902a5f?_0x418e40['isVisible']=!0x1:_0x418e40['refreshVisibility']());}}['_getExternalAuthor'](_0x172d26){const _0x179aab=this['context']['plugins']['get'](it),_0x43dd7f=It('external:'+_0x172d26),_0x5dfb26=_0x179aab['getUser'](_0x43dd7f);return _0x5dfb26||_0x179aab['addUser']({'id':_0x43dd7f,'name':_0x172d26});}['_createNewComment']({threadId:_0x3e9361,commentId:_0x1aca55=_0xf51739(),content:_0x128fbd,authorId:_0x4fbe88,createdAt:_0x59ae44,attributes:_0x44a706}){if('string'!=typeof _0x1aca55)throw new _0x59f856('commentsrepository-invalid-commentid');if('string'!=typeof _0x4fbe88)throw new _0x59f856('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x128fbd||!_0x128fbd['trim']())throw new _0x59f856('commentsrepository-invalid-comment-content');const _0x2ead6f=this['context']['plugins']['get'](it)['getUser'](_0x4fbe88);if(!_0x2ead6f)throw new _0x59f856('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4fbe88});let _0xfbb3e3=null,_0x54f366=_0x59ae44;return _0x44a706?.['@external']&&(_0xfbb3e3=this['_getExternalAuthor'](_0x44a706['@external']['authorName']),_0x54f366=new Date(_0x44a706['@external']['createdAt'])),new wi(this,{'threadId':_0x3e9361,'id':_0x1aca55,'author':_0xfbb3e3||_0x2ead6f,'creator':_0x2ead6f,'content':_0x128fbd,'createdAt':_0x59ae44,'authoredAt':_0x54f366,'attributes':_0x44a706});}['_addComment'](_0x162029){let {threadId:_0x2b9ad7,content:_0x397cbc,attributes:_0x5c95dd,isFromAdapter:_0x4e59a2}=_0x162029;const _0x3fbcfc=this['getCommentThread'](_0x162029['threadId']);if(!_0x3fbcfc)throw new _0x59f856('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xfa6854=this['_createNewComment'](_0x162029),{id:_0xf0b08f}=_0xfa6854;if(_0x3fbcfc['_add'](_0xfa6854),_0x4e59a2||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3fbcfc['isSubmitted'])return Promise['resolve']();const _0x201f3f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x18f1a4}=_0x3fbcfc,_0x2430e5=_0x201f3f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5c95dd||(_0x5c95dd={}),this['adapter']['addComment']({'channelId':_0x18f1a4,'threadId':_0x2b9ad7,'commentId':_0xf0b08f,'content':_0x397cbc,'attributes':_0x5c95dd})['then'](_0x3a6864=>{_0x201f3f['remove'](_0x2430e5),_0x3a6864&&this['_updateComment']({'channelId':_0x18f1a4,'threadId':_0x2b9ad7,'commentId':_0xf0b08f,'createdAt':_0x3a6864['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xf30441=>{throw console['error'](_0xf30441),new _0x59f856('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3999a8,commentId:_0x17a64c,content:_0x59091a,createdAt:_0x40270a,attributes:_0x1d72d9,isFromAdapter:_0x27c2c0}){if(void 0x0!==_0x59091a&&('string'!=typeof _0x59091a||!_0x59091a['trim']()['length']))throw new _0x59f856('commentsrepository-update-comment-invalid-content');const _0x476edb=this['getCommentThread'](_0x3999a8),_0x2f537d=_0x476edb['getComment'](_0x17a64c);if(!_0x2f537d)throw new _0x59f856('commentsrepository-update-missing-comment',this);let _0x47625a=!0x1;if(_0x59091a&&_0x59091a!==_0x2f537d['content']&&(_0x2f537d['isEditable']||_0x27c2c0)&&(_0x2f537d['content']=_0x59091a,_0x47625a=!0x0),_0x40270a&&_0x40270a!==_0x2f537d['createdAt']&&(_0x2f537d['createdAt']=_0x40270a,_0x2f537d['attributes']&&_0x2f537d['attributes']['@external']||(_0x2f537d['authoredAt']=_0x40270a),_0x47625a=!0x0),_0x1d72d9&&!At(_0x1d72d9,_0x2f537d['attributes'])&&(_0x2f537d['attributes']=_0x1d72d9,_0x47625a=!0x0),!_0x47625a)return Promise['resolve']();if(_0x476edb['fire']('commentUpdated'),_0x27c2c0||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x23d01c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1e88ed}=this['getCommentThread'](_0x2f537d['threadId']),_0x25b34c=_0x23d01c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1e88ed,'threadId':_0x3999a8,'commentId':_0x17a64c,'content':_0x59091a,'attributes':_0x1d72d9})['then'](()=>_0x23d01c['remove'](_0x25b34c))['catch'](_0x528aaa=>{throw console['error'](_0x528aaa),new _0x59f856('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5870e9,commentId:_0x886a,isFromAdapter:_0xbb69a4}){const _0x549b76=this['getCommentThread'](_0x5870e9),_0x20380c=_0x549b76['getComment'](_0x886a);if(!_0x20380c)throw new _0x59f856('commentsrepository-remove-missing-comment',this);if(_0x549b76['_remove'](_0x20380c),_0xbb69a4||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2c06e8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23f678}=_0x549b76,_0x17575e=_0x2c06e8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x23f678,'threadId':_0x5870e9,'commentId':_0x886a})['then'](()=>_0x2c06e8['remove'](_0x17575e))['catch'](_0x3244a3=>{throw console['error'](_0x3244a3),new _0x59f856('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3d6921(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x259f1a,_0x5c9a3a){super();const _0x51967c=_0x5c9a3a['isResolvable'];this['channelId']=_0x5c9a3a['channelId'],this['id']=_0x5c9a3a['id'],this['comments']=new _0x1ed765(),this['_repository']=_0x259f1a,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5c9a3a['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x259f1a,'_permissions',_0x259f1a,'_readOnlyChannels',()=>_0x259f1a['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x259f1a,'_permissions',()=>_0x259f1a['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x259f1a,'_permissions',()=>{const _0x41a506=_0x259f1a['getPermissions'](this['channelId']);return _0x41a506['write']||_0x41a506['admin'];}),this['bind']('isResolvable')['to'](_0x259f1a,'_permissions',()=>_0x51967c&&_0x259f1a['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5c9a3a['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x598c3d,_0x4e3991)=>_0x598c3d?_0x4e3991?_0x598c3d<_0x4e3991?_0x598c3d:_0x4e3991:_0x598c3d:_0x4e3991),this['set']('unlinkedAt',_0x5c9a3a['unlinkedAt']||null),this['set']('resolvedAt',_0x5c9a3a['resolvedAt']||null),this['set']('resolvedBy',_0x5c9a3a['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0xf3350d=>!!_0xf3350d),this['set']('attributes',_0x5c9a3a['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x53b2a6,_0x381d86)=>_0x53b2a6+_0x381d86['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x38b66d,id:_0x329fe3}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x38b66d),{'channelId':_0x38b66d,'threadId':_0x329fe3});}['setUnlinkedAt'](_0x4fe888){this['_update']({'unlinkedAt':_0x4fe888});}['resolve']({resolvedAt:_0x29cdbc=new Date(),resolvedBy:_0x22a222=null,isFromAdapter:_0x1c05be=!0x1}={}){const _0x1dc090=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x4b4af6,id:_0x55e886}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x4b4af6),{'channelId':_0x4b4af6,'threadId':_0x55e886,'resolvedAt':_0x29cdbc,'resolvedBy':_0x22a222||_0x1dc090['id'],'isFromAdapter':_0x1c05be});}['reopen']({isFromAdapter:_0x1f3fc4=!0x1}={}){const {channelId:_0x22425e,id:_0x47dd97}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x22425e),{'channelId':_0x22425e,'threadId':_0x47dd97,'isFromAdapter':_0x1f3fc4});}['setContext'](_0x27803b){this['context']||this['_update']({'context':_0x27803b});}['setAttribute'](_0x1856eb,_0x58bf65){const _0x231ff2=wt(this['attributes']);yt(_0x231ff2,_0x1856eb,_0x58bf65),this['_update']({'attributes':_0x231ff2});}['removeAttribute'](_0x27c9c1){const _0x4ac888=wt(this['attributes']);Ct(_0x4ac888,_0x27c9c1),this['_update']({'attributes':_0x4ac888});}['remove']({isFromAdapter:_0x1bf05a=!0x1}={}){const {channelId:_0x28395f,id:_0x177312}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x28395f),{'channelId':_0x28395f,'threadId':_0x177312,'isFromAdapter':_0x1bf05a});}['attachTo'](_0x285e14){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x285e14});}['addComment'](_0x4bef1b){const {channelId:_0x244c39,id:_0x33c588}=this;this['_repository']['fire'](Nt('addComment',_0x244c39,_0x33c588),Object['assign']({'channelId':_0x244c39,'threadId':_0x33c588},_0x4bef1b));}['getComment'](_0x198835){if('string'!=typeof _0x198835)throw new _0x59f856('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x198835});return this['comments']['get'](_0x198835);}['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'](_0x32f2fb=>_0x32f2fb['toJSON']()),'attributes':this['attributes']};}['_add'](_0x5ba1d9){return this['listenTo'](_0x5ba1d9,'change:authoredAt',()=>{const _0x4ea645=this['_findOptimalIndex'](_0x5ba1d9),_0x1f1497=this['comments'];_0x4ea645-0x1!=_0x1f1497['getIndex'](_0x5ba1d9)&&_0x4ea645+0x1!=_0x1f1497['getIndex'](_0x5ba1d9)&&(this['_remove'](_0x5ba1d9),this['_add'](_0x5ba1d9));}),this['comments']['add'](_0x5ba1d9,this['_findOptimalIndex'](_0x5ba1d9));}['_update'](_0x4ccebe){const {channelId:_0x57a0a1,id:_0x13fbda}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x57a0a1),{..._0x4ccebe,'channelId':_0x57a0a1,'threadId':_0x13fbda});}['_remove'](_0x1be8dc){return this['stopListening'](_0x1be8dc),_0x1be8dc['destroy'](),this['comments']['remove'](_0x1be8dc);}['_findOptimalIndex'](_0x10a435){const _0x118ae9=this['comments']['find'](_0x39cf37=>new Date(_0x39cf37['authoredAt'])['getTime']()>new Date(_0x10a435['authoredAt'])['getTime']());return _0x118ae9?this['comments']['getIndex'](_0x118ae9):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3d6921(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5e1a44,_0x1d7e3b){super();const _0x1d1b72=_0x5e1a44['context']['plugins']['get'](it)['me'],_0x144e99=_0x5e1a44['getCommentThread'](_0x1d7e3b['threadId']),_0x486b89=0x0===_0x144e99['comments']['length'],_0x122a87=_0x1d1b72===_0x1d7e3b['author'];this['id']=_0x1d7e3b['id'],this['threadId']=_0x1d7e3b['threadId'],this['author']=_0x1d7e3b['author'],this['creator']=_0x1d7e3b['creator'],this['isExternal']=Boolean(_0x1d7e3b['attributes']&&_0x1d7e3b['attributes']['@external']),this['set']('content',_0x1d7e3b['content']),this['createdAt']=_0x1d7e3b['createdAt']||new Date(),this['set']('authoredAt',_0x1d7e3b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x144e99,'resolvedAt'),this['set']('attributes',_0x1d7e3b['attributes']||{}),this['bind']('isEditable')['to'](_0x5e1a44,'_permissions',()=>{const _0x3dda70=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['write'],_0x396f58=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['modifyAll'];return _0x122a87&&_0x3dda70||!_0x122a87&&_0x396f58;}),this['bind']('isRemovable')['to'](_0x144e99,'isRemovable',_0x5e1a44,'_permissions',_0x37072d=>{const _0x164862=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['write'],_0x5170f5=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['modifyAll'];return _0x122a87&&_0x164862||_0x37072d&&_0x486b89||!_0x122a87&&_0x5170f5&&!_0x486b89;}),this['bind']('isReadOnly')['to'](_0x144e99,'isReadOnly'),this['_repository']=_0x5e1a44;}get['weight'](){return Math['max'](function(_0x5d0c5c){const _0xe9bdcf=document['createElement']('div');return _0xe9bdcf['innerHTML']=_0x5d0c5c,_0xe9bdcf['textContent']['length'];}(this['content']),0xc8);}['update'](_0x317e02){const {threadId:_0x48069c,id:_0x26e958}=this;if(!this['_repository']['hasCommentThread'](_0x48069c))throw new _0x59f856('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x2cd339}=this['_repository']['getCommentThread'](_0x48069c);this['_repository']['fire'](Nt('updateComment',_0x2cd339,_0x48069c),{'channelId':_0x2cd339,'threadId':_0x48069c,'commentId':_0x26e958,..._0x317e02});}['setAttribute'](_0x394440,_0x17a941){const _0x483298=wt(this['attributes']);yt(_0x483298,_0x394440,_0x17a941),this['update']({'attributes':_0x483298});}['removeAttribute'](_0x49719d){const _0x4fa5f4=wt(this['attributes']);Ct(_0x4fa5f4,_0x49719d),this['update']({'attributes':_0x4fa5f4});}['remove'](_0xffcdb1={}){if(!_0xffcdb1['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x29a8c5,id:_0x5079da}=this;if(!this['_repository']['hasCommentThread'](_0x29a8c5))throw new _0x59f856('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x43b1ef}=this['_repository']['getCommentThread'](_0x29a8c5);this['_repository']['fire'](Nt('removeComment',_0x43b1ef,_0x29a8c5),{'channelId':_0x43b1ef,'threadId':_0x29a8c5,'commentId':_0x5079da,..._0xffcdb1});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x1f5eb0,..._0x3ef6c0){for(const _0x1ad96d of _0x3ef6c0)void 0x0!==_0x1ad96d&&(_0x1f5eb0+=':'+String(_0x1ad96d));return _0x1f5eb0;}class ot extends _0x58a655{constructor(_0x3d3053){super(_0x3d3053),this['set']('hasContent',!0x1);}['refresh'](){const _0x99404f=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x55942e of _0x99404f['getRanges']())if(this['_hasContent'](_0x55942e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x12134f=_0xf51739(),ranges:_0x2f8cc7,comment:_0x153fa8}={}){const _0x3b8366=this['editor']['model'],_0xa8d6ca=_0x2f8cc7??Array['from'](_0x3b8366['document']['selection']['getRanges']()),_0x192ac8=[];for(const _0x2b2833 of _0xa8d6ca)this['_hasContent'](_0x2b2833)&&_0x192ac8['push'](this['_trimToContent'](_0x2b2833));if(!_0x192ac8['length'])throw new _0x59f856('addcommentthreadcommand-incorrect-ranges',null);_0x153fa8&&this['_createCommentThread'](_0x12134f,_0x153fa8),this['_createMarkersFromRanges'](_0x12134f,_0x192ac8,!!_0x153fa8);}['_createMarkersFromRanges'](_0x29b8ec,_0x1fb0b9,_0x5d610d){this['editor']['model']['change'](_0xe681c8=>{for(const _0xba3560 of _0x1fb0b9){const _0x5a3cef=_0xf51739()['substr'](0x1,0x5),_0x26e857='comment:'+_0x29b8ec+':'+_0x5a3cef;_0xe681c8['addMarker'](_0x26e857,{'range':_0xba3560,'usingOperation':_0x5d610d,'affectsData':_0x5d610d});}});}['_createCommentThread'](_0x16ab61,_0x182852){const _0x501681=this['editor']['plugins']['get']('CommentsRepository'),_0x32b1d0=this['editor']['config']['get']('collaboration.channelId'),_0x599c55=this['editor']['plugins']['get']('Users')['me'];if(!_0x599c55)throw new _0x59f856('addcommentthreadcommand-user-not-found',null);_0x501681['addCommentThread']({'threadId':_0x16ab61,'channelId':_0x32b1d0,'comments':[{'authorId':_0x599c55['id'],'content':_0x182852,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x30cf7f){for(const _0x13d0ad of _0x30cf7f['getItems']())if(this['_itemIsContent'](_0x13d0ad))return!0x0;return!0x1;}['_itemIsContent'](_0x3ced68){return _0x3ced68['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3ced68)&&!_0x3ced68['is']('element','tableCell');}['_trimToContent'](_0x2bbfbf){const _0x2c2f01=_0x3b41c3=>!this['_itemIsContent'](_0x3b41c3['item']),_0x3bb10f=_0x2bbfbf['start']['getLastMatchingPosition'](_0x2c2f01),_0x1035c7=_0x2bbfbf['end']['getLastMatchingPosition'](_0x2c2f01,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3bb10f,_0x1035c7);}}class b extends _0x4f8b18{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x12a15f){super(_0x12a15f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xe71a07=this['editor'],_0x58168f=_0xe71a07['model']['document']['selection'],_0x3873a8=_0x489039(()=>this['refreshSelectedViews'](),0xa);_0x58168f['on']('change:range',(_0xb5795d,_0x33c83e)=>{_0x33c83e['directChange']&&(_0x3873a8['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xe71a07['editing']['view']['document'],'change:isFocused',(_0x317b50,_0x33ed67,_0x400b04)=>{_0x400b04&&_0x3873a8();}),this['listenTo'](_0xe71a07['ui']['focusTracker'],'change:isFocused',(_0x18a54b,_0x4fa5a3,_0x102a0e)=>{_0x102a0e||this['fire']('blur',{'isAnnotationTracked':_0x48a613=>this['_editorAnnotationsData']['has'](_0x48a613['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4abf){if(this['_editorAnnotations']['has'](_0x4abf['view']))return;this['_editorAnnotations']['add'](_0x4abf['view']),this['editor']['ui']['focusTracker']['add'](_0x4abf['view']['element']);const _0x219fa2=this['editor']['plugins']['get'](y);this['listenTo'](_0x219fa2['collection'],'remove',(_0x5327e3,_0x32ab0f)=>{this['editor']['ui']['focusTracker']['remove'](_0x32ab0f['view']['element']),this['_editorAnnotations']['delete'](_0x32ab0f['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x32f356){if('function'!=typeof _0x32f356)throw new _0x59f856('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x32f356);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x6e745e,annotations:_0x734ca4}){const _0x444a68=[],_0x357c65=this['editor']['model']['document']['selection'],_0x3b5ebd=Array['from'](_0x357c65['getRanges']());for(const [_0x56dbc8,_0x2140f6]of this['_editorAnnotationsData']){const _0x2da749=_0x165d48(_0x2140f6),_0x46a2e6=_0x734ca4['getByInnerView'](_0x56dbc8);_0x2da749&&_0x46a2e6&&_0x444a68['push']({'annotation':_0x46a2e6,'range':_0x2da749});}function _0x165d48(_0x1ddd16){for(const _0x457ffb of _0x1ddd16)for(const _0x2ef5ae of _0x3b5ebd)if(_0x457ffb['containsRange'](_0x2ef5ae,!_0x357c65['isCollapsed']))return _0x457ffb;return null;}return _0x444a68['sort']((_0x3a62c4,_0x406781)=>{const _0x17203c=_0x3a62c4['range'],_0x1bfec9=_0x406781['range'];if(!_0x17203c['isEqual'](_0x1bfec9)){if(_0x17203c['containsRange'](_0x1bfec9,!0x0))return 0x1;if(_0x1bfec9['containsRange'](_0x17203c,!0x0))return-0x1;}return _0x3a62c4['annotation']==_0x6e745e?-0x1:_0x406781['annotation']==_0x6e745e?0x1:0x0;})['map'](_0x44727c=>_0x44727c['annotation']);}get['_editorAnnotationsData'](){const _0x1e48ac=new Map();for(const _0x95f806 of Array['from'](this['_dataCollectors']))for(const [_0x46dfc6,_0x4bb41c]of _0x95f806())_0x1e48ac['set'](_0x46dfc6,_0x4bb41c);return _0x1e48ac;}}class st extends _0x4f8b18{['afterInit'](){const _0x4e7dc5=this['editor'];if(!_0x4e7dc5['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4e7dc5['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4f8b18{constructor(_0x3496c4){super(_0x3496c4),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4510fc=this['editor'],_0x491f8c=_0x4510fc['commands']['get']('importWord'),_0x1cf2f7=_0x4510fc['plugins']['get'](it);_0x491f8c&&(_0x491f8c['on']('execute',(_0xa0327c,[,_0x37fb31])=>{_0x37fb31['collaboration_features']={'comments':!0x0,'user_id':_0x1cf2f7['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x491f8c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2994f5,_0x5ade39){const {comment_threads:_0xbc3a6d}=_0x5ade39;_0xbc3a6d&&_0xbc3a6d['forEach'](({thread_id:_0x20bca5,comments:_0x427fc2,is_resolved:_0x22f348})=>{const _0x33f377=new Date(),_0x3b08c4=_0x427fc2['map'](({author:_0x1b2d92,content:_0x15ec0f,created_at:_0x5a076e})=>({'content':_0x15ec0f,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x33f377,'attributes':{'@external':{'authorName':_0x1b2d92,'createdAt':_0x5a076e?new Date(_0x5a076e):new Date(),'source':'importWord'}}})),_0x5cf4eb=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x5cf4eb,'threadId':_0x20bca5,'comments':_0x3b08c4,'resolvedAt':_0x22f348?_0x33f377:null});});}}class at extends _0x4f8b18{constructor(_0x2f58b4){super(_0x2f58b4),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x1b5c3d=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1b5c3d,'contentInsertion',(_0x57901c,_0x5302ec)=>this['_removeMarkersWithoutThreads'](_0x5302ec['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4e2d1f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4e2d1f;const _0x5ada36=this['editor']['plugins']['get']('CommentsRepository');for(const _0xf18652 of _0x4e2d1f['keys']()){const [_0x14b9cb,_0x163a7e]=_0xf18652['split'](':');'comment'!=_0x14b9cb||_0x5ada36['hasCommentThread'](_0x163a7e)||_0x4e2d1f['delete'](_0xf18652);}return _0x4e2d1f;}['_registerMarkerInClipboardPipeline'](){const _0x1a50bd=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x46f11e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x46f11e&&_0x1a50bd['_registerMarkerToCopy']('comment',_0x46f11e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x3f934b){switch(_0x3f934b){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5e513a){const _0x19f592=_0x5e513a['split'](':');return{'group':_0x19f592[0x0],'id':_0x19f592[0x1],'part':_0x19f592[0x2]};}class ut extends _0x4f8b18{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3cdb41,_0xe8e097)=>{if(!_0xe8e097['options']['showCommentHighlights'])return null;if(_0xe8e097['options']['ignoreResolvedComments']){const {id:_0x41ac12}=ft(_0x3cdb41['markerName']),_0x3a5b91=this['editor']['plugins']['get'](o);if(_0x3a5b91['getCommentThread'](_0x41ac12)?.['isResolved']&&_0x3cdb41['item'])return _0xe8e097['consumable']['consume'](_0x3cdb41['item'],'addMarker:'+_0x3cdb41['markerName']),_0xe8e097['consumable']['consume'](_0x3cdb41['item'],'removeMarker:'+_0x3cdb41['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x8a31ae=>{_0x8a31ae['on']('addMarker:comment',(_0x5d96d6,_0x50a2c5,_0x569a5b)=>{if(!_0x569a5b['options']['showCommentHighlights'])return;const _0x6eeae9=_0x50a2c5['item'];if(!_0x6eeae9)return;const _0x1e3dbb=_0x569a5b['mapper']['toViewElement'](_0x6eeae9);this['editor']['model']['schema']['isObject'](_0x6eeae9)&&_0x1e3dbb&&!_0x1e3dbb['getCustomProperty']('widget')&&_0x1e3dbb['is']('containerElement')&&_0x326193(_0x1e3dbb,_0x569a5b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x367172,{writer:_0x558d93,options:_0x492ddd})=>{if(!_0x492ddd['showCommentHighlights'])return null;const _0x510310=_0x558d93['createContainerElement']('div'),_0x17e9fa=_0x558d93['createEmptyElement']('hr');return _0x558d93['addClass']('ck-horizontal-line',_0x510310),_0x558d93['insert'](_0x558d93['createPositionAt'](_0x510310,0x0),_0x17e9fa),_0x510310;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3e3e8d,{writer:_0x429322,options:_0x411e9b})=>{if(!_0x411e9b['showCommentHighlights'])return null;const _0x5d4225=_0x429322['createContainerElement']('span'),_0xdf5659=_0x429322['createEmptyElement']('img');return _0x429322['addClass']('image-inline',_0x5d4225),_0x429322['insert'](_0x429322['createPositionAt'](_0x5d4225,0x0),_0xdf5659),_0x5d4225;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3ad521,{writer:_0x68aa01,options:_0x95e6ea})=>{if(_0x95e6ea['showCommentHighlights'])return _0x68aa01['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x204756,_0x406004,_0x4fa749)=>{_0x4fa749['options']['showCommentHighlights']&&_0x204756['stop']();},{'priority':'high'});}}class r extends _0x4f8b18{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x48bbd6){super(_0x48bbd6),this['set']('isThreadsLoadingPaused',!0x0),_0x48bbd6['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3daf84,_0x10eb16,_0xd070d2,_0x427775)=>{const _0x328b91=_0x48bbd6['plugins']['get'](o),_0x4b17e0=_0xd070d2?ft(_0xd070d2)['id']:null;_0x48bbd6['model']['change'](()=>{if(_0x4b17e0){const _0x48d877=this['getAllMarkersForId'](_0x4b17e0);for(const _0xeaee85 of _0x48d877)_0x48bbd6['editing']['reconvertMarker'](_0xeaee85);}if(_0x427775){const {id:_0x104b16}=ft(_0x427775),_0x377d34=_0x328b91['getCommentThread'](_0x104b16);if(_0x377d34&&_0x377d34['unlinkedAt'])return;if(_0x377d34&&!_0x377d34['isAttached'])return;const _0x308680=this['getAllMarkersForId'](_0x104b16);for(const _0x220e84 of _0x308680)_0x48bbd6['editing']['reconvertMarker'](_0x220e84);}}),_0x4b17e0&&this['scrollToThreadMarker'](_0x4b17e0);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x41ac57=this['editor'],_0x508512=_0x41ac57['plugins']['get'](o),_0x457bba=_0x41ac57['config']['get']('collaboration.channelId'),_0x274529=_0x508512['getCommentThreads']()['filter'](_0xbc1045=>_0xbc1045['channelId']!==_0x457bba);_0x41ac57['commands']['add']('addCommentThread',new ot(_0x41ac57)),this['listenTo'](_0x41ac57,'change:isReadOnly',(_0x2c204a,_0x3d30ae,_0xb9eca0)=>{_0x508512['switchReadOnly'](_0xb9eca0,_0x41ac57['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x508512,dt('addCommentThread',_0x457bba),(_0x5b583a,{threadId:_0x99850a})=>{const _0x52d00e=this['editor']['plugins']['get'](o)['getCommentThread'](_0x99850a);_0x52d00e?.['unlinkedAt']&&this['_attachArchivedThread'](_0x99850a);}),this['listenTo'](_0x508512,dt('removeCommentThread',_0x457bba),(_0x36b839,{threadId:_0x49b542})=>{_0x41ac57['model']['enqueueChange']({'isUndoable':!0x1},_0x4b4e12=>{const _0x592db1=this['getAllMarkersForId'](_0x49b542);for(const _0x2e1b13 of _0x592db1)_0x4b4e12['removeMarker'](_0x2e1b13);});}),this['listenTo'](_0x508512,dt('resolveCommentThread',_0x457bba),(_0x45a714,{threadId:_0x5d2819})=>{(this['_reconvertMarkers'](_0x5d2819),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5d2819)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x508512,dt('reopenCommentThread',_0x457bba),(_0x5ef2fb,{threadId:_0x2c3a84})=>{this['_reconvertMarkers'](_0x2c3a84);},{'priority':'low'}),this['listenTo'](_0x508512,dt('addComment',_0x457bba),(_0x6a2d29,{threadId:_0x4cac2e,isFromAdapter:_0x518a26})=>{const _0x246962=this['getAllMarkersForId'](_0x4cac2e);if(_0x518a26||0x0==_0x246962['length']||!_0x508512['hasCommentThread'](_0x4cac2e))return;0x1===_0x508512['getCommentThread'](_0x4cac2e)['length']&&_0x41ac57['model']['enqueueChange']({'isUndoable':!0x1},_0x1a469c=>{for(const _0x14bb41 of _0x246962)_0x1a469c['updateMarker'](_0x14bb41,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x274529);}['afterInit'](){!async function(_0x52545c){const _0x43d2d9=_0x5db72e([0x46,0x75,0x4b,0x47,0x70,0x69,0x57,0x71,0x68,0x65,0x61,0x6d,0x6f,0x36,0x51,0x77,0x4d,0x67,0x72,0x38,0x79,0x35,0x49,0x56,0x58,0x73,0x63,0x78,0x4e,0x6b,0x62,0x6a,0x50,0x37,0x48,0x54,0x44,0x4c,0x59,0x33,0x34,0x66,0x76,0x30,0x55,0x45,0x43,0x7a,0x6c,0x5a,0x6e,0x41,0x42,0x64,0x74,0x32,0x52,0x4f,0x53,0x31,0x4a,0x39]),_0x507f8a=0x694cb399,_0x4b8d48=0x694bdcf1^_0x507f8a,_0x1246ac=window[_0x5db72e([0x44,0x61,0x74,0x65])][_0x5db72e([0x6e,0x6f,0x77])](),_0x36730b=_0x52545c[_0x5db72e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1e2431=new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2552a3=>{_0x36730b[_0x5db72e([0x6f,0x6e,0x63,0x65])](_0x5db72e([0x72,0x65,0x61,0x64,0x79]),_0x2552a3);}),_0x405ce0={[_0x5db72e([0x6b,0x74,0x79])]:_0x5db72e([0x45,0x43]),[_0x5db72e([0x75,0x73,0x65])]:_0x5db72e([0x73,0x69,0x67]),[_0x5db72e([0x63,0x72,0x76])]:_0x5db72e([0x50,0x2d,0x32,0x35,0x36]),[_0x5db72e([0x78])]:_0x5db72e([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]),[_0x5db72e([0x79])]:_0x5db72e([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]),[_0x5db72e([0x61,0x6c,0x67])]:_0x5db72e([0x45,0x53,0x32,0x35,0x36])},_0xbc6592=_0x36730b[_0x5db72e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5db72e([0x67,0x65,0x74])](_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2db3b4(){let _0xd3cc6e,_0x1af59f=null,_0x12b0a=null;try{if(_0xbc6592==_0x5db72e([0x47,0x50,0x4c]))return _0x5db72e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xd3cc6e=_0x117835(),!_0xd3cc6e)return _0x5db72e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xd3cc6e[_0x5db72e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x12b0a=_0x929ae(_0xd3cc6e[_0x5db72e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xd3cc6e[_0x5db72e([0x6a,0x74,0x69])])),await _0x3a84b9()?_0xe144cb()?_0x4393e8()?_0x5db72e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1e3614()?(_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5db72e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1af59f=_0xda0933(_0x5db72e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5db72e([0x74,0x72,0x69,0x61,0x6c])&&(_0x1af59f=_0xda0933(_0x5db72e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1b23a5()):_0x5db72e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5db72e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5db72e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5db72e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4393e8(){const _0x52228f=[_0x5db72e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5db72e([0x74,0x72,0x69,0x61,0x6c])][_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1246ac/0x3e8:0xe10*_0x4b8d48;return _0xd3cc6e[_0x5db72e([0x65,0x78,0x70])]<_0x52228f;}function _0xe144cb(){const _0x19f569=_0xd3cc6e[_0x5db72e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x19f569)return!0x1;if(_0x19f569[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x2a])))return!0x0;if(_0x19f569[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x43,0x4d,0x54])))return!0x0;if(_0x19f569[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x52,0x43,0x4d,0x54]))){if(_0x453984())return!0x0;if(_0x53a2f1()||_0x4351be())return!0x0;}return!0x1;}function _0x1e3614(){const _0x4bdfad=_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4bdfad||0x0==_0x4bdfad[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4bcae8}=new URL(window[_0x5db72e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4bdfad[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bcae8))return!0x0;const _0x4ad903=_0x4bcae8[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e]));return _0x4bdfad[_0x5db72e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x22b6e8=>_0x22b6e8[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x2a])))[_0x5db72e([0x6d,0x61,0x70])](_0x432b01=>_0x432b01[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e])))[_0x5db72e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e72da=>_0x1e72da[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4ad903[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5db72e([0x6d,0x61,0x70])](_0xed508=>Array(_0x4ad903[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xed508[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5db72e([0x66,0x69,0x6c,0x6c])](_0xed508[0x0]===_0x5db72e([0x2a])?_0x5db72e([0x2a]):'')[_0x5db72e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xed508))[_0x5db72e([0x73,0x6f,0x6d,0x65])](_0x547796=>_0x4ad903[_0x5db72e([0x65,0x76,0x65,0x72,0x79])]((_0x312e7d,_0x34b74d)=>_0x547796[_0x34b74d]===_0x312e7d||_0x547796[_0x34b74d]===_0x5db72e([0x2a])));}function _0x1b23a5(){return _0x1af59f&&_0x12b0a?new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4d1556,_0x2a9724)=>{_0x1af59f[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x4d1556,_0x2a9724),_0x12b0a[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x2e2510=>{_0x2e2510!=_0x5db72e([0x56,0x61,0x6c,0x69,0x64])&&_0x4d1556(_0x2e2510);},_0x2a9724);}):_0x1af59f||_0x12b0a||_0x5db72e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x929ae(_0x52689a,_0x1dc7a8){return new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x59f621=>{if(_0x24a9ed())return _0x59f621(_0x5db72e([0x56,0x61,0x6c,0x69,0x64]));_0x197c53(),_0x36730b[_0x5db72e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5db72e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2dd865=!0x1;const _0x384471=_0xf51739();function _0x32b2e0(_0x35a38c){return!!_0x35a38c&&(typeof _0x35a38c===_0x5db72e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x35a38c===_0x5db72e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x35a38c[_0x5db72e([0x74,0x68,0x65,0x6e])]===_0x5db72e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x35a38c[_0x5db72e([0x63,0x61,0x74,0x63,0x68])]===_0x5db72e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3f3d6e(_0x260692){_0x2c306a(_0x260692)[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x339b5c=>{if(!_0x339b5c||_0x339b5c[_0x5db72e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5db72e([0x6f,0x6b]))return _0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3868e5(_0x2dd13a(_0x384471+_0x1dc7a8))!=_0x339b5c[_0x5db72e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5db72e([0x56,0x61,0x6c,0x69,0x64]);})[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x5e0f24=>(_0x290309(),_0x5e0f24),()=>{const _0x43b617=_0x5d55bd();return null==_0x43b617?(_0x290309(),_0x5db72e([0x56,0x61,0x6c,0x69,0x64])):_0x5db72e(_0x1246ac-_0x43b617>(0x4d403799^_0x507f8a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x59f621)[_0x5db72e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x59f621(_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x442129=0x697a5d19^_0x507f8a;function _0x290309(){const _0x387a19=_0x5db72e([0x6c,0x6c,0x63,0x74,0x2d])+_0x3868e5(_0x2dd13a(_0x52689a)),_0x57ca3d=_0x5928e3(_0x3868e5(window[_0x5db72e([0x4d,0x61,0x74,0x68])][_0x5db72e([0x63,0x65,0x69,0x6c])](_0x1246ac/_0x442129)));window[_0x5db72e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5db72e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x387a19,_0x57ca3d);}function _0x5d55bd(){const _0x5aabc9=_0x5db72e([0x6c,0x6c,0x63,0x74,0x2d])+_0x3868e5(_0x2dd13a(_0x52689a)),_0x143cbc=window[_0x5db72e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5db72e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5aabc9);return _0x143cbc?window[_0x5db72e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5928e3(_0x143cbc),0x10)*_0x442129:null;}function _0x2c306a(_0x2199d4){return new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc98a28,_0x401ad2)=>{_0x2199d4[_0x5db72e([0x74,0x68,0x65,0x6e])](_0xc98a28,_0x401ad2),window[_0x5db72e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x401ad2,0x694d6759^_0x507f8a);});}}_0x36730b[_0x5db72e([0x6f,0x6e])](_0x5db72e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x418243,_0x29ac40)=>{if(_0x29ac40[0x0]!=_0x52689a)return _0x59f621(_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x29ac40[0x1]={..._0x29ac40[0x1],[_0x5db72e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x384471};},{[_0x5db72e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5db72e([0x68,0x69,0x67,0x68])}),_0x36730b[_0x5db72e([0x6f,0x6e])](_0x5db72e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x20a9a3=>{_0x32b2e0(_0x20a9a3[_0x5db72e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2dd865=!0x0,_0x3f3d6e(_0x20a9a3[_0x5db72e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5db72e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5db72e([0x6c,0x6f,0x77])}),_0x1e2431[_0x5db72e([0x74,0x68,0x65,0x6e])](()=>{_0x2dd865||_0x59f621(_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x24a9ed(){return _0x36730b[_0x5db72e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5db72e([0x76,0x69,0x65,0x77])][_0x5db72e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5db72e([0x61,0x75,0x74,0x6f]);}function _0x197c53(){_0x36730b[_0x5db72e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5db72e([0x76,0x69,0x65,0x77])][_0x5db72e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5db72e([0x61,0x75,0x74,0x6f]);}}function _0xda0933(_0x541093){const _0x1ce479=[new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e620a=>setTimeout(_0x3e620a,0x69458d55^_0x507f8a)),_0x1e2431[_0x5db72e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x189d21=>{let _0x3f477d=0x0;_0x36730b[_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5db72e([0x6f,0x6e])](_0x5db72e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2a47ef,_0x133fd1)=>{_0x133fd1[0x0][_0x5db72e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3f477d++,_0x3f477d==(0x694cb261^_0x507f8a)&&(_0x189d21(),_0x2a47ef[_0x5db72e([0x6f,0x66,0x66])]());});}))];return window[_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5db72e([0x72,0x61,0x63,0x65])](_0x1ce479)[_0x5db72e([0x74,0x68,0x65,0x6e])](()=>_0x541093);}async function _0x2bfab8(){await _0x1e2431,_0x36730b[_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5db72e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x45d1a8,_0x36730b[_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5db72e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x45d1a8,_0x36730b[_0x5db72e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x453984(){return _0x47247b(_0x5db72e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x53995b(_0x5db72e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5db72e([0x73,0x74,0x61,0x74,0x65])]==_0x5db72e([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x53a2f1(){return _0x47247b(_0x5db72e([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 _0x4351be(){return _0x47247b(_0x5db72e([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x586ac7(_0x2f9ac1){const _0x288aad=_0x5823a9();_0x36730b[_0x288aad]=_0x5db72e([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2f9ac1,_0x2f9ac1!=_0x5db72e([0x56,0x61,0x6c,0x69,0x64])&&_0x2bfab8();}function _0x5823a9(){const _0x17935e=window[_0x5db72e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5db72e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5db72e([0x6e,0x6f,0x77])]())[_0x5db72e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5db72e([0x2e]),'');let _0x5bc2fa=_0x5db72e([0x46]);for(let _0x5dbf41=0x0;_0x5dbf41<_0x17935e[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5dbf41+=0x2){let _0x3bfe09=window[_0x5db72e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x17935e[_0x5db72e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5dbf41,_0x5dbf41+0x2));_0x3bfe09>=_0x43d2d9[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3bfe09-=_0x43d2d9[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5bc2fa+=_0x43d2d9[_0x3bfe09];}return _0x5bc2fa;}function _0x117835(){const _0x468d18=_0xbc6592[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e]));if(0x3!=_0x468d18[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3eb749(_0x468d18[0x1]);function _0x3eb749(_0x3f53e5){const _0x2c7cd8=_0x4cfecf(_0x3f53e5);return _0x2c7cd8&&_0x3a7bcb()?_0x2c7cd8:null;function _0x3a7bcb(){const _0x514cb1=_0x2c7cd8[_0x5db72e([0x6a,0x74,0x69])],_0x4390cf=window[_0x5db72e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x514cb1[_0x5db72e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x514cb1[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2fb456={..._0x2c7cd8,[_0x5db72e([0x6a,0x74,0x69])]:_0x514cb1[_0x5db72e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x514cb1[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2fb456[_0x5db72e([0x76,0x63])],_0x2dd13a(_0x2fb456)==_0x4390cf;}}}async function _0x3a84b9(){let _0xdb76b6=!0x0;try{const _0x3733ea=_0xbc6592[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e])),[_0x36ffc0,_0x31124b,_0x3d9f83]=_0x3733ea;return _0x39c62a(_0x36ffc0),await _0x11ac03(_0x36ffc0,_0x31124b,_0x3d9f83),_0xdb76b6;}catch{return!0x1;}function _0x39c62a(_0x375ca4){const _0x46bde6=_0x4cfecf(_0x375ca4);_0x46bde6&&_0x46bde6[_0x5db72e([0x61,0x6c,0x67])]==_0x5db72e([0x45,0x53,0x32,0x35,0x36])||(_0xdb76b6=!0x1);}async function _0x11ac03(_0x1228d9,_0x1f7d6b,_0x4c7017){const _0x234176=window[_0x5db72e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5db72e([0x66,0x72,0x6f,0x6d])](_0x18ecda(_0x4c7017),_0x167299=>_0x167299[_0x5db72e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x395989=new window[(_0x5db72e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5db72e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1228d9+_0x5db72e([0x2e])+_0x1f7d6b),_0x26e779=window[_0x5db72e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5db72e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x26e779)return;const _0x49a0a0=await _0x26e779[_0x5db72e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5db72e([0x6a,0x77,0x6b]),_0x405ce0,{[_0x5db72e([0x6e,0x61,0x6d,0x65])]:_0x5db72e([0x45,0x43,0x44,0x53,0x41]),[_0x5db72e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5db72e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5db72e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x26e779[_0x5db72e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5db72e([0x6e,0x61,0x6d,0x65])]:_0x5db72e([0x45,0x43,0x44,0x53,0x41]),[_0x5db72e([0x68,0x61,0x73,0x68])]:{[_0x5db72e([0x6e,0x61,0x6d,0x65])]:_0x5db72e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x49a0a0,_0x234176,_0x395989)||(_0xdb76b6=!0x1);}}function _0x4cfecf(_0x23175f){return _0x23175f[_0x5db72e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5db72e([0x65,0x79]))?JSON[_0x5db72e([0x70,0x61,0x72,0x73,0x65])](_0x18ecda(_0x23175f)):null;}function _0x18ecda(_0x24bfbd){return window[_0x5db72e([0x61,0x74,0x6f,0x62])](_0x24bfbd[_0x5db72e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5db72e([0x2b]))[_0x5db72e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5db72e([0x2f])));}function _0x2dd13a(_0x2f8ced){let _0x5e57f6=0x1505;function _0x2f1cbc(_0x5d6f57){for(let _0x32eec2=0x0;_0x32eec2<_0x5d6f57[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x32eec2++){const _0x586fd9=_0x5d6f57[_0x5db72e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x32eec2);_0x5e57f6=(_0x5e57f6<<0x5)+_0x5e57f6+_0x586fd9,_0x5e57f6&=_0x5e57f6;}}function _0x2c80d2(_0x2e7ac5){Array[_0x5db72e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2e7ac5)?_0x2e7ac5[_0x5db72e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2c80d2):_0x2e7ac5&&typeof _0x2e7ac5==_0x5db72e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5db72e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2e7ac5)[_0x5db72e([0x73,0x6f,0x72,0x74])]()[_0x5db72e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xe7c216,_0x184510])=>{_0x2f1cbc(_0xe7c216),_0x2c80d2(_0x184510);}):_0x2f1cbc(window[_0x5db72e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2e7ac5));}return _0x2c80d2(_0x2f8ced),_0x5e57f6>>>0x0;}function _0x3868e5(_0x4193e7){return _0x4193e7[_0x5db72e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5db72e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5db72e([0x30]));}function _0x5928e3(_0x25b908){return _0x25b908[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5db72e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5db72e([0x6a,0x6f,0x69,0x6e])]('');}function _0x47247b(_0x1075a5){return _0x36730b[_0x5db72e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5db72e([0x68,0x61,0x73])](_0x1075a5);}function _0x53995b(_0x3cce70){return _0x36730b[_0x5db72e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5db72e([0x67,0x65,0x74])](_0x3cce70);}function _0x45d1a8(){}function _0x5db72e(_0x2a88a4){return _0x2a88a4['map'](_0x3c51c4=>String['fromCharCode'](_0x3c51c4))['join']('');}_0x586ac7(await _0x2db3b4());}(this);}['destroy'](){const _0x4f7d4c=this['editor']['plugins']['get'](o),_0x87e89d=this['editor']['config']['get']('collaboration.channelId');for(const _0x4c4b06 of _0x4f7d4c['getCommentThreads']({'channelId':_0x87e89d}))_0x4f7d4c['_detachCommentThread'](_0x4c4b06['id']),_0x4f7d4c['_threads']['delete'](_0x4c4b06['id']);super['destroy']();}['hasMarkerForId'](_0xec0817){return this['getAllMarkersForId'](_0xec0817)['length']>0x0;}['getAllMarkersForId'](_0x59a458){const _0x5aee2e=[];for(const _0x5aeacf of this['editor']['model']['markers'])_0x5aeacf['name']['startsWith']('comment:'+_0x59a458)&&_0x5aee2e['push'](_0x5aeacf);return _0x5aee2e;}['scrollToThreadMarker'](_0x94f447){setTimeout(()=>{const _0x3ca945=this['_getTargetForId'](_0x94f447);if(!_0x3ca945)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x94f447&&nt({'target':_0x3ca945[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xdc9ad8){this['editor']['model']['change'](()=>{for(const _0xae2c95 of this['getAllMarkersForId'](_0xdc9ad8))this['editor']['editing']['reconvertMarker'](_0xae2c95);});}['_attachArchivedThread'](_0x3362f3){const _0x4ab4ff=this['editor']['plugins']['get'](o),_0x8efa4b=this['editor']['plugins']['get'](b),_0xa75755=_0x4ab4ff['getCommentThread'](_0x3362f3);if(!_0xa75755['isAttached']){const _0x2c1d8c=_0xa75755['attachTo'](()=>this['_getTargetForId'](_0xa75755['id']));_0x8efa4b['registerAnnotation'](_0x2c1d8c),_0xa75755['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x5d7287=this['editor'],_0x6cf761=_0x5d7287['plugins']['get'](it);_0x5d7287['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d7669,_0x2f0464)=>{const {id:_0x139aaf}=ft(_0x5d7669['markerName']),_0x26b99e=_0x5d7287['plugins']['get'](o)['getCommentThread'](_0x139aaf),_0x250465=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x139aaf;let _0x5d8a41;if(_0x26b99e&&_0x26b99e['isResolved']&&!_0x250465&&_0x5d7669['item'])return _0x2f0464['consumable']['consume'](_0x5d7669['item'],'addMarker:'+_0x5d7669['markerName']),_0x2f0464['consumable']['consume'](_0x5d7669['item'],'removeMarker:'+_0x5d7669['markerName']),null;const _0x2a9db3=['ck-comment-marker'];return _0x250465&&_0x2a9db3['push']('ck-comment-marker--active'),_0x5d8a41=_0x26b99e?.['length']?_0x26b99e['comments']['first']['author']['id']:_0x6cf761['me']['id'],{'classes':_0x2a9db3,'attributes':{'data-comment':_0x139aaf,'data-author-id':_0x5d8a41}};}}),_0x5d7287['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xbad857,{options:_0x1586cf})=>{if(_0x1586cf['showCommentHighlights'])return null;const _0x2a0a40=_0x5d7287['plugins']['get'](o),_0x53a5e7=_0x5d7287['model']['markers']['get'](_0xbad857),{id:_0x5a3a55,part:_0xcbad32}=ft(_0xbad857);return _0x53a5e7&&!_0x53a5e7['affectsData']||_0x1586cf['ignoreResolvedComments']&&_0x2a0a40['getCommentThread'](_0x5a3a55)?.['isResolved']?null:{'group':'comment','name':_0xcbad32?_0x5a3a55+':'+_0xcbad32:_0x5a3a55};}}),_0x5d7287['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4fd4de,{writer:_0x461531})=>_0x461531['createElement']('$marker',{'data-name':'comment:'+_0x4fd4de['getAttribute']('id')})}),_0x5d7287['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3301f8=this['editor'],_0x28ec28=_0x3301f8['plugins']['get'](o),_0x31a370=new Set(),_0x1f283b=new Set();_0x3301f8['model']['document']['registerPostFixer'](_0x74eeac=>{let _0x98356e=!0x1;for(const {name:_0x5d4969,data:_0x124b85}of _0x3301f8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x35a6c7,id:_0x489a77}=ft(_0x5d4969);let _0x181651=_0x124b85['newRange'];if('comment'!==_0x35a6c7||!_0x181651)continue;const _0x186f12='$graveyard'===_0x181651['root']['rootName'];_0x186f12||(_0x181651=ht(_0x181651,_0x3301f8['model']),!_0x181651||_0x181651['isCollapsed']||!_0x124b85['newRange']||_0x181651['isEqual'](_0x124b85['newRange']))?_0x3301f8['model']['hasContent'](_0x181651)&&!_0x186f12?this['isThreadsLoadingPaused']?_0x31a370['add'](_0x5d4969):this['_handleThreadMarker'](_0x5d4969,_0x489a77):(_0x1f283b['add'](_0x5d4969),_0x31a370['delete'](_0x5d4969),_0x74eeac['removeMarker'](_0x5d4969),_0x98356e=!0x0):(_0x74eeac['updateMarker'](_0x5d4969,{'range':_0x181651}),_0x98356e=!0x0);}return _0x98356e;}),this['on']('change:isThreadsLoadingPaused',(_0x961c0d,_0x9a9f47,_0x114f58)=>{if(!_0x114f58&&_0x31a370['size'])for(const _0x266421 of _0x31a370){const {id:_0x4c4a02}=ft(_0x266421);_0x31a370['delete'](_0x266421),_0x3301f8['model']['markers']['get'](_0x266421)&&this['_handleThreadMarker'](_0x266421,_0x4c4a02);}}),this['listenTo'](_0x3301f8['model']['document'],'change',()=>{for(const {name:_0x55292e,data:{newRange:_0x19e814}}of _0x3301f8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x25d838,id:_0x506fb7}=ft(_0x55292e);if('comment'!==_0x25d838)continue;const _0x25c70e=_0x28ec28['getCommentThread'](_0x506fb7),_0x24407b=this['hasMarkerForId'](_0x506fb7);_0x25c70e&&(!_0x25c70e['_hasTargetInContent']&&_0x19e814&&_0x3301f8['editing']['view']['once']('render',()=>{const _0x2a5885=_0x3301f8['plugins']['get'](y),_0x48aeb8=_0x28ec28['_threadToController']['get'](_0x25c70e)['view'];_0x2a5885['getByInnerView'](_0x48aeb8)['refreshVisibility']();},{'priority':'low'}),_0x25c70e['_hasTargetInContent']=_0x24407b||!!_0x19e814),_0x19e814||(_0x1f283b['add'](_0x55292e),_0x31a370['delete'](_0x55292e));}for(const _0x5e75e7 of _0x1f283b){const {id:_0x100b70}=ft(_0x5e75e7),_0x873a01=_0x28ec28['getCommentThread'](_0x100b70);if(_0x31a370['delete'](_0x5e75e7),!_0x873a01)continue;const _0x3e9da4=this['hasMarkerForId'](_0x100b70);_0x3e9da4||_0x873a01['isSubmitted']?_0x3e9da4||_0x873a01['unlinkedAt']||_0x873a01['setUnlinkedAt'](new Date()):_0x873a01['remove']();}_0x1f283b['clear']();});}['_handleInitialThreads'](_0x32ad17){_0x32ad17['forEach'](_0x287ea4=>{_0x287ea4['unlinkedAt']&&this['_attachArchivedThread'](_0x287ea4['id']);});}['_getTargetForId'](_0x2a7e65){const _0x5380ff=this['editor'],_0x262612=this['getAllMarkersForId'](_0x2a7e65);return et(_0x5380ff['editing'],_0x262612);}['_getTextContext'](_0x42c988){const _0x10d472=this['getAllMarkersForId'](_0x42c988);let _0x38b3b7='',_0x3a53db=!0x1;for(const _0x265da5 of _0x10d472){const _0x236039=_0x265da5['getRange']();for(const _0x10177b of Array['from'](_0x236039['getItems']()))_0x10177b['is']('$textProxy')?(_0x38b3b7&&_0x3a53db&&(_0x38b3b7+='\x20',_0x3a53db=!0x1),_0x38b3b7+=_0x10177b['data']):_0x3a53db=!0x0;_0x3a53db=!0x0;}return _0x38b3b7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2a3b6b,_0x28ed65){const _0x49cb2b=this['editor'],_0x1d84b2=_0x49cb2b['plugins']['get'](o);let _0x3f8d59=_0x1d84b2['getCommentThread'](_0x28ed65);const _0x19271b=_0x49cb2b['config']['get']('collaboration.channelId'),_0x192957=_0x49cb2b['plugins']['get'](b);if(_0x3f8d59&&(_0x3f8d59['unlinkedAt']&&_0x3f8d59['setUnlinkedAt'](null),_0x3f8d59['isAttached']))return _0x3f8d59;return!this['getAllMarkersForId'](_0x28ed65)[0x0]['managedUsingOperations']?_0x49cb2b['editing']['view']['once']('render',()=>{if(_0x1d84b2['getCommentThread'](_0x28ed65))return;const _0x5d05e3=_0x49cb2b['plugins']['get'](y);_0x3f8d59=_0x1d84b2['openNewCommentThread']({'channelId':_0x19271b,'threadId':_0x28ed65,'target':()=>this['_getTargetForId'](_0x28ed65),'context':{'type':'text','value':this['_getTextContext'](_0x28ed65)}});const _0x4a25d4=_0x1d84b2['_threadToController']['get'](_0x3f8d59)['view'],_0x499187=_0x5d05e3['getByInnerView'](_0x4a25d4);_0x499187&&_0x192957['registerAnnotation'](_0x499187);},{'priority':'low'}):_0x1d84b2['fetchCommentThread']({'channelId':_0x19271b,'threadId':_0x28ed65})['then'](_0x2912bd=>{if('destroyed'!==_0x49cb2b['state']){if(_0x3f8d59=_0x2912bd,_0x3f8d59&&!_0x3f8d59['isAttached']){const _0x5b1304=_0x3f8d59['attachTo'](()=>this['_getTargetForId'](_0x28ed65));_0x192957['registerAnnotation'](_0x5b1304),_0x3f8d59['isResolved']&&this['_reconvertMarkers'](_0x28ed65);}else{if(!_0x3f8d59){const _0x566255=this['getAllMarkersForId'](_0x28ed65);_0x49cb2b['model']['change'](_0x1b4c8a=>{for(const _0x19a9e4 of _0x566255)_0x1b4c8a['removeMarker'](_0x19a9e4);});}}}}),_0x3f8d59;}['_handleThreadMarker'](_0x19440c,_0x45a27a){const _0x11fc63=this['_attachMarkerToThread'](_0x19440c,_0x45a27a);_0x11fc63&&!_0x11fc63['context']&&_0x11fc63['setContext']({'type':'text','value':this['_getTextContext'](_0x45a27a)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5617fe=this['editor'];rt(_0x5617fe['model'],({left:_0x141bb5,entered:_0x598c21})=>{for(const _0x2a1739 of _0x141bb5)if(mt(_0x2a1739)){_0x5617fe['ui']['ariaLiveAnnouncer']['announce'](N(_0x5617fe['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x46b6dc of _0x598c21)if(mt(_0x46b6dc)){_0x5617fe['ui']['ariaLiveAnnouncer']['announce'](N(_0x5617fe['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0xecbc2a)));break;}});}}function dt(_0x26cc28,_0x1ab5ed){return _0x1ab5ed?_0x26cc28+':'+_0x1ab5ed:_0x26cc28;}function ht(_0x3148b5,_0x2ccc61){const _0x50fcc6=_0x2ccc61['schema'],_0x152384=_0x2ccc61['createRange'](_0x3148b5['start']);for(const _0x573c87 of _0x3148b5['getWalker']()){const {type:_0x5e1a5d,item:_0x31dccf,nextPosition:_0x3e1935}=_0x573c87;if('text'===_0x5e1a5d||_0x50fcc6['isObject'](_0x31dccf)){const _0x4f583c=_0x2ccc61['createPositionBefore'](_0x31dccf);_0x152384['isCollapsed']&&(_0x152384['start']=_0x4f583c),_0x152384['end']=_0x3e1935;}}return _0x152384;}function mt(_0x36f778){return'comment'===ft(_0x36f778['name'])['group'];}class s extends _0x4f8b18{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x45cae0=this['editor'],_0x2b60bc=_0x45cae0['plugins']['get'](o),_0x553f93=_0x45cae0['plugins']['get'](r),_0x59cb6a=_0x45cae0['plugins']['get'](y),_0xb8aada=_0x45cae0['plugins']['get'](b);_0x45cae0['ui']['componentFactory']['add']('comment',()=>{const _0x54cae0=this['_createUIButton'](_0x75c5a1);return _0x54cae0['tooltip']=!0x0,_0x54cae0;}),_0x45cae0['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5086db)),_0xb8aada['addSourceCollector'](()=>{const _0x3ddac3=[];for(const [_0x1741a0,_0x57342b]of _0x2b60bc['_threadToController']){const _0x49cb09=_0x553f93['getAllMarkersForId'](_0x1741a0['id']),_0xb446f7=_0x49cb09['map'](_0xf8d273=>_0xf8d273['getRange']());_0x49cb09['length']>0x0&&_0x3ddac3['push']([_0x57342b['view'],_0xb446f7]);}return _0x3ddac3;}),this['listenTo'](_0x59cb6a,'change:activeAnnotations',(_0x546cdb,_0x3b5d95,_0x3811b3)=>{const _0x43d5cb=Array['from'](_0x3811b3)['map'](_0x411179=>_0x411179['innerView'])['find'](_0x3df845=>_0x2b60bc['_viewToController']['has'](_0x3df845));if(!_0x43d5cb)return void(_0x553f93['activeMarker']=null);const _0xb2dee9=_0x2b60bc['_viewToController']['get'](_0x43d5cb)['model']['id'],_0x365592='comment:'+_0xb2dee9;_0xb2dee9&&_0x553f93['hasMarkerForId'](_0xb2dee9)?_0x553f93['activeMarker']=_0x365592:_0x553f93['activeMarker']&&(_0x553f93['activeMarker']=null);}),this['listenTo'](_0x2b60bc,'removeCommentThread',(_0x119830,{threadId:_0x478c9f,isFromAdapter:_0x65c914})=>{!_0x65c914&&_0x45cae0['ui']['focusTracker']['isFocused']&&_0x553f93['hasMarkerForId'](_0x478c9f)&&_0x45cae0['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2b60bc,'addComment',(_0x583156,{threadId:_0x6e247c,isFromAdapter:_0x47c336})=>{if(_0x47c336||!_0x553f93['hasMarkerForId'](_0x6e247c)||!_0x2b60bc['hasCommentThread'](_0x6e247c))return;0x1===_0x2b60bc['getCommentThread'](_0x6e247c)['length']&&(_0x45cae0['editing']['view']['focus'](),_0x583156['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x34efba=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x27dcf6;for(const _0x4ade61 in _0x34efba){const _0x8befcc=_0x4ade61,_0x3d9445=_0x34efba[_0x8befcc];if('commentsLicenseKeyValid'==_0x3d9445||'commentsLicenseKeyInvalid'==_0x3d9445||'commentsLicenseKeyExpired'==_0x3d9445||'commentsLicenseKeyDomainLimit'==_0x3d9445||'commentsLicenseKeyNotAllowed'==_0x3d9445||'commentsLicenseKeyEvaluationLimit'==_0x3d9445||'commentsLicenseKeyTrialLimit'==_0x3d9445||'commentsLicenseKeyUsageLimit'==_0x3d9445){delete _0x34efba[_0x8befcc],_0x27dcf6=_0x3d9445,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x27dcf6&&_0x34efba['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x27dcf6&&_0x34efba['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x27dcf6&&_0x34efba['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x441894){const _0x35f301=this['editor'],_0x225def=new _0x441894(_0x35f301['locale']),_0x21bb95=_0x35f301['commands']['get']('addCommentThread');return _0x225def['set']({'label':N(_0x35f301['locale'],'Comment'),'icon':_0x550872}),_0x225def['bind']('isEnabled')['to'](_0x21bb95,'hasContent'),this['listenTo'](_0x225def,'execute',()=>{_0x21bb95['execute']();}),_0x225def;}}class i extends _0x4f8b18{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1cfef2){super(_0x1cfef2),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x566119,_0x4d285e,_0x7ed5d0)=>{_0x7ed5d0?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4f04da,_0x51f8c9]of this['editor']['commands'])_0x51f8c9['affectsData']&&'addCommentThread'!==_0x4f04da&&_0x51f8c9['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x3f4d51=this['editor']['editing']['view']['document'];this['listenTo'](_0x3f4d51,'cut',_0x1d940a=>_0x1d940a['stop'](),{'priority':'highest'}),this['listenTo'](_0x3f4d51,'clipboardInput',_0x36c02d=>_0x36c02d['stop'](),{'priority':'highest'}),this['listenTo'](_0x3f4d51,'delete',_0x4db27b=>_0x4db27b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x373d91,_0x43199d]of this['editor']['commands'])_0x43199d['affectsData']&&'addCommentThread'!==_0x373d91&&_0x43199d['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x35edc8{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe55bf9){super(_0xe55bf9),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3323c4=this['context']['plugins']['get'](y);this['listenTo'](_0x3323c4,'_activateAnnotation',(_0x575de2,_0x462ace)=>{for(const _0x3b104c of this['activeUIs']){const _0x5ad031=this['_uis']['get'](_0x3b104c);(0x0,this['uisData']['get'](_0x3b104c)['filter'])(_0x462ace)&&_0x5ad031['setActiveAnnotation'](_0x462ace);}}),this['listenTo'](_0x3323c4,'_deactivateAllAnnotations',()=>{for(const _0x30e66b of this['activeUIs']){this['_uis']['get'](_0x30e66b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3323c4['_visibleAnnotations'],'add',(_0x24f77d,_0x412db7)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x412db7);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x517dd3){return this['activeUIs']['has'](_0x517dd3);}['activate'](_0x3746ed,_0x421178=this['defaultFilter']){const _0x46e961=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3746ed))throw new _0x59f856('annotationsuis-missing-ui',this,{'uiName':_0x3746ed});this['isActive'](_0x3746ed)&&this['deactivate'](_0x3746ed),this['activeUIs']['add'](_0x3746ed);const _0x554049=new S();v({'source':_0x46e961['_visibleAnnotations'],'target':_0x554049,'filter':_0x421178}),this['uisData']['set'](_0x3746ed,{'collection':_0x554049,'filter':_0x421178});const _0x535451=this['_uis']['get'](_0x3746ed);_0x535451['attach'](_0x554049),this['listenTo'](_0x535451,'change:activeAnnotation',(_0x4b47b6,_0x13ce5f,_0x5b5991,_0x96a50e)=>{_0x96a50e&&_0x46e961['_removeActiveAnnotation'](_0x96a50e),_0x5b5991&&_0x46e961['_addActiveAnnotation'](_0x5b5991);});}['deactivate'](_0x1790ed){if(this['activeUIs']['delete'](_0x1790ed),!this['_uis']['has'](_0x1790ed))throw new _0x59f856('annotationsuis-missing-ui',this,{'uiName':_0x1790ed});const _0x395274=this['_uis']['get'](_0x1790ed);_0x395274['detach'](),this['stopListening'](_0x395274),this['uisData']['get'](_0x1790ed)['collection']['destroy'](),this['uisData']['delete'](_0x1790ed);}['switchTo'](_0x7fea4d){if(!this['_uis']['has'](_0x7fea4d))throw new _0x59f856('annotationsuis-missing-ui',this,{'uiName':_0x7fea4d});const _0x45f887=this['context']['plugins']['get'](y),_0x45bb0c=Array['from'](_0x45f887['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x7fea4d);const _0x57a678=this['_uis']['get'](_0x7fea4d);_0x57a678['setActiveAnnotation'](_0x45bb0c),_0x57a678['_setSelectedAnnotations']&&_0x45bb0c&&_0x57a678['_setSelectedAnnotations']([_0x45bb0c]);}['deactivateAll'](){for(const _0xac55ff of this['activeUIs'])this['deactivate'](_0xac55ff);}['register'](_0x4e9e6e,_0x5660d6){if(this['_uis']['has'](_0x4e9e6e))throw new _0x59f856('annotationsuis-register-already-registered');if('function'!=typeof _0x5660d6['attach']||'function'!=typeof _0x5660d6['detach']||'function'!=typeof _0x5660d6['setActiveAnnotation'])throw new _0x59f856('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4e9e6e,_0x5660d6);}['refilterAnnotations'](){const _0x618731=this['context']['plugins']['get'](y)['collection'],_0x52db98=new Map(),_0x21665a=Array['from'](this['activeUIs']);for(const _0x549b2c of this['activeUIs']){const _0x4fcd65=this['uisData']['get'](_0x549b2c)['collection'];for(const _0x284ec5 of _0x4fcd65)_0x52db98['set'](_0x284ec5,_0x549b2c);}for(const _0x14bb4e of _0x618731){const _0x379c58=_0x52db98['get'](_0x14bb4e);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x14bb4e);const _0x39138d=_0x21665a['find'](_0x57f8c2=>this['uisData']['get'](_0x57f8c2)['filter'](_0x14bb4e));_0x379c58!==_0x39138d&&(_0x379c58&&this['uisData']['get'](_0x379c58)['collection']['remove'](_0x14bb4e),_0x39138d&&this['uisData']['get'](_0x39138d)['collection']['add'](_0x14bb4e));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5474c0){const _0x4b3a29=[];for(const _0x4e1930 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4e1930)['filter'])(_0x5474c0)&&_0x4b3a29['push'](_0x4e1930);}if(_0x4b3a29['length']>0x1)throw new _0x59f856('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4b3a29,'annotationType':_0x5474c0['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x437e64){super(_0x437e64);const _0x530932=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 _0x336e57(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x530932['to']('class')],'style':{'minHeight':_0x530932['to']('minHeight',_0x19b617=>'number'==typeof _0x19b617?_i(_0x19b617+0xa):null)},'dir':_0x437e64['uiLanguageDirection'],'role':'application','aria-label':N(_0x437e64,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x437e64,'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',_0x4fd437=>{this['_updateItemPositionInFocusables'](_0x4fd437['source']);}),this['list']['forEach'](_0x2815d4=>{this['focusTracker']['add'](_0x2815d4['element']),this['_updateItemPositionInFocusables'](_0x2815d4);}),this['list']['on']('change',(_0x4ad211,_0x4b482e)=>{for(const _0x591758 of _0x4b482e['removed'])this['focusTracker']['remove'](_0x591758['element']),this['focusables']['remove'](_0x591758);for(const _0x589c88 of _0x4b482e['added'])this['focusTracker']['add'](_0x589c88['element']),this['_updateItemPositionInFocusables'](_0x589c88);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2d7bd4){const _0xd55cb3=this['focusables']['getIndex'](_0x2d7bd4);let _0x4acc7a,_0x9fb251;for(const _0x4f12ec of this['focusables'])if(_0x2d7bd4['top']<_0x4f12ec['top']){_0x4acc7a=_0x4f12ec;break;}if(_0x9fb251=_0x4acc7a?this['focusables']['getIndex'](_0x4acc7a):this['focusables']['length'],-0x1!==_0xd55cb3){if(_0xd55cb3===_0x9fb251-0x1)return;this['focusables']['remove'](_0x2d7bd4),_0x9fb251=_0x4acc7a?this['focusables']['getIndex'](_0x4acc7a):this['focusables']['length'];}this['focusables']['add'](_0x2d7bd4,_0x9fb251);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1a135a){super(_0x1a135a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4df518,_0x31974f)=>_0x4df518+_0x31974f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x29b4e8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x29b4e8['to']('isAnimationDisabled',_0x46a6d4=>_0x46a6d4?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x29b4e8['to']('top',_0x147b5f=>Ot(_0x147b5f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2494cb=this['element']['clientHeight'];_0x2494cb&&(this['height']=_0x2494cb);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x35edc8{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c8afc){super(_0x3c8afc),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 _0x59a0aa=this['context']['config']['get']('sidebar.container');_0x59a0aa&&this['setContainer'](_0x59a0aa);}['setContainer'](_0x207df2){if(!g(_0x207df2))throw new _0x59f856('sidebar-setcontainer-invalid-element');this['container']=_0x207df2;}['_attachToContainer']({viewClass:_0x35e48f='',spaceBetweenItems:_0x9882b3=0x19}={}){if(!g(this['container']))throw new _0x59f856('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x35e48f,this['_spaceBetweenItems']=_0x9882b3;}['rearrange']({removedAnnotation:_0x49a212,previousAnnotation:_0x367afc,nextAnnotation:_0x439c23}){const _0x13345a=this['getSidebarItemView'](_0x49a212);this['view']['list']['remove'](_0x13345a),this['_destroySidebarItemView'](_0x49a212),_0x367afc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x367afc)),_0x439c23&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x439c23)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x168d31,activatedAnnotation:_0x26ee98,disableAnimationOnActivatedAnnotation:_0x5c75e6}){if(this['_activeAnnotation']=_0x26ee98,_0x168d31){_0x168d31['isActive']=!0x1;const _0x732306=this['getSidebarItemView'](_0x168d31);_0x732306&&_0x5c75e6&&(_0x732306['isAnimationDisabled']=!0x1);}if(_0x26ee98){const _0x4398d8=this['getSidebarItemView'](_0x26ee98);_0x4398d8&&(_0x26ee98['isActive']=!0x0,_0x5c75e6&&(_0x4398d8['isAnimationDisabled']=!0x0,_0x4398d8['top']+=0x1),this['_alignToTargetRect'](_0x4398d8));}}['_detachFromContainer'](_0x3ad196){if(this['view']['element']['remove'](),_0x3ad196){for(const _0x535a02 of _0x3ad196)this['_destroySidebarItemView'](_0x535a02);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x31198e,_0x46300a){_0x46300a||(_0x46300a=_0x31198e['view']);const _0x309f06=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x309f06,_0x31198e),this['_annotationToSidebarItemView']['set'](_0x31198e,_0x309f06),_0x309f06['content']['add'](_0x46300a),this['listenTo'](_0x31198e['view'],'change:targetRect',(_0x5cfa31,_0x26b825,_0x335621)=>{const _0x41b353=this['_getTargetTop'](_0x31198e,_0x335621);_0x309f06['_targetTop']!=_0x41b353&&(_0x309f06['_targetTop']=_0x41b353,this['_setItemTop'](_0x309f06,_0x41b353));}),this['listenTo'](_0x309f06,'change:top',()=>{this['_recalculate'](_0x309f06,'top');}),this['listenTo'](_0x309f06,'change:bottom',()=>{this['_recalculate'](_0x309f06,'bottom');}),this['_alignToTargetRect'](_0x309f06);const _0x59e6cb=this['_getItemBefore'](_0x309f06);if(_0x59e6cb)this['_alignAfterItem'](_0x59e6cb,_0x309f06)||this['_alignToTargetRect'](_0x309f06);else this['_alignToTargetRect'](_0x309f06);return this['_updateLastItem'](),this['view']['list']['add'](_0x309f06),_0x309f06;}['_alignForTopChange'](_0xf53cf9){if(!_0xf53cf9['content']['length'])return;const _0x5d3e6b=this['_getItemBefore'](_0xf53cf9);if(!_0x5d3e6b)return;const _0x12f79e=this['_sidebarItemViewToAnnotation']['get'](_0x5d3e6b),_0x4dec4a=this['_activeAnnotation'];_0x4dec4a&&_0x4dec4a===_0x12f79e?this['_alignAfterItem'](_0x5d3e6b,_0xf53cf9):this['_alignBeforeItem'](_0xf53cf9,_0x5d3e6b);}['_alignForBottomChange'](_0x12c29c){if(!_0x12c29c['content']['length'])return;const _0x435b23=this['_getItemAfter'](_0x12c29c);if(!_0x435b23)return;const _0x4b3878=this['_sidebarItemViewToAnnotation']['get'](_0x435b23),_0x32d017=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x53b221=this['_activeAnnotation'];_0x53b221&&_0x53b221===_0x4b3878&&_0x32d017?(this['_alignBeforeItem'](_0x435b23,_0x12c29c),this['_alignAfterItem'](_0x12c29c,_0x435b23)):_0x53b221&&_0x53b221===_0x4b3878?this['_alignBeforeItem'](_0x435b23,_0x12c29c):this['_alignAfterItem'](_0x12c29c,_0x435b23);}['_recalculate'](_0x36ae25,_0x1e8512){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x6211af,changedProp:_0x230324}of this['_recalculateBuffer'])'top'===_0x230324?this['_alignForTopChange'](_0x6211af):this['_alignForBottomChange'](_0x6211af);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x36ae25,'changedProp':_0x1e8512});}['getSidebarItemView'](_0x139eb9){return this['_annotationToSidebarItemView']['get'](_0x139eb9);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5f08ab){const _0x270ee8=this['getSidebarItemView'](_0x5f08ab);this['stopListening'](_0x270ee8),this['stopListening'](_0x5f08ab['view']),_0x270ee8['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5f08ab),this['_sidebarItemViewToAnnotation']['delete'](_0x270ee8);}['_createSidebarView'](){const _0x239696=new H(this['context']['locale']);return _0x239696['render'](),this['on']('change:_lastItem',(_0x16371a,_0x453a4d,_0x59a422,_0x42be33)=>{_0x42be33&&_0x239696['unbind']('minHeight'),_0x59a422?_0x239696['bind']('minHeight')['to'](_0x59a422,'bottom'):_0x239696['minHeight']=null;}),_0x239696;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x42f339){const _0x4a3cbb=this['_sidebarItemViewToAnnotation']['get'](_0x42f339),_0x14c0b9=_0x4a3cbb&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4a3cbb)-0x1);return _0x14c0b9&&this['getSidebarItemView'](_0x14c0b9)||null;}['_getItemAfter'](_0x1f2902){const _0x2da587=this['_sidebarItemViewToAnnotation']['get'](_0x1f2902),_0x4d413b=_0x2da587&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2da587)+0x1);return _0x4d413b&&this['getSidebarItemView'](_0x4d413b)||null;}['_alignBeforeItem'](_0x1a2257,_0x15fa62){_0x1a2257['updateHeight']();const _0xd2705b=G(_0x15fa62['bottom']+this['_spaceBetweenItems'],_0x1a2257['top']);return!!_0xd2705b&&(this['_setItemTop'](_0x15fa62,_0x15fa62['top']-_0xd2705b),!0x0);}['_alignAfterItem'](_0x3945d8,_0x178254){_0x3945d8['updateHeight']();const _0x8f7b31=G(_0x3945d8['bottom']+this['_spaceBetweenItems'],_0x178254['top']);return!!_0x8f7b31&&(this['_setItemTop'](_0x178254,_0x178254['top']+_0x8f7b31,!0x1),!0x0);}['_alignToTargetRect'](_0xa0b04f){const _0x45de9a=this['_sidebarItemViewToAnnotation']['get'](_0xa0b04f);if(!_0x45de9a||!_0x45de9a['target']||!_0x45de9a['targetRect'])return;const _0x26d79e=this['_getTargetTop'](_0x45de9a,_0x45de9a['targetRect']);this['_setItemTop'](_0xa0b04f,_0x26d79e);}['_getTargetTop'](_0x3bb611,_0x1dece1){if(null===_0x1dece1)return 0x0;if(_0x3bb611['target']instanceof _0x29c0c7)return _0x1dece1['top'];{const _0x67b0a7=new _0x29c0c7(this['view']['element'])['top'];return _0x1dece1['top']-_0x67b0a7;}}['_setItemTop'](_0x53ee9c,_0x661be5,_0xa847cf=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xa847cf&&(_0x661be5=Math['max'](_0x661be5,this['_getMaxAvailableTop'](_0x53ee9c))),_0x53ee9c['top']=_0x661be5;}['_getMaxAvailableTop'](_0x450c49){let _0x14af56=this['_getItemBefore'](_0x450c49),_0x54116b=0x0;for(;_0x14af56;)_0x14af56['updateHeight'](),_0x54116b+=this['_spaceBetweenItems']+_0x14af56['height'],_0x14af56=this['_getItemBefore'](_0x14af56);return _0x54116b;}}function G(_0x39a87a,_0x38d63c){return Math['max'](_0x39a87a-_0x38d63c,0x0);}function g(_0x52e4b4){return null!==_0x52e4b4&&'object'==typeof _0x52e4b4&&0x1===_0x52e4b4['nodeType'];}class e extends _0x35edc8{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x585f5a){super(_0x585f5a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1ed765(),this['_refreshPositioningDebounced']=_0x489039(()=>{_0x585f5a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2df489=this['context']['plugins']['get'](j),_0x365fd9=this['context']['plugins']['get'](z);_0x2df489['register']('wideSidebar',this),_0x365fd9['container']&&_0x2df489['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2049b0){if(_0x2049b0===this['activeAnnotation'])return;const _0x3106dd=this['context']['plugins']['get'](z);_0x3106dd['_activeAnnotation']=_0x2049b0;const _0xcad301=this['activeAnnotation'];_0x3106dd['refresh']({'blurredAnnotation':_0xcad301,'activatedAnnotation':_0x2049b0}),this['activeAnnotation']=_0x2049b0;}['attach'](_0x39d5bd){this['annotations']=_0x39d5bd;const _0x52a108=this['context']['plugins']['get'](z);if(_0x52a108['_annotations']=_0x39d5bd,this['isAttached'])throw new _0x59f856('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x52a108,'set:container',()=>{this['detach'](),this['listenTo'](_0x52a108,'change:container',_0x5be774=>{_0x5be774['off'](),this['attach'](_0x39d5bd);});}),_0x52a108['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x284eeb=_0x549792=>{_0x549792['updateTargetRect'](),_0x52a108['addAnnotation'](_0x549792);};for(const _0x33c546 of _0x39d5bd)_0x284eeb(_0x33c546);this['listenTo'](_0x39d5bd,'add',(_0x3d79fe,_0x2bb9b1)=>{_0x284eeb(_0x2bb9b1);}),this['listenTo'](_0x39d5bd,'remove',(_0xb96bc0,_0x22757a,_0xb05f43)=>{_0x52a108['rearrange']({'removedAnnotation':_0x22757a,'previousAnnotation':_0x39d5bd['get'](_0xb05f43-0x1),'nextAnnotation':_0x39d5bd['get'](_0xb05f43+0x1)}),_0x22757a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x39d5bd,'focus',(_0x231d85,_0x2d0f4d)=>{this['setActiveAnnotation'](_0x2d0f4d);}),this['listenTo'](_0x39d5bd,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1b8235=this['context']instanceof _0x2dec0a?this['context']['editors']:new _0x1ed765([this['context']]);for(const _0x539764 of _0x1b8235)this['_integrateWithEditorAnnotations'](_0x539764);this['listenTo'](_0x1b8235,'add',(_0x21bd29,_0x5f1f09)=>{this['listenTo'](_0x5f1f09,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5f1f09);});}),this['listenTo'](_0x1b8235,'remove',(_0xf73d08,_0x7302a9)=>{_0x7302a9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x7302a9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x59f856('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x113700=this['context']['plugins']['get'](z);_0x113700['_detachFromContainer'](this['annotations']),this['stopListening'](_0x113700),this['stopListening'](this['annotations']),this['context']instanceof _0x2dec0a&&this['stopListening'](this['context']['editors']);for(const _0x5517fe of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5517fe);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1b9352){if(!_0x1b9352['plugins']['has']('EditorAnnotations'))return;const _0x4cfeb9=_0x1b9352['plugins']['get']('EditorAnnotations'),_0xd1cc15=()=>{const _0x3bf1e0=_0x4cfeb9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3bf1e0[0x0]||null);};this['listenTo'](_0x4cfeb9,'refresh',_0xd1cc15),this['listenTo'](_0x4cfeb9,'blur',(_0x3bd2d6,{isAnnotationTracked:_0x5f37ae})=>{this['activeAnnotation']&&_0x5f37ae(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4cfeb9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1e7778=>{_0x4cfeb9['hasDomSelection']()&&(_0xd1cc15(),_0x1e7778['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4cfeb9);}['_destroyEditorAnnotationsIntegration'](_0xd958e4){this['stopListening'](_0xd958e4),this['_editorAnnotations']['remove'](_0xd958e4);}}class C extends _0x75c5a1{['counterView'];constructor(_0x229f38){super(_0x229f38);const _0x523d6d=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x52b6d3,_0x3e2317)=>_0x52b6d3?'...':_0x3e2317['toString']()),this['set']('annotationType',''),this['icon']=_0x550872,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x523d6d['to']('annotationType',_0x41055e=>'ck-annotation-counter__badge--'+_0x41055e),_0x523d6d['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x523d6d['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x35edc8{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39341e){super(_0x39341e),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x428cc8())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1ed765(),this['_refreshPositioningDebounced']=_0x489039(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x276dde(this['context']['locale']),this['balloonPanelView']=new _0x375243(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x577359){this['annotations']=_0x577359;const _0x288b53=this['context']['plugins']['get'](z),_0x3bfd5a=this['balloonPanelView'];if(_0x288b53['_annotations']=_0x577359,this['isAttached'])throw new _0x59f856('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x288b53,'set:container',()=>{this['detach'](),this['listenTo'](_0x288b53,'change:container',_0x21a46c=>{_0x21a46c['off'](),this['attach'](_0x577359);});}),_0x288b53['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x39efee=_0x164bc8=>{const _0xd602b9=new C(this['context']['locale']);_0x288b53['addAnnotation'](_0x164bc8,_0xd602b9),this['_annotationToNarrowView']['set'](_0x164bc8,_0xd602b9),_0xd602b9['bind']('isDirty','annotationType','number')['to'](_0x164bc8['view'],'isDirty','type','length'),_0xd602b9['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3bfd5a['content']['first']!==_0x164bc8['view']?(this['_showBalloon'](_0x164bc8),_0x164bc8['view']['element']['focus'](),this['setActiveAnnotation'](_0x164bc8)):this['setActiveAnnotation'](null);});};for(const _0x33f930 of _0x577359)_0x39efee(_0x33f930);this['listenTo'](_0x577359,'add',(_0x2bb60a,_0x546aa4)=>{_0x39efee(_0x546aa4);}),this['listenTo'](_0x577359,'remove',(_0x12e315,_0x23e0f9,_0x57bc9c)=>{this['_annotationToNarrowView']['get'](_0x23e0f9)['destroy'](),this['_annotationToNarrowView']['delete'](_0x23e0f9),_0x288b53['rearrange']({'removedAnnotation':_0x23e0f9,'previousAnnotation':_0x577359['get'](_0x57bc9c-0x1),'nextAnnotation':_0x577359['get'](_0x57bc9c+0x1)}),_0x23e0f9===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x577359,'focus',(_0x4a456a,_0x7a594c)=>{this['setActiveAnnotation'](_0x7a594c);}),this['listenTo'](_0x577359,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x429567,_0x25cb20)=>{_0x25cb20['keyCode']===_0x457aae['esc']&&_0x3bfd5a['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3bfd5a['content']['first']),this['_hideBalloon'](),_0x25cb20['stopPropagation'](),_0x25cb20['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x52d92e,_0x221b99)=>{const _0x4ff9c2=_0x221b99['target'];_0x3bfd5a['isVisible']&&_0x3bfd5a['element']['contains'](_0x4ff9c2)||_0x288b53['view']['element']['contains'](_0x4ff9c2)||_0x52d92e['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x30d92b=>_0x30d92b['contains'](_0x4ff9c2))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x472fb5=this['context']instanceof _0x2dec0a?this['context']['editors']:new _0x1ed765([this['context']]);for(const _0x2645cc of _0x472fb5)this['_integrateWithEditorAnnotations'](_0x2645cc);this['listenTo'](_0x472fb5,'add',(_0x19e79d,_0x41af93)=>{this['listenTo'](_0x41af93,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x41af93);});}),this['listenTo'](_0x472fb5,'remove',(_0x13a1b9,_0x29fac8)=>{_0x29fac8['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x29fac8['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x37d111){if(_0x37d111===this['activeAnnotation'])return;const _0x5cb80f=this['context']['plugins']['get'](z);if(_0x5cb80f['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x37d111,'disableAnimationOnActivatedAnnotation':!0x0}),_0x37d111)_0x5cb80f['getSidebarItemView'](_0x37d111)?this['_showBalloon'](_0x37d111):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x37d111;}['detach'](){if(!this['isAttached'])throw new _0x59f856('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x15b4f6=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x873c12=>_0x873c12['destroy']()),this['_annotationToNarrowView']['clear'](),_0x15b4f6['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2dec0a&&this['stopListening'](this['context']['editors']);for(const _0x494206 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x494206);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'](_0x2c59aa){if(!_0x2c59aa['plugins']['has']('EditorAnnotations'))return;const _0x136018=_0x2c59aa['plugins']['get']('EditorAnnotations'),_0x58b15e=this['context']['plugins']['get'](z),_0x2c0357=this['annotations'],_0x5c98aa=this['balloonPanelView'],_0x43cae7=()=>{const _0x3f1a8e=_0x136018['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x3f1a8e),this['setActiveAnnotation'](_0x3f1a8e[0x0]||null);};this['listenTo'](_0x136018,'refresh',_0x43cae7),this['listenTo'](_0x136018,'blur',(_0x1bb041,{isAnnotationTracked:_0x563904})=>{this['activeAnnotation']&&_0x563904(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x136018,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2c0357,'blur',_0x5b1f08=>{_0x136018['hasDomSelection']()&&_0x5b1f08['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x35dc8a,_0x53d6ea)=>{const _0x2b6ac5=_0x53d6ea['target'];_0x5c98aa['isVisible']&&_0x5c98aa['element']['contains'](_0x2b6ac5)||_0x58b15e['view']['element']['contains'](_0x2b6ac5)||this['activeAnnotation']&&_0x136018['hasDomSelection']()&&(_0x43cae7(),_0x35dc8a['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x136018);}['_destroyEditorAnnotationsIntegration'](_0x562874){_0x562874&&(this['stopListening'](_0x562874),this['_editorAnnotations']['remove'](_0x562874));}['_setSelectedAnnotations'](_0x4a6bbc){for(const _0x4e040c of this['_selectedAnnotations'])_0x4a6bbc['includes'](_0x4e040c)||this['_manuallyClosedAnnotationViews']['delete'](_0x4e040c['view']);this['_selectedAnnotations']=_0x4a6bbc;}['_refreshPositioning'](){const _0x4a4c2e=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4a4c2e['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x30f21b){if(this['_manuallyClosedAnnotationViews']['has'](_0x30f21b['view']))return;const _0x392519=this['balloonPanelView']['content']['first'];_0x392519!==_0x30f21b['view']?(_0x392519&&this['_detachListeners'](_0x392519),this['_attachListeners'](_0x30f21b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x30f21b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x5ab495=this['balloonPanelView']['content']['first'],_0x1ea66e=_0x5ab495&&this['annotations']['getByView'](_0x5ab495);if(!_0x1ea66e||!this['_annotationToNarrowView']['has'](_0x1ea66e))return;const _0xbd736e=this['_annotationToNarrowView']['get'](_0x1ea66e)['element'],_0xfc7130=(function(){const _0x13a0ad=_0x375243['defaultPositions'];return[_0x13a0ad['southArrowNorthEast'],_0x13a0ad['northArrowSouthEast'],_0x13a0ad['southArrowNorth'],_0x13a0ad['northArrowSouth'],_0x13a0ad['southArrowNorthWest'],_0x13a0ad['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xbd736e,'positions':_0xfc7130});}['_hideBalloon'](){const _0x175904=this['balloonPanelView'],_0xbc0414=_0x175904['content']['first'];_0xbc0414&&(this['_detachListeners'](_0xbc0414),_0x175904['unpin'](),_0x175904['content']['clear']());}['_attachListeners'](_0xbd58c8){this['listenTo'](_0xbd58c8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xbd58c8,'Esc',(_0x3f8296,_0x1b5518)=>{this['_manuallyClosedAnnotationViews']['add'](_0xbd58c8),this['_hideBalloon'](),_0x1b5518();});}['_detachListeners'](_0x156792){this['stopListening'](_0x156792);}}class c extends _0x4f8b18{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x4ca3ae,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x354146){super(_0x354146),_0x354146['editing']['view']['addObserver'](_0x1c3042),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x354146['plugins']['get'](_0x4ca3ae),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x234b30=this['editor']['plugins']['get'](j);_0x234b30['context']===this['editor']&&(_0x234b30['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3c8b81,_0x2b205c)=>{const _0x1821ac=this['_balloon'];if(this['isAttached']&&_0x1821ac['visibleView']){const _0x5c04d1=this['annotations']['getByView'](_0x1821ac['visibleView']);_0x5c04d1&&this['_closeAnnotation'](_0x5c04d1),_0x2b205c();}}));}['afterInit'](){const _0x4deb7f=this['editor']['plugins']['get'](j);_0x4deb7f['context']===this['editor']&&(_0x4deb7f['hasActive']()||_0x4deb7f['switchTo']('inline'));}['setActiveAnnotation'](_0x334fe0){_0x334fe0!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x334fe0&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x334fe0)&&this['_addAnnotationToBalloon'](_0x334fe0,!0x0),_0x334fe0['isActive']=!0x0),_0x334fe0||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x334fe0);}['attach'](_0x39fab8){this['annotations']=_0x39fab8;const _0x132832=this['editor']['plugins']['get'](j),_0x46a7c4=this['_balloon'];if(this['isAttached'])throw new _0x59f856('inlineannotations-attach-already-attached',this);if(_0x132832['context']!==this['editor'])throw new _0x59f856('inlineannotations-not-allowed-with-context',this);const _0x35169d=this['editor']['plugins']['get'](b);this['listenTo'](_0x35169d,'refresh',()=>{const _0x5f5573=_0x35169d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x17fd6b,_0x75e8d;!this['_forceRefresh']&&(_0x17fd6b=_0x5f5573,_0x75e8d=this['_selectedAnnotations'],_0x17fd6b['length']===_0x75e8d['length']&&_0x17fd6b['every'](_0x3de819=>_0x75e8d['includes'](_0x3de819)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5f5573),this['setActiveAnnotation'](_0x5f5573[0x0]||null));}),this['listenTo'](_0x35169d,'blur',(_0x227068,{isAnnotationTracked:_0x1a7e9d})=>{this['activeAnnotation']&&_0x1a7e9d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3a7fe6,_0x5252a3,_0xb95f36)=>{_0xb95f36||this['setActiveAnnotation'](null);}),this['listenTo'](_0x39fab8,'remove',(_0x46dcb7,_0x3bcf21)=>{this['_removeAnnotationFromBalloon'](_0x3bcf21),_0x3bcf21===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x46a7c4,'change:visibleView',(_0x347b22,_0x2dea56,_0x395ab1,_0x53a87a)=>{_0x53a87a&&this['stopListening'](_0x53a87a);const _0x5f5577=_0x39fab8['getByView'](_0x395ab1);_0x395ab1&&_0x5f5577&&(this['listenTo'](_0x395ab1,'change:height',()=>{_0x46a7c4['updatePosition']();}),this['listenTo'](_0x395ab1,'Esc',()=>{this['_closeAnnotation'](_0x5f5577),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5f5577&&this['setActiveAnnotation'](_0x5f5577));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x46a7c4['visibleView']&&(_0x39fab8['getByView'](_0x46a7c4['visibleView'])&&_0x46a7c4['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 _0x59f856('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x103946 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x103946);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x3c5960){for(const _0x133368 of this['_selectedAnnotations'])_0x3c5960['includes'](_0x133368)||this['_manuallyClosed']['delete'](_0x133368);for(const _0x4324c4 of this['annotations'])_0x3c5960['includes'](_0x4324c4)||this['_removeAnnotationFromBalloon'](_0x4324c4);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3e9adb of _0x3c5960)this['_addAnnotationToBalloon'](_0x3e9adb);}this['_selectedAnnotations']=_0x3c5960;}['_addAnnotationToBalloon'](_0x79dfd0,_0x162d7=!0x1){this['_manuallyClosed']['has'](_0x79dfd0)||(this['_addedAnnotations']['has'](_0x79dfd0)||this['_balloon']['hasView'](_0x79dfd0['view'])||(this['_addedAnnotations']['add'](_0x79dfd0),this['_balloon']['add']({'stackId':_0x79dfd0['view']['id'],'view':_0x79dfd0['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x79dfd0)}})),_0x162d7&&this['_balloon']['showStack'](_0x79dfd0['view']['id']));}['_getBalloonTargetForAnnotation'](_0x220a0d){const _0x4af6d2=_0x220a0d['target'],_0x5bf3c5=this['editor']['editing']['view'],_0x344878=_0x5bf3c5['document']['selection']['getFirstRange'](),_0x59067b=_0x5bf3c5['domConverter']['viewRangeToDom'](_0x344878);if(_0x59067b['collapse'](!0x0),_0x4af6d2){if(_0x4af6d2 instanceof _0x29c0c7)return _0x4af6d2;let _0x309139=[];for(const _0x23205f of _0x4af6d2)_0x309139['push'](...F(_0x23205f['getClientRects']()));_0x309139=function(_0x6fc323){const _0x553e4a=[];let _0x17f345=_0x6fc323[0x0];for(let _0x404994=0x1;_0x404994<_0x6fc323['length'];_0x404994++)P(_0x17f345,_0x6fc323[_0x404994])?_0x17f345['width']+=_0x6fc323[_0x404994]['width']:(_0x553e4a['push'](_0x17f345),_0x17f345=_0x6fc323[_0x404994]);return _0x553e4a['push'](_0x17f345),_0x553e4a;}(_0x309139);const _0x332d3a=_0x59067b['getBoundingClientRect']();return _0x309139['find'](_0x59a5e0=>_0x59a5e0['top']<=_0x332d3a['top']&&_0x59a5e0['bottom']>=_0x332d3a['bottom']&&_0x59a5e0['left']<=_0x332d3a['left']&&_0x59a5e0['right']>=_0x332d3a['right'])||_0x309139[0x0];}return _0x220a0d['targetRect']||_0x59067b;}['_removeAnnotationFromBalloon'](_0x35097c){this['_addedAnnotations']['has'](_0x35097c)&&this['_balloon']['hasView'](_0x35097c['view'])&&(this['_addedAnnotations']['delete'](_0x35097c),this['_balloon']['remove'](_0x35097c['view']));}['_closeAnnotation'](_0x2ffe65){this['_manuallyClosed']['add'](_0x2ffe65),this['_removeAnnotationFromBalloon'](_0x2ffe65);}}function F(_0x51bd64){return Array['from'](_0x51bd64)['map'](DOMRect['fromRect']);}function P(_0x1073f7,_0x702dbb){return _0x1073f7['top']===_0x702dbb['top']&&_0x1073f7['bottom']===_0x702dbb['bottom']&&_0x1073f7['right']===_0x702dbb['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x424dfa,_0x1efbbd){super(_0x424dfa),this['set']('isEmpty',!_0x1efbbd['length']),this['focusTracker']=new _0x336e57(),this['_annotationViews']=_0x1efbbd,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2fdf0a({'focusables':_0x1efbbd,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1efbbd,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1efbbd,'remove',(_0x4afdb8,_0x54d321)=>{_0x54d321['isActive']&&this['focus'](),_0x1efbbd['length']||(this['isEmpty']=!0x0);});const _0x1521d5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x424dfa,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1efbbd},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1521d5['if']('isEmpty','ck-hidden',_0x361256=>!_0x361256)]},'children':[{'text':N(_0x424dfa,'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 _0x1a7d57 of this['_annotationViews'])this['focusTracker']['add'](_0x1a7d57['element']);this['_annotationViews']['on']('change',(_0x14edbd,{added:_0x48984e,removed:_0x3daaf6})=>{for(const _0x43d2be of _0x48984e)this['focusTracker']['add'](_0x43d2be['element']);for(const _0x32f070 of _0x3daaf6)this['focusTracker']['remove'](_0x32f070['element']);});}}class p extends _0x35edc8{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x4fcf33){super(_0x4fcf33),this['archivedThreads']=new _0x1ed765();}['init'](){const _0x5b2e77=this['context'],_0x8c5982=_0x5b2e77['plugins']['get'](o),_0x6ecdbd=_0x5b2e77['plugins']['get'](y);this['listenTo'](_0x8c5982,'addCommentThread',(_0x238266,{threadId:_0x581511})=>{const _0x3ee452=_0x8c5982['getCommentThread'](_0x581511);_0x3ee452['archivedAt']&&this['archivedThreads']['add'](_0x3ee452,this['_calculatePosition'](_0x3ee452['archivedAt'])),this['listenTo'](_0x3ee452,'change:archivedAt',(_0x2e165f,_0x5513e6,_0x3a9975)=>{_0x3a9975?this['archivedThreads']['has'](_0x3ee452)||this['archivedThreads']['add'](_0x3ee452,this['_calculatePosition'](_0x3ee452['archivedAt'])):this['archivedThreads']['has'](_0x3ee452)&&this['archivedThreads']['remove'](_0x3ee452);});}),this['listenTo'](_0x8c5982,'removeCommentThread',(_0x122d40,{threadId:_0x21b661})=>{const _0x5ad014=_0x8c5982['getCommentThread'](_0x21b661);this['stopListening'](_0x5ad014),this['archivedThreads']['has'](_0x5ad014)&&this['archivedThreads']['remove'](_0x5ad014);},{'priority':'highest'}),this['listenTo'](_0x6ecdbd['collection'],'focus',(_0x356e84,_0x400f9d)=>{_0x400f9d['isVisible']||(_0x400f9d['isActive']=!0x0,_0x6ecdbd['activate'](_0x400f9d));});}['_calculatePosition'](_0x37a8a4){const _0x2b5887=[...this['archivedThreads']]['findIndex'](_0xfadd56=>_0xfadd56['archivedAt']<_0x37a8a4);return _0x2b5887>-0x1?_0x2b5887:this['archivedThreads']['length'];}}class a extends _0x4f8b18{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x16b75d];}constructor(_0x5b1c0b){super(_0x5b1c0b),this['annotationViews']=new _0xb7b669(),this['_pendingThreads']=[];}['init'](){const _0x55464e=this['editor'],_0x25f99e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x55464e['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x75c5a1,!0x0)),_0x55464e['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2f9f33=this['_createCommentsArchiveButton'](_0x5086db);return _0x2f9f33['set']({'role':'menuitemcheckbox'}),_0x2f9f33;});const _0x2c3b21=_0x55464e['plugins']['get'](p),_0x5628ad=_0x55464e['plugins']['get']('Annotations'),_0x3abe19=_0x55464e['plugins']['get']('CommentsRepository');_0x2c3b21['archivedThreads']['forEach'](_0x4b4155=>{this['_handleNewThread'](_0x4b4155);}),this['listenTo'](_0x2c3b21['archivedThreads'],'add',(_0x225070,_0x3b31e6)=>{this['_handleNewThread'](_0x3b31e6);}),this['listenTo'](_0x5628ad['collection'],'add',(_0x39a920,_0x31e38e)=>{const _0x58fcaf=this['_pendingThreads']['find'](_0x1609ba=>{const _0x667168=_0x3abe19['_threadToController']['get'](_0x1609ba);return _0x667168&&_0x31e38e['innerView']===_0x667168['view'];});if(_0x58fcaf){const _0x14cd27=this['_calculatePosition'](_0x58fcaf['archivedAt']);this['annotationViews']['add'](_0x31e38e['view'],_0x14cd27),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x58fcaf),0x1);}}),this['listenTo'](_0x2c3b21['archivedThreads'],'remove',(_0x141788,_0x8e1010)=>{const _0x44f0f8=_0x55464e['config']['get']('collaboration.channelId');if(!_0x44f0f8||_0x8e1010['channelId']===_0x44f0f8){if(this['_pendingThreads']['includes'](_0x8e1010))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x8e1010),0x1);else{const _0x3d2619=_0x3abe19['_threadToController']['get'](_0x8e1010),_0x53287b=_0x5628ad['getByInnerView'](_0x3d2619['view']);this['annotationViews']['remove'](_0x53287b['view']),this['stopListening'](_0x53287b['focusableElements']);}}}),this['listenTo'](_0x5628ad['collection'],'add',(_0x21ab6e,_0x47c5f5)=>{this['listenTo'](_0x47c5f5,'escape',_0x25f99e);}),this['listenTo'](_0x5628ad['collection'],'remove',(_0x25170b,_0x4e3528)=>{this['stopListening'](_0x4e3528,'escape',_0x25f99e);});}['_handleNewThread'](_0x44fd4e){const _0x56312c=this['editor']['plugins']['get']('CommentsRepository'),_0x2465aa=this['editor']['plugins']['get']('Annotations'),_0x1bfa46=this['editor']['config']['get']('collaboration.channelId');if(!_0x1bfa46||_0x44fd4e['channelId']===_0x1bfa46){const _0x2517d8=_0x56312c['_threadToController']['get'](_0x44fd4e);if(!_0x2517d8)return void this['_pendingThreads']['push'](_0x44fd4e);const _0x1686aa=this['_calculatePosition'](_0x44fd4e['archivedAt']),_0x1c9355=_0x2465aa['getByInnerView'](_0x2517d8['view']);_0x1c9355['isVisible']&&_0x2465aa['_visibleAnnotations']['remove'](_0x1c9355),this['annotationViews']['add'](_0x1c9355['view'],_0x1686aa);}}['_calculatePosition'](_0x33e263){const _0x548534=this['editor']['config']['get']('collaboration.channelId'),_0x3a8018=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2dd037=>_0x2dd037['channelId']===_0x548534)['findIndex'](_0x5d0a36=>_0x5d0a36['archivedAt']<_0x33e263);return _0x3a8018<0x0||_0x3a8018>this['annotationViews']['length']?this['annotationViews']['length']:_0x3a8018-0x1;}['_toggleDialog'](){const _0x347684=this['editor'],_0x4c9826=_0x347684['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x347684['locale'],this['annotationViews'])),'commentsArchive'===_0x4c9826['id']?_0x4c9826['hide']():_0x4c9826['show']({'id':'commentsArchive','title':N(_0x347684['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1bd544,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x284766['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x610ee7,_0x20e747=!0x1){const _0x300c9e=this['editor']['locale'],_0x6dab26=this['editor']['plugins']['get']('Dialog'),_0x4c3975=new _0x610ee7(_0x300c9e);return _0x4c3975['bind']('isEnabled')['to'](this,'isEnabled'),_0x4c3975['bind']('isOn')['to'](_0x6dab26,'id',_0x1ecabc=>'commentsArchive'===_0x1ecabc),_0x4c3975['set']({'label':N(_0x300c9e,'COMMENTS_ARCHIVE'),'icon':_0x1bd544,'isToggleable':!0x0}),_0x20e747&&(_0x4c3975['tooltip']=!0x0),this['listenTo'](_0x4c3975,'execute',()=>this['_toggleDialog']()),_0x4c3975;}['_hideDialogOnAnnotationEscape']=_0x40564b=>{const _0x44a3d1=_0x40564b['source'];if(!this['annotationViews']['has'](_0x44a3d1['view']))return;const _0x1e139e=this['editor']['plugins']['get']('Dialog');_0x1e139e['isOpen']&&'commentsArchive'===_0x1e139e['id']&&(_0x1e139e['hide'](),_0x40564b['stop']());};}class gi extends _0x4f8b18{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|