@ckeditor/ckeditor5-comments 46.0.1-alpha.2 → 46.0.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_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 _0x27ecd2,ContextPlugin as _0x35edc8,PendingActions as lt,Command as _0x58a655,Plugin as _0x4f8b18,Context as _0x2dec0a}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3d6921,uid as _0xf51739,KeystrokeHandler as jt,FocusTracker as _0x336e57,diff as _0x2f1ce2,Collection as _0x1ed765,Rect as _0x29c0c7,CKEditorError as _0x59f856,first as _0x1a7d5e,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x428cc8,keyCodes as _0x457aae}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x38aed4,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x442e48,trimHtml as _0x350498,LateFocusDropdownButtonView as _0x5638f8,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0xecbc2a}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x489039}from'es-toolkit/compat';import{IconUndo as _0x1e6eac,IconCheck as _0x21f99b,IconPencil as _0x8301b6,IconRemoveComment as _0x1b2265,IconThreeVerticalDots as _0x4068bd,IconAddComment as _0x550872,IconCommentsArchive as _0x1bd544}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x2fdf0a,ButtonView as _0x75c5a1,ViewCollection as _0xb7b669,createDropdown as _0x5664c2,ListView as _0x263abd,focusChildOnDropdownOpen as _0xb0d285,ListItemView as _0x4c63c3,MenuBarMenuListItemButtonView as _0x5086db,BodyCollection as _0x276dde,BalloonPanelView as _0x375243,ContextualBalloon as _0x4ca3ae,Dialog as _0x16b75d,DialogViewPosition as _0x284766}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x1c3042}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x1434a2}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x326193}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3d6921(){['model'];['view'];constructor(_0xb09930,_0x25a2bb){super(),this['model']=_0xb09930,this['model']['_isAttached']=!0x0,this['view']=_0x25a2bb,this['listenTo'](_0x25a2bb,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x25a2bb,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x25a2bb,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x25a2bb,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x25a2bb,'addComment',(_0x39d500,_0xc9337d)=>this['addComment'](_0xc9337d)),this['listenTo'](_0x25a2bb,'updateComment',(_0x3a1005,_0x35bfdd,_0x5bfe22)=>this['updateComment'](_0x35bfdd,_0x5bfe22)),this['listenTo'](_0x25a2bb,'removeComment',(_0x1d45c4,_0xb4dfb3)=>this['removeComment'](_0xb4dfb3));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x739ca9){this['model']['addComment']({'content':_0x739ca9,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2b65a3,_0xa7eb8a){this['model']['getComment'](_0x2b65a3)['update']({'content':_0xa7eb8a});}['removeComment'](_0xffe473){this['model']['getComment'](_0xffe473)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0xc28efb,_0x589b1c,_0x261564){const t=_0xc28efb['t'];switch(_0x589b1c){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Reply\x20to\x20reopen\x20discussion...':return t('Reply\x20to\x20reopen\x20discussion...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20was\x20made\x20on\x20an\x20element':return t('Comment\x20was\x20made\x20on\x20an\x20element');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Marked\x20as\x20resolved':return t('Marked\x20as\x20resolved');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Resolve':return t('Resolve');case'Reopen':return t('Reopen');case'Remove':return t('Remove');case'Reply':return t('Reply');case'Save':return t('Save');case'Annotations\x20sidebar':return t('Annotations\x20sidebar');case'Annotations\x20list':return t('Annotations\x20list');case'Thread\x20comments':return t('Thread\x20comments');case'THREAD_CONTEXT_LABEL':return t({'string':'Thread\x20context:\x20%0','id':'THREAD_CONTEXT_LABEL'},_0x261564);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x261564);case'COMMENT_THREAD_DESCRIPTION':return t({'string':'Press\x20Enter\x20for\x20more\x20options.\x20Press\x20Escape\x20to\x20exit.','id':'COMMENT_THREAD_DESCRIPTION'});case'COMMENT_ARIA_LABEL':return t({'string':'Comment\x20by\x20%0.\x20Created\x20on\x20%1.\x20%2.\x20%3','id':'COMMENT_ARIA_LABEL'},_0x261564);case'LEAVE_COMMENT_ANNOUNCEMENT':return t({'string':'Leaving\x20a\x20content\x20with\x20comments.','id':'LEAVE_COMMENT_ANNOUNCEMENT'});case'ENTER_COMMENT_ANNOUNCEMENT':return t({'string':'Entering\x20a\x20content\x20with\x20comments.\x20Press\x20%0\x20to\x20go\x20to\x20the\x20discussion.','id':'ENTER_COMMENT_ANNOUNCEMENT'},_0x261564);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x261564);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0x261564);case'EXTERNAL_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20external\x20source.','id':'EXTERNAL_COMMENT'});case'EXTERNAL_IMPORT_WORD_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20imported\x20Word\x20file.','id':'EXTERNAL_IMPORT_WORD_COMMENT'});case'EXTERNAL_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20external\x20source\x20(added\x20by\x20%0)','id':'EXTERNAL_AVATAR'},_0x261564);case'EXTERNAL_IMPORT_WORD_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20a\x20Word\x20document\x20imported\x20by\x20%0','id':'EXTERNAL_IMPORT_WORD_AVATAR'},_0x261564);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x3680ca,_0x2496d5){super(_0x3680ca);const _0xe89a0f=_0xf51739();this['main']=this['createCollection'](),this['editable']=new $t(_0x3680ca,_0x2496d5,void 0x0,{'label':()=>N(_0x3680ca,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x3680ca['uiLanguageDirection'],'lang':_0x3680ca['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xe89a0f},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x41f09a){super(_0x41f09a),this['view']=new Vt(_0x41f09a['locale'],_0x41f09a['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x35adb4=this['editor']['editing']['view'],_0x440320=this['view']['editable'],_0x36cafe=_0x35adb4['document']['getRoot']();_0x440320['name']=_0x36cafe['rootName'],this['view']['render']();const _0x282f77=_0x440320['element'];this['setEditableElement'](_0x440320['name'],_0x282f77),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x35adb4['attachDomRoot'](_0x282f77),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3d6921(_0x27ecd2){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x1d29c2={}){function _0x1ccb21(_0x106e6a){return _0x106e6a['map'](_0x529015=>String['fromCharCode'](_0x529015))['join']('');}(_0x1d29c2=Object['assign']({},_0x1d29c2))['plugins']||(_0x1d29c2['plugins']=Rt['defaultPlugins']),super(_0x1d29c2),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x1ccb21([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1ccb21([0x76,0x69,0x65,0x77])][_0x1ccb21([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1ccb21([0x61,0x75,0x74,0x6f]),this[_0x1ccb21([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1ccb21([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1ccb21([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1ccb21([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1ccb21([0x6f,0x6b])});}['create'](){const _0x3405d2=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3405d2))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x7efe49=>{const _0x6fa86=this['model']['document']['getRoot'](),_0x1a86e5=_0x6fa86&&_0x6fa86['getChild'](_0x6fa86['childCount']-0x1);_0x7efe49['setSelection'](_0x1a86e5,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x294c13=this['editing']['view'],_0x549d01=_0x294c13['document']['getRoot'](),_0x5237f3=_0x549d01['getChild'](0x0);_0x549d01['childCount']>0x1||!_0x5237f3||'p'!=_0x5237f3['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x294c13,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5237f3['placeholder']=this['placeholder']),St({'view':_0x294c13,'element':_0x5237f3,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5237f3);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x24cb3d,_0x5583de={}){super(_0x24cb3d),this['editor']=null,this['_editorConfig']=_0x5583de,this['set']('value',_0x5583de['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x24cb3d,'Reply...')),this['set']('submitLabel',N(_0x24cb3d,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x336e57(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x59b64a,_0x588232)=>{this['cancelButtonView']['fire']('execute'),_0x588232();}),this['keystrokes']['set']('Ctrl+Enter',(_0x1947ae,_0x26f288)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x26f288());}),this['on']('submit',(_0x54f750,_0x5a337b)=>{_0x5a337b['length']>0xfde8?(alert(N(_0x24cb3d,'TOO_LONG_COMMENT_ALERT',[_0x5a337b['length'],0xfde8])),_0x54f750['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x36c7e8=this['editor'];this['element']['insertBefore'](_0x36c7e8['ui']['element'],this['element']['firstChild']),_0x36c7e8['model']['document']['on']('change',()=>this['value']=_0x36c7e8['getData']()),_0x36c7e8['bind']('placeholder')['to'](this),this['focusables']['add'](_0x36c7e8['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2d56d7){-0x1===_0x2d56d7?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x3857e7}=this,_0x44887f=new _0x75c5a1(_0x3857e7);return _0x44887f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x44887f['withText']=!0x0,_0x44887f['bind']('label')['to'](this,'submitLabel'),_0x44887f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x44887f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x11afb4,_0x4325dd)=>!_0x4325dd&&!!_0x11afb4['trim']()),_0x44887f;}['_createCancelButton'](){const {locale:_0x4dae9d}=this,_0x297ad0=new _0x75c5a1(_0x4dae9d);return _0x297ad0['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x297ad0['label']=N(_0x4dae9d,'Cancel'),_0x297ad0['withText']=!0x0,_0x297ad0['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x297ad0;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x266cf8=>{this['focusTracker']['add'](_0x266cf8['element']);}),this['focusables']['on']('change',(_0x16c804,_0x383752)=>{for(const _0x5587c7 of Array['from'](_0x383752['added'])['reverse']())this['focusTracker']['add'](_0x5587c7['element']);});}}class ie extends kt{constructor(_0x3e7fd1,_0x4ff455,_0x50e74d){super(_0x3e7fd1),this['commentInputView']=new os(_0x3e7fd1,_0x50e74d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x54459c,_0xe36df1)=>_0x54459c||!!_0xe36df1),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x38aed4(_0x3e7fd1,_0x4ff455),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x23e599){this['commentInputView']['focus'](_0x23e599);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x515088,_0x4c3926)=>{const {submitButtonView:_0x3e31c0,cancelButtonView:_0x9bac91,editor:_0x2b5c81}=this['commentInputView'];[_0x3e31c0['element'],_0x9bac91['element'],_0x2b5c81?_0x2b5c81['editing']['view']['getDomRoot']():null]['filter'](_0x30199e=>_0x30199e)['some'](_0x19dc1f=>_0x19dc1f['contains'](_0x4c3926['target']))||(this['focus'](),_0x4c3926['preventDefault']());});}}class rs extends kt{constructor(_0x1e4b07){super(_0x1e4b07);const _0x25ee1e=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x25ee1e['to']('count',_0x1a166b=>N(_0x1e4b07,'NUMBER_OF_COMMENTS',_0x1a166b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x265522,_0x219d44,_0xb0995c){super(_0x265522);const _0x54d168=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x219d44['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x219d44,this['_config']=_0xb0995c,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x599b68=>this['commentViews']['map'](_0x218f29=>_0x218f29['element'])['includes'](_0x599b68['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x265522),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2332c1=>_0x2332c1-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4021b1 of _0x219d44['comments'])this['_handleNewCommentModel'](_0x4021b1);this['_handleInfoComment'](),this['listenTo'](_0x219d44['comments'],'add',(_0x16f15b,_0x4a9acc)=>{const _0x244f55=this['_calculatePosition'](_0x4a9acc);this['length']++,this['_handleNewCommentModel'](_0x4a9acc,_0x244f55),this['refreshVisibleViews']();}),this['listenTo'](_0x219d44['comments'],'remove',(_0x1a7025,_0xed0d4b)=>{this['length']--,this['_handleRemoveCommentModel'](_0xed0d4b),this['refreshVisibleViews']();}),this['listenTo'](_0x219d44,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x219d44,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x54d168['if']('length','ck-hidden',_0x46f183=>!_0x46f183)],'aria-label':N(_0x265522,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x3a6960){-0x1===_0x3a6960?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2495ed of this['commentViews'])_0x2495ed['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4cc088,_0x4b82be){const _0x15ce35=new this['_config']['CommentView'](this['locale'],_0x4cc088,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x15ce35['viewUid']=_0x4cc088['id'],_0x15ce35['delegate']('removeComment')['to'](this),_0x15ce35['delegate']('updateComment')['to'](this),_0x15ce35['delegate']('resolveCommentThread')['to'](this),_0x15ce35['delegate']('editorReady')['to'](this),_0x15ce35['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x15ce35,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x15ce35,_0x4b82be);}['_calculatePosition'](_0x33c8c7){const _0x47e4d1=this['_model']['_findOptimalIndex'](_0x33c8c7);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x33c8c7['authoredAt']?_0x47e4d1-0x1:_0x47e4d1:_0x47e4d1-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x550a89={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x550a89,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x550a89));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x234214){const _0x3cc345=this['commentViews']['remove'](_0x234214['id']);this['stopListening'](_0x3cc345),_0x3cc345['isEditMode']&&this['_updateHasDirtyComment'](),_0x3cc345['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x554a97=>_0x554a97['isEditMode']);}['_rearrangeCollapse'](){const _0x535b50=function(_0x4f6a89){const _0x38e746=new _0x1ed765();for(const _0x27241e of _0x4f6a89)_0x38e746['add'](_0x27241e);return _0x38e746;}(this['commentViews']),_0x56b940=this['_collapsedCommentsView']['count'];for(let _0x840702=0x1;_0x840702<=_0x56b940;_0x840702++)_0x535b50['remove'](0x1);for(const _0x5caf49 of _0x535b50)_0x5caf49['collapse']();_0x56b940>0x0&&_0x535b50['add'](this['_collapsedCommentsView'],0x1),ns(_0x2f1ce2(Array['from'](this['visibleViews']),Array['from'](_0x535b50)),this['visibleViews'],_0x535b50);}['_rearrangeExpand'](){ns(_0x2f1ce2(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xd9e63f of this['visibleViews'])_0xd9e63f['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1b175e=>{this['focusTracker']['add'](_0x1b175e['element']),this['keystrokes']['listenTo'](_0x1b175e['element']);}),this['commentViews']['on']('change',(_0x3f0f8b,_0xb1696c)=>{for(const _0x11d14c of _0xb1696c['removed'])this['focusTracker']['remove'](_0x11d14c['element']),this['keystrokes']['stopListening'](_0x11d14c['element']);for(const _0xdfb3b6 of Array['from'](_0xb1696c['added'])['reverse']())this['focusTracker']['add'](_0xdfb3b6['element']),this['keystrokes']['listenTo'](_0xdfb3b6['element']);});}}function ns(_0xa01ce2,_0x373bf4,_0x6e7034){let _0x201f85=0x0;for(const _0x2f53d4 of _0xa01ce2)switch(_0x2f53d4){case'insert':_0x373bf4['add'](_0x6e7034['get'](_0x201f85),_0x201f85),_0x201f85++;break;case'delete':_0x373bf4['remove'](_0x201f85);break;case'equal':_0x201f85++;}}class oe extends kt{constructor(_0xff139c){super(_0xff139c);const _0x5d8058=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5d8058['to']('contextValue',_0x1e9ad6=>N(_0xff139c,'THREAD_CONTEXT_LABEL',_0x1e9ad6)),'tabindex':-0x1},'children':[{'text':_0x5d8058['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x125f04,_0x3eb1b7){super(_0x125f04);const _0x402672=this['bindTemplate'];this['_model']=_0x3eb1b7,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x57aa55=>!!_0x57aa55),this['bind']('contextValue')['to'](this['_model'],'context',_0x47a855=>_0x47a855&&_0x47a855['value']?this['_trimContextValue'](_0x47a855['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x402672['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x20cd9b=new _0x75c5a1(this['locale']);return _0x20cd9b['label']=N(this['locale'],'Reopen'),_0x20cd9b['tooltip']=N(this['locale'],'Reopen'),_0x20cd9b['icon']=_0x1e6eac,_0x20cd9b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x21fdd8=>!_0x21fdd8),_0x20cd9b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3732c5,_0x22c760)=>_0x3732c5&&_0x22c760),_0x20cd9b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x20cd9b;}['_trimContextValue'](_0x5badaa){if(_0x5badaa['length']<0x96)return _0x5badaa;const _0x4f8d94=_0x5badaa['lastIndexOf']('\x20',0x93);return _0x5badaa['substring'](0x0,_0x4f8d94>-0x1?_0x4f8d94:0x93)+'...';}['_attachContextActions'](){const _0x3fc920=this['element']['querySelector']('.ck-context'),_0x2497e5=_0x3fc920['querySelector']('.ck-context__value');this['listenTo'](_0x3fc920,'mouseenter',()=>{_0x2497e5['offsetWidth']<_0x2497e5['scrollWidth']&&_0x3fc920['classList']['add']('overlay');}),this['listenTo'](_0x3fc920,'mouseleave',()=>{_0x3fc920['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x133720 of this['focusables'])this['focusTracker']['add'](_0x133720['element']),this['keystrokes']['listenTo'](_0x133720['element']);}['_createContextView'](){const _0x30f55a=new oe(this['locale']);return _0x30f55a['bind']('contextValue')['to'](this),_0x30f55a;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5df21c,_0x1f1355,_0x469f45,_0x347fba){super(_0x5df21c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1f1355,this['_localUser']=_0x469f45,this['_config']=_0x347fba,this['commentThreadHeaderView']=new Yt(_0x5df21c,_0x1f1355),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x5df21c,N(_0x5df21c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5df21c,_0x1f1355,Object['assign']({'CommentView':this['_config']['CommentView']},_0x347fba)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0xa2b323,_0x269b57)=>_0xa2b323||!!_0x269b57),this['bind']('isUnlinked')['to'](_0x1f1355,'unlinkedAt',_0xb437c=>!!_0xb437c),this['bind']('ariaLabel')['to'](this,'length',_0x21b707=>{const _0x3243a0=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x21b707,_0x3243a0]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x343dd2=>_0x343dd2['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1f5d27=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x18569d=_0x1f5d27['commentInputView'];return _0x1f5d27['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x18569d,'value',(_0xe8949d,_0x15a08b,_0x469a14,_0x4e2de4,_0x5227c2)=>!!_0x5227c2||!!_0x4e2de4&&_0x469a14&&!_0x15a08b||_0xe8949d&&_0x469a14&&!_0x15a08b),_0x18569d['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x30b9a0,_0x3d4469,_0x1f44bc)=>{let _0x31259c;return _0x31259c=_0x1f44bc&&_0x3d4469?'Reply\x20to\x20reopen\x20discussion...':_0x30b9a0?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x31259c);}),_0x18569d['bind']('submitLabel')['to'](this,'length',_0x42b364=>N(this['locale'],_0x42b364?'Reply':'Comment')),_0x18569d['on']('submit',(_0x479489,_0x14f4cf)=>{this['fire']('addComment',_0x14f4cf),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x18569d['on']('cancel',()=>{this['focus']();}),_0x18569d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x18569d['on']('cancel',_0x30ae1e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x30ae1e['stop']());}),this['on']('change:isActive',(_0x1e7cdd,_0x196211,_0x19281d)=>{_0x19281d||this['length']||_0x18569d['value']||this['fire']('removeCommentThread');}),_0x1f5d27;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x48163d,_0x399048,_0x246f1f,_0x3a44d0){super(_0x48163d,_0x399048,_0x246f1f,_0x3a44d0),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x48163d,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x102f5a,_0x3e2fdf,_0x230cf2)=>{_0x230cf2||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3f469c,_0x4f77a0,_0x1b4f5c)=>{_0x1b4f5c&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x563efa=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x563efa['if']('isActive','ck-thread--active'),_0x563efa['if']('isUnlinked','ck-thread--unlinked'),_0x563efa['if']('isConfirm','ck-thread--remove-confirmation'),_0x563efa['to']('actionIndicator',_0x2b360e=>_0x2b360e?'ck-thread--'+_0x2b360e:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x563efa['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id']},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container'),this['_model']['on']('change:archivedAt',()=>{this['_updateArchivedThreadHeader']();}),this['_updateArchivedThreadHeader']();}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0x501d7c of this['commentsListView']['commentViews'])_0x501d7c['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x11bf59}=this,_0x308d53=this['commentsListView']['commentViews']['get'](0x0);_0x308d53===this['_boundFirstCommentView']||_0x308d53['isSystemComment']||(this['_boundFirstCommentView']=_0x308d53,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x308d53,'actionIndicator',_0x1f5502=>'remove'===_0x1f5502?'remove':null),_0x308d53['placeholder']=N(_0x11bf59,'Write\x20a\x20comment...'),_0x308d53['removeButton']['on']('execute',_0x36f489=>{_0x36f489['stop'](),this['showConfirm'](N(_0x11bf59,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x308d53['focus']();}),_0x308d53['actionBar']['add'](this['resolveButton'],0x0),_0x308d53['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xd5b1c8=new _0x442e48(this['locale']);return _0xd5b1c8['label']=N(this['locale'],'Resolve'),_0xd5b1c8['tooltip']=N(this['locale'],'Resolve'),_0xd5b1c8['icon']=_0x21f99b,_0xd5b1c8['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xd5b1c8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xafa41e=>!_0xafa41e),_0xd5b1c8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x47c3b1,_0x38e9bc)=>_0x47c3b1&&!_0x38e9bc),_0xd5b1c8['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xd5b1c8;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x36efe8){super(_0x36efe8),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5c2ac3,_0x42ed4c,_0x1180d7)=>{this['element']['innerHTML']=_0x1180d7;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x2adef2,_0x13ac81,_0x4ed051){super(_0x2adef2),this['_model']=_0x13ac81,this['_config']=_0x4ed051,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x13ac81,'content',_0x13ac81,'authoredAt',(_0x144d1b,_0x4d90ec)=>N(_0x2adef2,'COMMENT_ARIA_LABEL',[_0x13ac81['author']['name'],_0x4ed051['formatDateTime'](_0x4d90ec),new DOMParser()['parseFromString'](_0x144d1b,'text/html')['body']['textContent'],_0x13ac81['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x2adef2,N(_0x2adef2,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xb7b669(),this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x13ef5f=>_0x13ef5f['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x1a3749=new es(this['locale']);return _0x1a3749['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x322280,_0x5ce42f)=>_0x5ce42f?_0x350498(_0x322280,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x322280),_0x1a3749;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x388674=new os(this['locale'],this['_config']['editorConfig']);return _0x388674['value']=this['_model']['content'],_0x388674['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x388674['submitLabel']=N(this['locale'],'Save'),_0x388674['on']('submit',(_0x1edff8,_0xb872d7)=>{this['fire']('updateComment',this['_model']['id'],_0xb872d7),this['switchToDisplayMode'](),this['focus']();}),_0x388674['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x388674['once']('editorReady',()=>{_0x388674['focus']();}),_0x388674['createEditor'](),_0x388674['delegate']('editorReady')['to'](this),_0x388674['delegate']('editorDestroyed')['to'](this),_0x388674;}['_setupKeyboardNavigation'](){const _0x410346=this['element'];this['keystrokes']['listenTo'](_0x410346);for(const _0x3d15e8 of this['focusables'])this['focusTracker']['add'](_0x3d15e8['element']),this['keystrokes']['listenTo'](_0x3d15e8['element']);this['focusables']['on']('change',(_0x1f47eb,_0x344c11)=>{for(const _0x40b29a of _0x344c11['removed'])this['focusTracker']['remove'](_0x40b29a['element']),this['keystrokes']['stopListening'](_0x40b29a['element']);for(const _0x112c10 of _0x344c11['added'])this['focusTracker']['add'](_0x112c10['element']),this['keystrokes']['listenTo'](_0x112c10['element']);}),this['keystrokes']['set']('enter',(_0x149f9a,_0x10c28b)=>{_0x410346===_0x149f9a['target']&&(this['focusCycler']['focusFirst'](),_0x10c28b());}),this['keystrokes']['set']('esc',(_0x228b05,_0x576440)=>{_0x410346!==_0x228b05['target']&&(this['focus'](),_0x576440());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x312871,_0x257610,_0x1c9ea9){super(_0x312871,_0x257610,_0x1c9ea9),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x312871,'Reply...')),this['bind']('authoredAt')['to'](_0x257610),this['bind']('resolvedAt')['to'](_0x257610),this['actionBar']=this['createCollection'](),this['isSystemComment']||(this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this['createCollection'](),this['items']['addMany']([this['editButton'],this['removeButton']]),this['dropdown']=this['_createDropdown'](),this['actionBar']['add'](this['dropdown']),this['focusables']['add'](this['dropdown'])),this['userView']=new _0x38aed4(_0x312871,_0x257610['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x257610,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0xf088a0=this['bindTemplate'],_0x3bd068=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0xf088a0['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0xf088a0['to']('authoredAt',_0x30da8e=>this['_config']['formatDateTime'](_0x30da8e))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0xf088a0['if']('isEditMode','ck-comment__actions--hidden'),_0xf088a0['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']},this['ariaDescriptionView']];return this['_model']['isExternal']&&_0x3bd068['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0xf088a0['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0xf088a0['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0xf088a0['if']('isEditMode','ck-comment--edit'),_0xf088a0['if']('isSystemComment','ck-comment--info'),_0xf088a0['to']('actionIndicator',_0x45f726=>_0x45f726?'ck-comment--'+_0x45f726:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id'],'role':'group'},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':_0x3bd068}]}]};}['_createEditButton'](){const _0x4ce6dd=new _0x75c5a1(this['locale']);return _0x4ce6dd['label']=N(this['locale'],'Edit'),_0x4ce6dd['icon']=_0x8301b6,_0x4ce6dd['withText']=!0x0,_0x4ce6dd['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x4ce6dd['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x51a036=>!_0x51a036),_0x4ce6dd['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x4ce6dd['on']('execute',()=>this['switchToEditMode']()),_0x4ce6dd;}['_createRemoveButton'](){const _0x174d0d=new _0x75c5a1(this['locale']);return _0x174d0d['label']=N(this['locale'],'Remove'),_0x174d0d['icon']=_0x1b2265,_0x174d0d['withText']=!0x0,_0x174d0d['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x174d0d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5d6a24=>!_0x5d6a24),_0x174d0d['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x174d0d['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x174d0d;}['_createDropdown'](){const _0x376041=_0x5664c2(this['locale'],_0x5638f8),_0xb70e5e=_0x376041['panelView']['children'],_0x4cb38b=new _0x263abd(this['locale']),_0x23897d=_0x376041['bindTemplate'];_0xb0d285(_0x376041,()=>this['items']['find'](_0x325389=>_0x325389['isVisible'])),_0x376041['extendTemplate']({'attributes':{'class':[_0x23897d['if']('isVisible','ck-hidden',_0x5980d4=>!_0x5980d4)]}});const _0x567c4e=(_0x47719f,_0x2fe61f=-0x1)=>{const _0x1dbf06=new _0x4c63c3(this['locale']);_0x1dbf06['children']['add'](_0x47719f);const _0x19c055=_0x2fe61f>-0x1?_0x2fe61f:_0x4cb38b['items']['length'];_0x4cb38b['items']['add'](_0x1dbf06,_0x19c055);const _0x4c0561=Array['from'](this['items']);_0x376041['unbind']('isEnabled','isVisible'),_0x376041['bind']('isEnabled')['toMany'](_0x4c0561,'isEnabled',(..._0x5f481b)=>_0x5f481b['some'](_0x5f2764=>_0x5f2764)),_0x376041['bind']('isVisible')['toMany'](_0x4c0561,'isVisible',(..._0x137dae)=>_0x137dae['some'](_0x4f690d=>_0x4f690d));};_0x376041['panelPosition']='sw',_0x376041['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x4068bd});for(const _0x3ac4e7 of this['items'])_0x567c4e(_0x3ac4e7);return _0xb70e5e['add'](_0x4cb38b),_0x376041['listenTo'](this['items'],'add',(_0xd34051,_0x3a5e72,_0x1616c5)=>{_0x567c4e(_0x3a5e72,_0x1616c5);}),_0x376041['listenTo'](this['items'],'remove',(_0x2df250,_0x1aa851,_0x4ce522)=>{_0x4cb38b['items']['remove'](_0x4ce522);}),_0x376041;}['_attachActions'](_0x12b366,_0x335d67){const _0x550032=_0x12b366&&_0x12b366['element'];_0x550032&&(this['listenTo'](_0x550032,'mouseenter',()=>this['actionIndicator']=_0x335d67),this['listenTo'](_0x550032,'focus',()=>this['actionIndicator']=_0x335d67),this['listenTo'](_0x550032,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x550032,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3bcb38=super['_createCommentInputView']();return _0x3bcb38['bind']('placeholder')['to'](this),_0x3bcb38;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x26dbbf){const _0x136982=Dt(_0x26dbbf,0x1e),_0x10577a=new MutationObserver(_0x122144=>{for(const _0x57fb97 of _0x122144)('attributes'==_0x57fb97['type']&&'class'==_0x57fb97['attributeName']||'childList'==_0x57fb97['type']||'characterData'==_0x57fb97['type'])&&_0x136982();});return{'attach'(_0x752f4d){_0x10577a['observe'](_0x752f4d,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x10577a['disconnect'](),_0x136982['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x434a74,_0x3af482){super(_0x434a74),this['id']=_0xf51739(),this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x1837f9,_0x5e8390)=>this['fire']('Esc',_0x5e8390)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x3af482),this['mainView']=_0x3af482;const _0x2b2f85=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x2b2f85['if']('isActive','ck-annotation-wrapper--active')],'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['focusTracker']['add'](this['element']),this['keystrokes']['listenTo'](this['element']),this['_mutationObserver']['attach'](this['element']);}['destroy'](){this['content']['clear'](),this['keystrokes']['destroy'](),this['focusTracker']['destroy'](),this['_mutationObserver']['detach'](),super['destroy']();}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['_updateHeight'](){const _0x449e4a=this['element']['clientHeight'];_0x449e4a&&(this['height']=_0x449e4a);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3d6921(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x59f459,target:_0xe29a73,type:_0x2ddda2,isVisible:_0xa0bcf8=!0x0}){super(),this['view']=_0x59f459,this['view']['element']||this['view']['render'](),this['_type']=_0x2ddda2,this['_target']=_0xe29a73,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1ed765([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1be175,_0x65a7a8)=>{this['view']['focusTracker']['add'](_0x65a7a8);}),this['focusableElements']['on']('remove',(_0x1d38a6,_0x4fc520)=>{this['view']['focusTracker']['remove'](_0x4fc520);}),this['set']('isVisible',_0xa0bcf8);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x8df51c=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x8df51c),_0x8df51c;}get['targetRect'](){const _0x4a2a98=this['target'];if(null===_0x4a2a98)return null;if(_0x4a2a98 instanceof _0x29c0c7)return _0x4a2a98;const _0x3d1bc7=_0x4a2a98['filter'](_0x5d1dee=>function(_0x31b9d7){const _0x4fdd4d=_0x31b9d7['offsetParent'];if(_0x4fdd4d)return!0x0;const _0xa78424=_0x31b9d7['getClientRects']()['item'](0x0);return!!_0xa78424;}(_0x5d1dee));return 0x0===_0x3d1bc7['length']?null:new _0x29c0c7(_0x3d1bc7[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x35d5d8){this['view']['isActive']=_0x35d5d8,this['view']['mainView']['isActive']=_0x35d5d8;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x20f1b4){if(!(null===_0x20f1b4||_0x20f1b4 instanceof _0x29c0c7||Array['isArray'](_0x20f1b4)&&_0x20f1b4['every'](_0x5721f2=>fi(_0x5721f2))))throw new _0x59f856('annotation-invalid-target',null,{'target':_0x20f1b4});}['_getNormalizedTarget'](){const _0x5ded65='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5ded65)?[_0x5ded65]:_0x5ded65;}}function fi(_0x270903){return null!==_0x270903&&'object'==typeof _0x270903&&'nodeType'in _0x270903&&0x1===_0x270903['nodeType'];}class S extends _0x1ed765{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x46db6b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x336e57(),this['_focusTracker']['on']('change:isFocused',(_0x4d1569,_0x53af99,_0x227823)=>{_0x227823||this['fire']('blur');});for(const _0x3daa21 of _0x46db6b)this['add'](_0x3daa21);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3771c4){if(this['has'](_0x3771c4))throw new _0x59f856('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3771c4['innerView'],_0x3771c4),this['_viewToAnnotation']['set'](_0x3771c4['view'],_0x3771c4);for(const _0x55f936 of _0x3771c4['focusableElements'])this['_focusTracker']['add'](_0x55f936);this['listenTo'](_0x3771c4['focusableElements'],'add',(_0x3dbba6,_0x51137a)=>{this['_focusTracker']['add'](_0x51137a);}),this['listenTo'](_0x3771c4['focusableElements'],'remove',(_0x197dd8,_0x5ee6d0)=>{this['_focusTracker']['remove'](_0x5ee6d0);}),this['listenTo'](_0x3771c4['view']['focusTracker'],'change:isFocused',(_0x1e1a7a,_0x43ff72,_0x293066)=>{_0x293066&&this['fire']('focus',_0x3771c4);}),_0x3771c4['updateTargetRect']();const _0x30cc43=this['_getOrderInContent'](_0x3771c4['view']['targetRect']);return super['add'](_0x3771c4,_0x30cc43);}['remove'](_0x34a44c){if(!this['has'](_0x34a44c))throw new _0x59f856('annotationcollection-not-existing-item',null);this['stopListening'](_0x34a44c['view']['focusTracker']),this['stopListening'](_0x34a44c['focusableElements']);for(const _0x665194 of _0x34a44c['focusableElements'])this['_focusTracker']['remove'](_0x665194);return this['_viewToAnnotation']['delete'](_0x34a44c['view']),this['_innerViewToAnnotation']['delete'](_0x34a44c['innerView']),super['remove'](_0x34a44c);}['getByInnerView'](_0x3c15f0){return this['_innerViewToAnnotation']['get'](_0x3c15f0);}['getByView'](_0x274918){return this['_viewToAnnotation']['get'](_0x274918);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2afe67 of this)_0x2afe67['updateTargetRect']();this['_sort']();}['_sort'](){const _0x31362a=Array['from'](this)['sort']((_0x4fe4ee,_0x597602)=>w(_0x4fe4ee['view']['targetRect'],_0x597602['view']['targetRect']));for(let _0x14e101=_0x31362a['length']-0x1;_0x14e101>0x0;_0x14e101--){const _0x5795d3=_0x31362a[_0x14e101];_0x14e101!==this['getIndex'](_0x5795d3)&&(this['remove'](_0x5795d3),this['add'](_0x5795d3));}}['_getOrderInContent'](_0x14fed3){let _0x2dde8a=0x0;if(!_0x14fed3)return this['length'];for(const _0x2806ce of this){const _0x285aa3=_0x2806ce['view']['targetRect'];if(_0x285aa3){if(w(_0x14fed3,_0x285aa3)<0x0)return _0x2dde8a;_0x2dde8a++;}}return _0x2dde8a;}}function v({source:_0x35dc90,target:_0x309e22,filter:_0x4cc054}){for(const _0xca494a of _0x35dc90)_0x4cc054(_0xca494a)&&_0x309e22['add'](_0xca494a);_0x309e22['listenTo'](_0x35dc90,'add',(_0x146847,_0x176f53)=>{_0x4cc054(_0x176f53)&&_0x309e22['add'](_0x176f53);}),_0x309e22['listenTo'](_0x35dc90,'remove',(_0x2fdc57,_0x25609d)=>{_0x309e22['has'](_0x25609d)&&_0x309e22['remove'](_0x25609d);});}function w(_0x1f8544,_0x22134a){if(null===_0x1f8544&&null===_0x22134a)return 0x0;if(null===_0x1f8544)return-0x1;if(null===_0x22134a)return 0x1;const _0x820c29=_0x1f8544['top']-_0x22134a['top'];return 0x0==_0x820c29?_0x1f8544['left']-_0x22134a['left']:_0x820c29;}class y extends _0x35edc8{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f8d7e){if(super(_0x2f8d7e),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2f8d7e instanceof _0x27ecd2){const _0x1f4791=_0x2f8d7e['locale'];_0x2f8d7e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4e61ae){this['collection']['add'](_0x4e61ae);}['remove'](_0x5e193e){this['collection']['remove'](_0x5e193e),_0x5e193e['destroy']();}['refreshVisibility'](){for(const _0x419b00 of this['collection'])_0x419b00['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x18ba62){return this['collection']['getByInnerView'](_0x18ba62);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1740ec of this['collection'])_0x1740ec['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x411945){this['fire']('_activateAnnotation',_0x411945);}['createAnnotation'](_0x1f4eff){return new T(_0x1f4eff);}['createAnnotationView'](_0x3bb07c,_0x5bc853){return new E(_0x3bb07c,_0x5bc853);}['_addActiveAnnotation'](_0x24f410){const _0x16f68e=new Set(this['activeAnnotations']);_0x16f68e['add'](_0x24f410),this['activeAnnotations']=_0x16f68e;}['_removeActiveAnnotation'](_0x145e5e){const _0x469141=new Set(this['activeAnnotations']);_0x469141['delete'](_0x145e5e),this['activeAnnotations']=_0x469141;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4fff6d=this['collection'],_0x39bd07=this['_visibleAnnotations'];function _0x2f4a63(_0x5abf83){const _0x22ef53=_0x5abf83['source'];_0x22ef53['isVisible']&&!_0x39bd07['has'](_0x22ef53)?_0x39bd07['add'](_0x22ef53):!_0x22ef53['isVisible']&&_0x39bd07['has'](_0x22ef53)&&_0x39bd07['remove'](_0x22ef53),_0x22ef53['view']['focusTracker']['remove'](_0x22ef53['view']['element']),_0x22ef53['view']['focusTracker']['add'](_0x22ef53['view']['element']);}this['listenTo'](_0x4fff6d,'add',(_0x664b6f,_0x502f08)=>{_0x502f08['isVisible']&&_0x39bd07['add'](_0x502f08),this['listenTo'](_0x502f08,'change:isVisible',_0x2f4a63);}),this['listenTo'](_0x4fff6d,'remove',(_0x37eb15,_0x1987ea)=>{_0x39bd07['has'](_0x1987ea)&&_0x39bd07['remove'](_0x1987ea),this['stopListening'](_0x1987ea,'change:isVisible',_0x2f4a63);});}['_setupEnterAnnotationKeystroke'](){const _0x4fcabd=_0x35b890=>{_0x35b890['on']('ready',()=>{_0x35b890['keystrokes']['set'](_0x1434a2,(_0x104999,_0x85772b)=>{const _0x57b9bb=_0x1a7d5e(this['activeAnnotations']['values']());_0x57b9bb&&(_0x57b9bb['view']['focus'](),_0x85772b());});});};this['context']instanceof _0x27ecd2?_0x4fcabd(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xe7582e,_0xd7bc4b)=>{_0x4fcabd(_0xd7bc4b);});}['_setupEscapeAnnotationHandling'](){const _0x5d542d=_0x21c53f=>{const _0x10d867=_0x21c53f['source'],_0x443e1e=[];let _0x5b0b51;if(Array['isArray'](_0x10d867['target'])){_0x5b0b51=_0x10d867['target'][0x0],this['context']instanceof _0x27ecd2?_0x443e1e['push'](this['context']):this['context']['editors']&&_0x443e1e['push'](...this['context']['editors']);for(const _0x4bf68b of _0x443e1e)for(const _0xee3034 of _0x4bf68b['editing']['view']['domRoots']['values']())if(_0xee3034['contains'](_0x5b0b51))return void _0x4bf68b['editing']['view']['focus']();_0x5b0b51['focus']();}};this['listenTo'](this['collection'],'add',(_0x1bf9f9,_0x280fa6)=>{this['listenTo'](_0x280fa6,'escape',_0x5d542d,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4016f2,_0x53eb88)=>{this['stopListening'](_0x53eb88,'escape',_0x5d542d);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x35edc8{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ebb64){super(_0x2ebb64),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x15fd65=this['context']['config'];_0x15fd65['define']('comments.maxCommentsWhenCollapsed',0x2),_0x15fd65['define']('comments.maxThreadTotalWeight',0x1f4),_0x15fd65['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x15fd65['define']('comments.CommentThreadView',gt),_0x15fd65['define']('comments.CommentView',Tt),_0x15fd65['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x575029=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x523525,_0x590a2b)=>this['_addCommentThread'](_0x590a2b)),this['on']('submitCommentThread',(_0x156a27,_0x4b5b17)=>this['_submitCommentThread'](_0x4b5b17)),this['on']('resolveCommentThread',(_0x5ac5a6,_0x58f6dc)=>this['_resolveCommentThread'](_0x58f6dc)),this['on']('resolveCommentThread',(_0x1fe6b7,_0x58bf6f)=>this['_updateActiveAnnotation'](_0x58bf6f),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x34c5a7,_0x6759ba)=>this['_reopenCommentThread'](_0x6759ba)),this['on']('reopenCommentThread',(_0x3892ec,_0xc5c211)=>this['_updateActiveAnnotation'](_0xc5c211),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x443124,_0x3a30fb)=>this['_removeCommentThread'](_0x3a30fb)),this['on']('updateCommentThread',(_0x59810d,_0xc37803)=>this['_updateCommentThread'](_0xc37803)),this['on']('updateCommentThread',(_0x3ae95f,_0x7d4955)=>this['_updateActiveAnnotation'](_0x7d4955),{'priority':'lowest'}),this['on']('addComment',(_0x194499,_0x389e71)=>this['_addComment'](_0x389e71)),this['on']('updateComment',(_0x52a5de,_0x1c8deb)=>this['_updateComment'](_0x1c8deb)),this['on']('removeComment',(_0x2e3901,_0x1fbde4)=>this['_removeComment'](_0x1fbde4)),this['on']('addComment',(_0xf53c4c,{threadId:_0x42a16d,isFromAdapter:_0xdc2bf0})=>{if(_0xdc2bf0)return;const _0x3c5422=this['getCommentThread'](_0x42a16d),_0x2b4f55=_0x3c5422&&this['_threadToController']['get'](_0x3c5422);_0x2b4f55&&_0x2b4f55['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x575029,'change:activeAnnotations',(_0x5af11f,_0x20a7e9,_0x5b076d)=>{const _0x50d153=Array['from'](_0x5b076d)['map'](_0x546ef5=>this['_viewToController']['get'](_0x546ef5['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x50d153?_0x50d153['model']:null;});}set['adapter'](_0x4c9d34){if(this['_adapter'])throw new _0x59f856('commentsrepository-adapter-already-set');this['_adapter']=_0x4c9d34;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x33ecfc=_t,threadId:_0x177604=_0xf51739(),comments:_0x249fb2=[],unlinkedAt:_0x473eb4=null,resolvedAt:_0x315f60=null,resolvedBy:_0x97262c=null,target:_0x3dda98=null,context:_0x19076d=null,attributes:_0x518c58={},isResolvable:_0x39c552=!0x0,isSubmitted:_0x4b4006=!0x1,isFromAdapter:_0x281ab6=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x33ecfc),{'channelId':_0x33ecfc,'threadId':_0x177604,'comments':_0x249fb2,'unlinkedAt':_0x473eb4,'resolvedAt':_0x315f60,'resolvedBy':_0x97262c,'target':_0x3dda98,'context':_0x19076d,'attributes':_0x518c58,'isFromAdapter':_0x281ab6,'isResolvable':_0x39c552,'isSubmitted':_0x4b4006}),this['getCommentThread'](_0x177604);}['openNewCommentThread']({channelId:_0x5d102e=_t,threadId:_0x94ce7f=_0xf51739(),target:_0x62c3c4,context:_0x408e34=null,isResolvable:_0x55338d=!0x0}){if(this['_readOnlyChannels']['has'](_0x5d102e)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x62c3c4)throw new _0x59f856('commentsrepository-missing-target');const _0xa5a061=this['addCommentThread']({'channelId':_0x5d102e,'threadId':_0x94ce7f,'target':_0x62c3c4,'context':_0x408e34,'isResolvable':_0x55338d});if(!_0xa5a061)return null;const _0x5a9f46=this['_threadToController']['get'](_0xa5a061),_0x36650f=_0x5a9f46['view']['commentThreadInputView']['commentInputView'],_0x125755=this['context']['plugins']['get'](y),_0x52544f=_0x125755['getByInnerView'](_0x5a9f46['view']);return _0x125755['activate'](_0x52544f),_0x36650f['once']('editorReady',()=>_0x36650f['focus']()),_0xa5a061;}['hasCommentThread'](_0xfd108d){if('string'!=typeof _0xfd108d)throw new _0x59f856('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xfd108d);}['updateCommentThread']({channelId:_0x4e44fd=_t,threadId:_0x659221,context:_0x165f2c,unlinkedAt:_0x1f12ef,attributes:_0x17758d,isFromAdapter:_0x27d9e0=!0x1}){return this['fire'](Nt('updateCommentThread',_0x4e44fd),{'channelId':_0x4e44fd,'threadId':_0x659221,'context':_0x165f2c,'unlinkedAt':_0x1f12ef,'attributes':_0x17758d,'isFromAdapter':_0x27d9e0}),this['getCommentThread'](_0x659221);}['getCommentThread'](_0x180e95){if('string'!=typeof _0x180e95)throw new _0x59f856('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x180e95);}['fetchCommentThread']({channelId:_0x1e9b1a,threadId:_0x1bad33}={}){const _0x31fe1d=this['getCommentThread'](_0x1bad33);if(_0x31fe1d)return Promise['resolve'](_0x31fe1d);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x59f856('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1e9b1a,'threadId':_0x1bad33})['then'](_0x47dcea=>this['hasCommentThread'](_0x1bad33)?this['getCommentThread'](_0x1bad33):_0x47dcea?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1e9b1a},_0x47dcea)):void 0x0)['catch'](_0x71e1c2=>{throw console['error'](_0x71e1c2),new _0x59f856('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x280a27,skipNotAttached:_0x434672=!0x1,skipEmpty:_0x5c22af=!0x1,toJSON:_0x5cd4ac=!0x1}={}){const _0x3afaa9=[];for(const _0x196c91 of this['_threads']['values']())_0x280a27&&_0x196c91['channelId']!==_0x280a27||_0x434672&&!_0x196c91['isAttached']||_0x5c22af&&0x0===_0x196c91['length']||_0x3afaa9['push'](_0x196c91);return _0x5cd4ac?_0x3afaa9['map'](_0x2783ec=>_0x2783ec['toJSON']()):_0x3afaa9;}['getAnnotationForCommentThread'](_0x2059da){const _0x3db28b=this['_threadToController']['get'](_0x2059da);if(!_0x3db28b)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x3db28b['view'])||null;}['getCommentThreadForAnnotation'](_0x52726a){const _0x36f163=this['_viewToController']['get'](_0x52726a['innerView']);return _0x36f163?_0x36f163['model']:null;}['setActiveCommentThread'](_0xa3a255){const _0x4cefe0=this['context']['plugins']['get'](y);if(!_0xa3a255)return void(this['activeCommentThread']&&_0x4cefe0['deactivateAll']());const _0x24f98a=this['getCommentThread'](_0xa3a255);if(!_0x24f98a)throw new _0x59f856('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xa3a255});if(!this['_threadToController']['has'](_0x24f98a))throw new _0x59f856('commentsrepository-active-not-attached',null,{'threadId':_0xa3a255});const _0x5216a5=_0x4cefe0['getByInnerView'](this['_threadToController']['get'](_0x24f98a)['view']);_0x4cefe0['activate'](_0x5216a5);}['switchReadOnly'](_0x550317,_0x4e8947){_0x550317?this['_readOnlyChannels']['add'](_0x4e8947):this['_readOnlyChannels']['delete'](_0x4e8947),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x182b17){return this['_readOnlyChannels']['has'](_0x182b17)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xcba4f3,_0xe7ea65){return new vt(_0xcba4f3,_0xe7ea65);}['setPermissions'](_0xba8b38,_0x24d212=_t){this['_permissions']['set'](_0x24d212,_0xba8b38),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x15e8ae=_t){return this['_permissions']['has'](_0x15e8ae)?this['_permissions']['get'](_0x15e8ae):bt;}['_addCommentThread']({channelId:_0x11a41c,threadId:_0xae1802,comments:_0x242497,unlinkedAt:_0x3a296f,resolvedAt:_0x50e397,resolvedBy:_0x37f059,target:_0x2eee15,context:_0x156c2b,attributes:_0x538399,isFromAdapter:_0x2a862f,isResolvable:_0x8ab6df,isSubmitted:_0x1fee56}){if('string'!=typeof _0xae1802)throw new _0x59f856('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xae1802});if(this['hasCommentThread'](_0xae1802))throw new _0x59f856('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xae1802});const _0x4b5ca5=new pi(this,{'channelId':_0x11a41c,'id':_0xae1802,'context':_0x156c2b,'attributes':_0x538399,'unlinkedAt':_0x3a296f,'resolvedAt':_0x50e397,'resolvedBy':_0x37f059?this['context']['plugins']['get'](it)['getUser'](_0x37f059):null,'isResolvable':_0x8ab6df,'isSubmitted':_0x1fee56||_0x2a862f});this['_threads']['set'](_0xae1802,_0x4b5ca5);for(const _0x575c88 of _0x242497)_0x4b5ca5['_add'](this['_createNewComment']({'threadId':_0xae1802,..._0x575c88}));return _0x2eee15&&_0x4b5ca5['attachTo'](_0x2eee15),_0x2a862f||!_0x4b5ca5['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x11a41c,'threadId':_0xae1802});}['_submitCommentThread']({channelId:_0x3d75ed,threadId:_0xa81c09}){if(!this['hasCommentThread'](_0xa81c09))throw new _0x59f856('commentsrepository-missing-comment-thread',this);const _0x5a7db7=this['getCommentThread'](_0xa81c09);if(_0x5a7db7['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x1bf3ed,comments:_0x2fa7f2,resolvedAt:_0x444ab1,resolvedBy:_0x2a9f70,context:_0x4d843f,attributes:_0x549ef7}=_0x5a7db7,_0x5c8551=this['context']['plugins']['get']('PendingActions'),_0x3a43c0=_0x5c8551['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3d75ed,'threadId':_0x1bf3ed,'comments':_0x2fa7f2['map'](_0x2cb12b=>_0x2cb12b['toJSON']()),'resolvedAt':_0x444ab1,'resolvedBy':_0x2a9f70?_0x2a9f70['id']:_0x2a9f70,'context':_0x4d843f,'attributes':_0x549ef7})['then'](({comments:_0x4ce7c7})=>{_0x5c8551['remove'](_0x3a43c0);for(const _0x5adebe of _0x4ce7c7)this['_updateComment']({'channelId':_0x3d75ed,'threadId':_0xa81c09,'commentId':_0x5adebe['commentId'],'createdAt':_0x5adebe['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x247bac=>{throw console['error'](_0x247bac),new _0x59f856('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4627dc,target:_0x52ba77}){const _0x2944bc=this['getCommentThread'](_0x4627dc);if(!_0x2944bc)throw new _0x59f856('commentsrepository-attach-missing-comment-thread',this);const _0x4c32cd=this['context']['plugins']['get']('PendingActions'),_0x165700=this['context']['plugins']['get'](y),_0x9b131=this['_createCommentThreadView'](_0x2944bc),_0x13919e=new vt(_0x2944bc,_0x9b131);let _0x2b97a2=null;_0x9b131['on']('change:isDirty',(_0x3dd858,_0x3d57e1,_0x5f3637)=>{_0x5f3637?_0x2b97a2=_0x4c32cd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2b97a2&&(_0x4c32cd['remove'](_0x2b97a2),_0x2b97a2=null);}),this['_threadToController']['set'](_0x2944bc,_0x13919e),this['_viewToController']['set'](_0x9b131,_0x13919e);const _0x5c8bef=new E(this['context']['locale'],_0x9b131);_0x5c8bef['bind']('length')['to'](_0x9b131),_0x5c8bef['bind']('isDirty')['to'](_0x9b131,'isDirty',_0x9b131,'length',(_0x344499,_0x2600d8)=>_0x344499||!_0x2600d8),_0x5c8bef['bind']('isActive')['to'](_0x9b131),_0x5c8bef['type']='comment';const _0xd391d6=new T({'view':_0x5c8bef,'target':_0x52ba77,'type':'comment','isVisible':!_0x2944bc['archivedAt']&&!!('function'==typeof _0x52ba77?_0x52ba77():_0x52ba77)});return _0x9b131['on']('escape',()=>{_0xd391d6['fire']('escape');}),this['_bindAnnotationToEditors'](_0x9b131,_0xd391d6),_0x165700['add'](_0xd391d6),_0xd391d6;}['_bindAnnotationToEditors'](_0x592a41,_0x1ac6a7){this['listenTo'](_0x592a41,'editorReady',(_0xfaaf52,_0x400628)=>{const _0x1777ea=_0x400628['ui']['view']['body']['bodyCollectionContainer'];_0x1ac6a7['focusableElements']['add'](_0x1777ea),this['context']instanceof _0x27ecd2&&this['context']['ui']['focusTracker']['add'](_0x1777ea);},{'priority':'highest'}),this['listenTo'](_0x592a41,'editorDestroyed',(_0x4a4345,_0x3ced4d)=>{const _0x3efca0=_0x3ced4d['ui']['view']['body']['bodyCollectionContainer'];_0x1ac6a7['focusableElements']['has'](_0x3efca0)&&_0x1ac6a7['focusableElements']['remove'](_0x3efca0),this['context']instanceof _0x27ecd2&&this['context']['ui']['focusTracker']['remove'](_0x3efca0);});}['_unbindEditors'](_0x1ea9a5){this['stopListening'](_0x1ea9a5,'editorReady'),this['stopListening'](_0x1ea9a5,'editorDestroyed');}['_createCommentThreadView'](_0x68f6cd){const _0x51cedb=this['context']['plugins']['get'](it),{config:_0x3548ac,locale:_0x870a6b}=this['context'],_0x502a4a=pt(_0x3548ac['get']('locale'),_0x870a6b);return new(0x0,(_0x3548ac['get']('comments'))['CommentThreadView'])(_0x870a6b,_0x68f6cd,_0x51cedb['me'],{'editorConfig':{..._0x3548ac['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3548ac['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3548ac['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3548ac['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3548ac['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x502a4a,'CommentView':_0x3548ac['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2e9cfd,channelId:_0x2bd21f,resolvedAt:_0x232ff1,resolvedBy:_0x314742,isFromAdapter:_0x571d1f}){if(!this['hasCommentThread'](_0x2e9cfd))throw new _0x59f856('commentsrepository-missing-comment-thread',null,{'threadId':_0x2e9cfd});const _0x1fc29c=this['getCommentThread'](_0x2e9cfd);if(_0x1fc29c['isResolved'])throw new _0x59f856('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2e9cfd});const _0x3c808b=this['context']['plugins']['get'](it);if(_0x1fc29c['resolvedBy']=_0x3c808b['getUser'](_0x314742),_0x1fc29c['resolvedAt']=_0x232ff1,_0x571d1f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x23a252=this['context']['plugins']['get']('PendingActions'),_0x43ba95=_0x23a252['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2bd21f,'threadId':_0x2e9cfd})['then'](({resolvedAt:_0x64b021,resolvedBy:_0x37f941})=>{_0x23a252['remove'](_0x43ba95),_0x1fc29c['resolvedBy']['id']!==_0x37f941&&(_0x1fc29c['resolvedBy']=_0x3c808b['getUser'](_0x37f941)),_0x1fc29c['resolvedAt']=_0x64b021;})['catch'](_0x23393e=>{throw console['error'](_0x23393e),new _0x59f856('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2db956,channelId:_0x1a0cb6,isFromAdapter:_0x1a8be3}){if(!this['hasCommentThread'](_0x2db956))throw new _0x59f856('commentsrepository-missing-comment-thread',null,{'threadId':_0x2db956});const _0x24a570=this['getCommentThread'](_0x2db956);if(!_0x24a570['isResolved'])throw new _0x59f856('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2db956});if(_0x24a570['resolvedBy']=null,_0x24a570['resolvedAt']=null,_0x1a8be3||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x59949b=this['context']['plugins']['get']('PendingActions'),_0x34e8c9=_0x59949b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1a0cb6,'threadId':_0x2db956})['then'](()=>_0x59949b['remove'](_0x34e8c9))['catch'](_0x25e3b9=>{throw console['error'](_0x25e3b9),new _0x59f856('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2f3d6b,isFromAdapter:_0x4c42c2}){const _0x3f5f50=this['getCommentThread'](_0x2f3d6b);if(!_0x3f5f50)throw new _0x59f856('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2f3d6b),this['_threads']['delete'](_0x2f3d6b),!_0x3f5f50['isSubmitted']||_0x4c42c2||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1e9603=this['context']['plugins']['get']('PendingActions'),{channelId:_0xfa3176}=_0x3f5f50,_0x360016=_0x1e9603['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xfa3176,'threadId':_0x2f3d6b})['then'](()=>_0x1e9603['remove'](_0x360016))['catch'](_0x5afcde=>{throw console['error'](_0x5afcde),new _0x59f856('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2282b2,unlinkedAt:_0x4060dd,context:_0x1157a8,attributes:_0x26c22c,isFromAdapter:_0x4e551e}){if('string'!=typeof _0x2282b2)throw new _0x59f856('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2282b2});if(!this['hasCommentThread'](_0x2282b2))throw new _0x59f856('commentsrepository-missing-comment-thread',null,{'threadId':_0x2282b2});const _0x15839c=this['getCommentThread'](_0x2282b2);let _0x4a6fcb=!0x1;if(void 0x0!==_0x1157a8&&_0x15839c['context']!==_0x1157a8&&(_0x15839c['context']=_0x1157a8,_0x4a6fcb=!0x0),void 0x0!==_0x4060dd&&_0x15839c['unlinkedAt']!==_0x4060dd&&(_0x15839c['unlinkedAt']=_0x4060dd,_0x4a6fcb=!0x0),_0x26c22c&&!At(_0x26c22c,_0x15839c['attributes'])&&(_0x15839c['attributes']=_0x26c22c,_0x4a6fcb=!0x0),!_0x4a6fcb)return Promise['resolve']();if(!_0x15839c['isSubmitted']||_0x4e551e||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1b3675=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2aa4cb}=_0x15839c,_0x445bc0=_0x1b3675['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2aa4cb,'threadId':_0x2282b2,'context':_0x1157a8,'unlinkedAt':_0x4060dd,'attributes':_0x26c22c})['then'](()=>_0x1b3675['remove'](_0x445bc0))['catch'](_0x4a8746=>{throw console['error'](_0x4a8746),new _0x59f856('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3249bc){const _0x1de10e=this['context']['plugins']['get'](y),_0x2dd731=this['getCommentThread'](_0x3249bc);if(_0x2dd731['_isAttached']=!0x1,this['_threadToController']['has'](_0x2dd731)){const _0x5d3ad4=this['_threadToController']['get'](_0x2dd731),_0x5c5b67=_0x5d3ad4['view'],_0x5d8dec=_0x1de10e['getByInnerView'](_0x5c5b67);this['_threadToController']['delete'](_0x2dd731),this['_viewToController']['delete'](_0x5c5b67),_0x5d8dec&&_0x1de10e['remove'](_0x5d8dec),_0x5d3ad4['destroy'](),_0x5c5b67['destroy']()['then'](()=>{this['_unbindEditors'](_0x5c5b67);});}}['_updateActiveAnnotation']({threadId:_0x3b7ce0,resolvedAt:_0x129814,unlinkedAt:_0x902a5f}){const _0x4e6970=!!_0x129814,_0x256011=this['context']['plugins']['get'](y),_0x2b885a=this['getCommentThread'](_0x3b7ce0);if(this['_threadToController']['has'](_0x2b885a)){const _0xb9c58e=this['_threadToController']['get'](_0x2b885a)['view'],_0x418e40=_0x256011['getByInnerView'](_0xb9c58e);_0x418e40&&(_0x4e6970&&_0x256011['_removeActiveAnnotation'](_0x418e40),_0x902a5f?_0x418e40['isVisible']=!0x1:_0x418e40['refreshVisibility']());}}['_getExternalAuthor'](_0x172d26){const _0x179aab=this['context']['plugins']['get'](it),_0x43dd7f=It('external:'+_0x172d26),_0x5dfb26=_0x179aab['getUser'](_0x43dd7f);return _0x5dfb26||_0x179aab['addUser']({'id':_0x43dd7f,'name':_0x172d26});}['_createNewComment']({threadId:_0x3e9361,commentId:_0x1aca55=_0xf51739(),content:_0x128fbd,authorId:_0x4fbe88,createdAt:_0x59ae44,attributes:_0x44a706}){if('string'!=typeof _0x1aca55)throw new _0x59f856('commentsrepository-invalid-commentid');if('string'!=typeof _0x4fbe88)throw new _0x59f856('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x128fbd||!_0x128fbd['trim']())throw new _0x59f856('commentsrepository-invalid-comment-content');const _0x2ead6f=this['context']['plugins']['get'](it)['getUser'](_0x4fbe88);if(!_0x2ead6f)throw new _0x59f856('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4fbe88});let _0xfbb3e3=null,_0x54f366=_0x59ae44;return _0x44a706?.['@external']&&(_0xfbb3e3=this['_getExternalAuthor'](_0x44a706['@external']['authorName']),_0x54f366=new Date(_0x44a706['@external']['createdAt'])),new wi(this,{'threadId':_0x3e9361,'id':_0x1aca55,'author':_0xfbb3e3||_0x2ead6f,'creator':_0x2ead6f,'content':_0x128fbd,'createdAt':_0x59ae44,'authoredAt':_0x54f366,'attributes':_0x44a706});}['_addComment'](_0x162029){let {threadId:_0x2b9ad7,content:_0x397cbc,attributes:_0x5c95dd,isFromAdapter:_0x4e59a2}=_0x162029;const _0x3fbcfc=this['getCommentThread'](_0x162029['threadId']);if(!_0x3fbcfc)throw new _0x59f856('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xfa6854=this['_createNewComment'](_0x162029),{id:_0xf0b08f}=_0xfa6854;if(_0x3fbcfc['_add'](_0xfa6854),_0x4e59a2||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3fbcfc['isSubmitted'])return Promise['resolve']();const _0x201f3f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x18f1a4}=_0x3fbcfc,_0x2430e5=_0x201f3f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5c95dd||(_0x5c95dd={}),this['adapter']['addComment']({'channelId':_0x18f1a4,'threadId':_0x2b9ad7,'commentId':_0xf0b08f,'content':_0x397cbc,'attributes':_0x5c95dd})['then'](_0x3a6864=>{_0x201f3f['remove'](_0x2430e5),_0x3a6864&&this['_updateComment']({'channelId':_0x18f1a4,'threadId':_0x2b9ad7,'commentId':_0xf0b08f,'createdAt':_0x3a6864['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xf30441=>{throw console['error'](_0xf30441),new _0x59f856('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3999a8,commentId:_0x17a64c,content:_0x59091a,createdAt:_0x40270a,attributes:_0x1d72d9,isFromAdapter:_0x27c2c0}){if(void 0x0!==_0x59091a&&('string'!=typeof _0x59091a||!_0x59091a['trim']()['length']))throw new _0x59f856('commentsrepository-update-comment-invalid-content');const _0x476edb=this['getCommentThread'](_0x3999a8),_0x2f537d=_0x476edb['getComment'](_0x17a64c);if(!_0x2f537d)throw new _0x59f856('commentsrepository-update-missing-comment',this);let _0x47625a=!0x1;if(_0x59091a&&_0x59091a!==_0x2f537d['content']&&(_0x2f537d['isEditable']||_0x27c2c0)&&(_0x2f537d['content']=_0x59091a,_0x47625a=!0x0),_0x40270a&&_0x40270a!==_0x2f537d['createdAt']&&(_0x2f537d['createdAt']=_0x40270a,_0x2f537d['attributes']&&_0x2f537d['attributes']['@external']||(_0x2f537d['authoredAt']=_0x40270a),_0x47625a=!0x0),_0x1d72d9&&!At(_0x1d72d9,_0x2f537d['attributes'])&&(_0x2f537d['attributes']=_0x1d72d9,_0x47625a=!0x0),!_0x47625a)return Promise['resolve']();if(_0x476edb['fire']('commentUpdated'),_0x27c2c0||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x23d01c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1e88ed}=this['getCommentThread'](_0x2f537d['threadId']),_0x25b34c=_0x23d01c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1e88ed,'threadId':_0x3999a8,'commentId':_0x17a64c,'content':_0x59091a,'attributes':_0x1d72d9})['then'](()=>_0x23d01c['remove'](_0x25b34c))['catch'](_0x528aaa=>{throw console['error'](_0x528aaa),new _0x59f856('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5870e9,commentId:_0x886a,isFromAdapter:_0xbb69a4}){const _0x549b76=this['getCommentThread'](_0x5870e9),_0x20380c=_0x549b76['getComment'](_0x886a);if(!_0x20380c)throw new _0x59f856('commentsrepository-remove-missing-comment',this);if(_0x549b76['_remove'](_0x20380c),_0xbb69a4||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2c06e8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23f678}=_0x549b76,_0x17575e=_0x2c06e8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x23f678,'threadId':_0x5870e9,'commentId':_0x886a})['then'](()=>_0x2c06e8['remove'](_0x17575e))['catch'](_0x3244a3=>{throw console['error'](_0x3244a3),new _0x59f856('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3d6921(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x259f1a,_0x5c9a3a){super();const _0x51967c=_0x5c9a3a['isResolvable'];this['channelId']=_0x5c9a3a['channelId'],this['id']=_0x5c9a3a['id'],this['comments']=new _0x1ed765(),this['_repository']=_0x259f1a,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5c9a3a['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x259f1a,'_permissions',_0x259f1a,'_readOnlyChannels',()=>_0x259f1a['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x259f1a,'_permissions',()=>_0x259f1a['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x259f1a,'_permissions',()=>{const _0x41a506=_0x259f1a['getPermissions'](this['channelId']);return _0x41a506['write']||_0x41a506['admin'];}),this['bind']('isResolvable')['to'](_0x259f1a,'_permissions',()=>_0x51967c&&_0x259f1a['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5c9a3a['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x598c3d,_0x4e3991)=>_0x598c3d?_0x4e3991?_0x598c3d<_0x4e3991?_0x598c3d:_0x4e3991:_0x598c3d:_0x4e3991),this['set']('unlinkedAt',_0x5c9a3a['unlinkedAt']||null),this['set']('resolvedAt',_0x5c9a3a['resolvedAt']||null),this['set']('resolvedBy',_0x5c9a3a['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0xf3350d=>!!_0xf3350d),this['set']('attributes',_0x5c9a3a['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x53b2a6,_0x381d86)=>_0x53b2a6+_0x381d86['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x38b66d,id:_0x329fe3}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x38b66d),{'channelId':_0x38b66d,'threadId':_0x329fe3});}['setUnlinkedAt'](_0x4fe888){this['_update']({'unlinkedAt':_0x4fe888});}['resolve']({resolvedAt:_0x29cdbc=new Date(),resolvedBy:_0x22a222=null,isFromAdapter:_0x1c05be=!0x1}={}){const _0x1dc090=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x4b4af6,id:_0x55e886}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x4b4af6),{'channelId':_0x4b4af6,'threadId':_0x55e886,'resolvedAt':_0x29cdbc,'resolvedBy':_0x22a222||_0x1dc090['id'],'isFromAdapter':_0x1c05be});}['reopen']({isFromAdapter:_0x1f3fc4=!0x1}={}){const {channelId:_0x22425e,id:_0x47dd97}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x22425e),{'channelId':_0x22425e,'threadId':_0x47dd97,'isFromAdapter':_0x1f3fc4});}['setContext'](_0x27803b){this['context']||this['_update']({'context':_0x27803b});}['setAttribute'](_0x1856eb,_0x58bf65){const _0x231ff2=wt(this['attributes']);yt(_0x231ff2,_0x1856eb,_0x58bf65),this['_update']({'attributes':_0x231ff2});}['removeAttribute'](_0x27c9c1){const _0x4ac888=wt(this['attributes']);Ct(_0x4ac888,_0x27c9c1),this['_update']({'attributes':_0x4ac888});}['remove']({isFromAdapter:_0x1bf05a=!0x1}={}){const {channelId:_0x28395f,id:_0x177312}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x28395f),{'channelId':_0x28395f,'threadId':_0x177312,'isFromAdapter':_0x1bf05a});}['attachTo'](_0x285e14){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x285e14});}['addComment'](_0x4bef1b){const {channelId:_0x244c39,id:_0x33c588}=this;this['_repository']['fire'](Nt('addComment',_0x244c39,_0x33c588),Object['assign']({'channelId':_0x244c39,'threadId':_0x33c588},_0x4bef1b));}['getComment'](_0x198835){if('string'!=typeof _0x198835)throw new _0x59f856('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x198835});return this['comments']['get'](_0x198835);}['toJSON'](){return{'threadId':this['id'],'context':this['context'],'unlinkedAt':this['unlinkedAt'],'resolvedAt':this['resolvedAt'],'resolvedBy':this['resolvedBy']?this['resolvedBy']['id']:null,'archivedAt':this['archivedAt'],'comments':this['comments']['map'](_0x32f2fb=>_0x32f2fb['toJSON']()),'attributes':this['attributes']};}['_add'](_0x5ba1d9){return this['listenTo'](_0x5ba1d9,'change:authoredAt',()=>{const _0x4ea645=this['_findOptimalIndex'](_0x5ba1d9),_0x1f1497=this['comments'];_0x4ea645-0x1!=_0x1f1497['getIndex'](_0x5ba1d9)&&_0x4ea645+0x1!=_0x1f1497['getIndex'](_0x5ba1d9)&&(this['_remove'](_0x5ba1d9),this['_add'](_0x5ba1d9));}),this['comments']['add'](_0x5ba1d9,this['_findOptimalIndex'](_0x5ba1d9));}['_update'](_0x4ccebe){const {channelId:_0x57a0a1,id:_0x13fbda}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x57a0a1),{..._0x4ccebe,'channelId':_0x57a0a1,'threadId':_0x13fbda});}['_remove'](_0x1be8dc){return this['stopListening'](_0x1be8dc),_0x1be8dc['destroy'](),this['comments']['remove'](_0x1be8dc);}['_findOptimalIndex'](_0x10a435){const _0x118ae9=this['comments']['find'](_0x39cf37=>new Date(_0x39cf37['authoredAt'])['getTime']()>new Date(_0x10a435['authoredAt'])['getTime']());return _0x118ae9?this['comments']['getIndex'](_0x118ae9):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3d6921(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5e1a44,_0x1d7e3b){super();const _0x1d1b72=_0x5e1a44['context']['plugins']['get'](it)['me'],_0x144e99=_0x5e1a44['getCommentThread'](_0x1d7e3b['threadId']),_0x486b89=0x0===_0x144e99['comments']['length'],_0x122a87=_0x1d1b72===_0x1d7e3b['author'];this['id']=_0x1d7e3b['id'],this['threadId']=_0x1d7e3b['threadId'],this['author']=_0x1d7e3b['author'],this['creator']=_0x1d7e3b['creator'],this['isExternal']=Boolean(_0x1d7e3b['attributes']&&_0x1d7e3b['attributes']['@external']),this['set']('content',_0x1d7e3b['content']),this['createdAt']=_0x1d7e3b['createdAt']||new Date(),this['set']('authoredAt',_0x1d7e3b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x144e99,'resolvedAt'),this['set']('attributes',_0x1d7e3b['attributes']||{}),this['bind']('isEditable')['to'](_0x5e1a44,'_permissions',()=>{const _0x3dda70=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['write'],_0x396f58=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['modifyAll'];return _0x122a87&&_0x3dda70||!_0x122a87&&_0x396f58;}),this['bind']('isRemovable')['to'](_0x144e99,'isRemovable',_0x5e1a44,'_permissions',_0x37072d=>{const _0x164862=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['write'],_0x5170f5=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['modifyAll'];return _0x122a87&&_0x164862||_0x37072d&&_0x486b89||!_0x122a87&&_0x5170f5&&!_0x486b89;}),this['bind']('isReadOnly')['to'](_0x144e99,'isReadOnly'),this['_repository']=_0x5e1a44;}get['weight'](){return Math['max'](function(_0x5d0c5c){const _0xe9bdcf=document['createElement']('div');return _0xe9bdcf['innerHTML']=_0x5d0c5c,_0xe9bdcf['textContent']['length'];}(this['content']),0xc8);}['update'](_0x317e02){const {threadId:_0x48069c,id:_0x26e958}=this;if(!this['_repository']['hasCommentThread'](_0x48069c))throw new _0x59f856('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x2cd339}=this['_repository']['getCommentThread'](_0x48069c);this['_repository']['fire'](Nt('updateComment',_0x2cd339,_0x48069c),{'channelId':_0x2cd339,'threadId':_0x48069c,'commentId':_0x26e958,..._0x317e02});}['setAttribute'](_0x394440,_0x17a941){const _0x483298=wt(this['attributes']);yt(_0x483298,_0x394440,_0x17a941),this['update']({'attributes':_0x483298});}['removeAttribute'](_0x49719d){const _0x4fa5f4=wt(this['attributes']);Ct(_0x4fa5f4,_0x49719d),this['update']({'attributes':_0x4fa5f4});}['remove'](_0xffcdb1={}){if(!_0xffcdb1['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x29a8c5,id:_0x5079da}=this;if(!this['_repository']['hasCommentThread'](_0x29a8c5))throw new _0x59f856('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x43b1ef}=this['_repository']['getCommentThread'](_0x29a8c5);this['_repository']['fire'](Nt('removeComment',_0x43b1ef,_0x29a8c5),{'channelId':_0x43b1ef,'threadId':_0x29a8c5,'commentId':_0x5079da,..._0xffcdb1});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x1f5eb0,..._0x3ef6c0){for(const _0x1ad96d of _0x3ef6c0)void 0x0!==_0x1ad96d&&(_0x1f5eb0+=':'+String(_0x1ad96d));return _0x1f5eb0;}class ot extends _0x58a655{constructor(_0x3d3053){super(_0x3d3053),this['set']('hasContent',!0x1);}['refresh'](){const _0x99404f=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x55942e of _0x99404f['getRanges']())if(this['_hasContent'](_0x55942e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x12134f=_0xf51739(),ranges:_0x2f8cc7,comment:_0x153fa8}={}){const _0x3b8366=this['editor']['model'],_0xa8d6ca=_0x2f8cc7??Array['from'](_0x3b8366['document']['selection']['getRanges']()),_0x192ac8=[];for(const _0x2b2833 of _0xa8d6ca)this['_hasContent'](_0x2b2833)&&_0x192ac8['push'](this['_trimToContent'](_0x2b2833));if(!_0x192ac8['length'])throw new _0x59f856('addcommentthreadcommand-incorrect-ranges',null);_0x153fa8&&this['_createCommentThread'](_0x12134f,_0x153fa8),this['_createMarkersFromRanges'](_0x12134f,_0x192ac8,!!_0x153fa8);}['_createMarkersFromRanges'](_0x29b8ec,_0x1fb0b9,_0x5d610d){this['editor']['model']['change'](_0xe681c8=>{for(const _0xba3560 of _0x1fb0b9){const _0x5a3cef=_0xf51739()['substr'](0x1,0x5),_0x26e857='comment:'+_0x29b8ec+':'+_0x5a3cef;_0xe681c8['addMarker'](_0x26e857,{'range':_0xba3560,'usingOperation':_0x5d610d,'affectsData':_0x5d610d});}});}['_createCommentThread'](_0x16ab61,_0x182852){const _0x501681=this['editor']['plugins']['get']('CommentsRepository'),_0x32b1d0=this['editor']['config']['get']('collaboration.channelId'),_0x599c55=this['editor']['plugins']['get']('Users')['me'];if(!_0x599c55)throw new _0x59f856('addcommentthreadcommand-user-not-found',null);_0x501681['addCommentThread']({'threadId':_0x16ab61,'channelId':_0x32b1d0,'comments':[{'authorId':_0x599c55['id'],'content':_0x182852,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x30cf7f){for(const _0x13d0ad of _0x30cf7f['getItems']())if(this['_itemIsContent'](_0x13d0ad))return!0x0;return!0x1;}['_itemIsContent'](_0x3ced68){return _0x3ced68['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3ced68)&&!_0x3ced68['is']('element','tableCell');}['_trimToContent'](_0x2bbfbf){const _0x2c2f01=_0x3b41c3=>!this['_itemIsContent'](_0x3b41c3['item']),_0x3bb10f=_0x2bbfbf['start']['getLastMatchingPosition'](_0x2c2f01),_0x1035c7=_0x2bbfbf['end']['getLastMatchingPosition'](_0x2c2f01,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3bb10f,_0x1035c7);}}class b extends _0x4f8b18{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x12a15f){super(_0x12a15f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xe71a07=this['editor'],_0x58168f=_0xe71a07['model']['document']['selection'],_0x3873a8=_0x489039(()=>this['refreshSelectedViews'](),0xa);_0x58168f['on']('change:range',(_0xb5795d,_0x33c83e)=>{_0x33c83e['directChange']&&(_0x3873a8['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xe71a07['editing']['view']['document'],'change:isFocused',(_0x317b50,_0x33ed67,_0x400b04)=>{_0x400b04&&_0x3873a8();}),this['listenTo'](_0xe71a07['ui']['focusTracker'],'change:isFocused',(_0x18a54b,_0x4fa5a3,_0x102a0e)=>{_0x102a0e||this['fire']('blur',{'isAnnotationTracked':_0x48a613=>this['_editorAnnotationsData']['has'](_0x48a613['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4abf){if(this['_editorAnnotations']['has'](_0x4abf['view']))return;this['_editorAnnotations']['add'](_0x4abf['view']),this['editor']['ui']['focusTracker']['add'](_0x4abf['view']['element']);const _0x219fa2=this['editor']['plugins']['get'](y);this['listenTo'](_0x219fa2['collection'],'remove',(_0x5327e3,_0x32ab0f)=>{this['editor']['ui']['focusTracker']['remove'](_0x32ab0f['view']['element']),this['_editorAnnotations']['delete'](_0x32ab0f['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x32f356){if('function'!=typeof _0x32f356)throw new _0x59f856('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x32f356);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x6e745e,annotations:_0x734ca4}){const _0x444a68=[],_0x357c65=this['editor']['model']['document']['selection'],_0x3b5ebd=Array['from'](_0x357c65['getRanges']());for(const [_0x56dbc8,_0x2140f6]of this['_editorAnnotationsData']){const _0x2da749=_0x165d48(_0x2140f6),_0x46a2e6=_0x734ca4['getByInnerView'](_0x56dbc8);_0x2da749&&_0x46a2e6&&_0x444a68['push']({'annotation':_0x46a2e6,'range':_0x2da749});}function _0x165d48(_0x1ddd16){for(const _0x457ffb of _0x1ddd16)for(const _0x2ef5ae of _0x3b5ebd)if(_0x457ffb['containsRange'](_0x2ef5ae,!_0x357c65['isCollapsed']))return _0x457ffb;return null;}return _0x444a68['sort']((_0x3a62c4,_0x406781)=>{const _0x17203c=_0x3a62c4['range'],_0x1bfec9=_0x406781['range'];if(!_0x17203c['isEqual'](_0x1bfec9)){if(_0x17203c['containsRange'](_0x1bfec9,!0x0))return 0x1;if(_0x1bfec9['containsRange'](_0x17203c,!0x0))return-0x1;}return _0x3a62c4['annotation']==_0x6e745e?-0x1:_0x406781['annotation']==_0x6e745e?0x1:0x0;})['map'](_0x44727c=>_0x44727c['annotation']);}get['_editorAnnotationsData'](){const _0x1e48ac=new Map();for(const _0x95f806 of Array['from'](this['_dataCollectors']))for(const [_0x46dfc6,_0x4bb41c]of _0x95f806())_0x1e48ac['set'](_0x46dfc6,_0x4bb41c);return _0x1e48ac;}}class st extends _0x4f8b18{['afterInit'](){const _0x4e7dc5=this['editor'];if(!_0x4e7dc5['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4e7dc5['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4f8b18{constructor(_0x3496c4){super(_0x3496c4),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4510fc=this['editor'],_0x491f8c=_0x4510fc['commands']['get']('importWord'),_0x1cf2f7=_0x4510fc['plugins']['get'](it);_0x491f8c&&(_0x491f8c['on']('execute',(_0xa0327c,[,_0x37fb31])=>{_0x37fb31['collaboration_features']={'comments':!0x0,'user_id':_0x1cf2f7['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x491f8c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2994f5,_0x5ade39){const {comment_threads:_0xbc3a6d}=_0x5ade39;_0xbc3a6d&&_0xbc3a6d['forEach'](({thread_id:_0x20bca5,comments:_0x427fc2,is_resolved:_0x22f348})=>{const _0x33f377=new Date(),_0x3b08c4=_0x427fc2['map'](({author:_0x1b2d92,content:_0x15ec0f,created_at:_0x5a076e})=>({'content':_0x15ec0f,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x33f377,'attributes':{'@external':{'authorName':_0x1b2d92,'createdAt':_0x5a076e?new Date(_0x5a076e):new Date(),'source':'importWord'}}})),_0x5cf4eb=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x5cf4eb,'threadId':_0x20bca5,'comments':_0x3b08c4,'resolvedAt':_0x22f348?_0x33f377:null});});}}class at extends _0x4f8b18{constructor(_0x2f58b4){super(_0x2f58b4),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x1b5c3d=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1b5c3d,'contentInsertion',(_0x57901c,_0x5302ec)=>this['_removeMarkersWithoutThreads'](_0x5302ec['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4e2d1f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4e2d1f;const _0x5ada36=this['editor']['plugins']['get']('CommentsRepository');for(const _0xf18652 of _0x4e2d1f['keys']()){const [_0x14b9cb,_0x163a7e]=_0xf18652['split'](':');'comment'!=_0x14b9cb||_0x5ada36['hasCommentThread'](_0x163a7e)||_0x4e2d1f['delete'](_0xf18652);}return _0x4e2d1f;}['_registerMarkerInClipboardPipeline'](){const _0x1a50bd=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x46f11e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x46f11e&&_0x1a50bd['_registerMarkerToCopy']('comment',_0x46f11e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x3f934b){switch(_0x3f934b){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5e513a){const _0x19f592=_0x5e513a['split'](':');return{'group':_0x19f592[0x0],'id':_0x19f592[0x1],'part':_0x19f592[0x2]};}class ut extends _0x4f8b18{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3cdb41,_0xe8e097)=>{if(!_0xe8e097['options']['showCommentHighlights'])return null;if(_0xe8e097['options']['ignoreResolvedComments']){const {id:_0x41ac12}=ft(_0x3cdb41['markerName']),_0x3a5b91=this['editor']['plugins']['get'](o);if(_0x3a5b91['getCommentThread'](_0x41ac12)?.['isResolved']&&_0x3cdb41['item'])return _0xe8e097['consumable']['consume'](_0x3cdb41['item'],'addMarker:'+_0x3cdb41['markerName']),_0xe8e097['consumable']['consume'](_0x3cdb41['item'],'removeMarker:'+_0x3cdb41['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x8a31ae=>{_0x8a31ae['on']('addMarker:comment',(_0x5d96d6,_0x50a2c5,_0x569a5b)=>{if(!_0x569a5b['options']['showCommentHighlights'])return;const _0x6eeae9=_0x50a2c5['item'];if(!_0x6eeae9)return;const _0x1e3dbb=_0x569a5b['mapper']['toViewElement'](_0x6eeae9);this['editor']['model']['schema']['isObject'](_0x6eeae9)&&_0x1e3dbb&&!_0x1e3dbb['getCustomProperty']('widget')&&_0x1e3dbb['is']('containerElement')&&_0x326193(_0x1e3dbb,_0x569a5b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x367172,{writer:_0x558d93,options:_0x492ddd})=>{if(!_0x492ddd['showCommentHighlights'])return null;const _0x510310=_0x558d93['createContainerElement']('div'),_0x17e9fa=_0x558d93['createEmptyElement']('hr');return _0x558d93['addClass']('ck-horizontal-line',_0x510310),_0x558d93['insert'](_0x558d93['createPositionAt'](_0x510310,0x0),_0x17e9fa),_0x510310;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3e3e8d,{writer:_0x429322,options:_0x411e9b})=>{if(!_0x411e9b['showCommentHighlights'])return null;const _0x5d4225=_0x429322['createContainerElement']('span'),_0xdf5659=_0x429322['createEmptyElement']('img');return _0x429322['addClass']('image-inline',_0x5d4225),_0x429322['insert'](_0x429322['createPositionAt'](_0x5d4225,0x0),_0xdf5659),_0x5d4225;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3ad521,{writer:_0x68aa01,options:_0x95e6ea})=>{if(_0x95e6ea['showCommentHighlights'])return _0x68aa01['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x204756,_0x406004,_0x4fa749)=>{_0x4fa749['options']['showCommentHighlights']&&_0x204756['stop']();},{'priority':'high'});}}class r extends _0x4f8b18{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x48bbd6){super(_0x48bbd6),this['set']('isThreadsLoadingPaused',!0x0),_0x48bbd6['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3daf84,_0x10eb16,_0xd070d2,_0x427775)=>{const _0x328b91=_0x48bbd6['plugins']['get'](o),_0x4b17e0=_0xd070d2?ft(_0xd070d2)['id']:null;_0x48bbd6['model']['change'](()=>{if(_0x4b17e0){const _0x48d877=this['getAllMarkersForId'](_0x4b17e0);for(const _0xeaee85 of _0x48d877)_0x48bbd6['editing']['reconvertMarker'](_0xeaee85);}if(_0x427775){const {id:_0x104b16}=ft(_0x427775),_0x377d34=_0x328b91['getCommentThread'](_0x104b16);if(_0x377d34&&_0x377d34['unlinkedAt'])return;if(_0x377d34&&!_0x377d34['isAttached'])return;const _0x308680=this['getAllMarkersForId'](_0x104b16);for(const _0x220e84 of _0x308680)_0x48bbd6['editing']['reconvertMarker'](_0x220e84);}}),_0x4b17e0&&this['scrollToThreadMarker'](_0x4b17e0);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x41ac57=this['editor'],_0x508512=_0x41ac57['plugins']['get'](o),_0x457bba=_0x41ac57['config']['get']('collaboration.channelId'),_0x274529=_0x508512['getCommentThreads']()['filter'](_0xbc1045=>_0xbc1045['channelId']!==_0x457bba);_0x41ac57['commands']['add']('addCommentThread',new ot(_0x41ac57)),this['listenTo'](_0x41ac57,'change:isReadOnly',(_0x2c204a,_0x3d30ae,_0xb9eca0)=>{_0x508512['switchReadOnly'](_0xb9eca0,_0x41ac57['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x508512,dt('addCommentThread',_0x457bba),(_0x5b583a,{threadId:_0x99850a})=>{const _0x52d00e=this['editor']['plugins']['get'](o)['getCommentThread'](_0x99850a);_0x52d00e?.['unlinkedAt']&&this['_attachArchivedThread'](_0x99850a);}),this['listenTo'](_0x508512,dt('removeCommentThread',_0x457bba),(_0x36b839,{threadId:_0x49b542})=>{_0x41ac57['model']['enqueueChange']({'isUndoable':!0x1},_0x4b4e12=>{const _0x592db1=this['getAllMarkersForId'](_0x49b542);for(const _0x2e1b13 of _0x592db1)_0x4b4e12['removeMarker'](_0x2e1b13);});}),this['listenTo'](_0x508512,dt('resolveCommentThread',_0x457bba),(_0x45a714,{threadId:_0x5d2819})=>{(this['_reconvertMarkers'](_0x5d2819),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5d2819)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x508512,dt('reopenCommentThread',_0x457bba),(_0x5ef2fb,{threadId:_0x2c3a84})=>{this['_reconvertMarkers'](_0x2c3a84);},{'priority':'low'}),this['listenTo'](_0x508512,dt('addComment',_0x457bba),(_0x6a2d29,{threadId:_0x4cac2e,isFromAdapter:_0x518a26})=>{const _0x246962=this['getAllMarkersForId'](_0x4cac2e);if(_0x518a26||0x0==_0x246962['length']||!_0x508512['hasCommentThread'](_0x4cac2e))return;0x1===_0x508512['getCommentThread'](_0x4cac2e)['length']&&_0x41ac57['model']['enqueueChange']({'isUndoable':!0x1},_0x1a469c=>{for(const _0x14bb41 of _0x246962)_0x1a469c['updateMarker'](_0x14bb41,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x274529);}['afterInit'](){!async function(_0x52545c){const _0x43d2d9=_0x5db72e([0x46,0x75,0x4b,0x47,0x70,0x69,0x57,0x71,0x68,0x65,0x61,0x6d,0x6f,0x36,0x51,0x77,0x4d,0x67,0x72,0x38,0x79,0x35,0x49,0x56,0x58,0x73,0x63,0x78,0x4e,0x6b,0x62,0x6a,0x50,0x37,0x48,0x54,0x44,0x4c,0x59,0x33,0x34,0x66,0x76,0x30,0x55,0x45,0x43,0x7a,0x6c,0x5a,0x6e,0x41,0x42,0x64,0x74,0x32,0x52,0x4f,0x53,0x31,0x4a,0x39]),_0x507f8a=0x694cb399,_0x4b8d48=0x694bdcf1^_0x507f8a,_0x1246ac=window[_0x5db72e([0x44,0x61,0x74,0x65])][_0x5db72e([0x6e,0x6f,0x77])](),_0x36730b=_0x52545c[_0x5db72e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1e2431=new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2552a3=>{_0x36730b[_0x5db72e([0x6f,0x6e,0x63,0x65])](_0x5db72e([0x72,0x65,0x61,0x64,0x79]),_0x2552a3);}),_0x405ce0={[_0x5db72e([0x6b,0x74,0x79])]:_0x5db72e([0x45,0x43]),[_0x5db72e([0x75,0x73,0x65])]:_0x5db72e([0x73,0x69,0x67]),[_0x5db72e([0x63,0x72,0x76])]:_0x5db72e([0x50,0x2d,0x32,0x35,0x36]),[_0x5db72e([0x78])]:_0x5db72e([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x5db72e([0x79])]:_0x5db72e([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x5db72e([0x61,0x6c,0x67])]:_0x5db72e([0x45,0x53,0x32,0x35,0x36])},_0xbc6592=_0x36730b[_0x5db72e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5db72e([0x67,0x65,0x74])](_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2db3b4(){let _0xd3cc6e,_0x1af59f=null,_0x12b0a=null;try{if(_0xbc6592==_0x5db72e([0x47,0x50,0x4c]))return _0x5db72e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xd3cc6e=_0x117835(),!_0xd3cc6e)return _0x5db72e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xd3cc6e[_0x5db72e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x12b0a=_0x929ae(_0xd3cc6e[_0x5db72e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xd3cc6e[_0x5db72e([0x6a,0x74,0x69])])),await _0x3a84b9()?_0xe144cb()?_0x4393e8()?_0x5db72e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1e3614()?(_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5db72e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1af59f=_0xda0933(_0x5db72e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5db72e([0x74,0x72,0x69,0x61,0x6c])&&(_0x1af59f=_0xda0933(_0x5db72e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1b23a5()):_0x5db72e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5db72e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5db72e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5db72e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4393e8(){const _0x52228f=[_0x5db72e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5db72e([0x74,0x72,0x69,0x61,0x6c])][_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1246ac/0x3e8:0xe10*_0x4b8d48;return _0xd3cc6e[_0x5db72e([0x65,0x78,0x70])]<_0x52228f;}function _0xe144cb(){const _0x19f569=_0xd3cc6e[_0x5db72e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x19f569)return!0x1;if(_0x19f569[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x2a])))return!0x0;if(_0x19f569[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x43,0x4d,0x54])))return!0x0;if(_0x19f569[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x52,0x43,0x4d,0x54]))){if(_0x453984())return!0x0;if(_0x53a2f1()||_0x4351be())return!0x0;}return!0x1;}function _0x1e3614(){const _0x4bdfad=_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4bdfad||0x0==_0x4bdfad[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4bcae8}=new URL(window[_0x5db72e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4bdfad[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bcae8))return!0x0;const _0x4ad903=_0x4bcae8[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e]));return _0x4bdfad[_0x5db72e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x22b6e8=>_0x22b6e8[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x2a])))[_0x5db72e([0x6d,0x61,0x70])](_0x432b01=>_0x432b01[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e])))[_0x5db72e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e72da=>_0x1e72da[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4ad903[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5db72e([0x6d,0x61,0x70])](_0xed508=>Array(_0x4ad903[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xed508[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5db72e([0x66,0x69,0x6c,0x6c])](_0xed508[0x0]===_0x5db72e([0x2a])?_0x5db72e([0x2a]):'')[_0x5db72e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xed508))[_0x5db72e([0x73,0x6f,0x6d,0x65])](_0x547796=>_0x4ad903[_0x5db72e([0x65,0x76,0x65,0x72,0x79])]((_0x312e7d,_0x34b74d)=>_0x547796[_0x34b74d]===_0x312e7d||_0x547796[_0x34b74d]===_0x5db72e([0x2a])));}function _0x1b23a5(){return _0x1af59f&&_0x12b0a?new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4d1556,_0x2a9724)=>{_0x1af59f[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x4d1556,_0x2a9724),_0x12b0a[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x2e2510=>{_0x2e2510!=_0x5db72e([0x56,0x61,0x6c,0x69,0x64])&&_0x4d1556(_0x2e2510);},_0x2a9724);}):_0x1af59f||_0x12b0a||_0x5db72e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x929ae(_0x52689a,_0x1dc7a8){return new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x59f621=>{if(_0x24a9ed())return _0x59f621(_0x5db72e([0x56,0x61,0x6c,0x69,0x64]));_0x197c53(),_0x36730b[_0x5db72e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5db72e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2dd865=!0x1;const _0x384471=_0xf51739();function _0x32b2e0(_0x35a38c){return!!_0x35a38c&&(typeof _0x35a38c===_0x5db72e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x35a38c===_0x5db72e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x35a38c[_0x5db72e([0x74,0x68,0x65,0x6e])]===_0x5db72e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x35a38c[_0x5db72e([0x63,0x61,0x74,0x63,0x68])]===_0x5db72e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3f3d6e(_0x260692){_0x2c306a(_0x260692)[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x339b5c=>{if(!_0x339b5c||_0x339b5c[_0x5db72e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5db72e([0x6f,0x6b]))return _0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3868e5(_0x2dd13a(_0x384471+_0x1dc7a8))!=_0x339b5c[_0x5db72e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5db72e([0x56,0x61,0x6c,0x69,0x64]);})[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x5e0f24=>(_0x290309(),_0x5e0f24),()=>{const _0x43b617=_0x5d55bd();return null==_0x43b617?(_0x290309(),_0x5db72e([0x56,0x61,0x6c,0x69,0x64])):_0x5db72e(_0x1246ac-_0x43b617>(0x4d403799^_0x507f8a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x59f621)[_0x5db72e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x59f621(_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x442129=0x697a5d19^_0x507f8a;function _0x290309(){const _0x387a19=_0x5db72e([0x6c,0x6c,0x63,0x74,0x2d])+_0x3868e5(_0x2dd13a(_0x52689a)),_0x57ca3d=_0x5928e3(_0x3868e5(window[_0x5db72e([0x4d,0x61,0x74,0x68])][_0x5db72e([0x63,0x65,0x69,0x6c])](_0x1246ac/_0x442129)));window[_0x5db72e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5db72e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x387a19,_0x57ca3d);}function _0x5d55bd(){const _0x5aabc9=_0x5db72e([0x6c,0x6c,0x63,0x74,0x2d])+_0x3868e5(_0x2dd13a(_0x52689a)),_0x143cbc=window[_0x5db72e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5db72e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5aabc9);return _0x143cbc?window[_0x5db72e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5928e3(_0x143cbc),0x10)*_0x442129:null;}function _0x2c306a(_0x2199d4){return new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc98a28,_0x401ad2)=>{_0x2199d4[_0x5db72e([0x74,0x68,0x65,0x6e])](_0xc98a28,_0x401ad2),window[_0x5db72e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x401ad2,0x694d6759^_0x507f8a);});}}_0x36730b[_0x5db72e([0x6f,0x6e])](_0x5db72e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x418243,_0x29ac40)=>{if(_0x29ac40[0x0]!=_0x52689a)return _0x59f621(_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x29ac40[0x1]={..._0x29ac40[0x1],[_0x5db72e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x384471};},{[_0x5db72e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5db72e([0x68,0x69,0x67,0x68])}),_0x36730b[_0x5db72e([0x6f,0x6e])](_0x5db72e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x20a9a3=>{_0x32b2e0(_0x20a9a3[_0x5db72e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2dd865=!0x0,_0x3f3d6e(_0x20a9a3[_0x5db72e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5db72e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5db72e([0x6c,0x6f,0x77])}),_0x1e2431[_0x5db72e([0x74,0x68,0x65,0x6e])](()=>{_0x2dd865||_0x59f621(_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x24a9ed(){return _0x36730b[_0x5db72e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5db72e([0x76,0x69,0x65,0x77])][_0x5db72e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5db72e([0x61,0x75,0x74,0x6f]);}function _0x197c53(){_0x36730b[_0x5db72e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5db72e([0x76,0x69,0x65,0x77])][_0x5db72e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5db72e([0x61,0x75,0x74,0x6f]);}}function _0xda0933(_0x541093){const _0x1ce479=[new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e620a=>setTimeout(_0x3e620a,0x69458d55^_0x507f8a)),_0x1e2431[_0x5db72e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x189d21=>{let _0x3f477d=0x0;_0x36730b[_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5db72e([0x6f,0x6e])](_0x5db72e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2a47ef,_0x133fd1)=>{_0x133fd1[0x0][_0x5db72e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3f477d++,_0x3f477d==(0x694cb261^_0x507f8a)&&(_0x189d21(),_0x2a47ef[_0x5db72e([0x6f,0x66,0x66])]());});}))];return window[_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5db72e([0x72,0x61,0x63,0x65])](_0x1ce479)[_0x5db72e([0x74,0x68,0x65,0x6e])](()=>_0x541093);}async function _0x2bfab8(){await _0x1e2431,_0x36730b[_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5db72e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x45d1a8,_0x36730b[_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5db72e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x45d1a8,_0x36730b[_0x5db72e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x453984(){return _0x47247b(_0x5db72e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x53995b(_0x5db72e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5db72e([0x73,0x74,0x61,0x74,0x65])]==_0x5db72e([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x53a2f1(){return _0x47247b(_0x5db72e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x4351be(){return _0x47247b(_0x5db72e([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x586ac7(_0x2f9ac1){const _0x288aad=_0x5823a9();_0x36730b[_0x288aad]=_0x5db72e([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2f9ac1,_0x2f9ac1!=_0x5db72e([0x56,0x61,0x6c,0x69,0x64])&&_0x2bfab8();}function _0x5823a9(){const _0x17935e=window[_0x5db72e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5db72e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5db72e([0x6e,0x6f,0x77])]())[_0x5db72e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5db72e([0x2e]),'');let _0x5bc2fa=_0x5db72e([0x46]);for(let _0x5dbf41=0x0;_0x5dbf41<_0x17935e[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5dbf41+=0x2){let _0x3bfe09=window[_0x5db72e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x17935e[_0x5db72e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5dbf41,_0x5dbf41+0x2));_0x3bfe09>=_0x43d2d9[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3bfe09-=_0x43d2d9[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5bc2fa+=_0x43d2d9[_0x3bfe09];}return _0x5bc2fa;}function _0x117835(){const _0x468d18=_0xbc6592[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e]));if(0x3!=_0x468d18[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3eb749(_0x468d18[0x1]);function _0x3eb749(_0x3f53e5){const _0x2c7cd8=_0x4cfecf(_0x3f53e5);return _0x2c7cd8&&_0x3a7bcb()?_0x2c7cd8:null;function _0x3a7bcb(){const _0x514cb1=_0x2c7cd8[_0x5db72e([0x6a,0x74,0x69])],_0x4390cf=window[_0x5db72e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x514cb1[_0x5db72e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x514cb1[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2fb456={..._0x2c7cd8,[_0x5db72e([0x6a,0x74,0x69])]:_0x514cb1[_0x5db72e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x514cb1[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2fb456[_0x5db72e([0x76,0x63])],_0x2dd13a(_0x2fb456)==_0x4390cf;}}}async function _0x3a84b9(){let _0xdb76b6=!0x0;try{const _0x3733ea=_0xbc6592[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e])),[_0x36ffc0,_0x31124b,_0x3d9f83]=_0x3733ea;return _0x39c62a(_0x36ffc0),await _0x11ac03(_0x36ffc0,_0x31124b,_0x3d9f83),_0xdb76b6;}catch{return!0x1;}function _0x39c62a(_0x375ca4){const _0x46bde6=_0x4cfecf(_0x375ca4);_0x46bde6&&_0x46bde6[_0x5db72e([0x61,0x6c,0x67])]==_0x5db72e([0x45,0x53,0x32,0x35,0x36])||(_0xdb76b6=!0x1);}async function _0x11ac03(_0x1228d9,_0x1f7d6b,_0x4c7017){const _0x234176=window[_0x5db72e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5db72e([0x66,0x72,0x6f,0x6d])](_0x18ecda(_0x4c7017),_0x167299=>_0x167299[_0x5db72e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x395989=new window[(_0x5db72e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5db72e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1228d9+_0x5db72e([0x2e])+_0x1f7d6b),_0x26e779=window[_0x5db72e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5db72e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x26e779)return;const _0x49a0a0=await _0x26e779[_0x5db72e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5db72e([0x6a,0x77,0x6b]),_0x405ce0,{[_0x5db72e([0x6e,0x61,0x6d,0x65])]:_0x5db72e([0x45,0x43,0x44,0x53,0x41]),[_0x5db72e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5db72e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5db72e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x26e779[_0x5db72e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5db72e([0x6e,0x61,0x6d,0x65])]:_0x5db72e([0x45,0x43,0x44,0x53,0x41]),[_0x5db72e([0x68,0x61,0x73,0x68])]:{[_0x5db72e([0x6e,0x61,0x6d,0x65])]:_0x5db72e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x49a0a0,_0x234176,_0x395989)||(_0xdb76b6=!0x1);}}function _0x4cfecf(_0x23175f){return _0x23175f[_0x5db72e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5db72e([0x65,0x79]))?JSON[_0x5db72e([0x70,0x61,0x72,0x73,0x65])](_0x18ecda(_0x23175f)):null;}function _0x18ecda(_0x24bfbd){return window[_0x5db72e([0x61,0x74,0x6f,0x62])](_0x24bfbd[_0x5db72e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5db72e([0x2b]))[_0x5db72e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5db72e([0x2f])));}function _0x2dd13a(_0x2f8ced){let _0x5e57f6=0x1505;function _0x2f1cbc(_0x5d6f57){for(let _0x32eec2=0x0;_0x32eec2<_0x5d6f57[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x32eec2++){const _0x586fd9=_0x5d6f57[_0x5db72e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x32eec2);_0x5e57f6=(_0x5e57f6<<0x5)+_0x5e57f6+_0x586fd9,_0x5e57f6&=_0x5e57f6;}}function _0x2c80d2(_0x2e7ac5){Array[_0x5db72e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2e7ac5)?_0x2e7ac5[_0x5db72e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2c80d2):_0x2e7ac5&&typeof _0x2e7ac5==_0x5db72e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5db72e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2e7ac5)[_0x5db72e([0x73,0x6f,0x72,0x74])]()[_0x5db72e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xe7c216,_0x184510])=>{_0x2f1cbc(_0xe7c216),_0x2c80d2(_0x184510);}):_0x2f1cbc(window[_0x5db72e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2e7ac5));}return _0x2c80d2(_0x2f8ced),_0x5e57f6>>>0x0;}function _0x3868e5(_0x4193e7){return _0x4193e7[_0x5db72e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5db72e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5db72e([0x30]));}function _0x5928e3(_0x25b908){return _0x25b908[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5db72e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5db72e([0x6a,0x6f,0x69,0x6e])]('');}function _0x47247b(_0x1075a5){return _0x36730b[_0x5db72e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5db72e([0x68,0x61,0x73])](_0x1075a5);}function _0x53995b(_0x3cce70){return _0x36730b[_0x5db72e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5db72e([0x67,0x65,0x74])](_0x3cce70);}function _0x45d1a8(){}function _0x5db72e(_0x2a88a4){return _0x2a88a4['map'](_0x3c51c4=>String['fromCharCode'](_0x3c51c4))['join']('');}_0x586ac7(await _0x2db3b4());}(this);}['destroy'](){const _0x4f7d4c=this['editor']['plugins']['get'](o),_0x87e89d=this['editor']['config']['get']('collaboration.channelId');for(const _0x4c4b06 of _0x4f7d4c['getCommentThreads']({'channelId':_0x87e89d}))_0x4f7d4c['_detachCommentThread'](_0x4c4b06['id']),_0x4f7d4c['_threads']['delete'](_0x4c4b06['id']);super['destroy']();}['hasMarkerForId'](_0xec0817){return this['getAllMarkersForId'](_0xec0817)['length']>0x0;}['getAllMarkersForId'](_0x59a458){const _0x5aee2e=[];for(const _0x5aeacf of this['editor']['model']['markers'])_0x5aeacf['name']['startsWith']('comment:'+_0x59a458)&&_0x5aee2e['push'](_0x5aeacf);return _0x5aee2e;}['scrollToThreadMarker'](_0x94f447){setTimeout(()=>{const _0x3ca945=this['_getTargetForId'](_0x94f447);if(!_0x3ca945)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x94f447&&nt({'target':_0x3ca945[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xdc9ad8){this['editor']['model']['change'](()=>{for(const _0xae2c95 of this['getAllMarkersForId'](_0xdc9ad8))this['editor']['editing']['reconvertMarker'](_0xae2c95);});}['_attachArchivedThread'](_0x3362f3){const _0x4ab4ff=this['editor']['plugins']['get'](o),_0x8efa4b=this['editor']['plugins']['get'](b),_0xa75755=_0x4ab4ff['getCommentThread'](_0x3362f3);if(!_0xa75755['isAttached']){const _0x2c1d8c=_0xa75755['attachTo'](()=>this['_getTargetForId'](_0xa75755['id']));_0x8efa4b['registerAnnotation'](_0x2c1d8c),_0xa75755['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x5d7287=this['editor'],_0x6cf761=_0x5d7287['plugins']['get'](it);_0x5d7287['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d7669,_0x2f0464)=>{const {id:_0x139aaf}=ft(_0x5d7669['markerName']),_0x26b99e=_0x5d7287['plugins']['get'](o)['getCommentThread'](_0x139aaf),_0x250465=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x139aaf;let _0x5d8a41;if(_0x26b99e&&_0x26b99e['isResolved']&&!_0x250465&&_0x5d7669['item'])return _0x2f0464['consumable']['consume'](_0x5d7669['item'],'addMarker:'+_0x5d7669['markerName']),_0x2f0464['consumable']['consume'](_0x5d7669['item'],'removeMarker:'+_0x5d7669['markerName']),null;const _0x2a9db3=['ck-comment-marker'];return _0x250465&&_0x2a9db3['push']('ck-comment-marker--active'),_0x5d8a41=_0x26b99e?.['length']?_0x26b99e['comments']['first']['author']['id']:_0x6cf761['me']['id'],{'classes':_0x2a9db3,'attributes':{'data-comment':_0x139aaf,'data-author-id':_0x5d8a41}};}}),_0x5d7287['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xbad857,{options:_0x1586cf})=>{if(_0x1586cf['showCommentHighlights'])return null;const _0x2a0a40=_0x5d7287['plugins']['get'](o),_0x53a5e7=_0x5d7287['model']['markers']['get'](_0xbad857),{id:_0x5a3a55,part:_0xcbad32}=ft(_0xbad857);return _0x53a5e7&&!_0x53a5e7['affectsData']||_0x1586cf['ignoreResolvedComments']&&_0x2a0a40['getCommentThread'](_0x5a3a55)?.['isResolved']?null:{'group':'comment','name':_0xcbad32?_0x5a3a55+':'+_0xcbad32:_0x5a3a55};}}),_0x5d7287['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4fd4de,{writer:_0x461531})=>_0x461531['createElement']('$marker',{'data-name':'comment:'+_0x4fd4de['getAttribute']('id')})}),_0x5d7287['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3301f8=this['editor'],_0x28ec28=_0x3301f8['plugins']['get'](o),_0x31a370=new Set(),_0x1f283b=new Set();_0x3301f8['model']['document']['registerPostFixer'](_0x74eeac=>{let _0x98356e=!0x1;for(const {name:_0x5d4969,data:_0x124b85}of _0x3301f8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x35a6c7,id:_0x489a77}=ft(_0x5d4969);let _0x181651=_0x124b85['newRange'];if('comment'!==_0x35a6c7||!_0x181651)continue;const _0x186f12='$graveyard'===_0x181651['root']['rootName'];_0x186f12||(_0x181651=ht(_0x181651,_0x3301f8['model']),!_0x181651||_0x181651['isCollapsed']||!_0x124b85['newRange']||_0x181651['isEqual'](_0x124b85['newRange']))?_0x3301f8['model']['hasContent'](_0x181651)&&!_0x186f12?this['isThreadsLoadingPaused']?_0x31a370['add'](_0x5d4969):this['_handleThreadMarker'](_0x5d4969,_0x489a77):(_0x1f283b['add'](_0x5d4969),_0x31a370['delete'](_0x5d4969),_0x74eeac['removeMarker'](_0x5d4969),_0x98356e=!0x0):(_0x74eeac['updateMarker'](_0x5d4969,{'range':_0x181651}),_0x98356e=!0x0);}return _0x98356e;}),this['on']('change:isThreadsLoadingPaused',(_0x961c0d,_0x9a9f47,_0x114f58)=>{if(!_0x114f58&&_0x31a370['size'])for(const _0x266421 of _0x31a370){const {id:_0x4c4a02}=ft(_0x266421);_0x31a370['delete'](_0x266421),_0x3301f8['model']['markers']['get'](_0x266421)&&this['_handleThreadMarker'](_0x266421,_0x4c4a02);}}),this['listenTo'](_0x3301f8['model']['document'],'change',()=>{for(const {name:_0x55292e,data:{newRange:_0x19e814}}of _0x3301f8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x25d838,id:_0x506fb7}=ft(_0x55292e);if('comment'!==_0x25d838)continue;const _0x25c70e=_0x28ec28['getCommentThread'](_0x506fb7),_0x24407b=this['hasMarkerForId'](_0x506fb7);_0x25c70e&&(!_0x25c70e['_hasTargetInContent']&&_0x19e814&&_0x3301f8['editing']['view']['once']('render',()=>{const _0x2a5885=_0x3301f8['plugins']['get'](y),_0x48aeb8=_0x28ec28['_threadToController']['get'](_0x25c70e)['view'];_0x2a5885['getByInnerView'](_0x48aeb8)['refreshVisibility']();},{'priority':'low'}),_0x25c70e['_hasTargetInContent']=_0x24407b||!!_0x19e814),_0x19e814||(_0x1f283b['add'](_0x55292e),_0x31a370['delete'](_0x55292e));}for(const _0x5e75e7 of _0x1f283b){const {id:_0x100b70}=ft(_0x5e75e7),_0x873a01=_0x28ec28['getCommentThread'](_0x100b70);if(_0x31a370['delete'](_0x5e75e7),!_0x873a01)continue;const _0x3e9da4=this['hasMarkerForId'](_0x100b70);_0x3e9da4||_0x873a01['isSubmitted']?_0x3e9da4||_0x873a01['unlinkedAt']||_0x873a01['setUnlinkedAt'](new Date()):_0x873a01['remove']();}_0x1f283b['clear']();});}['_handleInitialThreads'](_0x32ad17){_0x32ad17['forEach'](_0x287ea4=>{_0x287ea4['unlinkedAt']&&this['_attachArchivedThread'](_0x287ea4['id']);});}['_getTargetForId'](_0x2a7e65){const _0x5380ff=this['editor'],_0x262612=this['getAllMarkersForId'](_0x2a7e65);return et(_0x5380ff['editing'],_0x262612);}['_getTextContext'](_0x42c988){const _0x10d472=this['getAllMarkersForId'](_0x42c988);let _0x38b3b7='',_0x3a53db=!0x1;for(const _0x265da5 of _0x10d472){const _0x236039=_0x265da5['getRange']();for(const _0x10177b of Array['from'](_0x236039['getItems']()))_0x10177b['is']('$textProxy')?(_0x38b3b7&&_0x3a53db&&(_0x38b3b7+='\x20',_0x3a53db=!0x1),_0x38b3b7+=_0x10177b['data']):_0x3a53db=!0x0;_0x3a53db=!0x0;}return _0x38b3b7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2a3b6b,_0x28ed65){const _0x49cb2b=this['editor'],_0x1d84b2=_0x49cb2b['plugins']['get'](o);let _0x3f8d59=_0x1d84b2['getCommentThread'](_0x28ed65);const _0x19271b=_0x49cb2b['config']['get']('collaboration.channelId'),_0x192957=_0x49cb2b['plugins']['get'](b);if(_0x3f8d59&&(_0x3f8d59['unlinkedAt']&&_0x3f8d59['setUnlinkedAt'](null),_0x3f8d59['isAttached']))return _0x3f8d59;return!this['getAllMarkersForId'](_0x28ed65)[0x0]['managedUsingOperations']?_0x49cb2b['editing']['view']['once']('render',()=>{if(_0x1d84b2['getCommentThread'](_0x28ed65))return;const _0x5d05e3=_0x49cb2b['plugins']['get'](y);_0x3f8d59=_0x1d84b2['openNewCommentThread']({'channelId':_0x19271b,'threadId':_0x28ed65,'target':()=>this['_getTargetForId'](_0x28ed65),'context':{'type':'text','value':this['_getTextContext'](_0x28ed65)}});const _0x4a25d4=_0x1d84b2['_threadToController']['get'](_0x3f8d59)['view'],_0x499187=_0x5d05e3['getByInnerView'](_0x4a25d4);_0x499187&&_0x192957['registerAnnotation'](_0x499187);},{'priority':'low'}):_0x1d84b2['fetchCommentThread']({'channelId':_0x19271b,'threadId':_0x28ed65})['then'](_0x2912bd=>{if('destroyed'!==_0x49cb2b['state']){if(_0x3f8d59=_0x2912bd,_0x3f8d59&&!_0x3f8d59['isAttached']){const _0x5b1304=_0x3f8d59['attachTo'](()=>this['_getTargetForId'](_0x28ed65));_0x192957['registerAnnotation'](_0x5b1304),_0x3f8d59['isResolved']&&this['_reconvertMarkers'](_0x28ed65);}else{if(!_0x3f8d59){const _0x566255=this['getAllMarkersForId'](_0x28ed65);_0x49cb2b['model']['change'](_0x1b4c8a=>{for(const _0x19a9e4 of _0x566255)_0x1b4c8a['removeMarker'](_0x19a9e4);});}}}}),_0x3f8d59;}['_handleThreadMarker'](_0x19440c,_0x45a27a){const _0x11fc63=this['_attachMarkerToThread'](_0x19440c,_0x45a27a);_0x11fc63&&!_0x11fc63['context']&&_0x11fc63['setContext']({'type':'text','value':this['_getTextContext'](_0x45a27a)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5617fe=this['editor'];rt(_0x5617fe['model'],({left:_0x141bb5,entered:_0x598c21})=>{for(const _0x2a1739 of _0x141bb5)if(mt(_0x2a1739)){_0x5617fe['ui']['ariaLiveAnnouncer']['announce'](N(_0x5617fe['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x46b6dc of _0x598c21)if(mt(_0x46b6dc)){_0x5617fe['ui']['ariaLiveAnnouncer']['announce'](N(_0x5617fe['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0xecbc2a)));break;}});}}function dt(_0x26cc28,_0x1ab5ed){return _0x1ab5ed?_0x26cc28+':'+_0x1ab5ed:_0x26cc28;}function ht(_0x3148b5,_0x2ccc61){const _0x50fcc6=_0x2ccc61['schema'],_0x152384=_0x2ccc61['createRange'](_0x3148b5['start']);for(const _0x573c87 of _0x3148b5['getWalker']()){const {type:_0x5e1a5d,item:_0x31dccf,nextPosition:_0x3e1935}=_0x573c87;if('text'===_0x5e1a5d||_0x50fcc6['isObject'](_0x31dccf)){const _0x4f583c=_0x2ccc61['createPositionBefore'](_0x31dccf);_0x152384['isCollapsed']&&(_0x152384['start']=_0x4f583c),_0x152384['end']=_0x3e1935;}}return _0x152384;}function mt(_0x36f778){return'comment'===ft(_0x36f778['name'])['group'];}class s extends _0x4f8b18{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x45cae0=this['editor'],_0x2b60bc=_0x45cae0['plugins']['get'](o),_0x553f93=_0x45cae0['plugins']['get'](r),_0x59cb6a=_0x45cae0['plugins']['get'](y),_0xb8aada=_0x45cae0['plugins']['get'](b);_0x45cae0['ui']['componentFactory']['add']('comment',()=>{const _0x54cae0=this['_createUIButton'](_0x75c5a1);return _0x54cae0['tooltip']=!0x0,_0x54cae0;}),_0x45cae0['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5086db)),_0xb8aada['addSourceCollector'](()=>{const _0x3ddac3=[];for(const [_0x1741a0,_0x57342b]of _0x2b60bc['_threadToController']){const _0x49cb09=_0x553f93['getAllMarkersForId'](_0x1741a0['id']),_0xb446f7=_0x49cb09['map'](_0xf8d273=>_0xf8d273['getRange']());_0x49cb09['length']>0x0&&_0x3ddac3['push']([_0x57342b['view'],_0xb446f7]);}return _0x3ddac3;}),this['listenTo'](_0x59cb6a,'change:activeAnnotations',(_0x546cdb,_0x3b5d95,_0x3811b3)=>{const _0x43d5cb=Array['from'](_0x3811b3)['map'](_0x411179=>_0x411179['innerView'])['find'](_0x3df845=>_0x2b60bc['_viewToController']['has'](_0x3df845));if(!_0x43d5cb)return void(_0x553f93['activeMarker']=null);const _0xb2dee9=_0x2b60bc['_viewToController']['get'](_0x43d5cb)['model']['id'],_0x365592='comment:'+_0xb2dee9;_0xb2dee9&&_0x553f93['hasMarkerForId'](_0xb2dee9)?_0x553f93['activeMarker']=_0x365592:_0x553f93['activeMarker']&&(_0x553f93['activeMarker']=null);}),this['listenTo'](_0x2b60bc,'removeCommentThread',(_0x119830,{threadId:_0x478c9f,isFromAdapter:_0x65c914})=>{!_0x65c914&&_0x45cae0['ui']['focusTracker']['isFocused']&&_0x553f93['hasMarkerForId'](_0x478c9f)&&_0x45cae0['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2b60bc,'addComment',(_0x583156,{threadId:_0x6e247c,isFromAdapter:_0x47c336})=>{if(_0x47c336||!_0x553f93['hasMarkerForId'](_0x6e247c)||!_0x2b60bc['hasCommentThread'](_0x6e247c))return;0x1===_0x2b60bc['getCommentThread'](_0x6e247c)['length']&&(_0x45cae0['editing']['view']['focus'](),_0x583156['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x34efba=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x27dcf6;for(const _0x4ade61 in _0x34efba){const _0x8befcc=_0x4ade61,_0x3d9445=_0x34efba[_0x8befcc];if('commentsLicenseKeyValid'==_0x3d9445||'commentsLicenseKeyInvalid'==_0x3d9445||'commentsLicenseKeyExpired'==_0x3d9445||'commentsLicenseKeyDomainLimit'==_0x3d9445||'commentsLicenseKeyNotAllowed'==_0x3d9445||'commentsLicenseKeyEvaluationLimit'==_0x3d9445||'commentsLicenseKeyTrialLimit'==_0x3d9445||'commentsLicenseKeyUsageLimit'==_0x3d9445){delete _0x34efba[_0x8befcc],_0x27dcf6=_0x3d9445,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x27dcf6&&_0x34efba['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x27dcf6&&_0x34efba['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x27dcf6&&_0x34efba['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x441894){const _0x35f301=this['editor'],_0x225def=new _0x441894(_0x35f301['locale']),_0x21bb95=_0x35f301['commands']['get']('addCommentThread');return _0x225def['set']({'label':N(_0x35f301['locale'],'Comment'),'icon':_0x550872}),_0x225def['bind']('isEnabled')['to'](_0x21bb95,'hasContent'),this['listenTo'](_0x225def,'execute',()=>{_0x21bb95['execute']();}),_0x225def;}}class i extends _0x4f8b18{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1cfef2){super(_0x1cfef2),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x566119,_0x4d285e,_0x7ed5d0)=>{_0x7ed5d0?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4f04da,_0x51f8c9]of this['editor']['commands'])_0x51f8c9['affectsData']&&'addCommentThread'!==_0x4f04da&&_0x51f8c9['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x3f4d51=this['editor']['editing']['view']['document'];this['listenTo'](_0x3f4d51,'cut',_0x1d940a=>_0x1d940a['stop'](),{'priority':'highest'}),this['listenTo'](_0x3f4d51,'clipboardInput',_0x36c02d=>_0x36c02d['stop'](),{'priority':'highest'}),this['listenTo'](_0x3f4d51,'delete',_0x4db27b=>_0x4db27b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x373d91,_0x43199d]of this['editor']['commands'])_0x43199d['affectsData']&&'addCommentThread'!==_0x373d91&&_0x43199d['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x35edc8{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe55bf9){super(_0xe55bf9),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3323c4=this['context']['plugins']['get'](y);this['listenTo'](_0x3323c4,'_activateAnnotation',(_0x575de2,_0x462ace)=>{for(const _0x3b104c of this['activeUIs']){const _0x5ad031=this['_uis']['get'](_0x3b104c);(0x0,this['uisData']['get'](_0x3b104c)['filter'])(_0x462ace)&&_0x5ad031['setActiveAnnotation'](_0x462ace);}}),this['listenTo'](_0x3323c4,'_deactivateAllAnnotations',()=>{for(const _0x30e66b of this['activeUIs']){this['_uis']['get'](_0x30e66b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3323c4['_visibleAnnotations'],'add',(_0x24f77d,_0x412db7)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x412db7);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x517dd3){return this['activeUIs']['has'](_0x517dd3);}['activate'](_0x3746ed,_0x421178=this['defaultFilter']){const _0x46e961=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3746ed))throw new _0x59f856('annotationsuis-missing-ui',this,{'uiName':_0x3746ed});this['isActive'](_0x3746ed)&&this['deactivate'](_0x3746ed),this['activeUIs']['add'](_0x3746ed);const _0x554049=new S();v({'source':_0x46e961['_visibleAnnotations'],'target':_0x554049,'filter':_0x421178}),this['uisData']['set'](_0x3746ed,{'collection':_0x554049,'filter':_0x421178});const _0x535451=this['_uis']['get'](_0x3746ed);_0x535451['attach'](_0x554049),this['listenTo'](_0x535451,'change:activeAnnotation',(_0x4b47b6,_0x13ce5f,_0x5b5991,_0x96a50e)=>{_0x96a50e&&_0x46e961['_removeActiveAnnotation'](_0x96a50e),_0x5b5991&&_0x46e961['_addActiveAnnotation'](_0x5b5991);});}['deactivate'](_0x1790ed){if(this['activeUIs']['delete'](_0x1790ed),!this['_uis']['has'](_0x1790ed))throw new _0x59f856('annotationsuis-missing-ui',this,{'uiName':_0x1790ed});const _0x395274=this['_uis']['get'](_0x1790ed);_0x395274['detach'](),this['stopListening'](_0x395274),this['uisData']['get'](_0x1790ed)['collection']['destroy'](),this['uisData']['delete'](_0x1790ed);}['switchTo'](_0x7fea4d){if(!this['_uis']['has'](_0x7fea4d))throw new _0x59f856('annotationsuis-missing-ui',this,{'uiName':_0x7fea4d});const _0x45f887=this['context']['plugins']['get'](y),_0x45bb0c=Array['from'](_0x45f887['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x7fea4d);const _0x57a678=this['_uis']['get'](_0x7fea4d);_0x57a678['setActiveAnnotation'](_0x45bb0c),_0x57a678['_setSelectedAnnotations']&&_0x45bb0c&&_0x57a678['_setSelectedAnnotations']([_0x45bb0c]);}['deactivateAll'](){for(const _0xac55ff of this['activeUIs'])this['deactivate'](_0xac55ff);}['register'](_0x4e9e6e,_0x5660d6){if(this['_uis']['has'](_0x4e9e6e))throw new _0x59f856('annotationsuis-register-already-registered');if('function'!=typeof _0x5660d6['attach']||'function'!=typeof _0x5660d6['detach']||'function'!=typeof _0x5660d6['setActiveAnnotation'])throw new _0x59f856('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4e9e6e,_0x5660d6);}['refilterAnnotations'](){const _0x618731=this['context']['plugins']['get'](y)['collection'],_0x52db98=new Map(),_0x21665a=Array['from'](this['activeUIs']);for(const _0x549b2c of this['activeUIs']){const _0x4fcd65=this['uisData']['get'](_0x549b2c)['collection'];for(const _0x284ec5 of _0x4fcd65)_0x52db98['set'](_0x284ec5,_0x549b2c);}for(const _0x14bb4e of _0x618731){const _0x379c58=_0x52db98['get'](_0x14bb4e);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x14bb4e);const _0x39138d=_0x21665a['find'](_0x57f8c2=>this['uisData']['get'](_0x57f8c2)['filter'](_0x14bb4e));_0x379c58!==_0x39138d&&(_0x379c58&&this['uisData']['get'](_0x379c58)['collection']['remove'](_0x14bb4e),_0x39138d&&this['uisData']['get'](_0x39138d)['collection']['add'](_0x14bb4e));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5474c0){const _0x4b3a29=[];for(const _0x4e1930 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4e1930)['filter'])(_0x5474c0)&&_0x4b3a29['push'](_0x4e1930);}if(_0x4b3a29['length']>0x1)throw new _0x59f856('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4b3a29,'annotationType':_0x5474c0['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x437e64){super(_0x437e64);const _0x530932=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0x336e57(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x530932['to']('class')],'style':{'minHeight':_0x530932['to']('minHeight',_0x19b617=>'number'==typeof _0x19b617?_i(_0x19b617+0xa):null)},'dir':_0x437e64['uiLanguageDirection'],'role':'application','aria-label':N(_0x437e64,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x437e64,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x4fd437=>{this['_updateItemPositionInFocusables'](_0x4fd437['source']);}),this['list']['forEach'](_0x2815d4=>{this['focusTracker']['add'](_0x2815d4['element']),this['_updateItemPositionInFocusables'](_0x2815d4);}),this['list']['on']('change',(_0x4ad211,_0x4b482e)=>{for(const _0x591758 of _0x4b482e['removed'])this['focusTracker']['remove'](_0x591758['element']),this['focusables']['remove'](_0x591758);for(const _0x589c88 of _0x4b482e['added'])this['focusTracker']['add'](_0x589c88['element']),this['_updateItemPositionInFocusables'](_0x589c88);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2d7bd4){const _0xd55cb3=this['focusables']['getIndex'](_0x2d7bd4);let _0x4acc7a,_0x9fb251;for(const _0x4f12ec of this['focusables'])if(_0x2d7bd4['top']<_0x4f12ec['top']){_0x4acc7a=_0x4f12ec;break;}if(_0x9fb251=_0x4acc7a?this['focusables']['getIndex'](_0x4acc7a):this['focusables']['length'],-0x1!==_0xd55cb3){if(_0xd55cb3===_0x9fb251-0x1)return;this['focusables']['remove'](_0x2d7bd4),_0x9fb251=_0x4acc7a?this['focusables']['getIndex'](_0x4acc7a):this['focusables']['length'];}this['focusables']['add'](_0x2d7bd4,_0x9fb251);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1a135a){super(_0x1a135a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4df518,_0x31974f)=>_0x4df518+_0x31974f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x29b4e8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x29b4e8['to']('isAnimationDisabled',_0x46a6d4=>_0x46a6d4?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x29b4e8['to']('top',_0x147b5f=>Ot(_0x147b5f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2494cb=this['element']['clientHeight'];_0x2494cb&&(this['height']=_0x2494cb);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x35edc8{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c8afc){super(_0x3c8afc),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x59a0aa=this['context']['config']['get']('sidebar.container');_0x59a0aa&&this['setContainer'](_0x59a0aa);}['setContainer'](_0x207df2){if(!g(_0x207df2))throw new _0x59f856('sidebar-setcontainer-invalid-element');this['container']=_0x207df2;}['_attachToContainer']({viewClass:_0x35e48f='',spaceBetweenItems:_0x9882b3=0x19}={}){if(!g(this['container']))throw new _0x59f856('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x35e48f,this['_spaceBetweenItems']=_0x9882b3;}['rearrange']({removedAnnotation:_0x49a212,previousAnnotation:_0x367afc,nextAnnotation:_0x439c23}){const _0x13345a=this['getSidebarItemView'](_0x49a212);this['view']['list']['remove'](_0x13345a),this['_destroySidebarItemView'](_0x49a212),_0x367afc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x367afc)),_0x439c23&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x439c23)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x168d31,activatedAnnotation:_0x26ee98,disableAnimationOnActivatedAnnotation:_0x5c75e6}){if(this['_activeAnnotation']=_0x26ee98,_0x168d31){_0x168d31['isActive']=!0x1;const _0x732306=this['getSidebarItemView'](_0x168d31);_0x732306&&_0x5c75e6&&(_0x732306['isAnimationDisabled']=!0x1);}if(_0x26ee98){const _0x4398d8=this['getSidebarItemView'](_0x26ee98);_0x4398d8&&(_0x26ee98['isActive']=!0x0,_0x5c75e6&&(_0x4398d8['isAnimationDisabled']=!0x0,_0x4398d8['top']+=0x1),this['_alignToTargetRect'](_0x4398d8));}}['_detachFromContainer'](_0x3ad196){if(this['view']['element']['remove'](),_0x3ad196){for(const _0x535a02 of _0x3ad196)this['_destroySidebarItemView'](_0x535a02);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x31198e,_0x46300a){_0x46300a||(_0x46300a=_0x31198e['view']);const _0x309f06=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x309f06,_0x31198e),this['_annotationToSidebarItemView']['set'](_0x31198e,_0x309f06),_0x309f06['content']['add'](_0x46300a),this['listenTo'](_0x31198e['view'],'change:targetRect',(_0x5cfa31,_0x26b825,_0x335621)=>{const _0x41b353=this['_getTargetTop'](_0x31198e,_0x335621);_0x309f06['_targetTop']!=_0x41b353&&(_0x309f06['_targetTop']=_0x41b353,this['_setItemTop'](_0x309f06,_0x41b353));}),this['listenTo'](_0x309f06,'change:top',()=>{this['_recalculate'](_0x309f06,'top');}),this['listenTo'](_0x309f06,'change:bottom',()=>{this['_recalculate'](_0x309f06,'bottom');}),this['_alignToTargetRect'](_0x309f06);const _0x59e6cb=this['_getItemBefore'](_0x309f06);if(_0x59e6cb)this['_alignAfterItem'](_0x59e6cb,_0x309f06)||this['_alignToTargetRect'](_0x309f06);else this['_alignToTargetRect'](_0x309f06);return this['_updateLastItem'](),this['view']['list']['add'](_0x309f06),_0x309f06;}['_alignForTopChange'](_0xf53cf9){if(!_0xf53cf9['content']['length'])return;const _0x5d3e6b=this['_getItemBefore'](_0xf53cf9);if(!_0x5d3e6b)return;const _0x12f79e=this['_sidebarItemViewToAnnotation']['get'](_0x5d3e6b),_0x4dec4a=this['_activeAnnotation'];_0x4dec4a&&_0x4dec4a===_0x12f79e?this['_alignAfterItem'](_0x5d3e6b,_0xf53cf9):this['_alignBeforeItem'](_0xf53cf9,_0x5d3e6b);}['_alignForBottomChange'](_0x12c29c){if(!_0x12c29c['content']['length'])return;const _0x435b23=this['_getItemAfter'](_0x12c29c);if(!_0x435b23)return;const _0x4b3878=this['_sidebarItemViewToAnnotation']['get'](_0x435b23),_0x32d017=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x53b221=this['_activeAnnotation'];_0x53b221&&_0x53b221===_0x4b3878&&_0x32d017?(this['_alignBeforeItem'](_0x435b23,_0x12c29c),this['_alignAfterItem'](_0x12c29c,_0x435b23)):_0x53b221&&_0x53b221===_0x4b3878?this['_alignBeforeItem'](_0x435b23,_0x12c29c):this['_alignAfterItem'](_0x12c29c,_0x435b23);}['_recalculate'](_0x36ae25,_0x1e8512){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x6211af,changedProp:_0x230324}of this['_recalculateBuffer'])'top'===_0x230324?this['_alignForTopChange'](_0x6211af):this['_alignForBottomChange'](_0x6211af);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x36ae25,'changedProp':_0x1e8512});}['getSidebarItemView'](_0x139eb9){return this['_annotationToSidebarItemView']['get'](_0x139eb9);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5f08ab){const _0x270ee8=this['getSidebarItemView'](_0x5f08ab);this['stopListening'](_0x270ee8),this['stopListening'](_0x5f08ab['view']),_0x270ee8['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5f08ab),this['_sidebarItemViewToAnnotation']['delete'](_0x270ee8);}['_createSidebarView'](){const _0x239696=new H(this['context']['locale']);return _0x239696['render'](),this['on']('change:_lastItem',(_0x16371a,_0x453a4d,_0x59a422,_0x42be33)=>{_0x42be33&&_0x239696['unbind']('minHeight'),_0x59a422?_0x239696['bind']('minHeight')['to'](_0x59a422,'bottom'):_0x239696['minHeight']=null;}),_0x239696;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x42f339){const _0x4a3cbb=this['_sidebarItemViewToAnnotation']['get'](_0x42f339),_0x14c0b9=_0x4a3cbb&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4a3cbb)-0x1);return _0x14c0b9&&this['getSidebarItemView'](_0x14c0b9)||null;}['_getItemAfter'](_0x1f2902){const _0x2da587=this['_sidebarItemViewToAnnotation']['get'](_0x1f2902),_0x4d413b=_0x2da587&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2da587)+0x1);return _0x4d413b&&this['getSidebarItemView'](_0x4d413b)||null;}['_alignBeforeItem'](_0x1a2257,_0x15fa62){_0x1a2257['updateHeight']();const _0xd2705b=G(_0x15fa62['bottom']+this['_spaceBetweenItems'],_0x1a2257['top']);return!!_0xd2705b&&(this['_setItemTop'](_0x15fa62,_0x15fa62['top']-_0xd2705b),!0x0);}['_alignAfterItem'](_0x3945d8,_0x178254){_0x3945d8['updateHeight']();const _0x8f7b31=G(_0x3945d8['bottom']+this['_spaceBetweenItems'],_0x178254['top']);return!!_0x8f7b31&&(this['_setItemTop'](_0x178254,_0x178254['top']+_0x8f7b31,!0x1),!0x0);}['_alignToTargetRect'](_0xa0b04f){const _0x45de9a=this['_sidebarItemViewToAnnotation']['get'](_0xa0b04f);if(!_0x45de9a||!_0x45de9a['target']||!_0x45de9a['targetRect'])return;const _0x26d79e=this['_getTargetTop'](_0x45de9a,_0x45de9a['targetRect']);this['_setItemTop'](_0xa0b04f,_0x26d79e);}['_getTargetTop'](_0x3bb611,_0x1dece1){if(null===_0x1dece1)return 0x0;if(_0x3bb611['target']instanceof _0x29c0c7)return _0x1dece1['top'];{const _0x67b0a7=new _0x29c0c7(this['view']['element'])['top'];return _0x1dece1['top']-_0x67b0a7;}}['_setItemTop'](_0x53ee9c,_0x661be5,_0xa847cf=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xa847cf&&(_0x661be5=Math['max'](_0x661be5,this['_getMaxAvailableTop'](_0x53ee9c))),_0x53ee9c['top']=_0x661be5;}['_getMaxAvailableTop'](_0x450c49){let _0x14af56=this['_getItemBefore'](_0x450c49),_0x54116b=0x0;for(;_0x14af56;)_0x14af56['updateHeight'](),_0x54116b+=this['_spaceBetweenItems']+_0x14af56['height'],_0x14af56=this['_getItemBefore'](_0x14af56);return _0x54116b;}}function G(_0x39a87a,_0x38d63c){return Math['max'](_0x39a87a-_0x38d63c,0x0);}function g(_0x52e4b4){return null!==_0x52e4b4&&'object'==typeof _0x52e4b4&&0x1===_0x52e4b4['nodeType'];}class e extends _0x35edc8{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x585f5a){super(_0x585f5a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1ed765(),this['_refreshPositioningDebounced']=_0x489039(()=>{_0x585f5a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2df489=this['context']['plugins']['get'](j),_0x365fd9=this['context']['plugins']['get'](z);_0x2df489['register']('wideSidebar',this),_0x365fd9['container']&&_0x2df489['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2049b0){if(_0x2049b0===this['activeAnnotation'])return;const _0x3106dd=this['context']['plugins']['get'](z);_0x3106dd['_activeAnnotation']=_0x2049b0;const _0xcad301=this['activeAnnotation'];_0x3106dd['refresh']({'blurredAnnotation':_0xcad301,'activatedAnnotation':_0x2049b0}),this['activeAnnotation']=_0x2049b0;}['attach'](_0x39d5bd){this['annotations']=_0x39d5bd;const _0x52a108=this['context']['plugins']['get'](z);if(_0x52a108['_annotations']=_0x39d5bd,this['isAttached'])throw new _0x59f856('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x52a108,'set:container',()=>{this['detach'](),this['listenTo'](_0x52a108,'change:container',_0x5be774=>{_0x5be774['off'](),this['attach'](_0x39d5bd);});}),_0x52a108['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x284eeb=_0x549792=>{_0x549792['updateTargetRect'](),_0x52a108['addAnnotation'](_0x549792);};for(const _0x33c546 of _0x39d5bd)_0x284eeb(_0x33c546);this['listenTo'](_0x39d5bd,'add',(_0x3d79fe,_0x2bb9b1)=>{_0x284eeb(_0x2bb9b1);}),this['listenTo'](_0x39d5bd,'remove',(_0xb96bc0,_0x22757a,_0xb05f43)=>{_0x52a108['rearrange']({'removedAnnotation':_0x22757a,'previousAnnotation':_0x39d5bd['get'](_0xb05f43-0x1),'nextAnnotation':_0x39d5bd['get'](_0xb05f43+0x1)}),_0x22757a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x39d5bd,'focus',(_0x231d85,_0x2d0f4d)=>{this['setActiveAnnotation'](_0x2d0f4d);}),this['listenTo'](_0x39d5bd,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1b8235=this['context']instanceof _0x2dec0a?this['context']['editors']:new _0x1ed765([this['context']]);for(const _0x539764 of _0x1b8235)this['_integrateWithEditorAnnotations'](_0x539764);this['listenTo'](_0x1b8235,'add',(_0x21bd29,_0x5f1f09)=>{this['listenTo'](_0x5f1f09,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5f1f09);});}),this['listenTo'](_0x1b8235,'remove',(_0xf73d08,_0x7302a9)=>{_0x7302a9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x7302a9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x59f856('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x113700=this['context']['plugins']['get'](z);_0x113700['_detachFromContainer'](this['annotations']),this['stopListening'](_0x113700),this['stopListening'](this['annotations']),this['context']instanceof _0x2dec0a&&this['stopListening'](this['context']['editors']);for(const _0x5517fe of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5517fe);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1b9352){if(!_0x1b9352['plugins']['has']('EditorAnnotations'))return;const _0x4cfeb9=_0x1b9352['plugins']['get']('EditorAnnotations'),_0xd1cc15=()=>{const _0x3bf1e0=_0x4cfeb9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3bf1e0[0x0]||null);};this['listenTo'](_0x4cfeb9,'refresh',_0xd1cc15),this['listenTo'](_0x4cfeb9,'blur',(_0x3bd2d6,{isAnnotationTracked:_0x5f37ae})=>{this['activeAnnotation']&&_0x5f37ae(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4cfeb9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1e7778=>{_0x4cfeb9['hasDomSelection']()&&(_0xd1cc15(),_0x1e7778['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4cfeb9);}['_destroyEditorAnnotationsIntegration'](_0xd958e4){this['stopListening'](_0xd958e4),this['_editorAnnotations']['remove'](_0xd958e4);}}class C extends _0x75c5a1{['counterView'];constructor(_0x229f38){super(_0x229f38);const _0x523d6d=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x52b6d3,_0x3e2317)=>_0x52b6d3?'...':_0x3e2317['toString']()),this['set']('annotationType',''),this['icon']=_0x550872,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x523d6d['to']('annotationType',_0x41055e=>'ck-annotation-counter__badge--'+_0x41055e),_0x523d6d['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x523d6d['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x35edc8{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39341e){super(_0x39341e),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x428cc8())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1ed765(),this['_refreshPositioningDebounced']=_0x489039(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x276dde(this['context']['locale']),this['balloonPanelView']=new _0x375243(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x577359){this['annotations']=_0x577359;const _0x288b53=this['context']['plugins']['get'](z),_0x3bfd5a=this['balloonPanelView'];if(_0x288b53['_annotations']=_0x577359,this['isAttached'])throw new _0x59f856('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x288b53,'set:container',()=>{this['detach'](),this['listenTo'](_0x288b53,'change:container',_0x21a46c=>{_0x21a46c['off'](),this['attach'](_0x577359);});}),_0x288b53['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x39efee=_0x164bc8=>{const _0xd602b9=new C(this['context']['locale']);_0x288b53['addAnnotation'](_0x164bc8,_0xd602b9),this['_annotationToNarrowView']['set'](_0x164bc8,_0xd602b9),_0xd602b9['bind']('isDirty','annotationType','number')['to'](_0x164bc8['view'],'isDirty','type','length'),_0xd602b9['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3bfd5a['content']['first']!==_0x164bc8['view']?(this['_showBalloon'](_0x164bc8),_0x164bc8['view']['element']['focus'](),this['setActiveAnnotation'](_0x164bc8)):this['setActiveAnnotation'](null);});};for(const _0x33f930 of _0x577359)_0x39efee(_0x33f930);this['listenTo'](_0x577359,'add',(_0x2bb60a,_0x546aa4)=>{_0x39efee(_0x546aa4);}),this['listenTo'](_0x577359,'remove',(_0x12e315,_0x23e0f9,_0x57bc9c)=>{this['_annotationToNarrowView']['get'](_0x23e0f9)['destroy'](),this['_annotationToNarrowView']['delete'](_0x23e0f9),_0x288b53['rearrange']({'removedAnnotation':_0x23e0f9,'previousAnnotation':_0x577359['get'](_0x57bc9c-0x1),'nextAnnotation':_0x577359['get'](_0x57bc9c+0x1)}),_0x23e0f9===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x577359,'focus',(_0x4a456a,_0x7a594c)=>{this['setActiveAnnotation'](_0x7a594c);}),this['listenTo'](_0x577359,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x429567,_0x25cb20)=>{_0x25cb20['keyCode']===_0x457aae['esc']&&_0x3bfd5a['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3bfd5a['content']['first']),this['_hideBalloon'](),_0x25cb20['stopPropagation'](),_0x25cb20['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x52d92e,_0x221b99)=>{const _0x4ff9c2=_0x221b99['target'];_0x3bfd5a['isVisible']&&_0x3bfd5a['element']['contains'](_0x4ff9c2)||_0x288b53['view']['element']['contains'](_0x4ff9c2)||_0x52d92e['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x30d92b=>_0x30d92b['contains'](_0x4ff9c2))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x472fb5=this['context']instanceof _0x2dec0a?this['context']['editors']:new _0x1ed765([this['context']]);for(const _0x2645cc of _0x472fb5)this['_integrateWithEditorAnnotations'](_0x2645cc);this['listenTo'](_0x472fb5,'add',(_0x19e79d,_0x41af93)=>{this['listenTo'](_0x41af93,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x41af93);});}),this['listenTo'](_0x472fb5,'remove',(_0x13a1b9,_0x29fac8)=>{_0x29fac8['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x29fac8['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x37d111){if(_0x37d111===this['activeAnnotation'])return;const _0x5cb80f=this['context']['plugins']['get'](z);if(_0x5cb80f['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x37d111,'disableAnimationOnActivatedAnnotation':!0x0}),_0x37d111)_0x5cb80f['getSidebarItemView'](_0x37d111)?this['_showBalloon'](_0x37d111):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x37d111;}['detach'](){if(!this['isAttached'])throw new _0x59f856('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x15b4f6=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x873c12=>_0x873c12['destroy']()),this['_annotationToNarrowView']['clear'](),_0x15b4f6['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2dec0a&&this['stopListening'](this['context']['editors']);for(const _0x494206 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x494206);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x2c59aa){if(!_0x2c59aa['plugins']['has']('EditorAnnotations'))return;const _0x136018=_0x2c59aa['plugins']['get']('EditorAnnotations'),_0x58b15e=this['context']['plugins']['get'](z),_0x2c0357=this['annotations'],_0x5c98aa=this['balloonPanelView'],_0x43cae7=()=>{const _0x3f1a8e=_0x136018['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x3f1a8e),this['setActiveAnnotation'](_0x3f1a8e[0x0]||null);};this['listenTo'](_0x136018,'refresh',_0x43cae7),this['listenTo'](_0x136018,'blur',(_0x1bb041,{isAnnotationTracked:_0x563904})=>{this['activeAnnotation']&&_0x563904(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x136018,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2c0357,'blur',_0x5b1f08=>{_0x136018['hasDomSelection']()&&_0x5b1f08['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x35dc8a,_0x53d6ea)=>{const _0x2b6ac5=_0x53d6ea['target'];_0x5c98aa['isVisible']&&_0x5c98aa['element']['contains'](_0x2b6ac5)||_0x58b15e['view']['element']['contains'](_0x2b6ac5)||this['activeAnnotation']&&_0x136018['hasDomSelection']()&&(_0x43cae7(),_0x35dc8a['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x136018);}['_destroyEditorAnnotationsIntegration'](_0x562874){_0x562874&&(this['stopListening'](_0x562874),this['_editorAnnotations']['remove'](_0x562874));}['_setSelectedAnnotations'](_0x4a6bbc){for(const _0x4e040c of this['_selectedAnnotations'])_0x4a6bbc['includes'](_0x4e040c)||this['_manuallyClosedAnnotationViews']['delete'](_0x4e040c['view']);this['_selectedAnnotations']=_0x4a6bbc;}['_refreshPositioning'](){const _0x4a4c2e=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4a4c2e['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x30f21b){if(this['_manuallyClosedAnnotationViews']['has'](_0x30f21b['view']))return;const _0x392519=this['balloonPanelView']['content']['first'];_0x392519!==_0x30f21b['view']?(_0x392519&&this['_detachListeners'](_0x392519),this['_attachListeners'](_0x30f21b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x30f21b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x5ab495=this['balloonPanelView']['content']['first'],_0x1ea66e=_0x5ab495&&this['annotations']['getByView'](_0x5ab495);if(!_0x1ea66e||!this['_annotationToNarrowView']['has'](_0x1ea66e))return;const _0xbd736e=this['_annotationToNarrowView']['get'](_0x1ea66e)['element'],_0xfc7130=(function(){const _0x13a0ad=_0x375243['defaultPositions'];return[_0x13a0ad['southArrowNorthEast'],_0x13a0ad['northArrowSouthEast'],_0x13a0ad['southArrowNorth'],_0x13a0ad['northArrowSouth'],_0x13a0ad['southArrowNorthWest'],_0x13a0ad['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xbd736e,'positions':_0xfc7130});}['_hideBalloon'](){const _0x175904=this['balloonPanelView'],_0xbc0414=_0x175904['content']['first'];_0xbc0414&&(this['_detachListeners'](_0xbc0414),_0x175904['unpin'](),_0x175904['content']['clear']());}['_attachListeners'](_0xbd58c8){this['listenTo'](_0xbd58c8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xbd58c8,'Esc',(_0x3f8296,_0x1b5518)=>{this['_manuallyClosedAnnotationViews']['add'](_0xbd58c8),this['_hideBalloon'](),_0x1b5518();});}['_detachListeners'](_0x156792){this['stopListening'](_0x156792);}}class c extends _0x4f8b18{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x4ca3ae,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x354146){super(_0x354146),_0x354146['editing']['view']['addObserver'](_0x1c3042),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x354146['plugins']['get'](_0x4ca3ae),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x234b30=this['editor']['plugins']['get'](j);_0x234b30['context']===this['editor']&&(_0x234b30['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3c8b81,_0x2b205c)=>{const _0x1821ac=this['_balloon'];if(this['isAttached']&&_0x1821ac['visibleView']){const _0x5c04d1=this['annotations']['getByView'](_0x1821ac['visibleView']);_0x5c04d1&&this['_closeAnnotation'](_0x5c04d1),_0x2b205c();}}));}['afterInit'](){const _0x4deb7f=this['editor']['plugins']['get'](j);_0x4deb7f['context']===this['editor']&&(_0x4deb7f['hasActive']()||_0x4deb7f['switchTo']('inline'));}['setActiveAnnotation'](_0x334fe0){_0x334fe0!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x334fe0&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x334fe0)&&this['_addAnnotationToBalloon'](_0x334fe0,!0x0),_0x334fe0['isActive']=!0x0),_0x334fe0||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x334fe0);}['attach'](_0x39fab8){this['annotations']=_0x39fab8;const _0x132832=this['editor']['plugins']['get'](j),_0x46a7c4=this['_balloon'];if(this['isAttached'])throw new _0x59f856('inlineannotations-attach-already-attached',this);if(_0x132832['context']!==this['editor'])throw new _0x59f856('inlineannotations-not-allowed-with-context',this);const _0x35169d=this['editor']['plugins']['get'](b);this['listenTo'](_0x35169d,'refresh',()=>{const _0x5f5573=_0x35169d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x17fd6b,_0x75e8d;!this['_forceRefresh']&&(_0x17fd6b=_0x5f5573,_0x75e8d=this['_selectedAnnotations'],_0x17fd6b['length']===_0x75e8d['length']&&_0x17fd6b['every'](_0x3de819=>_0x75e8d['includes'](_0x3de819)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5f5573),this['setActiveAnnotation'](_0x5f5573[0x0]||null));}),this['listenTo'](_0x35169d,'blur',(_0x227068,{isAnnotationTracked:_0x1a7e9d})=>{this['activeAnnotation']&&_0x1a7e9d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3a7fe6,_0x5252a3,_0xb95f36)=>{_0xb95f36||this['setActiveAnnotation'](null);}),this['listenTo'](_0x39fab8,'remove',(_0x46dcb7,_0x3bcf21)=>{this['_removeAnnotationFromBalloon'](_0x3bcf21),_0x3bcf21===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x46a7c4,'change:visibleView',(_0x347b22,_0x2dea56,_0x395ab1,_0x53a87a)=>{_0x53a87a&&this['stopListening'](_0x53a87a);const _0x5f5577=_0x39fab8['getByView'](_0x395ab1);_0x395ab1&&_0x5f5577&&(this['listenTo'](_0x395ab1,'change:height',()=>{_0x46a7c4['updatePosition']();}),this['listenTo'](_0x395ab1,'Esc',()=>{this['_closeAnnotation'](_0x5f5577),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5f5577&&this['setActiveAnnotation'](_0x5f5577));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x46a7c4['visibleView']&&(_0x39fab8['getByView'](_0x46a7c4['visibleView'])&&_0x46a7c4['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x59f856('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x103946 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x103946);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x3c5960){for(const _0x133368 of this['_selectedAnnotations'])_0x3c5960['includes'](_0x133368)||this['_manuallyClosed']['delete'](_0x133368);for(const _0x4324c4 of this['annotations'])_0x3c5960['includes'](_0x4324c4)||this['_removeAnnotationFromBalloon'](_0x4324c4);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3e9adb of _0x3c5960)this['_addAnnotationToBalloon'](_0x3e9adb);}this['_selectedAnnotations']=_0x3c5960;}['_addAnnotationToBalloon'](_0x79dfd0,_0x162d7=!0x1){this['_manuallyClosed']['has'](_0x79dfd0)||(this['_addedAnnotations']['has'](_0x79dfd0)||this['_balloon']['hasView'](_0x79dfd0['view'])||(this['_addedAnnotations']['add'](_0x79dfd0),this['_balloon']['add']({'stackId':_0x79dfd0['view']['id'],'view':_0x79dfd0['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x79dfd0)}})),_0x162d7&&this['_balloon']['showStack'](_0x79dfd0['view']['id']));}['_getBalloonTargetForAnnotation'](_0x220a0d){const _0x4af6d2=_0x220a0d['target'],_0x5bf3c5=this['editor']['editing']['view'],_0x344878=_0x5bf3c5['document']['selection']['getFirstRange'](),_0x59067b=_0x5bf3c5['domConverter']['viewRangeToDom'](_0x344878);if(_0x59067b['collapse'](!0x0),_0x4af6d2){if(_0x4af6d2 instanceof _0x29c0c7)return _0x4af6d2;let _0x309139=[];for(const _0x23205f of _0x4af6d2)_0x309139['push'](...F(_0x23205f['getClientRects']()));_0x309139=function(_0x6fc323){const _0x553e4a=[];let _0x17f345=_0x6fc323[0x0];for(let _0x404994=0x1;_0x404994<_0x6fc323['length'];_0x404994++)P(_0x17f345,_0x6fc323[_0x404994])?_0x17f345['width']+=_0x6fc323[_0x404994]['width']:(_0x553e4a['push'](_0x17f345),_0x17f345=_0x6fc323[_0x404994]);return _0x553e4a['push'](_0x17f345),_0x553e4a;}(_0x309139);const _0x332d3a=_0x59067b['getBoundingClientRect']();return _0x309139['find'](_0x59a5e0=>_0x59a5e0['top']<=_0x332d3a['top']&&_0x59a5e0['bottom']>=_0x332d3a['bottom']&&_0x59a5e0['left']<=_0x332d3a['left']&&_0x59a5e0['right']>=_0x332d3a['right'])||_0x309139[0x0];}return _0x220a0d['targetRect']||_0x59067b;}['_removeAnnotationFromBalloon'](_0x35097c){this['_addedAnnotations']['has'](_0x35097c)&&this['_balloon']['hasView'](_0x35097c['view'])&&(this['_addedAnnotations']['delete'](_0x35097c),this['_balloon']['remove'](_0x35097c['view']));}['_closeAnnotation'](_0x2ffe65){this['_manuallyClosed']['add'](_0x2ffe65),this['_removeAnnotationFromBalloon'](_0x2ffe65);}}function F(_0x51bd64){return Array['from'](_0x51bd64)['map'](DOMRect['fromRect']);}function P(_0x1073f7,_0x702dbb){return _0x1073f7['top']===_0x702dbb['top']&&_0x1073f7['bottom']===_0x702dbb['bottom']&&_0x1073f7['right']===_0x702dbb['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x424dfa,_0x1efbbd){super(_0x424dfa),this['set']('isEmpty',!_0x1efbbd['length']),this['focusTracker']=new _0x336e57(),this['_annotationViews']=_0x1efbbd,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2fdf0a({'focusables':_0x1efbbd,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1efbbd,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1efbbd,'remove',(_0x4afdb8,_0x54d321)=>{_0x54d321['isActive']&&this['focus'](),_0x1efbbd['length']||(this['isEmpty']=!0x0);});const _0x1521d5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x424dfa,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1efbbd},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1521d5['if']('isEmpty','ck-hidden',_0x361256=>!_0x361256)]},'children':[{'text':N(_0x424dfa,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x1a7d57 of this['_annotationViews'])this['focusTracker']['add'](_0x1a7d57['element']);this['_annotationViews']['on']('change',(_0x14edbd,{added:_0x48984e,removed:_0x3daaf6})=>{for(const _0x43d2be of _0x48984e)this['focusTracker']['add'](_0x43d2be['element']);for(const _0x32f070 of _0x3daaf6)this['focusTracker']['remove'](_0x32f070['element']);});}}class p extends _0x35edc8{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x4fcf33){super(_0x4fcf33),this['archivedThreads']=new _0x1ed765();}['init'](){const _0x5b2e77=this['context'],_0x8c5982=_0x5b2e77['plugins']['get'](o),_0x6ecdbd=_0x5b2e77['plugins']['get'](y);this['listenTo'](_0x8c5982,'addCommentThread',(_0x238266,{threadId:_0x581511})=>{const _0x3ee452=_0x8c5982['getCommentThread'](_0x581511);_0x3ee452['archivedAt']&&this['archivedThreads']['add'](_0x3ee452,this['_calculatePosition'](_0x3ee452['archivedAt'])),this['listenTo'](_0x3ee452,'change:archivedAt',(_0x2e165f,_0x5513e6,_0x3a9975)=>{_0x3a9975?this['archivedThreads']['has'](_0x3ee452)||this['archivedThreads']['add'](_0x3ee452,this['_calculatePosition'](_0x3ee452['archivedAt'])):this['archivedThreads']['has'](_0x3ee452)&&this['archivedThreads']['remove'](_0x3ee452);});}),this['listenTo'](_0x8c5982,'removeCommentThread',(_0x122d40,{threadId:_0x21b661})=>{const _0x5ad014=_0x8c5982['getCommentThread'](_0x21b661);this['stopListening'](_0x5ad014),this['archivedThreads']['has'](_0x5ad014)&&this['archivedThreads']['remove'](_0x5ad014);},{'priority':'highest'}),this['listenTo'](_0x6ecdbd['collection'],'focus',(_0x356e84,_0x400f9d)=>{_0x400f9d['isVisible']||(_0x400f9d['isActive']=!0x0,_0x6ecdbd['activate'](_0x400f9d));});}['_calculatePosition'](_0x37a8a4){const _0x2b5887=[...this['archivedThreads']]['findIndex'](_0xfadd56=>_0xfadd56['archivedAt']<_0x37a8a4);return _0x2b5887>-0x1?_0x2b5887:this['archivedThreads']['length'];}}class a extends _0x4f8b18{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x16b75d];}constructor(_0x5b1c0b){super(_0x5b1c0b),this['annotationViews']=new _0xb7b669(),this['_pendingThreads']=[];}['init'](){const _0x55464e=this['editor'],_0x25f99e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x55464e['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x75c5a1,!0x0)),_0x55464e['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2f9f33=this['_createCommentsArchiveButton'](_0x5086db);return _0x2f9f33['set']({'role':'menuitemcheckbox'}),_0x2f9f33;});const _0x2c3b21=_0x55464e['plugins']['get'](p),_0x5628ad=_0x55464e['plugins']['get']('Annotations'),_0x3abe19=_0x55464e['plugins']['get']('CommentsRepository');_0x2c3b21['archivedThreads']['forEach'](_0x4b4155=>{this['_handleNewThread'](_0x4b4155);}),this['listenTo'](_0x2c3b21['archivedThreads'],'add',(_0x225070,_0x3b31e6)=>{this['_handleNewThread'](_0x3b31e6);}),this['listenTo'](_0x5628ad['collection'],'add',(_0x39a920,_0x31e38e)=>{const _0x58fcaf=this['_pendingThreads']['find'](_0x1609ba=>{const _0x667168=_0x3abe19['_threadToController']['get'](_0x1609ba);return _0x667168&&_0x31e38e['innerView']===_0x667168['view'];});if(_0x58fcaf){const _0x14cd27=this['_calculatePosition'](_0x58fcaf['archivedAt']);this['annotationViews']['add'](_0x31e38e['view'],_0x14cd27),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x58fcaf),0x1);}}),this['listenTo'](_0x2c3b21['archivedThreads'],'remove',(_0x141788,_0x8e1010)=>{const _0x44f0f8=_0x55464e['config']['get']('collaboration.channelId');if(!_0x44f0f8||_0x8e1010['channelId']===_0x44f0f8){if(this['_pendingThreads']['includes'](_0x8e1010))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x8e1010),0x1);else{const _0x3d2619=_0x3abe19['_threadToController']['get'](_0x8e1010),_0x53287b=_0x5628ad['getByInnerView'](_0x3d2619['view']);this['annotationViews']['remove'](_0x53287b['view']),this['stopListening'](_0x53287b['focusableElements']);}}}),this['listenTo'](_0x5628ad['collection'],'add',(_0x21ab6e,_0x47c5f5)=>{this['listenTo'](_0x47c5f5,'escape',_0x25f99e);}),this['listenTo'](_0x5628ad['collection'],'remove',(_0x25170b,_0x4e3528)=>{this['stopListening'](_0x4e3528,'escape',_0x25f99e);});}['_handleNewThread'](_0x44fd4e){const _0x56312c=this['editor']['plugins']['get']('CommentsRepository'),_0x2465aa=this['editor']['plugins']['get']('Annotations'),_0x1bfa46=this['editor']['config']['get']('collaboration.channelId');if(!_0x1bfa46||_0x44fd4e['channelId']===_0x1bfa46){const _0x2517d8=_0x56312c['_threadToController']['get'](_0x44fd4e);if(!_0x2517d8)return void this['_pendingThreads']['push'](_0x44fd4e);const _0x1686aa=this['_calculatePosition'](_0x44fd4e['archivedAt']),_0x1c9355=_0x2465aa['getByInnerView'](_0x2517d8['view']);_0x1c9355['isVisible']&&_0x2465aa['_visibleAnnotations']['remove'](_0x1c9355),this['annotationViews']['add'](_0x1c9355['view'],_0x1686aa);}}['_calculatePosition'](_0x33e263){const _0x548534=this['editor']['config']['get']('collaboration.channelId'),_0x3a8018=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2dd037=>_0x2dd037['channelId']===_0x548534)['findIndex'](_0x5d0a36=>_0x5d0a36['archivedAt']<_0x33e263);return _0x3a8018<0x0||_0x3a8018>this['annotationViews']['length']?this['annotationViews']['length']:_0x3a8018-0x1;}['_toggleDialog'](){const _0x347684=this['editor'],_0x4c9826=_0x347684['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x347684['locale'],this['annotationViews'])),'commentsArchive'===_0x4c9826['id']?_0x4c9826['hide']():_0x4c9826['show']({'id':'commentsArchive','title':N(_0x347684['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1bd544,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x284766['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x610ee7,_0x20e747=!0x1){const _0x300c9e=this['editor']['locale'],_0x6dab26=this['editor']['plugins']['get']('Dialog'),_0x4c3975=new _0x610ee7(_0x300c9e);return _0x4c3975['bind']('isEnabled')['to'](this,'isEnabled'),_0x4c3975['bind']('isOn')['to'](_0x6dab26,'id',_0x1ecabc=>'commentsArchive'===_0x1ecabc),_0x4c3975['set']({'label':N(_0x300c9e,'COMMENTS_ARCHIVE'),'icon':_0x1bd544,'isToggleable':!0x0}),_0x20e747&&(_0x4c3975['tooltip']=!0x0),this['listenTo'](_0x4c3975,'execute',()=>this['_toggleDialog']()),_0x4c3975;}['_hideDialogOnAnnotationEscape']=_0x40564b=>{const _0x44a3d1=_0x40564b['source'];if(!this['annotationViews']['has'](_0x44a3d1['view']))return;const _0x1e139e=this['editor']['plugins']['get']('Dialog');_0x1e139e['isOpen']&&'commentsArchive'===_0x1e139e['id']&&(_0x1e139e['hide'](),_0x40564b['stop']());};}class gi extends _0x4f8b18{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|