@ckeditor/ckeditor5-comments 47.7.2-alpha.0 → 47.7.2
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 +19 -19
- 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(_0x19fb1c={}){function _0x38dad6(_0x306cb6){return _0x306cb6['map'](_0x3e9608=>String['fromCharCode'](_0x3e9608))['join']('');}(_0x19fb1c=Object['assign']({},_0x19fb1c))['plugins']||(_0x19fb1c['plugins']=hs['defaultPlugins']),super(_0x19fb1c),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x38dad6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x38dad6([0x76,0x69,0x65,0x77])][_0x38dad6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x38dad6([0x61,0x75,0x74,0x6f]),this[_0x38dad6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x38dad6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x38dad6([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x38dad6([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x38dad6([0x6f,0x6b])});}['create'](){const _0xc08008=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xc08008))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1f5b31=>{const _0x1b6335=this['model']['document']['getRoot'](),_0x47e305=_0x1b6335&&_0x1b6335['getChild'](_0x1b6335['childCount']-0x1);_0x1f5b31['setSelection'](_0x47e305,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x370b73=this['editing']['view'],_0xdba07c=_0x370b73['document']['getRoot'](),_0x1314c5=_0xdba07c['getChild'](0x0);_0xdba07c['childCount']>0x1||!_0x1314c5||'p'!=_0x1314c5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x370b73,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1314c5['placeholder']=this['placeholder']),Ft({'view':_0x370b73,'element':_0x1314c5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1314c5);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x25db87,_0x2fd2bc={}){super(_0x25db87),this['editor']=null,this['_editorConfig']=_0x2fd2bc,this['set']('value',_0x2fd2bc['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x25db87,'Reply...')),this['set']('submitLabel',N(_0x25db87,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4fd6f9(),this['focusCycler']=new _0x439bb2({'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',(_0x3e72a7,_0x3c4948)=>{this['cancelButtonView']['fire']('execute'),_0x3c4948();}),this['keystrokes']['set']('Ctrl+Enter',(_0xcd1bf9,_0x147a14)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x147a14());}),this['on']('submit',(_0xc96e02,_0x49e66b)=>{_0x49e66b['length']>0xfde8?(alert(N(_0x25db87,'TOO_LONG_COMMENT_ALERT',[_0x49e66b['length'],0xfde8])),_0xc96e02['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x41daac=this['editor'];this['element']['insertBefore'](_0x41daac['ui']['element'],this['element']['firstChild']),_0x41daac['model']['document']['on']('change',()=>this['value']=_0x41daac['getData']()),_0x41daac['bind']('placeholder')['to'](this),this['focusables']['add'](_0x41daac['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x35cd10){-0x1===_0x35cd10?(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:_0x482709}=this,_0x22fb4e=new _0x3487c4(_0x482709);return _0x22fb4e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x22fb4e['withText']=!0x0,_0x22fb4e['bind']('label')['to'](this,'submitLabel'),_0x22fb4e['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x22fb4e['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x446eb7,_0x4395ee)=>!_0x4395ee&&!!_0x446eb7['trim']()),_0x22fb4e;}['_createCancelButton'](){const {locale:_0x21935e}=this,_0x24d5f1=new _0x3487c4(_0x21935e);return _0x24d5f1['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x24d5f1['label']=N(_0x21935e,'Cancel'),_0x24d5f1['withText']=!0x0,_0x24d5f1['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x24d5f1;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3f8315=>{this['focusTracker']['add'](_0x3f8315['element']);}),this['focusables']['on']('change',(_0x243428,_0x131ed7)=>{for(const _0x6f7845 of Array['from'](_0x131ed7['added'])['reverse']())this['focusTracker']['add'](_0x6f7845['element']);});}}class ie extends kt{constructor(_0x32fb3c,_0x1c942b,_0x563524){super(_0x32fb3c),this['commentInputView']=new es(_0x32fb3c,_0x563524),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5f184b,_0x24f962)=>_0x5f184b||!!_0x24f962),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 _0x2540bd(_0x32fb3c,_0x1c942b),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'](_0x33ca6e){this['commentInputView']['focus'](_0x33ca6e);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x293697,_0x44d4ca)=>{const {submitButtonView:_0x3c6a25,cancelButtonView:_0x3eacf5,editor:_0x17c1bc}=this['commentInputView'];[_0x3c6a25['element'],_0x3eacf5['element'],_0x17c1bc?_0x17c1bc['editing']['view']['getDomRoot']():null]['filter'](_0xb6978f=>_0xb6978f)['some'](_0x16e1da=>_0x16e1da['contains'](_0x44d4ca['target']))||(this['focus'](),_0x44d4ca['preventDefault']());});}}class rs extends kt{constructor(_0x3b3053){super(_0x3b3053);const _0x24cf66=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x24cf66['to']('count',_0x32728b=>N(_0x3b3053,'NUMBER_OF_COMMENTS',_0x32728b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3db2fb,_0x5b08ab,_0x5f0459){super(_0x3db2fb);const _0x177101=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5b08ab['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5b08ab,this['_config']=_0x5f0459,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4fd6f9(),this['keystrokes']=new jt(),this['focusCycler']=new _0x439bb2({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x264333=>this['commentViews']['map'](_0x1a7f0c=>_0x1a7f0c['element'])['includes'](_0x264333['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x3db2fb),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x11169d=>_0x11169d-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4eda4b of _0x5b08ab['comments'])this['_handleNewCommentModel'](_0x4eda4b);this['_handleInfoComment'](),this['listenTo'](_0x5b08ab['comments'],'add',(_0x3b23de,_0x440b77)=>{const _0x34ec31=this['_calculatePosition'](_0x440b77);this['length']++,this['_handleNewCommentModel'](_0x440b77,_0x34ec31),this['refreshVisibleViews']();}),this['listenTo'](_0x5b08ab['comments'],'remove',(_0x1fd347,_0x1108e8)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1108e8),this['refreshVisibleViews']();}),this['listenTo'](_0x5b08ab,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5b08ab,'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',_0x177101['if']('length','ck-hidden',_0x4521d8=>!_0x4521d8)],'aria-label':N(_0x3db2fb,'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'](_0x595f0e){-0x1===_0x595f0e?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4ecd12 of this['commentViews'])_0x4ecd12['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x53e6cf,_0x893a3f){const _0xe17bcd=new this['_config']['CommentView'](this['locale'],_0x53e6cf,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0xe17bcd['viewUid']=_0x53e6cf['id'],_0xe17bcd['delegate']('removeComment')['to'](this),_0xe17bcd['delegate']('updateComment')['to'](this),_0xe17bcd['delegate']('resolveCommentThread')['to'](this),_0xe17bcd['delegate']('editorReady')['to'](this),_0xe17bcd['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0xe17bcd,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0xe17bcd,_0x893a3f);}['_calculatePosition'](_0x29c27d){const _0x459f6e=this['_model']['_findOptimalIndex'](_0x29c27d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x29c27d['authoredAt']?_0x459f6e-0x1:_0x459f6e:_0x459f6e-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x57ee8a={'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'],_0x57ee8a,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x57ee8a));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x285d68){const _0x5208e3=this['commentViews']['remove'](_0x285d68['id']);this['stopListening'](_0x5208e3),_0x5208e3['isEditMode']&&this['_updateHasDirtyComment'](),_0x5208e3['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x13f5a8=>_0x13f5a8['isEditMode']);}['_rearrangeCollapse'](){const _0x3cfe4d=function(_0x4022c4){const _0x2e5873=new _0x328140();for(const _0x3a0ba8 of _0x4022c4)_0x2e5873['add'](_0x3a0ba8);return _0x2e5873;}(this['commentViews']),_0x4e2c16=this['_collapsedCommentsView']['count'];for(let _0xc06686=0x1;_0xc06686<=_0x4e2c16;_0xc06686++)_0x3cfe4d['remove'](0x1);for(const _0x22a483 of _0x3cfe4d)_0x22a483['collapse']();_0x4e2c16>0x0&&_0x3cfe4d['add'](this['_collapsedCommentsView'],0x1),ns(_0x49f0bf(Array['from'](this['visibleViews']),Array['from'](_0x3cfe4d)),this['visibleViews'],_0x3cfe4d);}['_rearrangeExpand'](){ns(_0x49f0bf(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2da520 of this['visibleViews'])_0x2da520['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2dda1c=>{this['focusTracker']['add'](_0x2dda1c['element']),this['keystrokes']['listenTo'](_0x2dda1c['element']);}),this['commentViews']['on']('change',(_0x18e174,_0x33c09a)=>{for(const _0x319e6f of _0x33c09a['removed'])this['focusTracker']['remove'](_0x319e6f['element']),this['keystrokes']['stopListening'](_0x319e6f['element']);for(const _0x2e1f72 of Array['from'](_0x33c09a['added'])['reverse']())this['focusTracker']['add'](_0x2e1f72['element']),this['keystrokes']['listenTo'](_0x2e1f72['element']);});}}function ns(_0x28703a,_0x2d7ce8,_0x551702){let _0x279ba7=0x0;for(const _0x133b5e of _0x28703a)switch(_0x133b5e){case'insert':_0x2d7ce8['add'](_0x551702['get'](_0x279ba7),_0x279ba7),_0x279ba7++;break;case'delete':_0x2d7ce8['remove'](_0x279ba7);break;case'equal':_0x279ba7++;}}class oe extends kt{constructor(_0x1bf6fe){super(_0x1bf6fe);const _0x3ede10=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3ede10['to']('contextValue',_0x5bd4d1=>N(_0x1bf6fe,'THREAD_CONTEXT_LABEL',_0x5bd4d1)),'tabindex':-0x1},'children':[{'text':_0x3ede10['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3c0df3,_0x45330b){super(_0x3c0df3);const _0x241da0=this['bindTemplate'];this['_model']=_0x45330b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4fd6f9(),this['keystrokes']=new jt(),this['focusCycler']=new _0x439bb2({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3f4af1=>!!_0x3f4af1),this['bind']('contextValue')['to'](this['_model'],'context',_0x4d161f=>_0x4d161f&&_0x4d161f['value']?this['_trimContextValue'](_0x4d161f['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',_0x241da0['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 _0x49ea79=new _0x3487c4(this['locale']);return _0x49ea79['label']=N(this['locale'],'Reopen'),_0x49ea79['tooltip']=N(this['locale'],'Reopen'),_0x49ea79['icon']=_0x4adba4,_0x49ea79['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xd080a=>!_0xd080a),_0x49ea79['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x56df00,_0x150c5a)=>_0x56df00&&_0x150c5a),_0x49ea79['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x49ea79;}['_trimContextValue'](_0x48fa76){if(_0x48fa76['length']<0x96)return _0x48fa76;const _0x145c1d=_0x48fa76['lastIndexOf']('\x20',0x93);return _0x48fa76['substring'](0x0,_0x145c1d>-0x1?_0x145c1d:0x93)+'...';}['_attachContextActions'](){const _0x1b61aa=this['element']['querySelector']('.ck-context'),_0x316220=_0x1b61aa['querySelector']('.ck-context__value');this['listenTo'](_0x1b61aa,'mouseenter',()=>{_0x316220['offsetWidth']<_0x316220['scrollWidth']&&_0x1b61aa['classList']['add']('overlay');}),this['listenTo'](_0x1b61aa,'mouseleave',()=>{_0x1b61aa['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xbd9eca of this['focusables'])this['focusTracker']['add'](_0xbd9eca['element']),this['keystrokes']['listenTo'](_0xbd9eca['element']);}['_createContextView'](){const _0x5e047b=new oe(this['locale']);return _0x5e047b['bind']('contextValue')['to'](this),_0x5e047b;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5879e3,_0x20ff31,_0x362aa4,_0x5706e0){super(_0x5879e3),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x20ff31,this['_localUser']=_0x362aa4,this['_config']=_0x5706e0,this['commentThreadHeaderView']=new Xt(_0x5879e3,_0x20ff31),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5879e3,N(_0x5879e3,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5879e3,_0x20ff31,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5706e0)),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',(_0xae7c41,_0x3b5ac4)=>_0xae7c41||!!_0x3b5ac4),this['bind']('isUnlinked')['to'](_0x20ff31,'unlinkedAt',_0x4638f1=>!!_0x4638f1),this['bind']('ariaLabel')['to'](this,'length',_0x38c6ce=>{const _0x5a8975=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x38c6ce,_0x5a8975]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4fd6f9(),this['keystrokes']=new jt(),this['focusCycler']=new _0x439bb2({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x347ba5=>_0x347ba5['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2bf4c2=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5b7969=_0x2bf4c2['commentInputView'];return _0x2bf4c2['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5b7969,'value',(_0x2ba06a,_0x53f088,_0x367e26,_0x8960ec,_0x147669)=>!!_0x147669||!!_0x8960ec&&_0x367e26&&!_0x53f088||_0x2ba06a&&_0x367e26&&!_0x53f088),_0x5b7969['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x27213a,_0xfec167,_0x48f179)=>{let _0xbf3b1d;return _0xbf3b1d=_0x48f179&&_0xfec167?'Reply\x20to\x20reopen\x20discussion...':_0x27213a?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0xbf3b1d);}),_0x5b7969['bind']('submitLabel')['to'](this,'length',_0x3775c4=>N(this['locale'],_0x3775c4?'Reply':'Comment')),_0x5b7969['on']('submit',(_0x185829,_0x467c46)=>{this['fire']('addComment',_0x467c46),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5b7969['on']('cancel',()=>{this['focus']();}),_0x5b7969['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5b7969['on']('cancel',_0xb8c99f=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xb8c99f['stop']());}),this['on']('change:isActive',(_0x296a7b,_0x2f4d54,_0x230e3c)=>{_0x230e3c||this['length']||_0x5b7969['value']||this['fire']('removeCommentThread');}),_0x2bf4c2;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x37aab7(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x18adc1,target:_0x9021bb,type:_0x2b8a7a,isVisible:_0x21b687=!0x0}){super(),this['view']=_0x18adc1,this['view']['element']||this['view']['render'](),this['_type']=_0x2b8a7a,this['_target']=_0x9021bb,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x328140([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4bc83c,_0x18a57d)=>{this['view']['focusTracker']['add'](_0x18a57d);}),this['focusableElements']['on']('remove',(_0x391b68,_0x123e66)=>{this['view']['focusTracker']['remove'](_0x123e66);}),this['set']('isVisible',_0x21b687);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x22c633=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x22c633),_0x22c633;}get['targetRect'](){const _0x159b60=this['target'];if(null===_0x159b60)return null;if(_0x159b60 instanceof _0x578f30)return _0x159b60;const _0x3aeeb9=_0x159b60['filter'](_0x2ca62f=>function(_0x59746b){const _0x2a7909=_0x59746b['offsetParent'];if(_0x2a7909)return!0x0;const _0x43776a=_0x59746b['getClientRects']()['item'](0x0);return!!_0x43776a;}(_0x2ca62f));return 0x0===_0x3aeeb9['length']?null:new _0x578f30(_0x3aeeb9[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x15e49c){this['view']['isActive']=_0x15e49c,this['view']['mainView']['isActive']=_0x15e49c;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4df933){if(!(null===_0x4df933||_0x4df933 instanceof _0x578f30||Array['isArray'](_0x4df933)&&_0x4df933['every'](_0x415156=>re(_0x415156))))throw new _0x5199cf('annotation-invalid-target',null,{'target':_0x4df933});}['_getNormalizedTarget'](){const _0x31a656='function'==typeof this['_target']?this['_target']():this['_target'];return re(_0x31a656)?[_0x31a656]:_0x31a656;}}function re(_0x5c8fb6){return null!==_0x5c8fb6&&'object'==typeof _0x5c8fb6&&'nodeType'in _0x5c8fb6&&0x1===_0x5c8fb6['nodeType'];}class S extends _0x328140{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x43a36d=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4fd6f9(),this['_focusTracker']['on']('change:isFocused',(_0x2b11ee,_0x5b873f,_0x3c9ebb)=>{_0x3c9ebb||this['fire']('blur');});for(const _0x43895c of _0x43a36d)this['add'](_0x43895c);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x293603){if(this['has'](_0x293603))throw new _0x5199cf('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x293603['innerView'],_0x293603),this['_viewToAnnotation']['set'](_0x293603['view'],_0x293603);for(const _0x25e46a of _0x293603['focusableElements'])this['_focusTracker']['add'](_0x25e46a);this['listenTo'](_0x293603['focusableElements'],'add',(_0x38ed8f,_0x110fff)=>{this['_focusTracker']['add'](_0x110fff);}),this['listenTo'](_0x293603['focusableElements'],'remove',(_0x400ad6,_0x1cd802)=>{this['_focusTracker']['remove'](_0x1cd802);}),this['listenTo'](_0x293603['view']['focusTracker'],'change:isFocused',(_0x3c45dc,_0x45298b,_0x1f06d3)=>{_0x1f06d3&&this['fire']('focus',_0x293603);}),_0x293603['updateTargetRect']();const _0x594766=this['_getOrderInContent'](_0x293603['view']['targetRect']);return super['add'](_0x293603,_0x594766);}['remove'](_0x5ebf23){if(!this['has'](_0x5ebf23))throw new _0x5199cf('annotationcollection-not-existing-item',null);this['stopListening'](_0x5ebf23['view']['focusTracker']),this['stopListening'](_0x5ebf23['focusableElements']);for(const _0x10fa32 of _0x5ebf23['focusableElements'])this['_focusTracker']['remove'](_0x10fa32);return this['_viewToAnnotation']['delete'](_0x5ebf23['view']),this['_innerViewToAnnotation']['delete'](_0x5ebf23['innerView']),super['remove'](_0x5ebf23);}['getByInnerView'](_0x35672e){return this['_innerViewToAnnotation']['get'](_0x35672e);}['getByView'](_0xe3e188){return this['_viewToAnnotation']['get'](_0xe3e188);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1f9f6e of this)_0x1f9f6e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x5bf7fc=Array['from'](this)['sort']((_0x1b91f1,_0x5f59e5)=>w(_0x1b91f1['view']['targetRect'],_0x5f59e5['view']['targetRect']));for(let _0x4024d1=_0x5bf7fc['length']-0x1;_0x4024d1>0x0;_0x4024d1--){const _0x565def=_0x5bf7fc[_0x4024d1];_0x4024d1!==this['getIndex'](_0x565def)&&(this['remove'](_0x565def),this['add'](_0x565def));}}['_getOrderInContent'](_0x3c31ce){let _0x51e947=0x0;if(!_0x3c31ce)return this['length'];for(const _0x1ba71a of this){const _0x2f938f=_0x1ba71a['view']['targetRect'];if(_0x2f938f){if(w(_0x3c31ce,_0x2f938f)<0x0)return _0x51e947;_0x51e947++;}}return _0x51e947;}}function v({source:_0x39e434,target:_0x29b8ac,filter:_0x172158}){for(const _0x2ee884 of _0x39e434)_0x172158(_0x2ee884)&&_0x29b8ac['add'](_0x2ee884);_0x29b8ac['listenTo'](_0x39e434,'add',(_0x188f6f,_0x5be3d2)=>{_0x172158(_0x5be3d2)&&_0x29b8ac['add'](_0x5be3d2);}),_0x29b8ac['listenTo'](_0x39e434,'remove',(_0x5d60e8,_0x5842ce)=>{_0x29b8ac['has'](_0x5842ce)&&_0x29b8ac['remove'](_0x5842ce);});}function w(_0x12d300,_0x32f50f){if(null===_0x12d300&&null===_0x32f50f)return 0x0;if(null===_0x12d300)return-0x1;if(null===_0x32f50f)return 0x1;const _0x219d0c=_0x12d300['top']-_0x32f50f['top'];return 0x0==_0x219d0c?_0x12d300['left']-_0x32f50f['left']:_0x219d0c;}class y extends _0x816dec{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4c2912){if(super(_0x4c2912),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4c2912 instanceof _0x25b851){const _0x396871=_0x4c2912['locale'];_0x4c2912['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x396871,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4d494d){this['collection']['add'](_0x4d494d);}['remove'](_0x511220){this['collection']['remove'](_0x511220),_0x511220['destroy']();}['refreshVisibility'](){for(const _0x28917e of this['collection'])_0x28917e['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x31e444){return this['collection']['getByInnerView'](_0x31e444);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x236863 of this['collection'])_0x236863['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3c6c43){this['fire']('_activateAnnotation',_0x3c6c43);}['createAnnotation'](_0x45e23c){return new T(_0x45e23c);}['createAnnotationView'](_0x92749e,_0x4c0327){return new E(_0x92749e,_0x4c0327);}['_addActiveAnnotation'](_0x47f819){const _0x4bc75c=new Set(this['activeAnnotations']);_0x4bc75c['add'](_0x47f819),this['activeAnnotations']=_0x4bc75c;}['_removeActiveAnnotation'](_0x77bfa0){const _0x2b07ab=new Set(this['activeAnnotations']);_0x2b07ab['delete'](_0x77bfa0),this['activeAnnotations']=_0x2b07ab;}['_bindAnnotationsToVisibleAnnotations'](){const _0x160bf9=this['collection'],_0x433d69=this['_visibleAnnotations'];function _0x341f5d(_0x497d5b){const _0x50798f=_0x497d5b['source'];_0x50798f['isVisible']&&!_0x433d69['has'](_0x50798f)?_0x433d69['add'](_0x50798f):!_0x50798f['isVisible']&&_0x433d69['has'](_0x50798f)&&_0x433d69['remove'](_0x50798f),_0x50798f['view']['focusTracker']['remove'](_0x50798f['view']['element']),_0x50798f['view']['focusTracker']['add'](_0x50798f['view']['element']);}this['listenTo'](_0x160bf9,'add',(_0x2b1900,_0x4c017a)=>{_0x4c017a['isVisible']&&_0x433d69['add'](_0x4c017a),this['listenTo'](_0x4c017a,'change:isVisible',_0x341f5d);}),this['listenTo'](_0x160bf9,'remove',(_0x41ebdc,_0xa91a60)=>{_0x433d69['has'](_0xa91a60)&&_0x433d69['remove'](_0xa91a60),this['stopListening'](_0xa91a60,'change:isVisible',_0x341f5d);});}['_setupEnterAnnotationKeystroke'](){const _0x24f7a1=_0x3e718e=>{_0x3e718e['on']('ready',()=>{_0x3e718e['keystrokes']['set'](_0x430625,(_0x4ff2ab,_0x555190)=>{const _0xa4935c=_0x153d6a(this['activeAnnotations']['values']());_0xa4935c&&(_0xa4935c['view']['focus'](),_0x555190());});});};this['context']instanceof _0x25b851?_0x24f7a1(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1790eb,_0x10c84a)=>{_0x24f7a1(_0x10c84a);});}['_setupEscapeAnnotationHandling'](){const _0x179e3c=_0x57628a=>{const _0x4fd45e=_0x57628a['source'],_0x1c7671=[];let _0x35e5f8;if(Array['isArray'](_0x4fd45e['target'])){_0x35e5f8=_0x4fd45e['target'][0x0],this['context']instanceof _0x25b851?_0x1c7671['push'](this['context']):this['context']['editors']&&_0x1c7671['push'](...this['context']['editors']);for(const _0x5026f7 of _0x1c7671)for(const _0x29e56f of _0x5026f7['editing']['view']['domRoots']['values']())if(_0x29e56f['contains'](_0x35e5f8))return void _0x5026f7['editing']['view']['focus']();_0x35e5f8['focus']();}};this['listenTo'](this['collection'],'add',(_0x90bd6e,_0x16ed28)=>{this['listenTo'](_0x16ed28,'escape',_0x179e3c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1788e6,_0x58850a)=>{this['stopListening'](_0x58850a,'escape',_0x179e3c);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x816dec{['_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(_0x1dd337){super(_0x1dd337),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5951d9=this['context']['config'];_0x5951d9['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5951d9['define']('comments.maxThreadTotalWeight',0x1f4),_0x5951d9['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5951d9['define']('comments.CommentThreadView',gt),_0x5951d9['define']('comments.CommentView',Tt),_0x5951d9['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1d55cc=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5b51f0,_0x3c9181)=>this['_addCommentThread'](_0x3c9181)),this['on']('submitCommentThread',(_0x505a91,_0x42cc20)=>this['_submitCommentThread'](_0x42cc20)),this['on']('resolveCommentThread',(_0x32c2de,_0x1c81b7)=>this['_resolveCommentThread'](_0x1c81b7)),this['on']('resolveCommentThread',(_0x1e9535,_0xc3926d)=>this['_updateActiveAnnotation'](_0xc3926d),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x152302,_0x43883b)=>this['_reopenCommentThread'](_0x43883b)),this['on']('reopenCommentThread',(_0x469910,_0x1ba7f4)=>this['_updateActiveAnnotation'](_0x1ba7f4),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2cdbfc,_0x5c9aa6)=>this['_removeCommentThread'](_0x5c9aa6)),this['on']('updateCommentThread',(_0x38eec2,_0x4a07af)=>this['_updateCommentThread'](_0x4a07af)),this['on']('updateCommentThread',(_0x29975c,_0x1269e9)=>this['_updateActiveAnnotation'](_0x1269e9),{'priority':'lowest'}),this['on']('addComment',(_0x5bd12d,_0x21e02b)=>this['_addComment'](_0x21e02b)),this['on']('updateComment',(_0x2c8005,_0xa94d33)=>this['_updateComment'](_0xa94d33)),this['on']('removeComment',(_0x5d26f3,_0x3db694)=>this['_removeComment'](_0x3db694)),this['on']('addComment',(_0x5bb1a3,{threadId:_0x2d9dfb,isFromAdapter:_0x53e3f5})=>{if(_0x53e3f5)return;const _0xf91ea0=this['getCommentThread'](_0x2d9dfb),_0x1736e8=_0xf91ea0&&this['_threadToController']['get'](_0xf91ea0);_0x1736e8&&_0x1736e8['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1d55cc,'change:activeAnnotations',(_0x567fc3,_0x2eb232,_0x212dbd)=>{const _0x132cac=Array['from'](_0x212dbd)['map'](_0x34c53c=>this['_viewToController']['get'](_0x34c53c['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x132cac?_0x132cac['model']:null;});}set['adapter'](_0x4df0c5){if(this['_adapter'])throw new _0x5199cf('commentsrepository-adapter-already-set');this['_adapter']=_0x4df0c5;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x1324d6=_t,threadId:_0x12aa8b=_0x4e4b92(),comments:_0x4d0a27=[],unlinkedAt:_0x3aa1ec=null,resolvedAt:_0x499056=null,resolvedBy:_0x7c4265=null,target:_0x1d7c9a=null,context:_0xf66e2e=null,attributes:_0x2b3ab2={},isResolvable:_0x25bef0=!0x0,isSubmitted:_0x53ccf2=!0x1,isFromAdapter:_0xbf289b=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x1324d6),{'channelId':_0x1324d6,'threadId':_0x12aa8b,'comments':_0x4d0a27,'unlinkedAt':_0x3aa1ec,'resolvedAt':_0x499056,'resolvedBy':_0x7c4265,'target':_0x1d7c9a,'context':_0xf66e2e,'attributes':_0x2b3ab2,'isFromAdapter':_0xbf289b,'isResolvable':_0x25bef0,'isSubmitted':_0x53ccf2}),this['getCommentThread'](_0x12aa8b);}['openNewCommentThread']({channelId:_0x123325=_t,threadId:_0x4e88aa=_0x4e4b92(),target:_0x4734dd,context:_0x42b8c9=null,isResolvable:_0x3044b2=!0x0}){if(this['_readOnlyChannels']['has'](_0x123325)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4734dd)throw new _0x5199cf('commentsrepository-missing-target');const _0x11d082=this['addCommentThread']({'channelId':_0x123325,'threadId':_0x4e88aa,'target':_0x4734dd,'context':_0x42b8c9,'isResolvable':_0x3044b2});if(!_0x11d082)return null;const _0x183d33=this['_threadToController']['get'](_0x11d082),_0x2d6c20=_0x183d33['view']['commentThreadInputView']['commentInputView'],_0x31995f=this['context']['plugins']['get'](y),_0xe0adaf=_0x31995f['getByInnerView'](_0x183d33['view']);return _0x31995f['activate'](_0xe0adaf),_0x2d6c20['once']('editorReady',()=>_0x2d6c20['focus']()),_0x11d082;}['hasCommentThread'](_0xde226b){if('string'!=typeof _0xde226b)throw new _0x5199cf('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xde226b);}['updateCommentThread']({channelId:_0x48c423=_t,threadId:_0x25d844,context:_0x4360d3,unlinkedAt:_0x5969eb,attributes:_0x292402,isFromAdapter:_0x41eee0=!0x1}){return this['fire'](Nt('updateCommentThread',_0x48c423),{'channelId':_0x48c423,'threadId':_0x25d844,'context':_0x4360d3,'unlinkedAt':_0x5969eb,'attributes':_0x292402,'isFromAdapter':_0x41eee0}),this['getCommentThread'](_0x25d844);}['getCommentThread'](_0x431a67){if('string'!=typeof _0x431a67)throw new _0x5199cf('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x431a67);}['fetchCommentThread']({channelId:_0x11daaa,threadId:_0x24d482}={}){const _0x3d9d6c=this['getCommentThread'](_0x24d482);if(_0x3d9d6c)return Promise['resolve'](_0x3d9d6c);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5199cf('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x11daaa,'threadId':_0x24d482})['then'](_0x309646=>this['hasCommentThread'](_0x24d482)?this['getCommentThread'](_0x24d482):_0x309646?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x11daaa},_0x309646)):void 0x0)['catch'](_0x5b0846=>{throw console['error'](_0x5b0846),new _0x5199cf('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5a632a,skipNotAttached:_0x4ff37d=!0x1,skipEmpty:_0x57427f=!0x1,toJSON:_0x3657f7=!0x1}={}){const _0x3337eb=[];for(const _0x3be420 of this['_threads']['values']())_0x5a632a&&_0x3be420['channelId']!==_0x5a632a||_0x4ff37d&&!_0x3be420['isAttached']||_0x57427f&&0x0===_0x3be420['length']||_0x3337eb['push'](_0x3be420);return _0x3657f7?_0x3337eb['map'](_0x5d3c22=>_0x5d3c22['toJSON']()):_0x3337eb;}['getAnnotationForCommentThread'](_0x4cc211){const _0x489adf=this['_threadToController']['get'](_0x4cc211);if(!_0x489adf)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x489adf['view'])||null;}['getCommentThreadForAnnotation'](_0x5bd7c1){const _0x5d17af=this['_viewToController']['get'](_0x5bd7c1['innerView']);return _0x5d17af?_0x5d17af['model']:null;}['setActiveCommentThread'](_0x1b2558){const _0xf6926f=this['context']['plugins']['get'](y);if(!_0x1b2558)return void(this['activeCommentThread']&&_0xf6926f['deactivateAll']());const _0x42fe13=this['getCommentThread'](_0x1b2558);if(!_0x42fe13)throw new _0x5199cf('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1b2558});if(!this['_threadToController']['has'](_0x42fe13))throw new _0x5199cf('commentsrepository-active-not-attached',null,{'threadId':_0x1b2558});const _0x302e09=_0xf6926f['getByInnerView'](this['_threadToController']['get'](_0x42fe13)['view']);_0xf6926f['activate'](_0x302e09);}['switchReadOnly'](_0x34f98b,_0x555c47){_0x34f98b?this['_readOnlyChannels']['add'](_0x555c47):this['_readOnlyChannels']['delete'](_0x555c47),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4063cc){return this['_readOnlyChannels']['has'](_0x4063cc)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2f6a45,_0x45e847){return new vt(_0x2f6a45,_0x45e847);}['setPermissions'](_0x4fb58,_0x3c60b6=_t){this['_permissions']['set'](_0x3c60b6,_0x4fb58),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x37b230=_t){return this['_permissions']['has'](_0x37b230)?this['_permissions']['get'](_0x37b230):bt;}['_addCommentThread']({channelId:_0x344ecb,threadId:_0xc48d41,comments:_0x3b6716,unlinkedAt:_0x64c914,resolvedAt:_0x4dcdc9,resolvedBy:_0x2b6d79,target:_0x35b82e,context:_0x472811,attributes:_0x730446,isFromAdapter:_0x519f07,isResolvable:_0x3b1a93,isSubmitted:_0x4c3946}){if('string'!=typeof _0xc48d41)throw new _0x5199cf('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xc48d41});if(this['hasCommentThread'](_0xc48d41))throw new _0x5199cf('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xc48d41});const _0x236a70=new CommentThread(this,{'channelId':_0x344ecb,'id':_0xc48d41,'context':_0x472811,'attributes':_0x730446,'unlinkedAt':_0x64c914,'resolvedAt':_0x4dcdc9,'resolvedBy':_0x2b6d79?this['context']['plugins']['get'](it)['getUser'](_0x2b6d79):null,'isResolvable':_0x3b1a93,'isSubmitted':_0x4c3946||_0x519f07});this['_threads']['set'](_0xc48d41,_0x236a70);for(const _0x1150ee of _0x3b6716)_0x236a70['_add'](this['_createNewComment']({'threadId':_0xc48d41,..._0x1150ee}));return _0x35b82e&&_0x236a70['attachTo'](_0x35b82e),_0x519f07||!_0x236a70['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x344ecb,'threadId':_0xc48d41});}['_submitCommentThread']({channelId:_0x819bf2,threadId:_0x5e4778}){if(!this['hasCommentThread'](_0x5e4778))throw new _0x5199cf('commentsrepository-missing-comment-thread',this);const _0x15eac1=this['getCommentThread'](_0x5e4778);if(_0x15eac1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x27586c,comments:_0x5d0747,resolvedAt:_0x5a4eb4,resolvedBy:_0x1e265b,context:_0x4f1a2e,attributes:_0x367859}=_0x15eac1,_0x9166c2=this['context']['plugins']['get']('PendingActions'),_0x3a22d0=_0x9166c2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x819bf2,'threadId':_0x27586c,'comments':_0x5d0747['map'](_0x230b88=>_0x230b88['toJSON']()),'resolvedAt':_0x5a4eb4,'resolvedBy':_0x1e265b?_0x1e265b['id']:_0x1e265b,'context':_0x4f1a2e,'attributes':_0x367859})['then'](({comments:_0xaa0c3d})=>{_0x9166c2['remove'](_0x3a22d0);for(const _0x2958c1 of _0xaa0c3d)this['_updateComment']({'channelId':_0x819bf2,'threadId':_0x5e4778,'commentId':_0x2958c1['commentId'],'createdAt':_0x2958c1['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2d6714=>{throw console['error'](_0x2d6714),new _0x5199cf('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x50ddb3,target:_0x93c50b}){const _0x38eb55=this['getCommentThread'](_0x50ddb3);if(!_0x38eb55)throw new _0x5199cf('commentsrepository-attach-missing-comment-thread',this);const _0x427db6=this['context']['plugins']['get']('PendingActions'),_0x1757b4=this['context']['plugins']['get'](y),_0x3d96ab=this['_createCommentThreadView'](_0x38eb55),_0x401c18=new vt(_0x38eb55,_0x3d96ab);let _0x8ba508=null;_0x3d96ab['on']('change:isDirty',(_0x6e2377,_0x55b042,_0x2ca1ee)=>{_0x2ca1ee?_0x8ba508=_0x427db6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x8ba508&&(_0x427db6['remove'](_0x8ba508),_0x8ba508=null);}),this['_threadToController']['set'](_0x38eb55,_0x401c18),this['_viewToController']['set'](_0x3d96ab,_0x401c18);const _0x492c86=new E(this['context']['locale'],_0x3d96ab);_0x492c86['bind']('length')['to'](_0x3d96ab),_0x492c86['bind']('isDirty')['to'](_0x3d96ab,'isDirty',_0x3d96ab,'length',(_0x5c809f,_0xb783f2)=>_0x5c809f||!_0xb783f2),_0x492c86['bind']('isActive')['to'](_0x3d96ab),_0x492c86['type']='comment';const _0x1443ce=new T({'view':_0x492c86,'target':_0x93c50b,'type':'comment','isVisible':!_0x38eb55['archivedAt']&&!!('function'==typeof _0x93c50b?_0x93c50b():_0x93c50b)});return _0x3d96ab['on']('escape',()=>{_0x1443ce['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3d96ab,_0x1443ce),_0x1757b4['add'](_0x1443ce),_0x1443ce;}['_bindAnnotationToEditors'](_0x18152c,_0x1b38f7){this['listenTo'](_0x18152c,'editorReady',(_0x32687f,_0x2b2609)=>{const _0x5bd65a=_0x2b2609['ui']['view']['body']['bodyCollectionContainer'];_0x1b38f7['focusableElements']['add'](_0x5bd65a),this['context']instanceof _0x25b851&&this['context']['ui']['focusTracker']['add'](_0x5bd65a);},{'priority':'highest'}),this['listenTo'](_0x18152c,'editorDestroyed',(_0x489ef3,_0x3d649a)=>{const _0x48474e=_0x3d649a['ui']['view']['body']['bodyCollectionContainer'];_0x1b38f7['focusableElements']['has'](_0x48474e)&&_0x1b38f7['focusableElements']['remove'](_0x48474e),this['context']instanceof _0x25b851&&this['context']['ui']['focusTracker']['remove'](_0x48474e);});}['_unbindEditors'](_0x529f4a){this['stopListening'](_0x529f4a,'editorReady'),this['stopListening'](_0x529f4a,'editorDestroyed');}['_createCommentThreadView'](_0x5e69b0){const _0x3f42bf=this['context']['plugins']['get'](it),{config:_0x476b76,locale:_0x42ab32}=this['context'],_0x5428eb=pt(_0x476b76['get']('locale'),_0x42ab32);return new(0x0,(_0x476b76['get']('comments'))['CommentThreadView'])(_0x42ab32,_0x5e69b0,_0x3f42bf['me'],{'editorConfig':{..._0x476b76['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x476b76['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x476b76['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x476b76['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x476b76['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5428eb,'CommentView':_0x476b76['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x8185c8,channelId:_0x489615,resolvedAt:_0x4bd3e2,resolvedBy:_0x4073da,isFromAdapter:_0x53b53f}){if(!this['hasCommentThread'](_0x8185c8))throw new _0x5199cf('commentsrepository-missing-comment-thread',null,{'threadId':_0x8185c8});const _0x3713ca=this['getCommentThread'](_0x8185c8);if(_0x3713ca['isResolved'])throw new _0x5199cf('commentsrepository-resolved-comment-thread',null,{'threadId':_0x8185c8});const _0x3a2652=this['context']['plugins']['get'](it);if(_0x3713ca['resolvedBy']=_0x3a2652['getUser'](_0x4073da),_0x3713ca['resolvedAt']=_0x4bd3e2,_0x53b53f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1c54c0=this['context']['plugins']['get']('PendingActions'),_0x36edca=_0x1c54c0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x489615,'threadId':_0x8185c8})['then'](({resolvedAt:_0x2705e1,resolvedBy:_0x555d11})=>{_0x1c54c0['remove'](_0x36edca),_0x3713ca['resolvedBy']['id']!==_0x555d11&&(_0x3713ca['resolvedBy']=_0x3a2652['getUser'](_0x555d11)),_0x3713ca['resolvedAt']=_0x2705e1;})['catch'](_0x4b8cdf=>{throw console['error'](_0x4b8cdf),new _0x5199cf('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2c4f28,channelId:_0x2fdc66,isFromAdapter:_0x13f0ae}){if(!this['hasCommentThread'](_0x2c4f28))throw new _0x5199cf('commentsrepository-missing-comment-thread',null,{'threadId':_0x2c4f28});const _0x3a8fc2=this['getCommentThread'](_0x2c4f28);if(!_0x3a8fc2['isResolved'])throw new _0x5199cf('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2c4f28});if(_0x3a8fc2['resolvedBy']=null,_0x3a8fc2['resolvedAt']=null,_0x13f0ae||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x9da324=this['context']['plugins']['get']('PendingActions'),_0x791410=_0x9da324['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2fdc66,'threadId':_0x2c4f28})['then'](()=>_0x9da324['remove'](_0x791410))['catch'](_0x180571=>{throw console['error'](_0x180571),new _0x5199cf('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x35cdb1,isFromAdapter:_0x50c2f5}){const _0x1db696=this['getCommentThread'](_0x35cdb1);if(!_0x1db696)throw new _0x5199cf('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x35cdb1),this['_threads']['delete'](_0x35cdb1),!_0x1db696['isSubmitted']||_0x50c2f5||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x56a57c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1f0acf}=_0x1db696,_0x211aa2=_0x56a57c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1f0acf,'threadId':_0x35cdb1})['then'](()=>_0x56a57c['remove'](_0x211aa2))['catch'](_0x57a029=>{throw console['error'](_0x57a029),new _0x5199cf('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2d8ba6,unlinkedAt:_0xb2591b,context:_0x34c54c,attributes:_0x3955b2,isFromAdapter:_0x109f71}){if('string'!=typeof _0x2d8ba6)throw new _0x5199cf('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2d8ba6});if(!this['hasCommentThread'](_0x2d8ba6))throw new _0x5199cf('commentsrepository-missing-comment-thread',null,{'threadId':_0x2d8ba6});const _0x30286b=this['getCommentThread'](_0x2d8ba6);let _0x19e445=!0x1;if(void 0x0!==_0x34c54c&&_0x30286b['context']!==_0x34c54c&&(_0x30286b['context']=_0x34c54c,_0x19e445=!0x0),void 0x0!==_0xb2591b&&_0x30286b['unlinkedAt']!==_0xb2591b&&(_0x30286b['unlinkedAt']=_0xb2591b,_0x19e445=!0x0),_0x3955b2&&!At(_0x3955b2,_0x30286b['attributes'])&&(_0x30286b['attributes']=_0x3955b2,_0x19e445=!0x0),!_0x19e445)return Promise['resolve']();if(!_0x30286b['isSubmitted']||_0x109f71||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x403d84=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7d6ea7}=_0x30286b,_0x1bc1c4=_0x403d84['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x7d6ea7,'threadId':_0x2d8ba6,'context':_0x34c54c,'unlinkedAt':_0xb2591b,'attributes':_0x3955b2})['then'](()=>_0x403d84['remove'](_0x1bc1c4))['catch'](_0x519a26=>{throw console['error'](_0x519a26),new _0x5199cf('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1ee473){const _0x1ee16c=this['context']['plugins']['get'](y),_0x3c5c68=this['getCommentThread'](_0x1ee473);if(_0x3c5c68['_isAttached']=!0x1,this['_threadToController']['has'](_0x3c5c68)){const _0x4659b3=this['_threadToController']['get'](_0x3c5c68),_0x5e8276=_0x4659b3['view'],_0x5f151a=_0x1ee16c['getByInnerView'](_0x5e8276);this['_threadToController']['delete'](_0x3c5c68),this['_viewToController']['delete'](_0x5e8276),_0x5f151a&&_0x1ee16c['remove'](_0x5f151a),_0x4659b3['destroy'](),_0x5e8276['destroy']()['then'](()=>{this['_unbindEditors'](_0x5e8276);});}}['_updateActiveAnnotation']({threadId:_0x29e5ca,resolvedAt:_0x23bd11,unlinkedAt:_0xfb23d1}){const _0x3378b4=!!_0x23bd11,_0x3c5650=this['context']['plugins']['get'](y),_0x2adfb0=this['getCommentThread'](_0x29e5ca);if(this['_threadToController']['has'](_0x2adfb0)){const _0x5177b4=this['_threadToController']['get'](_0x2adfb0)['view'],_0x1c373f=_0x3c5650['getByInnerView'](_0x5177b4);_0x1c373f&&(_0x3378b4&&_0x3c5650['_removeActiveAnnotation'](_0x1c373f),_0xfb23d1?_0x1c373f['isVisible']=!0x1:_0x1c373f['refreshVisibility']());}}['_getExternalAuthor'](_0x5e0145){const _0x1de437=this['context']['plugins']['get'](it),_0x5bc061=It('external:'+_0x5e0145),_0x1e003a=_0x1de437['getUser'](_0x5bc061);return _0x1e003a||_0x1de437['addUser']({'id':_0x5bc061,'name':_0x5e0145});}['_createNewComment']({threadId:_0x2ef5a3,commentId:_0x476bc9=_0x4e4b92(),content:_0x5a14f9,authorId:_0x5535b0,createdAt:_0x1603b4,attributes:_0xc30a81}){if('string'!=typeof _0x476bc9)throw new _0x5199cf('commentsrepository-invalid-commentid');if('string'!=typeof _0x5535b0)throw new _0x5199cf('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5a14f9||!_0x5a14f9['trim']())throw new _0x5199cf('commentsrepository-invalid-comment-content');const _0xcb6030=this['context']['plugins']['get'](it)['getUser'](_0x5535b0);if(!_0xcb6030)throw new _0x5199cf('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5535b0});let _0x3a24c9=null,_0x5adb79=_0x1603b4;return _0xc30a81?.['@external']&&(_0x3a24c9=this['_getExternalAuthor'](_0xc30a81['@external']['authorName']),_0x5adb79=new Date(_0xc30a81['@external']['createdAt'])),new Comment(this,{'threadId':_0x2ef5a3,'id':_0x476bc9,'author':_0x3a24c9||_0xcb6030,'creator':_0xcb6030,'content':_0x5a14f9,'createdAt':_0x1603b4,'authoredAt':_0x5adb79,'attributes':_0xc30a81});}['_addComment'](_0x1e7648){let {threadId:_0x2b0388,content:_0x31c854,attributes:_0xf352eb,isFromAdapter:_0x476f1b}=_0x1e7648;const _0x53a0e5=this['getCommentThread'](_0x1e7648['threadId']);if(!_0x53a0e5)throw new _0x5199cf('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x24dc77=this['_createNewComment'](_0x1e7648),{id:_0x4e7250}=_0x24dc77;if(_0x53a0e5['_add'](_0x24dc77),_0x476f1b||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x53a0e5['isSubmitted'])return Promise['resolve']();const _0x46aa5f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x21d2de}=_0x53a0e5,_0x20d5f2=_0x46aa5f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xf352eb||(_0xf352eb={}),this['adapter']['addComment']({'channelId':_0x21d2de,'threadId':_0x2b0388,'commentId':_0x4e7250,'content':_0x31c854,'attributes':_0xf352eb})['then'](_0x1ac97f=>{_0x46aa5f['remove'](_0x20d5f2),_0x1ac97f&&this['_updateComment']({'channelId':_0x21d2de,'threadId':_0x2b0388,'commentId':_0x4e7250,'createdAt':_0x1ac97f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xd467e5=>{throw console['error'](_0xd467e5),new _0x5199cf('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x532ed6,commentId:_0x5c923a,content:_0x5bac60,createdAt:_0x5a040a,attributes:_0x364296,isFromAdapter:_0x22f06c}){if(void 0x0!==_0x5bac60&&('string'!=typeof _0x5bac60||!_0x5bac60['trim']()['length']))throw new _0x5199cf('commentsrepository-update-comment-invalid-content');const _0x3d937a=this['getCommentThread'](_0x532ed6),_0x109bdc=_0x3d937a['getComment'](_0x5c923a);if(!_0x109bdc)throw new _0x5199cf('commentsrepository-update-missing-comment',this);let _0x5c047b=!0x1;if(_0x5bac60&&_0x5bac60!==_0x109bdc['content']&&(_0x109bdc['isEditable']||_0x22f06c)&&(_0x109bdc['content']=_0x5bac60,_0x5c047b=!0x0),_0x5a040a&&_0x5a040a!==_0x109bdc['createdAt']&&(_0x109bdc['createdAt']=_0x5a040a,_0x109bdc['attributes']&&_0x109bdc['attributes']['@external']||(_0x109bdc['authoredAt']=_0x5a040a),_0x5c047b=!0x0),_0x364296&&!At(_0x364296,_0x109bdc['attributes'])&&(_0x109bdc['attributes']=_0x364296,_0x5c047b=!0x0),!_0x5c047b)return Promise['resolve']();if(_0x3d937a['fire']('commentUpdated'),_0x22f06c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x54630c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3b0376}=this['getCommentThread'](_0x109bdc['threadId']),_0x2166b4=_0x54630c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3b0376,'threadId':_0x532ed6,'commentId':_0x5c923a,'content':_0x5bac60,'attributes':_0x364296})['then'](()=>_0x54630c['remove'](_0x2166b4))['catch'](_0x31e4cd=>{throw console['error'](_0x31e4cd),new _0x5199cf('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x2e5537,commentId:_0x1868f2,isFromAdapter:_0x86a345}){const _0x53470c=this['getCommentThread'](_0x2e5537),_0x3a14fb=_0x53470c['getComment'](_0x1868f2);if(!_0x3a14fb)throw new _0x5199cf('commentsrepository-remove-missing-comment',this);if(_0x53470c['_remove'](_0x3a14fb),_0x86a345||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4a1099=this['context']['plugins']['get']('PendingActions'),{channelId:_0xb7f3b3}=_0x53470c,_0x18d5b4=_0x4a1099['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xb7f3b3,'threadId':_0x2e5537,'commentId':_0x1868f2})['then'](()=>_0x4a1099['remove'](_0x18d5b4))['catch'](_0x391ad1=>{throw console['error'](_0x391ad1),new _0x5199cf('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x37aab7(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5585fb,_0x2acade){super();const _0x5ab7b2=_0x5585fb['context']['plugins']['get'](it)['me'],_0x1fca62=_0x5585fb['getCommentThread'](_0x2acade['threadId']),_0x674e03=0x0===_0x1fca62['comments']['length'],_0x2da0c3=_0x5ab7b2===_0x2acade['author'];this['id']=_0x2acade['id'],this['threadId']=_0x2acade['threadId'],this['author']=_0x2acade['author'],this['creator']=_0x2acade['creator'],this['isExternal']=Boolean(_0x2acade['attributes']&&_0x2acade['attributes']['@external']),this['set']('content',_0x2acade['content']),this['createdAt']=_0x2acade['createdAt']||new Date(),this['set']('authoredAt',_0x2acade['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1fca62,'resolvedAt'),this['set']('attributes',_0x2acade['attributes']||{}),this['bind']('isEditable')['to'](_0x5585fb,'_permissions',()=>{const _0x37c3f1=_0x5585fb['getPermissions'](_0x1fca62['channelId'])['write'],_0x37014a=_0x5585fb['getPermissions'](_0x1fca62['channelId'])['modifyAll'];return _0x2da0c3&&_0x37c3f1||!_0x2da0c3&&_0x37014a;}),this['bind']('isRemovable')['to'](_0x1fca62,'isRemovable',_0x5585fb,'_permissions',_0x31f08c=>{const _0x4b9193=_0x5585fb['getPermissions'](_0x1fca62['channelId'])['write'],_0x268cbc=_0x5585fb['getPermissions'](_0x1fca62['channelId'])['modifyAll'];return _0x2da0c3&&_0x4b9193||_0x31f08c&&_0x674e03||!_0x2da0c3&&_0x268cbc&&!_0x674e03;}),this['bind']('isReadOnly')['to'](_0x1fca62,'isReadOnly'),this['_repository']=_0x5585fb;}get['weight'](){return Math['max'](function(_0x2ef2a3){const _0x25a0c9=document['createElement']('div');return _0x25a0c9['innerHTML']=_0x2ef2a3,_0x25a0c9['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3f9c89){const {threadId:_0x5ef9e9,id:_0x5e0ca5}=this;if(!this['_repository']['hasCommentThread'](_0x5ef9e9))throw new _0x5199cf('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x295a1a}=this['_repository']['getCommentThread'](_0x5ef9e9);this['_repository']['fire'](Nt('updateComment',_0x295a1a,_0x5ef9e9),{'channelId':_0x295a1a,'threadId':_0x5ef9e9,'commentId':_0x5e0ca5,..._0x3f9c89});}['setAttribute'](_0x11df54,_0x329fb1){const _0x23cf31=wt(this['attributes']);yt(_0x23cf31,_0x11df54,_0x329fb1),this['update']({'attributes':_0x23cf31});}['removeAttribute'](_0x38d221){const _0x1c3e3b=wt(this['attributes']);Ct(_0x1c3e3b,_0x38d221),this['update']({'attributes':_0x1c3e3b});}['remove'](_0x5476ec={}){if(!_0x5476ec['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x138090,id:_0x4e526a}=this;if(!this['_repository']['hasCommentThread'](_0x138090))throw new _0x5199cf('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x3bcbf7}=this['_repository']['getCommentThread'](_0x138090);this['_repository']['fire'](Nt('removeComment',_0x3bcbf7,_0x138090),{'channelId':_0x3bcbf7,'threadId':_0x138090,'commentId':_0x4e526a,..._0x5476ec});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x5ae764,..._0x1aee34){for(const _0x1fe1b7 of _0x1aee34)void 0x0!==_0x1fe1b7&&(_0x5ae764+=':'+String(_0x1fe1b7));return _0x5ae764;}class ot extends _0x37e591{constructor(_0x44f2c8){super(_0x44f2c8),this['set']('hasContent',!0x1);}['refresh'](){const _0x4be83b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2c651f of _0x4be83b['getRanges']())if(this['_hasContent'](_0x2c651f))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x141c5e=_0x4e4b92(),ranges:_0x4d4b42,comment:_0x4c5e2d}={}){const _0x289a28=this['editor']['model'],_0x19ec15=_0x4d4b42??Array['from'](_0x289a28['document']['selection']['getRanges']()),_0xe60151=[];for(const _0x3ad0cf of _0x19ec15)this['_hasContent'](_0x3ad0cf)&&_0xe60151['push'](this['_trimToContent'](_0x3ad0cf));if(!_0xe60151['length'])throw new _0x5199cf('addcommentthreadcommand-incorrect-ranges',null);_0x4c5e2d&&this['_createCommentThread'](_0x141c5e,_0x4c5e2d),this['_createMarkersFromRanges'](_0x141c5e,_0xe60151,!!_0x4c5e2d);}['_createMarkersFromRanges'](_0x5b27af,_0x13c8a9,_0x1d0a48){this['editor']['model']['change'](_0x14cd10=>{for(const _0x1764f6 of _0x13c8a9){const _0x54b42c=_0x4e4b92()['substr'](0x1,0x5),_0x3071a7='comment:'+_0x5b27af+':'+_0x54b42c;_0x14cd10['addMarker'](_0x3071a7,{'range':_0x1764f6,'usingOperation':_0x1d0a48,'affectsData':_0x1d0a48});}});}['_createCommentThread'](_0x24c1e1,_0x425e0b){const _0x101cb3=this['editor']['plugins']['get']('CommentsRepository'),_0x3308a8=this['editor']['config']['get']('collaboration.channelId'),_0x52bdf1=this['editor']['plugins']['get']('Users')['me'];if(!_0x52bdf1)throw new _0x5199cf('addcommentthreadcommand-user-not-found',null);_0x101cb3['addCommentThread']({'threadId':_0x24c1e1,'channelId':_0x3308a8,'comments':[{'authorId':_0x52bdf1['id'],'content':_0x425e0b,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x47f7cf){for(const _0x471f7f of _0x47f7cf['getItems']())if(this['_itemIsContent'](_0x471f7f))return!0x0;return!0x1;}['_itemIsContent'](_0x29ea88){return _0x29ea88['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x29ea88)&&!_0x29ea88['is']('element','tableCell');}['_trimToContent'](_0x417d8a){const _0x1513d9=_0x3cc8dd=>!this['_itemIsContent'](_0x3cc8dd['item']),_0x1c784f=_0x417d8a['start']['getLastMatchingPosition'](_0x1513d9),_0x463c82=_0x417d8a['end']['getLastMatchingPosition'](_0x1513d9,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1c784f,_0x463c82);}}class b extends _0x3456c4{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x18f13a){super(_0x18f13a),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xcd338e=this['editor'],_0x4fe8b0=_0xcd338e['model']['document']['selection'],_0x3d462b=_0x9c41f3(()=>this['refreshSelectedViews'](),0xa);_0x4fe8b0['on']('change:range',(_0x15f8c9,_0x28eb17)=>{_0x28eb17['directChange']&&(_0x3d462b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xcd338e['editing']['view']['document'],'change:isFocused',(_0xdc510e,_0x18b23f,_0x512e8c)=>{_0x512e8c&&_0x3d462b();}),this['listenTo'](_0xcd338e['ui']['focusTracker'],'change:isFocused',(_0x6d33a9,_0x559552,_0x34ddb4)=>{_0x34ddb4||this['fire']('blur',{'isAnnotationTracked':_0x1bb3d3=>this['_editorAnnotationsData']['has'](_0x1bb3d3['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4ce865){if(this['_editorAnnotations']['has'](_0x4ce865['view']))return;this['_editorAnnotations']['add'](_0x4ce865['view']),this['editor']['ui']['focusTracker']['add'](_0x4ce865['view']['element']);const _0x2ed3a5=this['editor']['plugins']['get'](y);this['listenTo'](_0x2ed3a5['collection'],'remove',(_0x40823a,_0x1201b0)=>{this['editor']['ui']['focusTracker']['remove'](_0x1201b0['view']['element']),this['_editorAnnotations']['delete'](_0x1201b0['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1f7586){if('function'!=typeof _0x1f7586)throw new _0x5199cf('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1f7586);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x11edce,annotations:_0x363579}){const _0x4dd83d=[],_0x379f6c=this['editor']['model']['document']['selection'],_0x430f56=Array['from'](_0x379f6c['getRanges']());for(const [_0x2125a4,_0x1d73eb]of this['_editorAnnotationsData']){const _0xaf5b57=_0x1666df(_0x1d73eb),_0x43451a=_0x363579['getByInnerView'](_0x2125a4);_0xaf5b57&&_0x43451a&&_0x4dd83d['push']({'annotation':_0x43451a,'range':_0xaf5b57});}function _0x1666df(_0x255ad2){for(const _0x1ed151 of _0x255ad2)for(const _0x4ff40b of _0x430f56)if(_0x1ed151['containsRange'](_0x4ff40b,!_0x379f6c['isCollapsed']))return _0x1ed151;return null;}return _0x4dd83d['sort']((_0x95fcfb,_0x28c965)=>{const _0x1dcf8f=_0x95fcfb['range'],_0x5e256a=_0x28c965['range'];if(!_0x1dcf8f['isEqual'](_0x5e256a)){if(_0x1dcf8f['containsRange'](_0x5e256a,!0x0))return 0x1;if(_0x5e256a['containsRange'](_0x1dcf8f,!0x0))return-0x1;}return _0x95fcfb['annotation']==_0x11edce?-0x1:_0x28c965['annotation']==_0x11edce?0x1:0x0;})['map'](_0x15a2ef=>_0x15a2ef['annotation']);}get['_editorAnnotationsData'](){const _0x452cb1=new Map();for(const _0xfb79bf of Array['from'](this['_dataCollectors']))for(const [_0x387d4f,_0x20243d]of _0xfb79bf())_0x452cb1['set'](_0x387d4f,_0x20243d);return _0x452cb1;}}class st extends _0x3456c4{['afterInit'](){const _0x48be66=this['editor'];if(!_0x48be66['plugins']['has']('RestrictedEditingModeEditing'))return;_0x48be66['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3456c4{constructor(_0x58b443){super(_0x58b443),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1f0156=this['editor'],_0x15117c=_0x1f0156['commands']['get']('importWord'),_0x4a2dda=_0x1f0156['plugins']['get'](it);_0x15117c&&(_0x15117c['on']('execute',(_0x22b1ad,[,_0x5bbe46])=>{_0x5bbe46['collaboration_features']={'comments':!0x0,'user_id':_0x4a2dda['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x15117c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x222efb,_0x399f77){const {comment_threads:_0xdb3529}=_0x399f77;_0xdb3529&&_0xdb3529['forEach'](({thread_id:_0x24472e,comments:_0x1eade9,is_resolved:_0x435be4})=>{const _0xaa425f=new Date(),_0x3f9564=_0x1eade9['map'](({author:_0x1e5f12,content:_0x958543,created_at:_0x2c64ca})=>({'content':_0x958543,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0xaa425f,'attributes':{'@external':{'authorName':_0x1e5f12,'createdAt':_0x2c64ca?new Date(_0x2c64ca):new Date(),'source':'importWord'}}})),_0x1f0789=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1f0789,'threadId':_0x24472e,'comments':_0x3f9564,'resolvedAt':_0x435be4?_0xaa425f:null});});}}class at extends _0x3456c4{constructor(_0x20838c){super(_0x20838c),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x12ddfb=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x12ddfb,'contentInsertion',(_0x2b8c39,_0x2566a6)=>this['_removeMarkersWithoutThreads'](_0x2566a6['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3f3354){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3f3354;const _0x183d4f=this['editor']['plugins']['get']('CommentsRepository');for(const _0x56746c of _0x3f3354['keys']()){const [_0x5c9a60,_0x4a82da]=_0x56746c['split'](':');'comment'!=_0x5c9a60||_0x183d4f['hasCommentThread'](_0x4a82da)||_0x3f3354['delete'](_0x56746c);}return _0x3f3354;}['_registerMarkerInClipboardPipeline'](){const _0x34cf3e=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x271e5b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x271e5b&&_0x34cf3e['_registerMarkerToCopy']('comment',_0x271e5b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4de3fc){switch(_0x4de3fc){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x2857ab){const _0x37d2c9=_0x2857ab['split'](':');return{'group':_0x37d2c9[0x0],'id':_0x37d2c9[0x1],'part':_0x37d2c9[0x2]};}class ut extends _0x3456c4{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xe79604,_0x5d508d)=>{if(!_0x5d508d['options']['showCommentHighlights'])return null;if(_0x5d508d['options']['ignoreResolvedComments']){const {id:_0x125c98}=ft(_0xe79604['markerName']),_0x3d0a16=this['editor']['plugins']['get'](o);if(_0x3d0a16['getCommentThread'](_0x125c98)?.['isResolved']&&_0xe79604['item'])return _0x5d508d['consumable']['consume'](_0xe79604['item'],'addMarker:'+_0xe79604['markerName']),_0x5d508d['consumable']['consume'](_0xe79604['item'],'removeMarker:'+_0xe79604['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xa3418=>{_0xa3418['on']('addMarker:comment',(_0x317d20,_0x1b6058,_0x33b264)=>{if(!_0x33b264['options']['showCommentHighlights'])return;const _0x511ab5=_0x1b6058['item'];if(!_0x511ab5)return;const _0x362011=_0x33b264['mapper']['toViewElement'](_0x511ab5);this['editor']['model']['schema']['isObject'](_0x511ab5)&&_0x362011&&!_0x362011['getCustomProperty']('widget')&&_0x362011['is']('containerElement')&&_0x3779fa(_0x362011,_0x33b264['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x48197d,{writer:_0x424752,options:_0x55d384})=>{if(!_0x55d384['showCommentHighlights'])return null;const _0x1be6ab=_0x424752['createContainerElement']('div'),_0x2fe6e3=_0x424752['createEmptyElement']('hr');return _0x424752['addClass']('ck-horizontal-line',_0x1be6ab),_0x424752['insert'](_0x424752['createPositionAt'](_0x1be6ab,0x0),_0x2fe6e3),_0x1be6ab;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x12cf59,{writer:_0x41f586,options:_0x1248d7})=>{if(!_0x1248d7['showCommentHighlights'])return null;const _0x176e96=_0x41f586['createContainerElement']('span'),_0x3514b6=_0x41f586['createEmptyElement']('img');return _0x41f586['addClass']('image-inline',_0x176e96),_0x41f586['insert'](_0x41f586['createPositionAt'](_0x176e96,0x0),_0x3514b6),_0x176e96;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5bda76,{writer:_0x3f28d0,options:_0x3ceb27})=>{if(_0x3ceb27['showCommentHighlights'])return _0x3f28d0['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x278c58,_0x2685c7,_0x1d07a0)=>{_0x1d07a0['options']['showCommentHighlights']&&_0x278c58['stop']();},{'priority':'high'});}}class r extends _0x3456c4{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(_0x37f28f){super(_0x37f28f),this['set']('isThreadsLoadingPaused',!0x0),_0x37f28f['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4bc0f4,_0x1fee18,_0x2be4d3,_0x450108)=>{const _0x2c7be9=_0x37f28f['plugins']['get'](o),_0x33ebdb=_0x2be4d3?ft(_0x2be4d3)['id']:null;_0x37f28f['model']['change'](()=>{if(_0x33ebdb){const _0x55c50b=this['getAllMarkersForId'](_0x33ebdb);for(const _0x526f89 of _0x55c50b)_0x37f28f['editing']['reconvertMarker'](_0x526f89);}if(_0x450108){const {id:_0x4d18f2}=ft(_0x450108),_0x237b46=_0x2c7be9['getCommentThread'](_0x4d18f2);if(_0x237b46&&_0x237b46['unlinkedAt'])return;if(_0x237b46&&!_0x237b46['isAttached'])return;const _0x3b6df4=this['getAllMarkersForId'](_0x4d18f2);for(const _0x39f7c3 of _0x3b6df4)_0x37f28f['editing']['reconvertMarker'](_0x39f7c3);}}),_0x33ebdb&&this['scrollToThreadMarker'](_0x33ebdb);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x3ce04d=this['editor'],_0x5b6e61=_0x3ce04d['plugins']['get'](o),_0x240199=_0x3ce04d['config']['get']('collaboration.channelId'),_0xd5ea3f=_0x5b6e61['getCommentThreads']()['filter'](_0x2bcfdd=>_0x2bcfdd['channelId']!==_0x240199);_0x3ce04d['commands']['add']('addCommentThread',new ot(_0x3ce04d)),this['listenTo'](_0x3ce04d,'change:isReadOnly',(_0x448fa9,_0x1c008c,_0x25ad23)=>{_0x5b6e61['switchReadOnly'](_0x25ad23,_0x3ce04d['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x5b6e61,dt('addCommentThread',_0x240199),(_0x2a539c,{threadId:_0x5bcbc8})=>{const _0x10c3e1=this['editor']['plugins']['get'](o)['getCommentThread'](_0x5bcbc8);_0x10c3e1?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5bcbc8);}),this['listenTo'](_0x5b6e61,dt('removeCommentThread',_0x240199),(_0x3a61b4,{threadId:_0x4f416d})=>{_0x3ce04d['model']['enqueueChange']({'isUndoable':!0x1},_0x1c4fff=>{const _0x16a42c=this['getAllMarkersForId'](_0x4f416d);for(const _0x514ec7 of _0x16a42c)_0x1c4fff['removeMarker'](_0x514ec7);});}),this['listenTo'](_0x5b6e61,dt('resolveCommentThread',_0x240199),(_0x3f3a5e,{threadId:_0x679f2})=>{(this['_reconvertMarkers'](_0x679f2),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x679f2)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x5b6e61,dt('reopenCommentThread',_0x240199),(_0x437c86,{threadId:_0xc05d4e})=>{this['_reconvertMarkers'](_0xc05d4e);},{'priority':'low'}),this['listenTo'](_0x5b6e61,dt('addComment',_0x240199),(_0x117a7e,{threadId:_0x4258e4,isFromAdapter:_0x3d2b26})=>{const _0x4972ad=this['getAllMarkersForId'](_0x4258e4);if(_0x3d2b26||0x0==_0x4972ad['length']||!_0x5b6e61['hasCommentThread'](_0x4258e4))return;0x1===_0x5b6e61['getCommentThread'](_0x4258e4)['length']&&_0x3ce04d['model']['enqueueChange']({'isUndoable':!0x1},_0xc87d78=>{for(const _0x697778 of _0x4972ad)_0xc87d78['updateMarker'](_0x697778,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xd5ea3f);}['afterInit'](){!async function(_0x41d13d){const _0x3df9df=_0x5965dd([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x555ac2=0x73460ab3,_0x49f0d3=0x73418093^_0x555ac2,_0x5f4308=window[_0x5965dd([0x44,0x61,0x74,0x65])][_0x5965dd([0x6e,0x6f,0x77])](),_0x58b191=_0x41d13d[_0x5965dd([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x34b964=new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55615f=>{_0x58b191[_0x5965dd([0x6f,0x6e,0x63,0x65])](_0x5965dd([0x72,0x65,0x61,0x64,0x79]),_0x55615f);}),_0x37a2f4={[_0x5965dd([0x6b,0x74,0x79])]:_0x5965dd([0x45,0x43]),[_0x5965dd([0x75,0x73,0x65])]:_0x5965dd([0x73,0x69,0x67]),[_0x5965dd([0x63,0x72,0x76])]:_0x5965dd([0x50,0x2d,0x32,0x35,0x36]),[_0x5965dd([0x78])]:_0x5965dd([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]),[_0x5965dd([0x79])]:_0x5965dd([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]),[_0x5965dd([0x61,0x6c,0x67])]:_0x5965dd([0x45,0x53,0x32,0x35,0x36])},_0x16d486=_0x58b191[_0x5965dd([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5965dd([0x67,0x65,0x74])](_0x5965dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x301589(){let _0x358088,_0x392204=null,_0x266c4a=null;try{if(_0x16d486==_0x5965dd([0x47,0x50,0x4c]))return _0x5965dd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x358088=_0x3efb0c(),!_0x358088)return _0x5965dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x358088[_0x5965dd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x266c4a=_0x2c617c(_0x358088[_0x5965dd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x358088[_0x5965dd([0x6a,0x74,0x69])])),await _0x4ce0e8()?_0x348630()?_0x5cd0be()?_0x5965dd([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x494400()?(_0x358088[_0x5965dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5965dd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x392204=_0x5344fd(_0x5965dd([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x371722()):_0x5965dd([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5965dd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5965dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5965dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5cd0be(){const _0x5a719d=[_0x5965dd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5965dd([0x74,0x72,0x69,0x61,0x6c])][_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x358088[_0x5965dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5f4308/0x3e8:0xe10*_0x49f0d3;return _0x358088[_0x5965dd([0x65,0x78,0x70])]<_0x5a719d;}function _0x348630(){const _0x27f42e=_0x358088[_0x5965dd([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x27f42e)return!0x1;if(_0x27f42e[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5965dd([0x2a])))return!0x0;if(_0x27f42e[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5965dd([0x43,0x4d,0x54])))return!0x0;if(_0x27f42e[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5965dd([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4f85fe())return!0x0;if(_0x27f42e[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5965dd([0x52,0x43,0x4d,0x54]))){if(_0x521333())return!0x0;if(_0x1a430d()||_0x42d35f())return!0x0;}return!0x1;}function _0x494400(){const _0x9c9506=_0x358088[_0x5965dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x9c9506||0x0==_0x9c9506[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1c7597}=new URL(window[_0x5965dd([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x9c9506[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c7597))return!0x0;const _0x5ce448=_0x1c7597[_0x5965dd([0x73,0x70,0x6c,0x69,0x74])](_0x5965dd([0x2e]));return _0x9c9506[_0x5965dd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x575549=>_0x575549[_0x5965dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5965dd([0x2a])))[_0x5965dd([0x6d,0x61,0x70])](_0x203ce7=>_0x203ce7[_0x5965dd([0x73,0x70,0x6c,0x69,0x74])](_0x5965dd([0x2e])))[_0x5965dd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x21d99d=>_0x21d99d[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5ce448[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5965dd([0x6d,0x61,0x70])](_0x384008=>Array(_0x5ce448[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x384008[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5965dd([0x66,0x69,0x6c,0x6c])](_0x384008[0x0]===_0x5965dd([0x2a])?_0x5965dd([0x2a]):'')[_0x5965dd([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x384008))[_0x5965dd([0x73,0x6f,0x6d,0x65])](_0x16ddca=>_0x5ce448[_0x5965dd([0x65,0x76,0x65,0x72,0x79])]((_0x35ca86,_0x4188fc)=>_0x16ddca[_0x4188fc]===_0x35ca86||_0x16ddca[_0x4188fc]===_0x5965dd([0x2a])));}function _0x371722(){return _0x392204&&_0x266c4a?new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x519798,_0x5d2f2f)=>{_0x392204[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x519798,_0x5d2f2f),_0x266c4a[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x29aa77=>{_0x29aa77!=_0x5965dd([0x56,0x61,0x6c,0x69,0x64])&&_0x519798(_0x29aa77);},_0x5d2f2f);}):_0x392204||_0x266c4a||_0x5965dd([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2c617c(_0x3839af,_0x1a5e9c){return new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1cbd5f=>{if(_0x2050f5())return _0x1cbd5f(_0x5965dd([0x56,0x61,0x6c,0x69,0x64]));_0x3613e0(),_0x58b191[_0x5965dd([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5965dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x9c7b5d=!0x1;const _0x1a57b2=_0x4e4b92();function _0x6b85a1(_0x2798fb){return!!_0x2798fb&&(typeof _0x2798fb===_0x5965dd([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2798fb===_0x5965dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2798fb[_0x5965dd([0x74,0x68,0x65,0x6e])]===_0x5965dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2798fb[_0x5965dd([0x63,0x61,0x74,0x63,0x68])]===_0x5965dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x47c510(_0x1879d9){_0x110d4c(_0x1879d9)[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x385fc4=>{if(!_0x385fc4||_0x385fc4[_0x5965dd([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5965dd([0x6f,0x6b]))return _0x5965dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x14d1d6(_0x4146db(_0x1a57b2+_0x1a5e9c))!=_0x385fc4[_0x5965dd([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5965dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5965dd([0x56,0x61,0x6c,0x69,0x64]);})[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x1f34ed=>(_0x37c84a(),_0x1f34ed),()=>{const _0x54e3d3=_0x1f05d9();return null==_0x54e3d3?(_0x37c84a(),_0x5965dd([0x56,0x61,0x6c,0x69,0x64])):_0x5965dd(_0x5f4308-_0x54e3d3>(0x574a8eb3^_0x555ac2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x1cbd5f)[_0x5965dd([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1cbd5f(_0x5965dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x32e589=0x7370e433^_0x555ac2;function _0x37c84a(){const _0x3b42bb=_0x5965dd([0x6c,0x6c,0x63,0x74,0x2d])+_0x14d1d6(_0x4146db(_0x3839af)),_0x44eabc=_0x16c8e3(_0x14d1d6(window[_0x5965dd([0x4d,0x61,0x74,0x68])][_0x5965dd([0x63,0x65,0x69,0x6c])](_0x5f4308/_0x32e589)));window[_0x5965dd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5965dd([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b42bb,_0x44eabc);}function _0x1f05d9(){const _0x1191fa=_0x5965dd([0x6c,0x6c,0x63,0x74,0x2d])+_0x14d1d6(_0x4146db(_0x3839af)),_0x4234fd=window[_0x5965dd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5965dd([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1191fa);return _0x4234fd?window[_0x5965dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x16c8e3(_0x4234fd),0x10)*_0x32e589:null;}function _0x110d4c(_0x57e957){return new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x33e07b,_0x164870)=>{_0x57e957[_0x5965dd([0x74,0x68,0x65,0x6e])](_0x33e07b,_0x164870),window[_0x5965dd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x164870,0x7347de73^_0x555ac2);});}}_0x58b191[_0x5965dd([0x6f,0x6e])](_0x5965dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5ad2fc,_0x480286)=>{if(_0x480286[0x0]!=_0x3839af)return _0x1cbd5f(_0x5965dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x480286[0x1]={..._0x480286[0x1],[_0x5965dd([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1a57b2};},{[_0x5965dd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5965dd([0x68,0x69,0x67,0x68])}),_0x58b191[_0x5965dd([0x6f,0x6e])](_0x5965dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2cbe66=>{_0x6b85a1(_0x2cbe66[_0x5965dd([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x9c7b5d=!0x0,_0x47c510(_0x2cbe66[_0x5965dd([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5965dd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5965dd([0x6c,0x6f,0x77])}),_0x34b964[_0x5965dd([0x74,0x68,0x65,0x6e])](()=>{_0x9c7b5d||_0x1cbd5f(_0x5965dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2050f5(){return _0x58b191[_0x5965dd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5965dd([0x76,0x69,0x65,0x77])][_0x5965dd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5965dd([0x61,0x75,0x74,0x6f]);}function _0x3613e0(){_0x58b191[_0x5965dd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5965dd([0x76,0x69,0x65,0x77])][_0x5965dd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5965dd([0x61,0x75,0x74,0x6f]);}}function _0x5344fd(_0x559592){const _0x12bea7=[new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x209e80=>setTimeout(_0x209e80,0x734f347f^_0x555ac2)),_0x34b964[_0x5965dd([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17a4bf=>{let _0x1b372e=0x0;_0x58b191[_0x5965dd([0x6d,0x6f,0x64,0x65,0x6c])][_0x5965dd([0x6f,0x6e])](_0x5965dd([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x269c71,_0x433cab)=>{_0x433cab[0x0][_0x5965dd([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1b372e++,_0x1b372e==(0x73460f5b^_0x555ac2)&&(_0x17a4bf(),_0x269c71[_0x5965dd([0x6f,0x66,0x66])]());});}))];return window[_0x5965dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5965dd([0x72,0x61,0x63,0x65])](_0x12bea7)[_0x5965dd([0x74,0x68,0x65,0x6e])](()=>_0x559592);}async function _0x2628cf(){await _0x34b964,_0x58b191[_0x5965dd([0x6d,0x6f,0x64,0x65,0x6c])][_0x5965dd([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4b34aa,_0x58b191[_0x5965dd([0x6d,0x6f,0x64,0x65,0x6c])][_0x5965dd([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4b34aa,_0x58b191[_0x5965dd([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5965dd([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4f85fe(){return window[_0x5965dd([0x67,0x6c,0x6f,0x62])]&&window[_0x5965dd([0x67,0x6c,0x6f,0x62])][_0x5965dd([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x521333(){return _0x1bb8d1(_0x5965dd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x47d5bf(_0x5965dd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5965dd([0x73,0x74,0x61,0x74,0x65])]==_0x5965dd([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1a430d(){return _0x1bb8d1(_0x5965dd([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 _0x42d35f(){return _0x1bb8d1(_0x5965dd([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5bc2ee(_0x2ad510){const _0x4ef83e=_0x58ccba();_0x58b191[_0x4ef83e]=_0x5965dd([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2ad510,_0x2ad510!=_0x5965dd([0x56,0x61,0x6c,0x69,0x64])&&_0x2628cf();}function _0x58ccba(){const _0x12f016=window[_0x5965dd([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5965dd([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5965dd([0x6e,0x6f,0x77])]())[_0x5965dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5965dd([0x2e]),'');let _0x262914=_0x5965dd([0x4b]);for(let _0x5c441e=0x0;_0x5c441e<_0x12f016[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5c441e+=0x2){let _0x4a225b=window[_0x5965dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x12f016[_0x5965dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5c441e,_0x5c441e+0x2));_0x4a225b>=_0x3df9df[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4a225b-=_0x3df9df[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x262914+=_0x3df9df[_0x4a225b];}return _0x262914;}function _0x3efb0c(){const _0x32518c=_0x16d486[_0x5965dd([0x73,0x70,0x6c,0x69,0x74])](_0x5965dd([0x2e]));if(0x3!=_0x32518c[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xe6e605(_0x32518c[0x1]);function _0xe6e605(_0x3d0432){const _0x3b3854=_0xd50de1(_0x3d0432);return _0x3b3854&&_0x259acb()?_0x3b3854:null;function _0x259acb(){const _0x2ed4e2=_0x3b3854[_0x5965dd([0x6a,0x74,0x69])],_0x59e36f=window[_0x5965dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2ed4e2[_0x5965dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2ed4e2[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5e0aa0={..._0x3b3854,[_0x5965dd([0x6a,0x74,0x69])]:_0x2ed4e2[_0x5965dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2ed4e2[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5e0aa0[_0x5965dd([0x76,0x63])],_0x4146db(_0x5e0aa0)==_0x59e36f;}}}async function _0x4ce0e8(){let _0x5f1129=!0x0;try{const _0x14f0b7=_0x16d486[_0x5965dd([0x73,0x70,0x6c,0x69,0x74])](_0x5965dd([0x2e])),[_0x5c0acf,_0x3aceac,_0x10d358]=_0x14f0b7;return _0x440b24(_0x5c0acf),await _0x8143c5(_0x5c0acf,_0x3aceac,_0x10d358),_0x5f1129;}catch{return!0x1;}function _0x440b24(_0x28f62f){const _0x199206=_0xd50de1(_0x28f62f);_0x199206&&_0x199206[_0x5965dd([0x61,0x6c,0x67])]==_0x5965dd([0x45,0x53,0x32,0x35,0x36])||(_0x5f1129=!0x1);}async function _0x8143c5(_0x543db6,_0x4fde99,_0x224941){const _0x39f821=window[_0x5965dd([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5965dd([0x66,0x72,0x6f,0x6d])](_0x372edd(_0x224941),_0x1b9ea6=>_0x1b9ea6[_0x5965dd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2b526b=new window[(_0x5965dd([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5965dd([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x543db6+_0x5965dd([0x2e])+_0x4fde99),_0xad8b6f=window[_0x5965dd([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5965dd([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xad8b6f)return;const _0x34a365=await _0xad8b6f[_0x5965dd([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5965dd([0x6a,0x77,0x6b]),_0x37a2f4,{[_0x5965dd([0x6e,0x61,0x6d,0x65])]:_0x5965dd([0x45,0x43,0x44,0x53,0x41]),[_0x5965dd([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5965dd([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5965dd([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xad8b6f[_0x5965dd([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5965dd([0x6e,0x61,0x6d,0x65])]:_0x5965dd([0x45,0x43,0x44,0x53,0x41]),[_0x5965dd([0x68,0x61,0x73,0x68])]:{[_0x5965dd([0x6e,0x61,0x6d,0x65])]:_0x5965dd([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x34a365,_0x39f821,_0x2b526b)||(_0x5f1129=!0x1);}}function _0xd50de1(_0x487e7a){return _0x487e7a[_0x5965dd([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5965dd([0x65,0x79]))?JSON[_0x5965dd([0x70,0x61,0x72,0x73,0x65])](_0x372edd(_0x487e7a)):null;}function _0x372edd(_0x2d8e58){return window[_0x5965dd([0x61,0x74,0x6f,0x62])](_0x2d8e58[_0x5965dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5965dd([0x2b]))[_0x5965dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5965dd([0x2f])));}function _0x4146db(_0xf3bc3e){let _0xaf18aa=0x1505;function _0x5c0c14(_0x45ca92){for(let _0x1ffbff=0x0;_0x1ffbff<_0x45ca92[_0x5965dd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ffbff++){const _0x4f351=_0x45ca92[_0x5965dd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1ffbff);_0xaf18aa=(_0xaf18aa<<0x5)+_0xaf18aa+_0x4f351,_0xaf18aa&=_0xaf18aa;}}function _0x28e0d8(_0x333341){Array[_0x5965dd([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x333341)?_0x333341[_0x5965dd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x28e0d8):_0x333341&&typeof _0x333341==_0x5965dd([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5965dd([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x333341)[_0x5965dd([0x73,0x6f,0x72,0x74])]()[_0x5965dd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5d6e0e,_0x39c5aa])=>{_0x5c0c14(_0x5d6e0e),_0x28e0d8(_0x39c5aa);}):_0x5c0c14(window[_0x5965dd([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x333341));}return _0x28e0d8(_0xf3bc3e),_0xaf18aa>>>0x0;}function _0x14d1d6(_0x58e75d){return _0x58e75d[_0x5965dd([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5965dd([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5965dd([0x30]));}function _0x16c8e3(_0x312600){return _0x312600[_0x5965dd([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5965dd([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5965dd([0x6a,0x6f,0x69,0x6e])]('');}function _0x1bb8d1(_0x203684){return _0x58b191[_0x5965dd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5965dd([0x68,0x61,0x73])](_0x203684);}function _0x47d5bf(_0xc22f1e){return _0x58b191[_0x5965dd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5965dd([0x67,0x65,0x74])](_0xc22f1e);}function _0x4b34aa(){}function _0x5965dd(_0x25e439){return _0x25e439['map'](_0x5a98fb=>String['fromCharCode'](_0x5a98fb))['join']('');}_0x5bc2ee(await _0x301589());}(this);}['destroy'](){const _0x2bdd07=this['editor']['plugins']['get'](o),_0x5e07e2=this['editor']['config']['get']('collaboration.channelId');for(const _0x5e2a8e of _0x2bdd07['getCommentThreads']({'channelId':_0x5e07e2}))_0x2bdd07['_detachCommentThread'](_0x5e2a8e['id']),_0x2bdd07['_threads']['delete'](_0x5e2a8e['id']);super['destroy']();}['hasMarkerForId'](_0x581327){return this['getAllMarkersForId'](_0x581327)['length']>0x0;}['getAllMarkersForId'](_0x41d2dc){const _0x49491c=[];for(const _0x14de7d of this['editor']['model']['markers'])_0x14de7d['name']['startsWith']('comment:'+_0x41d2dc)&&_0x49491c['push'](_0x14de7d);return _0x49491c;}['scrollToThreadMarker'](_0x2c23e1){setTimeout(()=>{const _0x18dd85=this['_getTargetForId'](_0x2c23e1);if(!_0x18dd85)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2c23e1&&nt({'target':_0x18dd85[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3b479b){this['editor']['model']['change'](()=>{for(const _0x2fc63f of this['getAllMarkersForId'](_0x3b479b))this['editor']['editing']['reconvertMarker'](_0x2fc63f);});}['_attachArchivedThread'](_0x2608cc){const _0x45da9f=this['editor']['plugins']['get'](o),_0x62da13=this['editor']['plugins']['get'](b),_0x1dcd9e=_0x45da9f['getCommentThread'](_0x2608cc);if(!_0x1dcd9e['isAttached']){const _0x2a2ffc=_0x1dcd9e['attachTo'](()=>this['_getTargetForId'](_0x1dcd9e['id']));_0x62da13['registerAnnotation'](_0x2a2ffc),_0x1dcd9e['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x327ffd=this['editor'],_0x326967=_0x327ffd['plugins']['get'](it);_0x327ffd['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x115860,_0x3fa199)=>{const {id:_0x259d3e}=ft(_0x115860['markerName']),_0x31a66a=_0x327ffd['plugins']['get'](o)['getCommentThread'](_0x259d3e),_0x4a4208=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x259d3e;let _0x5ac08b;if(_0x31a66a&&_0x31a66a['isResolved']&&!_0x4a4208&&_0x115860['item'])return _0x3fa199['consumable']['consume'](_0x115860['item'],'addMarker:'+_0x115860['markerName']),_0x3fa199['consumable']['consume'](_0x115860['item'],'removeMarker:'+_0x115860['markerName']),null;const _0x3d4501=['ck-comment-marker'];return _0x4a4208&&_0x3d4501['push']('ck-comment-marker--active'),_0x5ac08b=_0x31a66a?.['length']?_0x31a66a['comments']['first']['author']['id']:_0x326967['me']['id'],{'classes':_0x3d4501,'attributes':{'data-comment':_0x259d3e,'data-author-id':_0x5ac08b}};}}),_0x327ffd['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x917661,{options:_0x71ae00})=>{if(_0x71ae00['showCommentHighlights'])return null;const _0xce3fd6=_0x327ffd['plugins']['get'](o),_0x1f118d=_0x327ffd['model']['markers']['get'](_0x917661),{id:_0x54ccae,part:_0x5821fd}=ft(_0x917661);return _0x1f118d&&!_0x1f118d['affectsData']||_0x71ae00['ignoreResolvedComments']&&_0xce3fd6['getCommentThread'](_0x54ccae)?.['isResolved']?null:{'group':'comment','name':_0x5821fd?_0x54ccae+':'+_0x5821fd:_0x54ccae};}}),_0x327ffd['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3a8437,{writer:_0x3d8018})=>_0x3d8018['createElement']('$marker',{'data-name':'comment:'+_0x3a8437['getAttribute']('id')})}),_0x327ffd['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x19b6d2=this['editor'],_0x1d9c1c=_0x19b6d2['plugins']['get'](o),_0x4cb8ae=new Set(),_0xa42114=new Set();_0x19b6d2['model']['document']['registerPostFixer'](_0x578e02=>{let _0x45332a=!0x1;for(const {name:_0x69314e,data:_0x293b52}of _0x19b6d2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5e338e,id:_0x2450e6}=ft(_0x69314e);let _0x4b0425=_0x293b52['newRange'];if('comment'!==_0x5e338e||!_0x4b0425)continue;const _0x4c150a='$graveyard'===_0x4b0425['root']['rootName'];_0x4c150a||(_0x4b0425=ht(_0x4b0425,_0x19b6d2['model']),!_0x4b0425||_0x4b0425['isCollapsed']||!_0x293b52['newRange']||_0x4b0425['isEqual'](_0x293b52['newRange']))?_0x19b6d2['model']['hasContent'](_0x4b0425)&&!_0x4c150a?this['isThreadsLoadingPaused']?_0x4cb8ae['add'](_0x69314e):this['_handleThreadMarker'](_0x69314e,_0x2450e6):(_0xa42114['add'](_0x69314e),_0x4cb8ae['delete'](_0x69314e),_0x578e02['removeMarker'](_0x69314e),_0x45332a=!0x0):(_0x578e02['updateMarker'](_0x69314e,{'range':_0x4b0425}),_0x45332a=!0x0);}return _0x45332a;}),this['on']('change:isThreadsLoadingPaused',(_0x22198d,_0x3d0233,_0x248584)=>{if(!_0x248584&&_0x4cb8ae['size'])for(const _0x5675af of _0x4cb8ae){const {id:_0x3b5885}=ft(_0x5675af);_0x4cb8ae['delete'](_0x5675af),_0x19b6d2['model']['markers']['get'](_0x5675af)&&this['_handleThreadMarker'](_0x5675af,_0x3b5885);}}),this['listenTo'](_0x19b6d2['model']['document'],'change',()=>{for(const {name:_0x553961,data:{newRange:_0x18e265}}of _0x19b6d2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x42841c,id:_0x5e8da2}=ft(_0x553961);if('comment'!==_0x42841c)continue;const _0x4b5b35=_0x1d9c1c['getCommentThread'](_0x5e8da2),_0xa8c597=this['hasMarkerForId'](_0x5e8da2);_0x4b5b35&&(!_0x4b5b35['_hasTargetInContent']&&_0x18e265&&_0x19b6d2['editing']['view']['once']('render',()=>{const _0x246689=_0x19b6d2['plugins']['get'](y),_0x7a4a1d=_0x1d9c1c['_threadToController']['get'](_0x4b5b35)['view'];_0x246689['getByInnerView'](_0x7a4a1d)['refreshVisibility']();},{'priority':'low'}),_0x4b5b35['_hasTargetInContent']=_0xa8c597||!!_0x18e265),_0x18e265||(_0xa42114['add'](_0x553961),_0x4cb8ae['delete'](_0x553961));}for(const _0x1b067d of _0xa42114){const {id:_0x2e2766}=ft(_0x1b067d),_0x255664=_0x1d9c1c['getCommentThread'](_0x2e2766);if(_0x4cb8ae['delete'](_0x1b067d),!_0x255664)continue;const _0x7fe8e9=this['hasMarkerForId'](_0x2e2766);_0x7fe8e9||_0x255664['isSubmitted']?_0x7fe8e9||_0x255664['unlinkedAt']||_0x255664['setUnlinkedAt'](new Date()):_0x255664['remove']();}_0xa42114['clear']();});}['_handleInitialThreads'](_0x16ec21){_0x16ec21['forEach'](_0xc17c95=>{_0xc17c95['unlinkedAt']&&this['_attachArchivedThread'](_0xc17c95['id']);});}['_getTargetForId'](_0x624b78){const _0x294ab0=this['editor'],_0x251aaa=this['getAllMarkersForId'](_0x624b78);return et(_0x294ab0['editing'],_0x251aaa);}['_getTextContext'](_0x1f6a81){const _0x2ce032=this['getAllMarkersForId'](_0x1f6a81);let _0x48b7c1='',_0x33d3fe=!0x1;for(const _0x29b096 of _0x2ce032){const _0x10615=_0x29b096['getRange']();for(const _0x3f3c25 of Array['from'](_0x10615['getItems']()))_0x3f3c25['is']('$textProxy')?(_0x48b7c1&&_0x33d3fe&&(_0x48b7c1+='\x20',_0x33d3fe=!0x1),_0x48b7c1+=_0x3f3c25['data']):_0x33d3fe=!0x0;_0x33d3fe=!0x0;}return _0x48b7c1['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x34e206,_0x26c8c2){const _0x2a08fd=this['editor'],_0x33ec7b=_0x2a08fd['plugins']['get'](o);let _0x402534=_0x33ec7b['getCommentThread'](_0x26c8c2);const _0x4968bd=_0x2a08fd['config']['get']('collaboration.channelId'),_0x1f2145=_0x2a08fd['plugins']['get'](b);if(_0x402534&&(_0x402534['unlinkedAt']&&_0x402534['setUnlinkedAt'](null),_0x402534['isAttached']))return _0x402534;return!this['getAllMarkersForId'](_0x26c8c2)[0x0]['managedUsingOperations']?_0x2a08fd['editing']['view']['once']('render',()=>{if(_0x33ec7b['getCommentThread'](_0x26c8c2))return;const _0x431318=_0x2a08fd['plugins']['get'](y);_0x402534=_0x33ec7b['openNewCommentThread']({'channelId':_0x4968bd,'threadId':_0x26c8c2,'target':()=>this['_getTargetForId'](_0x26c8c2),'context':{'type':'text','value':this['_getTextContext'](_0x26c8c2)}});const _0x5cd9ce=_0x33ec7b['_threadToController']['get'](_0x402534)['view'],_0x44ef02=_0x431318['getByInnerView'](_0x5cd9ce);_0x44ef02&&_0x1f2145['registerAnnotation'](_0x44ef02);},{'priority':'low'}):_0x33ec7b['fetchCommentThread']({'channelId':_0x4968bd,'threadId':_0x26c8c2})['then'](_0x3550e3=>{if('destroyed'!==_0x2a08fd['state']){if(_0x402534=_0x3550e3,_0x402534&&!_0x402534['isAttached']){const _0x5cb9e4=_0x402534['attachTo'](()=>this['_getTargetForId'](_0x26c8c2));_0x1f2145['registerAnnotation'](_0x5cb9e4),_0x402534['isResolved']&&this['_reconvertMarkers'](_0x26c8c2);}else{if(!_0x402534){const _0x16cad7=this['getAllMarkersForId'](_0x26c8c2);_0x2a08fd['model']['change'](_0x2834ec=>{for(const _0x372600 of _0x16cad7)_0x2834ec['removeMarker'](_0x372600);});}}}}),_0x402534;}['_handleThreadMarker'](_0x8939ce,_0x2064e2){const _0x17f620=this['_attachMarkerToThread'](_0x8939ce,_0x2064e2);_0x17f620&&!_0x17f620['context']&&_0x17f620['setContext']({'type':'text','value':this['_getTextContext'](_0x2064e2)});}['_initAriaMarkerChangeAnnouncements'](){const _0x42ddec=this['editor'];rt(_0x42ddec['model'],({left:_0x150811,entered:_0x207b3d})=>{for(const _0x3c9a34 of _0x150811)if(mt(_0x3c9a34)){_0x42ddec['ui']['ariaLiveAnnouncer']['announce'](N(_0x42ddec['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3a4e8d of _0x207b3d)if(mt(_0x3a4e8d)){_0x42ddec['ui']['ariaLiveAnnouncer']['announce'](N(_0x42ddec['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x465426)));break;}});}}function dt(_0x5461d7,_0x57d112){return _0x57d112?_0x5461d7+':'+_0x57d112:_0x5461d7;}function ht(_0x336471,_0xae1fb4){const _0x1acddc=_0xae1fb4['schema'],_0x2651f1=_0xae1fb4['createRange'](_0x336471['start']);for(const _0x4d40a7 of _0x336471['getWalker']()){const {type:_0x393938,item:_0x21bbd7,nextPosition:_0x283825}=_0x4d40a7;if('text'===_0x393938||_0x1acddc['isObject'](_0x21bbd7)){const _0x5a4921=_0xae1fb4['createPositionBefore'](_0x21bbd7);_0x2651f1['isCollapsed']&&(_0x2651f1['start']=_0x5a4921),_0x2651f1['end']=_0x283825;}}return _0x2651f1;}function mt(_0x21ce54){return'comment'===ft(_0x21ce54['name'])['group'];}class s extends _0x3456c4{['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 _0xfcae99=this['editor'],_0x441d14=_0xfcae99['plugins']['get'](o),_0x517ef3=_0xfcae99['plugins']['get'](r),_0x45861e=_0xfcae99['plugins']['get'](y),_0x262146=_0xfcae99['plugins']['get'](b);_0xfcae99['ui']['componentFactory']['add']('comment',()=>{const _0x1ff61b=this['_createUIButton'](_0x3487c4);return _0x1ff61b['tooltip']=!0x0,_0x1ff61b;}),_0xfcae99['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x2bf5f4)),_0x262146['addSourceCollector'](()=>{const _0x4899eb=[];for(const [_0x5df7b0,_0x374834]of _0x441d14['_threadToController']){const _0x3e0e8b=_0x517ef3['getAllMarkersForId'](_0x5df7b0['id']),_0x3c1244=_0x3e0e8b['map'](_0x102290=>_0x102290['getRange']());_0x3e0e8b['length']>0x0&&_0x4899eb['push']([_0x374834['view'],_0x3c1244]);}return _0x4899eb;}),this['listenTo'](_0x45861e,'change:activeAnnotations',(_0x53eaa8,_0x544d71,_0x1bbc99)=>{const _0x4c0e45=Array['from'](_0x1bbc99)['map'](_0x395de4=>_0x395de4['innerView'])['find'](_0x1285e2=>_0x441d14['_viewToController']['has'](_0x1285e2));if(!_0x4c0e45)return void(_0x517ef3['activeMarker']=null);const _0x471f91=_0x441d14['_viewToController']['get'](_0x4c0e45)['model']['id'],_0x1811a2='comment:'+_0x471f91;_0x471f91&&_0x517ef3['hasMarkerForId'](_0x471f91)?_0x517ef3['activeMarker']=_0x1811a2:_0x517ef3['activeMarker']&&(_0x517ef3['activeMarker']=null);}),this['listenTo'](_0x441d14,'removeCommentThread',(_0x42213c,{threadId:_0x1a5c71,isFromAdapter:_0x5eb4fc})=>{!_0x5eb4fc&&_0xfcae99['ui']['focusTracker']['isFocused']&&_0x517ef3['hasMarkerForId'](_0x1a5c71)&&_0xfcae99['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x441d14,'addComment',(_0xa13d9c,{threadId:_0xc0f765,isFromAdapter:_0x58df90})=>{if(_0x58df90||!_0x517ef3['hasMarkerForId'](_0xc0f765)||!_0x441d14['hasCommentThread'](_0xc0f765))return;0x1===_0x441d14['getCommentThread'](_0xc0f765)['length']&&(_0xfcae99['editing']['view']['focus'](),_0xa13d9c['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3251f0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x18f473;for(const _0x9cff5 in _0x3251f0){const _0x182c23=_0x9cff5,_0xe1dd89=_0x3251f0[_0x182c23];if('commentsLicenseKeyValid'==_0xe1dd89||'commentsLicenseKeyInvalid'==_0xe1dd89||'commentsLicenseKeyExpired'==_0xe1dd89||'commentsLicenseKeyDomainLimit'==_0xe1dd89||'commentsLicenseKeyNotAllowed'==_0xe1dd89||'commentsLicenseKeyEvaluationLimit'==_0xe1dd89||'commentsLicenseKeyUsageLimit'==_0xe1dd89){delete _0x3251f0[_0x182c23],_0x18f473=_0xe1dd89,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x18f473&&_0x3251f0['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x18f473&&_0x3251f0['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x18f473&&_0x3251f0['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x18f473&&_0x3251f0['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x18f473&&_0x3251f0['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x18f473&&_0x3251f0['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3dd0f3){const _0x3fb3e8=this['editor'],_0x3fcf7f=new _0x3dd0f3(_0x3fb3e8['locale']),_0x297916=_0x3fb3e8['commands']['get']('addCommentThread');return _0x3fcf7f['set']({'label':N(_0x3fb3e8['locale'],'Comment'),'icon':_0x13d93d}),_0x3fcf7f['bind']('isEnabled')['to'](_0x297916,'isEnabled',_0x297916,'hasContent',(_0x5c648a,_0x5a1bc5)=>_0x5c648a&&_0x5a1bc5),this['listenTo'](_0x3fcf7f,'execute',()=>{_0x297916['execute']();}),_0x3fcf7f;}}class i extends _0x3456c4{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x278e81){super(_0x278e81),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x470e32,_0x4d3798,_0x3233bc)=>{_0x3233bc?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x52b243,_0x201b48]of this['editor']['commands'])_0x201b48['affectsData']&&'addCommentThread'!==_0x52b243&&_0x201b48['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4cbfdf=this['editor']['editing']['view']['document'];this['listenTo'](_0x4cbfdf,'cut',_0x3319cf=>_0x3319cf['stop'](),{'priority':'highest'}),this['listenTo'](_0x4cbfdf,'clipboardInput',_0x383507=>_0x383507['stop'](),{'priority':'highest'}),this['listenTo'](_0x4cbfdf,'delete',_0x1a0527=>_0x1a0527['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x35f577,_0x379a4d]of this['editor']['commands'])_0x379a4d['affectsData']&&'addCommentThread'!==_0x35f577&&_0x379a4d['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x816dec{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2809ac){super(_0x2809ac),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1debe6=this['context']['plugins']['get'](y);this['listenTo'](_0x1debe6,'_activateAnnotation',(_0x4d93c1,_0x4f968b)=>{for(const _0x2908d0 of this['activeUIs']){const _0x46d23b=this['_uis']['get'](_0x2908d0);(0x0,this['uisData']['get'](_0x2908d0)['filter'])(_0x4f968b)&&_0x46d23b['setActiveAnnotation'](_0x4f968b);}}),this['listenTo'](_0x1debe6,'_deactivateAllAnnotations',()=>{for(const _0x470192 of this['activeUIs']){this['_uis']['get'](_0x470192)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1debe6['_visibleAnnotations'],'add',(_0x2e92be,_0x1b2902)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1b2902);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5b41a4){return this['activeUIs']['has'](_0x5b41a4);}['activate'](_0x3930b5,_0x5e12c1=this['defaultFilter']){const _0x487558=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3930b5))throw new _0x5199cf('annotationsuis-missing-ui',this,{'uiName':_0x3930b5});this['isActive'](_0x3930b5)&&this['deactivate'](_0x3930b5),this['activeUIs']['add'](_0x3930b5);const _0x5ca980=new S();v({'source':_0x487558['_visibleAnnotations'],'target':_0x5ca980,'filter':_0x5e12c1}),this['uisData']['set'](_0x3930b5,{'collection':_0x5ca980,'filter':_0x5e12c1});const _0x18de45=this['_uis']['get'](_0x3930b5);_0x18de45['attach'](_0x5ca980),this['listenTo'](_0x18de45,'change:activeAnnotation',(_0x55f104,_0x5c4802,_0x1a181e,_0x440edc)=>{_0x440edc&&_0x487558['_removeActiveAnnotation'](_0x440edc),_0x1a181e&&_0x487558['_addActiveAnnotation'](_0x1a181e);});}['deactivate'](_0x49bc41){if(this['activeUIs']['delete'](_0x49bc41),!this['_uis']['has'](_0x49bc41))throw new _0x5199cf('annotationsuis-missing-ui',this,{'uiName':_0x49bc41});const _0x4afe5f=this['_uis']['get'](_0x49bc41);_0x4afe5f['detach'](),this['stopListening'](_0x4afe5f),this['uisData']['get'](_0x49bc41)['collection']['destroy'](),this['uisData']['delete'](_0x49bc41);}['switchTo'](_0x56c7df){if(!this['_uis']['has'](_0x56c7df))throw new _0x5199cf('annotationsuis-missing-ui',this,{'uiName':_0x56c7df});const _0x2a38e1=this['context']['plugins']['get'](y),_0x62de6=Array['from'](_0x2a38e1['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x56c7df);const _0x550b72=this['_uis']['get'](_0x56c7df);_0x550b72['setActiveAnnotation'](_0x62de6),_0x550b72['_setSelectedAnnotations']&&_0x62de6&&_0x550b72['_setSelectedAnnotations']([_0x62de6]);}['deactivateAll'](){for(const _0x17f0f1 of this['activeUIs'])this['deactivate'](_0x17f0f1);}['register'](_0x1bf89a,_0xfa2275){if(this['_uis']['has'](_0x1bf89a))throw new _0x5199cf('annotationsuis-register-already-registered');if('function'!=typeof _0xfa2275['attach']||'function'!=typeof _0xfa2275['detach']||'function'!=typeof _0xfa2275['setActiveAnnotation'])throw new _0x5199cf('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1bf89a,_0xfa2275);}['refilterAnnotations'](){const _0x1d7a45=this['context']['plugins']['get'](y)['collection'],_0x1d1fcd=new Map(),_0x52b640=Array['from'](this['activeUIs']);for(const _0x4c3b18 of this['activeUIs']){const _0x19f107=this['uisData']['get'](_0x4c3b18)['collection'];for(const _0x223ea1 of _0x19f107)_0x1d1fcd['set'](_0x223ea1,_0x4c3b18);}for(const _0x3c47ed of _0x1d7a45){const _0x1edda2=_0x1d1fcd['get'](_0x3c47ed);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3c47ed);const _0x22f967=_0x52b640['find'](_0x291144=>this['uisData']['get'](_0x291144)['filter'](_0x3c47ed));_0x1edda2!==_0x22f967&&(_0x1edda2&&this['uisData']['get'](_0x1edda2)['collection']['remove'](_0x3c47ed),_0x22f967&&this['uisData']['get'](_0x22f967)['collection']['add'](_0x3c47ed));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4a52fe){const _0x888c43=[];for(const _0x21d4e5 of this['activeUIs']){(0x0,this['uisData']['get'](_0x21d4e5)['filter'])(_0x4a52fe)&&_0x888c43['push'](_0x21d4e5);}if(_0x888c43['length']>0x1)throw new _0x5199cf('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x888c43,'annotationType':_0x4a52fe['type']});}}const he=/* #__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(_0x3455be){super(_0x3455be),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x46271c,_0x3feeb6)=>_0x46271c+_0x3feeb6),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5da9e3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5da9e3['to']('isAnimationDisabled',_0x563e35=>_0x563e35?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5da9e3['to']('top',_0x3a3ef1=>Ot(_0x3a3ef1))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x25a77c=this['element']['clientHeight'];_0x25a77c&&(this['height']=_0x25a77c);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x816dec{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x50bf3f){super(_0x50bf3f),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 _0x51f58a=this['context']['config']['get']('sidebar.container');_0x51f58a&&this['setContainer'](_0x51f58a);}['setContainer'](_0x32d83d){if(!g(_0x32d83d))throw new _0x5199cf('sidebar-setcontainer-invalid-element');this['container']=_0x32d83d;}['_attachToContainer']({viewClass:_0x18d163='',spaceBetweenItems:_0x499048=0x19}={}){if(!g(this['container']))throw new _0x5199cf('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x18d163,this['_spaceBetweenItems']=_0x499048;}['rearrange']({removedAnnotation:_0x1cfaa1,previousAnnotation:_0x2bd870,nextAnnotation:_0x3eeee9}){const _0x4eb6e8=this['getSidebarItemView'](_0x1cfaa1);this['view']['list']['remove'](_0x4eb6e8),this['_destroySidebarItemView'](_0x1cfaa1),_0x2bd870&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2bd870)),_0x3eeee9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3eeee9)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2b1a7d,activatedAnnotation:_0x2ce51a,disableAnimationOnActivatedAnnotation:_0x155224}){if(this['_activeAnnotation']=_0x2ce51a,_0x2b1a7d){_0x2b1a7d['isActive']=!0x1;const _0x5f53c8=this['getSidebarItemView'](_0x2b1a7d);_0x5f53c8&&_0x155224&&(_0x5f53c8['isAnimationDisabled']=!0x1);}if(_0x2ce51a){const _0x720b9a=this['getSidebarItemView'](_0x2ce51a);_0x720b9a&&(_0x2ce51a['isActive']=!0x0,_0x155224&&(_0x720b9a['isAnimationDisabled']=!0x0,_0x720b9a['top']+=0x1),this['_alignToTargetRect'](_0x720b9a));}}['_detachFromContainer'](_0x24ee38){if(this['view']['element']['remove'](),_0x24ee38){for(const _0x59a70e of _0x24ee38)this['_destroySidebarItemView'](_0x59a70e);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xbcdf98,_0x2ed141){_0x2ed141||(_0x2ed141=_0xbcdf98['view']);const _0x32a09c=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x32a09c,_0xbcdf98),this['_annotationToSidebarItemView']['set'](_0xbcdf98,_0x32a09c),_0x32a09c['content']['add'](_0x2ed141),this['listenTo'](_0xbcdf98['view'],'change:targetRect',(_0x2d64e5,_0x4e800b,_0xb6d33c)=>{const _0x679b91=this['_getTargetTop'](_0xbcdf98,_0xb6d33c);_0x32a09c['_targetTop']!=_0x679b91&&(_0x32a09c['_targetTop']=_0x679b91,this['_setItemTop'](_0x32a09c,_0x679b91));}),this['listenTo'](_0x32a09c,'change:top',()=>{this['_recalculate'](_0x32a09c,'top');}),this['listenTo'](_0x32a09c,'change:bottom',()=>{this['_recalculate'](_0x32a09c,'bottom');}),this['_alignToTargetRect'](_0x32a09c);const _0x22f037=this['_getItemBefore'](_0x32a09c);if(_0x22f037)this['_alignAfterItem'](_0x22f037,_0x32a09c)||this['_alignToTargetRect'](_0x32a09c);else this['_alignToTargetRect'](_0x32a09c);return this['_updateLastItem'](),this['view']['list']['add'](_0x32a09c),_0x32a09c;}['_alignForTopChange'](_0x52a8f6){if(!_0x52a8f6['content']['length'])return;const _0x11af2b=this['_getItemBefore'](_0x52a8f6);if(!_0x11af2b)return;const _0x3ae634=this['_sidebarItemViewToAnnotation']['get'](_0x11af2b),_0x3961cd=this['_activeAnnotation'];_0x3961cd&&_0x3961cd===_0x3ae634?this['_alignAfterItem'](_0x11af2b,_0x52a8f6):this['_alignBeforeItem'](_0x52a8f6,_0x11af2b);}['_alignForBottomChange'](_0x1e5e8c){if(!_0x1e5e8c['content']['length'])return;const _0x391b65=this['_getItemAfter'](_0x1e5e8c);if(!_0x391b65)return;const _0x2916a7=this['_sidebarItemViewToAnnotation']['get'](_0x391b65),_0x4693d9=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x15f9b4=this['_activeAnnotation'];_0x15f9b4&&_0x15f9b4===_0x2916a7&&_0x4693d9?(this['_alignBeforeItem'](_0x391b65,_0x1e5e8c),this['_alignAfterItem'](_0x1e5e8c,_0x391b65)):_0x15f9b4&&_0x15f9b4===_0x2916a7?this['_alignBeforeItem'](_0x391b65,_0x1e5e8c):this['_alignAfterItem'](_0x1e5e8c,_0x391b65);}['_recalculate'](_0x380621,_0x5e81b0){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x418480,changedProp:_0x2871c7}of this['_recalculateBuffer'])'top'===_0x2871c7?this['_alignForTopChange'](_0x418480):this['_alignForBottomChange'](_0x418480);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x380621,'changedProp':_0x5e81b0});}['getSidebarItemView'](_0x227391){return this['_annotationToSidebarItemView']['get'](_0x227391);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x47aa4e){const _0x4e10ca=this['getSidebarItemView'](_0x47aa4e);this['stopListening'](_0x4e10ca),this['stopListening'](_0x47aa4e['view']),_0x4e10ca['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x47aa4e),this['_sidebarItemViewToAnnotation']['delete'](_0x4e10ca);}['_createSidebarView'](){const _0x36f706=new H(this['context']['locale']);return _0x36f706['render'](),this['on']('change:_lastItem',(_0x920869,_0x39e0fd,_0x2e73e0,_0x332c76)=>{_0x332c76&&_0x36f706['unbind']('minHeight'),_0x2e73e0?_0x36f706['bind']('minHeight')['to'](_0x2e73e0,'bottom'):_0x36f706['minHeight']=null;}),_0x36f706;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x295c7e){const _0x699071=this['_sidebarItemViewToAnnotation']['get'](_0x295c7e),_0x30ab34=_0x699071&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x699071)-0x1);return _0x30ab34&&this['getSidebarItemView'](_0x30ab34)||null;}['_getItemAfter'](_0x27fa43){const _0x204e8c=this['_sidebarItemViewToAnnotation']['get'](_0x27fa43),_0x388b82=_0x204e8c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x204e8c)+0x1);return _0x388b82&&this['getSidebarItemView'](_0x388b82)||null;}['_alignBeforeItem'](_0x5b3ecb,_0x538fe2){_0x5b3ecb['updateHeight']();const _0x2f8fd4=G(_0x538fe2['bottom']+this['_spaceBetweenItems'],_0x5b3ecb['top']);return!!_0x2f8fd4&&(this['_setItemTop'](_0x538fe2,_0x538fe2['top']-_0x2f8fd4),!0x0);}['_alignAfterItem'](_0x48c485,_0x430f97){_0x48c485['updateHeight']();const _0x19ab8d=G(_0x48c485['bottom']+this['_spaceBetweenItems'],_0x430f97['top']);return!!_0x19ab8d&&(this['_setItemTop'](_0x430f97,_0x430f97['top']+_0x19ab8d,!0x1),!0x0);}['_alignToTargetRect'](_0x3cd52e){const _0x24b4aa=this['_sidebarItemViewToAnnotation']['get'](_0x3cd52e);if(!_0x24b4aa||!_0x24b4aa['target']||!_0x24b4aa['targetRect'])return;const _0x4a805a=this['_getTargetTop'](_0x24b4aa,_0x24b4aa['targetRect']);this['_setItemTop'](_0x3cd52e,_0x4a805a);}['_getTargetTop'](_0x5f2442,_0x43f122){if(null===_0x43f122)return 0x0;if(_0x5f2442['target']instanceof _0x578f30)return _0x43f122['top'];{const _0x4ddc11=new _0x578f30(this['view']['element'])['top'];return _0x43f122['top']-_0x4ddc11;}}['_setItemTop'](_0x5d9b27,_0x31f38c,_0x7ad0f5=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x7ad0f5&&(_0x31f38c=Math['max'](_0x31f38c,this['_getMaxAvailableTop'](_0x5d9b27))),_0x5d9b27['top']=_0x31f38c;}['_getMaxAvailableTop'](_0xbcdb75){let _0x36348a=this['_getItemBefore'](_0xbcdb75),_0x4ae104=0x0;for(;_0x36348a;)_0x36348a['updateHeight'](),_0x4ae104+=this['_spaceBetweenItems']+_0x36348a['height'],_0x36348a=this['_getItemBefore'](_0x36348a);return _0x4ae104;}}function G(_0x440006,_0x43a43d){return Math['max'](_0x440006-_0x43a43d,0x0);}function g(_0x304ae4){return null!==_0x304ae4&&'object'==typeof _0x304ae4&&0x1===_0x304ae4['nodeType'];}class e extends _0x816dec{['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(_0x1733fb){super(_0x1733fb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x328140(),this['_refreshPositioningDebounced']=_0x9c41f3(()=>{_0x1733fb['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x16c460=this['context']['plugins']['get'](j),_0x252e91=this['context']['plugins']['get'](z);_0x16c460['register']('wideSidebar',this),_0x252e91['container']&&_0x16c460['switchTo']('wideSidebar');}['setActiveAnnotation'](_0xe34440){if(_0xe34440===this['activeAnnotation'])return;const _0x41526b=this['context']['plugins']['get'](z);_0x41526b['_activeAnnotation']=_0xe34440;const _0x38e8ef=this['activeAnnotation'];_0x41526b['refresh']({'blurredAnnotation':_0x38e8ef,'activatedAnnotation':_0xe34440}),this['activeAnnotation']=_0xe34440;}['attach'](_0x14aa6c){this['annotations']=_0x14aa6c;const _0x26f2e0=this['context']['plugins']['get'](z);if(_0x26f2e0['_annotations']=_0x14aa6c,this['isAttached'])throw new _0x5199cf('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x26f2e0,'set:container',()=>{this['detach'](),this['listenTo'](_0x26f2e0,'change:container',_0xf26d63=>{_0xf26d63['off'](),this['attach'](_0x14aa6c);});}),_0x26f2e0['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x46a868=_0x502eff=>{_0x502eff['updateTargetRect'](),_0x26f2e0['addAnnotation'](_0x502eff);};for(const _0x56f5db of _0x14aa6c)_0x46a868(_0x56f5db);this['listenTo'](_0x14aa6c,'add',(_0x3893f7,_0x549c20)=>{_0x46a868(_0x549c20);}),this['listenTo'](_0x14aa6c,'remove',(_0x7604cb,_0x3efd8c,_0x5e2fb5)=>{_0x26f2e0['rearrange']({'removedAnnotation':_0x3efd8c,'previousAnnotation':_0x14aa6c['get'](_0x5e2fb5-0x1),'nextAnnotation':_0x14aa6c['get'](_0x5e2fb5+0x1)}),_0x3efd8c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x14aa6c,'focus',(_0x5ba56e,_0x133291)=>{this['setActiveAnnotation'](_0x133291);}),this['listenTo'](_0x14aa6c,'blur',()=>{this['setActiveAnnotation'](null);});const _0x69b3ff=this['context']instanceof _0x30418b?this['context']['editors']:new _0x328140([this['context']]);for(const _0x47e869 of _0x69b3ff)this['_integrateWithEditorAnnotations'](_0x47e869);this['listenTo'](_0x69b3ff,'add',(_0x4cc976,_0x38db58)=>{this['listenTo'](_0x38db58,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x38db58);});}),this['listenTo'](_0x69b3ff,'remove',(_0x3bec6b,_0x448834)=>{_0x448834['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x448834['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5199cf('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1d8a3=this['context']['plugins']['get'](z);_0x1d8a3['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1d8a3),this['stopListening'](this['annotations']),this['context']instanceof _0x30418b&&this['stopListening'](this['context']['editors']);for(const _0x419f40 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x419f40);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3001cc){if(!_0x3001cc['plugins']['has']('EditorAnnotations'))return;const _0x52f45a=_0x3001cc['plugins']['get']('EditorAnnotations'),_0x3b184b=()=>{const _0x18ef0f=_0x52f45a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x18ef0f[0x0]||null);};this['listenTo'](_0x52f45a,'refresh',_0x3b184b),this['listenTo'](_0x52f45a,'blur',(_0x3e4c0a,{isAnnotationTracked:_0x5cb563})=>{this['activeAnnotation']&&_0x5cb563(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x52f45a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1abfe3=>{_0x52f45a['hasDomSelection']()&&(_0x3b184b(),_0x1abfe3['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x52f45a);}['_destroyEditorAnnotationsIntegration'](_0x4f2a86){this['stopListening'](_0x4f2a86),this['_editorAnnotations']['remove'](_0x4f2a86);}}class C extends _0x3487c4{['counterView'];constructor(_0x4f5f9d){super(_0x4f5f9d);const _0xfef9bc=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x41e478,_0x2f3a04)=>_0x41e478?'...':_0x2f3a04['toString']()),this['set']('annotationType',''),this['icon']=_0x13d93d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xfef9bc['to']('annotationType',_0x57556c=>'ck-annotation-counter__badge--'+_0x57556c),_0xfef9bc['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xfef9bc['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x816dec{['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(_0x20dcfd){super(_0x20dcfd),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x102c7a())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x328140(),this['_refreshPositioningDebounced']=_0x9c41f3(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3ead9c(this['context']['locale']),this['balloonPanelView']=new _0x32c4b2(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3d502b){this['annotations']=_0x3d502b;const _0x2353e5=this['context']['plugins']['get'](z),_0x327b23=this['balloonPanelView'];if(_0x2353e5['_annotations']=_0x3d502b,this['isAttached'])throw new _0x5199cf('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2353e5,'set:container',()=>{this['detach'](),this['listenTo'](_0x2353e5,'change:container',_0x1ed3fb=>{_0x1ed3fb['off'](),this['attach'](_0x3d502b);});}),_0x2353e5['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xcc001=_0x5cdc5e=>{const _0x3815d0=new C(this['context']['locale']);_0x2353e5['addAnnotation'](_0x5cdc5e,_0x3815d0),this['_annotationToNarrowView']['set'](_0x5cdc5e,_0x3815d0),_0x3815d0['bind']('isDirty','annotationType','number')['to'](_0x5cdc5e['view'],'isDirty','type','length'),_0x3815d0['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x327b23['content']['first']!==_0x5cdc5e['view']?(this['_showBalloon'](_0x5cdc5e),_0x5cdc5e['view']['element']['focus'](),this['setActiveAnnotation'](_0x5cdc5e)):this['setActiveAnnotation'](null);});};for(const _0x4438c8 of _0x3d502b)_0xcc001(_0x4438c8);this['listenTo'](_0x3d502b,'add',(_0x178f27,_0x31535c)=>{_0xcc001(_0x31535c);}),this['listenTo'](_0x3d502b,'remove',(_0x4d8556,_0x3ff287,_0x3eb677)=>{this['_annotationToNarrowView']['get'](_0x3ff287)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3ff287),_0x2353e5['rearrange']({'removedAnnotation':_0x3ff287,'previousAnnotation':_0x3d502b['get'](_0x3eb677-0x1),'nextAnnotation':_0x3d502b['get'](_0x3eb677+0x1)}),_0x3ff287===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3d502b,'focus',(_0x2fe50d,_0x28ccb4)=>{this['setActiveAnnotation'](_0x28ccb4);}),this['listenTo'](_0x3d502b,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2571ab,_0x57b0cf)=>{_0x57b0cf['keyCode']===_0x453b9a['esc']&&_0x327b23['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x327b23['content']['first']),this['_hideBalloon'](),_0x57b0cf['stopPropagation'](),_0x57b0cf['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1dad70,_0x33e1c1)=>{const _0x1eb866=_0x33e1c1['target'];_0x327b23['isVisible']&&_0x327b23['element']['contains'](_0x1eb866)||_0x2353e5['view']['element']['contains'](_0x1eb866)||_0x1dad70['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x1edf11=>_0x1edf11['contains'](_0x1eb866))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x57fd72=this['context']instanceof _0x30418b?this['context']['editors']:new _0x328140([this['context']]);for(const _0x49d0c9 of _0x57fd72)this['_integrateWithEditorAnnotations'](_0x49d0c9);this['listenTo'](_0x57fd72,'add',(_0x4de253,_0x5f4d20)=>{this['listenTo'](_0x5f4d20,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5f4d20);});}),this['listenTo'](_0x57fd72,'remove',(_0x364584,_0x3bf594)=>{_0x3bf594['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3bf594['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3d0e1a){if(_0x3d0e1a===this['activeAnnotation'])return;const _0x19671d=this['context']['plugins']['get'](z);if(_0x19671d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3d0e1a,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3d0e1a)_0x19671d['getSidebarItemView'](_0x3d0e1a)?this['_showBalloon'](_0x3d0e1a):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3d0e1a;}['detach'](){if(!this['isAttached'])throw new _0x5199cf('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x55ce9d=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3c5ce3=>_0x3c5ce3['destroy']()),this['_annotationToNarrowView']['clear'](),_0x55ce9d['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x30418b&&this['stopListening'](this['context']['editors']);for(const _0x33c0ac of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x33c0ac);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'](_0x93c891){if(!_0x93c891['plugins']['has']('EditorAnnotations'))return;const _0x194bfe=_0x93c891['plugins']['get']('EditorAnnotations'),_0x19a72b=this['context']['plugins']['get'](z),_0x3e68a9=this['annotations'],_0x3eeb8b=this['balloonPanelView'],_0x500b22=()=>{const _0x3f0ea5=_0x194bfe['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x3f0ea5),this['setActiveAnnotation'](_0x3f0ea5[0x0]||null);};this['listenTo'](_0x194bfe,'refresh',_0x500b22),this['listenTo'](_0x194bfe,'blur',(_0x59d867,{isAnnotationTracked:_0x2e89e1})=>{this['activeAnnotation']&&_0x2e89e1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x194bfe,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3e68a9,'blur',_0x2b3304=>{_0x194bfe['hasDomSelection']()&&_0x2b3304['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x19b7b0,_0x589806)=>{const _0x2d3c3c=_0x589806['target'];_0x3eeb8b['isVisible']&&_0x3eeb8b['element']['contains'](_0x2d3c3c)||_0x19a72b['view']['element']['contains'](_0x2d3c3c)||this['activeAnnotation']&&_0x194bfe['hasDomSelection']()&&(_0x500b22(),_0x19b7b0['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x194bfe);}['_destroyEditorAnnotationsIntegration'](_0x31f653){_0x31f653&&(this['stopListening'](_0x31f653),this['_editorAnnotations']['remove'](_0x31f653));}['_setSelectedAnnotations'](_0x5e4051){for(const _0x1c46b7 of this['_selectedAnnotations'])_0x5e4051['includes'](_0x1c46b7)||this['_manuallyClosedAnnotationViews']['delete'](_0x1c46b7['view']);this['_selectedAnnotations']=_0x5e4051;}['_refreshPositioning'](){const _0x368d5d=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x368d5d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x6cd5c){if(this['_manuallyClosedAnnotationViews']['has'](_0x6cd5c['view']))return;const _0x12edb6=this['balloonPanelView']['content']['first'];_0x12edb6!==_0x6cd5c['view']?(_0x12edb6&&this['_detachListeners'](_0x12edb6),this['_attachListeners'](_0x6cd5c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x6cd5c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x275fe=this['balloonPanelView']['content']['first'],_0x334317=_0x275fe&&this['annotations']['getByView'](_0x275fe);if(!_0x334317||!this['_annotationToNarrowView']['has'](_0x334317))return;const _0x25a512=this['_annotationToNarrowView']['get'](_0x334317)['element'],_0x40bea9=(function(){const _0x1a673a=_0x32c4b2['defaultPositions'];return[_0x1a673a['southArrowNorthEast'],_0x1a673a['northArrowSouthEast'],_0x1a673a['southArrowNorth'],_0x1a673a['northArrowSouth'],_0x1a673a['southArrowNorthWest'],_0x1a673a['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x25a512,'positions':_0x40bea9});}['_hideBalloon'](){const _0x113bde=this['balloonPanelView'],_0x27005b=_0x113bde['content']['first'];_0x27005b&&(this['_detachListeners'](_0x27005b),_0x113bde['unpin'](),_0x113bde['content']['clear']());}['_attachListeners'](_0x724b7a){this['listenTo'](_0x724b7a,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x724b7a,'Esc',(_0x4bb23f,_0x545ddc)=>{this['_manuallyClosedAnnotationViews']['add'](_0x724b7a),this['_hideBalloon'](),_0x545ddc();});}['_detachListeners'](_0x2ac819){this['stopListening'](_0x2ac819);}}class c extends _0x3456c4{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0xcf4250,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e5cbe){super(_0x1e5cbe),_0x1e5cbe['editing']['view']['addObserver'](_0x3b3a72),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1e5cbe['plugins']['get'](_0xcf4250),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x9c41f3(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x572df2=this['editor']['plugins']['get'](j);_0x572df2['context']===this['editor']&&(_0x572df2['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x7c6aac,_0x4094dc)=>{const _0x484086=this['_balloon'];if(this['isAttached']&&_0x484086['visibleView']){const _0x3de86e=this['annotations']['getByView'](_0x484086['visibleView']);_0x3de86e&&this['_closeAnnotation'](_0x3de86e),_0x4094dc();}}));}['afterInit'](){const _0x58415a=this['editor']['plugins']['get'](j);_0x58415a['context']===this['editor']&&(_0x58415a['hasActive']()||_0x58415a['switchTo']('inline'));}['setActiveAnnotation'](_0xaa82d3){_0xaa82d3!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0xaa82d3&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0xaa82d3)&&this['_addAnnotationToBalloon'](_0xaa82d3,!0x0),_0xaa82d3['isActive']=!0x0),_0xaa82d3||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0xaa82d3);}['attach'](_0x3f4a94){this['annotations']=_0x3f4a94;const _0x1492f0=this['editor']['plugins']['get'](j),_0xee24d0=this['_balloon'];if(this['isAttached'])throw new _0x5199cf('inlineannotations-attach-already-attached',this);if(_0x1492f0['context']!==this['editor'])throw new _0x5199cf('inlineannotations-not-allowed-with-context',this);const _0x31e7fd=this['editor']['plugins']['get'](b);this['listenTo'](_0x31e7fd,'refresh',()=>{const _0x1b93d5=_0x31e7fd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x5e5087,_0xcf67a5;!this['_forceRefresh']&&(_0x5e5087=_0x1b93d5,_0xcf67a5=this['_selectedAnnotations'],_0x5e5087['length']===_0xcf67a5['length']&&_0x5e5087['every'](_0x1d2803=>_0xcf67a5['includes'](_0x1d2803)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1b93d5),this['setActiveAnnotation'](_0x1b93d5[0x0]||null));}),this['listenTo'](_0x31e7fd,'blur',(_0x48eb73,{isAnnotationTracked:_0x268c2a})=>{this['activeAnnotation']&&_0x268c2a(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x31e7fd,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1b5abb,_0x2443cb,_0x5cf91c)=>{_0x5cf91c||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3f4a94,'remove',(_0x3ff071,_0x169246)=>{this['_removeAnnotationFromBalloon'](_0x169246),_0x169246===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xee24d0,'change:visibleView',(_0x2e5e76,_0x545677,_0x3239ef,_0x3727c0)=>{_0x3727c0&&this['stopListening'](_0x3727c0);const _0x3918de=_0x3f4a94['getByView'](_0x3239ef);_0x3239ef&&_0x3918de&&(this['listenTo'](_0x3239ef,'change:height',()=>{_0xee24d0['updatePosition']();}),this['listenTo'](_0x3239ef,'Esc',()=>{this['_closeAnnotation'](_0x3918de),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3918de&&this['setActiveAnnotation'](_0x3918de));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xee24d0['visibleView']&&(_0x3f4a94['getByView'](_0xee24d0['visibleView'])&&_0xee24d0['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 _0x5199cf('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2a777b of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2a777b);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x36ecf6){for(const _0x37c09f of this['_selectedAnnotations'])_0x36ecf6['includes'](_0x37c09f)||this['_manuallyClosed']['delete'](_0x37c09f);for(const _0x3e6616 of this['annotations'])_0x36ecf6['includes'](_0x3e6616)||this['_removeAnnotationFromBalloon'](_0x3e6616);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x44b95b of _0x36ecf6)this['_addAnnotationToBalloon'](_0x44b95b);}this['_selectedAnnotations']=_0x36ecf6;}['_addAnnotationToBalloon'](_0xe7cc99,_0x4a39a9=!0x1){this['_manuallyClosed']['has'](_0xe7cc99)||(this['_addedAnnotations']['has'](_0xe7cc99)||this['_balloon']['hasView'](_0xe7cc99['view'])||(this['_addedAnnotations']['add'](_0xe7cc99),this['_balloon']['add']({'stackId':_0xe7cc99['view']['id'],'view':_0xe7cc99['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xe7cc99)}})),_0x4a39a9&&this['_balloon']['showStack'](_0xe7cc99['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2c18f7){const _0x59f3ca=_0x2c18f7['target'],_0x179242=this['editor']['editing']['view'],_0x50eb44=_0x179242['document']['selection']['getFirstRange'](),_0x104000=_0x179242['domConverter']['viewRangeToDom'](_0x50eb44);if(_0x104000['collapse'](!0x0),_0x59f3ca){if(_0x59f3ca instanceof _0x578f30)return _0x59f3ca;let _0x180bd9=[];for(const _0x580c7a of _0x59f3ca)_0x180bd9['push'](...F(_0x580c7a['getClientRects']()));_0x180bd9=function(_0xbadea3){const _0x5c1a93=[];let _0xe367b=_0xbadea3[0x0];for(let _0x3a4a1b=0x1;_0x3a4a1b<_0xbadea3['length'];_0x3a4a1b++)P(_0xe367b,_0xbadea3[_0x3a4a1b])?_0xe367b['width']+=_0xbadea3[_0x3a4a1b]['width']:(_0x5c1a93['push'](_0xe367b),_0xe367b=_0xbadea3[_0x3a4a1b]);return _0x5c1a93['push'](_0xe367b),_0x5c1a93;}(_0x180bd9);const _0x4d04cc=_0x104000['getBoundingClientRect']();return _0x180bd9['find'](_0x324f9e=>_0x324f9e['top']<=_0x4d04cc['top']&&_0x324f9e['bottom']>=_0x4d04cc['bottom']&&_0x324f9e['left']<=_0x4d04cc['left']&&_0x324f9e['right']>=_0x4d04cc['right'])||_0x180bd9[0x0];}return _0x2c18f7['targetRect']||_0x104000;}['_removeAnnotationFromBalloon'](_0x366c23){this['_addedAnnotations']['has'](_0x366c23)&&this['_balloon']['hasView'](_0x366c23['view'])&&(this['_addedAnnotations']['delete'](_0x366c23),this['_balloon']['remove'](_0x366c23['view']));}['_closeAnnotation'](_0x428186){this['_manuallyClosed']['add'](_0x428186),this['_removeAnnotationFromBalloon'](_0x428186);}}function F(_0x3a1b22){return Array['from'](_0x3a1b22)['map'](DOMRect['fromRect']);}function P(_0x44d74e,_0x1ad265){return _0x44d74e['top']===_0x1ad265['top']&&_0x44d74e['bottom']===_0x1ad265['bottom']&&_0x44d74e['right']===_0x1ad265['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0xac2299,_0x45a59c){super(_0xac2299),this['set']('isEmpty',!_0x45a59c['length']),this['focusTracker']=new _0x4fd6f9(),this['_annotationViews']=_0x45a59c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x439bb2({'focusables':_0x45a59c,'focusTracker':this['focusTracker']}),this['listenTo'](_0x45a59c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x45a59c,'remove',(_0x221675,_0x2e1486)=>{_0x2e1486['isActive']&&this['focus'](),_0x45a59c['length']||(this['isEmpty']=!0x0);});const _0x5cf573=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0xac2299,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x45a59c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5cf573['if']('isEmpty','ck-hidden',_0x57dee5=>!_0x57dee5)]},'children':[{'text':N(_0xac2299,'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 _0x548f90 of this['_annotationViews'])this['focusTracker']['add'](_0x548f90['element']);this['_annotationViews']['on']('change',(_0x38e0c8,{added:_0x1de2e4,removed:_0x3ef2d9})=>{for(const _0x4534f7 of _0x1de2e4)this['focusTracker']['add'](_0x4534f7['element']);for(const _0x511106 of _0x3ef2d9)this['focusTracker']['remove'](_0x511106['element']);});}}class p extends _0x816dec{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5e1751){super(_0x5e1751),this['archivedThreads']=new _0x328140();}['init'](){const _0x45f636=this['context'],_0x2bb854=_0x45f636['plugins']['get'](o),_0x4070f6=_0x45f636['plugins']['get'](y);this['listenTo'](_0x2bb854,'addCommentThread',(_0x2cdb8a,{threadId:_0x3d0a27})=>{const _0x3eaecd=_0x2bb854['getCommentThread'](_0x3d0a27);_0x3eaecd['archivedAt']&&this['archivedThreads']['add'](_0x3eaecd,this['_calculatePosition'](_0x3eaecd['archivedAt'])),this['listenTo'](_0x3eaecd,'change:archivedAt',(_0x215cdf,_0x17cf08,_0x25356)=>{_0x25356?this['archivedThreads']['has'](_0x3eaecd)||this['archivedThreads']['add'](_0x3eaecd,this['_calculatePosition'](_0x3eaecd['archivedAt'])):this['archivedThreads']['has'](_0x3eaecd)&&this['archivedThreads']['remove'](_0x3eaecd);});}),this['listenTo'](_0x2bb854,'removeCommentThread',(_0xd8f7f6,{threadId:_0x15d772})=>{const _0x4f2699=_0x2bb854['getCommentThread'](_0x15d772);this['stopListening'](_0x4f2699),this['archivedThreads']['has'](_0x4f2699)&&this['archivedThreads']['remove'](_0x4f2699);},{'priority':'highest'}),this['listenTo'](_0x4070f6['collection'],'focus',(_0x1b7b13,_0x5174eb)=>{_0x5174eb['isVisible']||(_0x5174eb['isActive']=!0x0,_0x4070f6['activate'](_0x5174eb));});}['_calculatePosition'](_0x5eefa4){const _0x390d4b=[...this['archivedThreads']]['findIndex'](_0x50a674=>_0x50a674['archivedAt']<_0x5eefa4);return _0x390d4b>-0x1?_0x390d4b:this['archivedThreads']['length'];}}class a extends _0x3456c4{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x12cfd4];}constructor(_0x43c286){super(_0x43c286),this['annotationViews']=new _0x1539d8(),this['_pendingThreads']=[];}['init'](){const _0x7ec276=this['editor'],_0x548125=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x7ec276['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3487c4,!0x0)),_0x7ec276['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x303c78=this['_createCommentsArchiveButton'](_0x2bf5f4);return _0x303c78['set']({'role':'menuitemcheckbox'}),_0x303c78;});const _0xdb956d=_0x7ec276['plugins']['get'](p),_0x2c857b=_0x7ec276['plugins']['get']('Annotations'),_0x1becc7=_0x7ec276['plugins']['get']('CommentsRepository');_0xdb956d['archivedThreads']['forEach'](_0x1ef51d=>{this['_handleNewThread'](_0x1ef51d);}),this['listenTo'](_0xdb956d['archivedThreads'],'add',(_0x154952,_0x41954a)=>{this['_handleNewThread'](_0x41954a);}),this['listenTo'](_0x2c857b['collection'],'add',(_0x44aaa8,_0x2758e2)=>{const _0x231e20=this['_pendingThreads']['find'](_0x38bf53=>{const _0x228a18=_0x1becc7['_threadToController']['get'](_0x38bf53);return _0x228a18&&_0x2758e2['innerView']===_0x228a18['view'];});if(_0x231e20){const _0x4862c9=this['_calculatePosition'](_0x231e20['archivedAt']);this['_addAnnotationToArchive'](_0x2758e2,_0x4862c9),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x231e20),0x1);}}),this['listenTo'](_0xdb956d['archivedThreads'],'remove',(_0x3a15cc,_0x2cd1e3)=>{const _0x12f9b3=_0x7ec276['config']['get']('collaboration.channelId');if(!_0x12f9b3||_0x2cd1e3['channelId']===_0x12f9b3){if(this['_pendingThreads']['includes'](_0x2cd1e3))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2cd1e3),0x1);else{const _0x223872=_0x1becc7['_threadToController']['get'](_0x2cd1e3),_0x41e903=_0x2c857b['getByInnerView'](_0x223872['view']);this['annotationViews']['remove'](_0x41e903['view']),this['stopListening'](_0x41e903),this['stopListening'](_0x41e903['focusableElements']);}}}),this['listenTo'](_0x2c857b['collection'],'add',(_0x1bba06,_0xc6be8e)=>{this['listenTo'](_0xc6be8e,'escape',_0x548125);}),this['listenTo'](_0x2c857b['collection'],'remove',(_0x2146ed,_0x5a2234)=>{this['stopListening'](_0x5a2234,'escape',_0x548125);});}['_addAnnotationToArchive'](_0xb11825,_0x18ee8a){this['listenTo'](_0xb11825,'set:isVisible',_0x194c87=>{_0x194c87['return']=!0x1,_0x194c87['stop']();}),this['annotationViews']['add'](_0xb11825['view'],_0x18ee8a);}['_handleNewThread'](_0x3aeff2){const _0x5c5e9d=this['editor']['plugins']['get']('CommentsRepository'),_0x3bf35c=this['editor']['plugins']['get']('Annotations'),_0x38af07=this['editor']['config']['get']('collaboration.channelId');if(!_0x38af07||_0x3aeff2['channelId']===_0x38af07){const _0x35bb82=_0x5c5e9d['_threadToController']['get'](_0x3aeff2);if(!_0x35bb82)return void this['_pendingThreads']['push'](_0x3aeff2);const _0x50227d=this['_calculatePosition'](_0x3aeff2['archivedAt']),_0x278b9d=_0x3bf35c['getByInnerView'](_0x35bb82['view']);_0x278b9d['isVisible']&&_0x3bf35c['_visibleAnnotations']['remove'](_0x278b9d),this['_addAnnotationToArchive'](_0x278b9d,_0x50227d);}}['_calculatePosition'](_0x2ec552){const _0x5dd884=this['editor']['config']['get']('collaboration.channelId'),_0x2af204=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x21a4a3=>_0x21a4a3['channelId']===_0x5dd884)['findIndex'](_0x5c4c44=>_0x5c4c44['archivedAt']<_0x2ec552);return _0x2af204<0x0||_0x2af204>this['annotationViews']['length']?this['annotationViews']['length']:_0x2af204-0x1;}['_toggleDialog'](){const _0x45ffe5=this['editor'],_0x416f24=_0x45ffe5['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x45ffe5['locale'],this['annotationViews'])),'commentsArchive'===_0x416f24['id']?_0x416f24['hide']():_0x416f24['show']({'id':'commentsArchive','title':N(_0x45ffe5['locale'],'COMMENTS_ARCHIVE'),'icon':_0xeb0d29,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x31a583['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x56a06d,_0x419f60=!0x1){const _0x4058b7=this['editor']['locale'],_0x3c6934=this['editor']['plugins']['get']('Dialog'),_0x2c98ba=new _0x56a06d(_0x4058b7);return _0x2c98ba['bind']('isEnabled')['to'](this,'isEnabled'),_0x2c98ba['bind']('isOn')['to'](_0x3c6934,'id',_0x561896=>'commentsArchive'===_0x561896),_0x2c98ba['set']({'label':N(_0x4058b7,'COMMENTS_ARCHIVE'),'icon':_0xeb0d29,'isToggleable':!0x0}),_0x419f60&&(_0x2c98ba['tooltip']=!0x0),this['listenTo'](_0x2c98ba,'execute',()=>this['_toggleDialog']()),_0x2c98ba;}['_hideDialogOnAnnotationEscape']=_0x1e79c7=>{const _0x3db0ce=_0x1e79c7['source'];if(!this['annotationViews']['has'](_0x3db0ce['view']))return;const _0x2fada1=this['editor']['plugins']['get']('Dialog');_0x2fada1['isOpen']&&'commentsArchive'===_0x2fada1['id']&&(_0x2fada1['hide'](),_0x1e79c7['stop']());};}class Comments extends _0x3456c4{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,Comment,CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,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 _0x2cad53,ContextPlugin as _0x6308a6,PendingActions as lt,Command as _0x44eb8f,Plugin as _0x383916,Context as _0x5e978f}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0xcf6f6c,uid as _0x5b65de,KeystrokeHandler as jt,FocusTracker as _0xf55ae0,diff as _0x2e7b3c,Collection as _0x5bbff0,Rect as _0x363cc5,CKEditorError as _0x37011e,first as _0x37513e,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x429d9a,keyCodes as _0x5b6b88}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x454bc6,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0xd75c89,trimHtml as ts,LateFocusDropdownButtonView as _0x1ebbfb,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x577a1a}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,cloneDeep as wt,set as yt,unset as Ct,isEqual as At,debounce as _0x5ba633}from'es-toolkit/compat';import{IconUndo as _0x39b3c6,IconCheck as _0x5983e8,IconPencil as _0x4c66b7,IconRemoveComment as _0xb61c53,IconThreeVerticalDots as _0x5b1be3,IconAddComment as _0x422358,IconCommentsArchive as _0x6e7663}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x3f1de7,ButtonView as _0x6603e9,ViewCollection as _0x3555a7,createDropdown as _0x432a2c,ListView as _0x90e0e0,focusChildOnDropdownOpen as _0x139b89,ListItemView as _0x3e1f7e,MenuBarMenuListItemButtonView as _0x59d316,BodyCollection as _0x2fda56,BalloonPanelView as _0x25e11c,ContextualBalloon as _0x55de07,Dialog as _0x44fb97,DialogViewPosition as _0x249e56}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x40cd73}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}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 _0x27b8a7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x456198}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0xcf6f6c(){['model'];['view'];constructor(_0x19d41c,_0x1e3fe7){super(),this['model']=_0x19d41c,this['model']['_isAttached']=!0x0,this['view']=_0x1e3fe7,this['listenTo'](_0x1e3fe7,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1e3fe7,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1e3fe7,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1e3fe7,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1e3fe7,'addComment',(_0x582a65,_0x565a47)=>this['addComment'](_0x565a47)),this['listenTo'](_0x1e3fe7,'updateComment',(_0x255e75,_0xbb2002,_0x2a29b3)=>this['updateComment'](_0xbb2002,_0x2a29b3)),this['listenTo'](_0x1e3fe7,'removeComment',(_0x4ce841,_0x118f13)=>this['removeComment'](_0x118f13));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x10c9e2){this['model']['addComment']({'content':_0x10c9e2,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x395c2e,_0x53f7b3){this['model']['getComment'](_0x395c2e)['update']({'content':_0x53f7b3});}['removeComment'](_0xe2fc4d){this['model']['getComment'](_0xe2fc4d)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x422811,_0x58b39c,_0x50e917){const t=_0x422811['t'];switch(_0x58b39c){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'},_0x50e917);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'},_0x50e917);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'},_0x50e917);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'},_0x50e917);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x50e917);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'},_0x50e917);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'},_0x50e917);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'},_0x50e917);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 Rt extends $t{['main'];['editable'];constructor(_0x4c8bc,_0x394ef6){super(_0x4c8bc);const _0x293f63=_0x5b65de();this['main']=this['createCollection'](),this['editable']=new Vt(_0x4c8bc,_0x394ef6,void 0x0,{'label':()=>N(_0x4c8bc,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x4c8bc['uiLanguageDirection'],'lang':_0x4c8bc['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x293f63},'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 Et extends Ut{['view'];constructor(_0x50b712){super(_0x50b712),this['view']=new Rt(_0x50b712['locale'],_0x50b712['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x5a9c90=this['editor']['editing']['view'],_0x1d1ed8=this['view']['editable'],_0xf144ef=_0x5a9c90['document']['getRoot']();_0x1d1ed8['name']=_0xf144ef['rootName'],this['view']['render']();const _0x24d30e=_0x1d1ed8['element'];this['setEditableElement'](_0x1d1ed8['name'],_0x24d30e),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5a9c90['attachDomRoot'](_0x24d30e),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0xcf6f6c(_0x2cad53){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x212979={}){function _0x3971c1(_0x31349b){return _0x31349b['map'](_0x47cc8d=>String['fromCharCode'](_0x47cc8d))['join']('');}(_0x212979=Object['assign']({},_0x212979))['plugins']||(_0x212979['plugins']=hs['defaultPlugins']),super(_0x212979),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x3971c1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3971c1([0x76,0x69,0x65,0x77])][_0x3971c1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3971c1([0x61,0x75,0x74,0x6f]),this[_0x3971c1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3971c1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3971c1([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3971c1([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3971c1([0x6f,0x6b])});}['create'](){const _0x578f56=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x578f56))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x278f8e=>{const _0x572e83=this['model']['document']['getRoot'](),_0x47b084=_0x572e83&&_0x572e83['getChild'](_0x572e83['childCount']-0x1);_0x278f8e['setSelection'](_0x47b084,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x27e457=this['editing']['view'],_0x2ad7f1=_0x27e457['document']['getRoot'](),_0x63e5ed=_0x2ad7f1['getChild'](0x0);_0x2ad7f1['childCount']>0x1||!_0x63e5ed||'p'!=_0x63e5ed['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x27e457,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x63e5ed['placeholder']=this['placeholder']),Ft({'view':_0x27e457,'element':_0x63e5ed,'keepOnFocus':!0x0}),this['placeholderElement']=_0x63e5ed);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x53cbd6,_0x5bbdf={}){super(_0x53cbd6),this['editor']=null,this['_editorConfig']=_0x5bbdf,this['set']('value',_0x5bbdf['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x53cbd6,'Reply...')),this['set']('submitLabel',N(_0x53cbd6,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xf55ae0(),this['focusCycler']=new _0x3f1de7({'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',(_0xc7694a,_0x43aacd)=>{this['cancelButtonView']['fire']('execute'),_0x43aacd();}),this['keystrokes']['set']('Ctrl+Enter',(_0x43b201,_0x228768)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x228768());}),this['on']('submit',(_0x5957a4,_0x97f87f)=>{_0x97f87f['length']>0xfde8?(alert(N(_0x53cbd6,'TOO_LONG_COMMENT_ALERT',[_0x97f87f['length'],0xfde8])),_0x5957a4['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4f98d1=this['editor'];this['element']['insertBefore'](_0x4f98d1['ui']['element'],this['element']['firstChild']),_0x4f98d1['model']['document']['on']('change',()=>this['value']=_0x4f98d1['getData']()),_0x4f98d1['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4f98d1['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x31335b){-0x1===_0x31335b?(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:_0x2da232}=this,_0x169048=new _0x6603e9(_0x2da232);return _0x169048['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x169048['withText']=!0x0,_0x169048['bind']('label')['to'](this,'submitLabel'),_0x169048['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x169048['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2ab615,_0x1f7633)=>!_0x1f7633&&!!_0x2ab615['trim']()),_0x169048;}['_createCancelButton'](){const {locale:_0x46ddde}=this,_0xba69f0=new _0x6603e9(_0x46ddde);return _0xba69f0['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xba69f0['label']=N(_0x46ddde,'Cancel'),_0xba69f0['withText']=!0x0,_0xba69f0['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xba69f0;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3801d8=>{this['focusTracker']['add'](_0x3801d8['element']);}),this['focusables']['on']('change',(_0x2aa782,_0x2e3f4e)=>{for(const _0x17ab80 of Array['from'](_0x2e3f4e['added'])['reverse']())this['focusTracker']['add'](_0x17ab80['element']);});}}class ie extends kt{constructor(_0x4a27bb,_0x107988,_0x488713){super(_0x4a27bb),this['commentInputView']=new es(_0x4a27bb,_0x488713),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x152010,_0x2a0060)=>_0x152010||!!_0x2a0060),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 _0x454bc6(_0x4a27bb,_0x107988),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'](_0x35efd1){this['commentInputView']['focus'](_0x35efd1);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x24ebb6,_0x317549)=>{const {submitButtonView:_0x1899ee,cancelButtonView:_0xbbff7e,editor:_0x4ca8f8}=this['commentInputView'];[_0x1899ee['element'],_0xbbff7e['element'],_0x4ca8f8?_0x4ca8f8['editing']['view']['getDomRoot']():null]['filter'](_0x20000e=>_0x20000e)['some'](_0x5e1b16=>_0x5e1b16['contains'](_0x317549['target']))||(this['focus'](),_0x317549['preventDefault']());});}}class rs extends kt{constructor(_0x1a3fee){super(_0x1a3fee);const _0xb42687=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0xb42687['to']('count',_0x1cc71e=>N(_0x1a3fee,'NUMBER_OF_COMMENTS',_0x1cc71e))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x24c784,_0x4d96ec,_0xa8a728){super(_0x24c784);const _0x4d405c=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4d96ec['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4d96ec,this['_config']=_0xa8a728,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xf55ae0(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3f1de7({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x23e9e9=>this['commentViews']['map'](_0x3af77b=>_0x3af77b['element'])['includes'](_0x23e9e9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x24c784),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x643588=>_0x643588-this['_config']['maxCommentsWhenCollapsed']);for(const _0x59bb96 of _0x4d96ec['comments'])this['_handleNewCommentModel'](_0x59bb96);this['_handleInfoComment'](),this['listenTo'](_0x4d96ec['comments'],'add',(_0x59e3bd,_0x546dc3)=>{const _0x1ad97e=this['_calculatePosition'](_0x546dc3);this['length']++,this['_handleNewCommentModel'](_0x546dc3,_0x1ad97e),this['refreshVisibleViews']();}),this['listenTo'](_0x4d96ec['comments'],'remove',(_0x46abce,_0x13c0e9)=>{this['length']--,this['_handleRemoveCommentModel'](_0x13c0e9),this['refreshVisibleViews']();}),this['listenTo'](_0x4d96ec,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4d96ec,'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',_0x4d405c['if']('length','ck-hidden',_0x6def34=>!_0x6def34)],'aria-label':N(_0x24c784,'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'](_0x4dc72b){-0x1===_0x4dc72b?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x57bdd7 of this['commentViews'])_0x57bdd7['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3aec50,_0x4cff08){const _0x3b7e56=new this['_config']['CommentView'](this['locale'],_0x3aec50,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3b7e56['viewUid']=_0x3aec50['id'],_0x3b7e56['delegate']('removeComment')['to'](this),_0x3b7e56['delegate']('updateComment')['to'](this),_0x3b7e56['delegate']('resolveCommentThread')['to'](this),_0x3b7e56['delegate']('editorReady')['to'](this),_0x3b7e56['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3b7e56,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3b7e56,_0x4cff08);}['_calculatePosition'](_0x44d7fa){const _0x45604f=this['_model']['_findOptimalIndex'](_0x44d7fa);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x44d7fa['authoredAt']?_0x45604f-0x1:_0x45604f:_0x45604f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x40e679={'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'],_0x40e679,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x40e679));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x295c9a){const _0x32a897=this['commentViews']['remove'](_0x295c9a['id']);this['stopListening'](_0x32a897),_0x32a897['isEditMode']&&this['_updateHasDirtyComment'](),_0x32a897['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x377d6c=>_0x377d6c['isEditMode']);}['_rearrangeCollapse'](){const _0x1ee41c=function(_0x4aac75){const _0x4c4de2=new _0x5bbff0();for(const _0x2a5ad2 of _0x4aac75)_0x4c4de2['add'](_0x2a5ad2);return _0x4c4de2;}(this['commentViews']),_0x12f609=this['_collapsedCommentsView']['count'];for(let _0x548c03=0x1;_0x548c03<=_0x12f609;_0x548c03++)_0x1ee41c['remove'](0x1);for(const _0x2fae29 of _0x1ee41c)_0x2fae29['collapse']();_0x12f609>0x0&&_0x1ee41c['add'](this['_collapsedCommentsView'],0x1),ns(_0x2e7b3c(Array['from'](this['visibleViews']),Array['from'](_0x1ee41c)),this['visibleViews'],_0x1ee41c);}['_rearrangeExpand'](){ns(_0x2e7b3c(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x11de67 of this['visibleViews'])_0x11de67['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x8a47c9=>{this['focusTracker']['add'](_0x8a47c9['element']),this['keystrokes']['listenTo'](_0x8a47c9['element']);}),this['commentViews']['on']('change',(_0x5664e4,_0x42d12a)=>{for(const _0x2ff8fd of _0x42d12a['removed'])this['focusTracker']['remove'](_0x2ff8fd['element']),this['keystrokes']['stopListening'](_0x2ff8fd['element']);for(const _0x683882 of Array['from'](_0x42d12a['added'])['reverse']())this['focusTracker']['add'](_0x683882['element']),this['keystrokes']['listenTo'](_0x683882['element']);});}}function ns(_0x25a98b,_0x16332f,_0x2e1069){let _0x385f12=0x0;for(const _0x2c2aef of _0x25a98b)switch(_0x2c2aef){case'insert':_0x16332f['add'](_0x2e1069['get'](_0x385f12),_0x385f12),_0x385f12++;break;case'delete':_0x16332f['remove'](_0x385f12);break;case'equal':_0x385f12++;}}class oe extends kt{constructor(_0x98cd63){super(_0x98cd63);const _0x271c62=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x271c62['to']('contextValue',_0x48a339=>N(_0x98cd63,'THREAD_CONTEXT_LABEL',_0x48a339)),'tabindex':-0x1},'children':[{'text':_0x271c62['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5a043d,_0x14b79c){super(_0x5a043d);const _0xcd912f=this['bindTemplate'];this['_model']=_0x14b79c,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xf55ae0(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3f1de7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x8a9a9b=>!!_0x8a9a9b),this['bind']('contextValue')['to'](this['_model'],'context',_0x2aa241=>_0x2aa241&&_0x2aa241['value']?this['_trimContextValue'](_0x2aa241['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',_0xcd912f['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 _0x2e0378=new _0x6603e9(this['locale']);return _0x2e0378['label']=N(this['locale'],'Reopen'),_0x2e0378['tooltip']=N(this['locale'],'Reopen'),_0x2e0378['icon']=_0x39b3c6,_0x2e0378['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x42d1f4=>!_0x42d1f4),_0x2e0378['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3809de,_0x16f306)=>_0x3809de&&_0x16f306),_0x2e0378['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2e0378;}['_trimContextValue'](_0x41d9f3){if(_0x41d9f3['length']<0x96)return _0x41d9f3;const _0x4edd89=_0x41d9f3['lastIndexOf']('\x20',0x93);return _0x41d9f3['substring'](0x0,_0x4edd89>-0x1?_0x4edd89:0x93)+'...';}['_attachContextActions'](){const _0x3014b3=this['element']['querySelector']('.ck-context'),_0x38fff1=_0x3014b3['querySelector']('.ck-context__value');this['listenTo'](_0x3014b3,'mouseenter',()=>{_0x38fff1['offsetWidth']<_0x38fff1['scrollWidth']&&_0x3014b3['classList']['add']('overlay');}),this['listenTo'](_0x3014b3,'mouseleave',()=>{_0x3014b3['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x48289c of this['focusables'])this['focusTracker']['add'](_0x48289c['element']),this['keystrokes']['listenTo'](_0x48289c['element']);}['_createContextView'](){const _0x4c4b33=new oe(this['locale']);return _0x4c4b33['bind']('contextValue')['to'](this),_0x4c4b33;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x360437,_0x9579f,_0xeafee7,_0x407639){super(_0x360437),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x9579f,this['_localUser']=_0xeafee7,this['_config']=_0x407639,this['commentThreadHeaderView']=new Xt(_0x360437,_0x9579f),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x360437,N(_0x360437,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x360437,_0x9579f,Object['assign']({'CommentView':this['_config']['CommentView']},_0x407639)),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',(_0xd522b5,_0x22bf3e)=>_0xd522b5||!!_0x22bf3e),this['bind']('isUnlinked')['to'](_0x9579f,'unlinkedAt',_0x27b325=>!!_0x27b325),this['bind']('ariaLabel')['to'](this,'length',_0xb17332=>{const _0x3becdb=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0xb17332,_0x3becdb]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xf55ae0(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3f1de7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e724e=>_0x3e724e['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1f3b32=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2559ff=_0x1f3b32['commentInputView'];return _0x1f3b32['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2559ff,'value',(_0x1a2776,_0x541ae9,_0x50c75a,_0x1517cd,_0x25073d)=>!!_0x25073d||!!_0x1517cd&&_0x50c75a&&!_0x541ae9||_0x1a2776&&_0x50c75a&&!_0x541ae9),_0x2559ff['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1f4196,_0x377563,_0x127a00)=>{let _0x3d4679;return _0x3d4679=_0x127a00&&_0x377563?'Reply\x20to\x20reopen\x20discussion...':_0x1f4196?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x3d4679);}),_0x2559ff['bind']('submitLabel')['to'](this,'length',_0x45ca98=>N(this['locale'],_0x45ca98?'Reply':'Comment')),_0x2559ff['on']('submit',(_0x610975,_0x5f1874)=>{this['fire']('addComment',_0x5f1874),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2559ff['on']('cancel',()=>{this['focus']();}),_0x2559ff['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2559ff['on']('cancel',_0x12c2fe=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x12c2fe['stop']());}),this['on']('change:isActive',(_0x321abe,_0x3e7962,_0x446a2f)=>{_0x446a2f||this['length']||_0x2559ff['value']||this['fire']('removeCommentThread');}),_0x1f3b32;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x26c4fc,_0x679fef,_0x57327f,_0x4b88d3){super(_0x26c4fc,_0x679fef,_0x57327f,_0x4b88d3),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x26c4fc,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x56383f,_0x44e51a,_0xb4b810)=>{_0xb4b810||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x4e4c9f,_0x104a51,_0x32e4fd)=>{_0x32e4fd&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x596eae=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x596eae['if']('isActive','ck-thread--active'),_0x596eae['if']('isUnlinked','ck-thread--unlinked'),_0x596eae['to']('actionIndicator',_0x268d2a=>_0x268d2a?'ck-thread--'+_0x268d2a:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x596eae['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 _0x18bc00 of this['commentsListView']['commentViews'])_0x18bc00['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x4b1831}=this,_0x59a18a=this['commentsListView']['commentViews']['get'](0x0);_0x59a18a===this['_boundFirstCommentView']||_0x59a18a['isSystemComment']||(this['_boundFirstCommentView']=_0x59a18a,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x59a18a,'actionIndicator',_0x57c8e5=>'remove'===_0x57c8e5?'remove':null),_0x59a18a['placeholder']=N(_0x4b1831,'Write\x20a\x20comment...'),_0x59a18a['removeButton']['on']('execute',_0x8b7cbe=>{_0x8b7cbe['stop'](),this['showConfirm'](N(_0x4b1831,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x59a18a['focus']();}),_0x59a18a['actionBar']['add'](this['resolveButton'],0x0),_0x59a18a['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x1c26f3=new _0xd75c89(this['locale']);return _0x1c26f3['label']=N(this['locale'],'Resolve'),_0x1c26f3['tooltip']=N(this['locale'],'Resolve'),_0x1c26f3['icon']=_0x5983e8,_0x1c26f3['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x1c26f3['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4e0c32=>!_0x4e0c32),_0x1c26f3['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x446455,_0xdde7ca)=>_0x446455&&!_0xdde7ca),_0x1c26f3['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x1c26f3;}['_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 is extends kt{constructor(_0x3218ef){super(_0x3218ef),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x549b88,_0x2b10ae,_0x2a2b28)=>{this['element']['innerHTML']=_0x2a2b28;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x7a6985,_0x35dd83,_0x2d64fa){super(_0x7a6985),this['_model']=_0x35dd83,this['_config']=_0x2d64fa,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x35dd83,'content',_0x35dd83,'authoredAt',(_0x5cbb90,_0x4a255e)=>N(_0x7a6985,'COMMENT_ARIA_LABEL',[_0x35dd83['author']['name'],_0x2d64fa['formatDateTime'](_0x4a255e),new DOMParser()['parseFromString'](_0x5cbb90,'text/html')['body']['textContent'],_0x35dd83['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x7a6985,N(_0x7a6985,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x3555a7(),this['focusTracker']=new _0xf55ae0(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3f1de7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x7b2514=>_0x7b2514['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 _0x181d07=new is(this['locale']);return _0x181d07['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2e1b20,_0x63ad7f)=>_0x63ad7f?ts(_0x2e1b20,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2e1b20),_0x181d07;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x40f86f=new es(this['locale'],this['_config']['editorConfig']);return _0x40f86f['value']=this['_model']['content'],_0x40f86f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x40f86f['submitLabel']=N(this['locale'],'Save'),_0x40f86f['on']('submit',(_0x202de1,_0x56370a)=>{this['fire']('updateComment',this['_model']['id'],_0x56370a),this['switchToDisplayMode'](),this['focus']();}),_0x40f86f['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x40f86f['once']('editorReady',()=>{_0x40f86f['focus']();}),_0x40f86f['createEditor'](),_0x40f86f['delegate']('editorReady')['to'](this),_0x40f86f['delegate']('editorDestroyed')['to'](this),_0x40f86f;}['_setupKeyboardNavigation'](){const _0x9a0c6e=this['element'];this['keystrokes']['listenTo'](_0x9a0c6e);for(const _0x4126a5 of this['focusables'])this['focusTracker']['add'](_0x4126a5['element']),this['keystrokes']['listenTo'](_0x4126a5['element']);this['focusables']['on']('change',(_0x4b9c02,_0x21165a)=>{for(const _0x4b3e19 of _0x21165a['removed'])this['focusTracker']['remove'](_0x4b3e19['element']),this['keystrokes']['stopListening'](_0x4b3e19['element']);for(const _0x330b34 of _0x21165a['added'])this['focusTracker']['add'](_0x330b34['element']),this['keystrokes']['listenTo'](_0x330b34['element']);}),this['keystrokes']['set']('enter',(_0x48dce5,_0x1e8fce)=>{_0x9a0c6e===_0x48dce5['target']&&(this['focusCycler']['focusFirst'](),_0x1e8fce());}),this['keystrokes']['set']('esc',(_0x417e2d,_0x16c139)=>{_0x9a0c6e!==_0x417e2d['target']&&(this['focus'](),_0x16c139());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x3eda9b,_0x4cff86,_0xcadc10){super(_0x3eda9b,_0x4cff86,_0xcadc10),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x3eda9b,'Reply...')),this['bind']('authoredAt')['to'](_0x4cff86),this['bind']('resolvedAt')['to'](_0x4cff86),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 _0x454bc6(_0x3eda9b,_0x4cff86['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4cff86,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x2279b2=this['bindTemplate'],_0x5dc17f=[{'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':_0x2279b2['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x2279b2['to']('authoredAt',_0x35e7c3=>this['_config']['formatDateTime'](_0x35e7c3))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x2279b2['if']('isEditMode','ck-comment__actions--hidden'),_0x2279b2['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']&&_0x5dc17f['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x2279b2['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x2279b2['if']('isEditMode','ck-comment--edit'),_0x2279b2['if']('isSystemComment','ck-comment--info'),_0x2279b2['to']('actionIndicator',_0x2c50a0=>_0x2c50a0?'ck-comment--'+_0x2c50a0:'')],'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':_0x5dc17f}]}]};}['_createEditButton'](){const _0x408818=new _0x6603e9(this['locale']);return _0x408818['label']=N(this['locale'],'Edit'),_0x408818['icon']=_0x4c66b7,_0x408818['withText']=!0x0,_0x408818['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x408818['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x44c9c7=>!_0x44c9c7),_0x408818['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x408818['on']('execute',()=>this['switchToEditMode']()),_0x408818;}['_createRemoveButton'](){const _0xad18f=new _0x6603e9(this['locale']);return _0xad18f['label']=N(this['locale'],'Remove'),_0xad18f['icon']=_0xb61c53,_0xad18f['withText']=!0x0,_0xad18f['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xad18f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3eae88=>!_0x3eae88),_0xad18f['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xad18f['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xad18f;}['_createDropdown'](){const _0x2f3d9b=_0x432a2c(this['locale'],_0x1ebbfb),_0x4ed8d0=_0x2f3d9b['panelView']['children'],_0x3acc04=new _0x90e0e0(this['locale']),_0x191b43=_0x2f3d9b['bindTemplate'];_0x139b89(_0x2f3d9b,()=>this['items']['find'](_0x1e616d=>_0x1e616d['isVisible'])),_0x2f3d9b['extendTemplate']({'attributes':{'class':[_0x191b43['if']('isVisible','ck-hidden',_0x57f630=>!_0x57f630)]}});const _0x39979f=(_0x401272,_0x50e95e=-0x1)=>{const _0x2f67e4=new _0x3e1f7e(this['locale']);_0x2f67e4['children']['add'](_0x401272);const _0x5c6da9=_0x50e95e>-0x1?_0x50e95e:_0x3acc04['items']['length'];_0x3acc04['items']['add'](_0x2f67e4,_0x5c6da9);const _0x2784a9=Array['from'](this['items']);_0x2f3d9b['unbind']('isEnabled','isVisible'),_0x2f3d9b['bind']('isEnabled')['toMany'](_0x2784a9,'isEnabled',(..._0x41236e)=>_0x41236e['some'](_0x4c1e1b=>_0x4c1e1b)),_0x2f3d9b['bind']('isVisible')['toMany'](_0x2784a9,'isVisible',(..._0x18e42a)=>_0x18e42a['some'](_0x5ab4f1=>_0x5ab4f1));};_0x2f3d9b['panelPosition']='sw',_0x2f3d9b['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x5b1be3});for(const _0x34408a of this['items'])_0x39979f(_0x34408a);return _0x4ed8d0['add'](_0x3acc04),_0x2f3d9b['listenTo'](this['items'],'add',(_0x5c0d05,_0xcf5ff5,_0x3499c9)=>{_0x39979f(_0xcf5ff5,_0x3499c9);}),_0x2f3d9b['listenTo'](this['items'],'remove',(_0x3f4c1e,_0x1d528b,_0x28de57)=>{_0x3acc04['items']['remove'](_0x28de57);}),_0x2f3d9b;}['_attachActions'](_0x639f9f,_0x544f66){const _0x5694e0=_0x639f9f&&_0x639f9f['element'];_0x5694e0&&(this['listenTo'](_0x5694e0,'mouseenter',()=>this['actionIndicator']=_0x544f66),this['listenTo'](_0x5694e0,'focus',()=>this['actionIndicator']=_0x544f66),this['listenTo'](_0x5694e0,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5694e0,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x564114=super['_createCommentInputView']();return _0x564114['bind']('placeholder')['to'](this),_0x564114;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x327c1a){const _0x4f5e21=Dt(_0x327c1a,0x1e),_0x167acd=new MutationObserver(_0x1aa713=>{for(const _0x424e46 of _0x1aa713)('attributes'==_0x424e46['type']&&'class'==_0x424e46['attributeName']||'childList'==_0x424e46['type']||'characterData'==_0x424e46['type'])&&_0x4f5e21();});return{'attach'(_0x2c2087){_0x167acd['observe'](_0x2c2087,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x167acd['disconnect'](),_0x4f5e21['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x4f00b8,_0x5672af){super(_0x4f00b8),this['id']=_0x5b65de(),this['focusTracker']=new _0xf55ae0(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x1cc724,_0x81974e)=>this['fire']('Esc',_0x81974e)),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'](_0x5672af),this['mainView']=_0x5672af;const _0xf285d3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xf285d3['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 _0x59f3ec=this['element']['clientHeight'];_0x59f3ec&&(this['height']=_0x59f3ec);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0xcf6f6c(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1e12b7,target:_0x2e26ee,type:_0x50bab1,isVisible:_0x6758ca=!0x0}){super(),this['view']=_0x1e12b7,this['view']['element']||this['view']['render'](),this['_type']=_0x50bab1,this['_target']=_0x2e26ee,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5bbff0([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x75da49,_0x4005e1)=>{this['view']['focusTracker']['add'](_0x4005e1);}),this['focusableElements']['on']('remove',(_0x111599,_0x54ea1a)=>{this['view']['focusTracker']['remove'](_0x54ea1a);}),this['set']('isVisible',_0x6758ca);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x38c3e4=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x38c3e4),_0x38c3e4;}get['targetRect'](){const _0x27865d=this['target'];if(null===_0x27865d)return null;if(_0x27865d instanceof _0x363cc5)return _0x27865d;const _0x4eff6e=_0x27865d['filter'](_0xad5a1f=>function(_0x20c7f9){const _0x1b9960=_0x20c7f9['offsetParent'];if(_0x1b9960)return!0x0;const _0x23db9a=_0x20c7f9['getClientRects']()['item'](0x0);return!!_0x23db9a;}(_0xad5a1f));return 0x0===_0x4eff6e['length']?null:new _0x363cc5(_0x4eff6e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3eb8bb){this['view']['isActive']=_0x3eb8bb,this['view']['mainView']['isActive']=_0x3eb8bb;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x80faab){if(!(null===_0x80faab||_0x80faab instanceof _0x363cc5||Array['isArray'](_0x80faab)&&_0x80faab['every'](_0x23d6fc=>re(_0x23d6fc))))throw new _0x37011e('annotation-invalid-target',null,{'target':_0x80faab});}['_getNormalizedTarget'](){const _0x2945a2='function'==typeof this['_target']?this['_target']():this['_target'];return re(_0x2945a2)?[_0x2945a2]:_0x2945a2;}}function re(_0x33a37b){return null!==_0x33a37b&&'object'==typeof _0x33a37b&&'nodeType'in _0x33a37b&&0x1===_0x33a37b['nodeType'];}class S extends _0x5bbff0{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0xbc5117=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xf55ae0(),this['_focusTracker']['on']('change:isFocused',(_0x3a4b33,_0x321810,_0x46390b)=>{_0x46390b||this['fire']('blur');});for(const _0x30a1e3 of _0xbc5117)this['add'](_0x30a1e3);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x197320){if(this['has'](_0x197320))throw new _0x37011e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x197320['innerView'],_0x197320),this['_viewToAnnotation']['set'](_0x197320['view'],_0x197320);for(const _0x4e621f of _0x197320['focusableElements'])this['_focusTracker']['add'](_0x4e621f);this['listenTo'](_0x197320['focusableElements'],'add',(_0x50b1b6,_0xa3699a)=>{this['_focusTracker']['add'](_0xa3699a);}),this['listenTo'](_0x197320['focusableElements'],'remove',(_0x5cd26c,_0x333d73)=>{this['_focusTracker']['remove'](_0x333d73);}),this['listenTo'](_0x197320['view']['focusTracker'],'change:isFocused',(_0x4268cd,_0x3a570d,_0x8f0166)=>{_0x8f0166&&this['fire']('focus',_0x197320);}),_0x197320['updateTargetRect']();const _0x354cb9=this['_getOrderInContent'](_0x197320['view']['targetRect']);return super['add'](_0x197320,_0x354cb9);}['remove'](_0x2b2533){if(!this['has'](_0x2b2533))throw new _0x37011e('annotationcollection-not-existing-item',null);this['stopListening'](_0x2b2533['view']['focusTracker']),this['stopListening'](_0x2b2533['focusableElements']);for(const _0x458f52 of _0x2b2533['focusableElements'])this['_focusTracker']['remove'](_0x458f52);return this['_viewToAnnotation']['delete'](_0x2b2533['view']),this['_innerViewToAnnotation']['delete'](_0x2b2533['innerView']),super['remove'](_0x2b2533);}['getByInnerView'](_0x5bf688){return this['_innerViewToAnnotation']['get'](_0x5bf688);}['getByView'](_0x875824){return this['_viewToAnnotation']['get'](_0x875824);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x5c4877 of this)_0x5c4877['updateTargetRect']();this['_sort']();}['_sort'](){const _0x104646=Array['from'](this)['sort']((_0x888a5c,_0x11c5d0)=>w(_0x888a5c['view']['targetRect'],_0x11c5d0['view']['targetRect']));for(let _0x1a07d3=_0x104646['length']-0x1;_0x1a07d3>0x0;_0x1a07d3--){const _0x5e45b9=_0x104646[_0x1a07d3];_0x1a07d3!==this['getIndex'](_0x5e45b9)&&(this['remove'](_0x5e45b9),this['add'](_0x5e45b9));}}['_getOrderInContent'](_0x5d916c){let _0x56d9ef=0x0;if(!_0x5d916c)return this['length'];for(const _0x37ccf6 of this){const _0x6deba=_0x37ccf6['view']['targetRect'];if(_0x6deba){if(w(_0x5d916c,_0x6deba)<0x0)return _0x56d9ef;_0x56d9ef++;}}return _0x56d9ef;}}function v({source:_0x4bb92e,target:_0x10c08e,filter:_0x43d072}){for(const _0x5e5d52 of _0x4bb92e)_0x43d072(_0x5e5d52)&&_0x10c08e['add'](_0x5e5d52);_0x10c08e['listenTo'](_0x4bb92e,'add',(_0x36dcd6,_0x48efd7)=>{_0x43d072(_0x48efd7)&&_0x10c08e['add'](_0x48efd7);}),_0x10c08e['listenTo'](_0x4bb92e,'remove',(_0x141d41,_0x433d0b)=>{_0x10c08e['has'](_0x433d0b)&&_0x10c08e['remove'](_0x433d0b);});}function w(_0x5c2a25,_0x10ed59){if(null===_0x5c2a25&&null===_0x10ed59)return 0x0;if(null===_0x5c2a25)return-0x1;if(null===_0x10ed59)return 0x1;const _0x32197d=_0x5c2a25['top']-_0x10ed59['top'];return 0x0==_0x32197d?_0x5c2a25['left']-_0x10ed59['left']:_0x32197d;}class y extends _0x6308a6{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x568d66){if(super(_0x568d66),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x568d66 instanceof _0x2cad53){const _0x17740e=_0x568d66['locale'];_0x568d66['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x37906b){this['collection']['add'](_0x37906b);}['remove'](_0x5b0449){this['collection']['remove'](_0x5b0449),_0x5b0449['destroy']();}['refreshVisibility'](){for(const _0x5d5a4d of this['collection'])_0x5d5a4d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2fec39){return this['collection']['getByInnerView'](_0x2fec39);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x366e52 of this['collection'])_0x366e52['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x23cd40){this['fire']('_activateAnnotation',_0x23cd40);}['createAnnotation'](_0x505d8a){return new T(_0x505d8a);}['createAnnotationView'](_0x3fe67d,_0x24ae77){return new E(_0x3fe67d,_0x24ae77);}['_addActiveAnnotation'](_0x5795cf){const _0x2cd5a4=new Set(this['activeAnnotations']);_0x2cd5a4['add'](_0x5795cf),this['activeAnnotations']=_0x2cd5a4;}['_removeActiveAnnotation'](_0x33700b){const _0x27ba54=new Set(this['activeAnnotations']);_0x27ba54['delete'](_0x33700b),this['activeAnnotations']=_0x27ba54;}['_bindAnnotationsToVisibleAnnotations'](){const _0xe5882f=this['collection'],_0x52f81d=this['_visibleAnnotations'];function _0x1f826c(_0x211ae7){const _0x52d13e=_0x211ae7['source'];_0x52d13e['isVisible']&&!_0x52f81d['has'](_0x52d13e)?_0x52f81d['add'](_0x52d13e):!_0x52d13e['isVisible']&&_0x52f81d['has'](_0x52d13e)&&_0x52f81d['remove'](_0x52d13e),_0x52d13e['view']['focusTracker']['remove'](_0x52d13e['view']['element']),_0x52d13e['view']['focusTracker']['add'](_0x52d13e['view']['element']);}this['listenTo'](_0xe5882f,'add',(_0x247195,_0x1c6ed9)=>{_0x1c6ed9['isVisible']&&_0x52f81d['add'](_0x1c6ed9),this['listenTo'](_0x1c6ed9,'change:isVisible',_0x1f826c);}),this['listenTo'](_0xe5882f,'remove',(_0x1f7a95,_0x5d2c60)=>{_0x52f81d['has'](_0x5d2c60)&&_0x52f81d['remove'](_0x5d2c60),this['stopListening'](_0x5d2c60,'change:isVisible',_0x1f826c);});}['_setupEnterAnnotationKeystroke'](){const _0x162825=_0x3f2f96=>{_0x3f2f96['on']('ready',()=>{_0x3f2f96['keystrokes']['set'](_0x27b8a7,(_0x3922d3,_0x141a6b)=>{const _0x50bb96=_0x37513e(this['activeAnnotations']['values']());_0x50bb96&&(_0x50bb96['view']['focus'](),_0x141a6b());});});};this['context']instanceof _0x2cad53?_0x162825(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x57114a,_0x50b040)=>{_0x162825(_0x50b040);});}['_setupEscapeAnnotationHandling'](){const _0x10ddfb=_0x49dfee=>{const _0x140c9f=_0x49dfee['source'],_0x43448a=[];let _0x35feb3;if(Array['isArray'](_0x140c9f['target'])){_0x35feb3=_0x140c9f['target'][0x0],this['context']instanceof _0x2cad53?_0x43448a['push'](this['context']):this['context']['editors']&&_0x43448a['push'](...this['context']['editors']);for(const _0x6a8696 of _0x43448a)for(const _0x34f5ae of _0x6a8696['editing']['view']['domRoots']['values']())if(_0x34f5ae['contains'](_0x35feb3))return void _0x6a8696['editing']['view']['focus']();_0x35feb3['focus']();}};this['listenTo'](this['collection'],'add',(_0x1173fe,_0x379073)=>{this['listenTo'](_0x379073,'escape',_0x10ddfb,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x326938,_0x51683b)=>{this['stopListening'](_0x51683b,'escape',_0x10ddfb);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x6308a6{['_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(_0x49b79f){super(_0x49b79f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x310f5c=this['context']['config'];_0x310f5c['define']('comments.maxCommentsWhenCollapsed',0x2),_0x310f5c['define']('comments.maxThreadTotalWeight',0x1f4),_0x310f5c['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x310f5c['define']('comments.CommentThreadView',gt),_0x310f5c['define']('comments.CommentView',Tt),_0x310f5c['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2bcaf9=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5a8fa3,_0x4d229c)=>this['_addCommentThread'](_0x4d229c)),this['on']('submitCommentThread',(_0x3a7e02,_0x160a6b)=>this['_submitCommentThread'](_0x160a6b)),this['on']('resolveCommentThread',(_0x2eaad9,_0x22a117)=>this['_resolveCommentThread'](_0x22a117)),this['on']('resolveCommentThread',(_0x2107b8,_0x1dbd91)=>this['_updateActiveAnnotation'](_0x1dbd91),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x220dcb,_0x544cd6)=>this['_reopenCommentThread'](_0x544cd6)),this['on']('reopenCommentThread',(_0x1ca520,_0x459ee9)=>this['_updateActiveAnnotation'](_0x459ee9),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4dcc64,_0x152540)=>this['_removeCommentThread'](_0x152540)),this['on']('updateCommentThread',(_0x459014,_0x4781bd)=>this['_updateCommentThread'](_0x4781bd)),this['on']('updateCommentThread',(_0x4ce3e2,_0x175458)=>this['_updateActiveAnnotation'](_0x175458),{'priority':'lowest'}),this['on']('addComment',(_0x2f11e0,_0x4d73bd)=>this['_addComment'](_0x4d73bd)),this['on']('updateComment',(_0x84c3cc,_0x330e47)=>this['_updateComment'](_0x330e47)),this['on']('removeComment',(_0x1d5310,_0xaeb699)=>this['_removeComment'](_0xaeb699)),this['on']('addComment',(_0x5cf501,{threadId:_0x151771,isFromAdapter:_0x442cb0})=>{if(_0x442cb0)return;const _0x281277=this['getCommentThread'](_0x151771),_0x2ddf19=_0x281277&&this['_threadToController']['get'](_0x281277);_0x2ddf19&&_0x2ddf19['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2bcaf9,'change:activeAnnotations',(_0xff7071,_0x31b11d,_0x4ea034)=>{const _0x99b2a6=Array['from'](_0x4ea034)['map'](_0x58dc01=>this['_viewToController']['get'](_0x58dc01['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x99b2a6?_0x99b2a6['model']:null;});}set['adapter'](_0x45309f){if(this['_adapter'])throw new _0x37011e('commentsrepository-adapter-already-set');this['_adapter']=_0x45309f;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x260860=_t,threadId:_0x1f4e45=_0x5b65de(),comments:_0x1967d0=[],unlinkedAt:_0x22288b=null,resolvedAt:_0x35d70a=null,resolvedBy:_0x150aa9=null,target:_0x229bdc=null,context:_0x4dbc09=null,attributes:_0x415fc5={},isResolvable:_0x5ab23a=!0x0,isSubmitted:_0x223fdc=!0x1,isFromAdapter:_0xcec4e1=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x260860),{'channelId':_0x260860,'threadId':_0x1f4e45,'comments':_0x1967d0,'unlinkedAt':_0x22288b,'resolvedAt':_0x35d70a,'resolvedBy':_0x150aa9,'target':_0x229bdc,'context':_0x4dbc09,'attributes':_0x415fc5,'isFromAdapter':_0xcec4e1,'isResolvable':_0x5ab23a,'isSubmitted':_0x223fdc}),this['getCommentThread'](_0x1f4e45);}['openNewCommentThread']({channelId:_0x107af1=_t,threadId:_0x451f37=_0x5b65de(),target:_0x343e99,context:_0x507bdf=null,isResolvable:_0x1a5e1c=!0x0}){if(this['_readOnlyChannels']['has'](_0x107af1)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x343e99)throw new _0x37011e('commentsrepository-missing-target');const _0x445092=this['addCommentThread']({'channelId':_0x107af1,'threadId':_0x451f37,'target':_0x343e99,'context':_0x507bdf,'isResolvable':_0x1a5e1c});if(!_0x445092)return null;const _0x2f1bf7=this['_threadToController']['get'](_0x445092),_0x518433=_0x2f1bf7['view']['commentThreadInputView']['commentInputView'],_0x51e97e=this['context']['plugins']['get'](y),_0xdc3fb6=_0x51e97e['getByInnerView'](_0x2f1bf7['view']);return _0x51e97e['activate'](_0xdc3fb6),_0x518433['once']('editorReady',()=>_0x518433['focus']()),_0x445092;}['hasCommentThread'](_0x1bdc3b){if('string'!=typeof _0x1bdc3b)throw new _0x37011e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1bdc3b);}['updateCommentThread']({channelId:_0x37a987=_t,threadId:_0x1ec89a,context:_0x223afb,unlinkedAt:_0x13682d,attributes:_0x2cff8b,isFromAdapter:_0x5a47f3=!0x1}){return this['fire'](Nt('updateCommentThread',_0x37a987),{'channelId':_0x37a987,'threadId':_0x1ec89a,'context':_0x223afb,'unlinkedAt':_0x13682d,'attributes':_0x2cff8b,'isFromAdapter':_0x5a47f3}),this['getCommentThread'](_0x1ec89a);}['getCommentThread'](_0x314873){if('string'!=typeof _0x314873)throw new _0x37011e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x314873);}['fetchCommentThread']({channelId:_0x44975b,threadId:_0x5f256a}={}){const _0x57c9a7=this['getCommentThread'](_0x5f256a);if(_0x57c9a7)return Promise['resolve'](_0x57c9a7);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x37011e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x44975b,'threadId':_0x5f256a})['then'](_0x454f30=>this['hasCommentThread'](_0x5f256a)?this['getCommentThread'](_0x5f256a):_0x454f30?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x44975b},_0x454f30)):void 0x0)['catch'](_0x154185=>{throw console['error'](_0x154185),new _0x37011e('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5d32a0,skipNotAttached:_0x5ba118=!0x1,skipEmpty:_0x37834b=!0x1,toJSON:_0x18bc89=!0x1}={}){const _0x2bd96c=[];for(const _0x4b91bb of this['_threads']['values']())_0x5d32a0&&_0x4b91bb['channelId']!==_0x5d32a0||_0x5ba118&&!_0x4b91bb['isAttached']||_0x37834b&&0x0===_0x4b91bb['length']||_0x2bd96c['push'](_0x4b91bb);return _0x18bc89?_0x2bd96c['map'](_0x39648d=>_0x39648d['toJSON']()):_0x2bd96c;}['getAnnotationForCommentThread'](_0x2f4136){const _0x23e654=this['_threadToController']['get'](_0x2f4136);if(!_0x23e654)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x23e654['view'])||null;}['getCommentThreadForAnnotation'](_0x552ebe){const _0x54142b=this['_viewToController']['get'](_0x552ebe['innerView']);return _0x54142b?_0x54142b['model']:null;}['setActiveCommentThread'](_0xe64d3c){const _0x2b127c=this['context']['plugins']['get'](y);if(!_0xe64d3c)return void(this['activeCommentThread']&&_0x2b127c['deactivateAll']());const _0x2271ad=this['getCommentThread'](_0xe64d3c);if(!_0x2271ad)throw new _0x37011e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xe64d3c});if(!this['_threadToController']['has'](_0x2271ad))throw new _0x37011e('commentsrepository-active-not-attached',null,{'threadId':_0xe64d3c});const _0x2dabe3=_0x2b127c['getByInnerView'](this['_threadToController']['get'](_0x2271ad)['view']);_0x2b127c['activate'](_0x2dabe3);}['switchReadOnly'](_0x1ac161,_0x3d3434){_0x1ac161?this['_readOnlyChannels']['add'](_0x3d3434):this['_readOnlyChannels']['delete'](_0x3d3434),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5c2d47){return this['_readOnlyChannels']['has'](_0x5c2d47)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x46e492,_0x1ca8d9){return new vt(_0x46e492,_0x1ca8d9);}['setPermissions'](_0xee0b88,_0x1a47f7=_t){this['_permissions']['set'](_0x1a47f7,_0xee0b88),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x25edaa=_t){return this['_permissions']['has'](_0x25edaa)?this['_permissions']['get'](_0x25edaa):bt;}['_addCommentThread']({channelId:_0x3732d5,threadId:_0x19e0c9,comments:_0x2ee373,unlinkedAt:_0x4bcdb5,resolvedAt:_0x41ed06,resolvedBy:_0x3c3ca3,target:_0x3cad53,context:_0x4cea88,attributes:_0x13fe3a,isFromAdapter:_0x2e03ea,isResolvable:_0x2ca7c0,isSubmitted:_0x3cc7ac}){if('string'!=typeof _0x19e0c9)throw new _0x37011e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x19e0c9});if(this['hasCommentThread'](_0x19e0c9))throw new _0x37011e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x19e0c9});const _0x46a847=new CommentThread(this,{'channelId':_0x3732d5,'id':_0x19e0c9,'context':_0x4cea88,'attributes':_0x13fe3a,'unlinkedAt':_0x4bcdb5,'resolvedAt':_0x41ed06,'resolvedBy':_0x3c3ca3?this['context']['plugins']['get'](it)['getUser'](_0x3c3ca3):null,'isResolvable':_0x2ca7c0,'isSubmitted':_0x3cc7ac||_0x2e03ea});this['_threads']['set'](_0x19e0c9,_0x46a847);for(const _0x12b47c of _0x2ee373)_0x46a847['_add'](this['_createNewComment']({'threadId':_0x19e0c9,..._0x12b47c}));return _0x3cad53&&_0x46a847['attachTo'](_0x3cad53),_0x2e03ea||!_0x46a847['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3732d5,'threadId':_0x19e0c9});}['_submitCommentThread']({channelId:_0x1954c5,threadId:_0x478586}){if(!this['hasCommentThread'](_0x478586))throw new _0x37011e('commentsrepository-missing-comment-thread',this);const _0x1210fa=this['getCommentThread'](_0x478586);if(_0x1210fa['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x238384,comments:_0x16bd7f,resolvedAt:_0x2b3a8f,resolvedBy:_0x65afcd,context:_0x1dba0e,attributes:_0x4e59a6}=_0x1210fa,_0x48f62c=this['context']['plugins']['get']('PendingActions'),_0x2554ea=_0x48f62c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1954c5,'threadId':_0x238384,'comments':_0x16bd7f['map'](_0x1393ef=>_0x1393ef['toJSON']()),'resolvedAt':_0x2b3a8f,'resolvedBy':_0x65afcd?_0x65afcd['id']:_0x65afcd,'context':_0x1dba0e,'attributes':_0x4e59a6})['then'](({comments:_0x74c419})=>{_0x48f62c['remove'](_0x2554ea);for(const _0x5131cb of _0x74c419)this['_updateComment']({'channelId':_0x1954c5,'threadId':_0x478586,'commentId':_0x5131cb['commentId'],'createdAt':_0x5131cb['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x552a55=>{throw console['error'](_0x552a55),new _0x37011e('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x13e0b0,target:_0xa8439a}){const _0x180b59=this['getCommentThread'](_0x13e0b0);if(!_0x180b59)throw new _0x37011e('commentsrepository-attach-missing-comment-thread',this);const _0x1e838a=this['context']['plugins']['get']('PendingActions'),_0x8bf9a7=this['context']['plugins']['get'](y),_0x5c598e=this['_createCommentThreadView'](_0x180b59),_0x4c4b27=new vt(_0x180b59,_0x5c598e);let _0x557f14=null;_0x5c598e['on']('change:isDirty',(_0x289c62,_0x3ef8a8,_0xecbcd4)=>{_0xecbcd4?_0x557f14=_0x1e838a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x557f14&&(_0x1e838a['remove'](_0x557f14),_0x557f14=null);}),this['_threadToController']['set'](_0x180b59,_0x4c4b27),this['_viewToController']['set'](_0x5c598e,_0x4c4b27);const _0x43e116=new E(this['context']['locale'],_0x5c598e);_0x43e116['bind']('length')['to'](_0x5c598e),_0x43e116['bind']('isDirty')['to'](_0x5c598e,'isDirty',_0x5c598e,'length',(_0x38d755,_0x26be4a)=>_0x38d755||!_0x26be4a),_0x43e116['bind']('isActive')['to'](_0x5c598e),_0x43e116['type']='comment';const _0x2df536=new T({'view':_0x43e116,'target':_0xa8439a,'type':'comment','isVisible':!_0x180b59['archivedAt']&&!!('function'==typeof _0xa8439a?_0xa8439a():_0xa8439a)});return _0x5c598e['on']('escape',()=>{_0x2df536['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5c598e,_0x2df536),_0x8bf9a7['add'](_0x2df536),_0x2df536;}['_bindAnnotationToEditors'](_0x249734,_0x1ae2f2){this['listenTo'](_0x249734,'editorReady',(_0x445d36,_0x5d49cb)=>{const _0x1a6127=_0x5d49cb['ui']['view']['body']['bodyCollectionContainer'];_0x1ae2f2['focusableElements']['add'](_0x1a6127),this['context']instanceof _0x2cad53&&this['context']['ui']['focusTracker']['add'](_0x1a6127);},{'priority':'highest'}),this['listenTo'](_0x249734,'editorDestroyed',(_0x40e6d7,_0x1f8bb0)=>{const _0x107c34=_0x1f8bb0['ui']['view']['body']['bodyCollectionContainer'];_0x1ae2f2['focusableElements']['has'](_0x107c34)&&_0x1ae2f2['focusableElements']['remove'](_0x107c34),this['context']instanceof _0x2cad53&&this['context']['ui']['focusTracker']['remove'](_0x107c34);});}['_unbindEditors'](_0x1459c1){this['stopListening'](_0x1459c1,'editorReady'),this['stopListening'](_0x1459c1,'editorDestroyed');}['_createCommentThreadView'](_0x1dfefb){const _0x2a0df2=this['context']['plugins']['get'](it),{config:_0x17362f,locale:_0x2d95fb}=this['context'],_0x43b3c9=pt(_0x17362f['get']('locale'),_0x2d95fb);return new(0x0,(_0x17362f['get']('comments'))['CommentThreadView'])(_0x2d95fb,_0x1dfefb,_0x2a0df2['me'],{'editorConfig':{..._0x17362f['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x17362f['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x17362f['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x17362f['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x17362f['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x43b3c9,'CommentView':_0x17362f['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x21b3dc,channelId:_0x21223e,resolvedAt:_0x3481de,resolvedBy:_0x178676,isFromAdapter:_0x36b779}){if(!this['hasCommentThread'](_0x21b3dc))throw new _0x37011e('commentsrepository-missing-comment-thread',null,{'threadId':_0x21b3dc});const _0x1f7b3c=this['getCommentThread'](_0x21b3dc);if(_0x1f7b3c['isResolved'])throw new _0x37011e('commentsrepository-resolved-comment-thread',null,{'threadId':_0x21b3dc});const _0x2ee49c=this['context']['plugins']['get'](it);if(_0x1f7b3c['resolvedBy']=_0x2ee49c['getUser'](_0x178676),_0x1f7b3c['resolvedAt']=_0x3481de,_0x36b779||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x9a61c9=this['context']['plugins']['get']('PendingActions'),_0xf8c3b=_0x9a61c9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x21223e,'threadId':_0x21b3dc})['then'](({resolvedAt:_0x54bcd8,resolvedBy:_0xc68d0b})=>{_0x9a61c9['remove'](_0xf8c3b),_0x1f7b3c['resolvedBy']['id']!==_0xc68d0b&&(_0x1f7b3c['resolvedBy']=_0x2ee49c['getUser'](_0xc68d0b)),_0x1f7b3c['resolvedAt']=_0x54bcd8;})['catch'](_0x3fd2ea=>{throw console['error'](_0x3fd2ea),new _0x37011e('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x32ddf5,channelId:_0x353980,isFromAdapter:_0x15e3b7}){if(!this['hasCommentThread'](_0x32ddf5))throw new _0x37011e('commentsrepository-missing-comment-thread',null,{'threadId':_0x32ddf5});const _0x3251ef=this['getCommentThread'](_0x32ddf5);if(!_0x3251ef['isResolved'])throw new _0x37011e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x32ddf5});if(_0x3251ef['resolvedBy']=null,_0x3251ef['resolvedAt']=null,_0x15e3b7||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2197c3=this['context']['plugins']['get']('PendingActions'),_0x4033d3=_0x2197c3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x353980,'threadId':_0x32ddf5})['then'](()=>_0x2197c3['remove'](_0x4033d3))['catch'](_0x71c4ed=>{throw console['error'](_0x71c4ed),new _0x37011e('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4e00ec,isFromAdapter:_0x20720f}){const _0x102340=this['getCommentThread'](_0x4e00ec);if(!_0x102340)throw new _0x37011e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4e00ec),this['_threads']['delete'](_0x4e00ec),!_0x102340['isSubmitted']||_0x20720f||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x543bc8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2880f4}=_0x102340,_0x55f5cd=_0x543bc8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2880f4,'threadId':_0x4e00ec})['then'](()=>_0x543bc8['remove'](_0x55f5cd))['catch'](_0x106fad=>{throw console['error'](_0x106fad),new _0x37011e('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x58f27d,unlinkedAt:_0x44a253,context:_0x484ec0,attributes:_0x276fbc,isFromAdapter:_0x256e49}){if('string'!=typeof _0x58f27d)throw new _0x37011e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x58f27d});if(!this['hasCommentThread'](_0x58f27d))throw new _0x37011e('commentsrepository-missing-comment-thread',null,{'threadId':_0x58f27d});const _0xd04185=this['getCommentThread'](_0x58f27d);let _0x322882=!0x1;if(void 0x0!==_0x484ec0&&_0xd04185['context']!==_0x484ec0&&(_0xd04185['context']=_0x484ec0,_0x322882=!0x0),void 0x0!==_0x44a253&&_0xd04185['unlinkedAt']!==_0x44a253&&(_0xd04185['unlinkedAt']=_0x44a253,_0x322882=!0x0),_0x276fbc&&!At(_0x276fbc,_0xd04185['attributes'])&&(_0xd04185['attributes']=_0x276fbc,_0x322882=!0x0),!_0x322882)return Promise['resolve']();if(!_0xd04185['isSubmitted']||_0x256e49||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xdadc57=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a3714}=_0xd04185,_0x253c76=_0xdadc57['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2a3714,'threadId':_0x58f27d,'context':_0x484ec0,'unlinkedAt':_0x44a253,'attributes':_0x276fbc})['then'](()=>_0xdadc57['remove'](_0x253c76))['catch'](_0x23dc23=>{throw console['error'](_0x23dc23),new _0x37011e('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4c8956){const _0x6b917=this['context']['plugins']['get'](y),_0x570321=this['getCommentThread'](_0x4c8956);if(_0x570321['_isAttached']=!0x1,this['_threadToController']['has'](_0x570321)){const _0x4871d1=this['_threadToController']['get'](_0x570321),_0xbf0aa5=_0x4871d1['view'],_0xe0e1a2=_0x6b917['getByInnerView'](_0xbf0aa5);this['_threadToController']['delete'](_0x570321),this['_viewToController']['delete'](_0xbf0aa5),_0xe0e1a2&&_0x6b917['remove'](_0xe0e1a2),_0x4871d1['destroy'](),_0xbf0aa5['destroy']()['then'](()=>{this['_unbindEditors'](_0xbf0aa5);});}}['_updateActiveAnnotation']({threadId:_0x41862f,resolvedAt:_0x123613,unlinkedAt:_0x36af9d}){const _0x3b29da=!!_0x123613,_0x1a31fa=this['context']['plugins']['get'](y),_0x9ee2b=this['getCommentThread'](_0x41862f);if(this['_threadToController']['has'](_0x9ee2b)){const _0x4fbef8=this['_threadToController']['get'](_0x9ee2b)['view'],_0x268853=_0x1a31fa['getByInnerView'](_0x4fbef8);_0x268853&&(_0x3b29da&&_0x1a31fa['_removeActiveAnnotation'](_0x268853),_0x36af9d?_0x268853['isVisible']=!0x1:_0x268853['refreshVisibility']());}}['_getExternalAuthor'](_0x403f05){const _0x2a9741=this['context']['plugins']['get'](it),_0x4f106e=It('external:'+_0x403f05),_0x36931b=_0x2a9741['getUser'](_0x4f106e);return _0x36931b||_0x2a9741['addUser']({'id':_0x4f106e,'name':_0x403f05});}['_createNewComment']({threadId:_0x2d0b49,commentId:_0x561923=_0x5b65de(),content:_0x5312cc,authorId:_0x38d44b,createdAt:_0x11c94a,attributes:_0x445c43}){if('string'!=typeof _0x561923)throw new _0x37011e('commentsrepository-invalid-commentid');if('string'!=typeof _0x38d44b)throw new _0x37011e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5312cc||!_0x5312cc['trim']())throw new _0x37011e('commentsrepository-invalid-comment-content');const _0x6adb15=this['context']['plugins']['get'](it)['getUser'](_0x38d44b);if(!_0x6adb15)throw new _0x37011e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x38d44b});let _0xa08650=null,_0x54ec9=_0x11c94a;return _0x445c43?.['@external']&&(_0xa08650=this['_getExternalAuthor'](_0x445c43['@external']['authorName']),_0x54ec9=new Date(_0x445c43['@external']['createdAt'])),new Comment(this,{'threadId':_0x2d0b49,'id':_0x561923,'author':_0xa08650||_0x6adb15,'creator':_0x6adb15,'content':_0x5312cc,'createdAt':_0x11c94a,'authoredAt':_0x54ec9,'attributes':_0x445c43});}['_addComment'](_0x44e7b4){let {threadId:_0x317ba7,content:_0x2a45b8,attributes:_0x3f3602,isFromAdapter:_0x432f3f}=_0x44e7b4;const _0x124e0f=this['getCommentThread'](_0x44e7b4['threadId']);if(!_0x124e0f)throw new _0x37011e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1aea91=this['_createNewComment'](_0x44e7b4),{id:_0x4c9195}=_0x1aea91;if(_0x124e0f['_add'](_0x1aea91),_0x432f3f||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x124e0f['isSubmitted'])return Promise['resolve']();const _0x46b043=this['context']['plugins']['get']('PendingActions'),{channelId:_0x55274d}=_0x124e0f,_0x36206c=_0x46b043['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3f3602||(_0x3f3602={}),this['adapter']['addComment']({'channelId':_0x55274d,'threadId':_0x317ba7,'commentId':_0x4c9195,'content':_0x2a45b8,'attributes':_0x3f3602})['then'](_0x548483=>{_0x46b043['remove'](_0x36206c),_0x548483&&this['_updateComment']({'channelId':_0x55274d,'threadId':_0x317ba7,'commentId':_0x4c9195,'createdAt':_0x548483['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x188adf=>{throw console['error'](_0x188adf),new _0x37011e('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x34a6da,commentId:_0x29f86e,content:_0x36a74f,createdAt:_0x37198d,attributes:_0x68f757,isFromAdapter:_0x315225}){if(void 0x0!==_0x36a74f&&('string'!=typeof _0x36a74f||!_0x36a74f['trim']()['length']))throw new _0x37011e('commentsrepository-update-comment-invalid-content');const _0x4e0eee=this['getCommentThread'](_0x34a6da),_0x160d20=_0x4e0eee['getComment'](_0x29f86e);if(!_0x160d20)throw new _0x37011e('commentsrepository-update-missing-comment',this);let _0x1b279b=!0x1;if(_0x36a74f&&_0x36a74f!==_0x160d20['content']&&(_0x160d20['isEditable']||_0x315225)&&(_0x160d20['content']=_0x36a74f,_0x1b279b=!0x0),_0x37198d&&_0x37198d!==_0x160d20['createdAt']&&(_0x160d20['createdAt']=_0x37198d,_0x160d20['attributes']&&_0x160d20['attributes']['@external']||(_0x160d20['authoredAt']=_0x37198d),_0x1b279b=!0x0),_0x68f757&&!At(_0x68f757,_0x160d20['attributes'])&&(_0x160d20['attributes']=_0x68f757,_0x1b279b=!0x0),!_0x1b279b)return Promise['resolve']();if(_0x4e0eee['fire']('commentUpdated'),_0x315225||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4baa59=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3de379}=this['getCommentThread'](_0x160d20['threadId']),_0x30b29f=_0x4baa59['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3de379,'threadId':_0x34a6da,'commentId':_0x29f86e,'content':_0x36a74f,'attributes':_0x68f757})['then'](()=>_0x4baa59['remove'](_0x30b29f))['catch'](_0x14a4c3=>{throw console['error'](_0x14a4c3),new _0x37011e('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x8b9fea,commentId:_0x488f2e,isFromAdapter:_0x5bfb0a}){const _0x4ce3ae=this['getCommentThread'](_0x8b9fea),_0x13bb80=_0x4ce3ae['getComment'](_0x488f2e);if(!_0x13bb80)throw new _0x37011e('commentsrepository-remove-missing-comment',this);if(_0x4ce3ae['_remove'](_0x13bb80),_0x5bfb0a||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x58cd63=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5ea727}=_0x4ce3ae,_0x314d93=_0x58cd63['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5ea727,'threadId':_0x8b9fea,'commentId':_0x488f2e})['then'](()=>_0x58cd63['remove'](_0x314d93))['catch'](_0x10f1c3=>{throw console['error'](_0x10f1c3),new _0x37011e('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0xcf6f6c(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x1ffe63,_0x574b79){super();const _0xede9f2=_0x574b79['isResolvable'];this['channelId']=_0x574b79['channelId'],this['id']=_0x574b79['id'],this['comments']=new _0x5bbff0(),this['_repository']=_0x1ffe63,this['_isAttached']=!0x1,this['_isSubmitted']=_0x574b79['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x1ffe63,'_permissions',_0x1ffe63,'_readOnlyChannels',()=>_0x1ffe63['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x1ffe63,'_permissions',()=>_0x1ffe63['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x1ffe63,'_permissions',()=>{const _0xbb0c49=_0x1ffe63['getPermissions'](this['channelId']);return _0xbb0c49['write']||_0xbb0c49['admin'];}),this['bind']('isResolvable')['to'](_0x1ffe63,'_permissions',()=>_0xede9f2&&_0x1ffe63['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x574b79['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x975f31,_0x3de6a4)=>_0x975f31?_0x3de6a4?_0x975f31<_0x3de6a4?_0x975f31:_0x3de6a4:_0x975f31:_0x3de6a4),this['set']('unlinkedAt',_0x574b79['unlinkedAt']||null),this['set']('resolvedAt',_0x574b79['resolvedAt']||null),this['set']('resolvedBy',_0x574b79['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4cdea9=>!!_0x4cdea9),this['set']('attributes',_0x574b79['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x16bc05,_0x2b426d)=>_0x16bc05+_0x2b426d['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2a9eca,id:_0x3fc41d}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x2a9eca),{'channelId':_0x2a9eca,'threadId':_0x3fc41d});}['setUnlinkedAt'](_0x2b8baf){this['_update']({'unlinkedAt':_0x2b8baf});}['resolve']({resolvedAt:_0x59469f=new Date(),resolvedBy:_0xba20aa='',isFromAdapter:_0x344738=!0x1}={}){const _0x201543=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x5a535d,id:_0x5ec84c}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x5a535d),{'channelId':_0x5a535d,'threadId':_0x5ec84c,'resolvedAt':_0x59469f,'resolvedBy':_0xba20aa||_0x201543['id'],'isFromAdapter':_0x344738});}['reopen']({isFromAdapter:_0x3c47a5=!0x1}={}){const {channelId:_0x58487e,id:_0x305b7d}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x58487e),{'channelId':_0x58487e,'threadId':_0x305b7d,'isFromAdapter':_0x3c47a5});}['setContext'](_0x2e8123){this['context']||this['_update']({'context':_0x2e8123});}['setAttribute'](_0x1e7fde,_0x6750ba){const _0x4e5f1f=wt(this['attributes']);yt(_0x4e5f1f,_0x1e7fde,_0x6750ba),this['_update']({'attributes':_0x4e5f1f});}['removeAttribute'](_0x50fe4d){const _0x84f1ef=wt(this['attributes']);Ct(_0x84f1ef,_0x50fe4d),this['_update']({'attributes':_0x84f1ef});}['remove']({isFromAdapter:_0x30736e=!0x1}={}){const {channelId:_0x5e11ed,id:_0x2cbcff}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x5e11ed),{'channelId':_0x5e11ed,'threadId':_0x2cbcff,'isFromAdapter':_0x30736e});}['attachTo'](_0x446a9b){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x446a9b});}['addComment'](_0x215768){const {channelId:_0x10bd1e,id:_0x38e2d7}=this;this['_repository']['fire'](Nt('addComment',_0x10bd1e,_0x38e2d7),Object['assign']({'channelId':_0x10bd1e,'threadId':_0x38e2d7},_0x215768));}['getComment'](_0x331fb2){if('string'!=typeof _0x331fb2)throw new _0x37011e('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x331fb2});return this['comments']['get'](_0x331fb2);}['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'](_0x5ad1ab=>_0x5ad1ab['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4f8f29){return this['listenTo'](_0x4f8f29,'change:authoredAt',()=>{const _0x1a7f1e=this['_findOptimalIndex'](_0x4f8f29),_0x371ad9=this['comments'];_0x1a7f1e-0x1!=_0x371ad9['getIndex'](_0x4f8f29)&&_0x1a7f1e+0x1!=_0x371ad9['getIndex'](_0x4f8f29)&&(this['_remove'](_0x4f8f29),this['_add'](_0x4f8f29));}),this['comments']['add'](_0x4f8f29,this['_findOptimalIndex'](_0x4f8f29));}['_update'](_0x4031da){const {channelId:_0x96aea0,id:_0x36d2a7}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x96aea0),{..._0x4031da,'channelId':_0x96aea0,'threadId':_0x36d2a7});}['_remove'](_0x28b9d7){return this['stopListening'](_0x28b9d7),_0x28b9d7['destroy'](),this['comments']['remove'](_0x28b9d7);}['_findOptimalIndex'](_0x592ee5){const _0x414b4e=this['comments']['find'](_0x1e99db=>new Date(_0x1e99db['authoredAt'])['getTime']()>new Date(_0x592ee5['authoredAt'])['getTime']());return _0x414b4e?this['comments']['getIndex'](_0x414b4e):this['length'];}}class Comment extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0xcf6f6c(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x52fdba,_0x2ce014){super();const _0x3d3707=_0x52fdba['context']['plugins']['get'](it)['me'],_0x378bce=_0x52fdba['getCommentThread'](_0x2ce014['threadId']),_0x2a799c=0x0===_0x378bce['comments']['length'],_0xbc3145=_0x3d3707===_0x2ce014['author'];this['id']=_0x2ce014['id'],this['threadId']=_0x2ce014['threadId'],this['author']=_0x2ce014['author'],this['creator']=_0x2ce014['creator'],this['isExternal']=Boolean(_0x2ce014['attributes']&&_0x2ce014['attributes']['@external']),this['set']('content',_0x2ce014['content']),this['createdAt']=_0x2ce014['createdAt']||new Date(),this['set']('authoredAt',_0x2ce014['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x378bce,'resolvedAt'),this['set']('attributes',_0x2ce014['attributes']||{}),this['bind']('isEditable')['to'](_0x52fdba,'_permissions',()=>{const _0x48faba=_0x52fdba['getPermissions'](_0x378bce['channelId'])['write'],_0x266177=_0x52fdba['getPermissions'](_0x378bce['channelId'])['modifyAll'];return _0xbc3145&&_0x48faba||!_0xbc3145&&_0x266177;}),this['bind']('isRemovable')['to'](_0x378bce,'isRemovable',_0x52fdba,'_permissions',_0x373257=>{const _0x3ecca9=_0x52fdba['getPermissions'](_0x378bce['channelId'])['write'],_0xd3f8c4=_0x52fdba['getPermissions'](_0x378bce['channelId'])['modifyAll'];return _0xbc3145&&_0x3ecca9||_0x373257&&_0x2a799c||!_0xbc3145&&_0xd3f8c4&&!_0x2a799c;}),this['bind']('isReadOnly')['to'](_0x378bce,'isReadOnly'),this['_repository']=_0x52fdba;}get['weight'](){return Math['max'](function(_0x5264a4){const _0x31226a=document['createElement']('div');return _0x31226a['innerHTML']=_0x5264a4,_0x31226a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1a8b0b){const {threadId:_0x18330f,id:_0x191b17}=this;if(!this['_repository']['hasCommentThread'](_0x18330f))throw new _0x37011e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x312040}=this['_repository']['getCommentThread'](_0x18330f);this['_repository']['fire'](Nt('updateComment',_0x312040,_0x18330f),{'channelId':_0x312040,'threadId':_0x18330f,'commentId':_0x191b17,..._0x1a8b0b});}['setAttribute'](_0x459242,_0x3279ab){const _0x429566=wt(this['attributes']);yt(_0x429566,_0x459242,_0x3279ab),this['update']({'attributes':_0x429566});}['removeAttribute'](_0x5d5009){const _0x3b8875=wt(this['attributes']);Ct(_0x3b8875,_0x5d5009),this['update']({'attributes':_0x3b8875});}['remove'](_0x483e74={}){if(!_0x483e74['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x60f910,id:_0x3b31d4}=this;if(!this['_repository']['hasCommentThread'](_0x60f910))throw new _0x37011e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5f128f}=this['_repository']['getCommentThread'](_0x60f910);this['_repository']['fire'](Nt('removeComment',_0x5f128f,_0x60f910),{'channelId':_0x5f128f,'threadId':_0x60f910,'commentId':_0x3b31d4,..._0x483e74});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x511181,..._0x5ab2ad){for(const _0x54eae4 of _0x5ab2ad)void 0x0!==_0x54eae4&&(_0x511181+=':'+String(_0x54eae4));return _0x511181;}class ot extends _0x44eb8f{constructor(_0x191785){super(_0x191785),this['set']('hasContent',!0x1);}['refresh'](){const _0x293738=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x3746f4 of _0x293738['getRanges']())if(this['_hasContent'](_0x3746f4))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x2f8fce=_0x5b65de(),ranges:_0x22ce58,comment:_0x357a23}={}){const _0x546f8f=this['editor']['model'],_0x45964e=_0x22ce58??Array['from'](_0x546f8f['document']['selection']['getRanges']()),_0x50e32e=[];for(const _0x459a08 of _0x45964e)this['_hasContent'](_0x459a08)&&_0x50e32e['push'](this['_trimToContent'](_0x459a08));if(!_0x50e32e['length'])throw new _0x37011e('addcommentthreadcommand-incorrect-ranges',null);_0x357a23&&this['_createCommentThread'](_0x2f8fce,_0x357a23),this['_createMarkersFromRanges'](_0x2f8fce,_0x50e32e,!!_0x357a23);}['_createMarkersFromRanges'](_0x1d4299,_0x34ad5e,_0x58b225){this['editor']['model']['change'](_0x56fde4=>{for(const _0x19ab67 of _0x34ad5e){const _0x3be2ce=_0x5b65de()['substr'](0x1,0x5),_0x25919f='comment:'+_0x1d4299+':'+_0x3be2ce;_0x56fde4['addMarker'](_0x25919f,{'range':_0x19ab67,'usingOperation':_0x58b225,'affectsData':_0x58b225});}});}['_createCommentThread'](_0x1f79b7,_0x500434){const _0x314e8a=this['editor']['plugins']['get']('CommentsRepository'),_0x132a14=this['editor']['config']['get']('collaboration.channelId'),_0x240307=this['editor']['plugins']['get']('Users')['me'];if(!_0x240307)throw new _0x37011e('addcommentthreadcommand-user-not-found',null);_0x314e8a['addCommentThread']({'threadId':_0x1f79b7,'channelId':_0x132a14,'comments':[{'authorId':_0x240307['id'],'content':_0x500434,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x1bd404){for(const _0x20c133 of _0x1bd404['getItems']())if(this['_itemIsContent'](_0x20c133))return!0x0;return!0x1;}['_itemIsContent'](_0x59f92c){return _0x59f92c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x59f92c)&&!_0x59f92c['is']('element','tableCell');}['_trimToContent'](_0x115d82){const _0x21cec2=_0x1c3959=>!this['_itemIsContent'](_0x1c3959['item']),_0x97d53e=_0x115d82['start']['getLastMatchingPosition'](_0x21cec2),_0x1deace=_0x115d82['end']['getLastMatchingPosition'](_0x21cec2,{'direction':'backward'});return this['editor']['model']['createRange'](_0x97d53e,_0x1deace);}}class b extends _0x383916{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1edf6d){super(_0x1edf6d),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4f9520=this['editor'],_0x37cdd5=_0x4f9520['model']['document']['selection'],_0x9cb4cb=_0x5ba633(()=>this['refreshSelectedViews'](),0xa);_0x37cdd5['on']('change:range',(_0x227e94,_0x6e0704)=>{_0x6e0704['directChange']&&(_0x9cb4cb['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4f9520['editing']['view']['document'],'change:isFocused',(_0x550ce9,_0x52d835,_0x1d2ed9)=>{_0x1d2ed9&&_0x9cb4cb();}),this['listenTo'](_0x4f9520['ui']['focusTracker'],'change:isFocused',(_0x52cd23,_0xa5f002,_0x4d207c)=>{_0x4d207c||this['fire']('blur',{'isAnnotationTracked':_0x2592f7=>this['_editorAnnotationsData']['has'](_0x2592f7['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x210890){if(this['_editorAnnotations']['has'](_0x210890['view']))return;this['_editorAnnotations']['add'](_0x210890['view']),this['editor']['ui']['focusTracker']['add'](_0x210890['view']['element']);const _0x43cbea=this['editor']['plugins']['get'](y);this['listenTo'](_0x43cbea['collection'],'remove',(_0x5729cc,_0x157ef2)=>{this['editor']['ui']['focusTracker']['remove'](_0x157ef2['view']['element']),this['_editorAnnotations']['delete'](_0x157ef2['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x71e74a){if('function'!=typeof _0x71e74a)throw new _0x37011e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x71e74a);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x42b810,annotations:_0x1409a3}){const _0x5ce903=[],_0x48f8bb=this['editor']['model']['document']['selection'],_0x5b861f=Array['from'](_0x48f8bb['getRanges']());for(const [_0x551c12,_0xb4e9c9]of this['_editorAnnotationsData']){const _0x281e5c=_0x394c02(_0xb4e9c9),_0x5eb438=_0x1409a3['getByInnerView'](_0x551c12);_0x281e5c&&_0x5eb438&&_0x5ce903['push']({'annotation':_0x5eb438,'range':_0x281e5c});}function _0x394c02(_0x2a8bb3){for(const _0x5acf29 of _0x2a8bb3)for(const _0x555d81 of _0x5b861f)if(_0x5acf29['containsRange'](_0x555d81,!_0x48f8bb['isCollapsed']))return _0x5acf29;return null;}return _0x5ce903['sort']((_0x2a5307,_0x24c9e7)=>{const _0x1d810b=_0x2a5307['range'],_0x56634a=_0x24c9e7['range'];if(!_0x1d810b['isEqual'](_0x56634a)){if(_0x1d810b['containsRange'](_0x56634a,!0x0))return 0x1;if(_0x56634a['containsRange'](_0x1d810b,!0x0))return-0x1;}return _0x2a5307['annotation']==_0x42b810?-0x1:_0x24c9e7['annotation']==_0x42b810?0x1:0x0;})['map'](_0x58d7b4=>_0x58d7b4['annotation']);}get['_editorAnnotationsData'](){const _0x42914f=new Map();for(const _0x116fcc of Array['from'](this['_dataCollectors']))for(const [_0x1516d2,_0x5625c4]of _0x116fcc())_0x42914f['set'](_0x1516d2,_0x5625c4);return _0x42914f;}}class st extends _0x383916{['afterInit'](){const _0x172eb9=this['editor'];if(!_0x172eb9['plugins']['has']('RestrictedEditingModeEditing'))return;_0x172eb9['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x383916{constructor(_0x1096bc){super(_0x1096bc),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3c6f7c=this['editor'],_0x3aa997=_0x3c6f7c['commands']['get']('importWord'),_0xe2b763=_0x3c6f7c['plugins']['get'](it);_0x3aa997&&(_0x3aa997['on']('execute',(_0x52b6b6,[,_0x261356])=>{_0x261356['collaboration_features']={'comments':!0x0,'user_id':_0xe2b763['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x3aa997,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4ece92,_0x768e6c){const {comment_threads:_0x4d2b0b}=_0x768e6c;_0x4d2b0b&&_0x4d2b0b['forEach'](({thread_id:_0x2bd275,comments:_0x210b77,is_resolved:_0x39a9e7})=>{const _0x439831=new Date(),_0x4650cb=_0x210b77['map'](({author:_0x4ab059,content:_0x3f1da2,created_at:_0x51520c})=>({'content':_0x3f1da2,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x439831,'attributes':{'@external':{'authorName':_0x4ab059,'createdAt':_0x51520c?new Date(_0x51520c):new Date(),'source':'importWord'}}})),_0x4dbbff=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4dbbff,'threadId':_0x2bd275,'comments':_0x4650cb,'resolvedAt':_0x39a9e7?_0x439831:null});});}}class at extends _0x383916{constructor(_0x158caf){super(_0x158caf),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x495d04=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x495d04,'contentInsertion',(_0x57370c,_0x2a9f9d)=>this['_removeMarkersWithoutThreads'](_0x2a9f9d['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x178c80){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x178c80;const _0xcbb37b=this['editor']['plugins']['get']('CommentsRepository');for(const _0x9f53d4 of _0x178c80['keys']()){const [_0x5da1ee,_0xac2074]=_0x9f53d4['split'](':');'comment'!=_0x5da1ee||_0xcbb37b['hasCommentThread'](_0xac2074)||_0x178c80['delete'](_0x9f53d4);}return _0x178c80;}['_registerMarkerInClipboardPipeline'](){const _0x15b928=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x20c2f7=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x20c2f7&&_0x15b928['_registerMarkerToCopy']('comment',_0x20c2f7);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xc2b448){switch(_0xc2b448){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x38e827){const _0x51f9a4=_0x38e827['split'](':');return{'group':_0x51f9a4[0x0],'id':_0x51f9a4[0x1],'part':_0x51f9a4[0x2]};}class ut extends _0x383916{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x57cf84,_0x406a9f)=>{if(!_0x406a9f['options']['showCommentHighlights'])return null;if(_0x406a9f['options']['ignoreResolvedComments']){const {id:_0x41e83d}=ft(_0x57cf84['markerName']),_0x192eff=this['editor']['plugins']['get'](o);if(_0x192eff['getCommentThread'](_0x41e83d)?.['isResolved']&&_0x57cf84['item'])return _0x406a9f['consumable']['consume'](_0x57cf84['item'],'addMarker:'+_0x57cf84['markerName']),_0x406a9f['consumable']['consume'](_0x57cf84['item'],'removeMarker:'+_0x57cf84['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x8f43e4=>{_0x8f43e4['on']('addMarker:comment',(_0x55a49e,_0x5571ca,_0x1a9ca9)=>{if(!_0x1a9ca9['options']['showCommentHighlights'])return;const _0x23baf4=_0x5571ca['item'];if(!_0x23baf4)return;const _0x3c94c8=_0x1a9ca9['mapper']['toViewElement'](_0x23baf4);this['editor']['model']['schema']['isObject'](_0x23baf4)&&_0x3c94c8&&!_0x3c94c8['getCustomProperty']('widget')&&_0x3c94c8['is']('containerElement')&&_0x456198(_0x3c94c8,_0x1a9ca9['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3c0341,{writer:_0x4a362a,options:_0x168d25})=>{if(!_0x168d25['showCommentHighlights'])return null;const _0x4b7389=_0x4a362a['createContainerElement']('div'),_0x33dc1a=_0x4a362a['createEmptyElement']('hr');return _0x4a362a['addClass']('ck-horizontal-line',_0x4b7389),_0x4a362a['insert'](_0x4a362a['createPositionAt'](_0x4b7389,0x0),_0x33dc1a),_0x4b7389;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5b88b1,{writer:_0x243f78,options:_0x30ead6})=>{if(!_0x30ead6['showCommentHighlights'])return null;const _0x151ba9=_0x243f78['createContainerElement']('span'),_0x571f06=_0x243f78['createEmptyElement']('img');return _0x243f78['addClass']('image-inline',_0x151ba9),_0x243f78['insert'](_0x243f78['createPositionAt'](_0x151ba9,0x0),_0x571f06),_0x151ba9;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2ead42,{writer:_0x2ba58f,options:_0x34c59f})=>{if(_0x34c59f['showCommentHighlights'])return _0x2ba58f['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xb033ad,_0x4df1e7,_0x538efd)=>{_0x538efd['options']['showCommentHighlights']&&_0xb033ad['stop']();},{'priority':'high'});}}class r extends _0x383916{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(_0x3fcdd9){super(_0x3fcdd9),this['set']('isThreadsLoadingPaused',!0x0),_0x3fcdd9['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x358a51,_0x1040d,_0x18a47f,_0x27a133)=>{const _0x543b25=_0x3fcdd9['plugins']['get'](o),_0x1ff1c8=_0x18a47f?ft(_0x18a47f)['id']:null;_0x3fcdd9['model']['change'](()=>{if(_0x1ff1c8){const _0x8cf36a=this['getAllMarkersForId'](_0x1ff1c8);for(const _0x12de72 of _0x8cf36a)_0x3fcdd9['editing']['reconvertMarker'](_0x12de72);}if(_0x27a133){const {id:_0x544d70}=ft(_0x27a133),_0x2bc763=_0x543b25['getCommentThread'](_0x544d70);if(_0x2bc763&&_0x2bc763['unlinkedAt'])return;if(_0x2bc763&&!_0x2bc763['isAttached'])return;const _0x148a94=this['getAllMarkersForId'](_0x544d70);for(const _0x252f60 of _0x148a94)_0x3fcdd9['editing']['reconvertMarker'](_0x252f60);}}),_0x1ff1c8&&this['scrollToThreadMarker'](_0x1ff1c8);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x107926=this['editor'],_0x32fc28=_0x107926['plugins']['get'](o),_0x2d6a67=_0x107926['config']['get']('collaboration.channelId'),_0x1ac3d3=_0x32fc28['getCommentThreads']()['filter'](_0x35d0c8=>_0x35d0c8['channelId']!==_0x2d6a67);_0x107926['commands']['add']('addCommentThread',new ot(_0x107926)),this['listenTo'](_0x107926,'change:isReadOnly',(_0x2a91a5,_0x3c154e,_0x4ccf13)=>{_0x32fc28['switchReadOnly'](_0x4ccf13,_0x107926['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x32fc28,dt('addCommentThread',_0x2d6a67),(_0x8c4099,{threadId:_0x1bfd98})=>{const _0x3b0d0c=this['editor']['plugins']['get'](o)['getCommentThread'](_0x1bfd98);_0x3b0d0c?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1bfd98);}),this['listenTo'](_0x32fc28,dt('removeCommentThread',_0x2d6a67),(_0x12d345,{threadId:_0x10d76e})=>{_0x107926['model']['enqueueChange']({'isUndoable':!0x1},_0x262f54=>{const _0x42c582=this['getAllMarkersForId'](_0x10d76e);for(const _0x2e3a44 of _0x42c582)_0x262f54['removeMarker'](_0x2e3a44);});}),this['listenTo'](_0x32fc28,dt('resolveCommentThread',_0x2d6a67),(_0x473c7f,{threadId:_0x490e44})=>{(this['_reconvertMarkers'](_0x490e44),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x490e44)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x32fc28,dt('reopenCommentThread',_0x2d6a67),(_0x5cf78b,{threadId:_0x3727a0})=>{this['_reconvertMarkers'](_0x3727a0);},{'priority':'low'}),this['listenTo'](_0x32fc28,dt('addComment',_0x2d6a67),(_0x43a1c4,{threadId:_0xe70c8b,isFromAdapter:_0x32d949})=>{const _0x3779c9=this['getAllMarkersForId'](_0xe70c8b);if(_0x32d949||0x0==_0x3779c9['length']||!_0x32fc28['hasCommentThread'](_0xe70c8b))return;0x1===_0x32fc28['getCommentThread'](_0xe70c8b)['length']&&_0x107926['model']['enqueueChange']({'isUndoable':!0x1},_0x2cec11=>{for(const _0x12e132 of _0x3779c9)_0x2cec11['updateMarker'](_0x12e132,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1ac3d3);}['afterInit'](){!async function(_0x11ac65){const _0x39e8a8=_0x329883([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x54fad9=0x73460ab3,_0x415150=0x734180db^_0x54fad9,_0x4a60ec=window[_0x329883([0x44,0x61,0x74,0x65])][_0x329883([0x6e,0x6f,0x77])](),_0x29a304=_0x11ac65[_0x329883([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x415322=new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x218680=>{_0x29a304[_0x329883([0x6f,0x6e,0x63,0x65])](_0x329883([0x72,0x65,0x61,0x64,0x79]),_0x218680);}),_0x50c481={[_0x329883([0x6b,0x74,0x79])]:_0x329883([0x45,0x43]),[_0x329883([0x75,0x73,0x65])]:_0x329883([0x73,0x69,0x67]),[_0x329883([0x63,0x72,0x76])]:_0x329883([0x50,0x2d,0x32,0x35,0x36]),[_0x329883([0x78])]:_0x329883([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]),[_0x329883([0x79])]:_0x329883([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]),[_0x329883([0x61,0x6c,0x67])]:_0x329883([0x45,0x53,0x32,0x35,0x36])},_0x6f47c3=_0x29a304[_0x329883([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x329883([0x67,0x65,0x74])](_0x329883([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x254f58(){let _0x4b32ff,_0x476205=null,_0x2f9e72=null;try{if(_0x6f47c3==_0x329883([0x47,0x50,0x4c]))return _0x329883([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4b32ff=_0x145501(),!_0x4b32ff)return _0x329883([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4b32ff[_0x329883([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2f9e72=_0x279317(_0x4b32ff[_0x329883([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4b32ff[_0x329883([0x6a,0x74,0x69])])),await _0x3c0f76()?_0x51fdcf()?_0x10ecbc()?_0x329883([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x41d606()?(_0x4b32ff[_0x329883([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x329883([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x476205=_0x391f68(_0x329883([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x59afad()):_0x329883([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x329883([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x329883([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x329883([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x10ecbc(){const _0xacac09=[_0x329883([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x329883([0x74,0x72,0x69,0x61,0x6c])][_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b32ff[_0x329883([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4a60ec/0x3e8:0xe10*_0x415150;return _0x4b32ff[_0x329883([0x65,0x78,0x70])]<_0xacac09;}function _0x51fdcf(){const _0x3df47a=_0x4b32ff[_0x329883([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3df47a)return!0x1;if(_0x3df47a[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329883([0x2a])))return!0x0;if(_0x3df47a[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329883([0x43,0x4d,0x54])))return!0x0;if(_0x3df47a[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329883([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x8a60a3())return!0x0;if(_0x3df47a[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329883([0x52,0x43,0x4d,0x54]))){if(_0x7d59ed())return!0x0;if(_0x37f5ee()||_0x33b0a3())return!0x0;}return!0x1;}function _0x41d606(){const _0x1fe4a2=_0x4b32ff[_0x329883([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1fe4a2||0x0==_0x1fe4a2[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3a0dd4}=new URL(window[_0x329883([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1fe4a2[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a0dd4))return!0x0;const _0xce6396=_0x3a0dd4[_0x329883([0x73,0x70,0x6c,0x69,0x74])](_0x329883([0x2e]));return _0x1fe4a2[_0x329883([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d5740=>_0x2d5740[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329883([0x2a])))[_0x329883([0x6d,0x61,0x70])](_0x1de8aa=>_0x1de8aa[_0x329883([0x73,0x70,0x6c,0x69,0x74])](_0x329883([0x2e])))[_0x329883([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fc4cf=>_0x1fc4cf[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xce6396[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x329883([0x6d,0x61,0x70])](_0x26b707=>Array(_0xce6396[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x26b707[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x329883([0x66,0x69,0x6c,0x6c])](_0x26b707[0x0]===_0x329883([0x2a])?_0x329883([0x2a]):'')[_0x329883([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x26b707))[_0x329883([0x73,0x6f,0x6d,0x65])](_0x1ae5c1=>_0xce6396[_0x329883([0x65,0x76,0x65,0x72,0x79])]((_0x4e1c39,_0xc91fcf)=>_0x1ae5c1[_0xc91fcf]===_0x4e1c39||_0x1ae5c1[_0xc91fcf]===_0x329883([0x2a])));}function _0x59afad(){return _0x476205&&_0x2f9e72?new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x145572,_0x45e453)=>{_0x476205[_0x329883([0x74,0x68,0x65,0x6e])](_0x145572,_0x45e453),_0x2f9e72[_0x329883([0x74,0x68,0x65,0x6e])](_0x21721b=>{_0x21721b!=_0x329883([0x56,0x61,0x6c,0x69,0x64])&&_0x145572(_0x21721b);},_0x45e453);}):_0x476205||_0x2f9e72||_0x329883([0x56,0x61,0x6c,0x69,0x64]);}}function _0x279317(_0x14b057,_0x493aaf){return new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4663f4=>{if(_0x582a97())return _0x4663f4(_0x329883([0x56,0x61,0x6c,0x69,0x64]));_0x2ed734(),_0x29a304[_0x329883([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x329883([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2e8052=!0x1;const _0x454dfb=_0x5b65de();function _0xd521bd(_0x1ef75a){return!!_0x1ef75a&&(typeof _0x1ef75a===_0x329883([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1ef75a===_0x329883([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1ef75a[_0x329883([0x74,0x68,0x65,0x6e])]===_0x329883([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1ef75a[_0x329883([0x63,0x61,0x74,0x63,0x68])]===_0x329883([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3b4cd5(_0x13ca87){_0x1abe42(_0x13ca87)[_0x329883([0x74,0x68,0x65,0x6e])](_0x2c5a9d=>{if(!_0x2c5a9d||_0x2c5a9d[_0x329883([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x329883([0x6f,0x6b]))return _0x329883([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5a27fd(_0x4be1b8(_0x454dfb+_0x493aaf))!=_0x2c5a9d[_0x329883([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x329883([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x329883([0x56,0x61,0x6c,0x69,0x64]);})[_0x329883([0x74,0x68,0x65,0x6e])](_0x84ddff=>(_0xafaf95(),_0x84ddff),()=>{const _0x3a3940=_0x3af028();return null==_0x3a3940?(_0xafaf95(),_0x329883([0x56,0x61,0x6c,0x69,0x64])):_0x329883(_0x4a60ec-_0x3a3940>(0x574a8eb3^_0x54fad9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x329883([0x74,0x68,0x65,0x6e])](_0x4663f4)[_0x329883([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4663f4(_0x329883([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x11624a=0x7370e433^_0x54fad9;function _0xafaf95(){const _0x30446a=_0x329883([0x6c,0x6c,0x63,0x74,0x2d])+_0x5a27fd(_0x4be1b8(_0x14b057)),_0x2910d5=_0x296a0a(_0x5a27fd(window[_0x329883([0x4d,0x61,0x74,0x68])][_0x329883([0x63,0x65,0x69,0x6c])](_0x4a60ec/_0x11624a)));window[_0x329883([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x329883([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30446a,_0x2910d5);}function _0x3af028(){const _0x2fb1ea=_0x329883([0x6c,0x6c,0x63,0x74,0x2d])+_0x5a27fd(_0x4be1b8(_0x14b057)),_0x3899db=window[_0x329883([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x329883([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2fb1ea);return _0x3899db?window[_0x329883([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x296a0a(_0x3899db),0x10)*_0x11624a:null;}function _0x1abe42(_0x208152){return new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x220520,_0x5a363f)=>{_0x208152[_0x329883([0x74,0x68,0x65,0x6e])](_0x220520,_0x5a363f),window[_0x329883([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5a363f,0x7347de73^_0x54fad9);});}}_0x29a304[_0x329883([0x6f,0x6e])](_0x329883([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xc02643,_0x4cdca2)=>{if(_0x4cdca2[0x0]!=_0x14b057)return _0x4663f4(_0x329883([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4cdca2[0x1]={..._0x4cdca2[0x1],[_0x329883([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x454dfb};},{[_0x329883([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x329883([0x68,0x69,0x67,0x68])}),_0x29a304[_0x329883([0x6f,0x6e])](_0x329883([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4cef1e=>{_0xd521bd(_0x4cef1e[_0x329883([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2e8052=!0x0,_0x3b4cd5(_0x4cef1e[_0x329883([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x329883([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x329883([0x6c,0x6f,0x77])}),_0x415322[_0x329883([0x74,0x68,0x65,0x6e])](()=>{_0x2e8052||_0x4663f4(_0x329883([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x582a97(){return _0x29a304[_0x329883([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x329883([0x76,0x69,0x65,0x77])][_0x329883([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x329883([0x61,0x75,0x74,0x6f]);}function _0x2ed734(){_0x29a304[_0x329883([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x329883([0x76,0x69,0x65,0x77])][_0x329883([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x329883([0x61,0x75,0x74,0x6f]);}}function _0x391f68(_0x5b59a4){const _0x1d2dcd=[new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16c67b=>setTimeout(_0x16c67b,0x734f347f^_0x54fad9)),_0x415322[_0x329883([0x74,0x68,0x65,0x6e])](()=>new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16fa68=>{let _0x1f0d8e=0x0;_0x29a304[_0x329883([0x6d,0x6f,0x64,0x65,0x6c])][_0x329883([0x6f,0x6e])](_0x329883([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1823d3,_0x569ba5)=>{_0x569ba5[0x0][_0x329883([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1f0d8e++,_0x1f0d8e==(0x73460f5b^_0x54fad9)&&(_0x16fa68(),_0x1823d3[_0x329883([0x6f,0x66,0x66])]());});}))];return window[_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x329883([0x72,0x61,0x63,0x65])](_0x1d2dcd)[_0x329883([0x74,0x68,0x65,0x6e])](()=>_0x5b59a4);}async function _0x42808f(){await _0x415322,_0x29a304[_0x329883([0x6d,0x6f,0x64,0x65,0x6c])][_0x329883([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x40b160,_0x29a304[_0x329883([0x6d,0x6f,0x64,0x65,0x6c])][_0x329883([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x40b160,_0x29a304[_0x329883([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x329883([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x8a60a3(){return window[_0x329883([0x67,0x6c,0x6f,0x62])]&&window[_0x329883([0x67,0x6c,0x6f,0x62])][_0x329883([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x7d59ed(){return _0x4e52d6(_0x329883([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x32d38b(_0x329883([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x329883([0x73,0x74,0x61,0x74,0x65])]==_0x329883([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x37f5ee(){return _0x4e52d6(_0x329883([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 _0x33b0a3(){return _0x4e52d6(_0x329883([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x47ea84(_0x386174){const _0x26d461=_0x1b7be6();_0x29a304[_0x26d461]=_0x329883([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x386174,_0x386174!=_0x329883([0x56,0x61,0x6c,0x69,0x64])&&_0x42808f();}function _0x1b7be6(){const _0x1914f9=window[_0x329883([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x329883([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x329883([0x6e,0x6f,0x77])]())[_0x329883([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x329883([0x2e]),'');let _0x365e60=_0x329883([0x4b]);for(let _0x4680bb=0x0;_0x4680bb<_0x1914f9[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4680bb+=0x2){let _0x978470=window[_0x329883([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1914f9[_0x329883([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4680bb,_0x4680bb+0x2));_0x978470>=_0x39e8a8[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x978470-=_0x39e8a8[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x365e60+=_0x39e8a8[_0x978470];}return _0x365e60;}function _0x145501(){const _0x2e3f5b=_0x6f47c3[_0x329883([0x73,0x70,0x6c,0x69,0x74])](_0x329883([0x2e]));if(0x3!=_0x2e3f5b[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3a2717(_0x2e3f5b[0x1]);function _0x3a2717(_0x5c2835){const _0x27f0c7=_0x403119(_0x5c2835);return _0x27f0c7&&_0x29e48c()?_0x27f0c7:null;function _0x29e48c(){const _0xfce925=_0x27f0c7[_0x329883([0x6a,0x74,0x69])],_0x2dcb07=window[_0x329883([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xfce925[_0x329883([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xfce925[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2199af={..._0x27f0c7,[_0x329883([0x6a,0x74,0x69])]:_0xfce925[_0x329883([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xfce925[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2199af[_0x329883([0x76,0x63])],_0x4be1b8(_0x2199af)==_0x2dcb07;}}}async function _0x3c0f76(){let _0x226b04=!0x0;try{const _0x14a757=_0x6f47c3[_0x329883([0x73,0x70,0x6c,0x69,0x74])](_0x329883([0x2e])),[_0x561da6,_0x58faef,_0x222ea8]=_0x14a757;return _0x2c2671(_0x561da6),await _0x404650(_0x561da6,_0x58faef,_0x222ea8),_0x226b04;}catch{return!0x1;}function _0x2c2671(_0x4f6d29){const _0x533404=_0x403119(_0x4f6d29);_0x533404&&_0x533404[_0x329883([0x61,0x6c,0x67])]==_0x329883([0x45,0x53,0x32,0x35,0x36])||(_0x226b04=!0x1);}async function _0x404650(_0x5d0e05,_0x574170,_0x5061d2){const _0x5b4a7f=window[_0x329883([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x329883([0x66,0x72,0x6f,0x6d])](_0x425d31(_0x5061d2),_0x24d767=>_0x24d767[_0x329883([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x550950=new window[(_0x329883([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x329883([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5d0e05+_0x329883([0x2e])+_0x574170),_0x4cee1a=window[_0x329883([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x329883([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4cee1a)return;const _0x1044af=await _0x4cee1a[_0x329883([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x329883([0x6a,0x77,0x6b]),_0x50c481,{[_0x329883([0x6e,0x61,0x6d,0x65])]:_0x329883([0x45,0x43,0x44,0x53,0x41]),[_0x329883([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x329883([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x329883([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4cee1a[_0x329883([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x329883([0x6e,0x61,0x6d,0x65])]:_0x329883([0x45,0x43,0x44,0x53,0x41]),[_0x329883([0x68,0x61,0x73,0x68])]:{[_0x329883([0x6e,0x61,0x6d,0x65])]:_0x329883([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1044af,_0x5b4a7f,_0x550950)||(_0x226b04=!0x1);}}function _0x403119(_0x4b81a1){return _0x4b81a1[_0x329883([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x329883([0x65,0x79]))?JSON[_0x329883([0x70,0x61,0x72,0x73,0x65])](_0x425d31(_0x4b81a1)):null;}function _0x425d31(_0x22641e){return window[_0x329883([0x61,0x74,0x6f,0x62])](_0x22641e[_0x329883([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x329883([0x2b]))[_0x329883([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x329883([0x2f])));}function _0x4be1b8(_0x186dd9){let _0x236143=0x1505;function _0x526930(_0x3ed0c5){for(let _0x395ba0=0x0;_0x395ba0<_0x3ed0c5[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x395ba0++){const _0x19b266=_0x3ed0c5[_0x329883([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x395ba0);_0x236143=(_0x236143<<0x5)+_0x236143+_0x19b266,_0x236143&=_0x236143;}}function _0x467113(_0x543b5b){Array[_0x329883([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x543b5b)?_0x543b5b[_0x329883([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x467113):_0x543b5b&&typeof _0x543b5b==_0x329883([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x329883([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x543b5b)[_0x329883([0x73,0x6f,0x72,0x74])]()[_0x329883([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x29cd1e,_0xa12fb6])=>{_0x526930(_0x29cd1e),_0x467113(_0xa12fb6);}):_0x526930(window[_0x329883([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x543b5b));}return _0x467113(_0x186dd9),_0x236143>>>0x0;}function _0x5a27fd(_0x4dd8a6){return _0x4dd8a6[_0x329883([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x329883([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x329883([0x30]));}function _0x296a0a(_0x57ffeb){return _0x57ffeb[_0x329883([0x73,0x70,0x6c,0x69,0x74])]('')[_0x329883([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x329883([0x6a,0x6f,0x69,0x6e])]('');}function _0x4e52d6(_0x4a871c){return _0x29a304[_0x329883([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x329883([0x68,0x61,0x73])](_0x4a871c);}function _0x32d38b(_0x5f4f8e){return _0x29a304[_0x329883([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x329883([0x67,0x65,0x74])](_0x5f4f8e);}function _0x40b160(){}function _0x329883(_0x4c9636){return _0x4c9636['map'](_0x5d3725=>String['fromCharCode'](_0x5d3725))['join']('');}_0x47ea84(await _0x254f58());}(this);}['destroy'](){const _0x34a50f=this['editor']['plugins']['get'](o),_0xcd9d1c=this['editor']['config']['get']('collaboration.channelId');for(const _0x24bd58 of _0x34a50f['getCommentThreads']({'channelId':_0xcd9d1c}))_0x34a50f['_detachCommentThread'](_0x24bd58['id']),_0x34a50f['_threads']['delete'](_0x24bd58['id']);super['destroy']();}['hasMarkerForId'](_0x24b79d){return this['getAllMarkersForId'](_0x24b79d)['length']>0x0;}['getAllMarkersForId'](_0xe746ec){const _0x22a107=[];for(const _0x4635e9 of this['editor']['model']['markers'])_0x4635e9['name']['startsWith']('comment:'+_0xe746ec)&&_0x22a107['push'](_0x4635e9);return _0x22a107;}['scrollToThreadMarker'](_0x3fdab4){setTimeout(()=>{const _0x32553f=this['_getTargetForId'](_0x3fdab4);if(!_0x32553f)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x3fdab4&&nt({'target':_0x32553f[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3369b8){this['editor']['model']['change'](()=>{for(const _0x7c9987 of this['getAllMarkersForId'](_0x3369b8))this['editor']['editing']['reconvertMarker'](_0x7c9987);});}['_attachArchivedThread'](_0x396c95){const _0x23aaf4=this['editor']['plugins']['get'](o),_0x588c68=this['editor']['plugins']['get'](b),_0x3af373=_0x23aaf4['getCommentThread'](_0x396c95);if(!_0x3af373['isAttached']){const _0x2befc7=_0x3af373['attachTo'](()=>this['_getTargetForId'](_0x3af373['id']));_0x588c68['registerAnnotation'](_0x2befc7),_0x3af373['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4b7885=this['editor'],_0x276fc1=_0x4b7885['plugins']['get'](it);_0x4b7885['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5c9310,_0x4b30a9)=>{const {id:_0x174115}=ft(_0x5c9310['markerName']),_0x32affb=_0x4b7885['plugins']['get'](o)['getCommentThread'](_0x174115),_0x81e728=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x174115;let _0x27732b;if(_0x32affb&&_0x32affb['isResolved']&&!_0x81e728&&_0x5c9310['item'])return _0x4b30a9['consumable']['consume'](_0x5c9310['item'],'addMarker:'+_0x5c9310['markerName']),_0x4b30a9['consumable']['consume'](_0x5c9310['item'],'removeMarker:'+_0x5c9310['markerName']),null;const _0x123852=['ck-comment-marker'];return _0x81e728&&_0x123852['push']('ck-comment-marker--active'),_0x27732b=_0x32affb?.['length']?_0x32affb['comments']['first']['author']['id']:_0x276fc1['me']['id'],{'classes':_0x123852,'attributes':{'data-comment':_0x174115,'data-author-id':_0x27732b}};}}),_0x4b7885['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x18657b,{options:_0x310f95})=>{if(_0x310f95['showCommentHighlights'])return null;const _0x2f343d=_0x4b7885['plugins']['get'](o),_0x40c2e0=_0x4b7885['model']['markers']['get'](_0x18657b),{id:_0x1fc206,part:_0x55def5}=ft(_0x18657b);return _0x40c2e0&&!_0x40c2e0['affectsData']||_0x310f95['ignoreResolvedComments']&&_0x2f343d['getCommentThread'](_0x1fc206)?.['isResolved']?null:{'group':'comment','name':_0x55def5?_0x1fc206+':'+_0x55def5:_0x1fc206};}}),_0x4b7885['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1bb2c2,{writer:_0x315686})=>_0x315686['createElement']('$marker',{'data-name':'comment:'+_0x1bb2c2['getAttribute']('id')})}),_0x4b7885['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1125e8=this['editor'],_0x1fc39b=_0x1125e8['plugins']['get'](o),_0x55d754=new Set(),_0x3d8c02=new Set();_0x1125e8['model']['document']['registerPostFixer'](_0x8ef6bf=>{let _0x4bd550=!0x1;for(const {name:_0x309a38,data:_0x362c0e}of _0x1125e8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4e684d,id:_0x3bcaf7}=ft(_0x309a38);let _0x1a0c30=_0x362c0e['newRange'];if('comment'!==_0x4e684d||!_0x1a0c30)continue;const _0x5320fd='$graveyard'===_0x1a0c30['root']['rootName'];_0x5320fd||(_0x1a0c30=ht(_0x1a0c30,_0x1125e8['model']),!_0x1a0c30||_0x1a0c30['isCollapsed']||!_0x362c0e['newRange']||_0x1a0c30['isEqual'](_0x362c0e['newRange']))?_0x1125e8['model']['hasContent'](_0x1a0c30)&&!_0x5320fd?this['isThreadsLoadingPaused']?_0x55d754['add'](_0x309a38):this['_handleThreadMarker'](_0x309a38,_0x3bcaf7):(_0x3d8c02['add'](_0x309a38),_0x55d754['delete'](_0x309a38),_0x8ef6bf['removeMarker'](_0x309a38),_0x4bd550=!0x0):(_0x8ef6bf['updateMarker'](_0x309a38,{'range':_0x1a0c30}),_0x4bd550=!0x0);}return _0x4bd550;}),this['on']('change:isThreadsLoadingPaused',(_0x3e10c0,_0x141c23,_0x31b7f7)=>{if(!_0x31b7f7&&_0x55d754['size'])for(const _0xe8a4b1 of _0x55d754){const {id:_0x4a2456}=ft(_0xe8a4b1);_0x55d754['delete'](_0xe8a4b1),_0x1125e8['model']['markers']['get'](_0xe8a4b1)&&this['_handleThreadMarker'](_0xe8a4b1,_0x4a2456);}}),this['listenTo'](_0x1125e8['model']['document'],'change',()=>{for(const {name:_0x3ef3ee,data:{newRange:_0x430983}}of _0x1125e8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x21ec81,id:_0xf123b6}=ft(_0x3ef3ee);if('comment'!==_0x21ec81)continue;const _0x94d7af=_0x1fc39b['getCommentThread'](_0xf123b6),_0x54546d=this['hasMarkerForId'](_0xf123b6);_0x94d7af&&(!_0x94d7af['_hasTargetInContent']&&_0x430983&&_0x1125e8['editing']['view']['once']('render',()=>{const _0x18b1df=_0x1125e8['plugins']['get'](y),_0x509f63=_0x1fc39b['_threadToController']['get'](_0x94d7af)['view'];_0x18b1df['getByInnerView'](_0x509f63)['refreshVisibility']();},{'priority':'low'}),_0x94d7af['_hasTargetInContent']=_0x54546d||!!_0x430983),_0x430983||(_0x3d8c02['add'](_0x3ef3ee),_0x55d754['delete'](_0x3ef3ee));}for(const _0x31f179 of _0x3d8c02){const {id:_0x2b0743}=ft(_0x31f179),_0x25ac86=_0x1fc39b['getCommentThread'](_0x2b0743);if(_0x55d754['delete'](_0x31f179),!_0x25ac86)continue;const _0xfc4598=this['hasMarkerForId'](_0x2b0743);_0xfc4598||_0x25ac86['isSubmitted']?_0xfc4598||_0x25ac86['unlinkedAt']||_0x25ac86['setUnlinkedAt'](new Date()):_0x25ac86['remove']();}_0x3d8c02['clear']();});}['_handleInitialThreads'](_0x11bec0){_0x11bec0['forEach'](_0x16cdd9=>{_0x16cdd9['unlinkedAt']&&this['_attachArchivedThread'](_0x16cdd9['id']);});}['_getTargetForId'](_0xfa32cd){const _0x306bf4=this['editor'],_0x55754f=this['getAllMarkersForId'](_0xfa32cd);return et(_0x306bf4['editing'],_0x55754f);}['_getTextContext'](_0x2b4bf8){const _0x212690=this['getAllMarkersForId'](_0x2b4bf8);let _0x14cafc='',_0x525ecb=!0x1;for(const _0x3daa8d of _0x212690){const _0x4bfddc=_0x3daa8d['getRange']();for(const _0x4685c8 of Array['from'](_0x4bfddc['getItems']()))_0x4685c8['is']('$textProxy')?(_0x14cafc&&_0x525ecb&&(_0x14cafc+='\x20',_0x525ecb=!0x1),_0x14cafc+=_0x4685c8['data']):_0x525ecb=!0x0;_0x525ecb=!0x0;}return _0x14cafc['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x173812,_0x1f3679){const _0x57ab6a=this['editor'],_0x5ad1fe=_0x57ab6a['plugins']['get'](o);let _0x40b88c=_0x5ad1fe['getCommentThread'](_0x1f3679);const _0x4d26e7=_0x57ab6a['config']['get']('collaboration.channelId'),_0x38fade=_0x57ab6a['plugins']['get'](b);if(_0x40b88c&&(_0x40b88c['unlinkedAt']&&_0x40b88c['setUnlinkedAt'](null),_0x40b88c['isAttached']))return _0x40b88c;return!this['getAllMarkersForId'](_0x1f3679)[0x0]['managedUsingOperations']?_0x57ab6a['editing']['view']['once']('render',()=>{if(_0x5ad1fe['getCommentThread'](_0x1f3679))return;const _0x173d9c=_0x57ab6a['plugins']['get'](y);_0x40b88c=_0x5ad1fe['openNewCommentThread']({'channelId':_0x4d26e7,'threadId':_0x1f3679,'target':()=>this['_getTargetForId'](_0x1f3679),'context':{'type':'text','value':this['_getTextContext'](_0x1f3679)}});const _0x3d549c=_0x5ad1fe['_threadToController']['get'](_0x40b88c)['view'],_0x1faaa8=_0x173d9c['getByInnerView'](_0x3d549c);_0x1faaa8&&_0x38fade['registerAnnotation'](_0x1faaa8);},{'priority':'low'}):_0x5ad1fe['fetchCommentThread']({'channelId':_0x4d26e7,'threadId':_0x1f3679})['then'](_0x8b8d8d=>{if('destroyed'!==_0x57ab6a['state']){if(_0x40b88c=_0x8b8d8d,_0x40b88c&&!_0x40b88c['isAttached']){const _0x572f0a=_0x40b88c['attachTo'](()=>this['_getTargetForId'](_0x1f3679));_0x38fade['registerAnnotation'](_0x572f0a),_0x40b88c['isResolved']&&this['_reconvertMarkers'](_0x1f3679);}else{if(!_0x40b88c){const _0x51de64=this['getAllMarkersForId'](_0x1f3679);_0x57ab6a['model']['change'](_0x44d6a3=>{for(const _0x341696 of _0x51de64)_0x44d6a3['removeMarker'](_0x341696);});}}}}),_0x40b88c;}['_handleThreadMarker'](_0x2240d8,_0xa21216){const _0x15280c=this['_attachMarkerToThread'](_0x2240d8,_0xa21216);_0x15280c&&!_0x15280c['context']&&_0x15280c['setContext']({'type':'text','value':this['_getTextContext'](_0xa21216)});}['_initAriaMarkerChangeAnnouncements'](){const _0x525197=this['editor'];rt(_0x525197['model'],({left:_0x38ba89,entered:_0x1cd767})=>{for(const _0x32b608 of _0x38ba89)if(mt(_0x32b608)){_0x525197['ui']['ariaLiveAnnouncer']['announce'](N(_0x525197['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4e854c of _0x1cd767)if(mt(_0x4e854c)){_0x525197['ui']['ariaLiveAnnouncer']['announce'](N(_0x525197['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x577a1a)));break;}});}}function dt(_0x33ed2e,_0x3a598d){return _0x3a598d?_0x33ed2e+':'+_0x3a598d:_0x33ed2e;}function ht(_0x26f77a,_0x40ec4a){const _0x56fbb2=_0x40ec4a['schema'],_0x55998f=_0x40ec4a['createRange'](_0x26f77a['start']);for(const _0x5f4d61 of _0x26f77a['getWalker']()){const {type:_0x1b61f9,item:_0x5f4720,nextPosition:_0x4c4533}=_0x5f4d61;if('text'===_0x1b61f9||_0x56fbb2['isObject'](_0x5f4720)){const _0x5b67d3=_0x40ec4a['createPositionBefore'](_0x5f4720);_0x55998f['isCollapsed']&&(_0x55998f['start']=_0x5b67d3),_0x55998f['end']=_0x4c4533;}}return _0x55998f;}function mt(_0x5deda2){return'comment'===ft(_0x5deda2['name'])['group'];}class s extends _0x383916{['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 _0x597da7=this['editor'],_0x272b36=_0x597da7['plugins']['get'](o),_0x35d64a=_0x597da7['plugins']['get'](r),_0x37fd7f=_0x597da7['plugins']['get'](y),_0x29d858=_0x597da7['plugins']['get'](b);_0x597da7['ui']['componentFactory']['add']('comment',()=>{const _0x28c7e4=this['_createUIButton'](_0x6603e9);return _0x28c7e4['tooltip']=!0x0,_0x28c7e4;}),_0x597da7['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x59d316)),_0x29d858['addSourceCollector'](()=>{const _0x41a8b9=[];for(const [_0x32b6c5,_0x468df4]of _0x272b36['_threadToController']){const _0x1e4c36=_0x35d64a['getAllMarkersForId'](_0x32b6c5['id']),_0x3a5890=_0x1e4c36['map'](_0x5668af=>_0x5668af['getRange']());_0x1e4c36['length']>0x0&&_0x41a8b9['push']([_0x468df4['view'],_0x3a5890]);}return _0x41a8b9;}),this['listenTo'](_0x37fd7f,'change:activeAnnotations',(_0x375664,_0x3fbf49,_0x171a81)=>{const _0x1c1efd=Array['from'](_0x171a81)['map'](_0x483697=>_0x483697['innerView'])['find'](_0x4166d3=>_0x272b36['_viewToController']['has'](_0x4166d3));if(!_0x1c1efd)return void(_0x35d64a['activeMarker']=null);const _0x2c3ceb=_0x272b36['_viewToController']['get'](_0x1c1efd)['model']['id'],_0x5e5248='comment:'+_0x2c3ceb;_0x2c3ceb&&_0x35d64a['hasMarkerForId'](_0x2c3ceb)?_0x35d64a['activeMarker']=_0x5e5248:_0x35d64a['activeMarker']&&(_0x35d64a['activeMarker']=null);}),this['listenTo'](_0x272b36,'removeCommentThread',(_0x49da52,{threadId:_0x2bbe25,isFromAdapter:_0x4ac8b0})=>{!_0x4ac8b0&&_0x597da7['ui']['focusTracker']['isFocused']&&_0x35d64a['hasMarkerForId'](_0x2bbe25)&&_0x597da7['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x272b36,'addComment',(_0x5b99f9,{threadId:_0x2f85da,isFromAdapter:_0x9716c3})=>{if(_0x9716c3||!_0x35d64a['hasMarkerForId'](_0x2f85da)||!_0x272b36['hasCommentThread'](_0x2f85da))return;0x1===_0x272b36['getCommentThread'](_0x2f85da)['length']&&(_0x597da7['editing']['view']['focus'](),_0x5b99f9['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x13c6ad=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1580e7;for(const _0x1e4e24 in _0x13c6ad){const _0xe207b6=_0x1e4e24,_0x194480=_0x13c6ad[_0xe207b6];if('commentsLicenseKeyValid'==_0x194480||'commentsLicenseKeyInvalid'==_0x194480||'commentsLicenseKeyExpired'==_0x194480||'commentsLicenseKeyDomainLimit'==_0x194480||'commentsLicenseKeyNotAllowed'==_0x194480||'commentsLicenseKeyEvaluationLimit'==_0x194480||'commentsLicenseKeyUsageLimit'==_0x194480){delete _0x13c6ad[_0xe207b6],_0x1580e7=_0x194480,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1580e7&&_0x13c6ad['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1580e7&&_0x13c6ad['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1580e7&&_0x13c6ad['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1580e7&&_0x13c6ad['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1580e7&&_0x13c6ad['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1580e7&&_0x13c6ad['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1f995d){const _0x3bc923=this['editor'],_0x5a23fd=new _0x1f995d(_0x3bc923['locale']),_0x26ed0c=_0x3bc923['commands']['get']('addCommentThread');return _0x5a23fd['set']({'label':N(_0x3bc923['locale'],'Comment'),'icon':_0x422358}),_0x5a23fd['bind']('isEnabled')['to'](_0x26ed0c,'isEnabled',_0x26ed0c,'hasContent',(_0xb2b98b,_0x1baeca)=>_0xb2b98b&&_0x1baeca),this['listenTo'](_0x5a23fd,'execute',()=>{_0x26ed0c['execute']();}),_0x5a23fd;}}class i extends _0x383916{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5c3ab0){super(_0x5c3ab0),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3129c3,_0x20c98f,_0x47ce95)=>{_0x47ce95?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1fb5c4,_0x2a6bda]of this['editor']['commands'])_0x2a6bda['affectsData']&&'addCommentThread'!==_0x1fb5c4&&_0x2a6bda['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x3418a3=this['editor']['editing']['view']['document'];this['listenTo'](_0x3418a3,'cut',_0x25d02c=>_0x25d02c['stop'](),{'priority':'highest'}),this['listenTo'](_0x3418a3,'clipboardInput',_0x392715=>_0x392715['stop'](),{'priority':'highest'}),this['listenTo'](_0x3418a3,'delete',_0x56345f=>_0x56345f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x43b0b7,_0x5cda97]of this['editor']['commands'])_0x5cda97['affectsData']&&'addCommentThread'!==_0x43b0b7&&_0x5cda97['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x6308a6{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a3afb){super(_0x2a3afb),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0xa64d6a=this['context']['plugins']['get'](y);this['listenTo'](_0xa64d6a,'_activateAnnotation',(_0x4fefb8,_0x1dd7a1)=>{for(const _0x574353 of this['activeUIs']){const _0x59a925=this['_uis']['get'](_0x574353);(0x0,this['uisData']['get'](_0x574353)['filter'])(_0x1dd7a1)&&_0x59a925['setActiveAnnotation'](_0x1dd7a1);}}),this['listenTo'](_0xa64d6a,'_deactivateAllAnnotations',()=>{for(const _0x5af583 of this['activeUIs']){this['_uis']['get'](_0x5af583)['setActiveAnnotation'](null);}}),this['listenTo'](_0xa64d6a['_visibleAnnotations'],'add',(_0x8f93db,_0x4e14d8)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4e14d8);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5a9426){return this['activeUIs']['has'](_0x5a9426);}['activate'](_0x3ddda0,_0x5449a0=this['defaultFilter']){const _0x5cd1b1=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3ddda0))throw new _0x37011e('annotationsuis-missing-ui',this,{'uiName':_0x3ddda0});this['isActive'](_0x3ddda0)&&this['deactivate'](_0x3ddda0),this['activeUIs']['add'](_0x3ddda0);const _0x5b6ff9=new S();v({'source':_0x5cd1b1['_visibleAnnotations'],'target':_0x5b6ff9,'filter':_0x5449a0}),this['uisData']['set'](_0x3ddda0,{'collection':_0x5b6ff9,'filter':_0x5449a0});const _0x505ea4=this['_uis']['get'](_0x3ddda0);_0x505ea4['attach'](_0x5b6ff9),this['listenTo'](_0x505ea4,'change:activeAnnotation',(_0x20ffaf,_0x4abf08,_0x5ca29b,_0x5d590f)=>{_0x5d590f&&_0x5cd1b1['_removeActiveAnnotation'](_0x5d590f),_0x5ca29b&&_0x5cd1b1['_addActiveAnnotation'](_0x5ca29b);});}['deactivate'](_0x2cfd3a){if(this['activeUIs']['delete'](_0x2cfd3a),!this['_uis']['has'](_0x2cfd3a))throw new _0x37011e('annotationsuis-missing-ui',this,{'uiName':_0x2cfd3a});const _0x3b1dd5=this['_uis']['get'](_0x2cfd3a);_0x3b1dd5['detach'](),this['stopListening'](_0x3b1dd5),this['uisData']['get'](_0x2cfd3a)['collection']['destroy'](),this['uisData']['delete'](_0x2cfd3a);}['switchTo'](_0x4e820a){if(!this['_uis']['has'](_0x4e820a))throw new _0x37011e('annotationsuis-missing-ui',this,{'uiName':_0x4e820a});const _0x114a62=this['context']['plugins']['get'](y),_0x2ed54b=Array['from'](_0x114a62['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4e820a);const _0x46fb15=this['_uis']['get'](_0x4e820a);_0x46fb15['setActiveAnnotation'](_0x2ed54b),_0x46fb15['_setSelectedAnnotations']&&_0x2ed54b&&_0x46fb15['_setSelectedAnnotations']([_0x2ed54b]);}['deactivateAll'](){for(const _0xd6e96e of this['activeUIs'])this['deactivate'](_0xd6e96e);}['register'](_0x4ea8eb,_0x4a1de2){if(this['_uis']['has'](_0x4ea8eb))throw new _0x37011e('annotationsuis-register-already-registered');if('function'!=typeof _0x4a1de2['attach']||'function'!=typeof _0x4a1de2['detach']||'function'!=typeof _0x4a1de2['setActiveAnnotation'])throw new _0x37011e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4ea8eb,_0x4a1de2);}['refilterAnnotations'](){const _0x39a984=this['context']['plugins']['get'](y)['collection'],_0x1780de=new Map(),_0xdeada3=Array['from'](this['activeUIs']);for(const _0x5c7019 of this['activeUIs']){const _0x3bd524=this['uisData']['get'](_0x5c7019)['collection'];for(const _0x13e85b of _0x3bd524)_0x1780de['set'](_0x13e85b,_0x5c7019);}for(const _0x1eb535 of _0x39a984){const _0x2127ce=_0x1780de['get'](_0x1eb535);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1eb535);const _0x1c7b0a=_0xdeada3['find'](_0x59382b=>this['uisData']['get'](_0x59382b)['filter'](_0x1eb535));_0x2127ce!==_0x1c7b0a&&(_0x2127ce&&this['uisData']['get'](_0x2127ce)['collection']['remove'](_0x1eb535),_0x1c7b0a&&this['uisData']['get'](_0x1c7b0a)['collection']['add'](_0x1eb535));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1677ae){const _0x1261c0=[];for(const _0x3324b2 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3324b2)['filter'])(_0x1677ae)&&_0x1261c0['push'](_0x3324b2);}if(_0x1261c0['length']>0x1)throw new _0x37011e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1261c0,'annotationType':_0x1677ae['type']});}}const he=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x298527){super(_0x298527);const _0x1aceb7=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 _0xf55ae0(),this['focusCycler']=new _0x3f1de7({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x1aceb7['to']('class')],'style':{'minHeight':_0x1aceb7['to']('minHeight',_0x5b9d0f=>'number'==typeof _0x5b9d0f?he(_0x5b9d0f+0xa):null)},'dir':_0x298527['uiLanguageDirection'],'role':'application','aria-label':N(_0x298527,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x298527,'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',_0x883d49=>{this['_updateItemPositionInFocusables'](_0x883d49['source']);}),this['list']['forEach'](_0x54c1a2=>{this['focusTracker']['add'](_0x54c1a2['element']),this['_updateItemPositionInFocusables'](_0x54c1a2);}),this['list']['on']('change',(_0x834d80,_0x2993bc)=>{for(const _0x1fd332 of _0x2993bc['removed'])this['focusTracker']['remove'](_0x1fd332['element']),this['focusables']['remove'](_0x1fd332);for(const _0x1d02ed of _0x2993bc['added'])this['focusTracker']['add'](_0x1d02ed['element']),this['_updateItemPositionInFocusables'](_0x1d02ed);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2dbc36){const _0x214198=this['focusables']['getIndex'](_0x2dbc36);let _0x3eaf52,_0x212f83;for(const _0x4165a0 of this['focusables'])if(_0x2dbc36['top']<_0x4165a0['top']){_0x3eaf52=_0x4165a0;break;}if(_0x212f83=_0x3eaf52?this['focusables']['getIndex'](_0x3eaf52):this['focusables']['length'],-0x1!==_0x214198){if(_0x214198===_0x212f83-0x1)return;this['focusables']['remove'](_0x2dbc36),_0x212f83=_0x3eaf52?this['focusables']['getIndex'](_0x3eaf52):this['focusables']['length'];}this['focusables']['add'](_0x2dbc36,_0x212f83);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x485a66){super(_0x485a66),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2d5646,_0x3ff845)=>_0x2d5646+_0x3ff845),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x315254=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x315254['to']('isAnimationDisabled',_0x4d3f9e=>_0x4d3f9e?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x315254['to']('top',_0xb59ce4=>Ot(_0xb59ce4))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3e0deb=this['element']['clientHeight'];_0x3e0deb&&(this['height']=_0x3e0deb);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x6308a6{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22ed93){super(_0x22ed93),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 _0x468154=this['context']['config']['get']('sidebar.container');_0x468154&&this['setContainer'](_0x468154);}['setContainer'](_0x5c86d8){if(!g(_0x5c86d8))throw new _0x37011e('sidebar-setcontainer-invalid-element');this['container']=_0x5c86d8;}['_attachToContainer']({viewClass:_0x4d6df7='',spaceBetweenItems:_0x5ac4e1=0x19}={}){if(!g(this['container']))throw new _0x37011e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4d6df7,this['_spaceBetweenItems']=_0x5ac4e1;}['rearrange']({removedAnnotation:_0xcd1369,previousAnnotation:_0x5c98ad,nextAnnotation:_0xe8d636}){const _0x90faad=this['getSidebarItemView'](_0xcd1369);this['view']['list']['remove'](_0x90faad),this['_destroySidebarItemView'](_0xcd1369),_0x5c98ad&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5c98ad)),_0xe8d636&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xe8d636)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xeef050,activatedAnnotation:_0xb3d3ba,disableAnimationOnActivatedAnnotation:_0x4fc044}){if(this['_activeAnnotation']=_0xb3d3ba,_0xeef050){_0xeef050['isActive']=!0x1;const _0x2dc31e=this['getSidebarItemView'](_0xeef050);_0x2dc31e&&_0x4fc044&&(_0x2dc31e['isAnimationDisabled']=!0x1);}if(_0xb3d3ba){const _0x2d3fda=this['getSidebarItemView'](_0xb3d3ba);_0x2d3fda&&(_0xb3d3ba['isActive']=!0x0,_0x4fc044&&(_0x2d3fda['isAnimationDisabled']=!0x0,_0x2d3fda['top']+=0x1),this['_alignToTargetRect'](_0x2d3fda));}}['_detachFromContainer'](_0x58b493){if(this['view']['element']['remove'](),_0x58b493){for(const _0x3f9538 of _0x58b493)this['_destroySidebarItemView'](_0x3f9538);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x580e5e,_0x4af986){_0x4af986||(_0x4af986=_0x580e5e['view']);const _0x417270=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x417270,_0x580e5e),this['_annotationToSidebarItemView']['set'](_0x580e5e,_0x417270),_0x417270['content']['add'](_0x4af986),this['listenTo'](_0x580e5e['view'],'change:targetRect',(_0x38a9ad,_0x3c34fa,_0x4fc745)=>{const _0x5e6467=this['_getTargetTop'](_0x580e5e,_0x4fc745);_0x417270['_targetTop']!=_0x5e6467&&(_0x417270['_targetTop']=_0x5e6467,this['_setItemTop'](_0x417270,_0x5e6467));}),this['listenTo'](_0x417270,'change:top',()=>{this['_recalculate'](_0x417270,'top');}),this['listenTo'](_0x417270,'change:bottom',()=>{this['_recalculate'](_0x417270,'bottom');}),this['_alignToTargetRect'](_0x417270);const _0x48f960=this['_getItemBefore'](_0x417270);if(_0x48f960)this['_alignAfterItem'](_0x48f960,_0x417270)||this['_alignToTargetRect'](_0x417270);else this['_alignToTargetRect'](_0x417270);return this['_updateLastItem'](),this['view']['list']['add'](_0x417270),_0x417270;}['_alignForTopChange'](_0x83beff){if(!_0x83beff['content']['length'])return;const _0xe0f7af=this['_getItemBefore'](_0x83beff);if(!_0xe0f7af)return;const _0x5c37be=this['_sidebarItemViewToAnnotation']['get'](_0xe0f7af),_0x12121=this['_activeAnnotation'];_0x12121&&_0x12121===_0x5c37be?this['_alignAfterItem'](_0xe0f7af,_0x83beff):this['_alignBeforeItem'](_0x83beff,_0xe0f7af);}['_alignForBottomChange'](_0x96e207){if(!_0x96e207['content']['length'])return;const _0x3352c8=this['_getItemAfter'](_0x96e207);if(!_0x3352c8)return;const _0xf1f6e6=this['_sidebarItemViewToAnnotation']['get'](_0x3352c8),_0x54e71a=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2e2026=this['_activeAnnotation'];_0x2e2026&&_0x2e2026===_0xf1f6e6&&_0x54e71a?(this['_alignBeforeItem'](_0x3352c8,_0x96e207),this['_alignAfterItem'](_0x96e207,_0x3352c8)):_0x2e2026&&_0x2e2026===_0xf1f6e6?this['_alignBeforeItem'](_0x3352c8,_0x96e207):this['_alignAfterItem'](_0x96e207,_0x3352c8);}['_recalculate'](_0x3a41a0,_0x52a39a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3e9288,changedProp:_0xbef98e}of this['_recalculateBuffer'])'top'===_0xbef98e?this['_alignForTopChange'](_0x3e9288):this['_alignForBottomChange'](_0x3e9288);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3a41a0,'changedProp':_0x52a39a});}['getSidebarItemView'](_0x1806da){return this['_annotationToSidebarItemView']['get'](_0x1806da);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xe5b361){const _0x2a1326=this['getSidebarItemView'](_0xe5b361);this['stopListening'](_0x2a1326),this['stopListening'](_0xe5b361['view']),_0x2a1326['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xe5b361),this['_sidebarItemViewToAnnotation']['delete'](_0x2a1326);}['_createSidebarView'](){const _0x4e5632=new H(this['context']['locale']);return _0x4e5632['render'](),this['on']('change:_lastItem',(_0x48941b,_0x554828,_0x15ff46,_0x40b187)=>{_0x40b187&&_0x4e5632['unbind']('minHeight'),_0x15ff46?_0x4e5632['bind']('minHeight')['to'](_0x15ff46,'bottom'):_0x4e5632['minHeight']=null;}),_0x4e5632;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5d5be5){const _0x256fa7=this['_sidebarItemViewToAnnotation']['get'](_0x5d5be5),_0x14a982=_0x256fa7&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x256fa7)-0x1);return _0x14a982&&this['getSidebarItemView'](_0x14a982)||null;}['_getItemAfter'](_0x40a879){const _0x455fb1=this['_sidebarItemViewToAnnotation']['get'](_0x40a879),_0x3ae04d=_0x455fb1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x455fb1)+0x1);return _0x3ae04d&&this['getSidebarItemView'](_0x3ae04d)||null;}['_alignBeforeItem'](_0x124f93,_0x491395){_0x124f93['updateHeight']();const _0x1c112e=G(_0x491395['bottom']+this['_spaceBetweenItems'],_0x124f93['top']);return!!_0x1c112e&&(this['_setItemTop'](_0x491395,_0x491395['top']-_0x1c112e),!0x0);}['_alignAfterItem'](_0x2dbafb,_0xe4c472){_0x2dbafb['updateHeight']();const _0x3509ed=G(_0x2dbafb['bottom']+this['_spaceBetweenItems'],_0xe4c472['top']);return!!_0x3509ed&&(this['_setItemTop'](_0xe4c472,_0xe4c472['top']+_0x3509ed,!0x1),!0x0);}['_alignToTargetRect'](_0x2e2ca9){const _0x41f1e7=this['_sidebarItemViewToAnnotation']['get'](_0x2e2ca9);if(!_0x41f1e7||!_0x41f1e7['target']||!_0x41f1e7['targetRect'])return;const _0x4ceb1e=this['_getTargetTop'](_0x41f1e7,_0x41f1e7['targetRect']);this['_setItemTop'](_0x2e2ca9,_0x4ceb1e);}['_getTargetTop'](_0xc42f87,_0x28a7b3){if(null===_0x28a7b3)return 0x0;if(_0xc42f87['target']instanceof _0x363cc5)return _0x28a7b3['top'];{const _0x16fdd7=new _0x363cc5(this['view']['element'])['top'];return _0x28a7b3['top']-_0x16fdd7;}}['_setItemTop'](_0x503281,_0x5e76c5,_0xe7bbb2=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xe7bbb2&&(_0x5e76c5=Math['max'](_0x5e76c5,this['_getMaxAvailableTop'](_0x503281))),_0x503281['top']=_0x5e76c5;}['_getMaxAvailableTop'](_0x406cfb){let _0x1924b6=this['_getItemBefore'](_0x406cfb),_0xdb5316=0x0;for(;_0x1924b6;)_0x1924b6['updateHeight'](),_0xdb5316+=this['_spaceBetweenItems']+_0x1924b6['height'],_0x1924b6=this['_getItemBefore'](_0x1924b6);return _0xdb5316;}}function G(_0x3acc11,_0x196c63){return Math['max'](_0x3acc11-_0x196c63,0x0);}function g(_0x15f29e){return null!==_0x15f29e&&'object'==typeof _0x15f29e&&0x1===_0x15f29e['nodeType'];}class e extends _0x6308a6{['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(_0x249dd4){super(_0x249dd4),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5bbff0(),this['_refreshPositioningDebounced']=_0x5ba633(()=>{_0x249dd4['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1084ad=this['context']['plugins']['get'](j),_0x232082=this['context']['plugins']['get'](z);_0x1084ad['register']('wideSidebar',this),_0x232082['container']&&_0x1084ad['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x396b30){if(_0x396b30===this['activeAnnotation'])return;const _0x2a7e63=this['context']['plugins']['get'](z);_0x2a7e63['_activeAnnotation']=_0x396b30;const _0x137a00=this['activeAnnotation'];_0x2a7e63['refresh']({'blurredAnnotation':_0x137a00,'activatedAnnotation':_0x396b30}),this['activeAnnotation']=_0x396b30;}['attach'](_0x2f0250){this['annotations']=_0x2f0250;const _0x46fda3=this['context']['plugins']['get'](z);if(_0x46fda3['_annotations']=_0x2f0250,this['isAttached'])throw new _0x37011e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x46fda3,'set:container',()=>{this['detach'](),this['listenTo'](_0x46fda3,'change:container',_0x32bf8b=>{_0x32bf8b['off'](),this['attach'](_0x2f0250);});}),_0x46fda3['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3f261b=_0x430056=>{_0x430056['updateTargetRect'](),_0x46fda3['addAnnotation'](_0x430056);};for(const _0x8c7db9 of _0x2f0250)_0x3f261b(_0x8c7db9);this['listenTo'](_0x2f0250,'add',(_0x43a6dd,_0x1fc465)=>{_0x3f261b(_0x1fc465);}),this['listenTo'](_0x2f0250,'remove',(_0x4ce95a,_0x1dcea7,_0x37ca44)=>{_0x46fda3['rearrange']({'removedAnnotation':_0x1dcea7,'previousAnnotation':_0x2f0250['get'](_0x37ca44-0x1),'nextAnnotation':_0x2f0250['get'](_0x37ca44+0x1)}),_0x1dcea7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2f0250,'focus',(_0x201419,_0x18bf97)=>{this['setActiveAnnotation'](_0x18bf97);}),this['listenTo'](_0x2f0250,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1d75c2=this['context']instanceof _0x5e978f?this['context']['editors']:new _0x5bbff0([this['context']]);for(const _0x204bea of _0x1d75c2)this['_integrateWithEditorAnnotations'](_0x204bea);this['listenTo'](_0x1d75c2,'add',(_0x37a44c,_0x47f280)=>{this['listenTo'](_0x47f280,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x47f280);});}),this['listenTo'](_0x1d75c2,'remove',(_0x16262b,_0x54adcf)=>{_0x54adcf['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x54adcf['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x37011e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x41cc7f=this['context']['plugins']['get'](z);_0x41cc7f['_detachFromContainer'](this['annotations']),this['stopListening'](_0x41cc7f),this['stopListening'](this['annotations']),this['context']instanceof _0x5e978f&&this['stopListening'](this['context']['editors']);for(const _0x42c0df of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x42c0df);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4c9efe){if(!_0x4c9efe['plugins']['has']('EditorAnnotations'))return;const _0x58250f=_0x4c9efe['plugins']['get']('EditorAnnotations'),_0x372aaf=()=>{const _0x545dd2=_0x58250f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x545dd2[0x0]||null);};this['listenTo'](_0x58250f,'refresh',_0x372aaf),this['listenTo'](_0x58250f,'blur',(_0x537817,{isAnnotationTracked:_0x331987})=>{this['activeAnnotation']&&_0x331987(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x58250f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x2aa4f3=>{_0x58250f['hasDomSelection']()&&(_0x372aaf(),_0x2aa4f3['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x58250f);}['_destroyEditorAnnotationsIntegration'](_0x2a7f0a){this['stopListening'](_0x2a7f0a),this['_editorAnnotations']['remove'](_0x2a7f0a);}}class C extends _0x6603e9{['counterView'];constructor(_0x428e5e){super(_0x428e5e);const _0x368b4f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2ee6b3,_0x59ded7)=>_0x2ee6b3?'...':_0x59ded7['toString']()),this['set']('annotationType',''),this['icon']=_0x422358,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x368b4f['to']('annotationType',_0x130774=>'ck-annotation-counter__badge--'+_0x130774),_0x368b4f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x368b4f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x6308a6{['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(_0x3849a3){super(_0x3849a3),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x429d9a())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5bbff0(),this['_refreshPositioningDebounced']=_0x5ba633(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2fda56(this['context']['locale']),this['balloonPanelView']=new _0x25e11c(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xe8d2af){this['annotations']=_0xe8d2af;const _0x25284d=this['context']['plugins']['get'](z),_0x5a6c2b=this['balloonPanelView'];if(_0x25284d['_annotations']=_0xe8d2af,this['isAttached'])throw new _0x37011e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x25284d,'set:container',()=>{this['detach'](),this['listenTo'](_0x25284d,'change:container',_0x3c8a11=>{_0x3c8a11['off'](),this['attach'](_0xe8d2af);});}),_0x25284d['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1411b0=_0x119829=>{const _0x29c46a=new C(this['context']['locale']);_0x25284d['addAnnotation'](_0x119829,_0x29c46a),this['_annotationToNarrowView']['set'](_0x119829,_0x29c46a),_0x29c46a['bind']('isDirty','annotationType','number')['to'](_0x119829['view'],'isDirty','type','length'),_0x29c46a['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5a6c2b['content']['first']!==_0x119829['view']?(this['_showBalloon'](_0x119829),_0x119829['view']['element']['focus'](),this['setActiveAnnotation'](_0x119829)):this['setActiveAnnotation'](null);});};for(const _0x42b2f3 of _0xe8d2af)_0x1411b0(_0x42b2f3);this['listenTo'](_0xe8d2af,'add',(_0x30e467,_0x302da6)=>{_0x1411b0(_0x302da6);}),this['listenTo'](_0xe8d2af,'remove',(_0x4e0302,_0x1c41e3,_0x2d242e)=>{this['_annotationToNarrowView']['get'](_0x1c41e3)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1c41e3),_0x25284d['rearrange']({'removedAnnotation':_0x1c41e3,'previousAnnotation':_0xe8d2af['get'](_0x2d242e-0x1),'nextAnnotation':_0xe8d2af['get'](_0x2d242e+0x1)}),_0x1c41e3===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xe8d2af,'focus',(_0x5d54fe,_0x281623)=>{this['setActiveAnnotation'](_0x281623);}),this['listenTo'](_0xe8d2af,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2e31b7,_0x29edaa)=>{_0x29edaa['keyCode']===_0x5b6b88['esc']&&_0x5a6c2b['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5a6c2b['content']['first']),this['_hideBalloon'](),_0x29edaa['stopPropagation'](),_0x29edaa['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1687a2,_0x486cb7)=>{const _0x28135a=_0x486cb7['target'];_0x5a6c2b['isVisible']&&_0x5a6c2b['element']['contains'](_0x28135a)||_0x25284d['view']['element']['contains'](_0x28135a)||_0x1687a2['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4dbbef=>_0x4dbbef['contains'](_0x28135a))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x7d186b=this['context']instanceof _0x5e978f?this['context']['editors']:new _0x5bbff0([this['context']]);for(const _0x5e16c4 of _0x7d186b)this['_integrateWithEditorAnnotations'](_0x5e16c4);this['listenTo'](_0x7d186b,'add',(_0x372327,_0x5e5752)=>{this['listenTo'](_0x5e5752,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5e5752);});}),this['listenTo'](_0x7d186b,'remove',(_0x2049c3,_0x132625)=>{_0x132625['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x132625['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x57d605){if(_0x57d605===this['activeAnnotation'])return;const _0x1692d5=this['context']['plugins']['get'](z);if(_0x1692d5['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x57d605,'disableAnimationOnActivatedAnnotation':!0x0}),_0x57d605)_0x1692d5['getSidebarItemView'](_0x57d605)?this['_showBalloon'](_0x57d605):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x57d605;}['detach'](){if(!this['isAttached'])throw new _0x37011e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3a3d65=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xeeb49f=>_0xeeb49f['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3a3d65['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5e978f&&this['stopListening'](this['context']['editors']);for(const _0xd0de24 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xd0de24);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'](_0xd74f03){if(!_0xd74f03['plugins']['has']('EditorAnnotations'))return;const _0x318c29=_0xd74f03['plugins']['get']('EditorAnnotations'),_0x353a31=this['context']['plugins']['get'](z),_0x401329=this['annotations'],_0x41e622=this['balloonPanelView'],_0x587ff4=()=>{const _0x29f7eb=_0x318c29['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x29f7eb),this['setActiveAnnotation'](_0x29f7eb[0x0]||null);};this['listenTo'](_0x318c29,'refresh',_0x587ff4),this['listenTo'](_0x318c29,'blur',(_0x1bf84b,{isAnnotationTracked:_0x3dc968})=>{this['activeAnnotation']&&_0x3dc968(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x318c29,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x401329,'blur',_0x10410a=>{_0x318c29['hasDomSelection']()&&_0x10410a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x344250,_0x566257)=>{const _0x1d479c=_0x566257['target'];_0x41e622['isVisible']&&_0x41e622['element']['contains'](_0x1d479c)||_0x353a31['view']['element']['contains'](_0x1d479c)||this['activeAnnotation']&&_0x318c29['hasDomSelection']()&&(_0x587ff4(),_0x344250['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x318c29);}['_destroyEditorAnnotationsIntegration'](_0x1eaceb){_0x1eaceb&&(this['stopListening'](_0x1eaceb),this['_editorAnnotations']['remove'](_0x1eaceb));}['_setSelectedAnnotations'](_0x1f44b6){for(const _0x3ff856 of this['_selectedAnnotations'])_0x1f44b6['includes'](_0x3ff856)||this['_manuallyClosedAnnotationViews']['delete'](_0x3ff856['view']);this['_selectedAnnotations']=_0x1f44b6;}['_refreshPositioning'](){const _0x3284ae=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3284ae['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x134973){if(this['_manuallyClosedAnnotationViews']['has'](_0x134973['view']))return;const _0xf6b283=this['balloonPanelView']['content']['first'];_0xf6b283!==_0x134973['view']?(_0xf6b283&&this['_detachListeners'](_0xf6b283),this['_attachListeners'](_0x134973['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x134973['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x46636a=this['balloonPanelView']['content']['first'],_0x20e169=_0x46636a&&this['annotations']['getByView'](_0x46636a);if(!_0x20e169||!this['_annotationToNarrowView']['has'](_0x20e169))return;const _0x546317=this['_annotationToNarrowView']['get'](_0x20e169)['element'],_0x3d3783=(function(){const _0x515cdf=_0x25e11c['defaultPositions'];return[_0x515cdf['southArrowNorthEast'],_0x515cdf['northArrowSouthEast'],_0x515cdf['southArrowNorth'],_0x515cdf['northArrowSouth'],_0x515cdf['southArrowNorthWest'],_0x515cdf['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x546317,'positions':_0x3d3783});}['_hideBalloon'](){const _0x4baba2=this['balloonPanelView'],_0xe19dc3=_0x4baba2['content']['first'];_0xe19dc3&&(this['_detachListeners'](_0xe19dc3),_0x4baba2['unpin'](),_0x4baba2['content']['clear']());}['_attachListeners'](_0x5af357){this['listenTo'](_0x5af357,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5af357,'Esc',(_0x40045e,_0x3d14f1)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5af357),this['_hideBalloon'](),_0x3d14f1();});}['_detachListeners'](_0x2d6098){this['stopListening'](_0x2d6098);}}class c extends _0x383916{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x55de07,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x89a5a){super(_0x89a5a),_0x89a5a['editing']['view']['addObserver'](_0x40cd73),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x89a5a['plugins']['get'](_0x55de07),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5ba633(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x113c17=this['editor']['plugins']['get'](j);_0x113c17['context']===this['editor']&&(_0x113c17['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4752c3,_0x4f7bb2)=>{const _0x43db1b=this['_balloon'];if(this['isAttached']&&_0x43db1b['visibleView']){const _0x4c376d=this['annotations']['getByView'](_0x43db1b['visibleView']);_0x4c376d&&this['_closeAnnotation'](_0x4c376d),_0x4f7bb2();}}));}['afterInit'](){const _0x48b580=this['editor']['plugins']['get'](j);_0x48b580['context']===this['editor']&&(_0x48b580['hasActive']()||_0x48b580['switchTo']('inline'));}['setActiveAnnotation'](_0x4fbc6a){_0x4fbc6a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4fbc6a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4fbc6a)&&this['_addAnnotationToBalloon'](_0x4fbc6a,!0x0),_0x4fbc6a['isActive']=!0x0),_0x4fbc6a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4fbc6a);}['attach'](_0x4b2109){this['annotations']=_0x4b2109;const _0x40889b=this['editor']['plugins']['get'](j),_0x3e0b4e=this['_balloon'];if(this['isAttached'])throw new _0x37011e('inlineannotations-attach-already-attached',this);if(_0x40889b['context']!==this['editor'])throw new _0x37011e('inlineannotations-not-allowed-with-context',this);const _0x2ab3e9=this['editor']['plugins']['get'](b);this['listenTo'](_0x2ab3e9,'refresh',()=>{const _0x3f45f8=_0x2ab3e9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x49c4de,_0x1b63ba;!this['_forceRefresh']&&(_0x49c4de=_0x3f45f8,_0x1b63ba=this['_selectedAnnotations'],_0x49c4de['length']===_0x1b63ba['length']&&_0x49c4de['every'](_0x38f174=>_0x1b63ba['includes'](_0x38f174)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3f45f8),this['setActiveAnnotation'](_0x3f45f8[0x0]||null));}),this['listenTo'](_0x2ab3e9,'blur',(_0x593d0f,{isAnnotationTracked:_0x3e5ae9})=>{this['activeAnnotation']&&_0x3e5ae9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2ab3e9,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x624b10,_0x50def5,_0x116e5f)=>{_0x116e5f||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4b2109,'remove',(_0x4e97dc,_0x372eca)=>{this['_removeAnnotationFromBalloon'](_0x372eca),_0x372eca===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3e0b4e,'change:visibleView',(_0x4c2b71,_0x344c71,_0x1bfc30,_0xb4a1df)=>{_0xb4a1df&&this['stopListening'](_0xb4a1df);const _0x14cfad=_0x4b2109['getByView'](_0x1bfc30);_0x1bfc30&&_0x14cfad&&(this['listenTo'](_0x1bfc30,'change:height',()=>{_0x3e0b4e['updatePosition']();}),this['listenTo'](_0x1bfc30,'Esc',()=>{this['_closeAnnotation'](_0x14cfad),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x14cfad&&this['setActiveAnnotation'](_0x14cfad));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3e0b4e['visibleView']&&(_0x4b2109['getByView'](_0x3e0b4e['visibleView'])&&_0x3e0b4e['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 _0x37011e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x183192 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x183192);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x1442a1){for(const _0x145ada of this['_selectedAnnotations'])_0x1442a1['includes'](_0x145ada)||this['_manuallyClosed']['delete'](_0x145ada);for(const _0x4bd134 of this['annotations'])_0x1442a1['includes'](_0x4bd134)||this['_removeAnnotationFromBalloon'](_0x4bd134);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5a1c38 of _0x1442a1)this['_addAnnotationToBalloon'](_0x5a1c38);}this['_selectedAnnotations']=_0x1442a1;}['_addAnnotationToBalloon'](_0x1c2182,_0x4f7122=!0x1){this['_manuallyClosed']['has'](_0x1c2182)||(this['_addedAnnotations']['has'](_0x1c2182)||this['_balloon']['hasView'](_0x1c2182['view'])||(this['_addedAnnotations']['add'](_0x1c2182),this['_balloon']['add']({'stackId':_0x1c2182['view']['id'],'view':_0x1c2182['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1c2182)}})),_0x4f7122&&this['_balloon']['showStack'](_0x1c2182['view']['id']));}['_getBalloonTargetForAnnotation'](_0x1f060f){const _0x4f90c8=_0x1f060f['target'],_0x6d2c0d=this['editor']['editing']['view'],_0x1739a1=_0x6d2c0d['document']['selection']['getFirstRange'](),_0x363663=_0x6d2c0d['domConverter']['viewRangeToDom'](_0x1739a1);if(_0x363663['collapse'](!0x0),_0x4f90c8){if(_0x4f90c8 instanceof _0x363cc5)return _0x4f90c8;let _0x37f05a=[];for(const _0x34fb8d of _0x4f90c8)_0x37f05a['push'](...F(_0x34fb8d['getClientRects']()));_0x37f05a=function(_0x4952ba){const _0x47558b=[];let _0x483be5=_0x4952ba[0x0];for(let _0x2d0169=0x1;_0x2d0169<_0x4952ba['length'];_0x2d0169++)P(_0x483be5,_0x4952ba[_0x2d0169])?_0x483be5['width']+=_0x4952ba[_0x2d0169]['width']:(_0x47558b['push'](_0x483be5),_0x483be5=_0x4952ba[_0x2d0169]);return _0x47558b['push'](_0x483be5),_0x47558b;}(_0x37f05a);const _0x1c73a4=_0x363663['getBoundingClientRect']();return _0x37f05a['find'](_0x3230af=>_0x3230af['top']<=_0x1c73a4['top']&&_0x3230af['bottom']>=_0x1c73a4['bottom']&&_0x3230af['left']<=_0x1c73a4['left']&&_0x3230af['right']>=_0x1c73a4['right'])||_0x37f05a[0x0];}return _0x1f060f['targetRect']||_0x363663;}['_removeAnnotationFromBalloon'](_0x3816ea){this['_addedAnnotations']['has'](_0x3816ea)&&this['_balloon']['hasView'](_0x3816ea['view'])&&(this['_addedAnnotations']['delete'](_0x3816ea),this['_balloon']['remove'](_0x3816ea['view']));}['_closeAnnotation'](_0x11415f){this['_manuallyClosed']['add'](_0x11415f),this['_removeAnnotationFromBalloon'](_0x11415f);}}function F(_0x3be14c){return Array['from'](_0x3be14c)['map'](DOMRect['fromRect']);}function P(_0x3f97ae,_0x173583){return _0x3f97ae['top']===_0x173583['top']&&_0x3f97ae['bottom']===_0x173583['bottom']&&_0x3f97ae['right']===_0x173583['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1a620a,_0x11fd59){super(_0x1a620a),this['set']('isEmpty',!_0x11fd59['length']),this['focusTracker']=new _0xf55ae0(),this['_annotationViews']=_0x11fd59,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x3f1de7({'focusables':_0x11fd59,'focusTracker':this['focusTracker']}),this['listenTo'](_0x11fd59,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x11fd59,'remove',(_0x143d26,_0x5a9be8)=>{_0x5a9be8['isActive']&&this['focus'](),_0x11fd59['length']||(this['isEmpty']=!0x0);});const _0x5c9cb2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1a620a,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x11fd59},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5c9cb2['if']('isEmpty','ck-hidden',_0x455497=>!_0x455497)]},'children':[{'text':N(_0x1a620a,'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 _0x181dc7 of this['_annotationViews'])this['focusTracker']['add'](_0x181dc7['element']);this['_annotationViews']['on']('change',(_0x7944bf,{added:_0x4eb9cc,removed:_0x3b3033})=>{for(const _0x1515fa of _0x4eb9cc)this['focusTracker']['add'](_0x1515fa['element']);for(const _0x523ceb of _0x3b3033)this['focusTracker']['remove'](_0x523ceb['element']);});}}class p extends _0x6308a6{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x4d3810){super(_0x4d3810),this['archivedThreads']=new _0x5bbff0();}['init'](){const _0x248725=this['context'],_0x22ee88=_0x248725['plugins']['get'](o),_0x1c765e=_0x248725['plugins']['get'](y);this['listenTo'](_0x22ee88,'addCommentThread',(_0x2c132a,{threadId:_0x45db4a})=>{const _0x2e6a98=_0x22ee88['getCommentThread'](_0x45db4a);_0x2e6a98['archivedAt']&&this['archivedThreads']['add'](_0x2e6a98,this['_calculatePosition'](_0x2e6a98['archivedAt'])),this['listenTo'](_0x2e6a98,'change:archivedAt',(_0x599736,_0x3b24ad,_0x21c7ee)=>{_0x21c7ee?this['archivedThreads']['has'](_0x2e6a98)||this['archivedThreads']['add'](_0x2e6a98,this['_calculatePosition'](_0x2e6a98['archivedAt'])):this['archivedThreads']['has'](_0x2e6a98)&&this['archivedThreads']['remove'](_0x2e6a98);});}),this['listenTo'](_0x22ee88,'removeCommentThread',(_0x4f210e,{threadId:_0x4c777e})=>{const _0x56d72a=_0x22ee88['getCommentThread'](_0x4c777e);this['stopListening'](_0x56d72a),this['archivedThreads']['has'](_0x56d72a)&&this['archivedThreads']['remove'](_0x56d72a);},{'priority':'highest'}),this['listenTo'](_0x1c765e['collection'],'focus',(_0x1bfaff,_0x4c3b56)=>{_0x4c3b56['isVisible']||(_0x4c3b56['isActive']=!0x0,_0x1c765e['activate'](_0x4c3b56));});}['_calculatePosition'](_0x2f5179){const _0x379c3b=[...this['archivedThreads']]['findIndex'](_0x495579=>_0x495579['archivedAt']<_0x2f5179);return _0x379c3b>-0x1?_0x379c3b:this['archivedThreads']['length'];}}class a extends _0x383916{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x44fb97];}constructor(_0x2d000c){super(_0x2d000c),this['annotationViews']=new _0x3555a7(),this['_pendingThreads']=[];}['init'](){const _0x3acc80=this['editor'],_0x4bb42e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x3acc80['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x6603e9,!0x0)),_0x3acc80['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x224c12=this['_createCommentsArchiveButton'](_0x59d316);return _0x224c12['set']({'role':'menuitemcheckbox'}),_0x224c12;});const _0x184f22=_0x3acc80['plugins']['get'](p),_0xbab109=_0x3acc80['plugins']['get']('Annotations'),_0x35954b=_0x3acc80['plugins']['get']('CommentsRepository');_0x184f22['archivedThreads']['forEach'](_0x28bd96=>{this['_handleNewThread'](_0x28bd96);}),this['listenTo'](_0x184f22['archivedThreads'],'add',(_0x2b76ed,_0x241da8)=>{this['_handleNewThread'](_0x241da8);}),this['listenTo'](_0xbab109['collection'],'add',(_0x5a6fec,_0x21c630)=>{const _0x27c1b5=this['_pendingThreads']['find'](_0x30b5d3=>{const _0x13e7dd=_0x35954b['_threadToController']['get'](_0x30b5d3);return _0x13e7dd&&_0x21c630['innerView']===_0x13e7dd['view'];});if(_0x27c1b5){const _0x39f18c=this['_calculatePosition'](_0x27c1b5['archivedAt']);this['_addAnnotationToArchive'](_0x21c630,_0x39f18c),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x27c1b5),0x1);}}),this['listenTo'](_0x184f22['archivedThreads'],'remove',(_0x3dec15,_0x56933e)=>{const _0x4f50d7=_0x3acc80['config']['get']('collaboration.channelId');if(!_0x4f50d7||_0x56933e['channelId']===_0x4f50d7){if(this['_pendingThreads']['includes'](_0x56933e))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x56933e),0x1);else{const _0x10b3fa=_0x35954b['_threadToController']['get'](_0x56933e),_0x3f6735=_0xbab109['getByInnerView'](_0x10b3fa['view']);this['annotationViews']['remove'](_0x3f6735['view']),this['stopListening'](_0x3f6735),this['stopListening'](_0x3f6735['focusableElements']);}}}),this['listenTo'](_0xbab109['collection'],'add',(_0x32004b,_0x15a209)=>{this['listenTo'](_0x15a209,'escape',_0x4bb42e);}),this['listenTo'](_0xbab109['collection'],'remove',(_0x57294e,_0x45f1dd)=>{this['stopListening'](_0x45f1dd,'escape',_0x4bb42e);});}['_addAnnotationToArchive'](_0x14eefe,_0x2326a2){this['listenTo'](_0x14eefe,'set:isVisible',_0x59f565=>{_0x59f565['return']=!0x1,_0x59f565['stop']();}),this['annotationViews']['add'](_0x14eefe['view'],_0x2326a2);}['_handleNewThread'](_0x235354){const _0x580202=this['editor']['plugins']['get']('CommentsRepository'),_0x5c9915=this['editor']['plugins']['get']('Annotations'),_0xe119c7=this['editor']['config']['get']('collaboration.channelId');if(!_0xe119c7||_0x235354['channelId']===_0xe119c7){const _0x17f823=_0x580202['_threadToController']['get'](_0x235354);if(!_0x17f823)return void this['_pendingThreads']['push'](_0x235354);const _0x262b77=this['_calculatePosition'](_0x235354['archivedAt']),_0x123dfc=_0x5c9915['getByInnerView'](_0x17f823['view']);_0x123dfc['isVisible']&&_0x5c9915['_visibleAnnotations']['remove'](_0x123dfc),this['_addAnnotationToArchive'](_0x123dfc,_0x262b77);}}['_calculatePosition'](_0x31a206){const _0x53fd65=this['editor']['config']['get']('collaboration.channelId'),_0x224c15=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x5f2529=>_0x5f2529['channelId']===_0x53fd65)['findIndex'](_0x1e11e5=>_0x1e11e5['archivedAt']<_0x31a206);return _0x224c15<0x0||_0x224c15>this['annotationViews']['length']?this['annotationViews']['length']:_0x224c15-0x1;}['_toggleDialog'](){const _0x1ea1f5=this['editor'],_0x4cd84a=_0x1ea1f5['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x1ea1f5['locale'],this['annotationViews'])),'commentsArchive'===_0x4cd84a['id']?_0x4cd84a['hide']():_0x4cd84a['show']({'id':'commentsArchive','title':N(_0x1ea1f5['locale'],'COMMENTS_ARCHIVE'),'icon':_0x6e7663,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x249e56['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2f5d29,_0x28265e=!0x1){const _0x534706=this['editor']['locale'],_0x312eb2=this['editor']['plugins']['get']('Dialog'),_0x3342f0=new _0x2f5d29(_0x534706);return _0x3342f0['bind']('isEnabled')['to'](this,'isEnabled'),_0x3342f0['bind']('isOn')['to'](_0x312eb2,'id',_0x4d2c1d=>'commentsArchive'===_0x4d2c1d),_0x3342f0['set']({'label':N(_0x534706,'COMMENTS_ARCHIVE'),'icon':_0x6e7663,'isToggleable':!0x0}),_0x28265e&&(_0x3342f0['tooltip']=!0x0),this['listenTo'](_0x3342f0,'execute',()=>this['_toggleDialog']()),_0x3342f0;}['_hideDialogOnAnnotationEscape']=_0x173ea9=>{const _0x3c31b8=_0x173ea9['source'];if(!this['annotationViews']['has'](_0x3c31b8['view']))return;const _0x33a16d=this['editor']['plugins']['get']('Dialog');_0x33a16d['isOpen']&&'commentsArchive'===_0x33a16d['id']&&(_0x33a16d['hide'](),_0x173ea9['stop']());};}class Comments extends _0x383916{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,Comment,CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,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};
|