@ckeditor/ckeditor5-comments 46.0.1-alpha.2 → 46.0.1-alpha.3
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(_0xf9b0c9={}){function _0x28ad36(_0x5530e4){return _0x5530e4['map'](_0x2d049d=>String['fromCharCode'](_0x2d049d))['join']('');}(_0xf9b0c9=Object['assign']({},_0xf9b0c9))['plugins']||(_0xf9b0c9['plugins']=Rt['defaultPlugins']),super(_0xf9b0c9),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[_0x28ad36([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x28ad36([0x76,0x69,0x65,0x77])][_0x28ad36([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x28ad36([0x61,0x75,0x74,0x6f]),this[_0x28ad36([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x28ad36([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x28ad36([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x28ad36([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x28ad36([0x6f,0x6b])});}['create'](){const _0x3a99a6=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3a99a6))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4b459d=>{const _0x2756ee=this['model']['document']['getRoot'](),_0x477ceb=_0x2756ee&&_0x2756ee['getChild'](_0x2756ee['childCount']-0x1);_0x4b459d['setSelection'](_0x477ceb,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2d4c77=this['editing']['view'],_0x10295c=_0x2d4c77['document']['getRoot'](),_0x114b7e=_0x10295c['getChild'](0x0);_0x10295c['childCount']>0x1||!_0x114b7e||'p'!=_0x114b7e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x2d4c77,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x114b7e['placeholder']=this['placeholder']),St({'view':_0x2d4c77,'element':_0x114b7e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x114b7e);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x18f9c9,_0x436ae6={}){super(_0x18f9c9),this['editor']=null,this['_editorConfig']=_0x436ae6,this['set']('value',_0x436ae6['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x18f9c9,'Reply...')),this['set']('submitLabel',N(_0x18f9c9,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x10c8da(),this['focusCycler']=new _0x5d5ef9({'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',(_0x29ebcb,_0xfd435a)=>{this['cancelButtonView']['fire']('execute'),_0xfd435a();}),this['keystrokes']['set']('Ctrl+Enter',(_0x1d6e87,_0x3e408c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3e408c());}),this['on']('submit',(_0x387aeb,_0x19f5e0)=>{_0x19f5e0['length']>0xfde8?(alert(N(_0x18f9c9,'TOO_LONG_COMMENT_ALERT',[_0x19f5e0['length'],0xfde8])),_0x387aeb['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 _0x19cf20=this['editor'];this['element']['insertBefore'](_0x19cf20['ui']['element'],this['element']['firstChild']),_0x19cf20['model']['document']['on']('change',()=>this['value']=_0x19cf20['getData']()),_0x19cf20['bind']('placeholder')['to'](this),this['focusables']['add'](_0x19cf20['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x26c280){-0x1===_0x26c280?(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:_0x37d2ef}=this,_0x4adec1=new _0x1c0d89(_0x37d2ef);return _0x4adec1['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4adec1['withText']=!0x0,_0x4adec1['bind']('label')['to'](this,'submitLabel'),_0x4adec1['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4adec1['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x254d48,_0x2d154e)=>!_0x2d154e&&!!_0x254d48['trim']()),_0x4adec1;}['_createCancelButton'](){const {locale:_0x5bf1f9}=this,_0xe98ccc=new _0x1c0d89(_0x5bf1f9);return _0xe98ccc['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xe98ccc['label']=N(_0x5bf1f9,'Cancel'),_0xe98ccc['withText']=!0x0,_0xe98ccc['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xe98ccc;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xed7d1c=>{this['focusTracker']['add'](_0xed7d1c['element']);}),this['focusables']['on']('change',(_0x5bd98f,_0x237ec7)=>{for(const _0x4c4c96 of Array['from'](_0x237ec7['added'])['reverse']())this['focusTracker']['add'](_0x4c4c96['element']);});}}class ie extends kt{constructor(_0x1af197,_0x5eee12,_0x14f78c){super(_0x1af197),this['commentInputView']=new os(_0x1af197,_0x14f78c),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4a27c7,_0x536402)=>_0x4a27c7||!!_0x536402),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 _0xe35d1e(_0x1af197,_0x5eee12),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'](_0x4d2062){this['commentInputView']['focus'](_0x4d2062);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x711ab,_0x2a40fc)=>{const {submitButtonView:_0x32d7e7,cancelButtonView:_0x5ed91c,editor:_0xf03925}=this['commentInputView'];[_0x32d7e7['element'],_0x5ed91c['element'],_0xf03925?_0xf03925['editing']['view']['getDomRoot']():null]['filter'](_0x236d10=>_0x236d10)['some'](_0x38596b=>_0x38596b['contains'](_0x2a40fc['target']))||(this['focus'](),_0x2a40fc['preventDefault']());});}}class rs extends kt{constructor(_0x29e32b){super(_0x29e32b);const _0x38647c=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x38647c['to']('count',_0x25c677=>N(_0x29e32b,'NUMBER_OF_COMMENTS',_0x25c677))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0xeb2c12,_0x402e6a,_0x405aaf){super(_0xeb2c12);const _0x8d3216=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x402e6a['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x402e6a,this['_config']=_0x405aaf,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x10c8da(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5d5ef9({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x332721=>this['commentViews']['map'](_0x521ae6=>_0x521ae6['element'])['includes'](_0x332721['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0xeb2c12),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x231115=>_0x231115-this['_config']['maxCommentsWhenCollapsed']);for(const _0x16d413 of _0x402e6a['comments'])this['_handleNewCommentModel'](_0x16d413);this['_handleInfoComment'](),this['listenTo'](_0x402e6a['comments'],'add',(_0x95e823,_0x3ede2c)=>{const _0x22ac9c=this['_calculatePosition'](_0x3ede2c);this['length']++,this['_handleNewCommentModel'](_0x3ede2c,_0x22ac9c),this['refreshVisibleViews']();}),this['listenTo'](_0x402e6a['comments'],'remove',(_0x409415,_0x140749)=>{this['length']--,this['_handleRemoveCommentModel'](_0x140749),this['refreshVisibleViews']();}),this['listenTo'](_0x402e6a,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x402e6a,'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',_0x8d3216['if']('length','ck-hidden',_0x1530fc=>!_0x1530fc)],'aria-label':N(_0xeb2c12,'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'](_0xefb391){-0x1===_0xefb391?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x53b559 of this['commentViews'])_0x53b559['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x314e25,_0xb2859c){const _0x48be28=new this['_config']['CommentView'](this['locale'],_0x314e25,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x48be28['viewUid']=_0x314e25['id'],_0x48be28['delegate']('removeComment')['to'](this),_0x48be28['delegate']('updateComment')['to'](this),_0x48be28['delegate']('resolveCommentThread')['to'](this),_0x48be28['delegate']('editorReady')['to'](this),_0x48be28['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x48be28,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x48be28,_0xb2859c);}['_calculatePosition'](_0x33c0cc){const _0x475c2a=this['_model']['_findOptimalIndex'](_0x33c0cc);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x33c0cc['authoredAt']?_0x475c2a-0x1:_0x475c2a:_0x475c2a-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3f4e2d={'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'],_0x3f4e2d,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3f4e2d));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x457663){const _0x225410=this['commentViews']['remove'](_0x457663['id']);this['stopListening'](_0x225410),_0x225410['isEditMode']&&this['_updateHasDirtyComment'](),_0x225410['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x22e92e=>_0x22e92e['isEditMode']);}['_rearrangeCollapse'](){const _0x58f41a=function(_0x1a57ad){const _0x2ff4cc=new _0x43cf09();for(const _0xaefb1c of _0x1a57ad)_0x2ff4cc['add'](_0xaefb1c);return _0x2ff4cc;}(this['commentViews']),_0x2238ef=this['_collapsedCommentsView']['count'];for(let _0x43087=0x1;_0x43087<=_0x2238ef;_0x43087++)_0x58f41a['remove'](0x1);for(const _0x851b2f of _0x58f41a)_0x851b2f['collapse']();_0x2238ef>0x0&&_0x58f41a['add'](this['_collapsedCommentsView'],0x1),ns(_0x5e54eb(Array['from'](this['visibleViews']),Array['from'](_0x58f41a)),this['visibleViews'],_0x58f41a);}['_rearrangeExpand'](){ns(_0x5e54eb(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x25ae8a of this['visibleViews'])_0x25ae8a['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1be6e2=>{this['focusTracker']['add'](_0x1be6e2['element']),this['keystrokes']['listenTo'](_0x1be6e2['element']);}),this['commentViews']['on']('change',(_0x20bf3e,_0x34f4b6)=>{for(const _0x6b89bc of _0x34f4b6['removed'])this['focusTracker']['remove'](_0x6b89bc['element']),this['keystrokes']['stopListening'](_0x6b89bc['element']);for(const _0x487c22 of Array['from'](_0x34f4b6['added'])['reverse']())this['focusTracker']['add'](_0x487c22['element']),this['keystrokes']['listenTo'](_0x487c22['element']);});}}function ns(_0x3fe589,_0x40d530,_0x161cd8){let _0x4d9b97=0x0;for(const _0x3bfb5c of _0x3fe589)switch(_0x3bfb5c){case'insert':_0x40d530['add'](_0x161cd8['get'](_0x4d9b97),_0x4d9b97),_0x4d9b97++;break;case'delete':_0x40d530['remove'](_0x4d9b97);break;case'equal':_0x4d9b97++;}}class oe extends kt{constructor(_0x5cc9c3){super(_0x5cc9c3);const _0xbb3321=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xbb3321['to']('contextValue',_0x39c067=>N(_0x5cc9c3,'THREAD_CONTEXT_LABEL',_0x39c067)),'tabindex':-0x1},'children':[{'text':_0xbb3321['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x32cd6a,_0x2080bd){super(_0x32cd6a);const _0x269e95=this['bindTemplate'];this['_model']=_0x2080bd,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x10c8da(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5d5ef9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x2f67d9=>!!_0x2f67d9),this['bind']('contextValue')['to'](this['_model'],'context',_0x41d119=>_0x41d119&&_0x41d119['value']?this['_trimContextValue'](_0x41d119['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',_0x269e95['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 _0x20028c=new _0x1c0d89(this['locale']);return _0x20028c['label']=N(this['locale'],'Reopen'),_0x20028c['tooltip']=N(this['locale'],'Reopen'),_0x20028c['icon']=_0x10dae3,_0x20028c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1815c4=>!_0x1815c4),_0x20028c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x443a66,_0x443c3b)=>_0x443a66&&_0x443c3b),_0x20028c['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x20028c;}['_trimContextValue'](_0x194315){if(_0x194315['length']<0x96)return _0x194315;const _0x1afbd4=_0x194315['lastIndexOf']('\x20',0x93);return _0x194315['substring'](0x0,_0x1afbd4>-0x1?_0x1afbd4:0x93)+'...';}['_attachContextActions'](){const _0x34d638=this['element']['querySelector']('.ck-context'),_0x30c2b4=_0x34d638['querySelector']('.ck-context__value');this['listenTo'](_0x34d638,'mouseenter',()=>{_0x30c2b4['offsetWidth']<_0x30c2b4['scrollWidth']&&_0x34d638['classList']['add']('overlay');}),this['listenTo'](_0x34d638,'mouseleave',()=>{_0x34d638['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3f1cc8 of this['focusables'])this['focusTracker']['add'](_0x3f1cc8['element']),this['keystrokes']['listenTo'](_0x3f1cc8['element']);}['_createContextView'](){const _0x1de13b=new oe(this['locale']);return _0x1de13b['bind']('contextValue')['to'](this),_0x1de13b;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x36de37,_0x5a4baa,_0x295cb1,_0x3a4a1b){super(_0x36de37),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5a4baa,this['_localUser']=_0x295cb1,this['_config']=_0x3a4a1b,this['commentThreadHeaderView']=new Yt(_0x36de37,_0x5a4baa),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x36de37,N(_0x36de37,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x36de37,_0x5a4baa,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3a4a1b)),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',(_0x4dd4dc,_0x506682)=>_0x4dd4dc||!!_0x506682),this['bind']('isUnlinked')['to'](_0x5a4baa,'unlinkedAt',_0x411754=>!!_0x411754),this['bind']('ariaLabel')['to'](this,'length',_0x177155=>{const _0x360ed1=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x177155,_0x360ed1]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x10c8da(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5d5ef9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4b839d=>_0x4b839d['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 _0x489f92=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x27e5df=_0x489f92['commentInputView'];return _0x489f92['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x27e5df,'value',(_0x4b1b33,_0x2f3fb9,_0x5e69c5,_0x291adb,_0x249172)=>!!_0x249172||!!_0x291adb&&_0x5e69c5&&!_0x2f3fb9||_0x4b1b33&&_0x5e69c5&&!_0x2f3fb9),_0x27e5df['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x420b90,_0x48ce5f,_0x4f0d66)=>{let _0x5d96ae;return _0x5d96ae=_0x4f0d66&&_0x48ce5f?'Reply\x20to\x20reopen\x20discussion...':_0x420b90?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5d96ae);}),_0x27e5df['bind']('submitLabel')['to'](this,'length',_0x2faefd=>N(this['locale'],_0x2faefd?'Reply':'Comment')),_0x27e5df['on']('submit',(_0x5be7a7,_0x1fe58b)=>{this['fire']('addComment',_0x1fe58b),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x27e5df['on']('cancel',()=>{this['focus']();}),_0x27e5df['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x27e5df['on']('cancel',_0x2c47e6=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2c47e6['stop']());}),this['on']('change:isActive',(_0x3f9381,_0x3d923a,_0x2bd188)=>{_0x2bd188||this['length']||_0x27e5df['value']||this['fire']('removeCommentThread');}),_0x489f92;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x2d7fa9(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x522c4e,target:_0x3f4060,type:_0x12c4d3,isVisible:_0x245c91=!0x0}){super(),this['view']=_0x522c4e,this['view']['element']||this['view']['render'](),this['_type']=_0x12c4d3,this['_target']=_0x3f4060,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x43cf09([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4f094c,_0x2e6bf9)=>{this['view']['focusTracker']['add'](_0x2e6bf9);}),this['focusableElements']['on']('remove',(_0x1e9dbf,_0x4cd4cb)=>{this['view']['focusTracker']['remove'](_0x4cd4cb);}),this['set']('isVisible',_0x245c91);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2608f1=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2608f1),_0x2608f1;}get['targetRect'](){const _0x565260=this['target'];if(null===_0x565260)return null;if(_0x565260 instanceof _0x2cd921)return _0x565260;const _0x2f4186=_0x565260['filter'](_0x3b1ffc=>function(_0x19dea6){const _0x46e5a2=_0x19dea6['offsetParent'];if(_0x46e5a2)return!0x0;const _0x5d29e2=_0x19dea6['getClientRects']()['item'](0x0);return!!_0x5d29e2;}(_0x3b1ffc));return 0x0===_0x2f4186['length']?null:new _0x2cd921(_0x2f4186[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4729d7){this['view']['isActive']=_0x4729d7,this['view']['mainView']['isActive']=_0x4729d7;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x47d202){if(!(null===_0x47d202||_0x47d202 instanceof _0x2cd921||Array['isArray'](_0x47d202)&&_0x47d202['every'](_0x1d6415=>fi(_0x1d6415))))throw new _0x12528('annotation-invalid-target',null,{'target':_0x47d202});}['_getNormalizedTarget'](){const _0x5e49b5='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5e49b5)?[_0x5e49b5]:_0x5e49b5;}}function fi(_0xf2b6e5){return null!==_0xf2b6e5&&'object'==typeof _0xf2b6e5&&'nodeType'in _0xf2b6e5&&0x1===_0xf2b6e5['nodeType'];}class S extends _0x43cf09{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x107bfa=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x10c8da(),this['_focusTracker']['on']('change:isFocused',(_0x381ab3,_0x54bb2f,_0x2b7509)=>{_0x2b7509||this['fire']('blur');});for(const _0x23466a of _0x107bfa)this['add'](_0x23466a);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x23c9af){if(this['has'](_0x23c9af))throw new _0x12528('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x23c9af['innerView'],_0x23c9af),this['_viewToAnnotation']['set'](_0x23c9af['view'],_0x23c9af);for(const _0xd95fb3 of _0x23c9af['focusableElements'])this['_focusTracker']['add'](_0xd95fb3);this['listenTo'](_0x23c9af['focusableElements'],'add',(_0x28a1ab,_0x5df162)=>{this['_focusTracker']['add'](_0x5df162);}),this['listenTo'](_0x23c9af['focusableElements'],'remove',(_0x1b0741,_0x219f49)=>{this['_focusTracker']['remove'](_0x219f49);}),this['listenTo'](_0x23c9af['view']['focusTracker'],'change:isFocused',(_0x31d859,_0x5cb215,_0x63b2ab)=>{_0x63b2ab&&this['fire']('focus',_0x23c9af);}),_0x23c9af['updateTargetRect']();const _0x388459=this['_getOrderInContent'](_0x23c9af['view']['targetRect']);return super['add'](_0x23c9af,_0x388459);}['remove'](_0x223e0b){if(!this['has'](_0x223e0b))throw new _0x12528('annotationcollection-not-existing-item',null);this['stopListening'](_0x223e0b['view']['focusTracker']),this['stopListening'](_0x223e0b['focusableElements']);for(const _0x47a378 of _0x223e0b['focusableElements'])this['_focusTracker']['remove'](_0x47a378);return this['_viewToAnnotation']['delete'](_0x223e0b['view']),this['_innerViewToAnnotation']['delete'](_0x223e0b['innerView']),super['remove'](_0x223e0b);}['getByInnerView'](_0x453b74){return this['_innerViewToAnnotation']['get'](_0x453b74);}['getByView'](_0x2583a6){return this['_viewToAnnotation']['get'](_0x2583a6);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x4de879 of this)_0x4de879['updateTargetRect']();this['_sort']();}['_sort'](){const _0x6bb2ad=Array['from'](this)['sort']((_0x15131d,_0x5ec70d)=>w(_0x15131d['view']['targetRect'],_0x5ec70d['view']['targetRect']));for(let _0x3953c1=_0x6bb2ad['length']-0x1;_0x3953c1>0x0;_0x3953c1--){const _0x3e17c4=_0x6bb2ad[_0x3953c1];_0x3953c1!==this['getIndex'](_0x3e17c4)&&(this['remove'](_0x3e17c4),this['add'](_0x3e17c4));}}['_getOrderInContent'](_0x39a080){let _0x5b53c4=0x0;if(!_0x39a080)return this['length'];for(const _0x26124a of this){const _0x2a5d63=_0x26124a['view']['targetRect'];if(_0x2a5d63){if(w(_0x39a080,_0x2a5d63)<0x0)return _0x5b53c4;_0x5b53c4++;}}return _0x5b53c4;}}function v({source:_0x3fb97e,target:_0x42eb6b,filter:_0x4a224c}){for(const _0x3ebe8b of _0x3fb97e)_0x4a224c(_0x3ebe8b)&&_0x42eb6b['add'](_0x3ebe8b);_0x42eb6b['listenTo'](_0x3fb97e,'add',(_0x4dd867,_0x5ae0f3)=>{_0x4a224c(_0x5ae0f3)&&_0x42eb6b['add'](_0x5ae0f3);}),_0x42eb6b['listenTo'](_0x3fb97e,'remove',(_0x8235bb,_0x3ba02c)=>{_0x42eb6b['has'](_0x3ba02c)&&_0x42eb6b['remove'](_0x3ba02c);});}function w(_0x2d38f2,_0x573ea1){if(null===_0x2d38f2&&null===_0x573ea1)return 0x0;if(null===_0x2d38f2)return-0x1;if(null===_0x573ea1)return 0x1;const _0x211498=_0x2d38f2['top']-_0x573ea1['top'];return 0x0==_0x211498?_0x2d38f2['left']-_0x573ea1['left']:_0x211498;}class y extends _0x38c614{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c2e22){if(super(_0x3c2e22),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3c2e22 instanceof _0x252157){const _0x3af7d7=_0x3c2e22['locale'];_0x3c2e22['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x3af7d7,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x3af7d7,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x3af7d7,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x3af7d7,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x3af7d7,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x3af7d7,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x3af7d7,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x594596){this['collection']['add'](_0x594596);}['remove'](_0x309c23){this['collection']['remove'](_0x309c23),_0x309c23['destroy']();}['refreshVisibility'](){for(const _0x11313f of this['collection'])_0x11313f['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1b456d){return this['collection']['getByInnerView'](_0x1b456d);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x42d29a of this['collection'])_0x42d29a['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4a5e18){this['fire']('_activateAnnotation',_0x4a5e18);}['createAnnotation'](_0x49c0e8){return new T(_0x49c0e8);}['createAnnotationView'](_0x3d4b53,_0x2bbf37){return new E(_0x3d4b53,_0x2bbf37);}['_addActiveAnnotation'](_0x147606){const _0x3ef089=new Set(this['activeAnnotations']);_0x3ef089['add'](_0x147606),this['activeAnnotations']=_0x3ef089;}['_removeActiveAnnotation'](_0x3ca198){const _0x1f9c22=new Set(this['activeAnnotations']);_0x1f9c22['delete'](_0x3ca198),this['activeAnnotations']=_0x1f9c22;}['_bindAnnotationsToVisibleAnnotations'](){const _0x240432=this['collection'],_0x451f29=this['_visibleAnnotations'];function _0x490ecf(_0x34b6b9){const _0x1514d0=_0x34b6b9['source'];_0x1514d0['isVisible']&&!_0x451f29['has'](_0x1514d0)?_0x451f29['add'](_0x1514d0):!_0x1514d0['isVisible']&&_0x451f29['has'](_0x1514d0)&&_0x451f29['remove'](_0x1514d0),_0x1514d0['view']['focusTracker']['remove'](_0x1514d0['view']['element']),_0x1514d0['view']['focusTracker']['add'](_0x1514d0['view']['element']);}this['listenTo'](_0x240432,'add',(_0x5bff0b,_0x4258f1)=>{_0x4258f1['isVisible']&&_0x451f29['add'](_0x4258f1),this['listenTo'](_0x4258f1,'change:isVisible',_0x490ecf);}),this['listenTo'](_0x240432,'remove',(_0x35bdbd,_0x440d59)=>{_0x451f29['has'](_0x440d59)&&_0x451f29['remove'](_0x440d59),this['stopListening'](_0x440d59,'change:isVisible',_0x490ecf);});}['_setupEnterAnnotationKeystroke'](){const _0x120749=_0x43bf7b=>{_0x43bf7b['on']('ready',()=>{_0x43bf7b['keystrokes']['set'](_0x725a77,(_0x121a80,_0x3c4f96)=>{const _0x4d651a=_0x17287c(this['activeAnnotations']['values']());_0x4d651a&&(_0x4d651a['view']['focus'](),_0x3c4f96());});});};this['context']instanceof _0x252157?_0x120749(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x47f63f,_0x4d7d61)=>{_0x120749(_0x4d7d61);});}['_setupEscapeAnnotationHandling'](){const _0x1df307=_0x364f62=>{const _0x258cef=_0x364f62['source'],_0x24454e=[];let _0x395e8c;if(Array['isArray'](_0x258cef['target'])){_0x395e8c=_0x258cef['target'][0x0],this['context']instanceof _0x252157?_0x24454e['push'](this['context']):this['context']['editors']&&_0x24454e['push'](...this['context']['editors']);for(const _0x2fb447 of _0x24454e)for(const _0x92063f of _0x2fb447['editing']['view']['domRoots']['values']())if(_0x92063f['contains'](_0x395e8c))return void _0x2fb447['editing']['view']['focus']();_0x395e8c['focus']();}};this['listenTo'](this['collection'],'add',(_0x251f8f,_0x3ca61b)=>{this['listenTo'](_0x3ca61b,'escape',_0x1df307,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xed360f,_0x3578b5)=>{this['stopListening'](_0x3578b5,'escape',_0x1df307);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x38c614{['_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(_0x31554e){super(_0x31554e),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2518e0=this['context']['config'];_0x2518e0['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2518e0['define']('comments.maxThreadTotalWeight',0x1f4),_0x2518e0['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2518e0['define']('comments.CommentThreadView',gt),_0x2518e0['define']('comments.CommentView',Tt),_0x2518e0['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x36b956=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2eb756,_0x2ab3bf)=>this['_addCommentThread'](_0x2ab3bf)),this['on']('submitCommentThread',(_0x555806,_0x40c9e3)=>this['_submitCommentThread'](_0x40c9e3)),this['on']('resolveCommentThread',(_0x1e1dd7,_0x5ef708)=>this['_resolveCommentThread'](_0x5ef708)),this['on']('resolveCommentThread',(_0xa20168,_0x920108)=>this['_updateActiveAnnotation'](_0x920108),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x252cf8,_0x2bf58d)=>this['_reopenCommentThread'](_0x2bf58d)),this['on']('reopenCommentThread',(_0x4b02c0,_0x13b4ba)=>this['_updateActiveAnnotation'](_0x13b4ba),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x54de38,_0x2bbd17)=>this['_removeCommentThread'](_0x2bbd17)),this['on']('updateCommentThread',(_0x4e9275,_0xae92d2)=>this['_updateCommentThread'](_0xae92d2)),this['on']('updateCommentThread',(_0x2f1043,_0x577d77)=>this['_updateActiveAnnotation'](_0x577d77),{'priority':'lowest'}),this['on']('addComment',(_0x18caed,_0x4b6b10)=>this['_addComment'](_0x4b6b10)),this['on']('updateComment',(_0x241112,_0x4a2c2b)=>this['_updateComment'](_0x4a2c2b)),this['on']('removeComment',(_0x54df55,_0x121181)=>this['_removeComment'](_0x121181)),this['on']('addComment',(_0x18629f,{threadId:_0x433d5a,isFromAdapter:_0x41781a})=>{if(_0x41781a)return;const _0xb72eef=this['getCommentThread'](_0x433d5a),_0x56d896=_0xb72eef&&this['_threadToController']['get'](_0xb72eef);_0x56d896&&_0x56d896['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x36b956,'change:activeAnnotations',(_0x12b7d9,_0x1b12d8,_0x17cf9c)=>{const _0x14c453=Array['from'](_0x17cf9c)['map'](_0x226d5f=>this['_viewToController']['get'](_0x226d5f['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x14c453?_0x14c453['model']:null;});}set['adapter'](_0x2b7436){if(this['_adapter'])throw new _0x12528('commentsrepository-adapter-already-set');this['_adapter']=_0x2b7436;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x145376=_t,threadId:_0x1de963=_0x3b6e3a(),comments:_0xb2bc52=[],unlinkedAt:_0xb7b1ff=null,resolvedAt:_0x46f1ac=null,resolvedBy:_0x213a6a=null,target:_0x358a01=null,context:_0x25881a=null,attributes:_0x2865d8={},isResolvable:_0xc285e1=!0x0,isSubmitted:_0x1e7ed0=!0x1,isFromAdapter:_0x48fb2d=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x145376),{'channelId':_0x145376,'threadId':_0x1de963,'comments':_0xb2bc52,'unlinkedAt':_0xb7b1ff,'resolvedAt':_0x46f1ac,'resolvedBy':_0x213a6a,'target':_0x358a01,'context':_0x25881a,'attributes':_0x2865d8,'isFromAdapter':_0x48fb2d,'isResolvable':_0xc285e1,'isSubmitted':_0x1e7ed0}),this['getCommentThread'](_0x1de963);}['openNewCommentThread']({channelId:_0x3b9abe=_t,threadId:_0x28f669=_0x3b6e3a(),target:_0x176538,context:_0x52cbe=null,isResolvable:_0x17183a=!0x0}){if(this['_readOnlyChannels']['has'](_0x3b9abe)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x176538)throw new _0x12528('commentsrepository-missing-target');const _0x2f1433=this['addCommentThread']({'channelId':_0x3b9abe,'threadId':_0x28f669,'target':_0x176538,'context':_0x52cbe,'isResolvable':_0x17183a});if(!_0x2f1433)return null;const _0x3e604d=this['_threadToController']['get'](_0x2f1433),_0xb64737=_0x3e604d['view']['commentThreadInputView']['commentInputView'],_0x54ce29=this['context']['plugins']['get'](y),_0x4ebd84=_0x54ce29['getByInnerView'](_0x3e604d['view']);return _0x54ce29['activate'](_0x4ebd84),_0xb64737['once']('editorReady',()=>_0xb64737['focus']()),_0x2f1433;}['hasCommentThread'](_0x1d05cf){if('string'!=typeof _0x1d05cf)throw new _0x12528('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1d05cf);}['updateCommentThread']({channelId:_0x52488c=_t,threadId:_0x4b9b3e,context:_0x866012,unlinkedAt:_0x59675b,attributes:_0x159501,isFromAdapter:_0x1e8de3=!0x1}){return this['fire'](Nt('updateCommentThread',_0x52488c),{'channelId':_0x52488c,'threadId':_0x4b9b3e,'context':_0x866012,'unlinkedAt':_0x59675b,'attributes':_0x159501,'isFromAdapter':_0x1e8de3}),this['getCommentThread'](_0x4b9b3e);}['getCommentThread'](_0x2bc5ec){if('string'!=typeof _0x2bc5ec)throw new _0x12528('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2bc5ec);}['fetchCommentThread']({channelId:_0x31d14c,threadId:_0x485b6b}={}){const _0x2dcb09=this['getCommentThread'](_0x485b6b);if(_0x2dcb09)return Promise['resolve'](_0x2dcb09);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x12528('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x31d14c,'threadId':_0x485b6b})['then'](_0x37e34f=>this['hasCommentThread'](_0x485b6b)?this['getCommentThread'](_0x485b6b):_0x37e34f?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x31d14c},_0x37e34f)):void 0x0)['catch'](_0x1c725f=>{throw console['error'](_0x1c725f),new _0x12528('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x18e717,skipNotAttached:_0x4290a6=!0x1,skipEmpty:_0x50af8e=!0x1,toJSON:_0xd7f45a=!0x1}={}){const _0x14b0da=[];for(const _0x16dd8f of this['_threads']['values']())_0x18e717&&_0x16dd8f['channelId']!==_0x18e717||_0x4290a6&&!_0x16dd8f['isAttached']||_0x50af8e&&0x0===_0x16dd8f['length']||_0x14b0da['push'](_0x16dd8f);return _0xd7f45a?_0x14b0da['map'](_0xef7708=>_0xef7708['toJSON']()):_0x14b0da;}['getAnnotationForCommentThread'](_0x14ba27){const _0x2c2a89=this['_threadToController']['get'](_0x14ba27);if(!_0x2c2a89)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2c2a89['view'])||null;}['getCommentThreadForAnnotation'](_0x33a064){const _0x2de22a=this['_viewToController']['get'](_0x33a064['innerView']);return _0x2de22a?_0x2de22a['model']:null;}['setActiveCommentThread'](_0x598ed8){const _0x1ed601=this['context']['plugins']['get'](y);if(!_0x598ed8)return void(this['activeCommentThread']&&_0x1ed601['deactivateAll']());const _0x3138ab=this['getCommentThread'](_0x598ed8);if(!_0x3138ab)throw new _0x12528('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x598ed8});if(!this['_threadToController']['has'](_0x3138ab))throw new _0x12528('commentsrepository-active-not-attached',null,{'threadId':_0x598ed8});const _0x1c9584=_0x1ed601['getByInnerView'](this['_threadToController']['get'](_0x3138ab)['view']);_0x1ed601['activate'](_0x1c9584);}['switchReadOnly'](_0x1f8f95,_0x2c5e3c){_0x1f8f95?this['_readOnlyChannels']['add'](_0x2c5e3c):this['_readOnlyChannels']['delete'](_0x2c5e3c),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x390942){return this['_readOnlyChannels']['has'](_0x390942)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2b513e,_0x293cba){return new vt(_0x2b513e,_0x293cba);}['setPermissions'](_0x490299,_0x534ec8=_t){this['_permissions']['set'](_0x534ec8,_0x490299),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3c9f8b=_t){return this['_permissions']['has'](_0x3c9f8b)?this['_permissions']['get'](_0x3c9f8b):bt;}['_addCommentThread']({channelId:_0x11390e,threadId:_0xe0c88f,comments:_0x21813e,unlinkedAt:_0x3901db,resolvedAt:_0x24ea29,resolvedBy:_0x5e9fde,target:_0x43791a,context:_0x4f57bb,attributes:_0x4c792d,isFromAdapter:_0x29aa6b,isResolvable:_0x4beb5f,isSubmitted:_0x24bc80}){if('string'!=typeof _0xe0c88f)throw new _0x12528('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xe0c88f});if(this['hasCommentThread'](_0xe0c88f))throw new _0x12528('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xe0c88f});const _0x44d09c=new pi(this,{'channelId':_0x11390e,'id':_0xe0c88f,'context':_0x4f57bb,'attributes':_0x4c792d,'unlinkedAt':_0x3901db,'resolvedAt':_0x24ea29,'resolvedBy':_0x5e9fde?this['context']['plugins']['get'](it)['getUser'](_0x5e9fde):null,'isResolvable':_0x4beb5f,'isSubmitted':_0x24bc80||_0x29aa6b});this['_threads']['set'](_0xe0c88f,_0x44d09c);for(const _0x3bb5a0 of _0x21813e)_0x44d09c['_add'](this['_createNewComment']({'threadId':_0xe0c88f,..._0x3bb5a0}));return _0x43791a&&_0x44d09c['attachTo'](_0x43791a),_0x29aa6b||!_0x44d09c['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x11390e,'threadId':_0xe0c88f});}['_submitCommentThread']({channelId:_0x1ff814,threadId:_0x423516}){if(!this['hasCommentThread'](_0x423516))throw new _0x12528('commentsrepository-missing-comment-thread',this);const _0x2833eb=this['getCommentThread'](_0x423516);if(_0x2833eb['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x3a406e,comments:_0x4efe4b,resolvedAt:_0x1d92ce,resolvedBy:_0x17cdfb,context:_0x57b2fe,attributes:_0x1b7768}=_0x2833eb,_0x2117a3=this['context']['plugins']['get']('PendingActions'),_0x3a4ff9=_0x2117a3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1ff814,'threadId':_0x3a406e,'comments':_0x4efe4b['map'](_0x5c5c00=>_0x5c5c00['toJSON']()),'resolvedAt':_0x1d92ce,'resolvedBy':_0x17cdfb?_0x17cdfb['id']:_0x17cdfb,'context':_0x57b2fe,'attributes':_0x1b7768})['then'](({comments:_0x19b7dc})=>{_0x2117a3['remove'](_0x3a4ff9);for(const _0x523a4b of _0x19b7dc)this['_updateComment']({'channelId':_0x1ff814,'threadId':_0x423516,'commentId':_0x523a4b['commentId'],'createdAt':_0x523a4b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x59ae87=>{throw console['error'](_0x59ae87),new _0x12528('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x7c54f2,target:_0x18040b}){const _0x29fe43=this['getCommentThread'](_0x7c54f2);if(!_0x29fe43)throw new _0x12528('commentsrepository-attach-missing-comment-thread',this);const _0x55c9a4=this['context']['plugins']['get']('PendingActions'),_0x1a2f73=this['context']['plugins']['get'](y),_0x27f9b1=this['_createCommentThreadView'](_0x29fe43),_0x25f730=new vt(_0x29fe43,_0x27f9b1);let _0x18a8d8=null;_0x27f9b1['on']('change:isDirty',(_0x561952,_0x10b28a,_0x582e0d)=>{_0x582e0d?_0x18a8d8=_0x55c9a4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x18a8d8&&(_0x55c9a4['remove'](_0x18a8d8),_0x18a8d8=null);}),this['_threadToController']['set'](_0x29fe43,_0x25f730),this['_viewToController']['set'](_0x27f9b1,_0x25f730);const _0x57aeab=new E(this['context']['locale'],_0x27f9b1);_0x57aeab['bind']('length')['to'](_0x27f9b1),_0x57aeab['bind']('isDirty')['to'](_0x27f9b1,'isDirty',_0x27f9b1,'length',(_0x3df2e8,_0x1d76b2)=>_0x3df2e8||!_0x1d76b2),_0x57aeab['bind']('isActive')['to'](_0x27f9b1),_0x57aeab['type']='comment';const _0x2d87cb=new T({'view':_0x57aeab,'target':_0x18040b,'type':'comment','isVisible':!_0x29fe43['archivedAt']&&!!('function'==typeof _0x18040b?_0x18040b():_0x18040b)});return _0x27f9b1['on']('escape',()=>{_0x2d87cb['fire']('escape');}),this['_bindAnnotationToEditors'](_0x27f9b1,_0x2d87cb),_0x1a2f73['add'](_0x2d87cb),_0x2d87cb;}['_bindAnnotationToEditors'](_0x45118f,_0x464e21){this['listenTo'](_0x45118f,'editorReady',(_0x17f17a,_0x1e112a)=>{const _0x18929c=_0x1e112a['ui']['view']['body']['bodyCollectionContainer'];_0x464e21['focusableElements']['add'](_0x18929c),this['context']instanceof _0x252157&&this['context']['ui']['focusTracker']['add'](_0x18929c);},{'priority':'highest'}),this['listenTo'](_0x45118f,'editorDestroyed',(_0x3c142f,_0x3e038e)=>{const _0x2f0af5=_0x3e038e['ui']['view']['body']['bodyCollectionContainer'];_0x464e21['focusableElements']['has'](_0x2f0af5)&&_0x464e21['focusableElements']['remove'](_0x2f0af5),this['context']instanceof _0x252157&&this['context']['ui']['focusTracker']['remove'](_0x2f0af5);});}['_unbindEditors'](_0x481aa3){this['stopListening'](_0x481aa3,'editorReady'),this['stopListening'](_0x481aa3,'editorDestroyed');}['_createCommentThreadView'](_0x20efdf){const _0x4c032e=this['context']['plugins']['get'](it),{config:_0x3bba0e,locale:_0x2b0313}=this['context'],_0x2fd6af=pt(_0x3bba0e['get']('locale'),_0x2b0313);return new(0x0,(_0x3bba0e['get']('comments'))['CommentThreadView'])(_0x2b0313,_0x20efdf,_0x4c032e['me'],{'editorConfig':{..._0x3bba0e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3bba0e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3bba0e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3bba0e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3bba0e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2fd6af,'CommentView':_0x3bba0e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0xb25d6,channelId:_0xc0cfd,resolvedAt:_0x1665e5,resolvedBy:_0x6e48b9,isFromAdapter:_0x110ac1}){if(!this['hasCommentThread'](_0xb25d6))throw new _0x12528('commentsrepository-missing-comment-thread',null,{'threadId':_0xb25d6});const _0x2baeb6=this['getCommentThread'](_0xb25d6);if(_0x2baeb6['isResolved'])throw new _0x12528('commentsrepository-resolved-comment-thread',null,{'threadId':_0xb25d6});const _0x20ece3=this['context']['plugins']['get'](it);if(_0x2baeb6['resolvedBy']=_0x20ece3['getUser'](_0x6e48b9),_0x2baeb6['resolvedAt']=_0x1665e5,_0x110ac1||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5c76de=this['context']['plugins']['get']('PendingActions'),_0x12c69a=_0x5c76de['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xc0cfd,'threadId':_0xb25d6})['then'](({resolvedAt:_0x5aa614,resolvedBy:_0x34633d})=>{_0x5c76de['remove'](_0x12c69a),_0x2baeb6['resolvedBy']['id']!==_0x34633d&&(_0x2baeb6['resolvedBy']=_0x20ece3['getUser'](_0x34633d)),_0x2baeb6['resolvedAt']=_0x5aa614;})['catch'](_0x287ccd=>{throw console['error'](_0x287ccd),new _0x12528('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3b5bfc,channelId:_0x163dc1,isFromAdapter:_0x92b5c3}){if(!this['hasCommentThread'](_0x3b5bfc))throw new _0x12528('commentsrepository-missing-comment-thread',null,{'threadId':_0x3b5bfc});const _0x325f5f=this['getCommentThread'](_0x3b5bfc);if(!_0x325f5f['isResolved'])throw new _0x12528('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3b5bfc});if(_0x325f5f['resolvedBy']=null,_0x325f5f['resolvedAt']=null,_0x92b5c3||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x498714=this['context']['plugins']['get']('PendingActions'),_0x5eb294=_0x498714['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x163dc1,'threadId':_0x3b5bfc})['then'](()=>_0x498714['remove'](_0x5eb294))['catch'](_0x1106f4=>{throw console['error'](_0x1106f4),new _0x12528('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x45298b,isFromAdapter:_0x1e2bc3}){const _0x4b1d1e=this['getCommentThread'](_0x45298b);if(!_0x4b1d1e)throw new _0x12528('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x45298b),this['_threads']['delete'](_0x45298b),!_0x4b1d1e['isSubmitted']||_0x1e2bc3||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x56b8d9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x487255}=_0x4b1d1e,_0x5a92e7=_0x56b8d9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x487255,'threadId':_0x45298b})['then'](()=>_0x56b8d9['remove'](_0x5a92e7))['catch'](_0x37105a=>{throw console['error'](_0x37105a),new _0x12528('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x249041,unlinkedAt:_0x2fa0b9,context:_0x5ecce8,attributes:_0x22727b,isFromAdapter:_0x5cbf7d}){if('string'!=typeof _0x249041)throw new _0x12528('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x249041});if(!this['hasCommentThread'](_0x249041))throw new _0x12528('commentsrepository-missing-comment-thread',null,{'threadId':_0x249041});const _0x24abe0=this['getCommentThread'](_0x249041);let _0xb2efc9=!0x1;if(void 0x0!==_0x5ecce8&&_0x24abe0['context']!==_0x5ecce8&&(_0x24abe0['context']=_0x5ecce8,_0xb2efc9=!0x0),void 0x0!==_0x2fa0b9&&_0x24abe0['unlinkedAt']!==_0x2fa0b9&&(_0x24abe0['unlinkedAt']=_0x2fa0b9,_0xb2efc9=!0x0),_0x22727b&&!At(_0x22727b,_0x24abe0['attributes'])&&(_0x24abe0['attributes']=_0x22727b,_0xb2efc9=!0x0),!_0xb2efc9)return Promise['resolve']();if(!_0x24abe0['isSubmitted']||_0x5cbf7d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4673f8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1969ce}=_0x24abe0,_0x148d13=_0x4673f8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1969ce,'threadId':_0x249041,'context':_0x5ecce8,'unlinkedAt':_0x2fa0b9,'attributes':_0x22727b})['then'](()=>_0x4673f8['remove'](_0x148d13))['catch'](_0x24d5e9=>{throw console['error'](_0x24d5e9),new _0x12528('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1f1154){const _0x42e9cf=this['context']['plugins']['get'](y),_0x19b197=this['getCommentThread'](_0x1f1154);if(_0x19b197['_isAttached']=!0x1,this['_threadToController']['has'](_0x19b197)){const _0x544394=this['_threadToController']['get'](_0x19b197),_0x4b65e0=_0x544394['view'],_0x4751bf=_0x42e9cf['getByInnerView'](_0x4b65e0);this['_threadToController']['delete'](_0x19b197),this['_viewToController']['delete'](_0x4b65e0),_0x4751bf&&_0x42e9cf['remove'](_0x4751bf),_0x544394['destroy'](),_0x4b65e0['destroy']()['then'](()=>{this['_unbindEditors'](_0x4b65e0);});}}['_updateActiveAnnotation']({threadId:_0x16a287,resolvedAt:_0x1b57ce,unlinkedAt:_0x4f9dbd}){const _0x2e3d74=!!_0x1b57ce,_0x18a3d4=this['context']['plugins']['get'](y),_0x57220c=this['getCommentThread'](_0x16a287);if(this['_threadToController']['has'](_0x57220c)){const _0x51243e=this['_threadToController']['get'](_0x57220c)['view'],_0x109d2e=_0x18a3d4['getByInnerView'](_0x51243e);_0x109d2e&&(_0x2e3d74&&_0x18a3d4['_removeActiveAnnotation'](_0x109d2e),_0x4f9dbd?_0x109d2e['isVisible']=!0x1:_0x109d2e['refreshVisibility']());}}['_getExternalAuthor'](_0x4ad4ae){const _0x6fd9ce=this['context']['plugins']['get'](it),_0x1cd0b4=It('external:'+_0x4ad4ae),_0x3f216f=_0x6fd9ce['getUser'](_0x1cd0b4);return _0x3f216f||_0x6fd9ce['addUser']({'id':_0x1cd0b4,'name':_0x4ad4ae});}['_createNewComment']({threadId:_0x3346c9,commentId:_0x517fd0=_0x3b6e3a(),content:_0x2befb6,authorId:_0x1f4cb0,createdAt:_0x598fae,attributes:_0x30ae75}){if('string'!=typeof _0x517fd0)throw new _0x12528('commentsrepository-invalid-commentid');if('string'!=typeof _0x1f4cb0)throw new _0x12528('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2befb6||!_0x2befb6['trim']())throw new _0x12528('commentsrepository-invalid-comment-content');const _0x2e212f=this['context']['plugins']['get'](it)['getUser'](_0x1f4cb0);if(!_0x2e212f)throw new _0x12528('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1f4cb0});let _0x5e47d1=null,_0x59fd89=_0x598fae;return _0x30ae75?.['@external']&&(_0x5e47d1=this['_getExternalAuthor'](_0x30ae75['@external']['authorName']),_0x59fd89=new Date(_0x30ae75['@external']['createdAt'])),new wi(this,{'threadId':_0x3346c9,'id':_0x517fd0,'author':_0x5e47d1||_0x2e212f,'creator':_0x2e212f,'content':_0x2befb6,'createdAt':_0x598fae,'authoredAt':_0x59fd89,'attributes':_0x30ae75});}['_addComment'](_0x4e9dc9){let {threadId:_0x1d1acb,content:_0x22d341,attributes:_0x103f2c,isFromAdapter:_0x39db44}=_0x4e9dc9;const _0x19e23e=this['getCommentThread'](_0x4e9dc9['threadId']);if(!_0x19e23e)throw new _0x12528('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x26b278=this['_createNewComment'](_0x4e9dc9),{id:_0x53aee2}=_0x26b278;if(_0x19e23e['_add'](_0x26b278),_0x39db44||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x19e23e['isSubmitted'])return Promise['resolve']();const _0x20d0b2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2e6e97}=_0x19e23e,_0x35e5fc=_0x20d0b2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x103f2c||(_0x103f2c={}),this['adapter']['addComment']({'channelId':_0x2e6e97,'threadId':_0x1d1acb,'commentId':_0x53aee2,'content':_0x22d341,'attributes':_0x103f2c})['then'](_0x533200=>{_0x20d0b2['remove'](_0x35e5fc),_0x533200&&this['_updateComment']({'channelId':_0x2e6e97,'threadId':_0x1d1acb,'commentId':_0x53aee2,'createdAt':_0x533200['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5dd2ba=>{throw console['error'](_0x5dd2ba),new _0x12528('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x1f56a8,commentId:_0x22510f,content:_0x2dec81,createdAt:_0x1ff00f,attributes:_0x1fab18,isFromAdapter:_0xcd212c}){if(void 0x0!==_0x2dec81&&('string'!=typeof _0x2dec81||!_0x2dec81['trim']()['length']))throw new _0x12528('commentsrepository-update-comment-invalid-content');const _0x450769=this['getCommentThread'](_0x1f56a8),_0x4738a5=_0x450769['getComment'](_0x22510f);if(!_0x4738a5)throw new _0x12528('commentsrepository-update-missing-comment',this);let _0x192d2d=!0x1;if(_0x2dec81&&_0x2dec81!==_0x4738a5['content']&&(_0x4738a5['isEditable']||_0xcd212c)&&(_0x4738a5['content']=_0x2dec81,_0x192d2d=!0x0),_0x1ff00f&&_0x1ff00f!==_0x4738a5['createdAt']&&(_0x4738a5['createdAt']=_0x1ff00f,_0x4738a5['attributes']&&_0x4738a5['attributes']['@external']||(_0x4738a5['authoredAt']=_0x1ff00f),_0x192d2d=!0x0),_0x1fab18&&!At(_0x1fab18,_0x4738a5['attributes'])&&(_0x4738a5['attributes']=_0x1fab18,_0x192d2d=!0x0),!_0x192d2d)return Promise['resolve']();if(_0x450769['fire']('commentUpdated'),_0xcd212c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x109573=this['context']['plugins']['get']('PendingActions'),{channelId:_0x59f657}=this['getCommentThread'](_0x4738a5['threadId']),_0x70a140=_0x109573['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x59f657,'threadId':_0x1f56a8,'commentId':_0x22510f,'content':_0x2dec81,'attributes':_0x1fab18})['then'](()=>_0x109573['remove'](_0x70a140))['catch'](_0x379b3d=>{throw console['error'](_0x379b3d),new _0x12528('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x34f65d,commentId:_0x25c0e4,isFromAdapter:_0x1ba5da}){const _0x557b92=this['getCommentThread'](_0x34f65d),_0x510b94=_0x557b92['getComment'](_0x25c0e4);if(!_0x510b94)throw new _0x12528('commentsrepository-remove-missing-comment',this);if(_0x557b92['_remove'](_0x510b94),_0x1ba5da||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x384ede=this['context']['plugins']['get']('PendingActions'),{channelId:_0x22528e}=_0x557b92,_0x546712=_0x384ede['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x22528e,'threadId':_0x34f65d,'commentId':_0x25c0e4})['then'](()=>_0x384ede['remove'](_0x546712))['catch'](_0x58607d=>{throw console['error'](_0x58607d),new _0x12528('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x2d7fa9(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x41c0b0,_0x2d337b){super();const _0x51693a=_0x41c0b0['context']['plugins']['get'](it)['me'],_0x99881b=_0x41c0b0['getCommentThread'](_0x2d337b['threadId']),_0x37406e=0x0===_0x99881b['comments']['length'],_0xa36220=_0x51693a===_0x2d337b['author'];this['id']=_0x2d337b['id'],this['threadId']=_0x2d337b['threadId'],this['author']=_0x2d337b['author'],this['creator']=_0x2d337b['creator'],this['isExternal']=Boolean(_0x2d337b['attributes']&&_0x2d337b['attributes']['@external']),this['set']('content',_0x2d337b['content']),this['createdAt']=_0x2d337b['createdAt']||new Date(),this['set']('authoredAt',_0x2d337b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x99881b,'resolvedAt'),this['set']('attributes',_0x2d337b['attributes']||{}),this['bind']('isEditable')['to'](_0x41c0b0,'_permissions',()=>{const _0x52d721=_0x41c0b0['getPermissions'](_0x99881b['channelId'])['write'],_0x42921a=_0x41c0b0['getPermissions'](_0x99881b['channelId'])['modifyAll'];return _0xa36220&&_0x52d721||!_0xa36220&&_0x42921a;}),this['bind']('isRemovable')['to'](_0x99881b,'isRemovable',_0x41c0b0,'_permissions',_0x2d4a14=>{const _0x2aa17b=_0x41c0b0['getPermissions'](_0x99881b['channelId'])['write'],_0x450417=_0x41c0b0['getPermissions'](_0x99881b['channelId'])['modifyAll'];return _0xa36220&&_0x2aa17b||_0x2d4a14&&_0x37406e||!_0xa36220&&_0x450417&&!_0x37406e;}),this['bind']('isReadOnly')['to'](_0x99881b,'isReadOnly'),this['_repository']=_0x41c0b0;}get['weight'](){return Math['max'](function(_0x199798){const _0x19458c=document['createElement']('div');return _0x19458c['innerHTML']=_0x199798,_0x19458c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x479385){const {threadId:_0x1c2039,id:_0x53f29f}=this;if(!this['_repository']['hasCommentThread'](_0x1c2039))throw new _0x12528('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x927d85}=this['_repository']['getCommentThread'](_0x1c2039);this['_repository']['fire'](Nt('updateComment',_0x927d85,_0x1c2039),{'channelId':_0x927d85,'threadId':_0x1c2039,'commentId':_0x53f29f,..._0x479385});}['setAttribute'](_0x509f77,_0x2da82e){const _0x5194a4=wt(this['attributes']);yt(_0x5194a4,_0x509f77,_0x2da82e),this['update']({'attributes':_0x5194a4});}['removeAttribute'](_0x1d458a){const _0x52f607=wt(this['attributes']);Ct(_0x52f607,_0x1d458a),this['update']({'attributes':_0x52f607});}['remove'](_0x4d21c9={}){if(!_0x4d21c9['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x551948,id:_0x427835}=this;if(!this['_repository']['hasCommentThread'](_0x551948))throw new _0x12528('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2ffa35}=this['_repository']['getCommentThread'](_0x551948);this['_repository']['fire'](Nt('removeComment',_0x2ffa35,_0x551948),{'channelId':_0x2ffa35,'threadId':_0x551948,'commentId':_0x427835,..._0x4d21c9});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x5ccba8,..._0x1e961d){for(const _0x2724ed of _0x1e961d)void 0x0!==_0x2724ed&&(_0x5ccba8+=':'+String(_0x2724ed));return _0x5ccba8;}class ot extends _0x1870c6{constructor(_0x2a7024){super(_0x2a7024),this['set']('hasContent',!0x1);}['refresh'](){const _0x5968b0=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2415ab of _0x5968b0['getRanges']())if(this['_hasContent'](_0x2415ab))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x1e26da=_0x3b6e3a(),ranges:_0x43e66f,comment:_0x4b0193}={}){const _0x52253d=this['editor']['model'],_0x450cda=_0x43e66f??Array['from'](_0x52253d['document']['selection']['getRanges']()),_0x387213=[];for(const _0x1c8cb4 of _0x450cda)this['_hasContent'](_0x1c8cb4)&&_0x387213['push'](this['_trimToContent'](_0x1c8cb4));if(!_0x387213['length'])throw new _0x12528('addcommentthreadcommand-incorrect-ranges',null);_0x4b0193&&this['_createCommentThread'](_0x1e26da,_0x4b0193),this['_createMarkersFromRanges'](_0x1e26da,_0x387213,!!_0x4b0193);}['_createMarkersFromRanges'](_0xc97e8b,_0x40e85b,_0x1cf869){this['editor']['model']['change'](_0xdb7037=>{for(const _0x2f40e5 of _0x40e85b){const _0x30ed6e=_0x3b6e3a()['substr'](0x1,0x5),_0x3836e4='comment:'+_0xc97e8b+':'+_0x30ed6e;_0xdb7037['addMarker'](_0x3836e4,{'range':_0x2f40e5,'usingOperation':_0x1cf869,'affectsData':_0x1cf869});}});}['_createCommentThread'](_0x4fdb1b,_0x5f7c46){const _0x4f4fd3=this['editor']['plugins']['get']('CommentsRepository'),_0x1a85cf=this['editor']['config']['get']('collaboration.channelId'),_0x36db83=this['editor']['plugins']['get']('Users')['me'];if(!_0x36db83)throw new _0x12528('addcommentthreadcommand-user-not-found',null);_0x4f4fd3['addCommentThread']({'threadId':_0x4fdb1b,'channelId':_0x1a85cf,'comments':[{'authorId':_0x36db83['id'],'content':_0x5f7c46,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x249e19){for(const _0x3221cc of _0x249e19['getItems']())if(this['_itemIsContent'](_0x3221cc))return!0x0;return!0x1;}['_itemIsContent'](_0x3e76cb){return _0x3e76cb['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3e76cb)&&!_0x3e76cb['is']('element','tableCell');}['_trimToContent'](_0xe2a06a){const _0x598e26=_0x44f4e3=>!this['_itemIsContent'](_0x44f4e3['item']),_0x394edc=_0xe2a06a['start']['getLastMatchingPosition'](_0x598e26),_0x56134f=_0xe2a06a['end']['getLastMatchingPosition'](_0x598e26,{'direction':'backward'});return this['editor']['model']['createRange'](_0x394edc,_0x56134f);}}class b extends _0x383b15{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x200acb){super(_0x200acb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x38ac15=this['editor'],_0x21d916=_0x38ac15['model']['document']['selection'],_0x36beba=_0x48d319(()=>this['refreshSelectedViews'](),0xa);_0x21d916['on']('change:range',(_0xe052de,_0x535997)=>{_0x535997['directChange']&&(_0x36beba['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x38ac15['editing']['view']['document'],'change:isFocused',(_0x3944a2,_0x1a614d,_0x573b68)=>{_0x573b68&&_0x36beba();}),this['listenTo'](_0x38ac15['ui']['focusTracker'],'change:isFocused',(_0x45ca0c,_0x3c7cb7,_0x23f541)=>{_0x23f541||this['fire']('blur',{'isAnnotationTracked':_0x5c3bd5=>this['_editorAnnotationsData']['has'](_0x5c3bd5['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1b1d94){if(this['_editorAnnotations']['has'](_0x1b1d94['view']))return;this['_editorAnnotations']['add'](_0x1b1d94['view']),this['editor']['ui']['focusTracker']['add'](_0x1b1d94['view']['element']);const _0x13e774=this['editor']['plugins']['get'](y);this['listenTo'](_0x13e774['collection'],'remove',(_0x57e3e8,_0x3d66e0)=>{this['editor']['ui']['focusTracker']['remove'](_0x3d66e0['view']['element']),this['_editorAnnotations']['delete'](_0x3d66e0['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2b9bb7){if('function'!=typeof _0x2b9bb7)throw new _0x12528('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2b9bb7);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x418c24,annotations:_0x43939a}){const _0x15f9e5=[],_0xdafa69=this['editor']['model']['document']['selection'],_0x2ae395=Array['from'](_0xdafa69['getRanges']());for(const [_0x436b14,_0x198e7a]of this['_editorAnnotationsData']){const _0x26086b=_0x16c7ba(_0x198e7a),_0xf9d38f=_0x43939a['getByInnerView'](_0x436b14);_0x26086b&&_0xf9d38f&&_0x15f9e5['push']({'annotation':_0xf9d38f,'range':_0x26086b});}function _0x16c7ba(_0x2e37c1){for(const _0x3100be of _0x2e37c1)for(const _0x569749 of _0x2ae395)if(_0x3100be['containsRange'](_0x569749,!_0xdafa69['isCollapsed']))return _0x3100be;return null;}return _0x15f9e5['sort']((_0x5ad80b,_0x163f57)=>{const _0xe9bbfe=_0x5ad80b['range'],_0x51a437=_0x163f57['range'];if(!_0xe9bbfe['isEqual'](_0x51a437)){if(_0xe9bbfe['containsRange'](_0x51a437,!0x0))return 0x1;if(_0x51a437['containsRange'](_0xe9bbfe,!0x0))return-0x1;}return _0x5ad80b['annotation']==_0x418c24?-0x1:_0x163f57['annotation']==_0x418c24?0x1:0x0;})['map'](_0x386cd6=>_0x386cd6['annotation']);}get['_editorAnnotationsData'](){const _0xc433f0=new Map();for(const _0x2f3fec of Array['from'](this['_dataCollectors']))for(const [_0x48f901,_0x5746c3]of _0x2f3fec())_0xc433f0['set'](_0x48f901,_0x5746c3);return _0xc433f0;}}class st extends _0x383b15{['afterInit'](){const _0x5a8c23=this['editor'];if(!_0x5a8c23['plugins']['has']('RestrictedEditingModeEditing'))return;_0x5a8c23['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x383b15{constructor(_0x1dad14){super(_0x1dad14),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3c8dd4=this['editor'],_0x47cd21=_0x3c8dd4['commands']['get']('importWord'),_0x38e1a8=_0x3c8dd4['plugins']['get'](it);_0x47cd21&&(_0x47cd21['on']('execute',(_0x5277ef,[,_0x1c80b7])=>{_0x1c80b7['collaboration_features']={'comments':!0x0,'user_id':_0x38e1a8['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x47cd21,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4631d3,_0x576766){const {comment_threads:_0x4a50b8}=_0x576766;_0x4a50b8&&_0x4a50b8['forEach'](({thread_id:_0xad0f62,comments:_0x13fba7,is_resolved:_0x19e021})=>{const _0x5f3e69=new Date(),_0x11c6f1=_0x13fba7['map'](({author:_0x1daa7d,content:_0x53ce70,created_at:_0x7b3d1f})=>({'content':_0x53ce70,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x5f3e69,'attributes':{'@external':{'authorName':_0x1daa7d,'createdAt':_0x7b3d1f?new Date(_0x7b3d1f):new Date(),'source':'importWord'}}})),_0x249de9=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x249de9,'threadId':_0xad0f62,'comments':_0x11c6f1,'resolvedAt':_0x19e021?_0x5f3e69:null});});}}class at extends _0x383b15{constructor(_0x1dead3){super(_0x1dead3),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2d44b8=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2d44b8,'contentInsertion',(_0x4428aa,_0x554fd3)=>this['_removeMarkersWithoutThreads'](_0x554fd3['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x424ee3){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x424ee3;const _0x48899b=this['editor']['plugins']['get']('CommentsRepository');for(const _0x134b3e of _0x424ee3['keys']()){const [_0x11ad6f,_0x4d9c9b]=_0x134b3e['split'](':');'comment'!=_0x11ad6f||_0x48899b['hasCommentThread'](_0x4d9c9b)||_0x424ee3['delete'](_0x134b3e);}return _0x424ee3;}['_registerMarkerInClipboardPipeline'](){const _0x2204ec=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4007b6=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4007b6&&_0x2204ec['_registerMarkerToCopy']('comment',_0x4007b6);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x308ee1){switch(_0x308ee1){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x55dd63){const _0x117c41=_0x55dd63['split'](':');return{'group':_0x117c41[0x0],'id':_0x117c41[0x1],'part':_0x117c41[0x2]};}class ut extends _0x383b15{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x18c75a,_0xb9d3a3)=>{if(!_0xb9d3a3['options']['showCommentHighlights'])return null;if(_0xb9d3a3['options']['ignoreResolvedComments']){const {id:_0x5cea50}=ft(_0x18c75a['markerName']),_0x545157=this['editor']['plugins']['get'](o);if(_0x545157['getCommentThread'](_0x5cea50)?.['isResolved']&&_0x18c75a['item'])return _0xb9d3a3['consumable']['consume'](_0x18c75a['item'],'addMarker:'+_0x18c75a['markerName']),_0xb9d3a3['consumable']['consume'](_0x18c75a['item'],'removeMarker:'+_0x18c75a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x38ef64=>{_0x38ef64['on']('addMarker:comment',(_0xfdf729,_0x150e11,_0x5b34d0)=>{if(!_0x5b34d0['options']['showCommentHighlights'])return;const _0x2143b0=_0x150e11['item'];if(!_0x2143b0)return;const _0x5401d3=_0x5b34d0['mapper']['toViewElement'](_0x2143b0);this['editor']['model']['schema']['isObject'](_0x2143b0)&&_0x5401d3&&!_0x5401d3['getCustomProperty']('widget')&&_0x5401d3['is']('containerElement')&&_0x59fd57(_0x5401d3,_0x5b34d0['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5ee92a,{writer:_0xeea660,options:_0x22ef17})=>{if(!_0x22ef17['showCommentHighlights'])return null;const _0x461422=_0xeea660['createContainerElement']('div'),_0x517ea1=_0xeea660['createEmptyElement']('hr');return _0xeea660['addClass']('ck-horizontal-line',_0x461422),_0xeea660['insert'](_0xeea660['createPositionAt'](_0x461422,0x0),_0x517ea1),_0x461422;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x292fbc,{writer:_0xdb9648,options:_0x5f036d})=>{if(!_0x5f036d['showCommentHighlights'])return null;const _0x20ebb0=_0xdb9648['createContainerElement']('span'),_0x443b4b=_0xdb9648['createEmptyElement']('img');return _0xdb9648['addClass']('image-inline',_0x20ebb0),_0xdb9648['insert'](_0xdb9648['createPositionAt'](_0x20ebb0,0x0),_0x443b4b),_0x20ebb0;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x255050,{writer:_0x1ef349,options:_0x15e91d})=>{if(_0x15e91d['showCommentHighlights'])return _0x1ef349['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x7e9849,_0x320c46,_0x2cae54)=>{_0x2cae54['options']['showCommentHighlights']&&_0x7e9849['stop']();},{'priority':'high'});}}class r extends _0x383b15{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(_0x38c691){super(_0x38c691),this['set']('isThreadsLoadingPaused',!0x0),_0x38c691['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x15d96b,_0x28d6e0,_0x23dd11,_0x514c14)=>{const _0x3b5455=_0x38c691['plugins']['get'](o),_0xb4aec5=_0x23dd11?ft(_0x23dd11)['id']:null;_0x38c691['model']['change'](()=>{if(_0xb4aec5){const _0x385afb=this['getAllMarkersForId'](_0xb4aec5);for(const _0x2d099b of _0x385afb)_0x38c691['editing']['reconvertMarker'](_0x2d099b);}if(_0x514c14){const {id:_0x10168d}=ft(_0x514c14),_0x41332f=_0x3b5455['getCommentThread'](_0x10168d);if(_0x41332f&&_0x41332f['unlinkedAt'])return;if(_0x41332f&&!_0x41332f['isAttached'])return;const _0x232574=this['getAllMarkersForId'](_0x10168d);for(const _0x15ac17 of _0x232574)_0x38c691['editing']['reconvertMarker'](_0x15ac17);}}),_0xb4aec5&&this['scrollToThreadMarker'](_0xb4aec5);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xc2e777=this['editor'],_0x3d807e=_0xc2e777['plugins']['get'](o),_0x46969d=_0xc2e777['config']['get']('collaboration.channelId'),_0xc4fff5=_0x3d807e['getCommentThreads']()['filter'](_0x1883dd=>_0x1883dd['channelId']!==_0x46969d);_0xc2e777['commands']['add']('addCommentThread',new ot(_0xc2e777)),this['listenTo'](_0xc2e777,'change:isReadOnly',(_0x2d1d10,_0x33c159,_0x7be897)=>{_0x3d807e['switchReadOnly'](_0x7be897,_0xc2e777['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3d807e,dt('addCommentThread',_0x46969d),(_0x426853,{threadId:_0x4bdfff})=>{const _0x909c41=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4bdfff);_0x909c41?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4bdfff);}),this['listenTo'](_0x3d807e,dt('removeCommentThread',_0x46969d),(_0x2564df,{threadId:_0x2cee41})=>{_0xc2e777['model']['enqueueChange']({'isUndoable':!0x1},_0x5ae3b9=>{const _0x2b8476=this['getAllMarkersForId'](_0x2cee41);for(const _0x4bf0c3 of _0x2b8476)_0x5ae3b9['removeMarker'](_0x4bf0c3);});}),this['listenTo'](_0x3d807e,dt('resolveCommentThread',_0x46969d),(_0xaed24b,{threadId:_0x574ce5})=>{(this['_reconvertMarkers'](_0x574ce5),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x574ce5)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3d807e,dt('reopenCommentThread',_0x46969d),(_0x32a074,{threadId:_0x124e0b})=>{this['_reconvertMarkers'](_0x124e0b);},{'priority':'low'}),this['listenTo'](_0x3d807e,dt('addComment',_0x46969d),(_0x5390c4,{threadId:_0x390938,isFromAdapter:_0x3295db})=>{const _0x42975b=this['getAllMarkersForId'](_0x390938);if(_0x3295db||0x0==_0x42975b['length']||!_0x3d807e['hasCommentThread'](_0x390938))return;0x1===_0x3d807e['getCommentThread'](_0x390938)['length']&&_0xc2e777['model']['enqueueChange']({'isUndoable':!0x1},_0x29cb8c=>{for(const _0x3d489a of _0x42975b)_0x29cb8c['updateMarker'](_0x3d489a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xc4fff5);}['afterInit'](){!async function(_0x2121d6){const _0x4d5de9=_0x4a6354([0x68,0x43,0x52,0x48,0x79,0x53,0x55,0x33,0x56,0x69,0x50,0x75,0x45,0x47,0x78,0x6b,0x4a,0x39,0x65,0x64,0x41,0x32,0x34,0x6e,0x42,0x70,0x59,0x57,0x6d,0x66,0x54,0x37,0x74,0x71,0x73,0x72,0x44,0x30,0x6c,0x49,0x6a,0x38,0x67,0x58,0x4d,0x35,0x6f,0x63,0x76,0x51,0x5a,0x7a,0x77,0x62,0x61,0x4f,0x36,0x46,0x31,0x4c,0x4e,0x4b]),_0x22ee10=0x6cb8e7a8,_0x3c870e=0x6cbf8890^_0x22ee10,_0x46c103=window[_0x4a6354([0x44,0x61,0x74,0x65])][_0x4a6354([0x6e,0x6f,0x77])](),_0x4a786e=_0x2121d6[_0x4a6354([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x400b9d=new window[(_0x4a6354([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4cda93=>{_0x4a786e[_0x4a6354([0x6f,0x6e,0x63,0x65])](_0x4a6354([0x72,0x65,0x61,0x64,0x79]),_0x4cda93);}),_0x534828={[_0x4a6354([0x6b,0x74,0x79])]:_0x4a6354([0x45,0x43]),[_0x4a6354([0x75,0x73,0x65])]:_0x4a6354([0x73,0x69,0x67]),[_0x4a6354([0x63,0x72,0x76])]:_0x4a6354([0x50,0x2d,0x32,0x35,0x36]),[_0x4a6354([0x78])]:_0x4a6354([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]),[_0x4a6354([0x79])]:_0x4a6354([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]),[_0x4a6354([0x61,0x6c,0x67])]:_0x4a6354([0x45,0x53,0x32,0x35,0x36])},_0x38a9c3=_0x4a786e[_0x4a6354([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4a6354([0x67,0x65,0x74])](_0x4a6354([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1c0409(){let _0x30cdd4,_0x328814=null,_0x2fc57e=null;try{if(_0x38a9c3==_0x4a6354([0x47,0x50,0x4c]))return _0x4a6354([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x30cdd4=_0x256942(),!_0x30cdd4)return _0x4a6354([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x30cdd4[_0x4a6354([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2fc57e=_0x5e63c5(_0x30cdd4[_0x4a6354([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x30cdd4[_0x4a6354([0x6a,0x74,0x69])])),await _0x313af1()?_0x7f79b0()?_0x35fd7b()?_0x4a6354([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4ad302()?(_0x30cdd4[_0x4a6354([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4a6354([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x328814=_0x4f81b4(_0x4a6354([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x30cdd4[_0x4a6354([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4a6354([0x74,0x72,0x69,0x61,0x6c])&&(_0x328814=_0x4f81b4(_0x4a6354([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x16442a()):_0x4a6354([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4a6354([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4a6354([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4a6354([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x35fd7b(){const _0x2662f7=[_0x4a6354([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4a6354([0x74,0x72,0x69,0x61,0x6c])][_0x4a6354([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x30cdd4[_0x4a6354([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x46c103/0x3e8:0xe10*_0x3c870e;return _0x30cdd4[_0x4a6354([0x65,0x78,0x70])]<_0x2662f7;}function _0x7f79b0(){const _0x53c1c4=_0x30cdd4[_0x4a6354([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x53c1c4)return!0x1;if(_0x53c1c4[_0x4a6354([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a6354([0x2a])))return!0x0;if(_0x53c1c4[_0x4a6354([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a6354([0x43,0x4d,0x54])))return!0x0;if(_0x53c1c4[_0x4a6354([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a6354([0x52,0x43,0x4d,0x54]))){if(_0x3db5e1())return!0x0;if(_0xddd762()||_0x2c2c8a())return!0x0;}return!0x1;}function _0x4ad302(){const _0x25fac7=_0x30cdd4[_0x4a6354([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x25fac7||0x0==_0x25fac7[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5b7202}=new URL(window[_0x4a6354([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x25fac7[_0x4a6354([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b7202))return!0x0;const _0x558c42=_0x5b7202[_0x4a6354([0x73,0x70,0x6c,0x69,0x74])](_0x4a6354([0x2e]));return _0x25fac7[_0x4a6354([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1473ea=>_0x1473ea[_0x4a6354([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a6354([0x2a])))[_0x4a6354([0x6d,0x61,0x70])](_0x2bccd6=>_0x2bccd6[_0x4a6354([0x73,0x70,0x6c,0x69,0x74])](_0x4a6354([0x2e])))[_0x4a6354([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4dc409=>_0x4dc409[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x558c42[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4a6354([0x6d,0x61,0x70])](_0x3c8437=>Array(_0x558c42[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3c8437[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4a6354([0x66,0x69,0x6c,0x6c])](_0x3c8437[0x0]===_0x4a6354([0x2a])?_0x4a6354([0x2a]):'')[_0x4a6354([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3c8437))[_0x4a6354([0x73,0x6f,0x6d,0x65])](_0x15f74b=>_0x558c42[_0x4a6354([0x65,0x76,0x65,0x72,0x79])]((_0x23d337,_0xd005a9)=>_0x15f74b[_0xd005a9]===_0x23d337||_0x15f74b[_0xd005a9]===_0x4a6354([0x2a])));}function _0x16442a(){return _0x328814&&_0x2fc57e?new window[(_0x4a6354([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x230597,_0x28ba35)=>{_0x328814[_0x4a6354([0x74,0x68,0x65,0x6e])](_0x230597,_0x28ba35),_0x2fc57e[_0x4a6354([0x74,0x68,0x65,0x6e])](_0x1630c1=>{_0x1630c1!=_0x4a6354([0x56,0x61,0x6c,0x69,0x64])&&_0x230597(_0x1630c1);},_0x28ba35);}):_0x328814||_0x2fc57e||_0x4a6354([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5e63c5(_0x39a18c,_0x3eb9e3){return new window[(_0x4a6354([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x408912=>{if(_0x4abadb())return _0x408912(_0x4a6354([0x56,0x61,0x6c,0x69,0x64]));_0x32cf8e(),_0x4a786e[_0x4a6354([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4a6354([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1c687a=!0x1;const _0x5b9708=_0x3b6e3a();function _0x20b96c(_0x104fa2){return!!_0x104fa2&&(typeof _0x104fa2===_0x4a6354([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x104fa2===_0x4a6354([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x104fa2[_0x4a6354([0x74,0x68,0x65,0x6e])]===_0x4a6354([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x104fa2[_0x4a6354([0x63,0x61,0x74,0x63,0x68])]===_0x4a6354([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x32bbb3(_0x290489){_0x5b4970(_0x290489)[_0x4a6354([0x74,0x68,0x65,0x6e])](_0x128df2=>{if(!_0x128df2||_0x128df2[_0x4a6354([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4a6354([0x6f,0x6b]))return _0x4a6354([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3b2f93(_0x4d02db(_0x5b9708+_0x3eb9e3))!=_0x128df2[_0x4a6354([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4a6354([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4a6354([0x56,0x61,0x6c,0x69,0x64]);})[_0x4a6354([0x74,0x68,0x65,0x6e])](_0xbe5666=>(_0x5c0b8e(),_0xbe5666),()=>{const _0x5a177d=_0x5ed036();return null==_0x5a177d?(_0x5c0b8e(),_0x4a6354([0x56,0x61,0x6c,0x69,0x64])):_0x4a6354(_0x46c103-_0x5a177d>(0x48b463a8^_0x22ee10)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4a6354([0x74,0x68,0x65,0x6e])](_0x408912)[_0x4a6354([0x63,0x61,0x74,0x63,0x68])](()=>{_0x408912(_0x4a6354([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x24e66a=0x6c8e0928^_0x22ee10;function _0x5c0b8e(){const _0x3a3595=_0x4a6354([0x6c,0x6c,0x63,0x74,0x2d])+_0x3b2f93(_0x4d02db(_0x39a18c)),_0x588d5e=_0x5673c5(_0x3b2f93(window[_0x4a6354([0x4d,0x61,0x74,0x68])][_0x4a6354([0x63,0x65,0x69,0x6c])](_0x46c103/_0x24e66a)));window[_0x4a6354([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4a6354([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3a3595,_0x588d5e);}function _0x5ed036(){const _0x428365=_0x4a6354([0x6c,0x6c,0x63,0x74,0x2d])+_0x3b2f93(_0x4d02db(_0x39a18c)),_0x3dc0ce=window[_0x4a6354([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4a6354([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x428365);return _0x3dc0ce?window[_0x4a6354([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5673c5(_0x3dc0ce),0x10)*_0x24e66a:null;}function _0x5b4970(_0x279989){return new window[(_0x4a6354([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d7807,_0xec459b)=>{_0x279989[_0x4a6354([0x74,0x68,0x65,0x6e])](_0x2d7807,_0xec459b),window[_0x4a6354([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xec459b,0x6cb93368^_0x22ee10);});}}_0x4a786e[_0x4a6354([0x6f,0x6e])](_0x4a6354([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5caa91,_0x226eb7)=>{if(_0x226eb7[0x0]!=_0x39a18c)return _0x408912(_0x4a6354([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x226eb7[0x1]={..._0x226eb7[0x1],[_0x4a6354([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5b9708};},{[_0x4a6354([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4a6354([0x68,0x69,0x67,0x68])}),_0x4a786e[_0x4a6354([0x6f,0x6e])](_0x4a6354([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3569cd=>{_0x20b96c(_0x3569cd[_0x4a6354([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1c687a=!0x0,_0x32bbb3(_0x3569cd[_0x4a6354([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4a6354([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4a6354([0x6c,0x6f,0x77])}),_0x400b9d[_0x4a6354([0x74,0x68,0x65,0x6e])](()=>{_0x1c687a||_0x408912(_0x4a6354([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4abadb(){return _0x4a786e[_0x4a6354([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4a6354([0x76,0x69,0x65,0x77])][_0x4a6354([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4a6354([0x61,0x75,0x74,0x6f]);}function _0x32cf8e(){_0x4a786e[_0x4a6354([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4a6354([0x76,0x69,0x65,0x77])][_0x4a6354([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4a6354([0x61,0x75,0x74,0x6f]);}}function _0x4f81b4(_0x4a1095){const _0x1a7f67=[new window[(_0x4a6354([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20025e=>setTimeout(_0x20025e,0x6cb1d964^_0x22ee10)),_0x400b9d[_0x4a6354([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4a6354([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1eb841=>{let _0x42cc92=0x0;_0x4a786e[_0x4a6354([0x6d,0x6f,0x64,0x65,0x6c])][_0x4a6354([0x6f,0x6e])](_0x4a6354([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x37b76d,_0x1350c4)=>{_0x1350c4[0x0][_0x4a6354([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x42cc92++,_0x42cc92==(0x6cb8e650^_0x22ee10)&&(_0x1eb841(),_0x37b76d[_0x4a6354([0x6f,0x66,0x66])]());});}))];return window[_0x4a6354([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4a6354([0x72,0x61,0x63,0x65])](_0x1a7f67)[_0x4a6354([0x74,0x68,0x65,0x6e])](()=>_0x4a1095);}async function _0x4ad404(){await _0x400b9d,_0x4a786e[_0x4a6354([0x6d,0x6f,0x64,0x65,0x6c])][_0x4a6354([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5ecb61,_0x4a786e[_0x4a6354([0x6d,0x6f,0x64,0x65,0x6c])][_0x4a6354([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5ecb61,_0x4a786e[_0x4a6354([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4a6354([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3db5e1(){return _0x2d19ce(_0x4a6354([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x40ed91(_0x4a6354([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4a6354([0x73,0x74,0x61,0x74,0x65])]==_0x4a6354([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xddd762(){return _0x2d19ce(_0x4a6354([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 _0x2c2c8a(){return _0x2d19ce(_0x4a6354([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1f4afe(_0x1e7779){const _0x2915b1=_0x119808();_0x4a786e[_0x2915b1]=_0x4a6354([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1e7779,_0x1e7779!=_0x4a6354([0x56,0x61,0x6c,0x69,0x64])&&_0x4ad404();}function _0x119808(){const _0x2cefee=window[_0x4a6354([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4a6354([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4a6354([0x6e,0x6f,0x77])]())[_0x4a6354([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4a6354([0x2e]),'');let _0x569782=_0x4a6354([0x68]);for(let _0x36e135=0x0;_0x36e135<_0x2cefee[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x36e135+=0x2){let _0x283156=window[_0x4a6354([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2cefee[_0x4a6354([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x36e135,_0x36e135+0x2));_0x283156>=_0x4d5de9[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x283156-=_0x4d5de9[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x569782+=_0x4d5de9[_0x283156];}return _0x569782;}function _0x256942(){const _0x2029c3=_0x38a9c3[_0x4a6354([0x73,0x70,0x6c,0x69,0x74])](_0x4a6354([0x2e]));if(0x3!=_0x2029c3[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xdec917(_0x2029c3[0x1]);function _0xdec917(_0x490fb8){const _0x1c4de0=_0x3c77ef(_0x490fb8);return _0x1c4de0&&_0x4c1709()?_0x1c4de0:null;function _0x4c1709(){const _0x4f1a75=_0x1c4de0[_0x4a6354([0x6a,0x74,0x69])],_0x3f5ce4=window[_0x4a6354([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f1a75[_0x4a6354([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4f1a75[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5225dd={..._0x1c4de0,[_0x4a6354([0x6a,0x74,0x69])]:_0x4f1a75[_0x4a6354([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4f1a75[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5225dd[_0x4a6354([0x76,0x63])],_0x4d02db(_0x5225dd)==_0x3f5ce4;}}}async function _0x313af1(){let _0x5d52e3=!0x0;try{const _0x43d5ee=_0x38a9c3[_0x4a6354([0x73,0x70,0x6c,0x69,0x74])](_0x4a6354([0x2e])),[_0x1b7d32,_0x1528fc,_0x524208]=_0x43d5ee;return _0x135f30(_0x1b7d32),await _0x1fcfe9(_0x1b7d32,_0x1528fc,_0x524208),_0x5d52e3;}catch{return!0x1;}function _0x135f30(_0xd28707){const _0x45c238=_0x3c77ef(_0xd28707);_0x45c238&&_0x45c238[_0x4a6354([0x61,0x6c,0x67])]==_0x4a6354([0x45,0x53,0x32,0x35,0x36])||(_0x5d52e3=!0x1);}async function _0x1fcfe9(_0x4278c8,_0x4072e7,_0x15852d){const _0x4ae0b4=window[_0x4a6354([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4a6354([0x66,0x72,0x6f,0x6d])](_0x59f44b(_0x15852d),_0x28eb00=>_0x28eb00[_0x4a6354([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x63ad30=new window[(_0x4a6354([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4a6354([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4278c8+_0x4a6354([0x2e])+_0x4072e7),_0x135601=window[_0x4a6354([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4a6354([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x135601)return;const _0x9331c0=await _0x135601[_0x4a6354([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4a6354([0x6a,0x77,0x6b]),_0x534828,{[_0x4a6354([0x6e,0x61,0x6d,0x65])]:_0x4a6354([0x45,0x43,0x44,0x53,0x41]),[_0x4a6354([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4a6354([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4a6354([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x135601[_0x4a6354([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4a6354([0x6e,0x61,0x6d,0x65])]:_0x4a6354([0x45,0x43,0x44,0x53,0x41]),[_0x4a6354([0x68,0x61,0x73,0x68])]:{[_0x4a6354([0x6e,0x61,0x6d,0x65])]:_0x4a6354([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x9331c0,_0x4ae0b4,_0x63ad30)||(_0x5d52e3=!0x1);}}function _0x3c77ef(_0x1441eb){return _0x1441eb[_0x4a6354([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4a6354([0x65,0x79]))?JSON[_0x4a6354([0x70,0x61,0x72,0x73,0x65])](_0x59f44b(_0x1441eb)):null;}function _0x59f44b(_0x3aeaf1){return window[_0x4a6354([0x61,0x74,0x6f,0x62])](_0x3aeaf1[_0x4a6354([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4a6354([0x2b]))[_0x4a6354([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4a6354([0x2f])));}function _0x4d02db(_0x1abb62){let _0x1dcd31=0x1505;function _0x35e3f3(_0x14f36e){for(let _0x307fd9=0x0;_0x307fd9<_0x14f36e[_0x4a6354([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x307fd9++){const _0x50d4e9=_0x14f36e[_0x4a6354([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x307fd9);_0x1dcd31=(_0x1dcd31<<0x5)+_0x1dcd31+_0x50d4e9,_0x1dcd31&=_0x1dcd31;}}function _0x263583(_0x528f85){Array[_0x4a6354([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x528f85)?_0x528f85[_0x4a6354([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x263583):_0x528f85&&typeof _0x528f85==_0x4a6354([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4a6354([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x528f85)[_0x4a6354([0x73,0x6f,0x72,0x74])]()[_0x4a6354([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x7ebf4c,_0x38559e])=>{_0x35e3f3(_0x7ebf4c),_0x263583(_0x38559e);}):_0x35e3f3(window[_0x4a6354([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x528f85));}return _0x263583(_0x1abb62),_0x1dcd31>>>0x0;}function _0x3b2f93(_0x3c47f0){return _0x3c47f0[_0x4a6354([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4a6354([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4a6354([0x30]));}function _0x5673c5(_0x13b46d){return _0x13b46d[_0x4a6354([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4a6354([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4a6354([0x6a,0x6f,0x69,0x6e])]('');}function _0x2d19ce(_0x32671a){return _0x4a786e[_0x4a6354([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4a6354([0x68,0x61,0x73])](_0x32671a);}function _0x40ed91(_0x247ddb){return _0x4a786e[_0x4a6354([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4a6354([0x67,0x65,0x74])](_0x247ddb);}function _0x5ecb61(){}function _0x4a6354(_0x4af3cb){return _0x4af3cb['map'](_0x1acdbe=>String['fromCharCode'](_0x1acdbe))['join']('');}_0x1f4afe(await _0x1c0409());}(this);}['destroy'](){const _0x20a808=this['editor']['plugins']['get'](o),_0x5ac1a2=this['editor']['config']['get']('collaboration.channelId');for(const _0x4ee9f4 of _0x20a808['getCommentThreads']({'channelId':_0x5ac1a2}))_0x20a808['_detachCommentThread'](_0x4ee9f4['id']),_0x20a808['_threads']['delete'](_0x4ee9f4['id']);super['destroy']();}['hasMarkerForId'](_0x12c19f){return this['getAllMarkersForId'](_0x12c19f)['length']>0x0;}['getAllMarkersForId'](_0x588c93){const _0x3645f4=[];for(const _0x48d43e of this['editor']['model']['markers'])_0x48d43e['name']['startsWith']('comment:'+_0x588c93)&&_0x3645f4['push'](_0x48d43e);return _0x3645f4;}['scrollToThreadMarker'](_0x5c40b1){setTimeout(()=>{const _0x31384c=this['_getTargetForId'](_0x5c40b1);if(!_0x31384c)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5c40b1&&nt({'target':_0x31384c[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2a9460){this['editor']['model']['change'](()=>{for(const _0x48148e of this['getAllMarkersForId'](_0x2a9460))this['editor']['editing']['reconvertMarker'](_0x48148e);});}['_attachArchivedThread'](_0x6972fc){const _0x30d7de=this['editor']['plugins']['get'](o),_0x54c4f6=this['editor']['plugins']['get'](b),_0x3f5a8a=_0x30d7de['getCommentThread'](_0x6972fc);if(!_0x3f5a8a['isAttached']){const _0x2b0024=_0x3f5a8a['attachTo'](()=>this['_getTargetForId'](_0x3f5a8a['id']));_0x54c4f6['registerAnnotation'](_0x2b0024),_0x3f5a8a['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3113a2=this['editor'],_0x38cb13=_0x3113a2['plugins']['get'](it);_0x3113a2['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x60b40e,_0x285b2c)=>{const {id:_0x331d58}=ft(_0x60b40e['markerName']),_0x2c9653=_0x3113a2['plugins']['get'](o)['getCommentThread'](_0x331d58),_0x359b8c=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x331d58;let _0x1b7fe9;if(_0x2c9653&&_0x2c9653['isResolved']&&!_0x359b8c&&_0x60b40e['item'])return _0x285b2c['consumable']['consume'](_0x60b40e['item'],'addMarker:'+_0x60b40e['markerName']),_0x285b2c['consumable']['consume'](_0x60b40e['item'],'removeMarker:'+_0x60b40e['markerName']),null;const _0x335db3=['ck-comment-marker'];return _0x359b8c&&_0x335db3['push']('ck-comment-marker--active'),_0x1b7fe9=_0x2c9653?.['length']?_0x2c9653['comments']['first']['author']['id']:_0x38cb13['me']['id'],{'classes':_0x335db3,'attributes':{'data-comment':_0x331d58,'data-author-id':_0x1b7fe9}};}}),_0x3113a2['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1b31f3,{options:_0x5c2c4a})=>{if(_0x5c2c4a['showCommentHighlights'])return null;const _0x84f08e=_0x3113a2['plugins']['get'](o),_0x3ac1bb=_0x3113a2['model']['markers']['get'](_0x1b31f3),{id:_0x1744c4,part:_0x2da964}=ft(_0x1b31f3);return _0x3ac1bb&&!_0x3ac1bb['affectsData']||_0x5c2c4a['ignoreResolvedComments']&&_0x84f08e['getCommentThread'](_0x1744c4)?.['isResolved']?null:{'group':'comment','name':_0x2da964?_0x1744c4+':'+_0x2da964:_0x1744c4};}}),_0x3113a2['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1cdfdb,{writer:_0x55e6b3})=>_0x55e6b3['createElement']('$marker',{'data-name':'comment:'+_0x1cdfdb['getAttribute']('id')})}),_0x3113a2['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2eb513=this['editor'],_0x433577=_0x2eb513['plugins']['get'](o),_0x383d42=new Set(),_0x482f56=new Set();_0x2eb513['model']['document']['registerPostFixer'](_0x2793a4=>{let _0x3bfb33=!0x1;for(const {name:_0x171b89,data:_0x33a42c}of _0x2eb513['model']['document']['differ']['getChangedMarkers']()){const {group:_0xe9b369,id:_0x4632c0}=ft(_0x171b89);let _0x495f42=_0x33a42c['newRange'];if('comment'!==_0xe9b369||!_0x495f42)continue;const _0x55402f='$graveyard'===_0x495f42['root']['rootName'];_0x55402f||(_0x495f42=ht(_0x495f42,_0x2eb513['model']),!_0x495f42||_0x495f42['isCollapsed']||!_0x33a42c['newRange']||_0x495f42['isEqual'](_0x33a42c['newRange']))?_0x2eb513['model']['hasContent'](_0x495f42)&&!_0x55402f?this['isThreadsLoadingPaused']?_0x383d42['add'](_0x171b89):this['_handleThreadMarker'](_0x171b89,_0x4632c0):(_0x482f56['add'](_0x171b89),_0x383d42['delete'](_0x171b89),_0x2793a4['removeMarker'](_0x171b89),_0x3bfb33=!0x0):(_0x2793a4['updateMarker'](_0x171b89,{'range':_0x495f42}),_0x3bfb33=!0x0);}return _0x3bfb33;}),this['on']('change:isThreadsLoadingPaused',(_0x3c5f82,_0x555980,_0x52f7fb)=>{if(!_0x52f7fb&&_0x383d42['size'])for(const _0x4d2e55 of _0x383d42){const {id:_0x61fca9}=ft(_0x4d2e55);_0x383d42['delete'](_0x4d2e55),_0x2eb513['model']['markers']['get'](_0x4d2e55)&&this['_handleThreadMarker'](_0x4d2e55,_0x61fca9);}}),this['listenTo'](_0x2eb513['model']['document'],'change',()=>{for(const {name:_0x5271fc,data:{newRange:_0x558faa}}of _0x2eb513['model']['document']['differ']['getChangedMarkers']()){const {group:_0x26f3ae,id:_0x46b27b}=ft(_0x5271fc);if('comment'!==_0x26f3ae)continue;const _0x17c44b=_0x433577['getCommentThread'](_0x46b27b),_0x39bb61=this['hasMarkerForId'](_0x46b27b);_0x17c44b&&(!_0x17c44b['_hasTargetInContent']&&_0x558faa&&_0x2eb513['editing']['view']['once']('render',()=>{const _0xd9d8b5=_0x2eb513['plugins']['get'](y),_0x33bea2=_0x433577['_threadToController']['get'](_0x17c44b)['view'];_0xd9d8b5['getByInnerView'](_0x33bea2)['refreshVisibility']();},{'priority':'low'}),_0x17c44b['_hasTargetInContent']=_0x39bb61||!!_0x558faa),_0x558faa||(_0x482f56['add'](_0x5271fc),_0x383d42['delete'](_0x5271fc));}for(const _0x309a44 of _0x482f56){const {id:_0x155891}=ft(_0x309a44),_0x30daca=_0x433577['getCommentThread'](_0x155891);if(_0x383d42['delete'](_0x309a44),!_0x30daca)continue;const _0x270c8f=this['hasMarkerForId'](_0x155891);_0x270c8f||_0x30daca['isSubmitted']?_0x270c8f||_0x30daca['unlinkedAt']||_0x30daca['setUnlinkedAt'](new Date()):_0x30daca['remove']();}_0x482f56['clear']();});}['_handleInitialThreads'](_0x2a4bfa){_0x2a4bfa['forEach'](_0x1a1383=>{_0x1a1383['unlinkedAt']&&this['_attachArchivedThread'](_0x1a1383['id']);});}['_getTargetForId'](_0x2b8596){const _0x144113=this['editor'],_0x4a3bd2=this['getAllMarkersForId'](_0x2b8596);return et(_0x144113['editing'],_0x4a3bd2);}['_getTextContext'](_0x13a0ba){const _0xf8399b=this['getAllMarkersForId'](_0x13a0ba);let _0x31041b='',_0x237c90=!0x1;for(const _0x482ac1 of _0xf8399b){const _0x2f2084=_0x482ac1['getRange']();for(const _0x14e1a1 of Array['from'](_0x2f2084['getItems']()))_0x14e1a1['is']('$textProxy')?(_0x31041b&&_0x237c90&&(_0x31041b+='\x20',_0x237c90=!0x1),_0x31041b+=_0x14e1a1['data']):_0x237c90=!0x0;_0x237c90=!0x0;}return _0x31041b['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5a71f9,_0x4cf775){const _0x143530=this['editor'],_0x1cea26=_0x143530['plugins']['get'](o);let _0x51c5ca=_0x1cea26['getCommentThread'](_0x4cf775);const _0xfa435a=_0x143530['config']['get']('collaboration.channelId'),_0x2ae6d8=_0x143530['plugins']['get'](b);if(_0x51c5ca&&(_0x51c5ca['unlinkedAt']&&_0x51c5ca['setUnlinkedAt'](null),_0x51c5ca['isAttached']))return _0x51c5ca;return!this['getAllMarkersForId'](_0x4cf775)[0x0]['managedUsingOperations']?_0x143530['editing']['view']['once']('render',()=>{if(_0x1cea26['getCommentThread'](_0x4cf775))return;const _0x167bba=_0x143530['plugins']['get'](y);_0x51c5ca=_0x1cea26['openNewCommentThread']({'channelId':_0xfa435a,'threadId':_0x4cf775,'target':()=>this['_getTargetForId'](_0x4cf775),'context':{'type':'text','value':this['_getTextContext'](_0x4cf775)}});const _0x3e2cf2=_0x1cea26['_threadToController']['get'](_0x51c5ca)['view'],_0x14e946=_0x167bba['getByInnerView'](_0x3e2cf2);_0x14e946&&_0x2ae6d8['registerAnnotation'](_0x14e946);},{'priority':'low'}):_0x1cea26['fetchCommentThread']({'channelId':_0xfa435a,'threadId':_0x4cf775})['then'](_0xd4c12d=>{if('destroyed'!==_0x143530['state']){if(_0x51c5ca=_0xd4c12d,_0x51c5ca&&!_0x51c5ca['isAttached']){const _0x3cbd9f=_0x51c5ca['attachTo'](()=>this['_getTargetForId'](_0x4cf775));_0x2ae6d8['registerAnnotation'](_0x3cbd9f),_0x51c5ca['isResolved']&&this['_reconvertMarkers'](_0x4cf775);}else{if(!_0x51c5ca){const _0x293354=this['getAllMarkersForId'](_0x4cf775);_0x143530['model']['change'](_0x1bcc71=>{for(const _0x1c8a78 of _0x293354)_0x1bcc71['removeMarker'](_0x1c8a78);});}}}}),_0x51c5ca;}['_handleThreadMarker'](_0x596f33,_0x18a6cb){const _0x3f2275=this['_attachMarkerToThread'](_0x596f33,_0x18a6cb);_0x3f2275&&!_0x3f2275['context']&&_0x3f2275['setContext']({'type':'text','value':this['_getTextContext'](_0x18a6cb)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5d574a=this['editor'];rt(_0x5d574a['model'],({left:_0x5eff91,entered:_0x91f731})=>{for(const _0x46139d of _0x5eff91)if(mt(_0x46139d)){_0x5d574a['ui']['ariaLiveAnnouncer']['announce'](N(_0x5d574a['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x356ab7 of _0x91f731)if(mt(_0x356ab7)){_0x5d574a['ui']['ariaLiveAnnouncer']['announce'](N(_0x5d574a['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x4e6209)));break;}});}}function dt(_0x2c7bea,_0x3ce42b){return _0x3ce42b?_0x2c7bea+':'+_0x3ce42b:_0x2c7bea;}function ht(_0x51a566,_0x250bec){const _0x24c10f=_0x250bec['schema'],_0x5a3cbc=_0x250bec['createRange'](_0x51a566['start']);for(const _0x21e1fa of _0x51a566['getWalker']()){const {type:_0x49a6e9,item:_0x4f0085,nextPosition:_0xc12d0}=_0x21e1fa;if('text'===_0x49a6e9||_0x24c10f['isObject'](_0x4f0085)){const _0x307333=_0x250bec['createPositionBefore'](_0x4f0085);_0x5a3cbc['isCollapsed']&&(_0x5a3cbc['start']=_0x307333),_0x5a3cbc['end']=_0xc12d0;}}return _0x5a3cbc;}function mt(_0x9d6d75){return'comment'===ft(_0x9d6d75['name'])['group'];}class s extends _0x383b15{['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 _0xf1ff21=this['editor'],_0x39a965=_0xf1ff21['plugins']['get'](o),_0x5bddb7=_0xf1ff21['plugins']['get'](r),_0xe61d1a=_0xf1ff21['plugins']['get'](y),_0x5587c3=_0xf1ff21['plugins']['get'](b);_0xf1ff21['ui']['componentFactory']['add']('comment',()=>{const _0x2ff184=this['_createUIButton'](_0x1c0d89);return _0x2ff184['tooltip']=!0x0,_0x2ff184;}),_0xf1ff21['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x527852)),_0x5587c3['addSourceCollector'](()=>{const _0x10d978=[];for(const [_0x2539b1,_0x400353]of _0x39a965['_threadToController']){const _0x46d285=_0x5bddb7['getAllMarkersForId'](_0x2539b1['id']),_0x528e55=_0x46d285['map'](_0x3bcda3=>_0x3bcda3['getRange']());_0x46d285['length']>0x0&&_0x10d978['push']([_0x400353['view'],_0x528e55]);}return _0x10d978;}),this['listenTo'](_0xe61d1a,'change:activeAnnotations',(_0x334f4a,_0x4b1b38,_0x2d0a9b)=>{const _0x138bae=Array['from'](_0x2d0a9b)['map'](_0x3a33e1=>_0x3a33e1['innerView'])['find'](_0x41f8cb=>_0x39a965['_viewToController']['has'](_0x41f8cb));if(!_0x138bae)return void(_0x5bddb7['activeMarker']=null);const _0x564a35=_0x39a965['_viewToController']['get'](_0x138bae)['model']['id'],_0x32d3fd='comment:'+_0x564a35;_0x564a35&&_0x5bddb7['hasMarkerForId'](_0x564a35)?_0x5bddb7['activeMarker']=_0x32d3fd:_0x5bddb7['activeMarker']&&(_0x5bddb7['activeMarker']=null);}),this['listenTo'](_0x39a965,'removeCommentThread',(_0x160579,{threadId:_0x215f53,isFromAdapter:_0x41e6c9})=>{!_0x41e6c9&&_0xf1ff21['ui']['focusTracker']['isFocused']&&_0x5bddb7['hasMarkerForId'](_0x215f53)&&_0xf1ff21['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x39a965,'addComment',(_0x28b1d3,{threadId:_0x52f9ef,isFromAdapter:_0x448191})=>{if(_0x448191||!_0x5bddb7['hasMarkerForId'](_0x52f9ef)||!_0x39a965['hasCommentThread'](_0x52f9ef))return;0x1===_0x39a965['getCommentThread'](_0x52f9ef)['length']&&(_0xf1ff21['editing']['view']['focus'](),_0x28b1d3['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x27ab66=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3ffc35;for(const _0x8b7418 in _0x27ab66){const _0x46ec28=_0x8b7418,_0x3ddb22=_0x27ab66[_0x46ec28];if('commentsLicenseKeyValid'==_0x3ddb22||'commentsLicenseKeyInvalid'==_0x3ddb22||'commentsLicenseKeyExpired'==_0x3ddb22||'commentsLicenseKeyDomainLimit'==_0x3ddb22||'commentsLicenseKeyNotAllowed'==_0x3ddb22||'commentsLicenseKeyEvaluationLimit'==_0x3ddb22||'commentsLicenseKeyTrialLimit'==_0x3ddb22||'commentsLicenseKeyUsageLimit'==_0x3ddb22){delete _0x27ab66[_0x46ec28],_0x3ffc35=_0x3ddb22,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3ffc35&&_0x27ab66['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3ffc35&&_0x27ab66['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3ffc35&&_0x27ab66['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3ffc35&&_0x27ab66['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3ffc35&&_0x27ab66['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x3ffc35&&_0x27ab66['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x3ffc35&&_0x27ab66['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4d4d9e){const _0x355061=this['editor'],_0x3efb94=new _0x4d4d9e(_0x355061['locale']),_0x4fbee5=_0x355061['commands']['get']('addCommentThread');return _0x3efb94['set']({'label':N(_0x355061['locale'],'Comment'),'icon':_0x2b049f}),_0x3efb94['bind']('isEnabled')['to'](_0x4fbee5,'hasContent'),this['listenTo'](_0x3efb94,'execute',()=>{_0x4fbee5['execute']();}),_0x3efb94;}}class i extends _0x383b15{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x4f76a0){super(_0x4f76a0),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5ebd37,_0x48b8c6,_0x12d566)=>{_0x12d566?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4325d1,_0x263a41]of this['editor']['commands'])_0x263a41['affectsData']&&'addCommentThread'!==_0x4325d1&&_0x263a41['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 _0x1b035e=this['editor']['editing']['view']['document'];this['listenTo'](_0x1b035e,'cut',_0x168999=>_0x168999['stop'](),{'priority':'highest'}),this['listenTo'](_0x1b035e,'clipboardInput',_0x5bb3bf=>_0x5bb3bf['stop'](),{'priority':'highest'}),this['listenTo'](_0x1b035e,'delete',_0x983925=>_0x983925['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4e8392,_0x201218]of this['editor']['commands'])_0x201218['affectsData']&&'addCommentThread'!==_0x4e8392&&_0x201218['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 _0x38c614{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x176cb8){super(_0x176cb8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x281b31=this['context']['plugins']['get'](y);this['listenTo'](_0x281b31,'_activateAnnotation',(_0x276dec,_0x18dbec)=>{for(const _0xfa1d66 of this['activeUIs']){const _0x190c36=this['_uis']['get'](_0xfa1d66);(0x0,this['uisData']['get'](_0xfa1d66)['filter'])(_0x18dbec)&&_0x190c36['setActiveAnnotation'](_0x18dbec);}}),this['listenTo'](_0x281b31,'_deactivateAllAnnotations',()=>{for(const _0x408927 of this['activeUIs']){this['_uis']['get'](_0x408927)['setActiveAnnotation'](null);}}),this['listenTo'](_0x281b31['_visibleAnnotations'],'add',(_0x484285,_0x2b86f0)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2b86f0);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0xfadc76){return this['activeUIs']['has'](_0xfadc76);}['activate'](_0x5754ef,_0x458d86=this['defaultFilter']){const _0xa90818=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x5754ef))throw new _0x12528('annotationsuis-missing-ui',this,{'uiName':_0x5754ef});this['isActive'](_0x5754ef)&&this['deactivate'](_0x5754ef),this['activeUIs']['add'](_0x5754ef);const _0xd7ea5d=new S();v({'source':_0xa90818['_visibleAnnotations'],'target':_0xd7ea5d,'filter':_0x458d86}),this['uisData']['set'](_0x5754ef,{'collection':_0xd7ea5d,'filter':_0x458d86});const _0x4c97e0=this['_uis']['get'](_0x5754ef);_0x4c97e0['attach'](_0xd7ea5d),this['listenTo'](_0x4c97e0,'change:activeAnnotation',(_0x218d2d,_0x1e178a,_0x6c6aad,_0x4e900c)=>{_0x4e900c&&_0xa90818['_removeActiveAnnotation'](_0x4e900c),_0x6c6aad&&_0xa90818['_addActiveAnnotation'](_0x6c6aad);});}['deactivate'](_0x1cfe6c){if(this['activeUIs']['delete'](_0x1cfe6c),!this['_uis']['has'](_0x1cfe6c))throw new _0x12528('annotationsuis-missing-ui',this,{'uiName':_0x1cfe6c});const _0x705923=this['_uis']['get'](_0x1cfe6c);_0x705923['detach'](),this['stopListening'](_0x705923),this['uisData']['get'](_0x1cfe6c)['collection']['destroy'](),this['uisData']['delete'](_0x1cfe6c);}['switchTo'](_0x6f8b4e){if(!this['_uis']['has'](_0x6f8b4e))throw new _0x12528('annotationsuis-missing-ui',this,{'uiName':_0x6f8b4e});const _0x45941e=this['context']['plugins']['get'](y),_0x316403=Array['from'](_0x45941e['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x6f8b4e);const _0x44c912=this['_uis']['get'](_0x6f8b4e);_0x44c912['setActiveAnnotation'](_0x316403),_0x44c912['_setSelectedAnnotations']&&_0x316403&&_0x44c912['_setSelectedAnnotations']([_0x316403]);}['deactivateAll'](){for(const _0x3fb425 of this['activeUIs'])this['deactivate'](_0x3fb425);}['register'](_0xadf23a,_0x505eb3){if(this['_uis']['has'](_0xadf23a))throw new _0x12528('annotationsuis-register-already-registered');if('function'!=typeof _0x505eb3['attach']||'function'!=typeof _0x505eb3['detach']||'function'!=typeof _0x505eb3['setActiveAnnotation'])throw new _0x12528('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0xadf23a,_0x505eb3);}['refilterAnnotations'](){const _0x290205=this['context']['plugins']['get'](y)['collection'],_0x3a9b97=new Map(),_0xaa93c4=Array['from'](this['activeUIs']);for(const _0x5934ea of this['activeUIs']){const _0x408659=this['uisData']['get'](_0x5934ea)['collection'];for(const _0x10b750 of _0x408659)_0x3a9b97['set'](_0x10b750,_0x5934ea);}for(const _0xe7a095 of _0x290205){const _0x599a3e=_0x3a9b97['get'](_0xe7a095);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xe7a095);const _0x4a4167=_0xaa93c4['find'](_0x350d16=>this['uisData']['get'](_0x350d16)['filter'](_0xe7a095));_0x599a3e!==_0x4a4167&&(_0x599a3e&&this['uisData']['get'](_0x599a3e)['collection']['remove'](_0xe7a095),_0x4a4167&&this['uisData']['get'](_0x4a4167)['collection']['add'](_0xe7a095));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x522cee){const _0x1c0cd8=[];for(const _0x3d3bf3 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3d3bf3)['filter'])(_0x522cee)&&_0x1c0cd8['push'](_0x3d3bf3);}if(_0x1c0cd8['length']>0x1)throw new _0x12528('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1c0cd8,'annotationType':_0x522cee['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(_0x1cd60a){super(_0x1cd60a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x3eb405,_0x1ddbd2)=>_0x3eb405+_0x1ddbd2),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4dc755=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4dc755['to']('isAnimationDisabled',_0x9a54bc=>_0x9a54bc?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4dc755['to']('top',_0x2c4a6f=>Ot(_0x2c4a6f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5c3e36=this['element']['clientHeight'];_0x5c3e36&&(this['height']=_0x5c3e36);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x38c614{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x532321){super(_0x532321),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 _0x275687=this['context']['config']['get']('sidebar.container');_0x275687&&this['setContainer'](_0x275687);}['setContainer'](_0x41afbd){if(!g(_0x41afbd))throw new _0x12528('sidebar-setcontainer-invalid-element');this['container']=_0x41afbd;}['_attachToContainer']({viewClass:_0x4931e5='',spaceBetweenItems:_0x2fe3a6=0x19}={}){if(!g(this['container']))throw new _0x12528('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4931e5,this['_spaceBetweenItems']=_0x2fe3a6;}['rearrange']({removedAnnotation:_0x240f66,previousAnnotation:_0x197b98,nextAnnotation:_0x58119d}){const _0x10653c=this['getSidebarItemView'](_0x240f66);this['view']['list']['remove'](_0x10653c),this['_destroySidebarItemView'](_0x240f66),_0x197b98&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x197b98)),_0x58119d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x58119d)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x739a64,activatedAnnotation:_0x3950fc,disableAnimationOnActivatedAnnotation:_0x53b2d7}){if(this['_activeAnnotation']=_0x3950fc,_0x739a64){_0x739a64['isActive']=!0x1;const _0x51307a=this['getSidebarItemView'](_0x739a64);_0x51307a&&_0x53b2d7&&(_0x51307a['isAnimationDisabled']=!0x1);}if(_0x3950fc){const _0x3370a0=this['getSidebarItemView'](_0x3950fc);_0x3370a0&&(_0x3950fc['isActive']=!0x0,_0x53b2d7&&(_0x3370a0['isAnimationDisabled']=!0x0,_0x3370a0['top']+=0x1),this['_alignToTargetRect'](_0x3370a0));}}['_detachFromContainer'](_0x11e7b0){if(this['view']['element']['remove'](),_0x11e7b0){for(const _0x34d4d8 of _0x11e7b0)this['_destroySidebarItemView'](_0x34d4d8);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3bec33,_0x1ecfea){_0x1ecfea||(_0x1ecfea=_0x3bec33['view']);const _0x21cb4b=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x21cb4b,_0x3bec33),this['_annotationToSidebarItemView']['set'](_0x3bec33,_0x21cb4b),_0x21cb4b['content']['add'](_0x1ecfea),this['listenTo'](_0x3bec33['view'],'change:targetRect',(_0x30464a,_0x14e84c,_0x2dedfc)=>{const _0x3e0242=this['_getTargetTop'](_0x3bec33,_0x2dedfc);_0x21cb4b['_targetTop']!=_0x3e0242&&(_0x21cb4b['_targetTop']=_0x3e0242,this['_setItemTop'](_0x21cb4b,_0x3e0242));}),this['listenTo'](_0x21cb4b,'change:top',()=>{this['_recalculate'](_0x21cb4b,'top');}),this['listenTo'](_0x21cb4b,'change:bottom',()=>{this['_recalculate'](_0x21cb4b,'bottom');}),this['_alignToTargetRect'](_0x21cb4b);const _0x4fa345=this['_getItemBefore'](_0x21cb4b);if(_0x4fa345)this['_alignAfterItem'](_0x4fa345,_0x21cb4b)||this['_alignToTargetRect'](_0x21cb4b);else this['_alignToTargetRect'](_0x21cb4b);return this['_updateLastItem'](),this['view']['list']['add'](_0x21cb4b),_0x21cb4b;}['_alignForTopChange'](_0x308d98){if(!_0x308d98['content']['length'])return;const _0x3e5117=this['_getItemBefore'](_0x308d98);if(!_0x3e5117)return;const _0x457602=this['_sidebarItemViewToAnnotation']['get'](_0x3e5117),_0x26e0c8=this['_activeAnnotation'];_0x26e0c8&&_0x26e0c8===_0x457602?this['_alignAfterItem'](_0x3e5117,_0x308d98):this['_alignBeforeItem'](_0x308d98,_0x3e5117);}['_alignForBottomChange'](_0x39ba0c){if(!_0x39ba0c['content']['length'])return;const _0x3c7b32=this['_getItemAfter'](_0x39ba0c);if(!_0x3c7b32)return;const _0x2f77ec=this['_sidebarItemViewToAnnotation']['get'](_0x3c7b32),_0x5c243d=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x49b349=this['_activeAnnotation'];_0x49b349&&_0x49b349===_0x2f77ec&&_0x5c243d?(this['_alignBeforeItem'](_0x3c7b32,_0x39ba0c),this['_alignAfterItem'](_0x39ba0c,_0x3c7b32)):_0x49b349&&_0x49b349===_0x2f77ec?this['_alignBeforeItem'](_0x3c7b32,_0x39ba0c):this['_alignAfterItem'](_0x39ba0c,_0x3c7b32);}['_recalculate'](_0x1317e8,_0xffe5b7){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2ab5ac,changedProp:_0x74c45}of this['_recalculateBuffer'])'top'===_0x74c45?this['_alignForTopChange'](_0x2ab5ac):this['_alignForBottomChange'](_0x2ab5ac);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1317e8,'changedProp':_0xffe5b7});}['getSidebarItemView'](_0x6a3674){return this['_annotationToSidebarItemView']['get'](_0x6a3674);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x44cefe){const _0x1ea60f=this['getSidebarItemView'](_0x44cefe);this['stopListening'](_0x1ea60f),this['stopListening'](_0x44cefe['view']),_0x1ea60f['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x44cefe),this['_sidebarItemViewToAnnotation']['delete'](_0x1ea60f);}['_createSidebarView'](){const _0x2fe447=new H(this['context']['locale']);return _0x2fe447['render'](),this['on']('change:_lastItem',(_0x4e8b43,_0x19b9f6,_0x267526,_0x25a941)=>{_0x25a941&&_0x2fe447['unbind']('minHeight'),_0x267526?_0x2fe447['bind']('minHeight')['to'](_0x267526,'bottom'):_0x2fe447['minHeight']=null;}),_0x2fe447;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0xf7ca2d){const _0x16c47b=this['_sidebarItemViewToAnnotation']['get'](_0xf7ca2d),_0x5940db=_0x16c47b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x16c47b)-0x1);return _0x5940db&&this['getSidebarItemView'](_0x5940db)||null;}['_getItemAfter'](_0x34ccee){const _0x1c23c6=this['_sidebarItemViewToAnnotation']['get'](_0x34ccee),_0x1553f7=_0x1c23c6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1c23c6)+0x1);return _0x1553f7&&this['getSidebarItemView'](_0x1553f7)||null;}['_alignBeforeItem'](_0x4a3999,_0x5aba56){_0x4a3999['updateHeight']();const _0x336277=G(_0x5aba56['bottom']+this['_spaceBetweenItems'],_0x4a3999['top']);return!!_0x336277&&(this['_setItemTop'](_0x5aba56,_0x5aba56['top']-_0x336277),!0x0);}['_alignAfterItem'](_0x28f19c,_0x35460f){_0x28f19c['updateHeight']();const _0x472383=G(_0x28f19c['bottom']+this['_spaceBetweenItems'],_0x35460f['top']);return!!_0x472383&&(this['_setItemTop'](_0x35460f,_0x35460f['top']+_0x472383,!0x1),!0x0);}['_alignToTargetRect'](_0x2a7f07){const _0x4cef51=this['_sidebarItemViewToAnnotation']['get'](_0x2a7f07);if(!_0x4cef51||!_0x4cef51['target']||!_0x4cef51['targetRect'])return;const _0x3b2111=this['_getTargetTop'](_0x4cef51,_0x4cef51['targetRect']);this['_setItemTop'](_0x2a7f07,_0x3b2111);}['_getTargetTop'](_0x1d2ab0,_0xa6b2df){if(null===_0xa6b2df)return 0x0;if(_0x1d2ab0['target']instanceof _0x2cd921)return _0xa6b2df['top'];{const _0x150236=new _0x2cd921(this['view']['element'])['top'];return _0xa6b2df['top']-_0x150236;}}['_setItemTop'](_0x263783,_0x6c7542,_0xeaf153=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xeaf153&&(_0x6c7542=Math['max'](_0x6c7542,this['_getMaxAvailableTop'](_0x263783))),_0x263783['top']=_0x6c7542;}['_getMaxAvailableTop'](_0x451748){let _0x4ebcc=this['_getItemBefore'](_0x451748),_0x5a2b1d=0x0;for(;_0x4ebcc;)_0x4ebcc['updateHeight'](),_0x5a2b1d+=this['_spaceBetweenItems']+_0x4ebcc['height'],_0x4ebcc=this['_getItemBefore'](_0x4ebcc);return _0x5a2b1d;}}function G(_0x1f35de,_0x4bc34a){return Math['max'](_0x1f35de-_0x4bc34a,0x0);}function g(_0x512b70){return null!==_0x512b70&&'object'==typeof _0x512b70&&0x1===_0x512b70['nodeType'];}class e extends _0x38c614{['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(_0x4f1cad){super(_0x4f1cad),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x43cf09(),this['_refreshPositioningDebounced']=_0x48d319(()=>{_0x4f1cad['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x549439=this['context']['plugins']['get'](j),_0x3775b6=this['context']['plugins']['get'](z);_0x549439['register']('wideSidebar',this),_0x3775b6['container']&&_0x549439['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x397c43){if(_0x397c43===this['activeAnnotation'])return;const _0x25e772=this['context']['plugins']['get'](z);_0x25e772['_activeAnnotation']=_0x397c43;const _0x2dc4f6=this['activeAnnotation'];_0x25e772['refresh']({'blurredAnnotation':_0x2dc4f6,'activatedAnnotation':_0x397c43}),this['activeAnnotation']=_0x397c43;}['attach'](_0x212341){this['annotations']=_0x212341;const _0x571b95=this['context']['plugins']['get'](z);if(_0x571b95['_annotations']=_0x212341,this['isAttached'])throw new _0x12528('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x571b95,'set:container',()=>{this['detach'](),this['listenTo'](_0x571b95,'change:container',_0x473beb=>{_0x473beb['off'](),this['attach'](_0x212341);});}),_0x571b95['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3b5cdc=_0x5ce1a5=>{_0x5ce1a5['updateTargetRect'](),_0x571b95['addAnnotation'](_0x5ce1a5);};for(const _0x2af739 of _0x212341)_0x3b5cdc(_0x2af739);this['listenTo'](_0x212341,'add',(_0x1a9016,_0x531281)=>{_0x3b5cdc(_0x531281);}),this['listenTo'](_0x212341,'remove',(_0x52c080,_0x4f32c0,_0x6407b)=>{_0x571b95['rearrange']({'removedAnnotation':_0x4f32c0,'previousAnnotation':_0x212341['get'](_0x6407b-0x1),'nextAnnotation':_0x212341['get'](_0x6407b+0x1)}),_0x4f32c0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x212341,'focus',(_0x472a89,_0x13499c)=>{this['setActiveAnnotation'](_0x13499c);}),this['listenTo'](_0x212341,'blur',()=>{this['setActiveAnnotation'](null);});const _0xdb42a2=this['context']instanceof _0x43b0cb?this['context']['editors']:new _0x43cf09([this['context']]);for(const _0x2113e0 of _0xdb42a2)this['_integrateWithEditorAnnotations'](_0x2113e0);this['listenTo'](_0xdb42a2,'add',(_0x4fafa6,_0x1931af)=>{this['listenTo'](_0x1931af,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1931af);});}),this['listenTo'](_0xdb42a2,'remove',(_0x40dde9,_0x22f628)=>{_0x22f628['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x22f628['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x12528('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x256c29=this['context']['plugins']['get'](z);_0x256c29['_detachFromContainer'](this['annotations']),this['stopListening'](_0x256c29),this['stopListening'](this['annotations']),this['context']instanceof _0x43b0cb&&this['stopListening'](this['context']['editors']);for(const _0x168340 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x168340);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x223cd8){if(!_0x223cd8['plugins']['has']('EditorAnnotations'))return;const _0x2a65bc=_0x223cd8['plugins']['get']('EditorAnnotations'),_0x5733d0=()=>{const _0x5abc09=_0x2a65bc['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x5abc09[0x0]||null);};this['listenTo'](_0x2a65bc,'refresh',_0x5733d0),this['listenTo'](_0x2a65bc,'blur',(_0x35919e,{isAnnotationTracked:_0x349e91})=>{this['activeAnnotation']&&_0x349e91(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2a65bc,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x9e0b68=>{_0x2a65bc['hasDomSelection']()&&(_0x5733d0(),_0x9e0b68['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2a65bc);}['_destroyEditorAnnotationsIntegration'](_0x370135){this['stopListening'](_0x370135),this['_editorAnnotations']['remove'](_0x370135);}}class C extends _0x1c0d89{['counterView'];constructor(_0xada687){super(_0xada687);const _0x2279cc=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x46273d,_0x56d08e)=>_0x46273d?'...':_0x56d08e['toString']()),this['set']('annotationType',''),this['icon']=_0x2b049f,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2279cc['to']('annotationType',_0x474aa6=>'ck-annotation-counter__badge--'+_0x474aa6),_0x2279cc['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2279cc['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x38c614{['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(_0x15a59e){super(_0x15a59e),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x428d98())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x43cf09(),this['_refreshPositioningDebounced']=_0x48d319(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2f628a(this['context']['locale']),this['balloonPanelView']=new _0x487b3d(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x196716){this['annotations']=_0x196716;const _0x4abcf4=this['context']['plugins']['get'](z),_0x3081e7=this['balloonPanelView'];if(_0x4abcf4['_annotations']=_0x196716,this['isAttached'])throw new _0x12528('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4abcf4,'set:container',()=>{this['detach'](),this['listenTo'](_0x4abcf4,'change:container',_0x28863e=>{_0x28863e['off'](),this['attach'](_0x196716);});}),_0x4abcf4['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xbeb594=_0x4a3dd9=>{const _0x4ab23b=new C(this['context']['locale']);_0x4abcf4['addAnnotation'](_0x4a3dd9,_0x4ab23b),this['_annotationToNarrowView']['set'](_0x4a3dd9,_0x4ab23b),_0x4ab23b['bind']('isDirty','annotationType','number')['to'](_0x4a3dd9['view'],'isDirty','type','length'),_0x4ab23b['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3081e7['content']['first']!==_0x4a3dd9['view']?(this['_showBalloon'](_0x4a3dd9),_0x4a3dd9['view']['element']['focus'](),this['setActiveAnnotation'](_0x4a3dd9)):this['setActiveAnnotation'](null);});};for(const _0x301f64 of _0x196716)_0xbeb594(_0x301f64);this['listenTo'](_0x196716,'add',(_0x32b0c1,_0x1768dd)=>{_0xbeb594(_0x1768dd);}),this['listenTo'](_0x196716,'remove',(_0x1f5df7,_0xf7236,_0x5e1e63)=>{this['_annotationToNarrowView']['get'](_0xf7236)['destroy'](),this['_annotationToNarrowView']['delete'](_0xf7236),_0x4abcf4['rearrange']({'removedAnnotation':_0xf7236,'previousAnnotation':_0x196716['get'](_0x5e1e63-0x1),'nextAnnotation':_0x196716['get'](_0x5e1e63+0x1)}),_0xf7236===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x196716,'focus',(_0x8f804c,_0x13a4df)=>{this['setActiveAnnotation'](_0x13a4df);}),this['listenTo'](_0x196716,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x41bdb8,_0x5b4dda)=>{_0x5b4dda['keyCode']===_0x41313e['esc']&&_0x3081e7['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3081e7['content']['first']),this['_hideBalloon'](),_0x5b4dda['stopPropagation'](),_0x5b4dda['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x522b29,_0xde7c82)=>{const _0x12679a=_0xde7c82['target'];_0x3081e7['isVisible']&&_0x3081e7['element']['contains'](_0x12679a)||_0x4abcf4['view']['element']['contains'](_0x12679a)||_0x522b29['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3dafa2=>_0x3dafa2['contains'](_0x12679a))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x31ee3f=this['context']instanceof _0x43b0cb?this['context']['editors']:new _0x43cf09([this['context']]);for(const _0x3bd952 of _0x31ee3f)this['_integrateWithEditorAnnotations'](_0x3bd952);this['listenTo'](_0x31ee3f,'add',(_0x5730d5,_0x44e61b)=>{this['listenTo'](_0x44e61b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x44e61b);});}),this['listenTo'](_0x31ee3f,'remove',(_0x3ea3c1,_0x4264f8)=>{_0x4264f8['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4264f8['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4bb943){if(_0x4bb943===this['activeAnnotation'])return;const _0x50d54b=this['context']['plugins']['get'](z);if(_0x50d54b['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4bb943,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4bb943)_0x50d54b['getSidebarItemView'](_0x4bb943)?this['_showBalloon'](_0x4bb943):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4bb943;}['detach'](){if(!this['isAttached'])throw new _0x12528('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1c05a0=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5759e6=>_0x5759e6['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1c05a0['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x43b0cb&&this['stopListening'](this['context']['editors']);for(const _0x7dfb5b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x7dfb5b);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'](_0x35fe7e){if(!_0x35fe7e['plugins']['has']('EditorAnnotations'))return;const _0x2cb100=_0x35fe7e['plugins']['get']('EditorAnnotations'),_0x244f8e=this['context']['plugins']['get'](z),_0x1e25b9=this['annotations'],_0x278139=this['balloonPanelView'],_0x5501d4=()=>{const _0xda447d=_0x2cb100['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xda447d),this['setActiveAnnotation'](_0xda447d[0x0]||null);};this['listenTo'](_0x2cb100,'refresh',_0x5501d4),this['listenTo'](_0x2cb100,'blur',(_0x1da8da,{isAnnotationTracked:_0x35a259})=>{this['activeAnnotation']&&_0x35a259(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2cb100,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1e25b9,'blur',_0x264622=>{_0x2cb100['hasDomSelection']()&&_0x264622['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1789c9,_0xd97aff)=>{const _0x219906=_0xd97aff['target'];_0x278139['isVisible']&&_0x278139['element']['contains'](_0x219906)||_0x244f8e['view']['element']['contains'](_0x219906)||this['activeAnnotation']&&_0x2cb100['hasDomSelection']()&&(_0x5501d4(),_0x1789c9['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2cb100);}['_destroyEditorAnnotationsIntegration'](_0x12ba3a){_0x12ba3a&&(this['stopListening'](_0x12ba3a),this['_editorAnnotations']['remove'](_0x12ba3a));}['_setSelectedAnnotations'](_0x3c02b9){for(const _0x1a2686 of this['_selectedAnnotations'])_0x3c02b9['includes'](_0x1a2686)||this['_manuallyClosedAnnotationViews']['delete'](_0x1a2686['view']);this['_selectedAnnotations']=_0x3c02b9;}['_refreshPositioning'](){const _0x3df21f=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3df21f['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x513423){if(this['_manuallyClosedAnnotationViews']['has'](_0x513423['view']))return;const _0x2ae857=this['balloonPanelView']['content']['first'];_0x2ae857!==_0x513423['view']?(_0x2ae857&&this['_detachListeners'](_0x2ae857),this['_attachListeners'](_0x513423['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x513423['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1db76d=this['balloonPanelView']['content']['first'],_0xf90ea0=_0x1db76d&&this['annotations']['getByView'](_0x1db76d);if(!_0xf90ea0||!this['_annotationToNarrowView']['has'](_0xf90ea0))return;const _0x261db1=this['_annotationToNarrowView']['get'](_0xf90ea0)['element'],_0x126bf2=(function(){const _0x27cb5c=_0x487b3d['defaultPositions'];return[_0x27cb5c['southArrowNorthEast'],_0x27cb5c['northArrowSouthEast'],_0x27cb5c['southArrowNorth'],_0x27cb5c['northArrowSouth'],_0x27cb5c['southArrowNorthWest'],_0x27cb5c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x261db1,'positions':_0x126bf2});}['_hideBalloon'](){const _0xe5111b=this['balloonPanelView'],_0x8c15d2=_0xe5111b['content']['first'];_0x8c15d2&&(this['_detachListeners'](_0x8c15d2),_0xe5111b['unpin'](),_0xe5111b['content']['clear']());}['_attachListeners'](_0xad6fbe){this['listenTo'](_0xad6fbe,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xad6fbe,'Esc',(_0x3b7cd1,_0x42bc95)=>{this['_manuallyClosedAnnotationViews']['add'](_0xad6fbe),this['_hideBalloon'](),_0x42bc95();});}['_detachListeners'](_0x5be449){this['stopListening'](_0x5be449);}}class c extends _0x383b15{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0xabe6bf,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52681d){super(_0x52681d),_0x52681d['editing']['view']['addObserver'](_0x5f6d1e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x52681d['plugins']['get'](_0xabe6bf),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x53882c=this['editor']['plugins']['get'](j);_0x53882c['context']===this['editor']&&(_0x53882c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3175bd,_0x56c3f1)=>{const _0x38eb72=this['_balloon'];if(this['isAttached']&&_0x38eb72['visibleView']){const _0x190ff2=this['annotations']['getByView'](_0x38eb72['visibleView']);_0x190ff2&&this['_closeAnnotation'](_0x190ff2),_0x56c3f1();}}));}['afterInit'](){const _0x326843=this['editor']['plugins']['get'](j);_0x326843['context']===this['editor']&&(_0x326843['hasActive']()||_0x326843['switchTo']('inline'));}['setActiveAnnotation'](_0x468496){_0x468496!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x468496&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x468496)&&this['_addAnnotationToBalloon'](_0x468496,!0x0),_0x468496['isActive']=!0x0),_0x468496||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x468496);}['attach'](_0x33dd34){this['annotations']=_0x33dd34;const _0x2dc03d=this['editor']['plugins']['get'](j),_0x4dc386=this['_balloon'];if(this['isAttached'])throw new _0x12528('inlineannotations-attach-already-attached',this);if(_0x2dc03d['context']!==this['editor'])throw new _0x12528('inlineannotations-not-allowed-with-context',this);const _0x1826d7=this['editor']['plugins']['get'](b);this['listenTo'](_0x1826d7,'refresh',()=>{const _0x2bbcc2=_0x1826d7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x368bbd,_0x28926a;!this['_forceRefresh']&&(_0x368bbd=_0x2bbcc2,_0x28926a=this['_selectedAnnotations'],_0x368bbd['length']===_0x28926a['length']&&_0x368bbd['every'](_0x57ef35=>_0x28926a['includes'](_0x57ef35)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2bbcc2),this['setActiveAnnotation'](_0x2bbcc2[0x0]||null));}),this['listenTo'](_0x1826d7,'blur',(_0x1dc922,{isAnnotationTracked:_0xb3a112})=>{this['activeAnnotation']&&_0xb3a112(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x29e201,_0x277e28,_0x51e7bf)=>{_0x51e7bf||this['setActiveAnnotation'](null);}),this['listenTo'](_0x33dd34,'remove',(_0x341ca8,_0x180668)=>{this['_removeAnnotationFromBalloon'](_0x180668),_0x180668===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4dc386,'change:visibleView',(_0x392266,_0x44501f,_0x1c1706,_0x3ae6c6)=>{_0x3ae6c6&&this['stopListening'](_0x3ae6c6);const _0xd0ab30=_0x33dd34['getByView'](_0x1c1706);_0x1c1706&&_0xd0ab30&&(this['listenTo'](_0x1c1706,'change:height',()=>{_0x4dc386['updatePosition']();}),this['listenTo'](_0x1c1706,'Esc',()=>{this['_closeAnnotation'](_0xd0ab30),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xd0ab30&&this['setActiveAnnotation'](_0xd0ab30));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4dc386['visibleView']&&(_0x33dd34['getByView'](_0x4dc386['visibleView'])&&_0x4dc386['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 _0x12528('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2fe306 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2fe306);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x345fd6){for(const _0x1abc3f of this['_selectedAnnotations'])_0x345fd6['includes'](_0x1abc3f)||this['_manuallyClosed']['delete'](_0x1abc3f);for(const _0x1ad7a7 of this['annotations'])_0x345fd6['includes'](_0x1ad7a7)||this['_removeAnnotationFromBalloon'](_0x1ad7a7);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1f3cb9 of _0x345fd6)this['_addAnnotationToBalloon'](_0x1f3cb9);}this['_selectedAnnotations']=_0x345fd6;}['_addAnnotationToBalloon'](_0xe54ac0,_0xb2ac1=!0x1){this['_manuallyClosed']['has'](_0xe54ac0)||(this['_addedAnnotations']['has'](_0xe54ac0)||this['_balloon']['hasView'](_0xe54ac0['view'])||(this['_addedAnnotations']['add'](_0xe54ac0),this['_balloon']['add']({'stackId':_0xe54ac0['view']['id'],'view':_0xe54ac0['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xe54ac0)}})),_0xb2ac1&&this['_balloon']['showStack'](_0xe54ac0['view']['id']));}['_getBalloonTargetForAnnotation'](_0x971394){const _0x266cdb=_0x971394['target'],_0xb6273c=this['editor']['editing']['view'],_0x5cf51b=_0xb6273c['document']['selection']['getFirstRange'](),_0x4d456e=_0xb6273c['domConverter']['viewRangeToDom'](_0x5cf51b);if(_0x4d456e['collapse'](!0x0),_0x266cdb){if(_0x266cdb instanceof _0x2cd921)return _0x266cdb;let _0x2c1d8b=[];for(const _0x138c17 of _0x266cdb)_0x2c1d8b['push'](...F(_0x138c17['getClientRects']()));_0x2c1d8b=function(_0x1c3c32){const _0x48095f=[];let _0x199f0f=_0x1c3c32[0x0];for(let _0x10742f=0x1;_0x10742f<_0x1c3c32['length'];_0x10742f++)P(_0x199f0f,_0x1c3c32[_0x10742f])?_0x199f0f['width']+=_0x1c3c32[_0x10742f]['width']:(_0x48095f['push'](_0x199f0f),_0x199f0f=_0x1c3c32[_0x10742f]);return _0x48095f['push'](_0x199f0f),_0x48095f;}(_0x2c1d8b);const _0x51ca08=_0x4d456e['getBoundingClientRect']();return _0x2c1d8b['find'](_0x3f6e7a=>_0x3f6e7a['top']<=_0x51ca08['top']&&_0x3f6e7a['bottom']>=_0x51ca08['bottom']&&_0x3f6e7a['left']<=_0x51ca08['left']&&_0x3f6e7a['right']>=_0x51ca08['right'])||_0x2c1d8b[0x0];}return _0x971394['targetRect']||_0x4d456e;}['_removeAnnotationFromBalloon'](_0x7a276e){this['_addedAnnotations']['has'](_0x7a276e)&&this['_balloon']['hasView'](_0x7a276e['view'])&&(this['_addedAnnotations']['delete'](_0x7a276e),this['_balloon']['remove'](_0x7a276e['view']));}['_closeAnnotation'](_0x14057b){this['_manuallyClosed']['add'](_0x14057b),this['_removeAnnotationFromBalloon'](_0x14057b);}}function F(_0x3a38ae){return Array['from'](_0x3a38ae)['map'](DOMRect['fromRect']);}function P(_0x4d922d,_0x25053f){return _0x4d922d['top']===_0x25053f['top']&&_0x4d922d['bottom']===_0x25053f['bottom']&&_0x4d922d['right']===_0x25053f['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x566478,_0x5ce357){super(_0x566478),this['set']('isEmpty',!_0x5ce357['length']),this['focusTracker']=new _0x10c8da(),this['_annotationViews']=_0x5ce357,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x5d5ef9({'focusables':_0x5ce357,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5ce357,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5ce357,'remove',(_0x566aa5,_0x48dff4)=>{_0x48dff4['isActive']&&this['focus'](),_0x5ce357['length']||(this['isEmpty']=!0x0);});const _0xccde84=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x566478,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5ce357},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0xccde84['if']('isEmpty','ck-hidden',_0x44b337=>!_0x44b337)]},'children':[{'text':N(_0x566478,'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 _0x1f37fa of this['_annotationViews'])this['focusTracker']['add'](_0x1f37fa['element']);this['_annotationViews']['on']('change',(_0x2d8625,{added:_0x224b4d,removed:_0x138ca8})=>{for(const _0x1553d7 of _0x224b4d)this['focusTracker']['add'](_0x1553d7['element']);for(const _0xb622c7 of _0x138ca8)this['focusTracker']['remove'](_0xb622c7['element']);});}}class p extends _0x38c614{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0xe96814){super(_0xe96814),this['archivedThreads']=new _0x43cf09();}['init'](){const _0x388862=this['context'],_0x5dda20=_0x388862['plugins']['get'](o),_0x855a47=_0x388862['plugins']['get'](y);this['listenTo'](_0x5dda20,'addCommentThread',(_0x534630,{threadId:_0x3e550c})=>{const _0x15b2ca=_0x5dda20['getCommentThread'](_0x3e550c);_0x15b2ca['archivedAt']&&this['archivedThreads']['add'](_0x15b2ca,this['_calculatePosition'](_0x15b2ca['archivedAt'])),this['listenTo'](_0x15b2ca,'change:archivedAt',(_0x221718,_0x430c79,_0x4a814b)=>{_0x4a814b?this['archivedThreads']['has'](_0x15b2ca)||this['archivedThreads']['add'](_0x15b2ca,this['_calculatePosition'](_0x15b2ca['archivedAt'])):this['archivedThreads']['has'](_0x15b2ca)&&this['archivedThreads']['remove'](_0x15b2ca);});}),this['listenTo'](_0x5dda20,'removeCommentThread',(_0x50e3ae,{threadId:_0x190a8b})=>{const _0x53bc21=_0x5dda20['getCommentThread'](_0x190a8b);this['stopListening'](_0x53bc21),this['archivedThreads']['has'](_0x53bc21)&&this['archivedThreads']['remove'](_0x53bc21);},{'priority':'highest'}),this['listenTo'](_0x855a47['collection'],'focus',(_0x389382,_0x444b20)=>{_0x444b20['isVisible']||(_0x444b20['isActive']=!0x0,_0x855a47['activate'](_0x444b20));});}['_calculatePosition'](_0x341c9a){const _0x44606c=[...this['archivedThreads']]['findIndex'](_0x4523c5=>_0x4523c5['archivedAt']<_0x341c9a);return _0x44606c>-0x1?_0x44606c:this['archivedThreads']['length'];}}class a extends _0x383b15{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x5c0365];}constructor(_0x6abf18){super(_0x6abf18),this['annotationViews']=new _0x39e993(),this['_pendingThreads']=[];}['init'](){const _0x23938c=this['editor'],_0x12790c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x23938c['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1c0d89,!0x0)),_0x23938c['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2c9519=this['_createCommentsArchiveButton'](_0x527852);return _0x2c9519['set']({'role':'menuitemcheckbox'}),_0x2c9519;});const _0xd81189=_0x23938c['plugins']['get'](p),_0x905db1=_0x23938c['plugins']['get']('Annotations'),_0x5961a2=_0x23938c['plugins']['get']('CommentsRepository');_0xd81189['archivedThreads']['forEach'](_0x2ae9b9=>{this['_handleNewThread'](_0x2ae9b9);}),this['listenTo'](_0xd81189['archivedThreads'],'add',(_0x201433,_0x15a253)=>{this['_handleNewThread'](_0x15a253);}),this['listenTo'](_0x905db1['collection'],'add',(_0x459c2a,_0x161589)=>{const _0x5c1349=this['_pendingThreads']['find'](_0x45a37c=>{const _0x56569b=_0x5961a2['_threadToController']['get'](_0x45a37c);return _0x56569b&&_0x161589['innerView']===_0x56569b['view'];});if(_0x5c1349){const _0x41230a=this['_calculatePosition'](_0x5c1349['archivedAt']);this['annotationViews']['add'](_0x161589['view'],_0x41230a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5c1349),0x1);}}),this['listenTo'](_0xd81189['archivedThreads'],'remove',(_0x4802d6,_0x2dd535)=>{const _0x5159e6=_0x23938c['config']['get']('collaboration.channelId');if(!_0x5159e6||_0x2dd535['channelId']===_0x5159e6){if(this['_pendingThreads']['includes'](_0x2dd535))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2dd535),0x1);else{const _0x5e40bd=_0x5961a2['_threadToController']['get'](_0x2dd535),_0x2c69e9=_0x905db1['getByInnerView'](_0x5e40bd['view']);this['annotationViews']['remove'](_0x2c69e9['view']),this['stopListening'](_0x2c69e9['focusableElements']);}}}),this['listenTo'](_0x905db1['collection'],'add',(_0x4d601e,_0x21ff0a)=>{this['listenTo'](_0x21ff0a,'escape',_0x12790c);}),this['listenTo'](_0x905db1['collection'],'remove',(_0x158de6,_0x47cb9a)=>{this['stopListening'](_0x47cb9a,'escape',_0x12790c);});}['_handleNewThread'](_0x4a965e){const _0x5dfe4e=this['editor']['plugins']['get']('CommentsRepository'),_0x14ff85=this['editor']['plugins']['get']('Annotations'),_0x114aba=this['editor']['config']['get']('collaboration.channelId');if(!_0x114aba||_0x4a965e['channelId']===_0x114aba){const _0x96dc7b=_0x5dfe4e['_threadToController']['get'](_0x4a965e);if(!_0x96dc7b)return void this['_pendingThreads']['push'](_0x4a965e);const _0xb11f81=this['_calculatePosition'](_0x4a965e['archivedAt']),_0x5138ec=_0x14ff85['getByInnerView'](_0x96dc7b['view']);_0x5138ec['isVisible']&&_0x14ff85['_visibleAnnotations']['remove'](_0x5138ec),this['annotationViews']['add'](_0x5138ec['view'],_0xb11f81);}}['_calculatePosition'](_0x4a35ab){const _0x10400c=this['editor']['config']['get']('collaboration.channelId'),_0x300a10=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x272f7d=>_0x272f7d['channelId']===_0x10400c)['findIndex'](_0x1ec5fc=>_0x1ec5fc['archivedAt']<_0x4a35ab);return _0x300a10<0x0||_0x300a10>this['annotationViews']['length']?this['annotationViews']['length']:_0x300a10-0x1;}['_toggleDialog'](){const _0x1799da=this['editor'],_0x13d49d=_0x1799da['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x1799da['locale'],this['annotationViews'])),'commentsArchive'===_0x13d49d['id']?_0x13d49d['hide']():_0x13d49d['show']({'id':'commentsArchive','title':N(_0x1799da['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2b803a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x23572c['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x3b2e7e,_0x5be240=!0x1){const _0x23f49e=this['editor']['locale'],_0xe5a38d=this['editor']['plugins']['get']('Dialog'),_0x543a84=new _0x3b2e7e(_0x23f49e);return _0x543a84['bind']('isEnabled')['to'](this,'isEnabled'),_0x543a84['bind']('isOn')['to'](_0xe5a38d,'id',_0x4f59de=>'commentsArchive'===_0x4f59de),_0x543a84['set']({'label':N(_0x23f49e,'COMMENTS_ARCHIVE'),'icon':_0x2b803a,'isToggleable':!0x0}),_0x5be240&&(_0x543a84['tooltip']=!0x0),this['listenTo'](_0x543a84,'execute',()=>this['_toggleDialog']()),_0x543a84;}['_hideDialogOnAnnotationEscape']=_0x464acf=>{const _0x230a95=_0x464acf['source'];if(!this['annotationViews']['has'](_0x230a95['view']))return;const _0x19cd38=this['editor']['plugins']['get']('Dialog');_0x19cd38['isOpen']&&'commentsArchive'===_0x19cd38['id']&&(_0x19cd38['hide'](),_0x464acf['stop']());};}class gi extends _0x383b15{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 _0x4f592b,ContextPlugin as _0x14070b,PendingActions as lt,Command as _0x5e53d9,Plugin as _0xa4777,Context as _0x50bbf8}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x434911,uid as _0x144fe1,KeystrokeHandler as jt,FocusTracker as _0x30744a,diff as _0x5b90fe,Collection as _0x4f0cac,Rect as _0x1bd7c4,CKEditorError as _0x4842d8,first as _0x243c4e,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x5ce20f,keyCodes as _0x243f97}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x96e7f7,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x4f53cc,trimHtml as _0x5e26a1,LateFocusDropdownButtonView as _0x380272,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x23d791}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x5adaa1}from'es-toolkit/compat';import{IconUndo as _0x6b1282,IconCheck as _0x500b61,IconPencil as _0x28785e,IconRemoveComment as _0x7dbd41,IconThreeVerticalDots as _0x4d6106,IconAddComment as _0x4b2964,IconCommentsArchive as _0x51da9}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x17fb5d,ButtonView as _0x4373f8,ViewCollection as _0x2c7739,createDropdown as _0x10bb76,ListView as _0xdf5ea6,focusChildOnDropdownOpen as _0x17948c,ListItemView as _0x217df6,MenuBarMenuListItemButtonView as _0x1f2dd5,BodyCollection as _0x4c3bdf,BalloonPanelView as _0x21e091,ContextualBalloon as _0x2817a0,Dialog as _0x43ab14,DialogViewPosition as _0x176cbd}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x3d5143}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 _0x498d8c}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x2e8f4b}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x434911(){['model'];['view'];constructor(_0x2c058b,_0x3d3920){super(),this['model']=_0x2c058b,this['model']['_isAttached']=!0x0,this['view']=_0x3d3920,this['listenTo'](_0x3d3920,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x3d3920,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x3d3920,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x3d3920,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x3d3920,'addComment',(_0x224b92,_0x21dbff)=>this['addComment'](_0x21dbff)),this['listenTo'](_0x3d3920,'updateComment',(_0x1d4f11,_0x6083cf,_0x2b2b52)=>this['updateComment'](_0x6083cf,_0x2b2b52)),this['listenTo'](_0x3d3920,'removeComment',(_0x1f25cc,_0x54628b)=>this['removeComment'](_0x54628b));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x261d4f){this['model']['addComment']({'content':_0x261d4f,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x929f4e,_0x3f1bd8){this['model']['getComment'](_0x929f4e)['update']({'content':_0x3f1bd8});}['removeComment'](_0xa8e4be){this['model']['getComment'](_0xa8e4be)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x288677,_0x3702de,_0x3acc21){const t=_0x288677['t'];switch(_0x3702de){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'},_0x3acc21);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'},_0x3acc21);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'},_0x3acc21);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'},_0x3acc21);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x3acc21);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'},_0x3acc21);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'},_0x3acc21);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'},_0x3acc21);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(_0x55308d,_0x55a618){super(_0x55308d);const _0x23f2f0=_0x144fe1();this['main']=this['createCollection'](),this['editable']=new $t(_0x55308d,_0x55a618,void 0x0,{'label':()=>N(_0x55308d,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x55308d['uiLanguageDirection'],'lang':_0x55308d['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x23f2f0},'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(_0x4e8cc0){super(_0x4e8cc0),this['view']=new Vt(_0x4e8cc0['locale'],_0x4e8cc0['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x3f1d96=this['editor']['editing']['view'],_0x3290ee=this['view']['editable'],_0xd96ebc=_0x3f1d96['document']['getRoot']();_0x3290ee['name']=_0xd96ebc['rootName'],this['view']['render']();const _0x4ea56f=_0x3290ee['element'];this['setEditableElement'](_0x3290ee['name'],_0x4ea56f),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3f1d96['attachDomRoot'](_0x4ea56f),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x434911(_0x4f592b){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x57a239={}){function _0x506606(_0x24888f){return _0x24888f['map'](_0xffa1c=>String['fromCharCode'](_0xffa1c))['join']('');}(_0x57a239=Object['assign']({},_0x57a239))['plugins']||(_0x57a239['plugins']=Rt['defaultPlugins']),super(_0x57a239),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x506606([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x506606([0x76,0x69,0x65,0x77])][_0x506606([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x506606([0x61,0x75,0x74,0x6f]),this[_0x506606([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x506606([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x506606([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x506606([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x506606([0x6f,0x6b])});}['create'](){const _0x5bf901=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5bf901))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3e8e2a=>{const _0xb54ef7=this['model']['document']['getRoot'](),_0x255413=_0xb54ef7&&_0xb54ef7['getChild'](_0xb54ef7['childCount']-0x1);_0x3e8e2a['setSelection'](_0x255413,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x21dfb4=this['editing']['view'],_0x4f825e=_0x21dfb4['document']['getRoot'](),_0x5f3bf1=_0x4f825e['getChild'](0x0);_0x4f825e['childCount']>0x1||!_0x5f3bf1||'p'!=_0x5f3bf1['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x21dfb4,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5f3bf1['placeholder']=this['placeholder']),St({'view':_0x21dfb4,'element':_0x5f3bf1,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5f3bf1);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3d1e5b,_0x4ee255={}){super(_0x3d1e5b),this['editor']=null,this['_editorConfig']=_0x4ee255,this['set']('value',_0x4ee255['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x3d1e5b,'Reply...')),this['set']('submitLabel',N(_0x3d1e5b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x30744a(),this['focusCycler']=new _0x17fb5d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x45d2ab,_0x319e86)=>{this['cancelButtonView']['fire']('execute'),_0x319e86();}),this['keystrokes']['set']('Ctrl+Enter',(_0xb78d5,_0x55116a)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x55116a());}),this['on']('submit',(_0x2888af,_0x5868ca)=>{_0x5868ca['length']>0xfde8?(alert(N(_0x3d1e5b,'TOO_LONG_COMMENT_ALERT',[_0x5868ca['length'],0xfde8])),_0x2888af['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x540357=this['editor'];this['element']['insertBefore'](_0x540357['ui']['element'],this['element']['firstChild']),_0x540357['model']['document']['on']('change',()=>this['value']=_0x540357['getData']()),_0x540357['bind']('placeholder')['to'](this),this['focusables']['add'](_0x540357['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x36e06e){-0x1===_0x36e06e?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x1ffe5a}=this,_0x3c0499=new _0x4373f8(_0x1ffe5a);return _0x3c0499['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3c0499['withText']=!0x0,_0x3c0499['bind']('label')['to'](this,'submitLabel'),_0x3c0499['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3c0499['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1e0697,_0x383ac9)=>!_0x383ac9&&!!_0x1e0697['trim']()),_0x3c0499;}['_createCancelButton'](){const {locale:_0xe86f31}=this,_0x30721d=new _0x4373f8(_0xe86f31);return _0x30721d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x30721d['label']=N(_0xe86f31,'Cancel'),_0x30721d['withText']=!0x0,_0x30721d['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x30721d;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x330051=>{this['focusTracker']['add'](_0x330051['element']);}),this['focusables']['on']('change',(_0x17cc2e,_0x4161b8)=>{for(const _0x362b65 of Array['from'](_0x4161b8['added'])['reverse']())this['focusTracker']['add'](_0x362b65['element']);});}}class ie extends kt{constructor(_0x32fcb4,_0x58a2cb,_0x445d40){super(_0x32fcb4),this['commentInputView']=new os(_0x32fcb4,_0x445d40),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3d7187,_0x1b055f)=>_0x3d7187||!!_0x1b055f),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x96e7f7(_0x32fcb4,_0x58a2cb),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x2c2214){this['commentInputView']['focus'](_0x2c2214);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2bdf34,_0x58a184)=>{const {submitButtonView:_0x5a7a7d,cancelButtonView:_0x43daa5,editor:_0x1c96e3}=this['commentInputView'];[_0x5a7a7d['element'],_0x43daa5['element'],_0x1c96e3?_0x1c96e3['editing']['view']['getDomRoot']():null]['filter'](_0x1ae5f0=>_0x1ae5f0)['some'](_0x12c56f=>_0x12c56f['contains'](_0x58a184['target']))||(this['focus'](),_0x58a184['preventDefault']());});}}class rs extends kt{constructor(_0x4b0c71){super(_0x4b0c71);const _0x59b695=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x59b695['to']('count',_0x18a71b=>N(_0x4b0c71,'NUMBER_OF_COMMENTS',_0x18a71b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5f2df3,_0x3dc468,_0x7cd485){super(_0x5f2df3);const _0x22239b=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x3dc468['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x3dc468,this['_config']=_0x7cd485,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x30744a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x17fb5d({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x12272e=>this['commentViews']['map'](_0x3a81d1=>_0x3a81d1['element'])['includes'](_0x12272e['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5f2df3),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xe20f32=>_0xe20f32-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2dbde9 of _0x3dc468['comments'])this['_handleNewCommentModel'](_0x2dbde9);this['_handleInfoComment'](),this['listenTo'](_0x3dc468['comments'],'add',(_0x2c7d6c,_0x4bc965)=>{const _0x2c3883=this['_calculatePosition'](_0x4bc965);this['length']++,this['_handleNewCommentModel'](_0x4bc965,_0x2c3883),this['refreshVisibleViews']();}),this['listenTo'](_0x3dc468['comments'],'remove',(_0xdfec07,_0x2d73c8)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2d73c8),this['refreshVisibleViews']();}),this['listenTo'](_0x3dc468,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x3dc468,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x22239b['if']('length','ck-hidden',_0x911f85=>!_0x911f85)],'aria-label':N(_0x5f2df3,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x1a3cd7){-0x1===_0x1a3cd7?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1ce617 of this['commentViews'])_0x1ce617['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4fbf64,_0x29343f){const _0x1f2b36=new this['_config']['CommentView'](this['locale'],_0x4fbf64,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1f2b36['viewUid']=_0x4fbf64['id'],_0x1f2b36['delegate']('removeComment')['to'](this),_0x1f2b36['delegate']('updateComment')['to'](this),_0x1f2b36['delegate']('resolveCommentThread')['to'](this),_0x1f2b36['delegate']('editorReady')['to'](this),_0x1f2b36['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1f2b36,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1f2b36,_0x29343f);}['_calculatePosition'](_0x5abd40){const _0x348d39=this['_model']['_findOptimalIndex'](_0x5abd40);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5abd40['authoredAt']?_0x348d39-0x1:_0x348d39:_0x348d39-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x1fbeab={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x1fbeab,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x1fbeab));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x14c4a2){const _0x68f69f=this['commentViews']['remove'](_0x14c4a2['id']);this['stopListening'](_0x68f69f),_0x68f69f['isEditMode']&&this['_updateHasDirtyComment'](),_0x68f69f['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x23a26d=>_0x23a26d['isEditMode']);}['_rearrangeCollapse'](){const _0x240f4b=function(_0x4f894b){const _0x4745f4=new _0x4f0cac();for(const _0x1b9e65 of _0x4f894b)_0x4745f4['add'](_0x1b9e65);return _0x4745f4;}(this['commentViews']),_0x585483=this['_collapsedCommentsView']['count'];for(let _0x4bb71b=0x1;_0x4bb71b<=_0x585483;_0x4bb71b++)_0x240f4b['remove'](0x1);for(const _0x12a413 of _0x240f4b)_0x12a413['collapse']();_0x585483>0x0&&_0x240f4b['add'](this['_collapsedCommentsView'],0x1),ns(_0x5b90fe(Array['from'](this['visibleViews']),Array['from'](_0x240f4b)),this['visibleViews'],_0x240f4b);}['_rearrangeExpand'](){ns(_0x5b90fe(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4146c8 of this['visibleViews'])_0x4146c8['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x3b8cb1=>{this['focusTracker']['add'](_0x3b8cb1['element']),this['keystrokes']['listenTo'](_0x3b8cb1['element']);}),this['commentViews']['on']('change',(_0x56b1c6,_0x4537c6)=>{for(const _0x4a017b of _0x4537c6['removed'])this['focusTracker']['remove'](_0x4a017b['element']),this['keystrokes']['stopListening'](_0x4a017b['element']);for(const _0x1ed460 of Array['from'](_0x4537c6['added'])['reverse']())this['focusTracker']['add'](_0x1ed460['element']),this['keystrokes']['listenTo'](_0x1ed460['element']);});}}function ns(_0x52b7ed,_0x56f920,_0x2cad55){let _0xc73bd4=0x0;for(const _0x3de990 of _0x52b7ed)switch(_0x3de990){case'insert':_0x56f920['add'](_0x2cad55['get'](_0xc73bd4),_0xc73bd4),_0xc73bd4++;break;case'delete':_0x56f920['remove'](_0xc73bd4);break;case'equal':_0xc73bd4++;}}class oe extends kt{constructor(_0x87894){super(_0x87894);const _0x3745c4=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3745c4['to']('contextValue',_0x5bfc34=>N(_0x87894,'THREAD_CONTEXT_LABEL',_0x5bfc34)),'tabindex':-0x1},'children':[{'text':_0x3745c4['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1ffef8,_0xef533f){super(_0x1ffef8);const _0x47f1f8=this['bindTemplate'];this['_model']=_0xef533f,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x30744a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x17fb5d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x12e6ad=>!!_0x12e6ad),this['bind']('contextValue')['to'](this['_model'],'context',_0x350020=>_0x350020&&_0x350020['value']?this['_trimContextValue'](_0x350020['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x47f1f8['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x298749=new _0x4373f8(this['locale']);return _0x298749['label']=N(this['locale'],'Reopen'),_0x298749['tooltip']=N(this['locale'],'Reopen'),_0x298749['icon']=_0x6b1282,_0x298749['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x9f40d4=>!_0x9f40d4),_0x298749['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4723e8,_0xd875e1)=>_0x4723e8&&_0xd875e1),_0x298749['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x298749;}['_trimContextValue'](_0x5960a0){if(_0x5960a0['length']<0x96)return _0x5960a0;const _0x3054f7=_0x5960a0['lastIndexOf']('\x20',0x93);return _0x5960a0['substring'](0x0,_0x3054f7>-0x1?_0x3054f7:0x93)+'...';}['_attachContextActions'](){const _0x41eaf1=this['element']['querySelector']('.ck-context'),_0x1ecfcd=_0x41eaf1['querySelector']('.ck-context__value');this['listenTo'](_0x41eaf1,'mouseenter',()=>{_0x1ecfcd['offsetWidth']<_0x1ecfcd['scrollWidth']&&_0x41eaf1['classList']['add']('overlay');}),this['listenTo'](_0x41eaf1,'mouseleave',()=>{_0x41eaf1['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x551163 of this['focusables'])this['focusTracker']['add'](_0x551163['element']),this['keystrokes']['listenTo'](_0x551163['element']);}['_createContextView'](){const _0x234670=new oe(this['locale']);return _0x234670['bind']('contextValue')['to'](this),_0x234670;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x165bc6,_0x316f77,_0x12ae28,_0x3bef8c){super(_0x165bc6),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x316f77,this['_localUser']=_0x12ae28,this['_config']=_0x3bef8c,this['commentThreadHeaderView']=new Yt(_0x165bc6,_0x316f77),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x165bc6,N(_0x165bc6,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x165bc6,_0x316f77,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3bef8c)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x1d1333,_0x2cb909)=>_0x1d1333||!!_0x2cb909),this['bind']('isUnlinked')['to'](_0x316f77,'unlinkedAt',_0x1b774d=>!!_0x1b774d),this['bind']('ariaLabel')['to'](this,'length',_0xe68682=>{const _0x5cb6a3=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0xe68682,_0x5cb6a3]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x30744a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x17fb5d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x199caf=>_0x199caf['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x5182cb=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x555bd0=_0x5182cb['commentInputView'];return _0x5182cb['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x555bd0,'value',(_0x4fa120,_0x102031,_0x5f37c8,_0x56c1a9,_0x2e6fc9)=>!!_0x2e6fc9||!!_0x56c1a9&&_0x5f37c8&&!_0x102031||_0x4fa120&&_0x5f37c8&&!_0x102031),_0x555bd0['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x68e68f,_0x476c43,_0x1951b4)=>{let _0x14639a;return _0x14639a=_0x1951b4&&_0x476c43?'Reply\x20to\x20reopen\x20discussion...':_0x68e68f?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x14639a);}),_0x555bd0['bind']('submitLabel')['to'](this,'length',_0x3ec530=>N(this['locale'],_0x3ec530?'Reply':'Comment')),_0x555bd0['on']('submit',(_0x47ea72,_0x2612d6)=>{this['fire']('addComment',_0x2612d6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x555bd0['on']('cancel',()=>{this['focus']();}),_0x555bd0['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x555bd0['on']('cancel',_0x2fcb77=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2fcb77['stop']());}),this['on']('change:isActive',(_0x14b5ed,_0x53b583,_0x17895c)=>{_0x17895c||this['length']||_0x555bd0['value']||this['fire']('removeCommentThread');}),_0x5182cb;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x233b12,_0xb787dd,_0xd311cd,_0x30f279){super(_0x233b12,_0xb787dd,_0xd311cd,_0x30f279),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x233b12,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x1a3070,_0x1dab9b,_0x2aa8f9)=>{_0x2aa8f9||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xfd5a87,_0x2da08d,_0x47926f)=>{_0x47926f&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x537d7d=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x537d7d['if']('isActive','ck-thread--active'),_0x537d7d['if']('isUnlinked','ck-thread--unlinked'),_0x537d7d['if']('isConfirm','ck-thread--remove-confirmation'),_0x537d7d['to']('actionIndicator',_0x1da6b6=>_0x1da6b6?'ck-thread--'+_0x1da6b6:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x537d7d['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 _0x5d3c78 of this['commentsListView']['commentViews'])_0x5d3c78['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x7c2f2d}=this,_0x28e61e=this['commentsListView']['commentViews']['get'](0x0);_0x28e61e===this['_boundFirstCommentView']||_0x28e61e['isSystemComment']||(this['_boundFirstCommentView']=_0x28e61e,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x28e61e,'actionIndicator',_0x1bb0d0=>'remove'===_0x1bb0d0?'remove':null),_0x28e61e['placeholder']=N(_0x7c2f2d,'Write\x20a\x20comment...'),_0x28e61e['removeButton']['on']('execute',_0x1dd9e6=>{_0x1dd9e6['stop'](),this['showConfirm'](N(_0x7c2f2d,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x28e61e['focus']();}),_0x28e61e['actionBar']['add'](this['resolveButton'],0x0),_0x28e61e['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x501726=new _0x4f53cc(this['locale']);return _0x501726['label']=N(this['locale'],'Resolve'),_0x501726['tooltip']=N(this['locale'],'Resolve'),_0x501726['icon']=_0x500b61,_0x501726['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x501726['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1d26d4=>!_0x1d26d4),_0x501726['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x53ba59,_0x1dced7)=>_0x53ba59&&!_0x1dced7),_0x501726['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x501726;}['_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(_0x968180){super(_0x968180),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x573257,_0x4bf750,_0x351101)=>{this['element']['innerHTML']=_0x351101;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x5e54ed,_0x321b46,_0x1f09cb){super(_0x5e54ed),this['_model']=_0x321b46,this['_config']=_0x1f09cb,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x321b46,'content',_0x321b46,'authoredAt',(_0x40fe54,_0x31aeb2)=>N(_0x5e54ed,'COMMENT_ARIA_LABEL',[_0x321b46['author']['name'],_0x1f09cb['formatDateTime'](_0x31aeb2),new DOMParser()['parseFromString'](_0x40fe54,'text/html')['body']['textContent'],_0x321b46['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x5e54ed,N(_0x5e54ed,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x2c7739(),this['focusTracker']=new _0x30744a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x17fb5d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5e945b=>_0x5e945b['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 _0x5e1345=new es(this['locale']);return _0x5e1345['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xb52b15,_0x54ced3)=>_0x54ced3?_0x5e26a1(_0xb52b15,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xb52b15),_0x5e1345;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x59d294=new os(this['locale'],this['_config']['editorConfig']);return _0x59d294['value']=this['_model']['content'],_0x59d294['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x59d294['submitLabel']=N(this['locale'],'Save'),_0x59d294['on']('submit',(_0x1c8d57,_0x29e861)=>{this['fire']('updateComment',this['_model']['id'],_0x29e861),this['switchToDisplayMode'](),this['focus']();}),_0x59d294['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x59d294['once']('editorReady',()=>{_0x59d294['focus']();}),_0x59d294['createEditor'](),_0x59d294['delegate']('editorReady')['to'](this),_0x59d294['delegate']('editorDestroyed')['to'](this),_0x59d294;}['_setupKeyboardNavigation'](){const _0x7df16a=this['element'];this['keystrokes']['listenTo'](_0x7df16a);for(const _0x15001a of this['focusables'])this['focusTracker']['add'](_0x15001a['element']),this['keystrokes']['listenTo'](_0x15001a['element']);this['focusables']['on']('change',(_0x7159cd,_0x7160c2)=>{for(const _0x22c2e4 of _0x7160c2['removed'])this['focusTracker']['remove'](_0x22c2e4['element']),this['keystrokes']['stopListening'](_0x22c2e4['element']);for(const _0x4193db of _0x7160c2['added'])this['focusTracker']['add'](_0x4193db['element']),this['keystrokes']['listenTo'](_0x4193db['element']);}),this['keystrokes']['set']('enter',(_0x43351a,_0x4d618e)=>{_0x7df16a===_0x43351a['target']&&(this['focusCycler']['focusFirst'](),_0x4d618e());}),this['keystrokes']['set']('esc',(_0x4c564d,_0x338e4a)=>{_0x7df16a!==_0x4c564d['target']&&(this['focus'](),_0x338e4a());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x392a5c,_0x2f3516,_0x38d5ff){super(_0x392a5c,_0x2f3516,_0x38d5ff),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x392a5c,'Reply...')),this['bind']('authoredAt')['to'](_0x2f3516),this['bind']('resolvedAt')['to'](_0x2f3516),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 _0x96e7f7(_0x392a5c,_0x2f3516['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2f3516,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x53c929=this['bindTemplate'],_0x585e56=[{'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':_0x53c929['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x53c929['to']('authoredAt',_0xbb4d17=>this['_config']['formatDateTime'](_0xbb4d17))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x53c929['if']('isEditMode','ck-comment__actions--hidden'),_0x53c929['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']&&_0x585e56['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x53c929['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x53c929['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x53c929['if']('isEditMode','ck-comment--edit'),_0x53c929['if']('isSystemComment','ck-comment--info'),_0x53c929['to']('actionIndicator',_0x441f4f=>_0x441f4f?'ck-comment--'+_0x441f4f:'')],'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':_0x585e56}]}]};}['_createEditButton'](){const _0x5bb23b=new _0x4373f8(this['locale']);return _0x5bb23b['label']=N(this['locale'],'Edit'),_0x5bb23b['icon']=_0x28785e,_0x5bb23b['withText']=!0x0,_0x5bb23b['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5bb23b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3178df=>!_0x3178df),_0x5bb23b['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5bb23b['on']('execute',()=>this['switchToEditMode']()),_0x5bb23b;}['_createRemoveButton'](){const _0x185613=new _0x4373f8(this['locale']);return _0x185613['label']=N(this['locale'],'Remove'),_0x185613['icon']=_0x7dbd41,_0x185613['withText']=!0x0,_0x185613['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x185613['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3b1a03=>!_0x3b1a03),_0x185613['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x185613['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x185613;}['_createDropdown'](){const _0x4ffd97=_0x10bb76(this['locale'],_0x380272),_0x54f393=_0x4ffd97['panelView']['children'],_0x3c0d7b=new _0xdf5ea6(this['locale']),_0x165934=_0x4ffd97['bindTemplate'];_0x17948c(_0x4ffd97,()=>this['items']['find'](_0x5c76b0=>_0x5c76b0['isVisible'])),_0x4ffd97['extendTemplate']({'attributes':{'class':[_0x165934['if']('isVisible','ck-hidden',_0x2fa5f5=>!_0x2fa5f5)]}});const _0x192c68=(_0x45d56,_0x46b93e=-0x1)=>{const _0x483481=new _0x217df6(this['locale']);_0x483481['children']['add'](_0x45d56);const _0xda5484=_0x46b93e>-0x1?_0x46b93e:_0x3c0d7b['items']['length'];_0x3c0d7b['items']['add'](_0x483481,_0xda5484);const _0x404733=Array['from'](this['items']);_0x4ffd97['unbind']('isEnabled','isVisible'),_0x4ffd97['bind']('isEnabled')['toMany'](_0x404733,'isEnabled',(..._0x4f8c34)=>_0x4f8c34['some'](_0x5269fd=>_0x5269fd)),_0x4ffd97['bind']('isVisible')['toMany'](_0x404733,'isVisible',(..._0x2cf654)=>_0x2cf654['some'](_0x3133da=>_0x3133da));};_0x4ffd97['panelPosition']='sw',_0x4ffd97['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x4d6106});for(const _0x4fb1df of this['items'])_0x192c68(_0x4fb1df);return _0x54f393['add'](_0x3c0d7b),_0x4ffd97['listenTo'](this['items'],'add',(_0x1010bc,_0x2df096,_0x267eab)=>{_0x192c68(_0x2df096,_0x267eab);}),_0x4ffd97['listenTo'](this['items'],'remove',(_0x185ee1,_0x92eac1,_0x2c3e40)=>{_0x3c0d7b['items']['remove'](_0x2c3e40);}),_0x4ffd97;}['_attachActions'](_0x498228,_0x5c8642){const _0x3f4580=_0x498228&&_0x498228['element'];_0x3f4580&&(this['listenTo'](_0x3f4580,'mouseenter',()=>this['actionIndicator']=_0x5c8642),this['listenTo'](_0x3f4580,'focus',()=>this['actionIndicator']=_0x5c8642),this['listenTo'](_0x3f4580,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x3f4580,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1e7d02=super['_createCommentInputView']();return _0x1e7d02['bind']('placeholder')['to'](this),_0x1e7d02;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x14a653){const _0x34e1e3=Dt(_0x14a653,0x1e),_0x1970e5=new MutationObserver(_0x29a24c=>{for(const _0x48d814 of _0x29a24c)('attributes'==_0x48d814['type']&&'class'==_0x48d814['attributeName']||'childList'==_0x48d814['type']||'characterData'==_0x48d814['type'])&&_0x34e1e3();});return{'attach'(_0x4d0f7b){_0x1970e5['observe'](_0x4d0f7b,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x1970e5['disconnect'](),_0x34e1e3['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2cb854,_0x16dcb5){super(_0x2cb854),this['id']=_0x144fe1(),this['focusTracker']=new _0x30744a(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x5717be,_0x9194a3)=>this['fire']('Esc',_0x9194a3)),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'](_0x16dcb5),this['mainView']=_0x16dcb5;const _0x3ab4fd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3ab4fd['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 _0x5493be=this['element']['clientHeight'];_0x5493be&&(this['height']=_0x5493be);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x434911(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x16b85b,target:_0x556672,type:_0x48ee81,isVisible:_0x2d1a98=!0x0}){super(),this['view']=_0x16b85b,this['view']['element']||this['view']['render'](),this['_type']=_0x48ee81,this['_target']=_0x556672,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4f0cac([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x231378,_0x2d1747)=>{this['view']['focusTracker']['add'](_0x2d1747);}),this['focusableElements']['on']('remove',(_0xe412b5,_0x1b32af)=>{this['view']['focusTracker']['remove'](_0x1b32af);}),this['set']('isVisible',_0x2d1a98);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2c7d14=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2c7d14),_0x2c7d14;}get['targetRect'](){const _0x12fde8=this['target'];if(null===_0x12fde8)return null;if(_0x12fde8 instanceof _0x1bd7c4)return _0x12fde8;const _0x230543=_0x12fde8['filter'](_0x3dde32=>function(_0xf52b18){const _0x5a7185=_0xf52b18['offsetParent'];if(_0x5a7185)return!0x0;const _0x4d2b5e=_0xf52b18['getClientRects']()['item'](0x0);return!!_0x4d2b5e;}(_0x3dde32));return 0x0===_0x230543['length']?null:new _0x1bd7c4(_0x230543[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4505c9){this['view']['isActive']=_0x4505c9,this['view']['mainView']['isActive']=_0x4505c9;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x53b419){if(!(null===_0x53b419||_0x53b419 instanceof _0x1bd7c4||Array['isArray'](_0x53b419)&&_0x53b419['every'](_0x549da1=>fi(_0x549da1))))throw new _0x4842d8('annotation-invalid-target',null,{'target':_0x53b419});}['_getNormalizedTarget'](){const _0x425abc='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x425abc)?[_0x425abc]:_0x425abc;}}function fi(_0x3d3a03){return null!==_0x3d3a03&&'object'==typeof _0x3d3a03&&'nodeType'in _0x3d3a03&&0x1===_0x3d3a03['nodeType'];}class S extends _0x4f0cac{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x22611b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x30744a(),this['_focusTracker']['on']('change:isFocused',(_0x55813c,_0x1e99eb,_0x1b46a3)=>{_0x1b46a3||this['fire']('blur');});for(const _0x52750d of _0x22611b)this['add'](_0x52750d);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x17d8fc){if(this['has'](_0x17d8fc))throw new _0x4842d8('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x17d8fc['innerView'],_0x17d8fc),this['_viewToAnnotation']['set'](_0x17d8fc['view'],_0x17d8fc);for(const _0x2fcf48 of _0x17d8fc['focusableElements'])this['_focusTracker']['add'](_0x2fcf48);this['listenTo'](_0x17d8fc['focusableElements'],'add',(_0x2c4b1c,_0x75e343)=>{this['_focusTracker']['add'](_0x75e343);}),this['listenTo'](_0x17d8fc['focusableElements'],'remove',(_0x5bfcc0,_0x503d09)=>{this['_focusTracker']['remove'](_0x503d09);}),this['listenTo'](_0x17d8fc['view']['focusTracker'],'change:isFocused',(_0x336370,_0x55724c,_0x58c16b)=>{_0x58c16b&&this['fire']('focus',_0x17d8fc);}),_0x17d8fc['updateTargetRect']();const _0x553bc4=this['_getOrderInContent'](_0x17d8fc['view']['targetRect']);return super['add'](_0x17d8fc,_0x553bc4);}['remove'](_0x564d11){if(!this['has'](_0x564d11))throw new _0x4842d8('annotationcollection-not-existing-item',null);this['stopListening'](_0x564d11['view']['focusTracker']),this['stopListening'](_0x564d11['focusableElements']);for(const _0x31c453 of _0x564d11['focusableElements'])this['_focusTracker']['remove'](_0x31c453);return this['_viewToAnnotation']['delete'](_0x564d11['view']),this['_innerViewToAnnotation']['delete'](_0x564d11['innerView']),super['remove'](_0x564d11);}['getByInnerView'](_0x38ffc5){return this['_innerViewToAnnotation']['get'](_0x38ffc5);}['getByView'](_0x2e75e7){return this['_viewToAnnotation']['get'](_0x2e75e7);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3f0dff of this)_0x3f0dff['updateTargetRect']();this['_sort']();}['_sort'](){const _0x35af98=Array['from'](this)['sort']((_0x338b33,_0x47788f)=>w(_0x338b33['view']['targetRect'],_0x47788f['view']['targetRect']));for(let _0x1c5431=_0x35af98['length']-0x1;_0x1c5431>0x0;_0x1c5431--){const _0x1200c7=_0x35af98[_0x1c5431];_0x1c5431!==this['getIndex'](_0x1200c7)&&(this['remove'](_0x1200c7),this['add'](_0x1200c7));}}['_getOrderInContent'](_0x55b138){let _0x2ad3fc=0x0;if(!_0x55b138)return this['length'];for(const _0x28ced3 of this){const _0x39c291=_0x28ced3['view']['targetRect'];if(_0x39c291){if(w(_0x55b138,_0x39c291)<0x0)return _0x2ad3fc;_0x2ad3fc++;}}return _0x2ad3fc;}}function v({source:_0x5b2c62,target:_0xeb7ffa,filter:_0x27b045}){for(const _0x4ce3c9 of _0x5b2c62)_0x27b045(_0x4ce3c9)&&_0xeb7ffa['add'](_0x4ce3c9);_0xeb7ffa['listenTo'](_0x5b2c62,'add',(_0x30d428,_0x409fe3)=>{_0x27b045(_0x409fe3)&&_0xeb7ffa['add'](_0x409fe3);}),_0xeb7ffa['listenTo'](_0x5b2c62,'remove',(_0xed011c,_0x1d06c8)=>{_0xeb7ffa['has'](_0x1d06c8)&&_0xeb7ffa['remove'](_0x1d06c8);});}function w(_0x2cda01,_0x26025e){if(null===_0x2cda01&&null===_0x26025e)return 0x0;if(null===_0x2cda01)return-0x1;if(null===_0x26025e)return 0x1;const _0x19a292=_0x2cda01['top']-_0x26025e['top'];return 0x0==_0x19a292?_0x2cda01['left']-_0x26025e['left']:_0x19a292;}class y extends _0x14070b{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19fb8a){if(super(_0x19fb8a),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x19fb8a instanceof _0x4f592b){const _0x4eb7c1=_0x19fb8a['locale'];_0x19fb8a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x4eb7c1,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x9d3370){this['collection']['add'](_0x9d3370);}['remove'](_0x4fc7be){this['collection']['remove'](_0x4fc7be),_0x4fc7be['destroy']();}['refreshVisibility'](){for(const _0x37a011 of this['collection'])_0x37a011['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x4c9bd4){return this['collection']['getByInnerView'](_0x4c9bd4);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x41969d of this['collection'])_0x41969d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x49aeb1){this['fire']('_activateAnnotation',_0x49aeb1);}['createAnnotation'](_0x9d475){return new T(_0x9d475);}['createAnnotationView'](_0x3e5dfe,_0x56ebdc){return new E(_0x3e5dfe,_0x56ebdc);}['_addActiveAnnotation'](_0x34a98c){const _0x4890a1=new Set(this['activeAnnotations']);_0x4890a1['add'](_0x34a98c),this['activeAnnotations']=_0x4890a1;}['_removeActiveAnnotation'](_0x3e30de){const _0xc798e9=new Set(this['activeAnnotations']);_0xc798e9['delete'](_0x3e30de),this['activeAnnotations']=_0xc798e9;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5464c5=this['collection'],_0x226d91=this['_visibleAnnotations'];function _0x2051d2(_0x212381){const _0xe729e4=_0x212381['source'];_0xe729e4['isVisible']&&!_0x226d91['has'](_0xe729e4)?_0x226d91['add'](_0xe729e4):!_0xe729e4['isVisible']&&_0x226d91['has'](_0xe729e4)&&_0x226d91['remove'](_0xe729e4),_0xe729e4['view']['focusTracker']['remove'](_0xe729e4['view']['element']),_0xe729e4['view']['focusTracker']['add'](_0xe729e4['view']['element']);}this['listenTo'](_0x5464c5,'add',(_0x5e6456,_0x594d58)=>{_0x594d58['isVisible']&&_0x226d91['add'](_0x594d58),this['listenTo'](_0x594d58,'change:isVisible',_0x2051d2);}),this['listenTo'](_0x5464c5,'remove',(_0x326a8a,_0x4642dd)=>{_0x226d91['has'](_0x4642dd)&&_0x226d91['remove'](_0x4642dd),this['stopListening'](_0x4642dd,'change:isVisible',_0x2051d2);});}['_setupEnterAnnotationKeystroke'](){const _0x169ce7=_0x10c481=>{_0x10c481['on']('ready',()=>{_0x10c481['keystrokes']['set'](_0x498d8c,(_0x301854,_0x4c7aad)=>{const _0x1f0fe8=_0x243c4e(this['activeAnnotations']['values']());_0x1f0fe8&&(_0x1f0fe8['view']['focus'](),_0x4c7aad());});});};this['context']instanceof _0x4f592b?_0x169ce7(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4092de,_0x293dd7)=>{_0x169ce7(_0x293dd7);});}['_setupEscapeAnnotationHandling'](){const _0x4e97fe=_0x19ffff=>{const _0x56a9f7=_0x19ffff['source'],_0x4ebfee=[];let _0x22d284;if(Array['isArray'](_0x56a9f7['target'])){_0x22d284=_0x56a9f7['target'][0x0],this['context']instanceof _0x4f592b?_0x4ebfee['push'](this['context']):this['context']['editors']&&_0x4ebfee['push'](...this['context']['editors']);for(const _0x39f067 of _0x4ebfee)for(const _0x4d7680 of _0x39f067['editing']['view']['domRoots']['values']())if(_0x4d7680['contains'](_0x22d284))return void _0x39f067['editing']['view']['focus']();_0x22d284['focus']();}};this['listenTo'](this['collection'],'add',(_0x388192,_0x18f432)=>{this['listenTo'](_0x18f432,'escape',_0x4e97fe,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xc82c5e,_0x2637d3)=>{this['stopListening'](_0x2637d3,'escape',_0x4e97fe);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x14070b{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a5152){super(_0x3a5152),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x509d04=this['context']['config'];_0x509d04['define']('comments.maxCommentsWhenCollapsed',0x2),_0x509d04['define']('comments.maxThreadTotalWeight',0x1f4),_0x509d04['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x509d04['define']('comments.CommentThreadView',gt),_0x509d04['define']('comments.CommentView',Tt),_0x509d04['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1c06eb=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x41ef15,_0x3756a8)=>this['_addCommentThread'](_0x3756a8)),this['on']('submitCommentThread',(_0x7d416,_0x4d6892)=>this['_submitCommentThread'](_0x4d6892)),this['on']('resolveCommentThread',(_0x201560,_0x3e20da)=>this['_resolveCommentThread'](_0x3e20da)),this['on']('resolveCommentThread',(_0x5ca6d6,_0x1b46c3)=>this['_updateActiveAnnotation'](_0x1b46c3),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x51c811,_0xe3974f)=>this['_reopenCommentThread'](_0xe3974f)),this['on']('reopenCommentThread',(_0x4bf686,_0x27d7df)=>this['_updateActiveAnnotation'](_0x27d7df),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1e2fbc,_0x4f7a2a)=>this['_removeCommentThread'](_0x4f7a2a)),this['on']('updateCommentThread',(_0x4c3d9d,_0x51f98e)=>this['_updateCommentThread'](_0x51f98e)),this['on']('updateCommentThread',(_0x40dbb2,_0x3ff36c)=>this['_updateActiveAnnotation'](_0x3ff36c),{'priority':'lowest'}),this['on']('addComment',(_0x4ceb92,_0x10c6bf)=>this['_addComment'](_0x10c6bf)),this['on']('updateComment',(_0x545490,_0x67437f)=>this['_updateComment'](_0x67437f)),this['on']('removeComment',(_0xfef3cf,_0x13e13c)=>this['_removeComment'](_0x13e13c)),this['on']('addComment',(_0xfddb2d,{threadId:_0x511b70,isFromAdapter:_0x271481})=>{if(_0x271481)return;const _0x1a34fd=this['getCommentThread'](_0x511b70),_0x5219ba=_0x1a34fd&&this['_threadToController']['get'](_0x1a34fd);_0x5219ba&&_0x5219ba['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1c06eb,'change:activeAnnotations',(_0x253c1a,_0x3b4f31,_0x5db669)=>{const _0x301df3=Array['from'](_0x5db669)['map'](_0x5731b3=>this['_viewToController']['get'](_0x5731b3['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x301df3?_0x301df3['model']:null;});}set['adapter'](_0xecdee1){if(this['_adapter'])throw new _0x4842d8('commentsrepository-adapter-already-set');this['_adapter']=_0xecdee1;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x175f01=_t,threadId:_0x21f7f9=_0x144fe1(),comments:_0x3bb5ed=[],unlinkedAt:_0x4f3fe7=null,resolvedAt:_0x4e11c0=null,resolvedBy:_0x4832e8=null,target:_0x412868=null,context:_0x1b3e2e=null,attributes:_0x1929ce={},isResolvable:_0x5038ea=!0x0,isSubmitted:_0x2d2a5c=!0x1,isFromAdapter:_0x229309=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x175f01),{'channelId':_0x175f01,'threadId':_0x21f7f9,'comments':_0x3bb5ed,'unlinkedAt':_0x4f3fe7,'resolvedAt':_0x4e11c0,'resolvedBy':_0x4832e8,'target':_0x412868,'context':_0x1b3e2e,'attributes':_0x1929ce,'isFromAdapter':_0x229309,'isResolvable':_0x5038ea,'isSubmitted':_0x2d2a5c}),this['getCommentThread'](_0x21f7f9);}['openNewCommentThread']({channelId:_0x34dc04=_t,threadId:_0x397f68=_0x144fe1(),target:_0x2c997e,context:_0x2a4dba=null,isResolvable:_0x4ca181=!0x0}){if(this['_readOnlyChannels']['has'](_0x34dc04)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2c997e)throw new _0x4842d8('commentsrepository-missing-target');const _0x5bcd58=this['addCommentThread']({'channelId':_0x34dc04,'threadId':_0x397f68,'target':_0x2c997e,'context':_0x2a4dba,'isResolvable':_0x4ca181});if(!_0x5bcd58)return null;const _0x1d5b1a=this['_threadToController']['get'](_0x5bcd58),_0x2f2409=_0x1d5b1a['view']['commentThreadInputView']['commentInputView'],_0x267028=this['context']['plugins']['get'](y),_0x48cdf1=_0x267028['getByInnerView'](_0x1d5b1a['view']);return _0x267028['activate'](_0x48cdf1),_0x2f2409['once']('editorReady',()=>_0x2f2409['focus']()),_0x5bcd58;}['hasCommentThread'](_0x2040e9){if('string'!=typeof _0x2040e9)throw new _0x4842d8('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2040e9);}['updateCommentThread']({channelId:_0x2e3d03=_t,threadId:_0x147d54,context:_0x2506fd,unlinkedAt:_0x2be1a4,attributes:_0x4020ba,isFromAdapter:_0x218351=!0x1}){return this['fire'](Nt('updateCommentThread',_0x2e3d03),{'channelId':_0x2e3d03,'threadId':_0x147d54,'context':_0x2506fd,'unlinkedAt':_0x2be1a4,'attributes':_0x4020ba,'isFromAdapter':_0x218351}),this['getCommentThread'](_0x147d54);}['getCommentThread'](_0x47371c){if('string'!=typeof _0x47371c)throw new _0x4842d8('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x47371c);}['fetchCommentThread']({channelId:_0x481fd1,threadId:_0x1d7f11}={}){const _0x53b210=this['getCommentThread'](_0x1d7f11);if(_0x53b210)return Promise['resolve'](_0x53b210);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4842d8('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x481fd1,'threadId':_0x1d7f11})['then'](_0x5569aa=>this['hasCommentThread'](_0x1d7f11)?this['getCommentThread'](_0x1d7f11):_0x5569aa?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x481fd1},_0x5569aa)):void 0x0)['catch'](_0x595159=>{throw console['error'](_0x595159),new _0x4842d8('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2a0468,skipNotAttached:_0x44fc09=!0x1,skipEmpty:_0x4c2ed4=!0x1,toJSON:_0x26d597=!0x1}={}){const _0x3fc334=[];for(const _0x4d2431 of this['_threads']['values']())_0x2a0468&&_0x4d2431['channelId']!==_0x2a0468||_0x44fc09&&!_0x4d2431['isAttached']||_0x4c2ed4&&0x0===_0x4d2431['length']||_0x3fc334['push'](_0x4d2431);return _0x26d597?_0x3fc334['map'](_0x119a2c=>_0x119a2c['toJSON']()):_0x3fc334;}['getAnnotationForCommentThread'](_0x1cc30e){const _0x34bfbd=this['_threadToController']['get'](_0x1cc30e);if(!_0x34bfbd)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x34bfbd['view'])||null;}['getCommentThreadForAnnotation'](_0x4f3ffb){const _0x1c43a5=this['_viewToController']['get'](_0x4f3ffb['innerView']);return _0x1c43a5?_0x1c43a5['model']:null;}['setActiveCommentThread'](_0x390c5e){const _0x3ae12d=this['context']['plugins']['get'](y);if(!_0x390c5e)return void(this['activeCommentThread']&&_0x3ae12d['deactivateAll']());const _0x248583=this['getCommentThread'](_0x390c5e);if(!_0x248583)throw new _0x4842d8('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x390c5e});if(!this['_threadToController']['has'](_0x248583))throw new _0x4842d8('commentsrepository-active-not-attached',null,{'threadId':_0x390c5e});const _0x43b22b=_0x3ae12d['getByInnerView'](this['_threadToController']['get'](_0x248583)['view']);_0x3ae12d['activate'](_0x43b22b);}['switchReadOnly'](_0x1f3000,_0x18cad1){_0x1f3000?this['_readOnlyChannels']['add'](_0x18cad1):this['_readOnlyChannels']['delete'](_0x18cad1),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x55ac67){return this['_readOnlyChannels']['has'](_0x55ac67)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x10db11,_0x3fe42f){return new vt(_0x10db11,_0x3fe42f);}['setPermissions'](_0x336132,_0x36e231=_t){this['_permissions']['set'](_0x36e231,_0x336132),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4e6ec4=_t){return this['_permissions']['has'](_0x4e6ec4)?this['_permissions']['get'](_0x4e6ec4):bt;}['_addCommentThread']({channelId:_0x4822ed,threadId:_0x17df64,comments:_0x3edeae,unlinkedAt:_0xf045b6,resolvedAt:_0x59b83b,resolvedBy:_0xaf28df,target:_0x1913d1,context:_0x29c24c,attributes:_0x18b110,isFromAdapter:_0x2ae956,isResolvable:_0x27af84,isSubmitted:_0x1b2f0b}){if('string'!=typeof _0x17df64)throw new _0x4842d8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x17df64});if(this['hasCommentThread'](_0x17df64))throw new _0x4842d8('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x17df64});const _0x2dbd73=new pi(this,{'channelId':_0x4822ed,'id':_0x17df64,'context':_0x29c24c,'attributes':_0x18b110,'unlinkedAt':_0xf045b6,'resolvedAt':_0x59b83b,'resolvedBy':_0xaf28df?this['context']['plugins']['get'](it)['getUser'](_0xaf28df):null,'isResolvable':_0x27af84,'isSubmitted':_0x1b2f0b||_0x2ae956});this['_threads']['set'](_0x17df64,_0x2dbd73);for(const _0x3aadf2 of _0x3edeae)_0x2dbd73['_add'](this['_createNewComment']({'threadId':_0x17df64,..._0x3aadf2}));return _0x1913d1&&_0x2dbd73['attachTo'](_0x1913d1),_0x2ae956||!_0x2dbd73['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4822ed,'threadId':_0x17df64});}['_submitCommentThread']({channelId:_0x6d2ddd,threadId:_0x66c305}){if(!this['hasCommentThread'](_0x66c305))throw new _0x4842d8('commentsrepository-missing-comment-thread',this);const _0x17b301=this['getCommentThread'](_0x66c305);if(_0x17b301['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x524c5a,comments:_0x1006a6,resolvedAt:_0x2180c0,resolvedBy:_0x4d2f31,context:_0x44d0ea,attributes:_0x5b112c}=_0x17b301,_0x1c0175=this['context']['plugins']['get']('PendingActions'),_0xf93c1b=_0x1c0175['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x6d2ddd,'threadId':_0x524c5a,'comments':_0x1006a6['map'](_0x4f5395=>_0x4f5395['toJSON']()),'resolvedAt':_0x2180c0,'resolvedBy':_0x4d2f31?_0x4d2f31['id']:_0x4d2f31,'context':_0x44d0ea,'attributes':_0x5b112c})['then'](({comments:_0x5af661})=>{_0x1c0175['remove'](_0xf93c1b);for(const _0x57fa6d of _0x5af661)this['_updateComment']({'channelId':_0x6d2ddd,'threadId':_0x66c305,'commentId':_0x57fa6d['commentId'],'createdAt':_0x57fa6d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3d8535=>{throw console['error'](_0x3d8535),new _0x4842d8('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4d8cc4,target:_0x41ff78}){const _0x704974=this['getCommentThread'](_0x4d8cc4);if(!_0x704974)throw new _0x4842d8('commentsrepository-attach-missing-comment-thread',this);const _0x4725bc=this['context']['plugins']['get']('PendingActions'),_0xdcdfb6=this['context']['plugins']['get'](y),_0x4c7c0c=this['_createCommentThreadView'](_0x704974),_0x3bbf49=new vt(_0x704974,_0x4c7c0c);let _0x665aa0=null;_0x4c7c0c['on']('change:isDirty',(_0x26194f,_0x50e1a8,_0xd08664)=>{_0xd08664?_0x665aa0=_0x4725bc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x665aa0&&(_0x4725bc['remove'](_0x665aa0),_0x665aa0=null);}),this['_threadToController']['set'](_0x704974,_0x3bbf49),this['_viewToController']['set'](_0x4c7c0c,_0x3bbf49);const _0x1cdf53=new E(this['context']['locale'],_0x4c7c0c);_0x1cdf53['bind']('length')['to'](_0x4c7c0c),_0x1cdf53['bind']('isDirty')['to'](_0x4c7c0c,'isDirty',_0x4c7c0c,'length',(_0x167638,_0x2e4576)=>_0x167638||!_0x2e4576),_0x1cdf53['bind']('isActive')['to'](_0x4c7c0c),_0x1cdf53['type']='comment';const _0x3b6ee9=new T({'view':_0x1cdf53,'target':_0x41ff78,'type':'comment','isVisible':!_0x704974['archivedAt']&&!!('function'==typeof _0x41ff78?_0x41ff78():_0x41ff78)});return _0x4c7c0c['on']('escape',()=>{_0x3b6ee9['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4c7c0c,_0x3b6ee9),_0xdcdfb6['add'](_0x3b6ee9),_0x3b6ee9;}['_bindAnnotationToEditors'](_0x2a4277,_0x559c98){this['listenTo'](_0x2a4277,'editorReady',(_0x5cf3b9,_0x572fbb)=>{const _0x43574a=_0x572fbb['ui']['view']['body']['bodyCollectionContainer'];_0x559c98['focusableElements']['add'](_0x43574a),this['context']instanceof _0x4f592b&&this['context']['ui']['focusTracker']['add'](_0x43574a);},{'priority':'highest'}),this['listenTo'](_0x2a4277,'editorDestroyed',(_0x1161b3,_0x239eb0)=>{const _0xa11ed6=_0x239eb0['ui']['view']['body']['bodyCollectionContainer'];_0x559c98['focusableElements']['has'](_0xa11ed6)&&_0x559c98['focusableElements']['remove'](_0xa11ed6),this['context']instanceof _0x4f592b&&this['context']['ui']['focusTracker']['remove'](_0xa11ed6);});}['_unbindEditors'](_0x5d7411){this['stopListening'](_0x5d7411,'editorReady'),this['stopListening'](_0x5d7411,'editorDestroyed');}['_createCommentThreadView'](_0x330a03){const _0x442af4=this['context']['plugins']['get'](it),{config:_0x33e4e1,locale:_0x2923b7}=this['context'],_0x3c2c94=pt(_0x33e4e1['get']('locale'),_0x2923b7);return new(0x0,(_0x33e4e1['get']('comments'))['CommentThreadView'])(_0x2923b7,_0x330a03,_0x442af4['me'],{'editorConfig':{..._0x33e4e1['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x33e4e1['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x33e4e1['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x33e4e1['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x33e4e1['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3c2c94,'CommentView':_0x33e4e1['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1f22ee,channelId:_0x26eb69,resolvedAt:_0x2d8734,resolvedBy:_0x7133b0,isFromAdapter:_0x581769}){if(!this['hasCommentThread'](_0x1f22ee))throw new _0x4842d8('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f22ee});const _0x589af1=this['getCommentThread'](_0x1f22ee);if(_0x589af1['isResolved'])throw new _0x4842d8('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1f22ee});const _0x4f5056=this['context']['plugins']['get'](it);if(_0x589af1['resolvedBy']=_0x4f5056['getUser'](_0x7133b0),_0x589af1['resolvedAt']=_0x2d8734,_0x581769||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4cd0af=this['context']['plugins']['get']('PendingActions'),_0x2467f4=_0x4cd0af['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x26eb69,'threadId':_0x1f22ee})['then'](({resolvedAt:_0x459953,resolvedBy:_0xd2a0be})=>{_0x4cd0af['remove'](_0x2467f4),_0x589af1['resolvedBy']['id']!==_0xd2a0be&&(_0x589af1['resolvedBy']=_0x4f5056['getUser'](_0xd2a0be)),_0x589af1['resolvedAt']=_0x459953;})['catch'](_0x3491a4=>{throw console['error'](_0x3491a4),new _0x4842d8('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2630d8,channelId:_0x25277f,isFromAdapter:_0x4ca4bf}){if(!this['hasCommentThread'](_0x2630d8))throw new _0x4842d8('commentsrepository-missing-comment-thread',null,{'threadId':_0x2630d8});const _0x4303ca=this['getCommentThread'](_0x2630d8);if(!_0x4303ca['isResolved'])throw new _0x4842d8('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2630d8});if(_0x4303ca['resolvedBy']=null,_0x4303ca['resolvedAt']=null,_0x4ca4bf||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1ec310=this['context']['plugins']['get']('PendingActions'),_0x4c8186=_0x1ec310['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x25277f,'threadId':_0x2630d8})['then'](()=>_0x1ec310['remove'](_0x4c8186))['catch'](_0x1ec007=>{throw console['error'](_0x1ec007),new _0x4842d8('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x24459c,isFromAdapter:_0x162a6e}){const _0x3aebb2=this['getCommentThread'](_0x24459c);if(!_0x3aebb2)throw new _0x4842d8('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x24459c),this['_threads']['delete'](_0x24459c),!_0x3aebb2['isSubmitted']||_0x162a6e||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x29b5f6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23836f}=_0x3aebb2,_0x32939a=_0x29b5f6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x23836f,'threadId':_0x24459c})['then'](()=>_0x29b5f6['remove'](_0x32939a))['catch'](_0x596e22=>{throw console['error'](_0x596e22),new _0x4842d8('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4da854,unlinkedAt:_0x1a454a,context:_0x45ee87,attributes:_0x1b4100,isFromAdapter:_0x5a2613}){if('string'!=typeof _0x4da854)throw new _0x4842d8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4da854});if(!this['hasCommentThread'](_0x4da854))throw new _0x4842d8('commentsrepository-missing-comment-thread',null,{'threadId':_0x4da854});const _0x41a24e=this['getCommentThread'](_0x4da854);let _0xc67321=!0x1;if(void 0x0!==_0x45ee87&&_0x41a24e['context']!==_0x45ee87&&(_0x41a24e['context']=_0x45ee87,_0xc67321=!0x0),void 0x0!==_0x1a454a&&_0x41a24e['unlinkedAt']!==_0x1a454a&&(_0x41a24e['unlinkedAt']=_0x1a454a,_0xc67321=!0x0),_0x1b4100&&!At(_0x1b4100,_0x41a24e['attributes'])&&(_0x41a24e['attributes']=_0x1b4100,_0xc67321=!0x0),!_0xc67321)return Promise['resolve']();if(!_0x41a24e['isSubmitted']||_0x5a2613||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2cb204=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5c869e}=_0x41a24e,_0x531128=_0x2cb204['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5c869e,'threadId':_0x4da854,'context':_0x45ee87,'unlinkedAt':_0x1a454a,'attributes':_0x1b4100})['then'](()=>_0x2cb204['remove'](_0x531128))['catch'](_0x59e33b=>{throw console['error'](_0x59e33b),new _0x4842d8('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xf36f2b){const _0x26a36b=this['context']['plugins']['get'](y),_0x27455c=this['getCommentThread'](_0xf36f2b);if(_0x27455c['_isAttached']=!0x1,this['_threadToController']['has'](_0x27455c)){const _0x1cb77d=this['_threadToController']['get'](_0x27455c),_0x2eb615=_0x1cb77d['view'],_0x131a15=_0x26a36b['getByInnerView'](_0x2eb615);this['_threadToController']['delete'](_0x27455c),this['_viewToController']['delete'](_0x2eb615),_0x131a15&&_0x26a36b['remove'](_0x131a15),_0x1cb77d['destroy'](),_0x2eb615['destroy']()['then'](()=>{this['_unbindEditors'](_0x2eb615);});}}['_updateActiveAnnotation']({threadId:_0x562e8e,resolvedAt:_0x4c6d8a,unlinkedAt:_0x57be57}){const _0x464cf8=!!_0x4c6d8a,_0x1f092d=this['context']['plugins']['get'](y),_0x1f9641=this['getCommentThread'](_0x562e8e);if(this['_threadToController']['has'](_0x1f9641)){const _0x3a308c=this['_threadToController']['get'](_0x1f9641)['view'],_0x562ed4=_0x1f092d['getByInnerView'](_0x3a308c);_0x562ed4&&(_0x464cf8&&_0x1f092d['_removeActiveAnnotation'](_0x562ed4),_0x57be57?_0x562ed4['isVisible']=!0x1:_0x562ed4['refreshVisibility']());}}['_getExternalAuthor'](_0xef81cb){const _0x1e6886=this['context']['plugins']['get'](it),_0xa519fb=It('external:'+_0xef81cb),_0xac0125=_0x1e6886['getUser'](_0xa519fb);return _0xac0125||_0x1e6886['addUser']({'id':_0xa519fb,'name':_0xef81cb});}['_createNewComment']({threadId:_0x1814d9,commentId:_0x4dc7e1=_0x144fe1(),content:_0xe131fa,authorId:_0x26ff29,createdAt:_0x3142ff,attributes:_0x23662e}){if('string'!=typeof _0x4dc7e1)throw new _0x4842d8('commentsrepository-invalid-commentid');if('string'!=typeof _0x26ff29)throw new _0x4842d8('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xe131fa||!_0xe131fa['trim']())throw new _0x4842d8('commentsrepository-invalid-comment-content');const _0x412e3e=this['context']['plugins']['get'](it)['getUser'](_0x26ff29);if(!_0x412e3e)throw new _0x4842d8('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x26ff29});let _0x586391=null,_0x19c7e0=_0x3142ff;return _0x23662e?.['@external']&&(_0x586391=this['_getExternalAuthor'](_0x23662e['@external']['authorName']),_0x19c7e0=new Date(_0x23662e['@external']['createdAt'])),new wi(this,{'threadId':_0x1814d9,'id':_0x4dc7e1,'author':_0x586391||_0x412e3e,'creator':_0x412e3e,'content':_0xe131fa,'createdAt':_0x3142ff,'authoredAt':_0x19c7e0,'attributes':_0x23662e});}['_addComment'](_0x4caa40){let {threadId:_0x4c4eca,content:_0x5d5d13,attributes:_0x98ef8f,isFromAdapter:_0x1e8a69}=_0x4caa40;const _0x5d2999=this['getCommentThread'](_0x4caa40['threadId']);if(!_0x5d2999)throw new _0x4842d8('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x34601c=this['_createNewComment'](_0x4caa40),{id:_0x2a3632}=_0x34601c;if(_0x5d2999['_add'](_0x34601c),_0x1e8a69||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5d2999['isSubmitted'])return Promise['resolve']();const _0x3e1a84=this['context']['plugins']['get']('PendingActions'),{channelId:_0x44c186}=_0x5d2999,_0x4c5b1e=_0x3e1a84['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x98ef8f||(_0x98ef8f={}),this['adapter']['addComment']({'channelId':_0x44c186,'threadId':_0x4c4eca,'commentId':_0x2a3632,'content':_0x5d5d13,'attributes':_0x98ef8f})['then'](_0x4be15d=>{_0x3e1a84['remove'](_0x4c5b1e),_0x4be15d&&this['_updateComment']({'channelId':_0x44c186,'threadId':_0x4c4eca,'commentId':_0x2a3632,'createdAt':_0x4be15d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xad54e3=>{throw console['error'](_0xad54e3),new _0x4842d8('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3eb26e,commentId:_0x3c3f96,content:_0x5a57af,createdAt:_0x16a995,attributes:_0xadefd1,isFromAdapter:_0xd5ebb2}){if(void 0x0!==_0x5a57af&&('string'!=typeof _0x5a57af||!_0x5a57af['trim']()['length']))throw new _0x4842d8('commentsrepository-update-comment-invalid-content');const _0x4dfc27=this['getCommentThread'](_0x3eb26e),_0x5f3f35=_0x4dfc27['getComment'](_0x3c3f96);if(!_0x5f3f35)throw new _0x4842d8('commentsrepository-update-missing-comment',this);let _0x48a83e=!0x1;if(_0x5a57af&&_0x5a57af!==_0x5f3f35['content']&&(_0x5f3f35['isEditable']||_0xd5ebb2)&&(_0x5f3f35['content']=_0x5a57af,_0x48a83e=!0x0),_0x16a995&&_0x16a995!==_0x5f3f35['createdAt']&&(_0x5f3f35['createdAt']=_0x16a995,_0x5f3f35['attributes']&&_0x5f3f35['attributes']['@external']||(_0x5f3f35['authoredAt']=_0x16a995),_0x48a83e=!0x0),_0xadefd1&&!At(_0xadefd1,_0x5f3f35['attributes'])&&(_0x5f3f35['attributes']=_0xadefd1,_0x48a83e=!0x0),!_0x48a83e)return Promise['resolve']();if(_0x4dfc27['fire']('commentUpdated'),_0xd5ebb2||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5891dc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5cef4c}=this['getCommentThread'](_0x5f3f35['threadId']),_0x3dc8d4=_0x5891dc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5cef4c,'threadId':_0x3eb26e,'commentId':_0x3c3f96,'content':_0x5a57af,'attributes':_0xadefd1})['then'](()=>_0x5891dc['remove'](_0x3dc8d4))['catch'](_0x373d41=>{throw console['error'](_0x373d41),new _0x4842d8('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x198099,commentId:_0x1255e1,isFromAdapter:_0x2bad09}){const _0x4fa80d=this['getCommentThread'](_0x198099),_0x3b5c9b=_0x4fa80d['getComment'](_0x1255e1);if(!_0x3b5c9b)throw new _0x4842d8('commentsrepository-remove-missing-comment',this);if(_0x4fa80d['_remove'](_0x3b5c9b),_0x2bad09||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x46f269=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3b4d4f}=_0x4fa80d,_0xd1727b=_0x46f269['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3b4d4f,'threadId':_0x198099,'commentId':_0x1255e1})['then'](()=>_0x46f269['remove'](_0xd1727b))['catch'](_0x5cdce4=>{throw console['error'](_0x5cdce4),new _0x4842d8('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x434911(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x710cde,_0x3b14df){super();const _0x3521ec=_0x3b14df['isResolvable'];this['channelId']=_0x3b14df['channelId'],this['id']=_0x3b14df['id'],this['comments']=new _0x4f0cac(),this['_repository']=_0x710cde,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3b14df['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x710cde,'_permissions',_0x710cde,'_readOnlyChannels',()=>_0x710cde['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x710cde,'_permissions',()=>_0x710cde['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x710cde,'_permissions',()=>{const _0x3d4734=_0x710cde['getPermissions'](this['channelId']);return _0x3d4734['write']||_0x3d4734['admin'];}),this['bind']('isResolvable')['to'](_0x710cde,'_permissions',()=>_0x3521ec&&_0x710cde['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3b14df['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x18f28c,_0x22df86)=>_0x18f28c?_0x22df86?_0x18f28c<_0x22df86?_0x18f28c:_0x22df86:_0x18f28c:_0x22df86),this['set']('unlinkedAt',_0x3b14df['unlinkedAt']||null),this['set']('resolvedAt',_0x3b14df['resolvedAt']||null),this['set']('resolvedBy',_0x3b14df['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x8a8226=>!!_0x8a8226),this['set']('attributes',_0x3b14df['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x576f0a,_0x22000c)=>_0x576f0a+_0x22000c['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x10aac7,id:_0x4fee69}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x10aac7),{'channelId':_0x10aac7,'threadId':_0x4fee69});}['setUnlinkedAt'](_0x42a320){this['_update']({'unlinkedAt':_0x42a320});}['resolve']({resolvedAt:_0x368a36=new Date(),resolvedBy:_0x56aab9=null,isFromAdapter:_0x2ee7ca=!0x1}={}){const _0x351ede=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x45ef96,id:_0x1786dc}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x45ef96),{'channelId':_0x45ef96,'threadId':_0x1786dc,'resolvedAt':_0x368a36,'resolvedBy':_0x56aab9||_0x351ede['id'],'isFromAdapter':_0x2ee7ca});}['reopen']({isFromAdapter:_0x5368cb=!0x1}={}){const {channelId:_0x2649ea,id:_0x295379}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x2649ea),{'channelId':_0x2649ea,'threadId':_0x295379,'isFromAdapter':_0x5368cb});}['setContext'](_0x7575cb){this['context']||this['_update']({'context':_0x7575cb});}['setAttribute'](_0x56040b,_0x3acd64){const _0x2b778c=wt(this['attributes']);yt(_0x2b778c,_0x56040b,_0x3acd64),this['_update']({'attributes':_0x2b778c});}['removeAttribute'](_0x264d35){const _0x2b6ed0=wt(this['attributes']);Ct(_0x2b6ed0,_0x264d35),this['_update']({'attributes':_0x2b6ed0});}['remove']({isFromAdapter:_0x4376f8=!0x1}={}){const {channelId:_0x46c741,id:_0x4c5902}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x46c741),{'channelId':_0x46c741,'threadId':_0x4c5902,'isFromAdapter':_0x4376f8});}['attachTo'](_0x5a24f9){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x5a24f9});}['addComment'](_0x306d19){const {channelId:_0x1d835a,id:_0x599868}=this;this['_repository']['fire'](Nt('addComment',_0x1d835a,_0x599868),Object['assign']({'channelId':_0x1d835a,'threadId':_0x599868},_0x306d19));}['getComment'](_0x69c5ce){if('string'!=typeof _0x69c5ce)throw new _0x4842d8('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x69c5ce});return this['comments']['get'](_0x69c5ce);}['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'](_0x53bce1=>_0x53bce1['toJSON']()),'attributes':this['attributes']};}['_add'](_0x35a66b){return this['listenTo'](_0x35a66b,'change:authoredAt',()=>{const _0x3ebb33=this['_findOptimalIndex'](_0x35a66b),_0x4559a4=this['comments'];_0x3ebb33-0x1!=_0x4559a4['getIndex'](_0x35a66b)&&_0x3ebb33+0x1!=_0x4559a4['getIndex'](_0x35a66b)&&(this['_remove'](_0x35a66b),this['_add'](_0x35a66b));}),this['comments']['add'](_0x35a66b,this['_findOptimalIndex'](_0x35a66b));}['_update'](_0x2363ad){const {channelId:_0x2d4db5,id:_0x2345f6}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x2d4db5),{..._0x2363ad,'channelId':_0x2d4db5,'threadId':_0x2345f6});}['_remove'](_0x4f6268){return this['stopListening'](_0x4f6268),_0x4f6268['destroy'](),this['comments']['remove'](_0x4f6268);}['_findOptimalIndex'](_0x226b55){const _0x4cc94a=this['comments']['find'](_0x48e0b0=>new Date(_0x48e0b0['authoredAt'])['getTime']()>new Date(_0x226b55['authoredAt'])['getTime']());return _0x4cc94a?this['comments']['getIndex'](_0x4cc94a):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x434911(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x9d34fc,_0x33effa){super();const _0xe6e276=_0x9d34fc['context']['plugins']['get'](it)['me'],_0x443597=_0x9d34fc['getCommentThread'](_0x33effa['threadId']),_0xeb5587=0x0===_0x443597['comments']['length'],_0x3dee13=_0xe6e276===_0x33effa['author'];this['id']=_0x33effa['id'],this['threadId']=_0x33effa['threadId'],this['author']=_0x33effa['author'],this['creator']=_0x33effa['creator'],this['isExternal']=Boolean(_0x33effa['attributes']&&_0x33effa['attributes']['@external']),this['set']('content',_0x33effa['content']),this['createdAt']=_0x33effa['createdAt']||new Date(),this['set']('authoredAt',_0x33effa['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x443597,'resolvedAt'),this['set']('attributes',_0x33effa['attributes']||{}),this['bind']('isEditable')['to'](_0x9d34fc,'_permissions',()=>{const _0x349337=_0x9d34fc['getPermissions'](_0x443597['channelId'])['write'],_0x4e2fb8=_0x9d34fc['getPermissions'](_0x443597['channelId'])['modifyAll'];return _0x3dee13&&_0x349337||!_0x3dee13&&_0x4e2fb8;}),this['bind']('isRemovable')['to'](_0x443597,'isRemovable',_0x9d34fc,'_permissions',_0x4456ee=>{const _0x37cc4b=_0x9d34fc['getPermissions'](_0x443597['channelId'])['write'],_0x6fac53=_0x9d34fc['getPermissions'](_0x443597['channelId'])['modifyAll'];return _0x3dee13&&_0x37cc4b||_0x4456ee&&_0xeb5587||!_0x3dee13&&_0x6fac53&&!_0xeb5587;}),this['bind']('isReadOnly')['to'](_0x443597,'isReadOnly'),this['_repository']=_0x9d34fc;}get['weight'](){return Math['max'](function(_0x100de2){const _0x9c54cf=document['createElement']('div');return _0x9c54cf['innerHTML']=_0x100de2,_0x9c54cf['textContent']['length'];}(this['content']),0xc8);}['update'](_0x5333f0){const {threadId:_0x2f4048,id:_0x1e231b}=this;if(!this['_repository']['hasCommentThread'](_0x2f4048))throw new _0x4842d8('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x1ff8ae}=this['_repository']['getCommentThread'](_0x2f4048);this['_repository']['fire'](Nt('updateComment',_0x1ff8ae,_0x2f4048),{'channelId':_0x1ff8ae,'threadId':_0x2f4048,'commentId':_0x1e231b,..._0x5333f0});}['setAttribute'](_0xc3069,_0xd3ce57){const _0xef55a5=wt(this['attributes']);yt(_0xef55a5,_0xc3069,_0xd3ce57),this['update']({'attributes':_0xef55a5});}['removeAttribute'](_0x383024){const _0x157b34=wt(this['attributes']);Ct(_0x157b34,_0x383024),this['update']({'attributes':_0x157b34});}['remove'](_0x17ad8d={}){if(!_0x17ad8d['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4fe5e5,id:_0x37602a}=this;if(!this['_repository']['hasCommentThread'](_0x4fe5e5))throw new _0x4842d8('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1a91b8}=this['_repository']['getCommentThread'](_0x4fe5e5);this['_repository']['fire'](Nt('removeComment',_0x1a91b8,_0x4fe5e5),{'channelId':_0x1a91b8,'threadId':_0x4fe5e5,'commentId':_0x37602a,..._0x17ad8d});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x2a1a7f,..._0x4b2926){for(const _0x201126 of _0x4b2926)void 0x0!==_0x201126&&(_0x2a1a7f+=':'+String(_0x201126));return _0x2a1a7f;}class ot extends _0x5e53d9{constructor(_0x26d4b0){super(_0x26d4b0),this['set']('hasContent',!0x1);}['refresh'](){const _0x33fd96=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xf7dec9 of _0x33fd96['getRanges']())if(this['_hasContent'](_0xf7dec9))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x27d9d3=_0x144fe1(),ranges:_0x24be4b,comment:_0x381f02}={}){const _0xdf486e=this['editor']['model'],_0x561c60=_0x24be4b??Array['from'](_0xdf486e['document']['selection']['getRanges']()),_0x1cd7b2=[];for(const _0x4a594f of _0x561c60)this['_hasContent'](_0x4a594f)&&_0x1cd7b2['push'](this['_trimToContent'](_0x4a594f));if(!_0x1cd7b2['length'])throw new _0x4842d8('addcommentthreadcommand-incorrect-ranges',null);_0x381f02&&this['_createCommentThread'](_0x27d9d3,_0x381f02),this['_createMarkersFromRanges'](_0x27d9d3,_0x1cd7b2,!!_0x381f02);}['_createMarkersFromRanges'](_0x45d11d,_0x4e6bff,_0x3cce06){this['editor']['model']['change'](_0x374bc6=>{for(const _0x28e482 of _0x4e6bff){const _0x27c922=_0x144fe1()['substr'](0x1,0x5),_0x42cae4='comment:'+_0x45d11d+':'+_0x27c922;_0x374bc6['addMarker'](_0x42cae4,{'range':_0x28e482,'usingOperation':_0x3cce06,'affectsData':_0x3cce06});}});}['_createCommentThread'](_0x38bb39,_0x1c3671){const _0x2cc7d0=this['editor']['plugins']['get']('CommentsRepository'),_0x5168f2=this['editor']['config']['get']('collaboration.channelId'),_0x1555b8=this['editor']['plugins']['get']('Users')['me'];if(!_0x1555b8)throw new _0x4842d8('addcommentthreadcommand-user-not-found',null);_0x2cc7d0['addCommentThread']({'threadId':_0x38bb39,'channelId':_0x5168f2,'comments':[{'authorId':_0x1555b8['id'],'content':_0x1c3671,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x549bb3){for(const _0x5e35de of _0x549bb3['getItems']())if(this['_itemIsContent'](_0x5e35de))return!0x0;return!0x1;}['_itemIsContent'](_0x2649df){return _0x2649df['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x2649df)&&!_0x2649df['is']('element','tableCell');}['_trimToContent'](_0x5b5dce){const _0x563aac=_0x338b6e=>!this['_itemIsContent'](_0x338b6e['item']),_0x567539=_0x5b5dce['start']['getLastMatchingPosition'](_0x563aac),_0x228a8f=_0x5b5dce['end']['getLastMatchingPosition'](_0x563aac,{'direction':'backward'});return this['editor']['model']['createRange'](_0x567539,_0x228a8f);}}class b extends _0xa4777{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x517f97){super(_0x517f97),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x531427=this['editor'],_0x5194f0=_0x531427['model']['document']['selection'],_0x31e7f1=_0x5adaa1(()=>this['refreshSelectedViews'](),0xa);_0x5194f0['on']('change:range',(_0x22cf27,_0x28ef94)=>{_0x28ef94['directChange']&&(_0x31e7f1['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x531427['editing']['view']['document'],'change:isFocused',(_0x4ea211,_0x150a57,_0x1b9a66)=>{_0x1b9a66&&_0x31e7f1();}),this['listenTo'](_0x531427['ui']['focusTracker'],'change:isFocused',(_0x4fe911,_0x1d5589,_0x426804)=>{_0x426804||this['fire']('blur',{'isAnnotationTracked':_0x1c9a43=>this['_editorAnnotationsData']['has'](_0x1c9a43['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5a6a64){if(this['_editorAnnotations']['has'](_0x5a6a64['view']))return;this['_editorAnnotations']['add'](_0x5a6a64['view']),this['editor']['ui']['focusTracker']['add'](_0x5a6a64['view']['element']);const _0x222bc8=this['editor']['plugins']['get'](y);this['listenTo'](_0x222bc8['collection'],'remove',(_0x1f463e,_0x3aef45)=>{this['editor']['ui']['focusTracker']['remove'](_0x3aef45['view']['element']),this['_editorAnnotations']['delete'](_0x3aef45['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x584b8b){if('function'!=typeof _0x584b8b)throw new _0x4842d8('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x584b8b);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2b2baa,annotations:_0x39f2ea}){const _0x1ef93d=[],_0x1743eb=this['editor']['model']['document']['selection'],_0x4f9400=Array['from'](_0x1743eb['getRanges']());for(const [_0xf24206,_0x2e20de]of this['_editorAnnotationsData']){const _0x5b522b=_0xda26(_0x2e20de),_0x43b5fe=_0x39f2ea['getByInnerView'](_0xf24206);_0x5b522b&&_0x43b5fe&&_0x1ef93d['push']({'annotation':_0x43b5fe,'range':_0x5b522b});}function _0xda26(_0x440fdd){for(const _0x704e85 of _0x440fdd)for(const _0x3dae62 of _0x4f9400)if(_0x704e85['containsRange'](_0x3dae62,!_0x1743eb['isCollapsed']))return _0x704e85;return null;}return _0x1ef93d['sort']((_0x1f6cd2,_0x10bb10)=>{const _0x511fbe=_0x1f6cd2['range'],_0x503cfb=_0x10bb10['range'];if(!_0x511fbe['isEqual'](_0x503cfb)){if(_0x511fbe['containsRange'](_0x503cfb,!0x0))return 0x1;if(_0x503cfb['containsRange'](_0x511fbe,!0x0))return-0x1;}return _0x1f6cd2['annotation']==_0x2b2baa?-0x1:_0x10bb10['annotation']==_0x2b2baa?0x1:0x0;})['map'](_0x417ad2=>_0x417ad2['annotation']);}get['_editorAnnotationsData'](){const _0x38f3da=new Map();for(const _0x3505e8 of Array['from'](this['_dataCollectors']))for(const [_0x224dd3,_0x98ffd9]of _0x3505e8())_0x38f3da['set'](_0x224dd3,_0x98ffd9);return _0x38f3da;}}class st extends _0xa4777{['afterInit'](){const _0x40061c=this['editor'];if(!_0x40061c['plugins']['has']('RestrictedEditingModeEditing'))return;_0x40061c['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0xa4777{constructor(_0x292861){super(_0x292861),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1cabc9=this['editor'],_0x2bd776=_0x1cabc9['commands']['get']('importWord'),_0x4b060b=_0x1cabc9['plugins']['get'](it);_0x2bd776&&(_0x2bd776['on']('execute',(_0xe54496,[,_0x38087d])=>{_0x38087d['collaboration_features']={'comments':!0x0,'user_id':_0x4b060b['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2bd776,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x44b5f7,_0x5933b3){const {comment_threads:_0x194441}=_0x5933b3;_0x194441&&_0x194441['forEach'](({thread_id:_0x1fe888,comments:_0x3c33c9,is_resolved:_0x32da8e})=>{const _0x2f453c=new Date(),_0x529ae1=_0x3c33c9['map'](({author:_0x106516,content:_0x3011e1,created_at:_0x5c7ff5})=>({'content':_0x3011e1,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2f453c,'attributes':{'@external':{'authorName':_0x106516,'createdAt':_0x5c7ff5?new Date(_0x5c7ff5):new Date(),'source':'importWord'}}})),_0x1b0433=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1b0433,'threadId':_0x1fe888,'comments':_0x529ae1,'resolvedAt':_0x32da8e?_0x2f453c:null});});}}class at extends _0xa4777{constructor(_0x55cacb){super(_0x55cacb),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x1a1709=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1a1709,'contentInsertion',(_0x186425,_0x261eb3)=>this['_removeMarkersWithoutThreads'](_0x261eb3['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x244db2){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x244db2;const _0xa73611=this['editor']['plugins']['get']('CommentsRepository');for(const _0x141370 of _0x244db2['keys']()){const [_0x4ece0b,_0x11b44]=_0x141370['split'](':');'comment'!=_0x4ece0b||_0xa73611['hasCommentThread'](_0x11b44)||_0x244db2['delete'](_0x141370);}return _0x244db2;}['_registerMarkerInClipboardPipeline'](){const _0x41d225=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x380a1e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x380a1e&&_0x41d225['_registerMarkerToCopy']('comment',_0x380a1e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x5bd8ed){switch(_0x5bd8ed){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x95c721){const _0x303628=_0x95c721['split'](':');return{'group':_0x303628[0x0],'id':_0x303628[0x1],'part':_0x303628[0x2]};}class ut extends _0xa4777{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3ee9a1,_0x1df87c)=>{if(!_0x1df87c['options']['showCommentHighlights'])return null;if(_0x1df87c['options']['ignoreResolvedComments']){const {id:_0x561352}=ft(_0x3ee9a1['markerName']),_0xac99=this['editor']['plugins']['get'](o);if(_0xac99['getCommentThread'](_0x561352)?.['isResolved']&&_0x3ee9a1['item'])return _0x1df87c['consumable']['consume'](_0x3ee9a1['item'],'addMarker:'+_0x3ee9a1['markerName']),_0x1df87c['consumable']['consume'](_0x3ee9a1['item'],'removeMarker:'+_0x3ee9a1['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x536fa3=>{_0x536fa3['on']('addMarker:comment',(_0x52c8e4,_0x2ab084,_0x2e3bb5)=>{if(!_0x2e3bb5['options']['showCommentHighlights'])return;const _0x5d6cd0=_0x2ab084['item'];if(!_0x5d6cd0)return;const _0x56f907=_0x2e3bb5['mapper']['toViewElement'](_0x5d6cd0);this['editor']['model']['schema']['isObject'](_0x5d6cd0)&&_0x56f907&&!_0x56f907['getCustomProperty']('widget')&&_0x56f907['is']('containerElement')&&_0x2e8f4b(_0x56f907,_0x2e3bb5['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4d90ee,{writer:_0x535a97,options:_0xcc69d1})=>{if(!_0xcc69d1['showCommentHighlights'])return null;const _0x5bb350=_0x535a97['createContainerElement']('div'),_0x320740=_0x535a97['createEmptyElement']('hr');return _0x535a97['addClass']('ck-horizontal-line',_0x5bb350),_0x535a97['insert'](_0x535a97['createPositionAt'](_0x5bb350,0x0),_0x320740),_0x5bb350;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x24944a,{writer:_0x45d0c9,options:_0x49b4fb})=>{if(!_0x49b4fb['showCommentHighlights'])return null;const _0x54a4c7=_0x45d0c9['createContainerElement']('span'),_0x1c668c=_0x45d0c9['createEmptyElement']('img');return _0x45d0c9['addClass']('image-inline',_0x54a4c7),_0x45d0c9['insert'](_0x45d0c9['createPositionAt'](_0x54a4c7,0x0),_0x1c668c),_0x54a4c7;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3a43ef,{writer:_0x104c2e,options:_0x366587})=>{if(_0x366587['showCommentHighlights'])return _0x104c2e['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x41d38a,_0x452473,_0x42070b)=>{_0x42070b['options']['showCommentHighlights']&&_0x41d38a['stop']();},{'priority':'high'});}}class r extends _0xa4777{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20e149){super(_0x20e149),this['set']('isThreadsLoadingPaused',!0x0),_0x20e149['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4a769a,_0x291114,_0x310a86,_0x1dcb12)=>{const _0x31dd03=_0x20e149['plugins']['get'](o),_0x3084b7=_0x310a86?ft(_0x310a86)['id']:null;_0x20e149['model']['change'](()=>{if(_0x3084b7){const _0x51355d=this['getAllMarkersForId'](_0x3084b7);for(const _0x14afc6 of _0x51355d)_0x20e149['editing']['reconvertMarker'](_0x14afc6);}if(_0x1dcb12){const {id:_0x5e49e3}=ft(_0x1dcb12),_0x49c8ef=_0x31dd03['getCommentThread'](_0x5e49e3);if(_0x49c8ef&&_0x49c8ef['unlinkedAt'])return;if(_0x49c8ef&&!_0x49c8ef['isAttached'])return;const _0x419413=this['getAllMarkersForId'](_0x5e49e3);for(const _0x2f24ce of _0x419413)_0x20e149['editing']['reconvertMarker'](_0x2f24ce);}}),_0x3084b7&&this['scrollToThreadMarker'](_0x3084b7);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x505aba=this['editor'],_0x1b1af3=_0x505aba['plugins']['get'](o),_0x1434b3=_0x505aba['config']['get']('collaboration.channelId'),_0x12194a=_0x1b1af3['getCommentThreads']()['filter'](_0x3d90a5=>_0x3d90a5['channelId']!==_0x1434b3);_0x505aba['commands']['add']('addCommentThread',new ot(_0x505aba)),this['listenTo'](_0x505aba,'change:isReadOnly',(_0x446cba,_0x5975bc,_0x185eec)=>{_0x1b1af3['switchReadOnly'](_0x185eec,_0x505aba['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1b1af3,dt('addCommentThread',_0x1434b3),(_0x4538b1,{threadId:_0x276f6d})=>{const _0x5a6328=this['editor']['plugins']['get'](o)['getCommentThread'](_0x276f6d);_0x5a6328?.['unlinkedAt']&&this['_attachArchivedThread'](_0x276f6d);}),this['listenTo'](_0x1b1af3,dt('removeCommentThread',_0x1434b3),(_0x1bca36,{threadId:_0x296831})=>{_0x505aba['model']['enqueueChange']({'isUndoable':!0x1},_0x534f17=>{const _0x4216e8=this['getAllMarkersForId'](_0x296831);for(const _0x25dcd0 of _0x4216e8)_0x534f17['removeMarker'](_0x25dcd0);});}),this['listenTo'](_0x1b1af3,dt('resolveCommentThread',_0x1434b3),(_0x31c1f2,{threadId:_0x26a183})=>{(this['_reconvertMarkers'](_0x26a183),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x26a183)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1b1af3,dt('reopenCommentThread',_0x1434b3),(_0x70a45e,{threadId:_0x1b98bc})=>{this['_reconvertMarkers'](_0x1b98bc);},{'priority':'low'}),this['listenTo'](_0x1b1af3,dt('addComment',_0x1434b3),(_0xc2366a,{threadId:_0x4cbb89,isFromAdapter:_0x1136f9})=>{const _0x2c8723=this['getAllMarkersForId'](_0x4cbb89);if(_0x1136f9||0x0==_0x2c8723['length']||!_0x1b1af3['hasCommentThread'](_0x4cbb89))return;0x1===_0x1b1af3['getCommentThread'](_0x4cbb89)['length']&&_0x505aba['model']['enqueueChange']({'isUndoable':!0x1},_0x29a158=>{for(const _0x4a97f6 of _0x2c8723)_0x29a158['updateMarker'](_0x4a97f6,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x12194a);}['afterInit'](){!async function(_0x9e447){const _0x2beae9=_0xe42463([0x39,0x64,0x6c,0x79,0x38,0x4b,0x37,0x7a,0x4e,0x66,0x63,0x65,0x51,0x44,0x41,0x42,0x4f,0x61,0x77,0x67,0x35,0x78,0x53,0x70,0x71,0x33,0x32,0x6e,0x47,0x30,0x6a,0x4a,0x62,0x58,0x54,0x50,0x6d,0x56,0x59,0x52,0x31,0x45,0x49,0x34,0x75,0x43,0x4d,0x76,0x55,0x69,0x6b,0x72,0x74,0x5a,0x73,0x48,0x46,0x4c,0x68,0x36,0x6f,0x57]),_0x294ac9=0x455e5c9f,_0x59d2e0=0x455933cf^_0x294ac9,_0x498b00=window[_0xe42463([0x44,0x61,0x74,0x65])][_0xe42463([0x6e,0x6f,0x77])](),_0x5f04ef=_0x9e447[_0xe42463([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x364199=new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x49a383=>{_0x5f04ef[_0xe42463([0x6f,0x6e,0x63,0x65])](_0xe42463([0x72,0x65,0x61,0x64,0x79]),_0x49a383);}),_0x459b98={[_0xe42463([0x6b,0x74,0x79])]:_0xe42463([0x45,0x43]),[_0xe42463([0x75,0x73,0x65])]:_0xe42463([0x73,0x69,0x67]),[_0xe42463([0x63,0x72,0x76])]:_0xe42463([0x50,0x2d,0x32,0x35,0x36]),[_0xe42463([0x78])]:_0xe42463([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0xe42463([0x79])]:_0xe42463([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0xe42463([0x61,0x6c,0x67])]:_0xe42463([0x45,0x53,0x32,0x35,0x36])},_0x1af692=_0x5f04ef[_0xe42463([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xe42463([0x67,0x65,0x74])](_0xe42463([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x336f75(){let _0x580639,_0x441f09=null,_0xf1f84b=null;try{if(_0x1af692==_0xe42463([0x47,0x50,0x4c]))return _0xe42463([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x580639=_0x48d974(),!_0x580639)return _0xe42463([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x580639[_0xe42463([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xf1f84b=_0x4b7c69(_0x580639[_0xe42463([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x580639[_0xe42463([0x6a,0x74,0x69])])),await _0xc5a36b()?_0x168a20()?_0x339a02()?_0xe42463([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x573562()?(_0x580639[_0xe42463([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xe42463([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x441f09=_0x1373d7(_0xe42463([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x580639[_0xe42463([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xe42463([0x74,0x72,0x69,0x61,0x6c])&&(_0x441f09=_0x1373d7(_0xe42463([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5e013c()):_0xe42463([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xe42463([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xe42463([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xe42463([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x339a02(){const _0x37ab60=[_0xe42463([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xe42463([0x74,0x72,0x69,0x61,0x6c])][_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x580639[_0xe42463([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x498b00/0x3e8:0xe10*_0x59d2e0;return _0x580639[_0xe42463([0x65,0x78,0x70])]<_0x37ab60;}function _0x168a20(){const _0x2e2214=_0x580639[_0xe42463([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2e2214)return!0x1;if(_0x2e2214[_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe42463([0x2a])))return!0x0;if(_0x2e2214[_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe42463([0x43,0x4d,0x54])))return!0x0;if(_0x2e2214[_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe42463([0x52,0x43,0x4d,0x54]))){if(_0x2c6ca0())return!0x0;if(_0x55dde2()||_0x323d44())return!0x0;}return!0x1;}function _0x573562(){const _0x39b6cf=_0x580639[_0xe42463([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x39b6cf||0x0==_0x39b6cf[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1a0a17}=new URL(window[_0xe42463([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x39b6cf[_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a0a17))return!0x0;const _0xaba4c4=_0x1a0a17[_0xe42463([0x73,0x70,0x6c,0x69,0x74])](_0xe42463([0x2e]));return _0x39b6cf[_0xe42463([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b98d3=>_0x5b98d3[_0xe42463([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe42463([0x2a])))[_0xe42463([0x6d,0x61,0x70])](_0x32ee6e=>_0x32ee6e[_0xe42463([0x73,0x70,0x6c,0x69,0x74])](_0xe42463([0x2e])))[_0xe42463([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x51a92a=>_0x51a92a[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xaba4c4[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xe42463([0x6d,0x61,0x70])](_0x4df6fb=>Array(_0xaba4c4[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4df6fb[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xe42463([0x66,0x69,0x6c,0x6c])](_0x4df6fb[0x0]===_0xe42463([0x2a])?_0xe42463([0x2a]):'')[_0xe42463([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4df6fb))[_0xe42463([0x73,0x6f,0x6d,0x65])](_0x41a87e=>_0xaba4c4[_0xe42463([0x65,0x76,0x65,0x72,0x79])]((_0x26d681,_0x24d3cc)=>_0x41a87e[_0x24d3cc]===_0x26d681||_0x41a87e[_0x24d3cc]===_0xe42463([0x2a])));}function _0x5e013c(){return _0x441f09&&_0xf1f84b?new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xfecf39,_0x10554f)=>{_0x441f09[_0xe42463([0x74,0x68,0x65,0x6e])](_0xfecf39,_0x10554f),_0xf1f84b[_0xe42463([0x74,0x68,0x65,0x6e])](_0x50e7e2=>{_0x50e7e2!=_0xe42463([0x56,0x61,0x6c,0x69,0x64])&&_0xfecf39(_0x50e7e2);},_0x10554f);}):_0x441f09||_0xf1f84b||_0xe42463([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4b7c69(_0x164ccb,_0x3d0aa3){return new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3797d2=>{if(_0x2d9edd())return _0x3797d2(_0xe42463([0x56,0x61,0x6c,0x69,0x64]));_0x18969(),_0x5f04ef[_0xe42463([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xe42463([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1991f1=!0x1;const _0x59777d=_0x144fe1();function _0x4e9412(_0x378c16){return!!_0x378c16&&(typeof _0x378c16===_0xe42463([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x378c16===_0xe42463([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x378c16[_0xe42463([0x74,0x68,0x65,0x6e])]===_0xe42463([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x378c16[_0xe42463([0x63,0x61,0x74,0x63,0x68])]===_0xe42463([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1474ec(_0x2f0f57){_0x1694f8(_0x2f0f57)[_0xe42463([0x74,0x68,0x65,0x6e])](_0x2286f5=>{if(!_0x2286f5||_0x2286f5[_0xe42463([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xe42463([0x6f,0x6b]))return _0xe42463([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1b5dc0(_0x49cade(_0x59777d+_0x3d0aa3))!=_0x2286f5[_0xe42463([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xe42463([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xe42463([0x56,0x61,0x6c,0x69,0x64]);})[_0xe42463([0x74,0x68,0x65,0x6e])](_0xdd5097=>(_0x5ee84e(),_0xdd5097),()=>{const _0x22e4e0=_0x3be6ff();return null==_0x22e4e0?(_0x5ee84e(),_0xe42463([0x56,0x61,0x6c,0x69,0x64])):_0xe42463(_0x498b00-_0x22e4e0>(0x6152d89f^_0x294ac9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xe42463([0x74,0x68,0x65,0x6e])](_0x3797d2)[_0xe42463([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3797d2(_0xe42463([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x473bfe=0x4568b21f^_0x294ac9;function _0x5ee84e(){const _0x2f3cbd=_0xe42463([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b5dc0(_0x49cade(_0x164ccb)),_0x34cf51=_0x5cd2d4(_0x1b5dc0(window[_0xe42463([0x4d,0x61,0x74,0x68])][_0xe42463([0x63,0x65,0x69,0x6c])](_0x498b00/_0x473bfe)));window[_0xe42463([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xe42463([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f3cbd,_0x34cf51);}function _0x3be6ff(){const _0x4be979=_0xe42463([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b5dc0(_0x49cade(_0x164ccb)),_0x4cb5c1=window[_0xe42463([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xe42463([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4be979);return _0x4cb5c1?window[_0xe42463([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5cd2d4(_0x4cb5c1),0x10)*_0x473bfe:null;}function _0x1694f8(_0x477d2b){return new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2af40f,_0x3e8fb9)=>{_0x477d2b[_0xe42463([0x74,0x68,0x65,0x6e])](_0x2af40f,_0x3e8fb9),window[_0xe42463([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3e8fb9,0x455f885f^_0x294ac9);});}}_0x5f04ef[_0xe42463([0x6f,0x6e])](_0xe42463([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x861307,_0x1cc036)=>{if(_0x1cc036[0x0]!=_0x164ccb)return _0x3797d2(_0xe42463([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1cc036[0x1]={..._0x1cc036[0x1],[_0xe42463([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x59777d};},{[_0xe42463([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xe42463([0x68,0x69,0x67,0x68])}),_0x5f04ef[_0xe42463([0x6f,0x6e])](_0xe42463([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2d3c7b=>{_0x4e9412(_0x2d3c7b[_0xe42463([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1991f1=!0x0,_0x1474ec(_0x2d3c7b[_0xe42463([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xe42463([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xe42463([0x6c,0x6f,0x77])}),_0x364199[_0xe42463([0x74,0x68,0x65,0x6e])](()=>{_0x1991f1||_0x3797d2(_0xe42463([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2d9edd(){return _0x5f04ef[_0xe42463([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xe42463([0x76,0x69,0x65,0x77])][_0xe42463([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xe42463([0x61,0x75,0x74,0x6f]);}function _0x18969(){_0x5f04ef[_0xe42463([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xe42463([0x76,0x69,0x65,0x77])][_0xe42463([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xe42463([0x61,0x75,0x74,0x6f]);}}function _0x1373d7(_0x170bad){const _0x4a68a5=[new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ddfb2=>setTimeout(_0x3ddfb2,0x45576253^_0x294ac9)),_0x364199[_0xe42463([0x74,0x68,0x65,0x6e])](()=>new window[(_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x870ed2=>{let _0x12c44e=0x0;_0x5f04ef[_0xe42463([0x6d,0x6f,0x64,0x65,0x6c])][_0xe42463([0x6f,0x6e])](_0xe42463([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x48e9cc,_0x1ab7ad)=>{_0x1ab7ad[0x0][_0xe42463([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x12c44e++,_0x12c44e==(0x455e5d67^_0x294ac9)&&(_0x870ed2(),_0x48e9cc[_0xe42463([0x6f,0x66,0x66])]());});}))];return window[_0xe42463([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xe42463([0x72,0x61,0x63,0x65])](_0x4a68a5)[_0xe42463([0x74,0x68,0x65,0x6e])](()=>_0x170bad);}async function _0x2d1bf5(){await _0x364199,_0x5f04ef[_0xe42463([0x6d,0x6f,0x64,0x65,0x6c])][_0xe42463([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5d69c6,_0x5f04ef[_0xe42463([0x6d,0x6f,0x64,0x65,0x6c])][_0xe42463([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5d69c6,_0x5f04ef[_0xe42463([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xe42463([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2c6ca0(){return _0x45d035(_0xe42463([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3f7af2(_0xe42463([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xe42463([0x73,0x74,0x61,0x74,0x65])]==_0xe42463([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x55dde2(){return _0x45d035(_0xe42463([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x323d44(){return _0x45d035(_0xe42463([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xe2d630(_0x1ae038){const _0x5551ba=_0x4b5bb1();_0x5f04ef[_0x5551ba]=_0xe42463([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1ae038,_0x1ae038!=_0xe42463([0x56,0x61,0x6c,0x69,0x64])&&_0x2d1bf5();}function _0x4b5bb1(){const _0x169c2b=window[_0xe42463([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xe42463([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xe42463([0x6e,0x6f,0x77])]())[_0xe42463([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xe42463([0x2e]),'');let _0x45506f=_0xe42463([0x64]);for(let _0x10439a=0x0;_0x10439a<_0x169c2b[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x10439a+=0x2){let _0x9ec749=window[_0xe42463([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x169c2b[_0xe42463([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x10439a,_0x10439a+0x2));_0x9ec749>=_0x2beae9[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x9ec749-=_0x2beae9[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x45506f+=_0x2beae9[_0x9ec749];}return _0x45506f;}function _0x48d974(){const _0x55e9e2=_0x1af692[_0xe42463([0x73,0x70,0x6c,0x69,0x74])](_0xe42463([0x2e]));if(0x3!=_0x55e9e2[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x208298(_0x55e9e2[0x1]);function _0x208298(_0x4812c9){const _0x57579b=_0x4f19c6(_0x4812c9);return _0x57579b&&_0x34aea5()?_0x57579b:null;function _0x34aea5(){const _0x117ff8=_0x57579b[_0xe42463([0x6a,0x74,0x69])],_0x5ddde8=window[_0xe42463([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x117ff8[_0xe42463([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x117ff8[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x417a10={..._0x57579b,[_0xe42463([0x6a,0x74,0x69])]:_0x117ff8[_0xe42463([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x117ff8[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x417a10[_0xe42463([0x76,0x63])],_0x49cade(_0x417a10)==_0x5ddde8;}}}async function _0xc5a36b(){let _0x565f07=!0x0;try{const _0x251b61=_0x1af692[_0xe42463([0x73,0x70,0x6c,0x69,0x74])](_0xe42463([0x2e])),[_0x1676d6,_0x51d0b2,_0x4c6df7]=_0x251b61;return _0x1c7249(_0x1676d6),await _0x50fba9(_0x1676d6,_0x51d0b2,_0x4c6df7),_0x565f07;}catch{return!0x1;}function _0x1c7249(_0x437d1e){const _0x22ffe3=_0x4f19c6(_0x437d1e);_0x22ffe3&&_0x22ffe3[_0xe42463([0x61,0x6c,0x67])]==_0xe42463([0x45,0x53,0x32,0x35,0x36])||(_0x565f07=!0x1);}async function _0x50fba9(_0x569b0f,_0x40cebc,_0x5ceae4){const _0x43cb69=window[_0xe42463([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xe42463([0x66,0x72,0x6f,0x6d])](_0x5d2b14(_0x5ceae4),_0x4b9a95=>_0x4b9a95[_0xe42463([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x54ba85=new window[(_0xe42463([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xe42463([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x569b0f+_0xe42463([0x2e])+_0x40cebc),_0x80e59d=window[_0xe42463([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xe42463([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x80e59d)return;const _0x45f50a=await _0x80e59d[_0xe42463([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xe42463([0x6a,0x77,0x6b]),_0x459b98,{[_0xe42463([0x6e,0x61,0x6d,0x65])]:_0xe42463([0x45,0x43,0x44,0x53,0x41]),[_0xe42463([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xe42463([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xe42463([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x80e59d[_0xe42463([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xe42463([0x6e,0x61,0x6d,0x65])]:_0xe42463([0x45,0x43,0x44,0x53,0x41]),[_0xe42463([0x68,0x61,0x73,0x68])]:{[_0xe42463([0x6e,0x61,0x6d,0x65])]:_0xe42463([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x45f50a,_0x43cb69,_0x54ba85)||(_0x565f07=!0x1);}}function _0x4f19c6(_0x5c8af1){return _0x5c8af1[_0xe42463([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xe42463([0x65,0x79]))?JSON[_0xe42463([0x70,0x61,0x72,0x73,0x65])](_0x5d2b14(_0x5c8af1)):null;}function _0x5d2b14(_0x41da9c){return window[_0xe42463([0x61,0x74,0x6f,0x62])](_0x41da9c[_0xe42463([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xe42463([0x2b]))[_0xe42463([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xe42463([0x2f])));}function _0x49cade(_0x440a58){let _0x163d0f=0x1505;function _0x62a177(_0x388452){for(let _0x50437f=0x0;_0x50437f<_0x388452[_0xe42463([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x50437f++){const _0xf95ee5=_0x388452[_0xe42463([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x50437f);_0x163d0f=(_0x163d0f<<0x5)+_0x163d0f+_0xf95ee5,_0x163d0f&=_0x163d0f;}}function _0x443d0a(_0x482fb1){Array[_0xe42463([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x482fb1)?_0x482fb1[_0xe42463([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x443d0a):_0x482fb1&&typeof _0x482fb1==_0xe42463([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xe42463([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x482fb1)[_0xe42463([0x73,0x6f,0x72,0x74])]()[_0xe42463([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x50b951,_0x34ab2f])=>{_0x62a177(_0x50b951),_0x443d0a(_0x34ab2f);}):_0x62a177(window[_0xe42463([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x482fb1));}return _0x443d0a(_0x440a58),_0x163d0f>>>0x0;}function _0x1b5dc0(_0xb649b5){return _0xb649b5[_0xe42463([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xe42463([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xe42463([0x30]));}function _0x5cd2d4(_0x31dd7a){return _0x31dd7a[_0xe42463([0x73,0x70,0x6c,0x69,0x74])]('')[_0xe42463([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xe42463([0x6a,0x6f,0x69,0x6e])]('');}function _0x45d035(_0x40ab5b){return _0x5f04ef[_0xe42463([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xe42463([0x68,0x61,0x73])](_0x40ab5b);}function _0x3f7af2(_0x3f0c16){return _0x5f04ef[_0xe42463([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xe42463([0x67,0x65,0x74])](_0x3f0c16);}function _0x5d69c6(){}function _0xe42463(_0x6d1207){return _0x6d1207['map'](_0x508441=>String['fromCharCode'](_0x508441))['join']('');}_0xe2d630(await _0x336f75());}(this);}['destroy'](){const _0x126a77=this['editor']['plugins']['get'](o),_0x434700=this['editor']['config']['get']('collaboration.channelId');for(const _0x4c4d06 of _0x126a77['getCommentThreads']({'channelId':_0x434700}))_0x126a77['_detachCommentThread'](_0x4c4d06['id']),_0x126a77['_threads']['delete'](_0x4c4d06['id']);super['destroy']();}['hasMarkerForId'](_0x269bbd){return this['getAllMarkersForId'](_0x269bbd)['length']>0x0;}['getAllMarkersForId'](_0x30d287){const _0x95269d=[];for(const _0x2aff32 of this['editor']['model']['markers'])_0x2aff32['name']['startsWith']('comment:'+_0x30d287)&&_0x95269d['push'](_0x2aff32);return _0x95269d;}['scrollToThreadMarker'](_0xa7bf1d){setTimeout(()=>{const _0x575270=this['_getTargetForId'](_0xa7bf1d);if(!_0x575270)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0xa7bf1d&&nt({'target':_0x575270[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2eac8e){this['editor']['model']['change'](()=>{for(const _0x593213 of this['getAllMarkersForId'](_0x2eac8e))this['editor']['editing']['reconvertMarker'](_0x593213);});}['_attachArchivedThread'](_0x47cd41){const _0x550f3e=this['editor']['plugins']['get'](o),_0x8d485d=this['editor']['plugins']['get'](b),_0x30658c=_0x550f3e['getCommentThread'](_0x47cd41);if(!_0x30658c['isAttached']){const _0x4a5853=_0x30658c['attachTo'](()=>this['_getTargetForId'](_0x30658c['id']));_0x8d485d['registerAnnotation'](_0x4a5853),_0x30658c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x130055=this['editor'],_0x1be1e2=_0x130055['plugins']['get'](it);_0x130055['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x51811e,_0x430eea)=>{const {id:_0xac996a}=ft(_0x51811e['markerName']),_0x3f135c=_0x130055['plugins']['get'](o)['getCommentThread'](_0xac996a),_0x597145=this['activeMarker']&&ft(this['activeMarker'])['id']===_0xac996a;let _0x29e375;if(_0x3f135c&&_0x3f135c['isResolved']&&!_0x597145&&_0x51811e['item'])return _0x430eea['consumable']['consume'](_0x51811e['item'],'addMarker:'+_0x51811e['markerName']),_0x430eea['consumable']['consume'](_0x51811e['item'],'removeMarker:'+_0x51811e['markerName']),null;const _0x594d46=['ck-comment-marker'];return _0x597145&&_0x594d46['push']('ck-comment-marker--active'),_0x29e375=_0x3f135c?.['length']?_0x3f135c['comments']['first']['author']['id']:_0x1be1e2['me']['id'],{'classes':_0x594d46,'attributes':{'data-comment':_0xac996a,'data-author-id':_0x29e375}};}}),_0x130055['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x18afb3,{options:_0x27995a})=>{if(_0x27995a['showCommentHighlights'])return null;const _0xf53a08=_0x130055['plugins']['get'](o),_0x480b27=_0x130055['model']['markers']['get'](_0x18afb3),{id:_0x45c792,part:_0x21c80e}=ft(_0x18afb3);return _0x480b27&&!_0x480b27['affectsData']||_0x27995a['ignoreResolvedComments']&&_0xf53a08['getCommentThread'](_0x45c792)?.['isResolved']?null:{'group':'comment','name':_0x21c80e?_0x45c792+':'+_0x21c80e:_0x45c792};}}),_0x130055['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5dd9a4,{writer:_0x4fb33f})=>_0x4fb33f['createElement']('$marker',{'data-name':'comment:'+_0x5dd9a4['getAttribute']('id')})}),_0x130055['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3c3bd8=this['editor'],_0x565bb0=_0x3c3bd8['plugins']['get'](o),_0x1b863b=new Set(),_0x27db78=new Set();_0x3c3bd8['model']['document']['registerPostFixer'](_0x5b15e7=>{let _0x532efd=!0x1;for(const {name:_0x1717ee,data:_0x564585}of _0x3c3bd8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x8cb679,id:_0x935602}=ft(_0x1717ee);let _0x48ed1d=_0x564585['newRange'];if('comment'!==_0x8cb679||!_0x48ed1d)continue;const _0x4d637c='$graveyard'===_0x48ed1d['root']['rootName'];_0x4d637c||(_0x48ed1d=ht(_0x48ed1d,_0x3c3bd8['model']),!_0x48ed1d||_0x48ed1d['isCollapsed']||!_0x564585['newRange']||_0x48ed1d['isEqual'](_0x564585['newRange']))?_0x3c3bd8['model']['hasContent'](_0x48ed1d)&&!_0x4d637c?this['isThreadsLoadingPaused']?_0x1b863b['add'](_0x1717ee):this['_handleThreadMarker'](_0x1717ee,_0x935602):(_0x27db78['add'](_0x1717ee),_0x1b863b['delete'](_0x1717ee),_0x5b15e7['removeMarker'](_0x1717ee),_0x532efd=!0x0):(_0x5b15e7['updateMarker'](_0x1717ee,{'range':_0x48ed1d}),_0x532efd=!0x0);}return _0x532efd;}),this['on']('change:isThreadsLoadingPaused',(_0x2e8e26,_0x3b504c,_0x302417)=>{if(!_0x302417&&_0x1b863b['size'])for(const _0x1df183 of _0x1b863b){const {id:_0x249084}=ft(_0x1df183);_0x1b863b['delete'](_0x1df183),_0x3c3bd8['model']['markers']['get'](_0x1df183)&&this['_handleThreadMarker'](_0x1df183,_0x249084);}}),this['listenTo'](_0x3c3bd8['model']['document'],'change',()=>{for(const {name:_0x383081,data:{newRange:_0x3fd130}}of _0x3c3bd8['model']['document']['differ']['getChangedMarkers']()){const {group:_0xa5206d,id:_0x527d20}=ft(_0x383081);if('comment'!==_0xa5206d)continue;const _0x3c846b=_0x565bb0['getCommentThread'](_0x527d20),_0x66e7b3=this['hasMarkerForId'](_0x527d20);_0x3c846b&&(!_0x3c846b['_hasTargetInContent']&&_0x3fd130&&_0x3c3bd8['editing']['view']['once']('render',()=>{const _0x7f8d34=_0x3c3bd8['plugins']['get'](y),_0x36c59a=_0x565bb0['_threadToController']['get'](_0x3c846b)['view'];_0x7f8d34['getByInnerView'](_0x36c59a)['refreshVisibility']();},{'priority':'low'}),_0x3c846b['_hasTargetInContent']=_0x66e7b3||!!_0x3fd130),_0x3fd130||(_0x27db78['add'](_0x383081),_0x1b863b['delete'](_0x383081));}for(const _0x6b0df0 of _0x27db78){const {id:_0xde62b2}=ft(_0x6b0df0),_0x5ea818=_0x565bb0['getCommentThread'](_0xde62b2);if(_0x1b863b['delete'](_0x6b0df0),!_0x5ea818)continue;const _0x46a448=this['hasMarkerForId'](_0xde62b2);_0x46a448||_0x5ea818['isSubmitted']?_0x46a448||_0x5ea818['unlinkedAt']||_0x5ea818['setUnlinkedAt'](new Date()):_0x5ea818['remove']();}_0x27db78['clear']();});}['_handleInitialThreads'](_0x25ba5a){_0x25ba5a['forEach'](_0x211df6=>{_0x211df6['unlinkedAt']&&this['_attachArchivedThread'](_0x211df6['id']);});}['_getTargetForId'](_0x13669d){const _0x3989be=this['editor'],_0x2b3f28=this['getAllMarkersForId'](_0x13669d);return et(_0x3989be['editing'],_0x2b3f28);}['_getTextContext'](_0x4eed0c){const _0x3496ea=this['getAllMarkersForId'](_0x4eed0c);let _0x11eb10='',_0xa9e986=!0x1;for(const _0x2e81fd of _0x3496ea){const _0x520825=_0x2e81fd['getRange']();for(const _0x244fcb of Array['from'](_0x520825['getItems']()))_0x244fcb['is']('$textProxy')?(_0x11eb10&&_0xa9e986&&(_0x11eb10+='\x20',_0xa9e986=!0x1),_0x11eb10+=_0x244fcb['data']):_0xa9e986=!0x0;_0xa9e986=!0x0;}return _0x11eb10['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2d21d0,_0x378509){const _0x42fa07=this['editor'],_0x222aac=_0x42fa07['plugins']['get'](o);let _0x20bf03=_0x222aac['getCommentThread'](_0x378509);const _0x3d2fae=_0x42fa07['config']['get']('collaboration.channelId'),_0x5c50d7=_0x42fa07['plugins']['get'](b);if(_0x20bf03&&(_0x20bf03['unlinkedAt']&&_0x20bf03['setUnlinkedAt'](null),_0x20bf03['isAttached']))return _0x20bf03;return!this['getAllMarkersForId'](_0x378509)[0x0]['managedUsingOperations']?_0x42fa07['editing']['view']['once']('render',()=>{if(_0x222aac['getCommentThread'](_0x378509))return;const _0x1c0005=_0x42fa07['plugins']['get'](y);_0x20bf03=_0x222aac['openNewCommentThread']({'channelId':_0x3d2fae,'threadId':_0x378509,'target':()=>this['_getTargetForId'](_0x378509),'context':{'type':'text','value':this['_getTextContext'](_0x378509)}});const _0x5b57be=_0x222aac['_threadToController']['get'](_0x20bf03)['view'],_0x1f71ff=_0x1c0005['getByInnerView'](_0x5b57be);_0x1f71ff&&_0x5c50d7['registerAnnotation'](_0x1f71ff);},{'priority':'low'}):_0x222aac['fetchCommentThread']({'channelId':_0x3d2fae,'threadId':_0x378509})['then'](_0x448bcf=>{if('destroyed'!==_0x42fa07['state']){if(_0x20bf03=_0x448bcf,_0x20bf03&&!_0x20bf03['isAttached']){const _0x8619cf=_0x20bf03['attachTo'](()=>this['_getTargetForId'](_0x378509));_0x5c50d7['registerAnnotation'](_0x8619cf),_0x20bf03['isResolved']&&this['_reconvertMarkers'](_0x378509);}else{if(!_0x20bf03){const _0x56bf38=this['getAllMarkersForId'](_0x378509);_0x42fa07['model']['change'](_0x25f287=>{for(const _0x1854c2 of _0x56bf38)_0x25f287['removeMarker'](_0x1854c2);});}}}}),_0x20bf03;}['_handleThreadMarker'](_0x34a339,_0x483097){const _0x21441d=this['_attachMarkerToThread'](_0x34a339,_0x483097);_0x21441d&&!_0x21441d['context']&&_0x21441d['setContext']({'type':'text','value':this['_getTextContext'](_0x483097)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5ccf23=this['editor'];rt(_0x5ccf23['model'],({left:_0x3e59d,entered:_0x3eaff8})=>{for(const _0x8b980b of _0x3e59d)if(mt(_0x8b980b)){_0x5ccf23['ui']['ariaLiveAnnouncer']['announce'](N(_0x5ccf23['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x524089 of _0x3eaff8)if(mt(_0x524089)){_0x5ccf23['ui']['ariaLiveAnnouncer']['announce'](N(_0x5ccf23['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x23d791)));break;}});}}function dt(_0xd99e6c,_0x2b328d){return _0x2b328d?_0xd99e6c+':'+_0x2b328d:_0xd99e6c;}function ht(_0x5834f0,_0x5a973b){const _0x43ea56=_0x5a973b['schema'],_0x434f15=_0x5a973b['createRange'](_0x5834f0['start']);for(const _0x20a6cf of _0x5834f0['getWalker']()){const {type:_0x4d65f9,item:_0x30ad36,nextPosition:_0x3a014f}=_0x20a6cf;if('text'===_0x4d65f9||_0x43ea56['isObject'](_0x30ad36)){const _0x46e69f=_0x5a973b['createPositionBefore'](_0x30ad36);_0x434f15['isCollapsed']&&(_0x434f15['start']=_0x46e69f),_0x434f15['end']=_0x3a014f;}}return _0x434f15;}function mt(_0x4d32dd){return'comment'===ft(_0x4d32dd['name'])['group'];}class s extends _0xa4777{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x26d304=this['editor'],_0x52cfe4=_0x26d304['plugins']['get'](o),_0x409524=_0x26d304['plugins']['get'](r),_0x52b1cd=_0x26d304['plugins']['get'](y),_0xb3f002=_0x26d304['plugins']['get'](b);_0x26d304['ui']['componentFactory']['add']('comment',()=>{const _0x3cef17=this['_createUIButton'](_0x4373f8);return _0x3cef17['tooltip']=!0x0,_0x3cef17;}),_0x26d304['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1f2dd5)),_0xb3f002['addSourceCollector'](()=>{const _0x23bdc6=[];for(const [_0xf5d99,_0x5456f4]of _0x52cfe4['_threadToController']){const _0x27a25a=_0x409524['getAllMarkersForId'](_0xf5d99['id']),_0x12728e=_0x27a25a['map'](_0x408844=>_0x408844['getRange']());_0x27a25a['length']>0x0&&_0x23bdc6['push']([_0x5456f4['view'],_0x12728e]);}return _0x23bdc6;}),this['listenTo'](_0x52b1cd,'change:activeAnnotations',(_0x4113f8,_0x35df68,_0x27d98f)=>{const _0x39ffcb=Array['from'](_0x27d98f)['map'](_0xe196d4=>_0xe196d4['innerView'])['find'](_0x595493=>_0x52cfe4['_viewToController']['has'](_0x595493));if(!_0x39ffcb)return void(_0x409524['activeMarker']=null);const _0x1145ca=_0x52cfe4['_viewToController']['get'](_0x39ffcb)['model']['id'],_0x1de347='comment:'+_0x1145ca;_0x1145ca&&_0x409524['hasMarkerForId'](_0x1145ca)?_0x409524['activeMarker']=_0x1de347:_0x409524['activeMarker']&&(_0x409524['activeMarker']=null);}),this['listenTo'](_0x52cfe4,'removeCommentThread',(_0x3c707b,{threadId:_0x4d7902,isFromAdapter:_0x5e8787})=>{!_0x5e8787&&_0x26d304['ui']['focusTracker']['isFocused']&&_0x409524['hasMarkerForId'](_0x4d7902)&&_0x26d304['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x52cfe4,'addComment',(_0x38b6cb,{threadId:_0x1f7443,isFromAdapter:_0x24b298})=>{if(_0x24b298||!_0x409524['hasMarkerForId'](_0x1f7443)||!_0x52cfe4['hasCommentThread'](_0x1f7443))return;0x1===_0x52cfe4['getCommentThread'](_0x1f7443)['length']&&(_0x26d304['editing']['view']['focus'](),_0x38b6cb['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x359369=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3b5595;for(const _0x5474e6 in _0x359369){const _0x247736=_0x5474e6,_0x5a717c=_0x359369[_0x247736];if('commentsLicenseKeyValid'==_0x5a717c||'commentsLicenseKeyInvalid'==_0x5a717c||'commentsLicenseKeyExpired'==_0x5a717c||'commentsLicenseKeyDomainLimit'==_0x5a717c||'commentsLicenseKeyNotAllowed'==_0x5a717c||'commentsLicenseKeyEvaluationLimit'==_0x5a717c||'commentsLicenseKeyTrialLimit'==_0x5a717c||'commentsLicenseKeyUsageLimit'==_0x5a717c){delete _0x359369[_0x247736],_0x3b5595=_0x5a717c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3b5595&&_0x359369['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3b5595&&_0x359369['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3b5595&&_0x359369['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3b5595&&_0x359369['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3b5595&&_0x359369['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x3b5595&&_0x359369['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x3b5595&&_0x359369['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x35a998){const _0x1b3285=this['editor'],_0x5c05d7=new _0x35a998(_0x1b3285['locale']),_0x4d1e39=_0x1b3285['commands']['get']('addCommentThread');return _0x5c05d7['set']({'label':N(_0x1b3285['locale'],'Comment'),'icon':_0x4b2964}),_0x5c05d7['bind']('isEnabled')['to'](_0x4d1e39,'hasContent'),this['listenTo'](_0x5c05d7,'execute',()=>{_0x4d1e39['execute']();}),_0x5c05d7;}}class i extends _0xa4777{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5934b2){super(_0x5934b2),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5a5aa9,_0x378b3b,_0x1362c2)=>{_0x1362c2?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x282d93,_0x3f11c5]of this['editor']['commands'])_0x3f11c5['affectsData']&&'addCommentThread'!==_0x282d93&&_0x3f11c5['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x2ac87f=this['editor']['editing']['view']['document'];this['listenTo'](_0x2ac87f,'cut',_0x13971d=>_0x13971d['stop'](),{'priority':'highest'}),this['listenTo'](_0x2ac87f,'clipboardInput',_0x28f3b6=>_0x28f3b6['stop'](),{'priority':'highest'}),this['listenTo'](_0x2ac87f,'delete',_0x1b9bee=>_0x1b9bee['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x37b6ac,_0x358905]of this['editor']['commands'])_0x358905['affectsData']&&'addCommentThread'!==_0x37b6ac&&_0x358905['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x14070b{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8f6bb8){super(_0x8f6bb8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1d33b1=this['context']['plugins']['get'](y);this['listenTo'](_0x1d33b1,'_activateAnnotation',(_0x27aaf9,_0x34f0f9)=>{for(const _0x224b90 of this['activeUIs']){const _0x34aede=this['_uis']['get'](_0x224b90);(0x0,this['uisData']['get'](_0x224b90)['filter'])(_0x34f0f9)&&_0x34aede['setActiveAnnotation'](_0x34f0f9);}}),this['listenTo'](_0x1d33b1,'_deactivateAllAnnotations',()=>{for(const _0x15138f of this['activeUIs']){this['_uis']['get'](_0x15138f)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1d33b1['_visibleAnnotations'],'add',(_0x117aa7,_0x193a9b)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x193a9b);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2c8cff){return this['activeUIs']['has'](_0x2c8cff);}['activate'](_0x3f2d6e,_0x22c3b3=this['defaultFilter']){const _0x359bba=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3f2d6e))throw new _0x4842d8('annotationsuis-missing-ui',this,{'uiName':_0x3f2d6e});this['isActive'](_0x3f2d6e)&&this['deactivate'](_0x3f2d6e),this['activeUIs']['add'](_0x3f2d6e);const _0xc0b7e4=new S();v({'source':_0x359bba['_visibleAnnotations'],'target':_0xc0b7e4,'filter':_0x22c3b3}),this['uisData']['set'](_0x3f2d6e,{'collection':_0xc0b7e4,'filter':_0x22c3b3});const _0x1d0183=this['_uis']['get'](_0x3f2d6e);_0x1d0183['attach'](_0xc0b7e4),this['listenTo'](_0x1d0183,'change:activeAnnotation',(_0x34c0b9,_0x3d19b4,_0x4271d8,_0x504f4b)=>{_0x504f4b&&_0x359bba['_removeActiveAnnotation'](_0x504f4b),_0x4271d8&&_0x359bba['_addActiveAnnotation'](_0x4271d8);});}['deactivate'](_0x4fab81){if(this['activeUIs']['delete'](_0x4fab81),!this['_uis']['has'](_0x4fab81))throw new _0x4842d8('annotationsuis-missing-ui',this,{'uiName':_0x4fab81});const _0x3c79d5=this['_uis']['get'](_0x4fab81);_0x3c79d5['detach'](),this['stopListening'](_0x3c79d5),this['uisData']['get'](_0x4fab81)['collection']['destroy'](),this['uisData']['delete'](_0x4fab81);}['switchTo'](_0x16ffea){if(!this['_uis']['has'](_0x16ffea))throw new _0x4842d8('annotationsuis-missing-ui',this,{'uiName':_0x16ffea});const _0x302961=this['context']['plugins']['get'](y),_0x4b81d5=Array['from'](_0x302961['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x16ffea);const _0x5a2276=this['_uis']['get'](_0x16ffea);_0x5a2276['setActiveAnnotation'](_0x4b81d5),_0x5a2276['_setSelectedAnnotations']&&_0x4b81d5&&_0x5a2276['_setSelectedAnnotations']([_0x4b81d5]);}['deactivateAll'](){for(const _0x325b04 of this['activeUIs'])this['deactivate'](_0x325b04);}['register'](_0x1306ac,_0x41d8f6){if(this['_uis']['has'](_0x1306ac))throw new _0x4842d8('annotationsuis-register-already-registered');if('function'!=typeof _0x41d8f6['attach']||'function'!=typeof _0x41d8f6['detach']||'function'!=typeof _0x41d8f6['setActiveAnnotation'])throw new _0x4842d8('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1306ac,_0x41d8f6);}['refilterAnnotations'](){const _0x24021b=this['context']['plugins']['get'](y)['collection'],_0x365cb5=new Map(),_0x3e26ca=Array['from'](this['activeUIs']);for(const _0x297bcd of this['activeUIs']){const _0xb5ce86=this['uisData']['get'](_0x297bcd)['collection'];for(const _0x1eae47 of _0xb5ce86)_0x365cb5['set'](_0x1eae47,_0x297bcd);}for(const _0xd48cd1 of _0x24021b){const _0x1d7fb0=_0x365cb5['get'](_0xd48cd1);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd48cd1);const _0x282298=_0x3e26ca['find'](_0x560f02=>this['uisData']['get'](_0x560f02)['filter'](_0xd48cd1));_0x1d7fb0!==_0x282298&&(_0x1d7fb0&&this['uisData']['get'](_0x1d7fb0)['collection']['remove'](_0xd48cd1),_0x282298&&this['uisData']['get'](_0x282298)['collection']['add'](_0xd48cd1));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3631eb){const _0x571f56=[];for(const _0x4a224c of this['activeUIs']){(0x0,this['uisData']['get'](_0x4a224c)['filter'])(_0x3631eb)&&_0x571f56['push'](_0x4a224c);}if(_0x571f56['length']>0x1)throw new _0x4842d8('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x571f56,'annotationType':_0x3631eb['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4f093e){super(_0x4f093e);const _0xee69ff=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 _0x30744a(),this['focusCycler']=new _0x17fb5d({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0xee69ff['to']('class')],'style':{'minHeight':_0xee69ff['to']('minHeight',_0x28275f=>'number'==typeof _0x28275f?_i(_0x28275f+0xa):null)},'dir':_0x4f093e['uiLanguageDirection'],'role':'application','aria-label':N(_0x4f093e,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x4f093e,'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',_0x2a9c82=>{this['_updateItemPositionInFocusables'](_0x2a9c82['source']);}),this['list']['forEach'](_0x5e0e55=>{this['focusTracker']['add'](_0x5e0e55['element']),this['_updateItemPositionInFocusables'](_0x5e0e55);}),this['list']['on']('change',(_0x2a2149,_0x325a34)=>{for(const _0x58f8c8 of _0x325a34['removed'])this['focusTracker']['remove'](_0x58f8c8['element']),this['focusables']['remove'](_0x58f8c8);for(const _0x29cf7b of _0x325a34['added'])this['focusTracker']['add'](_0x29cf7b['element']),this['_updateItemPositionInFocusables'](_0x29cf7b);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x20b31f){const _0x1f8855=this['focusables']['getIndex'](_0x20b31f);let _0x1dd501,_0x1ec164;for(const _0x1953d8 of this['focusables'])if(_0x20b31f['top']<_0x1953d8['top']){_0x1dd501=_0x1953d8;break;}if(_0x1ec164=_0x1dd501?this['focusables']['getIndex'](_0x1dd501):this['focusables']['length'],-0x1!==_0x1f8855){if(_0x1f8855===_0x1ec164-0x1)return;this['focusables']['remove'](_0x20b31f),_0x1ec164=_0x1dd501?this['focusables']['getIndex'](_0x1dd501):this['focusables']['length'];}this['focusables']['add'](_0x20b31f,_0x1ec164);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x151a54){super(_0x151a54),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x45de41,_0x4bb408)=>_0x45de41+_0x4bb408),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x276416=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x276416['to']('isAnimationDisabled',_0x4541e3=>_0x4541e3?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x276416['to']('top',_0x143217=>Ot(_0x143217))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x499d6b=this['element']['clientHeight'];_0x499d6b&&(this['height']=_0x499d6b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x14070b{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44e7e6){super(_0x44e7e6),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x274209=this['context']['config']['get']('sidebar.container');_0x274209&&this['setContainer'](_0x274209);}['setContainer'](_0x5e3333){if(!g(_0x5e3333))throw new _0x4842d8('sidebar-setcontainer-invalid-element');this['container']=_0x5e3333;}['_attachToContainer']({viewClass:_0x1bcacd='',spaceBetweenItems:_0x38fbbb=0x19}={}){if(!g(this['container']))throw new _0x4842d8('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1bcacd,this['_spaceBetweenItems']=_0x38fbbb;}['rearrange']({removedAnnotation:_0x1503c3,previousAnnotation:_0x4a767d,nextAnnotation:_0x32991d}){const _0xd6233f=this['getSidebarItemView'](_0x1503c3);this['view']['list']['remove'](_0xd6233f),this['_destroySidebarItemView'](_0x1503c3),_0x4a767d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4a767d)),_0x32991d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x32991d)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3ebb25,activatedAnnotation:_0x1ee076,disableAnimationOnActivatedAnnotation:_0xc3767c}){if(this['_activeAnnotation']=_0x1ee076,_0x3ebb25){_0x3ebb25['isActive']=!0x1;const _0x355111=this['getSidebarItemView'](_0x3ebb25);_0x355111&&_0xc3767c&&(_0x355111['isAnimationDisabled']=!0x1);}if(_0x1ee076){const _0x162b19=this['getSidebarItemView'](_0x1ee076);_0x162b19&&(_0x1ee076['isActive']=!0x0,_0xc3767c&&(_0x162b19['isAnimationDisabled']=!0x0,_0x162b19['top']+=0x1),this['_alignToTargetRect'](_0x162b19));}}['_detachFromContainer'](_0x5e38ef){if(this['view']['element']['remove'](),_0x5e38ef){for(const _0x42db2f of _0x5e38ef)this['_destroySidebarItemView'](_0x42db2f);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2600d1,_0x53c33a){_0x53c33a||(_0x53c33a=_0x2600d1['view']);const _0x1b30ff=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1b30ff,_0x2600d1),this['_annotationToSidebarItemView']['set'](_0x2600d1,_0x1b30ff),_0x1b30ff['content']['add'](_0x53c33a),this['listenTo'](_0x2600d1['view'],'change:targetRect',(_0x581066,_0x3a28a2,_0x932867)=>{const _0x2b70f5=this['_getTargetTop'](_0x2600d1,_0x932867);_0x1b30ff['_targetTop']!=_0x2b70f5&&(_0x1b30ff['_targetTop']=_0x2b70f5,this['_setItemTop'](_0x1b30ff,_0x2b70f5));}),this['listenTo'](_0x1b30ff,'change:top',()=>{this['_recalculate'](_0x1b30ff,'top');}),this['listenTo'](_0x1b30ff,'change:bottom',()=>{this['_recalculate'](_0x1b30ff,'bottom');}),this['_alignToTargetRect'](_0x1b30ff);const _0x280a7c=this['_getItemBefore'](_0x1b30ff);if(_0x280a7c)this['_alignAfterItem'](_0x280a7c,_0x1b30ff)||this['_alignToTargetRect'](_0x1b30ff);else this['_alignToTargetRect'](_0x1b30ff);return this['_updateLastItem'](),this['view']['list']['add'](_0x1b30ff),_0x1b30ff;}['_alignForTopChange'](_0x4f94ea){if(!_0x4f94ea['content']['length'])return;const _0x818669=this['_getItemBefore'](_0x4f94ea);if(!_0x818669)return;const _0x318f40=this['_sidebarItemViewToAnnotation']['get'](_0x818669),_0x4acd35=this['_activeAnnotation'];_0x4acd35&&_0x4acd35===_0x318f40?this['_alignAfterItem'](_0x818669,_0x4f94ea):this['_alignBeforeItem'](_0x4f94ea,_0x818669);}['_alignForBottomChange'](_0x54870b){if(!_0x54870b['content']['length'])return;const _0x2c6602=this['_getItemAfter'](_0x54870b);if(!_0x2c6602)return;const _0x670d66=this['_sidebarItemViewToAnnotation']['get'](_0x2c6602),_0x42b937=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x66cba9=this['_activeAnnotation'];_0x66cba9&&_0x66cba9===_0x670d66&&_0x42b937?(this['_alignBeforeItem'](_0x2c6602,_0x54870b),this['_alignAfterItem'](_0x54870b,_0x2c6602)):_0x66cba9&&_0x66cba9===_0x670d66?this['_alignBeforeItem'](_0x2c6602,_0x54870b):this['_alignAfterItem'](_0x54870b,_0x2c6602);}['_recalculate'](_0x22ec02,_0x20c77b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x128066,changedProp:_0x86e330}of this['_recalculateBuffer'])'top'===_0x86e330?this['_alignForTopChange'](_0x128066):this['_alignForBottomChange'](_0x128066);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x22ec02,'changedProp':_0x20c77b});}['getSidebarItemView'](_0x4331d3){return this['_annotationToSidebarItemView']['get'](_0x4331d3);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x56efe9){const _0x5a3fd8=this['getSidebarItemView'](_0x56efe9);this['stopListening'](_0x5a3fd8),this['stopListening'](_0x56efe9['view']),_0x5a3fd8['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x56efe9),this['_sidebarItemViewToAnnotation']['delete'](_0x5a3fd8);}['_createSidebarView'](){const _0x559b16=new H(this['context']['locale']);return _0x559b16['render'](),this['on']('change:_lastItem',(_0x29c564,_0x4cc56a,_0x887e77,_0x5d4561)=>{_0x5d4561&&_0x559b16['unbind']('minHeight'),_0x887e77?_0x559b16['bind']('minHeight')['to'](_0x887e77,'bottom'):_0x559b16['minHeight']=null;}),_0x559b16;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x134ce5){const _0x59aac3=this['_sidebarItemViewToAnnotation']['get'](_0x134ce5),_0x315e5c=_0x59aac3&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x59aac3)-0x1);return _0x315e5c&&this['getSidebarItemView'](_0x315e5c)||null;}['_getItemAfter'](_0x264456){const _0x4879ed=this['_sidebarItemViewToAnnotation']['get'](_0x264456),_0x439186=_0x4879ed&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4879ed)+0x1);return _0x439186&&this['getSidebarItemView'](_0x439186)||null;}['_alignBeforeItem'](_0x1536ee,_0x178b97){_0x1536ee['updateHeight']();const _0x375697=G(_0x178b97['bottom']+this['_spaceBetweenItems'],_0x1536ee['top']);return!!_0x375697&&(this['_setItemTop'](_0x178b97,_0x178b97['top']-_0x375697),!0x0);}['_alignAfterItem'](_0x89ca6e,_0x15a478){_0x89ca6e['updateHeight']();const _0x261145=G(_0x89ca6e['bottom']+this['_spaceBetweenItems'],_0x15a478['top']);return!!_0x261145&&(this['_setItemTop'](_0x15a478,_0x15a478['top']+_0x261145,!0x1),!0x0);}['_alignToTargetRect'](_0x47cc6f){const _0x1a0857=this['_sidebarItemViewToAnnotation']['get'](_0x47cc6f);if(!_0x1a0857||!_0x1a0857['target']||!_0x1a0857['targetRect'])return;const _0x9d405=this['_getTargetTop'](_0x1a0857,_0x1a0857['targetRect']);this['_setItemTop'](_0x47cc6f,_0x9d405);}['_getTargetTop'](_0x4dd74d,_0x5a7926){if(null===_0x5a7926)return 0x0;if(_0x4dd74d['target']instanceof _0x1bd7c4)return _0x5a7926['top'];{const _0x44000f=new _0x1bd7c4(this['view']['element'])['top'];return _0x5a7926['top']-_0x44000f;}}['_setItemTop'](_0x2f60fe,_0x325c09,_0x490ea5=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x490ea5&&(_0x325c09=Math['max'](_0x325c09,this['_getMaxAvailableTop'](_0x2f60fe))),_0x2f60fe['top']=_0x325c09;}['_getMaxAvailableTop'](_0x44ae31){let _0x47fbd4=this['_getItemBefore'](_0x44ae31),_0x2067e2=0x0;for(;_0x47fbd4;)_0x47fbd4['updateHeight'](),_0x2067e2+=this['_spaceBetweenItems']+_0x47fbd4['height'],_0x47fbd4=this['_getItemBefore'](_0x47fbd4);return _0x2067e2;}}function G(_0x30c833,_0x5d35fa){return Math['max'](_0x30c833-_0x5d35fa,0x0);}function g(_0x505a5c){return null!==_0x505a5c&&'object'==typeof _0x505a5c&&0x1===_0x505a5c['nodeType'];}class e extends _0x14070b{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10a372){super(_0x10a372),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4f0cac(),this['_refreshPositioningDebounced']=_0x5adaa1(()=>{_0x10a372['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5e2abe=this['context']['plugins']['get'](j),_0x5e522f=this['context']['plugins']['get'](z);_0x5e2abe['register']('wideSidebar',this),_0x5e522f['container']&&_0x5e2abe['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5f4db6){if(_0x5f4db6===this['activeAnnotation'])return;const _0xb010a8=this['context']['plugins']['get'](z);_0xb010a8['_activeAnnotation']=_0x5f4db6;const _0x215f31=this['activeAnnotation'];_0xb010a8['refresh']({'blurredAnnotation':_0x215f31,'activatedAnnotation':_0x5f4db6}),this['activeAnnotation']=_0x5f4db6;}['attach'](_0x4e732a){this['annotations']=_0x4e732a;const _0x4c2751=this['context']['plugins']['get'](z);if(_0x4c2751['_annotations']=_0x4e732a,this['isAttached'])throw new _0x4842d8('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4c2751,'set:container',()=>{this['detach'](),this['listenTo'](_0x4c2751,'change:container',_0x4c1e4f=>{_0x4c1e4f['off'](),this['attach'](_0x4e732a);});}),_0x4c2751['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4f184e=_0x339f4b=>{_0x339f4b['updateTargetRect'](),_0x4c2751['addAnnotation'](_0x339f4b);};for(const _0x49ca68 of _0x4e732a)_0x4f184e(_0x49ca68);this['listenTo'](_0x4e732a,'add',(_0x550af0,_0x514af8)=>{_0x4f184e(_0x514af8);}),this['listenTo'](_0x4e732a,'remove',(_0x83e45,_0x4ab8dc,_0xdaa48e)=>{_0x4c2751['rearrange']({'removedAnnotation':_0x4ab8dc,'previousAnnotation':_0x4e732a['get'](_0xdaa48e-0x1),'nextAnnotation':_0x4e732a['get'](_0xdaa48e+0x1)}),_0x4ab8dc===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4e732a,'focus',(_0x490060,_0x250767)=>{this['setActiveAnnotation'](_0x250767);}),this['listenTo'](_0x4e732a,'blur',()=>{this['setActiveAnnotation'](null);});const _0x29423f=this['context']instanceof _0x50bbf8?this['context']['editors']:new _0x4f0cac([this['context']]);for(const _0x17739c of _0x29423f)this['_integrateWithEditorAnnotations'](_0x17739c);this['listenTo'](_0x29423f,'add',(_0x8dc5d8,_0x418849)=>{this['listenTo'](_0x418849,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x418849);});}),this['listenTo'](_0x29423f,'remove',(_0x3348dc,_0x1bb691)=>{_0x1bb691['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1bb691['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4842d8('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3d1436=this['context']['plugins']['get'](z);_0x3d1436['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3d1436),this['stopListening'](this['annotations']),this['context']instanceof _0x50bbf8&&this['stopListening'](this['context']['editors']);for(const _0x1a0622 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1a0622);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x405e32){if(!_0x405e32['plugins']['has']('EditorAnnotations'))return;const _0x170494=_0x405e32['plugins']['get']('EditorAnnotations'),_0x4df108=()=>{const _0x3eb624=_0x170494['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3eb624[0x0]||null);};this['listenTo'](_0x170494,'refresh',_0x4df108),this['listenTo'](_0x170494,'blur',(_0x357a93,{isAnnotationTracked:_0x2ca721})=>{this['activeAnnotation']&&_0x2ca721(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x170494,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x830818=>{_0x170494['hasDomSelection']()&&(_0x4df108(),_0x830818['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x170494);}['_destroyEditorAnnotationsIntegration'](_0x4a5b95){this['stopListening'](_0x4a5b95),this['_editorAnnotations']['remove'](_0x4a5b95);}}class C extends _0x4373f8{['counterView'];constructor(_0x39f99d){super(_0x39f99d);const _0x21c905=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x409281,_0x150241)=>_0x409281?'...':_0x150241['toString']()),this['set']('annotationType',''),this['icon']=_0x4b2964,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x21c905['to']('annotationType',_0x366d53=>'ck-annotation-counter__badge--'+_0x366d53),_0x21c905['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x21c905['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x14070b{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56d97b){super(_0x56d97b),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x5ce20f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4f0cac(),this['_refreshPositioningDebounced']=_0x5adaa1(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4c3bdf(this['context']['locale']),this['balloonPanelView']=new _0x21e091(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3510a6){this['annotations']=_0x3510a6;const _0x1bb492=this['context']['plugins']['get'](z),_0x11f025=this['balloonPanelView'];if(_0x1bb492['_annotations']=_0x3510a6,this['isAttached'])throw new _0x4842d8('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1bb492,'set:container',()=>{this['detach'](),this['listenTo'](_0x1bb492,'change:container',_0x1a5a64=>{_0x1a5a64['off'](),this['attach'](_0x3510a6);});}),_0x1bb492['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2a5f00=_0x360170=>{const _0x41fe60=new C(this['context']['locale']);_0x1bb492['addAnnotation'](_0x360170,_0x41fe60),this['_annotationToNarrowView']['set'](_0x360170,_0x41fe60),_0x41fe60['bind']('isDirty','annotationType','number')['to'](_0x360170['view'],'isDirty','type','length'),_0x41fe60['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x11f025['content']['first']!==_0x360170['view']?(this['_showBalloon'](_0x360170),_0x360170['view']['element']['focus'](),this['setActiveAnnotation'](_0x360170)):this['setActiveAnnotation'](null);});};for(const _0xce8fa of _0x3510a6)_0x2a5f00(_0xce8fa);this['listenTo'](_0x3510a6,'add',(_0x387987,_0x4b8260)=>{_0x2a5f00(_0x4b8260);}),this['listenTo'](_0x3510a6,'remove',(_0x342bb3,_0x56e443,_0x4fb5c1)=>{this['_annotationToNarrowView']['get'](_0x56e443)['destroy'](),this['_annotationToNarrowView']['delete'](_0x56e443),_0x1bb492['rearrange']({'removedAnnotation':_0x56e443,'previousAnnotation':_0x3510a6['get'](_0x4fb5c1-0x1),'nextAnnotation':_0x3510a6['get'](_0x4fb5c1+0x1)}),_0x56e443===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3510a6,'focus',(_0x1f0608,_0x528d52)=>{this['setActiveAnnotation'](_0x528d52);}),this['listenTo'](_0x3510a6,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3fe333,_0x59d915)=>{_0x59d915['keyCode']===_0x243f97['esc']&&_0x11f025['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x11f025['content']['first']),this['_hideBalloon'](),_0x59d915['stopPropagation'](),_0x59d915['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x52a986,_0x54de5c)=>{const _0x4af3e3=_0x54de5c['target'];_0x11f025['isVisible']&&_0x11f025['element']['contains'](_0x4af3e3)||_0x1bb492['view']['element']['contains'](_0x4af3e3)||_0x52a986['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x31874b=>_0x31874b['contains'](_0x4af3e3))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5043a5=this['context']instanceof _0x50bbf8?this['context']['editors']:new _0x4f0cac([this['context']]);for(const _0x5026c1 of _0x5043a5)this['_integrateWithEditorAnnotations'](_0x5026c1);this['listenTo'](_0x5043a5,'add',(_0x4a8ea6,_0x6954b7)=>{this['listenTo'](_0x6954b7,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x6954b7);});}),this['listenTo'](_0x5043a5,'remove',(_0x47d1c5,_0x335a60)=>{_0x335a60['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x335a60['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0xb63ead){if(_0xb63ead===this['activeAnnotation'])return;const _0x42659d=this['context']['plugins']['get'](z);if(_0x42659d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0xb63ead,'disableAnimationOnActivatedAnnotation':!0x0}),_0xb63ead)_0x42659d['getSidebarItemView'](_0xb63ead)?this['_showBalloon'](_0xb63ead):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0xb63ead;}['detach'](){if(!this['isAttached'])throw new _0x4842d8('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2073d2=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x16f90e=>_0x16f90e['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2073d2['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x50bbf8&&this['stopListening'](this['context']['editors']);for(const _0x25258a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x25258a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x1ff382){if(!_0x1ff382['plugins']['has']('EditorAnnotations'))return;const _0x36ff8f=_0x1ff382['plugins']['get']('EditorAnnotations'),_0x3f15a2=this['context']['plugins']['get'](z),_0x59e341=this['annotations'],_0x46d7ca=this['balloonPanelView'],_0x3f2998=()=>{const _0x2df12a=_0x36ff8f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2df12a),this['setActiveAnnotation'](_0x2df12a[0x0]||null);};this['listenTo'](_0x36ff8f,'refresh',_0x3f2998),this['listenTo'](_0x36ff8f,'blur',(_0x2d3e91,{isAnnotationTracked:_0x22c4b9})=>{this['activeAnnotation']&&_0x22c4b9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x36ff8f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x59e341,'blur',_0x1547b9=>{_0x36ff8f['hasDomSelection']()&&_0x1547b9['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x106fd7,_0xf611cd)=>{const _0x3fc9c1=_0xf611cd['target'];_0x46d7ca['isVisible']&&_0x46d7ca['element']['contains'](_0x3fc9c1)||_0x3f15a2['view']['element']['contains'](_0x3fc9c1)||this['activeAnnotation']&&_0x36ff8f['hasDomSelection']()&&(_0x3f2998(),_0x106fd7['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x36ff8f);}['_destroyEditorAnnotationsIntegration'](_0x1578c0){_0x1578c0&&(this['stopListening'](_0x1578c0),this['_editorAnnotations']['remove'](_0x1578c0));}['_setSelectedAnnotations'](_0x5aa796){for(const _0x2ddeab of this['_selectedAnnotations'])_0x5aa796['includes'](_0x2ddeab)||this['_manuallyClosedAnnotationViews']['delete'](_0x2ddeab['view']);this['_selectedAnnotations']=_0x5aa796;}['_refreshPositioning'](){const _0x1a3ef7=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x1a3ef7['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x5b06df){if(this['_manuallyClosedAnnotationViews']['has'](_0x5b06df['view']))return;const _0x387bab=this['balloonPanelView']['content']['first'];_0x387bab!==_0x5b06df['view']?(_0x387bab&&this['_detachListeners'](_0x387bab),this['_attachListeners'](_0x5b06df['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x5b06df['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x10e08a=this['balloonPanelView']['content']['first'],_0x2c532a=_0x10e08a&&this['annotations']['getByView'](_0x10e08a);if(!_0x2c532a||!this['_annotationToNarrowView']['has'](_0x2c532a))return;const _0x59039a=this['_annotationToNarrowView']['get'](_0x2c532a)['element'],_0x5aba8a=(function(){const _0x4ee937=_0x21e091['defaultPositions'];return[_0x4ee937['southArrowNorthEast'],_0x4ee937['northArrowSouthEast'],_0x4ee937['southArrowNorth'],_0x4ee937['northArrowSouth'],_0x4ee937['southArrowNorthWest'],_0x4ee937['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x59039a,'positions':_0x5aba8a});}['_hideBalloon'](){const _0x40db31=this['balloonPanelView'],_0x494ec5=_0x40db31['content']['first'];_0x494ec5&&(this['_detachListeners'](_0x494ec5),_0x40db31['unpin'](),_0x40db31['content']['clear']());}['_attachListeners'](_0x6b6c11){this['listenTo'](_0x6b6c11,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x6b6c11,'Esc',(_0x3b8170,_0x5fe2ed)=>{this['_manuallyClosedAnnotationViews']['add'](_0x6b6c11),this['_hideBalloon'](),_0x5fe2ed();});}['_detachListeners'](_0x5cd57a){this['stopListening'](_0x5cd57a);}}class c extends _0xa4777{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x2817a0,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29596e){super(_0x29596e),_0x29596e['editing']['view']['addObserver'](_0x3d5143),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x29596e['plugins']['get'](_0x2817a0),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x30bad=this['editor']['plugins']['get'](j);_0x30bad['context']===this['editor']&&(_0x30bad['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x31b132,_0x50b6ac)=>{const _0x2e0f19=this['_balloon'];if(this['isAttached']&&_0x2e0f19['visibleView']){const _0x1a2067=this['annotations']['getByView'](_0x2e0f19['visibleView']);_0x1a2067&&this['_closeAnnotation'](_0x1a2067),_0x50b6ac();}}));}['afterInit'](){const _0x1e02fd=this['editor']['plugins']['get'](j);_0x1e02fd['context']===this['editor']&&(_0x1e02fd['hasActive']()||_0x1e02fd['switchTo']('inline'));}['setActiveAnnotation'](_0x140ab5){_0x140ab5!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x140ab5&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x140ab5)&&this['_addAnnotationToBalloon'](_0x140ab5,!0x0),_0x140ab5['isActive']=!0x0),_0x140ab5||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x140ab5);}['attach'](_0x510c95){this['annotations']=_0x510c95;const _0x122d77=this['editor']['plugins']['get'](j),_0x167364=this['_balloon'];if(this['isAttached'])throw new _0x4842d8('inlineannotations-attach-already-attached',this);if(_0x122d77['context']!==this['editor'])throw new _0x4842d8('inlineannotations-not-allowed-with-context',this);const _0x4cef61=this['editor']['plugins']['get'](b);this['listenTo'](_0x4cef61,'refresh',()=>{const _0x130f37=_0x4cef61['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2ea77a,_0x5d4dca;!this['_forceRefresh']&&(_0x2ea77a=_0x130f37,_0x5d4dca=this['_selectedAnnotations'],_0x2ea77a['length']===_0x5d4dca['length']&&_0x2ea77a['every'](_0x4ca2a4=>_0x5d4dca['includes'](_0x4ca2a4)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x130f37),this['setActiveAnnotation'](_0x130f37[0x0]||null));}),this['listenTo'](_0x4cef61,'blur',(_0x369cfd,{isAnnotationTracked:_0x33ce91})=>{this['activeAnnotation']&&_0x33ce91(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x22571e,_0x5b896b,_0x492b7b)=>{_0x492b7b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x510c95,'remove',(_0x3b5525,_0x5b085c)=>{this['_removeAnnotationFromBalloon'](_0x5b085c),_0x5b085c===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x167364,'change:visibleView',(_0x47b96d,_0x320c87,_0x5d3f31,_0x507ca6)=>{_0x507ca6&&this['stopListening'](_0x507ca6);const _0x18b1e2=_0x510c95['getByView'](_0x5d3f31);_0x5d3f31&&_0x18b1e2&&(this['listenTo'](_0x5d3f31,'change:height',()=>{_0x167364['updatePosition']();}),this['listenTo'](_0x5d3f31,'Esc',()=>{this['_closeAnnotation'](_0x18b1e2),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x18b1e2&&this['setActiveAnnotation'](_0x18b1e2));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x167364['visibleView']&&(_0x510c95['getByView'](_0x167364['visibleView'])&&_0x167364['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x4842d8('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xb8aa50 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xb8aa50);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x35394a){for(const _0x1297e9 of this['_selectedAnnotations'])_0x35394a['includes'](_0x1297e9)||this['_manuallyClosed']['delete'](_0x1297e9);for(const _0x362b43 of this['annotations'])_0x35394a['includes'](_0x362b43)||this['_removeAnnotationFromBalloon'](_0x362b43);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x174833 of _0x35394a)this['_addAnnotationToBalloon'](_0x174833);}this['_selectedAnnotations']=_0x35394a;}['_addAnnotationToBalloon'](_0x37b694,_0x181a8f=!0x1){this['_manuallyClosed']['has'](_0x37b694)||(this['_addedAnnotations']['has'](_0x37b694)||this['_balloon']['hasView'](_0x37b694['view'])||(this['_addedAnnotations']['add'](_0x37b694),this['_balloon']['add']({'stackId':_0x37b694['view']['id'],'view':_0x37b694['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x37b694)}})),_0x181a8f&&this['_balloon']['showStack'](_0x37b694['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2f8b25){const _0x403a56=_0x2f8b25['target'],_0x4ba49a=this['editor']['editing']['view'],_0x251cd5=_0x4ba49a['document']['selection']['getFirstRange'](),_0x554c97=_0x4ba49a['domConverter']['viewRangeToDom'](_0x251cd5);if(_0x554c97['collapse'](!0x0),_0x403a56){if(_0x403a56 instanceof _0x1bd7c4)return _0x403a56;let _0x31c2d2=[];for(const _0x4d84cf of _0x403a56)_0x31c2d2['push'](...F(_0x4d84cf['getClientRects']()));_0x31c2d2=function(_0x4925cd){const _0x3eca2a=[];let _0x1550b2=_0x4925cd[0x0];for(let _0x12d199=0x1;_0x12d199<_0x4925cd['length'];_0x12d199++)P(_0x1550b2,_0x4925cd[_0x12d199])?_0x1550b2['width']+=_0x4925cd[_0x12d199]['width']:(_0x3eca2a['push'](_0x1550b2),_0x1550b2=_0x4925cd[_0x12d199]);return _0x3eca2a['push'](_0x1550b2),_0x3eca2a;}(_0x31c2d2);const _0x17f603=_0x554c97['getBoundingClientRect']();return _0x31c2d2['find'](_0x6efe6a=>_0x6efe6a['top']<=_0x17f603['top']&&_0x6efe6a['bottom']>=_0x17f603['bottom']&&_0x6efe6a['left']<=_0x17f603['left']&&_0x6efe6a['right']>=_0x17f603['right'])||_0x31c2d2[0x0];}return _0x2f8b25['targetRect']||_0x554c97;}['_removeAnnotationFromBalloon'](_0x344cfb){this['_addedAnnotations']['has'](_0x344cfb)&&this['_balloon']['hasView'](_0x344cfb['view'])&&(this['_addedAnnotations']['delete'](_0x344cfb),this['_balloon']['remove'](_0x344cfb['view']));}['_closeAnnotation'](_0x28e748){this['_manuallyClosed']['add'](_0x28e748),this['_removeAnnotationFromBalloon'](_0x28e748);}}function F(_0x252eae){return Array['from'](_0x252eae)['map'](DOMRect['fromRect']);}function P(_0x48e53d,_0x5818ae){return _0x48e53d['top']===_0x5818ae['top']&&_0x48e53d['bottom']===_0x5818ae['bottom']&&_0x48e53d['right']===_0x5818ae['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1c6137,_0x162726){super(_0x1c6137),this['set']('isEmpty',!_0x162726['length']),this['focusTracker']=new _0x30744a(),this['_annotationViews']=_0x162726,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x17fb5d({'focusables':_0x162726,'focusTracker':this['focusTracker']}),this['listenTo'](_0x162726,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x162726,'remove',(_0x403f16,_0x358001)=>{_0x358001['isActive']&&this['focus'](),_0x162726['length']||(this['isEmpty']=!0x0);});const _0x288ae5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1c6137,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x162726},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x288ae5['if']('isEmpty','ck-hidden',_0xfc39a8=>!_0xfc39a8)]},'children':[{'text':N(_0x1c6137,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x52d87e of this['_annotationViews'])this['focusTracker']['add'](_0x52d87e['element']);this['_annotationViews']['on']('change',(_0x2e7517,{added:_0x185d29,removed:_0x11b9d3})=>{for(const _0x49ac02 of _0x185d29)this['focusTracker']['add'](_0x49ac02['element']);for(const _0x4416e1 of _0x11b9d3)this['focusTracker']['remove'](_0x4416e1['element']);});}}class p extends _0x14070b{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x52acf7){super(_0x52acf7),this['archivedThreads']=new _0x4f0cac();}['init'](){const _0x5cc67d=this['context'],_0x550a71=_0x5cc67d['plugins']['get'](o),_0xb63b4=_0x5cc67d['plugins']['get'](y);this['listenTo'](_0x550a71,'addCommentThread',(_0x357806,{threadId:_0x256e1f})=>{const _0x4a9fa0=_0x550a71['getCommentThread'](_0x256e1f);_0x4a9fa0['archivedAt']&&this['archivedThreads']['add'](_0x4a9fa0,this['_calculatePosition'](_0x4a9fa0['archivedAt'])),this['listenTo'](_0x4a9fa0,'change:archivedAt',(_0x525c6b,_0x88a501,_0x440935)=>{_0x440935?this['archivedThreads']['has'](_0x4a9fa0)||this['archivedThreads']['add'](_0x4a9fa0,this['_calculatePosition'](_0x4a9fa0['archivedAt'])):this['archivedThreads']['has'](_0x4a9fa0)&&this['archivedThreads']['remove'](_0x4a9fa0);});}),this['listenTo'](_0x550a71,'removeCommentThread',(_0x128698,{threadId:_0x26c639})=>{const _0x1f5e74=_0x550a71['getCommentThread'](_0x26c639);this['stopListening'](_0x1f5e74),this['archivedThreads']['has'](_0x1f5e74)&&this['archivedThreads']['remove'](_0x1f5e74);},{'priority':'highest'}),this['listenTo'](_0xb63b4['collection'],'focus',(_0x2ddd54,_0x2234a5)=>{_0x2234a5['isVisible']||(_0x2234a5['isActive']=!0x0,_0xb63b4['activate'](_0x2234a5));});}['_calculatePosition'](_0x10335e){const _0x58b138=[...this['archivedThreads']]['findIndex'](_0x10ec21=>_0x10ec21['archivedAt']<_0x10335e);return _0x58b138>-0x1?_0x58b138:this['archivedThreads']['length'];}}class a extends _0xa4777{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x43ab14];}constructor(_0x376dd6){super(_0x376dd6),this['annotationViews']=new _0x2c7739(),this['_pendingThreads']=[];}['init'](){const _0xae32ae=this['editor'],_0xcb4f87=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xae32ae['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4373f8,!0x0)),_0xae32ae['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5d356b=this['_createCommentsArchiveButton'](_0x1f2dd5);return _0x5d356b['set']({'role':'menuitemcheckbox'}),_0x5d356b;});const _0x24c187=_0xae32ae['plugins']['get'](p),_0x4ea27c=_0xae32ae['plugins']['get']('Annotations'),_0x3b3253=_0xae32ae['plugins']['get']('CommentsRepository');_0x24c187['archivedThreads']['forEach'](_0x5e0ad3=>{this['_handleNewThread'](_0x5e0ad3);}),this['listenTo'](_0x24c187['archivedThreads'],'add',(_0x73ba3b,_0x442031)=>{this['_handleNewThread'](_0x442031);}),this['listenTo'](_0x4ea27c['collection'],'add',(_0x2e8053,_0x509ce)=>{const _0x2acabb=this['_pendingThreads']['find'](_0x13f5e2=>{const _0x653c0f=_0x3b3253['_threadToController']['get'](_0x13f5e2);return _0x653c0f&&_0x509ce['innerView']===_0x653c0f['view'];});if(_0x2acabb){const _0xdd41a2=this['_calculatePosition'](_0x2acabb['archivedAt']);this['annotationViews']['add'](_0x509ce['view'],_0xdd41a2),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2acabb),0x1);}}),this['listenTo'](_0x24c187['archivedThreads'],'remove',(_0x3907c8,_0x5a7f3d)=>{const _0x171da5=_0xae32ae['config']['get']('collaboration.channelId');if(!_0x171da5||_0x5a7f3d['channelId']===_0x171da5){if(this['_pendingThreads']['includes'](_0x5a7f3d))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5a7f3d),0x1);else{const _0x216c75=_0x3b3253['_threadToController']['get'](_0x5a7f3d),_0x33d3e1=_0x4ea27c['getByInnerView'](_0x216c75['view']);this['annotationViews']['remove'](_0x33d3e1['view']),this['stopListening'](_0x33d3e1['focusableElements']);}}}),this['listenTo'](_0x4ea27c['collection'],'add',(_0x489412,_0x94ea09)=>{this['listenTo'](_0x94ea09,'escape',_0xcb4f87);}),this['listenTo'](_0x4ea27c['collection'],'remove',(_0x43c5d1,_0x3a4464)=>{this['stopListening'](_0x3a4464,'escape',_0xcb4f87);});}['_handleNewThread'](_0x5ab33e){const _0x30d790=this['editor']['plugins']['get']('CommentsRepository'),_0x3a0844=this['editor']['plugins']['get']('Annotations'),_0x1c47f0=this['editor']['config']['get']('collaboration.channelId');if(!_0x1c47f0||_0x5ab33e['channelId']===_0x1c47f0){const _0x3dfa5b=_0x30d790['_threadToController']['get'](_0x5ab33e);if(!_0x3dfa5b)return void this['_pendingThreads']['push'](_0x5ab33e);const _0x2dcd96=this['_calculatePosition'](_0x5ab33e['archivedAt']),_0x264bc7=_0x3a0844['getByInnerView'](_0x3dfa5b['view']);_0x264bc7['isVisible']&&_0x3a0844['_visibleAnnotations']['remove'](_0x264bc7),this['annotationViews']['add'](_0x264bc7['view'],_0x2dcd96);}}['_calculatePosition'](_0x3efb2f){const _0xce9ca7=this['editor']['config']['get']('collaboration.channelId'),_0x37d683=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x4020d4=>_0x4020d4['channelId']===_0xce9ca7)['findIndex'](_0xf3cc30=>_0xf3cc30['archivedAt']<_0x3efb2f);return _0x37d683<0x0||_0x37d683>this['annotationViews']['length']?this['annotationViews']['length']:_0x37d683-0x1;}['_toggleDialog'](){const _0xe100a1=this['editor'],_0x4f5387=_0xe100a1['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0xe100a1['locale'],this['annotationViews'])),'commentsArchive'===_0x4f5387['id']?_0x4f5387['hide']():_0x4f5387['show']({'id':'commentsArchive','title':N(_0xe100a1['locale'],'COMMENTS_ARCHIVE'),'icon':_0x51da9,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x176cbd['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x17d2fa,_0x3e3b46=!0x1){const _0xdc37b5=this['editor']['locale'],_0x4d66a6=this['editor']['plugins']['get']('Dialog'),_0x49a4d3=new _0x17d2fa(_0xdc37b5);return _0x49a4d3['bind']('isEnabled')['to'](this,'isEnabled'),_0x49a4d3['bind']('isOn')['to'](_0x4d66a6,'id',_0x383afa=>'commentsArchive'===_0x383afa),_0x49a4d3['set']({'label':N(_0xdc37b5,'COMMENTS_ARCHIVE'),'icon':_0x51da9,'isToggleable':!0x0}),_0x3e3b46&&(_0x49a4d3['tooltip']=!0x0),this['listenTo'](_0x49a4d3,'execute',()=>this['_toggleDialog']()),_0x49a4d3;}['_hideDialogOnAnnotationEscape']=_0x281565=>{const _0x215a4e=_0x281565['source'];if(!this['annotationViews']['has'](_0x215a4e['view']))return;const _0x4f76f5=this['editor']['plugins']['get']('Dialog');_0x4f76f5['isOpen']&&'commentsArchive'===_0x4f76f5['id']&&(_0x4f76f5['hide'](),_0x281565['stop']());};}class gi extends _0xa4777{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|