@ckeditor/ckeditor5-comments 46.0.1-alpha.12 → 46.0.1-alpha.14

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/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x403d5f,ContextPlugin as _0x1a03b6,PendingActions as lt,Command as _0x491be9,Plugin as _0x22a428,Context as _0x185e0a}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x36005d,uid as _0x2f9c10,KeystrokeHandler as jt,FocusTracker as _0x3f0639,diff as _0x4b2a6b,Collection as _0x55c097,Rect as _0x4904b4,CKEditorError as _0x3888cd,first as _0x39ab61,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x4379d0,keyCodes as _0x1a4904}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x1262f7,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0xea8e27,trimHtml as _0x50e3e5,LateFocusDropdownButtonView as _0x46ddd2,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x4818da}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x107550}from'es-toolkit/compat';import{IconUndo as _0x3375c2,IconCheck as _0x5e6890,IconPencil as _0x570010,IconRemoveComment as _0x4d760f,IconThreeVerticalDots as _0x55be38,IconAddComment as _0x1828af,IconCommentsArchive as _0x5092a2}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x47818a,ButtonView as _0x31c82b,ViewCollection as _0x4221f7,createDropdown as _0x2a914d,ListView as _0x5ec614,focusChildOnDropdownOpen as _0xe2700c,ListItemView as _0x1b56b0,MenuBarMenuListItemButtonView as _0x3e45ab,BodyCollection as _0xeb78fe,BalloonPanelView as _0x54bee3,ContextualBalloon as _0x524c47,Dialog as _0x46fba1,DialogViewPosition as _0x5a724f}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x4b3dd3}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x21ae3c}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x27576a}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
- _0x36005d(){['model'];['view'];constructor(_0x7e147a,_0x21f22b){super(),this['model']=_0x7e147a,this['model']['_isAttached']=!0x0,this['view']=_0x21f22b,this['listenTo'](_0x21f22b,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x21f22b,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x21f22b,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x21f22b,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x21f22b,'addComment',(_0x342a99,_0x255002)=>this['addComment'](_0x255002)),this['listenTo'](_0x21f22b,'updateComment',(_0xa3fee7,_0x5068fa,_0x25e55a)=>this['updateComment'](_0x5068fa,_0x25e55a)),this['listenTo'](_0x21f22b,'removeComment',(_0x3e5b4d,_0x388e48)=>this['removeComment'](_0x388e48));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x323ea0){this['model']['addComment']({'content':_0x323ea0,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x1d8311,_0x5cdb4c){this['model']['getComment'](_0x1d8311)['update']({'content':_0x5cdb4c});}['removeComment'](_0x494c5c){this['model']['getComment'](_0x494c5c)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x590980,_0x3122b3,_0x5b8060){const t=_0x590980['t'];switch(_0x3122b3){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'},_0x5b8060);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'},_0x5b8060);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'},_0x5b8060);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'},_0x5b8060);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x5b8060);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'},_0x5b8060);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'},_0x5b8060);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'},_0x5b8060);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x525514,_0x3cfb41){super(_0x525514);const _0x135cf0=_0x2f9c10();this['main']=this['createCollection'](),this['editable']=new $t(_0x525514,_0x3cfb41,void 0x0,{'label':()=>N(_0x525514,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x525514['uiLanguageDirection'],'lang':_0x525514['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x135cf0},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x5b7c8f){super(_0x5b7c8f),this['view']=new Vt(_0x5b7c8f['locale'],_0x5b7c8f['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x9ead1f=this['editor']['editing']['view'],_0x1b763f=this['view']['editable'],_0x350862=_0x9ead1f['document']['getRoot']();_0x1b763f['name']=_0x350862['rootName'],this['view']['render']();const _0x54e1cd=_0x1b763f['element'];this['setEditableElement'](_0x1b763f['name'],_0x54e1cd),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x9ead1f['attachDomRoot'](_0x54e1cd),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
25
- _0x36005d(_0x403d5f){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x4849e7={}){function _0x500608(_0x2a7783){return _0x2a7783['map'](_0xd657dc=>String['fromCharCode'](_0xd657dc))['join']('');}(_0x4849e7=Object['assign']({},_0x4849e7))['plugins']||(_0x4849e7['plugins']=Rt['defaultPlugins']),super(_0x4849e7),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x500608([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x500608([0x76,0x69,0x65,0x77])][_0x500608([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x500608([0x61,0x75,0x74,0x6f]),this[_0x500608([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x500608([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x500608([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x500608([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x500608([0x6f,0x6b])});}['create'](){const _0x34b0e7=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x34b0e7))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2088ce=>{const _0x5e1ecd=this['model']['document']['getRoot'](),_0x57a7fb=_0x5e1ecd&&_0x5e1ecd['getChild'](_0x5e1ecd['childCount']-0x1);_0x2088ce['setSelection'](_0x57a7fb,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x119250=this['editing']['view'],_0x46d2ee=_0x119250['document']['getRoot'](),_0x4c301a=_0x46d2ee['getChild'](0x0);_0x46d2ee['childCount']>0x1||!_0x4c301a||'p'!=_0x4c301a['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x119250,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4c301a['placeholder']=this['placeholder']),St({'view':_0x119250,'element':_0x4c301a,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4c301a);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3c098b,_0x37a61e={}){super(_0x3c098b),this['editor']=null,this['_editorConfig']=_0x37a61e,this['set']('value',_0x37a61e['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x3c098b,'Reply...')),this['set']('submitLabel',N(_0x3c098b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x3f0639(),this['focusCycler']=new _0x47818a({'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',(_0x57775f,_0xc2fd43)=>{this['cancelButtonView']['fire']('execute'),_0xc2fd43();}),this['keystrokes']['set']('Ctrl+Enter',(_0x44961c,_0x338ce2)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x338ce2());}),this['on']('submit',(_0x51cb5f,_0x12531a)=>{_0x12531a['length']>0xfde8?(alert(N(_0x3c098b,'TOO_LONG_COMMENT_ALERT',[_0x12531a['length'],0xfde8])),_0x51cb5f['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3fb9a6=this['editor'];this['element']['insertBefore'](_0x3fb9a6['ui']['element'],this['element']['firstChild']),_0x3fb9a6['model']['document']['on']('change',()=>this['value']=_0x3fb9a6['getData']()),_0x3fb9a6['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3fb9a6['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5b8181){-0x1===_0x5b8181?(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:_0x186414}=this,_0xf81c71=new _0x31c82b(_0x186414);return _0xf81c71['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xf81c71['withText']=!0x0,_0xf81c71['bind']('label')['to'](this,'submitLabel'),_0xf81c71['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xf81c71['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x55e53c,_0x1d3b45)=>!_0x1d3b45&&!!_0x55e53c['trim']()),_0xf81c71;}['_createCancelButton'](){const {locale:_0x36f489}=this,_0x25f9cb=new _0x31c82b(_0x36f489);return _0x25f9cb['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x25f9cb['label']=N(_0x36f489,'Cancel'),_0x25f9cb['withText']=!0x0,_0x25f9cb['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x25f9cb;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x461b03=>{this['focusTracker']['add'](_0x461b03['element']);}),this['focusables']['on']('change',(_0x144537,_0x22abe5)=>{for(const _0x2d186f of Array['from'](_0x22abe5['added'])['reverse']())this['focusTracker']['add'](_0x2d186f['element']);});}}class ie extends kt{constructor(_0x80b20c,_0x13ee06,_0xcbf309){super(_0x80b20c),this['commentInputView']=new os(_0x80b20c,_0xcbf309),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3fa7e5,_0x266271)=>_0x3fa7e5||!!_0x266271),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 _0x1262f7(_0x80b20c,_0x13ee06),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'](_0x40619b){this['commentInputView']['focus'](_0x40619b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1be14e,_0x33ce58)=>{const {submitButtonView:_0x64056b,cancelButtonView:_0x5cba91,editor:_0x1a8ec8}=this['commentInputView'];[_0x64056b['element'],_0x5cba91['element'],_0x1a8ec8?_0x1a8ec8['editing']['view']['getDomRoot']():null]['filter'](_0x8a6df=>_0x8a6df)['some'](_0x4bd044=>_0x4bd044['contains'](_0x33ce58['target']))||(this['focus'](),_0x33ce58['preventDefault']());});}}class rs extends kt{constructor(_0x351a0f){super(_0x351a0f);const _0x5dadf8=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5dadf8['to']('count',_0x3e4311=>N(_0x351a0f,'NUMBER_OF_COMMENTS',_0x3e4311))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1bc45c,_0x2be1b8,_0x4448cb){super(_0x1bc45c);const _0x320e17=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2be1b8['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2be1b8,this['_config']=_0x4448cb,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x3f0639(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47818a({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x255d12=>this['commentViews']['map'](_0x2671e5=>_0x2671e5['element'])['includes'](_0x255d12['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x1bc45c),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4263ff=>_0x4263ff-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1deb58 of _0x2be1b8['comments'])this['_handleNewCommentModel'](_0x1deb58);this['_handleInfoComment'](),this['listenTo'](_0x2be1b8['comments'],'add',(_0x499e43,_0x1b038a)=>{const _0x25ad6c=this['_calculatePosition'](_0x1b038a);this['length']++,this['_handleNewCommentModel'](_0x1b038a,_0x25ad6c),this['refreshVisibleViews']();}),this['listenTo'](_0x2be1b8['comments'],'remove',(_0x4847de,_0x40f372)=>{this['length']--,this['_handleRemoveCommentModel'](_0x40f372),this['refreshVisibleViews']();}),this['listenTo'](_0x2be1b8,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2be1b8,'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',_0x320e17['if']('length','ck-hidden',_0x5b3807=>!_0x5b3807)],'aria-label':N(_0x1bc45c,'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'](_0x1e62a4){-0x1===_0x1e62a4?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x495864 of this['commentViews'])_0x495864['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x999995,_0x40e177){const _0x22b16a=new this['_config']['CommentView'](this['locale'],_0x999995,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x22b16a['viewUid']=_0x999995['id'],_0x22b16a['delegate']('removeComment')['to'](this),_0x22b16a['delegate']('updateComment')['to'](this),_0x22b16a['delegate']('resolveCommentThread')['to'](this),_0x22b16a['delegate']('editorReady')['to'](this),_0x22b16a['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x22b16a,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x22b16a,_0x40e177);}['_calculatePosition'](_0x3098bc){const _0x3f9ff3=this['_model']['_findOptimalIndex'](_0x3098bc);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3098bc['authoredAt']?_0x3f9ff3-0x1:_0x3f9ff3:_0x3f9ff3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2acbf4={'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'],_0x2acbf4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2acbf4));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0xcde83f){const _0x208843=this['commentViews']['remove'](_0xcde83f['id']);this['stopListening'](_0x208843),_0x208843['isEditMode']&&this['_updateHasDirtyComment'](),_0x208843['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x142d08=>_0x142d08['isEditMode']);}['_rearrangeCollapse'](){const _0x179f1c=function(_0x49fd53){const _0xd3fd55=new _0x55c097();for(const _0x168225 of _0x49fd53)_0xd3fd55['add'](_0x168225);return _0xd3fd55;}(this['commentViews']),_0x2f8404=this['_collapsedCommentsView']['count'];for(let _0x374319=0x1;_0x374319<=_0x2f8404;_0x374319++)_0x179f1c['remove'](0x1);for(const _0xf6abd8 of _0x179f1c)_0xf6abd8['collapse']();_0x2f8404>0x0&&_0x179f1c['add'](this['_collapsedCommentsView'],0x1),ns(_0x4b2a6b(Array['from'](this['visibleViews']),Array['from'](_0x179f1c)),this['visibleViews'],_0x179f1c);}['_rearrangeExpand'](){ns(_0x4b2a6b(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x38f749 of this['visibleViews'])_0x38f749['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x517249=>{this['focusTracker']['add'](_0x517249['element']),this['keystrokes']['listenTo'](_0x517249['element']);}),this['commentViews']['on']('change',(_0x58a35a,_0x36afac)=>{for(const _0x3d8fad of _0x36afac['removed'])this['focusTracker']['remove'](_0x3d8fad['element']),this['keystrokes']['stopListening'](_0x3d8fad['element']);for(const _0x5bc793 of Array['from'](_0x36afac['added'])['reverse']())this['focusTracker']['add'](_0x5bc793['element']),this['keystrokes']['listenTo'](_0x5bc793['element']);});}}function ns(_0x397e2a,_0x3a1885,_0x145973){let _0x314aa6=0x0;for(const _0x45b2d9 of _0x397e2a)switch(_0x45b2d9){case'insert':_0x3a1885['add'](_0x145973['get'](_0x314aa6),_0x314aa6),_0x314aa6++;break;case'delete':_0x3a1885['remove'](_0x314aa6);break;case'equal':_0x314aa6++;}}class oe extends kt{constructor(_0x2414ea){super(_0x2414ea);const _0x2f2209=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2f2209['to']('contextValue',_0x46229b=>N(_0x2414ea,'THREAD_CONTEXT_LABEL',_0x46229b)),'tabindex':-0x1},'children':[{'text':_0x2f2209['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3e208a,_0x55bb06){super(_0x3e208a);const _0x4cf848=this['bindTemplate'];this['_model']=_0x55bb06,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x3f0639(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47818a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x55e098=>!!_0x55e098),this['bind']('contextValue')['to'](this['_model'],'context',_0x1f5787=>_0x1f5787&&_0x1f5787['value']?this['_trimContextValue'](_0x1f5787['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',_0x4cf848['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 _0x55c979=new _0x31c82b(this['locale']);return _0x55c979['label']=N(this['locale'],'Reopen'),_0x55c979['tooltip']=N(this['locale'],'Reopen'),_0x55c979['icon']=_0x3375c2,_0x55c979['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x389d80=>!_0x389d80),_0x55c979['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3f426e,_0x1d3edc)=>_0x3f426e&&_0x1d3edc),_0x55c979['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x55c979;}['_trimContextValue'](_0x5e8f02){if(_0x5e8f02['length']<0x96)return _0x5e8f02;const _0x29754f=_0x5e8f02['lastIndexOf']('\x20',0x93);return _0x5e8f02['substring'](0x0,_0x29754f>-0x1?_0x29754f:0x93)+'...';}['_attachContextActions'](){const _0x35915e=this['element']['querySelector']('.ck-context'),_0x4b645a=_0x35915e['querySelector']('.ck-context__value');this['listenTo'](_0x35915e,'mouseenter',()=>{_0x4b645a['offsetWidth']<_0x4b645a['scrollWidth']&&_0x35915e['classList']['add']('overlay');}),this['listenTo'](_0x35915e,'mouseleave',()=>{_0x35915e['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x30d380 of this['focusables'])this['focusTracker']['add'](_0x30d380['element']),this['keystrokes']['listenTo'](_0x30d380['element']);}['_createContextView'](){const _0x6f8455=new oe(this['locale']);return _0x6f8455['bind']('contextValue')['to'](this),_0x6f8455;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xfadf21,_0x2c6384,_0x37460b,_0x480b2f){super(_0xfadf21),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2c6384,this['_localUser']=_0x37460b,this['_config']=_0x480b2f,this['commentThreadHeaderView']=new Yt(_0xfadf21,_0x2c6384),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0xfadf21,N(_0xfadf21,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0xfadf21,_0x2c6384,Object['assign']({'CommentView':this['_config']['CommentView']},_0x480b2f)),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',(_0x6e8936,_0x125d53)=>_0x6e8936||!!_0x125d53),this['bind']('isUnlinked')['to'](_0x2c6384,'unlinkedAt',_0x134a96=>!!_0x134a96),this['bind']('ariaLabel')['to'](this,'length',_0x265986=>{const _0x1203d5=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x265986,_0x1203d5]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x3f0639(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47818a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x268c5a=>_0x268c5a['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x561149=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x46ba86=_0x561149['commentInputView'];return _0x561149['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x46ba86,'value',(_0x250662,_0x5d50ed,_0x33b51f,_0x3fd5e0,_0x4c254d)=>!!_0x4c254d||!!_0x3fd5e0&&_0x33b51f&&!_0x5d50ed||_0x250662&&_0x33b51f&&!_0x5d50ed),_0x46ba86['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x28c6e4,_0x5e0877,_0x36f1aa)=>{let _0x179c8f;return _0x179c8f=_0x36f1aa&&_0x5e0877?'Reply\x20to\x20reopen\x20discussion...':_0x28c6e4?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x179c8f);}),_0x46ba86['bind']('submitLabel')['to'](this,'length',_0x25db56=>N(this['locale'],_0x25db56?'Reply':'Comment')),_0x46ba86['on']('submit',(_0xb4babc,_0x77a77b)=>{this['fire']('addComment',_0x77a77b),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x46ba86['on']('cancel',()=>{this['focus']();}),_0x46ba86['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x46ba86['on']('cancel',_0xefc86c=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xefc86c['stop']());}),this['on']('change:isActive',(_0x767af2,_0x12fb87,_0x1f0284)=>{_0x1f0284||this['length']||_0x46ba86['value']||this['fire']('removeCommentThread');}),_0x561149;}}class gt extends/* #__PURE__ -- @preserve */
27
- ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x262dd6,_0x1d1f51,_0x179aeb,_0x46794e){super(_0x262dd6,_0x1d1f51,_0x179aeb,_0x46794e),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x262dd6,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0xa4fa94,_0x12901f,_0x1cc4f3)=>{_0x1cc4f3||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x44d378,_0x58b985,_0x2f1bd2)=>{_0x2f1bd2&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x177b82=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x177b82['if']('isActive','ck-thread--active'),_0x177b82['if']('isUnlinked','ck-thread--unlinked'),_0x177b82['if']('isConfirm','ck-thread--remove-confirmation'),_0x177b82['to']('actionIndicator',_0x1526e1=>_0x1526e1?'ck-thread--'+_0x1526e1:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x177b82['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 _0x796f76 of this['commentsListView']['commentViews'])_0x796f76['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x219935}=this,_0x5d05db=this['commentsListView']['commentViews']['get'](0x0);_0x5d05db===this['_boundFirstCommentView']||_0x5d05db['isSystemComment']||(this['_boundFirstCommentView']=_0x5d05db,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x5d05db,'actionIndicator',_0x4da878=>'remove'===_0x4da878?'remove':null),_0x5d05db['placeholder']=N(_0x219935,'Write\x20a\x20comment...'),_0x5d05db['removeButton']['on']('execute',_0x310bd5=>{_0x310bd5['stop'](),this['showConfirm'](N(_0x219935,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x5d05db['focus']();}),_0x5d05db['actionBar']['add'](this['resolveButton'],0x0),_0x5d05db['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x5ae29c=new _0xea8e27(this['locale']);return _0x5ae29c['label']=N(this['locale'],'Resolve'),_0x5ae29c['tooltip']=N(this['locale'],'Resolve'),_0x5ae29c['icon']=_0x5e6890,_0x5ae29c['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x5ae29c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x41748b=>!_0x41748b),_0x5ae29c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x48a1a0,_0x4cd76c)=>_0x48a1a0&&!_0x4cd76c),_0x5ae29c['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5ae29c;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x436f24){super(_0x436f24),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x365ec4,_0x4d0822,_0x23cc0b)=>{this['element']['innerHTML']=_0x23cc0b;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x510685,_0x1303cc,_0x1669ac){super(_0x510685),this['_model']=_0x1303cc,this['_config']=_0x1669ac,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1303cc,'content',_0x1303cc,'authoredAt',(_0xdea90a,_0x2fae64)=>N(_0x510685,'COMMENT_ARIA_LABEL',[_0x1303cc['author']['name'],_0x1669ac['formatDateTime'](_0x2fae64),new DOMParser()['parseFromString'](_0xdea90a,'text/html')['body']['textContent'],_0x1303cc['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x510685,N(_0x510685,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x4221f7(),this['focusTracker']=new _0x3f0639(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47818a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4b9b04=>_0x4b9b04['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 _0x5c128c=new es(this['locale']);return _0x5c128c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x3f5a9b,_0x15f515)=>_0x15f515?_0x50e3e5(_0x3f5a9b,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x3f5a9b),_0x5c128c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x51d501=new os(this['locale'],this['_config']['editorConfig']);return _0x51d501['value']=this['_model']['content'],_0x51d501['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x51d501['submitLabel']=N(this['locale'],'Save'),_0x51d501['on']('submit',(_0x334c87,_0x257aa4)=>{this['fire']('updateComment',this['_model']['id'],_0x257aa4),this['switchToDisplayMode'](),this['focus']();}),_0x51d501['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x51d501['once']('editorReady',()=>{_0x51d501['focus']();}),_0x51d501['createEditor'](),_0x51d501['delegate']('editorReady')['to'](this),_0x51d501['delegate']('editorDestroyed')['to'](this),_0x51d501;}['_setupKeyboardNavigation'](){const _0x20c988=this['element'];this['keystrokes']['listenTo'](_0x20c988);for(const _0x813fb8 of this['focusables'])this['focusTracker']['add'](_0x813fb8['element']),this['keystrokes']['listenTo'](_0x813fb8['element']);this['focusables']['on']('change',(_0x4d12dd,_0x29a770)=>{for(const _0x266bab of _0x29a770['removed'])this['focusTracker']['remove'](_0x266bab['element']),this['keystrokes']['stopListening'](_0x266bab['element']);for(const _0x365052 of _0x29a770['added'])this['focusTracker']['add'](_0x365052['element']),this['keystrokes']['listenTo'](_0x365052['element']);}),this['keystrokes']['set']('enter',(_0x1ed18b,_0x37d47a)=>{_0x20c988===_0x1ed18b['target']&&(this['focusCycler']['focusFirst'](),_0x37d47a());}),this['keystrokes']['set']('esc',(_0xd8cb07,_0x2e0467)=>{_0x20c988!==_0xd8cb07['target']&&(this['focus'](),_0x2e0467());});}}class Tt extends/* #__PURE__ -- @preserve */
28
- ti(di){['actionBar'];['userView'];constructor(_0x38541e,_0x308f30,_0x2e7fda){super(_0x38541e,_0x308f30,_0x2e7fda),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x38541e,'Reply...')),this['bind']('authoredAt')['to'](_0x308f30),this['bind']('resolvedAt')['to'](_0x308f30),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 _0x1262f7(_0x38541e,_0x308f30['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x308f30,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x4ccda7=this['bindTemplate'],_0x53e214=[{'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':_0x4ccda7['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x4ccda7['to']('authoredAt',_0x16289f=>this['_config']['formatDateTime'](_0x16289f))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x4ccda7['if']('isEditMode','ck-comment__actions--hidden'),_0x4ccda7['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']&&_0x53e214['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x4ccda7['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x4ccda7['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x4ccda7['if']('isEditMode','ck-comment--edit'),_0x4ccda7['if']('isSystemComment','ck-comment--info'),_0x4ccda7['to']('actionIndicator',_0x541767=>_0x541767?'ck-comment--'+_0x541767:'')],'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':_0x53e214}]}]};}['_createEditButton'](){const _0x55ab7b=new _0x31c82b(this['locale']);return _0x55ab7b['label']=N(this['locale'],'Edit'),_0x55ab7b['icon']=_0x570010,_0x55ab7b['withText']=!0x0,_0x55ab7b['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x55ab7b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x157e85=>!_0x157e85),_0x55ab7b['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x55ab7b['on']('execute',()=>this['switchToEditMode']()),_0x55ab7b;}['_createRemoveButton'](){const _0x5696bc=new _0x31c82b(this['locale']);return _0x5696bc['label']=N(this['locale'],'Remove'),_0x5696bc['icon']=_0x4d760f,_0x5696bc['withText']=!0x0,_0x5696bc['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5696bc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xf7762b=>!_0xf7762b),_0x5696bc['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5696bc['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5696bc;}['_createDropdown'](){const _0x101d12=_0x2a914d(this['locale'],_0x46ddd2),_0x5acf10=_0x101d12['panelView']['children'],_0x496700=new _0x5ec614(this['locale']),_0x358dd1=_0x101d12['bindTemplate'];_0xe2700c(_0x101d12,()=>this['items']['find'](_0x45bb36=>_0x45bb36['isVisible'])),_0x101d12['extendTemplate']({'attributes':{'class':[_0x358dd1['if']('isVisible','ck-hidden',_0x15cb75=>!_0x15cb75)]}});const _0xb6999c=(_0x28cdca,_0x47b11d=-0x1)=>{const _0xb197a0=new _0x1b56b0(this['locale']);_0xb197a0['children']['add'](_0x28cdca);const _0x4f84bd=_0x47b11d>-0x1?_0x47b11d:_0x496700['items']['length'];_0x496700['items']['add'](_0xb197a0,_0x4f84bd);const _0x3ce722=Array['from'](this['items']);_0x101d12['unbind']('isEnabled','isVisible'),_0x101d12['bind']('isEnabled')['toMany'](_0x3ce722,'isEnabled',(..._0x1500f8)=>_0x1500f8['some'](_0x4b659d=>_0x4b659d)),_0x101d12['bind']('isVisible')['toMany'](_0x3ce722,'isVisible',(..._0x480696)=>_0x480696['some'](_0x5407b5=>_0x5407b5));};_0x101d12['panelPosition']='sw',_0x101d12['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x55be38});for(const _0x24ba09 of this['items'])_0xb6999c(_0x24ba09);return _0x5acf10['add'](_0x496700),_0x101d12['listenTo'](this['items'],'add',(_0x3ce75d,_0x75c77e,_0x4981ea)=>{_0xb6999c(_0x75c77e,_0x4981ea);}),_0x101d12['listenTo'](this['items'],'remove',(_0x1497cc,_0xf933d3,_0x4543a9)=>{_0x496700['items']['remove'](_0x4543a9);}),_0x101d12;}['_attachActions'](_0x21eb54,_0x80c4b2){const _0x5ac6=_0x21eb54&&_0x21eb54['element'];_0x5ac6&&(this['listenTo'](_0x5ac6,'mouseenter',()=>this['actionIndicator']=_0x80c4b2),this['listenTo'](_0x5ac6,'focus',()=>this['actionIndicator']=_0x80c4b2),this['listenTo'](_0x5ac6,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5ac6,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x4a9481=super['_createCommentInputView']();return _0x4a9481['bind']('placeholder')['to'](this),_0x4a9481;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0xa49001){const _0x4cfc35=Dt(_0xa49001,0x1e),_0x3ca286=new MutationObserver(_0x311bdc=>{for(const _0x1e80a5 of _0x311bdc)('attributes'==_0x1e80a5['type']&&'class'==_0x1e80a5['attributeName']||'childList'==_0x1e80a5['type']||'characterData'==_0x1e80a5['type'])&&_0x4cfc35();});return{'attach'(_0x219576){_0x3ca286['observe'](_0x219576,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x3ca286['disconnect'](),_0x4cfc35['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x39ed3f,_0xc15b8e){super(_0x39ed3f),this['id']=_0x2f9c10(),this['focusTracker']=new _0x3f0639(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x401077,_0x1b36e6)=>this['fire']('Esc',_0x1b36e6)),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'](_0xc15b8e),this['mainView']=_0xc15b8e;const _0x23f5a7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x23f5a7['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 _0x521801=this['element']['clientHeight'];_0x521801&&(this['height']=_0x521801);}}class T extends/* #__PURE__ -- @preserve */
29
- _0x36005d(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x32d696,target:_0x5eeff0,type:_0x4589f0,isVisible:_0x33707d=!0x0}){super(),this['view']=_0x32d696,this['view']['element']||this['view']['render'](),this['_type']=_0x4589f0,this['_target']=_0x5eeff0,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x55c097([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x18727d,_0x4d8d56)=>{this['view']['focusTracker']['add'](_0x4d8d56);}),this['focusableElements']['on']('remove',(_0x133344,_0x5114d7)=>{this['view']['focusTracker']['remove'](_0x5114d7);}),this['set']('isVisible',_0x33707d);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x5b598d=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x5b598d),_0x5b598d;}get['targetRect'](){const _0x203507=this['target'];if(null===_0x203507)return null;if(_0x203507 instanceof _0x4904b4)return _0x203507;const _0x5b9b9b=_0x203507['filter'](_0x5510a6=>function(_0x2126d1){const _0x195020=_0x2126d1['offsetParent'];if(_0x195020)return!0x0;const _0x1c1687=_0x2126d1['getClientRects']()['item'](0x0);return!!_0x1c1687;}(_0x5510a6));return 0x0===_0x5b9b9b['length']?null:new _0x4904b4(_0x5b9b9b[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x7b595){this['view']['isActive']=_0x7b595,this['view']['mainView']['isActive']=_0x7b595;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4788d1){if(!(null===_0x4788d1||_0x4788d1 instanceof _0x4904b4||Array['isArray'](_0x4788d1)&&_0x4788d1['every'](_0x10e31b=>fi(_0x10e31b))))throw new _0x3888cd('annotation-invalid-target',null,{'target':_0x4788d1});}['_getNormalizedTarget'](){const _0x486274='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x486274)?[_0x486274]:_0x486274;}}function fi(_0x25c8f8){return null!==_0x25c8f8&&'object'==typeof _0x25c8f8&&'nodeType'in _0x25c8f8&&0x1===_0x25c8f8['nodeType'];}class S extends _0x55c097{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x277164=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x3f0639(),this['_focusTracker']['on']('change:isFocused',(_0x1c8916,_0x40e5f0,_0x13bb09)=>{_0x13bb09||this['fire']('blur');});for(const _0x124ad4 of _0x277164)this['add'](_0x124ad4);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x5aa25a){if(this['has'](_0x5aa25a))throw new _0x3888cd('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x5aa25a['innerView'],_0x5aa25a),this['_viewToAnnotation']['set'](_0x5aa25a['view'],_0x5aa25a);for(const _0x2bc0b7 of _0x5aa25a['focusableElements'])this['_focusTracker']['add'](_0x2bc0b7);this['listenTo'](_0x5aa25a['focusableElements'],'add',(_0x476609,_0x4366f2)=>{this['_focusTracker']['add'](_0x4366f2);}),this['listenTo'](_0x5aa25a['focusableElements'],'remove',(_0x39b289,_0xbb223a)=>{this['_focusTracker']['remove'](_0xbb223a);}),this['listenTo'](_0x5aa25a['view']['focusTracker'],'change:isFocused',(_0x2f6adb,_0x4aba99,_0x214341)=>{_0x214341&&this['fire']('focus',_0x5aa25a);}),_0x5aa25a['updateTargetRect']();const _0x13b2ea=this['_getOrderInContent'](_0x5aa25a['view']['targetRect']);return super['add'](_0x5aa25a,_0x13b2ea);}['remove'](_0x173069){if(!this['has'](_0x173069))throw new _0x3888cd('annotationcollection-not-existing-item',null);this['stopListening'](_0x173069['view']['focusTracker']),this['stopListening'](_0x173069['focusableElements']);for(const _0x2ed7fa of _0x173069['focusableElements'])this['_focusTracker']['remove'](_0x2ed7fa);return this['_viewToAnnotation']['delete'](_0x173069['view']),this['_innerViewToAnnotation']['delete'](_0x173069['innerView']),super['remove'](_0x173069);}['getByInnerView'](_0x5943d5){return this['_innerViewToAnnotation']['get'](_0x5943d5);}['getByView'](_0x20fcdc){return this['_viewToAnnotation']['get'](_0x20fcdc);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x582190 of this)_0x582190['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3c3435=Array['from'](this)['sort']((_0x76f9ee,_0x3007ca)=>w(_0x76f9ee['view']['targetRect'],_0x3007ca['view']['targetRect']));for(let _0x339627=_0x3c3435['length']-0x1;_0x339627>0x0;_0x339627--){const _0x3f8b1d=_0x3c3435[_0x339627];_0x339627!==this['getIndex'](_0x3f8b1d)&&(this['remove'](_0x3f8b1d),this['add'](_0x3f8b1d));}}['_getOrderInContent'](_0x3b3f7a){let _0x506360=0x0;if(!_0x3b3f7a)return this['length'];for(const _0x2d1b51 of this){const _0x4c4c4a=_0x2d1b51['view']['targetRect'];if(_0x4c4c4a){if(w(_0x3b3f7a,_0x4c4c4a)<0x0)return _0x506360;_0x506360++;}}return _0x506360;}}function v({source:_0x5809b9,target:_0x13586b,filter:_0x2c3a00}){for(const _0x183562 of _0x5809b9)_0x2c3a00(_0x183562)&&_0x13586b['add'](_0x183562);_0x13586b['listenTo'](_0x5809b9,'add',(_0x4e3a18,_0x3d9d33)=>{_0x2c3a00(_0x3d9d33)&&_0x13586b['add'](_0x3d9d33);}),_0x13586b['listenTo'](_0x5809b9,'remove',(_0x41716c,_0x807d9c)=>{_0x13586b['has'](_0x807d9c)&&_0x13586b['remove'](_0x807d9c);});}function w(_0x2d01a6,_0x2462ea){if(null===_0x2d01a6&&null===_0x2462ea)return 0x0;if(null===_0x2d01a6)return-0x1;if(null===_0x2462ea)return 0x1;const _0x3ef0cd=_0x2d01a6['top']-_0x2462ea['top'];return 0x0==_0x3ef0cd?_0x2d01a6['left']-_0x2462ea['left']:_0x3ef0cd;}class y extends _0x1a03b6{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x520933){if(super(_0x520933),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x520933 instanceof _0x403d5f){const _0x235194=_0x520933['locale'];_0x520933['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x50abab){this['collection']['add'](_0x50abab);}['remove'](_0x4ffdd3){this['collection']['remove'](_0x4ffdd3),_0x4ffdd3['destroy']();}['refreshVisibility'](){for(const _0x197717 of this['collection'])_0x197717['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x19a579){return this['collection']['getByInnerView'](_0x19a579);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4496cd of this['collection'])_0x4496cd['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4e1655){this['fire']('_activateAnnotation',_0x4e1655);}['createAnnotation'](_0x39e55c){return new T(_0x39e55c);}['createAnnotationView'](_0x55cc3d,_0xca235){return new E(_0x55cc3d,_0xca235);}['_addActiveAnnotation'](_0x507701){const _0x4dc8a5=new Set(this['activeAnnotations']);_0x4dc8a5['add'](_0x507701),this['activeAnnotations']=_0x4dc8a5;}['_removeActiveAnnotation'](_0x199f7d){const _0x41e24c=new Set(this['activeAnnotations']);_0x41e24c['delete'](_0x199f7d),this['activeAnnotations']=_0x41e24c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x46fe56=this['collection'],_0x6d22a1=this['_visibleAnnotations'];function _0x19072f(_0x57924f){const _0x129fe3=_0x57924f['source'];_0x129fe3['isVisible']&&!_0x6d22a1['has'](_0x129fe3)?_0x6d22a1['add'](_0x129fe3):!_0x129fe3['isVisible']&&_0x6d22a1['has'](_0x129fe3)&&_0x6d22a1['remove'](_0x129fe3),_0x129fe3['view']['focusTracker']['remove'](_0x129fe3['view']['element']),_0x129fe3['view']['focusTracker']['add'](_0x129fe3['view']['element']);}this['listenTo'](_0x46fe56,'add',(_0x2267c0,_0x23b1a2)=>{_0x23b1a2['isVisible']&&_0x6d22a1['add'](_0x23b1a2),this['listenTo'](_0x23b1a2,'change:isVisible',_0x19072f);}),this['listenTo'](_0x46fe56,'remove',(_0x56a149,_0x4049d8)=>{_0x6d22a1['has'](_0x4049d8)&&_0x6d22a1['remove'](_0x4049d8),this['stopListening'](_0x4049d8,'change:isVisible',_0x19072f);});}['_setupEnterAnnotationKeystroke'](){const _0x575c5f=_0x5b80e8=>{_0x5b80e8['on']('ready',()=>{_0x5b80e8['keystrokes']['set'](_0x21ae3c,(_0x315c45,_0x57289f)=>{const _0x1177b2=_0x39ab61(this['activeAnnotations']['values']());_0x1177b2&&(_0x1177b2['view']['focus'](),_0x57289f());});});};this['context']instanceof _0x403d5f?_0x575c5f(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x8f624,_0x35249d)=>{_0x575c5f(_0x35249d);});}['_setupEscapeAnnotationHandling'](){const _0x16d3b6=_0x255238=>{const _0x8b927d=_0x255238['source'],_0x4af9be=[];let _0x2316d1;if(Array['isArray'](_0x8b927d['target'])){_0x2316d1=_0x8b927d['target'][0x0],this['context']instanceof _0x403d5f?_0x4af9be['push'](this['context']):this['context']['editors']&&_0x4af9be['push'](...this['context']['editors']);for(const _0x5f0d42 of _0x4af9be)for(const _0x16d64e of _0x5f0d42['editing']['view']['domRoots']['values']())if(_0x16d64e['contains'](_0x2316d1))return void _0x5f0d42['editing']['view']['focus']();_0x2316d1['focus']();}};this['listenTo'](this['collection'],'add',(_0xd18df5,_0x5e12b6)=>{this['listenTo'](_0x5e12b6,'escape',_0x16d3b6,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x22c4fc,_0x404248)=>{this['stopListening'](_0x404248,'escape',_0x16d3b6);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1a03b6{['_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(_0x31faff){super(_0x31faff),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2e1daf=this['context']['config'];_0x2e1daf['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2e1daf['define']('comments.maxThreadTotalWeight',0x1f4),_0x2e1daf['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2e1daf['define']('comments.CommentThreadView',gt),_0x2e1daf['define']('comments.CommentView',Tt),_0x2e1daf['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x36543d=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x244017,_0xa9b143)=>this['_addCommentThread'](_0xa9b143)),this['on']('submitCommentThread',(_0x236b48,_0x5305d7)=>this['_submitCommentThread'](_0x5305d7)),this['on']('resolveCommentThread',(_0x23a4ad,_0x275d6d)=>this['_resolveCommentThread'](_0x275d6d)),this['on']('resolveCommentThread',(_0x7f9cb,_0x124102)=>this['_updateActiveAnnotation'](_0x124102),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x57dcaa,_0x4af5e5)=>this['_reopenCommentThread'](_0x4af5e5)),this['on']('reopenCommentThread',(_0x49f897,_0xa00163)=>this['_updateActiveAnnotation'](_0xa00163),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5d4005,_0x271021)=>this['_removeCommentThread'](_0x271021)),this['on']('updateCommentThread',(_0x98cf54,_0x71f290)=>this['_updateCommentThread'](_0x71f290)),this['on']('updateCommentThread',(_0x52f475,_0x1381a5)=>this['_updateActiveAnnotation'](_0x1381a5),{'priority':'lowest'}),this['on']('addComment',(_0x4963b4,_0x4d2df9)=>this['_addComment'](_0x4d2df9)),this['on']('updateComment',(_0x512dee,_0x10d8c2)=>this['_updateComment'](_0x10d8c2)),this['on']('removeComment',(_0x11c013,_0x55cd37)=>this['_removeComment'](_0x55cd37)),this['on']('addComment',(_0x198b7a,{threadId:_0x3fdd3b,isFromAdapter:_0x109c21})=>{if(_0x109c21)return;const _0x50b4b4=this['getCommentThread'](_0x3fdd3b),_0x5375b4=_0x50b4b4&&this['_threadToController']['get'](_0x50b4b4);_0x5375b4&&_0x5375b4['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x36543d,'change:activeAnnotations',(_0x2c84b8,_0x215788,_0x2f2c2a)=>{const _0x2cb71e=Array['from'](_0x2f2c2a)['map'](_0x5a5897=>this['_viewToController']['get'](_0x5a5897['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x2cb71e?_0x2cb71e['model']:null;});}set['adapter'](_0xf5681){if(this['_adapter'])throw new _0x3888cd('commentsrepository-adapter-already-set');this['_adapter']=_0xf5681;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xabd907=_t,threadId:_0x5968cd=_0x2f9c10(),comments:_0x5c9646=[],unlinkedAt:_0x5dac5d=null,resolvedAt:_0x3eb684=null,resolvedBy:_0x196d10=null,target:_0x293859=null,context:_0x13ef55=null,attributes:_0x85560e={},isResolvable:_0x5e2900=!0x0,isSubmitted:_0x2a7385=!0x1,isFromAdapter:_0x37627a=!0x1}={}){return this['fire'](Nt('addCommentThread',_0xabd907),{'channelId':_0xabd907,'threadId':_0x5968cd,'comments':_0x5c9646,'unlinkedAt':_0x5dac5d,'resolvedAt':_0x3eb684,'resolvedBy':_0x196d10,'target':_0x293859,'context':_0x13ef55,'attributes':_0x85560e,'isFromAdapter':_0x37627a,'isResolvable':_0x5e2900,'isSubmitted':_0x2a7385}),this['getCommentThread'](_0x5968cd);}['openNewCommentThread']({channelId:_0x3499b8=_t,threadId:_0x440f91=_0x2f9c10(),target:_0x3b46c0,context:_0x2fcb02=null,isResolvable:_0x3e0a51=!0x0}){if(this['_readOnlyChannels']['has'](_0x3499b8)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3b46c0)throw new _0x3888cd('commentsrepository-missing-target');const _0x3e5c9b=this['addCommentThread']({'channelId':_0x3499b8,'threadId':_0x440f91,'target':_0x3b46c0,'context':_0x2fcb02,'isResolvable':_0x3e0a51});if(!_0x3e5c9b)return null;const _0x2b444c=this['_threadToController']['get'](_0x3e5c9b),_0x446bcd=_0x2b444c['view']['commentThreadInputView']['commentInputView'],_0x5b35c1=this['context']['plugins']['get'](y),_0x567c1e=_0x5b35c1['getByInnerView'](_0x2b444c['view']);return _0x5b35c1['activate'](_0x567c1e),_0x446bcd['once']('editorReady',()=>_0x446bcd['focus']()),_0x3e5c9b;}['hasCommentThread'](_0xc0f4e9){if('string'!=typeof _0xc0f4e9)throw new _0x3888cd('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xc0f4e9);}['updateCommentThread']({channelId:_0xa5e0e9=_t,threadId:_0x52defa,context:_0x197506,unlinkedAt:_0x4c700c,attributes:_0x4615ef,isFromAdapter:_0xc5278f=!0x1}){return this['fire'](Nt('updateCommentThread',_0xa5e0e9),{'channelId':_0xa5e0e9,'threadId':_0x52defa,'context':_0x197506,'unlinkedAt':_0x4c700c,'attributes':_0x4615ef,'isFromAdapter':_0xc5278f}),this['getCommentThread'](_0x52defa);}['getCommentThread'](_0x5d5ad4){if('string'!=typeof _0x5d5ad4)throw new _0x3888cd('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5d5ad4);}['fetchCommentThread']({channelId:_0x6431d7,threadId:_0x533194}={}){const _0x2f7ca8=this['getCommentThread'](_0x533194);if(_0x2f7ca8)return Promise['resolve'](_0x2f7ca8);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3888cd('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x6431d7,'threadId':_0x533194})['then'](_0x1f4a4d=>this['hasCommentThread'](_0x533194)?this['getCommentThread'](_0x533194):_0x1f4a4d?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x6431d7},_0x1f4a4d)):void 0x0)['catch'](_0x17915d=>{throw console['error'](_0x17915d),new _0x3888cd('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x227c85,skipNotAttached:_0x1f8c5e=!0x1,skipEmpty:_0x39183e=!0x1,toJSON:_0x3cab3e=!0x1}={}){const _0x3d32ba=[];for(const _0x46aeeb of this['_threads']['values']())_0x227c85&&_0x46aeeb['channelId']!==_0x227c85||_0x1f8c5e&&!_0x46aeeb['isAttached']||_0x39183e&&0x0===_0x46aeeb['length']||_0x3d32ba['push'](_0x46aeeb);return _0x3cab3e?_0x3d32ba['map'](_0x25996a=>_0x25996a['toJSON']()):_0x3d32ba;}['getAnnotationForCommentThread'](_0x59e2cc){const _0x57df72=this['_threadToController']['get'](_0x59e2cc);if(!_0x57df72)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x57df72['view'])||null;}['getCommentThreadForAnnotation'](_0x51f9d9){const _0x4bc565=this['_viewToController']['get'](_0x51f9d9['innerView']);return _0x4bc565?_0x4bc565['model']:null;}['setActiveCommentThread'](_0x59f0b7){const _0x428637=this['context']['plugins']['get'](y);if(!_0x59f0b7)return void(this['activeCommentThread']&&_0x428637['deactivateAll']());const _0x3efe26=this['getCommentThread'](_0x59f0b7);if(!_0x3efe26)throw new _0x3888cd('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x59f0b7});if(!this['_threadToController']['has'](_0x3efe26))throw new _0x3888cd('commentsrepository-active-not-attached',null,{'threadId':_0x59f0b7});const _0x23bf48=_0x428637['getByInnerView'](this['_threadToController']['get'](_0x3efe26)['view']);_0x428637['activate'](_0x23bf48);}['switchReadOnly'](_0x1dad7f,_0x31598a){_0x1dad7f?this['_readOnlyChannels']['add'](_0x31598a):this['_readOnlyChannels']['delete'](_0x31598a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x26f881){return this['_readOnlyChannels']['has'](_0x26f881)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x495122,_0x59bd18){return new vt(_0x495122,_0x59bd18);}['setPermissions'](_0xf96831,_0x5f2581=_t){this['_permissions']['set'](_0x5f2581,_0xf96831),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x335348=_t){return this['_permissions']['has'](_0x335348)?this['_permissions']['get'](_0x335348):bt;}['_addCommentThread']({channelId:_0x3a1a3d,threadId:_0x559998,comments:_0x34ea3d,unlinkedAt:_0x6c0664,resolvedAt:_0x4df9a3,resolvedBy:_0x5ef210,target:_0x14e41a,context:_0x227a34,attributes:_0x2f81b2,isFromAdapter:_0x31884c,isResolvable:_0x3b5d6c,isSubmitted:_0x2503df}){if('string'!=typeof _0x559998)throw new _0x3888cd('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x559998});if(this['hasCommentThread'](_0x559998))throw new _0x3888cd('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x559998});const _0x487105=new pi(this,{'channelId':_0x3a1a3d,'id':_0x559998,'context':_0x227a34,'attributes':_0x2f81b2,'unlinkedAt':_0x6c0664,'resolvedAt':_0x4df9a3,'resolvedBy':_0x5ef210?this['context']['plugins']['get'](it)['getUser'](_0x5ef210):null,'isResolvable':_0x3b5d6c,'isSubmitted':_0x2503df||_0x31884c});this['_threads']['set'](_0x559998,_0x487105);for(const _0x4ee6d9 of _0x34ea3d)_0x487105['_add'](this['_createNewComment']({'threadId':_0x559998,..._0x4ee6d9}));return _0x14e41a&&_0x487105['attachTo'](_0x14e41a),_0x31884c||!_0x487105['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3a1a3d,'threadId':_0x559998});}['_submitCommentThread']({channelId:_0x435d64,threadId:_0x29c641}){if(!this['hasCommentThread'](_0x29c641))throw new _0x3888cd('commentsrepository-missing-comment-thread',this);const _0x5aa753=this['getCommentThread'](_0x29c641);if(_0x5aa753['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x419bf2,comments:_0x5852b3,resolvedAt:_0x31cbd0,resolvedBy:_0x564e43,context:_0x31e36f,attributes:_0x28e9ab}=_0x5aa753,_0x25ac56=this['context']['plugins']['get']('PendingActions'),_0x5594b8=_0x25ac56['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x435d64,'threadId':_0x419bf2,'comments':_0x5852b3['map'](_0x350767=>_0x350767['toJSON']()),'resolvedAt':_0x31cbd0,'resolvedBy':_0x564e43?_0x564e43['id']:_0x564e43,'context':_0x31e36f,'attributes':_0x28e9ab})['then'](({comments:_0x30b05d})=>{_0x25ac56['remove'](_0x5594b8);for(const _0x3eed1c of _0x30b05d)this['_updateComment']({'channelId':_0x435d64,'threadId':_0x29c641,'commentId':_0x3eed1c['commentId'],'createdAt':_0x3eed1c['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x20a57f=>{throw console['error'](_0x20a57f),new _0x3888cd('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x214c5f,target:_0x59c93c}){const _0x1aad77=this['getCommentThread'](_0x214c5f);if(!_0x1aad77)throw new _0x3888cd('commentsrepository-attach-missing-comment-thread',this);const _0x23de64=this['context']['plugins']['get']('PendingActions'),_0xecf13f=this['context']['plugins']['get'](y),_0x3a3cde=this['_createCommentThreadView'](_0x1aad77),_0x245666=new vt(_0x1aad77,_0x3a3cde);let _0x21dbc2=null;_0x3a3cde['on']('change:isDirty',(_0x5d4d7c,_0x48c025,_0xd7ea3e)=>{_0xd7ea3e?_0x21dbc2=_0x23de64['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x21dbc2&&(_0x23de64['remove'](_0x21dbc2),_0x21dbc2=null);}),this['_threadToController']['set'](_0x1aad77,_0x245666),this['_viewToController']['set'](_0x3a3cde,_0x245666);const _0x38bcf9=new E(this['context']['locale'],_0x3a3cde);_0x38bcf9['bind']('length')['to'](_0x3a3cde),_0x38bcf9['bind']('isDirty')['to'](_0x3a3cde,'isDirty',_0x3a3cde,'length',(_0x61b9c6,_0x2ed4ee)=>_0x61b9c6||!_0x2ed4ee),_0x38bcf9['bind']('isActive')['to'](_0x3a3cde),_0x38bcf9['type']='comment';const _0x399302=new T({'view':_0x38bcf9,'target':_0x59c93c,'type':'comment','isVisible':!_0x1aad77['archivedAt']&&!!('function'==typeof _0x59c93c?_0x59c93c():_0x59c93c)});return _0x3a3cde['on']('escape',()=>{_0x399302['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3a3cde,_0x399302),_0xecf13f['add'](_0x399302),_0x399302;}['_bindAnnotationToEditors'](_0x32a193,_0x94ec78){this['listenTo'](_0x32a193,'editorReady',(_0x2494f4,_0x425c6d)=>{const _0x1ef5c7=_0x425c6d['ui']['view']['body']['bodyCollectionContainer'];_0x94ec78['focusableElements']['add'](_0x1ef5c7),this['context']instanceof _0x403d5f&&this['context']['ui']['focusTracker']['add'](_0x1ef5c7);},{'priority':'highest'}),this['listenTo'](_0x32a193,'editorDestroyed',(_0x52c779,_0x2eda21)=>{const _0x16354d=_0x2eda21['ui']['view']['body']['bodyCollectionContainer'];_0x94ec78['focusableElements']['has'](_0x16354d)&&_0x94ec78['focusableElements']['remove'](_0x16354d),this['context']instanceof _0x403d5f&&this['context']['ui']['focusTracker']['remove'](_0x16354d);});}['_unbindEditors'](_0x29ddda){this['stopListening'](_0x29ddda,'editorReady'),this['stopListening'](_0x29ddda,'editorDestroyed');}['_createCommentThreadView'](_0x21e3a2){const _0xeaca7b=this['context']['plugins']['get'](it),{config:_0xcf586b,locale:_0x4e5c5f}=this['context'],_0x3e25a6=pt(_0xcf586b['get']('locale'),_0x4e5c5f);return new(0x0,(_0xcf586b['get']('comments'))['CommentThreadView'])(_0x4e5c5f,_0x21e3a2,_0xeaca7b['me'],{'editorConfig':{..._0xcf586b['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xcf586b['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xcf586b['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xcf586b['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xcf586b['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3e25a6,'CommentView':_0xcf586b['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x86d80a,channelId:_0x4f83e3,resolvedAt:_0x39faef,resolvedBy:_0x2de846,isFromAdapter:_0x58982f}){if(!this['hasCommentThread'](_0x86d80a))throw new _0x3888cd('commentsrepository-missing-comment-thread',null,{'threadId':_0x86d80a});const _0x20f3de=this['getCommentThread'](_0x86d80a);if(_0x20f3de['isResolved'])throw new _0x3888cd('commentsrepository-resolved-comment-thread',null,{'threadId':_0x86d80a});const _0xfc5524=this['context']['plugins']['get'](it);if(_0x20f3de['resolvedBy']=_0xfc5524['getUser'](_0x2de846),_0x20f3de['resolvedAt']=_0x39faef,_0x58982f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3f14f5=this['context']['plugins']['get']('PendingActions'),_0x2fc199=_0x3f14f5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4f83e3,'threadId':_0x86d80a})['then'](({resolvedAt:_0x182c18,resolvedBy:_0x563f45})=>{_0x3f14f5['remove'](_0x2fc199),_0x20f3de['resolvedBy']['id']!==_0x563f45&&(_0x20f3de['resolvedBy']=_0xfc5524['getUser'](_0x563f45)),_0x20f3de['resolvedAt']=_0x182c18;})['catch'](_0x19ed5c=>{throw console['error'](_0x19ed5c),new _0x3888cd('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2bb6dc,channelId:_0x586253,isFromAdapter:_0xd1f5bf}){if(!this['hasCommentThread'](_0x2bb6dc))throw new _0x3888cd('commentsrepository-missing-comment-thread',null,{'threadId':_0x2bb6dc});const _0x295821=this['getCommentThread'](_0x2bb6dc);if(!_0x295821['isResolved'])throw new _0x3888cd('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2bb6dc});if(_0x295821['resolvedBy']=null,_0x295821['resolvedAt']=null,_0xd1f5bf||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x513066=this['context']['plugins']['get']('PendingActions'),_0x4e6f37=_0x513066['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x586253,'threadId':_0x2bb6dc})['then'](()=>_0x513066['remove'](_0x4e6f37))['catch'](_0x416386=>{throw console['error'](_0x416386),new _0x3888cd('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4a3970,isFromAdapter:_0x30cbef}){const _0x3adbfc=this['getCommentThread'](_0x4a3970);if(!_0x3adbfc)throw new _0x3888cd('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4a3970),this['_threads']['delete'](_0x4a3970),!_0x3adbfc['isSubmitted']||_0x30cbef||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x379dfc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2ee3ae}=_0x3adbfc,_0x1b69aa=_0x379dfc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2ee3ae,'threadId':_0x4a3970})['then'](()=>_0x379dfc['remove'](_0x1b69aa))['catch'](_0x428927=>{throw console['error'](_0x428927),new _0x3888cd('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x382274,unlinkedAt:_0x30b51b,context:_0x42fbc6,attributes:_0x201e2f,isFromAdapter:_0x5d5143}){if('string'!=typeof _0x382274)throw new _0x3888cd('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x382274});if(!this['hasCommentThread'](_0x382274))throw new _0x3888cd('commentsrepository-missing-comment-thread',null,{'threadId':_0x382274});const _0x21802a=this['getCommentThread'](_0x382274);let _0x4ff75c=!0x1;if(void 0x0!==_0x42fbc6&&_0x21802a['context']!==_0x42fbc6&&(_0x21802a['context']=_0x42fbc6,_0x4ff75c=!0x0),void 0x0!==_0x30b51b&&_0x21802a['unlinkedAt']!==_0x30b51b&&(_0x21802a['unlinkedAt']=_0x30b51b,_0x4ff75c=!0x0),_0x201e2f&&!At(_0x201e2f,_0x21802a['attributes'])&&(_0x21802a['attributes']=_0x201e2f,_0x4ff75c=!0x0),!_0x4ff75c)return Promise['resolve']();if(!_0x21802a['isSubmitted']||_0x5d5143||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x37dc73=this['context']['plugins']['get']('PendingActions'),{channelId:_0x485f5b}=_0x21802a,_0x48e398=_0x37dc73['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x485f5b,'threadId':_0x382274,'context':_0x42fbc6,'unlinkedAt':_0x30b51b,'attributes':_0x201e2f})['then'](()=>_0x37dc73['remove'](_0x48e398))['catch'](_0x3225fa=>{throw console['error'](_0x3225fa),new _0x3888cd('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x15eb28){const _0x34cc09=this['context']['plugins']['get'](y),_0x580de4=this['getCommentThread'](_0x15eb28);if(_0x580de4['_isAttached']=!0x1,this['_threadToController']['has'](_0x580de4)){const _0x238143=this['_threadToController']['get'](_0x580de4),_0x2941fa=_0x238143['view'],_0x485aab=_0x34cc09['getByInnerView'](_0x2941fa);this['_threadToController']['delete'](_0x580de4),this['_viewToController']['delete'](_0x2941fa),_0x485aab&&_0x34cc09['remove'](_0x485aab),_0x238143['destroy'](),_0x2941fa['destroy']()['then'](()=>{this['_unbindEditors'](_0x2941fa);});}}['_updateActiveAnnotation']({threadId:_0x4c2fbe,resolvedAt:_0x5cc994,unlinkedAt:_0x1ea0e4}){const _0x2b3183=!!_0x5cc994,_0x19dbdf=this['context']['plugins']['get'](y),_0x4f4708=this['getCommentThread'](_0x4c2fbe);if(this['_threadToController']['has'](_0x4f4708)){const _0x2bd558=this['_threadToController']['get'](_0x4f4708)['view'],_0x2e5372=_0x19dbdf['getByInnerView'](_0x2bd558);_0x2e5372&&(_0x2b3183&&_0x19dbdf['_removeActiveAnnotation'](_0x2e5372),_0x1ea0e4?_0x2e5372['isVisible']=!0x1:_0x2e5372['refreshVisibility']());}}['_getExternalAuthor'](_0x56a020){const _0x5065a4=this['context']['plugins']['get'](it),_0x388e7a=It('external:'+_0x56a020),_0x54aadf=_0x5065a4['getUser'](_0x388e7a);return _0x54aadf||_0x5065a4['addUser']({'id':_0x388e7a,'name':_0x56a020});}['_createNewComment']({threadId:_0x105564,commentId:_0x43d875=_0x2f9c10(),content:_0x40f56b,authorId:_0x180002,createdAt:_0x1cb0c5,attributes:_0x4e1f90}){if('string'!=typeof _0x43d875)throw new _0x3888cd('commentsrepository-invalid-commentid');if('string'!=typeof _0x180002)throw new _0x3888cd('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x40f56b||!_0x40f56b['trim']())throw new _0x3888cd('commentsrepository-invalid-comment-content');const _0x53c702=this['context']['plugins']['get'](it)['getUser'](_0x180002);if(!_0x53c702)throw new _0x3888cd('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x180002});let _0x57c138=null,_0x3dee01=_0x1cb0c5;return _0x4e1f90?.['@external']&&(_0x57c138=this['_getExternalAuthor'](_0x4e1f90['@external']['authorName']),_0x3dee01=new Date(_0x4e1f90['@external']['createdAt'])),new wi(this,{'threadId':_0x105564,'id':_0x43d875,'author':_0x57c138||_0x53c702,'creator':_0x53c702,'content':_0x40f56b,'createdAt':_0x1cb0c5,'authoredAt':_0x3dee01,'attributes':_0x4e1f90});}['_addComment'](_0x5a0aaf){let {threadId:_0x223c18,content:_0x16273b,attributes:_0x11dd13,isFromAdapter:_0x44a4f6}=_0x5a0aaf;const _0x3404a9=this['getCommentThread'](_0x5a0aaf['threadId']);if(!_0x3404a9)throw new _0x3888cd('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x37de5a=this['_createNewComment'](_0x5a0aaf),{id:_0x694b34}=_0x37de5a;if(_0x3404a9['_add'](_0x37de5a),_0x44a4f6||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3404a9['isSubmitted'])return Promise['resolve']();const _0x499355=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2e24bd}=_0x3404a9,_0x3d2ce5=_0x499355['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x11dd13||(_0x11dd13={}),this['adapter']['addComment']({'channelId':_0x2e24bd,'threadId':_0x223c18,'commentId':_0x694b34,'content':_0x16273b,'attributes':_0x11dd13})['then'](_0x11db41=>{_0x499355['remove'](_0x3d2ce5),_0x11db41&&this['_updateComment']({'channelId':_0x2e24bd,'threadId':_0x223c18,'commentId':_0x694b34,'createdAt':_0x11db41['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x25da48=>{throw console['error'](_0x25da48),new _0x3888cd('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4b0fe9,commentId:_0xf1884c,content:_0x214fb5,createdAt:_0x3ea924,attributes:_0x202531,isFromAdapter:_0x54245d}){if(void 0x0!==_0x214fb5&&('string'!=typeof _0x214fb5||!_0x214fb5['trim']()['length']))throw new _0x3888cd('commentsrepository-update-comment-invalid-content');const _0x4f8889=this['getCommentThread'](_0x4b0fe9),_0x366675=_0x4f8889['getComment'](_0xf1884c);if(!_0x366675)throw new _0x3888cd('commentsrepository-update-missing-comment',this);let _0x531e5f=!0x1;if(_0x214fb5&&_0x214fb5!==_0x366675['content']&&(_0x366675['isEditable']||_0x54245d)&&(_0x366675['content']=_0x214fb5,_0x531e5f=!0x0),_0x3ea924&&_0x3ea924!==_0x366675['createdAt']&&(_0x366675['createdAt']=_0x3ea924,_0x366675['attributes']&&_0x366675['attributes']['@external']||(_0x366675['authoredAt']=_0x3ea924),_0x531e5f=!0x0),_0x202531&&!At(_0x202531,_0x366675['attributes'])&&(_0x366675['attributes']=_0x202531,_0x531e5f=!0x0),!_0x531e5f)return Promise['resolve']();if(_0x4f8889['fire']('commentUpdated'),_0x54245d||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2a7592=this['context']['plugins']['get']('PendingActions'),{channelId:_0x37a8ad}=this['getCommentThread'](_0x366675['threadId']),_0x1826b7=_0x2a7592['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x37a8ad,'threadId':_0x4b0fe9,'commentId':_0xf1884c,'content':_0x214fb5,'attributes':_0x202531})['then'](()=>_0x2a7592['remove'](_0x1826b7))['catch'](_0x98a6e4=>{throw console['error'](_0x98a6e4),new _0x3888cd('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xc50efa,commentId:_0x1f19d8,isFromAdapter:_0x78204}){const _0xcbef74=this['getCommentThread'](_0xc50efa),_0x5c4d2f=_0xcbef74['getComment'](_0x1f19d8);if(!_0x5c4d2f)throw new _0x3888cd('commentsrepository-remove-missing-comment',this);if(_0xcbef74['_remove'](_0x5c4d2f),_0x78204||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xcdb8dc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3f0544}=_0xcbef74,_0x4ac605=_0xcdb8dc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3f0544,'threadId':_0xc50efa,'commentId':_0x1f19d8})['then'](()=>_0xcdb8dc['remove'](_0x4ac605))['catch'](_0x19b0e2=>{throw console['error'](_0x19b0e2),new _0x3888cd('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
- _0x36005d(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3a1c53,_0x53dbf9){super();const _0x578b2e=_0x53dbf9['isResolvable'];this['channelId']=_0x53dbf9['channelId'],this['id']=_0x53dbf9['id'],this['comments']=new _0x55c097(),this['_repository']=_0x3a1c53,this['_isAttached']=!0x1,this['_isSubmitted']=_0x53dbf9['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3a1c53,'_permissions',_0x3a1c53,'_readOnlyChannels',()=>_0x3a1c53['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3a1c53,'_permissions',()=>_0x3a1c53['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3a1c53,'_permissions',()=>{const _0x58cfc1=_0x3a1c53['getPermissions'](this['channelId']);return _0x58cfc1['write']||_0x58cfc1['admin'];}),this['bind']('isResolvable')['to'](_0x3a1c53,'_permissions',()=>_0x578b2e&&_0x3a1c53['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x53dbf9['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4a6b1c,_0x34e698)=>_0x4a6b1c?_0x34e698?_0x4a6b1c<_0x34e698?_0x4a6b1c:_0x34e698:_0x4a6b1c:_0x34e698),this['set']('unlinkedAt',_0x53dbf9['unlinkedAt']||null),this['set']('resolvedAt',_0x53dbf9['resolvedAt']||null),this['set']('resolvedBy',_0x53dbf9['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x3e37e3=>!!_0x3e37e3),this['set']('attributes',_0x53dbf9['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x52665a,_0x1dbac2)=>_0x52665a+_0x1dbac2['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x51e9c,id:_0x324ba2}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x51e9c),{'channelId':_0x51e9c,'threadId':_0x324ba2});}['setUnlinkedAt'](_0x182044){this['_update']({'unlinkedAt':_0x182044});}['resolve']({resolvedAt:_0x54b582=new Date(),resolvedBy:_0x2c8a33=null,isFromAdapter:_0x89467a=!0x1}={}){const _0x4924e6=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x2e4345,id:_0x1e8c79}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x2e4345),{'channelId':_0x2e4345,'threadId':_0x1e8c79,'resolvedAt':_0x54b582,'resolvedBy':_0x2c8a33||_0x4924e6['id'],'isFromAdapter':_0x89467a});}['reopen']({isFromAdapter:_0x247874=!0x1}={}){const {channelId:_0x459e41,id:_0x44de00}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x459e41),{'channelId':_0x459e41,'threadId':_0x44de00,'isFromAdapter':_0x247874});}['setContext'](_0x1a1a6c){this['context']||this['_update']({'context':_0x1a1a6c});}['setAttribute'](_0x50f72f,_0x58899c){const _0xb65fa1=wt(this['attributes']);yt(_0xb65fa1,_0x50f72f,_0x58899c),this['_update']({'attributes':_0xb65fa1});}['removeAttribute'](_0x592f8a){const _0x512ee8=wt(this['attributes']);Ct(_0x512ee8,_0x592f8a),this['_update']({'attributes':_0x512ee8});}['remove']({isFromAdapter:_0x1db384=!0x1}={}){const {channelId:_0x3c60c8,id:_0x5d030a}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x3c60c8),{'channelId':_0x3c60c8,'threadId':_0x5d030a,'isFromAdapter':_0x1db384});}['attachTo'](_0x40ed6f){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x40ed6f});}['addComment'](_0x34f957){const {channelId:_0x35b219,id:_0x562482}=this;this['_repository']['fire'](Nt('addComment',_0x35b219,_0x562482),Object['assign']({'channelId':_0x35b219,'threadId':_0x562482},_0x34f957));}['getComment'](_0x100773){if('string'!=typeof _0x100773)throw new _0x3888cd('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x100773});return this['comments']['get'](_0x100773);}['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'](_0xcfa8de=>_0xcfa8de['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2f7acb){return this['listenTo'](_0x2f7acb,'change:authoredAt',()=>{const _0x4ae68b=this['_findOptimalIndex'](_0x2f7acb),_0x4ceae9=this['comments'];_0x4ae68b-0x1!=_0x4ceae9['getIndex'](_0x2f7acb)&&_0x4ae68b+0x1!=_0x4ceae9['getIndex'](_0x2f7acb)&&(this['_remove'](_0x2f7acb),this['_add'](_0x2f7acb));}),this['comments']['add'](_0x2f7acb,this['_findOptimalIndex'](_0x2f7acb));}['_update'](_0x1f7191){const {channelId:_0x3f22c5,id:_0x42faea}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x3f22c5),{..._0x1f7191,'channelId':_0x3f22c5,'threadId':_0x42faea});}['_remove'](_0x4a11d2){return this['stopListening'](_0x4a11d2),_0x4a11d2['destroy'](),this['comments']['remove'](_0x4a11d2);}['_findOptimalIndex'](_0x5da524){const _0x16b5b3=this['comments']['find'](_0x2d3e3c=>new Date(_0x2d3e3c['authoredAt'])['getTime']()>new Date(_0x5da524['authoredAt'])['getTime']());return _0x16b5b3?this['comments']['getIndex'](_0x16b5b3):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
- _0x36005d(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x4f3adc,_0x46bab7){super();const _0x9e98d7=_0x4f3adc['context']['plugins']['get'](it)['me'],_0x3c36f9=_0x4f3adc['getCommentThread'](_0x46bab7['threadId']),_0x467fa8=0x0===_0x3c36f9['comments']['length'],_0x3d0310=_0x9e98d7===_0x46bab7['author'];this['id']=_0x46bab7['id'],this['threadId']=_0x46bab7['threadId'],this['author']=_0x46bab7['author'],this['creator']=_0x46bab7['creator'],this['isExternal']=Boolean(_0x46bab7['attributes']&&_0x46bab7['attributes']['@external']),this['set']('content',_0x46bab7['content']),this['createdAt']=_0x46bab7['createdAt']||new Date(),this['set']('authoredAt',_0x46bab7['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3c36f9,'resolvedAt'),this['set']('attributes',_0x46bab7['attributes']||{}),this['bind']('isEditable')['to'](_0x4f3adc,'_permissions',()=>{const _0xcbcbef=_0x4f3adc['getPermissions'](_0x3c36f9['channelId'])['write'],_0x6df944=_0x4f3adc['getPermissions'](_0x3c36f9['channelId'])['modifyAll'];return _0x3d0310&&_0xcbcbef||!_0x3d0310&&_0x6df944;}),this['bind']('isRemovable')['to'](_0x3c36f9,'isRemovable',_0x4f3adc,'_permissions',_0x1beaec=>{const _0x351ff8=_0x4f3adc['getPermissions'](_0x3c36f9['channelId'])['write'],_0x2bfd09=_0x4f3adc['getPermissions'](_0x3c36f9['channelId'])['modifyAll'];return _0x3d0310&&_0x351ff8||_0x1beaec&&_0x467fa8||!_0x3d0310&&_0x2bfd09&&!_0x467fa8;}),this['bind']('isReadOnly')['to'](_0x3c36f9,'isReadOnly'),this['_repository']=_0x4f3adc;}get['weight'](){return Math['max'](function(_0x115686){const _0x175656=document['createElement']('div');return _0x175656['innerHTML']=_0x115686,_0x175656['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3fd022){const {threadId:_0x5a8932,id:_0x43ce72}=this;if(!this['_repository']['hasCommentThread'](_0x5a8932))throw new _0x3888cd('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x136681}=this['_repository']['getCommentThread'](_0x5a8932);this['_repository']['fire'](Nt('updateComment',_0x136681,_0x5a8932),{'channelId':_0x136681,'threadId':_0x5a8932,'commentId':_0x43ce72,..._0x3fd022});}['setAttribute'](_0x1a4b41,_0x483ec6){const _0x33541d=wt(this['attributes']);yt(_0x33541d,_0x1a4b41,_0x483ec6),this['update']({'attributes':_0x33541d});}['removeAttribute'](_0x2d742a){const _0x343bbd=wt(this['attributes']);Ct(_0x343bbd,_0x2d742a),this['update']({'attributes':_0x343bbd});}['remove'](_0x42f486={}){if(!_0x42f486['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2db9c7,id:_0xe166a}=this;if(!this['_repository']['hasCommentThread'](_0x2db9c7))throw new _0x3888cd('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x271f82}=this['_repository']['getCommentThread'](_0x2db9c7);this['_repository']['fire'](Nt('removeComment',_0x271f82,_0x2db9c7),{'channelId':_0x271f82,'threadId':_0x2db9c7,'commentId':_0xe166a,..._0x42f486});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x2ca6da,..._0x426651){for(const _0x4fd212 of _0x426651)void 0x0!==_0x4fd212&&(_0x2ca6da+=':'+String(_0x4fd212));return _0x2ca6da;}class ot extends _0x491be9{constructor(_0x93552d){super(_0x93552d),this['set']('hasContent',!0x1);}['refresh'](){const _0x2fa8a2=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x159e27 of _0x2fa8a2['getRanges']())if(this['_hasContent'](_0x159e27))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3c5618=_0x2f9c10(),ranges:_0xe5c556,comment:_0x44bc9e}={}){const _0x11ee25=this['editor']['model'],_0x422798=_0xe5c556??Array['from'](_0x11ee25['document']['selection']['getRanges']()),_0x3ce3de=[];for(const _0x1ae68f of _0x422798)this['_hasContent'](_0x1ae68f)&&_0x3ce3de['push'](this['_trimToContent'](_0x1ae68f));if(!_0x3ce3de['length'])throw new _0x3888cd('addcommentthreadcommand-incorrect-ranges',null);_0x44bc9e&&this['_createCommentThread'](_0x3c5618,_0x44bc9e),this['_createMarkersFromRanges'](_0x3c5618,_0x3ce3de,!!_0x44bc9e);}['_createMarkersFromRanges'](_0x3463d1,_0x423c9a,_0x2fef3c){this['editor']['model']['change'](_0x22bc20=>{for(const _0x2ef68e of _0x423c9a){const _0x3328c2=_0x2f9c10()['substr'](0x1,0x5),_0x19db78='comment:'+_0x3463d1+':'+_0x3328c2;_0x22bc20['addMarker'](_0x19db78,{'range':_0x2ef68e,'usingOperation':_0x2fef3c,'affectsData':_0x2fef3c});}});}['_createCommentThread'](_0x425c8a,_0x441370){const _0x3a4cad=this['editor']['plugins']['get']('CommentsRepository'),_0x6bffb0=this['editor']['config']['get']('collaboration.channelId'),_0x251207=this['editor']['plugins']['get']('Users')['me'];if(!_0x251207)throw new _0x3888cd('addcommentthreadcommand-user-not-found',null);_0x3a4cad['addCommentThread']({'threadId':_0x425c8a,'channelId':_0x6bffb0,'comments':[{'authorId':_0x251207['id'],'content':_0x441370,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x45f5c7){for(const _0x393a34 of _0x45f5c7['getItems']())if(this['_itemIsContent'](_0x393a34))return!0x0;return!0x1;}['_itemIsContent'](_0xa5ad98){return _0xa5ad98['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xa5ad98)&&!_0xa5ad98['is']('element','tableCell');}['_trimToContent'](_0x1ac037){const _0x1ae939=_0x1baf96=>!this['_itemIsContent'](_0x1baf96['item']),_0x5d5a8b=_0x1ac037['start']['getLastMatchingPosition'](_0x1ae939),_0x4cb51e=_0x1ac037['end']['getLastMatchingPosition'](_0x1ae939,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5d5a8b,_0x4cb51e);}}class b extends _0x22a428{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdc94f5){super(_0xdc94f5),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x191abe=this['editor'],_0x521146=_0x191abe['model']['document']['selection'],_0x35616c=_0x107550(()=>this['refreshSelectedViews'](),0xa);_0x521146['on']('change:range',(_0x5f56bd,_0x1e6cbc)=>{_0x1e6cbc['directChange']&&(_0x35616c['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x191abe['editing']['view']['document'],'change:isFocused',(_0x174b47,_0x3c81e3,_0x4ca868)=>{_0x4ca868&&_0x35616c();}),this['listenTo'](_0x191abe['ui']['focusTracker'],'change:isFocused',(_0x189183,_0x24ca01,_0x33c2d7)=>{_0x33c2d7||this['fire']('blur',{'isAnnotationTracked':_0x2473ce=>this['_editorAnnotationsData']['has'](_0x2473ce['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x18aff7){if(this['_editorAnnotations']['has'](_0x18aff7['view']))return;this['_editorAnnotations']['add'](_0x18aff7['view']),this['editor']['ui']['focusTracker']['add'](_0x18aff7['view']['element']);const _0x591494=this['editor']['plugins']['get'](y);this['listenTo'](_0x591494['collection'],'remove',(_0x10d6bb,_0x1c27bc)=>{this['editor']['ui']['focusTracker']['remove'](_0x1c27bc['view']['element']),this['_editorAnnotations']['delete'](_0x1c27bc['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x3f643e){if('function'!=typeof _0x3f643e)throw new _0x3888cd('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x3f643e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x39823d,annotations:_0x54db34}){const _0x42ebaa=[],_0x58493e=this['editor']['model']['document']['selection'],_0x55c25b=Array['from'](_0x58493e['getRanges']());for(const [_0x1e4c06,_0xb4a586]of this['_editorAnnotationsData']){const _0x5ac613=_0x20f943(_0xb4a586),_0x423b7e=_0x54db34['getByInnerView'](_0x1e4c06);_0x5ac613&&_0x423b7e&&_0x42ebaa['push']({'annotation':_0x423b7e,'range':_0x5ac613});}function _0x20f943(_0x237ddd){for(const _0x3c9ba7 of _0x237ddd)for(const _0x206b03 of _0x55c25b)if(_0x3c9ba7['containsRange'](_0x206b03,!_0x58493e['isCollapsed']))return _0x3c9ba7;return null;}return _0x42ebaa['sort']((_0xf943ef,_0x6f91b5)=>{const _0x229828=_0xf943ef['range'],_0x18502f=_0x6f91b5['range'];if(!_0x229828['isEqual'](_0x18502f)){if(_0x229828['containsRange'](_0x18502f,!0x0))return 0x1;if(_0x18502f['containsRange'](_0x229828,!0x0))return-0x1;}return _0xf943ef['annotation']==_0x39823d?-0x1:_0x6f91b5['annotation']==_0x39823d?0x1:0x0;})['map'](_0x3ddb22=>_0x3ddb22['annotation']);}get['_editorAnnotationsData'](){const _0x1955df=new Map();for(const _0x4a9b0f of Array['from'](this['_dataCollectors']))for(const [_0x307643,_0x2d53b3]of _0x4a9b0f())_0x1955df['set'](_0x307643,_0x2d53b3);return _0x1955df;}}class st extends _0x22a428{['afterInit'](){const _0x308e60=this['editor'];if(!_0x308e60['plugins']['has']('RestrictedEditingModeEditing'))return;_0x308e60['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x22a428{constructor(_0x41e219){super(_0x41e219),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2ebbdb=this['editor'],_0x509d18=_0x2ebbdb['commands']['get']('importWord'),_0x4a5fcc=_0x2ebbdb['plugins']['get'](it);_0x509d18&&(_0x509d18['on']('execute',(_0x1a20ec,[,_0x476eae])=>{_0x476eae['collaboration_features']={'comments':!0x0,'user_id':_0x4a5fcc['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x509d18,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4601d1,_0x2c10c9){const {comment_threads:_0x380f80}=_0x2c10c9;_0x380f80&&_0x380f80['forEach'](({thread_id:_0x1d73dc,comments:_0x5b9eb8,is_resolved:_0x12f71c})=>{const _0x4da9bc=new Date(),_0x5f3508=_0x5b9eb8['map'](({author:_0x3ce959,content:_0x536f8d,created_at:_0x5da9aa})=>({'content':_0x536f8d,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x4da9bc,'attributes':{'@external':{'authorName':_0x3ce959,'createdAt':_0x5da9aa?new Date(_0x5da9aa):new Date(),'source':'importWord'}}})),_0x2a25b5=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x2a25b5,'threadId':_0x1d73dc,'comments':_0x5f3508,'resolvedAt':_0x12f71c?_0x4da9bc:null});});}}class at extends _0x22a428{constructor(_0x210558){super(_0x210558),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5a7f77=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5a7f77,'contentInsertion',(_0x5616e5,_0x38e6c4)=>this['_removeMarkersWithoutThreads'](_0x38e6c4['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4583ac){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4583ac;const _0x4fb3d4=this['editor']['plugins']['get']('CommentsRepository');for(const _0x184ad3 of _0x4583ac['keys']()){const [_0x23bfc6,_0x1e1b1e]=_0x184ad3['split'](':');'comment'!=_0x23bfc6||_0x4fb3d4['hasCommentThread'](_0x1e1b1e)||_0x4583ac['delete'](_0x184ad3);}return _0x4583ac;}['_registerMarkerInClipboardPipeline'](){const _0x36a0c2=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x181443=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x181443&&_0x36a0c2['_registerMarkerToCopy']('comment',_0x181443);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x403d48){switch(_0x403d48){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x226a50){const _0x2946e5=_0x226a50['split'](':');return{'group':_0x2946e5[0x0],'id':_0x2946e5[0x1],'part':_0x2946e5[0x2]};}class ut extends _0x22a428{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x52bd77,_0x4cff0f)=>{if(!_0x4cff0f['options']['showCommentHighlights'])return null;if(_0x4cff0f['options']['ignoreResolvedComments']){const {id:_0x51f51f}=ft(_0x52bd77['markerName']),_0x3cb5d3=this['editor']['plugins']['get'](o);if(_0x3cb5d3['getCommentThread'](_0x51f51f)?.['isResolved']&&_0x52bd77['item'])return _0x4cff0f['consumable']['consume'](_0x52bd77['item'],'addMarker:'+_0x52bd77['markerName']),_0x4cff0f['consumable']['consume'](_0x52bd77['item'],'removeMarker:'+_0x52bd77['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x332fff=>{_0x332fff['on']('addMarker:comment',(_0x4ee6c0,_0x3d2e3e,_0xd92504)=>{if(!_0xd92504['options']['showCommentHighlights'])return;const _0x5e575c=_0x3d2e3e['item'];if(!_0x5e575c)return;const _0x5dc108=_0xd92504['mapper']['toViewElement'](_0x5e575c);this['editor']['model']['schema']['isObject'](_0x5e575c)&&_0x5dc108&&!_0x5dc108['getCustomProperty']('widget')&&_0x5dc108['is']('containerElement')&&_0x27576a(_0x5dc108,_0xd92504['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x34141f,{writer:_0x39d0be,options:_0x57bef0})=>{if(!_0x57bef0['showCommentHighlights'])return null;const _0x57804f=_0x39d0be['createContainerElement']('div'),_0x3ebd6a=_0x39d0be['createEmptyElement']('hr');return _0x39d0be['addClass']('ck-horizontal-line',_0x57804f),_0x39d0be['insert'](_0x39d0be['createPositionAt'](_0x57804f,0x0),_0x3ebd6a),_0x57804f;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x462f52,{writer:_0x4fa47d,options:_0x294715})=>{if(!_0x294715['showCommentHighlights'])return null;const _0x150354=_0x4fa47d['createContainerElement']('span'),_0x14eb9a=_0x4fa47d['createEmptyElement']('img');return _0x4fa47d['addClass']('image-inline',_0x150354),_0x4fa47d['insert'](_0x4fa47d['createPositionAt'](_0x150354,0x0),_0x14eb9a),_0x150354;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2f9d95,{writer:_0xb3bccf,options:_0x42612d})=>{if(_0x42612d['showCommentHighlights'])return _0xb3bccf['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4cbc84,_0xfbac0f,_0x59e7ef)=>{_0x59e7ef['options']['showCommentHighlights']&&_0x4cbc84['stop']();},{'priority':'high'});}}class r extends _0x22a428{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(_0x1f501b){super(_0x1f501b),this['set']('isThreadsLoadingPaused',!0x0),_0x1f501b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x334152,_0x176188,_0x8445f,_0x43d3e7)=>{const _0x1bc573=_0x1f501b['plugins']['get'](o),_0x5175c9=_0x8445f?ft(_0x8445f)['id']:null;_0x1f501b['model']['change'](()=>{if(_0x5175c9){const _0x53ae73=this['getAllMarkersForId'](_0x5175c9);for(const _0x3b838c of _0x53ae73)_0x1f501b['editing']['reconvertMarker'](_0x3b838c);}if(_0x43d3e7){const {id:_0x4c4cb5}=ft(_0x43d3e7),_0x2eb128=_0x1bc573['getCommentThread'](_0x4c4cb5);if(_0x2eb128&&_0x2eb128['unlinkedAt'])return;if(_0x2eb128&&!_0x2eb128['isAttached'])return;const _0x35963e=this['getAllMarkersForId'](_0x4c4cb5);for(const _0x37d64e of _0x35963e)_0x1f501b['editing']['reconvertMarker'](_0x37d64e);}}),_0x5175c9&&this['scrollToThreadMarker'](_0x5175c9);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x229818=this['editor'],_0x28dee4=_0x229818['plugins']['get'](o),_0x47d14a=_0x229818['config']['get']('collaboration.channelId'),_0x1fefa3=_0x28dee4['getCommentThreads']()['filter'](_0x3753da=>_0x3753da['channelId']!==_0x47d14a);_0x229818['commands']['add']('addCommentThread',new ot(_0x229818)),this['listenTo'](_0x229818,'change:isReadOnly',(_0x6cc771,_0x2ef36c,_0x5ba7f7)=>{_0x28dee4['switchReadOnly'](_0x5ba7f7,_0x229818['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x28dee4,dt('addCommentThread',_0x47d14a),(_0x193c28,{threadId:_0x431971})=>{const _0x4435c2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x431971);_0x4435c2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x431971);}),this['listenTo'](_0x28dee4,dt('removeCommentThread',_0x47d14a),(_0x21481f,{threadId:_0x59bc73})=>{_0x229818['model']['enqueueChange']({'isUndoable':!0x1},_0x188b4a=>{const _0x285625=this['getAllMarkersForId'](_0x59bc73);for(const _0xfa8634 of _0x285625)_0x188b4a['removeMarker'](_0xfa8634);});}),this['listenTo'](_0x28dee4,dt('resolveCommentThread',_0x47d14a),(_0x475288,{threadId:_0x26b7e2})=>{(this['_reconvertMarkers'](_0x26b7e2),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x26b7e2)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x28dee4,dt('reopenCommentThread',_0x47d14a),(_0x38d818,{threadId:_0x2000b8})=>{this['_reconvertMarkers'](_0x2000b8);},{'priority':'low'}),this['listenTo'](_0x28dee4,dt('addComment',_0x47d14a),(_0x388459,{threadId:_0x584949,isFromAdapter:_0x23cb49})=>{const _0x19ba79=this['getAllMarkersForId'](_0x584949);if(_0x23cb49||0x0==_0x19ba79['length']||!_0x28dee4['hasCommentThread'](_0x584949))return;0x1===_0x28dee4['getCommentThread'](_0x584949)['length']&&_0x229818['model']['enqueueChange']({'isUndoable':!0x1},_0x139f5e=>{for(const _0x5a46fc of _0x19ba79)_0x139f5e['updateMarker'](_0x5a46fc,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1fefa3);}['afterInit'](){!async function(_0xd10946){const _0x4a7c51=_0x12bc8c([0x32,0x67,0x6f,0x54,0x47,0x61,0x52,0x5a,0x70,0x33,0x46,0x6b,0x48,0x6c,0x42,0x4b,0x6a,0x71,0x44,0x6d,0x4a,0x4d,0x58,0x50,0x63,0x74,0x64,0x39,0x59,0x62,0x51,0x68,0x4e,0x77,0x45,0x37,0x79,0x41,0x30,0x56,0x53,0x66,0x34,0x31,0x78,0x36,0x49,0x4f,0x65,0x75,0x6e,0x55,0x35,0x72,0x38,0x69,0x43,0x76,0x4c,0x57,0x7a,0x73]),_0x55c347=0x57d7d8af,_0x15c858=0x57d0b757^_0x55c347,_0xabe448=window[_0x12bc8c([0x44,0x61,0x74,0x65])][_0x12bc8c([0x6e,0x6f,0x77])](),_0x434189=_0xd10946[_0x12bc8c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3d6d50=new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4da332=>{_0x434189[_0x12bc8c([0x6f,0x6e,0x63,0x65])](_0x12bc8c([0x72,0x65,0x61,0x64,0x79]),_0x4da332);}),_0x37c932={[_0x12bc8c([0x6b,0x74,0x79])]:_0x12bc8c([0x45,0x43]),[_0x12bc8c([0x75,0x73,0x65])]:_0x12bc8c([0x73,0x69,0x67]),[_0x12bc8c([0x63,0x72,0x76])]:_0x12bc8c([0x50,0x2d,0x32,0x35,0x36]),[_0x12bc8c([0x78])]:_0x12bc8c([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]),[_0x12bc8c([0x79])]:_0x12bc8c([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]),[_0x12bc8c([0x61,0x6c,0x67])]:_0x12bc8c([0x45,0x53,0x32,0x35,0x36])},_0x294b78=_0x434189[_0x12bc8c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x12bc8c([0x67,0x65,0x74])](_0x12bc8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4126b9(){let _0x47cec3,_0x2bca5f=null,_0x3c64e3=null;try{if(_0x294b78==_0x12bc8c([0x47,0x50,0x4c]))return _0x12bc8c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x47cec3=_0x380881(),!_0x47cec3)return _0x12bc8c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x47cec3[_0x12bc8c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3c64e3=_0x2795b9(_0x47cec3[_0x12bc8c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x47cec3[_0x12bc8c([0x6a,0x74,0x69])])),await _0x2a5632()?_0x46fa25()?_0x1bc0c0()?_0x12bc8c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x361dbf()?(_0x47cec3[_0x12bc8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12bc8c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2bca5f=_0x1fc522(_0x12bc8c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x47cec3[_0x12bc8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12bc8c([0x74,0x72,0x69,0x61,0x6c])&&(_0x2bca5f=_0x1fc522(_0x12bc8c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3d37d8()):_0x12bc8c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x12bc8c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x12bc8c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x12bc8c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1bc0c0(){const _0x3af79f=[_0x12bc8c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x12bc8c([0x74,0x72,0x69,0x61,0x6c])][_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cec3[_0x12bc8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xabe448/0x3e8:0xe10*_0x15c858;return _0x47cec3[_0x12bc8c([0x65,0x78,0x70])]<_0x3af79f;}function _0x46fa25(){const _0x2076d4=_0x47cec3[_0x12bc8c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2076d4)return!0x1;if(_0x2076d4[_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12bc8c([0x2a])))return!0x0;if(_0x2076d4[_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12bc8c([0x43,0x4d,0x54])))return!0x0;if(_0x2076d4[_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12bc8c([0x52,0x43,0x4d,0x54]))){if(_0x2afc3e())return!0x0;if(_0x1899ae()||_0x1a03e7())return!0x0;}return!0x1;}function _0x361dbf(){const _0x30961=_0x47cec3[_0x12bc8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x30961||0x0==_0x30961[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5c63ea}=new URL(window[_0x12bc8c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x30961[_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c63ea))return!0x0;const _0x54da22=_0x5c63ea[_0x12bc8c([0x73,0x70,0x6c,0x69,0x74])](_0x12bc8c([0x2e]));return _0x30961[_0x12bc8c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x399c26=>_0x399c26[_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12bc8c([0x2a])))[_0x12bc8c([0x6d,0x61,0x70])](_0x448327=>_0x448327[_0x12bc8c([0x73,0x70,0x6c,0x69,0x74])](_0x12bc8c([0x2e])))[_0x12bc8c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fcfa9=>_0x1fcfa9[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x54da22[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x12bc8c([0x6d,0x61,0x70])](_0x4914eb=>Array(_0x54da22[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4914eb[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x12bc8c([0x66,0x69,0x6c,0x6c])](_0x4914eb[0x0]===_0x12bc8c([0x2a])?_0x12bc8c([0x2a]):'')[_0x12bc8c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4914eb))[_0x12bc8c([0x73,0x6f,0x6d,0x65])](_0x4cfefd=>_0x54da22[_0x12bc8c([0x65,0x76,0x65,0x72,0x79])]((_0x172cd8,_0x525293)=>_0x4cfefd[_0x525293]===_0x172cd8||_0x4cfefd[_0x525293]===_0x12bc8c([0x2a])));}function _0x3d37d8(){return _0x2bca5f&&_0x3c64e3?new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x59ef75,_0x4c279b)=>{_0x2bca5f[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x59ef75,_0x4c279b),_0x3c64e3[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x53ef72=>{_0x53ef72!=_0x12bc8c([0x56,0x61,0x6c,0x69,0x64])&&_0x59ef75(_0x53ef72);},_0x4c279b);}):_0x2bca5f||_0x3c64e3||_0x12bc8c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2795b9(_0x1bda87,_0x763689){return new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x6d6ddb=>{if(_0x262aef())return _0x6d6ddb(_0x12bc8c([0x56,0x61,0x6c,0x69,0x64]));_0x271001(),_0x434189[_0x12bc8c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x12bc8c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2af2d7=!0x1;const _0x2d0f5e=_0x2f9c10();function _0x5357ab(_0x1f2a68){return!!_0x1f2a68&&(typeof _0x1f2a68===_0x12bc8c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1f2a68===_0x12bc8c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1f2a68[_0x12bc8c([0x74,0x68,0x65,0x6e])]===_0x12bc8c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1f2a68[_0x12bc8c([0x63,0x61,0x74,0x63,0x68])]===_0x12bc8c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2cbfea(_0x4a02c6){_0x35e01d(_0x4a02c6)[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x2158cd=>{if(!_0x2158cd||_0x2158cd[_0x12bc8c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x12bc8c([0x6f,0x6b]))return _0x12bc8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x40a036(_0x39db05(_0x2d0f5e+_0x763689))!=_0x2158cd[_0x12bc8c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x12bc8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x12bc8c([0x56,0x61,0x6c,0x69,0x64]);})[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x58b1e2=>(_0x4639b9(),_0x58b1e2),()=>{const _0x2bc258=_0x353fcc();return null==_0x2bc258?(_0x4639b9(),_0x12bc8c([0x56,0x61,0x6c,0x69,0x64])):_0x12bc8c(_0xabe448-_0x2bc258>(0x73db5caf^_0x55c347)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x6d6ddb)[_0x12bc8c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x6d6ddb(_0x12bc8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x309aa9=0x57e1362f^_0x55c347;function _0x4639b9(){const _0x13f3d1=_0x12bc8c([0x6c,0x6c,0x63,0x74,0x2d])+_0x40a036(_0x39db05(_0x1bda87)),_0x2cf6c4=_0x58dc9(_0x40a036(window[_0x12bc8c([0x4d,0x61,0x74,0x68])][_0x12bc8c([0x63,0x65,0x69,0x6c])](_0xabe448/_0x309aa9)));window[_0x12bc8c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12bc8c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x13f3d1,_0x2cf6c4);}function _0x353fcc(){const _0x406309=_0x12bc8c([0x6c,0x6c,0x63,0x74,0x2d])+_0x40a036(_0x39db05(_0x1bda87)),_0x1a811a=window[_0x12bc8c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12bc8c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x406309);return _0x1a811a?window[_0x12bc8c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58dc9(_0x1a811a),0x10)*_0x309aa9:null;}function _0x35e01d(_0x28aa1f){return new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5baaec,_0x5b5a28)=>{_0x28aa1f[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x5baaec,_0x5b5a28),window[_0x12bc8c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5b5a28,0x57d60c6f^_0x55c347);});}}_0x434189[_0x12bc8c([0x6f,0x6e])](_0x12bc8c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5b113c,_0x3283d6)=>{if(_0x3283d6[0x0]!=_0x1bda87)return _0x6d6ddb(_0x12bc8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3283d6[0x1]={..._0x3283d6[0x1],[_0x12bc8c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2d0f5e};},{[_0x12bc8c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12bc8c([0x68,0x69,0x67,0x68])}),_0x434189[_0x12bc8c([0x6f,0x6e])](_0x12bc8c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xf0a2cd=>{_0x5357ab(_0xf0a2cd[_0x12bc8c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2af2d7=!0x0,_0x2cbfea(_0xf0a2cd[_0x12bc8c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x12bc8c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12bc8c([0x6c,0x6f,0x77])}),_0x3d6d50[_0x12bc8c([0x74,0x68,0x65,0x6e])](()=>{_0x2af2d7||_0x6d6ddb(_0x12bc8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x262aef(){return _0x434189[_0x12bc8c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12bc8c([0x76,0x69,0x65,0x77])][_0x12bc8c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x12bc8c([0x61,0x75,0x74,0x6f]);}function _0x271001(){_0x434189[_0x12bc8c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12bc8c([0x76,0x69,0x65,0x77])][_0x12bc8c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x12bc8c([0x61,0x75,0x74,0x6f]);}}function _0x1fc522(_0x16240e){const _0x577ff1=[new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c6fac=>setTimeout(_0x2c6fac,0x57dee663^_0x55c347)),_0x3d6d50[_0x12bc8c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c0f34=>{let _0x2c2511=0x0;_0x434189[_0x12bc8c([0x6d,0x6f,0x64,0x65,0x6c])][_0x12bc8c([0x6f,0x6e])](_0x12bc8c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x20c2dd,_0x9dde1f)=>{_0x9dde1f[0x0][_0x12bc8c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2c2511++,_0x2c2511==(0x57d7d957^_0x55c347)&&(_0x4c0f34(),_0x20c2dd[_0x12bc8c([0x6f,0x66,0x66])]());});}))];return window[_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x12bc8c([0x72,0x61,0x63,0x65])](_0x577ff1)[_0x12bc8c([0x74,0x68,0x65,0x6e])](()=>_0x16240e);}async function _0xdb3a17(){await _0x3d6d50,_0x434189[_0x12bc8c([0x6d,0x6f,0x64,0x65,0x6c])][_0x12bc8c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x44add1,_0x434189[_0x12bc8c([0x6d,0x6f,0x64,0x65,0x6c])][_0x12bc8c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x44add1,_0x434189[_0x12bc8c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x12bc8c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2afc3e(){return _0x133d5f(_0x12bc8c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x10dc06(_0x12bc8c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x12bc8c([0x73,0x74,0x61,0x74,0x65])]==_0x12bc8c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1899ae(){return _0x133d5f(_0x12bc8c([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 _0x1a03e7(){return _0x133d5f(_0x12bc8c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x24a8e3(_0x18c69f){const _0x4d9352=_0x580292();_0x434189[_0x4d9352]=_0x12bc8c([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x18c69f,_0x18c69f!=_0x12bc8c([0x56,0x61,0x6c,0x69,0x64])&&_0xdb3a17();}function _0x580292(){const _0x16bc4e=window[_0x12bc8c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x12bc8c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x12bc8c([0x6e,0x6f,0x77])]())[_0x12bc8c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x12bc8c([0x2e]),'');let _0x480884=_0x12bc8c([0x67]);for(let _0x19f7fb=0x0;_0x19f7fb<_0x16bc4e[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x19f7fb+=0x2){let _0x4910ec=window[_0x12bc8c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x16bc4e[_0x12bc8c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x19f7fb,_0x19f7fb+0x2));_0x4910ec>=_0x4a7c51[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4910ec-=_0x4a7c51[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x480884+=_0x4a7c51[_0x4910ec];}return _0x480884;}function _0x380881(){const _0x3ffdc1=_0x294b78[_0x12bc8c([0x73,0x70,0x6c,0x69,0x74])](_0x12bc8c([0x2e]));if(0x3!=_0x3ffdc1[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x299cfa(_0x3ffdc1[0x1]);function _0x299cfa(_0xfb7c2e){const _0x24cddb=_0x42df3a(_0xfb7c2e);return _0x24cddb&&_0x519041()?_0x24cddb:null;function _0x519041(){const _0x17d219=_0x24cddb[_0x12bc8c([0x6a,0x74,0x69])],_0x9a2b38=window[_0x12bc8c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x17d219[_0x12bc8c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x17d219[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x31052a={..._0x24cddb,[_0x12bc8c([0x6a,0x74,0x69])]:_0x17d219[_0x12bc8c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x17d219[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x31052a[_0x12bc8c([0x76,0x63])],_0x39db05(_0x31052a)==_0x9a2b38;}}}async function _0x2a5632(){let _0x3a8241=!0x0;try{const _0x284cfa=_0x294b78[_0x12bc8c([0x73,0x70,0x6c,0x69,0x74])](_0x12bc8c([0x2e])),[_0x3b1a9d,_0x5e4a19,_0xa93e45]=_0x284cfa;return _0x53e644(_0x3b1a9d),await _0x4f3161(_0x3b1a9d,_0x5e4a19,_0xa93e45),_0x3a8241;}catch{return!0x1;}function _0x53e644(_0x26d774){const _0x321b25=_0x42df3a(_0x26d774);_0x321b25&&_0x321b25[_0x12bc8c([0x61,0x6c,0x67])]==_0x12bc8c([0x45,0x53,0x32,0x35,0x36])||(_0x3a8241=!0x1);}async function _0x4f3161(_0x117307,_0x3548a5,_0x11bc94){const _0x4c6574=window[_0x12bc8c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x12bc8c([0x66,0x72,0x6f,0x6d])](_0x4b421f(_0x11bc94),_0x491ccf=>_0x491ccf[_0x12bc8c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4adec2=new window[(_0x12bc8c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x12bc8c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x117307+_0x12bc8c([0x2e])+_0x3548a5),_0x5d2988=window[_0x12bc8c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x12bc8c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5d2988)return;const _0xf93543=await _0x5d2988[_0x12bc8c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x12bc8c([0x6a,0x77,0x6b]),_0x37c932,{[_0x12bc8c([0x6e,0x61,0x6d,0x65])]:_0x12bc8c([0x45,0x43,0x44,0x53,0x41]),[_0x12bc8c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x12bc8c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x12bc8c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5d2988[_0x12bc8c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x12bc8c([0x6e,0x61,0x6d,0x65])]:_0x12bc8c([0x45,0x43,0x44,0x53,0x41]),[_0x12bc8c([0x68,0x61,0x73,0x68])]:{[_0x12bc8c([0x6e,0x61,0x6d,0x65])]:_0x12bc8c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xf93543,_0x4c6574,_0x4adec2)||(_0x3a8241=!0x1);}}function _0x42df3a(_0x3ec347){return _0x3ec347[_0x12bc8c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x12bc8c([0x65,0x79]))?JSON[_0x12bc8c([0x70,0x61,0x72,0x73,0x65])](_0x4b421f(_0x3ec347)):null;}function _0x4b421f(_0x2f5b3e){return window[_0x12bc8c([0x61,0x74,0x6f,0x62])](_0x2f5b3e[_0x12bc8c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x12bc8c([0x2b]))[_0x12bc8c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x12bc8c([0x2f])));}function _0x39db05(_0x5c90ff){let _0x3893b0=0x1505;function _0xcfced1(_0x1676ec){for(let _0x4d4b5e=0x0;_0x4d4b5e<_0x1676ec[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d4b5e++){const _0x3b9148=_0x1676ec[_0x12bc8c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d4b5e);_0x3893b0=(_0x3893b0<<0x5)+_0x3893b0+_0x3b9148,_0x3893b0&=_0x3893b0;}}function _0x21a45a(_0x55e62c){Array[_0x12bc8c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x55e62c)?_0x55e62c[_0x12bc8c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x21a45a):_0x55e62c&&typeof _0x55e62c==_0x12bc8c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x12bc8c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x55e62c)[_0x12bc8c([0x73,0x6f,0x72,0x74])]()[_0x12bc8c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x490f3e,_0x31b80e])=>{_0xcfced1(_0x490f3e),_0x21a45a(_0x31b80e);}):_0xcfced1(window[_0x12bc8c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x55e62c));}return _0x21a45a(_0x5c90ff),_0x3893b0>>>0x0;}function _0x40a036(_0x304ed6){return _0x304ed6[_0x12bc8c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x12bc8c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x12bc8c([0x30]));}function _0x58dc9(_0x1a3ab5){return _0x1a3ab5[_0x12bc8c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x12bc8c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x12bc8c([0x6a,0x6f,0x69,0x6e])]('');}function _0x133d5f(_0xe46d9d){return _0x434189[_0x12bc8c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x12bc8c([0x68,0x61,0x73])](_0xe46d9d);}function _0x10dc06(_0x81c1fb){return _0x434189[_0x12bc8c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x12bc8c([0x67,0x65,0x74])](_0x81c1fb);}function _0x44add1(){}function _0x12bc8c(_0x101873){return _0x101873['map'](_0x3549cf=>String['fromCharCode'](_0x3549cf))['join']('');}_0x24a8e3(await _0x4126b9());}(this);}['destroy'](){const _0x5bd11b=this['editor']['plugins']['get'](o),_0x1e4fc3=this['editor']['config']['get']('collaboration.channelId');for(const _0x4576cd of _0x5bd11b['getCommentThreads']({'channelId':_0x1e4fc3}))_0x5bd11b['_detachCommentThread'](_0x4576cd['id']),_0x5bd11b['_threads']['delete'](_0x4576cd['id']);super['destroy']();}['hasMarkerForId'](_0x1772a5){return this['getAllMarkersForId'](_0x1772a5)['length']>0x0;}['getAllMarkersForId'](_0x51d187){const _0x1e51f4=[];for(const _0x4100f4 of this['editor']['model']['markers'])_0x4100f4['name']['startsWith']('comment:'+_0x51d187)&&_0x1e51f4['push'](_0x4100f4);return _0x1e51f4;}['scrollToThreadMarker'](_0x4e5fa4){setTimeout(()=>{const _0x3b3cc0=this['_getTargetForId'](_0x4e5fa4);if(!_0x3b3cc0)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x4e5fa4&&nt({'target':_0x3b3cc0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x244666){this['editor']['model']['change'](()=>{for(const _0x28e590 of this['getAllMarkersForId'](_0x244666))this['editor']['editing']['reconvertMarker'](_0x28e590);});}['_attachArchivedThread'](_0x494926){const _0x543d16=this['editor']['plugins']['get'](o),_0x48a40e=this['editor']['plugins']['get'](b),_0x5711f8=_0x543d16['getCommentThread'](_0x494926);if(!_0x5711f8['isAttached']){const _0x268ddf=_0x5711f8['attachTo'](()=>this['_getTargetForId'](_0x5711f8['id']));_0x48a40e['registerAnnotation'](_0x268ddf),_0x5711f8['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x578477=this['editor'],_0x2c4695=_0x578477['plugins']['get'](it);_0x578477['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4d68dc,_0x43f0d2)=>{const {id:_0x2c38fd}=ft(_0x4d68dc['markerName']),_0x4d4316=_0x578477['plugins']['get'](o)['getCommentThread'](_0x2c38fd),_0x43a391=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2c38fd;let _0x557490;if(_0x4d4316&&_0x4d4316['isResolved']&&!_0x43a391&&_0x4d68dc['item'])return _0x43f0d2['consumable']['consume'](_0x4d68dc['item'],'addMarker:'+_0x4d68dc['markerName']),_0x43f0d2['consumable']['consume'](_0x4d68dc['item'],'removeMarker:'+_0x4d68dc['markerName']),null;const _0x25f6ac=['ck-comment-marker'];return _0x43a391&&_0x25f6ac['push']('ck-comment-marker--active'),_0x557490=_0x4d4316?.['length']?_0x4d4316['comments']['first']['author']['id']:_0x2c4695['me']['id'],{'classes':_0x25f6ac,'attributes':{'data-comment':_0x2c38fd,'data-author-id':_0x557490}};}}),_0x578477['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2b8c88,{options:_0x147950})=>{if(_0x147950['showCommentHighlights'])return null;const _0x4eb772=_0x578477['plugins']['get'](o),_0x40df04=_0x578477['model']['markers']['get'](_0x2b8c88),{id:_0xb31842,part:_0x4c8774}=ft(_0x2b8c88);return _0x40df04&&!_0x40df04['affectsData']||_0x147950['ignoreResolvedComments']&&_0x4eb772['getCommentThread'](_0xb31842)?.['isResolved']?null:{'group':'comment','name':_0x4c8774?_0xb31842+':'+_0x4c8774:_0xb31842};}}),_0x578477['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3786a7,{writer:_0x17b119})=>_0x17b119['createElement']('$marker',{'data-name':'comment:'+_0x3786a7['getAttribute']('id')})}),_0x578477['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1945cc=this['editor'],_0x5dcba5=_0x1945cc['plugins']['get'](o),_0x3e2852=new Set(),_0x5bd4af=new Set();_0x1945cc['model']['document']['registerPostFixer'](_0x3db950=>{let _0x3deb21=!0x1;for(const {name:_0x3d1b57,data:_0x2e672d}of _0x1945cc['model']['document']['differ']['getChangedMarkers']()){const {group:_0x8b5e27,id:_0xc7d971}=ft(_0x3d1b57);let _0x55e2eb=_0x2e672d['newRange'];if('comment'!==_0x8b5e27||!_0x55e2eb)continue;const _0x409e3b='$graveyard'===_0x55e2eb['root']['rootName'];_0x409e3b||(_0x55e2eb=ht(_0x55e2eb,_0x1945cc['model']),!_0x55e2eb||_0x55e2eb['isCollapsed']||!_0x2e672d['newRange']||_0x55e2eb['isEqual'](_0x2e672d['newRange']))?_0x1945cc['model']['hasContent'](_0x55e2eb)&&!_0x409e3b?this['isThreadsLoadingPaused']?_0x3e2852['add'](_0x3d1b57):this['_handleThreadMarker'](_0x3d1b57,_0xc7d971):(_0x5bd4af['add'](_0x3d1b57),_0x3e2852['delete'](_0x3d1b57),_0x3db950['removeMarker'](_0x3d1b57),_0x3deb21=!0x0):(_0x3db950['updateMarker'](_0x3d1b57,{'range':_0x55e2eb}),_0x3deb21=!0x0);}return _0x3deb21;}),this['on']('change:isThreadsLoadingPaused',(_0x4c82cf,_0x13028a,_0x4a9fd6)=>{if(!_0x4a9fd6&&_0x3e2852['size'])for(const _0x16fc43 of _0x3e2852){const {id:_0x9256eb}=ft(_0x16fc43);_0x3e2852['delete'](_0x16fc43),_0x1945cc['model']['markers']['get'](_0x16fc43)&&this['_handleThreadMarker'](_0x16fc43,_0x9256eb);}}),this['listenTo'](_0x1945cc['model']['document'],'change',()=>{for(const {name:_0x6c044e,data:{newRange:_0x30f08e}}of _0x1945cc['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1c2749,id:_0x2322e0}=ft(_0x6c044e);if('comment'!==_0x1c2749)continue;const _0x1a8835=_0x5dcba5['getCommentThread'](_0x2322e0),_0x23743f=this['hasMarkerForId'](_0x2322e0);_0x1a8835&&(!_0x1a8835['_hasTargetInContent']&&_0x30f08e&&_0x1945cc['editing']['view']['once']('render',()=>{const _0x35d134=_0x1945cc['plugins']['get'](y),_0x4dcb2c=_0x5dcba5['_threadToController']['get'](_0x1a8835)['view'];_0x35d134['getByInnerView'](_0x4dcb2c)['refreshVisibility']();},{'priority':'low'}),_0x1a8835['_hasTargetInContent']=_0x23743f||!!_0x30f08e),_0x30f08e||(_0x5bd4af['add'](_0x6c044e),_0x3e2852['delete'](_0x6c044e));}for(const _0xae7979 of _0x5bd4af){const {id:_0x39d8ee}=ft(_0xae7979),_0x19c125=_0x5dcba5['getCommentThread'](_0x39d8ee);if(_0x3e2852['delete'](_0xae7979),!_0x19c125)continue;const _0x1f4dc5=this['hasMarkerForId'](_0x39d8ee);_0x1f4dc5||_0x19c125['isSubmitted']?_0x1f4dc5||_0x19c125['unlinkedAt']||_0x19c125['setUnlinkedAt'](new Date()):_0x19c125['remove']();}_0x5bd4af['clear']();});}['_handleInitialThreads'](_0x1d50ab){_0x1d50ab['forEach'](_0x5258c4=>{_0x5258c4['unlinkedAt']&&this['_attachArchivedThread'](_0x5258c4['id']);});}['_getTargetForId'](_0x3f982b){const _0xfb1f26=this['editor'],_0xe02512=this['getAllMarkersForId'](_0x3f982b);return et(_0xfb1f26['editing'],_0xe02512);}['_getTextContext'](_0x281535){const _0x38c4f9=this['getAllMarkersForId'](_0x281535);let _0x413ac0='',_0x40e954=!0x1;for(const _0x16b4c8 of _0x38c4f9){const _0x24548f=_0x16b4c8['getRange']();for(const _0x1488f4 of Array['from'](_0x24548f['getItems']()))_0x1488f4['is']('$textProxy')?(_0x413ac0&&_0x40e954&&(_0x413ac0+='\x20',_0x40e954=!0x1),_0x413ac0+=_0x1488f4['data']):_0x40e954=!0x0;_0x40e954=!0x0;}return _0x413ac0['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x471312,_0x359245){const _0x120fba=this['editor'],_0x301a38=_0x120fba['plugins']['get'](o);let _0x4c73ad=_0x301a38['getCommentThread'](_0x359245);const _0x333541=_0x120fba['config']['get']('collaboration.channelId'),_0xf4f673=_0x120fba['plugins']['get'](b);if(_0x4c73ad&&(_0x4c73ad['unlinkedAt']&&_0x4c73ad['setUnlinkedAt'](null),_0x4c73ad['isAttached']))return _0x4c73ad;return!this['getAllMarkersForId'](_0x359245)[0x0]['managedUsingOperations']?_0x120fba['editing']['view']['once']('render',()=>{if(_0x301a38['getCommentThread'](_0x359245))return;const _0x2b359d=_0x120fba['plugins']['get'](y);_0x4c73ad=_0x301a38['openNewCommentThread']({'channelId':_0x333541,'threadId':_0x359245,'target':()=>this['_getTargetForId'](_0x359245),'context':{'type':'text','value':this['_getTextContext'](_0x359245)}});const _0x1040a2=_0x301a38['_threadToController']['get'](_0x4c73ad)['view'],_0x462fd5=_0x2b359d['getByInnerView'](_0x1040a2);_0x462fd5&&_0xf4f673['registerAnnotation'](_0x462fd5);},{'priority':'low'}):_0x301a38['fetchCommentThread']({'channelId':_0x333541,'threadId':_0x359245})['then'](_0x224e62=>{if('destroyed'!==_0x120fba['state']){if(_0x4c73ad=_0x224e62,_0x4c73ad&&!_0x4c73ad['isAttached']){const _0x173299=_0x4c73ad['attachTo'](()=>this['_getTargetForId'](_0x359245));_0xf4f673['registerAnnotation'](_0x173299),_0x4c73ad['isResolved']&&this['_reconvertMarkers'](_0x359245);}else{if(!_0x4c73ad){const _0x46a85a=this['getAllMarkersForId'](_0x359245);_0x120fba['model']['change'](_0x3d8dce=>{for(const _0xe6a8a9 of _0x46a85a)_0x3d8dce['removeMarker'](_0xe6a8a9);});}}}}),_0x4c73ad;}['_handleThreadMarker'](_0x273b21,_0x133ce7){const _0x2a0c2b=this['_attachMarkerToThread'](_0x273b21,_0x133ce7);_0x2a0c2b&&!_0x2a0c2b['context']&&_0x2a0c2b['setContext']({'type':'text','value':this['_getTextContext'](_0x133ce7)});}['_initAriaMarkerChangeAnnouncements'](){const _0x44e411=this['editor'];rt(_0x44e411['model'],({left:_0x16fda1,entered:_0x34940b})=>{for(const _0xa436f of _0x16fda1)if(mt(_0xa436f)){_0x44e411['ui']['ariaLiveAnnouncer']['announce'](N(_0x44e411['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4351f9 of _0x34940b)if(mt(_0x4351f9)){_0x44e411['ui']['ariaLiveAnnouncer']['announce'](N(_0x44e411['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x4818da)));break;}});}}function dt(_0x5c8b9b,_0x1ff7b7){return _0x1ff7b7?_0x5c8b9b+':'+_0x1ff7b7:_0x5c8b9b;}function ht(_0x1d971b,_0x43ce74){const _0x36f045=_0x43ce74['schema'],_0x3a68fd=_0x43ce74['createRange'](_0x1d971b['start']);for(const _0x40b911 of _0x1d971b['getWalker']()){const {type:_0x5e92ea,item:_0x38ba68,nextPosition:_0x3fc371}=_0x40b911;if('text'===_0x5e92ea||_0x36f045['isObject'](_0x38ba68)){const _0x337e06=_0x43ce74['createPositionBefore'](_0x38ba68);_0x3a68fd['isCollapsed']&&(_0x3a68fd['start']=_0x337e06),_0x3a68fd['end']=_0x3fc371;}}return _0x3a68fd;}function mt(_0x25b99b){return'comment'===ft(_0x25b99b['name'])['group'];}class s extends _0x22a428{['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 _0x4b0c1c=this['editor'],_0x329d46=_0x4b0c1c['plugins']['get'](o),_0x539509=_0x4b0c1c['plugins']['get'](r),_0x23bf66=_0x4b0c1c['plugins']['get'](y),_0xa2fb6f=_0x4b0c1c['plugins']['get'](b);_0x4b0c1c['ui']['componentFactory']['add']('comment',()=>{const _0x1ba325=this['_createUIButton'](_0x31c82b);return _0x1ba325['tooltip']=!0x0,_0x1ba325;}),_0x4b0c1c['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x3e45ab)),_0xa2fb6f['addSourceCollector'](()=>{const _0x1619cc=[];for(const [_0xfbdafd,_0x561c6e]of _0x329d46['_threadToController']){const _0x5a25d5=_0x539509['getAllMarkersForId'](_0xfbdafd['id']),_0x55b82c=_0x5a25d5['map'](_0x58f133=>_0x58f133['getRange']());_0x5a25d5['length']>0x0&&_0x1619cc['push']([_0x561c6e['view'],_0x55b82c]);}return _0x1619cc;}),this['listenTo'](_0x23bf66,'change:activeAnnotations',(_0x53abec,_0xb32a33,_0x2acdc8)=>{const _0x25a035=Array['from'](_0x2acdc8)['map'](_0x2128a4=>_0x2128a4['innerView'])['find'](_0x7c7718=>_0x329d46['_viewToController']['has'](_0x7c7718));if(!_0x25a035)return void(_0x539509['activeMarker']=null);const _0x2d2b5f=_0x329d46['_viewToController']['get'](_0x25a035)['model']['id'],_0x30358b='comment:'+_0x2d2b5f;_0x2d2b5f&&_0x539509['hasMarkerForId'](_0x2d2b5f)?_0x539509['activeMarker']=_0x30358b:_0x539509['activeMarker']&&(_0x539509['activeMarker']=null);}),this['listenTo'](_0x329d46,'removeCommentThread',(_0x12f172,{threadId:_0x17b985,isFromAdapter:_0x33f8bb})=>{!_0x33f8bb&&_0x4b0c1c['ui']['focusTracker']['isFocused']&&_0x539509['hasMarkerForId'](_0x17b985)&&_0x4b0c1c['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x329d46,'addComment',(_0x47c8e5,{threadId:_0x4df33e,isFromAdapter:_0x2789ef})=>{if(_0x2789ef||!_0x539509['hasMarkerForId'](_0x4df33e)||!_0x329d46['hasCommentThread'](_0x4df33e))return;0x1===_0x329d46['getCommentThread'](_0x4df33e)['length']&&(_0x4b0c1c['editing']['view']['focus'](),_0x47c8e5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x88550a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x34b1cf;for(const _0x1aa9f1 in _0x88550a){const _0x34c89f=_0x1aa9f1,_0x964107=_0x88550a[_0x34c89f];if('commentsLicenseKeyValid'==_0x964107||'commentsLicenseKeyInvalid'==_0x964107||'commentsLicenseKeyExpired'==_0x964107||'commentsLicenseKeyDomainLimit'==_0x964107||'commentsLicenseKeyNotAllowed'==_0x964107||'commentsLicenseKeyEvaluationLimit'==_0x964107||'commentsLicenseKeyTrialLimit'==_0x964107||'commentsLicenseKeyUsageLimit'==_0x964107){delete _0x88550a[_0x34c89f],_0x34b1cf=_0x964107,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x34b1cf&&_0x88550a['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x34b1cf&&_0x88550a['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x34b1cf&&_0x88550a['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x34b1cf&&_0x88550a['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x34b1cf&&_0x88550a['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x34b1cf&&_0x88550a['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x34b1cf&&_0x88550a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x5ed213){const _0x4f5546=this['editor'],_0x771189=new _0x5ed213(_0x4f5546['locale']),_0x1e1a1b=_0x4f5546['commands']['get']('addCommentThread');return _0x771189['set']({'label':N(_0x4f5546['locale'],'Comment'),'icon':_0x1828af}),_0x771189['bind']('isEnabled')['to'](_0x1e1a1b,'hasContent'),this['listenTo'](_0x771189,'execute',()=>{_0x1e1a1b['execute']();}),_0x771189;}}class i extends _0x22a428{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x4c6cc4){super(_0x4c6cc4),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x472549,_0xaab1f9,_0x33e9ba)=>{_0x33e9ba?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x31c8fc,_0x307a2a]of this['editor']['commands'])_0x307a2a['affectsData']&&'addCommentThread'!==_0x31c8fc&&_0x307a2a['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x53fb63=this['editor']['editing']['view']['document'];this['listenTo'](_0x53fb63,'cut',_0x4722b5=>_0x4722b5['stop'](),{'priority':'highest'}),this['listenTo'](_0x53fb63,'clipboardInput',_0x1226f7=>_0x1226f7['stop'](),{'priority':'highest'}),this['listenTo'](_0x53fb63,'delete',_0x28146f=>_0x28146f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x502626,_0x2daa2d]of this['editor']['commands'])_0x2daa2d['affectsData']&&'addCommentThread'!==_0x502626&&_0x2daa2d['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 _0x1a03b6{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4efa93){super(_0x4efa93),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x36a76d=this['context']['plugins']['get'](y);this['listenTo'](_0x36a76d,'_activateAnnotation',(_0x5abaed,_0x3cbfce)=>{for(const _0x27b2c4 of this['activeUIs']){const _0x45f570=this['_uis']['get'](_0x27b2c4);(0x0,this['uisData']['get'](_0x27b2c4)['filter'])(_0x3cbfce)&&_0x45f570['setActiveAnnotation'](_0x3cbfce);}}),this['listenTo'](_0x36a76d,'_deactivateAllAnnotations',()=>{for(const _0x123735 of this['activeUIs']){this['_uis']['get'](_0x123735)['setActiveAnnotation'](null);}}),this['listenTo'](_0x36a76d['_visibleAnnotations'],'add',(_0x2de54a,_0x4591b7)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4591b7);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x366617){return this['activeUIs']['has'](_0x366617);}['activate'](_0x2b0d70,_0x2d133f=this['defaultFilter']){const _0x5b4500=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2b0d70))throw new _0x3888cd('annotationsuis-missing-ui',this,{'uiName':_0x2b0d70});this['isActive'](_0x2b0d70)&&this['deactivate'](_0x2b0d70),this['activeUIs']['add'](_0x2b0d70);const _0x17f959=new S();v({'source':_0x5b4500['_visibleAnnotations'],'target':_0x17f959,'filter':_0x2d133f}),this['uisData']['set'](_0x2b0d70,{'collection':_0x17f959,'filter':_0x2d133f});const _0x39d7b4=this['_uis']['get'](_0x2b0d70);_0x39d7b4['attach'](_0x17f959),this['listenTo'](_0x39d7b4,'change:activeAnnotation',(_0x48d1b6,_0x12949b,_0x106f49,_0x130419)=>{_0x130419&&_0x5b4500['_removeActiveAnnotation'](_0x130419),_0x106f49&&_0x5b4500['_addActiveAnnotation'](_0x106f49);});}['deactivate'](_0x4d4a18){if(this['activeUIs']['delete'](_0x4d4a18),!this['_uis']['has'](_0x4d4a18))throw new _0x3888cd('annotationsuis-missing-ui',this,{'uiName':_0x4d4a18});const _0x124b0f=this['_uis']['get'](_0x4d4a18);_0x124b0f['detach'](),this['stopListening'](_0x124b0f),this['uisData']['get'](_0x4d4a18)['collection']['destroy'](),this['uisData']['delete'](_0x4d4a18);}['switchTo'](_0x3bcf9e){if(!this['_uis']['has'](_0x3bcf9e))throw new _0x3888cd('annotationsuis-missing-ui',this,{'uiName':_0x3bcf9e});const _0x182f77=this['context']['plugins']['get'](y),_0x535428=Array['from'](_0x182f77['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3bcf9e);const _0x23bc93=this['_uis']['get'](_0x3bcf9e);_0x23bc93['setActiveAnnotation'](_0x535428),_0x23bc93['_setSelectedAnnotations']&&_0x535428&&_0x23bc93['_setSelectedAnnotations']([_0x535428]);}['deactivateAll'](){for(const _0x112d5d of this['activeUIs'])this['deactivate'](_0x112d5d);}['register'](_0x15c650,_0x4213a6){if(this['_uis']['has'](_0x15c650))throw new _0x3888cd('annotationsuis-register-already-registered');if('function'!=typeof _0x4213a6['attach']||'function'!=typeof _0x4213a6['detach']||'function'!=typeof _0x4213a6['setActiveAnnotation'])throw new _0x3888cd('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x15c650,_0x4213a6);}['refilterAnnotations'](){const _0x4f1026=this['context']['plugins']['get'](y)['collection'],_0xde6bc0=new Map(),_0xa5a9da=Array['from'](this['activeUIs']);for(const _0xd4ccb2 of this['activeUIs']){const _0x123018=this['uisData']['get'](_0xd4ccb2)['collection'];for(const _0xed8b6b of _0x123018)_0xde6bc0['set'](_0xed8b6b,_0xd4ccb2);}for(const _0x3004b1 of _0x4f1026){const _0xdddf20=_0xde6bc0['get'](_0x3004b1);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3004b1);const _0x5ade59=_0xa5a9da['find'](_0x15b524=>this['uisData']['get'](_0x15b524)['filter'](_0x3004b1));_0xdddf20!==_0x5ade59&&(_0xdddf20&&this['uisData']['get'](_0xdddf20)['collection']['remove'](_0x3004b1),_0x5ade59&&this['uisData']['get'](_0x5ade59)['collection']['add'](_0x3004b1));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x236c51){const _0x110011=[];for(const _0x14a7e6 of this['activeUIs']){(0x0,this['uisData']['get'](_0x14a7e6)['filter'])(_0x236c51)&&_0x110011['push'](_0x14a7e6);}if(_0x110011['length']>0x1)throw new _0x3888cd('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x110011,'annotationType':_0x236c51['type']});}}const _i=/* #__PURE__ -- @preserve */
32
- Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0xdcc563){super(_0xdcc563);const _0x540d08=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 _0x3f0639(),this['focusCycler']=new _0x47818a({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x540d08['to']('class')],'style':{'minHeight':_0x540d08['to']('minHeight',_0x4eebf7=>'number'==typeof _0x4eebf7?_i(_0x4eebf7+0xa):null)},'dir':_0xdcc563['uiLanguageDirection'],'role':'application','aria-label':N(_0xdcc563,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0xdcc563,'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',_0x5c5641=>{this['_updateItemPositionInFocusables'](_0x5c5641['source']);}),this['list']['forEach'](_0x53774b=>{this['focusTracker']['add'](_0x53774b['element']),this['_updateItemPositionInFocusables'](_0x53774b);}),this['list']['on']('change',(_0x492941,_0x41d785)=>{for(const _0x285c12 of _0x41d785['removed'])this['focusTracker']['remove'](_0x285c12['element']),this['focusables']['remove'](_0x285c12);for(const _0x232371 of _0x41d785['added'])this['focusTracker']['add'](_0x232371['element']),this['_updateItemPositionInFocusables'](_0x232371);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x59340a){const _0x5b332b=this['focusables']['getIndex'](_0x59340a);let _0x294962,_0x4f96b2;for(const _0x3e21a3 of this['focusables'])if(_0x59340a['top']<_0x3e21a3['top']){_0x294962=_0x3e21a3;break;}if(_0x4f96b2=_0x294962?this['focusables']['getIndex'](_0x294962):this['focusables']['length'],-0x1!==_0x5b332b){if(_0x5b332b===_0x4f96b2-0x1)return;this['focusables']['remove'](_0x59340a),_0x4f96b2=_0x294962?this['focusables']['getIndex'](_0x294962):this['focusables']['length'];}this['focusables']['add'](_0x59340a,_0x4f96b2);}}const Ot=/* #__PURE__ -- @preserve */
33
- Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x51a4fe){super(_0x51a4fe),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x20f0e4,_0x4db25d)=>_0x20f0e4+_0x4db25d),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2acdbf=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2acdbf['to']('isAnimationDisabled',_0xeece19=>_0xeece19?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2acdbf['to']('top',_0x4dd71f=>Ot(_0x4dd71f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x49c526=this['element']['clientHeight'];_0x49c526&&(this['height']=_0x49c526);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1a03b6{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e647e){super(_0x5e647e),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 _0x15fb17=this['context']['config']['get']('sidebar.container');_0x15fb17&&this['setContainer'](_0x15fb17);}['setContainer'](_0x3b8fce){if(!g(_0x3b8fce))throw new _0x3888cd('sidebar-setcontainer-invalid-element');this['container']=_0x3b8fce;}['_attachToContainer']({viewClass:_0x54a762='',spaceBetweenItems:_0x2e6463=0x19}={}){if(!g(this['container']))throw new _0x3888cd('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x54a762,this['_spaceBetweenItems']=_0x2e6463;}['rearrange']({removedAnnotation:_0x1526db,previousAnnotation:_0x1a5b25,nextAnnotation:_0x2bdce1}){const _0x3e5309=this['getSidebarItemView'](_0x1526db);this['view']['list']['remove'](_0x3e5309),this['_destroySidebarItemView'](_0x1526db),_0x1a5b25&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1a5b25)),_0x2bdce1&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2bdce1)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x282c12,activatedAnnotation:_0x258361,disableAnimationOnActivatedAnnotation:_0x371f6e}){if(this['_activeAnnotation']=_0x258361,_0x282c12){_0x282c12['isActive']=!0x1;const _0x55916b=this['getSidebarItemView'](_0x282c12);_0x55916b&&_0x371f6e&&(_0x55916b['isAnimationDisabled']=!0x1);}if(_0x258361){const _0x588ef7=this['getSidebarItemView'](_0x258361);_0x588ef7&&(_0x258361['isActive']=!0x0,_0x371f6e&&(_0x588ef7['isAnimationDisabled']=!0x0,_0x588ef7['top']+=0x1),this['_alignToTargetRect'](_0x588ef7));}}['_detachFromContainer'](_0x1dcff1){if(this['view']['element']['remove'](),_0x1dcff1){for(const _0x5d0c30 of _0x1dcff1)this['_destroySidebarItemView'](_0x5d0c30);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x114006,_0x1776a2){_0x1776a2||(_0x1776a2=_0x114006['view']);const _0x46f2f5=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x46f2f5,_0x114006),this['_annotationToSidebarItemView']['set'](_0x114006,_0x46f2f5),_0x46f2f5['content']['add'](_0x1776a2),this['listenTo'](_0x114006['view'],'change:targetRect',(_0x578d91,_0x18d695,_0x46a1ee)=>{const _0x2de2cc=this['_getTargetTop'](_0x114006,_0x46a1ee);_0x46f2f5['_targetTop']!=_0x2de2cc&&(_0x46f2f5['_targetTop']=_0x2de2cc,this['_setItemTop'](_0x46f2f5,_0x2de2cc));}),this['listenTo'](_0x46f2f5,'change:top',()=>{this['_recalculate'](_0x46f2f5,'top');}),this['listenTo'](_0x46f2f5,'change:bottom',()=>{this['_recalculate'](_0x46f2f5,'bottom');}),this['_alignToTargetRect'](_0x46f2f5);const _0x20c66e=this['_getItemBefore'](_0x46f2f5);if(_0x20c66e)this['_alignAfterItem'](_0x20c66e,_0x46f2f5)||this['_alignToTargetRect'](_0x46f2f5);else this['_alignToTargetRect'](_0x46f2f5);return this['_updateLastItem'](),this['view']['list']['add'](_0x46f2f5),_0x46f2f5;}['_alignForTopChange'](_0x20c93a){if(!_0x20c93a['content']['length'])return;const _0x21d7e8=this['_getItemBefore'](_0x20c93a);if(!_0x21d7e8)return;const _0xa52a24=this['_sidebarItemViewToAnnotation']['get'](_0x21d7e8),_0x3bc7f5=this['_activeAnnotation'];_0x3bc7f5&&_0x3bc7f5===_0xa52a24?this['_alignAfterItem'](_0x21d7e8,_0x20c93a):this['_alignBeforeItem'](_0x20c93a,_0x21d7e8);}['_alignForBottomChange'](_0x39943d){if(!_0x39943d['content']['length'])return;const _0x45defe=this['_getItemAfter'](_0x39943d);if(!_0x45defe)return;const _0x5cc6e9=this['_sidebarItemViewToAnnotation']['get'](_0x45defe),_0x306552=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x43a764=this['_activeAnnotation'];_0x43a764&&_0x43a764===_0x5cc6e9&&_0x306552?(this['_alignBeforeItem'](_0x45defe,_0x39943d),this['_alignAfterItem'](_0x39943d,_0x45defe)):_0x43a764&&_0x43a764===_0x5cc6e9?this['_alignBeforeItem'](_0x45defe,_0x39943d):this['_alignAfterItem'](_0x39943d,_0x45defe);}['_recalculate'](_0x52887c,_0x4c67ec){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5e3127,changedProp:_0x2b5495}of this['_recalculateBuffer'])'top'===_0x2b5495?this['_alignForTopChange'](_0x5e3127):this['_alignForBottomChange'](_0x5e3127);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x52887c,'changedProp':_0x4c67ec});}['getSidebarItemView'](_0x4a2a94){return this['_annotationToSidebarItemView']['get'](_0x4a2a94);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x22ab14){const _0xe4b46=this['getSidebarItemView'](_0x22ab14);this['stopListening'](_0xe4b46),this['stopListening'](_0x22ab14['view']),_0xe4b46['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x22ab14),this['_sidebarItemViewToAnnotation']['delete'](_0xe4b46);}['_createSidebarView'](){const _0x290afa=new H(this['context']['locale']);return _0x290afa['render'](),this['on']('change:_lastItem',(_0x5b3b45,_0x53169e,_0x318330,_0x54d24f)=>{_0x54d24f&&_0x290afa['unbind']('minHeight'),_0x318330?_0x290afa['bind']('minHeight')['to'](_0x318330,'bottom'):_0x290afa['minHeight']=null;}),_0x290afa;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x57b123){const _0x4eb038=this['_sidebarItemViewToAnnotation']['get'](_0x57b123),_0x2c9747=_0x4eb038&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4eb038)-0x1);return _0x2c9747&&this['getSidebarItemView'](_0x2c9747)||null;}['_getItemAfter'](_0x280eea){const _0x3b1ee4=this['_sidebarItemViewToAnnotation']['get'](_0x280eea),_0x55989d=_0x3b1ee4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3b1ee4)+0x1);return _0x55989d&&this['getSidebarItemView'](_0x55989d)||null;}['_alignBeforeItem'](_0x5b592b,_0x135f5d){_0x5b592b['updateHeight']();const _0x1eb4d8=G(_0x135f5d['bottom']+this['_spaceBetweenItems'],_0x5b592b['top']);return!!_0x1eb4d8&&(this['_setItemTop'](_0x135f5d,_0x135f5d['top']-_0x1eb4d8),!0x0);}['_alignAfterItem'](_0x5d1fc4,_0x5d4cd2){_0x5d1fc4['updateHeight']();const _0x44f2d0=G(_0x5d1fc4['bottom']+this['_spaceBetweenItems'],_0x5d4cd2['top']);return!!_0x44f2d0&&(this['_setItemTop'](_0x5d4cd2,_0x5d4cd2['top']+_0x44f2d0,!0x1),!0x0);}['_alignToTargetRect'](_0x41a148){const _0x380b83=this['_sidebarItemViewToAnnotation']['get'](_0x41a148);if(!_0x380b83||!_0x380b83['target']||!_0x380b83['targetRect'])return;const _0x14f29e=this['_getTargetTop'](_0x380b83,_0x380b83['targetRect']);this['_setItemTop'](_0x41a148,_0x14f29e);}['_getTargetTop'](_0x12eca6,_0x5f2caf){if(null===_0x5f2caf)return 0x0;if(_0x12eca6['target']instanceof _0x4904b4)return _0x5f2caf['top'];{const _0x9fc8dc=new _0x4904b4(this['view']['element'])['top'];return _0x5f2caf['top']-_0x9fc8dc;}}['_setItemTop'](_0x2d9dd5,_0x3aee18,_0x5986d3=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5986d3&&(_0x3aee18=Math['max'](_0x3aee18,this['_getMaxAvailableTop'](_0x2d9dd5))),_0x2d9dd5['top']=_0x3aee18;}['_getMaxAvailableTop'](_0x5c15b2){let _0x2dd730=this['_getItemBefore'](_0x5c15b2),_0x31744d=0x0;for(;_0x2dd730;)_0x2dd730['updateHeight'](),_0x31744d+=this['_spaceBetweenItems']+_0x2dd730['height'],_0x2dd730=this['_getItemBefore'](_0x2dd730);return _0x31744d;}}function G(_0x11e9bb,_0x21f3e2){return Math['max'](_0x11e9bb-_0x21f3e2,0x0);}function g(_0x5f5651){return null!==_0x5f5651&&'object'==typeof _0x5f5651&&0x1===_0x5f5651['nodeType'];}class e extends _0x1a03b6{['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(_0x25f8cb){super(_0x25f8cb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x55c097(),this['_refreshPositioningDebounced']=_0x107550(()=>{_0x25f8cb['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4d128a=this['context']['plugins']['get'](j),_0x23993b=this['context']['plugins']['get'](z);_0x4d128a['register']('wideSidebar',this),_0x23993b['container']&&_0x4d128a['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x58896a){if(_0x58896a===this['activeAnnotation'])return;const _0x27bd02=this['context']['plugins']['get'](z);_0x27bd02['_activeAnnotation']=_0x58896a;const _0x5c2ebf=this['activeAnnotation'];_0x27bd02['refresh']({'blurredAnnotation':_0x5c2ebf,'activatedAnnotation':_0x58896a}),this['activeAnnotation']=_0x58896a;}['attach'](_0x55011b){this['annotations']=_0x55011b;const _0x4fd59c=this['context']['plugins']['get'](z);if(_0x4fd59c['_annotations']=_0x55011b,this['isAttached'])throw new _0x3888cd('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4fd59c,'set:container',()=>{this['detach'](),this['listenTo'](_0x4fd59c,'change:container',_0x5bd4ab=>{_0x5bd4ab['off'](),this['attach'](_0x55011b);});}),_0x4fd59c['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x8d6515=_0x5c3529=>{_0x5c3529['updateTargetRect'](),_0x4fd59c['addAnnotation'](_0x5c3529);};for(const _0x7b4459 of _0x55011b)_0x8d6515(_0x7b4459);this['listenTo'](_0x55011b,'add',(_0x3df1d2,_0x2ef0d0)=>{_0x8d6515(_0x2ef0d0);}),this['listenTo'](_0x55011b,'remove',(_0x258130,_0x261e52,_0x8388e3)=>{_0x4fd59c['rearrange']({'removedAnnotation':_0x261e52,'previousAnnotation':_0x55011b['get'](_0x8388e3-0x1),'nextAnnotation':_0x55011b['get'](_0x8388e3+0x1)}),_0x261e52===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x55011b,'focus',(_0x5edcba,_0x216318)=>{this['setActiveAnnotation'](_0x216318);}),this['listenTo'](_0x55011b,'blur',()=>{this['setActiveAnnotation'](null);});const _0x317206=this['context']instanceof _0x185e0a?this['context']['editors']:new _0x55c097([this['context']]);for(const _0x45174a of _0x317206)this['_integrateWithEditorAnnotations'](_0x45174a);this['listenTo'](_0x317206,'add',(_0x57ab15,_0x2dc829)=>{this['listenTo'](_0x2dc829,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2dc829);});}),this['listenTo'](_0x317206,'remove',(_0x16c40f,_0x1bd9ed)=>{_0x1bd9ed['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1bd9ed['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3888cd('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2a62b7=this['context']['plugins']['get'](z);_0x2a62b7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x2a62b7),this['stopListening'](this['annotations']),this['context']instanceof _0x185e0a&&this['stopListening'](this['context']['editors']);for(const _0x15fedf of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x15fedf);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x33b8ca){if(!_0x33b8ca['plugins']['has']('EditorAnnotations'))return;const _0x2b0d1d=_0x33b8ca['plugins']['get']('EditorAnnotations'),_0x58135e=()=>{const _0x104d8a=_0x2b0d1d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x104d8a[0x0]||null);};this['listenTo'](_0x2b0d1d,'refresh',_0x58135e),this['listenTo'](_0x2b0d1d,'blur',(_0x2afd47,{isAnnotationTracked:_0xdcbad4})=>{this['activeAnnotation']&&_0xdcbad4(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2b0d1d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4d9e6e=>{_0x2b0d1d['hasDomSelection']()&&(_0x58135e(),_0x4d9e6e['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2b0d1d);}['_destroyEditorAnnotationsIntegration'](_0x55c8a2){this['stopListening'](_0x55c8a2),this['_editorAnnotations']['remove'](_0x55c8a2);}}class C extends _0x31c82b{['counterView'];constructor(_0x1afee9){super(_0x1afee9);const _0x2d71c9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x300324,_0xd3307a)=>_0x300324?'...':_0xd3307a['toString']()),this['set']('annotationType',''),this['icon']=_0x1828af,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2d71c9['to']('annotationType',_0x102dae=>'ck-annotation-counter__badge--'+_0x102dae),_0x2d71c9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2d71c9['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1a03b6{['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(_0x1eb68b){super(_0x1eb68b),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x4379d0())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x55c097(),this['_refreshPositioningDebounced']=_0x107550(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0xeb78fe(this['context']['locale']),this['balloonPanelView']=new _0x54bee3(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1ffb66){this['annotations']=_0x1ffb66;const _0x1f3df8=this['context']['plugins']['get'](z),_0x7ed222=this['balloonPanelView'];if(_0x1f3df8['_annotations']=_0x1ffb66,this['isAttached'])throw new _0x3888cd('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1f3df8,'set:container',()=>{this['detach'](),this['listenTo'](_0x1f3df8,'change:container',_0x380b04=>{_0x380b04['off'](),this['attach'](_0x1ffb66);});}),_0x1f3df8['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4ebf04=_0x2b137a=>{const _0x4b1911=new C(this['context']['locale']);_0x1f3df8['addAnnotation'](_0x2b137a,_0x4b1911),this['_annotationToNarrowView']['set'](_0x2b137a,_0x4b1911),_0x4b1911['bind']('isDirty','annotationType','number')['to'](_0x2b137a['view'],'isDirty','type','length'),_0x4b1911['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x7ed222['content']['first']!==_0x2b137a['view']?(this['_showBalloon'](_0x2b137a),_0x2b137a['view']['element']['focus'](),this['setActiveAnnotation'](_0x2b137a)):this['setActiveAnnotation'](null);});};for(const _0x3d4659 of _0x1ffb66)_0x4ebf04(_0x3d4659);this['listenTo'](_0x1ffb66,'add',(_0x5a7d0b,_0x1e237c)=>{_0x4ebf04(_0x1e237c);}),this['listenTo'](_0x1ffb66,'remove',(_0x256397,_0x3d712a,_0x18f985)=>{this['_annotationToNarrowView']['get'](_0x3d712a)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3d712a),_0x1f3df8['rearrange']({'removedAnnotation':_0x3d712a,'previousAnnotation':_0x1ffb66['get'](_0x18f985-0x1),'nextAnnotation':_0x1ffb66['get'](_0x18f985+0x1)}),_0x3d712a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1ffb66,'focus',(_0x30cccd,_0x4f4c03)=>{this['setActiveAnnotation'](_0x4f4c03);}),this['listenTo'](_0x1ffb66,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x83c50,_0xa33bb1)=>{_0xa33bb1['keyCode']===_0x1a4904['esc']&&_0x7ed222['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x7ed222['content']['first']),this['_hideBalloon'](),_0xa33bb1['stopPropagation'](),_0xa33bb1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x246237,_0x2d4f20)=>{const _0x497158=_0x2d4f20['target'];_0x7ed222['isVisible']&&_0x7ed222['element']['contains'](_0x497158)||_0x1f3df8['view']['element']['contains'](_0x497158)||_0x246237['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x17d639=>_0x17d639['contains'](_0x497158))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x252621=this['context']instanceof _0x185e0a?this['context']['editors']:new _0x55c097([this['context']]);for(const _0x3afd7c of _0x252621)this['_integrateWithEditorAnnotations'](_0x3afd7c);this['listenTo'](_0x252621,'add',(_0x301248,_0x28de57)=>{this['listenTo'](_0x28de57,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x28de57);});}),this['listenTo'](_0x252621,'remove',(_0x484ac4,_0x2a5b79)=>{_0x2a5b79['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2a5b79['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x969b90){if(_0x969b90===this['activeAnnotation'])return;const _0x3bf2c5=this['context']['plugins']['get'](z);if(_0x3bf2c5['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x969b90,'disableAnimationOnActivatedAnnotation':!0x0}),_0x969b90)_0x3bf2c5['getSidebarItemView'](_0x969b90)?this['_showBalloon'](_0x969b90):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x969b90;}['detach'](){if(!this['isAttached'])throw new _0x3888cd('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x49a3d3=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xdc4d99=>_0xdc4d99['destroy']()),this['_annotationToNarrowView']['clear'](),_0x49a3d3['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x185e0a&&this['stopListening'](this['context']['editors']);for(const _0x4b28f1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4b28f1);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'](_0x1d0b3a){if(!_0x1d0b3a['plugins']['has']('EditorAnnotations'))return;const _0x58fd83=_0x1d0b3a['plugins']['get']('EditorAnnotations'),_0x558862=this['context']['plugins']['get'](z),_0xc3c2b=this['annotations'],_0xb6a5f4=this['balloonPanelView'],_0x1d329c=()=>{const _0x58bf26=_0x58fd83['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x58bf26),this['setActiveAnnotation'](_0x58bf26[0x0]||null);};this['listenTo'](_0x58fd83,'refresh',_0x1d329c),this['listenTo'](_0x58fd83,'blur',(_0x559674,{isAnnotationTracked:_0x1421b9})=>{this['activeAnnotation']&&_0x1421b9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x58fd83,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xc3c2b,'blur',_0x23e59d=>{_0x58fd83['hasDomSelection']()&&_0x23e59d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x43592a,_0x228c46)=>{const _0x2729c2=_0x228c46['target'];_0xb6a5f4['isVisible']&&_0xb6a5f4['element']['contains'](_0x2729c2)||_0x558862['view']['element']['contains'](_0x2729c2)||this['activeAnnotation']&&_0x58fd83['hasDomSelection']()&&(_0x1d329c(),_0x43592a['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x58fd83);}['_destroyEditorAnnotationsIntegration'](_0x41e463){_0x41e463&&(this['stopListening'](_0x41e463),this['_editorAnnotations']['remove'](_0x41e463));}['_setSelectedAnnotations'](_0x11c85d){for(const _0x50fcb6 of this['_selectedAnnotations'])_0x11c85d['includes'](_0x50fcb6)||this['_manuallyClosedAnnotationViews']['delete'](_0x50fcb6['view']);this['_selectedAnnotations']=_0x11c85d;}['_refreshPositioning'](){const _0x3e7415=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3e7415['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x151a1b){if(this['_manuallyClosedAnnotationViews']['has'](_0x151a1b['view']))return;const _0x56654c=this['balloonPanelView']['content']['first'];_0x56654c!==_0x151a1b['view']?(_0x56654c&&this['_detachListeners'](_0x56654c),this['_attachListeners'](_0x151a1b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x151a1b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3bdf17=this['balloonPanelView']['content']['first'],_0x14ac73=_0x3bdf17&&this['annotations']['getByView'](_0x3bdf17);if(!_0x14ac73||!this['_annotationToNarrowView']['has'](_0x14ac73))return;const _0x3d7f16=this['_annotationToNarrowView']['get'](_0x14ac73)['element'],_0x58fb4f=(function(){const _0x1e6921=_0x54bee3['defaultPositions'];return[_0x1e6921['southArrowNorthEast'],_0x1e6921['northArrowSouthEast'],_0x1e6921['southArrowNorth'],_0x1e6921['northArrowSouth'],_0x1e6921['southArrowNorthWest'],_0x1e6921['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3d7f16,'positions':_0x58fb4f});}['_hideBalloon'](){const _0x4a30e2=this['balloonPanelView'],_0x3bcdd8=_0x4a30e2['content']['first'];_0x3bcdd8&&(this['_detachListeners'](_0x3bcdd8),_0x4a30e2['unpin'](),_0x4a30e2['content']['clear']());}['_attachListeners'](_0x468425){this['listenTo'](_0x468425,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x468425,'Esc',(_0x2ace7a,_0x4990ce)=>{this['_manuallyClosedAnnotationViews']['add'](_0x468425),this['_hideBalloon'](),_0x4990ce();});}['_detachListeners'](_0x2d5b26){this['stopListening'](_0x2d5b26);}}class c extends _0x22a428{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x524c47,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x34e39e){super(_0x34e39e),_0x34e39e['editing']['view']['addObserver'](_0x4b3dd3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x34e39e['plugins']['get'](_0x524c47),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x44d131=this['editor']['plugins']['get'](j);_0x44d131['context']===this['editor']&&(_0x44d131['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4344ca,_0x4e498d)=>{const _0x22fd8a=this['_balloon'];if(this['isAttached']&&_0x22fd8a['visibleView']){const _0x5069ff=this['annotations']['getByView'](_0x22fd8a['visibleView']);_0x5069ff&&this['_closeAnnotation'](_0x5069ff),_0x4e498d();}}));}['afterInit'](){const _0x2867b7=this['editor']['plugins']['get'](j);_0x2867b7['context']===this['editor']&&(_0x2867b7['hasActive']()||_0x2867b7['switchTo']('inline'));}['setActiveAnnotation'](_0x1362ec){_0x1362ec!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1362ec&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1362ec)&&this['_addAnnotationToBalloon'](_0x1362ec,!0x0),_0x1362ec['isActive']=!0x0),_0x1362ec||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1362ec);}['attach'](_0x4c2c8e){this['annotations']=_0x4c2c8e;const _0x57d8c6=this['editor']['plugins']['get'](j),_0x3339fd=this['_balloon'];if(this['isAttached'])throw new _0x3888cd('inlineannotations-attach-already-attached',this);if(_0x57d8c6['context']!==this['editor'])throw new _0x3888cd('inlineannotations-not-allowed-with-context',this);const _0x30e3bd=this['editor']['plugins']['get'](b);this['listenTo'](_0x30e3bd,'refresh',()=>{const _0xaf4027=_0x30e3bd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x53f7a1,_0x5cbabb;!this['_forceRefresh']&&(_0x53f7a1=_0xaf4027,_0x5cbabb=this['_selectedAnnotations'],_0x53f7a1['length']===_0x5cbabb['length']&&_0x53f7a1['every'](_0x4b5b95=>_0x5cbabb['includes'](_0x4b5b95)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xaf4027),this['setActiveAnnotation'](_0xaf4027[0x0]||null));}),this['listenTo'](_0x30e3bd,'blur',(_0x2c80c6,{isAnnotationTracked:_0x532215})=>{this['activeAnnotation']&&_0x532215(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x552aac,_0x36fb1e,_0x547734)=>{_0x547734||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4c2c8e,'remove',(_0x523205,_0x1b8e42)=>{this['_removeAnnotationFromBalloon'](_0x1b8e42),_0x1b8e42===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3339fd,'change:visibleView',(_0x1108b2,_0x36cf88,_0xe9fec6,_0x35c158)=>{_0x35c158&&this['stopListening'](_0x35c158);const _0x45e7ec=_0x4c2c8e['getByView'](_0xe9fec6);_0xe9fec6&&_0x45e7ec&&(this['listenTo'](_0xe9fec6,'change:height',()=>{_0x3339fd['updatePosition']();}),this['listenTo'](_0xe9fec6,'Esc',()=>{this['_closeAnnotation'](_0x45e7ec),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x45e7ec&&this['setActiveAnnotation'](_0x45e7ec));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3339fd['visibleView']&&(_0x4c2c8e['getByView'](_0x3339fd['visibleView'])&&_0x3339fd['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 _0x3888cd('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x44a09b of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x44a09b);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x38082b){for(const _0x936089 of this['_selectedAnnotations'])_0x38082b['includes'](_0x936089)||this['_manuallyClosed']['delete'](_0x936089);for(const _0x455bbd of this['annotations'])_0x38082b['includes'](_0x455bbd)||this['_removeAnnotationFromBalloon'](_0x455bbd);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2944ee of _0x38082b)this['_addAnnotationToBalloon'](_0x2944ee);}this['_selectedAnnotations']=_0x38082b;}['_addAnnotationToBalloon'](_0x54559a,_0x5e4d4c=!0x1){this['_manuallyClosed']['has'](_0x54559a)||(this['_addedAnnotations']['has'](_0x54559a)||this['_balloon']['hasView'](_0x54559a['view'])||(this['_addedAnnotations']['add'](_0x54559a),this['_balloon']['add']({'stackId':_0x54559a['view']['id'],'view':_0x54559a['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x54559a)}})),_0x5e4d4c&&this['_balloon']['showStack'](_0x54559a['view']['id']));}['_getBalloonTargetForAnnotation'](_0x10e10d){const _0x4e44ae=_0x10e10d['target'],_0x501e7d=this['editor']['editing']['view'],_0x4858ac=_0x501e7d['document']['selection']['getFirstRange'](),_0x95afdb=_0x501e7d['domConverter']['viewRangeToDom'](_0x4858ac);if(_0x95afdb['collapse'](!0x0),_0x4e44ae){if(_0x4e44ae instanceof _0x4904b4)return _0x4e44ae;let _0xe74311=[];for(const _0x391ae0 of _0x4e44ae)_0xe74311['push'](...F(_0x391ae0['getClientRects']()));_0xe74311=function(_0x4e02ff){const _0x2706ad=[];let _0x4d768a=_0x4e02ff[0x0];for(let _0x39a2b6=0x1;_0x39a2b6<_0x4e02ff['length'];_0x39a2b6++)P(_0x4d768a,_0x4e02ff[_0x39a2b6])?_0x4d768a['width']+=_0x4e02ff[_0x39a2b6]['width']:(_0x2706ad['push'](_0x4d768a),_0x4d768a=_0x4e02ff[_0x39a2b6]);return _0x2706ad['push'](_0x4d768a),_0x2706ad;}(_0xe74311);const _0x34707f=_0x95afdb['getBoundingClientRect']();return _0xe74311['find'](_0x2bc966=>_0x2bc966['top']<=_0x34707f['top']&&_0x2bc966['bottom']>=_0x34707f['bottom']&&_0x2bc966['left']<=_0x34707f['left']&&_0x2bc966['right']>=_0x34707f['right'])||_0xe74311[0x0];}return _0x10e10d['targetRect']||_0x95afdb;}['_removeAnnotationFromBalloon'](_0x418da0){this['_addedAnnotations']['has'](_0x418da0)&&this['_balloon']['hasView'](_0x418da0['view'])&&(this['_addedAnnotations']['delete'](_0x418da0),this['_balloon']['remove'](_0x418da0['view']));}['_closeAnnotation'](_0x35cf2d){this['_manuallyClosed']['add'](_0x35cf2d),this['_removeAnnotationFromBalloon'](_0x35cf2d);}}function F(_0x3ab973){return Array['from'](_0x3ab973)['map'](DOMRect['fromRect']);}function P(_0x16c032,_0x557f88){return _0x16c032['top']===_0x557f88['top']&&_0x16c032['bottom']===_0x557f88['bottom']&&_0x16c032['right']===_0x557f88['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x30bab4,_0x3ea122){super(_0x30bab4),this['set']('isEmpty',!_0x3ea122['length']),this['focusTracker']=new _0x3f0639(),this['_annotationViews']=_0x3ea122,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x47818a({'focusables':_0x3ea122,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3ea122,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3ea122,'remove',(_0x252afe,_0x15065a)=>{_0x15065a['isActive']&&this['focus'](),_0x3ea122['length']||(this['isEmpty']=!0x0);});const _0x16f3dd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x30bab4,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3ea122},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x16f3dd['if']('isEmpty','ck-hidden',_0x3f03d0=>!_0x3f03d0)]},'children':[{'text':N(_0x30bab4,'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 _0xddd0f9 of this['_annotationViews'])this['focusTracker']['add'](_0xddd0f9['element']);this['_annotationViews']['on']('change',(_0x1fca1d,{added:_0x3b5e22,removed:_0x39ee1b})=>{for(const _0x4d3359 of _0x3b5e22)this['focusTracker']['add'](_0x4d3359['element']);for(const _0x587bbf of _0x39ee1b)this['focusTracker']['remove'](_0x587bbf['element']);});}}class p extends _0x1a03b6{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x43cc7c){super(_0x43cc7c),this['archivedThreads']=new _0x55c097();}['init'](){const _0x1d2418=this['context'],_0x1c27db=_0x1d2418['plugins']['get'](o),_0x2c7ee2=_0x1d2418['plugins']['get'](y);this['listenTo'](_0x1c27db,'addCommentThread',(_0x1c5697,{threadId:_0x38c405})=>{const _0x160d46=_0x1c27db['getCommentThread'](_0x38c405);_0x160d46['archivedAt']&&this['archivedThreads']['add'](_0x160d46,this['_calculatePosition'](_0x160d46['archivedAt'])),this['listenTo'](_0x160d46,'change:archivedAt',(_0x2546ef,_0x29c423,_0x1e3d32)=>{_0x1e3d32?this['archivedThreads']['has'](_0x160d46)||this['archivedThreads']['add'](_0x160d46,this['_calculatePosition'](_0x160d46['archivedAt'])):this['archivedThreads']['has'](_0x160d46)&&this['archivedThreads']['remove'](_0x160d46);});}),this['listenTo'](_0x1c27db,'removeCommentThread',(_0x2e4374,{threadId:_0x252c69})=>{const _0xda717c=_0x1c27db['getCommentThread'](_0x252c69);this['stopListening'](_0xda717c),this['archivedThreads']['has'](_0xda717c)&&this['archivedThreads']['remove'](_0xda717c);},{'priority':'highest'}),this['listenTo'](_0x2c7ee2['collection'],'focus',(_0x1f2cd4,_0x562c73)=>{_0x562c73['isVisible']||(_0x562c73['isActive']=!0x0,_0x2c7ee2['activate'](_0x562c73));});}['_calculatePosition'](_0x156be6){const _0x3deb20=[...this['archivedThreads']]['findIndex'](_0x3012f5=>_0x3012f5['archivedAt']<_0x156be6);return _0x3deb20>-0x1?_0x3deb20:this['archivedThreads']['length'];}}class a extends _0x22a428{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x46fba1];}constructor(_0x37a84e){super(_0x37a84e),this['annotationViews']=new _0x4221f7(),this['_pendingThreads']=[];}['init'](){const _0x35b1b3=this['editor'],_0x5acb59=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x35b1b3['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x31c82b,!0x0)),_0x35b1b3['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x95e7fb=this['_createCommentsArchiveButton'](_0x3e45ab);return _0x95e7fb['set']({'role':'menuitemcheckbox'}),_0x95e7fb;});const _0x2b9279=_0x35b1b3['plugins']['get'](p),_0x5ad7f2=_0x35b1b3['plugins']['get']('Annotations'),_0x2627c2=_0x35b1b3['plugins']['get']('CommentsRepository');_0x2b9279['archivedThreads']['forEach'](_0xe2deaa=>{this['_handleNewThread'](_0xe2deaa);}),this['listenTo'](_0x2b9279['archivedThreads'],'add',(_0x5eb0bf,_0x4b10d5)=>{this['_handleNewThread'](_0x4b10d5);}),this['listenTo'](_0x5ad7f2['collection'],'add',(_0x4f822f,_0x366723)=>{const _0x54f4f9=this['_pendingThreads']['find'](_0x57350a=>{const _0xd3c7ba=_0x2627c2['_threadToController']['get'](_0x57350a);return _0xd3c7ba&&_0x366723['innerView']===_0xd3c7ba['view'];});if(_0x54f4f9){const _0x28b05b=this['_calculatePosition'](_0x54f4f9['archivedAt']);this['annotationViews']['add'](_0x366723['view'],_0x28b05b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x54f4f9),0x1);}}),this['listenTo'](_0x2b9279['archivedThreads'],'remove',(_0x151592,_0xe6eaac)=>{const _0x5e3368=_0x35b1b3['config']['get']('collaboration.channelId');if(!_0x5e3368||_0xe6eaac['channelId']===_0x5e3368){if(this['_pendingThreads']['includes'](_0xe6eaac))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xe6eaac),0x1);else{const _0x4aeea0=_0x2627c2['_threadToController']['get'](_0xe6eaac),_0x3040a1=_0x5ad7f2['getByInnerView'](_0x4aeea0['view']);this['annotationViews']['remove'](_0x3040a1['view']),this['stopListening'](_0x3040a1['focusableElements']);}}}),this['listenTo'](_0x5ad7f2['collection'],'add',(_0x5e0190,_0x237a0b)=>{this['listenTo'](_0x237a0b,'escape',_0x5acb59);}),this['listenTo'](_0x5ad7f2['collection'],'remove',(_0x3db396,_0x38fa76)=>{this['stopListening'](_0x38fa76,'escape',_0x5acb59);});}['_handleNewThread'](_0x649da2){const _0x4b95b4=this['editor']['plugins']['get']('CommentsRepository'),_0x3e7081=this['editor']['plugins']['get']('Annotations'),_0x22a9db=this['editor']['config']['get']('collaboration.channelId');if(!_0x22a9db||_0x649da2['channelId']===_0x22a9db){const _0x2da876=_0x4b95b4['_threadToController']['get'](_0x649da2);if(!_0x2da876)return void this['_pendingThreads']['push'](_0x649da2);const _0x2846c0=this['_calculatePosition'](_0x649da2['archivedAt']),_0x34e4a6=_0x3e7081['getByInnerView'](_0x2da876['view']);_0x34e4a6['isVisible']&&_0x3e7081['_visibleAnnotations']['remove'](_0x34e4a6),this['annotationViews']['add'](_0x34e4a6['view'],_0x2846c0);}}['_calculatePosition'](_0x2b7c2d){const _0x550609=this['editor']['config']['get']('collaboration.channelId'),_0x368619=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x21d24f=>_0x21d24f['channelId']===_0x550609)['findIndex'](_0x48042d=>_0x48042d['archivedAt']<_0x2b7c2d);return _0x368619<0x0||_0x368619>this['annotationViews']['length']?this['annotationViews']['length']:_0x368619-0x1;}['_toggleDialog'](){const _0x412dc5=this['editor'],_0x1def01=_0x412dc5['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x412dc5['locale'],this['annotationViews'])),'commentsArchive'===_0x1def01['id']?_0x1def01['hide']():_0x1def01['show']({'id':'commentsArchive','title':N(_0x412dc5['locale'],'COMMENTS_ARCHIVE'),'icon':_0x5092a2,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5a724f['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0xe6cef9,_0x2e4da0=!0x1){const _0x356797=this['editor']['locale'],_0x6366a6=this['editor']['plugins']['get']('Dialog'),_0x328419=new _0xe6cef9(_0x356797);return _0x328419['bind']('isEnabled')['to'](this,'isEnabled'),_0x328419['bind']('isOn')['to'](_0x6366a6,'id',_0x259e41=>'commentsArchive'===_0x259e41),_0x328419['set']({'label':N(_0x356797,'COMMENTS_ARCHIVE'),'icon':_0x5092a2,'isToggleable':!0x0}),_0x2e4da0&&(_0x328419['tooltip']=!0x0),this['listenTo'](_0x328419,'execute',()=>this['_toggleDialog']()),_0x328419;}['_hideDialogOnAnnotationEscape']=_0xa7dbbf=>{const _0x5c101c=_0xa7dbbf['source'];if(!this['annotationViews']['has'](_0x5c101c['view']))return;const _0x311009=this['editor']['plugins']['get']('Dialog');_0x311009['isOpen']&&'commentsArchive'===_0x311009['id']&&(_0x311009['hide'](),_0xa7dbbf['stop']());};}class gi extends _0x22a428{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
23
+ import{Editor as _0x1950a2,ContextPlugin as _0x4f7306,PendingActions as lt,Command as _0x56b6c2,Plugin as _0x6c9bcf,Context as _0x25a64a}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x5b7b5d,uid as _0x456ced,KeystrokeHandler as jt,FocusTracker as _0x58f4fb,diff as _0x40502f,Collection as _0x584cc7,Rect as _0x4ec800,CKEditorError as _0x23d4ab,first as _0x3f5c70,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0xd181bf,keyCodes as _0x395c85}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3ccdc5,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x3d231e,trimHtml as _0x2ac8d8,LateFocusDropdownButtonView as _0x505eaa,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x1e3adc}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x24341f}from'es-toolkit/compat';import{IconUndo as _0x32a319,IconCheck as _0x4bd9c2,IconPencil as _0x15a5b2,IconRemoveComment as _0x152e60,IconThreeVerticalDots as _0x52de17,IconAddComment as _0x56d41d,IconCommentsArchive as _0x4fc354}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x1a6b88,ButtonView as _0x38e985,ViewCollection as _0x2d6a7d,createDropdown as _0x25f4e7,ListView as _0xe6b2f6,focusChildOnDropdownOpen as _0x11e431,ListItemView as _0x329efb,MenuBarMenuListItemButtonView as _0x5a3c61,BodyCollection as _0x5e1067,BalloonPanelView as _0x436ff8,ContextualBalloon as _0x552e4a,Dialog as _0x583c95,DialogViewPosition as _0x307dc1}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x191965}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x21530a}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x1bd861}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
+ _0x5b7b5d(){['model'];['view'];constructor(_0x4d06b6,_0x54173e){super(),this['model']=_0x4d06b6,this['model']['_isAttached']=!0x0,this['view']=_0x54173e,this['listenTo'](_0x54173e,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x54173e,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x54173e,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x54173e,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x54173e,'addComment',(_0x26ea56,_0x4d3c85)=>this['addComment'](_0x4d3c85)),this['listenTo'](_0x54173e,'updateComment',(_0x3e7961,_0x45519c,_0x57917f)=>this['updateComment'](_0x45519c,_0x57917f)),this['listenTo'](_0x54173e,'removeComment',(_0x41f7cd,_0x48cb73)=>this['removeComment'](_0x48cb73));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x491a12){this['model']['addComment']({'content':_0x491a12,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x552311,_0x1d4de1){this['model']['getComment'](_0x552311)['update']({'content':_0x1d4de1});}['removeComment'](_0x363a3a){this['model']['getComment'](_0x363a3a)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x1a0f8f,_0x476da2,_0x5c5e3d){const t=_0x1a0f8f['t'];switch(_0x476da2){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'},_0x5c5e3d);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'},_0x5c5e3d);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'},_0x5c5e3d);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'},_0x5c5e3d);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x5c5e3d);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'},_0x5c5e3d);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'},_0x5c5e3d);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'},_0x5c5e3d);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0xdae8b3,_0x5aab7c){super(_0xdae8b3);const _0x5c1939=_0x456ced();this['main']=this['createCollection'](),this['editable']=new $t(_0xdae8b3,_0x5aab7c,void 0x0,{'label':()=>N(_0xdae8b3,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xdae8b3['uiLanguageDirection'],'lang':_0xdae8b3['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5c1939},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x38adc0){super(_0x38adc0),this['view']=new Vt(_0x38adc0['locale'],_0x38adc0['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1013ed=this['editor']['editing']['view'],_0x17de24=this['view']['editable'],_0x3b8bd8=_0x1013ed['document']['getRoot']();_0x17de24['name']=_0x3b8bd8['rootName'],this['view']['render']();const _0x39ca85=_0x17de24['element'];this['setEditableElement'](_0x17de24['name'],_0x39ca85),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1013ed['attachDomRoot'](_0x39ca85),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
25
+ _0x5b7b5d(_0x1950a2){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Qt)());constructor(_0x7e8acf={}){function _0x165154(_0x113fc4){return _0x113fc4['map'](_0x5b5f25=>String['fromCharCode'](_0x5b5f25))['join']('');}(_0x7e8acf=Object['assign']({},_0x7e8acf))['plugins']||(_0x7e8acf['plugins']=Rt['defaultPlugins']),super(_0x7e8acf),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x165154([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x165154([0x76,0x69,0x65,0x77])][_0x165154([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x165154([0x61,0x75,0x74,0x6f]),this[_0x165154([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x165154([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x165154([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x165154([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x165154([0x6f,0x6b])});}['create'](){const _0x41506a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x41506a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3d5a92=>{const _0x543e7c=this['model']['document']['getRoot'](),_0x1bad55=_0x543e7c&&_0x543e7c['getChild'](_0x543e7c['childCount']-0x1);_0x3d5a92['setSelection'](_0x1bad55,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3f8435=this['editing']['view'],_0x412fb6=_0x3f8435['document']['getRoot'](),_0x4ef8af=_0x412fb6['getChild'](0x0);_0x412fb6['childCount']>0x1||!_0x4ef8af||'p'!=_0x4ef8af['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x3f8435,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4ef8af['placeholder']=this['placeholder']),St({'view':_0x3f8435,'element':_0x4ef8af,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4ef8af);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3ba9f1,_0x50a370={}){super(_0x3ba9f1),this['editor']=null,this['_editorConfig']=_0x50a370,this['set']('value',_0x50a370['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x3ba9f1,'Reply...')),this['set']('submitLabel',N(_0x3ba9f1,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x58f4fb(),this['focusCycler']=new _0x1a6b88({'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',(_0xf10cd8,_0x27a24b)=>{this['cancelButtonView']['fire']('execute'),_0x27a24b();}),this['keystrokes']['set']('Ctrl+Enter',(_0x50a304,_0x474e49)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x474e49());}),this['on']('submit',(_0x34cb05,_0xeb764f)=>{_0xeb764f['length']>0xfde8?(alert(N(_0x3ba9f1,'TOO_LONG_COMMENT_ALERT',[_0xeb764f['length'],0xfde8])),_0x34cb05['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0xe4153=this['editor'];this['element']['insertBefore'](_0xe4153['ui']['element'],this['element']['firstChild']),_0xe4153['model']['document']['on']('change',()=>this['value']=_0xe4153['getData']()),_0xe4153['bind']('placeholder')['to'](this),this['focusables']['add'](_0xe4153['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3f25fc){-0x1===_0x3f25fc?(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:_0x473a16}=this,_0x542026=new _0x38e985(_0x473a16);return _0x542026['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x542026['withText']=!0x0,_0x542026['bind']('label')['to'](this,'submitLabel'),_0x542026['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x542026['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x25494d,_0x3a9472)=>!_0x3a9472&&!!_0x25494d['trim']()),_0x542026;}['_createCancelButton'](){const {locale:_0x48b031}=this,_0x4ba5e4=new _0x38e985(_0x48b031);return _0x4ba5e4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4ba5e4['label']=N(_0x48b031,'Cancel'),_0x4ba5e4['withText']=!0x0,_0x4ba5e4['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4ba5e4;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x241524=>{this['focusTracker']['add'](_0x241524['element']);}),this['focusables']['on']('change',(_0x59015e,_0x5a7ccb)=>{for(const _0x46c696 of Array['from'](_0x5a7ccb['added'])['reverse']())this['focusTracker']['add'](_0x46c696['element']);});}}class ie extends kt{constructor(_0x5aac53,_0x2d96ed,_0xdcb5d1){super(_0x5aac53),this['commentInputView']=new os(_0x5aac53,_0xdcb5d1),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5933ba,_0x391660)=>_0x5933ba||!!_0x391660),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 _0x3ccdc5(_0x5aac53,_0x2d96ed),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'](_0x27d5a6){this['commentInputView']['focus'](_0x27d5a6);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x10a4bd,_0x37775f)=>{const {submitButtonView:_0xa974e0,cancelButtonView:_0x18b8b0,editor:_0x2de1e2}=this['commentInputView'];[_0xa974e0['element'],_0x18b8b0['element'],_0x2de1e2?_0x2de1e2['editing']['view']['getDomRoot']():null]['filter'](_0x373bad=>_0x373bad)['some'](_0x54a66f=>_0x54a66f['contains'](_0x37775f['target']))||(this['focus'](),_0x37775f['preventDefault']());});}}class rs extends kt{constructor(_0x9a7948){super(_0x9a7948);const _0x5218d6=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5218d6['to']('count',_0x1a2a9e=>N(_0x9a7948,'NUMBER_OF_COMMENTS',_0x1a2a9e))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x433c1b,_0x451827,_0x30d66d){super(_0x433c1b);const _0x49653d=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x451827['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x451827,this['_config']=_0x30d66d,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x58f4fb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1a6b88({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x55f952=>this['commentViews']['map'](_0x5dc274=>_0x5dc274['element'])['includes'](_0x55f952['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x433c1b),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x330df3=>_0x330df3-this['_config']['maxCommentsWhenCollapsed']);for(const _0x57a1d9 of _0x451827['comments'])this['_handleNewCommentModel'](_0x57a1d9);this['_handleInfoComment'](),this['listenTo'](_0x451827['comments'],'add',(_0xf533b1,_0x2f7f97)=>{const _0x2f2c02=this['_calculatePosition'](_0x2f7f97);this['length']++,this['_handleNewCommentModel'](_0x2f7f97,_0x2f2c02),this['refreshVisibleViews']();}),this['listenTo'](_0x451827['comments'],'remove',(_0x53b55d,_0x1ee5a7)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1ee5a7),this['refreshVisibleViews']();}),this['listenTo'](_0x451827,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x451827,'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',_0x49653d['if']('length','ck-hidden',_0x385013=>!_0x385013)],'aria-label':N(_0x433c1b,'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'](_0xd1fecf){-0x1===_0xd1fecf?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x225a88 of this['commentViews'])_0x225a88['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1a5c81,_0x13a320){const _0x5641f1=new this['_config']['CommentView'](this['locale'],_0x1a5c81,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5641f1['viewUid']=_0x1a5c81['id'],_0x5641f1['delegate']('removeComment')['to'](this),_0x5641f1['delegate']('updateComment')['to'](this),_0x5641f1['delegate']('resolveCommentThread')['to'](this),_0x5641f1['delegate']('editorReady')['to'](this),_0x5641f1['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5641f1,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5641f1,_0x13a320);}['_calculatePosition'](_0x88cf48){const _0x42fd4d=this['_model']['_findOptimalIndex'](_0x88cf48);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x88cf48['authoredAt']?_0x42fd4d-0x1:_0x42fd4d:_0x42fd4d-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x438a7e={'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'],_0x438a7e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x438a7e));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x47ca30){const _0x43fc11=this['commentViews']['remove'](_0x47ca30['id']);this['stopListening'](_0x43fc11),_0x43fc11['isEditMode']&&this['_updateHasDirtyComment'](),_0x43fc11['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x442f38=>_0x442f38['isEditMode']);}['_rearrangeCollapse'](){const _0x5aa079=function(_0x30d48d){const _0x3acc4e=new _0x584cc7();for(const _0x49aeae of _0x30d48d)_0x3acc4e['add'](_0x49aeae);return _0x3acc4e;}(this['commentViews']),_0xbcb6dd=this['_collapsedCommentsView']['count'];for(let _0x215f90=0x1;_0x215f90<=_0xbcb6dd;_0x215f90++)_0x5aa079['remove'](0x1);for(const _0x130630 of _0x5aa079)_0x130630['collapse']();_0xbcb6dd>0x0&&_0x5aa079['add'](this['_collapsedCommentsView'],0x1),ns(_0x40502f(Array['from'](this['visibleViews']),Array['from'](_0x5aa079)),this['visibleViews'],_0x5aa079);}['_rearrangeExpand'](){ns(_0x40502f(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x9c0256 of this['visibleViews'])_0x9c0256['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4375fb=>{this['focusTracker']['add'](_0x4375fb['element']),this['keystrokes']['listenTo'](_0x4375fb['element']);}),this['commentViews']['on']('change',(_0x21f36a,_0x27ca7e)=>{for(const _0x38eee5 of _0x27ca7e['removed'])this['focusTracker']['remove'](_0x38eee5['element']),this['keystrokes']['stopListening'](_0x38eee5['element']);for(const _0x34ffcd of Array['from'](_0x27ca7e['added'])['reverse']())this['focusTracker']['add'](_0x34ffcd['element']),this['keystrokes']['listenTo'](_0x34ffcd['element']);});}}function ns(_0x2166ff,_0x5834fe,_0xb013d6){let _0x133598=0x0;for(const _0x15b7b4 of _0x2166ff)switch(_0x15b7b4){case'insert':_0x5834fe['add'](_0xb013d6['get'](_0x133598),_0x133598),_0x133598++;break;case'delete':_0x5834fe['remove'](_0x133598);break;case'equal':_0x133598++;}}class oe extends kt{constructor(_0x124b66){super(_0x124b66);const _0x419e48=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x419e48['to']('contextValue',_0x4f5c02=>N(_0x124b66,'THREAD_CONTEXT_LABEL',_0x4f5c02)),'tabindex':-0x1},'children':[{'text':_0x419e48['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x47d122,_0x33740b){super(_0x47d122);const _0x3e835d=this['bindTemplate'];this['_model']=_0x33740b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x58f4fb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1a6b88({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xecfe86=>!!_0xecfe86),this['bind']('contextValue')['to'](this['_model'],'context',_0x569e88=>_0x569e88&&_0x569e88['value']?this['_trimContextValue'](_0x569e88['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',_0x3e835d['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 _0x1441af=new _0x38e985(this['locale']);return _0x1441af['label']=N(this['locale'],'Reopen'),_0x1441af['tooltip']=N(this['locale'],'Reopen'),_0x1441af['icon']=_0x32a319,_0x1441af['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4c015b=>!_0x4c015b),_0x1441af['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x348b14,_0x32f0e8)=>_0x348b14&&_0x32f0e8),_0x1441af['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1441af;}['_trimContextValue'](_0x2c20be){if(_0x2c20be['length']<0x96)return _0x2c20be;const _0x127f63=_0x2c20be['lastIndexOf']('\x20',0x93);return _0x2c20be['substring'](0x0,_0x127f63>-0x1?_0x127f63:0x93)+'...';}['_attachContextActions'](){const _0x5c87e2=this['element']['querySelector']('.ck-context'),_0x1429a4=_0x5c87e2['querySelector']('.ck-context__value');this['listenTo'](_0x5c87e2,'mouseenter',()=>{_0x1429a4['offsetWidth']<_0x1429a4['scrollWidth']&&_0x5c87e2['classList']['add']('overlay');}),this['listenTo'](_0x5c87e2,'mouseleave',()=>{_0x5c87e2['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3316c1 of this['focusables'])this['focusTracker']['add'](_0x3316c1['element']),this['keystrokes']['listenTo'](_0x3316c1['element']);}['_createContextView'](){const _0x4d08b8=new oe(this['locale']);return _0x4d08b8['bind']('contextValue')['to'](this),_0x4d08b8;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x32730c,_0x1d1731,_0x44314d,_0x5ad2e2){super(_0x32730c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1d1731,this['_localUser']=_0x44314d,this['_config']=_0x5ad2e2,this['commentThreadHeaderView']=new Yt(_0x32730c,_0x1d1731),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x32730c,N(_0x32730c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x32730c,_0x1d1731,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5ad2e2)),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',(_0x3001c3,_0x45d5d9)=>_0x3001c3||!!_0x45d5d9),this['bind']('isUnlinked')['to'](_0x1d1731,'unlinkedAt',_0x2a0007=>!!_0x2a0007),this['bind']('ariaLabel')['to'](this,'length',_0x389f58=>{const _0x54bf86=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x389f58,_0x54bf86]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x58f4fb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1a6b88({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2440cc=>_0x2440cc['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2f07d8=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x31faeb=_0x2f07d8['commentInputView'];return _0x2f07d8['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x31faeb,'value',(_0x48b39e,_0x2275d4,_0x164625,_0x1940d8,_0x4894e2)=>!!_0x4894e2||!!_0x1940d8&&_0x164625&&!_0x2275d4||_0x48b39e&&_0x164625&&!_0x2275d4),_0x31faeb['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xaa15d4,_0xea486d,_0x535c77)=>{let _0x47e600;return _0x47e600=_0x535c77&&_0xea486d?'Reply\x20to\x20reopen\x20discussion...':_0xaa15d4?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x47e600);}),_0x31faeb['bind']('submitLabel')['to'](this,'length',_0x2b9936=>N(this['locale'],_0x2b9936?'Reply':'Comment')),_0x31faeb['on']('submit',(_0xd9e92,_0x467ce5)=>{this['fire']('addComment',_0x467ce5),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x31faeb['on']('cancel',()=>{this['focus']();}),_0x31faeb['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x31faeb['on']('cancel',_0x630efe=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x630efe['stop']());}),this['on']('change:isActive',(_0x71b515,_0x69e32f,_0x281da0)=>{_0x281da0||this['length']||_0x31faeb['value']||this['fire']('removeCommentThread');}),_0x2f07d8;}}class gt extends/* #__PURE__ -- @preserve */
27
+ ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0xb2d113,_0x56d507,_0x5a9269,_0xafae1a){super(_0xb2d113,_0x56d507,_0x5a9269,_0xafae1a),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xb2d113,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x31064d,_0x4f7640,_0xd0ca8a)=>{_0xd0ca8a||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x26be52,_0x798d7a,_0x538f64)=>{_0x538f64&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x25232e=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x25232e['if']('isActive','ck-thread--active'),_0x25232e['if']('isUnlinked','ck-thread--unlinked'),_0x25232e['if']('isConfirm','ck-thread--remove-confirmation'),_0x25232e['to']('actionIndicator',_0x36698a=>_0x36698a?'ck-thread--'+_0x36698a:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x25232e['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 _0x2d0375 of this['commentsListView']['commentViews'])_0x2d0375['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x165b90}=this,_0x10a74a=this['commentsListView']['commentViews']['get'](0x0);_0x10a74a===this['_boundFirstCommentView']||_0x10a74a['isSystemComment']||(this['_boundFirstCommentView']=_0x10a74a,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x10a74a,'actionIndicator',_0x3be2c9=>'remove'===_0x3be2c9?'remove':null),_0x10a74a['placeholder']=N(_0x165b90,'Write\x20a\x20comment...'),_0x10a74a['removeButton']['on']('execute',_0xe8b33=>{_0xe8b33['stop'](),this['showConfirm'](N(_0x165b90,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x10a74a['focus']();}),_0x10a74a['actionBar']['add'](this['resolveButton'],0x0),_0x10a74a['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4d37cc=new _0x3d231e(this['locale']);return _0x4d37cc['label']=N(this['locale'],'Resolve'),_0x4d37cc['tooltip']=N(this['locale'],'Resolve'),_0x4d37cc['icon']=_0x4bd9c2,_0x4d37cc['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4d37cc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x59989a=>!_0x59989a),_0x4d37cc['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x54f294,_0x5aba68)=>_0x54f294&&!_0x5aba68),_0x4d37cc['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4d37cc;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x670b7a){super(_0x670b7a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x37974b,_0x36089c,_0x5e199e)=>{this['element']['innerHTML']=_0x5e199e;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x486837,_0x40e898,_0x5b5288){super(_0x486837),this['_model']=_0x40e898,this['_config']=_0x5b5288,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x40e898,'content',_0x40e898,'authoredAt',(_0x22c319,_0x5da5b8)=>N(_0x486837,'COMMENT_ARIA_LABEL',[_0x40e898['author']['name'],_0x5b5288['formatDateTime'](_0x5da5b8),new DOMParser()['parseFromString'](_0x22c319,'text/html')['body']['textContent'],_0x40e898['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x486837,N(_0x486837,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x2d6a7d(),this['focusTracker']=new _0x58f4fb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1a6b88({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x505caf=>_0x505caf['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 _0x4efc0d=new es(this['locale']);return _0x4efc0d['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xf4ec1a,_0x12beb3)=>_0x12beb3?_0x2ac8d8(_0xf4ec1a,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xf4ec1a),_0x4efc0d;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x22453c=new os(this['locale'],this['_config']['editorConfig']);return _0x22453c['value']=this['_model']['content'],_0x22453c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x22453c['submitLabel']=N(this['locale'],'Save'),_0x22453c['on']('submit',(_0x489b98,_0x20a446)=>{this['fire']('updateComment',this['_model']['id'],_0x20a446),this['switchToDisplayMode'](),this['focus']();}),_0x22453c['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x22453c['once']('editorReady',()=>{_0x22453c['focus']();}),_0x22453c['createEditor'](),_0x22453c['delegate']('editorReady')['to'](this),_0x22453c['delegate']('editorDestroyed')['to'](this),_0x22453c;}['_setupKeyboardNavigation'](){const _0x9c91fd=this['element'];this['keystrokes']['listenTo'](_0x9c91fd);for(const _0x33c30f of this['focusables'])this['focusTracker']['add'](_0x33c30f['element']),this['keystrokes']['listenTo'](_0x33c30f['element']);this['focusables']['on']('change',(_0x1b5696,_0x38f33f)=>{for(const _0x590812 of _0x38f33f['removed'])this['focusTracker']['remove'](_0x590812['element']),this['keystrokes']['stopListening'](_0x590812['element']);for(const _0x263862 of _0x38f33f['added'])this['focusTracker']['add'](_0x263862['element']),this['keystrokes']['listenTo'](_0x263862['element']);}),this['keystrokes']['set']('enter',(_0x1711d1,_0x5401c6)=>{_0x9c91fd===_0x1711d1['target']&&(this['focusCycler']['focusFirst'](),_0x5401c6());}),this['keystrokes']['set']('esc',(_0x1fe51e,_0x581a23)=>{_0x9c91fd!==_0x1fe51e['target']&&(this['focus'](),_0x581a23());});}}class Tt extends/* #__PURE__ -- @preserve */
28
+ ti(di){['actionBar'];['userView'];constructor(_0x258b0c,_0x5c441e,_0x4019e9){super(_0x258b0c,_0x5c441e,_0x4019e9),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x258b0c,'Reply...')),this['bind']('authoredAt')['to'](_0x5c441e),this['bind']('resolvedAt')['to'](_0x5c441e),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 _0x3ccdc5(_0x258b0c,_0x5c441e['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5c441e,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x45adf9=this['bindTemplate'],_0x5d2851=[{'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':_0x45adf9['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x45adf9['to']('authoredAt',_0x4f291f=>this['_config']['formatDateTime'](_0x4f291f))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x45adf9['if']('isEditMode','ck-comment__actions--hidden'),_0x45adf9['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']&&_0x5d2851['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x45adf9['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x45adf9['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x45adf9['if']('isEditMode','ck-comment--edit'),_0x45adf9['if']('isSystemComment','ck-comment--info'),_0x45adf9['to']('actionIndicator',_0x5ecf57=>_0x5ecf57?'ck-comment--'+_0x5ecf57:'')],'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':_0x5d2851}]}]};}['_createEditButton'](){const _0x5a1dea=new _0x38e985(this['locale']);return _0x5a1dea['label']=N(this['locale'],'Edit'),_0x5a1dea['icon']=_0x15a5b2,_0x5a1dea['withText']=!0x0,_0x5a1dea['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5a1dea['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x383a46=>!_0x383a46),_0x5a1dea['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5a1dea['on']('execute',()=>this['switchToEditMode']()),_0x5a1dea;}['_createRemoveButton'](){const _0xb349f5=new _0x38e985(this['locale']);return _0xb349f5['label']=N(this['locale'],'Remove'),_0xb349f5['icon']=_0x152e60,_0xb349f5['withText']=!0x0,_0xb349f5['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xb349f5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x71a127=>!_0x71a127),_0xb349f5['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xb349f5['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xb349f5;}['_createDropdown'](){const _0x21b60d=_0x25f4e7(this['locale'],_0x505eaa),_0x3c0e8f=_0x21b60d['panelView']['children'],_0x4c05a4=new _0xe6b2f6(this['locale']),_0x4f83d8=_0x21b60d['bindTemplate'];_0x11e431(_0x21b60d,()=>this['items']['find'](_0x13bcec=>_0x13bcec['isVisible'])),_0x21b60d['extendTemplate']({'attributes':{'class':[_0x4f83d8['if']('isVisible','ck-hidden',_0x181910=>!_0x181910)]}});const _0x56f98d=(_0x4218f5,_0x523c20=-0x1)=>{const _0x4d780c=new _0x329efb(this['locale']);_0x4d780c['children']['add'](_0x4218f5);const _0x5c77fe=_0x523c20>-0x1?_0x523c20:_0x4c05a4['items']['length'];_0x4c05a4['items']['add'](_0x4d780c,_0x5c77fe);const _0x41fe1c=Array['from'](this['items']);_0x21b60d['unbind']('isEnabled','isVisible'),_0x21b60d['bind']('isEnabled')['toMany'](_0x41fe1c,'isEnabled',(..._0x477a41)=>_0x477a41['some'](_0x2f4a7a=>_0x2f4a7a)),_0x21b60d['bind']('isVisible')['toMany'](_0x41fe1c,'isVisible',(..._0xf2eeb9)=>_0xf2eeb9['some'](_0x1e27ed=>_0x1e27ed));};_0x21b60d['panelPosition']='sw',_0x21b60d['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x52de17});for(const _0x3b00e8 of this['items'])_0x56f98d(_0x3b00e8);return _0x3c0e8f['add'](_0x4c05a4),_0x21b60d['listenTo'](this['items'],'add',(_0x22720a,_0x4c842c,_0x786cb1)=>{_0x56f98d(_0x4c842c,_0x786cb1);}),_0x21b60d['listenTo'](this['items'],'remove',(_0xb79eb4,_0x1f0cc1,_0x12c0f7)=>{_0x4c05a4['items']['remove'](_0x12c0f7);}),_0x21b60d;}['_attachActions'](_0x5af9cb,_0x1868d2){const _0x1a750d=_0x5af9cb&&_0x5af9cb['element'];_0x1a750d&&(this['listenTo'](_0x1a750d,'mouseenter',()=>this['actionIndicator']=_0x1868d2),this['listenTo'](_0x1a750d,'focus',()=>this['actionIndicator']=_0x1868d2),this['listenTo'](_0x1a750d,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x1a750d,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3c7cef=super['_createCommentInputView']();return _0x3c7cef['bind']('placeholder')['to'](this),_0x3c7cef;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x5cec27){const _0x7d7e54=Dt(_0x5cec27,0x1e),_0x38eef6=new MutationObserver(_0x51de49=>{for(const _0x1e25fa of _0x51de49)('attributes'==_0x1e25fa['type']&&'class'==_0x1e25fa['attributeName']||'childList'==_0x1e25fa['type']||'characterData'==_0x1e25fa['type'])&&_0x7d7e54();});return{'attach'(_0x3cf675){_0x38eef6['observe'](_0x3cf675,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x38eef6['disconnect'](),_0x7d7e54['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x252cd6,_0x4bbd02){super(_0x252cd6),this['id']=_0x456ced(),this['focusTracker']=new _0x58f4fb(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x10cee6,_0x4865da)=>this['fire']('Esc',_0x4865da)),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'](_0x4bbd02),this['mainView']=_0x4bbd02;const _0x15f715=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x15f715['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 _0x4bc4b1=this['element']['clientHeight'];_0x4bc4b1&&(this['height']=_0x4bc4b1);}}class T extends/* #__PURE__ -- @preserve */
29
+ _0x5b7b5d(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1b5644,target:_0x5bde5a,type:_0x566940,isVisible:_0x28cb27=!0x0}){super(),this['view']=_0x1b5644,this['view']['element']||this['view']['render'](),this['_type']=_0x566940,this['_target']=_0x5bde5a,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x584cc7([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4ddf96,_0x316a2d)=>{this['view']['focusTracker']['add'](_0x316a2d);}),this['focusableElements']['on']('remove',(_0x205a1c,_0x187ea6)=>{this['view']['focusTracker']['remove'](_0x187ea6);}),this['set']('isVisible',_0x28cb27);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3cf994=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x3cf994),_0x3cf994;}get['targetRect'](){const _0x5d6fa0=this['target'];if(null===_0x5d6fa0)return null;if(_0x5d6fa0 instanceof _0x4ec800)return _0x5d6fa0;const _0xee581b=_0x5d6fa0['filter'](_0x244a79=>function(_0x3542d9){const _0x5e61c2=_0x3542d9['offsetParent'];if(_0x5e61c2)return!0x0;const _0x3270e0=_0x3542d9['getClientRects']()['item'](0x0);return!!_0x3270e0;}(_0x244a79));return 0x0===_0xee581b['length']?null:new _0x4ec800(_0xee581b[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x58e1f3){this['view']['isActive']=_0x58e1f3,this['view']['mainView']['isActive']=_0x58e1f3;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x35a365){if(!(null===_0x35a365||_0x35a365 instanceof _0x4ec800||Array['isArray'](_0x35a365)&&_0x35a365['every'](_0x434fa0=>fi(_0x434fa0))))throw new _0x23d4ab('annotation-invalid-target',null,{'target':_0x35a365});}['_getNormalizedTarget'](){const _0x5721a6='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5721a6)?[_0x5721a6]:_0x5721a6;}}function fi(_0x59d22e){return null!==_0x59d22e&&'object'==typeof _0x59d22e&&'nodeType'in _0x59d22e&&0x1===_0x59d22e['nodeType'];}class S extends _0x584cc7{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x17c090=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x58f4fb(),this['_focusTracker']['on']('change:isFocused',(_0xcfe78c,_0x212946,_0x1834cb)=>{_0x1834cb||this['fire']('blur');});for(const _0x2b6813 of _0x17c090)this['add'](_0x2b6813);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2d443f){if(this['has'](_0x2d443f))throw new _0x23d4ab('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2d443f['innerView'],_0x2d443f),this['_viewToAnnotation']['set'](_0x2d443f['view'],_0x2d443f);for(const _0x15030b of _0x2d443f['focusableElements'])this['_focusTracker']['add'](_0x15030b);this['listenTo'](_0x2d443f['focusableElements'],'add',(_0x313d14,_0x1ace67)=>{this['_focusTracker']['add'](_0x1ace67);}),this['listenTo'](_0x2d443f['focusableElements'],'remove',(_0x430e84,_0xdd3484)=>{this['_focusTracker']['remove'](_0xdd3484);}),this['listenTo'](_0x2d443f['view']['focusTracker'],'change:isFocused',(_0x7d49d7,_0x32c72f,_0xcc88d7)=>{_0xcc88d7&&this['fire']('focus',_0x2d443f);}),_0x2d443f['updateTargetRect']();const _0xa4ff64=this['_getOrderInContent'](_0x2d443f['view']['targetRect']);return super['add'](_0x2d443f,_0xa4ff64);}['remove'](_0x164dd8){if(!this['has'](_0x164dd8))throw new _0x23d4ab('annotationcollection-not-existing-item',null);this['stopListening'](_0x164dd8['view']['focusTracker']),this['stopListening'](_0x164dd8['focusableElements']);for(const _0x52184c of _0x164dd8['focusableElements'])this['_focusTracker']['remove'](_0x52184c);return this['_viewToAnnotation']['delete'](_0x164dd8['view']),this['_innerViewToAnnotation']['delete'](_0x164dd8['innerView']),super['remove'](_0x164dd8);}['getByInnerView'](_0x5bfb16){return this['_innerViewToAnnotation']['get'](_0x5bfb16);}['getByView'](_0x17303f){return this['_viewToAnnotation']['get'](_0x17303f);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x516e00 of this)_0x516e00['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4fd6bc=Array['from'](this)['sort']((_0x123a20,_0x1db897)=>w(_0x123a20['view']['targetRect'],_0x1db897['view']['targetRect']));for(let _0x446cd7=_0x4fd6bc['length']-0x1;_0x446cd7>0x0;_0x446cd7--){const _0xb32488=_0x4fd6bc[_0x446cd7];_0x446cd7!==this['getIndex'](_0xb32488)&&(this['remove'](_0xb32488),this['add'](_0xb32488));}}['_getOrderInContent'](_0x5c9152){let _0x43e975=0x0;if(!_0x5c9152)return this['length'];for(const _0x55bdc2 of this){const _0x4f3aae=_0x55bdc2['view']['targetRect'];if(_0x4f3aae){if(w(_0x5c9152,_0x4f3aae)<0x0)return _0x43e975;_0x43e975++;}}return _0x43e975;}}function v({source:_0x75c921,target:_0x46c079,filter:_0x44900c}){for(const _0x18c226 of _0x75c921)_0x44900c(_0x18c226)&&_0x46c079['add'](_0x18c226);_0x46c079['listenTo'](_0x75c921,'add',(_0x320e6f,_0x1544fe)=>{_0x44900c(_0x1544fe)&&_0x46c079['add'](_0x1544fe);}),_0x46c079['listenTo'](_0x75c921,'remove',(_0x5074c4,_0x4dbd6c)=>{_0x46c079['has'](_0x4dbd6c)&&_0x46c079['remove'](_0x4dbd6c);});}function w(_0x5ad745,_0xd56d07){if(null===_0x5ad745&&null===_0xd56d07)return 0x0;if(null===_0x5ad745)return-0x1;if(null===_0xd56d07)return 0x1;const _0x1a0efc=_0x5ad745['top']-_0xd56d07['top'];return 0x0==_0x1a0efc?_0x5ad745['left']-_0xd56d07['left']:_0x1a0efc;}class y extends _0x4f7306{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d2457){if(super(_0x1d2457),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1d2457 instanceof _0x1950a2){const _0x37440b=_0x1d2457['locale'];_0x1d2457['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4429fe){this['collection']['add'](_0x4429fe);}['remove'](_0x598a2f){this['collection']['remove'](_0x598a2f),_0x598a2f['destroy']();}['refreshVisibility'](){for(const _0x3af3ed of this['collection'])_0x3af3ed['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1da793){return this['collection']['getByInnerView'](_0x1da793);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x46ba3d of this['collection'])_0x46ba3d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0xfed8a0){this['fire']('_activateAnnotation',_0xfed8a0);}['createAnnotation'](_0x287391){return new T(_0x287391);}['createAnnotationView'](_0x77fde8,_0x449ae0){return new E(_0x77fde8,_0x449ae0);}['_addActiveAnnotation'](_0x4d6df8){const _0x251763=new Set(this['activeAnnotations']);_0x251763['add'](_0x4d6df8),this['activeAnnotations']=_0x251763;}['_removeActiveAnnotation'](_0x20e1c5){const _0x495176=new Set(this['activeAnnotations']);_0x495176['delete'](_0x20e1c5),this['activeAnnotations']=_0x495176;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2cd492=this['collection'],_0x7ca0c1=this['_visibleAnnotations'];function _0x11f6bb(_0x415caf){const _0x2d14d7=_0x415caf['source'];_0x2d14d7['isVisible']&&!_0x7ca0c1['has'](_0x2d14d7)?_0x7ca0c1['add'](_0x2d14d7):!_0x2d14d7['isVisible']&&_0x7ca0c1['has'](_0x2d14d7)&&_0x7ca0c1['remove'](_0x2d14d7),_0x2d14d7['view']['focusTracker']['remove'](_0x2d14d7['view']['element']),_0x2d14d7['view']['focusTracker']['add'](_0x2d14d7['view']['element']);}this['listenTo'](_0x2cd492,'add',(_0x5b4ee6,_0x59e168)=>{_0x59e168['isVisible']&&_0x7ca0c1['add'](_0x59e168),this['listenTo'](_0x59e168,'change:isVisible',_0x11f6bb);}),this['listenTo'](_0x2cd492,'remove',(_0x4c48a1,_0x50755e)=>{_0x7ca0c1['has'](_0x50755e)&&_0x7ca0c1['remove'](_0x50755e),this['stopListening'](_0x50755e,'change:isVisible',_0x11f6bb);});}['_setupEnterAnnotationKeystroke'](){const _0xa39d84=_0x49e8e4=>{_0x49e8e4['on']('ready',()=>{_0x49e8e4['keystrokes']['set'](_0x21530a,(_0x1c41ad,_0x4ccbd2)=>{const _0x509039=_0x3f5c70(this['activeAnnotations']['values']());_0x509039&&(_0x509039['view']['focus'](),_0x4ccbd2());});});};this['context']instanceof _0x1950a2?_0xa39d84(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x34e2ee,_0x4f5395)=>{_0xa39d84(_0x4f5395);});}['_setupEscapeAnnotationHandling'](){const _0x2bcc8a=_0x42004e=>{const _0xc526a5=_0x42004e['source'],_0x204471=[];let _0x5b0710;if(Array['isArray'](_0xc526a5['target'])){_0x5b0710=_0xc526a5['target'][0x0],this['context']instanceof _0x1950a2?_0x204471['push'](this['context']):this['context']['editors']&&_0x204471['push'](...this['context']['editors']);for(const _0x349df8 of _0x204471)for(const _0x58dea3 of _0x349df8['editing']['view']['domRoots']['values']())if(_0x58dea3['contains'](_0x5b0710))return void _0x349df8['editing']['view']['focus']();_0x5b0710['focus']();}};this['listenTo'](this['collection'],'add',(_0x29147f,_0x169fe4)=>{this['listenTo'](_0x169fe4,'escape',_0x2bcc8a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x147b5c,_0x161fe4)=>{this['stopListening'](_0x161fe4,'escape',_0x2bcc8a);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4f7306{['_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(_0x1d17fb){super(_0x1d17fb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1229a5=this['context']['config'];_0x1229a5['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1229a5['define']('comments.maxThreadTotalWeight',0x1f4),_0x1229a5['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1229a5['define']('comments.CommentThreadView',gt),_0x1229a5['define']('comments.CommentView',Tt),_0x1229a5['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x55f132=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5c5540,_0x240eb5)=>this['_addCommentThread'](_0x240eb5)),this['on']('submitCommentThread',(_0xd7b906,_0x3755c9)=>this['_submitCommentThread'](_0x3755c9)),this['on']('resolveCommentThread',(_0x52825d,_0x72f8d4)=>this['_resolveCommentThread'](_0x72f8d4)),this['on']('resolveCommentThread',(_0x81dc51,_0x1baa45)=>this['_updateActiveAnnotation'](_0x1baa45),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2dd22d,_0x363db2)=>this['_reopenCommentThread'](_0x363db2)),this['on']('reopenCommentThread',(_0x4cab1b,_0x595248)=>this['_updateActiveAnnotation'](_0x595248),{'priority':'lowest'}),this['on']('removeCommentThread',(_0xbe7141,_0x155cab)=>this['_removeCommentThread'](_0x155cab)),this['on']('updateCommentThread',(_0x9e435e,_0x2d667e)=>this['_updateCommentThread'](_0x2d667e)),this['on']('updateCommentThread',(_0x486ca1,_0x565be3)=>this['_updateActiveAnnotation'](_0x565be3),{'priority':'lowest'}),this['on']('addComment',(_0x350a0d,_0x462968)=>this['_addComment'](_0x462968)),this['on']('updateComment',(_0x1be0a8,_0x5a28ba)=>this['_updateComment'](_0x5a28ba)),this['on']('removeComment',(_0x32e4d7,_0x2e89a7)=>this['_removeComment'](_0x2e89a7)),this['on']('addComment',(_0x108107,{threadId:_0x4d03d3,isFromAdapter:_0x41e1a9})=>{if(_0x41e1a9)return;const _0x45cc50=this['getCommentThread'](_0x4d03d3),_0xad8b2c=_0x45cc50&&this['_threadToController']['get'](_0x45cc50);_0xad8b2c&&_0xad8b2c['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x55f132,'change:activeAnnotations',(_0x60d657,_0x2ef58d,_0x1e87a1)=>{const _0x1bebe7=Array['from'](_0x1e87a1)['map'](_0x2d59e7=>this['_viewToController']['get'](_0x2d59e7['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1bebe7?_0x1bebe7['model']:null;});}set['adapter'](_0xacab3f){if(this['_adapter'])throw new _0x23d4ab('commentsrepository-adapter-already-set');this['_adapter']=_0xacab3f;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xd99c=_t,threadId:_0x20f006=_0x456ced(),comments:_0x25e0ec=[],unlinkedAt:_0x22662a=null,resolvedAt:_0x2b339f=null,resolvedBy:_0x1ed9e9=null,target:_0x7cb89a=null,context:_0x4423ef=null,attributes:_0x2ac789={},isResolvable:_0x5f0f7d=!0x0,isSubmitted:_0x31cf18=!0x1,isFromAdapter:_0x27d32c=!0x1}={}){return this['fire'](Nt('addCommentThread',_0xd99c),{'channelId':_0xd99c,'threadId':_0x20f006,'comments':_0x25e0ec,'unlinkedAt':_0x22662a,'resolvedAt':_0x2b339f,'resolvedBy':_0x1ed9e9,'target':_0x7cb89a,'context':_0x4423ef,'attributes':_0x2ac789,'isFromAdapter':_0x27d32c,'isResolvable':_0x5f0f7d,'isSubmitted':_0x31cf18}),this['getCommentThread'](_0x20f006);}['openNewCommentThread']({channelId:_0x7b08e7=_t,threadId:_0x19d0d8=_0x456ced(),target:_0x5bd1c6,context:_0x36b263=null,isResolvable:_0xbfe1ff=!0x0}){if(this['_readOnlyChannels']['has'](_0x7b08e7)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5bd1c6)throw new _0x23d4ab('commentsrepository-missing-target');const _0x400510=this['addCommentThread']({'channelId':_0x7b08e7,'threadId':_0x19d0d8,'target':_0x5bd1c6,'context':_0x36b263,'isResolvable':_0xbfe1ff});if(!_0x400510)return null;const _0x21223f=this['_threadToController']['get'](_0x400510),_0x1f8956=_0x21223f['view']['commentThreadInputView']['commentInputView'],_0x3a7362=this['context']['plugins']['get'](y),_0x36b1fc=_0x3a7362['getByInnerView'](_0x21223f['view']);return _0x3a7362['activate'](_0x36b1fc),_0x1f8956['once']('editorReady',()=>_0x1f8956['focus']()),_0x400510;}['hasCommentThread'](_0x32e906){if('string'!=typeof _0x32e906)throw new _0x23d4ab('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x32e906);}['updateCommentThread']({channelId:_0x727098=_t,threadId:_0xd79a67,context:_0x2f52a8,unlinkedAt:_0x4dbfb9,attributes:_0x576b9a,isFromAdapter:_0x4dfe69=!0x1}){return this['fire'](Nt('updateCommentThread',_0x727098),{'channelId':_0x727098,'threadId':_0xd79a67,'context':_0x2f52a8,'unlinkedAt':_0x4dbfb9,'attributes':_0x576b9a,'isFromAdapter':_0x4dfe69}),this['getCommentThread'](_0xd79a67);}['getCommentThread'](_0x7cab06){if('string'!=typeof _0x7cab06)throw new _0x23d4ab('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x7cab06);}['fetchCommentThread']({channelId:_0x2b0064,threadId:_0x594ae3}={}){const _0x15b4cb=this['getCommentThread'](_0x594ae3);if(_0x15b4cb)return Promise['resolve'](_0x15b4cb);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x23d4ab('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2b0064,'threadId':_0x594ae3})['then'](_0x776ffb=>this['hasCommentThread'](_0x594ae3)?this['getCommentThread'](_0x594ae3):_0x776ffb?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2b0064},_0x776ffb)):void 0x0)['catch'](_0x37c1da=>{throw console['error'](_0x37c1da),new _0x23d4ab('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0xd7dc1c,skipNotAttached:_0x357360=!0x1,skipEmpty:_0x203c60=!0x1,toJSON:_0x2b657e=!0x1}={}){const _0x1258d8=[];for(const _0x2a1242 of this['_threads']['values']())_0xd7dc1c&&_0x2a1242['channelId']!==_0xd7dc1c||_0x357360&&!_0x2a1242['isAttached']||_0x203c60&&0x0===_0x2a1242['length']||_0x1258d8['push'](_0x2a1242);return _0x2b657e?_0x1258d8['map'](_0x5290e5=>_0x5290e5['toJSON']()):_0x1258d8;}['getAnnotationForCommentThread'](_0x2e1687){const _0x42cd62=this['_threadToController']['get'](_0x2e1687);if(!_0x42cd62)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x42cd62['view'])||null;}['getCommentThreadForAnnotation'](_0x2ee7d5){const _0x1edafe=this['_viewToController']['get'](_0x2ee7d5['innerView']);return _0x1edafe?_0x1edafe['model']:null;}['setActiveCommentThread'](_0x36f9ab){const _0x524c5d=this['context']['plugins']['get'](y);if(!_0x36f9ab)return void(this['activeCommentThread']&&_0x524c5d['deactivateAll']());const _0x45a682=this['getCommentThread'](_0x36f9ab);if(!_0x45a682)throw new _0x23d4ab('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x36f9ab});if(!this['_threadToController']['has'](_0x45a682))throw new _0x23d4ab('commentsrepository-active-not-attached',null,{'threadId':_0x36f9ab});const _0x1a4d36=_0x524c5d['getByInnerView'](this['_threadToController']['get'](_0x45a682)['view']);_0x524c5d['activate'](_0x1a4d36);}['switchReadOnly'](_0x281175,_0x16407f){_0x281175?this['_readOnlyChannels']['add'](_0x16407f):this['_readOnlyChannels']['delete'](_0x16407f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xced220){return this['_readOnlyChannels']['has'](_0xced220)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3c28ab,_0x5c7865){return new vt(_0x3c28ab,_0x5c7865);}['setPermissions'](_0x43f092,_0x151e0b=_t){this['_permissions']['set'](_0x151e0b,_0x43f092),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1a18b8=_t){return this['_permissions']['has'](_0x1a18b8)?this['_permissions']['get'](_0x1a18b8):bt;}['_addCommentThread']({channelId:_0x4c70e4,threadId:_0x3e130e,comments:_0x5e8f6e,unlinkedAt:_0x3084c4,resolvedAt:_0x5e2aab,resolvedBy:_0x36627b,target:_0x46c3b2,context:_0x29ee9b,attributes:_0x3248a8,isFromAdapter:_0x3c1ed6,isResolvable:_0x803adf,isSubmitted:_0x468aa9}){if('string'!=typeof _0x3e130e)throw new _0x23d4ab('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3e130e});if(this['hasCommentThread'](_0x3e130e))throw new _0x23d4ab('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3e130e});const _0x475ffa=new pi(this,{'channelId':_0x4c70e4,'id':_0x3e130e,'context':_0x29ee9b,'attributes':_0x3248a8,'unlinkedAt':_0x3084c4,'resolvedAt':_0x5e2aab,'resolvedBy':_0x36627b?this['context']['plugins']['get'](it)['getUser'](_0x36627b):null,'isResolvable':_0x803adf,'isSubmitted':_0x468aa9||_0x3c1ed6});this['_threads']['set'](_0x3e130e,_0x475ffa);for(const _0x18dc4e of _0x5e8f6e)_0x475ffa['_add'](this['_createNewComment']({'threadId':_0x3e130e,..._0x18dc4e}));return _0x46c3b2&&_0x475ffa['attachTo'](_0x46c3b2),_0x3c1ed6||!_0x475ffa['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4c70e4,'threadId':_0x3e130e});}['_submitCommentThread']({channelId:_0x11daf1,threadId:_0x2334ca}){if(!this['hasCommentThread'](_0x2334ca))throw new _0x23d4ab('commentsrepository-missing-comment-thread',this);const _0x262487=this['getCommentThread'](_0x2334ca);if(_0x262487['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0xeaee41,comments:_0x18237a,resolvedAt:_0x5489b7,resolvedBy:_0x274fdd,context:_0x25c960,attributes:_0x39b09b}=_0x262487,_0x51403d=this['context']['plugins']['get']('PendingActions'),_0x21cd42=_0x51403d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x11daf1,'threadId':_0xeaee41,'comments':_0x18237a['map'](_0x3e8ff5=>_0x3e8ff5['toJSON']()),'resolvedAt':_0x5489b7,'resolvedBy':_0x274fdd?_0x274fdd['id']:_0x274fdd,'context':_0x25c960,'attributes':_0x39b09b})['then'](({comments:_0x3a0ba7})=>{_0x51403d['remove'](_0x21cd42);for(const _0x5e0083 of _0x3a0ba7)this['_updateComment']({'channelId':_0x11daf1,'threadId':_0x2334ca,'commentId':_0x5e0083['commentId'],'createdAt':_0x5e0083['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2a1071=>{throw console['error'](_0x2a1071),new _0x23d4ab('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4f6ca7,target:_0xab63b8}){const _0x960bdb=this['getCommentThread'](_0x4f6ca7);if(!_0x960bdb)throw new _0x23d4ab('commentsrepository-attach-missing-comment-thread',this);const _0x525ad6=this['context']['plugins']['get']('PendingActions'),_0xeee020=this['context']['plugins']['get'](y),_0x10b8af=this['_createCommentThreadView'](_0x960bdb),_0x58d21a=new vt(_0x960bdb,_0x10b8af);let _0x233ca4=null;_0x10b8af['on']('change:isDirty',(_0x3e4bed,_0x176d7f,_0x2787f7)=>{_0x2787f7?_0x233ca4=_0x525ad6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x233ca4&&(_0x525ad6['remove'](_0x233ca4),_0x233ca4=null);}),this['_threadToController']['set'](_0x960bdb,_0x58d21a),this['_viewToController']['set'](_0x10b8af,_0x58d21a);const _0x4e35d9=new E(this['context']['locale'],_0x10b8af);_0x4e35d9['bind']('length')['to'](_0x10b8af),_0x4e35d9['bind']('isDirty')['to'](_0x10b8af,'isDirty',_0x10b8af,'length',(_0x4137d7,_0x462f65)=>_0x4137d7||!_0x462f65),_0x4e35d9['bind']('isActive')['to'](_0x10b8af),_0x4e35d9['type']='comment';const _0x5d44bf=new T({'view':_0x4e35d9,'target':_0xab63b8,'type':'comment','isVisible':!_0x960bdb['archivedAt']&&!!('function'==typeof _0xab63b8?_0xab63b8():_0xab63b8)});return _0x10b8af['on']('escape',()=>{_0x5d44bf['fire']('escape');}),this['_bindAnnotationToEditors'](_0x10b8af,_0x5d44bf),_0xeee020['add'](_0x5d44bf),_0x5d44bf;}['_bindAnnotationToEditors'](_0x18b22d,_0x328c6b){this['listenTo'](_0x18b22d,'editorReady',(_0x55829e,_0x3461a9)=>{const _0xc0f498=_0x3461a9['ui']['view']['body']['bodyCollectionContainer'];_0x328c6b['focusableElements']['add'](_0xc0f498),this['context']instanceof _0x1950a2&&this['context']['ui']['focusTracker']['add'](_0xc0f498);},{'priority':'highest'}),this['listenTo'](_0x18b22d,'editorDestroyed',(_0x11d190,_0x23a4d7)=>{const _0x260569=_0x23a4d7['ui']['view']['body']['bodyCollectionContainer'];_0x328c6b['focusableElements']['has'](_0x260569)&&_0x328c6b['focusableElements']['remove'](_0x260569),this['context']instanceof _0x1950a2&&this['context']['ui']['focusTracker']['remove'](_0x260569);});}['_unbindEditors'](_0x326efb){this['stopListening'](_0x326efb,'editorReady'),this['stopListening'](_0x326efb,'editorDestroyed');}['_createCommentThreadView'](_0x22f7f6){const _0xe172cf=this['context']['plugins']['get'](it),{config:_0x4e2603,locale:_0x31d5ef}=this['context'],_0x4b0402=pt(_0x4e2603['get']('locale'),_0x31d5ef);return new(0x0,(_0x4e2603['get']('comments'))['CommentThreadView'])(_0x31d5ef,_0x22f7f6,_0xe172cf['me'],{'editorConfig':{..._0x4e2603['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4e2603['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4e2603['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4e2603['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4e2603['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4b0402,'CommentView':_0x4e2603['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x4efbba,channelId:_0x3b0cb0,resolvedAt:_0x2b01d1,resolvedBy:_0xe1e29a,isFromAdapter:_0x1d2c8e}){if(!this['hasCommentThread'](_0x4efbba))throw new _0x23d4ab('commentsrepository-missing-comment-thread',null,{'threadId':_0x4efbba});const _0x34c9c0=this['getCommentThread'](_0x4efbba);if(_0x34c9c0['isResolved'])throw new _0x23d4ab('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4efbba});const _0x2c1843=this['context']['plugins']['get'](it);if(_0x34c9c0['resolvedBy']=_0x2c1843['getUser'](_0xe1e29a),_0x34c9c0['resolvedAt']=_0x2b01d1,_0x1d2c8e||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2236d5=this['context']['plugins']['get']('PendingActions'),_0x6cfc2c=_0x2236d5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3b0cb0,'threadId':_0x4efbba})['then'](({resolvedAt:_0x2e0857,resolvedBy:_0x2ee5e7})=>{_0x2236d5['remove'](_0x6cfc2c),_0x34c9c0['resolvedBy']['id']!==_0x2ee5e7&&(_0x34c9c0['resolvedBy']=_0x2c1843['getUser'](_0x2ee5e7)),_0x34c9c0['resolvedAt']=_0x2e0857;})['catch'](_0x2cfefc=>{throw console['error'](_0x2cfefc),new _0x23d4ab('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1259ac,channelId:_0x3794d4,isFromAdapter:_0x4ab40e}){if(!this['hasCommentThread'](_0x1259ac))throw new _0x23d4ab('commentsrepository-missing-comment-thread',null,{'threadId':_0x1259ac});const _0x5f0b01=this['getCommentThread'](_0x1259ac);if(!_0x5f0b01['isResolved'])throw new _0x23d4ab('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1259ac});if(_0x5f0b01['resolvedBy']=null,_0x5f0b01['resolvedAt']=null,_0x4ab40e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x503b67=this['context']['plugins']['get']('PendingActions'),_0x5a1b05=_0x503b67['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3794d4,'threadId':_0x1259ac})['then'](()=>_0x503b67['remove'](_0x5a1b05))['catch'](_0x419ca3=>{throw console['error'](_0x419ca3),new _0x23d4ab('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2e15a3,isFromAdapter:_0x3c38c9}){const _0x580962=this['getCommentThread'](_0x2e15a3);if(!_0x580962)throw new _0x23d4ab('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2e15a3),this['_threads']['delete'](_0x2e15a3),!_0x580962['isSubmitted']||_0x3c38c9||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3a47e1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5dab02}=_0x580962,_0x3b922b=_0x3a47e1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5dab02,'threadId':_0x2e15a3})['then'](()=>_0x3a47e1['remove'](_0x3b922b))['catch'](_0x3742a7=>{throw console['error'](_0x3742a7),new _0x23d4ab('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2cfd14,unlinkedAt:_0x900e77,context:_0x5c4aec,attributes:_0x3c6546,isFromAdapter:_0x4a615d}){if('string'!=typeof _0x2cfd14)throw new _0x23d4ab('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2cfd14});if(!this['hasCommentThread'](_0x2cfd14))throw new _0x23d4ab('commentsrepository-missing-comment-thread',null,{'threadId':_0x2cfd14});const _0x2b0c06=this['getCommentThread'](_0x2cfd14);let _0xabb9c0=!0x1;if(void 0x0!==_0x5c4aec&&_0x2b0c06['context']!==_0x5c4aec&&(_0x2b0c06['context']=_0x5c4aec,_0xabb9c0=!0x0),void 0x0!==_0x900e77&&_0x2b0c06['unlinkedAt']!==_0x900e77&&(_0x2b0c06['unlinkedAt']=_0x900e77,_0xabb9c0=!0x0),_0x3c6546&&!At(_0x3c6546,_0x2b0c06['attributes'])&&(_0x2b0c06['attributes']=_0x3c6546,_0xabb9c0=!0x0),!_0xabb9c0)return Promise['resolve']();if(!_0x2b0c06['isSubmitted']||_0x4a615d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x52038a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16c47c}=_0x2b0c06,_0x48decb=_0x52038a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x16c47c,'threadId':_0x2cfd14,'context':_0x5c4aec,'unlinkedAt':_0x900e77,'attributes':_0x3c6546})['then'](()=>_0x52038a['remove'](_0x48decb))['catch'](_0x4c59e9=>{throw console['error'](_0x4c59e9),new _0x23d4ab('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xe5d139){const _0x245f23=this['context']['plugins']['get'](y),_0x443c3a=this['getCommentThread'](_0xe5d139);if(_0x443c3a['_isAttached']=!0x1,this['_threadToController']['has'](_0x443c3a)){const _0x382cd9=this['_threadToController']['get'](_0x443c3a),_0x2bb3e7=_0x382cd9['view'],_0x4246db=_0x245f23['getByInnerView'](_0x2bb3e7);this['_threadToController']['delete'](_0x443c3a),this['_viewToController']['delete'](_0x2bb3e7),_0x4246db&&_0x245f23['remove'](_0x4246db),_0x382cd9['destroy'](),_0x2bb3e7['destroy']()['then'](()=>{this['_unbindEditors'](_0x2bb3e7);});}}['_updateActiveAnnotation']({threadId:_0x4f72ca,resolvedAt:_0xda0829,unlinkedAt:_0x3f417f}){const _0x5a0044=!!_0xda0829,_0x24631f=this['context']['plugins']['get'](y),_0x4bb190=this['getCommentThread'](_0x4f72ca);if(this['_threadToController']['has'](_0x4bb190)){const _0x57661f=this['_threadToController']['get'](_0x4bb190)['view'],_0x103dc0=_0x24631f['getByInnerView'](_0x57661f);_0x103dc0&&(_0x5a0044&&_0x24631f['_removeActiveAnnotation'](_0x103dc0),_0x3f417f?_0x103dc0['isVisible']=!0x1:_0x103dc0['refreshVisibility']());}}['_getExternalAuthor'](_0xb2d41){const _0x8a80a8=this['context']['plugins']['get'](it),_0x4d7c1d=It('external:'+_0xb2d41),_0x5d4458=_0x8a80a8['getUser'](_0x4d7c1d);return _0x5d4458||_0x8a80a8['addUser']({'id':_0x4d7c1d,'name':_0xb2d41});}['_createNewComment']({threadId:_0x51235c,commentId:_0x1b260a=_0x456ced(),content:_0x4c37f4,authorId:_0x2a19f9,createdAt:_0x1d34b2,attributes:_0x154c66}){if('string'!=typeof _0x1b260a)throw new _0x23d4ab('commentsrepository-invalid-commentid');if('string'!=typeof _0x2a19f9)throw new _0x23d4ab('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4c37f4||!_0x4c37f4['trim']())throw new _0x23d4ab('commentsrepository-invalid-comment-content');const _0x272f44=this['context']['plugins']['get'](it)['getUser'](_0x2a19f9);if(!_0x272f44)throw new _0x23d4ab('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2a19f9});let _0x25d745=null,_0x3bf487=_0x1d34b2;return _0x154c66?.['@external']&&(_0x25d745=this['_getExternalAuthor'](_0x154c66['@external']['authorName']),_0x3bf487=new Date(_0x154c66['@external']['createdAt'])),new wi(this,{'threadId':_0x51235c,'id':_0x1b260a,'author':_0x25d745||_0x272f44,'creator':_0x272f44,'content':_0x4c37f4,'createdAt':_0x1d34b2,'authoredAt':_0x3bf487,'attributes':_0x154c66});}['_addComment'](_0x336471){let {threadId:_0x143d6b,content:_0x233c1f,attributes:_0x340088,isFromAdapter:_0x4a738a}=_0x336471;const _0x348d77=this['getCommentThread'](_0x336471['threadId']);if(!_0x348d77)throw new _0x23d4ab('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3a4805=this['_createNewComment'](_0x336471),{id:_0x1ea2b6}=_0x3a4805;if(_0x348d77['_add'](_0x3a4805),_0x4a738a||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x348d77['isSubmitted'])return Promise['resolve']();const _0x4b693a=this['context']['plugins']['get']('PendingActions'),{channelId:_0xdb7144}=_0x348d77,_0x15030e=_0x4b693a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x340088||(_0x340088={}),this['adapter']['addComment']({'channelId':_0xdb7144,'threadId':_0x143d6b,'commentId':_0x1ea2b6,'content':_0x233c1f,'attributes':_0x340088})['then'](_0x89bae7=>{_0x4b693a['remove'](_0x15030e),_0x89bae7&&this['_updateComment']({'channelId':_0xdb7144,'threadId':_0x143d6b,'commentId':_0x1ea2b6,'createdAt':_0x89bae7['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2f769a=>{throw console['error'](_0x2f769a),new _0x23d4ab('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0xdbe070,commentId:_0x1fcc92,content:_0x4f05a5,createdAt:_0x1bd509,attributes:_0x11e2a5,isFromAdapter:_0x4a8099}){if(void 0x0!==_0x4f05a5&&('string'!=typeof _0x4f05a5||!_0x4f05a5['trim']()['length']))throw new _0x23d4ab('commentsrepository-update-comment-invalid-content');const _0x28ca8d=this['getCommentThread'](_0xdbe070),_0x1bbffb=_0x28ca8d['getComment'](_0x1fcc92);if(!_0x1bbffb)throw new _0x23d4ab('commentsrepository-update-missing-comment',this);let _0x599dbe=!0x1;if(_0x4f05a5&&_0x4f05a5!==_0x1bbffb['content']&&(_0x1bbffb['isEditable']||_0x4a8099)&&(_0x1bbffb['content']=_0x4f05a5,_0x599dbe=!0x0),_0x1bd509&&_0x1bd509!==_0x1bbffb['createdAt']&&(_0x1bbffb['createdAt']=_0x1bd509,_0x1bbffb['attributes']&&_0x1bbffb['attributes']['@external']||(_0x1bbffb['authoredAt']=_0x1bd509),_0x599dbe=!0x0),_0x11e2a5&&!At(_0x11e2a5,_0x1bbffb['attributes'])&&(_0x1bbffb['attributes']=_0x11e2a5,_0x599dbe=!0x0),!_0x599dbe)return Promise['resolve']();if(_0x28ca8d['fire']('commentUpdated'),_0x4a8099||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x27655c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7700b0}=this['getCommentThread'](_0x1bbffb['threadId']),_0x503bce=_0x27655c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x7700b0,'threadId':_0xdbe070,'commentId':_0x1fcc92,'content':_0x4f05a5,'attributes':_0x11e2a5})['then'](()=>_0x27655c['remove'](_0x503bce))['catch'](_0x16dd96=>{throw console['error'](_0x16dd96),new _0x23d4ab('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x15de93,commentId:_0x56e0f3,isFromAdapter:_0x1d3464}){const _0x577c9e=this['getCommentThread'](_0x15de93),_0x12ae1a=_0x577c9e['getComment'](_0x56e0f3);if(!_0x12ae1a)throw new _0x23d4ab('commentsrepository-remove-missing-comment',this);if(_0x577c9e['_remove'](_0x12ae1a),_0x1d3464||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x47cd21=this['context']['plugins']['get']('PendingActions'),{channelId:_0x306371}=_0x577c9e,_0x1b6c33=_0x47cd21['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x306371,'threadId':_0x15de93,'commentId':_0x56e0f3})['then'](()=>_0x47cd21['remove'](_0x1b6c33))['catch'](_0x8eba16=>{throw console['error'](_0x8eba16),new _0x23d4ab('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
+ _0x5b7b5d(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4af165,_0x35c2d7){super();const _0x5eebeb=_0x35c2d7['isResolvable'];this['channelId']=_0x35c2d7['channelId'],this['id']=_0x35c2d7['id'],this['comments']=new _0x584cc7(),this['_repository']=_0x4af165,this['_isAttached']=!0x1,this['_isSubmitted']=_0x35c2d7['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4af165,'_permissions',_0x4af165,'_readOnlyChannels',()=>_0x4af165['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4af165,'_permissions',()=>_0x4af165['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4af165,'_permissions',()=>{const _0x4e2fee=_0x4af165['getPermissions'](this['channelId']);return _0x4e2fee['write']||_0x4e2fee['admin'];}),this['bind']('isResolvable')['to'](_0x4af165,'_permissions',()=>_0x5eebeb&&_0x4af165['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x35c2d7['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x701124,_0x556135)=>_0x701124?_0x556135?_0x701124<_0x556135?_0x701124:_0x556135:_0x701124:_0x556135),this['set']('unlinkedAt',_0x35c2d7['unlinkedAt']||null),this['set']('resolvedAt',_0x35c2d7['resolvedAt']||null),this['set']('resolvedBy',_0x35c2d7['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1fac7a=>!!_0x1fac7a),this['set']('attributes',_0x35c2d7['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x4ce62,_0x1a68c9)=>_0x4ce62+_0x1a68c9['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x18c946,id:_0x5683b9}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x18c946),{'channelId':_0x18c946,'threadId':_0x5683b9});}['setUnlinkedAt'](_0x11e2bd){this['_update']({'unlinkedAt':_0x11e2bd});}['resolve']({resolvedAt:_0x3faf1e=new Date(),resolvedBy:_0x4c7dc2=null,isFromAdapter:_0x26afb3=!0x1}={}){const _0xf4f181=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x141a08,id:_0x13de96}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x141a08),{'channelId':_0x141a08,'threadId':_0x13de96,'resolvedAt':_0x3faf1e,'resolvedBy':_0x4c7dc2||_0xf4f181['id'],'isFromAdapter':_0x26afb3});}['reopen']({isFromAdapter:_0x5921fe=!0x1}={}){const {channelId:_0x26c8b9,id:_0x2c0071}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x26c8b9),{'channelId':_0x26c8b9,'threadId':_0x2c0071,'isFromAdapter':_0x5921fe});}['setContext'](_0x46ad79){this['context']||this['_update']({'context':_0x46ad79});}['setAttribute'](_0x42fd59,_0x1d8066){const _0xe57a2e=wt(this['attributes']);yt(_0xe57a2e,_0x42fd59,_0x1d8066),this['_update']({'attributes':_0xe57a2e});}['removeAttribute'](_0x560f02){const _0x2dfcb3=wt(this['attributes']);Ct(_0x2dfcb3,_0x560f02),this['_update']({'attributes':_0x2dfcb3});}['remove']({isFromAdapter:_0x79ba3b=!0x1}={}){const {channelId:_0x546440,id:_0x10a4a9}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x546440),{'channelId':_0x546440,'threadId':_0x10a4a9,'isFromAdapter':_0x79ba3b});}['attachTo'](_0x2adbbb){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2adbbb});}['addComment'](_0x2c2ec6){const {channelId:_0xdbb76c,id:_0x4fc02f}=this;this['_repository']['fire'](Nt('addComment',_0xdbb76c,_0x4fc02f),Object['assign']({'channelId':_0xdbb76c,'threadId':_0x4fc02f},_0x2c2ec6));}['getComment'](_0x35cfc8){if('string'!=typeof _0x35cfc8)throw new _0x23d4ab('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x35cfc8});return this['comments']['get'](_0x35cfc8);}['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'](_0x1095c5=>_0x1095c5['toJSON']()),'attributes':this['attributes']};}['_add'](_0x523c1c){return this['listenTo'](_0x523c1c,'change:authoredAt',()=>{const _0x5df4a6=this['_findOptimalIndex'](_0x523c1c),_0x55e823=this['comments'];_0x5df4a6-0x1!=_0x55e823['getIndex'](_0x523c1c)&&_0x5df4a6+0x1!=_0x55e823['getIndex'](_0x523c1c)&&(this['_remove'](_0x523c1c),this['_add'](_0x523c1c));}),this['comments']['add'](_0x523c1c,this['_findOptimalIndex'](_0x523c1c));}['_update'](_0x1ce039){const {channelId:_0x46f831,id:_0x5006f8}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x46f831),{..._0x1ce039,'channelId':_0x46f831,'threadId':_0x5006f8});}['_remove'](_0x3ae29a){return this['stopListening'](_0x3ae29a),_0x3ae29a['destroy'](),this['comments']['remove'](_0x3ae29a);}['_findOptimalIndex'](_0x512d55){const _0x26cb15=this['comments']['find'](_0x1a6999=>new Date(_0x1a6999['authoredAt'])['getTime']()>new Date(_0x512d55['authoredAt'])['getTime']());return _0x26cb15?this['comments']['getIndex'](_0x26cb15):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
+ _0x5b7b5d(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x25da67,_0x12daa6){super();const _0x2aabba=_0x25da67['context']['plugins']['get'](it)['me'],_0x4aebdd=_0x25da67['getCommentThread'](_0x12daa6['threadId']),_0x97a4bc=0x0===_0x4aebdd['comments']['length'],_0x10a61e=_0x2aabba===_0x12daa6['author'];this['id']=_0x12daa6['id'],this['threadId']=_0x12daa6['threadId'],this['author']=_0x12daa6['author'],this['creator']=_0x12daa6['creator'],this['isExternal']=Boolean(_0x12daa6['attributes']&&_0x12daa6['attributes']['@external']),this['set']('content',_0x12daa6['content']),this['createdAt']=_0x12daa6['createdAt']||new Date(),this['set']('authoredAt',_0x12daa6['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4aebdd,'resolvedAt'),this['set']('attributes',_0x12daa6['attributes']||{}),this['bind']('isEditable')['to'](_0x25da67,'_permissions',()=>{const _0x517653=_0x25da67['getPermissions'](_0x4aebdd['channelId'])['write'],_0x52bec0=_0x25da67['getPermissions'](_0x4aebdd['channelId'])['modifyAll'];return _0x10a61e&&_0x517653||!_0x10a61e&&_0x52bec0;}),this['bind']('isRemovable')['to'](_0x4aebdd,'isRemovable',_0x25da67,'_permissions',_0x1cec6e=>{const _0x28ab65=_0x25da67['getPermissions'](_0x4aebdd['channelId'])['write'],_0x7cac4d=_0x25da67['getPermissions'](_0x4aebdd['channelId'])['modifyAll'];return _0x10a61e&&_0x28ab65||_0x1cec6e&&_0x97a4bc||!_0x10a61e&&_0x7cac4d&&!_0x97a4bc;}),this['bind']('isReadOnly')['to'](_0x4aebdd,'isReadOnly'),this['_repository']=_0x25da67;}get['weight'](){return Math['max'](function(_0x40d08a){const _0x4a67b6=document['createElement']('div');return _0x4a67b6['innerHTML']=_0x40d08a,_0x4a67b6['textContent']['length'];}(this['content']),0xc8);}['update'](_0x7effb2){const {threadId:_0x4b0b8f,id:_0x2e21c7}=this;if(!this['_repository']['hasCommentThread'](_0x4b0b8f))throw new _0x23d4ab('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x29ed82}=this['_repository']['getCommentThread'](_0x4b0b8f);this['_repository']['fire'](Nt('updateComment',_0x29ed82,_0x4b0b8f),{'channelId':_0x29ed82,'threadId':_0x4b0b8f,'commentId':_0x2e21c7,..._0x7effb2});}['setAttribute'](_0x53dcf6,_0x4772fa){const _0x5343b3=wt(this['attributes']);yt(_0x5343b3,_0x53dcf6,_0x4772fa),this['update']({'attributes':_0x5343b3});}['removeAttribute'](_0x1b64b6){const _0xf1f08c=wt(this['attributes']);Ct(_0xf1f08c,_0x1b64b6),this['update']({'attributes':_0xf1f08c});}['remove'](_0x553825={}){if(!_0x553825['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x31544f,id:_0x26bcee}=this;if(!this['_repository']['hasCommentThread'](_0x31544f))throw new _0x23d4ab('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x50899b}=this['_repository']['getCommentThread'](_0x31544f);this['_repository']['fire'](Nt('removeComment',_0x50899b,_0x31544f),{'channelId':_0x50899b,'threadId':_0x31544f,'commentId':_0x26bcee,..._0x553825});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3be1bf,..._0x2bd106){for(const _0x2b42de of _0x2bd106)void 0x0!==_0x2b42de&&(_0x3be1bf+=':'+String(_0x2b42de));return _0x3be1bf;}class ot extends _0x56b6c2{constructor(_0x3c4666){super(_0x3c4666),this['set']('hasContent',!0x1);}['refresh'](){const _0x2fc6ca=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5e18a1 of _0x2fc6ca['getRanges']())if(this['_hasContent'](_0x5e18a1))return void(this['hasContent']=!0x0);}['execute']({threadId:_0xaa076f=_0x456ced(),ranges:_0x26ac04,comment:_0x278994}={}){const _0xc09df4=this['editor']['model'],_0x3eb21a=_0x26ac04??Array['from'](_0xc09df4['document']['selection']['getRanges']()),_0x1fc125=[];for(const _0x50a4dd of _0x3eb21a)this['_hasContent'](_0x50a4dd)&&_0x1fc125['push'](this['_trimToContent'](_0x50a4dd));if(!_0x1fc125['length'])throw new _0x23d4ab('addcommentthreadcommand-incorrect-ranges',null);_0x278994&&this['_createCommentThread'](_0xaa076f,_0x278994),this['_createMarkersFromRanges'](_0xaa076f,_0x1fc125,!!_0x278994);}['_createMarkersFromRanges'](_0x43b16d,_0x4705b0,_0x4e058d){this['editor']['model']['change'](_0x3e9b37=>{for(const _0x11b8b4 of _0x4705b0){const _0x337b91=_0x456ced()['substr'](0x1,0x5),_0x35f69a='comment:'+_0x43b16d+':'+_0x337b91;_0x3e9b37['addMarker'](_0x35f69a,{'range':_0x11b8b4,'usingOperation':_0x4e058d,'affectsData':_0x4e058d});}});}['_createCommentThread'](_0x3272e9,_0x5acd29){const _0x53b0ff=this['editor']['plugins']['get']('CommentsRepository'),_0x32c354=this['editor']['config']['get']('collaboration.channelId'),_0x3ae110=this['editor']['plugins']['get']('Users')['me'];if(!_0x3ae110)throw new _0x23d4ab('addcommentthreadcommand-user-not-found',null);_0x53b0ff['addCommentThread']({'threadId':_0x3272e9,'channelId':_0x32c354,'comments':[{'authorId':_0x3ae110['id'],'content':_0x5acd29,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x34183d){for(const _0x4bcad4 of _0x34183d['getItems']())if(this['_itemIsContent'](_0x4bcad4))return!0x0;return!0x1;}['_itemIsContent'](_0x58ffe1){return _0x58ffe1['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x58ffe1)&&!_0x58ffe1['is']('element','tableCell');}['_trimToContent'](_0x4209a3){const _0x4c7fbb=_0x51cc34=>!this['_itemIsContent'](_0x51cc34['item']),_0x345365=_0x4209a3['start']['getLastMatchingPosition'](_0x4c7fbb),_0x545bb5=_0x4209a3['end']['getLastMatchingPosition'](_0x4c7fbb,{'direction':'backward'});return this['editor']['model']['createRange'](_0x345365,_0x545bb5);}}class b extends _0x6c9bcf{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e342f){super(_0x4e342f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x23bcb6=this['editor'],_0xc25b3a=_0x23bcb6['model']['document']['selection'],_0x3184d5=_0x24341f(()=>this['refreshSelectedViews'](),0xa);_0xc25b3a['on']('change:range',(_0xf468d4,_0x380946)=>{_0x380946['directChange']&&(_0x3184d5['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x23bcb6['editing']['view']['document'],'change:isFocused',(_0x145483,_0x5e18c9,_0x3b7578)=>{_0x3b7578&&_0x3184d5();}),this['listenTo'](_0x23bcb6['ui']['focusTracker'],'change:isFocused',(_0x26c162,_0x14483d,_0x36776b)=>{_0x36776b||this['fire']('blur',{'isAnnotationTracked':_0x3c4c5f=>this['_editorAnnotationsData']['has'](_0x3c4c5f['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4663d4){if(this['_editorAnnotations']['has'](_0x4663d4['view']))return;this['_editorAnnotations']['add'](_0x4663d4['view']),this['editor']['ui']['focusTracker']['add'](_0x4663d4['view']['element']);const _0x50c07d=this['editor']['plugins']['get'](y);this['listenTo'](_0x50c07d['collection'],'remove',(_0x1d03b2,_0x56ec97)=>{this['editor']['ui']['focusTracker']['remove'](_0x56ec97['view']['element']),this['_editorAnnotations']['delete'](_0x56ec97['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x20ee3b){if('function'!=typeof _0x20ee3b)throw new _0x23d4ab('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x20ee3b);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x225d66,annotations:_0x286844}){const _0x5e87e4=[],_0x2b4676=this['editor']['model']['document']['selection'],_0x7e961c=Array['from'](_0x2b4676['getRanges']());for(const [_0x57a813,_0x27cd30]of this['_editorAnnotationsData']){const _0x50b7fb=_0x36282d(_0x27cd30),_0x1fa764=_0x286844['getByInnerView'](_0x57a813);_0x50b7fb&&_0x1fa764&&_0x5e87e4['push']({'annotation':_0x1fa764,'range':_0x50b7fb});}function _0x36282d(_0x272200){for(const _0x587a14 of _0x272200)for(const _0x586c6a of _0x7e961c)if(_0x587a14['containsRange'](_0x586c6a,!_0x2b4676['isCollapsed']))return _0x587a14;return null;}return _0x5e87e4['sort']((_0x7dddf0,_0x428f21)=>{const _0x3f3cac=_0x7dddf0['range'],_0x47c0eb=_0x428f21['range'];if(!_0x3f3cac['isEqual'](_0x47c0eb)){if(_0x3f3cac['containsRange'](_0x47c0eb,!0x0))return 0x1;if(_0x47c0eb['containsRange'](_0x3f3cac,!0x0))return-0x1;}return _0x7dddf0['annotation']==_0x225d66?-0x1:_0x428f21['annotation']==_0x225d66?0x1:0x0;})['map'](_0x3ca64d=>_0x3ca64d['annotation']);}get['_editorAnnotationsData'](){const _0x43e5bb=new Map();for(const _0x23da5f of Array['from'](this['_dataCollectors']))for(const [_0x87cde5,_0x3e92d0]of _0x23da5f())_0x43e5bb['set'](_0x87cde5,_0x3e92d0);return _0x43e5bb;}}class st extends _0x6c9bcf{['afterInit'](){const _0x3c78e9=this['editor'];if(!_0x3c78e9['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3c78e9['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x6c9bcf{constructor(_0x1e04fa){super(_0x1e04fa),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x352b85=this['editor'],_0x186bc3=_0x352b85['commands']['get']('importWord'),_0x1daac6=_0x352b85['plugins']['get'](it);_0x186bc3&&(_0x186bc3['on']('execute',(_0x377083,[,_0x1e1cdf])=>{_0x1e1cdf['collaboration_features']={'comments':!0x0,'user_id':_0x1daac6['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x186bc3,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5988c1,_0x38a3bb){const {comment_threads:_0x2971f9}=_0x38a3bb;_0x2971f9&&_0x2971f9['forEach'](({thread_id:_0x238220,comments:_0x5182cb,is_resolved:_0x218295})=>{const _0x56b5e0=new Date(),_0x316bf6=_0x5182cb['map'](({author:_0x427aff,content:_0x274cdd,created_at:_0x571a05})=>({'content':_0x274cdd,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x56b5e0,'attributes':{'@external':{'authorName':_0x427aff,'createdAt':_0x571a05?new Date(_0x571a05):new Date(),'source':'importWord'}}})),_0x867322=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x867322,'threadId':_0x238220,'comments':_0x316bf6,'resolvedAt':_0x218295?_0x56b5e0:null});});}}class at extends _0x6c9bcf{constructor(_0x34cf53){super(_0x34cf53),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x4b1216=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4b1216,'contentInsertion',(_0x57667a,_0x1116fe)=>this['_removeMarkersWithoutThreads'](_0x1116fe['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x36eba5){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x36eba5;const _0x58b996=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2e0f43 of _0x36eba5['keys']()){const [_0xc34285,_0x5f157e]=_0x2e0f43['split'](':');'comment'!=_0xc34285||_0x58b996['hasCommentThread'](_0x5f157e)||_0x36eba5['delete'](_0x2e0f43);}return _0x36eba5;}['_registerMarkerInClipboardPipeline'](){const _0x32d8ec=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5ba9eb=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5ba9eb&&_0x32d8ec['_registerMarkerToCopy']('comment',_0x5ba9eb);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x3c2983){switch(_0x3c2983){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0xc133c1){const _0x7b3502=_0xc133c1['split'](':');return{'group':_0x7b3502[0x0],'id':_0x7b3502[0x1],'part':_0x7b3502[0x2]};}class ut extends _0x6c9bcf{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3eb1ca,_0x20164d)=>{if(!_0x20164d['options']['showCommentHighlights'])return null;if(_0x20164d['options']['ignoreResolvedComments']){const {id:_0x39a8e4}=ft(_0x3eb1ca['markerName']),_0x48ba59=this['editor']['plugins']['get'](o);if(_0x48ba59['getCommentThread'](_0x39a8e4)?.['isResolved']&&_0x3eb1ca['item'])return _0x20164d['consumable']['consume'](_0x3eb1ca['item'],'addMarker:'+_0x3eb1ca['markerName']),_0x20164d['consumable']['consume'](_0x3eb1ca['item'],'removeMarker:'+_0x3eb1ca['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x505bcf=>{_0x505bcf['on']('addMarker:comment',(_0x475ce0,_0x2bcd0e,_0xa8b360)=>{if(!_0xa8b360['options']['showCommentHighlights'])return;const _0x2cbc64=_0x2bcd0e['item'];if(!_0x2cbc64)return;const _0x348353=_0xa8b360['mapper']['toViewElement'](_0x2cbc64);this['editor']['model']['schema']['isObject'](_0x2cbc64)&&_0x348353&&!_0x348353['getCustomProperty']('widget')&&_0x348353['is']('containerElement')&&_0x1bd861(_0x348353,_0xa8b360['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x595589,{writer:_0x4c95e5,options:_0x5506da})=>{if(!_0x5506da['showCommentHighlights'])return null;const _0x351dc9=_0x4c95e5['createContainerElement']('div'),_0x5cffb5=_0x4c95e5['createEmptyElement']('hr');return _0x4c95e5['addClass']('ck-horizontal-line',_0x351dc9),_0x4c95e5['insert'](_0x4c95e5['createPositionAt'](_0x351dc9,0x0),_0x5cffb5),_0x351dc9;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1df0ba,{writer:_0x25bc31,options:_0x2449fa})=>{if(!_0x2449fa['showCommentHighlights'])return null;const _0x1b2481=_0x25bc31['createContainerElement']('span'),_0x505daf=_0x25bc31['createEmptyElement']('img');return _0x25bc31['addClass']('image-inline',_0x1b2481),_0x25bc31['insert'](_0x25bc31['createPositionAt'](_0x1b2481,0x0),_0x505daf),_0x1b2481;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x58fbf3,{writer:_0x56a63f,options:_0xdd40b7})=>{if(_0xdd40b7['showCommentHighlights'])return _0x56a63f['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x85353f,_0x505b3e,_0x5d18d7)=>{_0x5d18d7['options']['showCommentHighlights']&&_0x85353f['stop']();},{'priority':'high'});}}class r extends _0x6c9bcf{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(_0x23d448){super(_0x23d448),this['set']('isThreadsLoadingPaused',!0x0),_0x23d448['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x21a9c8,_0x3f3e13,_0x83ce24,_0x4460cb)=>{const _0x7c2e11=_0x23d448['plugins']['get'](o),_0xe59ad7=_0x83ce24?ft(_0x83ce24)['id']:null;_0x23d448['model']['change'](()=>{if(_0xe59ad7){const _0x524e33=this['getAllMarkersForId'](_0xe59ad7);for(const _0x39dbcd of _0x524e33)_0x23d448['editing']['reconvertMarker'](_0x39dbcd);}if(_0x4460cb){const {id:_0x2ab79e}=ft(_0x4460cb),_0x30d712=_0x7c2e11['getCommentThread'](_0x2ab79e);if(_0x30d712&&_0x30d712['unlinkedAt'])return;if(_0x30d712&&!_0x30d712['isAttached'])return;const _0x1be168=this['getAllMarkersForId'](_0x2ab79e);for(const _0x1a82ec of _0x1be168)_0x23d448['editing']['reconvertMarker'](_0x1a82ec);}}),_0xe59ad7&&this['scrollToThreadMarker'](_0xe59ad7);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xd8881d=this['editor'],_0x79ee0b=_0xd8881d['plugins']['get'](o),_0x544367=_0xd8881d['config']['get']('collaboration.channelId'),_0xcf1c79=_0x79ee0b['getCommentThreads']()['filter'](_0x5a4af1=>_0x5a4af1['channelId']!==_0x544367);_0xd8881d['commands']['add']('addCommentThread',new ot(_0xd8881d)),this['listenTo'](_0xd8881d,'change:isReadOnly',(_0x261067,_0x24d591,_0xf58f0f)=>{_0x79ee0b['switchReadOnly'](_0xf58f0f,_0xd8881d['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x79ee0b,dt('addCommentThread',_0x544367),(_0x9637ba,{threadId:_0x311e39})=>{const _0x5b1a82=this['editor']['plugins']['get'](o)['getCommentThread'](_0x311e39);_0x5b1a82?.['unlinkedAt']&&this['_attachArchivedThread'](_0x311e39);}),this['listenTo'](_0x79ee0b,dt('removeCommentThread',_0x544367),(_0x4df116,{threadId:_0xc78297})=>{_0xd8881d['model']['enqueueChange']({'isUndoable':!0x1},_0x241269=>{const _0x566a82=this['getAllMarkersForId'](_0xc78297);for(const _0x240f80 of _0x566a82)_0x241269['removeMarker'](_0x240f80);});}),this['listenTo'](_0x79ee0b,dt('resolveCommentThread',_0x544367),(_0x508af6,{threadId:_0x30cccb})=>{(this['_reconvertMarkers'](_0x30cccb),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x30cccb)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x79ee0b,dt('reopenCommentThread',_0x544367),(_0x4901f1,{threadId:_0x5e80b2})=>{this['_reconvertMarkers'](_0x5e80b2);},{'priority':'low'}),this['listenTo'](_0x79ee0b,dt('addComment',_0x544367),(_0x3090b8,{threadId:_0x46b161,isFromAdapter:_0x38b95e})=>{const _0x41e253=this['getAllMarkersForId'](_0x46b161);if(_0x38b95e||0x0==_0x41e253['length']||!_0x79ee0b['hasCommentThread'](_0x46b161))return;0x1===_0x79ee0b['getCommentThread'](_0x46b161)['length']&&_0xd8881d['model']['enqueueChange']({'isUndoable':!0x1},_0x4aebed=>{for(const _0x24d3da of _0x41e253)_0x4aebed['updateMarker'](_0x24d3da,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xcf1c79);}['afterInit'](){!async function(_0x14733d){const _0x1d80a4=_0x36a0c6([0x33,0x5a,0x37,0x69,0x42,0x46,0x78,0x56,0x68,0x61,0x4c,0x52,0x44,0x71,0x7a,0x66,0x59,0x65,0x64,0x6c,0x45,0x55,0x6a,0x79,0x4b,0x6e,0x49,0x6f,0x47,0x39,0x35,0x53,0x73,0x70,0x34,0x54,0x32,0x30,0x48,0x38,0x76,0x58,0x62,0x31,0x67,0x51,0x63,0x77,0x43,0x50,0x74,0x72,0x6d,0x4e,0x4a,0x6b,0x75,0x41,0x36,0x4d,0x4f,0x57]),_0x164d8e=0x4496cfcb,_0x3dee7f=0x4491bfe3^_0x164d8e,_0x49e6a7=window[_0x36a0c6([0x44,0x61,0x74,0x65])][_0x36a0c6([0x6e,0x6f,0x77])](),_0x494fc4=_0x14733d[_0x36a0c6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x336605=new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50f365=>{_0x494fc4[_0x36a0c6([0x6f,0x6e,0x63,0x65])](_0x36a0c6([0x72,0x65,0x61,0x64,0x79]),_0x50f365);}),_0x2c3799={[_0x36a0c6([0x6b,0x74,0x79])]:_0x36a0c6([0x45,0x43]),[_0x36a0c6([0x75,0x73,0x65])]:_0x36a0c6([0x73,0x69,0x67]),[_0x36a0c6([0x63,0x72,0x76])]:_0x36a0c6([0x50,0x2d,0x32,0x35,0x36]),[_0x36a0c6([0x78])]:_0x36a0c6([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]),[_0x36a0c6([0x79])]:_0x36a0c6([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]),[_0x36a0c6([0x61,0x6c,0x67])]:_0x36a0c6([0x45,0x53,0x32,0x35,0x36])},_0x45ec0f=_0x494fc4[_0x36a0c6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x36a0c6([0x67,0x65,0x74])](_0x36a0c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x20667f(){let _0x2309bf,_0x1165c7=null,_0x36311c=null;try{if(_0x45ec0f==_0x36a0c6([0x47,0x50,0x4c]))return _0x36a0c6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2309bf=_0xbb0696(),!_0x2309bf)return _0x36a0c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2309bf[_0x36a0c6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x36311c=_0x37b1f6(_0x2309bf[_0x36a0c6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2309bf[_0x36a0c6([0x6a,0x74,0x69])])),await _0xd7bf49()?_0x48e335()?_0x6271f3()?_0x36a0c6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x12cd71()?(_0x2309bf[_0x36a0c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36a0c6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1165c7=_0xdde287(_0x36a0c6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2309bf[_0x36a0c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36a0c6([0x74,0x72,0x69,0x61,0x6c])&&(_0x1165c7=_0xdde287(_0x36a0c6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xb87a3b()):_0x36a0c6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x36a0c6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x36a0c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x36a0c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x6271f3(){const _0x42c960=[_0x36a0c6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x36a0c6([0x74,0x72,0x69,0x61,0x6c])][_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2309bf[_0x36a0c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x49e6a7/0x3e8:0xe10*_0x3dee7f;return _0x2309bf[_0x36a0c6([0x65,0x78,0x70])]<_0x42c960;}function _0x48e335(){const _0x3f8771=_0x2309bf[_0x36a0c6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3f8771)return!0x1;if(_0x3f8771[_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36a0c6([0x2a])))return!0x0;if(_0x3f8771[_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36a0c6([0x43,0x4d,0x54])))return!0x0;if(_0x3f8771[_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36a0c6([0x52,0x43,0x4d,0x54]))){if(_0x35adb3())return!0x0;if(_0x254d6b()||_0x1e6617())return!0x0;}return!0x1;}function _0x12cd71(){const _0x3238b7=_0x2309bf[_0x36a0c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3238b7||0x0==_0x3238b7[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xa6c1b6}=new URL(window[_0x36a0c6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3238b7[_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa6c1b6))return!0x0;const _0x199067=_0xa6c1b6[_0x36a0c6([0x73,0x70,0x6c,0x69,0x74])](_0x36a0c6([0x2e]));return _0x3238b7[_0x36a0c6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x49f0d4=>_0x49f0d4[_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36a0c6([0x2a])))[_0x36a0c6([0x6d,0x61,0x70])](_0x1a49d1=>_0x1a49d1[_0x36a0c6([0x73,0x70,0x6c,0x69,0x74])](_0x36a0c6([0x2e])))[_0x36a0c6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xe53b1f=>_0xe53b1f[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x199067[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x36a0c6([0x6d,0x61,0x70])](_0x555983=>Array(_0x199067[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x555983[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x36a0c6([0x66,0x69,0x6c,0x6c])](_0x555983[0x0]===_0x36a0c6([0x2a])?_0x36a0c6([0x2a]):'')[_0x36a0c6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x555983))[_0x36a0c6([0x73,0x6f,0x6d,0x65])](_0x212e6f=>_0x199067[_0x36a0c6([0x65,0x76,0x65,0x72,0x79])]((_0x3377d3,_0x4f74a9)=>_0x212e6f[_0x4f74a9]===_0x3377d3||_0x212e6f[_0x4f74a9]===_0x36a0c6([0x2a])));}function _0xb87a3b(){return _0x1165c7&&_0x36311c?new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x54a449,_0x479d62)=>{_0x1165c7[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x54a449,_0x479d62),_0x36311c[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x2006d8=>{_0x2006d8!=_0x36a0c6([0x56,0x61,0x6c,0x69,0x64])&&_0x54a449(_0x2006d8);},_0x479d62);}):_0x1165c7||_0x36311c||_0x36a0c6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x37b1f6(_0x37b5b0,_0x305133){return new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x589c20=>{if(_0x157fa9())return _0x589c20(_0x36a0c6([0x56,0x61,0x6c,0x69,0x64]));_0x28e42b(),_0x494fc4[_0x36a0c6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x36a0c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2695e6=!0x1;const _0x406303=_0x456ced();function _0x152a3f(_0x5910d8){return!!_0x5910d8&&(typeof _0x5910d8===_0x36a0c6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5910d8===_0x36a0c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5910d8[_0x36a0c6([0x74,0x68,0x65,0x6e])]===_0x36a0c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5910d8[_0x36a0c6([0x63,0x61,0x74,0x63,0x68])]===_0x36a0c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5005b6(_0x3eadd7){_0x39d9f8(_0x3eadd7)[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x4cc006=>{if(!_0x4cc006||_0x4cc006[_0x36a0c6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x36a0c6([0x6f,0x6b]))return _0x36a0c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4e9574(_0x1bdc39(_0x406303+_0x305133))!=_0x4cc006[_0x36a0c6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x36a0c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x36a0c6([0x56,0x61,0x6c,0x69,0x64]);})[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x39254f=>(_0x1a18a4(),_0x39254f),()=>{const _0xe96662=_0x5ebad3();return null==_0xe96662?(_0x1a18a4(),_0x36a0c6([0x56,0x61,0x6c,0x69,0x64])):_0x36a0c6(_0x49e6a7-_0xe96662>(0x609a4bcb^_0x164d8e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x589c20)[_0x36a0c6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x589c20(_0x36a0c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3aaa9d=0x44a0214b^_0x164d8e;function _0x1a18a4(){const _0x31e175=_0x36a0c6([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e9574(_0x1bdc39(_0x37b5b0)),_0x1f5859=_0x27cac0(_0x4e9574(window[_0x36a0c6([0x4d,0x61,0x74,0x68])][_0x36a0c6([0x63,0x65,0x69,0x6c])](_0x49e6a7/_0x3aaa9d)));window[_0x36a0c6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36a0c6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x31e175,_0x1f5859);}function _0x5ebad3(){const _0x585ff8=_0x36a0c6([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e9574(_0x1bdc39(_0x37b5b0)),_0xf67ccc=window[_0x36a0c6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36a0c6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x585ff8);return _0xf67ccc?window[_0x36a0c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x27cac0(_0xf67ccc),0x10)*_0x3aaa9d:null;}function _0x39d9f8(_0x85f587){return new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x21e44a,_0x2e9b36)=>{_0x85f587[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x21e44a,_0x2e9b36),window[_0x36a0c6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2e9b36,0x44971b0b^_0x164d8e);});}}_0x494fc4[_0x36a0c6([0x6f,0x6e])](_0x36a0c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x290513,_0x5d184d)=>{if(_0x5d184d[0x0]!=_0x37b5b0)return _0x589c20(_0x36a0c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5d184d[0x1]={..._0x5d184d[0x1],[_0x36a0c6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x406303};},{[_0x36a0c6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36a0c6([0x68,0x69,0x67,0x68])}),_0x494fc4[_0x36a0c6([0x6f,0x6e])](_0x36a0c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4c4aab=>{_0x152a3f(_0x4c4aab[_0x36a0c6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2695e6=!0x0,_0x5005b6(_0x4c4aab[_0x36a0c6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x36a0c6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36a0c6([0x6c,0x6f,0x77])}),_0x336605[_0x36a0c6([0x74,0x68,0x65,0x6e])](()=>{_0x2695e6||_0x589c20(_0x36a0c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x157fa9(){return _0x494fc4[_0x36a0c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36a0c6([0x76,0x69,0x65,0x77])][_0x36a0c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x36a0c6([0x61,0x75,0x74,0x6f]);}function _0x28e42b(){_0x494fc4[_0x36a0c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36a0c6([0x76,0x69,0x65,0x77])][_0x36a0c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36a0c6([0x61,0x75,0x74,0x6f]);}}function _0xdde287(_0x172f83){const _0x19e3ef=[new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f31eb=>setTimeout(_0x5f31eb,0x449ff107^_0x164d8e)),_0x336605[_0x36a0c6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1592ad=>{let _0x119301=0x0;_0x494fc4[_0x36a0c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x36a0c6([0x6f,0x6e])](_0x36a0c6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5384f4,_0x306783)=>{_0x306783[0x0][_0x36a0c6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x119301++,_0x119301==(0x4496ce33^_0x164d8e)&&(_0x1592ad(),_0x5384f4[_0x36a0c6([0x6f,0x66,0x66])]());});}))];return window[_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36a0c6([0x72,0x61,0x63,0x65])](_0x19e3ef)[_0x36a0c6([0x74,0x68,0x65,0x6e])](()=>_0x172f83);}async function _0x594921(){await _0x336605,_0x494fc4[_0x36a0c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x36a0c6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xc17f64,_0x494fc4[_0x36a0c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x36a0c6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xc17f64,_0x494fc4[_0x36a0c6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x36a0c6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x35adb3(){return _0x375efe(_0x36a0c6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xb9f75b(_0x36a0c6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x36a0c6([0x73,0x74,0x61,0x74,0x65])]==_0x36a0c6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x254d6b(){return _0x375efe(_0x36a0c6([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 _0x1e6617(){return _0x375efe(_0x36a0c6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x23ee01(_0x5b1055){const _0x3e7d18=_0x432438();_0x494fc4[_0x3e7d18]=_0x36a0c6([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5b1055,_0x5b1055!=_0x36a0c6([0x56,0x61,0x6c,0x69,0x64])&&_0x594921();}function _0x432438(){const _0x5535c6=window[_0x36a0c6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x36a0c6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x36a0c6([0x6e,0x6f,0x77])]())[_0x36a0c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x36a0c6([0x2e]),'');let _0x5d8563=_0x36a0c6([0x5a]);for(let _0x1a9f19=0x0;_0x1a9f19<_0x5535c6[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a9f19+=0x2){let _0x3a3613=window[_0x36a0c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5535c6[_0x36a0c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1a9f19,_0x1a9f19+0x2));_0x3a3613>=_0x1d80a4[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3a3613-=_0x1d80a4[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5d8563+=_0x1d80a4[_0x3a3613];}return _0x5d8563;}function _0xbb0696(){const _0x318df1=_0x45ec0f[_0x36a0c6([0x73,0x70,0x6c,0x69,0x74])](_0x36a0c6([0x2e]));if(0x3!=_0x318df1[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x43b9b6(_0x318df1[0x1]);function _0x43b9b6(_0x551071){const _0x428481=_0x4503f6(_0x551071);return _0x428481&&_0x1fcf3a()?_0x428481:null;function _0x1fcf3a(){const _0x488aac=_0x428481[_0x36a0c6([0x6a,0x74,0x69])],_0x321228=window[_0x36a0c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x488aac[_0x36a0c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x488aac[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4ee148={..._0x428481,[_0x36a0c6([0x6a,0x74,0x69])]:_0x488aac[_0x36a0c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x488aac[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4ee148[_0x36a0c6([0x76,0x63])],_0x1bdc39(_0x4ee148)==_0x321228;}}}async function _0xd7bf49(){let _0x57d306=!0x0;try{const _0x3ae4ec=_0x45ec0f[_0x36a0c6([0x73,0x70,0x6c,0x69,0x74])](_0x36a0c6([0x2e])),[_0x33a71f,_0x22e954,_0x111034]=_0x3ae4ec;return _0x4ed6ee(_0x33a71f),await _0x2a5ae1(_0x33a71f,_0x22e954,_0x111034),_0x57d306;}catch{return!0x1;}function _0x4ed6ee(_0x195bea){const _0x53ef62=_0x4503f6(_0x195bea);_0x53ef62&&_0x53ef62[_0x36a0c6([0x61,0x6c,0x67])]==_0x36a0c6([0x45,0x53,0x32,0x35,0x36])||(_0x57d306=!0x1);}async function _0x2a5ae1(_0x4a90cd,_0x14ba7f,_0x21652b){const _0x9ad5ff=window[_0x36a0c6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x36a0c6([0x66,0x72,0x6f,0x6d])](_0x4f1dff(_0x21652b),_0x4d6cfd=>_0x4d6cfd[_0x36a0c6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3395c4=new window[(_0x36a0c6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x36a0c6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4a90cd+_0x36a0c6([0x2e])+_0x14ba7f),_0x475f1a=window[_0x36a0c6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x36a0c6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x475f1a)return;const _0x48bad8=await _0x475f1a[_0x36a0c6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x36a0c6([0x6a,0x77,0x6b]),_0x2c3799,{[_0x36a0c6([0x6e,0x61,0x6d,0x65])]:_0x36a0c6([0x45,0x43,0x44,0x53,0x41]),[_0x36a0c6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x36a0c6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x36a0c6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x475f1a[_0x36a0c6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x36a0c6([0x6e,0x61,0x6d,0x65])]:_0x36a0c6([0x45,0x43,0x44,0x53,0x41]),[_0x36a0c6([0x68,0x61,0x73,0x68])]:{[_0x36a0c6([0x6e,0x61,0x6d,0x65])]:_0x36a0c6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48bad8,_0x9ad5ff,_0x3395c4)||(_0x57d306=!0x1);}}function _0x4503f6(_0x4cf06a){return _0x4cf06a[_0x36a0c6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x36a0c6([0x65,0x79]))?JSON[_0x36a0c6([0x70,0x61,0x72,0x73,0x65])](_0x4f1dff(_0x4cf06a)):null;}function _0x4f1dff(_0x43c5b0){return window[_0x36a0c6([0x61,0x74,0x6f,0x62])](_0x43c5b0[_0x36a0c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x36a0c6([0x2b]))[_0x36a0c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x36a0c6([0x2f])));}function _0x1bdc39(_0x5c010a){let _0x1a8882=0x1505;function _0x4676f5(_0x7c0111){for(let _0xd06047=0x0;_0xd06047<_0x7c0111[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd06047++){const _0x169a6e=_0x7c0111[_0x36a0c6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xd06047);_0x1a8882=(_0x1a8882<<0x5)+_0x1a8882+_0x169a6e,_0x1a8882&=_0x1a8882;}}function _0x3c1673(_0x1b1efe){Array[_0x36a0c6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1b1efe)?_0x1b1efe[_0x36a0c6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3c1673):_0x1b1efe&&typeof _0x1b1efe==_0x36a0c6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x36a0c6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1b1efe)[_0x36a0c6([0x73,0x6f,0x72,0x74])]()[_0x36a0c6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x29c445,_0x100541])=>{_0x4676f5(_0x29c445),_0x3c1673(_0x100541);}):_0x4676f5(window[_0x36a0c6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1b1efe));}return _0x3c1673(_0x5c010a),_0x1a8882>>>0x0;}function _0x4e9574(_0x2953a0){return _0x2953a0[_0x36a0c6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x36a0c6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x36a0c6([0x30]));}function _0x27cac0(_0x2b4ee9){return _0x2b4ee9[_0x36a0c6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x36a0c6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x36a0c6([0x6a,0x6f,0x69,0x6e])]('');}function _0x375efe(_0x4afed8){return _0x494fc4[_0x36a0c6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x36a0c6([0x68,0x61,0x73])](_0x4afed8);}function _0xb9f75b(_0x17c2ce){return _0x494fc4[_0x36a0c6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x36a0c6([0x67,0x65,0x74])](_0x17c2ce);}function _0xc17f64(){}function _0x36a0c6(_0x58697c){return _0x58697c['map'](_0x381424=>String['fromCharCode'](_0x381424))['join']('');}_0x23ee01(await _0x20667f());}(this);}['destroy'](){const _0x507840=this['editor']['plugins']['get'](o),_0x26d3c9=this['editor']['config']['get']('collaboration.channelId');for(const _0x3d1afa of _0x507840['getCommentThreads']({'channelId':_0x26d3c9}))_0x507840['_detachCommentThread'](_0x3d1afa['id']),_0x507840['_threads']['delete'](_0x3d1afa['id']);super['destroy']();}['hasMarkerForId'](_0x4df744){return this['getAllMarkersForId'](_0x4df744)['length']>0x0;}['getAllMarkersForId'](_0x319048){const _0x5cda9f=[];for(const _0x2f3960 of this['editor']['model']['markers'])_0x2f3960['name']['startsWith']('comment:'+_0x319048)&&_0x5cda9f['push'](_0x2f3960);return _0x5cda9f;}['scrollToThreadMarker'](_0xf864df){setTimeout(()=>{const _0x544cdd=this['_getTargetForId'](_0xf864df);if(!_0x544cdd)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0xf864df&&nt({'target':_0x544cdd[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3baac6){this['editor']['model']['change'](()=>{for(const _0x3dc4b1 of this['getAllMarkersForId'](_0x3baac6))this['editor']['editing']['reconvertMarker'](_0x3dc4b1);});}['_attachArchivedThread'](_0x499d07){const _0x427f4a=this['editor']['plugins']['get'](o),_0x149637=this['editor']['plugins']['get'](b),_0x200f63=_0x427f4a['getCommentThread'](_0x499d07);if(!_0x200f63['isAttached']){const _0x20e317=_0x200f63['attachTo'](()=>this['_getTargetForId'](_0x200f63['id']));_0x149637['registerAnnotation'](_0x20e317),_0x200f63['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x51696c=this['editor'],_0x158097=_0x51696c['plugins']['get'](it);_0x51696c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4ef262,_0x56a0ba)=>{const {id:_0x2f7c7f}=ft(_0x4ef262['markerName']),_0x43d831=_0x51696c['plugins']['get'](o)['getCommentThread'](_0x2f7c7f),_0x1756c6=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2f7c7f;let _0x44b806;if(_0x43d831&&_0x43d831['isResolved']&&!_0x1756c6&&_0x4ef262['item'])return _0x56a0ba['consumable']['consume'](_0x4ef262['item'],'addMarker:'+_0x4ef262['markerName']),_0x56a0ba['consumable']['consume'](_0x4ef262['item'],'removeMarker:'+_0x4ef262['markerName']),null;const _0x28bc55=['ck-comment-marker'];return _0x1756c6&&_0x28bc55['push']('ck-comment-marker--active'),_0x44b806=_0x43d831?.['length']?_0x43d831['comments']['first']['author']['id']:_0x158097['me']['id'],{'classes':_0x28bc55,'attributes':{'data-comment':_0x2f7c7f,'data-author-id':_0x44b806}};}}),_0x51696c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5afeef,{options:_0x43934c})=>{if(_0x43934c['showCommentHighlights'])return null;const _0x3f15c6=_0x51696c['plugins']['get'](o),_0x596afc=_0x51696c['model']['markers']['get'](_0x5afeef),{id:_0x1f1502,part:_0x3fa512}=ft(_0x5afeef);return _0x596afc&&!_0x596afc['affectsData']||_0x43934c['ignoreResolvedComments']&&_0x3f15c6['getCommentThread'](_0x1f1502)?.['isResolved']?null:{'group':'comment','name':_0x3fa512?_0x1f1502+':'+_0x3fa512:_0x1f1502};}}),_0x51696c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5a79b1,{writer:_0x18a054})=>_0x18a054['createElement']('$marker',{'data-name':'comment:'+_0x5a79b1['getAttribute']('id')})}),_0x51696c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x16e180=this['editor'],_0x34e294=_0x16e180['plugins']['get'](o),_0x59c146=new Set(),_0x20656c=new Set();_0x16e180['model']['document']['registerPostFixer'](_0x130535=>{let _0x19cc71=!0x1;for(const {name:_0x226997,data:_0x2674ac}of _0x16e180['model']['document']['differ']['getChangedMarkers']()){const {group:_0x19b6dd,id:_0x17c278}=ft(_0x226997);let _0x3fbcc4=_0x2674ac['newRange'];if('comment'!==_0x19b6dd||!_0x3fbcc4)continue;const _0x16f237='$graveyard'===_0x3fbcc4['root']['rootName'];_0x16f237||(_0x3fbcc4=ht(_0x3fbcc4,_0x16e180['model']),!_0x3fbcc4||_0x3fbcc4['isCollapsed']||!_0x2674ac['newRange']||_0x3fbcc4['isEqual'](_0x2674ac['newRange']))?_0x16e180['model']['hasContent'](_0x3fbcc4)&&!_0x16f237?this['isThreadsLoadingPaused']?_0x59c146['add'](_0x226997):this['_handleThreadMarker'](_0x226997,_0x17c278):(_0x20656c['add'](_0x226997),_0x59c146['delete'](_0x226997),_0x130535['removeMarker'](_0x226997),_0x19cc71=!0x0):(_0x130535['updateMarker'](_0x226997,{'range':_0x3fbcc4}),_0x19cc71=!0x0);}return _0x19cc71;}),this['on']('change:isThreadsLoadingPaused',(_0x7a316,_0x9b943a,_0x1c2d45)=>{if(!_0x1c2d45&&_0x59c146['size'])for(const _0x10efa9 of _0x59c146){const {id:_0x58ce4d}=ft(_0x10efa9);_0x59c146['delete'](_0x10efa9),_0x16e180['model']['markers']['get'](_0x10efa9)&&this['_handleThreadMarker'](_0x10efa9,_0x58ce4d);}}),this['listenTo'](_0x16e180['model']['document'],'change',()=>{for(const {name:_0x5e6728,data:{newRange:_0x429e96}}of _0x16e180['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2728c5,id:_0x313724}=ft(_0x5e6728);if('comment'!==_0x2728c5)continue;const _0x37fb7e=_0x34e294['getCommentThread'](_0x313724),_0x3dda3b=this['hasMarkerForId'](_0x313724);_0x37fb7e&&(!_0x37fb7e['_hasTargetInContent']&&_0x429e96&&_0x16e180['editing']['view']['once']('render',()=>{const _0xa0878c=_0x16e180['plugins']['get'](y),_0x6af2a4=_0x34e294['_threadToController']['get'](_0x37fb7e)['view'];_0xa0878c['getByInnerView'](_0x6af2a4)['refreshVisibility']();},{'priority':'low'}),_0x37fb7e['_hasTargetInContent']=_0x3dda3b||!!_0x429e96),_0x429e96||(_0x20656c['add'](_0x5e6728),_0x59c146['delete'](_0x5e6728));}for(const _0x520ea1 of _0x20656c){const {id:_0x36cc3c}=ft(_0x520ea1),_0x5278df=_0x34e294['getCommentThread'](_0x36cc3c);if(_0x59c146['delete'](_0x520ea1),!_0x5278df)continue;const _0x33f02d=this['hasMarkerForId'](_0x36cc3c);_0x33f02d||_0x5278df['isSubmitted']?_0x33f02d||_0x5278df['unlinkedAt']||_0x5278df['setUnlinkedAt'](new Date()):_0x5278df['remove']();}_0x20656c['clear']();});}['_handleInitialThreads'](_0x32a285){_0x32a285['forEach'](_0x13e00c=>{_0x13e00c['unlinkedAt']&&this['_attachArchivedThread'](_0x13e00c['id']);});}['_getTargetForId'](_0x16f357){const _0x3b46dc=this['editor'],_0x178789=this['getAllMarkersForId'](_0x16f357);return et(_0x3b46dc['editing'],_0x178789);}['_getTextContext'](_0x430903){const _0x5ae68e=this['getAllMarkersForId'](_0x430903);let _0x101fcc='',_0x154575=!0x1;for(const _0x10402c of _0x5ae68e){const _0x3ee1b7=_0x10402c['getRange']();for(const _0x4a018e of Array['from'](_0x3ee1b7['getItems']()))_0x4a018e['is']('$textProxy')?(_0x101fcc&&_0x154575&&(_0x101fcc+='\x20',_0x154575=!0x1),_0x101fcc+=_0x4a018e['data']):_0x154575=!0x0;_0x154575=!0x0;}return _0x101fcc['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3e2124,_0x2aeeff){const _0x2464f1=this['editor'],_0x306ce5=_0x2464f1['plugins']['get'](o);let _0x84602a=_0x306ce5['getCommentThread'](_0x2aeeff);const _0x1043fd=_0x2464f1['config']['get']('collaboration.channelId'),_0x533d4b=_0x2464f1['plugins']['get'](b);if(_0x84602a&&(_0x84602a['unlinkedAt']&&_0x84602a['setUnlinkedAt'](null),_0x84602a['isAttached']))return _0x84602a;return!this['getAllMarkersForId'](_0x2aeeff)[0x0]['managedUsingOperations']?_0x2464f1['editing']['view']['once']('render',()=>{if(_0x306ce5['getCommentThread'](_0x2aeeff))return;const _0x5f0ea7=_0x2464f1['plugins']['get'](y);_0x84602a=_0x306ce5['openNewCommentThread']({'channelId':_0x1043fd,'threadId':_0x2aeeff,'target':()=>this['_getTargetForId'](_0x2aeeff),'context':{'type':'text','value':this['_getTextContext'](_0x2aeeff)}});const _0x50ee4e=_0x306ce5['_threadToController']['get'](_0x84602a)['view'],_0x43c1c4=_0x5f0ea7['getByInnerView'](_0x50ee4e);_0x43c1c4&&_0x533d4b['registerAnnotation'](_0x43c1c4);},{'priority':'low'}):_0x306ce5['fetchCommentThread']({'channelId':_0x1043fd,'threadId':_0x2aeeff})['then'](_0x45440a=>{if('destroyed'!==_0x2464f1['state']){if(_0x84602a=_0x45440a,_0x84602a&&!_0x84602a['isAttached']){const _0x5adc8f=_0x84602a['attachTo'](()=>this['_getTargetForId'](_0x2aeeff));_0x533d4b['registerAnnotation'](_0x5adc8f),_0x84602a['isResolved']&&this['_reconvertMarkers'](_0x2aeeff);}else{if(!_0x84602a){const _0x2d4746=this['getAllMarkersForId'](_0x2aeeff);_0x2464f1['model']['change'](_0x232384=>{for(const _0x1414b8 of _0x2d4746)_0x232384['removeMarker'](_0x1414b8);});}}}}),_0x84602a;}['_handleThreadMarker'](_0x2a8b07,_0x569f06){const _0x42ac34=this['_attachMarkerToThread'](_0x2a8b07,_0x569f06);_0x42ac34&&!_0x42ac34['context']&&_0x42ac34['setContext']({'type':'text','value':this['_getTextContext'](_0x569f06)});}['_initAriaMarkerChangeAnnouncements'](){const _0x15b95d=this['editor'];rt(_0x15b95d['model'],({left:_0x170d51,entered:_0x52ab0f})=>{for(const _0x57f723 of _0x170d51)if(mt(_0x57f723)){_0x15b95d['ui']['ariaLiveAnnouncer']['announce'](N(_0x15b95d['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x14e178 of _0x52ab0f)if(mt(_0x14e178)){_0x15b95d['ui']['ariaLiveAnnouncer']['announce'](N(_0x15b95d['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x1e3adc)));break;}});}}function dt(_0xb8e248,_0x113d03){return _0x113d03?_0xb8e248+':'+_0x113d03:_0xb8e248;}function ht(_0x27d52f,_0x4bb939){const _0x3c98c4=_0x4bb939['schema'],_0x12ce73=_0x4bb939['createRange'](_0x27d52f['start']);for(const _0x48e7c0 of _0x27d52f['getWalker']()){const {type:_0x2de472,item:_0xa0993c,nextPosition:_0x36e063}=_0x48e7c0;if('text'===_0x2de472||_0x3c98c4['isObject'](_0xa0993c)){const _0x342939=_0x4bb939['createPositionBefore'](_0xa0993c);_0x12ce73['isCollapsed']&&(_0x12ce73['start']=_0x342939),_0x12ce73['end']=_0x36e063;}}return _0x12ce73;}function mt(_0x1770c0){return'comment'===ft(_0x1770c0['name'])['group'];}class s extends _0x6c9bcf{['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 _0x33d6fe=this['editor'],_0x2ac021=_0x33d6fe['plugins']['get'](o),_0x186b3c=_0x33d6fe['plugins']['get'](r),_0x2888c6=_0x33d6fe['plugins']['get'](y),_0x41d1f6=_0x33d6fe['plugins']['get'](b);_0x33d6fe['ui']['componentFactory']['add']('comment',()=>{const _0x46a92b=this['_createUIButton'](_0x38e985);return _0x46a92b['tooltip']=!0x0,_0x46a92b;}),_0x33d6fe['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5a3c61)),_0x41d1f6['addSourceCollector'](()=>{const _0x3b0f96=[];for(const [_0xd964f1,_0x350876]of _0x2ac021['_threadToController']){const _0x10f6ed=_0x186b3c['getAllMarkersForId'](_0xd964f1['id']),_0x21a396=_0x10f6ed['map'](_0x210901=>_0x210901['getRange']());_0x10f6ed['length']>0x0&&_0x3b0f96['push']([_0x350876['view'],_0x21a396]);}return _0x3b0f96;}),this['listenTo'](_0x2888c6,'change:activeAnnotations',(_0x49840d,_0x54b0d0,_0x2a3144)=>{const _0x242e5c=Array['from'](_0x2a3144)['map'](_0x46a1c2=>_0x46a1c2['innerView'])['find'](_0x297ab2=>_0x2ac021['_viewToController']['has'](_0x297ab2));if(!_0x242e5c)return void(_0x186b3c['activeMarker']=null);const _0x547d35=_0x2ac021['_viewToController']['get'](_0x242e5c)['model']['id'],_0x216897='comment:'+_0x547d35;_0x547d35&&_0x186b3c['hasMarkerForId'](_0x547d35)?_0x186b3c['activeMarker']=_0x216897:_0x186b3c['activeMarker']&&(_0x186b3c['activeMarker']=null);}),this['listenTo'](_0x2ac021,'removeCommentThread',(_0x411288,{threadId:_0x4555bd,isFromAdapter:_0x2cdac0})=>{!_0x2cdac0&&_0x33d6fe['ui']['focusTracker']['isFocused']&&_0x186b3c['hasMarkerForId'](_0x4555bd)&&_0x33d6fe['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2ac021,'addComment',(_0x4c1a1b,{threadId:_0x44220e,isFromAdapter:_0x44323d})=>{if(_0x44323d||!_0x186b3c['hasMarkerForId'](_0x44220e)||!_0x2ac021['hasCommentThread'](_0x44220e))return;0x1===_0x2ac021['getCommentThread'](_0x44220e)['length']&&(_0x33d6fe['editing']['view']['focus'](),_0x4c1a1b['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x277d91=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x438772;for(const _0x128970 in _0x277d91){const _0x38f16f=_0x128970,_0x3de31=_0x277d91[_0x38f16f];if('commentsLicenseKeyValid'==_0x3de31||'commentsLicenseKeyInvalid'==_0x3de31||'commentsLicenseKeyExpired'==_0x3de31||'commentsLicenseKeyDomainLimit'==_0x3de31||'commentsLicenseKeyNotAllowed'==_0x3de31||'commentsLicenseKeyEvaluationLimit'==_0x3de31||'commentsLicenseKeyTrialLimit'==_0x3de31||'commentsLicenseKeyUsageLimit'==_0x3de31){delete _0x277d91[_0x38f16f],_0x438772=_0x3de31,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x438772&&_0x277d91['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x438772&&_0x277d91['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x438772&&_0x277d91['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x438772&&_0x277d91['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x438772&&_0x277d91['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x438772&&_0x277d91['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x438772&&_0x277d91['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1e0a67){const _0x16fe68=this['editor'],_0x410ef8=new _0x1e0a67(_0x16fe68['locale']),_0x2cb3a0=_0x16fe68['commands']['get']('addCommentThread');return _0x410ef8['set']({'label':N(_0x16fe68['locale'],'Comment'),'icon':_0x56d41d}),_0x410ef8['bind']('isEnabled')['to'](_0x2cb3a0,'hasContent'),this['listenTo'](_0x410ef8,'execute',()=>{_0x2cb3a0['execute']();}),_0x410ef8;}}class i extends _0x6c9bcf{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x511f0a){super(_0x511f0a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x4bad9f,_0x4f7b4c,_0x20d3db)=>{_0x20d3db?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2bb258,_0x383044]of this['editor']['commands'])_0x383044['affectsData']&&'addCommentThread'!==_0x2bb258&&_0x383044['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x186686=this['editor']['editing']['view']['document'];this['listenTo'](_0x186686,'cut',_0x4ae4ab=>_0x4ae4ab['stop'](),{'priority':'highest'}),this['listenTo'](_0x186686,'clipboardInput',_0x256956=>_0x256956['stop'](),{'priority':'highest'}),this['listenTo'](_0x186686,'delete',_0x4c4fcb=>_0x4c4fcb['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2d87e6,_0x117c74]of this['editor']['commands'])_0x117c74['affectsData']&&'addCommentThread'!==_0x2d87e6&&_0x117c74['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 _0x4f7306{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x249278){super(_0x249278),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2d11ad=this['context']['plugins']['get'](y);this['listenTo'](_0x2d11ad,'_activateAnnotation',(_0x27e72d,_0x579100)=>{for(const _0x2dfdea of this['activeUIs']){const _0x48fb55=this['_uis']['get'](_0x2dfdea);(0x0,this['uisData']['get'](_0x2dfdea)['filter'])(_0x579100)&&_0x48fb55['setActiveAnnotation'](_0x579100);}}),this['listenTo'](_0x2d11ad,'_deactivateAllAnnotations',()=>{for(const _0x40001a of this['activeUIs']){this['_uis']['get'](_0x40001a)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2d11ad['_visibleAnnotations'],'add',(_0x2b6a97,_0x5f40f3)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5f40f3);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x26253f){return this['activeUIs']['has'](_0x26253f);}['activate'](_0x1204aa,_0x544434=this['defaultFilter']){const _0x226564=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1204aa))throw new _0x23d4ab('annotationsuis-missing-ui',this,{'uiName':_0x1204aa});this['isActive'](_0x1204aa)&&this['deactivate'](_0x1204aa),this['activeUIs']['add'](_0x1204aa);const _0x4a1d98=new S();v({'source':_0x226564['_visibleAnnotations'],'target':_0x4a1d98,'filter':_0x544434}),this['uisData']['set'](_0x1204aa,{'collection':_0x4a1d98,'filter':_0x544434});const _0x5c0bcd=this['_uis']['get'](_0x1204aa);_0x5c0bcd['attach'](_0x4a1d98),this['listenTo'](_0x5c0bcd,'change:activeAnnotation',(_0x40f592,_0x312370,_0x1a05b8,_0xfdc048)=>{_0xfdc048&&_0x226564['_removeActiveAnnotation'](_0xfdc048),_0x1a05b8&&_0x226564['_addActiveAnnotation'](_0x1a05b8);});}['deactivate'](_0x2eb87e){if(this['activeUIs']['delete'](_0x2eb87e),!this['_uis']['has'](_0x2eb87e))throw new _0x23d4ab('annotationsuis-missing-ui',this,{'uiName':_0x2eb87e});const _0x8cae47=this['_uis']['get'](_0x2eb87e);_0x8cae47['detach'](),this['stopListening'](_0x8cae47),this['uisData']['get'](_0x2eb87e)['collection']['destroy'](),this['uisData']['delete'](_0x2eb87e);}['switchTo'](_0x4c6776){if(!this['_uis']['has'](_0x4c6776))throw new _0x23d4ab('annotationsuis-missing-ui',this,{'uiName':_0x4c6776});const _0x392154=this['context']['plugins']['get'](y),_0x468628=Array['from'](_0x392154['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4c6776);const _0x2d7214=this['_uis']['get'](_0x4c6776);_0x2d7214['setActiveAnnotation'](_0x468628),_0x2d7214['_setSelectedAnnotations']&&_0x468628&&_0x2d7214['_setSelectedAnnotations']([_0x468628]);}['deactivateAll'](){for(const _0x4346be of this['activeUIs'])this['deactivate'](_0x4346be);}['register'](_0x4304c1,_0x59ebae){if(this['_uis']['has'](_0x4304c1))throw new _0x23d4ab('annotationsuis-register-already-registered');if('function'!=typeof _0x59ebae['attach']||'function'!=typeof _0x59ebae['detach']||'function'!=typeof _0x59ebae['setActiveAnnotation'])throw new _0x23d4ab('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4304c1,_0x59ebae);}['refilterAnnotations'](){const _0x4d415e=this['context']['plugins']['get'](y)['collection'],_0x3d1944=new Map(),_0x1ae987=Array['from'](this['activeUIs']);for(const _0x2d95a0 of this['activeUIs']){const _0x2c5f78=this['uisData']['get'](_0x2d95a0)['collection'];for(const _0x4df444 of _0x2c5f78)_0x3d1944['set'](_0x4df444,_0x2d95a0);}for(const _0x118cb3 of _0x4d415e){const _0xf70def=_0x3d1944['get'](_0x118cb3);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x118cb3);const _0x4a67ca=_0x1ae987['find'](_0x980091=>this['uisData']['get'](_0x980091)['filter'](_0x118cb3));_0xf70def!==_0x4a67ca&&(_0xf70def&&this['uisData']['get'](_0xf70def)['collection']['remove'](_0x118cb3),_0x4a67ca&&this['uisData']['get'](_0x4a67ca)['collection']['add'](_0x118cb3));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4f929a){const _0x4cf99e=[];for(const _0x19073e of this['activeUIs']){(0x0,this['uisData']['get'](_0x19073e)['filter'])(_0x4f929a)&&_0x4cf99e['push'](_0x19073e);}if(_0x4cf99e['length']>0x1)throw new _0x23d4ab('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4cf99e,'annotationType':_0x4f929a['type']});}}const _i=/* #__PURE__ -- @preserve */
32
+ Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x547071){super(_0x547071);const _0x15349a=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 _0x58f4fb(),this['focusCycler']=new _0x1a6b88({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x15349a['to']('class')],'style':{'minHeight':_0x15349a['to']('minHeight',_0x1caad=>'number'==typeof _0x1caad?_i(_0x1caad+0xa):null)},'dir':_0x547071['uiLanguageDirection'],'role':'application','aria-label':N(_0x547071,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x547071,'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',_0x17a056=>{this['_updateItemPositionInFocusables'](_0x17a056['source']);}),this['list']['forEach'](_0x10f851=>{this['focusTracker']['add'](_0x10f851['element']),this['_updateItemPositionInFocusables'](_0x10f851);}),this['list']['on']('change',(_0x2fba12,_0x463c6b)=>{for(const _0xdec371 of _0x463c6b['removed'])this['focusTracker']['remove'](_0xdec371['element']),this['focusables']['remove'](_0xdec371);for(const _0x2ed21f of _0x463c6b['added'])this['focusTracker']['add'](_0x2ed21f['element']),this['_updateItemPositionInFocusables'](_0x2ed21f);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x29f5a6){const _0x28202d=this['focusables']['getIndex'](_0x29f5a6);let _0x50f4c2,_0x4ac90e;for(const _0x2ccdcd of this['focusables'])if(_0x29f5a6['top']<_0x2ccdcd['top']){_0x50f4c2=_0x2ccdcd;break;}if(_0x4ac90e=_0x50f4c2?this['focusables']['getIndex'](_0x50f4c2):this['focusables']['length'],-0x1!==_0x28202d){if(_0x28202d===_0x4ac90e-0x1)return;this['focusables']['remove'](_0x29f5a6),_0x4ac90e=_0x50f4c2?this['focusables']['getIndex'](_0x50f4c2):this['focusables']['length'];}this['focusables']['add'](_0x29f5a6,_0x4ac90e);}}const Ot=/* #__PURE__ -- @preserve */
33
+ Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5ac33c){super(_0x5ac33c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5f0ac3,_0x156fce)=>_0x5f0ac3+_0x156fce),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3b2482=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3b2482['to']('isAnimationDisabled',_0x45933c=>_0x45933c?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3b2482['to']('top',_0x3b839d=>Ot(_0x3b839d))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3a8dbd=this['element']['clientHeight'];_0x3a8dbd&&(this['height']=_0x3a8dbd);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4f7306{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f87a1){super(_0x3f87a1),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 _0x5e0132=this['context']['config']['get']('sidebar.container');_0x5e0132&&this['setContainer'](_0x5e0132);}['setContainer'](_0x20d83f){if(!g(_0x20d83f))throw new _0x23d4ab('sidebar-setcontainer-invalid-element');this['container']=_0x20d83f;}['_attachToContainer']({viewClass:_0x35871a='',spaceBetweenItems:_0x174e99=0x19}={}){if(!g(this['container']))throw new _0x23d4ab('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x35871a,this['_spaceBetweenItems']=_0x174e99;}['rearrange']({removedAnnotation:_0x51cb33,previousAnnotation:_0x345e82,nextAnnotation:_0xb951f5}){const _0x63d46f=this['getSidebarItemView'](_0x51cb33);this['view']['list']['remove'](_0x63d46f),this['_destroySidebarItemView'](_0x51cb33),_0x345e82&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x345e82)),_0xb951f5&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xb951f5)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x215634,activatedAnnotation:_0x791433,disableAnimationOnActivatedAnnotation:_0x51d1f2}){if(this['_activeAnnotation']=_0x791433,_0x215634){_0x215634['isActive']=!0x1;const _0x148a6b=this['getSidebarItemView'](_0x215634);_0x148a6b&&_0x51d1f2&&(_0x148a6b['isAnimationDisabled']=!0x1);}if(_0x791433){const _0x3ede98=this['getSidebarItemView'](_0x791433);_0x3ede98&&(_0x791433['isActive']=!0x0,_0x51d1f2&&(_0x3ede98['isAnimationDisabled']=!0x0,_0x3ede98['top']+=0x1),this['_alignToTargetRect'](_0x3ede98));}}['_detachFromContainer'](_0x3cf190){if(this['view']['element']['remove'](),_0x3cf190){for(const _0x2dc15d of _0x3cf190)this['_destroySidebarItemView'](_0x2dc15d);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2cbaa1,_0x40df34){_0x40df34||(_0x40df34=_0x2cbaa1['view']);const _0x4a65e8=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4a65e8,_0x2cbaa1),this['_annotationToSidebarItemView']['set'](_0x2cbaa1,_0x4a65e8),_0x4a65e8['content']['add'](_0x40df34),this['listenTo'](_0x2cbaa1['view'],'change:targetRect',(_0x195a7a,_0x2cf46b,_0x313d37)=>{const _0x1219a1=this['_getTargetTop'](_0x2cbaa1,_0x313d37);_0x4a65e8['_targetTop']!=_0x1219a1&&(_0x4a65e8['_targetTop']=_0x1219a1,this['_setItemTop'](_0x4a65e8,_0x1219a1));}),this['listenTo'](_0x4a65e8,'change:top',()=>{this['_recalculate'](_0x4a65e8,'top');}),this['listenTo'](_0x4a65e8,'change:bottom',()=>{this['_recalculate'](_0x4a65e8,'bottom');}),this['_alignToTargetRect'](_0x4a65e8);const _0x5c68d2=this['_getItemBefore'](_0x4a65e8);if(_0x5c68d2)this['_alignAfterItem'](_0x5c68d2,_0x4a65e8)||this['_alignToTargetRect'](_0x4a65e8);else this['_alignToTargetRect'](_0x4a65e8);return this['_updateLastItem'](),this['view']['list']['add'](_0x4a65e8),_0x4a65e8;}['_alignForTopChange'](_0x1bb063){if(!_0x1bb063['content']['length'])return;const _0x46db6b=this['_getItemBefore'](_0x1bb063);if(!_0x46db6b)return;const _0x45cdc5=this['_sidebarItemViewToAnnotation']['get'](_0x46db6b),_0x20104d=this['_activeAnnotation'];_0x20104d&&_0x20104d===_0x45cdc5?this['_alignAfterItem'](_0x46db6b,_0x1bb063):this['_alignBeforeItem'](_0x1bb063,_0x46db6b);}['_alignForBottomChange'](_0x257d91){if(!_0x257d91['content']['length'])return;const _0x37ea6f=this['_getItemAfter'](_0x257d91);if(!_0x37ea6f)return;const _0x3aae11=this['_sidebarItemViewToAnnotation']['get'](_0x37ea6f),_0x30401e=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x34c07d=this['_activeAnnotation'];_0x34c07d&&_0x34c07d===_0x3aae11&&_0x30401e?(this['_alignBeforeItem'](_0x37ea6f,_0x257d91),this['_alignAfterItem'](_0x257d91,_0x37ea6f)):_0x34c07d&&_0x34c07d===_0x3aae11?this['_alignBeforeItem'](_0x37ea6f,_0x257d91):this['_alignAfterItem'](_0x257d91,_0x37ea6f);}['_recalculate'](_0x23939d,_0x7b8b2b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1ae320,changedProp:_0x3f63c3}of this['_recalculateBuffer'])'top'===_0x3f63c3?this['_alignForTopChange'](_0x1ae320):this['_alignForBottomChange'](_0x1ae320);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x23939d,'changedProp':_0x7b8b2b});}['getSidebarItemView'](_0x54e784){return this['_annotationToSidebarItemView']['get'](_0x54e784);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2baf0e){const _0x2b58ac=this['getSidebarItemView'](_0x2baf0e);this['stopListening'](_0x2b58ac),this['stopListening'](_0x2baf0e['view']),_0x2b58ac['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2baf0e),this['_sidebarItemViewToAnnotation']['delete'](_0x2b58ac);}['_createSidebarView'](){const _0x584481=new H(this['context']['locale']);return _0x584481['render'](),this['on']('change:_lastItem',(_0x4c8bd4,_0xfe501b,_0x4caa46,_0x1d385a)=>{_0x1d385a&&_0x584481['unbind']('minHeight'),_0x4caa46?_0x584481['bind']('minHeight')['to'](_0x4caa46,'bottom'):_0x584481['minHeight']=null;}),_0x584481;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x525bba){const _0x4cd2f2=this['_sidebarItemViewToAnnotation']['get'](_0x525bba),_0x51b3b0=_0x4cd2f2&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4cd2f2)-0x1);return _0x51b3b0&&this['getSidebarItemView'](_0x51b3b0)||null;}['_getItemAfter'](_0x46feaa){const _0x2a6c08=this['_sidebarItemViewToAnnotation']['get'](_0x46feaa),_0x54e5c9=_0x2a6c08&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2a6c08)+0x1);return _0x54e5c9&&this['getSidebarItemView'](_0x54e5c9)||null;}['_alignBeforeItem'](_0x529fdb,_0x391c31){_0x529fdb['updateHeight']();const _0x49245a=G(_0x391c31['bottom']+this['_spaceBetweenItems'],_0x529fdb['top']);return!!_0x49245a&&(this['_setItemTop'](_0x391c31,_0x391c31['top']-_0x49245a),!0x0);}['_alignAfterItem'](_0x3da1f7,_0x424b4d){_0x3da1f7['updateHeight']();const _0x53d97f=G(_0x3da1f7['bottom']+this['_spaceBetweenItems'],_0x424b4d['top']);return!!_0x53d97f&&(this['_setItemTop'](_0x424b4d,_0x424b4d['top']+_0x53d97f,!0x1),!0x0);}['_alignToTargetRect'](_0x47d9d0){const _0x224795=this['_sidebarItemViewToAnnotation']['get'](_0x47d9d0);if(!_0x224795||!_0x224795['target']||!_0x224795['targetRect'])return;const _0x1917ed=this['_getTargetTop'](_0x224795,_0x224795['targetRect']);this['_setItemTop'](_0x47d9d0,_0x1917ed);}['_getTargetTop'](_0x3224de,_0x2e7fbc){if(null===_0x2e7fbc)return 0x0;if(_0x3224de['target']instanceof _0x4ec800)return _0x2e7fbc['top'];{const _0x2278b4=new _0x4ec800(this['view']['element'])['top'];return _0x2e7fbc['top']-_0x2278b4;}}['_setItemTop'](_0x59bd45,_0x3dcf42,_0x1ad0d2=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1ad0d2&&(_0x3dcf42=Math['max'](_0x3dcf42,this['_getMaxAvailableTop'](_0x59bd45))),_0x59bd45['top']=_0x3dcf42;}['_getMaxAvailableTop'](_0xb8f54a){let _0x14044c=this['_getItemBefore'](_0xb8f54a),_0x508cfe=0x0;for(;_0x14044c;)_0x14044c['updateHeight'](),_0x508cfe+=this['_spaceBetweenItems']+_0x14044c['height'],_0x14044c=this['_getItemBefore'](_0x14044c);return _0x508cfe;}}function G(_0x1eeeae,_0x3a1073){return Math['max'](_0x1eeeae-_0x3a1073,0x0);}function g(_0x5d1de1){return null!==_0x5d1de1&&'object'==typeof _0x5d1de1&&0x1===_0x5d1de1['nodeType'];}class e extends _0x4f7306{['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(_0x4b2f9b){super(_0x4b2f9b),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x584cc7(),this['_refreshPositioningDebounced']=_0x24341f(()=>{_0x4b2f9b['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4487a4=this['context']['plugins']['get'](j),_0x221a5c=this['context']['plugins']['get'](z);_0x4487a4['register']('wideSidebar',this),_0x221a5c['container']&&_0x4487a4['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1bf98c){if(_0x1bf98c===this['activeAnnotation'])return;const _0x428a44=this['context']['plugins']['get'](z);_0x428a44['_activeAnnotation']=_0x1bf98c;const _0x5de539=this['activeAnnotation'];_0x428a44['refresh']({'blurredAnnotation':_0x5de539,'activatedAnnotation':_0x1bf98c}),this['activeAnnotation']=_0x1bf98c;}['attach'](_0x2e1ede){this['annotations']=_0x2e1ede;const _0x542645=this['context']['plugins']['get'](z);if(_0x542645['_annotations']=_0x2e1ede,this['isAttached'])throw new _0x23d4ab('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x542645,'set:container',()=>{this['detach'](),this['listenTo'](_0x542645,'change:container',_0x440a70=>{_0x440a70['off'](),this['attach'](_0x2e1ede);});}),_0x542645['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x552564=_0x8eb2e2=>{_0x8eb2e2['updateTargetRect'](),_0x542645['addAnnotation'](_0x8eb2e2);};for(const _0x1a3e44 of _0x2e1ede)_0x552564(_0x1a3e44);this['listenTo'](_0x2e1ede,'add',(_0x54dec9,_0x2975e8)=>{_0x552564(_0x2975e8);}),this['listenTo'](_0x2e1ede,'remove',(_0x2060f1,_0x4de58b,_0x53600b)=>{_0x542645['rearrange']({'removedAnnotation':_0x4de58b,'previousAnnotation':_0x2e1ede['get'](_0x53600b-0x1),'nextAnnotation':_0x2e1ede['get'](_0x53600b+0x1)}),_0x4de58b===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2e1ede,'focus',(_0x3442ed,_0x237aa4)=>{this['setActiveAnnotation'](_0x237aa4);}),this['listenTo'](_0x2e1ede,'blur',()=>{this['setActiveAnnotation'](null);});const _0xdac803=this['context']instanceof _0x25a64a?this['context']['editors']:new _0x584cc7([this['context']]);for(const _0x2e3246 of _0xdac803)this['_integrateWithEditorAnnotations'](_0x2e3246);this['listenTo'](_0xdac803,'add',(_0x446996,_0x25692d)=>{this['listenTo'](_0x25692d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x25692d);});}),this['listenTo'](_0xdac803,'remove',(_0x218e29,_0x48242e)=>{_0x48242e['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x48242e['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x23d4ab('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4d24d2=this['context']['plugins']['get'](z);_0x4d24d2['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4d24d2),this['stopListening'](this['annotations']),this['context']instanceof _0x25a64a&&this['stopListening'](this['context']['editors']);for(const _0x1d2696 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1d2696);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1dd696){if(!_0x1dd696['plugins']['has']('EditorAnnotations'))return;const _0x240f5f=_0x1dd696['plugins']['get']('EditorAnnotations'),_0x508e56=()=>{const _0x45eec0=_0x240f5f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x45eec0[0x0]||null);};this['listenTo'](_0x240f5f,'refresh',_0x508e56),this['listenTo'](_0x240f5f,'blur',(_0x25732f,{isAnnotationTracked:_0x515d0d})=>{this['activeAnnotation']&&_0x515d0d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x240f5f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4cd589=>{_0x240f5f['hasDomSelection']()&&(_0x508e56(),_0x4cd589['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x240f5f);}['_destroyEditorAnnotationsIntegration'](_0x71776b){this['stopListening'](_0x71776b),this['_editorAnnotations']['remove'](_0x71776b);}}class C extends _0x38e985{['counterView'];constructor(_0x335303){super(_0x335303);const _0x18e65a=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2cdf12,_0xfc4587)=>_0x2cdf12?'...':_0xfc4587['toString']()),this['set']('annotationType',''),this['icon']=_0x56d41d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x18e65a['to']('annotationType',_0x23940b=>'ck-annotation-counter__badge--'+_0x23940b),_0x18e65a['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x18e65a['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4f7306{['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(_0x489097){super(_0x489097),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xd181bf())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x584cc7(),this['_refreshPositioningDebounced']=_0x24341f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5e1067(this['context']['locale']),this['balloonPanelView']=new _0x436ff8(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x231444){this['annotations']=_0x231444;const _0x5dc422=this['context']['plugins']['get'](z),_0x2e6273=this['balloonPanelView'];if(_0x5dc422['_annotations']=_0x231444,this['isAttached'])throw new _0x23d4ab('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5dc422,'set:container',()=>{this['detach'](),this['listenTo'](_0x5dc422,'change:container',_0x1a4e5f=>{_0x1a4e5f['off'](),this['attach'](_0x231444);});}),_0x5dc422['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3ee675=_0x4c5b43=>{const _0x420ee7=new C(this['context']['locale']);_0x5dc422['addAnnotation'](_0x4c5b43,_0x420ee7),this['_annotationToNarrowView']['set'](_0x4c5b43,_0x420ee7),_0x420ee7['bind']('isDirty','annotationType','number')['to'](_0x4c5b43['view'],'isDirty','type','length'),_0x420ee7['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2e6273['content']['first']!==_0x4c5b43['view']?(this['_showBalloon'](_0x4c5b43),_0x4c5b43['view']['element']['focus'](),this['setActiveAnnotation'](_0x4c5b43)):this['setActiveAnnotation'](null);});};for(const _0x310fc8 of _0x231444)_0x3ee675(_0x310fc8);this['listenTo'](_0x231444,'add',(_0x160d52,_0x4b695e)=>{_0x3ee675(_0x4b695e);}),this['listenTo'](_0x231444,'remove',(_0x402e4a,_0x125123,_0xd80c17)=>{this['_annotationToNarrowView']['get'](_0x125123)['destroy'](),this['_annotationToNarrowView']['delete'](_0x125123),_0x5dc422['rearrange']({'removedAnnotation':_0x125123,'previousAnnotation':_0x231444['get'](_0xd80c17-0x1),'nextAnnotation':_0x231444['get'](_0xd80c17+0x1)}),_0x125123===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x231444,'focus',(_0x1c85b2,_0x33cce7)=>{this['setActiveAnnotation'](_0x33cce7);}),this['listenTo'](_0x231444,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x286dda,_0x3776ae)=>{_0x3776ae['keyCode']===_0x395c85['esc']&&_0x2e6273['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2e6273['content']['first']),this['_hideBalloon'](),_0x3776ae['stopPropagation'](),_0x3776ae['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3fe2d7,_0x4c4d1b)=>{const _0x58aeea=_0x4c4d1b['target'];_0x2e6273['isVisible']&&_0x2e6273['element']['contains'](_0x58aeea)||_0x5dc422['view']['element']['contains'](_0x58aeea)||_0x3fe2d7['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x1ab308=>_0x1ab308['contains'](_0x58aeea))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x405ad8=this['context']instanceof _0x25a64a?this['context']['editors']:new _0x584cc7([this['context']]);for(const _0x35c536 of _0x405ad8)this['_integrateWithEditorAnnotations'](_0x35c536);this['listenTo'](_0x405ad8,'add',(_0x408118,_0x2e0b96)=>{this['listenTo'](_0x2e0b96,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2e0b96);});}),this['listenTo'](_0x405ad8,'remove',(_0x46f3e6,_0x24d900)=>{_0x24d900['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x24d900['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5481d2){if(_0x5481d2===this['activeAnnotation'])return;const _0x590e8c=this['context']['plugins']['get'](z);if(_0x590e8c['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5481d2,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5481d2)_0x590e8c['getSidebarItemView'](_0x5481d2)?this['_showBalloon'](_0x5481d2):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5481d2;}['detach'](){if(!this['isAttached'])throw new _0x23d4ab('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x445ea2=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x203e5d=>_0x203e5d['destroy']()),this['_annotationToNarrowView']['clear'](),_0x445ea2['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x25a64a&&this['stopListening'](this['context']['editors']);for(const _0xf5ac9b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xf5ac9b);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'](_0x2c21f5){if(!_0x2c21f5['plugins']['has']('EditorAnnotations'))return;const _0x1e606c=_0x2c21f5['plugins']['get']('EditorAnnotations'),_0x487f79=this['context']['plugins']['get'](z),_0x3f6df1=this['annotations'],_0x5d5bbc=this['balloonPanelView'],_0xebd582=()=>{const _0x5ed8dc=_0x1e606c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x5ed8dc),this['setActiveAnnotation'](_0x5ed8dc[0x0]||null);};this['listenTo'](_0x1e606c,'refresh',_0xebd582),this['listenTo'](_0x1e606c,'blur',(_0x39e24b,{isAnnotationTracked:_0x33be2d})=>{this['activeAnnotation']&&_0x33be2d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1e606c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3f6df1,'blur',_0x1635ed=>{_0x1e606c['hasDomSelection']()&&_0x1635ed['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x3a48e0,_0x201eeb)=>{const _0x147b96=_0x201eeb['target'];_0x5d5bbc['isVisible']&&_0x5d5bbc['element']['contains'](_0x147b96)||_0x487f79['view']['element']['contains'](_0x147b96)||this['activeAnnotation']&&_0x1e606c['hasDomSelection']()&&(_0xebd582(),_0x3a48e0['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1e606c);}['_destroyEditorAnnotationsIntegration'](_0x16ab00){_0x16ab00&&(this['stopListening'](_0x16ab00),this['_editorAnnotations']['remove'](_0x16ab00));}['_setSelectedAnnotations'](_0x5e5ff7){for(const _0x2491b1 of this['_selectedAnnotations'])_0x5e5ff7['includes'](_0x2491b1)||this['_manuallyClosedAnnotationViews']['delete'](_0x2491b1['view']);this['_selectedAnnotations']=_0x5e5ff7;}['_refreshPositioning'](){const _0x1fc850=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x1fc850['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x271e0e){if(this['_manuallyClosedAnnotationViews']['has'](_0x271e0e['view']))return;const _0x23480=this['balloonPanelView']['content']['first'];_0x23480!==_0x271e0e['view']?(_0x23480&&this['_detachListeners'](_0x23480),this['_attachListeners'](_0x271e0e['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x271e0e['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x274f3d=this['balloonPanelView']['content']['first'],_0x555167=_0x274f3d&&this['annotations']['getByView'](_0x274f3d);if(!_0x555167||!this['_annotationToNarrowView']['has'](_0x555167))return;const _0x2c69d2=this['_annotationToNarrowView']['get'](_0x555167)['element'],_0x4e3ae9=(function(){const _0x2e2973=_0x436ff8['defaultPositions'];return[_0x2e2973['southArrowNorthEast'],_0x2e2973['northArrowSouthEast'],_0x2e2973['southArrowNorth'],_0x2e2973['northArrowSouth'],_0x2e2973['southArrowNorthWest'],_0x2e2973['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2c69d2,'positions':_0x4e3ae9});}['_hideBalloon'](){const _0x183afd=this['balloonPanelView'],_0x15a03c=_0x183afd['content']['first'];_0x15a03c&&(this['_detachListeners'](_0x15a03c),_0x183afd['unpin'](),_0x183afd['content']['clear']());}['_attachListeners'](_0x261aa9){this['listenTo'](_0x261aa9,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x261aa9,'Esc',(_0x54a078,_0x597a99)=>{this['_manuallyClosedAnnotationViews']['add'](_0x261aa9),this['_hideBalloon'](),_0x597a99();});}['_detachListeners'](_0x21bfa4){this['stopListening'](_0x21bfa4);}}class c extends _0x6c9bcf{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x552e4a,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5a4f09){super(_0x5a4f09),_0x5a4f09['editing']['view']['addObserver'](_0x191965),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5a4f09['plugins']['get'](_0x552e4a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x1afd24=this['editor']['plugins']['get'](j);_0x1afd24['context']===this['editor']&&(_0x1afd24['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x525956,_0x4104cb)=>{const _0x2cba4f=this['_balloon'];if(this['isAttached']&&_0x2cba4f['visibleView']){const _0x5affc0=this['annotations']['getByView'](_0x2cba4f['visibleView']);_0x5affc0&&this['_closeAnnotation'](_0x5affc0),_0x4104cb();}}));}['afterInit'](){const _0x58709b=this['editor']['plugins']['get'](j);_0x58709b['context']===this['editor']&&(_0x58709b['hasActive']()||_0x58709b['switchTo']('inline'));}['setActiveAnnotation'](_0x4754d0){_0x4754d0!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4754d0&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4754d0)&&this['_addAnnotationToBalloon'](_0x4754d0,!0x0),_0x4754d0['isActive']=!0x0),_0x4754d0||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4754d0);}['attach'](_0x3c3cfd){this['annotations']=_0x3c3cfd;const _0x3d6a26=this['editor']['plugins']['get'](j),_0x5d18a8=this['_balloon'];if(this['isAttached'])throw new _0x23d4ab('inlineannotations-attach-already-attached',this);if(_0x3d6a26['context']!==this['editor'])throw new _0x23d4ab('inlineannotations-not-allowed-with-context',this);const _0x48e99c=this['editor']['plugins']['get'](b);this['listenTo'](_0x48e99c,'refresh',()=>{const _0x46929a=_0x48e99c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4fe2fd,_0x14f585;!this['_forceRefresh']&&(_0x4fe2fd=_0x46929a,_0x14f585=this['_selectedAnnotations'],_0x4fe2fd['length']===_0x14f585['length']&&_0x4fe2fd['every'](_0x51bb5b=>_0x14f585['includes'](_0x51bb5b)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x46929a),this['setActiveAnnotation'](_0x46929a[0x0]||null));}),this['listenTo'](_0x48e99c,'blur',(_0x172283,{isAnnotationTracked:_0x75dc4d})=>{this['activeAnnotation']&&_0x75dc4d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1df6a2,_0x2d1be9,_0x24d781)=>{_0x24d781||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3c3cfd,'remove',(_0x5940e2,_0x25c6e6)=>{this['_removeAnnotationFromBalloon'](_0x25c6e6),_0x25c6e6===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5d18a8,'change:visibleView',(_0x368bad,_0x4bf2c4,_0x29f036,_0x587594)=>{_0x587594&&this['stopListening'](_0x587594);const _0x2a189b=_0x3c3cfd['getByView'](_0x29f036);_0x29f036&&_0x2a189b&&(this['listenTo'](_0x29f036,'change:height',()=>{_0x5d18a8['updatePosition']();}),this['listenTo'](_0x29f036,'Esc',()=>{this['_closeAnnotation'](_0x2a189b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2a189b&&this['setActiveAnnotation'](_0x2a189b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5d18a8['visibleView']&&(_0x3c3cfd['getByView'](_0x5d18a8['visibleView'])&&_0x5d18a8['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 _0x23d4ab('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x22c64f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x22c64f);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x92fd0){for(const _0x3b7e1b of this['_selectedAnnotations'])_0x92fd0['includes'](_0x3b7e1b)||this['_manuallyClosed']['delete'](_0x3b7e1b);for(const _0xcf11dd of this['annotations'])_0x92fd0['includes'](_0xcf11dd)||this['_removeAnnotationFromBalloon'](_0xcf11dd);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1961d3 of _0x92fd0)this['_addAnnotationToBalloon'](_0x1961d3);}this['_selectedAnnotations']=_0x92fd0;}['_addAnnotationToBalloon'](_0x139812,_0x108ab4=!0x1){this['_manuallyClosed']['has'](_0x139812)||(this['_addedAnnotations']['has'](_0x139812)||this['_balloon']['hasView'](_0x139812['view'])||(this['_addedAnnotations']['add'](_0x139812),this['_balloon']['add']({'stackId':_0x139812['view']['id'],'view':_0x139812['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x139812)}})),_0x108ab4&&this['_balloon']['showStack'](_0x139812['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5735b3){const _0xc2a9e4=_0x5735b3['target'],_0x457bed=this['editor']['editing']['view'],_0x17222b=_0x457bed['document']['selection']['getFirstRange'](),_0x55dbaf=_0x457bed['domConverter']['viewRangeToDom'](_0x17222b);if(_0x55dbaf['collapse'](!0x0),_0xc2a9e4){if(_0xc2a9e4 instanceof _0x4ec800)return _0xc2a9e4;let _0x512f08=[];for(const _0x5097f1 of _0xc2a9e4)_0x512f08['push'](...F(_0x5097f1['getClientRects']()));_0x512f08=function(_0x278eb1){const _0xf12967=[];let _0x13c606=_0x278eb1[0x0];for(let _0x3f05e7=0x1;_0x3f05e7<_0x278eb1['length'];_0x3f05e7++)P(_0x13c606,_0x278eb1[_0x3f05e7])?_0x13c606['width']+=_0x278eb1[_0x3f05e7]['width']:(_0xf12967['push'](_0x13c606),_0x13c606=_0x278eb1[_0x3f05e7]);return _0xf12967['push'](_0x13c606),_0xf12967;}(_0x512f08);const _0x46b0f1=_0x55dbaf['getBoundingClientRect']();return _0x512f08['find'](_0xfa2ff7=>_0xfa2ff7['top']<=_0x46b0f1['top']&&_0xfa2ff7['bottom']>=_0x46b0f1['bottom']&&_0xfa2ff7['left']<=_0x46b0f1['left']&&_0xfa2ff7['right']>=_0x46b0f1['right'])||_0x512f08[0x0];}return _0x5735b3['targetRect']||_0x55dbaf;}['_removeAnnotationFromBalloon'](_0xd7372e){this['_addedAnnotations']['has'](_0xd7372e)&&this['_balloon']['hasView'](_0xd7372e['view'])&&(this['_addedAnnotations']['delete'](_0xd7372e),this['_balloon']['remove'](_0xd7372e['view']));}['_closeAnnotation'](_0x2bb49d){this['_manuallyClosed']['add'](_0x2bb49d),this['_removeAnnotationFromBalloon'](_0x2bb49d);}}function F(_0x2c5ade){return Array['from'](_0x2c5ade)['map'](DOMRect['fromRect']);}function P(_0x53f586,_0x275040){return _0x53f586['top']===_0x275040['top']&&_0x53f586['bottom']===_0x275040['bottom']&&_0x53f586['right']===_0x275040['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x386a70,_0x19fac5){super(_0x386a70),this['set']('isEmpty',!_0x19fac5['length']),this['focusTracker']=new _0x58f4fb(),this['_annotationViews']=_0x19fac5,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x1a6b88({'focusables':_0x19fac5,'focusTracker':this['focusTracker']}),this['listenTo'](_0x19fac5,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x19fac5,'remove',(_0x1d0757,_0x524cc8)=>{_0x524cc8['isActive']&&this['focus'](),_0x19fac5['length']||(this['isEmpty']=!0x0);});const _0x105e4e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x386a70,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x19fac5},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x105e4e['if']('isEmpty','ck-hidden',_0x6a5af4=>!_0x6a5af4)]},'children':[{'text':N(_0x386a70,'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 _0x223b47 of this['_annotationViews'])this['focusTracker']['add'](_0x223b47['element']);this['_annotationViews']['on']('change',(_0x16434c,{added:_0x55331b,removed:_0x982f72})=>{for(const _0x46a884 of _0x55331b)this['focusTracker']['add'](_0x46a884['element']);for(const _0x51bca7 of _0x982f72)this['focusTracker']['remove'](_0x51bca7['element']);});}}class p extends _0x4f7306{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x3d5043){super(_0x3d5043),this['archivedThreads']=new _0x584cc7();}['init'](){const _0x4c2375=this['context'],_0x2e3e58=_0x4c2375['plugins']['get'](o),_0x44df00=_0x4c2375['plugins']['get'](y);this['listenTo'](_0x2e3e58,'addCommentThread',(_0x54756f,{threadId:_0x10a39c})=>{const _0x4d2b32=_0x2e3e58['getCommentThread'](_0x10a39c);_0x4d2b32['archivedAt']&&this['archivedThreads']['add'](_0x4d2b32,this['_calculatePosition'](_0x4d2b32['archivedAt'])),this['listenTo'](_0x4d2b32,'change:archivedAt',(_0x39afbb,_0x405ce2,_0x5c1ca9)=>{_0x5c1ca9?this['archivedThreads']['has'](_0x4d2b32)||this['archivedThreads']['add'](_0x4d2b32,this['_calculatePosition'](_0x4d2b32['archivedAt'])):this['archivedThreads']['has'](_0x4d2b32)&&this['archivedThreads']['remove'](_0x4d2b32);});}),this['listenTo'](_0x2e3e58,'removeCommentThread',(_0x5284b2,{threadId:_0x3b1a64})=>{const _0x1b7cf7=_0x2e3e58['getCommentThread'](_0x3b1a64);this['stopListening'](_0x1b7cf7),this['archivedThreads']['has'](_0x1b7cf7)&&this['archivedThreads']['remove'](_0x1b7cf7);},{'priority':'highest'}),this['listenTo'](_0x44df00['collection'],'focus',(_0x16aa98,_0xe76bfe)=>{_0xe76bfe['isVisible']||(_0xe76bfe['isActive']=!0x0,_0x44df00['activate'](_0xe76bfe));});}['_calculatePosition'](_0x1fd543){const _0xf5f62a=[...this['archivedThreads']]['findIndex'](_0x40d563=>_0x40d563['archivedAt']<_0x1fd543);return _0xf5f62a>-0x1?_0xf5f62a:this['archivedThreads']['length'];}}class a extends _0x6c9bcf{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x583c95];}constructor(_0x46b057){super(_0x46b057),this['annotationViews']=new _0x2d6a7d(),this['_pendingThreads']=[];}['init'](){const _0x2887d8=this['editor'],_0x19de8e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2887d8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x38e985,!0x0)),_0x2887d8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5df91e=this['_createCommentsArchiveButton'](_0x5a3c61);return _0x5df91e['set']({'role':'menuitemcheckbox'}),_0x5df91e;});const _0x33b59e=_0x2887d8['plugins']['get'](p),_0x297dfb=_0x2887d8['plugins']['get']('Annotations'),_0x4f7558=_0x2887d8['plugins']['get']('CommentsRepository');_0x33b59e['archivedThreads']['forEach'](_0x2a7b22=>{this['_handleNewThread'](_0x2a7b22);}),this['listenTo'](_0x33b59e['archivedThreads'],'add',(_0x2ec3a6,_0x126c9b)=>{this['_handleNewThread'](_0x126c9b);}),this['listenTo'](_0x297dfb['collection'],'add',(_0x2c1b0d,_0x210a84)=>{const _0x732ae5=this['_pendingThreads']['find'](_0x407bff=>{const _0x86ded4=_0x4f7558['_threadToController']['get'](_0x407bff);return _0x86ded4&&_0x210a84['innerView']===_0x86ded4['view'];});if(_0x732ae5){const _0x5f709a=this['_calculatePosition'](_0x732ae5['archivedAt']);this['annotationViews']['add'](_0x210a84['view'],_0x5f709a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x732ae5),0x1);}}),this['listenTo'](_0x33b59e['archivedThreads'],'remove',(_0x53ff05,_0x22a68c)=>{const _0x1c6660=_0x2887d8['config']['get']('collaboration.channelId');if(!_0x1c6660||_0x22a68c['channelId']===_0x1c6660){if(this['_pendingThreads']['includes'](_0x22a68c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x22a68c),0x1);else{const _0x292f87=_0x4f7558['_threadToController']['get'](_0x22a68c),_0xd6b24f=_0x297dfb['getByInnerView'](_0x292f87['view']);this['annotationViews']['remove'](_0xd6b24f['view']),this['stopListening'](_0xd6b24f['focusableElements']);}}}),this['listenTo'](_0x297dfb['collection'],'add',(_0x3caedb,_0x1ef7e8)=>{this['listenTo'](_0x1ef7e8,'escape',_0x19de8e);}),this['listenTo'](_0x297dfb['collection'],'remove',(_0x368519,_0x2b8c5d)=>{this['stopListening'](_0x2b8c5d,'escape',_0x19de8e);});}['_handleNewThread'](_0x413086){const _0x513bb9=this['editor']['plugins']['get']('CommentsRepository'),_0x520427=this['editor']['plugins']['get']('Annotations'),_0x407520=this['editor']['config']['get']('collaboration.channelId');if(!_0x407520||_0x413086['channelId']===_0x407520){const _0x280774=_0x513bb9['_threadToController']['get'](_0x413086);if(!_0x280774)return void this['_pendingThreads']['push'](_0x413086);const _0x24dc8e=this['_calculatePosition'](_0x413086['archivedAt']),_0x3600f6=_0x520427['getByInnerView'](_0x280774['view']);_0x3600f6['isVisible']&&_0x520427['_visibleAnnotations']['remove'](_0x3600f6),this['annotationViews']['add'](_0x3600f6['view'],_0x24dc8e);}}['_calculatePosition'](_0x5b96ba){const _0xbefe61=this['editor']['config']['get']('collaboration.channelId'),_0x2f194d=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x27e745=>_0x27e745['channelId']===_0xbefe61)['findIndex'](_0x10c5ca=>_0x10c5ca['archivedAt']<_0x5b96ba);return _0x2f194d<0x0||_0x2f194d>this['annotationViews']['length']?this['annotationViews']['length']:_0x2f194d-0x1;}['_toggleDialog'](){const _0x35f231=this['editor'],_0x4ac79a=_0x35f231['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x35f231['locale'],this['annotationViews'])),'commentsArchive'===_0x4ac79a['id']?_0x4ac79a['hide']():_0x4ac79a['show']({'id':'commentsArchive','title':N(_0x35f231['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4fc354,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x307dc1['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x483192,_0x5e25ce=!0x1){const _0x341390=this['editor']['locale'],_0x120e6=this['editor']['plugins']['get']('Dialog'),_0x7ad811=new _0x483192(_0x341390);return _0x7ad811['bind']('isEnabled')['to'](this,'isEnabled'),_0x7ad811['bind']('isOn')['to'](_0x120e6,'id',_0x530d7f=>'commentsArchive'===_0x530d7f),_0x7ad811['set']({'label':N(_0x341390,'COMMENTS_ARCHIVE'),'icon':_0x4fc354,'isToggleable':!0x0}),_0x5e25ce&&(_0x7ad811['tooltip']=!0x0),this['listenTo'](_0x7ad811,'execute',()=>this['_toggleDialog']()),_0x7ad811;}['_hideDialogOnAnnotationEscape']=_0x2d35df=>{const _0x4595c5=_0x2d35df['source'];if(!this['annotationViews']['has'](_0x4595c5['view']))return;const _0x2f0b6a=this['editor']['plugins']['get']('Dialog');_0x2f0b6a['isOpen']&&'commentsArchive'===_0x2f0b6a['id']&&(_0x2f0b6a['hide'](),_0x2d35df['stop']());};}class gi extends _0x6c9bcf{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};