@ckeditor/ckeditor5-comments 46.0.1-alpha.6 → 46.0.1-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +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(_0x5a83a1={}){function _0x480573(_0x47b86c){return _0x47b86c['map'](_0x45ee7a=>String['fromCharCode'](_0x45ee7a))['join']('');}(_0x5a83a1=Object['assign']({},_0x5a83a1))['plugins']||(_0x5a83a1['plugins']=Rt['defaultPlugins']),super(_0x5a83a1),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[_0x480573([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x480573([0x76,0x69,0x65,0x77])][_0x480573([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x480573([0x61,0x75,0x74,0x6f]),this[_0x480573([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x480573([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x480573([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x480573([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x480573([0x6f,0x6b])});}['create'](){const _0x74f00a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x74f00a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x108b2e=>{const _0x1dd865=this['model']['document']['getRoot'](),_0xaaa0b1=_0x1dd865&&_0x1dd865['getChild'](_0x1dd865['childCount']-0x1);_0x108b2e['setSelection'](_0xaaa0b1,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2ed6c6=this['editing']['view'],_0x12f24a=_0x2ed6c6['document']['getRoot'](),_0xa87f60=_0x12f24a['getChild'](0x0);_0x12f24a['childCount']>0x1||!_0xa87f60||'p'!=_0xa87f60['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x2ed6c6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0xa87f60['placeholder']=this['placeholder']),St({'view':_0x2ed6c6,'element':_0xa87f60,'keepOnFocus':!0x0}),this['placeholderElement']=_0xa87f60);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4802cf,_0x3086f0={}){super(_0x4802cf),this['editor']=null,this['_editorConfig']=_0x3086f0,this['set']('value',_0x3086f0['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x4802cf,'Reply...')),this['set']('submitLabel',N(_0x4802cf,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5d97f7(),this['focusCycler']=new _0x3261e3({'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',(_0x5bfb11,_0x518556)=>{this['cancelButtonView']['fire']('execute'),_0x518556();}),this['keystrokes']['set']('Ctrl+Enter',(_0x45c28b,_0x565999)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x565999());}),this['on']('submit',(_0x5f0d84,_0x559bd6)=>{_0x559bd6['length']>0xfde8?(alert(N(_0x4802cf,'TOO_LONG_COMMENT_ALERT',[_0x559bd6['length'],0xfde8])),_0x5f0d84['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 _0x5d697a=this['editor'];this['element']['insertBefore'](_0x5d697a['ui']['element'],this['element']['firstChild']),_0x5d697a['model']['document']['on']('change',()=>this['value']=_0x5d697a['getData']()),_0x5d697a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5d697a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x10c51d){-0x1===_0x10c51d?(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:_0x338784}=this,_0x33e6a5=new _0x1db6f3(_0x338784);return _0x33e6a5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x33e6a5['withText']=!0x0,_0x33e6a5['bind']('label')['to'](this,'submitLabel'),_0x33e6a5['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x33e6a5['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x272db3,_0x506758)=>!_0x506758&&!!_0x272db3['trim']()),_0x33e6a5;}['_createCancelButton'](){const {locale:_0x16cdbb}=this,_0x490f89=new _0x1db6f3(_0x16cdbb);return _0x490f89['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x490f89['label']=N(_0x16cdbb,'Cancel'),_0x490f89['withText']=!0x0,_0x490f89['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x490f89;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x315a0b=>{this['focusTracker']['add'](_0x315a0b['element']);}),this['focusables']['on']('change',(_0x2bffe1,_0x24874e)=>{for(const _0x443103 of Array['from'](_0x24874e['added'])['reverse']())this['focusTracker']['add'](_0x443103['element']);});}}class ie extends kt{constructor(_0xc82ab0,_0x30c2de,_0x319365){super(_0xc82ab0),this['commentInputView']=new os(_0xc82ab0,_0x319365),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x27f42a,_0x10450e)=>_0x27f42a||!!_0x10450e),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 _0x5290df(_0xc82ab0,_0x30c2de),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'](_0x58ef1f){this['commentInputView']['focus'](_0x58ef1f);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xad203,_0x7d6842)=>{const {submitButtonView:_0x4ba747,cancelButtonView:_0x1c9223,editor:_0x1f47d8}=this['commentInputView'];[_0x4ba747['element'],_0x1c9223['element'],_0x1f47d8?_0x1f47d8['editing']['view']['getDomRoot']():null]['filter'](_0x5c399f=>_0x5c399f)['some'](_0xeff76d=>_0xeff76d['contains'](_0x7d6842['target']))||(this['focus'](),_0x7d6842['preventDefault']());});}}class rs extends kt{constructor(_0x5ed0d7){super(_0x5ed0d7);const _0x2f6b67=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2f6b67['to']('count',_0x256fb9=>N(_0x5ed0d7,'NUMBER_OF_COMMENTS',_0x256fb9))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5d7838,_0x339344,_0x58bf82){super(_0x5d7838);const _0x17decc=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x339344['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x339344,this['_config']=_0x58bf82,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3261e3({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5515d4=>this['commentViews']['map'](_0x37c0e4=>_0x37c0e4['element'])['includes'](_0x5515d4['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5d7838),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xb55f42=>_0xb55f42-this['_config']['maxCommentsWhenCollapsed']);for(const _0x14d4f0 of _0x339344['comments'])this['_handleNewCommentModel'](_0x14d4f0);this['_handleInfoComment'](),this['listenTo'](_0x339344['comments'],'add',(_0x2e60c0,_0x5cbcc3)=>{const _0x1ef194=this['_calculatePosition'](_0x5cbcc3);this['length']++,this['_handleNewCommentModel'](_0x5cbcc3,_0x1ef194),this['refreshVisibleViews']();}),this['listenTo'](_0x339344['comments'],'remove',(_0x478d01,_0x47f205)=>{this['length']--,this['_handleRemoveCommentModel'](_0x47f205),this['refreshVisibleViews']();}),this['listenTo'](_0x339344,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x339344,'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',_0x17decc['if']('length','ck-hidden',_0xca6673=>!_0xca6673)],'aria-label':N(_0x5d7838,'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'](_0xd10e3){-0x1===_0xd10e3?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x3850da of this['commentViews'])_0x3850da['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1e2174,_0x412ab8){const _0x556716=new this['_config']['CommentView'](this['locale'],_0x1e2174,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x556716['viewUid']=_0x1e2174['id'],_0x556716['delegate']('removeComment')['to'](this),_0x556716['delegate']('updateComment')['to'](this),_0x556716['delegate']('resolveCommentThread')['to'](this),_0x556716['delegate']('editorReady')['to'](this),_0x556716['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x556716,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x556716,_0x412ab8);}['_calculatePosition'](_0x3309ba){const _0x5e14f3=this['_model']['_findOptimalIndex'](_0x3309ba);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3309ba['authoredAt']?_0x5e14f3-0x1:_0x5e14f3:_0x5e14f3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5c20aa={'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'],_0x5c20aa,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5c20aa));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1c2dc){const _0x48deac=this['commentViews']['remove'](_0x1c2dc['id']);this['stopListening'](_0x48deac),_0x48deac['isEditMode']&&this['_updateHasDirtyComment'](),_0x48deac['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x59df65=>_0x59df65['isEditMode']);}['_rearrangeCollapse'](){const _0x5f021c=function(_0x3fb733){const _0x4094c0=new _0x24de43();for(const _0x3cdbe3 of _0x3fb733)_0x4094c0['add'](_0x3cdbe3);return _0x4094c0;}(this['commentViews']),_0x3178b0=this['_collapsedCommentsView']['count'];for(let _0x56ec34=0x1;_0x56ec34<=_0x3178b0;_0x56ec34++)_0x5f021c['remove'](0x1);for(const _0x5c3270 of _0x5f021c)_0x5c3270['collapse']();_0x3178b0>0x0&&_0x5f021c['add'](this['_collapsedCommentsView'],0x1),ns(_0x51dad5(Array['from'](this['visibleViews']),Array['from'](_0x5f021c)),this['visibleViews'],_0x5f021c);}['_rearrangeExpand'](){ns(_0x51dad5(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1c4422 of this['visibleViews'])_0x1c4422['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1738f9=>{this['focusTracker']['add'](_0x1738f9['element']),this['keystrokes']['listenTo'](_0x1738f9['element']);}),this['commentViews']['on']('change',(_0x553318,_0x4c3da3)=>{for(const _0x4168a0 of _0x4c3da3['removed'])this['focusTracker']['remove'](_0x4168a0['element']),this['keystrokes']['stopListening'](_0x4168a0['element']);for(const _0x1b5571 of Array['from'](_0x4c3da3['added'])['reverse']())this['focusTracker']['add'](_0x1b5571['element']),this['keystrokes']['listenTo'](_0x1b5571['element']);});}}function ns(_0x396ffa,_0x18620c,_0x41f743){let _0x2c7965=0x0;for(const _0x44f287 of _0x396ffa)switch(_0x44f287){case'insert':_0x18620c['add'](_0x41f743['get'](_0x2c7965),_0x2c7965),_0x2c7965++;break;case'delete':_0x18620c['remove'](_0x2c7965);break;case'equal':_0x2c7965++;}}class oe extends kt{constructor(_0x28be6){super(_0x28be6);const _0x43ae17=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x43ae17['to']('contextValue',_0x35eba4=>N(_0x28be6,'THREAD_CONTEXT_LABEL',_0x35eba4)),'tabindex':-0x1},'children':[{'text':_0x43ae17['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x25470f,_0x89f5b7){super(_0x25470f);const _0x2cff99=this['bindTemplate'];this['_model']=_0x89f5b7,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3261e3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3ddb50=>!!_0x3ddb50),this['bind']('contextValue')['to'](this['_model'],'context',_0x5bc668=>_0x5bc668&&_0x5bc668['value']?this['_trimContextValue'](_0x5bc668['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',_0x2cff99['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 _0x4e65df=new _0x1db6f3(this['locale']);return _0x4e65df['label']=N(this['locale'],'Reopen'),_0x4e65df['tooltip']=N(this['locale'],'Reopen'),_0x4e65df['icon']=_0x3961d6,_0x4e65df['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2cd33a=>!_0x2cd33a),_0x4e65df['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x34db67,_0x5dee67)=>_0x34db67&&_0x5dee67),_0x4e65df['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4e65df;}['_trimContextValue'](_0x42d77b){if(_0x42d77b['length']<0x96)return _0x42d77b;const _0x399bad=_0x42d77b['lastIndexOf']('\x20',0x93);return _0x42d77b['substring'](0x0,_0x399bad>-0x1?_0x399bad:0x93)+'...';}['_attachContextActions'](){const _0xd0d732=this['element']['querySelector']('.ck-context'),_0x2f64a5=_0xd0d732['querySelector']('.ck-context__value');this['listenTo'](_0xd0d732,'mouseenter',()=>{_0x2f64a5['offsetWidth']<_0x2f64a5['scrollWidth']&&_0xd0d732['classList']['add']('overlay');}),this['listenTo'](_0xd0d732,'mouseleave',()=>{_0xd0d732['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x360367 of this['focusables'])this['focusTracker']['add'](_0x360367['element']),this['keystrokes']['listenTo'](_0x360367['element']);}['_createContextView'](){const _0x1811e2=new oe(this['locale']);return _0x1811e2['bind']('contextValue')['to'](this),_0x1811e2;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x29e6ae,_0x1362bb,_0x53494c,_0x14529a){super(_0x29e6ae),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1362bb,this['_localUser']=_0x53494c,this['_config']=_0x14529a,this['commentThreadHeaderView']=new Yt(_0x29e6ae,_0x1362bb),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x29e6ae,N(_0x29e6ae,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x29e6ae,_0x1362bb,Object['assign']({'CommentView':this['_config']['CommentView']},_0x14529a)),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',(_0x25ad24,_0x199b1c)=>_0x25ad24||!!_0x199b1c),this['bind']('isUnlinked')['to'](_0x1362bb,'unlinkedAt',_0x56bbd9=>!!_0x56bbd9),this['bind']('ariaLabel')['to'](this,'length',_0x61bbfe=>{const _0x203801=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x61bbfe,_0x203801]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3261e3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x550958=>_0x550958['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 _0x14409c=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5adfab=_0x14409c['commentInputView'];return _0x14409c['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5adfab,'value',(_0x52ccf3,_0x189e2b,_0x1273e3,_0x5b2e2a,_0x1ace41)=>!!_0x1ace41||!!_0x5b2e2a&&_0x1273e3&&!_0x189e2b||_0x52ccf3&&_0x1273e3&&!_0x189e2b),_0x5adfab['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xe68c2b,_0x104619,_0x2d518e)=>{let _0xed415c;return _0xed415c=_0x2d518e&&_0x104619?'Reply\x20to\x20reopen\x20discussion...':_0xe68c2b?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0xed415c);}),_0x5adfab['bind']('submitLabel')['to'](this,'length',_0x4c8642=>N(this['locale'],_0x4c8642?'Reply':'Comment')),_0x5adfab['on']('submit',(_0x3dd0ce,_0x59c940)=>{this['fire']('addComment',_0x59c940),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5adfab['on']('cancel',()=>{this['focus']();}),_0x5adfab['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5adfab['on']('cancel',_0x2eaeba=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2eaeba['stop']());}),this['on']('change:isActive',(_0x1f84e9,_0x11ce46,_0x21079c)=>{_0x21079c||this['length']||_0x5adfab['value']||this['fire']('removeCommentThread');}),_0x14409c;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0xa31544(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xb300a7,target:_0x3bf307,type:_0x36e76e,isVisible:_0x16b81c=!0x0}){super(),this['view']=_0xb300a7,this['view']['element']||this['view']['render'](),this['_type']=_0x36e76e,this['_target']=_0x3bf307,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x24de43([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x221ba0,_0x377307)=>{this['view']['focusTracker']['add'](_0x377307);}),this['focusableElements']['on']('remove',(_0x4dc635,_0x496f8e)=>{this['view']['focusTracker']['remove'](_0x496f8e);}),this['set']('isVisible',_0x16b81c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x396aea=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x396aea),_0x396aea;}get['targetRect'](){const _0xc66ee0=this['target'];if(null===_0xc66ee0)return null;if(_0xc66ee0 instanceof _0x2770d5)return _0xc66ee0;const _0x4bdc18=_0xc66ee0['filter'](_0x71011=>function(_0x584235){const _0x12aa5b=_0x584235['offsetParent'];if(_0x12aa5b)return!0x0;const _0x1ed446=_0x584235['getClientRects']()['item'](0x0);return!!_0x1ed446;}(_0x71011));return 0x0===_0x4bdc18['length']?null:new _0x2770d5(_0x4bdc18[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x7a1d2b){this['view']['isActive']=_0x7a1d2b,this['view']['mainView']['isActive']=_0x7a1d2b;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x11777f){if(!(null===_0x11777f||_0x11777f instanceof _0x2770d5||Array['isArray'](_0x11777f)&&_0x11777f['every'](_0x5e2f99=>fi(_0x5e2f99))))throw new _0x55af7e('annotation-invalid-target',null,{'target':_0x11777f});}['_getNormalizedTarget'](){const _0x38d8a5='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x38d8a5)?[_0x38d8a5]:_0x38d8a5;}}function fi(_0x3795c3){return null!==_0x3795c3&&'object'==typeof _0x3795c3&&'nodeType'in _0x3795c3&&0x1===_0x3795c3['nodeType'];}class S extends _0x24de43{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x324417=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5d97f7(),this['_focusTracker']['on']('change:isFocused',(_0x4160f4,_0x2b4b1b,_0x452cd1)=>{_0x452cd1||this['fire']('blur');});for(const _0x45cd26 of _0x324417)this['add'](_0x45cd26);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x54f564){if(this['has'](_0x54f564))throw new _0x55af7e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x54f564['innerView'],_0x54f564),this['_viewToAnnotation']['set'](_0x54f564['view'],_0x54f564);for(const _0x2e3773 of _0x54f564['focusableElements'])this['_focusTracker']['add'](_0x2e3773);this['listenTo'](_0x54f564['focusableElements'],'add',(_0x1ca9f0,_0x46ae74)=>{this['_focusTracker']['add'](_0x46ae74);}),this['listenTo'](_0x54f564['focusableElements'],'remove',(_0x5f3a7c,_0x23bc78)=>{this['_focusTracker']['remove'](_0x23bc78);}),this['listenTo'](_0x54f564['view']['focusTracker'],'change:isFocused',(_0x480e60,_0x12f18f,_0x14c27f)=>{_0x14c27f&&this['fire']('focus',_0x54f564);}),_0x54f564['updateTargetRect']();const _0x3989be=this['_getOrderInContent'](_0x54f564['view']['targetRect']);return super['add'](_0x54f564,_0x3989be);}['remove'](_0x3a7981){if(!this['has'](_0x3a7981))throw new _0x55af7e('annotationcollection-not-existing-item',null);this['stopListening'](_0x3a7981['view']['focusTracker']),this['stopListening'](_0x3a7981['focusableElements']);for(const _0x5b843f of _0x3a7981['focusableElements'])this['_focusTracker']['remove'](_0x5b843f);return this['_viewToAnnotation']['delete'](_0x3a7981['view']),this['_innerViewToAnnotation']['delete'](_0x3a7981['innerView']),super['remove'](_0x3a7981);}['getByInnerView'](_0xb2182c){return this['_innerViewToAnnotation']['get'](_0xb2182c);}['getByView'](_0x9f1c45){return this['_viewToAnnotation']['get'](_0x9f1c45);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x198e55 of this)_0x198e55['updateTargetRect']();this['_sort']();}['_sort'](){const _0x145cd6=Array['from'](this)['sort']((_0x442587,_0xe21629)=>w(_0x442587['view']['targetRect'],_0xe21629['view']['targetRect']));for(let _0x361b06=_0x145cd6['length']-0x1;_0x361b06>0x0;_0x361b06--){const _0x5e9a85=_0x145cd6[_0x361b06];_0x361b06!==this['getIndex'](_0x5e9a85)&&(this['remove'](_0x5e9a85),this['add'](_0x5e9a85));}}['_getOrderInContent'](_0x428450){let _0x2d4937=0x0;if(!_0x428450)return this['length'];for(const _0x372abd of this){const _0x32cb2a=_0x372abd['view']['targetRect'];if(_0x32cb2a){if(w(_0x428450,_0x32cb2a)<0x0)return _0x2d4937;_0x2d4937++;}}return _0x2d4937;}}function v({source:_0x445d58,target:_0x329271,filter:_0x49ace2}){for(const _0x1a2915 of _0x445d58)_0x49ace2(_0x1a2915)&&_0x329271['add'](_0x1a2915);_0x329271['listenTo'](_0x445d58,'add',(_0x33d7c8,_0x1293a2)=>{_0x49ace2(_0x1293a2)&&_0x329271['add'](_0x1293a2);}),_0x329271['listenTo'](_0x445d58,'remove',(_0x2a8715,_0x4da704)=>{_0x329271['has'](_0x4da704)&&_0x329271['remove'](_0x4da704);});}function w(_0x19cf2b,_0x11bc84){if(null===_0x19cf2b&&null===_0x11bc84)return 0x0;if(null===_0x19cf2b)return-0x1;if(null===_0x11bc84)return 0x1;const _0x20525f=_0x19cf2b['top']-_0x11bc84['top'];return 0x0==_0x20525f?_0x19cf2b['left']-_0x11bc84['left']:_0x20525f;}class y extends _0x1756af{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3cef63){if(super(_0x3cef63),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3cef63 instanceof _0x581330){const _0x49cde3=_0x3cef63['locale'];_0x3cef63['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x59244d){this['collection']['add'](_0x59244d);}['remove'](_0x5c44c2){this['collection']['remove'](_0x5c44c2),_0x5c44c2['destroy']();}['refreshVisibility'](){for(const _0x6a2f9a of this['collection'])_0x6a2f9a['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x83220b){return this['collection']['getByInnerView'](_0x83220b);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5cbb40 of this['collection'])_0x5cbb40['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x320ac6){this['fire']('_activateAnnotation',_0x320ac6);}['createAnnotation'](_0x6d02b1){return new T(_0x6d02b1);}['createAnnotationView'](_0x2df8e5,_0x282d26){return new E(_0x2df8e5,_0x282d26);}['_addActiveAnnotation'](_0x51f984){const _0x2ba29d=new Set(this['activeAnnotations']);_0x2ba29d['add'](_0x51f984),this['activeAnnotations']=_0x2ba29d;}['_removeActiveAnnotation'](_0x3634c1){const _0x3a5cdc=new Set(this['activeAnnotations']);_0x3a5cdc['delete'](_0x3634c1),this['activeAnnotations']=_0x3a5cdc;}['_bindAnnotationsToVisibleAnnotations'](){const _0x428085=this['collection'],_0x2d768c=this['_visibleAnnotations'];function _0x2a35f0(_0x15837a){const _0x17c6f3=_0x15837a['source'];_0x17c6f3['isVisible']&&!_0x2d768c['has'](_0x17c6f3)?_0x2d768c['add'](_0x17c6f3):!_0x17c6f3['isVisible']&&_0x2d768c['has'](_0x17c6f3)&&_0x2d768c['remove'](_0x17c6f3),_0x17c6f3['view']['focusTracker']['remove'](_0x17c6f3['view']['element']),_0x17c6f3['view']['focusTracker']['add'](_0x17c6f3['view']['element']);}this['listenTo'](_0x428085,'add',(_0x1434c7,_0x34c65e)=>{_0x34c65e['isVisible']&&_0x2d768c['add'](_0x34c65e),this['listenTo'](_0x34c65e,'change:isVisible',_0x2a35f0);}),this['listenTo'](_0x428085,'remove',(_0x47941c,_0x13b0d1)=>{_0x2d768c['has'](_0x13b0d1)&&_0x2d768c['remove'](_0x13b0d1),this['stopListening'](_0x13b0d1,'change:isVisible',_0x2a35f0);});}['_setupEnterAnnotationKeystroke'](){const _0x3ac2e1=_0x215cef=>{_0x215cef['on']('ready',()=>{_0x215cef['keystrokes']['set'](_0x4b75c9,(_0x51b32e,_0x3aea9e)=>{const _0x59bc26=_0x201e2d(this['activeAnnotations']['values']());_0x59bc26&&(_0x59bc26['view']['focus'](),_0x3aea9e());});});};this['context']instanceof _0x581330?_0x3ac2e1(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x114350,_0x10d76f)=>{_0x3ac2e1(_0x10d76f);});}['_setupEscapeAnnotationHandling'](){const _0x3319fa=_0x212f10=>{const _0x43bf0a=_0x212f10['source'],_0x4c425f=[];let _0x510efd;if(Array['isArray'](_0x43bf0a['target'])){_0x510efd=_0x43bf0a['target'][0x0],this['context']instanceof _0x581330?_0x4c425f['push'](this['context']):this['context']['editors']&&_0x4c425f['push'](...this['context']['editors']);for(const _0x36c75f of _0x4c425f)for(const _0x2c5497 of _0x36c75f['editing']['view']['domRoots']['values']())if(_0x2c5497['contains'](_0x510efd))return void _0x36c75f['editing']['view']['focus']();_0x510efd['focus']();}};this['listenTo'](this['collection'],'add',(_0x52832b,_0x157c3a)=>{this['listenTo'](_0x157c3a,'escape',_0x3319fa,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3b3082,_0xf61b0e)=>{this['stopListening'](_0xf61b0e,'escape',_0x3319fa);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1756af{['_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(_0x3fb165){super(_0x3fb165),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xf7a537=this['context']['config'];_0xf7a537['define']('comments.maxCommentsWhenCollapsed',0x2),_0xf7a537['define']('comments.maxThreadTotalWeight',0x1f4),_0xf7a537['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xf7a537['define']('comments.CommentThreadView',gt),_0xf7a537['define']('comments.CommentView',Tt),_0xf7a537['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1d83b8=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x19c88d,_0x34bdad)=>this['_addCommentThread'](_0x34bdad)),this['on']('submitCommentThread',(_0x35cc8a,_0x476a43)=>this['_submitCommentThread'](_0x476a43)),this['on']('resolveCommentThread',(_0x2e2e4b,_0x39226a)=>this['_resolveCommentThread'](_0x39226a)),this['on']('resolveCommentThread',(_0x44e62b,_0x1faf23)=>this['_updateActiveAnnotation'](_0x1faf23),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x28218e,_0x34ce4a)=>this['_reopenCommentThread'](_0x34ce4a)),this['on']('reopenCommentThread',(_0x51ebca,_0x43ff7a)=>this['_updateActiveAnnotation'](_0x43ff7a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x29d716,_0x539f16)=>this['_removeCommentThread'](_0x539f16)),this['on']('updateCommentThread',(_0x27fe04,_0x39e386)=>this['_updateCommentThread'](_0x39e386)),this['on']('updateCommentThread',(_0x47fb10,_0x3ff309)=>this['_updateActiveAnnotation'](_0x3ff309),{'priority':'lowest'}),this['on']('addComment',(_0x3fabc2,_0x5b6249)=>this['_addComment'](_0x5b6249)),this['on']('updateComment',(_0x86e168,_0x22ddd9)=>this['_updateComment'](_0x22ddd9)),this['on']('removeComment',(_0x3e147f,_0x106150)=>this['_removeComment'](_0x106150)),this['on']('addComment',(_0x285f3b,{threadId:_0xb164e4,isFromAdapter:_0x28ee2a})=>{if(_0x28ee2a)return;const _0x20021a=this['getCommentThread'](_0xb164e4),_0x5b3802=_0x20021a&&this['_threadToController']['get'](_0x20021a);_0x5b3802&&_0x5b3802['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1d83b8,'change:activeAnnotations',(_0xec4abb,_0x4d4a34,_0x55146e)=>{const _0x47e4d1=Array['from'](_0x55146e)['map'](_0x2ecbc6=>this['_viewToController']['get'](_0x2ecbc6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x47e4d1?_0x47e4d1['model']:null;});}set['adapter'](_0x4a9a32){if(this['_adapter'])throw new _0x55af7e('commentsrepository-adapter-already-set');this['_adapter']=_0x4a9a32;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4009ac=_t,threadId:_0x57e846=_0x1797dc(),comments:_0x1d919c=[],unlinkedAt:_0x471f1c=null,resolvedAt:_0x57b8be=null,resolvedBy:_0xd2774f=null,target:_0x47345c=null,context:_0x42ca05=null,attributes:_0x309bb4={},isResolvable:_0x286ef2=!0x0,isSubmitted:_0x34e263=!0x1,isFromAdapter:_0x4c8852=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4009ac),{'channelId':_0x4009ac,'threadId':_0x57e846,'comments':_0x1d919c,'unlinkedAt':_0x471f1c,'resolvedAt':_0x57b8be,'resolvedBy':_0xd2774f,'target':_0x47345c,'context':_0x42ca05,'attributes':_0x309bb4,'isFromAdapter':_0x4c8852,'isResolvable':_0x286ef2,'isSubmitted':_0x34e263}),this['getCommentThread'](_0x57e846);}['openNewCommentThread']({channelId:_0x160bd=_t,threadId:_0x161c00=_0x1797dc(),target:_0x3e07d7,context:_0x449544=null,isResolvable:_0x219802=!0x0}){if(this['_readOnlyChannels']['has'](_0x160bd)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3e07d7)throw new _0x55af7e('commentsrepository-missing-target');const _0x12c297=this['addCommentThread']({'channelId':_0x160bd,'threadId':_0x161c00,'target':_0x3e07d7,'context':_0x449544,'isResolvable':_0x219802});if(!_0x12c297)return null;const _0x53b49a=this['_threadToController']['get'](_0x12c297),_0x3148dc=_0x53b49a['view']['commentThreadInputView']['commentInputView'],_0xf3061=this['context']['plugins']['get'](y),_0x3b3d39=_0xf3061['getByInnerView'](_0x53b49a['view']);return _0xf3061['activate'](_0x3b3d39),_0x3148dc['once']('editorReady',()=>_0x3148dc['focus']()),_0x12c297;}['hasCommentThread'](_0x324827){if('string'!=typeof _0x324827)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x324827);}['updateCommentThread']({channelId:_0x351ee3=_t,threadId:_0x43c750,context:_0xe06b46,unlinkedAt:_0x26171d,attributes:_0x2cea66,isFromAdapter:_0x8cb60f=!0x1}){return this['fire'](Nt('updateCommentThread',_0x351ee3),{'channelId':_0x351ee3,'threadId':_0x43c750,'context':_0xe06b46,'unlinkedAt':_0x26171d,'attributes':_0x2cea66,'isFromAdapter':_0x8cb60f}),this['getCommentThread'](_0x43c750);}['getCommentThread'](_0x37f39){if('string'!=typeof _0x37f39)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x37f39);}['fetchCommentThread']({channelId:_0x2ec133,threadId:_0x171bcc}={}){const _0x16b69f=this['getCommentThread'](_0x171bcc);if(_0x16b69f)return Promise['resolve'](_0x16b69f);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x55af7e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2ec133,'threadId':_0x171bcc})['then'](_0x27d751=>this['hasCommentThread'](_0x171bcc)?this['getCommentThread'](_0x171bcc):_0x27d751?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2ec133},_0x27d751)):void 0x0)['catch'](_0x27a6eb=>{throw console['error'](_0x27a6eb),new _0x55af7e('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x555f95,skipNotAttached:_0x468bc8=!0x1,skipEmpty:_0x4cbe9f=!0x1,toJSON:_0x4fe7c0=!0x1}={}){const _0x1b7de7=[];for(const _0x12f080 of this['_threads']['values']())_0x555f95&&_0x12f080['channelId']!==_0x555f95||_0x468bc8&&!_0x12f080['isAttached']||_0x4cbe9f&&0x0===_0x12f080['length']||_0x1b7de7['push'](_0x12f080);return _0x4fe7c0?_0x1b7de7['map'](_0x4df287=>_0x4df287['toJSON']()):_0x1b7de7;}['getAnnotationForCommentThread'](_0x39dce0){const _0x3c8061=this['_threadToController']['get'](_0x39dce0);if(!_0x3c8061)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x3c8061['view'])||null;}['getCommentThreadForAnnotation'](_0x556f2a){const _0x29c5f3=this['_viewToController']['get'](_0x556f2a['innerView']);return _0x29c5f3?_0x29c5f3['model']:null;}['setActiveCommentThread'](_0x154bb3){const _0x477d35=this['context']['plugins']['get'](y);if(!_0x154bb3)return void(this['activeCommentThread']&&_0x477d35['deactivateAll']());const _0x5bcfcf=this['getCommentThread'](_0x154bb3);if(!_0x5bcfcf)throw new _0x55af7e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x154bb3});if(!this['_threadToController']['has'](_0x5bcfcf))throw new _0x55af7e('commentsrepository-active-not-attached',null,{'threadId':_0x154bb3});const _0x17d2d7=_0x477d35['getByInnerView'](this['_threadToController']['get'](_0x5bcfcf)['view']);_0x477d35['activate'](_0x17d2d7);}['switchReadOnly'](_0x291cc1,_0x1930ad){_0x291cc1?this['_readOnlyChannels']['add'](_0x1930ad):this['_readOnlyChannels']['delete'](_0x1930ad),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x39fa13){return this['_readOnlyChannels']['has'](_0x39fa13)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x81e5f4,_0x348203){return new vt(_0x81e5f4,_0x348203);}['setPermissions'](_0x1ced07,_0x4c38a7=_t){this['_permissions']['set'](_0x4c38a7,_0x1ced07),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x18e4d6=_t){return this['_permissions']['has'](_0x18e4d6)?this['_permissions']['get'](_0x18e4d6):bt;}['_addCommentThread']({channelId:_0x100026,threadId:_0x264a18,comments:_0x5e3cc4,unlinkedAt:_0x400150,resolvedAt:_0x2800dc,resolvedBy:_0xbadc0b,target:_0xc37c62,context:_0x3e6382,attributes:_0x1b7977,isFromAdapter:_0x3427eb,isResolvable:_0x5e54d3,isSubmitted:_0x1caa47}){if('string'!=typeof _0x264a18)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x264a18});if(this['hasCommentThread'](_0x264a18))throw new _0x55af7e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x264a18});const _0x263bec=new pi(this,{'channelId':_0x100026,'id':_0x264a18,'context':_0x3e6382,'attributes':_0x1b7977,'unlinkedAt':_0x400150,'resolvedAt':_0x2800dc,'resolvedBy':_0xbadc0b?this['context']['plugins']['get'](it)['getUser'](_0xbadc0b):null,'isResolvable':_0x5e54d3,'isSubmitted':_0x1caa47||_0x3427eb});this['_threads']['set'](_0x264a18,_0x263bec);for(const _0x3fd277 of _0x5e3cc4)_0x263bec['_add'](this['_createNewComment']({'threadId':_0x264a18,..._0x3fd277}));return _0xc37c62&&_0x263bec['attachTo'](_0xc37c62),_0x3427eb||!_0x263bec['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x100026,'threadId':_0x264a18});}['_submitCommentThread']({channelId:_0x105444,threadId:_0x2a7818}){if(!this['hasCommentThread'](_0x2a7818))throw new _0x55af7e('commentsrepository-missing-comment-thread',this);const _0x58e039=this['getCommentThread'](_0x2a7818);if(_0x58e039['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0xf025ef,comments:_0x249dd1,resolvedAt:_0x5c859e,resolvedBy:_0x180025,context:_0x54a2df,attributes:_0xabb37d}=_0x58e039,_0x1e29c3=this['context']['plugins']['get']('PendingActions'),_0x3a03df=_0x1e29c3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x105444,'threadId':_0xf025ef,'comments':_0x249dd1['map'](_0x55d436=>_0x55d436['toJSON']()),'resolvedAt':_0x5c859e,'resolvedBy':_0x180025?_0x180025['id']:_0x180025,'context':_0x54a2df,'attributes':_0xabb37d})['then'](({comments:_0x241f0f})=>{_0x1e29c3['remove'](_0x3a03df);for(const _0x260e8f of _0x241f0f)this['_updateComment']({'channelId':_0x105444,'threadId':_0x2a7818,'commentId':_0x260e8f['commentId'],'createdAt':_0x260e8f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x55ed3a=>{throw console['error'](_0x55ed3a),new _0x55af7e('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x113690,target:_0x47cc46}){const _0x23a10c=this['getCommentThread'](_0x113690);if(!_0x23a10c)throw new _0x55af7e('commentsrepository-attach-missing-comment-thread',this);const _0x4f1c8f=this['context']['plugins']['get']('PendingActions'),_0x509359=this['context']['plugins']['get'](y),_0x1e0d49=this['_createCommentThreadView'](_0x23a10c),_0x46fe5b=new vt(_0x23a10c,_0x1e0d49);let _0x244cee=null;_0x1e0d49['on']('change:isDirty',(_0x161f2b,_0x32a539,_0x209b81)=>{_0x209b81?_0x244cee=_0x4f1c8f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x244cee&&(_0x4f1c8f['remove'](_0x244cee),_0x244cee=null);}),this['_threadToController']['set'](_0x23a10c,_0x46fe5b),this['_viewToController']['set'](_0x1e0d49,_0x46fe5b);const _0x41fa99=new E(this['context']['locale'],_0x1e0d49);_0x41fa99['bind']('length')['to'](_0x1e0d49),_0x41fa99['bind']('isDirty')['to'](_0x1e0d49,'isDirty',_0x1e0d49,'length',(_0x16c424,_0x133527)=>_0x16c424||!_0x133527),_0x41fa99['bind']('isActive')['to'](_0x1e0d49),_0x41fa99['type']='comment';const _0x4e598d=new T({'view':_0x41fa99,'target':_0x47cc46,'type':'comment','isVisible':!_0x23a10c['archivedAt']&&!!('function'==typeof _0x47cc46?_0x47cc46():_0x47cc46)});return _0x1e0d49['on']('escape',()=>{_0x4e598d['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1e0d49,_0x4e598d),_0x509359['add'](_0x4e598d),_0x4e598d;}['_bindAnnotationToEditors'](_0x3af503,_0x31ebb8){this['listenTo'](_0x3af503,'editorReady',(_0x553300,_0x42e676)=>{const _0x3bc0e5=_0x42e676['ui']['view']['body']['bodyCollectionContainer'];_0x31ebb8['focusableElements']['add'](_0x3bc0e5),this['context']instanceof _0x581330&&this['context']['ui']['focusTracker']['add'](_0x3bc0e5);},{'priority':'highest'}),this['listenTo'](_0x3af503,'editorDestroyed',(_0x63e5a7,_0x2619e1)=>{const _0x3aff85=_0x2619e1['ui']['view']['body']['bodyCollectionContainer'];_0x31ebb8['focusableElements']['has'](_0x3aff85)&&_0x31ebb8['focusableElements']['remove'](_0x3aff85),this['context']instanceof _0x581330&&this['context']['ui']['focusTracker']['remove'](_0x3aff85);});}['_unbindEditors'](_0x5e6feb){this['stopListening'](_0x5e6feb,'editorReady'),this['stopListening'](_0x5e6feb,'editorDestroyed');}['_createCommentThreadView'](_0x1d0a75){const _0x109bb4=this['context']['plugins']['get'](it),{config:_0x11e919,locale:_0x420299}=this['context'],_0x1e341b=pt(_0x11e919['get']('locale'),_0x420299);return new(0x0,(_0x11e919['get']('comments'))['CommentThreadView'])(_0x420299,_0x1d0a75,_0x109bb4['me'],{'editorConfig':{..._0x11e919['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x11e919['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x11e919['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x11e919['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x11e919['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1e341b,'CommentView':_0x11e919['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2cba61,channelId:_0x4485de,resolvedAt:_0xbe5b54,resolvedBy:_0x344d72,isFromAdapter:_0x26d400}){if(!this['hasCommentThread'](_0x2cba61))throw new _0x55af7e('commentsrepository-missing-comment-thread',null,{'threadId':_0x2cba61});const _0x2c6f0f=this['getCommentThread'](_0x2cba61);if(_0x2c6f0f['isResolved'])throw new _0x55af7e('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2cba61});const _0xb63f54=this['context']['plugins']['get'](it);if(_0x2c6f0f['resolvedBy']=_0xb63f54['getUser'](_0x344d72),_0x2c6f0f['resolvedAt']=_0xbe5b54,_0x26d400||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x54b89d=this['context']['plugins']['get']('PendingActions'),_0x1ab79a=_0x54b89d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4485de,'threadId':_0x2cba61})['then'](({resolvedAt:_0x3246e4,resolvedBy:_0x454cc5})=>{_0x54b89d['remove'](_0x1ab79a),_0x2c6f0f['resolvedBy']['id']!==_0x454cc5&&(_0x2c6f0f['resolvedBy']=_0xb63f54['getUser'](_0x454cc5)),_0x2c6f0f['resolvedAt']=_0x3246e4;})['catch'](_0x523b69=>{throw console['error'](_0x523b69),new _0x55af7e('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1f1faf,channelId:_0x4cb1ac,isFromAdapter:_0x276700}){if(!this['hasCommentThread'](_0x1f1faf))throw new _0x55af7e('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f1faf});const _0x5e7de5=this['getCommentThread'](_0x1f1faf);if(!_0x5e7de5['isResolved'])throw new _0x55af7e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1f1faf});if(_0x5e7de5['resolvedBy']=null,_0x5e7de5['resolvedAt']=null,_0x276700||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x230741=this['context']['plugins']['get']('PendingActions'),_0x1f204d=_0x230741['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4cb1ac,'threadId':_0x1f1faf})['then'](()=>_0x230741['remove'](_0x1f204d))['catch'](_0x20bf65=>{throw console['error'](_0x20bf65),new _0x55af7e('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2e4079,isFromAdapter:_0x35c720}){const _0x287ea3=this['getCommentThread'](_0x2e4079);if(!_0x287ea3)throw new _0x55af7e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2e4079),this['_threads']['delete'](_0x2e4079),!_0x287ea3['isSubmitted']||_0x35c720||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4b7752=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3dcead}=_0x287ea3,_0x446da2=_0x4b7752['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3dcead,'threadId':_0x2e4079})['then'](()=>_0x4b7752['remove'](_0x446da2))['catch'](_0xa8dc1f=>{throw console['error'](_0xa8dc1f),new _0x55af7e('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x415dc4,unlinkedAt:_0x31b053,context:_0x287eb9,attributes:_0x2d6fd4,isFromAdapter:_0x5219e3}){if('string'!=typeof _0x415dc4)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x415dc4});if(!this['hasCommentThread'](_0x415dc4))throw new _0x55af7e('commentsrepository-missing-comment-thread',null,{'threadId':_0x415dc4});const _0x53443c=this['getCommentThread'](_0x415dc4);let _0x5695f8=!0x1;if(void 0x0!==_0x287eb9&&_0x53443c['context']!==_0x287eb9&&(_0x53443c['context']=_0x287eb9,_0x5695f8=!0x0),void 0x0!==_0x31b053&&_0x53443c['unlinkedAt']!==_0x31b053&&(_0x53443c['unlinkedAt']=_0x31b053,_0x5695f8=!0x0),_0x2d6fd4&&!At(_0x2d6fd4,_0x53443c['attributes'])&&(_0x53443c['attributes']=_0x2d6fd4,_0x5695f8=!0x0),!_0x5695f8)return Promise['resolve']();if(!_0x53443c['isSubmitted']||_0x5219e3||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x12740b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4cc0e0}=_0x53443c,_0x409892=_0x12740b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4cc0e0,'threadId':_0x415dc4,'context':_0x287eb9,'unlinkedAt':_0x31b053,'attributes':_0x2d6fd4})['then'](()=>_0x12740b['remove'](_0x409892))['catch'](_0x5b6176=>{throw console['error'](_0x5b6176),new _0x55af7e('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x347bd4){const _0x634c98=this['context']['plugins']['get'](y),_0x5cf96e=this['getCommentThread'](_0x347bd4);if(_0x5cf96e['_isAttached']=!0x1,this['_threadToController']['has'](_0x5cf96e)){const _0x3405ae=this['_threadToController']['get'](_0x5cf96e),_0x240ac5=_0x3405ae['view'],_0x53ac15=_0x634c98['getByInnerView'](_0x240ac5);this['_threadToController']['delete'](_0x5cf96e),this['_viewToController']['delete'](_0x240ac5),_0x53ac15&&_0x634c98['remove'](_0x53ac15),_0x3405ae['destroy'](),_0x240ac5['destroy']()['then'](()=>{this['_unbindEditors'](_0x240ac5);});}}['_updateActiveAnnotation']({threadId:_0x198294,resolvedAt:_0x3abc95,unlinkedAt:_0x18fcaf}){const _0x16b2f3=!!_0x3abc95,_0x360e11=this['context']['plugins']['get'](y),_0x519898=this['getCommentThread'](_0x198294);if(this['_threadToController']['has'](_0x519898)){const _0x180074=this['_threadToController']['get'](_0x519898)['view'],_0x338e7b=_0x360e11['getByInnerView'](_0x180074);_0x338e7b&&(_0x16b2f3&&_0x360e11['_removeActiveAnnotation'](_0x338e7b),_0x18fcaf?_0x338e7b['isVisible']=!0x1:_0x338e7b['refreshVisibility']());}}['_getExternalAuthor'](_0x221de8){const _0x5bc5e0=this['context']['plugins']['get'](it),_0x3d4296=It('external:'+_0x221de8),_0x427ae3=_0x5bc5e0['getUser'](_0x3d4296);return _0x427ae3||_0x5bc5e0['addUser']({'id':_0x3d4296,'name':_0x221de8});}['_createNewComment']({threadId:_0x459606,commentId:_0x2c60b4=_0x1797dc(),content:_0x10d9ad,authorId:_0x580a6f,createdAt:_0x20786e,attributes:_0x2a9d55}){if('string'!=typeof _0x2c60b4)throw new _0x55af7e('commentsrepository-invalid-commentid');if('string'!=typeof _0x580a6f)throw new _0x55af7e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x10d9ad||!_0x10d9ad['trim']())throw new _0x55af7e('commentsrepository-invalid-comment-content');const _0x1c1c85=this['context']['plugins']['get'](it)['getUser'](_0x580a6f);if(!_0x1c1c85)throw new _0x55af7e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x580a6f});let _0x2a5d06=null,_0xd4188c=_0x20786e;return _0x2a9d55?.['@external']&&(_0x2a5d06=this['_getExternalAuthor'](_0x2a9d55['@external']['authorName']),_0xd4188c=new Date(_0x2a9d55['@external']['createdAt'])),new wi(this,{'threadId':_0x459606,'id':_0x2c60b4,'author':_0x2a5d06||_0x1c1c85,'creator':_0x1c1c85,'content':_0x10d9ad,'createdAt':_0x20786e,'authoredAt':_0xd4188c,'attributes':_0x2a9d55});}['_addComment'](_0x453e7e){let {threadId:_0x29b957,content:_0x4a3249,attributes:_0x5510df,isFromAdapter:_0x1f4d8e}=_0x453e7e;const _0x13a07d=this['getCommentThread'](_0x453e7e['threadId']);if(!_0x13a07d)throw new _0x55af7e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x28d36b=this['_createNewComment'](_0x453e7e),{id:_0x4fb344}=_0x28d36b;if(_0x13a07d['_add'](_0x28d36b),_0x1f4d8e||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x13a07d['isSubmitted'])return Promise['resolve']();const _0x5977b2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4ba61d}=_0x13a07d,_0x29bd39=_0x5977b2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5510df||(_0x5510df={}),this['adapter']['addComment']({'channelId':_0x4ba61d,'threadId':_0x29b957,'commentId':_0x4fb344,'content':_0x4a3249,'attributes':_0x5510df})['then'](_0x5ab5a2=>{_0x5977b2['remove'](_0x29bd39),_0x5ab5a2&&this['_updateComment']({'channelId':_0x4ba61d,'threadId':_0x29b957,'commentId':_0x4fb344,'createdAt':_0x5ab5a2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x530d74=>{throw console['error'](_0x530d74),new _0x55af7e('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x18d6f6,commentId:_0xc59b9b,content:_0x3e2961,createdAt:_0x540c75,attributes:_0x1c07d5,isFromAdapter:_0x1bc539}){if(void 0x0!==_0x3e2961&&('string'!=typeof _0x3e2961||!_0x3e2961['trim']()['length']))throw new _0x55af7e('commentsrepository-update-comment-invalid-content');const _0x30198b=this['getCommentThread'](_0x18d6f6),_0xd9e303=_0x30198b['getComment'](_0xc59b9b);if(!_0xd9e303)throw new _0x55af7e('commentsrepository-update-missing-comment',this);let _0x27d7f1=!0x1;if(_0x3e2961&&_0x3e2961!==_0xd9e303['content']&&(_0xd9e303['isEditable']||_0x1bc539)&&(_0xd9e303['content']=_0x3e2961,_0x27d7f1=!0x0),_0x540c75&&_0x540c75!==_0xd9e303['createdAt']&&(_0xd9e303['createdAt']=_0x540c75,_0xd9e303['attributes']&&_0xd9e303['attributes']['@external']||(_0xd9e303['authoredAt']=_0x540c75),_0x27d7f1=!0x0),_0x1c07d5&&!At(_0x1c07d5,_0xd9e303['attributes'])&&(_0xd9e303['attributes']=_0x1c07d5,_0x27d7f1=!0x0),!_0x27d7f1)return Promise['resolve']();if(_0x30198b['fire']('commentUpdated'),_0x1bc539||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5a2fc5=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd37e2a}=this['getCommentThread'](_0xd9e303['threadId']),_0x2914e9=_0x5a2fc5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xd37e2a,'threadId':_0x18d6f6,'commentId':_0xc59b9b,'content':_0x3e2961,'attributes':_0x1c07d5})['then'](()=>_0x5a2fc5['remove'](_0x2914e9))['catch'](_0x1ead1e=>{throw console['error'](_0x1ead1e),new _0x55af7e('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x34ec97,commentId:_0x1d2280,isFromAdapter:_0x567597}){const _0x5258fc=this['getCommentThread'](_0x34ec97),_0x2a79b8=_0x5258fc['getComment'](_0x1d2280);if(!_0x2a79b8)throw new _0x55af7e('commentsrepository-remove-missing-comment',this);if(_0x5258fc['_remove'](_0x2a79b8),_0x567597||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x590ea1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x239da6}=_0x5258fc,_0x32b084=_0x590ea1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x239da6,'threadId':_0x34ec97,'commentId':_0x1d2280})['then'](()=>_0x590ea1['remove'](_0x32b084))['catch'](_0x3e2391=>{throw console['error'](_0x3e2391),new _0x55af7e('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0xa31544(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x25071e,_0x1cd237){super();const _0x1b1c3b=_0x25071e['context']['plugins']['get'](it)['me'],_0x24ce51=_0x25071e['getCommentThread'](_0x1cd237['threadId']),_0x14a9ee=0x0===_0x24ce51['comments']['length'],_0x2ff987=_0x1b1c3b===_0x1cd237['author'];this['id']=_0x1cd237['id'],this['threadId']=_0x1cd237['threadId'],this['author']=_0x1cd237['author'],this['creator']=_0x1cd237['creator'],this['isExternal']=Boolean(_0x1cd237['attributes']&&_0x1cd237['attributes']['@external']),this['set']('content',_0x1cd237['content']),this['createdAt']=_0x1cd237['createdAt']||new Date(),this['set']('authoredAt',_0x1cd237['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x24ce51,'resolvedAt'),this['set']('attributes',_0x1cd237['attributes']||{}),this['bind']('isEditable')['to'](_0x25071e,'_permissions',()=>{const _0x6f757a=_0x25071e['getPermissions'](_0x24ce51['channelId'])['write'],_0x429ad=_0x25071e['getPermissions'](_0x24ce51['channelId'])['modifyAll'];return _0x2ff987&&_0x6f757a||!_0x2ff987&&_0x429ad;}),this['bind']('isRemovable')['to'](_0x24ce51,'isRemovable',_0x25071e,'_permissions',_0x9a4f20=>{const _0x262c3b=_0x25071e['getPermissions'](_0x24ce51['channelId'])['write'],_0x40ec0e=_0x25071e['getPermissions'](_0x24ce51['channelId'])['modifyAll'];return _0x2ff987&&_0x262c3b||_0x9a4f20&&_0x14a9ee||!_0x2ff987&&_0x40ec0e&&!_0x14a9ee;}),this['bind']('isReadOnly')['to'](_0x24ce51,'isReadOnly'),this['_repository']=_0x25071e;}get['weight'](){return Math['max'](function(_0x52bfe4){const _0x16491a=document['createElement']('div');return _0x16491a['innerHTML']=_0x52bfe4,_0x16491a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1a02c2){const {threadId:_0x151f29,id:_0x52a26c}=this;if(!this['_repository']['hasCommentThread'](_0x151f29))throw new _0x55af7e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3c334d}=this['_repository']['getCommentThread'](_0x151f29);this['_repository']['fire'](Nt('updateComment',_0x3c334d,_0x151f29),{'channelId':_0x3c334d,'threadId':_0x151f29,'commentId':_0x52a26c,..._0x1a02c2});}['setAttribute'](_0x3e7021,_0x104957){const _0x34f4fa=wt(this['attributes']);yt(_0x34f4fa,_0x3e7021,_0x104957),this['update']({'attributes':_0x34f4fa});}['removeAttribute'](_0x40b71e){const _0x1e5a0a=wt(this['attributes']);Ct(_0x1e5a0a,_0x40b71e),this['update']({'attributes':_0x1e5a0a});}['remove'](_0x53b2fd={}){if(!_0x53b2fd['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x44ca07,id:_0x11be95}=this;if(!this['_repository']['hasCommentThread'](_0x44ca07))throw new _0x55af7e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x782541}=this['_repository']['getCommentThread'](_0x44ca07);this['_repository']['fire'](Nt('removeComment',_0x782541,_0x44ca07),{'channelId':_0x782541,'threadId':_0x44ca07,'commentId':_0x11be95,..._0x53b2fd});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x309484,..._0x3541cc){for(const _0x214941 of _0x3541cc)void 0x0!==_0x214941&&(_0x309484+=':'+String(_0x214941));return _0x309484;}class ot extends _0xb3b2c2{constructor(_0x4603ae){super(_0x4603ae),this['set']('hasContent',!0x1);}['refresh'](){const _0xa7f1fe=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x592a8b of _0xa7f1fe['getRanges']())if(this['_hasContent'](_0x592a8b))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3c98ca=_0x1797dc(),ranges:_0x40e7d2,comment:_0xc9736f}={}){const _0x371318=this['editor']['model'],_0x254344=_0x40e7d2??Array['from'](_0x371318['document']['selection']['getRanges']()),_0xb8fca7=[];for(const _0x3d1222 of _0x254344)this['_hasContent'](_0x3d1222)&&_0xb8fca7['push'](this['_trimToContent'](_0x3d1222));if(!_0xb8fca7['length'])throw new _0x55af7e('addcommentthreadcommand-incorrect-ranges',null);_0xc9736f&&this['_createCommentThread'](_0x3c98ca,_0xc9736f),this['_createMarkersFromRanges'](_0x3c98ca,_0xb8fca7,!!_0xc9736f);}['_createMarkersFromRanges'](_0x268b1b,_0x175e84,_0x1b1460){this['editor']['model']['change'](_0x4da8ca=>{for(const _0x29c102 of _0x175e84){const _0x164ec8=_0x1797dc()['substr'](0x1,0x5),_0x4bf10e='comment:'+_0x268b1b+':'+_0x164ec8;_0x4da8ca['addMarker'](_0x4bf10e,{'range':_0x29c102,'usingOperation':_0x1b1460,'affectsData':_0x1b1460});}});}['_createCommentThread'](_0x4c6a36,_0x228a28){const _0x3dc3db=this['editor']['plugins']['get']('CommentsRepository'),_0x5aa1a7=this['editor']['config']['get']('collaboration.channelId'),_0x35a17c=this['editor']['plugins']['get']('Users')['me'];if(!_0x35a17c)throw new _0x55af7e('addcommentthreadcommand-user-not-found',null);_0x3dc3db['addCommentThread']({'threadId':_0x4c6a36,'channelId':_0x5aa1a7,'comments':[{'authorId':_0x35a17c['id'],'content':_0x228a28,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x23f60d){for(const _0x1c6a20 of _0x23f60d['getItems']())if(this['_itemIsContent'](_0x1c6a20))return!0x0;return!0x1;}['_itemIsContent'](_0xeaf873){return _0xeaf873['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xeaf873)&&!_0xeaf873['is']('element','tableCell');}['_trimToContent'](_0x3d76ab){const _0x46c137=_0x5c06ef=>!this['_itemIsContent'](_0x5c06ef['item']),_0x2fff9d=_0x3d76ab['start']['getLastMatchingPosition'](_0x46c137),_0x5b939e=_0x3d76ab['end']['getLastMatchingPosition'](_0x46c137,{'direction':'backward'});return this['editor']['model']['createRange'](_0x2fff9d,_0x5b939e);}}class b extends _0xeeaaab{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f967e){super(_0x1f967e),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1a559c=this['editor'],_0x494e57=_0x1a559c['model']['document']['selection'],_0x4ba421=_0x20001b(()=>this['refreshSelectedViews'](),0xa);_0x494e57['on']('change:range',(_0x539513,_0xcc3e43)=>{_0xcc3e43['directChange']&&(_0x4ba421['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1a559c['editing']['view']['document'],'change:isFocused',(_0x5bd7de,_0x11cc68,_0xe452b0)=>{_0xe452b0&&_0x4ba421();}),this['listenTo'](_0x1a559c['ui']['focusTracker'],'change:isFocused',(_0x242c36,_0x314b2f,_0x10f12e)=>{_0x10f12e||this['fire']('blur',{'isAnnotationTracked':_0x5b8ad1=>this['_editorAnnotationsData']['has'](_0x5b8ad1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x50902e){if(this['_editorAnnotations']['has'](_0x50902e['view']))return;this['_editorAnnotations']['add'](_0x50902e['view']),this['editor']['ui']['focusTracker']['add'](_0x50902e['view']['element']);const _0x53e9b2=this['editor']['plugins']['get'](y);this['listenTo'](_0x53e9b2['collection'],'remove',(_0x22367f,_0xf7ea30)=>{this['editor']['ui']['focusTracker']['remove'](_0xf7ea30['view']['element']),this['_editorAnnotations']['delete'](_0xf7ea30['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1a9deb){if('function'!=typeof _0x1a9deb)throw new _0x55af7e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1a9deb);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x43c532,annotations:_0x321c5c}){const _0x5afa67=[],_0x1dfc9c=this['editor']['model']['document']['selection'],_0x3485dc=Array['from'](_0x1dfc9c['getRanges']());for(const [_0x119c62,_0x3cabaf]of this['_editorAnnotationsData']){const _0xfd714d=_0x311012(_0x3cabaf),_0x333705=_0x321c5c['getByInnerView'](_0x119c62);_0xfd714d&&_0x333705&&_0x5afa67['push']({'annotation':_0x333705,'range':_0xfd714d});}function _0x311012(_0x44d97e){for(const _0x41fa4c of _0x44d97e)for(const _0x469423 of _0x3485dc)if(_0x41fa4c['containsRange'](_0x469423,!_0x1dfc9c['isCollapsed']))return _0x41fa4c;return null;}return _0x5afa67['sort']((_0x212513,_0x2bc1fb)=>{const _0x2cc2df=_0x212513['range'],_0x54acd6=_0x2bc1fb['range'];if(!_0x2cc2df['isEqual'](_0x54acd6)){if(_0x2cc2df['containsRange'](_0x54acd6,!0x0))return 0x1;if(_0x54acd6['containsRange'](_0x2cc2df,!0x0))return-0x1;}return _0x212513['annotation']==_0x43c532?-0x1:_0x2bc1fb['annotation']==_0x43c532?0x1:0x0;})['map'](_0x3e1d61=>_0x3e1d61['annotation']);}get['_editorAnnotationsData'](){const _0x4a1a50=new Map();for(const _0x377e0e of Array['from'](this['_dataCollectors']))for(const [_0x42bd4e,_0x575b93]of _0x377e0e())_0x4a1a50['set'](_0x42bd4e,_0x575b93);return _0x4a1a50;}}class st extends _0xeeaaab{['afterInit'](){const _0x1117f5=this['editor'];if(!_0x1117f5['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1117f5['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0xeeaaab{constructor(_0x30b958){super(_0x30b958),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xaf13c7=this['editor'],_0x2007ed=_0xaf13c7['commands']['get']('importWord'),_0x5ef5d8=_0xaf13c7['plugins']['get'](it);_0x2007ed&&(_0x2007ed['on']('execute',(_0x5774ab,[,_0x172d79])=>{_0x172d79['collaboration_features']={'comments':!0x0,'user_id':_0x5ef5d8['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2007ed,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2b2d66,_0x5c534f){const {comment_threads:_0x1ed445}=_0x5c534f;_0x1ed445&&_0x1ed445['forEach'](({thread_id:_0x371747,comments:_0x2341b7,is_resolved:_0x316255})=>{const _0x44cc33=new Date(),_0x235e82=_0x2341b7['map'](({author:_0x3a6ad5,content:_0x597d7c,created_at:_0x45a9c8})=>({'content':_0x597d7c,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x44cc33,'attributes':{'@external':{'authorName':_0x3a6ad5,'createdAt':_0x45a9c8?new Date(_0x45a9c8):new Date(),'source':'importWord'}}})),_0x910d6=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x910d6,'threadId':_0x371747,'comments':_0x235e82,'resolvedAt':_0x316255?_0x44cc33:null});});}}class at extends _0xeeaaab{constructor(_0x4942c6){super(_0x4942c6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x135a44=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x135a44,'contentInsertion',(_0x4f5ed1,_0x59bc38)=>this['_removeMarkersWithoutThreads'](_0x59bc38['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x13863b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x13863b;const _0x4aa4c2=this['editor']['plugins']['get']('CommentsRepository');for(const _0x41de12 of _0x13863b['keys']()){const [_0x2f9555,_0x2233f1]=_0x41de12['split'](':');'comment'!=_0x2f9555||_0x4aa4c2['hasCommentThread'](_0x2233f1)||_0x13863b['delete'](_0x41de12);}return _0x13863b;}['_registerMarkerInClipboardPipeline'](){const _0x239089=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3de1f5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3de1f5&&_0x239089['_registerMarkerToCopy']('comment',_0x3de1f5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4e2f99){switch(_0x4e2f99){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x3b0e2d){const _0x23b081=_0x3b0e2d['split'](':');return{'group':_0x23b081[0x0],'id':_0x23b081[0x1],'part':_0x23b081[0x2]};}class ut extends _0xeeaaab{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3dd554,_0x9e2e29)=>{if(!_0x9e2e29['options']['showCommentHighlights'])return null;if(_0x9e2e29['options']['ignoreResolvedComments']){const {id:_0xc4ddfb}=ft(_0x3dd554['markerName']),_0x58b5a6=this['editor']['plugins']['get'](o);if(_0x58b5a6['getCommentThread'](_0xc4ddfb)?.['isResolved']&&_0x3dd554['item'])return _0x9e2e29['consumable']['consume'](_0x3dd554['item'],'addMarker:'+_0x3dd554['markerName']),_0x9e2e29['consumable']['consume'](_0x3dd554['item'],'removeMarker:'+_0x3dd554['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x25b7fe=>{_0x25b7fe['on']('addMarker:comment',(_0x33df8c,_0x3e7b51,_0x269627)=>{if(!_0x269627['options']['showCommentHighlights'])return;const _0x23a800=_0x3e7b51['item'];if(!_0x23a800)return;const _0x192660=_0x269627['mapper']['toViewElement'](_0x23a800);this['editor']['model']['schema']['isObject'](_0x23a800)&&_0x192660&&!_0x192660['getCustomProperty']('widget')&&_0x192660['is']('containerElement')&&_0x3f4190(_0x192660,_0x269627['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x41212e,{writer:_0x55a5f0,options:_0x364c0a})=>{if(!_0x364c0a['showCommentHighlights'])return null;const _0x3fbf8f=_0x55a5f0['createContainerElement']('div'),_0x343f9f=_0x55a5f0['createEmptyElement']('hr');return _0x55a5f0['addClass']('ck-horizontal-line',_0x3fbf8f),_0x55a5f0['insert'](_0x55a5f0['createPositionAt'](_0x3fbf8f,0x0),_0x343f9f),_0x3fbf8f;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x492f5d,{writer:_0x49c368,options:_0x443bb3})=>{if(!_0x443bb3['showCommentHighlights'])return null;const _0xfa06d8=_0x49c368['createContainerElement']('span'),_0x4668f1=_0x49c368['createEmptyElement']('img');return _0x49c368['addClass']('image-inline',_0xfa06d8),_0x49c368['insert'](_0x49c368['createPositionAt'](_0xfa06d8,0x0),_0x4668f1),_0xfa06d8;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x37e7ce,{writer:_0x33e392,options:_0x1bb851})=>{if(_0x1bb851['showCommentHighlights'])return _0x33e392['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2c75e7,_0x183690,_0x4eccce)=>{_0x4eccce['options']['showCommentHighlights']&&_0x2c75e7['stop']();},{'priority':'high'});}}class r extends _0xeeaaab{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(_0x46414a){super(_0x46414a),this['set']('isThreadsLoadingPaused',!0x0),_0x46414a['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5d613f,_0x494293,_0x2e8891,_0x18c217)=>{const _0x3cb53f=_0x46414a['plugins']['get'](o),_0x2ddf41=_0x2e8891?ft(_0x2e8891)['id']:null;_0x46414a['model']['change'](()=>{if(_0x2ddf41){const _0x3b6a9e=this['getAllMarkersForId'](_0x2ddf41);for(const _0x4e3c24 of _0x3b6a9e)_0x46414a['editing']['reconvertMarker'](_0x4e3c24);}if(_0x18c217){const {id:_0x488d53}=ft(_0x18c217),_0x592244=_0x3cb53f['getCommentThread'](_0x488d53);if(_0x592244&&_0x592244['unlinkedAt'])return;if(_0x592244&&!_0x592244['isAttached'])return;const _0x3515b1=this['getAllMarkersForId'](_0x488d53);for(const _0x462b87 of _0x3515b1)_0x46414a['editing']['reconvertMarker'](_0x462b87);}}),_0x2ddf41&&this['scrollToThreadMarker'](_0x2ddf41);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x3ea021=this['editor'],_0x2f2c72=_0x3ea021['plugins']['get'](o),_0x57dbd9=_0x3ea021['config']['get']('collaboration.channelId'),_0x532ab8=_0x2f2c72['getCommentThreads']()['filter'](_0x6e5897=>_0x6e5897['channelId']!==_0x57dbd9);_0x3ea021['commands']['add']('addCommentThread',new ot(_0x3ea021)),this['listenTo'](_0x3ea021,'change:isReadOnly',(_0x5deb5c,_0x110b7d,_0x290e9e)=>{_0x2f2c72['switchReadOnly'](_0x290e9e,_0x3ea021['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2f2c72,dt('addCommentThread',_0x57dbd9),(_0x3db4fc,{threadId:_0x28d67e})=>{const _0x13233c=this['editor']['plugins']['get'](o)['getCommentThread'](_0x28d67e);_0x13233c?.['unlinkedAt']&&this['_attachArchivedThread'](_0x28d67e);}),this['listenTo'](_0x2f2c72,dt('removeCommentThread',_0x57dbd9),(_0x5d0d68,{threadId:_0xfefcb1})=>{_0x3ea021['model']['enqueueChange']({'isUndoable':!0x1},_0x4f6af9=>{const _0x588aa0=this['getAllMarkersForId'](_0xfefcb1);for(const _0x4e5377 of _0x588aa0)_0x4f6af9['removeMarker'](_0x4e5377);});}),this['listenTo'](_0x2f2c72,dt('resolveCommentThread',_0x57dbd9),(_0x2fdb44,{threadId:_0x1dafe0})=>{(this['_reconvertMarkers'](_0x1dafe0),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1dafe0)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2f2c72,dt('reopenCommentThread',_0x57dbd9),(_0x1eeae3,{threadId:_0x2a4036})=>{this['_reconvertMarkers'](_0x2a4036);},{'priority':'low'}),this['listenTo'](_0x2f2c72,dt('addComment',_0x57dbd9),(_0x8db919,{threadId:_0x38d1b9,isFromAdapter:_0x52818d})=>{const _0x412773=this['getAllMarkersForId'](_0x38d1b9);if(_0x52818d||0x0==_0x412773['length']||!_0x2f2c72['hasCommentThread'](_0x38d1b9))return;0x1===_0x2f2c72['getCommentThread'](_0x38d1b9)['length']&&_0x3ea021['model']['enqueueChange']({'isUndoable':!0x1},_0x4b00ba=>{for(const _0x53bc29 of _0x412773)_0x4b00ba['updateMarker'](_0x53bc29,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x532ab8);}['afterInit'](){!async function(_0x1091a3){const _0x19e04c=_0x47297d([0x73,0x56,0x35,0x6d,0x52,0x49,0x75,0x53,0x71,0x6b,0x4d,0x7a,0x69,0x61,0x47,0x57,0x62,0x32,0x42,0x45,0x51,0x58,0x70,0x4a,0x63,0x79,0x68,0x30,0x48,0x50,0x55,0x4e,0x6e,0x4f,0x5a,0x54,0x39,0x72,0x33,0x6a,0x65,0x4b,0x67,0x64,0x31,0x76,0x59,0x37,0x41,0x66,0x44,0x43,0x78,0x6c,0x6f,0x34,0x38,0x74,0x77,0x4c,0x36,0x46]),_0x23a496=0x673793ce,_0x454b73=0x6730fc56^_0x23a496,_0x5997f0=window[_0x47297d([0x44,0x61,0x74,0x65])][_0x47297d([0x6e,0x6f,0x77])](),_0x196d72=_0x1091a3[_0x47297d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2ac91e=new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x441df4=>{_0x196d72[_0x47297d([0x6f,0x6e,0x63,0x65])](_0x47297d([0x72,0x65,0x61,0x64,0x79]),_0x441df4);}),_0x6b4286={[_0x47297d([0x6b,0x74,0x79])]:_0x47297d([0x45,0x43]),[_0x47297d([0x75,0x73,0x65])]:_0x47297d([0x73,0x69,0x67]),[_0x47297d([0x63,0x72,0x76])]:_0x47297d([0x50,0x2d,0x32,0x35,0x36]),[_0x47297d([0x78])]:_0x47297d([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]),[_0x47297d([0x79])]:_0x47297d([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]),[_0x47297d([0x61,0x6c,0x67])]:_0x47297d([0x45,0x53,0x32,0x35,0x36])},_0x270f39=_0x196d72[_0x47297d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x47297d([0x67,0x65,0x74])](_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x42627e(){let _0x31f9c8,_0x45af00=null,_0x29fe45=null;try{if(_0x270f39==_0x47297d([0x47,0x50,0x4c]))return _0x47297d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x31f9c8=_0x1d4eba(),!_0x31f9c8)return _0x47297d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x31f9c8[_0x47297d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x29fe45=_0x19c5c8(_0x31f9c8[_0x47297d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x31f9c8[_0x47297d([0x6a,0x74,0x69])])),await _0x29a487()?_0x2bad50()?_0x393c8d()?_0x47297d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x539375()?(_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x47297d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x45af00=_0x44f89c(_0x47297d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x47297d([0x74,0x72,0x69,0x61,0x6c])&&(_0x45af00=_0x44f89c(_0x47297d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x46f0b2()):_0x47297d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x47297d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x47297d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x47297d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x393c8d(){const _0x56fd3b=[_0x47297d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x47297d([0x74,0x72,0x69,0x61,0x6c])][_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5997f0/0x3e8:0xe10*_0x454b73;return _0x31f9c8[_0x47297d([0x65,0x78,0x70])]<_0x56fd3b;}function _0x2bad50(){const _0x23e7ab=_0x31f9c8[_0x47297d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x23e7ab)return!0x1;if(_0x23e7ab[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x2a])))return!0x0;if(_0x23e7ab[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x43,0x4d,0x54])))return!0x0;if(_0x23e7ab[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x52,0x43,0x4d,0x54]))){if(_0x5bffd0())return!0x0;if(_0x5b9080()||_0x102683())return!0x0;}return!0x1;}function _0x539375(){const _0x315c83=_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x315c83||0x0==_0x315c83[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2c474c}=new URL(window[_0x47297d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x315c83[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c474c))return!0x0;const _0x5437bf=_0x2c474c[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e]));return _0x315c83[_0x47297d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x54c23c=>_0x54c23c[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x2a])))[_0x47297d([0x6d,0x61,0x70])](_0x69b70e=>_0x69b70e[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e])))[_0x47297d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12c397=>_0x12c397[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5437bf[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47297d([0x6d,0x61,0x70])](_0x461e2d=>Array(_0x5437bf[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x461e2d[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47297d([0x66,0x69,0x6c,0x6c])](_0x461e2d[0x0]===_0x47297d([0x2a])?_0x47297d([0x2a]):'')[_0x47297d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x461e2d))[_0x47297d([0x73,0x6f,0x6d,0x65])](_0x4e3d3d=>_0x5437bf[_0x47297d([0x65,0x76,0x65,0x72,0x79])]((_0x4d3ed1,_0x3ceb67)=>_0x4e3d3d[_0x3ceb67]===_0x4d3ed1||_0x4e3d3d[_0x3ceb67]===_0x47297d([0x2a])));}function _0x46f0b2(){return _0x45af00&&_0x29fe45?new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4c412e,_0x43c633)=>{_0x45af00[_0x47297d([0x74,0x68,0x65,0x6e])](_0x4c412e,_0x43c633),_0x29fe45[_0x47297d([0x74,0x68,0x65,0x6e])](_0x39b3bd=>{_0x39b3bd!=_0x47297d([0x56,0x61,0x6c,0x69,0x64])&&_0x4c412e(_0x39b3bd);},_0x43c633);}):_0x45af00||_0x29fe45||_0x47297d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x19c5c8(_0x4f63e8,_0x4af72b){return new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c5bd0=>{if(_0x359ac5())return _0x5c5bd0(_0x47297d([0x56,0x61,0x6c,0x69,0x64]));_0x17b835(),_0x196d72[_0x47297d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x47297d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x60d929=!0x1;const _0x2f6b55=_0x1797dc();function _0x114941(_0x5dc021){return!!_0x5dc021&&(typeof _0x5dc021===_0x47297d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5dc021===_0x47297d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5dc021[_0x47297d([0x74,0x68,0x65,0x6e])]===_0x47297d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5dc021[_0x47297d([0x63,0x61,0x74,0x63,0x68])]===_0x47297d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3265e0(_0x1d5684){_0x15b743(_0x1d5684)[_0x47297d([0x74,0x68,0x65,0x6e])](_0x48b3a9=>{if(!_0x48b3a9||_0x48b3a9[_0x47297d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x47297d([0x6f,0x6b]))return _0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x209198(_0x2c7d53(_0x2f6b55+_0x4af72b))!=_0x48b3a9[_0x47297d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x47297d([0x56,0x61,0x6c,0x69,0x64]);})[_0x47297d([0x74,0x68,0x65,0x6e])](_0x38ac4a=>(_0x16d794(),_0x38ac4a),()=>{const _0x2f80ef=_0x14a6cf();return null==_0x2f80ef?(_0x16d794(),_0x47297d([0x56,0x61,0x6c,0x69,0x64])):_0x47297d(_0x5997f0-_0x2f80ef>(0x433b17ce^_0x23a496)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x47297d([0x74,0x68,0x65,0x6e])](_0x5c5bd0)[_0x47297d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5c5bd0(_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x475a3f=0x67017d4e^_0x23a496;function _0x16d794(){const _0x5b3664=_0x47297d([0x6c,0x6c,0x63,0x74,0x2d])+_0x209198(_0x2c7d53(_0x4f63e8)),_0x8a7f6e=_0x3a16ee(_0x209198(window[_0x47297d([0x4d,0x61,0x74,0x68])][_0x47297d([0x63,0x65,0x69,0x6c])](_0x5997f0/_0x475a3f)));window[_0x47297d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47297d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5b3664,_0x8a7f6e);}function _0x14a6cf(){const _0x31275a=_0x47297d([0x6c,0x6c,0x63,0x74,0x2d])+_0x209198(_0x2c7d53(_0x4f63e8)),_0x5e16c3=window[_0x47297d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47297d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x31275a);return _0x5e16c3?window[_0x47297d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a16ee(_0x5e16c3),0x10)*_0x475a3f:null;}function _0x15b743(_0x175565){return new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x506aba,_0x4819ca)=>{_0x175565[_0x47297d([0x74,0x68,0x65,0x6e])](_0x506aba,_0x4819ca),window[_0x47297d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4819ca,0x6736470e^_0x23a496);});}}_0x196d72[_0x47297d([0x6f,0x6e])](_0x47297d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x20d74e,_0x40e332)=>{if(_0x40e332[0x0]!=_0x4f63e8)return _0x5c5bd0(_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x40e332[0x1]={..._0x40e332[0x1],[_0x47297d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2f6b55};},{[_0x47297d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47297d([0x68,0x69,0x67,0x68])}),_0x196d72[_0x47297d([0x6f,0x6e])](_0x47297d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x47c573=>{_0x114941(_0x47c573[_0x47297d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x60d929=!0x0,_0x3265e0(_0x47c573[_0x47297d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x47297d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47297d([0x6c,0x6f,0x77])}),_0x2ac91e[_0x47297d([0x74,0x68,0x65,0x6e])](()=>{_0x60d929||_0x5c5bd0(_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x359ac5(){return _0x196d72[_0x47297d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47297d([0x76,0x69,0x65,0x77])][_0x47297d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x47297d([0x61,0x75,0x74,0x6f]);}function _0x17b835(){_0x196d72[_0x47297d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47297d([0x76,0x69,0x65,0x77])][_0x47297d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x47297d([0x61,0x75,0x74,0x6f]);}}function _0x44f89c(_0x3902ff){const _0x5e239d=[new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x422c3a=>setTimeout(_0x422c3a,0x673ead02^_0x23a496)),_0x2ac91e[_0x47297d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25885e=>{let _0x7ed6a2=0x0;_0x196d72[_0x47297d([0x6d,0x6f,0x64,0x65,0x6c])][_0x47297d([0x6f,0x6e])](_0x47297d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4c1eed,_0x4bbef7)=>{_0x4bbef7[0x0][_0x47297d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x7ed6a2++,_0x7ed6a2==(0x67379236^_0x23a496)&&(_0x25885e(),_0x4c1eed[_0x47297d([0x6f,0x66,0x66])]());});}))];return window[_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x47297d([0x72,0x61,0x63,0x65])](_0x5e239d)[_0x47297d([0x74,0x68,0x65,0x6e])](()=>_0x3902ff);}async function _0x47c860(){await _0x2ac91e,_0x196d72[_0x47297d([0x6d,0x6f,0x64,0x65,0x6c])][_0x47297d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4fbe2a,_0x196d72[_0x47297d([0x6d,0x6f,0x64,0x65,0x6c])][_0x47297d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4fbe2a,_0x196d72[_0x47297d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x47297d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5bffd0(){return _0x4d4b3b(_0x47297d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4ebb00(_0x47297d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x47297d([0x73,0x74,0x61,0x74,0x65])]==_0x47297d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5b9080(){return _0x4d4b3b(_0x47297d([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 _0x102683(){return _0x4d4b3b(_0x47297d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4eee56(_0x21f1b3){const _0x5d7cab=_0x2bf939();_0x196d72[_0x5d7cab]=_0x47297d([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x21f1b3,_0x21f1b3!=_0x47297d([0x56,0x61,0x6c,0x69,0x64])&&_0x47c860();}function _0x2bf939(){const _0x476873=window[_0x47297d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x47297d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x47297d([0x6e,0x6f,0x77])]())[_0x47297d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x47297d([0x2e]),'');let _0x20c3a6=_0x47297d([0x73]);for(let _0x4b4d7c=0x0;_0x4b4d7c<_0x476873[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b4d7c+=0x2){let _0x26e6f3=window[_0x47297d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x476873[_0x47297d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b4d7c,_0x4b4d7c+0x2));_0x26e6f3>=_0x19e04c[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x26e6f3-=_0x19e04c[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x20c3a6+=_0x19e04c[_0x26e6f3];}return _0x20c3a6;}function _0x1d4eba(){const _0x3ccfb6=_0x270f39[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e]));if(0x3!=_0x3ccfb6[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4bba35(_0x3ccfb6[0x1]);function _0x4bba35(_0x1ab4ea){const _0x4794b3=_0x17be03(_0x1ab4ea);return _0x4794b3&&_0x19f5a3()?_0x4794b3:null;function _0x19f5a3(){const _0x9caeac=_0x4794b3[_0x47297d([0x6a,0x74,0x69])],_0x1cf747=window[_0x47297d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x9caeac[_0x47297d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x9caeac[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1207ab={..._0x4794b3,[_0x47297d([0x6a,0x74,0x69])]:_0x9caeac[_0x47297d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x9caeac[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1207ab[_0x47297d([0x76,0x63])],_0x2c7d53(_0x1207ab)==_0x1cf747;}}}async function _0x29a487(){let _0x430279=!0x0;try{const _0x4ec327=_0x270f39[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e])),[_0x397b50,_0xeaa804,_0x149010]=_0x4ec327;return _0x571c00(_0x397b50),await _0x4a9e9a(_0x397b50,_0xeaa804,_0x149010),_0x430279;}catch{return!0x1;}function _0x571c00(_0x4bc900){const _0x756fc0=_0x17be03(_0x4bc900);_0x756fc0&&_0x756fc0[_0x47297d([0x61,0x6c,0x67])]==_0x47297d([0x45,0x53,0x32,0x35,0x36])||(_0x430279=!0x1);}async function _0x4a9e9a(_0x5edf4c,_0x224627,_0x11902f){const _0x249986=window[_0x47297d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x47297d([0x66,0x72,0x6f,0x6d])](_0x1397ff(_0x11902f),_0x4ff612=>_0x4ff612[_0x47297d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5c0318=new window[(_0x47297d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x47297d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5edf4c+_0x47297d([0x2e])+_0x224627),_0x54447c=window[_0x47297d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x47297d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x54447c)return;const _0xf6d948=await _0x54447c[_0x47297d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x47297d([0x6a,0x77,0x6b]),_0x6b4286,{[_0x47297d([0x6e,0x61,0x6d,0x65])]:_0x47297d([0x45,0x43,0x44,0x53,0x41]),[_0x47297d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x47297d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x47297d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x54447c[_0x47297d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x47297d([0x6e,0x61,0x6d,0x65])]:_0x47297d([0x45,0x43,0x44,0x53,0x41]),[_0x47297d([0x68,0x61,0x73,0x68])]:{[_0x47297d([0x6e,0x61,0x6d,0x65])]:_0x47297d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xf6d948,_0x249986,_0x5c0318)||(_0x430279=!0x1);}}function _0x17be03(_0x1910f0){return _0x1910f0[_0x47297d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x47297d([0x65,0x79]))?JSON[_0x47297d([0x70,0x61,0x72,0x73,0x65])](_0x1397ff(_0x1910f0)):null;}function _0x1397ff(_0x5ed6ea){return window[_0x47297d([0x61,0x74,0x6f,0x62])](_0x5ed6ea[_0x47297d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x47297d([0x2b]))[_0x47297d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x47297d([0x2f])));}function _0x2c7d53(_0x25c802){let _0x5876af=0x1505;function _0xf73e1c(_0x185968){for(let _0x3e4ffe=0x0;_0x3e4ffe<_0x185968[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3e4ffe++){const _0x4a180e=_0x185968[_0x47297d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3e4ffe);_0x5876af=(_0x5876af<<0x5)+_0x5876af+_0x4a180e,_0x5876af&=_0x5876af;}}function _0x39d931(_0xe64048){Array[_0x47297d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xe64048)?_0xe64048[_0x47297d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39d931):_0xe64048&&typeof _0xe64048==_0x47297d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x47297d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xe64048)[_0x47297d([0x73,0x6f,0x72,0x74])]()[_0x47297d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x56260d,_0x19a035])=>{_0xf73e1c(_0x56260d),_0x39d931(_0x19a035);}):_0xf73e1c(window[_0x47297d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xe64048));}return _0x39d931(_0x25c802),_0x5876af>>>0x0;}function _0x209198(_0x37e1ae){return _0x37e1ae[_0x47297d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x47297d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x47297d([0x30]));}function _0x3a16ee(_0x282c4e){return _0x282c4e[_0x47297d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x47297d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x47297d([0x6a,0x6f,0x69,0x6e])]('');}function _0x4d4b3b(_0x47d9fc){return _0x196d72[_0x47297d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x47297d([0x68,0x61,0x73])](_0x47d9fc);}function _0x4ebb00(_0x1c9acc){return _0x196d72[_0x47297d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x47297d([0x67,0x65,0x74])](_0x1c9acc);}function _0x4fbe2a(){}function _0x47297d(_0x3f9c18){return _0x3f9c18['map'](_0xfe8966=>String['fromCharCode'](_0xfe8966))['join']('');}_0x4eee56(await _0x42627e());}(this);}['destroy'](){const _0x4ac9af=this['editor']['plugins']['get'](o),_0x40e6ee=this['editor']['config']['get']('collaboration.channelId');for(const _0x5914bb of _0x4ac9af['getCommentThreads']({'channelId':_0x40e6ee}))_0x4ac9af['_detachCommentThread'](_0x5914bb['id']),_0x4ac9af['_threads']['delete'](_0x5914bb['id']);super['destroy']();}['hasMarkerForId'](_0x6d992d){return this['getAllMarkersForId'](_0x6d992d)['length']>0x0;}['getAllMarkersForId'](_0x48cb7e){const _0x1b7145=[];for(const _0x126195 of this['editor']['model']['markers'])_0x126195['name']['startsWith']('comment:'+_0x48cb7e)&&_0x1b7145['push'](_0x126195);return _0x1b7145;}['scrollToThreadMarker'](_0x184485){setTimeout(()=>{const _0x506e36=this['_getTargetForId'](_0x184485);if(!_0x506e36)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x184485&&nt({'target':_0x506e36[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1791fe){this['editor']['model']['change'](()=>{for(const _0x14d275 of this['getAllMarkersForId'](_0x1791fe))this['editor']['editing']['reconvertMarker'](_0x14d275);});}['_attachArchivedThread'](_0x1cee28){const _0x149b6f=this['editor']['plugins']['get'](o),_0x241a54=this['editor']['plugins']['get'](b),_0x4ca328=_0x149b6f['getCommentThread'](_0x1cee28);if(!_0x4ca328['isAttached']){const _0x20ac0b=_0x4ca328['attachTo'](()=>this['_getTargetForId'](_0x4ca328['id']));_0x241a54['registerAnnotation'](_0x20ac0b),_0x4ca328['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1de35c=this['editor'],_0x50597a=_0x1de35c['plugins']['get'](it);_0x1de35c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x34518d,_0x57ac01)=>{const {id:_0x2ce8ea}=ft(_0x34518d['markerName']),_0x12496a=_0x1de35c['plugins']['get'](o)['getCommentThread'](_0x2ce8ea),_0xdf9488=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2ce8ea;let _0x38e5db;if(_0x12496a&&_0x12496a['isResolved']&&!_0xdf9488&&_0x34518d['item'])return _0x57ac01['consumable']['consume'](_0x34518d['item'],'addMarker:'+_0x34518d['markerName']),_0x57ac01['consumable']['consume'](_0x34518d['item'],'removeMarker:'+_0x34518d['markerName']),null;const _0x248993=['ck-comment-marker'];return _0xdf9488&&_0x248993['push']('ck-comment-marker--active'),_0x38e5db=_0x12496a?.['length']?_0x12496a['comments']['first']['author']['id']:_0x50597a['me']['id'],{'classes':_0x248993,'attributes':{'data-comment':_0x2ce8ea,'data-author-id':_0x38e5db}};}}),_0x1de35c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x556d84,{options:_0xadbed8})=>{if(_0xadbed8['showCommentHighlights'])return null;const _0x1cf454=_0x1de35c['plugins']['get'](o),_0x129260=_0x1de35c['model']['markers']['get'](_0x556d84),{id:_0x38d09c,part:_0x52c33f}=ft(_0x556d84);return _0x129260&&!_0x129260['affectsData']||_0xadbed8['ignoreResolvedComments']&&_0x1cf454['getCommentThread'](_0x38d09c)?.['isResolved']?null:{'group':'comment','name':_0x52c33f?_0x38d09c+':'+_0x52c33f:_0x38d09c};}}),_0x1de35c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1f061d,{writer:_0x3ad10d})=>_0x3ad10d['createElement']('$marker',{'data-name':'comment:'+_0x1f061d['getAttribute']('id')})}),_0x1de35c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4189f2=this['editor'],_0x2757da=_0x4189f2['plugins']['get'](o),_0x560391=new Set(),_0x1140b0=new Set();_0x4189f2['model']['document']['registerPostFixer'](_0x259250=>{let _0x35687d=!0x1;for(const {name:_0x2aaf25,data:_0x4e48b9}of _0x4189f2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1879ee,id:_0x2d0cf9}=ft(_0x2aaf25);let _0x492a7d=_0x4e48b9['newRange'];if('comment'!==_0x1879ee||!_0x492a7d)continue;const _0x41d83a='$graveyard'===_0x492a7d['root']['rootName'];_0x41d83a||(_0x492a7d=ht(_0x492a7d,_0x4189f2['model']),!_0x492a7d||_0x492a7d['isCollapsed']||!_0x4e48b9['newRange']||_0x492a7d['isEqual'](_0x4e48b9['newRange']))?_0x4189f2['model']['hasContent'](_0x492a7d)&&!_0x41d83a?this['isThreadsLoadingPaused']?_0x560391['add'](_0x2aaf25):this['_handleThreadMarker'](_0x2aaf25,_0x2d0cf9):(_0x1140b0['add'](_0x2aaf25),_0x560391['delete'](_0x2aaf25),_0x259250['removeMarker'](_0x2aaf25),_0x35687d=!0x0):(_0x259250['updateMarker'](_0x2aaf25,{'range':_0x492a7d}),_0x35687d=!0x0);}return _0x35687d;}),this['on']('change:isThreadsLoadingPaused',(_0x3fe157,_0x3e1442,_0x3dcac7)=>{if(!_0x3dcac7&&_0x560391['size'])for(const _0x17149e of _0x560391){const {id:_0xc267b8}=ft(_0x17149e);_0x560391['delete'](_0x17149e),_0x4189f2['model']['markers']['get'](_0x17149e)&&this['_handleThreadMarker'](_0x17149e,_0xc267b8);}}),this['listenTo'](_0x4189f2['model']['document'],'change',()=>{for(const {name:_0x3ca7f6,data:{newRange:_0x189417}}of _0x4189f2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5e2e4c,id:_0x118572}=ft(_0x3ca7f6);if('comment'!==_0x5e2e4c)continue;const _0x1817a7=_0x2757da['getCommentThread'](_0x118572),_0x55b07b=this['hasMarkerForId'](_0x118572);_0x1817a7&&(!_0x1817a7['_hasTargetInContent']&&_0x189417&&_0x4189f2['editing']['view']['once']('render',()=>{const _0x4db0dd=_0x4189f2['plugins']['get'](y),_0x1e074d=_0x2757da['_threadToController']['get'](_0x1817a7)['view'];_0x4db0dd['getByInnerView'](_0x1e074d)['refreshVisibility']();},{'priority':'low'}),_0x1817a7['_hasTargetInContent']=_0x55b07b||!!_0x189417),_0x189417||(_0x1140b0['add'](_0x3ca7f6),_0x560391['delete'](_0x3ca7f6));}for(const _0x5e63b6 of _0x1140b0){const {id:_0x1e9800}=ft(_0x5e63b6),_0x32004e=_0x2757da['getCommentThread'](_0x1e9800);if(_0x560391['delete'](_0x5e63b6),!_0x32004e)continue;const _0x5edf69=this['hasMarkerForId'](_0x1e9800);_0x5edf69||_0x32004e['isSubmitted']?_0x5edf69||_0x32004e['unlinkedAt']||_0x32004e['setUnlinkedAt'](new Date()):_0x32004e['remove']();}_0x1140b0['clear']();});}['_handleInitialThreads'](_0x5e071c){_0x5e071c['forEach'](_0x373581=>{_0x373581['unlinkedAt']&&this['_attachArchivedThread'](_0x373581['id']);});}['_getTargetForId'](_0x23431d){const _0x37e8d1=this['editor'],_0x2379ec=this['getAllMarkersForId'](_0x23431d);return et(_0x37e8d1['editing'],_0x2379ec);}['_getTextContext'](_0x2ec90b){const _0x2fdbd2=this['getAllMarkersForId'](_0x2ec90b);let _0x52eff7='',_0x210601=!0x1;for(const _0x1a5780 of _0x2fdbd2){const _0x24c040=_0x1a5780['getRange']();for(const _0x5500b0 of Array['from'](_0x24c040['getItems']()))_0x5500b0['is']('$textProxy')?(_0x52eff7&&_0x210601&&(_0x52eff7+='\x20',_0x210601=!0x1),_0x52eff7+=_0x5500b0['data']):_0x210601=!0x0;_0x210601=!0x0;}return _0x52eff7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x137336,_0x2873be){const _0x1e528b=this['editor'],_0xe98a41=_0x1e528b['plugins']['get'](o);let _0x5af1ca=_0xe98a41['getCommentThread'](_0x2873be);const _0x5a63a5=_0x1e528b['config']['get']('collaboration.channelId'),_0x2f9031=_0x1e528b['plugins']['get'](b);if(_0x5af1ca&&(_0x5af1ca['unlinkedAt']&&_0x5af1ca['setUnlinkedAt'](null),_0x5af1ca['isAttached']))return _0x5af1ca;return!this['getAllMarkersForId'](_0x2873be)[0x0]['managedUsingOperations']?_0x1e528b['editing']['view']['once']('render',()=>{if(_0xe98a41['getCommentThread'](_0x2873be))return;const _0x252b75=_0x1e528b['plugins']['get'](y);_0x5af1ca=_0xe98a41['openNewCommentThread']({'channelId':_0x5a63a5,'threadId':_0x2873be,'target':()=>this['_getTargetForId'](_0x2873be),'context':{'type':'text','value':this['_getTextContext'](_0x2873be)}});const _0x2757ab=_0xe98a41['_threadToController']['get'](_0x5af1ca)['view'],_0x59c01a=_0x252b75['getByInnerView'](_0x2757ab);_0x59c01a&&_0x2f9031['registerAnnotation'](_0x59c01a);},{'priority':'low'}):_0xe98a41['fetchCommentThread']({'channelId':_0x5a63a5,'threadId':_0x2873be})['then'](_0x37e808=>{if('destroyed'!==_0x1e528b['state']){if(_0x5af1ca=_0x37e808,_0x5af1ca&&!_0x5af1ca['isAttached']){const _0x3e713b=_0x5af1ca['attachTo'](()=>this['_getTargetForId'](_0x2873be));_0x2f9031['registerAnnotation'](_0x3e713b),_0x5af1ca['isResolved']&&this['_reconvertMarkers'](_0x2873be);}else{if(!_0x5af1ca){const _0x14f717=this['getAllMarkersForId'](_0x2873be);_0x1e528b['model']['change'](_0x34ea06=>{for(const _0x3cd5e7 of _0x14f717)_0x34ea06['removeMarker'](_0x3cd5e7);});}}}}),_0x5af1ca;}['_handleThreadMarker'](_0x23799d,_0x12ab84){const _0xc7b115=this['_attachMarkerToThread'](_0x23799d,_0x12ab84);_0xc7b115&&!_0xc7b115['context']&&_0xc7b115['setContext']({'type':'text','value':this['_getTextContext'](_0x12ab84)});}['_initAriaMarkerChangeAnnouncements'](){const _0x130426=this['editor'];rt(_0x130426['model'],({left:_0x3f18e1,entered:_0xe0e125})=>{for(const _0xfb7a4a of _0x3f18e1)if(mt(_0xfb7a4a)){_0x130426['ui']['ariaLiveAnnouncer']['announce'](N(_0x130426['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x220d2e of _0xe0e125)if(mt(_0x220d2e)){_0x130426['ui']['ariaLiveAnnouncer']['announce'](N(_0x130426['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0xabbee7)));break;}});}}function dt(_0x34ad36,_0x26f512){return _0x26f512?_0x34ad36+':'+_0x26f512:_0x34ad36;}function ht(_0x44b953,_0x21d751){const _0x1de267=_0x21d751['schema'],_0x21c35f=_0x21d751['createRange'](_0x44b953['start']);for(const _0x2a970d of _0x44b953['getWalker']()){const {type:_0x143686,item:_0x14c3a2,nextPosition:_0x2a8a2e}=_0x2a970d;if('text'===_0x143686||_0x1de267['isObject'](_0x14c3a2)){const _0x37cf51=_0x21d751['createPositionBefore'](_0x14c3a2);_0x21c35f['isCollapsed']&&(_0x21c35f['start']=_0x37cf51),_0x21c35f['end']=_0x2a8a2e;}}return _0x21c35f;}function mt(_0x493f57){return'comment'===ft(_0x493f57['name'])['group'];}class s extends _0xeeaaab{['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 _0x527463=this['editor'],_0x2c96bb=_0x527463['plugins']['get'](o),_0x41b960=_0x527463['plugins']['get'](r),_0x4fd9be=_0x527463['plugins']['get'](y),_0x934580=_0x527463['plugins']['get'](b);_0x527463['ui']['componentFactory']['add']('comment',()=>{const _0x4d13f5=this['_createUIButton'](_0x1db6f3);return _0x4d13f5['tooltip']=!0x0,_0x4d13f5;}),_0x527463['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x19b513)),_0x934580['addSourceCollector'](()=>{const _0x2c65a3=[];for(const [_0x5acf2a,_0x2b72c9]of _0x2c96bb['_threadToController']){const _0x407e04=_0x41b960['getAllMarkersForId'](_0x5acf2a['id']),_0x303c9d=_0x407e04['map'](_0x594c92=>_0x594c92['getRange']());_0x407e04['length']>0x0&&_0x2c65a3['push']([_0x2b72c9['view'],_0x303c9d]);}return _0x2c65a3;}),this['listenTo'](_0x4fd9be,'change:activeAnnotations',(_0x2dfd39,_0x1a0c5e,_0x930944)=>{const _0x3b7be9=Array['from'](_0x930944)['map'](_0xedf1b2=>_0xedf1b2['innerView'])['find'](_0x3f1d83=>_0x2c96bb['_viewToController']['has'](_0x3f1d83));if(!_0x3b7be9)return void(_0x41b960['activeMarker']=null);const _0x4aa1e3=_0x2c96bb['_viewToController']['get'](_0x3b7be9)['model']['id'],_0xff7a47='comment:'+_0x4aa1e3;_0x4aa1e3&&_0x41b960['hasMarkerForId'](_0x4aa1e3)?_0x41b960['activeMarker']=_0xff7a47:_0x41b960['activeMarker']&&(_0x41b960['activeMarker']=null);}),this['listenTo'](_0x2c96bb,'removeCommentThread',(_0x1457c9,{threadId:_0x2ff853,isFromAdapter:_0x9828b8})=>{!_0x9828b8&&_0x527463['ui']['focusTracker']['isFocused']&&_0x41b960['hasMarkerForId'](_0x2ff853)&&_0x527463['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2c96bb,'addComment',(_0x5215e7,{threadId:_0x4f0229,isFromAdapter:_0x109970})=>{if(_0x109970||!_0x41b960['hasMarkerForId'](_0x4f0229)||!_0x2c96bb['hasCommentThread'](_0x4f0229))return;0x1===_0x2c96bb['getCommentThread'](_0x4f0229)['length']&&(_0x527463['editing']['view']['focus'](),_0x5215e7['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x486523=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x108e5e;for(const _0x45ea7e in _0x486523){const _0x2b75b5=_0x45ea7e,_0x20f0c8=_0x486523[_0x2b75b5];if('commentsLicenseKeyValid'==_0x20f0c8||'commentsLicenseKeyInvalid'==_0x20f0c8||'commentsLicenseKeyExpired'==_0x20f0c8||'commentsLicenseKeyDomainLimit'==_0x20f0c8||'commentsLicenseKeyNotAllowed'==_0x20f0c8||'commentsLicenseKeyEvaluationLimit'==_0x20f0c8||'commentsLicenseKeyTrialLimit'==_0x20f0c8||'commentsLicenseKeyUsageLimit'==_0x20f0c8){delete _0x486523[_0x2b75b5],_0x108e5e=_0x20f0c8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x108e5e&&_0x486523['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x108e5e&&_0x486523['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x108e5e&&_0x486523['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x108e5e&&_0x486523['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x108e5e&&_0x486523['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x108e5e&&_0x486523['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x108e5e&&_0x486523['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x48b4ed){const _0x2998cc=this['editor'],_0x37d385=new _0x48b4ed(_0x2998cc['locale']),_0x2199fd=_0x2998cc['commands']['get']('addCommentThread');return _0x37d385['set']({'label':N(_0x2998cc['locale'],'Comment'),'icon':_0x1797e5}),_0x37d385['bind']('isEnabled')['to'](_0x2199fd,'hasContent'),this['listenTo'](_0x37d385,'execute',()=>{_0x2199fd['execute']();}),_0x37d385;}}class i extends _0xeeaaab{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5e404f){super(_0x5e404f),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x79bd6b,_0x320479,_0x4f98c2)=>{_0x4f98c2?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4f6e3a,_0x5c7483]of this['editor']['commands'])_0x5c7483['affectsData']&&'addCommentThread'!==_0x4f6e3a&&_0x5c7483['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 _0x234744=this['editor']['editing']['view']['document'];this['listenTo'](_0x234744,'cut',_0x1a23a0=>_0x1a23a0['stop'](),{'priority':'highest'}),this['listenTo'](_0x234744,'clipboardInput',_0x3fbade=>_0x3fbade['stop'](),{'priority':'highest'}),this['listenTo'](_0x234744,'delete',_0x574840=>_0x574840['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x155740,_0xb0ca35]of this['editor']['commands'])_0xb0ca35['affectsData']&&'addCommentThread'!==_0x155740&&_0xb0ca35['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 _0x1756af{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ee156){super(_0x1ee156),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x354d04=this['context']['plugins']['get'](y);this['listenTo'](_0x354d04,'_activateAnnotation',(_0x45f602,_0x3de5e0)=>{for(const _0x37c615 of this['activeUIs']){const _0x144244=this['_uis']['get'](_0x37c615);(0x0,this['uisData']['get'](_0x37c615)['filter'])(_0x3de5e0)&&_0x144244['setActiveAnnotation'](_0x3de5e0);}}),this['listenTo'](_0x354d04,'_deactivateAllAnnotations',()=>{for(const _0x1a1a6b of this['activeUIs']){this['_uis']['get'](_0x1a1a6b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x354d04['_visibleAnnotations'],'add',(_0x12bce1,_0x2f23fb)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2f23fb);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4ac31f){return this['activeUIs']['has'](_0x4ac31f);}['activate'](_0x27d48d,_0x42acb3=this['defaultFilter']){const _0x31cc44=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x27d48d))throw new _0x55af7e('annotationsuis-missing-ui',this,{'uiName':_0x27d48d});this['isActive'](_0x27d48d)&&this['deactivate'](_0x27d48d),this['activeUIs']['add'](_0x27d48d);const _0x543219=new S();v({'source':_0x31cc44['_visibleAnnotations'],'target':_0x543219,'filter':_0x42acb3}),this['uisData']['set'](_0x27d48d,{'collection':_0x543219,'filter':_0x42acb3});const _0x459e51=this['_uis']['get'](_0x27d48d);_0x459e51['attach'](_0x543219),this['listenTo'](_0x459e51,'change:activeAnnotation',(_0x56697d,_0xf4f923,_0x52b18e,_0x1e2683)=>{_0x1e2683&&_0x31cc44['_removeActiveAnnotation'](_0x1e2683),_0x52b18e&&_0x31cc44['_addActiveAnnotation'](_0x52b18e);});}['deactivate'](_0x13610a){if(this['activeUIs']['delete'](_0x13610a),!this['_uis']['has'](_0x13610a))throw new _0x55af7e('annotationsuis-missing-ui',this,{'uiName':_0x13610a});const _0xf725e1=this['_uis']['get'](_0x13610a);_0xf725e1['detach'](),this['stopListening'](_0xf725e1),this['uisData']['get'](_0x13610a)['collection']['destroy'](),this['uisData']['delete'](_0x13610a);}['switchTo'](_0x5cfa7f){if(!this['_uis']['has'](_0x5cfa7f))throw new _0x55af7e('annotationsuis-missing-ui',this,{'uiName':_0x5cfa7f});const _0x4a4d73=this['context']['plugins']['get'](y),_0x26cd3b=Array['from'](_0x4a4d73['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5cfa7f);const _0xeab352=this['_uis']['get'](_0x5cfa7f);_0xeab352['setActiveAnnotation'](_0x26cd3b),_0xeab352['_setSelectedAnnotations']&&_0x26cd3b&&_0xeab352['_setSelectedAnnotations']([_0x26cd3b]);}['deactivateAll'](){for(const _0x3c2c72 of this['activeUIs'])this['deactivate'](_0x3c2c72);}['register'](_0x353566,_0x22e389){if(this['_uis']['has'](_0x353566))throw new _0x55af7e('annotationsuis-register-already-registered');if('function'!=typeof _0x22e389['attach']||'function'!=typeof _0x22e389['detach']||'function'!=typeof _0x22e389['setActiveAnnotation'])throw new _0x55af7e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x353566,_0x22e389);}['refilterAnnotations'](){const _0x56b483=this['context']['plugins']['get'](y)['collection'],_0x1f8a35=new Map(),_0x335fb7=Array['from'](this['activeUIs']);for(const _0x490b82 of this['activeUIs']){const _0x307bbd=this['uisData']['get'](_0x490b82)['collection'];for(const _0x44802e of _0x307bbd)_0x1f8a35['set'](_0x44802e,_0x490b82);}for(const _0x260750 of _0x56b483){const _0x1446f8=_0x1f8a35['get'](_0x260750);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x260750);const _0x1af900=_0x335fb7['find'](_0x11f166=>this['uisData']['get'](_0x11f166)['filter'](_0x260750));_0x1446f8!==_0x1af900&&(_0x1446f8&&this['uisData']['get'](_0x1446f8)['collection']['remove'](_0x260750),_0x1af900&&this['uisData']['get'](_0x1af900)['collection']['add'](_0x260750));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x11960c){const _0xdeb8d7=[];for(const _0x2e9427 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2e9427)['filter'])(_0x11960c)&&_0xdeb8d7['push'](_0x2e9427);}if(_0xdeb8d7['length']>0x1)throw new _0x55af7e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xdeb8d7,'annotationType':_0x11960c['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(_0x33cca4){super(_0x33cca4),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x342e56,_0x1455be)=>_0x342e56+_0x1455be),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x39afa3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x39afa3['to']('isAnimationDisabled',_0x494958=>_0x494958?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x39afa3['to']('top',_0x1a0df3=>Ot(_0x1a0df3))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x45a709=this['element']['clientHeight'];_0x45a709&&(this['height']=_0x45a709);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1756af{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39ccf5){super(_0x39ccf5),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 _0x497d73=this['context']['config']['get']('sidebar.container');_0x497d73&&this['setContainer'](_0x497d73);}['setContainer'](_0x4228c5){if(!g(_0x4228c5))throw new _0x55af7e('sidebar-setcontainer-invalid-element');this['container']=_0x4228c5;}['_attachToContainer']({viewClass:_0x58a1bd='',spaceBetweenItems:_0x173357=0x19}={}){if(!g(this['container']))throw new _0x55af7e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x58a1bd,this['_spaceBetweenItems']=_0x173357;}['rearrange']({removedAnnotation:_0x3634fc,previousAnnotation:_0x5a8072,nextAnnotation:_0x47e7e6}){const _0x5dff1d=this['getSidebarItemView'](_0x3634fc);this['view']['list']['remove'](_0x5dff1d),this['_destroySidebarItemView'](_0x3634fc),_0x5a8072&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5a8072)),_0x47e7e6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x47e7e6)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x9a2231,activatedAnnotation:_0x58c662,disableAnimationOnActivatedAnnotation:_0x38b6ac}){if(this['_activeAnnotation']=_0x58c662,_0x9a2231){_0x9a2231['isActive']=!0x1;const _0xe79417=this['getSidebarItemView'](_0x9a2231);_0xe79417&&_0x38b6ac&&(_0xe79417['isAnimationDisabled']=!0x1);}if(_0x58c662){const _0x5497a4=this['getSidebarItemView'](_0x58c662);_0x5497a4&&(_0x58c662['isActive']=!0x0,_0x38b6ac&&(_0x5497a4['isAnimationDisabled']=!0x0,_0x5497a4['top']+=0x1),this['_alignToTargetRect'](_0x5497a4));}}['_detachFromContainer'](_0x37559d){if(this['view']['element']['remove'](),_0x37559d){for(const _0x52da46 of _0x37559d)this['_destroySidebarItemView'](_0x52da46);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x280106,_0x3fc45a){_0x3fc45a||(_0x3fc45a=_0x280106['view']);const _0x453d93=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x453d93,_0x280106),this['_annotationToSidebarItemView']['set'](_0x280106,_0x453d93),_0x453d93['content']['add'](_0x3fc45a),this['listenTo'](_0x280106['view'],'change:targetRect',(_0x4d4206,_0xaeddf7,_0x4306cf)=>{const _0x36381c=this['_getTargetTop'](_0x280106,_0x4306cf);_0x453d93['_targetTop']!=_0x36381c&&(_0x453d93['_targetTop']=_0x36381c,this['_setItemTop'](_0x453d93,_0x36381c));}),this['listenTo'](_0x453d93,'change:top',()=>{this['_recalculate'](_0x453d93,'top');}),this['listenTo'](_0x453d93,'change:bottom',()=>{this['_recalculate'](_0x453d93,'bottom');}),this['_alignToTargetRect'](_0x453d93);const _0x125dae=this['_getItemBefore'](_0x453d93);if(_0x125dae)this['_alignAfterItem'](_0x125dae,_0x453d93)||this['_alignToTargetRect'](_0x453d93);else this['_alignToTargetRect'](_0x453d93);return this['_updateLastItem'](),this['view']['list']['add'](_0x453d93),_0x453d93;}['_alignForTopChange'](_0x230b25){if(!_0x230b25['content']['length'])return;const _0x4c3450=this['_getItemBefore'](_0x230b25);if(!_0x4c3450)return;const _0x3cf8ae=this['_sidebarItemViewToAnnotation']['get'](_0x4c3450),_0x7f0d90=this['_activeAnnotation'];_0x7f0d90&&_0x7f0d90===_0x3cf8ae?this['_alignAfterItem'](_0x4c3450,_0x230b25):this['_alignBeforeItem'](_0x230b25,_0x4c3450);}['_alignForBottomChange'](_0x13a8b3){if(!_0x13a8b3['content']['length'])return;const _0x26ad81=this['_getItemAfter'](_0x13a8b3);if(!_0x26ad81)return;const _0x314578=this['_sidebarItemViewToAnnotation']['get'](_0x26ad81),_0x321fae=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4442e4=this['_activeAnnotation'];_0x4442e4&&_0x4442e4===_0x314578&&_0x321fae?(this['_alignBeforeItem'](_0x26ad81,_0x13a8b3),this['_alignAfterItem'](_0x13a8b3,_0x26ad81)):_0x4442e4&&_0x4442e4===_0x314578?this['_alignBeforeItem'](_0x26ad81,_0x13a8b3):this['_alignAfterItem'](_0x13a8b3,_0x26ad81);}['_recalculate'](_0x262288,_0x105b4f){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xc574f5,changedProp:_0x3615bb}of this['_recalculateBuffer'])'top'===_0x3615bb?this['_alignForTopChange'](_0xc574f5):this['_alignForBottomChange'](_0xc574f5);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x262288,'changedProp':_0x105b4f});}['getSidebarItemView'](_0x200a3d){return this['_annotationToSidebarItemView']['get'](_0x200a3d);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5534ac){const _0x52cf0f=this['getSidebarItemView'](_0x5534ac);this['stopListening'](_0x52cf0f),this['stopListening'](_0x5534ac['view']),_0x52cf0f['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5534ac),this['_sidebarItemViewToAnnotation']['delete'](_0x52cf0f);}['_createSidebarView'](){const _0x4419f4=new H(this['context']['locale']);return _0x4419f4['render'](),this['on']('change:_lastItem',(_0x1e3e1c,_0x1c8d8d,_0x3af26c,_0x872ce9)=>{_0x872ce9&&_0x4419f4['unbind']('minHeight'),_0x3af26c?_0x4419f4['bind']('minHeight')['to'](_0x3af26c,'bottom'):_0x4419f4['minHeight']=null;}),_0x4419f4;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x55a457){const _0x5ed6fd=this['_sidebarItemViewToAnnotation']['get'](_0x55a457),_0x2543b5=_0x5ed6fd&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5ed6fd)-0x1);return _0x2543b5&&this['getSidebarItemView'](_0x2543b5)||null;}['_getItemAfter'](_0x85f748){const _0x5b9e7e=this['_sidebarItemViewToAnnotation']['get'](_0x85f748),_0x23481c=_0x5b9e7e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5b9e7e)+0x1);return _0x23481c&&this['getSidebarItemView'](_0x23481c)||null;}['_alignBeforeItem'](_0x5b6842,_0x2e2ac3){_0x5b6842['updateHeight']();const _0x4fafc0=G(_0x2e2ac3['bottom']+this['_spaceBetweenItems'],_0x5b6842['top']);return!!_0x4fafc0&&(this['_setItemTop'](_0x2e2ac3,_0x2e2ac3['top']-_0x4fafc0),!0x0);}['_alignAfterItem'](_0x2e4464,_0x150e0e){_0x2e4464['updateHeight']();const _0x378244=G(_0x2e4464['bottom']+this['_spaceBetweenItems'],_0x150e0e['top']);return!!_0x378244&&(this['_setItemTop'](_0x150e0e,_0x150e0e['top']+_0x378244,!0x1),!0x0);}['_alignToTargetRect'](_0x1ee0ef){const _0x5b4d24=this['_sidebarItemViewToAnnotation']['get'](_0x1ee0ef);if(!_0x5b4d24||!_0x5b4d24['target']||!_0x5b4d24['targetRect'])return;const _0x81e129=this['_getTargetTop'](_0x5b4d24,_0x5b4d24['targetRect']);this['_setItemTop'](_0x1ee0ef,_0x81e129);}['_getTargetTop'](_0x4d7844,_0x2eb8b2){if(null===_0x2eb8b2)return 0x0;if(_0x4d7844['target']instanceof _0x2770d5)return _0x2eb8b2['top'];{const _0x4e4551=new _0x2770d5(this['view']['element'])['top'];return _0x2eb8b2['top']-_0x4e4551;}}['_setItemTop'](_0x443b55,_0x50f583,_0x53e6ca=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x53e6ca&&(_0x50f583=Math['max'](_0x50f583,this['_getMaxAvailableTop'](_0x443b55))),_0x443b55['top']=_0x50f583;}['_getMaxAvailableTop'](_0x320aad){let _0x3d6d14=this['_getItemBefore'](_0x320aad),_0x3c433d=0x0;for(;_0x3d6d14;)_0x3d6d14['updateHeight'](),_0x3c433d+=this['_spaceBetweenItems']+_0x3d6d14['height'],_0x3d6d14=this['_getItemBefore'](_0x3d6d14);return _0x3c433d;}}function G(_0x5df252,_0x37b2cd){return Math['max'](_0x5df252-_0x37b2cd,0x0);}function g(_0x94c5ec){return null!==_0x94c5ec&&'object'==typeof _0x94c5ec&&0x1===_0x94c5ec['nodeType'];}class e extends _0x1756af{['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(_0x70c59c){super(_0x70c59c),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x24de43(),this['_refreshPositioningDebounced']=_0x20001b(()=>{_0x70c59c['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3bf50b=this['context']['plugins']['get'](j),_0x24480a=this['context']['plugins']['get'](z);_0x3bf50b['register']('wideSidebar',this),_0x24480a['container']&&_0x3bf50b['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x6fe44){if(_0x6fe44===this['activeAnnotation'])return;const _0x3a7417=this['context']['plugins']['get'](z);_0x3a7417['_activeAnnotation']=_0x6fe44;const _0xfa4450=this['activeAnnotation'];_0x3a7417['refresh']({'blurredAnnotation':_0xfa4450,'activatedAnnotation':_0x6fe44}),this['activeAnnotation']=_0x6fe44;}['attach'](_0x1a45d4){this['annotations']=_0x1a45d4;const _0x10a5f8=this['context']['plugins']['get'](z);if(_0x10a5f8['_annotations']=_0x1a45d4,this['isAttached'])throw new _0x55af7e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x10a5f8,'set:container',()=>{this['detach'](),this['listenTo'](_0x10a5f8,'change:container',_0x4f472b=>{_0x4f472b['off'](),this['attach'](_0x1a45d4);});}),_0x10a5f8['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0xa99b74=_0x1fdfc8=>{_0x1fdfc8['updateTargetRect'](),_0x10a5f8['addAnnotation'](_0x1fdfc8);};for(const _0x3b7612 of _0x1a45d4)_0xa99b74(_0x3b7612);this['listenTo'](_0x1a45d4,'add',(_0x2e8468,_0xc74631)=>{_0xa99b74(_0xc74631);}),this['listenTo'](_0x1a45d4,'remove',(_0x4d99bb,_0x3ef399,_0x292b7d)=>{_0x10a5f8['rearrange']({'removedAnnotation':_0x3ef399,'previousAnnotation':_0x1a45d4['get'](_0x292b7d-0x1),'nextAnnotation':_0x1a45d4['get'](_0x292b7d+0x1)}),_0x3ef399===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1a45d4,'focus',(_0x452eb5,_0x394402)=>{this['setActiveAnnotation'](_0x394402);}),this['listenTo'](_0x1a45d4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x317d7d=this['context']instanceof _0x3609be?this['context']['editors']:new _0x24de43([this['context']]);for(const _0x317685 of _0x317d7d)this['_integrateWithEditorAnnotations'](_0x317685);this['listenTo'](_0x317d7d,'add',(_0x1df84e,_0x24ffb0)=>{this['listenTo'](_0x24ffb0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x24ffb0);});}),this['listenTo'](_0x317d7d,'remove',(_0x958ec7,_0x2bde9b)=>{_0x2bde9b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2bde9b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x55af7e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x131ed3=this['context']['plugins']['get'](z);_0x131ed3['_detachFromContainer'](this['annotations']),this['stopListening'](_0x131ed3),this['stopListening'](this['annotations']),this['context']instanceof _0x3609be&&this['stopListening'](this['context']['editors']);for(const _0x5dada8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5dada8);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2a89d9){if(!_0x2a89d9['plugins']['has']('EditorAnnotations'))return;const _0x18b4a3=_0x2a89d9['plugins']['get']('EditorAnnotations'),_0x515df2=()=>{const _0x178b6a=_0x18b4a3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x178b6a[0x0]||null);};this['listenTo'](_0x18b4a3,'refresh',_0x515df2),this['listenTo'](_0x18b4a3,'blur',(_0x28ade0,{isAnnotationTracked:_0x4d8db1})=>{this['activeAnnotation']&&_0x4d8db1(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x18b4a3,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x21011e=>{_0x18b4a3['hasDomSelection']()&&(_0x515df2(),_0x21011e['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x18b4a3);}['_destroyEditorAnnotationsIntegration'](_0x45cc44){this['stopListening'](_0x45cc44),this['_editorAnnotations']['remove'](_0x45cc44);}}class C extends _0x1db6f3{['counterView'];constructor(_0x2ecdc2){super(_0x2ecdc2);const _0x5b70ce=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5a263b,_0x130001)=>_0x5a263b?'...':_0x130001['toString']()),this['set']('annotationType',''),this['icon']=_0x1797e5,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5b70ce['to']('annotationType',_0x5d8406=>'ck-annotation-counter__badge--'+_0x5d8406),_0x5b70ce['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5b70ce['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1756af{['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(_0x4e6ed1){super(_0x4e6ed1),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3faab5())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x24de43(),this['_refreshPositioningDebounced']=_0x20001b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x9bd70f(this['context']['locale']),this['balloonPanelView']=new _0x580a5d(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1e12b3){this['annotations']=_0x1e12b3;const _0x6962e7=this['context']['plugins']['get'](z),_0x5327c1=this['balloonPanelView'];if(_0x6962e7['_annotations']=_0x1e12b3,this['isAttached'])throw new _0x55af7e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x6962e7,'set:container',()=>{this['detach'](),this['listenTo'](_0x6962e7,'change:container',_0x226eac=>{_0x226eac['off'](),this['attach'](_0x1e12b3);});}),_0x6962e7['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x15384d=_0xcff3f6=>{const _0x14f4e4=new C(this['context']['locale']);_0x6962e7['addAnnotation'](_0xcff3f6,_0x14f4e4),this['_annotationToNarrowView']['set'](_0xcff3f6,_0x14f4e4),_0x14f4e4['bind']('isDirty','annotationType','number')['to'](_0xcff3f6['view'],'isDirty','type','length'),_0x14f4e4['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5327c1['content']['first']!==_0xcff3f6['view']?(this['_showBalloon'](_0xcff3f6),_0xcff3f6['view']['element']['focus'](),this['setActiveAnnotation'](_0xcff3f6)):this['setActiveAnnotation'](null);});};for(const _0x458454 of _0x1e12b3)_0x15384d(_0x458454);this['listenTo'](_0x1e12b3,'add',(_0xfdfaa5,_0x45b402)=>{_0x15384d(_0x45b402);}),this['listenTo'](_0x1e12b3,'remove',(_0x5f56d2,_0x5b7de4,_0x5cd2e8)=>{this['_annotationToNarrowView']['get'](_0x5b7de4)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5b7de4),_0x6962e7['rearrange']({'removedAnnotation':_0x5b7de4,'previousAnnotation':_0x1e12b3['get'](_0x5cd2e8-0x1),'nextAnnotation':_0x1e12b3['get'](_0x5cd2e8+0x1)}),_0x5b7de4===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1e12b3,'focus',(_0x58be5d,_0x1d17f6)=>{this['setActiveAnnotation'](_0x1d17f6);}),this['listenTo'](_0x1e12b3,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x12247e,_0x365b57)=>{_0x365b57['keyCode']===_0xdebc38['esc']&&_0x5327c1['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5327c1['content']['first']),this['_hideBalloon'](),_0x365b57['stopPropagation'](),_0x365b57['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x105cf7,_0x38460a)=>{const _0x38a970=_0x38460a['target'];_0x5327c1['isVisible']&&_0x5327c1['element']['contains'](_0x38a970)||_0x6962e7['view']['element']['contains'](_0x38a970)||_0x105cf7['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x47fce9=>_0x47fce9['contains'](_0x38a970))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5e38c7=this['context']instanceof _0x3609be?this['context']['editors']:new _0x24de43([this['context']]);for(const _0x106fdd of _0x5e38c7)this['_integrateWithEditorAnnotations'](_0x106fdd);this['listenTo'](_0x5e38c7,'add',(_0x473df0,_0x612654)=>{this['listenTo'](_0x612654,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x612654);});}),this['listenTo'](_0x5e38c7,'remove',(_0x1b7b07,_0x59a580)=>{_0x59a580['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x59a580['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x39e7d7){if(_0x39e7d7===this['activeAnnotation'])return;const _0x3c2a37=this['context']['plugins']['get'](z);if(_0x3c2a37['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x39e7d7,'disableAnimationOnActivatedAnnotation':!0x0}),_0x39e7d7)_0x3c2a37['getSidebarItemView'](_0x39e7d7)?this['_showBalloon'](_0x39e7d7):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x39e7d7;}['detach'](){if(!this['isAttached'])throw new _0x55af7e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x333b60=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x38ae8c=>_0x38ae8c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x333b60['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3609be&&this['stopListening'](this['context']['editors']);for(const _0x2c8679 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2c8679);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'](_0x24327a){if(!_0x24327a['plugins']['has']('EditorAnnotations'))return;const _0x52500b=_0x24327a['plugins']['get']('EditorAnnotations'),_0x275802=this['context']['plugins']['get'](z),_0x29dc8e=this['annotations'],_0x4d904b=this['balloonPanelView'],_0x441e7b=()=>{const _0x21c893=_0x52500b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x21c893),this['setActiveAnnotation'](_0x21c893[0x0]||null);};this['listenTo'](_0x52500b,'refresh',_0x441e7b),this['listenTo'](_0x52500b,'blur',(_0x4282f3,{isAnnotationTracked:_0x76c60d})=>{this['activeAnnotation']&&_0x76c60d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x52500b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x29dc8e,'blur',_0x405802=>{_0x52500b['hasDomSelection']()&&_0x405802['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5512c2,_0x3c2654)=>{const _0x273110=_0x3c2654['target'];_0x4d904b['isVisible']&&_0x4d904b['element']['contains'](_0x273110)||_0x275802['view']['element']['contains'](_0x273110)||this['activeAnnotation']&&_0x52500b['hasDomSelection']()&&(_0x441e7b(),_0x5512c2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x52500b);}['_destroyEditorAnnotationsIntegration'](_0x43aa3c){_0x43aa3c&&(this['stopListening'](_0x43aa3c),this['_editorAnnotations']['remove'](_0x43aa3c));}['_setSelectedAnnotations'](_0x3ce406){for(const _0x5673dd of this['_selectedAnnotations'])_0x3ce406['includes'](_0x5673dd)||this['_manuallyClosedAnnotationViews']['delete'](_0x5673dd['view']);this['_selectedAnnotations']=_0x3ce406;}['_refreshPositioning'](){const _0xabd0f2=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xabd0f2['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x59424c){if(this['_manuallyClosedAnnotationViews']['has'](_0x59424c['view']))return;const _0x5a4070=this['balloonPanelView']['content']['first'];_0x5a4070!==_0x59424c['view']?(_0x5a4070&&this['_detachListeners'](_0x5a4070),this['_attachListeners'](_0x59424c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x59424c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x453766=this['balloonPanelView']['content']['first'],_0x4b6975=_0x453766&&this['annotations']['getByView'](_0x453766);if(!_0x4b6975||!this['_annotationToNarrowView']['has'](_0x4b6975))return;const _0xa0d8ab=this['_annotationToNarrowView']['get'](_0x4b6975)['element'],_0x1fc3e2=(function(){const _0x5b46dd=_0x580a5d['defaultPositions'];return[_0x5b46dd['southArrowNorthEast'],_0x5b46dd['northArrowSouthEast'],_0x5b46dd['southArrowNorth'],_0x5b46dd['northArrowSouth'],_0x5b46dd['southArrowNorthWest'],_0x5b46dd['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xa0d8ab,'positions':_0x1fc3e2});}['_hideBalloon'](){const _0x3783f2=this['balloonPanelView'],_0x50d665=_0x3783f2['content']['first'];_0x50d665&&(this['_detachListeners'](_0x50d665),_0x3783f2['unpin'](),_0x3783f2['content']['clear']());}['_attachListeners'](_0x32763d){this['listenTo'](_0x32763d,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x32763d,'Esc',(_0x2cb751,_0x56f01e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x32763d),this['_hideBalloon'](),_0x56f01e();});}['_detachListeners'](_0x516549){this['stopListening'](_0x516549);}}class c extends _0xeeaaab{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x54b6ce,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x172495){super(_0x172495),_0x172495['editing']['view']['addObserver'](_0x1fb595),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x172495['plugins']['get'](_0x54b6ce),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x399563=this['editor']['plugins']['get'](j);_0x399563['context']===this['editor']&&(_0x399563['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x126183,_0x4b8512)=>{const _0x35c8b0=this['_balloon'];if(this['isAttached']&&_0x35c8b0['visibleView']){const _0xdaf4d=this['annotations']['getByView'](_0x35c8b0['visibleView']);_0xdaf4d&&this['_closeAnnotation'](_0xdaf4d),_0x4b8512();}}));}['afterInit'](){const _0xdf20af=this['editor']['plugins']['get'](j);_0xdf20af['context']===this['editor']&&(_0xdf20af['hasActive']()||_0xdf20af['switchTo']('inline'));}['setActiveAnnotation'](_0x212d88){_0x212d88!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x212d88&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x212d88)&&this['_addAnnotationToBalloon'](_0x212d88,!0x0),_0x212d88['isActive']=!0x0),_0x212d88||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x212d88);}['attach'](_0x2fb3d7){this['annotations']=_0x2fb3d7;const _0x22548c=this['editor']['plugins']['get'](j),_0x55b48f=this['_balloon'];if(this['isAttached'])throw new _0x55af7e('inlineannotations-attach-already-attached',this);if(_0x22548c['context']!==this['editor'])throw new _0x55af7e('inlineannotations-not-allowed-with-context',this);const _0x3cd965=this['editor']['plugins']['get'](b);this['listenTo'](_0x3cd965,'refresh',()=>{const _0xee320e=_0x3cd965['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x214d76,_0x415f08;!this['_forceRefresh']&&(_0x214d76=_0xee320e,_0x415f08=this['_selectedAnnotations'],_0x214d76['length']===_0x415f08['length']&&_0x214d76['every'](_0x5b74cf=>_0x415f08['includes'](_0x5b74cf)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xee320e),this['setActiveAnnotation'](_0xee320e[0x0]||null));}),this['listenTo'](_0x3cd965,'blur',(_0x2ffb5e,{isAnnotationTracked:_0x1b5337})=>{this['activeAnnotation']&&_0x1b5337(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2c073e,_0x4fc09b,_0x2747e8)=>{_0x2747e8||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2fb3d7,'remove',(_0x4388bf,_0x24d4bb)=>{this['_removeAnnotationFromBalloon'](_0x24d4bb),_0x24d4bb===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x55b48f,'change:visibleView',(_0x29b071,_0x14031c,_0x17c9e6,_0x123d9d)=>{_0x123d9d&&this['stopListening'](_0x123d9d);const _0x42ea76=_0x2fb3d7['getByView'](_0x17c9e6);_0x17c9e6&&_0x42ea76&&(this['listenTo'](_0x17c9e6,'change:height',()=>{_0x55b48f['updatePosition']();}),this['listenTo'](_0x17c9e6,'Esc',()=>{this['_closeAnnotation'](_0x42ea76),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x42ea76&&this['setActiveAnnotation'](_0x42ea76));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x55b48f['visibleView']&&(_0x2fb3d7['getByView'](_0x55b48f['visibleView'])&&_0x55b48f['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 _0x55af7e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x27abbc of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x27abbc);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2502f6){for(const _0xde2f72 of this['_selectedAnnotations'])_0x2502f6['includes'](_0xde2f72)||this['_manuallyClosed']['delete'](_0xde2f72);for(const _0xdf7d21 of this['annotations'])_0x2502f6['includes'](_0xdf7d21)||this['_removeAnnotationFromBalloon'](_0xdf7d21);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5d3fbd of _0x2502f6)this['_addAnnotationToBalloon'](_0x5d3fbd);}this['_selectedAnnotations']=_0x2502f6;}['_addAnnotationToBalloon'](_0x1111f2,_0x512545=!0x1){this['_manuallyClosed']['has'](_0x1111f2)||(this['_addedAnnotations']['has'](_0x1111f2)||this['_balloon']['hasView'](_0x1111f2['view'])||(this['_addedAnnotations']['add'](_0x1111f2),this['_balloon']['add']({'stackId':_0x1111f2['view']['id'],'view':_0x1111f2['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1111f2)}})),_0x512545&&this['_balloon']['showStack'](_0x1111f2['view']['id']));}['_getBalloonTargetForAnnotation'](_0x561e0f){const _0x2be8b3=_0x561e0f['target'],_0x12b791=this['editor']['editing']['view'],_0x10bf18=_0x12b791['document']['selection']['getFirstRange'](),_0x38fb82=_0x12b791['domConverter']['viewRangeToDom'](_0x10bf18);if(_0x38fb82['collapse'](!0x0),_0x2be8b3){if(_0x2be8b3 instanceof _0x2770d5)return _0x2be8b3;let _0x394d5f=[];for(const _0xff63e3 of _0x2be8b3)_0x394d5f['push'](...F(_0xff63e3['getClientRects']()));_0x394d5f=function(_0x56b292){const _0x4ccb8d=[];let _0x28ae77=_0x56b292[0x0];for(let _0x135017=0x1;_0x135017<_0x56b292['length'];_0x135017++)P(_0x28ae77,_0x56b292[_0x135017])?_0x28ae77['width']+=_0x56b292[_0x135017]['width']:(_0x4ccb8d['push'](_0x28ae77),_0x28ae77=_0x56b292[_0x135017]);return _0x4ccb8d['push'](_0x28ae77),_0x4ccb8d;}(_0x394d5f);const _0x4eee01=_0x38fb82['getBoundingClientRect']();return _0x394d5f['find'](_0x5ceca5=>_0x5ceca5['top']<=_0x4eee01['top']&&_0x5ceca5['bottom']>=_0x4eee01['bottom']&&_0x5ceca5['left']<=_0x4eee01['left']&&_0x5ceca5['right']>=_0x4eee01['right'])||_0x394d5f[0x0];}return _0x561e0f['targetRect']||_0x38fb82;}['_removeAnnotationFromBalloon'](_0x3ee38e){this['_addedAnnotations']['has'](_0x3ee38e)&&this['_balloon']['hasView'](_0x3ee38e['view'])&&(this['_addedAnnotations']['delete'](_0x3ee38e),this['_balloon']['remove'](_0x3ee38e['view']));}['_closeAnnotation'](_0xc038f8){this['_manuallyClosed']['add'](_0xc038f8),this['_removeAnnotationFromBalloon'](_0xc038f8);}}function F(_0x255e52){return Array['from'](_0x255e52)['map'](DOMRect['fromRect']);}function P(_0x10ba29,_0x3f9ece){return _0x10ba29['top']===_0x3f9ece['top']&&_0x10ba29['bottom']===_0x3f9ece['bottom']&&_0x10ba29['right']===_0x3f9ece['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x293dd6,_0x4e336c){super(_0x293dd6),this['set']('isEmpty',!_0x4e336c['length']),this['focusTracker']=new _0x5d97f7(),this['_annotationViews']=_0x4e336c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x3261e3({'focusables':_0x4e336c,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4e336c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4e336c,'remove',(_0x25c828,_0x40d4b2)=>{_0x40d4b2['isActive']&&this['focus'](),_0x4e336c['length']||(this['isEmpty']=!0x0);});const _0x22ff13=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x293dd6,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4e336c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x22ff13['if']('isEmpty','ck-hidden',_0x31c32f=>!_0x31c32f)]},'children':[{'text':N(_0x293dd6,'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 _0x3a0e49 of this['_annotationViews'])this['focusTracker']['add'](_0x3a0e49['element']);this['_annotationViews']['on']('change',(_0x1e754e,{added:_0x4a06f5,removed:_0x5d66e1})=>{for(const _0x4550a7 of _0x4a06f5)this['focusTracker']['add'](_0x4550a7['element']);for(const _0x516f61 of _0x5d66e1)this['focusTracker']['remove'](_0x516f61['element']);});}}class p extends _0x1756af{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x24593d){super(_0x24593d),this['archivedThreads']=new _0x24de43();}['init'](){const _0x119177=this['context'],_0x1bd4fd=_0x119177['plugins']['get'](o),_0x29f4ec=_0x119177['plugins']['get'](y);this['listenTo'](_0x1bd4fd,'addCommentThread',(_0xccb168,{threadId:_0x4aeae4})=>{const _0x4907c4=_0x1bd4fd['getCommentThread'](_0x4aeae4);_0x4907c4['archivedAt']&&this['archivedThreads']['add'](_0x4907c4,this['_calculatePosition'](_0x4907c4['archivedAt'])),this['listenTo'](_0x4907c4,'change:archivedAt',(_0x234d90,_0x5a376c,_0x1026ef)=>{_0x1026ef?this['archivedThreads']['has'](_0x4907c4)||this['archivedThreads']['add'](_0x4907c4,this['_calculatePosition'](_0x4907c4['archivedAt'])):this['archivedThreads']['has'](_0x4907c4)&&this['archivedThreads']['remove'](_0x4907c4);});}),this['listenTo'](_0x1bd4fd,'removeCommentThread',(_0x171ca0,{threadId:_0x3802cd})=>{const _0x1b3563=_0x1bd4fd['getCommentThread'](_0x3802cd);this['stopListening'](_0x1b3563),this['archivedThreads']['has'](_0x1b3563)&&this['archivedThreads']['remove'](_0x1b3563);},{'priority':'highest'}),this['listenTo'](_0x29f4ec['collection'],'focus',(_0x1dedb5,_0x144959)=>{_0x144959['isVisible']||(_0x144959['isActive']=!0x0,_0x29f4ec['activate'](_0x144959));});}['_calculatePosition'](_0x4a25d2){const _0x172d36=[...this['archivedThreads']]['findIndex'](_0xaf3c7c=>_0xaf3c7c['archivedAt']<_0x4a25d2);return _0x172d36>-0x1?_0x172d36:this['archivedThreads']['length'];}}class a extends _0xeeaaab{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x119b5];}constructor(_0x83e22a){super(_0x83e22a),this['annotationViews']=new _0x1f1fea(),this['_pendingThreads']=[];}['init'](){const _0x189407=this['editor'],_0x35d22a=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x189407['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1db6f3,!0x0)),_0x189407['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x41365b=this['_createCommentsArchiveButton'](_0x19b513);return _0x41365b['set']({'role':'menuitemcheckbox'}),_0x41365b;});const _0x46a47e=_0x189407['plugins']['get'](p),_0x109115=_0x189407['plugins']['get']('Annotations'),_0x3c2a1e=_0x189407['plugins']['get']('CommentsRepository');_0x46a47e['archivedThreads']['forEach'](_0x2ba123=>{this['_handleNewThread'](_0x2ba123);}),this['listenTo'](_0x46a47e['archivedThreads'],'add',(_0x532984,_0x5951f2)=>{this['_handleNewThread'](_0x5951f2);}),this['listenTo'](_0x109115['collection'],'add',(_0x56083d,_0x15d383)=>{const _0x2ba2bc=this['_pendingThreads']['find'](_0x530f78=>{const _0x552831=_0x3c2a1e['_threadToController']['get'](_0x530f78);return _0x552831&&_0x15d383['innerView']===_0x552831['view'];});if(_0x2ba2bc){const _0x1bad38=this['_calculatePosition'](_0x2ba2bc['archivedAt']);this['annotationViews']['add'](_0x15d383['view'],_0x1bad38),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2ba2bc),0x1);}}),this['listenTo'](_0x46a47e['archivedThreads'],'remove',(_0x2f3f7b,_0xff1f43)=>{const _0x5f201b=_0x189407['config']['get']('collaboration.channelId');if(!_0x5f201b||_0xff1f43['channelId']===_0x5f201b){if(this['_pendingThreads']['includes'](_0xff1f43))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xff1f43),0x1);else{const _0x28679a=_0x3c2a1e['_threadToController']['get'](_0xff1f43),_0x569306=_0x109115['getByInnerView'](_0x28679a['view']);this['annotationViews']['remove'](_0x569306['view']),this['stopListening'](_0x569306['focusableElements']);}}}),this['listenTo'](_0x109115['collection'],'add',(_0x5482f4,_0x494291)=>{this['listenTo'](_0x494291,'escape',_0x35d22a);}),this['listenTo'](_0x109115['collection'],'remove',(_0x5f46ee,_0x2343b4)=>{this['stopListening'](_0x2343b4,'escape',_0x35d22a);});}['_handleNewThread'](_0x25cd3b){const _0x51078c=this['editor']['plugins']['get']('CommentsRepository'),_0x37fef5=this['editor']['plugins']['get']('Annotations'),_0xbc4760=this['editor']['config']['get']('collaboration.channelId');if(!_0xbc4760||_0x25cd3b['channelId']===_0xbc4760){const _0xf30281=_0x51078c['_threadToController']['get'](_0x25cd3b);if(!_0xf30281)return void this['_pendingThreads']['push'](_0x25cd3b);const _0x164aeb=this['_calculatePosition'](_0x25cd3b['archivedAt']),_0x4c2535=_0x37fef5['getByInnerView'](_0xf30281['view']);_0x4c2535['isVisible']&&_0x37fef5['_visibleAnnotations']['remove'](_0x4c2535),this['annotationViews']['add'](_0x4c2535['view'],_0x164aeb);}}['_calculatePosition'](_0x282b61){const _0x6e0978=this['editor']['config']['get']('collaboration.channelId'),_0x12ef5b=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x3e3717=>_0x3e3717['channelId']===_0x6e0978)['findIndex'](_0x1e22e6=>_0x1e22e6['archivedAt']<_0x282b61);return _0x12ef5b<0x0||_0x12ef5b>this['annotationViews']['length']?this['annotationViews']['length']:_0x12ef5b-0x1;}['_toggleDialog'](){const _0x36dd35=this['editor'],_0x41104f=_0x36dd35['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x36dd35['locale'],this['annotationViews'])),'commentsArchive'===_0x41104f['id']?_0x41104f['hide']():_0x41104f['show']({'id':'commentsArchive','title':N(_0x36dd35['locale'],'COMMENTS_ARCHIVE'),'icon':_0x50ad17,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x51e3c0['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x76a1b0,_0x526c72=!0x1){const _0x4e11f0=this['editor']['locale'],_0x2a1548=this['editor']['plugins']['get']('Dialog'),_0xf2b936=new _0x76a1b0(_0x4e11f0);return _0xf2b936['bind']('isEnabled')['to'](this,'isEnabled'),_0xf2b936['bind']('isOn')['to'](_0x2a1548,'id',_0x404beb=>'commentsArchive'===_0x404beb),_0xf2b936['set']({'label':N(_0x4e11f0,'COMMENTS_ARCHIVE'),'icon':_0x50ad17,'isToggleable':!0x0}),_0x526c72&&(_0xf2b936['tooltip']=!0x0),this['listenTo'](_0xf2b936,'execute',()=>this['_toggleDialog']()),_0xf2b936;}['_hideDialogOnAnnotationEscape']=_0x22d99f=>{const _0x16f7a1=_0x22d99f['source'];if(!this['annotationViews']['has'](_0x16f7a1['view']))return;const _0x14b9ce=this['editor']['plugins']['get']('Dialog');_0x14b9ce['isOpen']&&'commentsArchive'===_0x14b9ce['id']&&(_0x14b9ce['hide'](),_0x22d99f['stop']());};}class gi extends _0xeeaaab{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 _0x252910,ContextPlugin as _0xfe7412,PendingActions as lt,Command as _0x134a73,Plugin as _0x8104b3,Context as _0x45e0d7}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1297b8,uid as _0x33127a,KeystrokeHandler as jt,FocusTracker as _0x5ead02,diff as _0x2db00b,Collection as _0x4d4ef2,Rect as _0x57fdd2,CKEditorError as _0xd3f428,first as _0x79f2a3,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x39efeb,keyCodes as _0x226af2}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x38a0c1,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x3d30db,trimHtml as _0x1fec04,LateFocusDropdownButtonView as _0x3b8357,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x158e83}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x5e0d3b}from'es-toolkit/compat';import{IconUndo as _0x4ffe10,IconCheck as _0x44135a,IconPencil as _0x502d67,IconRemoveComment as _0x590966,IconThreeVerticalDots as _0x495b61,IconAddComment as _0x4a5b76,IconCommentsArchive as _0x1d3cb7}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x76289f,ButtonView as _0x8118da,ViewCollection as _0x6ba4d4,createDropdown as _0x38aa48,ListView as _0x3dee90,focusChildOnDropdownOpen as _0x395c0c,ListItemView as _0x21ad6e,MenuBarMenuListItemButtonView as _0x5c9447,BodyCollection as _0x3051f9,BalloonPanelView as _0x175f2a,ContextualBalloon as _0x22e13d,Dialog as _0x24c213,DialogViewPosition as _0x3768f4}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x127348}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 _0x5c1e03}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x2a96ee}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1297b8(){['model'];['view'];constructor(_0x490a15,_0x2e3388){super(),this['model']=_0x490a15,this['model']['_isAttached']=!0x0,this['view']=_0x2e3388,this['listenTo'](_0x2e3388,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x2e3388,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x2e3388,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x2e3388,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x2e3388,'addComment',(_0x228c65,_0x5c4b72)=>this['addComment'](_0x5c4b72)),this['listenTo'](_0x2e3388,'updateComment',(_0x45c43a,_0x55e5f,_0x5725ad)=>this['updateComment'](_0x55e5f,_0x5725ad)),this['listenTo'](_0x2e3388,'removeComment',(_0x5c278b,_0x185a13)=>this['removeComment'](_0x185a13));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x5c729b){this['model']['addComment']({'content':_0x5c729b,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3133b0,_0x17fba6){this['model']['getComment'](_0x3133b0)['update']({'content':_0x17fba6});}['removeComment'](_0x2e01f1){this['model']['getComment'](_0x2e01f1)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x2d37b2,_0x61719c,_0x32574d){const t=_0x2d37b2['t'];switch(_0x61719c){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'},_0x32574d);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'},_0x32574d);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'},_0x32574d);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'},_0x32574d);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x32574d);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'},_0x32574d);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'},_0x32574d);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'},_0x32574d);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(_0x5b53d6,_0xfcf200){super(_0x5b53d6);const _0x4b87ad=_0x33127a();this['main']=this['createCollection'](),this['editable']=new $t(_0x5b53d6,_0xfcf200,void 0x0,{'label':()=>N(_0x5b53d6,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x5b53d6['uiLanguageDirection'],'lang':_0x5b53d6['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x4b87ad},'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(_0x3e3da4){super(_0x3e3da4),this['view']=new Vt(_0x3e3da4['locale'],_0x3e3da4['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x5874ba=this['editor']['editing']['view'],_0x53feee=this['view']['editable'],_0x482943=_0x5874ba['document']['getRoot']();_0x53feee['name']=_0x482943['rootName'],this['view']['render']();const _0x459171=_0x53feee['element'];this['setEditableElement'](_0x53feee['name'],_0x459171),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5874ba['attachDomRoot'](_0x459171),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1297b8(_0x252910){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x585595={}){function _0x569796(_0x524c3e){return _0x524c3e['map'](_0x56c8bd=>String['fromCharCode'](_0x56c8bd))['join']('');}(_0x585595=Object['assign']({},_0x585595))['plugins']||(_0x585595['plugins']=Rt['defaultPlugins']),super(_0x585595),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[_0x569796([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x569796([0x76,0x69,0x65,0x77])][_0x569796([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x569796([0x61,0x75,0x74,0x6f]),this[_0x569796([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x569796([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x569796([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x569796([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x569796([0x6f,0x6b])});}['create'](){const _0x3a69e7=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3a69e7))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5407b2=>{const _0x58da82=this['model']['document']['getRoot'](),_0x5edc5e=_0x58da82&&_0x58da82['getChild'](_0x58da82['childCount']-0x1);_0x5407b2['setSelection'](_0x5edc5e,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x23c555=this['editing']['view'],_0x31151f=_0x23c555['document']['getRoot'](),_0x17f7f5=_0x31151f['getChild'](0x0);_0x31151f['childCount']>0x1||!_0x17f7f5||'p'!=_0x17f7f5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x23c555,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x17f7f5['placeholder']=this['placeholder']),St({'view':_0x23c555,'element':_0x17f7f5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x17f7f5);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x323e11,_0x4abccf={}){super(_0x323e11),this['editor']=null,this['_editorConfig']=_0x4abccf,this['set']('value',_0x4abccf['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x323e11,'Reply...')),this['set']('submitLabel',N(_0x323e11,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5ead02(),this['focusCycler']=new _0x76289f({'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',(_0x3e7260,_0xa67adc)=>{this['cancelButtonView']['fire']('execute'),_0xa67adc();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2879cb,_0x3520f7)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3520f7());}),this['on']('submit',(_0x1f5cc3,_0x53d306)=>{_0x53d306['length']>0xfde8?(alert(N(_0x323e11,'TOO_LONG_COMMENT_ALERT',[_0x53d306['length'],0xfde8])),_0x1f5cc3['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 _0x2eba06=this['editor'];this['element']['insertBefore'](_0x2eba06['ui']['element'],this['element']['firstChild']),_0x2eba06['model']['document']['on']('change',()=>this['value']=_0x2eba06['getData']()),_0x2eba06['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2eba06['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x49cbc9){-0x1===_0x49cbc9?(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:_0x51a042}=this,_0x3ddaf7=new _0x8118da(_0x51a042);return _0x3ddaf7['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3ddaf7['withText']=!0x0,_0x3ddaf7['bind']('label')['to'](this,'submitLabel'),_0x3ddaf7['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3ddaf7['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1ca6d9,_0x411410)=>!_0x411410&&!!_0x1ca6d9['trim']()),_0x3ddaf7;}['_createCancelButton'](){const {locale:_0x24778d}=this,_0x393bbc=new _0x8118da(_0x24778d);return _0x393bbc['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x393bbc['label']=N(_0x24778d,'Cancel'),_0x393bbc['withText']=!0x0,_0x393bbc['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x393bbc;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3cfe6a=>{this['focusTracker']['add'](_0x3cfe6a['element']);}),this['focusables']['on']('change',(_0x2a9b33,_0x551666)=>{for(const _0x291871 of Array['from'](_0x551666['added'])['reverse']())this['focusTracker']['add'](_0x291871['element']);});}}class ie extends kt{constructor(_0x4f2220,_0x5f23be,_0x1b581d){super(_0x4f2220),this['commentInputView']=new os(_0x4f2220,_0x1b581d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x793b03,_0x14cb35)=>_0x793b03||!!_0x14cb35),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 _0x38a0c1(_0x4f2220,_0x5f23be),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'](_0x2a3c16){this['commentInputView']['focus'](_0x2a3c16);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xc7bf1a,_0x50e054)=>{const {submitButtonView:_0x19c144,cancelButtonView:_0x1bf23f,editor:_0x457981}=this['commentInputView'];[_0x19c144['element'],_0x1bf23f['element'],_0x457981?_0x457981['editing']['view']['getDomRoot']():null]['filter'](_0x474228=>_0x474228)['some'](_0x15e46a=>_0x15e46a['contains'](_0x50e054['target']))||(this['focus'](),_0x50e054['preventDefault']());});}}class rs extends kt{constructor(_0x2be711){super(_0x2be711);const _0x214225=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x214225['to']('count',_0xfe9641=>N(_0x2be711,'NUMBER_OF_COMMENTS',_0xfe9641))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5acefe,_0x581bbe,_0x2a20df){super(_0x5acefe);const _0x3b4d48=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x581bbe['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x581bbe,this['_config']=_0x2a20df,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5ead02(),this['keystrokes']=new jt(),this['focusCycler']=new _0x76289f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x23dd88=>this['commentViews']['map'](_0x4fa09b=>_0x4fa09b['element'])['includes'](_0x23dd88['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5acefe),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4dbb94=>_0x4dbb94-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2332b1 of _0x581bbe['comments'])this['_handleNewCommentModel'](_0x2332b1);this['_handleInfoComment'](),this['listenTo'](_0x581bbe['comments'],'add',(_0x586efe,_0x599b3e)=>{const _0x5ccf53=this['_calculatePosition'](_0x599b3e);this['length']++,this['_handleNewCommentModel'](_0x599b3e,_0x5ccf53),this['refreshVisibleViews']();}),this['listenTo'](_0x581bbe['comments'],'remove',(_0x2bffde,_0xae65fc)=>{this['length']--,this['_handleRemoveCommentModel'](_0xae65fc),this['refreshVisibleViews']();}),this['listenTo'](_0x581bbe,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x581bbe,'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',_0x3b4d48['if']('length','ck-hidden',_0x2369b9=>!_0x2369b9)],'aria-label':N(_0x5acefe,'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'](_0x33d5b1){-0x1===_0x33d5b1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x5af83c of this['commentViews'])_0x5af83c['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x35c63,_0x28a1a3){const _0x3a266d=new this['_config']['CommentView'](this['locale'],_0x35c63,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3a266d['viewUid']=_0x35c63['id'],_0x3a266d['delegate']('removeComment')['to'](this),_0x3a266d['delegate']('updateComment')['to'](this),_0x3a266d['delegate']('resolveCommentThread')['to'](this),_0x3a266d['delegate']('editorReady')['to'](this),_0x3a266d['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3a266d,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3a266d,_0x28a1a3);}['_calculatePosition'](_0x404bb0){const _0x3e2ce5=this['_model']['_findOptimalIndex'](_0x404bb0);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x404bb0['authoredAt']?_0x3e2ce5-0x1:_0x3e2ce5:_0x3e2ce5-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xaef80f={'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'],_0xaef80f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xaef80f));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1da7ad){const _0x4521aa=this['commentViews']['remove'](_0x1da7ad['id']);this['stopListening'](_0x4521aa),_0x4521aa['isEditMode']&&this['_updateHasDirtyComment'](),_0x4521aa['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x48ece5=>_0x48ece5['isEditMode']);}['_rearrangeCollapse'](){const _0x4f077a=function(_0x1cc7b7){const _0xaca55e=new _0x4d4ef2();for(const _0x351b6f of _0x1cc7b7)_0xaca55e['add'](_0x351b6f);return _0xaca55e;}(this['commentViews']),_0x4c2fd0=this['_collapsedCommentsView']['count'];for(let _0x25ae82=0x1;_0x25ae82<=_0x4c2fd0;_0x25ae82++)_0x4f077a['remove'](0x1);for(const _0xbd2e99 of _0x4f077a)_0xbd2e99['collapse']();_0x4c2fd0>0x0&&_0x4f077a['add'](this['_collapsedCommentsView'],0x1),ns(_0x2db00b(Array['from'](this['visibleViews']),Array['from'](_0x4f077a)),this['visibleViews'],_0x4f077a);}['_rearrangeExpand'](){ns(_0x2db00b(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1b5ac4 of this['visibleViews'])_0x1b5ac4['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2b10aa=>{this['focusTracker']['add'](_0x2b10aa['element']),this['keystrokes']['listenTo'](_0x2b10aa['element']);}),this['commentViews']['on']('change',(_0x303d71,_0x587750)=>{for(const _0x1b5c99 of _0x587750['removed'])this['focusTracker']['remove'](_0x1b5c99['element']),this['keystrokes']['stopListening'](_0x1b5c99['element']);for(const _0x440601 of Array['from'](_0x587750['added'])['reverse']())this['focusTracker']['add'](_0x440601['element']),this['keystrokes']['listenTo'](_0x440601['element']);});}}function ns(_0x3666bb,_0x4b49eb,_0x21c7e0){let _0x36cd71=0x0;for(const _0x18362b of _0x3666bb)switch(_0x18362b){case'insert':_0x4b49eb['add'](_0x21c7e0['get'](_0x36cd71),_0x36cd71),_0x36cd71++;break;case'delete':_0x4b49eb['remove'](_0x36cd71);break;case'equal':_0x36cd71++;}}class oe extends kt{constructor(_0x635ba3){super(_0x635ba3);const _0x1c9128=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1c9128['to']('contextValue',_0x424f60=>N(_0x635ba3,'THREAD_CONTEXT_LABEL',_0x424f60)),'tabindex':-0x1},'children':[{'text':_0x1c9128['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x26b159,_0x5db202){super(_0x26b159);const _0x364fe6=this['bindTemplate'];this['_model']=_0x5db202,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5ead02(),this['keystrokes']=new jt(),this['focusCycler']=new _0x76289f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4df7f9=>!!_0x4df7f9),this['bind']('contextValue')['to'](this['_model'],'context',_0x4aacca=>_0x4aacca&&_0x4aacca['value']?this['_trimContextValue'](_0x4aacca['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',_0x364fe6['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 _0x11ee20=new _0x8118da(this['locale']);return _0x11ee20['label']=N(this['locale'],'Reopen'),_0x11ee20['tooltip']=N(this['locale'],'Reopen'),_0x11ee20['icon']=_0x4ffe10,_0x11ee20['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x426de4=>!_0x426de4),_0x11ee20['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x269f75,_0x84a77c)=>_0x269f75&&_0x84a77c),_0x11ee20['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x11ee20;}['_trimContextValue'](_0x5cee1){if(_0x5cee1['length']<0x96)return _0x5cee1;const _0x3391ae=_0x5cee1['lastIndexOf']('\x20',0x93);return _0x5cee1['substring'](0x0,_0x3391ae>-0x1?_0x3391ae:0x93)+'...';}['_attachContextActions'](){const _0x451365=this['element']['querySelector']('.ck-context'),_0x49ecc3=_0x451365['querySelector']('.ck-context__value');this['listenTo'](_0x451365,'mouseenter',()=>{_0x49ecc3['offsetWidth']<_0x49ecc3['scrollWidth']&&_0x451365['classList']['add']('overlay');}),this['listenTo'](_0x451365,'mouseleave',()=>{_0x451365['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x32c97b of this['focusables'])this['focusTracker']['add'](_0x32c97b['element']),this['keystrokes']['listenTo'](_0x32c97b['element']);}['_createContextView'](){const _0x13335a=new oe(this['locale']);return _0x13335a['bind']('contextValue')['to'](this),_0x13335a;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1b89b5,_0x2637d6,_0x107f72,_0x39db8a){super(_0x1b89b5),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2637d6,this['_localUser']=_0x107f72,this['_config']=_0x39db8a,this['commentThreadHeaderView']=new Yt(_0x1b89b5,_0x2637d6),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x1b89b5,N(_0x1b89b5,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1b89b5,_0x2637d6,Object['assign']({'CommentView':this['_config']['CommentView']},_0x39db8a)),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',(_0x37afc0,_0x222a3c)=>_0x37afc0||!!_0x222a3c),this['bind']('isUnlinked')['to'](_0x2637d6,'unlinkedAt',_0xd6ed43=>!!_0xd6ed43),this['bind']('ariaLabel')['to'](this,'length',_0x43987b=>{const _0x28bb6f=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x43987b,_0x28bb6f]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5ead02(),this['keystrokes']=new jt(),this['focusCycler']=new _0x76289f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5322d8=>_0x5322d8['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 _0x56408f=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1aa863=_0x56408f['commentInputView'];return _0x56408f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1aa863,'value',(_0x18ab3c,_0x164835,_0x479c49,_0x3a161e,_0x1ff50e)=>!!_0x1ff50e||!!_0x3a161e&&_0x479c49&&!_0x164835||_0x18ab3c&&_0x479c49&&!_0x164835),_0x1aa863['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x10dc39,_0x417586,_0x3cd035)=>{let _0x9ae69b;return _0x9ae69b=_0x3cd035&&_0x417586?'Reply\x20to\x20reopen\x20discussion...':_0x10dc39?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x9ae69b);}),_0x1aa863['bind']('submitLabel')['to'](this,'length',_0x34ebc6=>N(this['locale'],_0x34ebc6?'Reply':'Comment')),_0x1aa863['on']('submit',(_0x4ae7cd,_0xf37bf7)=>{this['fire']('addComment',_0xf37bf7),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1aa863['on']('cancel',()=>{this['focus']();}),_0x1aa863['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1aa863['on']('cancel',_0x20bc35=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x20bc35['stop']());}),this['on']('change:isActive',(_0x506df0,_0xf6fbf,_0x3c321c)=>{_0x3c321c||this['length']||_0x1aa863['value']||this['fire']('removeCommentThread');}),_0x56408f;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x34f233,_0x292249,_0x1e568a,_0x17522b){super(_0x34f233,_0x292249,_0x1e568a,_0x17522b),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x34f233,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x6afc11,_0x20e5bd,_0x454fad)=>{_0x454fad||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x7e4d96,_0x19047d,_0x2591f9)=>{_0x2591f9&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4f8d44=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4f8d44['if']('isActive','ck-thread--active'),_0x4f8d44['if']('isUnlinked','ck-thread--unlinked'),_0x4f8d44['if']('isConfirm','ck-thread--remove-confirmation'),_0x4f8d44['to']('actionIndicator',_0x4cc106=>_0x4cc106?'ck-thread--'+_0x4cc106:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4f8d44['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 _0x588280 of this['commentsListView']['commentViews'])_0x588280['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x37a765}=this,_0x5c882b=this['commentsListView']['commentViews']['get'](0x0);_0x5c882b===this['_boundFirstCommentView']||_0x5c882b['isSystemComment']||(this['_boundFirstCommentView']=_0x5c882b,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x5c882b,'actionIndicator',_0x4ecb66=>'remove'===_0x4ecb66?'remove':null),_0x5c882b['placeholder']=N(_0x37a765,'Write\x20a\x20comment...'),_0x5c882b['removeButton']['on']('execute',_0x5dbf1d=>{_0x5dbf1d['stop'](),this['showConfirm'](N(_0x37a765,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x5c882b['focus']();}),_0x5c882b['actionBar']['add'](this['resolveButton'],0x0),_0x5c882b['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2518bb=new _0x3d30db(this['locale']);return _0x2518bb['label']=N(this['locale'],'Resolve'),_0x2518bb['tooltip']=N(this['locale'],'Resolve'),_0x2518bb['icon']=_0x44135a,_0x2518bb['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2518bb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3c3381=>!_0x3c3381),_0x2518bb['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x315d12,_0x1693d0)=>_0x315d12&&!_0x1693d0),_0x2518bb['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2518bb;}['_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(_0x2cc45f){super(_0x2cc45f),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x45a0d8,_0x40dd2e,_0x3f0dd1)=>{this['element']['innerHTML']=_0x3f0dd1;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x3e511e,_0x153ac7,_0x5833fa){super(_0x3e511e),this['_model']=_0x153ac7,this['_config']=_0x5833fa,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x153ac7,'content',_0x153ac7,'authoredAt',(_0x83695a,_0x349b76)=>N(_0x3e511e,'COMMENT_ARIA_LABEL',[_0x153ac7['author']['name'],_0x5833fa['formatDateTime'](_0x349b76),new DOMParser()['parseFromString'](_0x83695a,'text/html')['body']['textContent'],_0x153ac7['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x3e511e,N(_0x3e511e,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x6ba4d4(),this['focusTracker']=new _0x5ead02(),this['keystrokes']=new jt(),this['focusCycler']=new _0x76289f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xf3d53=>_0xf3d53['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 _0x280160=new es(this['locale']);return _0x280160['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x14d5b1,_0x1b740e)=>_0x1b740e?_0x1fec04(_0x14d5b1,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x14d5b1),_0x280160;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x3273fd=new os(this['locale'],this['_config']['editorConfig']);return _0x3273fd['value']=this['_model']['content'],_0x3273fd['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3273fd['submitLabel']=N(this['locale'],'Save'),_0x3273fd['on']('submit',(_0x1c13b5,_0x4561be)=>{this['fire']('updateComment',this['_model']['id'],_0x4561be),this['switchToDisplayMode'](),this['focus']();}),_0x3273fd['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x3273fd['once']('editorReady',()=>{_0x3273fd['focus']();}),_0x3273fd['createEditor'](),_0x3273fd['delegate']('editorReady')['to'](this),_0x3273fd['delegate']('editorDestroyed')['to'](this),_0x3273fd;}['_setupKeyboardNavigation'](){const _0x3dd2ac=this['element'];this['keystrokes']['listenTo'](_0x3dd2ac);for(const _0x2f2dd3 of this['focusables'])this['focusTracker']['add'](_0x2f2dd3['element']),this['keystrokes']['listenTo'](_0x2f2dd3['element']);this['focusables']['on']('change',(_0x1a77f2,_0x3a1789)=>{for(const _0x2ce456 of _0x3a1789['removed'])this['focusTracker']['remove'](_0x2ce456['element']),this['keystrokes']['stopListening'](_0x2ce456['element']);for(const _0x2ae1b8 of _0x3a1789['added'])this['focusTracker']['add'](_0x2ae1b8['element']),this['keystrokes']['listenTo'](_0x2ae1b8['element']);}),this['keystrokes']['set']('enter',(_0x166611,_0x29c24d)=>{_0x3dd2ac===_0x166611['target']&&(this['focusCycler']['focusFirst'](),_0x29c24d());}),this['keystrokes']['set']('esc',(_0x21b57b,_0x2dcbcb)=>{_0x3dd2ac!==_0x21b57b['target']&&(this['focus'](),_0x2dcbcb());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x47e2d6,_0x3ceb20,_0x329758){super(_0x47e2d6,_0x3ceb20,_0x329758),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x47e2d6,'Reply...')),this['bind']('authoredAt')['to'](_0x3ceb20),this['bind']('resolvedAt')['to'](_0x3ceb20),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 _0x38a0c1(_0x47e2d6,_0x3ceb20['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3ceb20,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x32fc9a=this['bindTemplate'],_0x3064b7=[{'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':_0x32fc9a['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x32fc9a['to']('authoredAt',_0x2e96f2=>this['_config']['formatDateTime'](_0x2e96f2))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x32fc9a['if']('isEditMode','ck-comment__actions--hidden'),_0x32fc9a['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']&&_0x3064b7['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x32fc9a['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x32fc9a['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x32fc9a['if']('isEditMode','ck-comment--edit'),_0x32fc9a['if']('isSystemComment','ck-comment--info'),_0x32fc9a['to']('actionIndicator',_0xe8353c=>_0xe8353c?'ck-comment--'+_0xe8353c:'')],'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':_0x3064b7}]}]};}['_createEditButton'](){const _0x5ffefe=new _0x8118da(this['locale']);return _0x5ffefe['label']=N(this['locale'],'Edit'),_0x5ffefe['icon']=_0x502d67,_0x5ffefe['withText']=!0x0,_0x5ffefe['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5ffefe['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x33c14e=>!_0x33c14e),_0x5ffefe['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5ffefe['on']('execute',()=>this['switchToEditMode']()),_0x5ffefe;}['_createRemoveButton'](){const _0xea463=new _0x8118da(this['locale']);return _0xea463['label']=N(this['locale'],'Remove'),_0xea463['icon']=_0x590966,_0xea463['withText']=!0x0,_0xea463['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xea463['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4bb40e=>!_0x4bb40e),_0xea463['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xea463['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xea463;}['_createDropdown'](){const _0x120dae=_0x38aa48(this['locale'],_0x3b8357),_0xaeb39c=_0x120dae['panelView']['children'],_0x51079e=new _0x3dee90(this['locale']),_0x375daf=_0x120dae['bindTemplate'];_0x395c0c(_0x120dae,()=>this['items']['find'](_0x2a5cc0=>_0x2a5cc0['isVisible'])),_0x120dae['extendTemplate']({'attributes':{'class':[_0x375daf['if']('isVisible','ck-hidden',_0x56c3ab=>!_0x56c3ab)]}});const _0x48e17f=(_0x18d625,_0x2ede4f=-0x1)=>{const _0x25ad8d=new _0x21ad6e(this['locale']);_0x25ad8d['children']['add'](_0x18d625);const _0x1d0e50=_0x2ede4f>-0x1?_0x2ede4f:_0x51079e['items']['length'];_0x51079e['items']['add'](_0x25ad8d,_0x1d0e50);const _0x2b44d7=Array['from'](this['items']);_0x120dae['unbind']('isEnabled','isVisible'),_0x120dae['bind']('isEnabled')['toMany'](_0x2b44d7,'isEnabled',(..._0x4265eb)=>_0x4265eb['some'](_0x1aa8f8=>_0x1aa8f8)),_0x120dae['bind']('isVisible')['toMany'](_0x2b44d7,'isVisible',(..._0x3574e2)=>_0x3574e2['some'](_0xd5cb5a=>_0xd5cb5a));};_0x120dae['panelPosition']='sw',_0x120dae['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x495b61});for(const _0x203369 of this['items'])_0x48e17f(_0x203369);return _0xaeb39c['add'](_0x51079e),_0x120dae['listenTo'](this['items'],'add',(_0x242f4b,_0x42d92d,_0x2cffd7)=>{_0x48e17f(_0x42d92d,_0x2cffd7);}),_0x120dae['listenTo'](this['items'],'remove',(_0x1b85f2,_0x19bd65,_0x2f5fb0)=>{_0x51079e['items']['remove'](_0x2f5fb0);}),_0x120dae;}['_attachActions'](_0x2264aa,_0x407dd7){const _0x238aa3=_0x2264aa&&_0x2264aa['element'];_0x238aa3&&(this['listenTo'](_0x238aa3,'mouseenter',()=>this['actionIndicator']=_0x407dd7),this['listenTo'](_0x238aa3,'focus',()=>this['actionIndicator']=_0x407dd7),this['listenTo'](_0x238aa3,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x238aa3,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x2df8a7=super['_createCommentInputView']();return _0x2df8a7['bind']('placeholder')['to'](this),_0x2df8a7;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x4e5123){const _0xdb5dba=Dt(_0x4e5123,0x1e),_0x47c466=new MutationObserver(_0x10b44c=>{for(const _0x339b5a of _0x10b44c)('attributes'==_0x339b5a['type']&&'class'==_0x339b5a['attributeName']||'childList'==_0x339b5a['type']||'characterData'==_0x339b5a['type'])&&_0xdb5dba();});return{'attach'(_0x35cb07){_0x47c466['observe'](_0x35cb07,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x47c466['disconnect'](),_0xdb5dba['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x42bd60,_0x1b76b9){super(_0x42bd60),this['id']=_0x33127a(),this['focusTracker']=new _0x5ead02(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x48595f,_0x1017aa)=>this['fire']('Esc',_0x1017aa)),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'](_0x1b76b9),this['mainView']=_0x1b76b9;const _0x4b1694=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4b1694['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 _0x11d80a=this['element']['clientHeight'];_0x11d80a&&(this['height']=_0x11d80a);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x1297b8(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1e16ef,target:_0x446395,type:_0x474808,isVisible:_0xf09715=!0x0}){super(),this['view']=_0x1e16ef,this['view']['element']||this['view']['render'](),this['_type']=_0x474808,this['_target']=_0x446395,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4d4ef2([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x103c61,_0x5f0993)=>{this['view']['focusTracker']['add'](_0x5f0993);}),this['focusableElements']['on']('remove',(_0x5d6403,_0x185467)=>{this['view']['focusTracker']['remove'](_0x185467);}),this['set']('isVisible',_0xf09715);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2e41a7=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2e41a7),_0x2e41a7;}get['targetRect'](){const _0x2273fa=this['target'];if(null===_0x2273fa)return null;if(_0x2273fa instanceof _0x57fdd2)return _0x2273fa;const _0x5effcc=_0x2273fa['filter'](_0x1186cf=>function(_0x523a03){const _0x554fd3=_0x523a03['offsetParent'];if(_0x554fd3)return!0x0;const _0x57395b=_0x523a03['getClientRects']()['item'](0x0);return!!_0x57395b;}(_0x1186cf));return 0x0===_0x5effcc['length']?null:new _0x57fdd2(_0x5effcc[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2373f2){this['view']['isActive']=_0x2373f2,this['view']['mainView']['isActive']=_0x2373f2;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0xc8a73a){if(!(null===_0xc8a73a||_0xc8a73a instanceof _0x57fdd2||Array['isArray'](_0xc8a73a)&&_0xc8a73a['every'](_0x4cc600=>fi(_0x4cc600))))throw new _0xd3f428('annotation-invalid-target',null,{'target':_0xc8a73a});}['_getNormalizedTarget'](){const _0x4576e7='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x4576e7)?[_0x4576e7]:_0x4576e7;}}function fi(_0x289cd3){return null!==_0x289cd3&&'object'==typeof _0x289cd3&&'nodeType'in _0x289cd3&&0x1===_0x289cd3['nodeType'];}class S extends _0x4d4ef2{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4056bf=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5ead02(),this['_focusTracker']['on']('change:isFocused',(_0x44d9a6,_0x42e78e,_0x16d1bd)=>{_0x16d1bd||this['fire']('blur');});for(const _0x306bd4 of _0x4056bf)this['add'](_0x306bd4);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2b069d){if(this['has'](_0x2b069d))throw new _0xd3f428('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2b069d['innerView'],_0x2b069d),this['_viewToAnnotation']['set'](_0x2b069d['view'],_0x2b069d);for(const _0x46d655 of _0x2b069d['focusableElements'])this['_focusTracker']['add'](_0x46d655);this['listenTo'](_0x2b069d['focusableElements'],'add',(_0x135c27,_0x4fa925)=>{this['_focusTracker']['add'](_0x4fa925);}),this['listenTo'](_0x2b069d['focusableElements'],'remove',(_0x5b60d3,_0x41b2a3)=>{this['_focusTracker']['remove'](_0x41b2a3);}),this['listenTo'](_0x2b069d['view']['focusTracker'],'change:isFocused',(_0xc195a3,_0x5c0cbd,_0xf83093)=>{_0xf83093&&this['fire']('focus',_0x2b069d);}),_0x2b069d['updateTargetRect']();const _0xd244d4=this['_getOrderInContent'](_0x2b069d['view']['targetRect']);return super['add'](_0x2b069d,_0xd244d4);}['remove'](_0x35b2dc){if(!this['has'](_0x35b2dc))throw new _0xd3f428('annotationcollection-not-existing-item',null);this['stopListening'](_0x35b2dc['view']['focusTracker']),this['stopListening'](_0x35b2dc['focusableElements']);for(const _0x428f3d of _0x35b2dc['focusableElements'])this['_focusTracker']['remove'](_0x428f3d);return this['_viewToAnnotation']['delete'](_0x35b2dc['view']),this['_innerViewToAnnotation']['delete'](_0x35b2dc['innerView']),super['remove'](_0x35b2dc);}['getByInnerView'](_0x38e41c){return this['_innerViewToAnnotation']['get'](_0x38e41c);}['getByView'](_0xaab835){return this['_viewToAnnotation']['get'](_0xaab835);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2ca17d of this)_0x2ca17d['updateTargetRect']();this['_sort']();}['_sort'](){const _0x18ed5c=Array['from'](this)['sort']((_0x36636e,_0x3300d5)=>w(_0x36636e['view']['targetRect'],_0x3300d5['view']['targetRect']));for(let _0x52f7fc=_0x18ed5c['length']-0x1;_0x52f7fc>0x0;_0x52f7fc--){const _0x1df019=_0x18ed5c[_0x52f7fc];_0x52f7fc!==this['getIndex'](_0x1df019)&&(this['remove'](_0x1df019),this['add'](_0x1df019));}}['_getOrderInContent'](_0x42249c){let _0xae5d93=0x0;if(!_0x42249c)return this['length'];for(const _0x2d58c5 of this){const _0x2b2a18=_0x2d58c5['view']['targetRect'];if(_0x2b2a18){if(w(_0x42249c,_0x2b2a18)<0x0)return _0xae5d93;_0xae5d93++;}}return _0xae5d93;}}function v({source:_0x1c53b1,target:_0xccb3d2,filter:_0x4db1e7}){for(const _0x34abc4 of _0x1c53b1)_0x4db1e7(_0x34abc4)&&_0xccb3d2['add'](_0x34abc4);_0xccb3d2['listenTo'](_0x1c53b1,'add',(_0x5df2a9,_0x10230e)=>{_0x4db1e7(_0x10230e)&&_0xccb3d2['add'](_0x10230e);}),_0xccb3d2['listenTo'](_0x1c53b1,'remove',(_0xfe4423,_0x39e7d3)=>{_0xccb3d2['has'](_0x39e7d3)&&_0xccb3d2['remove'](_0x39e7d3);});}function w(_0x25d01c,_0x2b88ef){if(null===_0x25d01c&&null===_0x2b88ef)return 0x0;if(null===_0x25d01c)return-0x1;if(null===_0x2b88ef)return 0x1;const _0x21cc35=_0x25d01c['top']-_0x2b88ef['top'];return 0x0==_0x21cc35?_0x25d01c['left']-_0x2b88ef['left']:_0x21cc35;}class y extends _0xfe7412{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x41d1b1){if(super(_0x41d1b1),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x41d1b1 instanceof _0x252910){const _0x48936b=_0x41d1b1['locale'];_0x41d1b1['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1daccc){this['collection']['add'](_0x1daccc);}['remove'](_0x3ec6ef){this['collection']['remove'](_0x3ec6ef),_0x3ec6ef['destroy']();}['refreshVisibility'](){for(const _0x464f21 of this['collection'])_0x464f21['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x19d455){return this['collection']['getByInnerView'](_0x19d455);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3bc05b of this['collection'])_0x3bc05b['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3b175c){this['fire']('_activateAnnotation',_0x3b175c);}['createAnnotation'](_0x5691b9){return new T(_0x5691b9);}['createAnnotationView'](_0x1ea36e,_0x4af3a3){return new E(_0x1ea36e,_0x4af3a3);}['_addActiveAnnotation'](_0x268ea9){const _0x2d18e8=new Set(this['activeAnnotations']);_0x2d18e8['add'](_0x268ea9),this['activeAnnotations']=_0x2d18e8;}['_removeActiveAnnotation'](_0x4995ec){const _0x1ca1c8=new Set(this['activeAnnotations']);_0x1ca1c8['delete'](_0x4995ec),this['activeAnnotations']=_0x1ca1c8;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3eb528=this['collection'],_0x548258=this['_visibleAnnotations'];function _0xd7609a(_0x54babf){const _0x7819d4=_0x54babf['source'];_0x7819d4['isVisible']&&!_0x548258['has'](_0x7819d4)?_0x548258['add'](_0x7819d4):!_0x7819d4['isVisible']&&_0x548258['has'](_0x7819d4)&&_0x548258['remove'](_0x7819d4),_0x7819d4['view']['focusTracker']['remove'](_0x7819d4['view']['element']),_0x7819d4['view']['focusTracker']['add'](_0x7819d4['view']['element']);}this['listenTo'](_0x3eb528,'add',(_0x2502f2,_0x10a4e6)=>{_0x10a4e6['isVisible']&&_0x548258['add'](_0x10a4e6),this['listenTo'](_0x10a4e6,'change:isVisible',_0xd7609a);}),this['listenTo'](_0x3eb528,'remove',(_0x186ff5,_0x2a831d)=>{_0x548258['has'](_0x2a831d)&&_0x548258['remove'](_0x2a831d),this['stopListening'](_0x2a831d,'change:isVisible',_0xd7609a);});}['_setupEnterAnnotationKeystroke'](){const _0x3d14bf=_0x4dc176=>{_0x4dc176['on']('ready',()=>{_0x4dc176['keystrokes']['set'](_0x5c1e03,(_0x53d219,_0x35f338)=>{const _0x3412a=_0x79f2a3(this['activeAnnotations']['values']());_0x3412a&&(_0x3412a['view']['focus'](),_0x35f338());});});};this['context']instanceof _0x252910?_0x3d14bf(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x35143e,_0x51f3cd)=>{_0x3d14bf(_0x51f3cd);});}['_setupEscapeAnnotationHandling'](){const _0x1fb6b3=_0x24a2f5=>{const _0x2a9d03=_0x24a2f5['source'],_0x2b79d1=[];let _0x37751c;if(Array['isArray'](_0x2a9d03['target'])){_0x37751c=_0x2a9d03['target'][0x0],this['context']instanceof _0x252910?_0x2b79d1['push'](this['context']):this['context']['editors']&&_0x2b79d1['push'](...this['context']['editors']);for(const _0x8fed77 of _0x2b79d1)for(const _0x3780ff of _0x8fed77['editing']['view']['domRoots']['values']())if(_0x3780ff['contains'](_0x37751c))return void _0x8fed77['editing']['view']['focus']();_0x37751c['focus']();}};this['listenTo'](this['collection'],'add',(_0x5a6cdb,_0xa46581)=>{this['listenTo'](_0xa46581,'escape',_0x1fb6b3,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x41fc40,_0x1f4e54)=>{this['stopListening'](_0x1f4e54,'escape',_0x1fb6b3);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xfe7412{['_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(_0x2c14aa){super(_0x2c14aa),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2c998=this['context']['config'];_0x2c998['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2c998['define']('comments.maxThreadTotalWeight',0x1f4),_0x2c998['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2c998['define']('comments.CommentThreadView',gt),_0x2c998['define']('comments.CommentView',Tt),_0x2c998['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x59b3ab=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x382e57,_0x446bfa)=>this['_addCommentThread'](_0x446bfa)),this['on']('submitCommentThread',(_0x294d0a,_0x446698)=>this['_submitCommentThread'](_0x446698)),this['on']('resolveCommentThread',(_0x3c294c,_0x1db80d)=>this['_resolveCommentThread'](_0x1db80d)),this['on']('resolveCommentThread',(_0x267421,_0x3735d6)=>this['_updateActiveAnnotation'](_0x3735d6),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x4fc05e,_0x1be68b)=>this['_reopenCommentThread'](_0x1be68b)),this['on']('reopenCommentThread',(_0x3c0fa0,_0x355efb)=>this['_updateActiveAnnotation'](_0x355efb),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4f548e,_0x19326c)=>this['_removeCommentThread'](_0x19326c)),this['on']('updateCommentThread',(_0x46624e,_0x3b0197)=>this['_updateCommentThread'](_0x3b0197)),this['on']('updateCommentThread',(_0x5603ef,_0x45539c)=>this['_updateActiveAnnotation'](_0x45539c),{'priority':'lowest'}),this['on']('addComment',(_0x1b56b1,_0x57587c)=>this['_addComment'](_0x57587c)),this['on']('updateComment',(_0x549820,_0x407adc)=>this['_updateComment'](_0x407adc)),this['on']('removeComment',(_0x592689,_0xe52627)=>this['_removeComment'](_0xe52627)),this['on']('addComment',(_0x2dc57a,{threadId:_0x406771,isFromAdapter:_0x119d56})=>{if(_0x119d56)return;const _0x526f15=this['getCommentThread'](_0x406771),_0x57d36f=_0x526f15&&this['_threadToController']['get'](_0x526f15);_0x57d36f&&_0x57d36f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x59b3ab,'change:activeAnnotations',(_0x5e5f7c,_0x163c22,_0x18145d)=>{const _0xfdc270=Array['from'](_0x18145d)['map'](_0x292a20=>this['_viewToController']['get'](_0x292a20['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xfdc270?_0xfdc270['model']:null;});}set['adapter'](_0x27569c){if(this['_adapter'])throw new _0xd3f428('commentsrepository-adapter-already-set');this['_adapter']=_0x27569c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x38b41f=_t,threadId:_0x3c0953=_0x33127a(),comments:_0x53650a=[],unlinkedAt:_0x5eb3c7=null,resolvedAt:_0x2132bd=null,resolvedBy:_0x479776=null,target:_0x5de8b6=null,context:_0x298a11=null,attributes:_0x5a0e33={},isResolvable:_0x5be937=!0x0,isSubmitted:_0x3a3f59=!0x1,isFromAdapter:_0xd64c2c=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x38b41f),{'channelId':_0x38b41f,'threadId':_0x3c0953,'comments':_0x53650a,'unlinkedAt':_0x5eb3c7,'resolvedAt':_0x2132bd,'resolvedBy':_0x479776,'target':_0x5de8b6,'context':_0x298a11,'attributes':_0x5a0e33,'isFromAdapter':_0xd64c2c,'isResolvable':_0x5be937,'isSubmitted':_0x3a3f59}),this['getCommentThread'](_0x3c0953);}['openNewCommentThread']({channelId:_0x2eb407=_t,threadId:_0x11ea85=_0x33127a(),target:_0x399f2f,context:_0xfdce32=null,isResolvable:_0x5cb500=!0x0}){if(this['_readOnlyChannels']['has'](_0x2eb407)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x399f2f)throw new _0xd3f428('commentsrepository-missing-target');const _0x5a7116=this['addCommentThread']({'channelId':_0x2eb407,'threadId':_0x11ea85,'target':_0x399f2f,'context':_0xfdce32,'isResolvable':_0x5cb500});if(!_0x5a7116)return null;const _0x3177a6=this['_threadToController']['get'](_0x5a7116),_0x40ee61=_0x3177a6['view']['commentThreadInputView']['commentInputView'],_0xd79ff4=this['context']['plugins']['get'](y),_0xb6741c=_0xd79ff4['getByInnerView'](_0x3177a6['view']);return _0xd79ff4['activate'](_0xb6741c),_0x40ee61['once']('editorReady',()=>_0x40ee61['focus']()),_0x5a7116;}['hasCommentThread'](_0x4da101){if('string'!=typeof _0x4da101)throw new _0xd3f428('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4da101);}['updateCommentThread']({channelId:_0x3dcbfe=_t,threadId:_0xcdabc1,context:_0x557156,unlinkedAt:_0x5995bd,attributes:_0x570e5f,isFromAdapter:_0x30318a=!0x1}){return this['fire'](Nt('updateCommentThread',_0x3dcbfe),{'channelId':_0x3dcbfe,'threadId':_0xcdabc1,'context':_0x557156,'unlinkedAt':_0x5995bd,'attributes':_0x570e5f,'isFromAdapter':_0x30318a}),this['getCommentThread'](_0xcdabc1);}['getCommentThread'](_0x129b52){if('string'!=typeof _0x129b52)throw new _0xd3f428('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x129b52);}['fetchCommentThread']({channelId:_0x2240ca,threadId:_0x244b20}={}){const _0x5b643c=this['getCommentThread'](_0x244b20);if(_0x5b643c)return Promise['resolve'](_0x5b643c);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xd3f428('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2240ca,'threadId':_0x244b20})['then'](_0x32bacd=>this['hasCommentThread'](_0x244b20)?this['getCommentThread'](_0x244b20):_0x32bacd?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2240ca},_0x32bacd)):void 0x0)['catch'](_0x46f2e0=>{throw console['error'](_0x46f2e0),new _0xd3f428('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x534a94,skipNotAttached:_0x303f27=!0x1,skipEmpty:_0x4f8ee3=!0x1,toJSON:_0x6b2764=!0x1}={}){const _0x7c78d9=[];for(const _0x7596ed of this['_threads']['values']())_0x534a94&&_0x7596ed['channelId']!==_0x534a94||_0x303f27&&!_0x7596ed['isAttached']||_0x4f8ee3&&0x0===_0x7596ed['length']||_0x7c78d9['push'](_0x7596ed);return _0x6b2764?_0x7c78d9['map'](_0x2b8f75=>_0x2b8f75['toJSON']()):_0x7c78d9;}['getAnnotationForCommentThread'](_0x322387){const _0x481ae5=this['_threadToController']['get'](_0x322387);if(!_0x481ae5)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x481ae5['view'])||null;}['getCommentThreadForAnnotation'](_0xdfa859){const _0x381448=this['_viewToController']['get'](_0xdfa859['innerView']);return _0x381448?_0x381448['model']:null;}['setActiveCommentThread'](_0x1229e8){const _0x30c180=this['context']['plugins']['get'](y);if(!_0x1229e8)return void(this['activeCommentThread']&&_0x30c180['deactivateAll']());const _0x3fd574=this['getCommentThread'](_0x1229e8);if(!_0x3fd574)throw new _0xd3f428('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1229e8});if(!this['_threadToController']['has'](_0x3fd574))throw new _0xd3f428('commentsrepository-active-not-attached',null,{'threadId':_0x1229e8});const _0x31c58a=_0x30c180['getByInnerView'](this['_threadToController']['get'](_0x3fd574)['view']);_0x30c180['activate'](_0x31c58a);}['switchReadOnly'](_0x4c3cd6,_0x3b9f29){_0x4c3cd6?this['_readOnlyChannels']['add'](_0x3b9f29):this['_readOnlyChannels']['delete'](_0x3b9f29),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1508cd){return this['_readOnlyChannels']['has'](_0x1508cd)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5cfa0d,_0x429927){return new vt(_0x5cfa0d,_0x429927);}['setPermissions'](_0x417b5f,_0x4dd423=_t){this['_permissions']['set'](_0x4dd423,_0x417b5f),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x28017d=_t){return this['_permissions']['has'](_0x28017d)?this['_permissions']['get'](_0x28017d):bt;}['_addCommentThread']({channelId:_0x3bf02f,threadId:_0x169036,comments:_0x260572,unlinkedAt:_0x7704c0,resolvedAt:_0x241ec1,resolvedBy:_0x1d822f,target:_0x44f462,context:_0x3b0850,attributes:_0x3ff6d9,isFromAdapter:_0x5ad149,isResolvable:_0x5d8181,isSubmitted:_0x157ae2}){if('string'!=typeof _0x169036)throw new _0xd3f428('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x169036});if(this['hasCommentThread'](_0x169036))throw new _0xd3f428('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x169036});const _0x38ede5=new pi(this,{'channelId':_0x3bf02f,'id':_0x169036,'context':_0x3b0850,'attributes':_0x3ff6d9,'unlinkedAt':_0x7704c0,'resolvedAt':_0x241ec1,'resolvedBy':_0x1d822f?this['context']['plugins']['get'](it)['getUser'](_0x1d822f):null,'isResolvable':_0x5d8181,'isSubmitted':_0x157ae2||_0x5ad149});this['_threads']['set'](_0x169036,_0x38ede5);for(const _0x1c3b5c of _0x260572)_0x38ede5['_add'](this['_createNewComment']({'threadId':_0x169036,..._0x1c3b5c}));return _0x44f462&&_0x38ede5['attachTo'](_0x44f462),_0x5ad149||!_0x38ede5['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3bf02f,'threadId':_0x169036});}['_submitCommentThread']({channelId:_0x41b17f,threadId:_0x37e88d}){if(!this['hasCommentThread'](_0x37e88d))throw new _0xd3f428('commentsrepository-missing-comment-thread',this);const _0x33a1ab=this['getCommentThread'](_0x37e88d);if(_0x33a1ab['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x47e552,comments:_0x10e70e,resolvedAt:_0x390b13,resolvedBy:_0x4f4557,context:_0x592a74,attributes:_0x132045}=_0x33a1ab,_0x4e17cc=this['context']['plugins']['get']('PendingActions'),_0x201c9b=_0x4e17cc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x41b17f,'threadId':_0x47e552,'comments':_0x10e70e['map'](_0x1265eb=>_0x1265eb['toJSON']()),'resolvedAt':_0x390b13,'resolvedBy':_0x4f4557?_0x4f4557['id']:_0x4f4557,'context':_0x592a74,'attributes':_0x132045})['then'](({comments:_0x38f0bb})=>{_0x4e17cc['remove'](_0x201c9b);for(const _0xef679d of _0x38f0bb)this['_updateComment']({'channelId':_0x41b17f,'threadId':_0x37e88d,'commentId':_0xef679d['commentId'],'createdAt':_0xef679d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4fde12=>{throw console['error'](_0x4fde12),new _0xd3f428('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x13fa6d,target:_0x507dca}){const _0x217b97=this['getCommentThread'](_0x13fa6d);if(!_0x217b97)throw new _0xd3f428('commentsrepository-attach-missing-comment-thread',this);const _0xa777d=this['context']['plugins']['get']('PendingActions'),_0x24cd0f=this['context']['plugins']['get'](y),_0x4f1b4c=this['_createCommentThreadView'](_0x217b97),_0x39ac85=new vt(_0x217b97,_0x4f1b4c);let _0x5d9822=null;_0x4f1b4c['on']('change:isDirty',(_0x303b87,_0x45de0d,_0xd799dc)=>{_0xd799dc?_0x5d9822=_0xa777d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5d9822&&(_0xa777d['remove'](_0x5d9822),_0x5d9822=null);}),this['_threadToController']['set'](_0x217b97,_0x39ac85),this['_viewToController']['set'](_0x4f1b4c,_0x39ac85);const _0x11152a=new E(this['context']['locale'],_0x4f1b4c);_0x11152a['bind']('length')['to'](_0x4f1b4c),_0x11152a['bind']('isDirty')['to'](_0x4f1b4c,'isDirty',_0x4f1b4c,'length',(_0x312b83,_0x42b8da)=>_0x312b83||!_0x42b8da),_0x11152a['bind']('isActive')['to'](_0x4f1b4c),_0x11152a['type']='comment';const _0x343385=new T({'view':_0x11152a,'target':_0x507dca,'type':'comment','isVisible':!_0x217b97['archivedAt']&&!!('function'==typeof _0x507dca?_0x507dca():_0x507dca)});return _0x4f1b4c['on']('escape',()=>{_0x343385['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4f1b4c,_0x343385),_0x24cd0f['add'](_0x343385),_0x343385;}['_bindAnnotationToEditors'](_0x1f0bfe,_0x4aff32){this['listenTo'](_0x1f0bfe,'editorReady',(_0x3ba840,_0x93f5d4)=>{const _0x4fa0d5=_0x93f5d4['ui']['view']['body']['bodyCollectionContainer'];_0x4aff32['focusableElements']['add'](_0x4fa0d5),this['context']instanceof _0x252910&&this['context']['ui']['focusTracker']['add'](_0x4fa0d5);},{'priority':'highest'}),this['listenTo'](_0x1f0bfe,'editorDestroyed',(_0x67cf1e,_0x257f93)=>{const _0x51e864=_0x257f93['ui']['view']['body']['bodyCollectionContainer'];_0x4aff32['focusableElements']['has'](_0x51e864)&&_0x4aff32['focusableElements']['remove'](_0x51e864),this['context']instanceof _0x252910&&this['context']['ui']['focusTracker']['remove'](_0x51e864);});}['_unbindEditors'](_0x47fd16){this['stopListening'](_0x47fd16,'editorReady'),this['stopListening'](_0x47fd16,'editorDestroyed');}['_createCommentThreadView'](_0x335ade){const _0x27cc8e=this['context']['plugins']['get'](it),{config:_0x1b6c9e,locale:_0x3c239c}=this['context'],_0x381073=pt(_0x1b6c9e['get']('locale'),_0x3c239c);return new(0x0,(_0x1b6c9e['get']('comments'))['CommentThreadView'])(_0x3c239c,_0x335ade,_0x27cc8e['me'],{'editorConfig':{..._0x1b6c9e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1b6c9e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1b6c9e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1b6c9e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1b6c9e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x381073,'CommentView':_0x1b6c9e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5f2a3d,channelId:_0x891517,resolvedAt:_0x4f8135,resolvedBy:_0x4fe540,isFromAdapter:_0x388664}){if(!this['hasCommentThread'](_0x5f2a3d))throw new _0xd3f428('commentsrepository-missing-comment-thread',null,{'threadId':_0x5f2a3d});const _0x2def6f=this['getCommentThread'](_0x5f2a3d);if(_0x2def6f['isResolved'])throw new _0xd3f428('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5f2a3d});const _0x2c547d=this['context']['plugins']['get'](it);if(_0x2def6f['resolvedBy']=_0x2c547d['getUser'](_0x4fe540),_0x2def6f['resolvedAt']=_0x4f8135,_0x388664||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5497bf=this['context']['plugins']['get']('PendingActions'),_0x17891b=_0x5497bf['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x891517,'threadId':_0x5f2a3d})['then'](({resolvedAt:_0xa3970e,resolvedBy:_0x345452})=>{_0x5497bf['remove'](_0x17891b),_0x2def6f['resolvedBy']['id']!==_0x345452&&(_0x2def6f['resolvedBy']=_0x2c547d['getUser'](_0x345452)),_0x2def6f['resolvedAt']=_0xa3970e;})['catch'](_0x5e1b38=>{throw console['error'](_0x5e1b38),new _0xd3f428('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x10f864,channelId:_0x231594,isFromAdapter:_0x433ddd}){if(!this['hasCommentThread'](_0x10f864))throw new _0xd3f428('commentsrepository-missing-comment-thread',null,{'threadId':_0x10f864});const _0x44db8a=this['getCommentThread'](_0x10f864);if(!_0x44db8a['isResolved'])throw new _0xd3f428('commentsrepository-reopen-comment-thread',null,{'threadId':_0x10f864});if(_0x44db8a['resolvedBy']=null,_0x44db8a['resolvedAt']=null,_0x433ddd||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5e05fc=this['context']['plugins']['get']('PendingActions'),_0x1ede8b=_0x5e05fc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x231594,'threadId':_0x10f864})['then'](()=>_0x5e05fc['remove'](_0x1ede8b))['catch'](_0x2aab3e=>{throw console['error'](_0x2aab3e),new _0xd3f428('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0xe27585,isFromAdapter:_0x5752e7}){const _0x45fc6f=this['getCommentThread'](_0xe27585);if(!_0x45fc6f)throw new _0xd3f428('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0xe27585),this['_threads']['delete'](_0xe27585),!_0x45fc6f['isSubmitted']||_0x5752e7||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4f1151=this['context']['plugins']['get']('PendingActions'),{channelId:_0x54736b}=_0x45fc6f,_0xe10d5=_0x4f1151['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x54736b,'threadId':_0xe27585})['then'](()=>_0x4f1151['remove'](_0xe10d5))['catch'](_0x3367d0=>{throw console['error'](_0x3367d0),new _0xd3f428('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x56b844,unlinkedAt:_0xb870df,context:_0x550d33,attributes:_0x1f215a,isFromAdapter:_0x22260f}){if('string'!=typeof _0x56b844)throw new _0xd3f428('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x56b844});if(!this['hasCommentThread'](_0x56b844))throw new _0xd3f428('commentsrepository-missing-comment-thread',null,{'threadId':_0x56b844});const _0x180fdd=this['getCommentThread'](_0x56b844);let _0x53473a=!0x1;if(void 0x0!==_0x550d33&&_0x180fdd['context']!==_0x550d33&&(_0x180fdd['context']=_0x550d33,_0x53473a=!0x0),void 0x0!==_0xb870df&&_0x180fdd['unlinkedAt']!==_0xb870df&&(_0x180fdd['unlinkedAt']=_0xb870df,_0x53473a=!0x0),_0x1f215a&&!At(_0x1f215a,_0x180fdd['attributes'])&&(_0x180fdd['attributes']=_0x1f215a,_0x53473a=!0x0),!_0x53473a)return Promise['resolve']();if(!_0x180fdd['isSubmitted']||_0x22260f||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x470ea6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3e57cc}=_0x180fdd,_0x2ed49b=_0x470ea6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x3e57cc,'threadId':_0x56b844,'context':_0x550d33,'unlinkedAt':_0xb870df,'attributes':_0x1f215a})['then'](()=>_0x470ea6['remove'](_0x2ed49b))['catch'](_0x5d754f=>{throw console['error'](_0x5d754f),new _0xd3f428('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x185b8b){const _0x2c7860=this['context']['plugins']['get'](y),_0x13ff61=this['getCommentThread'](_0x185b8b);if(_0x13ff61['_isAttached']=!0x1,this['_threadToController']['has'](_0x13ff61)){const _0x2df114=this['_threadToController']['get'](_0x13ff61),_0x2d6339=_0x2df114['view'],_0x444270=_0x2c7860['getByInnerView'](_0x2d6339);this['_threadToController']['delete'](_0x13ff61),this['_viewToController']['delete'](_0x2d6339),_0x444270&&_0x2c7860['remove'](_0x444270),_0x2df114['destroy'](),_0x2d6339['destroy']()['then'](()=>{this['_unbindEditors'](_0x2d6339);});}}['_updateActiveAnnotation']({threadId:_0x5ee7bb,resolvedAt:_0x58250e,unlinkedAt:_0x2fc533}){const _0x3d88d0=!!_0x58250e,_0x4b9111=this['context']['plugins']['get'](y),_0x49ac2f=this['getCommentThread'](_0x5ee7bb);if(this['_threadToController']['has'](_0x49ac2f)){const _0x1c122c=this['_threadToController']['get'](_0x49ac2f)['view'],_0x5e562a=_0x4b9111['getByInnerView'](_0x1c122c);_0x5e562a&&(_0x3d88d0&&_0x4b9111['_removeActiveAnnotation'](_0x5e562a),_0x2fc533?_0x5e562a['isVisible']=!0x1:_0x5e562a['refreshVisibility']());}}['_getExternalAuthor'](_0x3857f0){const _0x515511=this['context']['plugins']['get'](it),_0x6b7d98=It('external:'+_0x3857f0),_0x521bff=_0x515511['getUser'](_0x6b7d98);return _0x521bff||_0x515511['addUser']({'id':_0x6b7d98,'name':_0x3857f0});}['_createNewComment']({threadId:_0x126683,commentId:_0x27a684=_0x33127a(),content:_0xa0052b,authorId:_0xd9c94a,createdAt:_0x24ccfe,attributes:_0x4f4829}){if('string'!=typeof _0x27a684)throw new _0xd3f428('commentsrepository-invalid-commentid');if('string'!=typeof _0xd9c94a)throw new _0xd3f428('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xa0052b||!_0xa0052b['trim']())throw new _0xd3f428('commentsrepository-invalid-comment-content');const _0x37bd91=this['context']['plugins']['get'](it)['getUser'](_0xd9c94a);if(!_0x37bd91)throw new _0xd3f428('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xd9c94a});let _0x257d8d=null,_0x38b290=_0x24ccfe;return _0x4f4829?.['@external']&&(_0x257d8d=this['_getExternalAuthor'](_0x4f4829['@external']['authorName']),_0x38b290=new Date(_0x4f4829['@external']['createdAt'])),new wi(this,{'threadId':_0x126683,'id':_0x27a684,'author':_0x257d8d||_0x37bd91,'creator':_0x37bd91,'content':_0xa0052b,'createdAt':_0x24ccfe,'authoredAt':_0x38b290,'attributes':_0x4f4829});}['_addComment'](_0x42859b){let {threadId:_0x4b4636,content:_0x44f0f6,attributes:_0x44a4dc,isFromAdapter:_0x137b3c}=_0x42859b;const _0x201ed0=this['getCommentThread'](_0x42859b['threadId']);if(!_0x201ed0)throw new _0xd3f428('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x50d8bd=this['_createNewComment'](_0x42859b),{id:_0xf920f9}=_0x50d8bd;if(_0x201ed0['_add'](_0x50d8bd),_0x137b3c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x201ed0['isSubmitted'])return Promise['resolve']();const _0x4b142b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x313f26}=_0x201ed0,_0x12d0a6=_0x4b142b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x44a4dc||(_0x44a4dc={}),this['adapter']['addComment']({'channelId':_0x313f26,'threadId':_0x4b4636,'commentId':_0xf920f9,'content':_0x44f0f6,'attributes':_0x44a4dc})['then'](_0x55591e=>{_0x4b142b['remove'](_0x12d0a6),_0x55591e&&this['_updateComment']({'channelId':_0x313f26,'threadId':_0x4b4636,'commentId':_0xf920f9,'createdAt':_0x55591e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4dad4f=>{throw console['error'](_0x4dad4f),new _0xd3f428('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x56c709,commentId:_0x17ecf8,content:_0x5f0c7d,createdAt:_0x2918cc,attributes:_0x3fca53,isFromAdapter:_0x2c1a91}){if(void 0x0!==_0x5f0c7d&&('string'!=typeof _0x5f0c7d||!_0x5f0c7d['trim']()['length']))throw new _0xd3f428('commentsrepository-update-comment-invalid-content');const _0x7f70ba=this['getCommentThread'](_0x56c709),_0x32acf3=_0x7f70ba['getComment'](_0x17ecf8);if(!_0x32acf3)throw new _0xd3f428('commentsrepository-update-missing-comment',this);let _0xa2ba1f=!0x1;if(_0x5f0c7d&&_0x5f0c7d!==_0x32acf3['content']&&(_0x32acf3['isEditable']||_0x2c1a91)&&(_0x32acf3['content']=_0x5f0c7d,_0xa2ba1f=!0x0),_0x2918cc&&_0x2918cc!==_0x32acf3['createdAt']&&(_0x32acf3['createdAt']=_0x2918cc,_0x32acf3['attributes']&&_0x32acf3['attributes']['@external']||(_0x32acf3['authoredAt']=_0x2918cc),_0xa2ba1f=!0x0),_0x3fca53&&!At(_0x3fca53,_0x32acf3['attributes'])&&(_0x32acf3['attributes']=_0x3fca53,_0xa2ba1f=!0x0),!_0xa2ba1f)return Promise['resolve']();if(_0x7f70ba['fire']('commentUpdated'),_0x2c1a91||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x3bbda6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5cc634}=this['getCommentThread'](_0x32acf3['threadId']),_0x4bbcb2=_0x3bbda6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5cc634,'threadId':_0x56c709,'commentId':_0x17ecf8,'content':_0x5f0c7d,'attributes':_0x3fca53})['then'](()=>_0x3bbda6['remove'](_0x4bbcb2))['catch'](_0x4a8e53=>{throw console['error'](_0x4a8e53),new _0xd3f428('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x34bdd2,commentId:_0x4184f8,isFromAdapter:_0x4eacfb}){const _0x7ab718=this['getCommentThread'](_0x34bdd2),_0x1ceb84=_0x7ab718['getComment'](_0x4184f8);if(!_0x1ceb84)throw new _0xd3f428('commentsrepository-remove-missing-comment',this);if(_0x7ab718['_remove'](_0x1ceb84),_0x4eacfb||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2b4d6d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x391099}=_0x7ab718,_0x3f1d5b=_0x2b4d6d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x391099,'threadId':_0x34bdd2,'commentId':_0x4184f8})['then'](()=>_0x2b4d6d['remove'](_0x3f1d5b))['catch'](_0x4851ee=>{throw console['error'](_0x4851ee),new _0xd3f428('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x1297b8(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0xdccff9,_0x2b6912){super();const _0x49a01a=_0x2b6912['isResolvable'];this['channelId']=_0x2b6912['channelId'],this['id']=_0x2b6912['id'],this['comments']=new _0x4d4ef2(),this['_repository']=_0xdccff9,this['_isAttached']=!0x1,this['_isSubmitted']=_0x2b6912['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0xdccff9,'_permissions',_0xdccff9,'_readOnlyChannels',()=>_0xdccff9['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0xdccff9,'_permissions',()=>_0xdccff9['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0xdccff9,'_permissions',()=>{const _0x33cdaf=_0xdccff9['getPermissions'](this['channelId']);return _0x33cdaf['write']||_0x33cdaf['admin'];}),this['bind']('isResolvable')['to'](_0xdccff9,'_permissions',()=>_0x49a01a&&_0xdccff9['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x2b6912['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x15d973,_0x115cba)=>_0x15d973?_0x115cba?_0x15d973<_0x115cba?_0x15d973:_0x115cba:_0x15d973:_0x115cba),this['set']('unlinkedAt',_0x2b6912['unlinkedAt']||null),this['set']('resolvedAt',_0x2b6912['resolvedAt']||null),this['set']('resolvedBy',_0x2b6912['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x3e447e=>!!_0x3e447e),this['set']('attributes',_0x2b6912['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x1da5be,_0x41933a)=>_0x1da5be+_0x41933a['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x3d306e,id:_0x17096f}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x3d306e),{'channelId':_0x3d306e,'threadId':_0x17096f});}['setUnlinkedAt'](_0x20ce89){this['_update']({'unlinkedAt':_0x20ce89});}['resolve']({resolvedAt:_0x4ff66f=new Date(),resolvedBy:_0x10a1d8=null,isFromAdapter:_0x28dc91=!0x1}={}){const _0x1dc1b8=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x4e4157,id:_0x1343a6}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x4e4157),{'channelId':_0x4e4157,'threadId':_0x1343a6,'resolvedAt':_0x4ff66f,'resolvedBy':_0x10a1d8||_0x1dc1b8['id'],'isFromAdapter':_0x28dc91});}['reopen']({isFromAdapter:_0x1bd651=!0x1}={}){const {channelId:_0x3c8f19,id:_0x3bb034}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x3c8f19),{'channelId':_0x3c8f19,'threadId':_0x3bb034,'isFromAdapter':_0x1bd651});}['setContext'](_0x34a8c){this['context']||this['_update']({'context':_0x34a8c});}['setAttribute'](_0x2429b6,_0x6ed7cc){const _0x24cd5d=wt(this['attributes']);yt(_0x24cd5d,_0x2429b6,_0x6ed7cc),this['_update']({'attributes':_0x24cd5d});}['removeAttribute'](_0x5bbbc5){const _0x4ff714=wt(this['attributes']);Ct(_0x4ff714,_0x5bbbc5),this['_update']({'attributes':_0x4ff714});}['remove']({isFromAdapter:_0x31192a=!0x1}={}){const {channelId:_0x31fea5,id:_0x31475d}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x31fea5),{'channelId':_0x31fea5,'threadId':_0x31475d,'isFromAdapter':_0x31192a});}['attachTo'](_0x457d44){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x457d44});}['addComment'](_0x2cc554){const {channelId:_0x516308,id:_0x29c830}=this;this['_repository']['fire'](Nt('addComment',_0x516308,_0x29c830),Object['assign']({'channelId':_0x516308,'threadId':_0x29c830},_0x2cc554));}['getComment'](_0x2b5d25){if('string'!=typeof _0x2b5d25)throw new _0xd3f428('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x2b5d25});return this['comments']['get'](_0x2b5d25);}['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'](_0x252310=>_0x252310['toJSON']()),'attributes':this['attributes']};}['_add'](_0x1ba57d){return this['listenTo'](_0x1ba57d,'change:authoredAt',()=>{const _0x47b00a=this['_findOptimalIndex'](_0x1ba57d),_0x248647=this['comments'];_0x47b00a-0x1!=_0x248647['getIndex'](_0x1ba57d)&&_0x47b00a+0x1!=_0x248647['getIndex'](_0x1ba57d)&&(this['_remove'](_0x1ba57d),this['_add'](_0x1ba57d));}),this['comments']['add'](_0x1ba57d,this['_findOptimalIndex'](_0x1ba57d));}['_update'](_0x4f59c3){const {channelId:_0x1e0a75,id:_0x27ed57}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x1e0a75),{..._0x4f59c3,'channelId':_0x1e0a75,'threadId':_0x27ed57});}['_remove'](_0xd4cec){return this['stopListening'](_0xd4cec),_0xd4cec['destroy'](),this['comments']['remove'](_0xd4cec);}['_findOptimalIndex'](_0xf755e7){const _0x36ddb4=this['comments']['find'](_0x59f7c7=>new Date(_0x59f7c7['authoredAt'])['getTime']()>new Date(_0xf755e7['authoredAt'])['getTime']());return _0x36ddb4?this['comments']['getIndex'](_0x36ddb4):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x1297b8(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x24161b,_0x1c51e5){super();const _0x4fbebe=_0x24161b['context']['plugins']['get'](it)['me'],_0x44dd58=_0x24161b['getCommentThread'](_0x1c51e5['threadId']),_0x49985d=0x0===_0x44dd58['comments']['length'],_0x24b9c9=_0x4fbebe===_0x1c51e5['author'];this['id']=_0x1c51e5['id'],this['threadId']=_0x1c51e5['threadId'],this['author']=_0x1c51e5['author'],this['creator']=_0x1c51e5['creator'],this['isExternal']=Boolean(_0x1c51e5['attributes']&&_0x1c51e5['attributes']['@external']),this['set']('content',_0x1c51e5['content']),this['createdAt']=_0x1c51e5['createdAt']||new Date(),this['set']('authoredAt',_0x1c51e5['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x44dd58,'resolvedAt'),this['set']('attributes',_0x1c51e5['attributes']||{}),this['bind']('isEditable')['to'](_0x24161b,'_permissions',()=>{const _0x53e16f=_0x24161b['getPermissions'](_0x44dd58['channelId'])['write'],_0x47ed57=_0x24161b['getPermissions'](_0x44dd58['channelId'])['modifyAll'];return _0x24b9c9&&_0x53e16f||!_0x24b9c9&&_0x47ed57;}),this['bind']('isRemovable')['to'](_0x44dd58,'isRemovable',_0x24161b,'_permissions',_0x10242b=>{const _0x35d0a7=_0x24161b['getPermissions'](_0x44dd58['channelId'])['write'],_0x2b69af=_0x24161b['getPermissions'](_0x44dd58['channelId'])['modifyAll'];return _0x24b9c9&&_0x35d0a7||_0x10242b&&_0x49985d||!_0x24b9c9&&_0x2b69af&&!_0x49985d;}),this['bind']('isReadOnly')['to'](_0x44dd58,'isReadOnly'),this['_repository']=_0x24161b;}get['weight'](){return Math['max'](function(_0x7680ea){const _0x46c24f=document['createElement']('div');return _0x46c24f['innerHTML']=_0x7680ea,_0x46c24f['textContent']['length'];}(this['content']),0xc8);}['update'](_0x394a31){const {threadId:_0x409bd8,id:_0x359314}=this;if(!this['_repository']['hasCommentThread'](_0x409bd8))throw new _0xd3f428('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x316853}=this['_repository']['getCommentThread'](_0x409bd8);this['_repository']['fire'](Nt('updateComment',_0x316853,_0x409bd8),{'channelId':_0x316853,'threadId':_0x409bd8,'commentId':_0x359314,..._0x394a31});}['setAttribute'](_0xb09185,_0x510958){const _0x1400d4=wt(this['attributes']);yt(_0x1400d4,_0xb09185,_0x510958),this['update']({'attributes':_0x1400d4});}['removeAttribute'](_0x521872){const _0x281303=wt(this['attributes']);Ct(_0x281303,_0x521872),this['update']({'attributes':_0x281303});}['remove'](_0x329e3b={}){if(!_0x329e3b['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x530185,id:_0x2817ff}=this;if(!this['_repository']['hasCommentThread'](_0x530185))throw new _0xd3f428('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x52b849}=this['_repository']['getCommentThread'](_0x530185);this['_repository']['fire'](Nt('removeComment',_0x52b849,_0x530185),{'channelId':_0x52b849,'threadId':_0x530185,'commentId':_0x2817ff,..._0x329e3b});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x358236,..._0x1a17b4){for(const _0x4d4243 of _0x1a17b4)void 0x0!==_0x4d4243&&(_0x358236+=':'+String(_0x4d4243));return _0x358236;}class ot extends _0x134a73{constructor(_0x8c1544){super(_0x8c1544),this['set']('hasContent',!0x1);}['refresh'](){const _0x144c2d=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x572919 of _0x144c2d['getRanges']())if(this['_hasContent'](_0x572919))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x1c7413=_0x33127a(),ranges:_0x30460e,comment:_0xc056c7}={}){const _0x484cb7=this['editor']['model'],_0xa06449=_0x30460e??Array['from'](_0x484cb7['document']['selection']['getRanges']()),_0x536c0b=[];for(const _0x2d4bb5 of _0xa06449)this['_hasContent'](_0x2d4bb5)&&_0x536c0b['push'](this['_trimToContent'](_0x2d4bb5));if(!_0x536c0b['length'])throw new _0xd3f428('addcommentthreadcommand-incorrect-ranges',null);_0xc056c7&&this['_createCommentThread'](_0x1c7413,_0xc056c7),this['_createMarkersFromRanges'](_0x1c7413,_0x536c0b,!!_0xc056c7);}['_createMarkersFromRanges'](_0x50f03a,_0x2feeea,_0x5c8068){this['editor']['model']['change'](_0x3b10a9=>{for(const _0x5c8a72 of _0x2feeea){const _0x182cbf=_0x33127a()['substr'](0x1,0x5),_0x106179='comment:'+_0x50f03a+':'+_0x182cbf;_0x3b10a9['addMarker'](_0x106179,{'range':_0x5c8a72,'usingOperation':_0x5c8068,'affectsData':_0x5c8068});}});}['_createCommentThread'](_0x345990,_0x5ed158){const _0x2f8303=this['editor']['plugins']['get']('CommentsRepository'),_0x3246c3=this['editor']['config']['get']('collaboration.channelId'),_0x277419=this['editor']['plugins']['get']('Users')['me'];if(!_0x277419)throw new _0xd3f428('addcommentthreadcommand-user-not-found',null);_0x2f8303['addCommentThread']({'threadId':_0x345990,'channelId':_0x3246c3,'comments':[{'authorId':_0x277419['id'],'content':_0x5ed158,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x17b93c){for(const _0x24e68c of _0x17b93c['getItems']())if(this['_itemIsContent'](_0x24e68c))return!0x0;return!0x1;}['_itemIsContent'](_0x14caa8){return _0x14caa8['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x14caa8)&&!_0x14caa8['is']('element','tableCell');}['_trimToContent'](_0x1ba04f){const _0x48012d=_0x1a7689=>!this['_itemIsContent'](_0x1a7689['item']),_0x34ecb1=_0x1ba04f['start']['getLastMatchingPosition'](_0x48012d),_0x59c693=_0x1ba04f['end']['getLastMatchingPosition'](_0x48012d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x34ecb1,_0x59c693);}}class b extends _0x8104b3{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5bde85){super(_0x5bde85),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x39af13=this['editor'],_0x19cb5e=_0x39af13['model']['document']['selection'],_0x1e3b14=_0x5e0d3b(()=>this['refreshSelectedViews'](),0xa);_0x19cb5e['on']('change:range',(_0x152813,_0x228a1a)=>{_0x228a1a['directChange']&&(_0x1e3b14['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x39af13['editing']['view']['document'],'change:isFocused',(_0x4ffb37,_0x21c1b3,_0x14c9b7)=>{_0x14c9b7&&_0x1e3b14();}),this['listenTo'](_0x39af13['ui']['focusTracker'],'change:isFocused',(_0x36ea40,_0x532fd0,_0x292b25)=>{_0x292b25||this['fire']('blur',{'isAnnotationTracked':_0x2aa269=>this['_editorAnnotationsData']['has'](_0x2aa269['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4a5e79){if(this['_editorAnnotations']['has'](_0x4a5e79['view']))return;this['_editorAnnotations']['add'](_0x4a5e79['view']),this['editor']['ui']['focusTracker']['add'](_0x4a5e79['view']['element']);const _0x7808f7=this['editor']['plugins']['get'](y);this['listenTo'](_0x7808f7['collection'],'remove',(_0x2c8a6b,_0x4c7b23)=>{this['editor']['ui']['focusTracker']['remove'](_0x4c7b23['view']['element']),this['_editorAnnotations']['delete'](_0x4c7b23['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0xfa354d){if('function'!=typeof _0xfa354d)throw new _0xd3f428('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xfa354d);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1edee7,annotations:_0x5efbc6}){const _0x1e44d4=[],_0x21522e=this['editor']['model']['document']['selection'],_0x4a2738=Array['from'](_0x21522e['getRanges']());for(const [_0x3617a8,_0x53e1f0]of this['_editorAnnotationsData']){const _0x474990=_0x539d05(_0x53e1f0),_0x31905f=_0x5efbc6['getByInnerView'](_0x3617a8);_0x474990&&_0x31905f&&_0x1e44d4['push']({'annotation':_0x31905f,'range':_0x474990});}function _0x539d05(_0x5cd6b0){for(const _0x5e4ae2 of _0x5cd6b0)for(const _0x42469c of _0x4a2738)if(_0x5e4ae2['containsRange'](_0x42469c,!_0x21522e['isCollapsed']))return _0x5e4ae2;return null;}return _0x1e44d4['sort']((_0x162982,_0x22036a)=>{const _0x1dd508=_0x162982['range'],_0x1e3f7a=_0x22036a['range'];if(!_0x1dd508['isEqual'](_0x1e3f7a)){if(_0x1dd508['containsRange'](_0x1e3f7a,!0x0))return 0x1;if(_0x1e3f7a['containsRange'](_0x1dd508,!0x0))return-0x1;}return _0x162982['annotation']==_0x1edee7?-0x1:_0x22036a['annotation']==_0x1edee7?0x1:0x0;})['map'](_0x541f1c=>_0x541f1c['annotation']);}get['_editorAnnotationsData'](){const _0xf5a0f7=new Map();for(const _0x1eb095 of Array['from'](this['_dataCollectors']))for(const [_0x2924bd,_0x4664e0]of _0x1eb095())_0xf5a0f7['set'](_0x2924bd,_0x4664e0);return _0xf5a0f7;}}class st extends _0x8104b3{['afterInit'](){const _0x4a544d=this['editor'];if(!_0x4a544d['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4a544d['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x8104b3{constructor(_0x21e3ce){super(_0x21e3ce),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1869a5=this['editor'],_0x403632=_0x1869a5['commands']['get']('importWord'),_0x10ad52=_0x1869a5['plugins']['get'](it);_0x403632&&(_0x403632['on']('execute',(_0x4de5db,[,_0x2e12aa])=>{_0x2e12aa['collaboration_features']={'comments':!0x0,'user_id':_0x10ad52['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x403632,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x505815,_0x408f24){const {comment_threads:_0x2d025f}=_0x408f24;_0x2d025f&&_0x2d025f['forEach'](({thread_id:_0x3b9b91,comments:_0x5dc11f,is_resolved:_0x500da6})=>{const _0x1369c4=new Date(),_0x4c479a=_0x5dc11f['map'](({author:_0x249623,content:_0x52a7a3,created_at:_0x2bd874})=>({'content':_0x52a7a3,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x1369c4,'attributes':{'@external':{'authorName':_0x249623,'createdAt':_0x2bd874?new Date(_0x2bd874):new Date(),'source':'importWord'}}})),_0x324aca=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x324aca,'threadId':_0x3b9b91,'comments':_0x4c479a,'resolvedAt':_0x500da6?_0x1369c4:null});});}}class at extends _0x8104b3{constructor(_0x1e9cbb){super(_0x1e9cbb),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x122008=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x122008,'contentInsertion',(_0x51a421,_0x2a18bc)=>this['_removeMarkersWithoutThreads'](_0x2a18bc['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x25cd67){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x25cd67;const _0x30002b=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5d3a42 of _0x25cd67['keys']()){const [_0x4565fb,_0x3c7649]=_0x5d3a42['split'](':');'comment'!=_0x4565fb||_0x30002b['hasCommentThread'](_0x3c7649)||_0x25cd67['delete'](_0x5d3a42);}return _0x25cd67;}['_registerMarkerInClipboardPipeline'](){const _0x3c36c3=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3e75c4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3e75c4&&_0x3c36c3['_registerMarkerToCopy']('comment',_0x3e75c4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x16ac5f){switch(_0x16ac5f){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x3b26ee){const _0x8057f2=_0x3b26ee['split'](':');return{'group':_0x8057f2[0x0],'id':_0x8057f2[0x1],'part':_0x8057f2[0x2]};}class ut extends _0x8104b3{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1f345c,_0x58f8a3)=>{if(!_0x58f8a3['options']['showCommentHighlights'])return null;if(_0x58f8a3['options']['ignoreResolvedComments']){const {id:_0x99c6f}=ft(_0x1f345c['markerName']),_0x1f9477=this['editor']['plugins']['get'](o);if(_0x1f9477['getCommentThread'](_0x99c6f)?.['isResolved']&&_0x1f345c['item'])return _0x58f8a3['consumable']['consume'](_0x1f345c['item'],'addMarker:'+_0x1f345c['markerName']),_0x58f8a3['consumable']['consume'](_0x1f345c['item'],'removeMarker:'+_0x1f345c['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x242005=>{_0x242005['on']('addMarker:comment',(_0x33e595,_0x1b7595,_0x4647f4)=>{if(!_0x4647f4['options']['showCommentHighlights'])return;const _0x32c032=_0x1b7595['item'];if(!_0x32c032)return;const _0x5af60a=_0x4647f4['mapper']['toViewElement'](_0x32c032);this['editor']['model']['schema']['isObject'](_0x32c032)&&_0x5af60a&&!_0x5af60a['getCustomProperty']('widget')&&_0x5af60a['is']('containerElement')&&_0x2a96ee(_0x5af60a,_0x4647f4['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x27c64a,{writer:_0x4e2c58,options:_0x284662})=>{if(!_0x284662['showCommentHighlights'])return null;const _0x11df10=_0x4e2c58['createContainerElement']('div'),_0x35ba5b=_0x4e2c58['createEmptyElement']('hr');return _0x4e2c58['addClass']('ck-horizontal-line',_0x11df10),_0x4e2c58['insert'](_0x4e2c58['createPositionAt'](_0x11df10,0x0),_0x35ba5b),_0x11df10;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0xa55df6,{writer:_0x11d8be,options:_0x428cd3})=>{if(!_0x428cd3['showCommentHighlights'])return null;const _0x35d277=_0x11d8be['createContainerElement']('span'),_0x1bfc83=_0x11d8be['createEmptyElement']('img');return _0x11d8be['addClass']('image-inline',_0x35d277),_0x11d8be['insert'](_0x11d8be['createPositionAt'](_0x35d277,0x0),_0x1bfc83),_0x35d277;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x56d87a,{writer:_0x55677f,options:_0x236015})=>{if(_0x236015['showCommentHighlights'])return _0x55677f['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x50ba95,_0x535b38,_0x46d137)=>{_0x46d137['options']['showCommentHighlights']&&_0x50ba95['stop']();},{'priority':'high'});}}class r extends _0x8104b3{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(_0x204e01){super(_0x204e01),this['set']('isThreadsLoadingPaused',!0x0),_0x204e01['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x25d787,_0x2b9d94,_0xf0c6,_0x4eb47a)=>{const _0x34a838=_0x204e01['plugins']['get'](o),_0x28de73=_0xf0c6?ft(_0xf0c6)['id']:null;_0x204e01['model']['change'](()=>{if(_0x28de73){const _0x34a789=this['getAllMarkersForId'](_0x28de73);for(const _0x474d9b of _0x34a789)_0x204e01['editing']['reconvertMarker'](_0x474d9b);}if(_0x4eb47a){const {id:_0x1b9db6}=ft(_0x4eb47a),_0x35398c=_0x34a838['getCommentThread'](_0x1b9db6);if(_0x35398c&&_0x35398c['unlinkedAt'])return;if(_0x35398c&&!_0x35398c['isAttached'])return;const _0x5745d6=this['getAllMarkersForId'](_0x1b9db6);for(const _0x30db41 of _0x5745d6)_0x204e01['editing']['reconvertMarker'](_0x30db41);}}),_0x28de73&&this['scrollToThreadMarker'](_0x28de73);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x517144=this['editor'],_0x6a9eee=_0x517144['plugins']['get'](o),_0x31cc7b=_0x517144['config']['get']('collaboration.channelId'),_0x380b7e=_0x6a9eee['getCommentThreads']()['filter'](_0x378a8d=>_0x378a8d['channelId']!==_0x31cc7b);_0x517144['commands']['add']('addCommentThread',new ot(_0x517144)),this['listenTo'](_0x517144,'change:isReadOnly',(_0x33b84c,_0x1d28ba,_0x2d580f)=>{_0x6a9eee['switchReadOnly'](_0x2d580f,_0x517144['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x6a9eee,dt('addCommentThread',_0x31cc7b),(_0x525e7b,{threadId:_0x980739})=>{const _0x41c898=this['editor']['plugins']['get'](o)['getCommentThread'](_0x980739);_0x41c898?.['unlinkedAt']&&this['_attachArchivedThread'](_0x980739);}),this['listenTo'](_0x6a9eee,dt('removeCommentThread',_0x31cc7b),(_0x537d34,{threadId:_0x1137df})=>{_0x517144['model']['enqueueChange']({'isUndoable':!0x1},_0x282280=>{const _0xf9b718=this['getAllMarkersForId'](_0x1137df);for(const _0x59f8c6 of _0xf9b718)_0x282280['removeMarker'](_0x59f8c6);});}),this['listenTo'](_0x6a9eee,dt('resolveCommentThread',_0x31cc7b),(_0x496004,{threadId:_0x3ce408})=>{(this['_reconvertMarkers'](_0x3ce408),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x3ce408)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x6a9eee,dt('reopenCommentThread',_0x31cc7b),(_0x79d6f3,{threadId:_0x38a750})=>{this['_reconvertMarkers'](_0x38a750);},{'priority':'low'}),this['listenTo'](_0x6a9eee,dt('addComment',_0x31cc7b),(_0x4469bb,{threadId:_0x2a76bb,isFromAdapter:_0x50c179})=>{const _0x50e982=this['getAllMarkersForId'](_0x2a76bb);if(_0x50c179||0x0==_0x50e982['length']||!_0x6a9eee['hasCommentThread'](_0x2a76bb))return;0x1===_0x6a9eee['getCommentThread'](_0x2a76bb)['length']&&_0x517144['model']['enqueueChange']({'isUndoable':!0x1},_0x5bc602=>{for(const _0x8f9685 of _0x50e982)_0x5bc602['updateMarker'](_0x8f9685,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x380b7e);}['afterInit'](){!async function(_0x3e2cd1){const _0x24356f=_0x110973([0x68,0x61,0x58,0x33,0x6b,0x55,0x76,0x6e,0x4b,0x46,0x77,0x74,0x69,0x42,0x4d,0x30,0x35,0x72,0x62,0x66,0x4c,0x43,0x75,0x49,0x78,0x50,0x37,0x67,0x6f,0x48,0x4e,0x38,0x41,0x45,0x6a,0x47,0x71,0x56,0x7a,0x4a,0x4f,0x79,0x44,0x32,0x6c,0x34,0x70,0x57,0x6d,0x63,0x36,0x31,0x73,0x51,0x64,0x53,0x39,0x52,0x59,0x54,0x5a,0x65]),_0x180099=0x461bc3e5,_0x5a7fd6=0x461cac7d^_0x180099,_0xe4be3b=window[_0x110973([0x44,0x61,0x74,0x65])][_0x110973([0x6e,0x6f,0x77])](),_0x46039c=_0x3e2cd1[_0x110973([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2753fe=new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xeae62d=>{_0x46039c[_0x110973([0x6f,0x6e,0x63,0x65])](_0x110973([0x72,0x65,0x61,0x64,0x79]),_0xeae62d);}),_0x13bc57={[_0x110973([0x6b,0x74,0x79])]:_0x110973([0x45,0x43]),[_0x110973([0x75,0x73,0x65])]:_0x110973([0x73,0x69,0x67]),[_0x110973([0x63,0x72,0x76])]:_0x110973([0x50,0x2d,0x32,0x35,0x36]),[_0x110973([0x78])]:_0x110973([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]),[_0x110973([0x79])]:_0x110973([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]),[_0x110973([0x61,0x6c,0x67])]:_0x110973([0x45,0x53,0x32,0x35,0x36])},_0x3f067c=_0x46039c[_0x110973([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x110973([0x67,0x65,0x74])](_0x110973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x18599b(){let _0x284cf9,_0x37f6be=null,_0x5dfbc0=null;try{if(_0x3f067c==_0x110973([0x47,0x50,0x4c]))return _0x110973([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x284cf9=_0x53b98b(),!_0x284cf9)return _0x110973([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x284cf9[_0x110973([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5dfbc0=_0x42f18b(_0x284cf9[_0x110973([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x284cf9[_0x110973([0x6a,0x74,0x69])])),await _0xd7436c()?_0x47e596()?_0xf9fb07()?_0x110973([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x400bad()?(_0x284cf9[_0x110973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x110973([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x37f6be=_0x4d8033(_0x110973([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x284cf9[_0x110973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x110973([0x74,0x72,0x69,0x61,0x6c])&&(_0x37f6be=_0x4d8033(_0x110973([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x255d63()):_0x110973([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x110973([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x110973([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x110973([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xf9fb07(){const _0x276205=[_0x110973([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x110973([0x74,0x72,0x69,0x61,0x6c])][_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x284cf9[_0x110973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe4be3b/0x3e8:0xe10*_0x5a7fd6;return _0x284cf9[_0x110973([0x65,0x78,0x70])]<_0x276205;}function _0x47e596(){const _0x266c0c=_0x284cf9[_0x110973([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x266c0c)return!0x1;if(_0x266c0c[_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x110973([0x2a])))return!0x0;if(_0x266c0c[_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x110973([0x43,0x4d,0x54])))return!0x0;if(_0x266c0c[_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x110973([0x52,0x43,0x4d,0x54]))){if(_0xc69a17())return!0x0;if(_0x1477fb()||_0x42d028())return!0x0;}return!0x1;}function _0x400bad(){const _0x53ff3f=_0x284cf9[_0x110973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x53ff3f||0x0==_0x53ff3f[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1649eb}=new URL(window[_0x110973([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x53ff3f[_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1649eb))return!0x0;const _0x1f542b=_0x1649eb[_0x110973([0x73,0x70,0x6c,0x69,0x74])](_0x110973([0x2e]));return _0x53ff3f[_0x110973([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x18e11f=>_0x18e11f[_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x110973([0x2a])))[_0x110973([0x6d,0x61,0x70])](_0x43aaf2=>_0x43aaf2[_0x110973([0x73,0x70,0x6c,0x69,0x74])](_0x110973([0x2e])))[_0x110973([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5cfa3a=>_0x5cfa3a[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1f542b[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x110973([0x6d,0x61,0x70])](_0x537fe1=>Array(_0x1f542b[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x537fe1[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x110973([0x66,0x69,0x6c,0x6c])](_0x537fe1[0x0]===_0x110973([0x2a])?_0x110973([0x2a]):'')[_0x110973([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x537fe1))[_0x110973([0x73,0x6f,0x6d,0x65])](_0x400cb4=>_0x1f542b[_0x110973([0x65,0x76,0x65,0x72,0x79])]((_0x5146ff,_0x198f8a)=>_0x400cb4[_0x198f8a]===_0x5146ff||_0x400cb4[_0x198f8a]===_0x110973([0x2a])));}function _0x255d63(){return _0x37f6be&&_0x5dfbc0?new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x452098,_0x3a0232)=>{_0x37f6be[_0x110973([0x74,0x68,0x65,0x6e])](_0x452098,_0x3a0232),_0x5dfbc0[_0x110973([0x74,0x68,0x65,0x6e])](_0x395015=>{_0x395015!=_0x110973([0x56,0x61,0x6c,0x69,0x64])&&_0x452098(_0x395015);},_0x3a0232);}):_0x37f6be||_0x5dfbc0||_0x110973([0x56,0x61,0x6c,0x69,0x64]);}}function _0x42f18b(_0x45b3ba,_0xf436e){return new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x219d22=>{if(_0x3e6aa6())return _0x219d22(_0x110973([0x56,0x61,0x6c,0x69,0x64]));_0x52f6ee(),_0x46039c[_0x110973([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x110973([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2175b9=!0x1;const _0x5bec48=_0x33127a();function _0x4814f2(_0x4195f1){return!!_0x4195f1&&(typeof _0x4195f1===_0x110973([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4195f1===_0x110973([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4195f1[_0x110973([0x74,0x68,0x65,0x6e])]===_0x110973([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4195f1[_0x110973([0x63,0x61,0x74,0x63,0x68])]===_0x110973([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x517ebf(_0x171920){_0x4cd15e(_0x171920)[_0x110973([0x74,0x68,0x65,0x6e])](_0x5a5ab9=>{if(!_0x5a5ab9||_0x5a5ab9[_0x110973([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x110973([0x6f,0x6b]))return _0x110973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x56b5a5(_0x44340c(_0x5bec48+_0xf436e))!=_0x5a5ab9[_0x110973([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x110973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x110973([0x56,0x61,0x6c,0x69,0x64]);})[_0x110973([0x74,0x68,0x65,0x6e])](_0x3621a3=>(_0x290f43(),_0x3621a3),()=>{const _0x310df3=_0x567435();return null==_0x310df3?(_0x290f43(),_0x110973([0x56,0x61,0x6c,0x69,0x64])):_0x110973(_0xe4be3b-_0x310df3>(0x621747e5^_0x180099)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x110973([0x74,0x68,0x65,0x6e])](_0x219d22)[_0x110973([0x63,0x61,0x74,0x63,0x68])](()=>{_0x219d22(_0x110973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5ee1de=0x462d2d65^_0x180099;function _0x290f43(){const _0x4f146b=_0x110973([0x6c,0x6c,0x63,0x74,0x2d])+_0x56b5a5(_0x44340c(_0x45b3ba)),_0x5aa8a3=_0x388e1e(_0x56b5a5(window[_0x110973([0x4d,0x61,0x74,0x68])][_0x110973([0x63,0x65,0x69,0x6c])](_0xe4be3b/_0x5ee1de)));window[_0x110973([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x110973([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f146b,_0x5aa8a3);}function _0x567435(){const _0x246252=_0x110973([0x6c,0x6c,0x63,0x74,0x2d])+_0x56b5a5(_0x44340c(_0x45b3ba)),_0xd577fc=window[_0x110973([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x110973([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x246252);return _0xd577fc?window[_0x110973([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x388e1e(_0xd577fc),0x10)*_0x5ee1de:null;}function _0x4cd15e(_0x51d3fa){return new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x33a9be,_0x357970)=>{_0x51d3fa[_0x110973([0x74,0x68,0x65,0x6e])](_0x33a9be,_0x357970),window[_0x110973([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x357970,0x461a1725^_0x180099);});}}_0x46039c[_0x110973([0x6f,0x6e])](_0x110973([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xbb2cfa,_0x1b177a)=>{if(_0x1b177a[0x0]!=_0x45b3ba)return _0x219d22(_0x110973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1b177a[0x1]={..._0x1b177a[0x1],[_0x110973([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5bec48};},{[_0x110973([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x110973([0x68,0x69,0x67,0x68])}),_0x46039c[_0x110973([0x6f,0x6e])](_0x110973([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1a3f2d=>{_0x4814f2(_0x1a3f2d[_0x110973([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2175b9=!0x0,_0x517ebf(_0x1a3f2d[_0x110973([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x110973([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x110973([0x6c,0x6f,0x77])}),_0x2753fe[_0x110973([0x74,0x68,0x65,0x6e])](()=>{_0x2175b9||_0x219d22(_0x110973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3e6aa6(){return _0x46039c[_0x110973([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x110973([0x76,0x69,0x65,0x77])][_0x110973([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x110973([0x61,0x75,0x74,0x6f]);}function _0x52f6ee(){_0x46039c[_0x110973([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x110973([0x76,0x69,0x65,0x77])][_0x110973([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x110973([0x61,0x75,0x74,0x6f]);}}function _0x4d8033(_0x259f7c){const _0x57cdf6=[new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xae1003=>setTimeout(_0xae1003,0x4612fd29^_0x180099)),_0x2753fe[_0x110973([0x74,0x68,0x65,0x6e])](()=>new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf0bf9e=>{let _0x2899ca=0x0;_0x46039c[_0x110973([0x6d,0x6f,0x64,0x65,0x6c])][_0x110973([0x6f,0x6e])](_0x110973([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x598d74,_0x2bbd33)=>{_0x2bbd33[0x0][_0x110973([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2899ca++,_0x2899ca==(0x461bc21d^_0x180099)&&(_0xf0bf9e(),_0x598d74[_0x110973([0x6f,0x66,0x66])]());});}))];return window[_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x110973([0x72,0x61,0x63,0x65])](_0x57cdf6)[_0x110973([0x74,0x68,0x65,0x6e])](()=>_0x259f7c);}async function _0x2b6a82(){await _0x2753fe,_0x46039c[_0x110973([0x6d,0x6f,0x64,0x65,0x6c])][_0x110973([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x39fdc6,_0x46039c[_0x110973([0x6d,0x6f,0x64,0x65,0x6c])][_0x110973([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x39fdc6,_0x46039c[_0x110973([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x110973([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xc69a17(){return _0x513383(_0x110973([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x222582(_0x110973([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x110973([0x73,0x74,0x61,0x74,0x65])]==_0x110973([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1477fb(){return _0x513383(_0x110973([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 _0x42d028(){return _0x513383(_0x110973([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4a65a4(_0x168866){const _0xe67c5d=_0x16950b();_0x46039c[_0xe67c5d]=_0x110973([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x168866,_0x168866!=_0x110973([0x56,0x61,0x6c,0x69,0x64])&&_0x2b6a82();}function _0x16950b(){const _0x1b578f=window[_0x110973([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x110973([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x110973([0x6e,0x6f,0x77])]())[_0x110973([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x110973([0x2e]),'');let _0xa8a109=_0x110973([0x68]);for(let _0x33128a=0x0;_0x33128a<_0x1b578f[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x33128a+=0x2){let _0x1ee5b8=window[_0x110973([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b578f[_0x110973([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x33128a,_0x33128a+0x2));_0x1ee5b8>=_0x24356f[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1ee5b8-=_0x24356f[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xa8a109+=_0x24356f[_0x1ee5b8];}return _0xa8a109;}function _0x53b98b(){const _0x4fdd0e=_0x3f067c[_0x110973([0x73,0x70,0x6c,0x69,0x74])](_0x110973([0x2e]));if(0x3!=_0x4fdd0e[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x465ca0(_0x4fdd0e[0x1]);function _0x465ca0(_0x2055ac){const _0x4a37b3=_0xb26d1a(_0x2055ac);return _0x4a37b3&&_0x577578()?_0x4a37b3:null;function _0x577578(){const _0x2fbc24=_0x4a37b3[_0x110973([0x6a,0x74,0x69])],_0x4689ee=window[_0x110973([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2fbc24[_0x110973([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2fbc24[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x139ef7={..._0x4a37b3,[_0x110973([0x6a,0x74,0x69])]:_0x2fbc24[_0x110973([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2fbc24[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x139ef7[_0x110973([0x76,0x63])],_0x44340c(_0x139ef7)==_0x4689ee;}}}async function _0xd7436c(){let _0x233a35=!0x0;try{const _0x2bf09=_0x3f067c[_0x110973([0x73,0x70,0x6c,0x69,0x74])](_0x110973([0x2e])),[_0xc3e997,_0xef11c6,_0x5eebe1]=_0x2bf09;return _0x1f2624(_0xc3e997),await _0x44c969(_0xc3e997,_0xef11c6,_0x5eebe1),_0x233a35;}catch{return!0x1;}function _0x1f2624(_0x1761e6){const _0x572724=_0xb26d1a(_0x1761e6);_0x572724&&_0x572724[_0x110973([0x61,0x6c,0x67])]==_0x110973([0x45,0x53,0x32,0x35,0x36])||(_0x233a35=!0x1);}async function _0x44c969(_0x296d7a,_0x3743c5,_0x44cce0){const _0x55cb5e=window[_0x110973([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x110973([0x66,0x72,0x6f,0x6d])](_0x2c8b71(_0x44cce0),_0x3a22c6=>_0x3a22c6[_0x110973([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x49f16d=new window[(_0x110973([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x110973([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x296d7a+_0x110973([0x2e])+_0x3743c5),_0x4b6dde=window[_0x110973([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x110973([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4b6dde)return;const _0x155e31=await _0x4b6dde[_0x110973([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x110973([0x6a,0x77,0x6b]),_0x13bc57,{[_0x110973([0x6e,0x61,0x6d,0x65])]:_0x110973([0x45,0x43,0x44,0x53,0x41]),[_0x110973([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x110973([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x110973([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4b6dde[_0x110973([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x110973([0x6e,0x61,0x6d,0x65])]:_0x110973([0x45,0x43,0x44,0x53,0x41]),[_0x110973([0x68,0x61,0x73,0x68])]:{[_0x110973([0x6e,0x61,0x6d,0x65])]:_0x110973([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x155e31,_0x55cb5e,_0x49f16d)||(_0x233a35=!0x1);}}function _0xb26d1a(_0x433a8f){return _0x433a8f[_0x110973([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x110973([0x65,0x79]))?JSON[_0x110973([0x70,0x61,0x72,0x73,0x65])](_0x2c8b71(_0x433a8f)):null;}function _0x2c8b71(_0xf89742){return window[_0x110973([0x61,0x74,0x6f,0x62])](_0xf89742[_0x110973([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x110973([0x2b]))[_0x110973([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x110973([0x2f])));}function _0x44340c(_0x2820d9){let _0x2d5179=0x1505;function _0x4f720e(_0xbe7a09){for(let _0x24ca9b=0x0;_0x24ca9b<_0xbe7a09[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x24ca9b++){const _0xba7a16=_0xbe7a09[_0x110973([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x24ca9b);_0x2d5179=(_0x2d5179<<0x5)+_0x2d5179+_0xba7a16,_0x2d5179&=_0x2d5179;}}function _0x2a9bdd(_0x1b7f99){Array[_0x110973([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1b7f99)?_0x1b7f99[_0x110973([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2a9bdd):_0x1b7f99&&typeof _0x1b7f99==_0x110973([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x110973([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1b7f99)[_0x110973([0x73,0x6f,0x72,0x74])]()[_0x110973([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x524b61,_0x29d9ef])=>{_0x4f720e(_0x524b61),_0x2a9bdd(_0x29d9ef);}):_0x4f720e(window[_0x110973([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1b7f99));}return _0x2a9bdd(_0x2820d9),_0x2d5179>>>0x0;}function _0x56b5a5(_0x29f3c6){return _0x29f3c6[_0x110973([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x110973([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x110973([0x30]));}function _0x388e1e(_0x113c43){return _0x113c43[_0x110973([0x73,0x70,0x6c,0x69,0x74])]('')[_0x110973([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x110973([0x6a,0x6f,0x69,0x6e])]('');}function _0x513383(_0x4829d8){return _0x46039c[_0x110973([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x110973([0x68,0x61,0x73])](_0x4829d8);}function _0x222582(_0x63d8e0){return _0x46039c[_0x110973([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x110973([0x67,0x65,0x74])](_0x63d8e0);}function _0x39fdc6(){}function _0x110973(_0x528942){return _0x528942['map'](_0x36017c=>String['fromCharCode'](_0x36017c))['join']('');}_0x4a65a4(await _0x18599b());}(this);}['destroy'](){const _0x34c2e9=this['editor']['plugins']['get'](o),_0x2f340e=this['editor']['config']['get']('collaboration.channelId');for(const _0x416fc9 of _0x34c2e9['getCommentThreads']({'channelId':_0x2f340e}))_0x34c2e9['_detachCommentThread'](_0x416fc9['id']),_0x34c2e9['_threads']['delete'](_0x416fc9['id']);super['destroy']();}['hasMarkerForId'](_0x2422e7){return this['getAllMarkersForId'](_0x2422e7)['length']>0x0;}['getAllMarkersForId'](_0x3f4ee6){const _0x2d3220=[];for(const _0x591887 of this['editor']['model']['markers'])_0x591887['name']['startsWith']('comment:'+_0x3f4ee6)&&_0x2d3220['push'](_0x591887);return _0x2d3220;}['scrollToThreadMarker'](_0x213e45){setTimeout(()=>{const _0x472846=this['_getTargetForId'](_0x213e45);if(!_0x472846)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x213e45&&nt({'target':_0x472846[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x205ee8){this['editor']['model']['change'](()=>{for(const _0x45cf0e of this['getAllMarkersForId'](_0x205ee8))this['editor']['editing']['reconvertMarker'](_0x45cf0e);});}['_attachArchivedThread'](_0x11a99c){const _0x12a8b8=this['editor']['plugins']['get'](o),_0x9524e1=this['editor']['plugins']['get'](b),_0xb14de0=_0x12a8b8['getCommentThread'](_0x11a99c);if(!_0xb14de0['isAttached']){const _0x2ad0ed=_0xb14de0['attachTo'](()=>this['_getTargetForId'](_0xb14de0['id']));_0x9524e1['registerAnnotation'](_0x2ad0ed),_0xb14de0['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x109548=this['editor'],_0x11b4ae=_0x109548['plugins']['get'](it);_0x109548['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5b7d16,_0x49bf0b)=>{const {id:_0x5eb4c2}=ft(_0x5b7d16['markerName']),_0x4fb11d=_0x109548['plugins']['get'](o)['getCommentThread'](_0x5eb4c2),_0x108618=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5eb4c2;let _0x1246c4;if(_0x4fb11d&&_0x4fb11d['isResolved']&&!_0x108618&&_0x5b7d16['item'])return _0x49bf0b['consumable']['consume'](_0x5b7d16['item'],'addMarker:'+_0x5b7d16['markerName']),_0x49bf0b['consumable']['consume'](_0x5b7d16['item'],'removeMarker:'+_0x5b7d16['markerName']),null;const _0x55cd01=['ck-comment-marker'];return _0x108618&&_0x55cd01['push']('ck-comment-marker--active'),_0x1246c4=_0x4fb11d?.['length']?_0x4fb11d['comments']['first']['author']['id']:_0x11b4ae['me']['id'],{'classes':_0x55cd01,'attributes':{'data-comment':_0x5eb4c2,'data-author-id':_0x1246c4}};}}),_0x109548['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3c2631,{options:_0x3e4878})=>{if(_0x3e4878['showCommentHighlights'])return null;const _0x4126ec=_0x109548['plugins']['get'](o),_0x40410d=_0x109548['model']['markers']['get'](_0x3c2631),{id:_0x559c21,part:_0xa01a61}=ft(_0x3c2631);return _0x40410d&&!_0x40410d['affectsData']||_0x3e4878['ignoreResolvedComments']&&_0x4126ec['getCommentThread'](_0x559c21)?.['isResolved']?null:{'group':'comment','name':_0xa01a61?_0x559c21+':'+_0xa01a61:_0x559c21};}}),_0x109548['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2d4bda,{writer:_0x23b686})=>_0x23b686['createElement']('$marker',{'data-name':'comment:'+_0x2d4bda['getAttribute']('id')})}),_0x109548['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x57f8a0=this['editor'],_0x592832=_0x57f8a0['plugins']['get'](o),_0x1c70b9=new Set(),_0x3c4be7=new Set();_0x57f8a0['model']['document']['registerPostFixer'](_0x309a83=>{let _0x2e5f6d=!0x1;for(const {name:_0x306077,data:_0x3b6bdc}of _0x57f8a0['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d721c,id:_0x10ef85}=ft(_0x306077);let _0x12748f=_0x3b6bdc['newRange'];if('comment'!==_0x3d721c||!_0x12748f)continue;const _0x2d1138='$graveyard'===_0x12748f['root']['rootName'];_0x2d1138||(_0x12748f=ht(_0x12748f,_0x57f8a0['model']),!_0x12748f||_0x12748f['isCollapsed']||!_0x3b6bdc['newRange']||_0x12748f['isEqual'](_0x3b6bdc['newRange']))?_0x57f8a0['model']['hasContent'](_0x12748f)&&!_0x2d1138?this['isThreadsLoadingPaused']?_0x1c70b9['add'](_0x306077):this['_handleThreadMarker'](_0x306077,_0x10ef85):(_0x3c4be7['add'](_0x306077),_0x1c70b9['delete'](_0x306077),_0x309a83['removeMarker'](_0x306077),_0x2e5f6d=!0x0):(_0x309a83['updateMarker'](_0x306077,{'range':_0x12748f}),_0x2e5f6d=!0x0);}return _0x2e5f6d;}),this['on']('change:isThreadsLoadingPaused',(_0x45adc3,_0x445de8,_0x537d88)=>{if(!_0x537d88&&_0x1c70b9['size'])for(const _0x20a8c9 of _0x1c70b9){const {id:_0x4ec1ad}=ft(_0x20a8c9);_0x1c70b9['delete'](_0x20a8c9),_0x57f8a0['model']['markers']['get'](_0x20a8c9)&&this['_handleThreadMarker'](_0x20a8c9,_0x4ec1ad);}}),this['listenTo'](_0x57f8a0['model']['document'],'change',()=>{for(const {name:_0x5e5658,data:{newRange:_0x5d0955}}of _0x57f8a0['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1198ce,id:_0x3d5208}=ft(_0x5e5658);if('comment'!==_0x1198ce)continue;const _0x4cf993=_0x592832['getCommentThread'](_0x3d5208),_0x342cc5=this['hasMarkerForId'](_0x3d5208);_0x4cf993&&(!_0x4cf993['_hasTargetInContent']&&_0x5d0955&&_0x57f8a0['editing']['view']['once']('render',()=>{const _0x2c82e0=_0x57f8a0['plugins']['get'](y),_0x38e908=_0x592832['_threadToController']['get'](_0x4cf993)['view'];_0x2c82e0['getByInnerView'](_0x38e908)['refreshVisibility']();},{'priority':'low'}),_0x4cf993['_hasTargetInContent']=_0x342cc5||!!_0x5d0955),_0x5d0955||(_0x3c4be7['add'](_0x5e5658),_0x1c70b9['delete'](_0x5e5658));}for(const _0x1834c3 of _0x3c4be7){const {id:_0x5742d4}=ft(_0x1834c3),_0x115819=_0x592832['getCommentThread'](_0x5742d4);if(_0x1c70b9['delete'](_0x1834c3),!_0x115819)continue;const _0x1b53be=this['hasMarkerForId'](_0x5742d4);_0x1b53be||_0x115819['isSubmitted']?_0x1b53be||_0x115819['unlinkedAt']||_0x115819['setUnlinkedAt'](new Date()):_0x115819['remove']();}_0x3c4be7['clear']();});}['_handleInitialThreads'](_0x27c178){_0x27c178['forEach'](_0x3d8f3a=>{_0x3d8f3a['unlinkedAt']&&this['_attachArchivedThread'](_0x3d8f3a['id']);});}['_getTargetForId'](_0x3fa6cb){const _0x408584=this['editor'],_0x564c00=this['getAllMarkersForId'](_0x3fa6cb);return et(_0x408584['editing'],_0x564c00);}['_getTextContext'](_0x2d0321){const _0x295824=this['getAllMarkersForId'](_0x2d0321);let _0x296ef0='',_0x4c33fa=!0x1;for(const _0x49df5d of _0x295824){const _0x31a1d9=_0x49df5d['getRange']();for(const _0x399420 of Array['from'](_0x31a1d9['getItems']()))_0x399420['is']('$textProxy')?(_0x296ef0&&_0x4c33fa&&(_0x296ef0+='\x20',_0x4c33fa=!0x1),_0x296ef0+=_0x399420['data']):_0x4c33fa=!0x0;_0x4c33fa=!0x0;}return _0x296ef0['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xe919c6,_0x3ed8af){const _0x124572=this['editor'],_0x182b87=_0x124572['plugins']['get'](o);let _0x206ee0=_0x182b87['getCommentThread'](_0x3ed8af);const _0x3cc622=_0x124572['config']['get']('collaboration.channelId'),_0x964856=_0x124572['plugins']['get'](b);if(_0x206ee0&&(_0x206ee0['unlinkedAt']&&_0x206ee0['setUnlinkedAt'](null),_0x206ee0['isAttached']))return _0x206ee0;return!this['getAllMarkersForId'](_0x3ed8af)[0x0]['managedUsingOperations']?_0x124572['editing']['view']['once']('render',()=>{if(_0x182b87['getCommentThread'](_0x3ed8af))return;const _0x35f708=_0x124572['plugins']['get'](y);_0x206ee0=_0x182b87['openNewCommentThread']({'channelId':_0x3cc622,'threadId':_0x3ed8af,'target':()=>this['_getTargetForId'](_0x3ed8af),'context':{'type':'text','value':this['_getTextContext'](_0x3ed8af)}});const _0xc21d39=_0x182b87['_threadToController']['get'](_0x206ee0)['view'],_0x30e965=_0x35f708['getByInnerView'](_0xc21d39);_0x30e965&&_0x964856['registerAnnotation'](_0x30e965);},{'priority':'low'}):_0x182b87['fetchCommentThread']({'channelId':_0x3cc622,'threadId':_0x3ed8af})['then'](_0x1ef6af=>{if('destroyed'!==_0x124572['state']){if(_0x206ee0=_0x1ef6af,_0x206ee0&&!_0x206ee0['isAttached']){const _0x144e10=_0x206ee0['attachTo'](()=>this['_getTargetForId'](_0x3ed8af));_0x964856['registerAnnotation'](_0x144e10),_0x206ee0['isResolved']&&this['_reconvertMarkers'](_0x3ed8af);}else{if(!_0x206ee0){const _0x467f8b=this['getAllMarkersForId'](_0x3ed8af);_0x124572['model']['change'](_0x42836b=>{for(const _0x22c3ea of _0x467f8b)_0x42836b['removeMarker'](_0x22c3ea);});}}}}),_0x206ee0;}['_handleThreadMarker'](_0x19aad7,_0x2b6834){const _0xd6a32b=this['_attachMarkerToThread'](_0x19aad7,_0x2b6834);_0xd6a32b&&!_0xd6a32b['context']&&_0xd6a32b['setContext']({'type':'text','value':this['_getTextContext'](_0x2b6834)});}['_initAriaMarkerChangeAnnouncements'](){const _0x21f0f9=this['editor'];rt(_0x21f0f9['model'],({left:_0x3d4e73,entered:_0xd2535b})=>{for(const _0x2fa994 of _0x3d4e73)if(mt(_0x2fa994)){_0x21f0f9['ui']['ariaLiveAnnouncer']['announce'](N(_0x21f0f9['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x43e8e6 of _0xd2535b)if(mt(_0x43e8e6)){_0x21f0f9['ui']['ariaLiveAnnouncer']['announce'](N(_0x21f0f9['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x158e83)));break;}});}}function dt(_0x1128e9,_0x5bca3c){return _0x5bca3c?_0x1128e9+':'+_0x5bca3c:_0x1128e9;}function ht(_0x25aa5a,_0x536d17){const _0x345422=_0x536d17['schema'],_0x4a6851=_0x536d17['createRange'](_0x25aa5a['start']);for(const _0x4980e7 of _0x25aa5a['getWalker']()){const {type:_0x3c7251,item:_0x19ef68,nextPosition:_0x4f6f8f}=_0x4980e7;if('text'===_0x3c7251||_0x345422['isObject'](_0x19ef68)){const _0x2f8cfd=_0x536d17['createPositionBefore'](_0x19ef68);_0x4a6851['isCollapsed']&&(_0x4a6851['start']=_0x2f8cfd),_0x4a6851['end']=_0x4f6f8f;}}return _0x4a6851;}function mt(_0x35649f){return'comment'===ft(_0x35649f['name'])['group'];}class s extends _0x8104b3{['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 _0x529802=this['editor'],_0x328fda=_0x529802['plugins']['get'](o),_0x2a7998=_0x529802['plugins']['get'](r),_0x3ad77d=_0x529802['plugins']['get'](y),_0x296c2e=_0x529802['plugins']['get'](b);_0x529802['ui']['componentFactory']['add']('comment',()=>{const _0x1eff28=this['_createUIButton'](_0x8118da);return _0x1eff28['tooltip']=!0x0,_0x1eff28;}),_0x529802['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5c9447)),_0x296c2e['addSourceCollector'](()=>{const _0x160ff4=[];for(const [_0x472775,_0x52e26e]of _0x328fda['_threadToController']){const _0x17e486=_0x2a7998['getAllMarkersForId'](_0x472775['id']),_0x5e3bf5=_0x17e486['map'](_0x3bf174=>_0x3bf174['getRange']());_0x17e486['length']>0x0&&_0x160ff4['push']([_0x52e26e['view'],_0x5e3bf5]);}return _0x160ff4;}),this['listenTo'](_0x3ad77d,'change:activeAnnotations',(_0x60c19f,_0x290319,_0x2088a4)=>{const _0xcb941c=Array['from'](_0x2088a4)['map'](_0x23f34c=>_0x23f34c['innerView'])['find'](_0x1df1e=>_0x328fda['_viewToController']['has'](_0x1df1e));if(!_0xcb941c)return void(_0x2a7998['activeMarker']=null);const _0x29fcca=_0x328fda['_viewToController']['get'](_0xcb941c)['model']['id'],_0x2db42f='comment:'+_0x29fcca;_0x29fcca&&_0x2a7998['hasMarkerForId'](_0x29fcca)?_0x2a7998['activeMarker']=_0x2db42f:_0x2a7998['activeMarker']&&(_0x2a7998['activeMarker']=null);}),this['listenTo'](_0x328fda,'removeCommentThread',(_0x109d65,{threadId:_0x24c1f6,isFromAdapter:_0x2f7c88})=>{!_0x2f7c88&&_0x529802['ui']['focusTracker']['isFocused']&&_0x2a7998['hasMarkerForId'](_0x24c1f6)&&_0x529802['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x328fda,'addComment',(_0x50b652,{threadId:_0x1fa6ab,isFromAdapter:_0x5c5a92})=>{if(_0x5c5a92||!_0x2a7998['hasMarkerForId'](_0x1fa6ab)||!_0x328fda['hasCommentThread'](_0x1fa6ab))return;0x1===_0x328fda['getCommentThread'](_0x1fa6ab)['length']&&(_0x529802['editing']['view']['focus'](),_0x50b652['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x53cc39=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1c2161;for(const _0x13eef8 in _0x53cc39){const _0x1b4f4d=_0x13eef8,_0xf76509=_0x53cc39[_0x1b4f4d];if('commentsLicenseKeyValid'==_0xf76509||'commentsLicenseKeyInvalid'==_0xf76509||'commentsLicenseKeyExpired'==_0xf76509||'commentsLicenseKeyDomainLimit'==_0xf76509||'commentsLicenseKeyNotAllowed'==_0xf76509||'commentsLicenseKeyEvaluationLimit'==_0xf76509||'commentsLicenseKeyTrialLimit'==_0xf76509||'commentsLicenseKeyUsageLimit'==_0xf76509){delete _0x53cc39[_0x1b4f4d],_0x1c2161=_0xf76509,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1c2161&&_0x53cc39['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1c2161&&_0x53cc39['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1c2161&&_0x53cc39['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1c2161&&_0x53cc39['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1c2161&&_0x53cc39['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1c2161&&_0x53cc39['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1c2161&&_0x53cc39['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3ff3eb){const _0x5bb416=this['editor'],_0x4364b2=new _0x3ff3eb(_0x5bb416['locale']),_0xf79054=_0x5bb416['commands']['get']('addCommentThread');return _0x4364b2['set']({'label':N(_0x5bb416['locale'],'Comment'),'icon':_0x4a5b76}),_0x4364b2['bind']('isEnabled')['to'](_0xf79054,'hasContent'),this['listenTo'](_0x4364b2,'execute',()=>{_0xf79054['execute']();}),_0x4364b2;}}class i extends _0x8104b3{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1fd095){super(_0x1fd095),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2d79b5,_0x32e84b,_0x21fcaf)=>{_0x21fcaf?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4a50ca,_0x4f6f18]of this['editor']['commands'])_0x4f6f18['affectsData']&&'addCommentThread'!==_0x4a50ca&&_0x4f6f18['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 _0x16eb52=this['editor']['editing']['view']['document'];this['listenTo'](_0x16eb52,'cut',_0x6c9c3e=>_0x6c9c3e['stop'](),{'priority':'highest'}),this['listenTo'](_0x16eb52,'clipboardInput',_0x1634ac=>_0x1634ac['stop'](),{'priority':'highest'}),this['listenTo'](_0x16eb52,'delete',_0xbc5149=>_0xbc5149['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3f8ded,_0x1eb8d0]of this['editor']['commands'])_0x1eb8d0['affectsData']&&'addCommentThread'!==_0x3f8ded&&_0x1eb8d0['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 _0xfe7412{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf3d1ec){super(_0xf3d1ec),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2cc353=this['context']['plugins']['get'](y);this['listenTo'](_0x2cc353,'_activateAnnotation',(_0x2a9267,_0x18c81b)=>{for(const _0x2f42ab of this['activeUIs']){const _0x4f0240=this['_uis']['get'](_0x2f42ab);(0x0,this['uisData']['get'](_0x2f42ab)['filter'])(_0x18c81b)&&_0x4f0240['setActiveAnnotation'](_0x18c81b);}}),this['listenTo'](_0x2cc353,'_deactivateAllAnnotations',()=>{for(const _0x1b65de of this['activeUIs']){this['_uis']['get'](_0x1b65de)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2cc353['_visibleAnnotations'],'add',(_0x2f9c85,_0x19c567)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x19c567);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1f47f2){return this['activeUIs']['has'](_0x1f47f2);}['activate'](_0x4747be,_0x53bcf6=this['defaultFilter']){const _0x4a09c5=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x4747be))throw new _0xd3f428('annotationsuis-missing-ui',this,{'uiName':_0x4747be});this['isActive'](_0x4747be)&&this['deactivate'](_0x4747be),this['activeUIs']['add'](_0x4747be);const _0x18e553=new S();v({'source':_0x4a09c5['_visibleAnnotations'],'target':_0x18e553,'filter':_0x53bcf6}),this['uisData']['set'](_0x4747be,{'collection':_0x18e553,'filter':_0x53bcf6});const _0x24feb9=this['_uis']['get'](_0x4747be);_0x24feb9['attach'](_0x18e553),this['listenTo'](_0x24feb9,'change:activeAnnotation',(_0x71deef,_0x5deade,_0x525a68,_0x355ac5)=>{_0x355ac5&&_0x4a09c5['_removeActiveAnnotation'](_0x355ac5),_0x525a68&&_0x4a09c5['_addActiveAnnotation'](_0x525a68);});}['deactivate'](_0x39fb89){if(this['activeUIs']['delete'](_0x39fb89),!this['_uis']['has'](_0x39fb89))throw new _0xd3f428('annotationsuis-missing-ui',this,{'uiName':_0x39fb89});const _0x7fb676=this['_uis']['get'](_0x39fb89);_0x7fb676['detach'](),this['stopListening'](_0x7fb676),this['uisData']['get'](_0x39fb89)['collection']['destroy'](),this['uisData']['delete'](_0x39fb89);}['switchTo'](_0x33bc12){if(!this['_uis']['has'](_0x33bc12))throw new _0xd3f428('annotationsuis-missing-ui',this,{'uiName':_0x33bc12});const _0x53eff1=this['context']['plugins']['get'](y),_0x2a6292=Array['from'](_0x53eff1['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x33bc12);const _0x4cf459=this['_uis']['get'](_0x33bc12);_0x4cf459['setActiveAnnotation'](_0x2a6292),_0x4cf459['_setSelectedAnnotations']&&_0x2a6292&&_0x4cf459['_setSelectedAnnotations']([_0x2a6292]);}['deactivateAll'](){for(const _0x1c8bca of this['activeUIs'])this['deactivate'](_0x1c8bca);}['register'](_0x48fde3,_0x5cb140){if(this['_uis']['has'](_0x48fde3))throw new _0xd3f428('annotationsuis-register-already-registered');if('function'!=typeof _0x5cb140['attach']||'function'!=typeof _0x5cb140['detach']||'function'!=typeof _0x5cb140['setActiveAnnotation'])throw new _0xd3f428('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x48fde3,_0x5cb140);}['refilterAnnotations'](){const _0x3505ff=this['context']['plugins']['get'](y)['collection'],_0x121bef=new Map(),_0x10cd73=Array['from'](this['activeUIs']);for(const _0xb5d6d of this['activeUIs']){const _0x5bd0bf=this['uisData']['get'](_0xb5d6d)['collection'];for(const _0x44d038 of _0x5bd0bf)_0x121bef['set'](_0x44d038,_0xb5d6d);}for(const _0x3148ed of _0x3505ff){const _0x14555b=_0x121bef['get'](_0x3148ed);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3148ed);const _0x93c522=_0x10cd73['find'](_0x507915=>this['uisData']['get'](_0x507915)['filter'](_0x3148ed));_0x14555b!==_0x93c522&&(_0x14555b&&this['uisData']['get'](_0x14555b)['collection']['remove'](_0x3148ed),_0x93c522&&this['uisData']['get'](_0x93c522)['collection']['add'](_0x3148ed));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xbcb640){const _0x26b243=[];for(const _0x3f9dfa of this['activeUIs']){(0x0,this['uisData']['get'](_0x3f9dfa)['filter'])(_0xbcb640)&&_0x26b243['push'](_0x3f9dfa);}if(_0x26b243['length']>0x1)throw new _0xd3f428('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x26b243,'annotationType':_0xbcb640['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x25b8e7){super(_0x25b8e7);const _0xe6b761=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 _0x5ead02(),this['focusCycler']=new _0x76289f({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0xe6b761['to']('class')],'style':{'minHeight':_0xe6b761['to']('minHeight',_0x59dd0c=>'number'==typeof _0x59dd0c?_i(_0x59dd0c+0xa):null)},'dir':_0x25b8e7['uiLanguageDirection'],'role':'application','aria-label':N(_0x25b8e7,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x25b8e7,'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',_0xd10e97=>{this['_updateItemPositionInFocusables'](_0xd10e97['source']);}),this['list']['forEach'](_0x98780=>{this['focusTracker']['add'](_0x98780['element']),this['_updateItemPositionInFocusables'](_0x98780);}),this['list']['on']('change',(_0x56edba,_0x38c9a1)=>{for(const _0x32b2b8 of _0x38c9a1['removed'])this['focusTracker']['remove'](_0x32b2b8['element']),this['focusables']['remove'](_0x32b2b8);for(const _0x53bb44 of _0x38c9a1['added'])this['focusTracker']['add'](_0x53bb44['element']),this['_updateItemPositionInFocusables'](_0x53bb44);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x34eff0){const _0x55f5fe=this['focusables']['getIndex'](_0x34eff0);let _0x33c2c9,_0xf46845;for(const _0x7e5cab of this['focusables'])if(_0x34eff0['top']<_0x7e5cab['top']){_0x33c2c9=_0x7e5cab;break;}if(_0xf46845=_0x33c2c9?this['focusables']['getIndex'](_0x33c2c9):this['focusables']['length'],-0x1!==_0x55f5fe){if(_0x55f5fe===_0xf46845-0x1)return;this['focusables']['remove'](_0x34eff0),_0xf46845=_0x33c2c9?this['focusables']['getIndex'](_0x33c2c9):this['focusables']['length'];}this['focusables']['add'](_0x34eff0,_0xf46845);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4fa8c1){super(_0x4fa8c1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x140a33,_0x4f4428)=>_0x140a33+_0x4f4428),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x39e96e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x39e96e['to']('isAnimationDisabled',_0x5c47da=>_0x5c47da?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x39e96e['to']('top',_0x3e9196=>Ot(_0x3e9196))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x272de2=this['element']['clientHeight'];_0x272de2&&(this['height']=_0x272de2);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xfe7412{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53c64a){super(_0x53c64a),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 _0x299084=this['context']['config']['get']('sidebar.container');_0x299084&&this['setContainer'](_0x299084);}['setContainer'](_0x4297ea){if(!g(_0x4297ea))throw new _0xd3f428('sidebar-setcontainer-invalid-element');this['container']=_0x4297ea;}['_attachToContainer']({viewClass:_0x55293='',spaceBetweenItems:_0x29c546=0x19}={}){if(!g(this['container']))throw new _0xd3f428('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x55293,this['_spaceBetweenItems']=_0x29c546;}['rearrange']({removedAnnotation:_0x36df09,previousAnnotation:_0x1b858b,nextAnnotation:_0x36ab27}){const _0x1919b8=this['getSidebarItemView'](_0x36df09);this['view']['list']['remove'](_0x1919b8),this['_destroySidebarItemView'](_0x36df09),_0x1b858b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1b858b)),_0x36ab27&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x36ab27)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x586391,activatedAnnotation:_0x17af6d,disableAnimationOnActivatedAnnotation:_0x400b65}){if(this['_activeAnnotation']=_0x17af6d,_0x586391){_0x586391['isActive']=!0x1;const _0x10e103=this['getSidebarItemView'](_0x586391);_0x10e103&&_0x400b65&&(_0x10e103['isAnimationDisabled']=!0x1);}if(_0x17af6d){const _0x2c63fb=this['getSidebarItemView'](_0x17af6d);_0x2c63fb&&(_0x17af6d['isActive']=!0x0,_0x400b65&&(_0x2c63fb['isAnimationDisabled']=!0x0,_0x2c63fb['top']+=0x1),this['_alignToTargetRect'](_0x2c63fb));}}['_detachFromContainer'](_0x58d40d){if(this['view']['element']['remove'](),_0x58d40d){for(const _0x5cfce5 of _0x58d40d)this['_destroySidebarItemView'](_0x5cfce5);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x312ca5,_0x39b089){_0x39b089||(_0x39b089=_0x312ca5['view']);const _0x2073a9=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2073a9,_0x312ca5),this['_annotationToSidebarItemView']['set'](_0x312ca5,_0x2073a9),_0x2073a9['content']['add'](_0x39b089),this['listenTo'](_0x312ca5['view'],'change:targetRect',(_0x223742,_0x47ea46,_0x5c6d22)=>{const _0x5e6612=this['_getTargetTop'](_0x312ca5,_0x5c6d22);_0x2073a9['_targetTop']!=_0x5e6612&&(_0x2073a9['_targetTop']=_0x5e6612,this['_setItemTop'](_0x2073a9,_0x5e6612));}),this['listenTo'](_0x2073a9,'change:top',()=>{this['_recalculate'](_0x2073a9,'top');}),this['listenTo'](_0x2073a9,'change:bottom',()=>{this['_recalculate'](_0x2073a9,'bottom');}),this['_alignToTargetRect'](_0x2073a9);const _0x4095ac=this['_getItemBefore'](_0x2073a9);if(_0x4095ac)this['_alignAfterItem'](_0x4095ac,_0x2073a9)||this['_alignToTargetRect'](_0x2073a9);else this['_alignToTargetRect'](_0x2073a9);return this['_updateLastItem'](),this['view']['list']['add'](_0x2073a9),_0x2073a9;}['_alignForTopChange'](_0x412b1a){if(!_0x412b1a['content']['length'])return;const _0x1b9ba1=this['_getItemBefore'](_0x412b1a);if(!_0x1b9ba1)return;const _0x2ff565=this['_sidebarItemViewToAnnotation']['get'](_0x1b9ba1),_0x293bea=this['_activeAnnotation'];_0x293bea&&_0x293bea===_0x2ff565?this['_alignAfterItem'](_0x1b9ba1,_0x412b1a):this['_alignBeforeItem'](_0x412b1a,_0x1b9ba1);}['_alignForBottomChange'](_0x543276){if(!_0x543276['content']['length'])return;const _0x2df675=this['_getItemAfter'](_0x543276);if(!_0x2df675)return;const _0x266c2c=this['_sidebarItemViewToAnnotation']['get'](_0x2df675),_0x19dc83=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3d8e63=this['_activeAnnotation'];_0x3d8e63&&_0x3d8e63===_0x266c2c&&_0x19dc83?(this['_alignBeforeItem'](_0x2df675,_0x543276),this['_alignAfterItem'](_0x543276,_0x2df675)):_0x3d8e63&&_0x3d8e63===_0x266c2c?this['_alignBeforeItem'](_0x2df675,_0x543276):this['_alignAfterItem'](_0x543276,_0x2df675);}['_recalculate'](_0x3a1ebc,_0x610007){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x44c36f,changedProp:_0x4c4640}of this['_recalculateBuffer'])'top'===_0x4c4640?this['_alignForTopChange'](_0x44c36f):this['_alignForBottomChange'](_0x44c36f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3a1ebc,'changedProp':_0x610007});}['getSidebarItemView'](_0x8e2121){return this['_annotationToSidebarItemView']['get'](_0x8e2121);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x43d3ca){const _0x5f170c=this['getSidebarItemView'](_0x43d3ca);this['stopListening'](_0x5f170c),this['stopListening'](_0x43d3ca['view']),_0x5f170c['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x43d3ca),this['_sidebarItemViewToAnnotation']['delete'](_0x5f170c);}['_createSidebarView'](){const _0x3a18a5=new H(this['context']['locale']);return _0x3a18a5['render'](),this['on']('change:_lastItem',(_0x1654ea,_0x40a789,_0x4e2a28,_0x4b41fc)=>{_0x4b41fc&&_0x3a18a5['unbind']('minHeight'),_0x4e2a28?_0x3a18a5['bind']('minHeight')['to'](_0x4e2a28,'bottom'):_0x3a18a5['minHeight']=null;}),_0x3a18a5;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x16be55){const _0x374004=this['_sidebarItemViewToAnnotation']['get'](_0x16be55),_0x440ade=_0x374004&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x374004)-0x1);return _0x440ade&&this['getSidebarItemView'](_0x440ade)||null;}['_getItemAfter'](_0x199321){const _0x271a6a=this['_sidebarItemViewToAnnotation']['get'](_0x199321),_0x82e87f=_0x271a6a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x271a6a)+0x1);return _0x82e87f&&this['getSidebarItemView'](_0x82e87f)||null;}['_alignBeforeItem'](_0x647d40,_0x4cbbd7){_0x647d40['updateHeight']();const _0x702838=G(_0x4cbbd7['bottom']+this['_spaceBetweenItems'],_0x647d40['top']);return!!_0x702838&&(this['_setItemTop'](_0x4cbbd7,_0x4cbbd7['top']-_0x702838),!0x0);}['_alignAfterItem'](_0x4870c0,_0x43dc51){_0x4870c0['updateHeight']();const _0x572c73=G(_0x4870c0['bottom']+this['_spaceBetweenItems'],_0x43dc51['top']);return!!_0x572c73&&(this['_setItemTop'](_0x43dc51,_0x43dc51['top']+_0x572c73,!0x1),!0x0);}['_alignToTargetRect'](_0x175689){const _0x418704=this['_sidebarItemViewToAnnotation']['get'](_0x175689);if(!_0x418704||!_0x418704['target']||!_0x418704['targetRect'])return;const _0x2f8128=this['_getTargetTop'](_0x418704,_0x418704['targetRect']);this['_setItemTop'](_0x175689,_0x2f8128);}['_getTargetTop'](_0x4b52f9,_0x497f03){if(null===_0x497f03)return 0x0;if(_0x4b52f9['target']instanceof _0x57fdd2)return _0x497f03['top'];{const _0x3164f1=new _0x57fdd2(this['view']['element'])['top'];return _0x497f03['top']-_0x3164f1;}}['_setItemTop'](_0x18a27d,_0x3b7e2b,_0x55bcc0=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x55bcc0&&(_0x3b7e2b=Math['max'](_0x3b7e2b,this['_getMaxAvailableTop'](_0x18a27d))),_0x18a27d['top']=_0x3b7e2b;}['_getMaxAvailableTop'](_0x1ad5c2){let _0x35e1bc=this['_getItemBefore'](_0x1ad5c2),_0x59c520=0x0;for(;_0x35e1bc;)_0x35e1bc['updateHeight'](),_0x59c520+=this['_spaceBetweenItems']+_0x35e1bc['height'],_0x35e1bc=this['_getItemBefore'](_0x35e1bc);return _0x59c520;}}function G(_0x110976,_0x4e3d49){return Math['max'](_0x110976-_0x4e3d49,0x0);}function g(_0x4db17f){return null!==_0x4db17f&&'object'==typeof _0x4db17f&&0x1===_0x4db17f['nodeType'];}class e extends _0xfe7412{['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(_0x41c909){super(_0x41c909),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4d4ef2(),this['_refreshPositioningDebounced']=_0x5e0d3b(()=>{_0x41c909['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x47e926=this['context']['plugins']['get'](j),_0x5a0a0f=this['context']['plugins']['get'](z);_0x47e926['register']('wideSidebar',this),_0x5a0a0f['container']&&_0x47e926['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3442a5){if(_0x3442a5===this['activeAnnotation'])return;const _0x196b34=this['context']['plugins']['get'](z);_0x196b34['_activeAnnotation']=_0x3442a5;const _0x25dd4f=this['activeAnnotation'];_0x196b34['refresh']({'blurredAnnotation':_0x25dd4f,'activatedAnnotation':_0x3442a5}),this['activeAnnotation']=_0x3442a5;}['attach'](_0x4a1f9a){this['annotations']=_0x4a1f9a;const _0xf02720=this['context']['plugins']['get'](z);if(_0xf02720['_annotations']=_0x4a1f9a,this['isAttached'])throw new _0xd3f428('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xf02720,'set:container',()=>{this['detach'](),this['listenTo'](_0xf02720,'change:container',_0x51fc73=>{_0x51fc73['off'](),this['attach'](_0x4a1f9a);});}),_0xf02720['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x38a800=_0x4ccc89=>{_0x4ccc89['updateTargetRect'](),_0xf02720['addAnnotation'](_0x4ccc89);};for(const _0x31adff of _0x4a1f9a)_0x38a800(_0x31adff);this['listenTo'](_0x4a1f9a,'add',(_0x3389bc,_0x39ab54)=>{_0x38a800(_0x39ab54);}),this['listenTo'](_0x4a1f9a,'remove',(_0x24acd3,_0x1d6512,_0x54b503)=>{_0xf02720['rearrange']({'removedAnnotation':_0x1d6512,'previousAnnotation':_0x4a1f9a['get'](_0x54b503-0x1),'nextAnnotation':_0x4a1f9a['get'](_0x54b503+0x1)}),_0x1d6512===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4a1f9a,'focus',(_0x2a88b0,_0x16db5e)=>{this['setActiveAnnotation'](_0x16db5e);}),this['listenTo'](_0x4a1f9a,'blur',()=>{this['setActiveAnnotation'](null);});const _0x34044e=this['context']instanceof _0x45e0d7?this['context']['editors']:new _0x4d4ef2([this['context']]);for(const _0x2da22b of _0x34044e)this['_integrateWithEditorAnnotations'](_0x2da22b);this['listenTo'](_0x34044e,'add',(_0xf4d091,_0xc6c3d)=>{this['listenTo'](_0xc6c3d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xc6c3d);});}),this['listenTo'](_0x34044e,'remove',(_0x1e3789,_0x4d5636)=>{_0x4d5636['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4d5636['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xd3f428('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1063e0=this['context']['plugins']['get'](z);_0x1063e0['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1063e0),this['stopListening'](this['annotations']),this['context']instanceof _0x45e0d7&&this['stopListening'](this['context']['editors']);for(const _0x1f34d1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1f34d1);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2c1d4a){if(!_0x2c1d4a['plugins']['has']('EditorAnnotations'))return;const _0x1b224a=_0x2c1d4a['plugins']['get']('EditorAnnotations'),_0x16abd7=()=>{const _0x46c0ab=_0x1b224a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x46c0ab[0x0]||null);};this['listenTo'](_0x1b224a,'refresh',_0x16abd7),this['listenTo'](_0x1b224a,'blur',(_0x14c5cf,{isAnnotationTracked:_0x263ca3})=>{this['activeAnnotation']&&_0x263ca3(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1b224a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x33bbfc=>{_0x1b224a['hasDomSelection']()&&(_0x16abd7(),_0x33bbfc['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1b224a);}['_destroyEditorAnnotationsIntegration'](_0x1edfbe){this['stopListening'](_0x1edfbe),this['_editorAnnotations']['remove'](_0x1edfbe);}}class C extends _0x8118da{['counterView'];constructor(_0x461e0d){super(_0x461e0d);const _0x45a638=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4a1afd,_0x2936c3)=>_0x4a1afd?'...':_0x2936c3['toString']()),this['set']('annotationType',''),this['icon']=_0x4a5b76,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x45a638['to']('annotationType',_0x2e9013=>'ck-annotation-counter__badge--'+_0x2e9013),_0x45a638['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x45a638['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xfe7412{['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(_0x45d288){super(_0x45d288),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x39efeb())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4d4ef2(),this['_refreshPositioningDebounced']=_0x5e0d3b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3051f9(this['context']['locale']),this['balloonPanelView']=new _0x175f2a(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1ee68e){this['annotations']=_0x1ee68e;const _0xe142e3=this['context']['plugins']['get'](z),_0x2152b3=this['balloonPanelView'];if(_0xe142e3['_annotations']=_0x1ee68e,this['isAttached'])throw new _0xd3f428('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xe142e3,'set:container',()=>{this['detach'](),this['listenTo'](_0xe142e3,'change:container',_0x58c037=>{_0x58c037['off'](),this['attach'](_0x1ee68e);});}),_0xe142e3['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3d9218=_0x1cd3e0=>{const _0x5e4406=new C(this['context']['locale']);_0xe142e3['addAnnotation'](_0x1cd3e0,_0x5e4406),this['_annotationToNarrowView']['set'](_0x1cd3e0,_0x5e4406),_0x5e4406['bind']('isDirty','annotationType','number')['to'](_0x1cd3e0['view'],'isDirty','type','length'),_0x5e4406['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2152b3['content']['first']!==_0x1cd3e0['view']?(this['_showBalloon'](_0x1cd3e0),_0x1cd3e0['view']['element']['focus'](),this['setActiveAnnotation'](_0x1cd3e0)):this['setActiveAnnotation'](null);});};for(const _0x352f19 of _0x1ee68e)_0x3d9218(_0x352f19);this['listenTo'](_0x1ee68e,'add',(_0x45f29d,_0x290243)=>{_0x3d9218(_0x290243);}),this['listenTo'](_0x1ee68e,'remove',(_0x24d736,_0xbe701e,_0x4b5db8)=>{this['_annotationToNarrowView']['get'](_0xbe701e)['destroy'](),this['_annotationToNarrowView']['delete'](_0xbe701e),_0xe142e3['rearrange']({'removedAnnotation':_0xbe701e,'previousAnnotation':_0x1ee68e['get'](_0x4b5db8-0x1),'nextAnnotation':_0x1ee68e['get'](_0x4b5db8+0x1)}),_0xbe701e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1ee68e,'focus',(_0x123bbc,_0x1f3c36)=>{this['setActiveAnnotation'](_0x1f3c36);}),this['listenTo'](_0x1ee68e,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x505889,_0x576a3d)=>{_0x576a3d['keyCode']===_0x226af2['esc']&&_0x2152b3['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2152b3['content']['first']),this['_hideBalloon'](),_0x576a3d['stopPropagation'](),_0x576a3d['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5b79bf,_0x290a66)=>{const _0x1d8898=_0x290a66['target'];_0x2152b3['isVisible']&&_0x2152b3['element']['contains'](_0x1d8898)||_0xe142e3['view']['element']['contains'](_0x1d8898)||_0x5b79bf['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x93f6d8=>_0x93f6d8['contains'](_0x1d8898))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x39f170=this['context']instanceof _0x45e0d7?this['context']['editors']:new _0x4d4ef2([this['context']]);for(const _0x5a09a7 of _0x39f170)this['_integrateWithEditorAnnotations'](_0x5a09a7);this['listenTo'](_0x39f170,'add',(_0x50253d,_0x17471b)=>{this['listenTo'](_0x17471b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x17471b);});}),this['listenTo'](_0x39f170,'remove',(_0x3bdd2e,_0x3a434f)=>{_0x3a434f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3a434f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x245de0){if(_0x245de0===this['activeAnnotation'])return;const _0x5e9897=this['context']['plugins']['get'](z);if(_0x5e9897['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x245de0,'disableAnimationOnActivatedAnnotation':!0x0}),_0x245de0)_0x5e9897['getSidebarItemView'](_0x245de0)?this['_showBalloon'](_0x245de0):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x245de0;}['detach'](){if(!this['isAttached'])throw new _0xd3f428('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5ee313=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xaf7b7d=>_0xaf7b7d['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5ee313['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x45e0d7&&this['stopListening'](this['context']['editors']);for(const _0x5664d3 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5664d3);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'](_0x2540c2){if(!_0x2540c2['plugins']['has']('EditorAnnotations'))return;const _0x46472b=_0x2540c2['plugins']['get']('EditorAnnotations'),_0x40fb46=this['context']['plugins']['get'](z),_0x41f83a=this['annotations'],_0x57e100=this['balloonPanelView'],_0x52d4a5=()=>{const _0xfb1e96=_0x46472b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xfb1e96),this['setActiveAnnotation'](_0xfb1e96[0x0]||null);};this['listenTo'](_0x46472b,'refresh',_0x52d4a5),this['listenTo'](_0x46472b,'blur',(_0x6f7510,{isAnnotationTracked:_0x194780})=>{this['activeAnnotation']&&_0x194780(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x46472b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x41f83a,'blur',_0x11f84e=>{_0x46472b['hasDomSelection']()&&_0x11f84e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x501805,_0x33f8b5)=>{const _0x2f81f7=_0x33f8b5['target'];_0x57e100['isVisible']&&_0x57e100['element']['contains'](_0x2f81f7)||_0x40fb46['view']['element']['contains'](_0x2f81f7)||this['activeAnnotation']&&_0x46472b['hasDomSelection']()&&(_0x52d4a5(),_0x501805['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x46472b);}['_destroyEditorAnnotationsIntegration'](_0x24dc7d){_0x24dc7d&&(this['stopListening'](_0x24dc7d),this['_editorAnnotations']['remove'](_0x24dc7d));}['_setSelectedAnnotations'](_0x22ebdc){for(const _0x3a4978 of this['_selectedAnnotations'])_0x22ebdc['includes'](_0x3a4978)||this['_manuallyClosedAnnotationViews']['delete'](_0x3a4978['view']);this['_selectedAnnotations']=_0x22ebdc;}['_refreshPositioning'](){const _0x26baac=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x26baac['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x5e6f05){if(this['_manuallyClosedAnnotationViews']['has'](_0x5e6f05['view']))return;const _0x42c799=this['balloonPanelView']['content']['first'];_0x42c799!==_0x5e6f05['view']?(_0x42c799&&this['_detachListeners'](_0x42c799),this['_attachListeners'](_0x5e6f05['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x5e6f05['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x40febb=this['balloonPanelView']['content']['first'],_0xf6f868=_0x40febb&&this['annotations']['getByView'](_0x40febb);if(!_0xf6f868||!this['_annotationToNarrowView']['has'](_0xf6f868))return;const _0x2fac36=this['_annotationToNarrowView']['get'](_0xf6f868)['element'],_0x5d4021=(function(){const _0x55ac4d=_0x175f2a['defaultPositions'];return[_0x55ac4d['southArrowNorthEast'],_0x55ac4d['northArrowSouthEast'],_0x55ac4d['southArrowNorth'],_0x55ac4d['northArrowSouth'],_0x55ac4d['southArrowNorthWest'],_0x55ac4d['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2fac36,'positions':_0x5d4021});}['_hideBalloon'](){const _0x40adf1=this['balloonPanelView'],_0x44290b=_0x40adf1['content']['first'];_0x44290b&&(this['_detachListeners'](_0x44290b),_0x40adf1['unpin'](),_0x40adf1['content']['clear']());}['_attachListeners'](_0x69b6c3){this['listenTo'](_0x69b6c3,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x69b6c3,'Esc',(_0x85033a,_0x57ea71)=>{this['_manuallyClosedAnnotationViews']['add'](_0x69b6c3),this['_hideBalloon'](),_0x57ea71();});}['_detachListeners'](_0x4f1949){this['stopListening'](_0x4f1949);}}class c extends _0x8104b3{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x22e13d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x37e609){super(_0x37e609),_0x37e609['editing']['view']['addObserver'](_0x127348),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x37e609['plugins']['get'](_0x22e13d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x4517ab=this['editor']['plugins']['get'](j);_0x4517ab['context']===this['editor']&&(_0x4517ab['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x5be56b,_0x51f324)=>{const _0x3349e8=this['_balloon'];if(this['isAttached']&&_0x3349e8['visibleView']){const _0x4d5b9f=this['annotations']['getByView'](_0x3349e8['visibleView']);_0x4d5b9f&&this['_closeAnnotation'](_0x4d5b9f),_0x51f324();}}));}['afterInit'](){const _0x450119=this['editor']['plugins']['get'](j);_0x450119['context']===this['editor']&&(_0x450119['hasActive']()||_0x450119['switchTo']('inline'));}['setActiveAnnotation'](_0x24326b){_0x24326b!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x24326b&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x24326b)&&this['_addAnnotationToBalloon'](_0x24326b,!0x0),_0x24326b['isActive']=!0x0),_0x24326b||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x24326b);}['attach'](_0x53b163){this['annotations']=_0x53b163;const _0x14a421=this['editor']['plugins']['get'](j),_0x449665=this['_balloon'];if(this['isAttached'])throw new _0xd3f428('inlineannotations-attach-already-attached',this);if(_0x14a421['context']!==this['editor'])throw new _0xd3f428('inlineannotations-not-allowed-with-context',this);const _0x24c515=this['editor']['plugins']['get'](b);this['listenTo'](_0x24c515,'refresh',()=>{const _0x315919=_0x24c515['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1706e2,_0x3ca196;!this['_forceRefresh']&&(_0x1706e2=_0x315919,_0x3ca196=this['_selectedAnnotations'],_0x1706e2['length']===_0x3ca196['length']&&_0x1706e2['every'](_0x4edd65=>_0x3ca196['includes'](_0x4edd65)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x315919),this['setActiveAnnotation'](_0x315919[0x0]||null));}),this['listenTo'](_0x24c515,'blur',(_0x78602a,{isAnnotationTracked:_0x1eba82})=>{this['activeAnnotation']&&_0x1eba82(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x31d6d7,_0x2c9209,_0x3f1830)=>{_0x3f1830||this['setActiveAnnotation'](null);}),this['listenTo'](_0x53b163,'remove',(_0x44549f,_0x5dbc8)=>{this['_removeAnnotationFromBalloon'](_0x5dbc8),_0x5dbc8===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x449665,'change:visibleView',(_0x35a97c,_0x3d54c6,_0x308603,_0xf1e3e5)=>{_0xf1e3e5&&this['stopListening'](_0xf1e3e5);const _0x366eda=_0x53b163['getByView'](_0x308603);_0x308603&&_0x366eda&&(this['listenTo'](_0x308603,'change:height',()=>{_0x449665['updatePosition']();}),this['listenTo'](_0x308603,'Esc',()=>{this['_closeAnnotation'](_0x366eda),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x366eda&&this['setActiveAnnotation'](_0x366eda));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x449665['visibleView']&&(_0x53b163['getByView'](_0x449665['visibleView'])&&_0x449665['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 _0xd3f428('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1d3d1d of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1d3d1d);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x5e49d2){for(const _0x3775dd of this['_selectedAnnotations'])_0x5e49d2['includes'](_0x3775dd)||this['_manuallyClosed']['delete'](_0x3775dd);for(const _0x32afe3 of this['annotations'])_0x5e49d2['includes'](_0x32afe3)||this['_removeAnnotationFromBalloon'](_0x32afe3);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xe4b2e5 of _0x5e49d2)this['_addAnnotationToBalloon'](_0xe4b2e5);}this['_selectedAnnotations']=_0x5e49d2;}['_addAnnotationToBalloon'](_0x589d41,_0x14f76d=!0x1){this['_manuallyClosed']['has'](_0x589d41)||(this['_addedAnnotations']['has'](_0x589d41)||this['_balloon']['hasView'](_0x589d41['view'])||(this['_addedAnnotations']['add'](_0x589d41),this['_balloon']['add']({'stackId':_0x589d41['view']['id'],'view':_0x589d41['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x589d41)}})),_0x14f76d&&this['_balloon']['showStack'](_0x589d41['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4cdf55){const _0x4f4ce9=_0x4cdf55['target'],_0x1616d2=this['editor']['editing']['view'],_0x9cfbc=_0x1616d2['document']['selection']['getFirstRange'](),_0x176923=_0x1616d2['domConverter']['viewRangeToDom'](_0x9cfbc);if(_0x176923['collapse'](!0x0),_0x4f4ce9){if(_0x4f4ce9 instanceof _0x57fdd2)return _0x4f4ce9;let _0x2c09a9=[];for(const _0x51d47b of _0x4f4ce9)_0x2c09a9['push'](...F(_0x51d47b['getClientRects']()));_0x2c09a9=function(_0x23e054){const _0x17db31=[];let _0x5edb13=_0x23e054[0x0];for(let _0x2f67ce=0x1;_0x2f67ce<_0x23e054['length'];_0x2f67ce++)P(_0x5edb13,_0x23e054[_0x2f67ce])?_0x5edb13['width']+=_0x23e054[_0x2f67ce]['width']:(_0x17db31['push'](_0x5edb13),_0x5edb13=_0x23e054[_0x2f67ce]);return _0x17db31['push'](_0x5edb13),_0x17db31;}(_0x2c09a9);const _0x21cd4b=_0x176923['getBoundingClientRect']();return _0x2c09a9['find'](_0x3eb13c=>_0x3eb13c['top']<=_0x21cd4b['top']&&_0x3eb13c['bottom']>=_0x21cd4b['bottom']&&_0x3eb13c['left']<=_0x21cd4b['left']&&_0x3eb13c['right']>=_0x21cd4b['right'])||_0x2c09a9[0x0];}return _0x4cdf55['targetRect']||_0x176923;}['_removeAnnotationFromBalloon'](_0x527576){this['_addedAnnotations']['has'](_0x527576)&&this['_balloon']['hasView'](_0x527576['view'])&&(this['_addedAnnotations']['delete'](_0x527576),this['_balloon']['remove'](_0x527576['view']));}['_closeAnnotation'](_0x58e196){this['_manuallyClosed']['add'](_0x58e196),this['_removeAnnotationFromBalloon'](_0x58e196);}}function F(_0x1a2b09){return Array['from'](_0x1a2b09)['map'](DOMRect['fromRect']);}function P(_0x1a0bdd,_0x7293fd){return _0x1a0bdd['top']===_0x7293fd['top']&&_0x1a0bdd['bottom']===_0x7293fd['bottom']&&_0x1a0bdd['right']===_0x7293fd['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x39b1eb,_0xd3096b){super(_0x39b1eb),this['set']('isEmpty',!_0xd3096b['length']),this['focusTracker']=new _0x5ead02(),this['_annotationViews']=_0xd3096b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x76289f({'focusables':_0xd3096b,'focusTracker':this['focusTracker']}),this['listenTo'](_0xd3096b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xd3096b,'remove',(_0x206248,_0x1dbc8c)=>{_0x1dbc8c['isActive']&&this['focus'](),_0xd3096b['length']||(this['isEmpty']=!0x0);});const _0x5dc09a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x39b1eb,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xd3096b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5dc09a['if']('isEmpty','ck-hidden',_0x36a63d=>!_0x36a63d)]},'children':[{'text':N(_0x39b1eb,'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 _0x6b7b58 of this['_annotationViews'])this['focusTracker']['add'](_0x6b7b58['element']);this['_annotationViews']['on']('change',(_0x11830a,{added:_0x586197,removed:_0x2f382f})=>{for(const _0x40ff35 of _0x586197)this['focusTracker']['add'](_0x40ff35['element']);for(const _0x2f9ecd of _0x2f382f)this['focusTracker']['remove'](_0x2f9ecd['element']);});}}class p extends _0xfe7412{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x419e1b){super(_0x419e1b),this['archivedThreads']=new _0x4d4ef2();}['init'](){const _0x402838=this['context'],_0xad26f2=_0x402838['plugins']['get'](o),_0x37ba24=_0x402838['plugins']['get'](y);this['listenTo'](_0xad26f2,'addCommentThread',(_0x112e02,{threadId:_0x167a34})=>{const _0x2cbec8=_0xad26f2['getCommentThread'](_0x167a34);_0x2cbec8['archivedAt']&&this['archivedThreads']['add'](_0x2cbec8,this['_calculatePosition'](_0x2cbec8['archivedAt'])),this['listenTo'](_0x2cbec8,'change:archivedAt',(_0x22c10f,_0x1105b3,_0x166860)=>{_0x166860?this['archivedThreads']['has'](_0x2cbec8)||this['archivedThreads']['add'](_0x2cbec8,this['_calculatePosition'](_0x2cbec8['archivedAt'])):this['archivedThreads']['has'](_0x2cbec8)&&this['archivedThreads']['remove'](_0x2cbec8);});}),this['listenTo'](_0xad26f2,'removeCommentThread',(_0x587f2c,{threadId:_0x3096af})=>{const _0x4430a2=_0xad26f2['getCommentThread'](_0x3096af);this['stopListening'](_0x4430a2),this['archivedThreads']['has'](_0x4430a2)&&this['archivedThreads']['remove'](_0x4430a2);},{'priority':'highest'}),this['listenTo'](_0x37ba24['collection'],'focus',(_0x58d9fc,_0x32b0e6)=>{_0x32b0e6['isVisible']||(_0x32b0e6['isActive']=!0x0,_0x37ba24['activate'](_0x32b0e6));});}['_calculatePosition'](_0x8c71d6){const _0x2536a7=[...this['archivedThreads']]['findIndex'](_0x4b876d=>_0x4b876d['archivedAt']<_0x8c71d6);return _0x2536a7>-0x1?_0x2536a7:this['archivedThreads']['length'];}}class a extends _0x8104b3{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x24c213];}constructor(_0x49b88b){super(_0x49b88b),this['annotationViews']=new _0x6ba4d4(),this['_pendingThreads']=[];}['init'](){const _0x2ac217=this['editor'],_0x1453e2=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2ac217['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x8118da,!0x0)),_0x2ac217['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x262f72=this['_createCommentsArchiveButton'](_0x5c9447);return _0x262f72['set']({'role':'menuitemcheckbox'}),_0x262f72;});const _0x20612a=_0x2ac217['plugins']['get'](p),_0x2cd808=_0x2ac217['plugins']['get']('Annotations'),_0x56850a=_0x2ac217['plugins']['get']('CommentsRepository');_0x20612a['archivedThreads']['forEach'](_0x31d5ad=>{this['_handleNewThread'](_0x31d5ad);}),this['listenTo'](_0x20612a['archivedThreads'],'add',(_0x25fbd2,_0x39c5e5)=>{this['_handleNewThread'](_0x39c5e5);}),this['listenTo'](_0x2cd808['collection'],'add',(_0x2e9089,_0x53b4f1)=>{const _0x52f1f9=this['_pendingThreads']['find'](_0x4bd92a=>{const _0x1d32d8=_0x56850a['_threadToController']['get'](_0x4bd92a);return _0x1d32d8&&_0x53b4f1['innerView']===_0x1d32d8['view'];});if(_0x52f1f9){const _0x55395d=this['_calculatePosition'](_0x52f1f9['archivedAt']);this['annotationViews']['add'](_0x53b4f1['view'],_0x55395d),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x52f1f9),0x1);}}),this['listenTo'](_0x20612a['archivedThreads'],'remove',(_0x4293b2,_0x546756)=>{const _0x188476=_0x2ac217['config']['get']('collaboration.channelId');if(!_0x188476||_0x546756['channelId']===_0x188476){if(this['_pendingThreads']['includes'](_0x546756))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x546756),0x1);else{const _0x11c12e=_0x56850a['_threadToController']['get'](_0x546756),_0x2da11c=_0x2cd808['getByInnerView'](_0x11c12e['view']);this['annotationViews']['remove'](_0x2da11c['view']),this['stopListening'](_0x2da11c['focusableElements']);}}}),this['listenTo'](_0x2cd808['collection'],'add',(_0x24985f,_0x42be5b)=>{this['listenTo'](_0x42be5b,'escape',_0x1453e2);}),this['listenTo'](_0x2cd808['collection'],'remove',(_0x3bdbc0,_0x2cc9f7)=>{this['stopListening'](_0x2cc9f7,'escape',_0x1453e2);});}['_handleNewThread'](_0x16d851){const _0x567ec4=this['editor']['plugins']['get']('CommentsRepository'),_0x1563e7=this['editor']['plugins']['get']('Annotations'),_0x376dae=this['editor']['config']['get']('collaboration.channelId');if(!_0x376dae||_0x16d851['channelId']===_0x376dae){const _0x211b6a=_0x567ec4['_threadToController']['get'](_0x16d851);if(!_0x211b6a)return void this['_pendingThreads']['push'](_0x16d851);const _0x13fb55=this['_calculatePosition'](_0x16d851['archivedAt']),_0x5773de=_0x1563e7['getByInnerView'](_0x211b6a['view']);_0x5773de['isVisible']&&_0x1563e7['_visibleAnnotations']['remove'](_0x5773de),this['annotationViews']['add'](_0x5773de['view'],_0x13fb55);}}['_calculatePosition'](_0x3a4360){const _0x3ff2f4=this['editor']['config']['get']('collaboration.channelId'),_0xf43ec8=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2a2b64=>_0x2a2b64['channelId']===_0x3ff2f4)['findIndex'](_0x58201f=>_0x58201f['archivedAt']<_0x3a4360);return _0xf43ec8<0x0||_0xf43ec8>this['annotationViews']['length']?this['annotationViews']['length']:_0xf43ec8-0x1;}['_toggleDialog'](){const _0x2a420d=this['editor'],_0x3a0130=_0x2a420d['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x2a420d['locale'],this['annotationViews'])),'commentsArchive'===_0x3a0130['id']?_0x3a0130['hide']():_0x3a0130['show']({'id':'commentsArchive','title':N(_0x2a420d['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1d3cb7,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3768f4['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x23819b,_0x59f247=!0x1){const _0x4605f2=this['editor']['locale'],_0xa5de7=this['editor']['plugins']['get']('Dialog'),_0x168645=new _0x23819b(_0x4605f2);return _0x168645['bind']('isEnabled')['to'](this,'isEnabled'),_0x168645['bind']('isOn')['to'](_0xa5de7,'id',_0x36dfdc=>'commentsArchive'===_0x36dfdc),_0x168645['set']({'label':N(_0x4605f2,'COMMENTS_ARCHIVE'),'icon':_0x1d3cb7,'isToggleable':!0x0}),_0x59f247&&(_0x168645['tooltip']=!0x0),this['listenTo'](_0x168645,'execute',()=>this['_toggleDialog']()),_0x168645;}['_hideDialogOnAnnotationEscape']=_0x5cb207=>{const _0x4bd524=_0x5cb207['source'];if(!this['annotationViews']['has'](_0x4bd524['view']))return;const _0x43533d=this['editor']['plugins']['get']('Dialog');_0x43533d['isOpen']&&'commentsArchive'===_0x43533d['id']&&(_0x43533d['hide'](),_0x5cb207['stop']());};}class gi extends _0x8104b3{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};
|