@ckeditor/ckeditor5-comments 45.2.0-alpha.5 → 45.2.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,12 +20,12 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x4c4f23,ContextPlugin as _0xb0fdc5,PendingActions as pt,Command as _0x4d8247,Plugin as _0x1b90ef,Context as _0x20d897}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x5dc210,uid as _0x5db4a7,KeystrokeHandler as jt,FocusTracker as _0x4e787a,diff as _0x4f3751,Collection as _0x1990b8,Rect as _0x38453a,CKEditorError as _0x4877d5,first as _0x2f235a,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as Dt,DomEmitterMixin as _0x5ae503,keyCodes as _0x55d262}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3bb20a,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x3cc239,trimHtml as _0x83f52c,LateFocusDropdownButtonView as _0x23d3c5,Users as ct,getDateTimeFormatter as It,hashObject as wt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x918704}from'ckeditor5-collaboration/dist/index.js';import{throttle as _0x544506,isEqual as yt,cloneDeep as At,set as Ct,unset as vt,debounce as _0xd76232}from'es-toolkit/compat';import{IconUndo as _0x5e686f,IconCheck as _0x56f359,IconPencil as _0x40b61b,IconRemoveComment as _0x118791,IconThreeVerticalDots as _0x2b2f4d,IconAddComment as _0x22b197,IconCommentsArchive as _0x279b67}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x420628,ButtonView as _0xada5a,ViewCollection as _0x273922,createDropdown as _0x34d753,ListView as _0x23584e,focusChildOnDropdownOpen as _0x5d0672,ListItemView as _0x56f279,MenuBarMenuListItemButtonView as _0x558b83,BodyCollection as _0x3294cf,BalloonPanelView as _0x41e242,ContextualBalloon as _0x3a7997,Dialog as tt,DialogViewPosition as it}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x19e0b5}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x332c79}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x2b6cc6}from'@ckeditor/ckeditor5-widget/dist/index.js';class gt extends/* #__PURE__ -- @preserve */
24
- _0x5dc210(){['model'];['view'];constructor(_0x2d2aeb,_0x550c90){super(),this['model']=_0x2d2aeb,this['model']['_isAttached']=!0x0,this['view']=_0x550c90,this['listenTo'](_0x550c90,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x550c90,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x550c90,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x550c90,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x550c90,'addComment',(_0x2dd9db,_0x10eacd)=>this['addComment'](_0x10eacd)),this['listenTo'](_0x550c90,'updateComment',(_0x54bd5d,_0x20c63c,_0x5e20ed)=>this['updateComment'](_0x20c63c,_0x5e20ed)),this['listenTo'](_0x550c90,'removeComment',(_0xf2ec2f,_0x55262c)=>this['removeComment'](_0x55262c));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x39c30b){this['model']['addComment']({'content':_0x39c30b,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x1bab18,_0x2a9ee7){this['model']['getComment'](_0x1bab18)['update']({'content':_0x2a9ee7});}['removeComment'](_0x2d34ee){this['model']['getComment'](_0x2d34ee)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x14cfbd,_0x4e2773,_0x22ef4c){const t=_0x14cfbd['t'];switch(_0x4e2773){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'},_0x22ef4c);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'},_0x22ef4c);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'},_0x22ef4c);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'},_0x22ef4c);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x22ef4c);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'},_0x22ef4c);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'},_0x22ef4c);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'},_0x22ef4c);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 Ut extends Vt{['main'];['editable'];constructor(_0x13469e,_0x8be138){super(_0x13469e);const _0x460927=_0x5db4a7();this['main']=this['createCollection'](),this['editable']=new $t(_0x13469e,_0x8be138,void 0x0,{'label':()=>E(_0x13469e,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x13469e['uiLanguageDirection'],'lang':_0x13469e['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x460927},'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 Ot extends Rt{['view'];constructor(_0x5b4ebc){super(_0x5b4ebc),this['view']=new Ut(_0x5b4ebc['locale'],_0x5b4ebc['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x42b6ab=this['editor']['editing']['view'],_0x588be7=this['view']['editable'],_0x2f80b2=_0x42b6ab['document']['getRoot']();_0x588be7['name']=_0x2f80b2['rootName'],this['view']['render']();const _0x4ae366=_0x588be7['element'];this['setEditableElement'](_0x588be7['name'],_0x4ae366),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x42b6ab['attachDomRoot'](_0x4ae366),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Lt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
25
- _0x5dc210(_0x4c4f23){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Lt)());constructor(_0x2d993e={}){function _0x288d54(_0x2bd136){return _0x2bd136['map'](_0x4ac519=>String['fromCharCode'](_0x4ac519))['join']('');}(_0x2d993e=Object['assign']({},_0x2d993e))['plugins']||(_0x2d993e['plugins']=Qt['defaultPlugins']),super(_0x2d993e),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x288d54([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x288d54([0x76,0x69,0x65,0x77])][_0x288d54([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x288d54([0x61,0x75,0x74,0x6f]),this[_0x288d54([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x288d54([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x288d54([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x288d54([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x288d54([0x6f,0x6b])});}['create'](){const _0x2c3a1c=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2c3a1c))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4a4ee9=>{const _0x5b7bbb=this['model']['document']['getRoot'](),_0x2581ee=_0x5b7bbb&&_0x5b7bbb['getChild'](_0x5b7bbb['childCount']-0x1);_0x4a4ee9['setSelection'](_0x2581ee,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x448738=this['editing']['view'],_0x4730eb=_0x448738['document']['getRoot'](),_0x433733=_0x4730eb['getChild'](0x0);_0x4730eb['childCount']>0x1||!_0x433733||'p'!=_0x433733['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x448738,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x433733['placeholder']=this['placeholder']),Ft({'view':_0x448738,'element':_0x433733,'keepOnFocus':!0x0}),this['placeholderElement']=_0x433733);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x510fac,_0x325a27={}){super(_0x510fac),this['editor']=null,this['_editorConfig']=_0x325a27,this['set']('value',_0x325a27['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x510fac,'Reply...')),this['set']('submitLabel',E(_0x510fac,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4e787a(),this['focusCycler']=new _0x420628({'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',(_0x3aef80,_0xd89987)=>{this['cancelButtonView']['fire']('execute'),_0xd89987();}),this['keystrokes']['set']('Ctrl+Enter',(_0x536160,_0x4b5048)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4b5048());}),this['on']('submit',(_0x147bc0,_0x51e89c)=>{_0x51e89c['length']>0xfde8?(alert(E(_0x510fac,'TOO_LONG_COMMENT_ALERT',[_0x51e89c['length'],0xfde8])),_0x147bc0['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x409104=this['editor'];this['element']['insertBefore'](_0x409104['ui']['element'],this['element']['firstChild']),_0x409104['model']['document']['on']('change',()=>this['value']=_0x409104['getData']()),_0x409104['bind']('placeholder')['to'](this),this['focusables']['add'](_0x409104['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5a90ff){-0x1===_0x5a90ff?(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:_0x3f843d}=this,_0x358934=new _0xada5a(_0x3f843d);return _0x358934['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x358934['withText']=!0x0,_0x358934['bind']('label')['to'](this,'submitLabel'),_0x358934['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x358934['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x353a06,_0x471dcf)=>!_0x471dcf&&!!_0x353a06['trim']()),_0x358934;}['_createCancelButton'](){const {locale:_0x270e22}=this,_0x132881=new _0xada5a(_0x270e22);return _0x132881['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x132881['label']=E(_0x270e22,'Cancel'),_0x132881['withText']=!0x0,_0x132881['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x132881;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3d500d=>{this['focusTracker']['add'](_0x3d500d['element']);}),this['focusables']['on']('change',(_0x26922e,_0x5dad7f)=>{for(const _0x4a9616 of Array['from'](_0x5dad7f['added'])['reverse']())this['focusTracker']['add'](_0x4a9616['element']);});}}class ie extends kt{constructor(_0x51d063,_0x1b272e,_0x15a202){super(_0x51d063),this['commentInputView']=new os(_0x51d063,_0x15a202),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x375214,_0x31bd6b)=>_0x375214||!!_0x31bd6b),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 _0x3bb20a(_0x51d063,_0x1b272e),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'](_0x448d82){this['commentInputView']['focus'](_0x448d82);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1bc5fc,_0xee2c16)=>{const {submitButtonView:_0x379997,cancelButtonView:_0x374ef1,editor:_0x264a9b}=this['commentInputView'];[_0x379997['element'],_0x374ef1['element'],_0x264a9b?_0x264a9b['editing']['view']['getDomRoot']():null]['filter'](_0xd5a9dd=>_0xd5a9dd)['some'](_0x2b1d4b=>_0x2b1d4b['contains'](_0xee2c16['target']))||(this['focus'](),_0xee2c16['preventDefault']());});}}class cs extends kt{constructor(_0x16214d){super(_0x16214d);const _0x2d3112=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2d3112['to']('count',_0xf56f2=>E(_0x16214d,'NUMBER_OF_COMMENTS',_0xf56f2))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3c4bb7,_0xc5454a,_0x21f362){super(_0x3c4bb7);const _0x23a9f2=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xc5454a['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xc5454a,this['_config']=_0x21f362,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4e787a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x420628({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x12b11b=>this['commentViews']['map'](_0x3cbcf7=>_0x3cbcf7['element'])['includes'](_0x12b11b['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x3c4bb7),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x39f883=>_0x39f883-this['_config']['maxCommentsWhenCollapsed']);for(const _0x210954 of _0xc5454a['comments'])this['_handleNewCommentModel'](_0x210954);this['_handleInfoComment'](),this['listenTo'](_0xc5454a['comments'],'add',(_0x32224e,_0x483971)=>{const _0x15bb17=this['_calculatePosition'](_0x483971);this['length']++,this['_handleNewCommentModel'](_0x483971,_0x15bb17),this['refreshVisibleViews']();}),this['listenTo'](_0xc5454a['comments'],'remove',(_0x217df5,_0x58f434)=>{this['length']--,this['_handleRemoveCommentModel'](_0x58f434),this['refreshVisibleViews']();}),this['listenTo'](_0xc5454a,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xc5454a,'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',_0x23a9f2['if']('length','ck-hidden',_0x3c7db7=>!_0x3c7db7)],'aria-label':E(_0x3c4bb7,'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'](_0x18ceaa){-0x1===_0x18ceaa?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1c4a9a of this['commentViews'])_0x1c4a9a['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x38cca2,_0x417f7a){const _0x139e24=new this['_config']['CommentView'](this['locale'],_0x38cca2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x139e24['viewUid']=_0x38cca2['id'],_0x139e24['delegate']('removeComment')['to'](this),_0x139e24['delegate']('updateComment')['to'](this),_0x139e24['delegate']('resolveCommentThread')['to'](this),_0x139e24['delegate']('editorReady')['to'](this),_0x139e24['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x139e24,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x139e24,_0x417f7a);}['_calculatePosition'](_0xd65e26){const _0x1e5814=this['_model']['_findOptimalIndex'](_0xd65e26);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xd65e26['authoredAt']?_0x1e5814-0x1:_0x1e5814:_0x1e5814-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x29eab4={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x29eab4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x29eab4));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1a29e1){const _0x136868=this['commentViews']['remove'](_0x1a29e1['id']);this['stopListening'](_0x136868),_0x136868['isEditMode']&&this['_updateHasDirtyComment'](),_0x136868['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x255bf6=>_0x255bf6['isEditMode']);}['_rearrangeCollapse'](){const _0x2e4d95=function(_0x5f00a2){const _0x222876=new _0x1990b8();for(const _0xb73a15 of _0x5f00a2)_0x222876['add'](_0xb73a15);return _0x222876;}(this['commentViews']),_0x2b830a=this['_collapsedCommentsView']['count'];for(let _0x50921c=0x1;_0x50921c<=_0x2b830a;_0x50921c++)_0x2e4d95['remove'](0x1);for(const _0x5103f3 of _0x2e4d95)_0x5103f3['collapse']();_0x2b830a>0x0&&_0x2e4d95['add'](this['_collapsedCommentsView'],0x1),ns(_0x4f3751(Array['from'](this['visibleViews']),Array['from'](_0x2e4d95)),this['visibleViews'],_0x2e4d95);}['_rearrangeExpand'](){ns(_0x4f3751(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x19ba23 of this['visibleViews'])_0x19ba23['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x26d61f=>{this['focusTracker']['add'](_0x26d61f['element']),this['keystrokes']['listenTo'](_0x26d61f['element']);}),this['commentViews']['on']('change',(_0x10c8e6,_0x59a54e)=>{for(const _0x1e2be7 of _0x59a54e['removed'])this['focusTracker']['remove'](_0x1e2be7['element']),this['keystrokes']['stopListening'](_0x1e2be7['element']);for(const _0x181e6f of Array['from'](_0x59a54e['added'])['reverse']())this['focusTracker']['add'](_0x181e6f['element']),this['keystrokes']['listenTo'](_0x181e6f['element']);});}}function ns(_0x17284c,_0x1c7d55,_0xb993bc){let _0x43b466=0x0;for(const _0x4be2f4 of _0x17284c)switch(_0x4be2f4){case'insert':_0x1c7d55['add'](_0xb993bc['get'](_0x43b466),_0x43b466),_0x43b466++;break;case'delete':_0x1c7d55['remove'](_0x43b466);break;case'equal':_0x43b466++;}}class as extends kt{constructor(_0x2fa44a){super(_0x2fa44a);const _0x179975=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x179975['to']('contextValue',_0x6f9b7=>E(_0x2fa44a,'THREAD_CONTEXT_LABEL',_0x6f9b7)),'tabindex':-0x1},'children':[{'text':_0x179975['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3bf8f8,_0x5c1dd9){super(_0x3bf8f8);const _0x46c30b=this['bindTemplate'];this['_model']=_0x5c1dd9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4e787a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x420628({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5ad25e=>!!_0x5ad25e),this['bind']('contextValue')['to'](this['_model'],'context',_0x5c48dc=>_0x5c48dc&&_0x5c48dc['value']?this['_trimContextValue'](_0x5c48dc['value']):E(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',_0x46c30b['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 _0x12f56d=new _0xada5a(this['locale']);return _0x12f56d['label']=E(this['locale'],'Reopen'),_0x12f56d['tooltip']=E(this['locale'],'Reopen'),_0x12f56d['icon']=_0x5e686f,_0x12f56d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x383915=>!_0x383915),_0x12f56d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xf3dbed,_0x3ba1dc)=>_0xf3dbed&&_0x3ba1dc),_0x12f56d['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x12f56d;}['_trimContextValue'](_0x13d20b){if(_0x13d20b['length']<0x96)return _0x13d20b;const _0x4a0adb=_0x13d20b['lastIndexOf']('\x20',0x93);return _0x13d20b['substring'](0x0,_0x4a0adb>-0x1?_0x4a0adb:0x93)+'...';}['_attachContextActions'](){const _0x562e9e=this['element']['querySelector']('.ck-context'),_0x14cc4b=_0x562e9e['querySelector']('.ck-context__value');this['listenTo'](_0x562e9e,'mouseenter',()=>{_0x14cc4b['offsetWidth']<_0x14cc4b['scrollWidth']&&_0x562e9e['classList']['add']('overlay');}),this['listenTo'](_0x562e9e,'mouseleave',()=>{_0x562e9e['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x166275 of this['focusables'])this['focusTracker']['add'](_0x166275['element']),this['keystrokes']['listenTo'](_0x166275['element']);}['_createContextView'](){const _0x1cb169=new as(this['locale']);return _0x1cb169['bind']('contextValue')['to'](this),_0x1cb169;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3c7280,_0x1e28b8,_0x41f5b0,_0x20ddca){super(_0x3c7280),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1e28b8,this['_localUser']=_0x41f5b0,this['_config']=_0x20ddca,this['commentThreadHeaderView']=new Xt(_0x3c7280,_0x1e28b8),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3c7280,E(_0x3c7280,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3c7280,_0x1e28b8,Object['assign']({'CommentView':this['_config']['CommentView']},_0x20ddca)),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',(_0xb51f1f,_0x1af0a3)=>_0xb51f1f||!!_0x1af0a3),this['bind']('isUnlinked')['to'](_0x1e28b8,'unlinkedAt',_0x1d8f3d=>!!_0x1d8f3d),this['bind']('ariaLabel')['to'](this,'length',_0x1b1dc5=>{const _0x3b081d=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x1b1dc5,_0x3b081d]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4e787a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x420628({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4ee12a=>_0x4ee12a['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x5ef50e=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3a8756=_0x5ef50e['commentInputView'];return _0x5ef50e['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3a8756,'value',(_0x4b7f4d,_0x39ee10,_0x8742b3,_0x1c25af,_0x1d806f)=>!!_0x1d806f||!!_0x1c25af&&_0x8742b3&&!_0x39ee10||_0x4b7f4d&&_0x8742b3&&!_0x39ee10),_0x3a8756['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xbd7184,_0x4bc248,_0x4aaea7)=>{let _0x4965a2;return _0x4965a2=_0x4aaea7&&_0x4bc248?'Reply\x20to\x20reopen\x20discussion...':_0xbd7184?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x4965a2);}),_0x3a8756['bind']('submitLabel')['to'](this,'length',_0x2f6d81=>E(this['locale'],_0x2f6d81?'Reply':'Comment')),_0x3a8756['on']('submit',(_0x374177,_0x3975d6)=>{this['fire']('addComment',_0x3975d6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3a8756['on']('cancel',()=>{this['focus']();}),_0x3a8756['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3a8756['on']('cancel',_0x545803=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x545803['stop']());}),this['on']('change:isActive',(_0x37b7f9,_0x30de35,_0x57fd8e)=>{_0x57fd8e||this['length']||_0x3a8756['value']||this['fire']('removeCommentThread');}),_0x5ef50e;}}class Tt extends/* #__PURE__ -- @preserve */
27
- ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x45c072,_0x29577f,_0x4d0a1e,_0x38f8a7){super(_0x45c072,_0x29577f,_0x4d0a1e,_0x38f8a7),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x45c072,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x545d0d,_0x4f9bef,_0x88baed)=>{_0x88baed||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3d84ed,_0x463cb6,_0x36786e)=>{_0x36786e&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x81bbef=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x81bbef['if']('isActive','ck-thread--active'),_0x81bbef['if']('isUnlinked','ck-thread--unlinked'),_0x81bbef['if']('isConfirm','ck-thread--remove-confirmation'),_0x81bbef['to']('actionIndicator',_0x37b70d=>_0x37b70d?'ck-thread--'+_0x37b70d:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x81bbef['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 _0x1dfdc3 of this['commentsListView']['commentViews'])_0x1dfdc3['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x13fe2b}=this,_0x420167=this['commentsListView']['commentViews']['get'](0x0);_0x420167===this['_boundFirstCommentView']||_0x420167['isSystemComment']||(this['_boundFirstCommentView']=_0x420167,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x420167,'actionIndicator',_0x347789=>'remove'===_0x347789?'remove':null),_0x420167['placeholder']=E(_0x13fe2b,'Write\x20a\x20comment...'),_0x420167['removeButton']['on']('execute',_0x15a849=>{_0x15a849['stop'](),this['showConfirm'](E(_0x13fe2b,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x420167['focus']();}),_0x420167['actionBar']['add'](this['resolveButton'],0x0),_0x420167['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x17cbd1=new _0x3cc239(this['locale']);return _0x17cbd1['label']=E(this['locale'],'Resolve'),_0x17cbd1['tooltip']=E(this['locale'],'Resolve'),_0x17cbd1['icon']=_0x56f359,_0x17cbd1['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x17cbd1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x126d28=>!_0x126d28),_0x17cbd1['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3266b9,_0x442b33)=>_0x3266b9&&!_0x442b33),_0x17cbd1['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x17cbd1;}['_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(_0x3e8b81){super(_0x3e8b81),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x209390,_0x3f96a4,_0x1d5d46)=>{this['element']['innerHTML']=_0x1d5d46;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x49e5f9,_0x1ab9d5,_0x51721f){super(_0x49e5f9),this['_model']=_0x1ab9d5,this['_config']=_0x51721f,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1ab9d5,'content',_0x1ab9d5,'authoredAt',(_0xfde0e4,_0x1c048a)=>E(_0x49e5f9,'COMMENT_ARIA_LABEL',[_0x1ab9d5['author']['name'],_0x51721f['formatDateTime'](_0x1c048a),new DOMParser()['parseFromString'](_0xfde0e4,'text/html')['body']['textContent'],_0x1ab9d5['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x49e5f9,E(_0x49e5f9,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x273922(),this['focusTracker']=new _0x4e787a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x420628({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xe5589f=>_0xe5589f['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']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x1e092b=new es(this['locale']);return _0x1e092b['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x47169f,_0x4a3100)=>_0x4a3100?_0x83f52c(_0x47169f,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x47169f),_0x1e092b;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x3b4f47=new os(this['locale'],this['_config']['editorConfig']);return _0x3b4f47['value']=this['_model']['content'],_0x3b4f47['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3b4f47['submitLabel']=E(this['locale'],'Save'),_0x3b4f47['on']('submit',(_0x4062fd,_0x125fec)=>{this['fire']('updateComment',this['_model']['id'],_0x125fec),this['switchToDisplayMode'](),this['focus']();}),_0x3b4f47['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x3b4f47['once']('editorReady',()=>{_0x3b4f47['focus']();}),_0x3b4f47['createEditor'](),_0x3b4f47['delegate']('editorReady')['to'](this),_0x3b4f47['delegate']('editorDestroyed')['to'](this),_0x3b4f47;}['_setupKeyboardNavigation'](){const _0x5b58db=this['element'];this['keystrokes']['listenTo'](_0x5b58db);for(const _0x10b68c of this['focusables'])this['focusTracker']['add'](_0x10b68c['element']),this['keystrokes']['listenTo'](_0x10b68c['element']);this['focusables']['on']('change',(_0xd2846b,_0x4912a5)=>{for(const _0xf1606c of _0x4912a5['removed'])this['focusTracker']['remove'](_0xf1606c['element']),this['keystrokes']['stopListening'](_0xf1606c['element']);for(const _0x4a485f of _0x4912a5['added'])this['focusTracker']['add'](_0x4a485f['element']),this['keystrokes']['listenTo'](_0x4a485f['element']);}),this['keystrokes']['set']('enter',(_0x40bd36,_0x195dca)=>{_0x5b58db===_0x40bd36['target']&&(this['focusCycler']['focusFirst'](),_0x195dca());}),this['keystrokes']['set']('esc',(_0x4bbbe8,_0x30a6be)=>{_0x5b58db!==_0x4bbbe8['target']&&(this['focus'](),_0x30a6be());});}}class _t extends/* #__PURE__ -- @preserve */
28
- ti(hs){['actionBar'];['userView'];constructor(_0x38a034,_0x35ef8e,_0x179a35){super(_0x38a034,_0x35ef8e,_0x179a35),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x38a034,'Reply...')),this['bind']('authoredAt')['to'](_0x35ef8e),this['bind']('resolvedAt')['to'](_0x35ef8e),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 _0x3bb20a(_0x38a034,_0x35ef8e['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x35ef8e,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1d0ee8=this['bindTemplate'],_0x52ff90=[{'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':_0x1d0ee8['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1d0ee8['to']('authoredAt',_0x5cf6bf=>this['_config']['formatDateTime'](_0x5cf6bf))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1d0ee8['if']('isEditMode','ck-comment__actions--hidden'),_0x1d0ee8['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']&&_0x52ff90['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x1d0ee8['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x1d0ee8['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1d0ee8['if']('isEditMode','ck-comment--edit'),_0x1d0ee8['if']('isSystemComment','ck-comment--info'),_0x1d0ee8['to']('actionIndicator',_0x813ceb=>_0x813ceb?'ck-comment--'+_0x813ceb:'')],'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':_0x52ff90}]}]};}['_createEditButton'](){const _0x2990b1=new _0xada5a(this['locale']);return _0x2990b1['label']=E(this['locale'],'Edit'),_0x2990b1['icon']=_0x40b61b,_0x2990b1['withText']=!0x0,_0x2990b1['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2990b1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4171c2=>!_0x4171c2),_0x2990b1['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2990b1['on']('execute',()=>this['switchToEditMode']()),_0x2990b1;}['_createRemoveButton'](){const _0x5cd221=new _0xada5a(this['locale']);return _0x5cd221['label']=E(this['locale'],'Remove'),_0x5cd221['icon']=_0x118791,_0x5cd221['withText']=!0x0,_0x5cd221['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5cd221['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x17c7fb=>!_0x17c7fb),_0x5cd221['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5cd221['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5cd221;}['_createDropdown'](){const _0x449d14=_0x34d753(this['locale'],_0x23d3c5),_0x14c4ee=_0x449d14['panelView']['children'],_0x406923=new _0x23584e(this['locale']),_0x24c386=_0x449d14['bindTemplate'];_0x5d0672(_0x449d14,()=>this['items']['find'](_0x5ab708=>_0x5ab708['isVisible'])),_0x449d14['extendTemplate']({'attributes':{'class':[_0x24c386['if']('isVisible','ck-hidden',_0x96f680=>!_0x96f680)]}});const _0x2230b3=(_0x1e5fab,_0x34034e=-0x1)=>{const _0x4b07d5=new _0x56f279(this['locale']);_0x4b07d5['children']['add'](_0x1e5fab);const _0x35f371=_0x34034e>-0x1?_0x34034e:_0x406923['items']['length'];_0x406923['items']['add'](_0x4b07d5,_0x35f371);const _0x368175=Array['from'](this['items']);_0x449d14['unbind']('isEnabled','isVisible'),_0x449d14['bind']('isEnabled')['toMany'](_0x368175,'isEnabled',(..._0x38a5e1)=>_0x38a5e1['some'](_0x27880c=>_0x27880c)),_0x449d14['bind']('isVisible')['toMany'](_0x368175,'isVisible',(..._0x591380)=>_0x591380['some'](_0x37bfd4=>_0x37bfd4));};_0x449d14['panelPosition']='sw',_0x449d14['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x2b2f4d});for(const _0x1100dd of this['items'])_0x2230b3(_0x1100dd);return _0x14c4ee['add'](_0x406923),_0x449d14['listenTo'](this['items'],'add',(_0x508306,_0x3feb61,_0x2d7b69)=>{_0x2230b3(_0x3feb61,_0x2d7b69);}),_0x449d14['listenTo'](this['items'],'remove',(_0x4019d7,_0x34a2c7,_0x500b2a)=>{_0x406923['items']['remove'](_0x500b2a);}),_0x449d14;}['_attachActions'](_0x28ee02,_0x34f40e){const _0x2900fc=_0x28ee02&&_0x28ee02['element'];_0x2900fc&&(this['listenTo'](_0x2900fc,'mouseenter',()=>this['actionIndicator']=_0x34f40e),this['listenTo'](_0x2900fc,'focus',()=>this['actionIndicator']=_0x34f40e),this['listenTo'](_0x2900fc,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2900fc,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3af2c9=super['_createCommentInputView']();return _0x3af2c9['bind']('placeholder')['to'](this),_0x3af2c9;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function J(_0x1ceb83){const _0x254ab5=_0x544506(_0x1ceb83,0x1e),_0x11617a=new MutationObserver(_0x333931=>{for(const _0x14e7c4 of _0x333931)('attributes'==_0x14e7c4['type']&&'class'==_0x14e7c4['attributeName']||'childList'==_0x14e7c4['type']||'characterData'==_0x14e7c4['type'])&&_0x254ab5();});return{'attach'(_0x145cfc){_0x11617a['observe'](_0x145cfc,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x11617a['disconnect'](),_0x254ab5['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x56cba3,_0x13f672){super(_0x56cba3),this['id']=_0x5db4a7(),this['focusTracker']=new _0x4e787a(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0xc84e3d,_0x390a38)=>this['fire']('Esc',_0x390a38)),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']=J(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x13f672),this['mainView']=_0x13f672;const _0x489413=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x489413['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 _0x50d42a=this['element']['clientHeight'];_0x50d42a&&(this['height']=_0x50d42a);}}class d extends/* #__PURE__ -- @preserve */
29
- _0x5dc210(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1c646f,target:_0x30e9e5,type:_0x295b67,isVisible:_0x1c544b=!0x0}){super(),this['view']=_0x1c646f,this['view']['element']||this['view']['render'](),this['_type']=_0x295b67,this['_target']=_0x30e9e5,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1990b8([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x11dbb1,_0x297356)=>{this['view']['focusTracker']['add'](_0x297356);}),this['focusableElements']['on']('remove',(_0x5e4b66,_0x216be0)=>{this['view']['focusTracker']['remove'](_0x216be0);}),this['set']('isVisible',_0x1c544b);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x199164=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x199164),_0x199164;}get['targetRect'](){const _0x1fc660=this['target'];if(null===_0x1fc660)return null;if(_0x1fc660 instanceof _0x38453a)return _0x1fc660;const _0x38a3d3=_0x1fc660['filter'](_0xae9722=>function(_0x157f7b){const _0x11676c=_0x157f7b['offsetParent'];if(_0x11676c)return!0x0;const _0x5d6a1b=_0x157f7b['getClientRects']()['item'](0x0);return!!_0x5d6a1b;}(_0xae9722));return 0x0===_0x38a3d3['length']?null:new _0x38453a(_0x38a3d3[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x55352e){this['view']['isActive']=_0x55352e,this['view']['mainView']['isActive']=_0x55352e;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x52a438){if(!(null===_0x52a438||_0x52a438 instanceof _0x38453a||Array['isArray'](_0x52a438)&&_0x52a438['every'](_0x2a37e0=>li(_0x2a37e0))))throw new _0x4877d5('annotation-invalid-target',null,{'target':_0x52a438});}['_getNormalizedTarget'](){const _0x43b43f='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x43b43f)?[_0x43b43f]:_0x43b43f;}}function li(_0x20bfab){return null!==_0x20bfab&&'object'==typeof _0x20bfab&&'nodeType'in _0x20bfab&&0x1===_0x20bfab['nodeType'];}class _ extends _0x1990b8{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3a07aa=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4e787a(),this['_focusTracker']['on']('change:isFocused',(_0x373710,_0x2d15bc,_0x8bc39)=>{_0x8bc39||this['fire']('blur');});for(const _0x4c9db6 of _0x3a07aa)this['add'](_0x4c9db6);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x47808b){if(this['has'](_0x47808b))throw new _0x4877d5('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x47808b['innerView'],_0x47808b),this['_viewToAnnotation']['set'](_0x47808b['view'],_0x47808b);for(const _0x88b6dc of _0x47808b['focusableElements'])this['_focusTracker']['add'](_0x88b6dc);this['listenTo'](_0x47808b['focusableElements'],'add',(_0x3f7060,_0x3e8bd4)=>{this['_focusTracker']['add'](_0x3e8bd4);}),this['listenTo'](_0x47808b['focusableElements'],'remove',(_0x3d8dc5,_0x14104a)=>{this['_focusTracker']['remove'](_0x14104a);}),this['listenTo'](_0x47808b['view']['focusTracker'],'change:isFocused',(_0x3835ba,_0x19d646,_0x4fea3a)=>{_0x4fea3a&&this['fire']('focus',_0x47808b);}),_0x47808b['updateTargetRect']();const _0x3b5d4c=this['_getOrderInContent'](_0x47808b['view']['targetRect']);return super['add'](_0x47808b,_0x3b5d4c);}['remove'](_0x4459cd){if(!this['has'](_0x4459cd))throw new _0x4877d5('annotationcollection-not-existing-item',null);this['stopListening'](_0x4459cd['view']['focusTracker']),this['stopListening'](_0x4459cd['focusableElements']);for(const _0x254ab6 of _0x4459cd['focusableElements'])this['_focusTracker']['remove'](_0x254ab6);return this['_viewToAnnotation']['delete'](_0x4459cd['view']),this['_innerViewToAnnotation']['delete'](_0x4459cd['innerView']),super['remove'](_0x4459cd);}['getByInnerView'](_0x9d12cd){return this['_innerViewToAnnotation']['get'](_0x9d12cd);}['getByView'](_0xb1437a){return this['_viewToAnnotation']['get'](_0xb1437a);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x62268c of this)_0x62268c['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2823f4=Array['from'](this)['sort']((_0x7c285c,_0x49efaa)=>v(_0x7c285c['view']['targetRect'],_0x49efaa['view']['targetRect']));for(let _0x1a4e96=_0x2823f4['length']-0x1;_0x1a4e96>0x0;_0x1a4e96--){const _0x592b6e=_0x2823f4[_0x1a4e96];_0x1a4e96!==this['getIndex'](_0x592b6e)&&(this['remove'](_0x592b6e),this['add'](_0x592b6e));}}['_getOrderInContent'](_0x2f7e4e){let _0x4f3125=0x0;if(!_0x2f7e4e)return this['length'];for(const _0xbfa80d of this){const _0x28f9e5=_0xbfa80d['view']['targetRect'];if(_0x28f9e5){if(v(_0x2f7e4e,_0x28f9e5)<0x0)return _0x4f3125;_0x4f3125++;}}return _0x4f3125;}}function v(_0xe46d2e,_0x8625e2){if(null===_0xe46d2e&&null===_0x8625e2)return 0x0;if(null===_0xe46d2e)return-0x1;if(null===_0x8625e2)return 0x1;const _0x4b537c=_0xe46d2e['top']-_0x8625e2['top'];return 0x0==_0x4b537c?_0xe46d2e['left']-_0x8625e2['left']:_0x4b537c;}class O extends _0xb0fdc5{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f7131){if(super(_0x4f7131),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4f7131 instanceof _0x4c4f23){const _0x4d6dd4=_0x4f7131['locale'];_0x4f7131['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x263e37){this['collection']['add'](_0x263e37);}['remove'](_0x105c98){this['collection']['remove'](_0x105c98),_0x105c98['destroy']();}['refreshVisibility'](){for(const _0x27b439 of this['collection'])_0x27b439['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2ca595){return this['collection']['getByInnerView'](_0x2ca595);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2bca42 of this['collection'])_0x2bca42['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x21f586){this['fire']('_activateAnnotation',_0x21f586);}['createAnnotation'](_0x1abde2){return new d(_0x1abde2);}['createAnnotationView'](_0x51d9e2,_0x194f1c){return new S(_0x51d9e2,_0x194f1c);}['_addActiveAnnotation'](_0x4f724c){const _0x6113e4=new Set(this['activeAnnotations']);_0x6113e4['add'](_0x4f724c),this['activeAnnotations']=_0x6113e4;}['_removeActiveAnnotation'](_0xfd9a5b){const _0x35aaea=new Set(this['activeAnnotations']);_0x35aaea['delete'](_0xfd9a5b),this['activeAnnotations']=_0x35aaea;}['_bindAnnotationsToVisibleAnnotations'](){const _0x38d49b=this['collection'],_0x4c554d=this['_visibleAnnotations'];function _0x4efba6(_0x1231e6){const _0x1cfd04=_0x1231e6['source'];_0x1cfd04['isVisible']&&!_0x4c554d['has'](_0x1cfd04)?_0x4c554d['add'](_0x1cfd04):!_0x1cfd04['isVisible']&&_0x4c554d['has'](_0x1cfd04)&&_0x4c554d['remove'](_0x1cfd04),_0x1cfd04['view']['focusTracker']['remove'](_0x1cfd04['view']['element']),_0x1cfd04['view']['focusTracker']['add'](_0x1cfd04['view']['element']);}this['listenTo'](_0x38d49b,'add',(_0x134709,_0x2416fb)=>{_0x2416fb['isVisible']&&_0x4c554d['add'](_0x2416fb),this['listenTo'](_0x2416fb,'change:isVisible',_0x4efba6);}),this['listenTo'](_0x38d49b,'remove',(_0xf2cb0d,_0x5dc25a)=>{_0x4c554d['has'](_0x5dc25a)&&_0x4c554d['remove'](_0x5dc25a),this['stopListening'](_0x5dc25a,'change:isVisible',_0x4efba6);});}['_setupEnterAnnotationKeystroke'](){const _0x18a979=_0x14de48=>{_0x14de48['on']('ready',()=>{_0x14de48['keystrokes']['set'](_0x332c79,(_0xe1ba2f,_0x203429)=>{const _0x263d01=_0x2f235a(this['activeAnnotations']['values']());_0x263d01&&(_0x263d01['view']['focus'](),_0x203429());});});};this['context']instanceof _0x4c4f23?_0x18a979(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2f50b0,_0x148a27)=>{_0x18a979(_0x148a27);});}['_setupEscapeAnnotationHandling'](){const _0x502e66=_0x43fddc=>{const _0x438756=_0x43fddc['source'],_0x25f0ed=[];let _0x5052e3;if(Array['isArray'](_0x438756['target'])){_0x5052e3=_0x438756['target'][0x0],this['context']instanceof _0x4c4f23?_0x25f0ed['push'](this['context']):this['context']['editors']&&_0x25f0ed['push'](...this['context']['editors']);for(const _0x479438 of _0x25f0ed)for(const _0x15e9cf of _0x479438['editing']['view']['domRoots']['values']())if(_0x15e9cf['contains'](_0x5052e3))return void _0x479438['editing']['view']['focus']();_0x5052e3['focus']();}};this['listenTo'](this['collection'],'add',(_0x45bd75,_0x5ddf5e)=>{this['listenTo'](_0x5ddf5e,'escape',_0x502e66,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2c8e24,_0x4d41aa)=>{this['stopListening'](_0x4d41aa,'escape',_0x502e66);});}}const bt=Symbol('noChannel'),Nt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xb0fdc5{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,pt,ct];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x377201){super(_0x377201),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xc43585=this['context']['config'];_0xc43585['define']('comments.maxCommentsWhenCollapsed',0x2),_0xc43585['define']('comments.maxThreadTotalWeight',0x1f4),_0xc43585['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xc43585['define']('comments.CommentThreadView',Tt),_0xc43585['define']('comments.CommentView',_t),_0xc43585['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x10a4ea=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x328222,_0x4b1e4e)=>this['_addCommentThread'](_0x4b1e4e)),this['on']('submitCommentThread',(_0x349cbd,_0x105581)=>this['_submitCommentThread'](_0x105581)),this['on']('resolveCommentThread',(_0x364f61,_0x4fb40e)=>this['_resolveCommentThread'](_0x4fb40e)),this['on']('resolveCommentThread',(_0x4fd4dd,_0x4f0c29)=>this['_updateActiveAnnotation'](_0x4f0c29),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2dcb33,_0xc2ed4)=>this['_reopenCommentThread'](_0xc2ed4)),this['on']('reopenCommentThread',(_0x47af53,_0x2b7344)=>this['_updateActiveAnnotation'](_0x2b7344),{'priority':'lowest'}),this['on']('removeCommentThread',(_0xbae81e,_0x4589b2)=>this['_removeCommentThread'](_0x4589b2)),this['on']('updateCommentThread',(_0x3d475a,_0x285eb3)=>this['_updateCommentThread'](_0x285eb3)),this['on']('updateCommentThread',(_0x59c246,_0x132745)=>this['_updateActiveAnnotation'](_0x132745),{'priority':'lowest'}),this['on']('addComment',(_0x17dc38,_0x4c4dee)=>this['_addComment'](_0x4c4dee)),this['on']('updateComment',(_0x4fe9bf,_0x2ccec7)=>this['_updateComment'](_0x2ccec7)),this['on']('removeComment',(_0x280def,_0x1a99a9)=>this['_removeComment'](_0x1a99a9)),this['on']('addComment',(_0x11baa4,{threadId:_0xad6757,isFromAdapter:_0x5a4051})=>{if(_0x5a4051)return;const _0x31d0e3=this['getCommentThread'](_0xad6757),_0x5b456b=_0x31d0e3&&this['_threadToController']['get'](_0x31d0e3);_0x5b456b&&_0x5b456b['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x10a4ea,'change:activeAnnotations',(_0x1d3f6f,_0xee6dc1,_0x1cce47)=>{const _0x564fa4=Array['from'](_0x1cce47)['map'](_0x5a1e32=>this['_viewToController']['get'](_0x5a1e32['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x564fa4?_0x564fa4['model']:null;});}set['adapter'](_0x7aed71){if(this['_adapter'])throw new _0x4877d5('commentsrepository-adapter-already-set');this['_adapter']=_0x7aed71;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x1695e1=bt,threadId:_0x1daf3a=_0x5db4a7(),comments:_0x3614e4=[],unlinkedAt:_0x3e0683=null,resolvedAt:_0x7fe59e=null,resolvedBy:_0x5f43a3=null,target:_0x37d166=null,context:_0xad2c75=null,attributes:_0x127b23={},isResolvable:_0x479751=!0x0,isSubmitted:_0x130fd4=!0x1,isFromAdapter:_0x42281f=!0x1}={}){return this['fire'](xt('addCommentThread',_0x1695e1),{'channelId':_0x1695e1,'threadId':_0x1daf3a,'comments':_0x3614e4,'unlinkedAt':_0x3e0683,'resolvedAt':_0x7fe59e,'resolvedBy':_0x5f43a3,'target':_0x37d166,'context':_0xad2c75,'attributes':_0x127b23,'isFromAdapter':_0x42281f,'isResolvable':_0x479751,'isSubmitted':_0x130fd4}),this['getCommentThread'](_0x1daf3a);}['openNewCommentThread']({channelId:_0xc6fa4f=bt,threadId:_0x3bd602=_0x5db4a7(),target:_0x277881,context:_0x30daef=null,isResolvable:_0x1bf027=!0x0}){if(this['_readOnlyChannels']['has'](_0xc6fa4f)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x277881)throw new _0x4877d5('commentsrepository-missing-target');const _0x396486=this['addCommentThread']({'channelId':_0xc6fa4f,'threadId':_0x3bd602,'target':_0x277881,'context':_0x30daef,'isResolvable':_0x1bf027});if(!_0x396486)return null;const _0x27be99=this['_threadToController']['get'](_0x396486),_0x20872f=_0x27be99['view']['commentThreadInputView']['commentInputView'],_0x3cb178=this['context']['plugins']['get'](O),_0x42c78f=_0x3cb178['getByInnerView'](_0x27be99['view']);return _0x3cb178['activate'](_0x42c78f),_0x20872f['once']('editorReady',()=>_0x20872f['focus']()),_0x396486;}['hasCommentThread'](_0x2e0b0d){if('string'!=typeof _0x2e0b0d)throw new _0x4877d5('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2e0b0d);}['updateCommentThread']({channelId:_0x4308=bt,threadId:_0x586134,context:_0x88b93a,unlinkedAt:_0x41bc32,attributes:_0x27c92f,isFromAdapter:_0x124ad3=!0x1}){return this['fire'](xt('updateCommentThread',_0x4308),{'channelId':_0x4308,'threadId':_0x586134,'context':_0x88b93a,'unlinkedAt':_0x41bc32,'attributes':_0x27c92f,'isFromAdapter':_0x124ad3}),this['getCommentThread'](_0x586134);}['getCommentThread'](_0xa619c8){if('string'!=typeof _0xa619c8)throw new _0x4877d5('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0xa619c8);}['fetchCommentThread']({channelId:_0x5b2ccf,threadId:_0x49bfdc}={}){const _0x26ca56=this['getCommentThread'](_0x49bfdc);if(_0x26ca56)return Promise['resolve'](_0x26ca56);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4877d5('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5b2ccf,'threadId':_0x49bfdc})['then'](_0xc613c2=>this['hasCommentThread'](_0x49bfdc)?this['getCommentThread'](_0x49bfdc):_0xc613c2?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5b2ccf},_0xc613c2)):void 0x0)['catch'](_0x579336=>{throw console['error'](_0x579336),new _0x4877d5('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x40ff86,skipNotAttached:_0x1459e3=!0x1,skipEmpty:_0x333bc3=!0x1,toJSON:_0x51a5a2=!0x1}={}){const _0x27c271=[];for(const _0xf26c95 of this['_threads']['values']())_0x40ff86&&_0xf26c95['channelId']!==_0x40ff86||_0x1459e3&&!_0xf26c95['isAttached']||_0x333bc3&&0x0===_0xf26c95['length']||_0x27c271['push'](_0xf26c95);return _0x51a5a2?_0x27c271['map'](_0x54be50=>_0x54be50['toJSON']()):_0x27c271;}['setActiveCommentThread'](_0x21dd54){const _0xe66483=this['context']['plugins']['get'](O);if(!_0x21dd54)return void(this['activeCommentThread']&&_0xe66483['deactivateAll']());const _0x2f4e41=this['getCommentThread'](_0x21dd54);if(!_0x2f4e41)throw new _0x4877d5('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x21dd54});if(!this['_threadToController']['has'](_0x2f4e41))throw new _0x4877d5('commentsrepository-active-not-attached',null,{'threadId':_0x21dd54});const _0x47dbe9=_0xe66483['getByInnerView'](this['_threadToController']['get'](_0x2f4e41)['view']);_0xe66483['activate'](_0x47dbe9);}['switchReadOnly'](_0x434304,_0x4b6fcc){_0x434304?this['_readOnlyChannels']['add'](_0x4b6fcc):this['_readOnlyChannels']['delete'](_0x4b6fcc),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5eeb63){return this['_readOnlyChannels']['has'](_0x5eeb63)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x302ea3,_0x2a5027){return new gt(_0x302ea3,_0x2a5027);}['setPermissions'](_0x22cf8b,_0x1f19d4=bt){this['_permissions']['set'](_0x1f19d4,_0x22cf8b),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x162bc6=bt){return this['_permissions']['has'](_0x162bc6)?this['_permissions']['get'](_0x162bc6):Nt;}['_addCommentThread']({channelId:_0x1a6a96,threadId:_0x5221d0,comments:_0x4fbfe4,unlinkedAt:_0x2f9515,resolvedAt:_0x328d3c,resolvedBy:_0x13f53c,target:_0x11daba,context:_0x474393,attributes:_0x136846,isFromAdapter:_0xaa42cb,isResolvable:_0x3db6b8,isSubmitted:_0x54026b}){if('string'!=typeof _0x5221d0)throw new _0x4877d5('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5221d0});if(this['hasCommentThread'](_0x5221d0))throw new _0x4877d5('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5221d0});const _0x345b03=new ui(this,{'channelId':_0x1a6a96,'id':_0x5221d0,'context':_0x474393,'attributes':_0x136846,'unlinkedAt':_0x2f9515,'resolvedAt':_0x328d3c,'resolvedBy':_0x13f53c?this['context']['plugins']['get'](ct)['getUser'](_0x13f53c):null,'isResolvable':_0x3db6b8,'isSubmitted':_0x54026b||_0xaa42cb});this['_threads']['set'](_0x5221d0,_0x345b03);for(const _0x199025 of _0x4fbfe4)_0x345b03['_add'](this['_createNewComment']({'threadId':_0x5221d0,..._0x199025}));return _0x11daba&&_0x345b03['attachTo'](_0x11daba),_0xaa42cb||!_0x345b03['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1a6a96,'threadId':_0x5221d0});}['_submitCommentThread']({channelId:_0x54058e,threadId:_0x29e0a6}){if(!this['hasCommentThread'](_0x29e0a6))throw new _0x4877d5('commentsrepository-missing-comment-thread',this);const _0x1388e1=this['getCommentThread'](_0x29e0a6);if(_0x1388e1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x577726,comments:_0x95ca3f,resolvedAt:_0x58443f,resolvedBy:_0x3b5f01,context:_0x4df68b,attributes:_0x24c799}=_0x1388e1,_0x41e872=this['context']['plugins']['get']('PendingActions'),_0x24e2e7=_0x41e872['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x54058e,'threadId':_0x577726,'comments':_0x95ca3f['map'](_0x479524=>_0x479524['toJSON']()),'resolvedAt':_0x58443f,'resolvedBy':_0x3b5f01?_0x3b5f01['id']:_0x3b5f01,'context':_0x4df68b,'attributes':_0x24c799})['then'](({comments:_0x142a9c})=>{_0x41e872['remove'](_0x24e2e7);for(const _0x3c16d5 of _0x142a9c)this['_updateComment']({'channelId':_0x54058e,'threadId':_0x29e0a6,'commentId':_0x3c16d5['commentId'],'createdAt':_0x3c16d5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x56a63b=>{throw console['error'](_0x56a63b),new _0x4877d5('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x380f5a,target:_0x2fa9ca}){const _0x2a9a06=this['getCommentThread'](_0x380f5a);if(!_0x2a9a06)throw new _0x4877d5('commentsrepository-attach-missing-comment-thread',this);const _0x307a04=this['context']['plugins']['get']('PendingActions'),_0x340f8d=this['context']['plugins']['get'](O),_0x9340ea=this['_createCommentThreadView'](_0x2a9a06),_0x46a8ef=new gt(_0x2a9a06,_0x9340ea);let _0x4c8747=null;_0x9340ea['on']('change:isDirty',(_0xb3f144,_0xff370a,_0x5ed1ce)=>{_0x5ed1ce?_0x4c8747=_0x307a04['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4c8747&&(_0x307a04['remove'](_0x4c8747),_0x4c8747=null);}),this['_threadToController']['set'](_0x2a9a06,_0x46a8ef),this['_viewToController']['set'](_0x9340ea,_0x46a8ef);const _0x426b18=new S(this['context']['locale'],_0x9340ea);_0x426b18['bind']('length')['to'](_0x9340ea),_0x426b18['bind']('isDirty')['to'](_0x9340ea,'isDirty',_0x9340ea,'length',(_0x3111e6,_0x1787df)=>_0x3111e6||!_0x1787df),_0x426b18['bind']('isActive')['to'](_0x9340ea),_0x426b18['type']='comment';const _0x2c6f9b=new d({'view':_0x426b18,'target':_0x2fa9ca,'type':'comment','isVisible':!_0x2a9a06['archivedAt']});return _0x9340ea['on']('escape',()=>{_0x2c6f9b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x9340ea,_0x2c6f9b),_0x340f8d['add'](_0x2c6f9b),_0x2c6f9b;}['_bindAnnotationToEditors'](_0x56a21f,_0x23bb27){this['listenTo'](_0x56a21f,'editorReady',(_0x2b0223,_0x3b7568)=>{const _0x162381=_0x3b7568['ui']['view']['body']['bodyCollectionContainer'];_0x23bb27['focusableElements']['add'](_0x162381),this['context']instanceof _0x4c4f23&&this['context']['ui']['focusTracker']['add'](_0x162381);},{'priority':'highest'}),this['listenTo'](_0x56a21f,'editorDestroyed',(_0x32a90e,_0x1e2929)=>{const _0x51ae17=_0x1e2929['ui']['view']['body']['bodyCollectionContainer'];_0x23bb27['focusableElements']['has'](_0x51ae17)&&_0x23bb27['focusableElements']['remove'](_0x51ae17),this['context']instanceof _0x4c4f23&&this['context']['ui']['focusTracker']['remove'](_0x51ae17);});}['_unbindEditors'](_0x3b8196){this['stopListening'](_0x3b8196,'editorReady'),this['stopListening'](_0x3b8196,'editorDestroyed');}['_createCommentThreadView'](_0x594f64){const _0x528392=this['context']['plugins']['get'](ct),{config:_0x5c9b88,locale:_0x552911}=this['context'],_0x53bd42=It(_0x5c9b88['get']('locale'),_0x552911);return new(0x0,(_0x5c9b88['get']('comments'))['CommentThreadView'])(_0x552911,_0x594f64,_0x528392['me'],{'editorConfig':{..._0x5c9b88['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x5c9b88['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x5c9b88['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x5c9b88['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x5c9b88['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x53bd42,'CommentView':_0x5c9b88['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x59ce5c,channelId:_0x564208,resolvedAt:_0x41fe9b,resolvedBy:_0xbb9873,isFromAdapter:_0x19b12a}){if(!this['hasCommentThread'](_0x59ce5c))throw new _0x4877d5('commentsrepository-missing-comment-thread',null,{'threadId':_0x59ce5c});const _0x1b70e5=this['getCommentThread'](_0x59ce5c);if(_0x1b70e5['isResolved'])throw new _0x4877d5('commentsrepository-resolved-comment-thread',null,{'threadId':_0x59ce5c});const _0x54e858=this['context']['plugins']['get'](ct);if(_0x1b70e5['resolvedBy']=_0x54e858['getUser'](_0xbb9873),_0x1b70e5['resolvedAt']=_0x41fe9b,_0x19b12a||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0xf05e49=this['context']['plugins']['get']('PendingActions'),_0x4c7fe7=_0xf05e49['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x564208,'threadId':_0x59ce5c})['then'](({resolvedAt:_0x2cc63f,resolvedBy:_0x2041ee})=>{_0xf05e49['remove'](_0x4c7fe7),_0x1b70e5['resolvedBy']['id']!==_0x2041ee&&(_0x1b70e5['resolvedBy']=_0x54e858['getUser'](_0x2041ee)),_0x1b70e5['resolvedAt']=_0x2cc63f;})['catch'](_0x5998ce=>{throw console['error'](_0x5998ce),new _0x4877d5('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1c62ce,channelId:_0x4658b4,isFromAdapter:_0x1b8db0}){if(!this['hasCommentThread'](_0x1c62ce))throw new _0x4877d5('commentsrepository-missing-comment-thread',null,{'threadId':_0x1c62ce});const _0x4c0463=this['getCommentThread'](_0x1c62ce);if(!_0x4c0463['isResolved'])throw new _0x4877d5('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1c62ce});if(_0x4c0463['resolvedBy']=null,_0x4c0463['resolvedAt']=null,_0x1b8db0||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x48c59b=this['context']['plugins']['get']('PendingActions'),_0x1fc760=_0x48c59b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4658b4,'threadId':_0x1c62ce})['then'](()=>_0x48c59b['remove'](_0x1fc760))['catch'](_0x15a72a=>{throw console['error'](_0x15a72a),new _0x4877d5('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x47eb47,isFromAdapter:_0x93e7e}){const _0x2147fa=this['getCommentThread'](_0x47eb47);if(!_0x2147fa)throw new _0x4877d5('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x47eb47),this['_threads']['delete'](_0x47eb47),!_0x2147fa['isSubmitted']||_0x93e7e||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2b6ac4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x133d18}=_0x2147fa,_0x26b9a8=_0x2b6ac4['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x133d18,'threadId':_0x47eb47})['then'](()=>_0x2b6ac4['remove'](_0x26b9a8))['catch'](_0x3a8d21=>{throw console['error'](_0x3a8d21),new _0x4877d5('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4f99b6,unlinkedAt:_0x34b550,context:_0xeae3ae,attributes:_0x4b21e8,isFromAdapter:_0x55a1f0}){if('string'!=typeof _0x4f99b6)throw new _0x4877d5('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4f99b6});if(!this['hasCommentThread'](_0x4f99b6))throw new _0x4877d5('commentsrepository-missing-comment-thread',null,{'threadId':_0x4f99b6});const _0xa05151=this['getCommentThread'](_0x4f99b6);let _0x5df355=!0x1;if(void 0x0!==_0xeae3ae&&_0xa05151['context']!==_0xeae3ae&&(_0xa05151['context']=_0xeae3ae,_0x5df355=!0x0),void 0x0!==_0x34b550&&_0xa05151['unlinkedAt']!==_0x34b550&&(_0xa05151['unlinkedAt']=_0x34b550,_0x5df355=!0x0),_0x4b21e8&&!yt(_0x4b21e8,_0xa05151['attributes'])&&(_0xa05151['attributes']=_0x4b21e8,_0x5df355=!0x0),!_0x5df355)return Promise['resolve']();if(!_0xa05151['isSubmitted']||_0x55a1f0||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x289bf6=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd75880}=_0xa05151,_0x921f96=_0x289bf6['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xd75880,'threadId':_0x4f99b6,'context':_0xeae3ae,'unlinkedAt':_0x34b550,'attributes':_0x4b21e8})['then'](()=>_0x289bf6['remove'](_0x921f96))['catch'](_0x17ffb0=>{throw console['error'](_0x17ffb0),new _0x4877d5('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xd0934b){const _0x2dc02c=this['context']['plugins']['get'](O),_0x3ff48f=this['getCommentThread'](_0xd0934b);if(_0x3ff48f['_isAttached']=!0x1,this['_threadToController']['has'](_0x3ff48f)){const _0x4721c5=this['_threadToController']['get'](_0x3ff48f),_0x1f2264=_0x4721c5['view'],_0x374cf5=_0x2dc02c['getByInnerView'](_0x1f2264);this['_threadToController']['delete'](_0x3ff48f),this['_viewToController']['delete'](_0x1f2264),_0x374cf5&&_0x2dc02c['remove'](_0x374cf5),_0x4721c5['destroy'](),_0x1f2264['destroy']()['then'](()=>{this['_unbindEditors'](_0x1f2264);});}}['_updateActiveAnnotation']({threadId:_0x51af63,resolvedAt:_0x5b1902,unlinkedAt:_0x385fbf}){const _0x51be9e=!!_0x5b1902,_0xdd57d0=this['context']['plugins']['get'](O),_0x2b27c1=this['getCommentThread'](_0x51af63);if(this['_threadToController']['has'](_0x2b27c1)){const _0x5f4b6b=this['_threadToController']['get'](_0x2b27c1)['view'],_0x15e669=_0xdd57d0['getByInnerView'](_0x5f4b6b);_0x15e669&&(_0x51be9e&&_0xdd57d0['_removeActiveAnnotation'](_0x15e669),_0x385fbf?_0x15e669['isVisible']=!0x1:_0x15e669['refreshVisibility']());}}['_getExternalAuthor'](_0x45ef94){const _0x1f9ac7=this['context']['plugins']['get'](ct),_0x2b7c09=wt('external:'+_0x45ef94),_0x986425=_0x1f9ac7['getUser'](_0x2b7c09);return _0x986425||_0x1f9ac7['addUser']({'id':_0x2b7c09,'name':_0x45ef94});}['_createNewComment']({threadId:_0x502576,commentId:_0x11c1c0=_0x5db4a7(),content:_0xc63acf,authorId:_0x45c4f0,createdAt:_0x143dc4,attributes:_0x20c1c5}){if('string'!=typeof _0x11c1c0)throw new _0x4877d5('commentsrepository-invalid-commentid');if('string'!=typeof _0x45c4f0)throw new _0x4877d5('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xc63acf||!_0xc63acf['trim']())throw new _0x4877d5('commentsrepository-invalid-comment-content');const _0x482fa5=this['context']['plugins']['get'](ct)['getUser'](_0x45c4f0);if(!_0x482fa5)throw new _0x4877d5('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x45c4f0});let _0x42b6d0=null,_0x48d836=_0x143dc4;return _0x20c1c5?.['@external']&&(_0x42b6d0=this['_getExternalAuthor'](_0x20c1c5['@external']['authorName']),_0x48d836=new Date(_0x20c1c5['@external']['createdAt'])),new fi(this,{'threadId':_0x502576,'id':_0x11c1c0,'author':_0x42b6d0||_0x482fa5,'creator':_0x482fa5,'content':_0xc63acf,'createdAt':_0x143dc4,'authoredAt':_0x48d836,'attributes':_0x20c1c5});}['_addComment'](_0xb6af4f){let {threadId:_0x3c8c5b,content:_0x3f5f5e,attributes:_0x135dfc,isFromAdapter:_0x40e56e}=_0xb6af4f;const _0x3659ba=this['getCommentThread'](_0xb6af4f['threadId']);if(!_0x3659ba)throw new _0x4877d5('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5c2850=this['_createNewComment'](_0xb6af4f),{id:_0x5e9caa}=_0x5c2850;if(_0x3659ba['_add'](_0x5c2850),_0x40e56e||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3659ba['isSubmitted'])return Promise['resolve']();const _0x7227=this['context']['plugins']['get']('PendingActions'),{channelId:_0x194a25}=_0x3659ba,_0xe25af8=_0x7227['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x135dfc||(_0x135dfc={}),this['adapter']['addComment']({'channelId':_0x194a25,'threadId':_0x3c8c5b,'commentId':_0x5e9caa,'content':_0x3f5f5e,'attributes':_0x135dfc})['then'](_0x169cb5=>{_0x7227['remove'](_0xe25af8),_0x169cb5&&this['_updateComment']({'channelId':_0x194a25,'threadId':_0x3c8c5b,'commentId':_0x5e9caa,'createdAt':_0x169cb5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xb2123c=>{throw console['error'](_0xb2123c),new _0x4877d5('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x47799f,commentId:_0x42838b,content:_0x44c6ba,createdAt:_0x360a5f,attributes:_0x477143,isFromAdapter:_0xd26ffb}){if(void 0x0!==_0x44c6ba&&('string'!=typeof _0x44c6ba||!_0x44c6ba['trim']()['length']))throw new _0x4877d5('commentsrepository-update-comment-invalid-content');const _0x419c37=this['getCommentThread'](_0x47799f),_0x12144f=_0x419c37['getComment'](_0x42838b);if(!_0x12144f)throw new _0x4877d5('commentsrepository-update-missing-comment',this);let _0x156099=!0x1;if(_0x44c6ba&&_0x44c6ba!==_0x12144f['content']&&(_0x12144f['isEditable']||_0xd26ffb)&&(_0x12144f['content']=_0x44c6ba,_0x156099=!0x0),_0x360a5f&&_0x360a5f!==_0x12144f['createdAt']&&(_0x12144f['createdAt']=_0x360a5f,_0x12144f['attributes']&&_0x12144f['attributes']['@external']||(_0x12144f['authoredAt']=_0x360a5f),_0x156099=!0x0),_0x477143&&!yt(_0x477143,_0x12144f['attributes'])&&(_0x12144f['attributes']=_0x477143,_0x156099=!0x0),!_0x156099)return Promise['resolve']();if(_0x419c37['fire']('commentUpdated'),_0xd26ffb||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x392262=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2047bb}=this['getCommentThread'](_0x12144f['threadId']),_0x238590=_0x392262['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2047bb,'threadId':_0x47799f,'commentId':_0x42838b,'content':_0x44c6ba,'attributes':_0x477143})['then'](()=>_0x392262['remove'](_0x238590))['catch'](_0x267f78=>{throw console['error'](_0x267f78),new _0x4877d5('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3d2409,commentId:_0x258585,isFromAdapter:_0x31d6fa}){const _0x5c2add=this['getCommentThread'](_0x3d2409),_0xa0aa46=_0x5c2add['getComment'](_0x258585);if(!_0xa0aa46)throw new _0x4877d5('commentsrepository-remove-missing-comment',this);if(_0x5c2add['_remove'](_0xa0aa46),_0x31d6fa||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4f883f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x121c56}=_0x5c2add,_0x26a7e8=_0x4f883f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x121c56,'threadId':_0x3d2409,'commentId':_0x258585})['then'](()=>_0x4f883f['remove'](_0x26a7e8))['catch'](_0x55e300=>{throw console['error'](_0x55e300),new _0x4877d5('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
30
- _0x5dc210(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4112be,_0x570824){super();const _0x5920bf=_0x570824['isResolvable'];this['channelId']=_0x570824['channelId'],this['id']=_0x570824['id'],this['comments']=new _0x1990b8(),this['_repository']=_0x4112be,this['_isAttached']=!0x1,this['_isSubmitted']=_0x570824['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4112be,'_permissions',_0x4112be,'_readOnlyChannels',()=>_0x4112be['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4112be,'_permissions',()=>_0x4112be['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4112be,'_permissions',()=>{const _0x46a9c9=_0x4112be['getPermissions'](this['channelId']);return _0x46a9c9['write']||_0x46a9c9['admin'];}),this['bind']('isResolvable')['to'](_0x4112be,'_permissions',()=>_0x5920bf&&_0x4112be['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x570824['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x35da14,_0xd5af3f)=>_0x35da14?_0xd5af3f?_0x35da14<_0xd5af3f?_0x35da14:_0xd5af3f:_0x35da14:_0xd5af3f),this['set']('unlinkedAt',_0x570824['unlinkedAt']||null),this['set']('resolvedAt',_0x570824['resolvedAt']||null),this['set']('resolvedBy',_0x570824['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x416d80=>!!_0x416d80),this['set']('attributes',_0x570824['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x38b5fe,_0xc0583e)=>_0x38b5fe+_0xc0583e['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x35ed8d,id:_0x4a21fe}=this;this['_repository']['fire'](xt('submitCommentThread',_0x35ed8d),{'channelId':_0x35ed8d,'threadId':_0x4a21fe});}['setUnlinkedAt'](_0x4fbbc4){this['_update']({'unlinkedAt':_0x4fbbc4});}['resolve']({resolvedAt:_0x1b847d=new Date(),resolvedBy:_0x582eb8=null,isFromAdapter:_0x5a2319=!0x1}={}){const _0x1d0c37=this['_repository']['context']['plugins']['get'](ct)['me'],{channelId:_0x4e2f39,id:_0x23ee13}=this;this['_repository']['fire'](xt('resolveCommentThread',_0x4e2f39),{'channelId':_0x4e2f39,'threadId':_0x23ee13,'resolvedAt':_0x1b847d,'resolvedBy':_0x582eb8||_0x1d0c37['id'],'isFromAdapter':_0x5a2319});}['reopen']({isFromAdapter:_0x55d2ff=!0x1}={}){const {channelId:_0x350e34,id:_0x4e8021}=this;this['_repository']['fire'](xt('reopenCommentThread',_0x350e34),{'channelId':_0x350e34,'threadId':_0x4e8021,'isFromAdapter':_0x55d2ff});}['setContext'](_0x5b223d){this['context']||this['_update']({'context':_0x5b223d});}['setAttribute'](_0x14d633,_0x3e2057){const _0x100ff4=At(this['attributes']);Ct(_0x100ff4,_0x14d633,_0x3e2057),this['_update']({'attributes':_0x100ff4});}['removeAttribute'](_0x18e502){const _0x37367a=At(this['attributes']);vt(_0x37367a,_0x18e502),this['_update']({'attributes':_0x37367a});}['remove']({isFromAdapter:_0x492fbd=!0x1}={}){const {channelId:_0x4a67ed,id:_0x4d0a18}=this;this['_repository']['fire'](xt('removeCommentThread',_0x4a67ed),{'channelId':_0x4a67ed,'threadId':_0x4d0a18,'isFromAdapter':_0x492fbd});}['attachTo'](_0x33747e){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x33747e});}['addComment'](_0x444a7c){const {channelId:_0x17cbc0,id:_0x4a2eb8}=this;this['_repository']['fire'](xt('addComment',_0x17cbc0,_0x4a2eb8),Object['assign']({'channelId':_0x17cbc0,'threadId':_0x4a2eb8},_0x444a7c));}['getComment'](_0x2709a4){if('string'!=typeof _0x2709a4)throw new _0x4877d5('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x2709a4});return this['comments']['get'](_0x2709a4);}['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'](_0x4d3472=>_0x4d3472['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4dd191){return this['listenTo'](_0x4dd191,'change:authoredAt',()=>{const _0x17c402=this['_findOptimalIndex'](_0x4dd191),_0x8e6275=this['comments'];_0x17c402-0x1!=_0x8e6275['getIndex'](_0x4dd191)&&_0x17c402+0x1!=_0x8e6275['getIndex'](_0x4dd191)&&(this['_remove'](_0x4dd191),this['_add'](_0x4dd191));}),this['comments']['add'](_0x4dd191,this['_findOptimalIndex'](_0x4dd191));}['_update'](_0x3c03fa){const {channelId:_0x11a082,id:_0x1bb75d}=this;this['_repository']['fire'](xt('updateCommentThread',_0x11a082),{..._0x3c03fa,'channelId':_0x11a082,'threadId':_0x1bb75d});}['_remove'](_0x32654f){return this['stopListening'](_0x32654f),_0x32654f['destroy'](),this['comments']['remove'](_0x32654f);}['_findOptimalIndex'](_0x394c46){const _0x1f91d9=this['comments']['find'](_0x177799=>new Date(_0x177799['authoredAt'])['getTime']()>new Date(_0x394c46['authoredAt'])['getTime']());return _0x1f91d9?this['comments']['getIndex'](_0x1f91d9):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
31
- _0x5dc210(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x15f871,_0x2defa8){super();const _0x313c0a=_0x15f871['context']['plugins']['get'](ct)['me'],_0x32f809=_0x15f871['getCommentThread'](_0x2defa8['threadId']),_0x541291=0x0===_0x32f809['comments']['length'],_0x4f7ffc=_0x313c0a===_0x2defa8['author'];this['id']=_0x2defa8['id'],this['threadId']=_0x2defa8['threadId'],this['author']=_0x2defa8['author'],this['creator']=_0x2defa8['creator'],this['isExternal']=Boolean(_0x2defa8['attributes']&&_0x2defa8['attributes']['@external']),this['set']('content',_0x2defa8['content']),this['createdAt']=_0x2defa8['createdAt']||new Date(),this['set']('authoredAt',_0x2defa8['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x32f809,'resolvedAt'),this['set']('attributes',_0x2defa8['attributes']||{}),this['bind']('isEditable')['to'](_0x15f871,'_permissions',()=>{const _0x2e4605=_0x15f871['getPermissions'](_0x32f809['channelId'])['write'],_0x5dd69d=_0x15f871['getPermissions'](_0x32f809['channelId'])['modifyAll'];return _0x4f7ffc&&_0x2e4605||!_0x4f7ffc&&_0x5dd69d;}),this['bind']('isRemovable')['to'](_0x32f809,'isRemovable',_0x15f871,'_permissions',_0x13cd95=>{const _0x542bff=_0x15f871['getPermissions'](_0x32f809['channelId'])['write'],_0x598a12=_0x15f871['getPermissions'](_0x32f809['channelId'])['modifyAll'];return _0x4f7ffc&&_0x542bff||_0x13cd95&&_0x541291||!_0x4f7ffc&&_0x598a12&&!_0x541291;}),this['bind']('isReadOnly')['to'](_0x32f809,'isReadOnly'),this['_repository']=_0x15f871;}get['weight'](){return Math['max'](function(_0x22e356){const _0xd18521=document['createElement']('div');return _0xd18521['innerHTML']=_0x22e356,_0xd18521['textContent']['length'];}(this['content']),0xc8);}['update'](_0x35588e){const {threadId:_0x142ca5,id:_0x239f94}=this;if(!this['_repository']['hasCommentThread'](_0x142ca5))throw new _0x4877d5('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3fcf46}=this['_repository']['getCommentThread'](_0x142ca5);this['_repository']['fire'](xt('updateComment',_0x3fcf46,_0x142ca5),{'channelId':_0x3fcf46,'threadId':_0x142ca5,'commentId':_0x239f94,..._0x35588e});}['setAttribute'](_0x428691,_0x57a67b){const _0x4611a7=At(this['attributes']);Ct(_0x4611a7,_0x428691,_0x57a67b),this['update']({'attributes':_0x4611a7});}['removeAttribute'](_0x5c77a6){const _0x1079f9=At(this['attributes']);vt(_0x1079f9,_0x5c77a6),this['update']({'attributes':_0x1079f9});}['remove'](_0x1e0860={}){if(!_0x1e0860['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xe0e22a,id:_0x17e572}=this;if(!this['_repository']['hasCommentThread'](_0xe0e22a))throw new _0x4877d5('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1c1f78}=this['_repository']['getCommentThread'](_0xe0e22a);this['_repository']['fire'](xt('removeComment',_0x1c1f78,_0xe0e22a),{'channelId':_0x1c1f78,'threadId':_0xe0e22a,'commentId':_0x17e572,..._0x1e0860});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0x25e15a,..._0x3211ce){for(const _0x3911b2 of _0x3211ce)void 0x0!==_0x3911b2&&(_0x25e15a+=':'+String(_0x3911b2));return _0x25e15a;}class Q extends _0x4d8247{['refresh'](){const _0x39b1ae=this['editor']['model']['document']['selection'];for(const _0xac1d43 of _0x39b1ae['getRanges']())if(this['_hasContent'](_0xac1d43))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x3a7f4d=_0x5db4a7()}={}){const _0x242789=this['editor']['model'],_0x2f9d52=[];for(const _0x2af77b of _0x242789['document']['selection']['getRanges']())this['_hasContent'](_0x2af77b)&&_0x2f9d52['push'](this['_trimToContent'](_0x2af77b));_0x242789['change'](_0x2f9adf=>{for(const _0x5a2c04 of _0x2f9d52){const _0x494b66=_0x5db4a7()['substr'](0x1,0x5),_0x4372b1='comment:'+_0x3a7f4d+':'+_0x494b66;_0x2f9adf['addMarker'](_0x4372b1,{'range':_0x5a2c04,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x10c22a){for(const _0x641349 of _0x10c22a['getItems']())if(this['_itemIsContent'](_0x641349))return!0x0;return!0x1;}['_itemIsContent'](_0x9b72c6){return _0x9b72c6['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x9b72c6)&&!_0x9b72c6['is']('element','tableCell');}['_trimToContent'](_0x463d15){const _0x4c6d9a=_0x28d07e=>!this['_itemIsContent'](_0x28d07e['item']),_0x14f1bd=_0x463d15['start']['getLastMatchingPosition'](_0x4c6d9a),_0x6b6449=_0x463d15['end']['getLastMatchingPosition'](_0x4c6d9a,{'direction':'backward'});return this['editor']['model']['createRange'](_0x14f1bd,_0x6b6449);}}class P extends _0x1b90ef{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5bd8d4){super(_0x5bd8d4),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x829838=this['editor'],_0x48057c=_0x829838['model']['document']['selection'],_0x11f175=_0xd76232(()=>this['refreshSelectedViews'](),0xa);_0x48057c['on']('change:range',(_0x395101,_0x148c66)=>{_0x148c66['directChange']&&(_0x11f175['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x829838['editing']['view']['document'],'change:isFocused',(_0x5622ec,_0x449bb8,_0x164f6e)=>{_0x164f6e&&_0x11f175();}),this['listenTo'](_0x829838['ui']['focusTracker'],'change:isFocused',(_0x35ab26,_0x319c1d,_0x4a898c)=>{_0x4a898c||_0x829838['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0xe08611=>this['_editorAnnotationsData']['has'](_0xe08611['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x36657f){if(this['_editorAnnotations']['has'](_0x36657f['view']))return;this['_editorAnnotations']['add'](_0x36657f['view']),this['editor']['ui']['focusTracker']['add'](_0x36657f['view']['element']);const _0x3d48aa=this['editor']['plugins']['get'](O);this['listenTo'](_0x3d48aa['collection'],'remove',(_0x3719a7,_0x5adfbc)=>{this['editor']['ui']['focusTracker']['remove'](_0x5adfbc['view']['element']),this['_editorAnnotations']['delete'](_0x5adfbc['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x592503){if('function'!=typeof _0x592503)throw new _0x4877d5('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x592503);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x5d777b,annotations:_0xf812a8}){const _0x4c85a1=[],_0x2d96c7=this['editor']['model']['document']['selection'],_0x41837f=Array['from'](_0x2d96c7['getRanges']());for(const [_0xcfde46,_0x478120]of this['_editorAnnotationsData']){const _0x2f1e71=_0x36974a(_0x478120),_0xb03291=_0xf812a8['getByInnerView'](_0xcfde46);_0x2f1e71&&_0xb03291&&_0x4c85a1['push']({'annotation':_0xb03291,'range':_0x2f1e71});}function _0x36974a(_0x165ac8){for(const _0x33fd5e of _0x165ac8)for(const _0x4fd951 of _0x41837f)if(_0x33fd5e['containsRange'](_0x4fd951,!_0x2d96c7['isCollapsed']))return _0x33fd5e;return null;}return _0x4c85a1['sort']((_0x5c6d24,_0x2ba716)=>{const _0x126a55=_0x5c6d24['range'],_0x1b33f7=_0x2ba716['range'];if(!_0x126a55['isEqual'](_0x1b33f7)){if(_0x126a55['containsRange'](_0x1b33f7,!0x0))return 0x1;if(_0x1b33f7['containsRange'](_0x126a55,!0x0))return-0x1;}return _0x5c6d24['annotation']==_0x5d777b?-0x1:_0x2ba716['annotation']==_0x5d777b?0x1:0x0;})['map'](_0xcdeb5a=>_0xcdeb5a['annotation']);}get['_editorAnnotationsData'](){const _0x1fe194=new Map();for(const _0x5b778c of Array['from'](this['_dataCollectors']))for(const [_0x41f406,_0x4599e2]of _0x5b778c())_0x1fe194['set'](_0x41f406,_0x4599e2);return _0x1fe194;}}class at extends _0x1b90ef{['afterInit'](){const _0x1e91e0=this['editor'];if(!_0x1e91e0['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1e91e0['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ut extends _0x1b90ef{constructor(_0xb64bc5){super(_0xb64bc5),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4a383e=this['editor'],_0x1280be=_0x4a383e['commands']['get']('importWord'),_0x236d88=_0x4a383e['plugins']['get'](ct);_0x1280be&&(_0x1280be['on']('execute',(_0x42957a,[,_0x159cda])=>{_0x159cda['collaboration_features']={'comments':!0x0,'user_id':_0x236d88['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1280be,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2e642a,_0xc8cff7){const {comment_threads:_0x11917b}=_0xc8cff7;_0x11917b&&_0x11917b['forEach'](({thread_id:_0xa2aa6c,comments:_0x3e0367,is_resolved:_0xce829d})=>{const _0x2f3adf=new Date(),_0x54fff0=_0x3e0367['map'](({author:_0x285dc9,content:_0xf46a2b,created_at:_0x188ea8})=>({'content':_0xf46a2b,'authorId':this['editor']['plugins']['get'](ct)['me']['id'],'createdAt':_0x2f3adf,'attributes':{'@external':{'authorName':_0x285dc9,'createdAt':_0x188ea8?new Date(_0x188ea8):new Date(),'source':'importWord'}}})),_0x42b7c1=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x42b7c1,'threadId':_0xa2aa6c,'comments':_0x54fff0,'resolvedAt':_0xce829d?_0x2f3adf:null});});}}class ft extends _0x1b90ef{constructor(_0x461120){super(_0x461120),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x385449=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x385449,'contentInsertion',(_0x4aff34,_0x11af06)=>this['_removeMarkersWithoutThreads'](_0x11af06['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1ebc38){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1ebc38;const _0x183037=this['editor']['plugins']['get']('CommentsRepository');for(const _0x54f5f5 of _0x1ebc38['keys']()){const [_0x3b991c,_0x4e431d]=_0x54f5f5['split'](':');'comment'!=_0x3b991c||_0x183037['hasCommentThread'](_0x4e431d)||_0x1ebc38['delete'](_0x54f5f5);}return _0x1ebc38;}['_registerMarkerInClipboardPipeline'](){const _0x341d81=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1f2dc4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1f2dc4&&_0x341d81['_registerMarkerToCopy']('comment',_0x1f2dc4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1b64a7){switch(_0x1b64a7){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class dt extends _0x1b90ef{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3f8d7a,_0x413c73)=>{if(!_0x413c73['options']['showCommentHighlights'])return null;if(_0x413c73['options']['ignoreResolvedComments']){const {id:_0xb5f695}=er(_0x3f8d7a['markerName']),_0x238586=this['editor']['plugins']['get'](o);if(_0x238586['getCommentThread'](_0xb5f695)?.['isResolved']&&_0x3f8d7a['item'])return _0x413c73['consumable']['consume'](_0x3f8d7a['item'],'addMarker:'+_0x3f8d7a['markerName']),_0x413c73['consumable']['consume'](_0x3f8d7a['item'],'removeMarker:'+_0x3f8d7a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x15e6c5=>{_0x15e6c5['on']('addMarker:comment',(_0x324b61,_0x1e6d16,_0x5a4f73)=>{if(!_0x5a4f73['options']['showCommentHighlights'])return;const _0x25054e=_0x1e6d16['item'];if(!_0x25054e)return;const _0x5369c4=_0x5a4f73['mapper']['toViewElement'](_0x25054e);this['editor']['model']['schema']['isObject'](_0x25054e)&&_0x5369c4&&!_0x5369c4['getCustomProperty']('widget')&&_0x5369c4['is']('containerElement')&&_0x2b6cc6(_0x5369c4,_0x5a4f73['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3ee9c0,{writer:_0x11ce61,options:_0x2d81c3})=>{if(!_0x2d81c3['showCommentHighlights'])return null;const _0x18e647=_0x11ce61['createContainerElement']('div'),_0x2f6d5c=_0x11ce61['createEmptyElement']('hr');return _0x11ce61['addClass']('ck-horizontal-line',_0x18e647),_0x11ce61['insert'](_0x11ce61['createPositionAt'](_0x18e647,0x0),_0x2f6d5c),_0x18e647;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x52f020,{writer:_0x688d3b,options:_0x40735f})=>{if(!_0x40735f['showCommentHighlights'])return null;const _0x3b03bc=_0x688d3b['createContainerElement']('span'),_0x14ab13=_0x688d3b['createEmptyElement']('img');return _0x688d3b['addClass']('image-inline',_0x3b03bc),_0x688d3b['insert'](_0x688d3b['createPositionAt'](_0x3b03bc,0x0),_0x14ab13),_0x3b03bc;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1ffab6,{writer:_0x4946cf,options:_0x274c7e})=>{if(_0x274c7e['showCommentHighlights'])return _0x4946cf['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1df16a,_0x58a2b7,_0x1206cc)=>{_0x1206cc['options']['showCommentHighlights']&&_0x1df16a['stop']();},{'priority':'high'});}}class r extends _0x1b90ef{static get['requires'](){return[o,P,ct,at,ut,ft,dt];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8a6bd5){super(_0x8a6bd5),this['set']('isThreadsLoadingPaused',!0x0),_0x8a6bd5['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x29e15c,_0x594339,_0x4fb15f,_0x4a20e4)=>{const _0x4094c0=_0x8a6bd5['plugins']['get'](o),_0x1b832e=_0x4fb15f?er(_0x4fb15f)['id']:null;_0x8a6bd5['model']['change'](()=>{if(_0x1b832e){const _0x338b45=this['getAllMarkersForId'](_0x1b832e);for(const _0x52e06f of _0x338b45)_0x8a6bd5['editing']['reconvertMarker'](_0x52e06f);}if(_0x4a20e4){const {id:_0x1049f1}=er(_0x4a20e4),_0x16f23f=_0x4094c0['getCommentThread'](_0x1049f1);if(_0x16f23f&&_0x16f23f['unlinkedAt'])return;if(_0x16f23f&&!_0x16f23f['isAttached'])return;const _0xe04ea2=this['getAllMarkersForId'](_0x1049f1);for(const _0x15790d of _0xe04ea2)_0x8a6bd5['editing']['reconvertMarker'](_0x15790d);}}),_0x1b832e&&this['scrollToThreadMarker'](_0x1b832e);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x10a39f=this['editor'],_0x47c404=_0x10a39f['plugins']['get'](o),_0x402dd2=_0x10a39f['config']['get']('collaboration.channelId'),_0x9f2659=_0x47c404['getCommentThreads']()['filter'](_0xf638b9=>_0xf638b9['channelId']!==_0x402dd2);_0x10a39f['commands']['add']('addCommentThread',new Q(_0x10a39f)),this['listenTo'](_0x10a39f,'change:isReadOnly',(_0x3683c6,_0xffab3d,_0xda709f)=>{_0x47c404['switchReadOnly'](_0xda709f,_0x10a39f['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x47c404,mt('addCommentThread',_0x402dd2),(_0x11e255,{threadId:_0x1fef79})=>{const _0x57ea65=this['editor']['plugins']['get'](o)['getCommentThread'](_0x1fef79);_0x57ea65?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1fef79);}),this['listenTo'](_0x47c404,mt('removeCommentThread',_0x402dd2),(_0x36f500,{threadId:_0x4aa512})=>{_0x10a39f['model']['enqueueChange']({'isUndoable':!0x1},_0x36373d=>{const _0x4287c2=this['getAllMarkersForId'](_0x4aa512);for(const _0x171d5a of _0x4287c2)_0x36373d['removeMarker'](_0x171d5a);});}),this['listenTo'](_0x47c404,mt('resolveCommentThread',_0x402dd2),(_0x298507,{threadId:_0x47d7ef})=>{(this['_reconvertMarkers'](_0x47d7ef),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x47d7ef)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x47c404,mt('reopenCommentThread',_0x402dd2),(_0x4d1f46,{threadId:_0x133232})=>{this['_reconvertMarkers'](_0x133232);},{'priority':'low'}),this['listenTo'](_0x47c404,mt('addComment',_0x402dd2),(_0x2a815a,{threadId:_0x5e529a,isFromAdapter:_0x312a61})=>{const _0x3884f9=this['getAllMarkersForId'](_0x5e529a);if(_0x312a61||0x0==_0x3884f9['length']||!_0x47c404['hasCommentThread'](_0x5e529a))return;0x1===_0x47c404['getCommentThread'](_0x5e529a)['length']&&_0x10a39f['model']['enqueueChange']({'isUndoable':!0x1},_0x3c4d8f=>{for(const _0x18dcb4 of _0x3884f9)_0x3c4d8f['updateMarker'](_0x18dcb4,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x9f2659);}['afterInit'](){!async function(_0x313012){const _0x4c6491=_0x2d792b([0x37,0x43,0x73,0x30,0x74,0x58,0x35,0x52,0x77,0x50,0x51,0x5a,0x57,0x7a,0x53,0x64,0x54,0x34,0x48,0x33,0x42,0x76,0x4e,0x46,0x45,0x4b,0x6f,0x36,0x66,0x6a,0x78,0x4a,0x67,0x65,0x6c,0x79,0x44,0x4d,0x47,0x72,0x55,0x4c,0x69,0x41,0x6d,0x38,0x31,0x70,0x59,0x6e,0x49,0x75,0x68,0x71,0x32,0x61,0x56,0x39,0x62,0x63,0x6b,0x4f]),_0xfd6b3b=0x6f72e012,_0x26f96e=0x6f75898a^_0xfd6b3b,_0x2fcc6b=window[_0x2d792b([0x44,0x61,0x74,0x65])][_0x2d792b([0x6e,0x6f,0x77])](),_0x3b94b3=_0x313012[_0x2d792b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x204d4c=new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e39c4=>{_0x3b94b3[_0x2d792b([0x6f,0x6e,0x63,0x65])](_0x2d792b([0x72,0x65,0x61,0x64,0x79]),_0x2e39c4);}),_0x8809e7={[_0x2d792b([0x6b,0x74,0x79])]:_0x2d792b([0x45,0x43]),[_0x2d792b([0x75,0x73,0x65])]:_0x2d792b([0x73,0x69,0x67]),[_0x2d792b([0x63,0x72,0x76])]:_0x2d792b([0x50,0x2d,0x32,0x35,0x36]),[_0x2d792b([0x78])]:_0x2d792b([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]),[_0x2d792b([0x79])]:_0x2d792b([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]),[_0x2d792b([0x61,0x6c,0x67])]:_0x2d792b([0x45,0x53,0x32,0x35,0x36])},_0x436f03=_0x3b94b3[_0x2d792b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2d792b([0x67,0x65,0x74])](_0x2d792b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1507f5(){let _0x1e1132,_0x1b2801=null,_0xfc4436=null;try{if(_0x436f03==_0x2d792b([0x47,0x50,0x4c]))return _0x2d792b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1e1132=_0x748bd3(),!_0x1e1132)return _0x2d792b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1e1132[_0x2d792b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xfc4436=_0x2bf200(_0x1e1132[_0x2d792b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1e1132[_0x2d792b([0x6a,0x74,0x69])])),await _0xb9470()?_0xf69e25()?_0x2c1d37()?_0x2d792b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x50d01f()?(_0x1e1132[_0x2d792b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2d792b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1b2801=_0xc760f0(_0x2d792b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1e1132[_0x2d792b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2d792b([0x74,0x72,0x69,0x61,0x6c])&&(_0x1b2801=_0xc760f0(_0x2d792b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x194b2d()):_0x2d792b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2d792b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2d792b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2d792b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2c1d37(){const _0xd5cc12=[_0x2d792b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2d792b([0x74,0x72,0x69,0x61,0x6c])][_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e1132[_0x2d792b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2fcc6b/0x3e8:0xe10*_0x26f96e;return _0x1e1132[_0x2d792b([0x65,0x78,0x70])]<_0xd5cc12;}function _0xf69e25(){const _0x3ba2a8=_0x1e1132[_0x2d792b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3ba2a8)return!0x1;if(_0x3ba2a8[_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d792b([0x2a])))return!0x0;if(_0x3ba2a8[_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d792b([0x43,0x4d,0x54])))return!0x0;if(_0x3ba2a8[_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d792b([0x52,0x43,0x4d,0x54]))){if(_0x2dc518())return!0x0;if(_0x5e12de()||_0x2a804d())return!0x0;}return!0x1;}function _0x50d01f(){const _0x34df7d=_0x1e1132[_0x2d792b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x34df7d||0x0==_0x34df7d[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xa5c3a0}=new URL(window[_0x2d792b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x34df7d[_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa5c3a0))return!0x0;const _0x59af56=_0xa5c3a0[_0x2d792b([0x73,0x70,0x6c,0x69,0x74])](_0x2d792b([0x2e]));return _0x34df7d[_0x2d792b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xdb0dfc=>_0xdb0dfc[_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d792b([0x2a])))[_0x2d792b([0x6d,0x61,0x70])](_0x30c59d=>_0x30c59d[_0x2d792b([0x73,0x70,0x6c,0x69,0x74])](_0x2d792b([0x2e])))[_0x2d792b([0x73,0x6f,0x6d,0x65])](_0x2cd658=>_0x59af56[_0x2d792b([0x65,0x76,0x65,0x72,0x79])]((_0x401ba5,_0xe9c64f)=>_0x2cd658[_0xe9c64f]===_0x401ba5||_0x2cd658[_0xe9c64f]===_0x2d792b([0x2a])));}function _0x194b2d(){return _0x1b2801&&_0xfc4436?new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5931ee,_0x1e127f)=>{_0x1b2801[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x5931ee,_0x1e127f),_0xfc4436[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x3481f3=>{_0x3481f3!=_0x2d792b([0x56,0x61,0x6c,0x69,0x64])&&_0x5931ee(_0x3481f3);},_0x1e127f);}):_0x1b2801||_0xfc4436||_0x2d792b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2bf200(_0x16cad8,_0xf1b02a){return new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x533796=>{if(_0x223616())return _0x533796(_0x2d792b([0x56,0x61,0x6c,0x69,0x64]));_0x41f1bc(),_0x3b94b3[_0x2d792b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2d792b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1ae0b0=!0x1;const _0x40aa34=_0x5db4a7();function _0x5139d3(_0x1344f6){return!!_0x1344f6&&(typeof _0x1344f6===_0x2d792b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1344f6===_0x2d792b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1344f6[_0x2d792b([0x74,0x68,0x65,0x6e])]===_0x2d792b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1344f6[_0x2d792b([0x63,0x61,0x74,0x63,0x68])]===_0x2d792b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xb017fd(_0x52c26c){_0x2e9c3d(_0x52c26c)[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x125692=>{if(!_0x125692||_0x125692[_0x2d792b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2d792b([0x6f,0x6b]))return _0x2d792b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3954ce(_0x4685a(_0x40aa34+_0xf1b02a))!=_0x125692[_0x2d792b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2d792b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2d792b([0x56,0x61,0x6c,0x69,0x64]);})[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x128a7f=>(_0x17d7e4(),_0x128a7f),()=>{const _0x31fd14=_0x5be037();return null==_0x31fd14?(_0x17d7e4(),_0x2d792b([0x56,0x61,0x6c,0x69,0x64])):_0x2d792b(_0x2fcc6b-_0x31fd14>(0x4b7e6412^_0xfd6b3b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x533796)[_0x2d792b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x533796(_0x2d792b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1a14eb=0x6f440e92^_0xfd6b3b;function _0x17d7e4(){const _0x1b355e=_0x2d792b([0x6c,0x6c,0x63,0x74,0x2d])+_0x3954ce(_0x4685a(_0x16cad8)),_0x354fc0=_0x24bb7a(_0x3954ce(window[_0x2d792b([0x4d,0x61,0x74,0x68])][_0x2d792b([0x63,0x65,0x69,0x6c])](_0x2fcc6b/_0x1a14eb)));window[_0x2d792b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2d792b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1b355e,_0x354fc0);}function _0x5be037(){const _0x582d8b=_0x2d792b([0x6c,0x6c,0x63,0x74,0x2d])+_0x3954ce(_0x4685a(_0x16cad8)),_0x234054=window[_0x2d792b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2d792b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x582d8b);return _0x234054?window[_0x2d792b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x24bb7a(_0x234054),0x10)*_0x1a14eb:null;}function _0x2e9c3d(_0x4132fe){return new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x457a10,_0x3f35fb)=>{_0x4132fe[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x457a10,_0x3f35fb),window[_0x2d792b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3f35fb,0x6f7334d2^_0xfd6b3b);});}}_0x3b94b3[_0x2d792b([0x6f,0x6e])](_0x2d792b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x337374,_0x259b72)=>{if(_0x259b72[0x0]!=_0x16cad8)return _0x533796(_0x2d792b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x259b72[0x1]={..._0x259b72[0x1],[_0x2d792b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x40aa34};},{[_0x2d792b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2d792b([0x68,0x69,0x67,0x68])}),_0x3b94b3[_0x2d792b([0x6f,0x6e])](_0x2d792b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x20f254=>{_0x5139d3(_0x20f254[_0x2d792b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1ae0b0=!0x0,_0xb017fd(_0x20f254[_0x2d792b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2d792b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2d792b([0x6c,0x6f,0x77])}),_0x204d4c[_0x2d792b([0x74,0x68,0x65,0x6e])](()=>{_0x1ae0b0||_0x533796(_0x2d792b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x223616(){return _0x3b94b3[_0x2d792b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d792b([0x76,0x69,0x65,0x77])][_0x2d792b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2d792b([0x61,0x75,0x74,0x6f]);}function _0x41f1bc(){_0x3b94b3[_0x2d792b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d792b([0x76,0x69,0x65,0x77])][_0x2d792b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d792b([0x61,0x75,0x74,0x6f]);}}function _0xc760f0(_0x1cc35a){const _0x422958=[new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x293349=>setTimeout(_0x293349,0x6f7bdede^_0xfd6b3b)),_0x204d4c[_0x2d792b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b9792=>{let _0x44ac05=0x0;_0x3b94b3[_0x2d792b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d792b([0x6f,0x6e])](_0x2d792b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x14abb6,_0x46ae04)=>{_0x46ae04[0x0][_0x2d792b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x44ac05++,_0x44ac05==(0x6f72e1ea^_0xfd6b3b)&&(_0x4b9792(),_0x14abb6[_0x2d792b([0x6f,0x66,0x66])]());});}))];return window[_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d792b([0x72,0x61,0x63,0x65])](_0x422958)[_0x2d792b([0x74,0x68,0x65,0x6e])](()=>_0x1cc35a);}async function _0x5592c1(){await _0x204d4c,_0x3b94b3[_0x2d792b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d792b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x25b487,_0x3b94b3[_0x2d792b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d792b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x25b487,_0x3b94b3[_0x2d792b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2d792b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2dc518(){return _0x1a1510(_0x2d792b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x42206d(_0x2d792b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2d792b([0x73,0x74,0x61,0x74,0x65])]==_0x2d792b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5e12de(){return _0x1a1510(_0x2d792b([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 _0x2a804d(){return _0x1a1510(_0x2d792b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x382903(_0x51eff8){const _0x3fe778=_0x2131b2();_0x3b94b3[_0x3fe778]=_0x2d792b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x51eff8,_0x51eff8!=_0x2d792b([0x56,0x61,0x6c,0x69,0x64])&&_0x5592c1();}function _0x2131b2(){const _0x32bb84=window[_0x2d792b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2d792b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2d792b([0x6e,0x6f,0x77])]())[_0x2d792b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2d792b([0x2e]),'');let _0x275343=_0x2d792b([0x43]);for(let _0x271a24=0x0;_0x271a24<_0x32bb84[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x271a24+=0x2){let _0x5f7f9a=window[_0x2d792b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x32bb84[_0x2d792b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x271a24,_0x271a24+0x2));_0x5f7f9a>=_0x4c6491[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5f7f9a-=_0x4c6491[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x275343+=_0x4c6491[_0x5f7f9a];}return _0x275343;}function _0x748bd3(){const _0xbcb0a7=_0x436f03[_0x2d792b([0x73,0x70,0x6c,0x69,0x74])](_0x2d792b([0x2e]));if(0x3!=_0xbcb0a7[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x49fbe5(_0xbcb0a7[0x1]);function _0x49fbe5(_0x3f2991){const _0x4bee52=_0x401695(_0x3f2991);return _0x4bee52&&_0x4a1246()?_0x4bee52:null;function _0x4a1246(){const _0x50c916=_0x4bee52[_0x2d792b([0x6a,0x74,0x69])],_0x3449aa=window[_0x2d792b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x50c916[_0x2d792b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x50c916[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2f903e={..._0x4bee52,[_0x2d792b([0x6a,0x74,0x69])]:_0x50c916[_0x2d792b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x50c916[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2f903e[_0x2d792b([0x76,0x63])],_0x4685a(_0x2f903e)==_0x3449aa;}}}async function _0xb9470(){let _0x3e5cca=!0x0;try{const _0x1b7a23=_0x436f03[_0x2d792b([0x73,0x70,0x6c,0x69,0x74])](_0x2d792b([0x2e])),[_0x5ab373,_0x1cf52a,_0x1b5eff]=_0x1b7a23;return _0x83be84(_0x5ab373),await _0x58f469(_0x5ab373,_0x1cf52a,_0x1b5eff),_0x3e5cca;}catch{return!0x1;}function _0x83be84(_0x247a06){const _0x36e40f=_0x401695(_0x247a06);_0x36e40f&&_0x36e40f[_0x2d792b([0x61,0x6c,0x67])]==_0x2d792b([0x45,0x53,0x32,0x35,0x36])||(_0x3e5cca=!0x1);}async function _0x58f469(_0xed381d,_0x17b907,_0x3d4b60){const _0x5a194a=window[_0x2d792b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2d792b([0x66,0x72,0x6f,0x6d])](_0x39a23c(_0x3d4b60),_0xa8fbba=>_0xa8fbba[_0x2d792b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2f7ca5=new window[(_0x2d792b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2d792b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xed381d+_0x2d792b([0x2e])+_0x17b907),_0x233f15=window[_0x2d792b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2d792b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x233f15)return;const _0x3d36b9=await _0x233f15[_0x2d792b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2d792b([0x6a,0x77,0x6b]),_0x8809e7,{[_0x2d792b([0x6e,0x61,0x6d,0x65])]:_0x2d792b([0x45,0x43,0x44,0x53,0x41]),[_0x2d792b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2d792b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2d792b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x233f15[_0x2d792b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2d792b([0x6e,0x61,0x6d,0x65])]:_0x2d792b([0x45,0x43,0x44,0x53,0x41]),[_0x2d792b([0x68,0x61,0x73,0x68])]:{[_0x2d792b([0x6e,0x61,0x6d,0x65])]:_0x2d792b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3d36b9,_0x5a194a,_0x2f7ca5)||(_0x3e5cca=!0x1);}}function _0x401695(_0xfaebe0){return _0xfaebe0[_0x2d792b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2d792b([0x65,0x79]))?JSON[_0x2d792b([0x70,0x61,0x72,0x73,0x65])](_0x39a23c(_0xfaebe0)):null;}function _0x39a23c(_0x5021c1){return window[_0x2d792b([0x61,0x74,0x6f,0x62])](_0x5021c1[_0x2d792b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2d792b([0x2b]))[_0x2d792b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2d792b([0x2f])));}function _0x4685a(_0x5cc8d5){let _0x5644e5=0x1505;function _0x2fa1b3(_0x2fe0d1){for(let _0x2066d8=0x0;_0x2066d8<_0x2fe0d1[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2066d8++){const _0x4008e7=_0x2fe0d1[_0x2d792b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2066d8);_0x5644e5=(_0x5644e5<<0x5)+_0x5644e5+_0x4008e7,_0x5644e5&=_0x5644e5;}}function _0xb2d4c(_0x4271f9){Array[_0x2d792b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4271f9)?_0x4271f9[_0x2d792b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xb2d4c):_0x4271f9&&typeof _0x4271f9==_0x2d792b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2d792b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4271f9)[_0x2d792b([0x73,0x6f,0x72,0x74])]()[_0x2d792b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1c9f2c,_0x12b74c])=>{_0x2fa1b3(_0x1c9f2c),_0xb2d4c(_0x12b74c);}):_0x2fa1b3(window[_0x2d792b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4271f9));}return _0xb2d4c(_0x5cc8d5),_0x5644e5>>>0x0;}function _0x3954ce(_0x4ece9b){return _0x4ece9b[_0x2d792b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2d792b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2d792b([0x30]));}function _0x24bb7a(_0x149432){return _0x149432[_0x2d792b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2d792b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2d792b([0x6a,0x6f,0x69,0x6e])]('');}function _0x1a1510(_0xd5153a){return _0x3b94b3[_0x2d792b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2d792b([0x68,0x61,0x73])](_0xd5153a);}function _0x42206d(_0x4b04c4){return _0x3b94b3[_0x2d792b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2d792b([0x67,0x65,0x74])](_0x4b04c4);}function _0x25b487(){}function _0x2d792b(_0x465d88){return _0x465d88['map'](_0x1e21ca=>String['fromCharCode'](_0x1e21ca))['join']('');}_0x382903(await _0x1507f5());}(this);}['destroy'](){const _0x444f09=this['editor']['plugins']['get'](o),_0x404485=this['editor']['config']['get']('collaboration.channelId');for(const _0x5f092a of _0x444f09['getCommentThreads']({'channelId':_0x404485}))_0x444f09['_detachCommentThread'](_0x5f092a['id']),_0x444f09['_threads']['delete'](_0x5f092a['id']);super['destroy']();}['hasMarkerForId'](_0xca0322){return this['getAllMarkersForId'](_0xca0322)['length']>0x0;}['getAllMarkersForId'](_0x274dc6){const _0x3c33d3=[];for(const _0x3ea90d of this['editor']['model']['markers'])_0x3ea90d['name']['startsWith']('comment:'+_0x274dc6)&&_0x3c33d3['push'](_0x3ea90d);return _0x3c33d3;}['scrollToThreadMarker'](_0x573cd9){const _0x5b4910=this['_getTargetForId'](_0x573cd9);_0x5b4910&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x573cd9&&rt({'target':_0x5b4910[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x49137e){this['editor']['model']['change'](()=>{for(const _0x45af4a of this['getAllMarkersForId'](_0x49137e))this['editor']['editing']['reconvertMarker'](_0x45af4a);});}['_attachArchivedThread'](_0x1ada78){const _0x2db8aa=this['editor']['plugins']['get'](o),_0x259985=this['editor']['plugins']['get'](P),_0x29ad47=_0x2db8aa['getCommentThread'](_0x1ada78);if(!_0x29ad47['isAttached']){const _0x58c08e=_0x29ad47['attachTo'](()=>this['_getTargetForId'](_0x29ad47['id']));_0x259985['registerAnnotation'](_0x58c08e),_0x29ad47['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x31d4e7=this['editor'],_0x263abb=_0x31d4e7['plugins']['get'](ct);_0x31d4e7['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x352da6,_0x20b817)=>{const {id:_0x4a43e4}=er(_0x352da6['markerName']),_0x1a2a98=_0x31d4e7['plugins']['get'](o)['getCommentThread'](_0x4a43e4),_0x4797f4=this['activeMarker']&&er(this['activeMarker'])['id']===_0x4a43e4;let _0x51eea4;if(_0x1a2a98&&_0x1a2a98['isResolved']&&!_0x4797f4&&_0x352da6['item'])return _0x20b817['consumable']['consume'](_0x352da6['item'],'addMarker:'+_0x352da6['markerName']),_0x20b817['consumable']['consume'](_0x352da6['item'],'removeMarker:'+_0x352da6['markerName']),null;const _0x1c4a6c=['ck-comment-marker'];return _0x4797f4&&_0x1c4a6c['push']('ck-comment-marker--active'),_0x51eea4=_0x1a2a98?.['length']?_0x1a2a98['comments']['first']['author']['id']:_0x263abb['me']['id'],{'classes':_0x1c4a6c,'attributes':{'data-comment':_0x4a43e4,'data-author-id':_0x51eea4}};}}),_0x31d4e7['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5f32a8,{options:_0x4513ce})=>{if(_0x4513ce['showCommentHighlights'])return null;const _0x163c7e=_0x31d4e7['plugins']['get'](o),_0x5181e6=_0x31d4e7['model']['markers']['get'](_0x5f32a8),{id:_0x50ffcf,part:_0x195042}=er(_0x5f32a8);return _0x5181e6&&!_0x5181e6['affectsData']||_0x4513ce['ignoreResolvedComments']&&_0x163c7e['getCommentThread'](_0x50ffcf)?.['isResolved']?null:{'group':'comment','name':_0x195042?_0x50ffcf+':'+_0x195042:_0x50ffcf};}}),_0x31d4e7['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x41477f,{writer:_0x31e2a5})=>_0x31e2a5['createElement']('$marker',{'data-name':'comment:'+_0x41477f['getAttribute']('id')})}),_0x31d4e7['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1f125e=this['editor'],_0x25369c=_0x1f125e['plugins']['get'](o),_0x20af65=new Set(),_0x531cb6=new Set();_0x1f125e['model']['document']['registerPostFixer'](_0x218fa7=>{let _0x49ea09=!0x1;for(const {name:_0x4938cc,data:_0x482860}of _0x1f125e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x235c19,id:_0x1582da}=er(_0x4938cc);let _0x7732b9=_0x482860['newRange'];if('comment'!==_0x235c19||!_0x7732b9)continue;const _0x4b2a0d='$graveyard'===_0x7732b9['root']['rootName'];_0x4b2a0d||(_0x7732b9=ht(_0x7732b9,_0x1f125e['model']),!_0x7732b9||_0x7732b9['isCollapsed']||!_0x482860['newRange']||_0x7732b9['isEqual'](_0x482860['newRange']))?_0x1f125e['model']['hasContent'](_0x7732b9)&&!_0x4b2a0d?this['isThreadsLoadingPaused']?_0x20af65['add'](_0x4938cc):this['_handleThreadMarker'](_0x4938cc,_0x1582da):(_0x531cb6['add'](_0x4938cc),_0x20af65['delete'](_0x4938cc),_0x218fa7['removeMarker'](_0x4938cc),_0x49ea09=!0x0):(_0x218fa7['updateMarker'](_0x4938cc,{'range':_0x7732b9}),_0x49ea09=!0x0);}return _0x49ea09;}),this['on']('change:isThreadsLoadingPaused',(_0x128463,_0x240165,_0x480a0a)=>{if(!_0x480a0a&&_0x20af65['size'])for(const _0x15a2a7 of _0x20af65){const {id:_0x6501ad}=er(_0x15a2a7);_0x20af65['delete'](_0x15a2a7),_0x1f125e['model']['markers']['get'](_0x15a2a7)&&this['_handleThreadMarker'](_0x15a2a7,_0x6501ad);}}),this['listenTo'](_0x1f125e['model']['document'],'change',()=>{for(const {name:_0x39cd35,data:{newRange:_0x5641b3}}of _0x1f125e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5b8e6d,id:_0x213449}=er(_0x39cd35);if('comment'!==_0x5b8e6d)continue;const _0xe817b5=_0x25369c['getCommentThread'](_0x213449),_0x330e75=this['hasMarkerForId'](_0x213449);_0xe817b5&&(!_0xe817b5['_hasTargetInContent']&&_0x5641b3&&_0x1f125e['editing']['view']['once']('render',()=>{const _0x1af99a=_0x1f125e['plugins']['get'](O),_0x2fc8ad=_0x25369c['_threadToController']['get'](_0xe817b5)['view'];_0x1af99a['getByInnerView'](_0x2fc8ad)['refreshVisibility']();},{'priority':'low'}),_0xe817b5['_hasTargetInContent']=_0x330e75||!!_0x5641b3),_0x5641b3||(_0x531cb6['add'](_0x39cd35),_0x20af65['delete'](_0x39cd35));}for(const _0x4ca4dc of _0x531cb6){const {id:_0x40156b}=er(_0x4ca4dc),_0x1a7dc4=_0x25369c['getCommentThread'](_0x40156b);if(_0x20af65['delete'](_0x4ca4dc),!_0x1a7dc4)continue;const _0xae77c=this['hasMarkerForId'](_0x40156b);_0xae77c||_0x1a7dc4['isSubmitted']?_0xae77c||_0x1a7dc4['unlinkedAt']||_0x1a7dc4['setUnlinkedAt'](new Date()):_0x1a7dc4['remove']();}_0x531cb6['clear']();});}['_handleInitialThreads'](_0x38af58){_0x38af58['forEach'](_0x11e338=>{_0x11e338['unlinkedAt']&&this['_attachArchivedThread'](_0x11e338['id']);});}['_getTargetForId'](_0x12977d){const _0x2c61a3=this['editor'],_0x431166=this['getAllMarkersForId'](_0x12977d);return et(_0x2c61a3['editing'],_0x431166);}['_getTextContext'](_0x3eda32){const _0x1f337d=this['getAllMarkersForId'](_0x3eda32);let _0x2ec1ba='',_0xdc1caf=!0x1;for(const _0x67cf6b of _0x1f337d){const _0x5a98d5=_0x67cf6b['getRange']();for(const _0x9fbe5b of Array['from'](_0x5a98d5['getItems']()))_0x9fbe5b['is']('$textProxy')?(_0x2ec1ba&&_0xdc1caf&&(_0x2ec1ba+='\x20',_0xdc1caf=!0x1),_0x2ec1ba+=_0x9fbe5b['data']):_0xdc1caf=!0x0;_0xdc1caf=!0x0;}return _0x2ec1ba['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x54f97e,_0x2479fe){const _0x4b5a28=this['editor'],_0x1b3778=_0x4b5a28['plugins']['get'](o);let _0x4d0f5c=_0x1b3778['getCommentThread'](_0x2479fe);const _0x196821=_0x4b5a28['config']['get']('collaboration.channelId'),_0x300e1c=_0x4b5a28['plugins']['get'](P);if(_0x4d0f5c&&(_0x4d0f5c['unlinkedAt']&&_0x4d0f5c['setUnlinkedAt'](null),_0x4d0f5c['isAttached']))return _0x4d0f5c;return!this['getAllMarkersForId'](_0x2479fe)[0x0]['managedUsingOperations']?_0x4b5a28['editing']['view']['once']('render',()=>{if(_0x1b3778['getCommentThread'](_0x2479fe))return;const _0x5361de=_0x4b5a28['plugins']['get'](O);_0x4d0f5c=_0x1b3778['openNewCommentThread']({'channelId':_0x196821,'threadId':_0x2479fe,'target':()=>this['_getTargetForId'](_0x2479fe),'context':{'type':'text','value':this['_getTextContext'](_0x2479fe)}});const _0x267ca3=_0x1b3778['_threadToController']['get'](_0x4d0f5c)['view'],_0x3dddbb=_0x5361de['getByInnerView'](_0x267ca3);_0x3dddbb&&_0x300e1c['registerAnnotation'](_0x3dddbb);},{'priority':'low'}):_0x1b3778['fetchCommentThread']({'channelId':_0x196821,'threadId':_0x2479fe})['then'](_0x35191e=>{if('destroyed'!==_0x4b5a28['state']){if(_0x4d0f5c=_0x35191e,_0x4d0f5c&&!_0x4d0f5c['isAttached']){const _0x15e29d=_0x4d0f5c['attachTo'](()=>this['_getTargetForId'](_0x2479fe));_0x300e1c['registerAnnotation'](_0x15e29d),_0x4d0f5c['isResolved']&&this['_reconvertMarkers'](_0x2479fe);}else{if(!_0x4d0f5c){const _0x5417d3=this['getAllMarkersForId'](_0x2479fe);_0x4b5a28['model']['change'](_0xb6a296=>{for(const _0x49ea0f of _0x5417d3)_0xb6a296['removeMarker'](_0x49ea0f);});}}}}),_0x4d0f5c;}['_handleThreadMarker'](_0x54c817,_0x2ad994){const _0x448fe8=this['_attachMarkerToThread'](_0x54c817,_0x2ad994);_0x448fe8&&!_0x448fe8['context']&&_0x448fe8['setContext']({'type':'text','value':this['_getTextContext'](_0x2ad994)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4750e2=this['editor'];ot(_0x4750e2['model'],({left:_0x505eb6,entered:_0x2acb63})=>{for(const _0x4fed45 of _0x505eb6)if(lt(_0x4fed45)){_0x4750e2['ui']['ariaLiveAnnouncer']['announce'](E(_0x4750e2['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2ccf7c of _0x2acb63)if(lt(_0x2ccf7c)){_0x4750e2['ui']['ariaLiveAnnouncer']['announce'](E(_0x4750e2['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x918704)));break;}});}}function mt(_0x21ec73,_0x48075f){return _0x48075f?_0x21ec73+':'+_0x48075f:_0x21ec73;}function er(_0x214e17){const _0x32c8ac=_0x214e17['split'](':');return{'group':_0x32c8ac[0x0],'id':_0x32c8ac[0x1],'part':_0x32c8ac[0x2]};}function ht(_0x337c6b,_0x4af8c3){const _0x36750e=_0x4af8c3['schema'],_0xa830ce=_0x4af8c3['createRange'](_0x337c6b['start']);for(const _0x144ddb of _0x337c6b['getWalker']()){const {type:_0x34d1eb,item:_0x1d5540,nextPosition:_0x3ace4b}=_0x144ddb;if('text'===_0x34d1eb||_0x36750e['isObject'](_0x1d5540)){const _0xe88491=_0x4af8c3['createPositionBefore'](_0x1d5540);_0xa830ce['isCollapsed']&&(_0xa830ce['start']=_0xe88491),_0xa830ce['end']=_0x3ace4b;}}return _0xa830ce;}function lt(_0x2f97be){return'comment'===er(_0x2f97be['name'])['group'];}class i extends _0x1b90ef{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x3fb171=this['editor'],_0x32630a=_0x3fb171['plugins']['get'](o),_0x487189=_0x3fb171['plugins']['get'](r),_0x1e5e39=_0x3fb171['plugins']['get'](O),_0xc330f2=_0x3fb171['plugins']['get'](P);_0x3fb171['ui']['componentFactory']['add']('comment',()=>{const _0x20814d=this['_createUIButton'](_0xada5a);return _0x20814d['tooltip']=!0x0,_0x20814d;}),_0x3fb171['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x558b83)),_0xc330f2['addSourceCollector'](()=>{const _0x3fc0e7=[];for(const [_0x869866,_0x353ce9]of _0x32630a['_threadToController']){const _0x44757a=_0x487189['getAllMarkersForId'](_0x869866['id']),_0xe503be=_0x44757a['map'](_0x258543=>_0x258543['getRange']());_0x44757a['length']>0x0&&_0x3fc0e7['push']([_0x353ce9['view'],_0xe503be]);}return _0x3fc0e7;}),this['listenTo'](_0x1e5e39,'change:activeAnnotations',(_0x51d216,_0xc0a81c,_0x16ccf9)=>{const _0x56732e=Array['from'](_0x16ccf9)['map'](_0x3b5986=>_0x3b5986['innerView'])['find'](_0x11f39a=>_0x32630a['_viewToController']['has'](_0x11f39a));if(!_0x56732e)return void(_0x487189['activeMarker']=null);const _0x1cb6bb=_0x32630a['_viewToController']['get'](_0x56732e)['model']['id'],_0xa2e21b='comment:'+_0x1cb6bb;_0x1cb6bb&&_0x487189['hasMarkerForId'](_0x1cb6bb)?_0x487189['activeMarker']=_0xa2e21b:_0x487189['activeMarker']&&(_0x487189['activeMarker']=null);}),this['listenTo'](_0x32630a,'removeCommentThread',(_0x175b0d,{threadId:_0xb78076,isFromAdapter:_0x4c4438})=>{!_0x4c4438&&_0x3fb171['ui']['focusTracker']['isFocused']&&_0x487189['hasMarkerForId'](_0xb78076)&&_0x3fb171['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x32630a,'addComment',(_0x55366a,{threadId:_0x2ffade,isFromAdapter:_0x38595b})=>{if(_0x38595b||!_0x487189['hasMarkerForId'](_0x2ffade)||!_0x32630a['hasCommentThread'](_0x2ffade))return;0x1===_0x32630a['getCommentThread'](_0x2ffade)['length']&&(_0x3fb171['editing']['view']['focus'](),_0x55366a['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1df529=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x13afe1;for(const _0x5ea62d in _0x1df529){const _0x2d2cdf=_0x5ea62d,_0x11d9e3=_0x1df529[_0x2d2cdf];if('commentsLicenseKeyValid'==_0x11d9e3||'commentsLicenseKeyInvalid'==_0x11d9e3||'commentsLicenseKeyExpired'==_0x11d9e3||'commentsLicenseKeyDomainLimit'==_0x11d9e3||'commentsLicenseKeyNotAllowed'==_0x11d9e3||'commentsLicenseKeyEvaluationLimit'==_0x11d9e3||'commentsLicenseKeyTrialLimit'==_0x11d9e3||'commentsLicenseKeyUsageLimit'==_0x11d9e3){delete _0x1df529[_0x2d2cdf],_0x13afe1=_0x11d9e3,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x13afe1&&_0x1df529['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x13afe1&&_0x1df529['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x13afe1&&_0x1df529['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x13afe1&&_0x1df529['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x13afe1&&_0x1df529['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x13afe1&&_0x1df529['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x13afe1&&_0x1df529['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2df6e2){const _0x39fa3c=this['editor'],_0x4ea7c2=new _0x2df6e2(_0x39fa3c['locale']),_0x4958f6=_0x39fa3c['commands']['get']('addCommentThread');return _0x4ea7c2['set']({'label':E(_0x39fa3c['locale'],'Comment'),'icon':_0x22b197}),_0x4ea7c2['bind']('isEnabled')['to'](_0x4958f6),this['listenTo'](_0x4ea7c2,'execute',()=>{_0x4958f6['execute']();}),_0x4ea7c2;}}class s extends _0x1b90ef{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2898d1){super(_0x2898d1),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1e1e69,_0x1d4a4b,_0x546558)=>{_0x546558?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x501a40,_0x1b7818]of this['editor']['commands'])_0x1b7818['affectsData']&&'addCommentThread'!==_0x501a40&&_0x1b7818['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 _0x2fcac8=this['editor']['editing']['view']['document'];this['listenTo'](_0x2fcac8,'cut',_0x703e6=>_0x703e6['stop'](),{'priority':'highest'}),this['listenTo'](_0x2fcac8,'clipboardInput',_0x238502=>_0x238502['stop'](),{'priority':'highest'}),this['listenTo'](_0x2fcac8,'delete',_0x3ffd21=>_0x3ffd21['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x565c21,_0x328cc8]of this['editor']['commands'])_0x328cc8['affectsData']&&'addCommentThread'!==_0x565c21&&_0x328cc8['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 M extends _0xb0fdc5{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4db6b6){super(_0x4db6b6),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2006a3=this['context']['plugins']['get'](O);this['listenTo'](_0x2006a3,'_activateAnnotation',(_0x256d82,_0x45c534)=>{for(const _0xfa62e0 of this['activeUIs']){const _0x264217=this['_uis']['get'](_0xfa62e0);(0x0,this['uisData']['get'](_0xfa62e0)['filter'])(_0x45c534)&&_0x264217['setActiveAnnotation'](_0x45c534);}}),this['listenTo'](_0x2006a3,'_deactivateAllAnnotations',()=>{for(const _0x46c54c of this['activeUIs']){this['_uis']['get'](_0x46c54c)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2006a3['_visibleAnnotations'],'add',(_0x14b277,_0xcc9f40)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xcc9f40);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5b8e88){return this['activeUIs']['has'](_0x5b8e88);}['activate'](_0x233b5a,_0x4d8153=this['defaultFilter']){const _0x523014=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x233b5a))throw new _0x4877d5('annotationsuis-missing-ui',this,{'uiName':_0x233b5a});this['isActive'](_0x233b5a)&&this['deactivate'](_0x233b5a),this['activeUIs']['add'](_0x233b5a);const _0xa80c5d=new _();!function({source:_0x23c7ae,target:_0x5232ba,filter:_0xa22ce}){for(const _0x49ddcd of _0x23c7ae)_0xa22ce(_0x49ddcd)&&_0x5232ba['add'](_0x49ddcd);_0x5232ba['listenTo'](_0x23c7ae,'add',(_0x29bd5f,_0x4a18fa)=>{_0xa22ce(_0x4a18fa)&&_0x5232ba['add'](_0x4a18fa);}),_0x5232ba['listenTo'](_0x23c7ae,'remove',(_0x14f775,_0x55b2d1)=>{_0x5232ba['has'](_0x55b2d1)&&_0x5232ba['remove'](_0x55b2d1);});}({'source':_0x523014['_visibleAnnotations'],'target':_0xa80c5d,'filter':_0x4d8153}),this['uisData']['set'](_0x233b5a,{'collection':_0xa80c5d,'filter':_0x4d8153});const _0xc48c9a=this['_uis']['get'](_0x233b5a);_0xc48c9a['attach'](_0xa80c5d),this['listenTo'](_0xc48c9a,'change:activeAnnotation',(_0x4da25e,_0x3456e0,_0x2d6442,_0x4c74e2)=>{_0x4c74e2&&_0x523014['_removeActiveAnnotation'](_0x4c74e2),_0x2d6442&&_0x523014['_addActiveAnnotation'](_0x2d6442);});}['deactivate'](_0x82538b){if(this['activeUIs']['delete'](_0x82538b),!this['_uis']['has'](_0x82538b))throw new _0x4877d5('annotationsuis-missing-ui',this,{'uiName':_0x82538b});const _0xf0e8d9=this['_uis']['get'](_0x82538b);_0xf0e8d9['detach'](),this['stopListening'](_0xf0e8d9),this['uisData']['get'](_0x82538b)['collection']['destroy'](),this['uisData']['delete'](_0x82538b);}['switchTo'](_0x2ab9a7){if(!this['_uis']['has'](_0x2ab9a7))throw new _0x4877d5('annotationsuis-missing-ui',this,{'uiName':_0x2ab9a7});const _0xea88bd=this['context']['plugins']['get'](O),_0x4235df=Array['from'](_0xea88bd['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2ab9a7);const _0x53c388=this['_uis']['get'](_0x2ab9a7);_0x53c388['setActiveAnnotation'](_0x4235df),_0x53c388['_setSelectedAnnotations']&&_0x4235df&&_0x53c388['_setSelectedAnnotations']([_0x4235df]);}['deactivateAll'](){for(const _0x408f29 of this['activeUIs'])this['deactivate'](_0x408f29);}['register'](_0x3fdc53,_0xd7c68){if(this['_uis']['has'](_0x3fdc53))throw new _0x4877d5('annotationsuis-register-already-registered');if('function'!=typeof _0xd7c68['attach']||'function'!=typeof _0xd7c68['detach']||'function'!=typeof _0xd7c68['setActiveAnnotation'])throw new _0x4877d5('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3fdc53,_0xd7c68);}['refilterAnnotations'](){const _0x54ccc8=this['context']['plugins']['get'](O)['collection'],_0x3cd179=new Map(),_0x38a9de=Array['from'](this['activeUIs']);for(const _0x1249d4 of this['activeUIs']){const _0x3b7ce4=this['uisData']['get'](_0x1249d4)['collection'];for(const _0x120072 of _0x3b7ce4)_0x3cd179['set'](_0x120072,_0x1249d4);}for(const _0x5901ff of _0x54ccc8){const _0x29812d=_0x3cd179['get'](_0x5901ff);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5901ff);const _0x294a72=_0x38a9de['find'](_0xa7a40c=>this['uisData']['get'](_0xa7a40c)['filter'](_0x5901ff));_0x29812d!==_0x294a72&&(_0x29812d&&this['uisData']['get'](_0x29812d)['collection']['remove'](_0x5901ff),_0x294a72&&this['uisData']['get'](_0x294a72)['collection']['add'](_0x5901ff));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x413407){const _0x7420f0=[];for(const _0x2f0893 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2f0893)['filter'])(_0x413407)&&_0x7420f0['push'](_0x2f0893);}if(_0x7420f0['length']>0x1)throw new _0x4877d5('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x7420f0,'annotationType':_0x413407['type']});}}const pi=Dt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x423d19){super(_0x423d19);const _0xd91318=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 _0x4e787a(),this['focusCycler']=new _0x420628({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0xd91318['to']('class')],'style':{'minHeight':_0xd91318['to']('minHeight',_0x1ed0c8=>'number'==typeof _0x1ed0c8?pi(_0x1ed0c8+0xa):null)},'dir':_0x423d19['uiLanguageDirection'],'role':'application','aria-label':E(_0x423d19,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x423d19,'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',_0x245b24=>{this['_updateItemPositionInFocusables'](_0x245b24['source']);}),this['list']['forEach'](_0x44491c=>{this['focusTracker']['add'](_0x44491c['element']),this['_updateItemPositionInFocusables'](_0x44491c);}),this['list']['on']('change',(_0x4e3a21,_0x42cc0e)=>{for(const _0x1c01c8 of _0x42cc0e['removed'])this['focusTracker']['remove'](_0x1c01c8['element']),this['focusables']['remove'](_0x1c01c8);for(const _0x43c941 of _0x42cc0e['added'])this['focusTracker']['add'](_0x43c941['element']),this['_updateItemPositionInFocusables'](_0x43c941);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x3bce62){const _0x5bef13=this['focusables']['getIndex'](_0x3bce62);let _0x2eb382,_0xa66988;for(const _0x5e4dcf of this['focusables'])if(_0x3bce62['top']<_0x5e4dcf['top']){_0x2eb382=_0x5e4dcf;break;}if(_0xa66988=_0x2eb382?this['focusables']['getIndex'](_0x2eb382):this['focusables']['length'],-0x1!==_0x5bef13){if(_0x5bef13===_0xa66988-0x1)return;this['focusables']['remove'](_0x3bce62),_0xa66988=_0x2eb382?this['focusables']['getIndex'](_0x2eb382):this['focusables']['length'];}this['focusables']['add'](_0x3bce62,_0xa66988);}}const Ht=Dt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1d87a7){super(_0x1d87a7),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x22321f,_0x4235cb)=>_0x22321f+_0x4235cb),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=J(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4716fe=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4716fe['to']('isAnimationDisabled',_0x3ef406=>_0x3ef406?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4716fe['to']('top',_0x533c3f=>Ht(_0x533c3f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x346cdc=this['element']['clientHeight'];_0x346cdc&&(this['height']=_0x346cdc);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xb0fdc5{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19f4b7){super(_0x19f4b7),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 _0x130783=this['context']['config']['get']('sidebar.container');_0x130783&&this['setContainer'](_0x130783);}['setContainer'](_0x504b9b){if(!y(_0x504b9b))throw new _0x4877d5('sidebar-setcontainer-invalid-element');this['container']=_0x504b9b;}['_attachToContainer']({viewClass:_0x3760a9='',spaceBetweenItems:_0x468b7e=0x19}={}){if(!y(this['container']))throw new _0x4877d5('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3760a9,this['_spaceBetweenItems']=_0x468b7e;}['rearrange']({removedAnnotation:_0x3e8bf1,previousAnnotation:_0x4b8e31,nextAnnotation:_0x450037}){const _0x27dd00=this['getSidebarItemView'](_0x3e8bf1);this['view']['list']['remove'](_0x27dd00),this['_destroySidebarItemView'](_0x3e8bf1),_0x4b8e31&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4b8e31)),_0x450037&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x450037)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x556fd3,activatedAnnotation:_0x44bd6f,disableAnimationOnActivatedAnnotation:_0x3480a5}){if(this['_activeAnnotation']=_0x44bd6f,_0x556fd3){_0x556fd3['isActive']=!0x1;const _0x5011cb=this['getSidebarItemView'](_0x556fd3);_0x5011cb&&_0x3480a5&&(_0x5011cb['isAnimationDisabled']=!0x1);}if(_0x44bd6f){const _0x1cc3f6=this['getSidebarItemView'](_0x44bd6f);_0x1cc3f6&&(_0x44bd6f['isActive']=!0x0,_0x3480a5&&(_0x1cc3f6['isAnimationDisabled']=!0x0,_0x1cc3f6['top']+=0x1),this['_alignToTargetRect'](_0x1cc3f6));}}['_detachFromContainer'](_0x2cad38){if(this['view']['element']['remove'](),_0x2cad38){for(const _0x2a87b4 of _0x2cad38)this['_destroySidebarItemView'](_0x2a87b4);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1dfddb,_0x1da2ca){_0x1da2ca||(_0x1da2ca=_0x1dfddb['view']);const _0x57b417=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x57b417,_0x1dfddb),this['_annotationToSidebarItemView']['set'](_0x1dfddb,_0x57b417),_0x57b417['content']['add'](_0x1da2ca),this['listenTo'](_0x1dfddb['view'],'change:targetRect',(_0x1c8c6b,_0x385deb,_0x1d624a)=>{const _0x5944bd=this['_getTargetTop'](_0x1dfddb,_0x1d624a);_0x57b417['_targetTop']!=_0x5944bd&&(_0x57b417['_targetTop']=_0x5944bd,this['_setItemTop'](_0x57b417,_0x5944bd));}),this['listenTo'](_0x57b417,'change:top',()=>{this['_recalculate'](_0x57b417,'top');}),this['listenTo'](_0x57b417,'change:bottom',()=>{this['_recalculate'](_0x57b417,'bottom');}),this['_alignToTargetRect'](_0x57b417);const _0x381a81=this['_getItemBefore'](_0x57b417);if(_0x381a81)this['_alignAfterItem'](_0x381a81,_0x57b417)||this['_alignToTargetRect'](_0x57b417);else this['_alignToTargetRect'](_0x57b417);return this['_updateLastItem'](),this['view']['list']['add'](_0x57b417),_0x57b417;}['_alignForTopChange'](_0x1836fa){if(!_0x1836fa['content']['length'])return;const _0x4315eb=this['_getItemBefore'](_0x1836fa);if(!_0x4315eb)return;const _0x31bf0e=this['_sidebarItemViewToAnnotation']['get'](_0x4315eb),_0x36169c=this['_activeAnnotation'];_0x36169c&&_0x36169c===_0x31bf0e?this['_alignAfterItem'](_0x4315eb,_0x1836fa):this['_alignBeforeItem'](_0x1836fa,_0x4315eb);}['_alignForBottomChange'](_0x2559cf){if(!_0x2559cf['content']['length'])return;const _0xf188b1=this['_getItemAfter'](_0x2559cf);if(!_0xf188b1)return;const _0x11a94c=this['_sidebarItemViewToAnnotation']['get'](_0xf188b1),_0x461808=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xf2dcf5=this['_activeAnnotation'];_0xf2dcf5&&_0xf2dcf5===_0x11a94c&&_0x461808?(this['_alignBeforeItem'](_0xf188b1,_0x2559cf),this['_alignAfterItem'](_0x2559cf,_0xf188b1)):_0xf2dcf5&&_0xf2dcf5===_0x11a94c?this['_alignBeforeItem'](_0xf188b1,_0x2559cf):this['_alignAfterItem'](_0x2559cf,_0xf188b1);}['_recalculate'](_0x339139,_0x217c29){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x21c1eb,changedProp:_0x182f76}of this['_recalculateBuffer'])'top'===_0x182f76?this['_alignForTopChange'](_0x21c1eb):this['_alignForBottomChange'](_0x21c1eb);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x339139,'changedProp':_0x217c29});}['getSidebarItemView'](_0x4f7865){return this['_annotationToSidebarItemView']['get'](_0x4f7865);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4e3d91){const _0x4c0064=this['getSidebarItemView'](_0x4e3d91);this['stopListening'](_0x4c0064),this['stopListening'](_0x4e3d91['view']),_0x4c0064['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4e3d91),this['_sidebarItemViewToAnnotation']['delete'](_0x4c0064);}['_createSidebarView'](){const _0x1e3d75=new F(this['context']['locale']);return _0x1e3d75['render'](),this['on']('change:_lastItem',(_0xc21121,_0x1acffe,_0x43d840,_0x98784a)=>{_0x98784a&&_0x1e3d75['unbind']('minHeight'),_0x43d840?_0x1e3d75['bind']('minHeight')['to'](_0x43d840,'bottom'):_0x1e3d75['minHeight']=null;}),_0x1e3d75;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x568b44){const _0xfd1b6a=this['_sidebarItemViewToAnnotation']['get'](_0x568b44),_0x2e838c=_0xfd1b6a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xfd1b6a)-0x1);return _0x2e838c&&this['getSidebarItemView'](_0x2e838c)||null;}['_getItemAfter'](_0x56a4b7){const _0x2c6404=this['_sidebarItemViewToAnnotation']['get'](_0x56a4b7),_0x11605a=_0x2c6404&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2c6404)+0x1);return _0x11605a&&this['getSidebarItemView'](_0x11605a)||null;}['_alignBeforeItem'](_0x2070a6,_0x1cbfc7){_0x2070a6['updateHeight']();const _0x12fe14=R(_0x1cbfc7['bottom']+this['_spaceBetweenItems'],_0x2070a6['top']);return!!_0x12fe14&&(this['_setItemTop'](_0x1cbfc7,_0x1cbfc7['top']-_0x12fe14),!0x0);}['_alignAfterItem'](_0x350e64,_0x25e522){_0x350e64['updateHeight']();const _0x137fc5=R(_0x350e64['bottom']+this['_spaceBetweenItems'],_0x25e522['top']);return!!_0x137fc5&&(this['_setItemTop'](_0x25e522,_0x25e522['top']+_0x137fc5,!0x1),!0x0);}['_alignToTargetRect'](_0x253823){const _0x2b1e7d=this['_sidebarItemViewToAnnotation']['get'](_0x253823);if(!_0x2b1e7d||!_0x2b1e7d['target']||!_0x2b1e7d['targetRect'])return;const _0x501299=this['_getTargetTop'](_0x2b1e7d,_0x2b1e7d['targetRect']);this['_setItemTop'](_0x253823,_0x501299);}['_getTargetTop'](_0x41ba0f,_0x1b647e){if(null===_0x1b647e)return 0x0;if(_0x41ba0f['target']instanceof _0x38453a)return _0x1b647e['top'];{const _0x148936=new _0x38453a(this['view']['element'])['top'];return _0x1b647e['top']-_0x148936;}}['_setItemTop'](_0x499a62,_0x3dad7,_0x58d727=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x58d727&&(_0x3dad7=Math['max'](_0x3dad7,this['_getMaxAvailableTop'](_0x499a62))),_0x499a62['top']=_0x3dad7;}['_getMaxAvailableTop'](_0x5be315){let _0x3afc4=this['_getItemBefore'](_0x5be315),_0x1adcad=0x0;for(;_0x3afc4;)_0x3afc4['updateHeight'](),_0x1adcad+=this['_spaceBetweenItems']+_0x3afc4['height'],_0x3afc4=this['_getItemBefore'](_0x3afc4);return _0x1adcad;}}function R(_0x13bb40,_0x84a852){return Math['max'](_0x13bb40-_0x84a852,0x0);}function y(_0x1359fd){return null!==_0x1359fd&&'object'==typeof _0x1359fd&&0x1===_0x1359fd['nodeType'];}class e extends _0xb0fdc5{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x26d726){super(_0x26d726),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1990b8(),this['_refreshPositioningDebounced']=_0xd76232(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4da4b2=this['context']['plugins']['get'](M),_0x53abcb=this['context']['plugins']['get'](z);_0x4da4b2['register']('wideSidebar',this),_0x53abcb['container']&&_0x4da4b2['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x59c06b){if(_0x59c06b===this['activeAnnotation'])return;const _0x104ed7=this['context']['plugins']['get'](z);_0x104ed7['_activeAnnotation']=_0x59c06b;const _0x9ee7e8=this['activeAnnotation'];_0x104ed7['refresh']({'blurredAnnotation':_0x9ee7e8,'activatedAnnotation':_0x59c06b}),this['activeAnnotation']=_0x59c06b;}['attach'](_0x4789ac){this['annotations']=_0x4789ac;const _0xb0597f=this['context']['plugins']['get'](z);if(_0xb0597f['_annotations']=_0x4789ac,this['isAttached'])throw new _0x4877d5('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xb0597f,'set:container',()=>{this['detach'](),this['listenTo'](_0xb0597f,'change:container',_0x266d9a=>{_0x266d9a['off'](),this['attach'](_0x4789ac);});}),_0xb0597f['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x216121=_0x2b53f2=>{_0x2b53f2['updateTargetRect'](),_0xb0597f['addAnnotation'](_0x2b53f2);};for(const _0x39b4c3 of _0x4789ac)_0x216121(_0x39b4c3);this['listenTo'](_0x4789ac,'add',(_0x2a9018,_0xfc9c2d)=>{_0x216121(_0xfc9c2d);}),this['listenTo'](_0x4789ac,'remove',(_0x26683c,_0x5c7679,_0x17b2a4)=>{_0xb0597f['rearrange']({'removedAnnotation':_0x5c7679,'previousAnnotation':_0x4789ac['get'](_0x17b2a4-0x1),'nextAnnotation':_0x4789ac['get'](_0x17b2a4+0x1)}),_0x5c7679===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4789ac,'focus',(_0x42b668,_0x5f0498)=>{this['setActiveAnnotation'](_0x5f0498);}),this['listenTo'](_0x4789ac,'blur',()=>{this['setActiveAnnotation'](null);});const _0x32b4b2=this['context']instanceof _0x20d897?this['context']['editors']:new _0x1990b8([this['context']]);for(const _0x588bef of _0x32b4b2)this['_integrateWithEditorAnnotations'](_0x588bef);this['listenTo'](_0x32b4b2,'add',(_0x4bcc49,_0x267bf4)=>{this['listenTo'](_0x267bf4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x267bf4);});}),this['listenTo'](_0x32b4b2,'remove',(_0x5d64b2,_0x560d5c)=>{_0x560d5c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x560d5c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4877d5('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x475c78=this['context']['plugins']['get'](z);_0x475c78['_detachFromContainer'](this['annotations']),this['stopListening'](_0x475c78),this['stopListening'](this['annotations']),this['context']instanceof _0x20d897&&this['stopListening'](this['context']['editors']);for(const _0x46a015 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x46a015);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3cf03a){if(!_0x3cf03a['plugins']['has']('EditorAnnotations'))return;const _0x3fe5b5=_0x3cf03a['plugins']['get']('EditorAnnotations'),_0xa2a950=()=>{const _0x3002f6=_0x3fe5b5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3002f6[0x0]||null);};this['listenTo'](_0x3fe5b5,'refresh',_0xa2a950),this['listenTo'](_0x3fe5b5,'blur',(_0x4840b5,{isAnnotationTracked:_0x1abe0d})=>{this['activeAnnotation']&&_0x1abe0d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3fe5b5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x233a1c=>{_0x3fe5b5['hasDomSelection']()&&(_0xa2a950(),_0x233a1c['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3fe5b5);}['_destroyEditorAnnotationsIntegration'](_0x5c3551){this['stopListening'](_0x5c3551),this['_editorAnnotations']['remove'](_0x5c3551);}}class C extends _0xada5a{['counterView'];constructor(_0x25bda0){super(_0x25bda0);const _0x4cdf7f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x34fd5e,_0x1e18f0)=>_0x34fd5e?'...':_0x1e18f0['toString']()),this['set']('annotationType',''),this['icon']=_0x22b197,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4cdf7f['to']('annotationType',_0x501b4a=>'ck-annotation-counter__badge--'+_0x501b4a),_0x4cdf7f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4cdf7f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xb0fdc5{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e3282){super(_0x5e3282),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x5ae503),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1990b8(),this['_refreshPositioningDebounced']=_0xd76232(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3294cf(this['context']['locale']),this['balloonPanelView']=new _0x41e242(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5e783c){this['annotations']=_0x5e783c;const _0x8761db=this['context']['plugins']['get'](z),_0x4f12c4=this['balloonPanelView'];if(_0x8761db['_annotations']=_0x5e783c,this['isAttached'])throw new _0x4877d5('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x8761db,'set:container',()=>{this['detach'](),this['listenTo'](_0x8761db,'change:container',_0x11faba=>{_0x11faba['off'](),this['attach'](_0x5e783c);});}),_0x8761db['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xd81199=_0x3b88b5=>{const _0x4816ae=new C(this['context']['locale']);_0x8761db['addAnnotation'](_0x3b88b5,_0x4816ae),this['_annotationToNarrowView']['set'](_0x3b88b5,_0x4816ae),_0x4816ae['bind']('isDirty','annotationType','number')['to'](_0x3b88b5['view'],'isDirty','type','length'),_0x4816ae['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4f12c4['content']['first']!==_0x3b88b5['view']?(this['_showBalloon'](_0x3b88b5),_0x3b88b5['view']['element']['focus'](),this['setActiveAnnotation'](_0x3b88b5)):this['setActiveAnnotation'](null);});};for(const _0x29dea8 of _0x5e783c)_0xd81199(_0x29dea8);this['listenTo'](_0x5e783c,'add',(_0x5c82f3,_0x3229d8)=>{_0xd81199(_0x3229d8);}),this['listenTo'](_0x5e783c,'remove',(_0x59f3c3,_0x1e0187,_0x319785)=>{this['_annotationToNarrowView']['get'](_0x1e0187)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1e0187),_0x8761db['rearrange']({'removedAnnotation':_0x1e0187,'previousAnnotation':_0x5e783c['get'](_0x319785-0x1),'nextAnnotation':_0x5e783c['get'](_0x319785+0x1)}),_0x1e0187===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5e783c,'focus',(_0x2e0c3b,_0x203ddf)=>{this['setActiveAnnotation'](_0x203ddf);}),this['listenTo'](_0x5e783c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1f8407,_0x548791)=>{_0x548791['keyCode']===_0x55d262['esc']&&_0x4f12c4['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4f12c4['content']['first']),this['_hideBalloon'](),_0x548791['stopPropagation'](),_0x548791['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x561347,_0x5e65f9)=>{const _0x3e1f49=_0x5e65f9['target'];_0x4f12c4['isVisible']&&_0x4f12c4['element']['contains'](_0x3e1f49)||_0x8761db['view']['element']['contains'](_0x3e1f49)||_0x561347['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x40d7d0=>_0x40d7d0['contains'](_0x3e1f49))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1c74bc=this['context']instanceof _0x20d897?this['context']['editors']:new _0x1990b8([this['context']]);for(const _0x260fde of _0x1c74bc)this['_integrateWithEditorAnnotations'](_0x260fde);this['listenTo'](_0x1c74bc,'add',(_0x4c253d,_0x536cdb)=>{this['listenTo'](_0x536cdb,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x536cdb);});}),this['listenTo'](_0x1c74bc,'remove',(_0x10cb7c,_0x558da2)=>{_0x558da2['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x558da2['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4a158a){if(_0x4a158a===this['activeAnnotation'])return;const _0x4de1af=this['context']['plugins']['get'](z);if(_0x4de1af['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4a158a,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4a158a)_0x4de1af['getSidebarItemView'](_0x4a158a)?this['_showBalloon'](_0x4a158a):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4a158a;}['detach'](){if(!this['isAttached'])throw new _0x4877d5('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x595e43=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xe4276f=>_0xe4276f['destroy']()),this['_annotationToNarrowView']['clear'](),_0x595e43['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x20d897&&this['stopListening'](this['context']['editors']);for(const _0x5f49ee of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5f49ee);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'](_0x290c61){if(!_0x290c61['plugins']['has']('EditorAnnotations'))return;const _0x569dac=_0x290c61['plugins']['get']('EditorAnnotations'),_0x7546c5=this['context']['plugins']['get'](z),_0xfb0f4c=this['annotations'],_0x20b692=this['balloonPanelView'],_0x2fa1bd=()=>{const _0x112f69=_0x569dac['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x112f69),this['setActiveAnnotation'](_0x112f69[0x0]||null);};this['listenTo'](_0x569dac,'refresh',_0x2fa1bd),this['listenTo'](_0x569dac,'blur',(_0x3da062,{isAnnotationTracked:_0xc1d42b})=>{this['activeAnnotation']&&_0xc1d42b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x569dac,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xfb0f4c,'blur',_0x16adb1=>{_0x569dac['hasDomSelection']()&&_0x16adb1['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x155d84,_0x4cf7ec)=>{const _0x451bc5=_0x4cf7ec['target'];_0x20b692['isVisible']&&_0x20b692['element']['contains'](_0x451bc5)||_0x7546c5['view']['element']['contains'](_0x451bc5)||this['activeAnnotation']&&_0x569dac['hasDomSelection']()&&(_0x2fa1bd(),_0x155d84['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x569dac);}['_destroyEditorAnnotationsIntegration'](_0x57cdb1){_0x57cdb1&&(this['stopListening'](_0x57cdb1),this['_editorAnnotations']['remove'](_0x57cdb1));}['_setSelectedAnnotations'](_0x1f9eba){for(const _0x228b72 of this['_selectedAnnotations'])_0x1f9eba['includes'](_0x228b72)||this['_manuallyClosedAnnotationViews']['delete'](_0x228b72['view']);this['_selectedAnnotations']=_0x1f9eba;}['_refreshPositioning'](){const _0x7f2f61=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x7f2f61['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x22ddf7){if(this['_manuallyClosedAnnotationViews']['has'](_0x22ddf7['view']))return;const _0x4a3c3b=this['balloonPanelView']['content']['first'];_0x4a3c3b!==_0x22ddf7['view']?(_0x4a3c3b&&this['_detachListeners'](_0x4a3c3b),this['_attachListeners'](_0x22ddf7['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x22ddf7['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xb94ad4=this['balloonPanelView']['content']['first'],_0xcd14a9=_0xb94ad4&&this['annotations']['getByView'](_0xb94ad4);if(!_0xcd14a9||!this['_annotationToNarrowView']['has'](_0xcd14a9))return;const _0x2260f4=this['_annotationToNarrowView']['get'](_0xcd14a9)['element'],_0x1aae93=(function(){const _0x218848=_0x41e242['defaultPositions'];return[_0x218848['southArrowNorthEast'],_0x218848['northArrowSouthEast'],_0x218848['southArrowNorth'],_0x218848['northArrowSouth'],_0x218848['southArrowNorthWest'],_0x218848['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2260f4,'positions':_0x1aae93});}['_hideBalloon'](){const _0x3d5664=this['balloonPanelView'],_0x1c6c2f=_0x3d5664['content']['first'];_0x1c6c2f&&(this['_detachListeners'](_0x1c6c2f),_0x3d5664['unpin'](),_0x3d5664['content']['clear']());}['_attachListeners'](_0x10734b){this['listenTo'](_0x10734b,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x10734b,'Esc',(_0x5050a4,_0x11a123)=>{this['_manuallyClosedAnnotationViews']['add'](_0x10734b),this['_hideBalloon'](),_0x11a123();});}['_detachListeners'](_0x5887c0){this['stopListening'](_0x5887c0);}}class c extends _0x1b90ef{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x3a7997,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3448f3){super(_0x3448f3),_0x3448f3['editing']['view']['addObserver'](_0x19e0b5),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x3448f3['plugins']['get'](_0x3a7997),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x1e5a41=this['editor']['plugins']['get'](M);_0x1e5a41['context']===this['editor']&&(_0x1e5a41['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x32288d,_0x7b05ce)=>{const _0x57a0e9=this['_balloon'];if(this['isAttached']&&_0x57a0e9['visibleView']){const _0x5358f4=this['annotations']['getByView'](_0x57a0e9['visibleView']);_0x5358f4&&this['_closeAnnotation'](_0x5358f4),_0x7b05ce();}}));}['afterInit'](){const _0x4f1666=this['editor']['plugins']['get'](M);_0x4f1666['context']===this['editor']&&(_0x4f1666['hasActive']()||_0x4f1666['switchTo']('inline'));}['setActiveAnnotation'](_0x20bf90){_0x20bf90!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x20bf90&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x20bf90)&&this['_addAnnotationToBalloon'](_0x20bf90,!0x0),_0x20bf90['isActive']=!0x0),_0x20bf90||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x20bf90);}['attach'](_0x142153){this['annotations']=_0x142153;const _0x4a3d03=this['editor']['plugins']['get'](M),_0x44b6da=this['_balloon'];if(this['isAttached'])throw new _0x4877d5('inlineannotations-attach-already-attached',this);if(_0x4a3d03['context']!==this['editor'])throw new _0x4877d5('inlineannotations-not-allowed-with-context',this);const _0x5eef78=this['editor']['plugins']['get'](P);this['listenTo'](_0x5eef78,'refresh',()=>{const _0x24d53b=_0x5eef78['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3aa79d,_0x35ec5d;!this['_forceRefresh']&&(_0x3aa79d=_0x24d53b,_0x35ec5d=this['_selectedAnnotations'],_0x3aa79d['length']===_0x35ec5d['length']&&_0x3aa79d['every'](_0x358793=>_0x35ec5d['includes'](_0x358793)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x24d53b),this['setActiveAnnotation'](_0x24d53b[0x0]||null));}),this['listenTo'](_0x5eef78,'blur',(_0x4ce008,{isAnnotationTracked:_0x345a96})=>{this['activeAnnotation']&&_0x345a96(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x345c05,_0x428e76,_0x44ef4f)=>{_0x44ef4f||this['setActiveAnnotation'](null);}),this['listenTo'](_0x142153,'remove',(_0x24ce0d,_0x494b3b)=>{this['_removeAnnotationFromBalloon'](_0x494b3b),_0x494b3b===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x44b6da,'change:visibleView',(_0x122cc4,_0x363438,_0x1425ab,_0x44412f)=>{_0x44412f&&this['stopListening'](_0x44412f);const _0x4d8ddb=_0x142153['getByView'](_0x1425ab);_0x1425ab&&_0x4d8ddb&&(this['listenTo'](_0x1425ab,'change:height',()=>{_0x44b6da['updatePosition']();}),this['listenTo'](_0x1425ab,'Esc',()=>{this['_closeAnnotation'](_0x4d8ddb),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4d8ddb&&this['setActiveAnnotation'](_0x4d8ddb));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x44b6da['visibleView']&&(_0x142153['getByView'](_0x44b6da['visibleView'])&&_0x44b6da['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 _0x4877d5('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x156ef0 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x156ef0);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x25ec4f){for(const _0x3bfd4f of this['_selectedAnnotations'])_0x25ec4f['includes'](_0x3bfd4f)||this['_manuallyClosed']['delete'](_0x3bfd4f);for(const _0xa10fb7 of this['annotations'])_0x25ec4f['includes'](_0xa10fb7)||this['_removeAnnotationFromBalloon'](_0xa10fb7);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3e80d4 of _0x25ec4f)this['_addAnnotationToBalloon'](_0x3e80d4);}this['_selectedAnnotations']=_0x25ec4f;}['_addAnnotationToBalloon'](_0x5750ba,_0x52724d=!0x1){this['_manuallyClosed']['has'](_0x5750ba)||(this['_addedAnnotations']['has'](_0x5750ba)||this['_balloon']['hasView'](_0x5750ba['view'])||(this['_addedAnnotations']['add'](_0x5750ba),this['_balloon']['add']({'stackId':_0x5750ba['view']['id'],'view':_0x5750ba['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5750ba)}})),_0x52724d&&this['_balloon']['showStack'](_0x5750ba['view']['id']));}['_getBalloonTargetForAnnotation'](_0x18181f){const _0x2ae9db=_0x18181f['target'],_0x30a0e1=this['editor']['editing']['view'],_0x2366a1=_0x30a0e1['document']['selection']['getFirstRange'](),_0x33358e=_0x30a0e1['domConverter']['viewRangeToDom'](_0x2366a1);if(_0x33358e['collapse'](!0x0),_0x2ae9db){if(_0x2ae9db instanceof _0x38453a)return _0x2ae9db;let _0xbb02ca=[];for(const _0x4584fc of _0x2ae9db)_0xbb02ca['push'](...(_0x48b86b=_0x4584fc['getClientRects'](),Array['from'](_0x48b86b)['map'](DOMRect['fromRect'])));_0xbb02ca=function(_0x1cbb13){const _0x48d69e=[];let _0x296b25=_0x1cbb13[0x0];for(let _0x550a57=0x1;_0x550a57<_0x1cbb13['length'];_0x550a57++)B(_0x296b25,_0x1cbb13[_0x550a57])?_0x296b25['width']+=_0x1cbb13[_0x550a57]['width']:(_0x48d69e['push'](_0x296b25),_0x296b25=_0x1cbb13[_0x550a57]);return _0x48d69e['push'](_0x296b25),_0x48d69e;}(_0xbb02ca);const _0x34b7a5=_0x33358e['getBoundingClientRect']();return _0xbb02ca['find'](_0xd5c149=>_0xd5c149['top']<=_0x34b7a5['top']&&_0xd5c149['bottom']>=_0x34b7a5['bottom']&&_0xd5c149['left']<=_0x34b7a5['left']&&_0xd5c149['right']>=_0x34b7a5['right'])||_0xbb02ca[0x0];}var _0x48b86b;return _0x18181f['targetRect']||_0x33358e;}['_removeAnnotationFromBalloon'](_0x532ce3){this['_addedAnnotations']['has'](_0x532ce3)&&this['_balloon']['hasView'](_0x532ce3['view'])&&(this['_addedAnnotations']['delete'](_0x532ce3),this['_balloon']['remove'](_0x532ce3['view']));}['_closeAnnotation'](_0x2471a6){this['_manuallyClosed']['add'](_0x2471a6),this['_removeAnnotationFromBalloon'](_0x2471a6);}}function B(_0x245f2f,_0x27c955){return _0x245f2f['top']===_0x27c955['top']&&_0x245f2f['bottom']===_0x27c955['bottom']&&_0x245f2f['right']===_0x27c955['left'];}class st extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x452c83,_0x258fd0){super(_0x452c83),this['set']('isEmpty',!_0x258fd0['length']),this['focusTracker']=new _0x4e787a(),this['_annotationViews']=_0x258fd0,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x420628({'focusables':_0x258fd0,'focusTracker':this['focusTracker']}),this['listenTo'](_0x258fd0,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x258fd0,'remove',(_0x4bb52f,_0x446323)=>{_0x446323['isActive']&&this['focus'](),_0x258fd0['length']||(this['isEmpty']=!0x0);});const _0x4307d8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x452c83,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x258fd0},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x4307d8['if']('isEmpty','ck-hidden',_0x3b2795=>!_0x3b2795)]},'children':[{'text':E(_0x452c83,'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 _0x3aa620 of this['_annotationViews'])this['focusTracker']['add'](_0x3aa620['element']);this['_annotationViews']['on']('change',(_0x7d267f,{added:_0x33b13a,removed:_0x5e6eeb})=>{for(const _0x1098e1 of _0x33b13a)this['focusTracker']['add'](_0x1098e1['element']);for(const _0x37b348 of _0x5e6eeb)this['focusTracker']['remove'](_0x37b348['element']);});}}class f extends _0xb0fdc5{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x8509b4){super(_0x8509b4),this['archivedThreads']=new _0x1990b8();}['init'](){const _0x568db2=this['context'],_0x423876=_0x568db2['plugins']['get'](o),_0x3f6918=_0x568db2['plugins']['get'](O);this['listenTo'](_0x423876,'addCommentThread',(_0x1544d9,{threadId:_0x2cbbb5})=>{const _0x2c51d3=_0x423876['getCommentThread'](_0x2cbbb5);_0x2c51d3['archivedAt']&&this['archivedThreads']['add'](_0x2c51d3,this['_calculatePosition'](_0x2c51d3['archivedAt'])),this['listenTo'](_0x2c51d3,'change:archivedAt',(_0x5d371a,_0x5b79f8,_0x1b4508)=>{_0x1b4508?this['archivedThreads']['has'](_0x2c51d3)||this['archivedThreads']['add'](_0x2c51d3,this['_calculatePosition'](_0x2c51d3['archivedAt'])):this['archivedThreads']['has'](_0x2c51d3)&&this['archivedThreads']['remove'](_0x2c51d3);});}),this['listenTo'](_0x423876,'removeCommentThread',(_0x367cc4,{threadId:_0x365d2f})=>{const _0x186926=_0x423876['getCommentThread'](_0x365d2f);this['stopListening'](_0x186926),this['archivedThreads']['has'](_0x186926)&&this['archivedThreads']['remove'](_0x186926);},{'priority':'highest'}),this['listenTo'](_0x3f6918['collection'],'focus',(_0x8f3341,_0x28731b)=>{_0x28731b['isVisible']||(_0x28731b['isActive']=!0x0,_0x3f6918['activate'](_0x28731b));});}['_calculatePosition'](_0x3df895){const _0x57503e=[...this['archivedThreads']]['findIndex'](_0x563f06=>_0x563f06['archivedAt']<_0x3df895);return _0x57503e>-0x1?_0x57503e:this['archivedThreads']['length'];}}class a extends _0x1b90ef{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,tt];}constructor(_0x3e06e2){super(_0x3e06e2),this['annotationViews']=new _0x273922(),this['_pendingThreads']=[];}['init'](){const _0x417fb5=this['editor'],_0x1a0ed6=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x417fb5['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0xada5a,!0x0)),_0x417fb5['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x575434=this['_createCommentsArchiveButton'](_0x558b83);return _0x575434['set']({'role':'menuitemcheckbox'}),_0x575434;});const _0xdedc85=_0x417fb5['plugins']['get'](f),_0x559996=_0x417fb5['plugins']['get']('Annotations'),_0x534074=_0x417fb5['plugins']['get']('CommentsRepository');_0xdedc85['archivedThreads']['forEach'](_0x19da48=>{this['_handleNewThread'](_0x19da48);}),this['listenTo'](_0xdedc85['archivedThreads'],'add',(_0xdefea1,_0x4efa80)=>{this['_handleNewThread'](_0x4efa80);}),this['listenTo'](_0x559996['collection'],'add',(_0x2f10b8,_0x3a1659)=>{const _0x1f20a9=this['_pendingThreads']['find'](_0xfc1d0e=>{const _0x5e7e98=_0x534074['_threadToController']['get'](_0xfc1d0e);return _0x5e7e98&&_0x3a1659['innerView']===_0x5e7e98['view'];});if(_0x1f20a9){const _0x2b7533=this['_calculatePosition'](_0x1f20a9['archivedAt']);this['annotationViews']['add'](_0x3a1659['view'],_0x2b7533),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1f20a9),0x1);}}),this['listenTo'](_0xdedc85['archivedThreads'],'remove',(_0x3ae33a,_0x512c42)=>{const _0x30d16b=_0x417fb5['config']['get']('collaboration.channelId');if(!_0x30d16b||_0x512c42['channelId']===_0x30d16b){if(this['_pendingThreads']['includes'](_0x512c42))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x512c42),0x1);else{const _0x29bcf8=_0x534074['_threadToController']['get'](_0x512c42),_0x9283f7=_0x559996['getByInnerView'](_0x29bcf8['view']);this['annotationViews']['remove'](_0x9283f7['view']),this['stopListening'](_0x9283f7['focusableElements']);}}}),this['listenTo'](_0x559996['collection'],'add',(_0x43371d,_0x56a67a)=>{this['listenTo'](_0x56a67a,'escape',_0x1a0ed6);}),this['listenTo'](_0x559996['collection'],'remove',(_0x4d5a85,_0x1c9d55)=>{this['stopListening'](_0x1c9d55,'escape',_0x1a0ed6);});}['_handleNewThread'](_0x4ca209){const _0x497e3c=this['editor']['plugins']['get']('CommentsRepository'),_0x52da2=this['editor']['plugins']['get']('Annotations'),_0x26ad13=this['editor']['config']['get']('collaboration.channelId');if(!_0x26ad13||_0x4ca209['channelId']===_0x26ad13){const _0x2e331e=_0x497e3c['_threadToController']['get'](_0x4ca209);if(!_0x2e331e)return void this['_pendingThreads']['push'](_0x4ca209);const _0x528810=this['_calculatePosition'](_0x4ca209['archivedAt']),_0x236c13=_0x52da2['getByInnerView'](_0x2e331e['view']);_0x236c13['isVisible']&&_0x52da2['_visibleAnnotations']['remove'](_0x236c13),this['annotationViews']['add'](_0x236c13['view'],_0x528810);}}['_calculatePosition'](_0x319008){const _0x5b8f38=this['editor']['config']['get']('collaboration.channelId'),_0x52b6af=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x514ed6=>_0x514ed6['channelId']===_0x5b8f38)['findIndex'](_0x5b4008=>_0x5b4008['archivedAt']<_0x319008);return _0x52b6af<0x0||_0x52b6af>this['annotationViews']['length']?this['annotationViews']['length']:_0x52b6af-0x1;}['_toggleDialog'](){const _0x319003=this['editor'],_0x5d4699=_0x319003['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new st(_0x319003['locale'],this['annotationViews'])),'commentsArchive'===_0x5d4699['id']?_0x5d4699['hide']():_0x5d4699['show']({'id':'commentsArchive','title':E(_0x319003['locale'],'COMMENTS_ARCHIVE'),'icon':_0x279b67,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':it['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x1d86d6,_0x566fbb=!0x1){const _0xeac5fb=this['editor']['locale'],_0x58fe88=this['editor']['plugins']['get']('Dialog'),_0x584b8b=new _0x1d86d6(_0xeac5fb);return _0x584b8b['bind']('isEnabled')['to'](this,'isEnabled'),_0x584b8b['bind']('isOn')['to'](_0x58fe88,'id',_0x3b8cfe=>'commentsArchive'===_0x3b8cfe),_0x584b8b['set']({'label':E(_0xeac5fb,'COMMENTS_ARCHIVE'),'icon':_0x279b67,'isToggleable':!0x0}),_0x566fbb&&(_0x584b8b['tooltip']=!0x0),this['listenTo'](_0x584b8b,'execute',()=>this['_toggleDialog']()),_0x584b8b;}['_hideDialogOnAnnotationEscape']=_0x594532=>{const _0x59df03=_0x594532['source'];if(!this['annotationViews']['has'](_0x59df03['view']))return;const _0x3b0e9d=this['editor']['plugins']['get']('Dialog');_0x3b0e9d['isOpen']&&'commentsArchive'===_0x3b0e9d['id']&&(_0x3b0e9d['hide'](),_0x594532['stop']());};}class p extends _0x1b90ef{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,gt as CommentThreadController,ie as CommentThreadInputView,Tt as CommentThreadView,_t as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
23
+ import{Editor as _0x1431d7,ContextPlugin as _0x253287,PendingActions as ht,Command as _0x1da399,Plugin as _0x345605,Context as _0x284fd0}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x30449f,uid as _0x5f52ef,KeystrokeHandler as jt,FocusTracker as _0x19f40a,diff as _0x196877,Collection as _0x5d031f,Rect as _0x2413b8,CKEditorError as _0x5d5198,first as _0x4fe439,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x4445b8,keyCodes as _0x5946f7}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0xd82a8f,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x579911,trimHtml as _0x17fb5a,LateFocusDropdownButtonView as _0x5b7864,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x27dd91}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x2c8b2c}from'es-toolkit/compat';import{IconUndo as _0xf7047d,IconCheck as _0x3c8f8e,IconPencil as _0x4bbed0,IconRemoveComment as _0x4858a0,IconThreeVerticalDots as _0x50de71,IconAddComment as _0x38689e,IconCommentsArchive as _0x45a11f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x2d6288,ButtonView as _0x306a1b,ViewCollection as _0x2598eb,createDropdown as _0x163b01,ListView as _0x311efb,focusChildOnDropdownOpen as _0x5f2dd6,ListItemView as _0x499425,MenuBarMenuListItemButtonView as _0x24a797,BodyCollection as _0x359834,BalloonPanelView as _0x3a79a4,ContextualBalloon as _0x4e0495,Dialog as _0x1d5c18,DialogViewPosition as _0x32d1cc}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x59c661}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x269987}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x481683}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
24
+ _0x30449f(){['model'];['view'];constructor(_0x336f0b,_0x4c6dbe){super(),this['model']=_0x336f0b,this['model']['_isAttached']=!0x0,this['view']=_0x4c6dbe,this['listenTo'](_0x4c6dbe,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4c6dbe,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4c6dbe,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4c6dbe,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4c6dbe,'addComment',(_0xd13ceb,_0x53125b)=>this['addComment'](_0x53125b)),this['listenTo'](_0x4c6dbe,'updateComment',(_0x1db0b9,_0x3896e7,_0x5f2c6e)=>this['updateComment'](_0x3896e7,_0x5f2c6e)),this['listenTo'](_0x4c6dbe,'removeComment',(_0x43738d,_0x4deac0)=>this['removeComment'](_0x4deac0));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1064c3){this['model']['addComment']({'content':_0x1064c3,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x31696c,_0x5c46a1){this['model']['getComment'](_0x31696c)['update']({'content':_0x5c46a1});}['removeComment'](_0x10e844){this['model']['getComment'](_0x10e844)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x2dd648,_0x2b5962,_0x3fe85c){const t=_0x2dd648['t'];switch(_0x2b5962){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'},_0x3fe85c);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'},_0x3fe85c);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'},_0x3fe85c);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'},_0x3fe85c);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x3fe85c);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'},_0x3fe85c);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'},_0x3fe85c);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'},_0x3fe85c);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 Ut extends Vt{['main'];['editable'];constructor(_0x48adc3,_0x36e391){super(_0x48adc3);const _0x2c13f8=_0x5f52ef();this['main']=this['createCollection'](),this['editable']=new $t(_0x48adc3,_0x36e391,void 0x0,{'label':()=>E(_0x48adc3,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x48adc3['uiLanguageDirection'],'lang':_0x48adc3['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x2c13f8},'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 Ot extends Rt{['view'];constructor(_0x25635e){super(_0x25635e),this['view']=new Ut(_0x25635e['locale'],_0x25635e['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1ca744=this['editor']['editing']['view'],_0x52c6b4=this['view']['editable'],_0x37a5a2=_0x1ca744['document']['getRoot']();_0x52c6b4['name']=_0x37a5a2['rootName'],this['view']['render']();const _0x1b773a=_0x52c6b4['element'];this['setEditableElement'](_0x52c6b4['name'],_0x1b773a),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1ca744['attachDomRoot'](_0x1b773a),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
25
+ _0x30449f(_0x1431d7){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Nt)());constructor(_0x9154eb={}){function _0x19aa03(_0xa9da42){return _0xa9da42['map'](_0xcb6c72=>String['fromCharCode'](_0xcb6c72))['join']('');}(_0x9154eb=Object['assign']({},_0x9154eb))['plugins']||(_0x9154eb['plugins']=Qt['defaultPlugins']),super(_0x9154eb),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x19aa03([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x19aa03([0x76,0x69,0x65,0x77])][_0x19aa03([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x19aa03([0x61,0x75,0x74,0x6f]),this[_0x19aa03([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x19aa03([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x19aa03([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x19aa03([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x19aa03([0x6f,0x6b])});}['create'](){const _0xe9abb=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xe9abb))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3d3776=>{const _0x22bc83=this['model']['document']['getRoot'](),_0x38bf6c=_0x22bc83&&_0x22bc83['getChild'](_0x22bc83['childCount']-0x1);_0x3d3776['setSelection'](_0x38bf6c,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x227d7e=this['editing']['view'],_0x4e9c7c=_0x227d7e['document']['getRoot'](),_0x506717=_0x4e9c7c['getChild'](0x0);_0x4e9c7c['childCount']>0x1||!_0x506717||'p'!=_0x506717['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x227d7e,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x506717['placeholder']=this['placeholder']),Ft({'view':_0x227d7e,'element':_0x506717,'keepOnFocus':!0x0}),this['placeholderElement']=_0x506717);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2310ad,_0x4461a6={}){super(_0x2310ad),this['editor']=null,this['_editorConfig']=_0x4461a6,this['set']('value',_0x4461a6['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x2310ad,'Reply...')),this['set']('submitLabel',E(_0x2310ad,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x19f40a(),this['focusCycler']=new _0x2d6288({'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',(_0x45b760,_0xb135fa)=>{this['cancelButtonView']['fire']('execute'),_0xb135fa();}),this['keystrokes']['set']('Ctrl+Enter',(_0x12059d,_0x5df5f7)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5df5f7());}),this['on']('submit',(_0x22494b,_0xcc8096)=>{_0xcc8096['length']>0xfde8?(alert(E(_0x2310ad,'TOO_LONG_COMMENT_ALERT',[_0xcc8096['length'],0xfde8])),_0x22494b['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x52af78=this['editor'];this['element']['insertBefore'](_0x52af78['ui']['element'],this['element']['firstChild']),_0x52af78['model']['document']['on']('change',()=>this['value']=_0x52af78['getData']()),_0x52af78['bind']('placeholder')['to'](this),this['focusables']['add'](_0x52af78['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5e26a9){-0x1===_0x5e26a9?(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:_0x50f5f9}=this,_0x1cff96=new _0x306a1b(_0x50f5f9);return _0x1cff96['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1cff96['withText']=!0x0,_0x1cff96['bind']('label')['to'](this,'submitLabel'),_0x1cff96['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1cff96['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x282279,_0x51f33f)=>!_0x51f33f&&!!_0x282279['trim']()),_0x1cff96;}['_createCancelButton'](){const {locale:_0x16b582}=this,_0x45a394=new _0x306a1b(_0x16b582);return _0x45a394['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x45a394['label']=E(_0x16b582,'Cancel'),_0x45a394['withText']=!0x0,_0x45a394['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x45a394;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x34a1f5=>{this['focusTracker']['add'](_0x34a1f5['element']);}),this['focusables']['on']('change',(_0x17b087,_0x3128fc)=>{for(const _0x543405 of Array['from'](_0x3128fc['added'])['reverse']())this['focusTracker']['add'](_0x543405['element']);});}}class ie extends kt{constructor(_0x28df7f,_0x3af304,_0x5cb1a1){super(_0x28df7f),this['commentInputView']=new os(_0x28df7f,_0x5cb1a1),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x23c240,_0x298604)=>_0x23c240||!!_0x298604),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 _0xd82a8f(_0x28df7f,_0x3af304),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'](_0x4b5de1){this['commentInputView']['focus'](_0x4b5de1);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x34256e,_0x487394)=>{const {submitButtonView:_0x327192,cancelButtonView:_0x5667a4,editor:_0x42658e}=this['commentInputView'];[_0x327192['element'],_0x5667a4['element'],_0x42658e?_0x42658e['editing']['view']['getDomRoot']():null]['filter'](_0x170c5f=>_0x170c5f)['some'](_0x8dd5a3=>_0x8dd5a3['contains'](_0x487394['target']))||(this['focus'](),_0x487394['preventDefault']());});}}class cs extends kt{constructor(_0x31ae48){super(_0x31ae48);const _0x122391=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x122391['to']('count',_0x53ea94=>E(_0x31ae48,'NUMBER_OF_COMMENTS',_0x53ea94))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x55a43f,_0xd1150f,_0x368c8a){super(_0x55a43f);const _0x3084cb=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xd1150f['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xd1150f,this['_config']=_0x368c8a,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x19f40a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2d6288({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xdf33ff=>this['commentViews']['map'](_0x22184c=>_0x22184c['element'])['includes'](_0xdf33ff['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x55a43f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x298c78=>_0x298c78-this['_config']['maxCommentsWhenCollapsed']);for(const _0x53cf0d of _0xd1150f['comments'])this['_handleNewCommentModel'](_0x53cf0d);this['_handleInfoComment'](),this['listenTo'](_0xd1150f['comments'],'add',(_0x39d66b,_0xaa8ada)=>{const _0x587676=this['_calculatePosition'](_0xaa8ada);this['length']++,this['_handleNewCommentModel'](_0xaa8ada,_0x587676),this['refreshVisibleViews']();}),this['listenTo'](_0xd1150f['comments'],'remove',(_0x37b06e,_0x12d7dc)=>{this['length']--,this['_handleRemoveCommentModel'](_0x12d7dc),this['refreshVisibleViews']();}),this['listenTo'](_0xd1150f,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xd1150f,'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',_0x3084cb['if']('length','ck-hidden',_0x1ca82f=>!_0x1ca82f)],'aria-label':E(_0x55a43f,'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'](_0x44fe5d){-0x1===_0x44fe5d?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x288933 of this['commentViews'])_0x288933['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x192a78,_0x3c0c5f){const _0x13939e=new this['_config']['CommentView'](this['locale'],_0x192a78,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x13939e['viewUid']=_0x192a78['id'],_0x13939e['delegate']('removeComment')['to'](this),_0x13939e['delegate']('updateComment')['to'](this),_0x13939e['delegate']('resolveCommentThread')['to'](this),_0x13939e['delegate']('editorReady')['to'](this),_0x13939e['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x13939e,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x13939e,_0x3c0c5f);}['_calculatePosition'](_0x52bf91){const _0x38fc66=this['_model']['_findOptimalIndex'](_0x52bf91);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x52bf91['authoredAt']?_0x38fc66-0x1:_0x38fc66:_0x38fc66-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3f0acd={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3f0acd,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3f0acd));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3ebebc){const _0xc604f5=this['commentViews']['remove'](_0x3ebebc['id']);this['stopListening'](_0xc604f5),_0xc604f5['isEditMode']&&this['_updateHasDirtyComment'](),_0xc604f5['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0xb6433e=>_0xb6433e['isEditMode']);}['_rearrangeCollapse'](){const _0x176a3f=function(_0x5c7a64){const _0x544ffe=new _0x5d031f();for(const _0x205a0f of _0x5c7a64)_0x544ffe['add'](_0x205a0f);return _0x544ffe;}(this['commentViews']),_0x31eb0c=this['_collapsedCommentsView']['count'];for(let _0xcdf1dc=0x1;_0xcdf1dc<=_0x31eb0c;_0xcdf1dc++)_0x176a3f['remove'](0x1);for(const _0x1e945f of _0x176a3f)_0x1e945f['collapse']();_0x31eb0c>0x0&&_0x176a3f['add'](this['_collapsedCommentsView'],0x1),ns(_0x196877(Array['from'](this['visibleViews']),Array['from'](_0x176a3f)),this['visibleViews'],_0x176a3f);}['_rearrangeExpand'](){ns(_0x196877(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x92f52f of this['visibleViews'])_0x92f52f['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4d69a1=>{this['focusTracker']['add'](_0x4d69a1['element']),this['keystrokes']['listenTo'](_0x4d69a1['element']);}),this['commentViews']['on']('change',(_0x4292ea,_0x1cc83a)=>{for(const _0x30fe4c of _0x1cc83a['removed'])this['focusTracker']['remove'](_0x30fe4c['element']),this['keystrokes']['stopListening'](_0x30fe4c['element']);for(const _0x355be8 of Array['from'](_0x1cc83a['added'])['reverse']())this['focusTracker']['add'](_0x355be8['element']),this['keystrokes']['listenTo'](_0x355be8['element']);});}}function ns(_0x22fc9b,_0x1cbcb7,_0x209323){let _0x564f1a=0x0;for(const _0x4e8cae of _0x22fc9b)switch(_0x4e8cae){case'insert':_0x1cbcb7['add'](_0x209323['get'](_0x564f1a),_0x564f1a),_0x564f1a++;break;case'delete':_0x1cbcb7['remove'](_0x564f1a);break;case'equal':_0x564f1a++;}}class as extends kt{constructor(_0x54a972){super(_0x54a972);const _0x27f36f=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x27f36f['to']('contextValue',_0xe3feee=>E(_0x54a972,'THREAD_CONTEXT_LABEL',_0xe3feee)),'tabindex':-0x1},'children':[{'text':_0x27f36f['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x333797,_0x3e837e){super(_0x333797);const _0x367eca=this['bindTemplate'];this['_model']=_0x3e837e,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x19f40a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2d6288({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x8d1284=>!!_0x8d1284),this['bind']('contextValue')['to'](this['_model'],'context',_0x16155f=>_0x16155f&&_0x16155f['value']?this['_trimContextValue'](_0x16155f['value']):E(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',_0x367eca['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 _0x5a81db=new _0x306a1b(this['locale']);return _0x5a81db['label']=E(this['locale'],'Reopen'),_0x5a81db['tooltip']=E(this['locale'],'Reopen'),_0x5a81db['icon']=_0xf7047d,_0x5a81db['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x94ece=>!_0x94ece),_0x5a81db['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4c1050,_0x3801d1)=>_0x4c1050&&_0x3801d1),_0x5a81db['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5a81db;}['_trimContextValue'](_0x28787c){if(_0x28787c['length']<0x96)return _0x28787c;const _0x1ecab3=_0x28787c['lastIndexOf']('\x20',0x93);return _0x28787c['substring'](0x0,_0x1ecab3>-0x1?_0x1ecab3:0x93)+'...';}['_attachContextActions'](){const _0x3066e8=this['element']['querySelector']('.ck-context'),_0x11a22d=_0x3066e8['querySelector']('.ck-context__value');this['listenTo'](_0x3066e8,'mouseenter',()=>{_0x11a22d['offsetWidth']<_0x11a22d['scrollWidth']&&_0x3066e8['classList']['add']('overlay');}),this['listenTo'](_0x3066e8,'mouseleave',()=>{_0x3066e8['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4c75d0 of this['focusables'])this['focusTracker']['add'](_0x4c75d0['element']),this['keystrokes']['listenTo'](_0x4c75d0['element']);}['_createContextView'](){const _0x4d790a=new as(this['locale']);return _0x4d790a['bind']('contextValue')['to'](this),_0x4d790a;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1b29c3,_0x5ae217,_0x90cfc6,_0x45b888){super(_0x1b29c3),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5ae217,this['_localUser']=_0x90cfc6,this['_config']=_0x45b888,this['commentThreadHeaderView']=new Xt(_0x1b29c3,_0x5ae217),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x1b29c3,E(_0x1b29c3,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1b29c3,_0x5ae217,Object['assign']({'CommentView':this['_config']['CommentView']},_0x45b888)),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',(_0x1ce3b3,_0x11ef64)=>_0x1ce3b3||!!_0x11ef64),this['bind']('isUnlinked')['to'](_0x5ae217,'unlinkedAt',_0x50df5c=>!!_0x50df5c),this['bind']('ariaLabel')['to'](this,'length',_0x34e602=>{const _0x1c1b10=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x34e602,_0x1c1b10]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x19f40a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2d6288({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3bae09=>_0x3bae09['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x42d1a4=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4c16b4=_0x42d1a4['commentInputView'];return _0x42d1a4['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4c16b4,'value',(_0x5eb721,_0x150f83,_0x1d2a1a,_0x566db4,_0x127d30)=>!!_0x127d30||!!_0x566db4&&_0x1d2a1a&&!_0x150f83||_0x5eb721&&_0x1d2a1a&&!_0x150f83),_0x4c16b4['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x15d284,_0x5113d8,_0x5e4627)=>{let _0x4f3a31;return _0x4f3a31=_0x5e4627&&_0x5113d8?'Reply\x20to\x20reopen\x20discussion...':_0x15d284?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x4f3a31);}),_0x4c16b4['bind']('submitLabel')['to'](this,'length',_0x5aca8e=>E(this['locale'],_0x5aca8e?'Reply':'Comment')),_0x4c16b4['on']('submit',(_0x40e758,_0x304d51)=>{this['fire']('addComment',_0x304d51),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4c16b4['on']('cancel',()=>{this['focus']();}),_0x4c16b4['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4c16b4['on']('cancel',_0x1bcaf6=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1bcaf6['stop']());}),this['on']('change:isActive',(_0x1531f1,_0x40ae85,_0x448535)=>{_0x448535||this['length']||_0x4c16b4['value']||this['fire']('removeCommentThread');}),_0x42d1a4;}}class vt extends/* #__PURE__ -- @preserve */
27
+ ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x94c258,_0x411fb7,_0x1bce27,_0x5eb875){super(_0x94c258,_0x411fb7,_0x1bce27,_0x5eb875),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x94c258,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3e886f,_0x44eb0e,_0x5a4a98)=>{_0x5a4a98||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x41e0e4,_0x3ed0ca,_0x5f0f07)=>{_0x5f0f07&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x1bc16c=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x1bc16c['if']('isActive','ck-thread--active'),_0x1bc16c['if']('isUnlinked','ck-thread--unlinked'),_0x1bc16c['if']('isConfirm','ck-thread--remove-confirmation'),_0x1bc16c['to']('actionIndicator',_0x1ca4c1=>_0x1ca4c1?'ck-thread--'+_0x1ca4c1:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x1bc16c['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 _0x5c80ce of this['commentsListView']['commentViews'])_0x5c80ce['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x443cba}=this,_0x5735f3=this['commentsListView']['commentViews']['get'](0x0);_0x5735f3===this['_boundFirstCommentView']||_0x5735f3['isSystemComment']||(this['_boundFirstCommentView']=_0x5735f3,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x5735f3,'actionIndicator',_0x4ca5cb=>'remove'===_0x4ca5cb?'remove':null),_0x5735f3['placeholder']=E(_0x443cba,'Write\x20a\x20comment...'),_0x5735f3['removeButton']['on']('execute',_0x47858c=>{_0x47858c['stop'](),this['showConfirm'](E(_0x443cba,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x5735f3['focus']();}),_0x5735f3['actionBar']['add'](this['resolveButton'],0x0),_0x5735f3['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2963ca=new _0x579911(this['locale']);return _0x2963ca['label']=E(this['locale'],'Resolve'),_0x2963ca['tooltip']=E(this['locale'],'Resolve'),_0x2963ca['icon']=_0x3c8f8e,_0x2963ca['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2963ca['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5a25a1=>!_0x5a25a1),_0x2963ca['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x114b3a,_0x277c89)=>_0x114b3a&&!_0x277c89),_0x2963ca['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2963ca;}['_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(_0x2908b9){super(_0x2908b9),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x2aa01c,_0x244f9b,_0x167109)=>{this['element']['innerHTML']=_0x167109;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x2abd68,_0x5a957,_0x1a3a60){super(_0x2abd68),this['_model']=_0x5a957,this['_config']=_0x1a3a60,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5a957,'content',_0x5a957,'authoredAt',(_0x3f31b8,_0x2ef186)=>E(_0x2abd68,'COMMENT_ARIA_LABEL',[_0x5a957['author']['name'],_0x1a3a60['formatDateTime'](_0x2ef186),new DOMParser()['parseFromString'](_0x3f31b8,'text/html')['body']['textContent'],_0x5a957['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x2abd68,E(_0x2abd68,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x2598eb(),this['focusTracker']=new _0x19f40a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2d6288({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x18b46a=>_0x18b46a['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']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x424d7c=new es(this['locale']);return _0x424d7c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x36889a,_0x2e61c6)=>_0x2e61c6?_0x17fb5a(_0x36889a,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x36889a),_0x424d7c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0xde4186=new os(this['locale'],this['_config']['editorConfig']);return _0xde4186['value']=this['_model']['content'],_0xde4186['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xde4186['submitLabel']=E(this['locale'],'Save'),_0xde4186['on']('submit',(_0x122b86,_0x39eee5)=>{this['fire']('updateComment',this['_model']['id'],_0x39eee5),this['switchToDisplayMode'](),this['focus']();}),_0xde4186['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0xde4186['once']('editorReady',()=>{_0xde4186['focus']();}),_0xde4186['createEditor'](),_0xde4186['delegate']('editorReady')['to'](this),_0xde4186['delegate']('editorDestroyed')['to'](this),_0xde4186;}['_setupKeyboardNavigation'](){const _0x578f9e=this['element'];this['keystrokes']['listenTo'](_0x578f9e);for(const _0x394612 of this['focusables'])this['focusTracker']['add'](_0x394612['element']),this['keystrokes']['listenTo'](_0x394612['element']);this['focusables']['on']('change',(_0x55bd39,_0x436693)=>{for(const _0x4f3069 of _0x436693['removed'])this['focusTracker']['remove'](_0x4f3069['element']),this['keystrokes']['stopListening'](_0x4f3069['element']);for(const _0x23166b of _0x436693['added'])this['focusTracker']['add'](_0x23166b['element']),this['keystrokes']['listenTo'](_0x23166b['element']);}),this['keystrokes']['set']('enter',(_0x2dbaa5,_0x38428b)=>{_0x578f9e===_0x2dbaa5['target']&&(this['focusCycler']['focusFirst'](),_0x38428b());}),this['keystrokes']['set']('esc',(_0x4e0752,_0x4cc3f3)=>{_0x578f9e!==_0x4e0752['target']&&(this['focus'](),_0x4cc3f3());});}}class gt extends/* #__PURE__ -- @preserve */
28
+ ti(hs){['actionBar'];['userView'];constructor(_0x3a21a6,_0x2c2551,_0x532809){super(_0x3a21a6,_0x2c2551,_0x532809),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x3a21a6,'Reply...')),this['bind']('authoredAt')['to'](_0x2c2551),this['bind']('resolvedAt')['to'](_0x2c2551),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 _0xd82a8f(_0x3a21a6,_0x2c2551['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2c2551,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x52b9fe=this['bindTemplate'],_0x131b2c=[{'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':_0x52b9fe['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x52b9fe['to']('authoredAt',_0x220257=>this['_config']['formatDateTime'](_0x220257))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x52b9fe['if']('isEditMode','ck-comment__actions--hidden'),_0x52b9fe['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']&&_0x131b2c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x52b9fe['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x52b9fe['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x52b9fe['if']('isEditMode','ck-comment--edit'),_0x52b9fe['if']('isSystemComment','ck-comment--info'),_0x52b9fe['to']('actionIndicator',_0xfa8a40=>_0xfa8a40?'ck-comment--'+_0xfa8a40:'')],'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':_0x131b2c}]}]};}['_createEditButton'](){const _0x2204c2=new _0x306a1b(this['locale']);return _0x2204c2['label']=E(this['locale'],'Edit'),_0x2204c2['icon']=_0x4bbed0,_0x2204c2['withText']=!0x0,_0x2204c2['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2204c2['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1e7675=>!_0x1e7675),_0x2204c2['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2204c2['on']('execute',()=>this['switchToEditMode']()),_0x2204c2;}['_createRemoveButton'](){const _0x4eda00=new _0x306a1b(this['locale']);return _0x4eda00['label']=E(this['locale'],'Remove'),_0x4eda00['icon']=_0x4858a0,_0x4eda00['withText']=!0x0,_0x4eda00['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4eda00['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5597d1=>!_0x5597d1),_0x4eda00['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4eda00['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4eda00;}['_createDropdown'](){const _0x1eeb15=_0x163b01(this['locale'],_0x5b7864),_0x490dd5=_0x1eeb15['panelView']['children'],_0x35c6f1=new _0x311efb(this['locale']),_0x464c3a=_0x1eeb15['bindTemplate'];_0x5f2dd6(_0x1eeb15,()=>this['items']['find'](_0x5702d7=>_0x5702d7['isVisible'])),_0x1eeb15['extendTemplate']({'attributes':{'class':[_0x464c3a['if']('isVisible','ck-hidden',_0x3ac13c=>!_0x3ac13c)]}});const _0x4e7d7b=(_0x1fa760,_0x2fe7b2=-0x1)=>{const _0x4a7d59=new _0x499425(this['locale']);_0x4a7d59['children']['add'](_0x1fa760);const _0x154ae2=_0x2fe7b2>-0x1?_0x2fe7b2:_0x35c6f1['items']['length'];_0x35c6f1['items']['add'](_0x4a7d59,_0x154ae2);const _0x155788=Array['from'](this['items']);_0x1eeb15['unbind']('isEnabled','isVisible'),_0x1eeb15['bind']('isEnabled')['toMany'](_0x155788,'isEnabled',(..._0x20bdce)=>_0x20bdce['some'](_0x388e21=>_0x388e21)),_0x1eeb15['bind']('isVisible')['toMany'](_0x155788,'isVisible',(..._0x37d14f)=>_0x37d14f['some'](_0x22f0a7=>_0x22f0a7));};_0x1eeb15['panelPosition']='sw',_0x1eeb15['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x50de71});for(const _0x5d3b74 of this['items'])_0x4e7d7b(_0x5d3b74);return _0x490dd5['add'](_0x35c6f1),_0x1eeb15['listenTo'](this['items'],'add',(_0x440c24,_0xcd5778,_0x1eedf7)=>{_0x4e7d7b(_0xcd5778,_0x1eedf7);}),_0x1eeb15['listenTo'](this['items'],'remove',(_0x39dd6b,_0x3c96b3,_0x12ea91)=>{_0x35c6f1['items']['remove'](_0x12ea91);}),_0x1eeb15;}['_attachActions'](_0xafd01e,_0x32faf7){const _0x4966a4=_0xafd01e&&_0xafd01e['element'];_0x4966a4&&(this['listenTo'](_0x4966a4,'mouseenter',()=>this['actionIndicator']=_0x32faf7),this['listenTo'](_0x4966a4,'focus',()=>this['actionIndicator']=_0x32faf7),this['listenTo'](_0x4966a4,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x4966a4,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3cea89=super['_createCommentInputView']();return _0x3cea89['bind']('placeholder')['to'](this),_0x3cea89;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x57c164){const _0x53cd9d=Dt(_0x57c164,0x1e),_0x5783d2=new MutationObserver(_0x3a99e9=>{for(const _0x323875 of _0x3a99e9)('attributes'==_0x323875['type']&&'class'==_0x323875['attributeName']||'childList'==_0x323875['type']||'characterData'==_0x323875['type'])&&_0x53cd9d();});return{'attach'(_0x31e525){_0x5783d2['observe'](_0x31e525,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5783d2['disconnect'](),_0x53cd9d['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x5bd2d7,_0x395312){super(_0x5bd2d7),this['id']=_0x5f52ef(),this['focusTracker']=new _0x19f40a(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x45170e,_0x29e5af)=>this['fire']('Esc',_0x29e5af)),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']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x395312),this['mainView']=_0x395312;const _0x3be963=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3be963['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 _0x1f1130=this['element']['clientHeight'];_0x1f1130&&(this['height']=_0x1f1130);}}class d extends/* #__PURE__ -- @preserve */
29
+ _0x30449f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1a33b2,target:_0x501718,type:_0x45d4ad,isVisible:_0x5322c5=!0x0}){super(),this['view']=_0x1a33b2,this['view']['element']||this['view']['render'](),this['_type']=_0x45d4ad,this['_target']=_0x501718,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5d031f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x56e27e,_0x49069b)=>{this['view']['focusTracker']['add'](_0x49069b);}),this['focusableElements']['on']('remove',(_0x43778a,_0x150444)=>{this['view']['focusTracker']['remove'](_0x150444);}),this['set']('isVisible',_0x5322c5);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x5c0530=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x5c0530),_0x5c0530;}get['targetRect'](){const _0x3139cf=this['target'];if(null===_0x3139cf)return null;if(_0x3139cf instanceof _0x2413b8)return _0x3139cf;const _0x878e78=_0x3139cf['filter'](_0x4b7915=>function(_0x3af7db){const _0x2224a1=_0x3af7db['offsetParent'];if(_0x2224a1)return!0x0;const _0x3c84f7=_0x3af7db['getClientRects']()['item'](0x0);return!!_0x3c84f7;}(_0x4b7915));return 0x0===_0x878e78['length']?null:new _0x2413b8(_0x878e78[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x105ad3){this['view']['isActive']=_0x105ad3,this['view']['mainView']['isActive']=_0x105ad3;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x18c144){if(!(null===_0x18c144||_0x18c144 instanceof _0x2413b8||Array['isArray'](_0x18c144)&&_0x18c144['every'](_0x312cd4=>li(_0x312cd4))))throw new _0x5d5198('annotation-invalid-target',null,{'target':_0x18c144});}['_getNormalizedTarget'](){const _0x130a59='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x130a59)?[_0x130a59]:_0x130a59;}}function li(_0x34ffe9){return null!==_0x34ffe9&&'object'==typeof _0x34ffe9&&'nodeType'in _0x34ffe9&&0x1===_0x34ffe9['nodeType'];}class _ extends _0x5d031f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5a6931=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x19f40a(),this['_focusTracker']['on']('change:isFocused',(_0xdfc1f3,_0x2a0275,_0x4651ed)=>{_0x4651ed||this['fire']('blur');});for(const _0x4ebce3 of _0x5a6931)this['add'](_0x4ebce3);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1f50c3){if(this['has'](_0x1f50c3))throw new _0x5d5198('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1f50c3['innerView'],_0x1f50c3),this['_viewToAnnotation']['set'](_0x1f50c3['view'],_0x1f50c3);for(const _0x1f4ad0 of _0x1f50c3['focusableElements'])this['_focusTracker']['add'](_0x1f4ad0);this['listenTo'](_0x1f50c3['focusableElements'],'add',(_0x26376c,_0x46b1db)=>{this['_focusTracker']['add'](_0x46b1db);}),this['listenTo'](_0x1f50c3['focusableElements'],'remove',(_0x4cdbdc,_0x1006d8)=>{this['_focusTracker']['remove'](_0x1006d8);}),this['listenTo'](_0x1f50c3['view']['focusTracker'],'change:isFocused',(_0x3e382a,_0x1a6b7a,_0x142c5a)=>{_0x142c5a&&this['fire']('focus',_0x1f50c3);}),_0x1f50c3['updateTargetRect']();const _0x32045c=this['_getOrderInContent'](_0x1f50c3['view']['targetRect']);return super['add'](_0x1f50c3,_0x32045c);}['remove'](_0x521960){if(!this['has'](_0x521960))throw new _0x5d5198('annotationcollection-not-existing-item',null);this['stopListening'](_0x521960['view']['focusTracker']),this['stopListening'](_0x521960['focusableElements']);for(const _0x17b678 of _0x521960['focusableElements'])this['_focusTracker']['remove'](_0x17b678);return this['_viewToAnnotation']['delete'](_0x521960['view']),this['_innerViewToAnnotation']['delete'](_0x521960['innerView']),super['remove'](_0x521960);}['getByInnerView'](_0x302aa6){return this['_innerViewToAnnotation']['get'](_0x302aa6);}['getByView'](_0x15940e){return this['_viewToAnnotation']['get'](_0x15940e);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0xbe8dfe of this)_0xbe8dfe['updateTargetRect']();this['_sort']();}['_sort'](){const _0x564e80=Array['from'](this)['sort']((_0x2496bb,_0x65264a)=>v(_0x2496bb['view']['targetRect'],_0x65264a['view']['targetRect']));for(let _0x4fe30f=_0x564e80['length']-0x1;_0x4fe30f>0x0;_0x4fe30f--){const _0x45a61a=_0x564e80[_0x4fe30f];_0x4fe30f!==this['getIndex'](_0x45a61a)&&(this['remove'](_0x45a61a),this['add'](_0x45a61a));}}['_getOrderInContent'](_0x51166f){let _0x35ae6e=0x0;if(!_0x51166f)return this['length'];for(const _0x359500 of this){const _0x142a4a=_0x359500['view']['targetRect'];if(_0x142a4a){if(v(_0x51166f,_0x142a4a)<0x0)return _0x35ae6e;_0x35ae6e++;}}return _0x35ae6e;}}function v(_0x3a1b39,_0x4c5010){if(null===_0x3a1b39&&null===_0x4c5010)return 0x0;if(null===_0x3a1b39)return-0x1;if(null===_0x4c5010)return 0x1;const _0x4574f9=_0x3a1b39['top']-_0x4c5010['top'];return 0x0==_0x4574f9?_0x3a1b39['left']-_0x4c5010['left']:_0x4574f9;}class O extends _0x253287{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xca5233){if(super(_0xca5233),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xca5233 instanceof _0x1431d7){const _0x103d7d=_0xca5233['locale'];_0xca5233['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x103d7d,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0xd9dc47){this['collection']['add'](_0xd9dc47);}['remove'](_0x2b01a9){this['collection']['remove'](_0x2b01a9),_0x2b01a9['destroy']();}['refreshVisibility'](){for(const _0x1832ff of this['collection'])_0x1832ff['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x45a22d){return this['collection']['getByInnerView'](_0x45a22d);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xa7a82 of this['collection'])_0xa7a82['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x398c39){this['fire']('_activateAnnotation',_0x398c39);}['createAnnotation'](_0x401d92){return new d(_0x401d92);}['createAnnotationView'](_0x2bca4a,_0x20dbcc){return new S(_0x2bca4a,_0x20dbcc);}['_addActiveAnnotation'](_0x37364f){const _0x265e8e=new Set(this['activeAnnotations']);_0x265e8e['add'](_0x37364f),this['activeAnnotations']=_0x265e8e;}['_removeActiveAnnotation'](_0xfe466d){const _0x5b836c=new Set(this['activeAnnotations']);_0x5b836c['delete'](_0xfe466d),this['activeAnnotations']=_0x5b836c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x411c38=this['collection'],_0x4ced03=this['_visibleAnnotations'];function _0x153199(_0x1e973b){const _0x160841=_0x1e973b['source'];_0x160841['isVisible']&&!_0x4ced03['has'](_0x160841)?_0x4ced03['add'](_0x160841):!_0x160841['isVisible']&&_0x4ced03['has'](_0x160841)&&_0x4ced03['remove'](_0x160841),_0x160841['view']['focusTracker']['remove'](_0x160841['view']['element']),_0x160841['view']['focusTracker']['add'](_0x160841['view']['element']);}this['listenTo'](_0x411c38,'add',(_0x564a6d,_0x188677)=>{_0x188677['isVisible']&&_0x4ced03['add'](_0x188677),this['listenTo'](_0x188677,'change:isVisible',_0x153199);}),this['listenTo'](_0x411c38,'remove',(_0x3f8b3c,_0x2277cd)=>{_0x4ced03['has'](_0x2277cd)&&_0x4ced03['remove'](_0x2277cd),this['stopListening'](_0x2277cd,'change:isVisible',_0x153199);});}['_setupEnterAnnotationKeystroke'](){const _0x209893=_0x4b00f4=>{_0x4b00f4['on']('ready',()=>{_0x4b00f4['keystrokes']['set'](_0x269987,(_0x565eff,_0x4bc872)=>{const _0x59f520=_0x4fe439(this['activeAnnotations']['values']());_0x59f520&&(_0x59f520['view']['focus'](),_0x4bc872());});});};this['context']instanceof _0x1431d7?_0x209893(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2f7aed,_0x5923cd)=>{_0x209893(_0x5923cd);});}['_setupEscapeAnnotationHandling'](){const _0x354dc6=_0x19cf88=>{const _0x4cfe76=_0x19cf88['source'],_0x301a33=[];let _0x2d1a9a;if(Array['isArray'](_0x4cfe76['target'])){_0x2d1a9a=_0x4cfe76['target'][0x0],this['context']instanceof _0x1431d7?_0x301a33['push'](this['context']):this['context']['editors']&&_0x301a33['push'](...this['context']['editors']);for(const _0x41f5d5 of _0x301a33)for(const _0x3543b2 of _0x41f5d5['editing']['view']['domRoots']['values']())if(_0x3543b2['contains'](_0x2d1a9a))return void _0x41f5d5['editing']['view']['focus']();_0x2d1a9a['focus']();}};this['listenTo'](this['collection'],'add',(_0x2c9fdf,_0x42eb3a)=>{this['listenTo'](_0x42eb3a,'escape',_0x354dc6,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x15bb36,_0x21857b)=>{this['stopListening'](_0x21857b,'escape',_0x354dc6);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x253287{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56e3a5){super(_0x56e3a5),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3e752f=this['context']['config'];_0x3e752f['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3e752f['define']('comments.maxThreadTotalWeight',0x1f4),_0x3e752f['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3e752f['define']('comments.CommentThreadView',vt),_0x3e752f['define']('comments.CommentView',gt),_0x3e752f['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1629aa=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0xf86b8d,_0x4822c6)=>this['_addCommentThread'](_0x4822c6)),this['on']('submitCommentThread',(_0x582be0,_0x282cf9)=>this['_submitCommentThread'](_0x282cf9)),this['on']('resolveCommentThread',(_0x35236d,_0xf989f6)=>this['_resolveCommentThread'](_0xf989f6)),this['on']('resolveCommentThread',(_0x11884c,_0x1c0b9f)=>this['_updateActiveAnnotation'](_0x1c0b9f),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x550286,_0x371bad)=>this['_reopenCommentThread'](_0x371bad)),this['on']('reopenCommentThread',(_0x17185b,_0x5cb5ad)=>this['_updateActiveAnnotation'](_0x5cb5ad),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x56e64d,_0x2a0860)=>this['_removeCommentThread'](_0x2a0860)),this['on']('updateCommentThread',(_0x139b27,_0x52e54f)=>this['_updateCommentThread'](_0x52e54f)),this['on']('updateCommentThread',(_0x3a16d7,_0x662c62)=>this['_updateActiveAnnotation'](_0x662c62),{'priority':'lowest'}),this['on']('addComment',(_0x54cf4c,_0x1823f8)=>this['_addComment'](_0x1823f8)),this['on']('updateComment',(_0x337ab9,_0x3596f2)=>this['_updateComment'](_0x3596f2)),this['on']('removeComment',(_0x4fadce,_0x362871)=>this['_removeComment'](_0x362871)),this['on']('addComment',(_0x55f57e,{threadId:_0x390384,isFromAdapter:_0x308c2b})=>{if(_0x308c2b)return;const _0x213655=this['getCommentThread'](_0x390384),_0x440418=_0x213655&&this['_threadToController']['get'](_0x213655);_0x440418&&_0x440418['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1629aa,'change:activeAnnotations',(_0x3e1623,_0x121cbf,_0x2521dd)=>{const _0x62f1c9=Array['from'](_0x2521dd)['map'](_0x2545d9=>this['_viewToController']['get'](_0x2545d9['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x62f1c9?_0x62f1c9['model']:null;});}set['adapter'](_0x289485){if(this['_adapter'])throw new _0x5d5198('commentsrepository-adapter-already-set');this['_adapter']=_0x289485;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x42c49d=Tt,threadId:_0x5a0fbf=_0x5f52ef(),comments:_0x4e36ad=[],unlinkedAt:_0x4c7b56=null,resolvedAt:_0x4f3dbc=null,resolvedBy:_0x369b28=null,target:_0x6b2981=null,context:_0x16ab85=null,attributes:_0x5a7dad={},isResolvable:_0x117b9d=!0x0,isSubmitted:_0x585786=!0x1,isFromAdapter:_0x4c5a8b=!0x1}={}){return this['fire'](bt('addCommentThread',_0x42c49d),{'channelId':_0x42c49d,'threadId':_0x5a0fbf,'comments':_0x4e36ad,'unlinkedAt':_0x4c7b56,'resolvedAt':_0x4f3dbc,'resolvedBy':_0x369b28,'target':_0x6b2981,'context':_0x16ab85,'attributes':_0x5a7dad,'isFromAdapter':_0x4c5a8b,'isResolvable':_0x117b9d,'isSubmitted':_0x585786}),this['getCommentThread'](_0x5a0fbf);}['openNewCommentThread']({channelId:_0x4d314d=Tt,threadId:_0x16f79e=_0x5f52ef(),target:_0x14eba1,context:_0x2a01bc=null,isResolvable:_0x40a83b=!0x0}){if(this['_readOnlyChannels']['has'](_0x4d314d)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x14eba1)throw new _0x5d5198('commentsrepository-missing-target');const _0x325528=this['addCommentThread']({'channelId':_0x4d314d,'threadId':_0x16f79e,'target':_0x14eba1,'context':_0x2a01bc,'isResolvable':_0x40a83b});if(!_0x325528)return null;const _0x17e57a=this['_threadToController']['get'](_0x325528),_0xe1ef73=_0x17e57a['view']['commentThreadInputView']['commentInputView'],_0x39753f=this['context']['plugins']['get'](O),_0x222008=_0x39753f['getByInnerView'](_0x17e57a['view']);return _0x39753f['activate'](_0x222008),_0xe1ef73['once']('editorReady',()=>_0xe1ef73['focus']()),_0x325528;}['hasCommentThread'](_0x186d25){if('string'!=typeof _0x186d25)throw new _0x5d5198('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x186d25);}['updateCommentThread']({channelId:_0x5976e3=Tt,threadId:_0xf16fbe,context:_0x45c581,unlinkedAt:_0x5c0a69,attributes:_0x29386e,isFromAdapter:_0x12be4=!0x1}){return this['fire'](bt('updateCommentThread',_0x5976e3),{'channelId':_0x5976e3,'threadId':_0xf16fbe,'context':_0x45c581,'unlinkedAt':_0x5c0a69,'attributes':_0x29386e,'isFromAdapter':_0x12be4}),this['getCommentThread'](_0xf16fbe);}['getCommentThread'](_0x17b0e6){if('string'!=typeof _0x17b0e6)throw new _0x5d5198('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x17b0e6);}['fetchCommentThread']({channelId:_0x1432b5,threadId:_0x14bde5}={}){const _0xbd091f=this['getCommentThread'](_0x14bde5);if(_0xbd091f)return Promise['resolve'](_0xbd091f);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5d5198('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1432b5,'threadId':_0x14bde5})['then'](_0x4b85c0=>this['hasCommentThread'](_0x14bde5)?this['getCommentThread'](_0x14bde5):_0x4b85c0?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1432b5},_0x4b85c0)):void 0x0)['catch'](_0x16d907=>{throw console['error'](_0x16d907),new _0x5d5198('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2a7928,skipNotAttached:_0xd97464=!0x1,skipEmpty:_0x117891=!0x1,toJSON:_0x4c566f=!0x1}={}){const _0x129eeb=[];for(const _0x1e2d4a of this['_threads']['values']())_0x2a7928&&_0x1e2d4a['channelId']!==_0x2a7928||_0xd97464&&!_0x1e2d4a['isAttached']||_0x117891&&0x0===_0x1e2d4a['length']||_0x129eeb['push'](_0x1e2d4a);return _0x4c566f?_0x129eeb['map'](_0x5e652e=>_0x5e652e['toJSON']()):_0x129eeb;}['setActiveCommentThread'](_0x5405bf){const _0x2db963=this['context']['plugins']['get'](O);if(!_0x5405bf)return void(this['activeCommentThread']&&_0x2db963['deactivateAll']());const _0x2e9838=this['getCommentThread'](_0x5405bf);if(!_0x2e9838)throw new _0x5d5198('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5405bf});if(!this['_threadToController']['has'](_0x2e9838))throw new _0x5d5198('commentsrepository-active-not-attached',null,{'threadId':_0x5405bf});const _0x3a5853=_0x2db963['getByInnerView'](this['_threadToController']['get'](_0x2e9838)['view']);_0x2db963['activate'](_0x3a5853);}['switchReadOnly'](_0x16c4fc,_0x3dfef8){_0x16c4fc?this['_readOnlyChannels']['add'](_0x3dfef8):this['_readOnlyChannels']['delete'](_0x3dfef8),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x18bfbe){return this['_readOnlyChannels']['has'](_0x18bfbe)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4c36c3,_0x25f24e){return new Ct(_0x4c36c3,_0x25f24e);}['setPermissions'](_0x4693ee,_0x1ef310=Tt){this['_permissions']['set'](_0x1ef310,_0x4693ee),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2b5aa9=Tt){return this['_permissions']['has'](_0x2b5aa9)?this['_permissions']['get'](_0x2b5aa9):_t;}['_addCommentThread']({channelId:_0xdb9b1e,threadId:_0x1df77b,comments:_0x184e43,unlinkedAt:_0x21842e,resolvedAt:_0x44b269,resolvedBy:_0x29e019,target:_0x5297cf,context:_0x431f19,attributes:_0x1cacdb,isFromAdapter:_0x190c41,isResolvable:_0x1f1853,isSubmitted:_0x3ef963}){if('string'!=typeof _0x1df77b)throw new _0x5d5198('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1df77b});if(this['hasCommentThread'](_0x1df77b))throw new _0x5d5198('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1df77b});const _0x5130db=new ui(this,{'channelId':_0xdb9b1e,'id':_0x1df77b,'context':_0x431f19,'attributes':_0x1cacdb,'unlinkedAt':_0x21842e,'resolvedAt':_0x44b269,'resolvedBy':_0x29e019?this['context']['plugins']['get'](it)['getUser'](_0x29e019):null,'isResolvable':_0x1f1853,'isSubmitted':_0x3ef963||_0x190c41});this['_threads']['set'](_0x1df77b,_0x5130db);for(const _0x1c8f2a of _0x184e43)_0x5130db['_add'](this['_createNewComment']({'threadId':_0x1df77b,..._0x1c8f2a}));return _0x5297cf&&_0x5130db['attachTo'](_0x5297cf),_0x190c41||!_0x5130db['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0xdb9b1e,'threadId':_0x1df77b});}['_submitCommentThread']({channelId:_0x55bf7d,threadId:_0x3f2e55}){if(!this['hasCommentThread'](_0x3f2e55))throw new _0x5d5198('commentsrepository-missing-comment-thread',this);const _0x55ffde=this['getCommentThread'](_0x3f2e55);if(_0x55ffde['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x25fcc5,comments:_0x372afc,resolvedAt:_0x5e6dc1,resolvedBy:_0x315548,context:_0x319750,attributes:_0x22f68f}=_0x55ffde,_0x57600d=this['context']['plugins']['get']('PendingActions'),_0x42cbef=_0x57600d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x55bf7d,'threadId':_0x25fcc5,'comments':_0x372afc['map'](_0x3bb1d9=>_0x3bb1d9['toJSON']()),'resolvedAt':_0x5e6dc1,'resolvedBy':_0x315548?_0x315548['id']:_0x315548,'context':_0x319750,'attributes':_0x22f68f})['then'](({comments:_0x5f05c5})=>{_0x57600d['remove'](_0x42cbef);for(const _0x533c3d of _0x5f05c5)this['_updateComment']({'channelId':_0x55bf7d,'threadId':_0x3f2e55,'commentId':_0x533c3d['commentId'],'createdAt':_0x533c3d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3333f4=>{throw console['error'](_0x3333f4),new _0x5d5198('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x522388,target:_0x10906d}){const _0x55f105=this['getCommentThread'](_0x522388);if(!_0x55f105)throw new _0x5d5198('commentsrepository-attach-missing-comment-thread',this);const _0x2b4303=this['context']['plugins']['get']('PendingActions'),_0x161103=this['context']['plugins']['get'](O),_0x42533d=this['_createCommentThreadView'](_0x55f105),_0x45874a=new Ct(_0x55f105,_0x42533d);let _0x1c0f09=null;_0x42533d['on']('change:isDirty',(_0x23668b,_0x11064d,_0x2cc22e)=>{_0x2cc22e?_0x1c0f09=_0x2b4303['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1c0f09&&(_0x2b4303['remove'](_0x1c0f09),_0x1c0f09=null);}),this['_threadToController']['set'](_0x55f105,_0x45874a),this['_viewToController']['set'](_0x42533d,_0x45874a);const _0x4a4b45=new S(this['context']['locale'],_0x42533d);_0x4a4b45['bind']('length')['to'](_0x42533d),_0x4a4b45['bind']('isDirty')['to'](_0x42533d,'isDirty',_0x42533d,'length',(_0xbd118e,_0x1f0b6c)=>_0xbd118e||!_0x1f0b6c),_0x4a4b45['bind']('isActive')['to'](_0x42533d),_0x4a4b45['type']='comment';const _0x560e1f=new d({'view':_0x4a4b45,'target':_0x10906d,'type':'comment','isVisible':!_0x55f105['archivedAt']});return _0x42533d['on']('escape',()=>{_0x560e1f['fire']('escape');}),this['_bindAnnotationToEditors'](_0x42533d,_0x560e1f),_0x161103['add'](_0x560e1f),_0x560e1f;}['_bindAnnotationToEditors'](_0x5155fb,_0x5d9346){this['listenTo'](_0x5155fb,'editorReady',(_0x18510a,_0x428c75)=>{const _0x2d528d=_0x428c75['ui']['view']['body']['bodyCollectionContainer'];_0x5d9346['focusableElements']['add'](_0x2d528d),this['context']instanceof _0x1431d7&&this['context']['ui']['focusTracker']['add'](_0x2d528d);},{'priority':'highest'}),this['listenTo'](_0x5155fb,'editorDestroyed',(_0x44c4cf,_0x310dde)=>{const _0x5234d8=_0x310dde['ui']['view']['body']['bodyCollectionContainer'];_0x5d9346['focusableElements']['has'](_0x5234d8)&&_0x5d9346['focusableElements']['remove'](_0x5234d8),this['context']instanceof _0x1431d7&&this['context']['ui']['focusTracker']['remove'](_0x5234d8);});}['_unbindEditors'](_0x508ed3){this['stopListening'](_0x508ed3,'editorReady'),this['stopListening'](_0x508ed3,'editorDestroyed');}['_createCommentThreadView'](_0x416180){const _0x13c30e=this['context']['plugins']['get'](it),{config:_0x7efbb5,locale:_0x4971b4}=this['context'],_0xc3d687=lt(_0x7efbb5['get']('locale'),_0x4971b4);return new(0x0,(_0x7efbb5['get']('comments'))['CommentThreadView'])(_0x4971b4,_0x416180,_0x13c30e['me'],{'editorConfig':{..._0x7efbb5['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x7efbb5['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x7efbb5['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x7efbb5['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x7efbb5['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xc3d687,'CommentView':_0x7efbb5['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3aaf7d,channelId:_0x392d7a,resolvedAt:_0x20913e,resolvedBy:_0x362d17,isFromAdapter:_0x49ae44}){if(!this['hasCommentThread'](_0x3aaf7d))throw new _0x5d5198('commentsrepository-missing-comment-thread',null,{'threadId':_0x3aaf7d});const _0x565428=this['getCommentThread'](_0x3aaf7d);if(_0x565428['isResolved'])throw new _0x5d5198('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3aaf7d});const _0x471187=this['context']['plugins']['get'](it);if(_0x565428['resolvedBy']=_0x471187['getUser'](_0x362d17),_0x565428['resolvedAt']=_0x20913e,_0x49ae44||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4f3475=this['context']['plugins']['get']('PendingActions'),_0x5a104b=_0x4f3475['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x392d7a,'threadId':_0x3aaf7d})['then'](({resolvedAt:_0x5057f1,resolvedBy:_0x3fd750})=>{_0x4f3475['remove'](_0x5a104b),_0x565428['resolvedBy']['id']!==_0x3fd750&&(_0x565428['resolvedBy']=_0x471187['getUser'](_0x3fd750)),_0x565428['resolvedAt']=_0x5057f1;})['catch'](_0x2721d1=>{throw console['error'](_0x2721d1),new _0x5d5198('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x21a08d,channelId:_0x11b6c0,isFromAdapter:_0x42666e}){if(!this['hasCommentThread'](_0x21a08d))throw new _0x5d5198('commentsrepository-missing-comment-thread',null,{'threadId':_0x21a08d});const _0x330dfe=this['getCommentThread'](_0x21a08d);if(!_0x330dfe['isResolved'])throw new _0x5d5198('commentsrepository-reopen-comment-thread',null,{'threadId':_0x21a08d});if(_0x330dfe['resolvedBy']=null,_0x330dfe['resolvedAt']=null,_0x42666e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x461f06=this['context']['plugins']['get']('PendingActions'),_0x583f0f=_0x461f06['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x11b6c0,'threadId':_0x21a08d})['then'](()=>_0x461f06['remove'](_0x583f0f))['catch'](_0x406e9d=>{throw console['error'](_0x406e9d),new _0x5d5198('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x428bbe,isFromAdapter:_0x4afc4a}){const _0x5df961=this['getCommentThread'](_0x428bbe);if(!_0x5df961)throw new _0x5d5198('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x428bbe),this['_threads']['delete'](_0x428bbe),!_0x5df961['isSubmitted']||_0x4afc4a||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x120dca=this['context']['plugins']['get']('PendingActions'),{channelId:_0x41e4c1}=_0x5df961,_0x4cc2e7=_0x120dca['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x41e4c1,'threadId':_0x428bbe})['then'](()=>_0x120dca['remove'](_0x4cc2e7))['catch'](_0x507cba=>{throw console['error'](_0x507cba),new _0x5d5198('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5c7d51,unlinkedAt:_0xa4d378,context:_0x3c1d0,attributes:_0x16445b,isFromAdapter:_0x3a7973}){if('string'!=typeof _0x5c7d51)throw new _0x5d5198('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5c7d51});if(!this['hasCommentThread'](_0x5c7d51))throw new _0x5d5198('commentsrepository-missing-comment-thread',null,{'threadId':_0x5c7d51});const _0x35a10d=this['getCommentThread'](_0x5c7d51);let _0x103dfa=!0x1;if(void 0x0!==_0x3c1d0&&_0x35a10d['context']!==_0x3c1d0&&(_0x35a10d['context']=_0x3c1d0,_0x103dfa=!0x0),void 0x0!==_0xa4d378&&_0x35a10d['unlinkedAt']!==_0xa4d378&&(_0x35a10d['unlinkedAt']=_0xa4d378,_0x103dfa=!0x0),_0x16445b&&!wt(_0x16445b,_0x35a10d['attributes'])&&(_0x35a10d['attributes']=_0x16445b,_0x103dfa=!0x0),!_0x103dfa)return Promise['resolve']();if(!_0x35a10d['isSubmitted']||_0x3a7973||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2461e5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x40e6bd}=_0x35a10d,_0xc35f53=_0x2461e5['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x40e6bd,'threadId':_0x5c7d51,'context':_0x3c1d0,'unlinkedAt':_0xa4d378,'attributes':_0x16445b})['then'](()=>_0x2461e5['remove'](_0xc35f53))['catch'](_0x44810a=>{throw console['error'](_0x44810a),new _0x5d5198('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x162103){const _0x53fb40=this['context']['plugins']['get'](O),_0x4d2d71=this['getCommentThread'](_0x162103);if(_0x4d2d71['_isAttached']=!0x1,this['_threadToController']['has'](_0x4d2d71)){const _0x39a16b=this['_threadToController']['get'](_0x4d2d71),_0x1d9814=_0x39a16b['view'],_0x27c5ab=_0x53fb40['getByInnerView'](_0x1d9814);this['_threadToController']['delete'](_0x4d2d71),this['_viewToController']['delete'](_0x1d9814),_0x27c5ab&&_0x53fb40['remove'](_0x27c5ab),_0x39a16b['destroy'](),_0x1d9814['destroy']()['then'](()=>{this['_unbindEditors'](_0x1d9814);});}}['_updateActiveAnnotation']({threadId:_0x5b5288,resolvedAt:_0x55242b,unlinkedAt:_0x1ab7fe}){const _0x2f8559=!!_0x55242b,_0x4055a6=this['context']['plugins']['get'](O),_0x3629c5=this['getCommentThread'](_0x5b5288);if(this['_threadToController']['has'](_0x3629c5)){const _0x32b600=this['_threadToController']['get'](_0x3629c5)['view'],_0x3cb866=_0x4055a6['getByInnerView'](_0x32b600);_0x3cb866&&(_0x2f8559&&_0x4055a6['_removeActiveAnnotation'](_0x3cb866),_0x1ab7fe?_0x3cb866['isVisible']=!0x1:_0x3cb866['refreshVisibility']());}}['_getExternalAuthor'](_0x4e38e2){const _0x3efff9=this['context']['plugins']['get'](it),_0x30a600=pt('external:'+_0x4e38e2),_0x4d9204=_0x3efff9['getUser'](_0x30a600);return _0x4d9204||_0x3efff9['addUser']({'id':_0x30a600,'name':_0x4e38e2});}['_createNewComment']({threadId:_0x402112,commentId:_0x32ec8c=_0x5f52ef(),content:_0x67a761,authorId:_0x3b13f1,createdAt:_0x4737ac,attributes:_0x3babd7}){if('string'!=typeof _0x32ec8c)throw new _0x5d5198('commentsrepository-invalid-commentid');if('string'!=typeof _0x3b13f1)throw new _0x5d5198('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x67a761||!_0x67a761['trim']())throw new _0x5d5198('commentsrepository-invalid-comment-content');const _0x37ae53=this['context']['plugins']['get'](it)['getUser'](_0x3b13f1);if(!_0x37ae53)throw new _0x5d5198('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3b13f1});let _0x50b24c=null,_0x309f90=_0x4737ac;return _0x3babd7?.['@external']&&(_0x50b24c=this['_getExternalAuthor'](_0x3babd7['@external']['authorName']),_0x309f90=new Date(_0x3babd7['@external']['createdAt'])),new fi(this,{'threadId':_0x402112,'id':_0x32ec8c,'author':_0x50b24c||_0x37ae53,'creator':_0x37ae53,'content':_0x67a761,'createdAt':_0x4737ac,'authoredAt':_0x309f90,'attributes':_0x3babd7});}['_addComment'](_0x4ab5f6){let {threadId:_0x40a242,content:_0x231806,attributes:_0x192397,isFromAdapter:_0x392d7d}=_0x4ab5f6;const _0xbaea12=this['getCommentThread'](_0x4ab5f6['threadId']);if(!_0xbaea12)throw new _0x5d5198('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4d6d40=this['_createNewComment'](_0x4ab5f6),{id:_0x262397}=_0x4d6d40;if(_0xbaea12['_add'](_0x4d6d40),_0x392d7d||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0xbaea12['isSubmitted'])return Promise['resolve']();const _0x11e07a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x523ad3}=_0xbaea12,_0x55eed6=_0x11e07a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x192397||(_0x192397={}),this['adapter']['addComment']({'channelId':_0x523ad3,'threadId':_0x40a242,'commentId':_0x262397,'content':_0x231806,'attributes':_0x192397})['then'](_0x1d22d9=>{_0x11e07a['remove'](_0x55eed6),_0x1d22d9&&this['_updateComment']({'channelId':_0x523ad3,'threadId':_0x40a242,'commentId':_0x262397,'createdAt':_0x1d22d9['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4d77fa=>{throw console['error'](_0x4d77fa),new _0x5d5198('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x9fcfae,commentId:_0x48e14e,content:_0x35cf17,createdAt:_0x15972c,attributes:_0x2c4b4b,isFromAdapter:_0x357380}){if(void 0x0!==_0x35cf17&&('string'!=typeof _0x35cf17||!_0x35cf17['trim']()['length']))throw new _0x5d5198('commentsrepository-update-comment-invalid-content');const _0x3d198b=this['getCommentThread'](_0x9fcfae),_0x362821=_0x3d198b['getComment'](_0x48e14e);if(!_0x362821)throw new _0x5d5198('commentsrepository-update-missing-comment',this);let _0x284ad0=!0x1;if(_0x35cf17&&_0x35cf17!==_0x362821['content']&&(_0x362821['isEditable']||_0x357380)&&(_0x362821['content']=_0x35cf17,_0x284ad0=!0x0),_0x15972c&&_0x15972c!==_0x362821['createdAt']&&(_0x362821['createdAt']=_0x15972c,_0x362821['attributes']&&_0x362821['attributes']['@external']||(_0x362821['authoredAt']=_0x15972c),_0x284ad0=!0x0),_0x2c4b4b&&!wt(_0x2c4b4b,_0x362821['attributes'])&&(_0x362821['attributes']=_0x2c4b4b,_0x284ad0=!0x0),!_0x284ad0)return Promise['resolve']();if(_0x3d198b['fire']('commentUpdated'),_0x357380||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x427b8d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x298737}=this['getCommentThread'](_0x362821['threadId']),_0x11f558=_0x427b8d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x298737,'threadId':_0x9fcfae,'commentId':_0x48e14e,'content':_0x35cf17,'attributes':_0x2c4b4b})['then'](()=>_0x427b8d['remove'](_0x11f558))['catch'](_0x2979e8=>{throw console['error'](_0x2979e8),new _0x5d5198('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x36ad95,commentId:_0x3eb2bf,isFromAdapter:_0x4b995b}){const _0x1f6ed7=this['getCommentThread'](_0x36ad95),_0x15850b=_0x1f6ed7['getComment'](_0x3eb2bf);if(!_0x15850b)throw new _0x5d5198('commentsrepository-remove-missing-comment',this);if(_0x1f6ed7['_remove'](_0x15850b),_0x4b995b||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5124ee=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3d208f}=_0x1f6ed7,_0x22f4cc=_0x5124ee['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3d208f,'threadId':_0x36ad95,'commentId':_0x3eb2bf})['then'](()=>_0x5124ee['remove'](_0x22f4cc))['catch'](_0x283679=>{throw console['error'](_0x283679),new _0x5d5198('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
30
+ _0x30449f(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4f8ecb,_0x51845c){super();const _0x3e7601=_0x51845c['isResolvable'];this['channelId']=_0x51845c['channelId'],this['id']=_0x51845c['id'],this['comments']=new _0x5d031f(),this['_repository']=_0x4f8ecb,this['_isAttached']=!0x1,this['_isSubmitted']=_0x51845c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4f8ecb,'_permissions',_0x4f8ecb,'_readOnlyChannels',()=>_0x4f8ecb['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4f8ecb,'_permissions',()=>_0x4f8ecb['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4f8ecb,'_permissions',()=>{const _0x5b049d=_0x4f8ecb['getPermissions'](this['channelId']);return _0x5b049d['write']||_0x5b049d['admin'];}),this['bind']('isResolvable')['to'](_0x4f8ecb,'_permissions',()=>_0x3e7601&&_0x4f8ecb['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x51845c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x53d90a,_0x1ac7c1)=>_0x53d90a?_0x1ac7c1?_0x53d90a<_0x1ac7c1?_0x53d90a:_0x1ac7c1:_0x53d90a:_0x1ac7c1),this['set']('unlinkedAt',_0x51845c['unlinkedAt']||null),this['set']('resolvedAt',_0x51845c['resolvedAt']||null),this['set']('resolvedBy',_0x51845c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0xa07960=>!!_0xa07960),this['set']('attributes',_0x51845c['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x43a3e5,_0x5ab3ed)=>_0x43a3e5+_0x5ab3ed['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x5282f2,id:_0x4a015a}=this;this['_repository']['fire'](bt('submitCommentThread',_0x5282f2),{'channelId':_0x5282f2,'threadId':_0x4a015a});}['setUnlinkedAt'](_0x21b16c){this['_update']({'unlinkedAt':_0x21b16c});}['resolve']({resolvedAt:_0x2196bc=new Date(),resolvedBy:_0x49dc63=null,isFromAdapter:_0xacabc3=!0x1}={}){const _0x55acf4=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x675dcd,id:_0x24fc3f}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x675dcd),{'channelId':_0x675dcd,'threadId':_0x24fc3f,'resolvedAt':_0x2196bc,'resolvedBy':_0x49dc63||_0x55acf4['id'],'isFromAdapter':_0xacabc3});}['reopen']({isFromAdapter:_0x3e7ddf=!0x1}={}){const {channelId:_0x11f050,id:_0x169d30}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x11f050),{'channelId':_0x11f050,'threadId':_0x169d30,'isFromAdapter':_0x3e7ddf});}['setContext'](_0x25d39c){this['context']||this['_update']({'context':_0x25d39c});}['setAttribute'](_0x5992d0,_0x23aa18){const _0x46a17a=It(this['attributes']);At(_0x46a17a,_0x5992d0,_0x23aa18),this['_update']({'attributes':_0x46a17a});}['removeAttribute'](_0x2601cb){const _0x1c4ef1=It(this['attributes']);yt(_0x1c4ef1,_0x2601cb),this['_update']({'attributes':_0x1c4ef1});}['remove']({isFromAdapter:_0x134336=!0x1}={}){const {channelId:_0x2b3815,id:_0x3f1224}=this;this['_repository']['fire'](bt('removeCommentThread',_0x2b3815),{'channelId':_0x2b3815,'threadId':_0x3f1224,'isFromAdapter':_0x134336});}['attachTo'](_0x39e859){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x39e859});}['addComment'](_0x2b94bd){const {channelId:_0x1d5ade,id:_0xd9831a}=this;this['_repository']['fire'](bt('addComment',_0x1d5ade,_0xd9831a),Object['assign']({'channelId':_0x1d5ade,'threadId':_0xd9831a},_0x2b94bd));}['getComment'](_0x472c46){if('string'!=typeof _0x472c46)throw new _0x5d5198('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x472c46});return this['comments']['get'](_0x472c46);}['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'](_0x336dd5=>_0x336dd5['toJSON']()),'attributes':this['attributes']};}['_add'](_0xec9faa){return this['listenTo'](_0xec9faa,'change:authoredAt',()=>{const _0x3770e3=this['_findOptimalIndex'](_0xec9faa),_0x1470f4=this['comments'];_0x3770e3-0x1!=_0x1470f4['getIndex'](_0xec9faa)&&_0x3770e3+0x1!=_0x1470f4['getIndex'](_0xec9faa)&&(this['_remove'](_0xec9faa),this['_add'](_0xec9faa));}),this['comments']['add'](_0xec9faa,this['_findOptimalIndex'](_0xec9faa));}['_update'](_0x8e23d8){const {channelId:_0x4f5426,id:_0xe0b1a5}=this;this['_repository']['fire'](bt('updateCommentThread',_0x4f5426),{..._0x8e23d8,'channelId':_0x4f5426,'threadId':_0xe0b1a5});}['_remove'](_0x449c20){return this['stopListening'](_0x449c20),_0x449c20['destroy'](),this['comments']['remove'](_0x449c20);}['_findOptimalIndex'](_0x347fc1){const _0x3d2b0a=this['comments']['find'](_0x2f8eeb=>new Date(_0x2f8eeb['authoredAt'])['getTime']()>new Date(_0x347fc1['authoredAt'])['getTime']());return _0x3d2b0a?this['comments']['getIndex'](_0x3d2b0a):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
31
+ _0x30449f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2c9e07,_0x4b5ee4){super();const _0x50be30=_0x2c9e07['context']['plugins']['get'](it)['me'],_0x57fe4c=_0x2c9e07['getCommentThread'](_0x4b5ee4['threadId']),_0x36323f=0x0===_0x57fe4c['comments']['length'],_0x550dd0=_0x50be30===_0x4b5ee4['author'];this['id']=_0x4b5ee4['id'],this['threadId']=_0x4b5ee4['threadId'],this['author']=_0x4b5ee4['author'],this['creator']=_0x4b5ee4['creator'],this['isExternal']=Boolean(_0x4b5ee4['attributes']&&_0x4b5ee4['attributes']['@external']),this['set']('content',_0x4b5ee4['content']),this['createdAt']=_0x4b5ee4['createdAt']||new Date(),this['set']('authoredAt',_0x4b5ee4['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x57fe4c,'resolvedAt'),this['set']('attributes',_0x4b5ee4['attributes']||{}),this['bind']('isEditable')['to'](_0x2c9e07,'_permissions',()=>{const _0x12066c=_0x2c9e07['getPermissions'](_0x57fe4c['channelId'])['write'],_0x333613=_0x2c9e07['getPermissions'](_0x57fe4c['channelId'])['modifyAll'];return _0x550dd0&&_0x12066c||!_0x550dd0&&_0x333613;}),this['bind']('isRemovable')['to'](_0x57fe4c,'isRemovable',_0x2c9e07,'_permissions',_0x3a5149=>{const _0x53ddbd=_0x2c9e07['getPermissions'](_0x57fe4c['channelId'])['write'],_0x142d78=_0x2c9e07['getPermissions'](_0x57fe4c['channelId'])['modifyAll'];return _0x550dd0&&_0x53ddbd||_0x3a5149&&_0x36323f||!_0x550dd0&&_0x142d78&&!_0x36323f;}),this['bind']('isReadOnly')['to'](_0x57fe4c,'isReadOnly'),this['_repository']=_0x2c9e07;}get['weight'](){return Math['max'](function(_0x22b140){const _0x522b3d=document['createElement']('div');return _0x522b3d['innerHTML']=_0x22b140,_0x522b3d['textContent']['length'];}(this['content']),0xc8);}['update'](_0x558763){const {threadId:_0x36b795,id:_0x4be085}=this;if(!this['_repository']['hasCommentThread'](_0x36b795))throw new _0x5d5198('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x540fa3}=this['_repository']['getCommentThread'](_0x36b795);this['_repository']['fire'](bt('updateComment',_0x540fa3,_0x36b795),{'channelId':_0x540fa3,'threadId':_0x36b795,'commentId':_0x4be085,..._0x558763});}['setAttribute'](_0x4002a7,_0xa6acf8){const _0x53c307=It(this['attributes']);At(_0x53c307,_0x4002a7,_0xa6acf8),this['update']({'attributes':_0x53c307});}['removeAttribute'](_0x178d10){const _0x5a2249=It(this['attributes']);yt(_0x5a2249,_0x178d10),this['update']({'attributes':_0x5a2249});}['remove'](_0x32626f={}){if(!_0x32626f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2dc9ad,id:_0x2a0438}=this;if(!this['_repository']['hasCommentThread'](_0x2dc9ad))throw new _0x5d5198('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xd8935d}=this['_repository']['getCommentThread'](_0x2dc9ad);this['_repository']['fire'](bt('removeComment',_0xd8935d,_0x2dc9ad),{'channelId':_0xd8935d,'threadId':_0x2dc9ad,'commentId':_0x2a0438,..._0x32626f});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x284bf6,..._0x55b6e3){for(const _0x452776 of _0x55b6e3)void 0x0!==_0x452776&&(_0x284bf6+=':'+String(_0x452776));return _0x284bf6;}class J extends _0x1da399{['refresh'](){const _0x2d0894=this['editor']['model']['document']['selection'];for(const _0xb04082 of _0x2d0894['getRanges']())if(this['_hasContent'](_0xb04082))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x4c3e6f=_0x5f52ef()}={}){const _0x4a890d=this['editor']['model'],_0x12c9ae=[];for(const _0x50305d of _0x4a890d['document']['selection']['getRanges']())this['_hasContent'](_0x50305d)&&_0x12c9ae['push'](this['_trimToContent'](_0x50305d));_0x4a890d['change'](_0x3f15e7=>{for(const _0x389634 of _0x12c9ae){const _0x1d5949=_0x5f52ef()['substr'](0x1,0x5),_0x4fde04='comment:'+_0x4c3e6f+':'+_0x1d5949;_0x3f15e7['addMarker'](_0x4fde04,{'range':_0x389634,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x5f0a01){for(const _0x3ee918 of _0x5f0a01['getItems']())if(this['_itemIsContent'](_0x3ee918))return!0x0;return!0x1;}['_itemIsContent'](_0x50dffc){return _0x50dffc['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x50dffc)&&!_0x50dffc['is']('element','tableCell');}['_trimToContent'](_0x26773e){const _0x2e9e25=_0x2b9cda=>!this['_itemIsContent'](_0x2b9cda['item']),_0x3f7687=_0x26773e['start']['getLastMatchingPosition'](_0x2e9e25),_0x5cbfb2=_0x26773e['end']['getLastMatchingPosition'](_0x2e9e25,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3f7687,_0x5cbfb2);}}class P extends _0x345605{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5553c7){super(_0x5553c7),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x34cebe=this['editor'],_0x190543=_0x34cebe['model']['document']['selection'],_0x30ee83=_0x2c8b2c(()=>this['refreshSelectedViews'](),0xa);_0x190543['on']('change:range',(_0x2950bf,_0x1ac1ff)=>{_0x1ac1ff['directChange']&&(_0x30ee83['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x34cebe['editing']['view']['document'],'change:isFocused',(_0x406f88,_0x1af140,_0x39f0de)=>{_0x39f0de&&_0x30ee83();}),this['listenTo'](_0x34cebe['ui']['focusTracker'],'change:isFocused',(_0xe3dc8f,_0x5707e2,_0x37ff3b)=>{_0x37ff3b||_0x34cebe['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x2bb2d9=>this['_editorAnnotationsData']['has'](_0x2bb2d9['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x51a188){if(this['_editorAnnotations']['has'](_0x51a188['view']))return;this['_editorAnnotations']['add'](_0x51a188['view']),this['editor']['ui']['focusTracker']['add'](_0x51a188['view']['element']);const _0x50fe25=this['editor']['plugins']['get'](O);this['listenTo'](_0x50fe25['collection'],'remove',(_0x37967f,_0xe007fa)=>{this['editor']['ui']['focusTracker']['remove'](_0xe007fa['view']['element']),this['_editorAnnotations']['delete'](_0xe007fa['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4dff60){if('function'!=typeof _0x4dff60)throw new _0x5d5198('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4dff60);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x68ca2c,annotations:_0x31406c}){const _0x489818=[],_0x54696a=this['editor']['model']['document']['selection'],_0x2be1f7=Array['from'](_0x54696a['getRanges']());for(const [_0xea84a8,_0x8e9c0e]of this['_editorAnnotationsData']){const _0xf6457e=_0x4db9ec(_0x8e9c0e),_0x1e579b=_0x31406c['getByInnerView'](_0xea84a8);_0xf6457e&&_0x1e579b&&_0x489818['push']({'annotation':_0x1e579b,'range':_0xf6457e});}function _0x4db9ec(_0x1423fb){for(const _0x4bac75 of _0x1423fb)for(const _0x4f97c2 of _0x2be1f7)if(_0x4bac75['containsRange'](_0x4f97c2,!_0x54696a['isCollapsed']))return _0x4bac75;return null;}return _0x489818['sort']((_0xb80fe2,_0x24e8da)=>{const _0x126678=_0xb80fe2['range'],_0x17d340=_0x24e8da['range'];if(!_0x126678['isEqual'](_0x17d340)){if(_0x126678['containsRange'](_0x17d340,!0x0))return 0x1;if(_0x17d340['containsRange'](_0x126678,!0x0))return-0x1;}return _0xb80fe2['annotation']==_0x68ca2c?-0x1:_0x24e8da['annotation']==_0x68ca2c?0x1:0x0;})['map'](_0x3f13be=>_0x3f13be['annotation']);}get['_editorAnnotationsData'](){const _0x2634ba=new Map();for(const _0x3c434e of Array['from'](this['_dataCollectors']))for(const [_0x5424ce,_0x2de0a6]of _0x3c434e())_0x2634ba['set'](_0x5424ce,_0x2de0a6);return _0x2634ba;}}class st extends _0x345605{['afterInit'](){const _0x3dfd4d=this['editor'];if(!_0x3dfd4d['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3dfd4d['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x345605{constructor(_0x5ae000){super(_0x5ae000),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x584b3e=this['editor'],_0x2bb042=_0x584b3e['commands']['get']('importWord'),_0x1964b3=_0x584b3e['plugins']['get'](it);_0x2bb042&&(_0x2bb042['on']('execute',(_0x3d9428,[,_0x10c044])=>{_0x10c044['collaboration_features']={'comments':!0x0,'user_id':_0x1964b3['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2bb042,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x382bbd,_0x3e203f){const {comment_threads:_0x571f61}=_0x3e203f;_0x571f61&&_0x571f61['forEach'](({thread_id:_0x19e803,comments:_0x121630,is_resolved:_0x1022e8})=>{const _0x595cea=new Date(),_0x2efd9c=_0x121630['map'](({author:_0x3ba032,content:_0x1c32b2,created_at:_0x443711})=>({'content':_0x1c32b2,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x595cea,'attributes':{'@external':{'authorName':_0x3ba032,'createdAt':_0x443711?new Date(_0x443711):new Date(),'source':'importWord'}}})),_0x20a040=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x20a040,'threadId':_0x19e803,'comments':_0x2efd9c,'resolvedAt':_0x1022e8?_0x595cea:null});});}}class at extends _0x345605{constructor(_0x4dc825){super(_0x4dc825),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x384de6=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x384de6,'contentInsertion',(_0x4d340b,_0x2899bb)=>this['_removeMarkersWithoutThreads'](_0x2899bb['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1bf3d3){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1bf3d3;const _0x101543=this['editor']['plugins']['get']('CommentsRepository');for(const _0x7ec36a of _0x1bf3d3['keys']()){const [_0x47f787,_0x4aeccd]=_0x7ec36a['split'](':');'comment'!=_0x47f787||_0x101543['hasCommentThread'](_0x4aeccd)||_0x1bf3d3['delete'](_0x7ec36a);}return _0x1bf3d3;}['_registerMarkerInClipboardPipeline'](){const _0x2c48e8=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xcfc8e4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xcfc8e4&&_0x2c48e8['_registerMarkerToCopy']('comment',_0xcfc8e4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x31b304){switch(_0x31b304){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x345605{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2bc9bc,_0x34431f)=>{if(!_0x34431f['options']['showCommentHighlights'])return null;if(_0x34431f['options']['ignoreResolvedComments']){const {id:_0x5e3e51}=er(_0x2bc9bc['markerName']),_0x4c92f6=this['editor']['plugins']['get'](o);if(_0x4c92f6['getCommentThread'](_0x5e3e51)?.['isResolved']&&_0x2bc9bc['item'])return _0x34431f['consumable']['consume'](_0x2bc9bc['item'],'addMarker:'+_0x2bc9bc['markerName']),_0x34431f['consumable']['consume'](_0x2bc9bc['item'],'removeMarker:'+_0x2bc9bc['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2ff8c6=>{_0x2ff8c6['on']('addMarker:comment',(_0x50cf4e,_0x572a6d,_0x2188bd)=>{if(!_0x2188bd['options']['showCommentHighlights'])return;const _0x1739b5=_0x572a6d['item'];if(!_0x1739b5)return;const _0x208f8a=_0x2188bd['mapper']['toViewElement'](_0x1739b5);this['editor']['model']['schema']['isObject'](_0x1739b5)&&_0x208f8a&&!_0x208f8a['getCustomProperty']('widget')&&_0x208f8a['is']('containerElement')&&_0x481683(_0x208f8a,_0x2188bd['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2cf1e5,{writer:_0x32a0b8,options:_0x29fcdf})=>{if(!_0x29fcdf['showCommentHighlights'])return null;const _0x42a3ee=_0x32a0b8['createContainerElement']('div'),_0x596321=_0x32a0b8['createEmptyElement']('hr');return _0x32a0b8['addClass']('ck-horizontal-line',_0x42a3ee),_0x32a0b8['insert'](_0x32a0b8['createPositionAt'](_0x42a3ee,0x0),_0x596321),_0x42a3ee;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x64eb01,{writer:_0x7386a9,options:_0x5c7816})=>{if(!_0x5c7816['showCommentHighlights'])return null;const _0x2b474a=_0x7386a9['createContainerElement']('span'),_0x496a6f=_0x7386a9['createEmptyElement']('img');return _0x7386a9['addClass']('image-inline',_0x2b474a),_0x7386a9['insert'](_0x7386a9['createPositionAt'](_0x2b474a,0x0),_0x496a6f),_0x2b474a;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xf756cc,{writer:_0x3cc360,options:_0x40a2b1})=>{if(_0x40a2b1['showCommentHighlights'])return _0x3cc360['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2db615,_0x2ae062,_0x27ad44)=>{_0x27ad44['options']['showCommentHighlights']&&_0x2db615['stop']();},{'priority':'high'});}}class r extends _0x345605{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xcaf500){super(_0xcaf500),this['set']('isThreadsLoadingPaused',!0x0),_0xcaf500['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2d83cc,_0x2a64cf,_0x59caa4,_0x46c8db)=>{const _0x68732f=_0xcaf500['plugins']['get'](o),_0x1a7cdb=_0x59caa4?er(_0x59caa4)['id']:null;_0xcaf500['model']['change'](()=>{if(_0x1a7cdb){const _0x1c2215=this['getAllMarkersForId'](_0x1a7cdb);for(const _0x4734d2 of _0x1c2215)_0xcaf500['editing']['reconvertMarker'](_0x4734d2);}if(_0x46c8db){const {id:_0x6a8a15}=er(_0x46c8db),_0x532e53=_0x68732f['getCommentThread'](_0x6a8a15);if(_0x532e53&&_0x532e53['unlinkedAt'])return;if(_0x532e53&&!_0x532e53['isAttached'])return;const _0x56fb52=this['getAllMarkersForId'](_0x6a8a15);for(const _0x5c3fa8 of _0x56fb52)_0xcaf500['editing']['reconvertMarker'](_0x5c3fa8);}}),_0x1a7cdb&&this['scrollToThreadMarker'](_0x1a7cdb);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x558e04=this['editor'],_0x39f06a=_0x558e04['plugins']['get'](o),_0x5c90d3=_0x558e04['config']['get']('collaboration.channelId'),_0x15fc63=_0x39f06a['getCommentThreads']()['filter'](_0x5c8a13=>_0x5c8a13['channelId']!==_0x5c90d3);_0x558e04['commands']['add']('addCommentThread',new J(_0x558e04)),this['listenTo'](_0x558e04,'change:isReadOnly',(_0x3cc975,_0x4c9a80,_0x1d9e57)=>{_0x39f06a['switchReadOnly'](_0x1d9e57,_0x558e04['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x39f06a,ft('addCommentThread',_0x5c90d3),(_0xda0b66,{threadId:_0x435668})=>{const _0x1927ff=this['editor']['plugins']['get'](o)['getCommentThread'](_0x435668);_0x1927ff?.['unlinkedAt']&&this['_attachArchivedThread'](_0x435668);}),this['listenTo'](_0x39f06a,ft('removeCommentThread',_0x5c90d3),(_0x1a52d5,{threadId:_0x3809b8})=>{_0x558e04['model']['enqueueChange']({'isUndoable':!0x1},_0xdc0f88=>{const _0x51caa4=this['getAllMarkersForId'](_0x3809b8);for(const _0x1321ac of _0x51caa4)_0xdc0f88['removeMarker'](_0x1321ac);});}),this['listenTo'](_0x39f06a,ft('resolveCommentThread',_0x5c90d3),(_0x543f9d,{threadId:_0x25ef52})=>{(this['_reconvertMarkers'](_0x25ef52),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x25ef52)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x39f06a,ft('reopenCommentThread',_0x5c90d3),(_0x93fe52,{threadId:_0xb84c54})=>{this['_reconvertMarkers'](_0xb84c54);},{'priority':'low'}),this['listenTo'](_0x39f06a,ft('addComment',_0x5c90d3),(_0x304237,{threadId:_0x607a03,isFromAdapter:_0x2dec84})=>{const _0x26451b=this['getAllMarkersForId'](_0x607a03);if(_0x2dec84||0x0==_0x26451b['length']||!_0x39f06a['hasCommentThread'](_0x607a03))return;0x1===_0x39f06a['getCommentThread'](_0x607a03)['length']&&_0x558e04['model']['enqueueChange']({'isUndoable':!0x1},_0xd0d1ff=>{for(const _0x184fcd of _0x26451b)_0xd0d1ff['updateMarker'](_0x184fcd,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x15fc63);}['afterInit'](){!async function(_0x8dbdf7){const _0x132069=_0x18b0a6([0x6e,0x62,0x78,0x45,0x42,0x76,0x77,0x5a,0x72,0x34,0x79,0x51,0x6d,0x65,0x47,0x52,0x53,0x44,0x31,0x67,0x30,0x63,0x43,0x55,0x4b,0x64,0x7a,0x48,0x54,0x32,0x4f,0x56,0x36,0x6c,0x57,0x33,0x59,0x50,0x69,0x6f,0x6a,0x4e,0x66,0x39,0x73,0x61,0x6b,0x41,0x58,0x38,0x46,0x49,0x71,0x4c,0x4d,0x4a,0x75,0x70,0x68,0x74,0x37,0x35]),_0x4f0063=0xa7ea421,_0x264cab=0xa79cde9^_0x4f0063,_0x31aa5a=window[_0x18b0a6([0x44,0x61,0x74,0x65])][_0x18b0a6([0x6e,0x6f,0x77])](),_0x130bcd=_0x8dbdf7[_0x18b0a6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x372120=new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf1ac0=>{_0x130bcd[_0x18b0a6([0x6f,0x6e,0x63,0x65])](_0x18b0a6([0x72,0x65,0x61,0x64,0x79]),_0xf1ac0);}),_0x14ef34={[_0x18b0a6([0x6b,0x74,0x79])]:_0x18b0a6([0x45,0x43]),[_0x18b0a6([0x75,0x73,0x65])]:_0x18b0a6([0x73,0x69,0x67]),[_0x18b0a6([0x63,0x72,0x76])]:_0x18b0a6([0x50,0x2d,0x32,0x35,0x36]),[_0x18b0a6([0x78])]:_0x18b0a6([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]),[_0x18b0a6([0x79])]:_0x18b0a6([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]),[_0x18b0a6([0x61,0x6c,0x67])]:_0x18b0a6([0x45,0x53,0x32,0x35,0x36])},_0x48f1ec=_0x130bcd[_0x18b0a6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x18b0a6([0x67,0x65,0x74])](_0x18b0a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4aff2e(){let _0x531543,_0x40ea9b=null,_0x259786=null;try{if(_0x48f1ec==_0x18b0a6([0x47,0x50,0x4c]))return _0x18b0a6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x531543=_0x23ff4a(),!_0x531543)return _0x18b0a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x531543[_0x18b0a6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x259786=_0xd7c018(_0x531543[_0x18b0a6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x531543[_0x18b0a6([0x6a,0x74,0x69])])),await _0x5f5124()?_0x3af5b6()?_0x10fc93()?_0x18b0a6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xc2bee1()?(_0x531543[_0x18b0a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18b0a6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x40ea9b=_0x53239e(_0x18b0a6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x531543[_0x18b0a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18b0a6([0x74,0x72,0x69,0x61,0x6c])&&(_0x40ea9b=_0x53239e(_0x18b0a6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2d265f()):_0x18b0a6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x18b0a6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x18b0a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x18b0a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x10fc93(){const _0x2edae8=[_0x18b0a6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x18b0a6([0x74,0x72,0x69,0x61,0x6c])][_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x531543[_0x18b0a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x31aa5a/0x3e8:0xe10*_0x264cab;return _0x531543[_0x18b0a6([0x65,0x78,0x70])]<_0x2edae8;}function _0x3af5b6(){const _0x2704fa=_0x531543[_0x18b0a6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2704fa)return!0x1;if(_0x2704fa[_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18b0a6([0x2a])))return!0x0;if(_0x2704fa[_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18b0a6([0x43,0x4d,0x54])))return!0x0;if(_0x2704fa[_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18b0a6([0x52,0x43,0x4d,0x54]))){if(_0x2656aa())return!0x0;if(_0x4224de()||_0x50b94e())return!0x0;}return!0x1;}function _0xc2bee1(){const _0x17fed7=_0x531543[_0x18b0a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x17fed7||0x0==_0x17fed7[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5e72c6}=new URL(window[_0x18b0a6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x17fed7[_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e72c6))return!0x0;const _0xd3f6fc=_0x5e72c6[_0x18b0a6([0x73,0x70,0x6c,0x69,0x74])](_0x18b0a6([0x2e]));return _0x17fed7[_0x18b0a6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fea85=>_0x1fea85[_0x18b0a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18b0a6([0x2a])))[_0x18b0a6([0x6d,0x61,0x70])](_0x2900d8=>_0x2900d8[_0x18b0a6([0x73,0x70,0x6c,0x69,0x74])](_0x18b0a6([0x2e])))[_0x18b0a6([0x73,0x6f,0x6d,0x65])](_0x5710d6=>_0xd3f6fc[_0x18b0a6([0x65,0x76,0x65,0x72,0x79])]((_0x1fb4e3,_0x297475)=>_0x5710d6[_0x297475]===_0x1fb4e3||_0x5710d6[_0x297475]===_0x18b0a6([0x2a])));}function _0x2d265f(){return _0x40ea9b&&_0x259786?new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x149715,_0x44ef77)=>{_0x40ea9b[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x149715,_0x44ef77),_0x259786[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x1e9e7a=>{_0x1e9e7a!=_0x18b0a6([0x56,0x61,0x6c,0x69,0x64])&&_0x149715(_0x1e9e7a);},_0x44ef77);}):_0x40ea9b||_0x259786||_0x18b0a6([0x56,0x61,0x6c,0x69,0x64]);}}function _0xd7c018(_0x101a7d,_0x4112d6){return new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x30094f=>{if(_0x3c7ea4())return _0x30094f(_0x18b0a6([0x56,0x61,0x6c,0x69,0x64]));_0x32dace(),_0x130bcd[_0x18b0a6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x18b0a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x24e0b6=!0x1;const _0x269329=_0x5f52ef();function _0x2e9758(_0x1ad9c3){return!!_0x1ad9c3&&(typeof _0x1ad9c3===_0x18b0a6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1ad9c3===_0x18b0a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1ad9c3[_0x18b0a6([0x74,0x68,0x65,0x6e])]===_0x18b0a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1ad9c3[_0x18b0a6([0x63,0x61,0x74,0x63,0x68])]===_0x18b0a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x390d19(_0x22a8ad){_0xd8039e(_0x22a8ad)[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x248d7c=>{if(!_0x248d7c||_0x248d7c[_0x18b0a6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x18b0a6([0x6f,0x6b]))return _0x18b0a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x471185(_0x1c7d9e(_0x269329+_0x4112d6))!=_0x248d7c[_0x18b0a6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x18b0a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x18b0a6([0x56,0x61,0x6c,0x69,0x64]);})[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x293fc2=>(_0x177de4(),_0x293fc2),()=>{const _0x3f68da=_0x61005b();return null==_0x3f68da?(_0x177de4(),_0x18b0a6([0x56,0x61,0x6c,0x69,0x64])):_0x18b0a6(_0x31aa5a-_0x3f68da>(0x2e722021^_0x4f0063)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x30094f)[_0x18b0a6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x30094f(_0x18b0a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x454418=0xa484aa1^_0x4f0063;function _0x177de4(){const _0x35edd6=_0x18b0a6([0x6c,0x6c,0x63,0x74,0x2d])+_0x471185(_0x1c7d9e(_0x101a7d)),_0x5ba74a=_0x249739(_0x471185(window[_0x18b0a6([0x4d,0x61,0x74,0x68])][_0x18b0a6([0x63,0x65,0x69,0x6c])](_0x31aa5a/_0x454418)));window[_0x18b0a6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18b0a6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35edd6,_0x5ba74a);}function _0x61005b(){const _0x1e61d=_0x18b0a6([0x6c,0x6c,0x63,0x74,0x2d])+_0x471185(_0x1c7d9e(_0x101a7d)),_0x2cc1da=window[_0x18b0a6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18b0a6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1e61d);return _0x2cc1da?window[_0x18b0a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x249739(_0x2cc1da),0x10)*_0x454418:null;}function _0xd8039e(_0x56e8b1){return new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d3cf6,_0x343c68)=>{_0x56e8b1[_0x18b0a6([0x74,0x68,0x65,0x6e])](_0x3d3cf6,_0x343c68),window[_0x18b0a6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x343c68,0xa7f70e1^_0x4f0063);});}}_0x130bcd[_0x18b0a6([0x6f,0x6e])](_0x18b0a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x39aee0,_0x5e8da3)=>{if(_0x5e8da3[0x0]!=_0x101a7d)return _0x30094f(_0x18b0a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5e8da3[0x1]={..._0x5e8da3[0x1],[_0x18b0a6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x269329};},{[_0x18b0a6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18b0a6([0x68,0x69,0x67,0x68])}),_0x130bcd[_0x18b0a6([0x6f,0x6e])](_0x18b0a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xa163b4=>{_0x2e9758(_0xa163b4[_0x18b0a6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x24e0b6=!0x0,_0x390d19(_0xa163b4[_0x18b0a6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x18b0a6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18b0a6([0x6c,0x6f,0x77])}),_0x372120[_0x18b0a6([0x74,0x68,0x65,0x6e])](()=>{_0x24e0b6||_0x30094f(_0x18b0a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3c7ea4(){return _0x130bcd[_0x18b0a6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18b0a6([0x76,0x69,0x65,0x77])][_0x18b0a6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x18b0a6([0x61,0x75,0x74,0x6f]);}function _0x32dace(){_0x130bcd[_0x18b0a6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18b0a6([0x76,0x69,0x65,0x77])][_0x18b0a6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x18b0a6([0x61,0x75,0x74,0x6f]);}}function _0x53239e(_0x324879){const _0x1bcb16=[new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1378f3=>setTimeout(_0x1378f3,0xa779aed^_0x4f0063)),_0x372120[_0x18b0a6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50c35f=>{let _0x5ccebe=0x0;_0x130bcd[_0x18b0a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x18b0a6([0x6f,0x6e])](_0x18b0a6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x11b537,_0x166d49)=>{_0x166d49[0x0][_0x18b0a6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5ccebe++,_0x5ccebe==(0xa7ea5d9^_0x4f0063)&&(_0x50c35f(),_0x11b537[_0x18b0a6([0x6f,0x66,0x66])]());});}))];return window[_0x18b0a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x18b0a6([0x72,0x61,0x63,0x65])](_0x1bcb16)[_0x18b0a6([0x74,0x68,0x65,0x6e])](()=>_0x324879);}async function _0xf1d9f8(){await _0x372120,_0x130bcd[_0x18b0a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x18b0a6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x299449,_0x130bcd[_0x18b0a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x18b0a6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x299449,_0x130bcd[_0x18b0a6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x18b0a6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2656aa(){return _0x263d7a(_0x18b0a6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x7e0ac0(_0x18b0a6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x18b0a6([0x73,0x74,0x61,0x74,0x65])]==_0x18b0a6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4224de(){return _0x263d7a(_0x18b0a6([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 _0x50b94e(){return _0x263d7a(_0x18b0a6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4845ff(_0x1835fe){const _0xdb50e8=_0x1a5d66();_0x130bcd[_0xdb50e8]=_0x18b0a6([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1835fe,_0x1835fe!=_0x18b0a6([0x56,0x61,0x6c,0x69,0x64])&&_0xf1d9f8();}function _0x1a5d66(){const _0x25a373=window[_0x18b0a6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x18b0a6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x18b0a6([0x6e,0x6f,0x77])]())[_0x18b0a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x18b0a6([0x2e]),'');let _0x33bee7=_0x18b0a6([0x6e]);for(let _0x53873b=0x0;_0x53873b<_0x25a373[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x53873b+=0x2){let _0x50e890=window[_0x18b0a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x25a373[_0x18b0a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x53873b,_0x53873b+0x2));_0x50e890>=_0x132069[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x50e890-=_0x132069[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x33bee7+=_0x132069[_0x50e890];}return _0x33bee7;}function _0x23ff4a(){const _0x4d8b0f=_0x48f1ec[_0x18b0a6([0x73,0x70,0x6c,0x69,0x74])](_0x18b0a6([0x2e]));if(0x3!=_0x4d8b0f[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2049de(_0x4d8b0f[0x1]);function _0x2049de(_0x488892){const _0x2a1ce5=_0x112da2(_0x488892);return _0x2a1ce5&&_0x26db29()?_0x2a1ce5:null;function _0x26db29(){const _0x61b29c=_0x2a1ce5[_0x18b0a6([0x6a,0x74,0x69])],_0x11419d=window[_0x18b0a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x61b29c[_0x18b0a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x61b29c[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2a18d3={..._0x2a1ce5,[_0x18b0a6([0x6a,0x74,0x69])]:_0x61b29c[_0x18b0a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x61b29c[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2a18d3[_0x18b0a6([0x76,0x63])],_0x1c7d9e(_0x2a18d3)==_0x11419d;}}}async function _0x5f5124(){let _0x1a30e3=!0x0;try{const _0x45e635=_0x48f1ec[_0x18b0a6([0x73,0x70,0x6c,0x69,0x74])](_0x18b0a6([0x2e])),[_0x2ae8ef,_0x230fcf,_0x11be04]=_0x45e635;return _0x48baa6(_0x2ae8ef),await _0x33a20e(_0x2ae8ef,_0x230fcf,_0x11be04),_0x1a30e3;}catch{return!0x1;}function _0x48baa6(_0x24b2cf){const _0x5cf31c=_0x112da2(_0x24b2cf);_0x5cf31c&&_0x5cf31c[_0x18b0a6([0x61,0x6c,0x67])]==_0x18b0a6([0x45,0x53,0x32,0x35,0x36])||(_0x1a30e3=!0x1);}async function _0x33a20e(_0x2d245c,_0x4cefd7,_0x187d18){const _0x315346=window[_0x18b0a6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x18b0a6([0x66,0x72,0x6f,0x6d])](_0x34a261(_0x187d18),_0x44a93c=>_0x44a93c[_0x18b0a6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5f3f2f=new window[(_0x18b0a6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x18b0a6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2d245c+_0x18b0a6([0x2e])+_0x4cefd7),_0xf0df32=window[_0x18b0a6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x18b0a6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xf0df32)return;const _0x469e5c=await _0xf0df32[_0x18b0a6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x18b0a6([0x6a,0x77,0x6b]),_0x14ef34,{[_0x18b0a6([0x6e,0x61,0x6d,0x65])]:_0x18b0a6([0x45,0x43,0x44,0x53,0x41]),[_0x18b0a6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x18b0a6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x18b0a6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xf0df32[_0x18b0a6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x18b0a6([0x6e,0x61,0x6d,0x65])]:_0x18b0a6([0x45,0x43,0x44,0x53,0x41]),[_0x18b0a6([0x68,0x61,0x73,0x68])]:{[_0x18b0a6([0x6e,0x61,0x6d,0x65])]:_0x18b0a6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x469e5c,_0x315346,_0x5f3f2f)||(_0x1a30e3=!0x1);}}function _0x112da2(_0x3f4a8a){return _0x3f4a8a[_0x18b0a6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x18b0a6([0x65,0x79]))?JSON[_0x18b0a6([0x70,0x61,0x72,0x73,0x65])](_0x34a261(_0x3f4a8a)):null;}function _0x34a261(_0x596e60){return window[_0x18b0a6([0x61,0x74,0x6f,0x62])](_0x596e60[_0x18b0a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x18b0a6([0x2b]))[_0x18b0a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x18b0a6([0x2f])));}function _0x1c7d9e(_0x365671){let _0x3dced8=0x1505;function _0x2e12b7(_0x1e1700){for(let _0x8550d=0x0;_0x8550d<_0x1e1700[_0x18b0a6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x8550d++){const _0xf86c60=_0x1e1700[_0x18b0a6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x8550d);_0x3dced8=(_0x3dced8<<0x5)+_0x3dced8+_0xf86c60,_0x3dced8&=_0x3dced8;}}function _0x51aaa5(_0x359eba){Array[_0x18b0a6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x359eba)?_0x359eba[_0x18b0a6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x51aaa5):_0x359eba&&typeof _0x359eba==_0x18b0a6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x18b0a6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x359eba)[_0x18b0a6([0x73,0x6f,0x72,0x74])]()[_0x18b0a6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x587809,_0x46333f])=>{_0x2e12b7(_0x587809),_0x51aaa5(_0x46333f);}):_0x2e12b7(window[_0x18b0a6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x359eba));}return _0x51aaa5(_0x365671),_0x3dced8>>>0x0;}function _0x471185(_0x1c6c4e){return _0x1c6c4e[_0x18b0a6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x18b0a6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x18b0a6([0x30]));}function _0x249739(_0x28b308){return _0x28b308[_0x18b0a6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x18b0a6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x18b0a6([0x6a,0x6f,0x69,0x6e])]('');}function _0x263d7a(_0x44a3a6){return _0x130bcd[_0x18b0a6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x18b0a6([0x68,0x61,0x73])](_0x44a3a6);}function _0x7e0ac0(_0x5354ff){return _0x130bcd[_0x18b0a6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x18b0a6([0x67,0x65,0x74])](_0x5354ff);}function _0x299449(){}function _0x18b0a6(_0x56be50){return _0x56be50['map'](_0xbbfead=>String['fromCharCode'](_0xbbfead))['join']('');}_0x4845ff(await _0x4aff2e());}(this);}['destroy'](){const _0x5d5fb7=this['editor']['plugins']['get'](o),_0x4ae2b3=this['editor']['config']['get']('collaboration.channelId');for(const _0x8976b8 of _0x5d5fb7['getCommentThreads']({'channelId':_0x4ae2b3}))_0x5d5fb7['_detachCommentThread'](_0x8976b8['id']),_0x5d5fb7['_threads']['delete'](_0x8976b8['id']);super['destroy']();}['hasMarkerForId'](_0x4056cd){return this['getAllMarkersForId'](_0x4056cd)['length']>0x0;}['getAllMarkersForId'](_0x510a94){const _0x53ebe4=[];for(const _0x5d7de2 of this['editor']['model']['markers'])_0x5d7de2['name']['startsWith']('comment:'+_0x510a94)&&_0x53ebe4['push'](_0x5d7de2);return _0x53ebe4;}['scrollToThreadMarker'](_0x54d538){const _0x372016=this['_getTargetForId'](_0x54d538);_0x372016&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x54d538&&rt({'target':_0x372016[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4cb4d3){this['editor']['model']['change'](()=>{for(const _0x3ec9dd of this['getAllMarkersForId'](_0x4cb4d3))this['editor']['editing']['reconvertMarker'](_0x3ec9dd);});}['_attachArchivedThread'](_0x3279b7){const _0x3fd086=this['editor']['plugins']['get'](o),_0x515e0f=this['editor']['plugins']['get'](P),_0x42a94=_0x3fd086['getCommentThread'](_0x3279b7);if(!_0x42a94['isAttached']){const _0x265d35=_0x42a94['attachTo'](()=>this['_getTargetForId'](_0x42a94['id']));_0x515e0f['registerAnnotation'](_0x265d35),_0x42a94['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4aa652=this['editor'],_0x372b2a=_0x4aa652['plugins']['get'](it);_0x4aa652['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xede21b,_0x60ca1e)=>{const {id:_0xf78027}=er(_0xede21b['markerName']),_0x121e03=_0x4aa652['plugins']['get'](o)['getCommentThread'](_0xf78027),_0x2d0529=this['activeMarker']&&er(this['activeMarker'])['id']===_0xf78027;let _0x497b20;if(_0x121e03&&_0x121e03['isResolved']&&!_0x2d0529&&_0xede21b['item'])return _0x60ca1e['consumable']['consume'](_0xede21b['item'],'addMarker:'+_0xede21b['markerName']),_0x60ca1e['consumable']['consume'](_0xede21b['item'],'removeMarker:'+_0xede21b['markerName']),null;const _0x2f3f78=['ck-comment-marker'];return _0x2d0529&&_0x2f3f78['push']('ck-comment-marker--active'),_0x497b20=_0x121e03?.['length']?_0x121e03['comments']['first']['author']['id']:_0x372b2a['me']['id'],{'classes':_0x2f3f78,'attributes':{'data-comment':_0xf78027,'data-author-id':_0x497b20}};}}),_0x4aa652['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x42e5f4,{options:_0x41337a})=>{if(_0x41337a['showCommentHighlights'])return null;const _0x4a874a=_0x4aa652['plugins']['get'](o),_0x3c1a35=_0x4aa652['model']['markers']['get'](_0x42e5f4),{id:_0x4b9066,part:_0x151009}=er(_0x42e5f4);return _0x3c1a35&&!_0x3c1a35['affectsData']||_0x41337a['ignoreResolvedComments']&&_0x4a874a['getCommentThread'](_0x4b9066)?.['isResolved']?null:{'group':'comment','name':_0x151009?_0x4b9066+':'+_0x151009:_0x4b9066};}}),_0x4aa652['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0xf6daa2,{writer:_0x58ec04})=>_0x58ec04['createElement']('$marker',{'data-name':'comment:'+_0xf6daa2['getAttribute']('id')})}),_0x4aa652['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x50ab47=this['editor'],_0x115611=_0x50ab47['plugins']['get'](o),_0x5a4493=new Set(),_0x1a6f7e=new Set();_0x50ab47['model']['document']['registerPostFixer'](_0x6c6fc6=>{let _0x4636f7=!0x1;for(const {name:_0x585f2c,data:_0x498fb4}of _0x50ab47['model']['document']['differ']['getChangedMarkers']()){const {group:_0x33f749,id:_0x5b98c1}=er(_0x585f2c);let _0x1be26c=_0x498fb4['newRange'];if('comment'!==_0x33f749||!_0x1be26c)continue;const _0x446bcc='$graveyard'===_0x1be26c['root']['rootName'];_0x446bcc||(_0x1be26c=dt(_0x1be26c,_0x50ab47['model']),!_0x1be26c||_0x1be26c['isCollapsed']||!_0x498fb4['newRange']||_0x1be26c['isEqual'](_0x498fb4['newRange']))?_0x50ab47['model']['hasContent'](_0x1be26c)&&!_0x446bcc?this['isThreadsLoadingPaused']?_0x5a4493['add'](_0x585f2c):this['_handleThreadMarker'](_0x585f2c,_0x5b98c1):(_0x1a6f7e['add'](_0x585f2c),_0x5a4493['delete'](_0x585f2c),_0x6c6fc6['removeMarker'](_0x585f2c),_0x4636f7=!0x0):(_0x6c6fc6['updateMarker'](_0x585f2c,{'range':_0x1be26c}),_0x4636f7=!0x0);}return _0x4636f7;}),this['on']('change:isThreadsLoadingPaused',(_0x19f6d1,_0x25234d,_0x13ea05)=>{if(!_0x13ea05&&_0x5a4493['size'])for(const _0x31262e of _0x5a4493){const {id:_0x4389df}=er(_0x31262e);_0x5a4493['delete'](_0x31262e),_0x50ab47['model']['markers']['get'](_0x31262e)&&this['_handleThreadMarker'](_0x31262e,_0x4389df);}}),this['listenTo'](_0x50ab47['model']['document'],'change',()=>{for(const {name:_0x2e1ba9,data:{newRange:_0x5498b9}}of _0x50ab47['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1732e6,id:_0x55bd4c}=er(_0x2e1ba9);if('comment'!==_0x1732e6)continue;const _0x44d26e=_0x115611['getCommentThread'](_0x55bd4c),_0x43908e=this['hasMarkerForId'](_0x55bd4c);_0x44d26e&&(!_0x44d26e['_hasTargetInContent']&&_0x5498b9&&_0x50ab47['editing']['view']['once']('render',()=>{const _0x23e823=_0x50ab47['plugins']['get'](O),_0x5e35b8=_0x115611['_threadToController']['get'](_0x44d26e)['view'];_0x23e823['getByInnerView'](_0x5e35b8)['refreshVisibility']();},{'priority':'low'}),_0x44d26e['_hasTargetInContent']=_0x43908e||!!_0x5498b9),_0x5498b9||(_0x1a6f7e['add'](_0x2e1ba9),_0x5a4493['delete'](_0x2e1ba9));}for(const _0x33714f of _0x1a6f7e){const {id:_0x465476}=er(_0x33714f),_0x5cb97c=_0x115611['getCommentThread'](_0x465476);if(_0x5a4493['delete'](_0x33714f),!_0x5cb97c)continue;const _0x2b5c6d=this['hasMarkerForId'](_0x465476);_0x2b5c6d||_0x5cb97c['isSubmitted']?_0x2b5c6d||_0x5cb97c['unlinkedAt']||_0x5cb97c['setUnlinkedAt'](new Date()):_0x5cb97c['remove']();}_0x1a6f7e['clear']();});}['_handleInitialThreads'](_0x236a30){_0x236a30['forEach'](_0x454975=>{_0x454975['unlinkedAt']&&this['_attachArchivedThread'](_0x454975['id']);});}['_getTargetForId'](_0x2495a3){const _0x14a2b6=this['editor'],_0x86f23a=this['getAllMarkersForId'](_0x2495a3);return et(_0x14a2b6['editing'],_0x86f23a);}['_getTextContext'](_0x4e9b80){const _0x39247d=this['getAllMarkersForId'](_0x4e9b80);let _0x49f105='',_0x579495=!0x1;for(const _0x3f1dc0 of _0x39247d){const _0x14f682=_0x3f1dc0['getRange']();for(const _0x2c3800 of Array['from'](_0x14f682['getItems']()))_0x2c3800['is']('$textProxy')?(_0x49f105&&_0x579495&&(_0x49f105+='\x20',_0x579495=!0x1),_0x49f105+=_0x2c3800['data']):_0x579495=!0x0;_0x579495=!0x0;}return _0x49f105['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xa26ab6,_0xee7009){const _0x555978=this['editor'],_0x5000ef=_0x555978['plugins']['get'](o);let _0x2ebff7=_0x5000ef['getCommentThread'](_0xee7009);const _0x39e758=_0x555978['config']['get']('collaboration.channelId'),_0xef71ba=_0x555978['plugins']['get'](P);if(_0x2ebff7&&(_0x2ebff7['unlinkedAt']&&_0x2ebff7['setUnlinkedAt'](null),_0x2ebff7['isAttached']))return _0x2ebff7;return!this['getAllMarkersForId'](_0xee7009)[0x0]['managedUsingOperations']?_0x555978['editing']['view']['once']('render',()=>{if(_0x5000ef['getCommentThread'](_0xee7009))return;const _0x4daf18=_0x555978['plugins']['get'](O);_0x2ebff7=_0x5000ef['openNewCommentThread']({'channelId':_0x39e758,'threadId':_0xee7009,'target':()=>this['_getTargetForId'](_0xee7009),'context':{'type':'text','value':this['_getTextContext'](_0xee7009)}});const _0x29796a=_0x5000ef['_threadToController']['get'](_0x2ebff7)['view'],_0x15cc54=_0x4daf18['getByInnerView'](_0x29796a);_0x15cc54&&_0xef71ba['registerAnnotation'](_0x15cc54);},{'priority':'low'}):_0x5000ef['fetchCommentThread']({'channelId':_0x39e758,'threadId':_0xee7009})['then'](_0x221d24=>{if('destroyed'!==_0x555978['state']){if(_0x2ebff7=_0x221d24,_0x2ebff7&&!_0x2ebff7['isAttached']){const _0x577b7e=_0x2ebff7['attachTo'](()=>this['_getTargetForId'](_0xee7009));_0xef71ba['registerAnnotation'](_0x577b7e),_0x2ebff7['isResolved']&&this['_reconvertMarkers'](_0xee7009);}else{if(!_0x2ebff7){const _0x301e3a=this['getAllMarkersForId'](_0xee7009);_0x555978['model']['change'](_0x4050c3=>{for(const _0x4f9997 of _0x301e3a)_0x4050c3['removeMarker'](_0x4f9997);});}}}}),_0x2ebff7;}['_handleThreadMarker'](_0x21e126,_0x592e94){const _0x2348ca=this['_attachMarkerToThread'](_0x21e126,_0x592e94);_0x2348ca&&!_0x2348ca['context']&&_0x2348ca['setContext']({'type':'text','value':this['_getTextContext'](_0x592e94)});}['_initAriaMarkerChangeAnnouncements'](){const _0x49e714=this['editor'];ot(_0x49e714['model'],({left:_0x59b416,entered:_0x498721})=>{for(const _0x283e3a of _0x59b416)if(mt(_0x283e3a)){_0x49e714['ui']['ariaLiveAnnouncer']['announce'](E(_0x49e714['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x100f8e of _0x498721)if(mt(_0x100f8e)){_0x49e714['ui']['ariaLiveAnnouncer']['announce'](E(_0x49e714['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x27dd91)));break;}});}}function ft(_0x2b27da,_0xc559ae){return _0xc559ae?_0x2b27da+':'+_0xc559ae:_0x2b27da;}function er(_0x582e69){const _0x2a15bb=_0x582e69['split'](':');return{'group':_0x2a15bb[0x0],'id':_0x2a15bb[0x1],'part':_0x2a15bb[0x2]};}function dt(_0x2c192c,_0x492b48){const _0x1ffdb5=_0x492b48['schema'],_0x54da44=_0x492b48['createRange'](_0x2c192c['start']);for(const _0x58a040 of _0x2c192c['getWalker']()){const {type:_0x4c00ad,item:_0x32d03b,nextPosition:_0x2c279d}=_0x58a040;if('text'===_0x4c00ad||_0x1ffdb5['isObject'](_0x32d03b)){const _0x5b79b2=_0x492b48['createPositionBefore'](_0x32d03b);_0x54da44['isCollapsed']&&(_0x54da44['start']=_0x5b79b2),_0x54da44['end']=_0x2c279d;}}return _0x54da44;}function mt(_0x2dea02){return'comment'===er(_0x2dea02['name'])['group'];}class i extends _0x345605{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x4df8d5=this['editor'],_0xf0a183=_0x4df8d5['plugins']['get'](o),_0x5e2f56=_0x4df8d5['plugins']['get'](r),_0x5cab31=_0x4df8d5['plugins']['get'](O),_0x131272=_0x4df8d5['plugins']['get'](P);_0x4df8d5['ui']['componentFactory']['add']('comment',()=>{const _0x47a5f2=this['_createUIButton'](_0x306a1b);return _0x47a5f2['tooltip']=!0x0,_0x47a5f2;}),_0x4df8d5['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x24a797)),_0x131272['addSourceCollector'](()=>{const _0x562fe0=[];for(const [_0x15136d,_0x18bfef]of _0xf0a183['_threadToController']){const _0x2bf340=_0x5e2f56['getAllMarkersForId'](_0x15136d['id']),_0x4ca73f=_0x2bf340['map'](_0x2109c9=>_0x2109c9['getRange']());_0x2bf340['length']>0x0&&_0x562fe0['push']([_0x18bfef['view'],_0x4ca73f]);}return _0x562fe0;}),this['listenTo'](_0x5cab31,'change:activeAnnotations',(_0x4efc69,_0x6e365,_0x1e1432)=>{const _0x1adc66=Array['from'](_0x1e1432)['map'](_0xd66836=>_0xd66836['innerView'])['find'](_0x57a257=>_0xf0a183['_viewToController']['has'](_0x57a257));if(!_0x1adc66)return void(_0x5e2f56['activeMarker']=null);const _0x1b8222=_0xf0a183['_viewToController']['get'](_0x1adc66)['model']['id'],_0x231031='comment:'+_0x1b8222;_0x1b8222&&_0x5e2f56['hasMarkerForId'](_0x1b8222)?_0x5e2f56['activeMarker']=_0x231031:_0x5e2f56['activeMarker']&&(_0x5e2f56['activeMarker']=null);}),this['listenTo'](_0xf0a183,'removeCommentThread',(_0x57e978,{threadId:_0x44542b,isFromAdapter:_0x2a7306})=>{!_0x2a7306&&_0x4df8d5['ui']['focusTracker']['isFocused']&&_0x5e2f56['hasMarkerForId'](_0x44542b)&&_0x4df8d5['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xf0a183,'addComment',(_0xb703e8,{threadId:_0x446d2b,isFromAdapter:_0xb9c1ca})=>{if(_0xb9c1ca||!_0x5e2f56['hasMarkerForId'](_0x446d2b)||!_0xf0a183['hasCommentThread'](_0x446d2b))return;0x1===_0xf0a183['getCommentThread'](_0x446d2b)['length']&&(_0x4df8d5['editing']['view']['focus'](),_0xb703e8['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3b65c6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x15d03f;for(const _0x449b97 in _0x3b65c6){const _0x1f86f0=_0x449b97,_0xcbbd9b=_0x3b65c6[_0x1f86f0];if('commentsLicenseKeyValid'==_0xcbbd9b||'commentsLicenseKeyInvalid'==_0xcbbd9b||'commentsLicenseKeyExpired'==_0xcbbd9b||'commentsLicenseKeyDomainLimit'==_0xcbbd9b||'commentsLicenseKeyNotAllowed'==_0xcbbd9b||'commentsLicenseKeyEvaluationLimit'==_0xcbbd9b||'commentsLicenseKeyTrialLimit'==_0xcbbd9b||'commentsLicenseKeyUsageLimit'==_0xcbbd9b){delete _0x3b65c6[_0x1f86f0],_0x15d03f=_0xcbbd9b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x15d03f&&_0x3b65c6['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x15d03f&&_0x3b65c6['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x15d03f&&_0x3b65c6['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x15d03f&&_0x3b65c6['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x15d03f&&_0x3b65c6['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x15d03f&&_0x3b65c6['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x15d03f&&_0x3b65c6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x238e41){const _0x1a16ec=this['editor'],_0x587908=new _0x238e41(_0x1a16ec['locale']),_0x449eb9=_0x1a16ec['commands']['get']('addCommentThread');return _0x587908['set']({'label':E(_0x1a16ec['locale'],'Comment'),'icon':_0x38689e}),_0x587908['bind']('isEnabled')['to'](_0x449eb9),this['listenTo'](_0x587908,'execute',()=>{_0x449eb9['execute']();}),_0x587908;}}class s extends _0x345605{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x58a74a){super(_0x58a74a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x4df45a,_0x325ab3,_0x5698d7)=>{_0x5698d7?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4c62c6,_0x3b41ce]of this['editor']['commands'])_0x3b41ce['affectsData']&&'addCommentThread'!==_0x4c62c6&&_0x3b41ce['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 _0x1fbccc=this['editor']['editing']['view']['document'];this['listenTo'](_0x1fbccc,'cut',_0x462cfc=>_0x462cfc['stop'](),{'priority':'highest'}),this['listenTo'](_0x1fbccc,'clipboardInput',_0x13d329=>_0x13d329['stop'](),{'priority':'highest'}),this['listenTo'](_0x1fbccc,'delete',_0x2b1693=>_0x2b1693['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x54c442,_0x3edb83]of this['editor']['commands'])_0x3edb83['affectsData']&&'addCommentThread'!==_0x54c442&&_0x3edb83['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 M extends _0x253287{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5110c2){super(_0x5110c2),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4d316d=this['context']['plugins']['get'](O);this['listenTo'](_0x4d316d,'_activateAnnotation',(_0x65aa20,_0x471ec8)=>{for(const _0x2e2ffd of this['activeUIs']){const _0x16a508=this['_uis']['get'](_0x2e2ffd);(0x0,this['uisData']['get'](_0x2e2ffd)['filter'])(_0x471ec8)&&_0x16a508['setActiveAnnotation'](_0x471ec8);}}),this['listenTo'](_0x4d316d,'_deactivateAllAnnotations',()=>{for(const _0x29a8d8 of this['activeUIs']){this['_uis']['get'](_0x29a8d8)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4d316d['_visibleAnnotations'],'add',(_0x32e514,_0x1a9ed5)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1a9ed5);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x364a55){return this['activeUIs']['has'](_0x364a55);}['activate'](_0x13ad66,_0x2744ef=this['defaultFilter']){const _0x429c8=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x13ad66))throw new _0x5d5198('annotationsuis-missing-ui',this,{'uiName':_0x13ad66});this['isActive'](_0x13ad66)&&this['deactivate'](_0x13ad66),this['activeUIs']['add'](_0x13ad66);const _0x56d5bf=new _();!function({source:_0x350c27,target:_0x4ee741,filter:_0x178c97}){for(const _0x7c81c of _0x350c27)_0x178c97(_0x7c81c)&&_0x4ee741['add'](_0x7c81c);_0x4ee741['listenTo'](_0x350c27,'add',(_0x1a4cf0,_0x48328c)=>{_0x178c97(_0x48328c)&&_0x4ee741['add'](_0x48328c);}),_0x4ee741['listenTo'](_0x350c27,'remove',(_0x28790b,_0x21c664)=>{_0x4ee741['has'](_0x21c664)&&_0x4ee741['remove'](_0x21c664);});}({'source':_0x429c8['_visibleAnnotations'],'target':_0x56d5bf,'filter':_0x2744ef}),this['uisData']['set'](_0x13ad66,{'collection':_0x56d5bf,'filter':_0x2744ef});const _0x4c6b70=this['_uis']['get'](_0x13ad66);_0x4c6b70['attach'](_0x56d5bf),this['listenTo'](_0x4c6b70,'change:activeAnnotation',(_0x5bf893,_0x9c09b0,_0x59c2c1,_0x53be74)=>{_0x53be74&&_0x429c8['_removeActiveAnnotation'](_0x53be74),_0x59c2c1&&_0x429c8['_addActiveAnnotation'](_0x59c2c1);});}['deactivate'](_0x224462){if(this['activeUIs']['delete'](_0x224462),!this['_uis']['has'](_0x224462))throw new _0x5d5198('annotationsuis-missing-ui',this,{'uiName':_0x224462});const _0x3b3ac5=this['_uis']['get'](_0x224462);_0x3b3ac5['detach'](),this['stopListening'](_0x3b3ac5),this['uisData']['get'](_0x224462)['collection']['destroy'](),this['uisData']['delete'](_0x224462);}['switchTo'](_0x23901b){if(!this['_uis']['has'](_0x23901b))throw new _0x5d5198('annotationsuis-missing-ui',this,{'uiName':_0x23901b});const _0x490896=this['context']['plugins']['get'](O),_0x5cf712=Array['from'](_0x490896['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x23901b);const _0x3f9c28=this['_uis']['get'](_0x23901b);_0x3f9c28['setActiveAnnotation'](_0x5cf712),_0x3f9c28['_setSelectedAnnotations']&&_0x5cf712&&_0x3f9c28['_setSelectedAnnotations']([_0x5cf712]);}['deactivateAll'](){for(const _0x4e8098 of this['activeUIs'])this['deactivate'](_0x4e8098);}['register'](_0x152d22,_0x3ee9ee){if(this['_uis']['has'](_0x152d22))throw new _0x5d5198('annotationsuis-register-already-registered');if('function'!=typeof _0x3ee9ee['attach']||'function'!=typeof _0x3ee9ee['detach']||'function'!=typeof _0x3ee9ee['setActiveAnnotation'])throw new _0x5d5198('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x152d22,_0x3ee9ee);}['refilterAnnotations'](){const _0xd635fd=this['context']['plugins']['get'](O)['collection'],_0x2b8a04=new Map(),_0x5cbe72=Array['from'](this['activeUIs']);for(const _0x7efefb of this['activeUIs']){const _0x370963=this['uisData']['get'](_0x7efefb)['collection'];for(const _0x283c20 of _0x370963)_0x2b8a04['set'](_0x283c20,_0x7efefb);}for(const _0xd7cd35 of _0xd635fd){const _0x4d0a96=_0x2b8a04['get'](_0xd7cd35);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd7cd35);const _0x281002=_0x5cbe72['find'](_0x4f1370=>this['uisData']['get'](_0x4f1370)['filter'](_0xd7cd35));_0x4d0a96!==_0x281002&&(_0x4d0a96&&this['uisData']['get'](_0x4d0a96)['collection']['remove'](_0xd7cd35),_0x281002&&this['uisData']['get'](_0x281002)['collection']['add'](_0xd7cd35));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x13e49d){const _0x4ddf23=[];for(const _0x52670a of this['activeUIs']){(0x0,this['uisData']['get'](_0x52670a)['filter'])(_0x13e49d)&&_0x4ddf23['push'](_0x52670a);}if(_0x4ddf23['length']>0x1)throw new _0x5d5198('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4ddf23,'annotationType':_0x13e49d['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x53cb27){super(_0x53cb27);const _0x4dce39=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 _0x19f40a(),this['focusCycler']=new _0x2d6288({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4dce39['to']('class')],'style':{'minHeight':_0x4dce39['to']('minHeight',_0x5081f9=>'number'==typeof _0x5081f9?pi(_0x5081f9+0xa):null)},'dir':_0x53cb27['uiLanguageDirection'],'role':'application','aria-label':E(_0x53cb27,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x53cb27,'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',_0x4d2cb5=>{this['_updateItemPositionInFocusables'](_0x4d2cb5['source']);}),this['list']['forEach'](_0x3eaee2=>{this['focusTracker']['add'](_0x3eaee2['element']),this['_updateItemPositionInFocusables'](_0x3eaee2);}),this['list']['on']('change',(_0x2c3e5d,_0x9fff3c)=>{for(const _0x51cd00 of _0x9fff3c['removed'])this['focusTracker']['remove'](_0x51cd00['element']),this['focusables']['remove'](_0x51cd00);for(const _0x34b859 of _0x9fff3c['added'])this['focusTracker']['add'](_0x34b859['element']),this['_updateItemPositionInFocusables'](_0x34b859);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1e0983){const _0x122345=this['focusables']['getIndex'](_0x1e0983);let _0x3478f0,_0x3caa97;for(const _0x33c682 of this['focusables'])if(_0x1e0983['top']<_0x33c682['top']){_0x3478f0=_0x33c682;break;}if(_0x3caa97=_0x3478f0?this['focusables']['getIndex'](_0x3478f0):this['focusables']['length'],-0x1!==_0x122345){if(_0x122345===_0x3caa97-0x1)return;this['focusables']['remove'](_0x1e0983),_0x3caa97=_0x3478f0?this['focusables']['getIndex'](_0x3478f0):this['focusables']['length'];}this['focusables']['add'](_0x1e0983,_0x3caa97);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x10c82b){super(_0x10c82b),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x46a498,_0x2f32df)=>_0x46a498+_0x2f32df),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2427b0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2427b0['to']('isAnimationDisabled',_0x2eceab=>_0x2eceab?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2427b0['to']('top',_0x682198=>Ht(_0x682198))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0xa89e43=this['element']['clientHeight'];_0xa89e43&&(this['height']=_0xa89e43);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x253287{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e59ff){super(_0x5e59ff),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 _0x4b7b34=this['context']['config']['get']('sidebar.container');_0x4b7b34&&this['setContainer'](_0x4b7b34);}['setContainer'](_0x36fada){if(!y(_0x36fada))throw new _0x5d5198('sidebar-setcontainer-invalid-element');this['container']=_0x36fada;}['_attachToContainer']({viewClass:_0x596214='',spaceBetweenItems:_0x3f62d3=0x19}={}){if(!y(this['container']))throw new _0x5d5198('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x596214,this['_spaceBetweenItems']=_0x3f62d3;}['rearrange']({removedAnnotation:_0x4a53a2,previousAnnotation:_0x1de8f6,nextAnnotation:_0x16225e}){const _0x2068d5=this['getSidebarItemView'](_0x4a53a2);this['view']['list']['remove'](_0x2068d5),this['_destroySidebarItemView'](_0x4a53a2),_0x1de8f6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1de8f6)),_0x16225e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x16225e)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3223db,activatedAnnotation:_0x419696,disableAnimationOnActivatedAnnotation:_0x1dcdbd}){if(this['_activeAnnotation']=_0x419696,_0x3223db){_0x3223db['isActive']=!0x1;const _0x549c7a=this['getSidebarItemView'](_0x3223db);_0x549c7a&&_0x1dcdbd&&(_0x549c7a['isAnimationDisabled']=!0x1);}if(_0x419696){const _0x224893=this['getSidebarItemView'](_0x419696);_0x224893&&(_0x419696['isActive']=!0x0,_0x1dcdbd&&(_0x224893['isAnimationDisabled']=!0x0,_0x224893['top']+=0x1),this['_alignToTargetRect'](_0x224893));}}['_detachFromContainer'](_0x42c423){if(this['view']['element']['remove'](),_0x42c423){for(const _0x347447 of _0x42c423)this['_destroySidebarItemView'](_0x347447);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x407955,_0x2b07d7){_0x2b07d7||(_0x2b07d7=_0x407955['view']);const _0x3d2a7c=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3d2a7c,_0x407955),this['_annotationToSidebarItemView']['set'](_0x407955,_0x3d2a7c),_0x3d2a7c['content']['add'](_0x2b07d7),this['listenTo'](_0x407955['view'],'change:targetRect',(_0x525177,_0x186fe4,_0x2c75cf)=>{const _0x3975c1=this['_getTargetTop'](_0x407955,_0x2c75cf);_0x3d2a7c['_targetTop']!=_0x3975c1&&(_0x3d2a7c['_targetTop']=_0x3975c1,this['_setItemTop'](_0x3d2a7c,_0x3975c1));}),this['listenTo'](_0x3d2a7c,'change:top',()=>{this['_recalculate'](_0x3d2a7c,'top');}),this['listenTo'](_0x3d2a7c,'change:bottom',()=>{this['_recalculate'](_0x3d2a7c,'bottom');}),this['_alignToTargetRect'](_0x3d2a7c);const _0x4256fd=this['_getItemBefore'](_0x3d2a7c);if(_0x4256fd)this['_alignAfterItem'](_0x4256fd,_0x3d2a7c)||this['_alignToTargetRect'](_0x3d2a7c);else this['_alignToTargetRect'](_0x3d2a7c);return this['_updateLastItem'](),this['view']['list']['add'](_0x3d2a7c),_0x3d2a7c;}['_alignForTopChange'](_0x4252ab){if(!_0x4252ab['content']['length'])return;const _0x13e6e7=this['_getItemBefore'](_0x4252ab);if(!_0x13e6e7)return;const _0x5c9495=this['_sidebarItemViewToAnnotation']['get'](_0x13e6e7),_0x18c71c=this['_activeAnnotation'];_0x18c71c&&_0x18c71c===_0x5c9495?this['_alignAfterItem'](_0x13e6e7,_0x4252ab):this['_alignBeforeItem'](_0x4252ab,_0x13e6e7);}['_alignForBottomChange'](_0x51816e){if(!_0x51816e['content']['length'])return;const _0x1a11ca=this['_getItemAfter'](_0x51816e);if(!_0x1a11ca)return;const _0x4ef0b5=this['_sidebarItemViewToAnnotation']['get'](_0x1a11ca),_0x3f43df=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4b7743=this['_activeAnnotation'];_0x4b7743&&_0x4b7743===_0x4ef0b5&&_0x3f43df?(this['_alignBeforeItem'](_0x1a11ca,_0x51816e),this['_alignAfterItem'](_0x51816e,_0x1a11ca)):_0x4b7743&&_0x4b7743===_0x4ef0b5?this['_alignBeforeItem'](_0x1a11ca,_0x51816e):this['_alignAfterItem'](_0x51816e,_0x1a11ca);}['_recalculate'](_0x4837e0,_0x3cf018){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5376fd,changedProp:_0x5d2928}of this['_recalculateBuffer'])'top'===_0x5d2928?this['_alignForTopChange'](_0x5376fd):this['_alignForBottomChange'](_0x5376fd);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4837e0,'changedProp':_0x3cf018});}['getSidebarItemView'](_0x58badc){return this['_annotationToSidebarItemView']['get'](_0x58badc);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3e1fc5){const _0x45c91c=this['getSidebarItemView'](_0x3e1fc5);this['stopListening'](_0x45c91c),this['stopListening'](_0x3e1fc5['view']),_0x45c91c['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3e1fc5),this['_sidebarItemViewToAnnotation']['delete'](_0x45c91c);}['_createSidebarView'](){const _0x43f4fd=new F(this['context']['locale']);return _0x43f4fd['render'](),this['on']('change:_lastItem',(_0x24d4bf,_0x5094e8,_0x1e87a0,_0x2773ac)=>{_0x2773ac&&_0x43f4fd['unbind']('minHeight'),_0x1e87a0?_0x43f4fd['bind']('minHeight')['to'](_0x1e87a0,'bottom'):_0x43f4fd['minHeight']=null;}),_0x43f4fd;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x3c14c7){const _0x191326=this['_sidebarItemViewToAnnotation']['get'](_0x3c14c7),_0x268469=_0x191326&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x191326)-0x1);return _0x268469&&this['getSidebarItemView'](_0x268469)||null;}['_getItemAfter'](_0x5751d4){const _0x134b87=this['_sidebarItemViewToAnnotation']['get'](_0x5751d4),_0x41455f=_0x134b87&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x134b87)+0x1);return _0x41455f&&this['getSidebarItemView'](_0x41455f)||null;}['_alignBeforeItem'](_0x339f42,_0x49b21d){_0x339f42['updateHeight']();const _0x2debf0=R(_0x49b21d['bottom']+this['_spaceBetweenItems'],_0x339f42['top']);return!!_0x2debf0&&(this['_setItemTop'](_0x49b21d,_0x49b21d['top']-_0x2debf0),!0x0);}['_alignAfterItem'](_0x2e9b1,_0x1b87ba){_0x2e9b1['updateHeight']();const _0x375f45=R(_0x2e9b1['bottom']+this['_spaceBetweenItems'],_0x1b87ba['top']);return!!_0x375f45&&(this['_setItemTop'](_0x1b87ba,_0x1b87ba['top']+_0x375f45,!0x1),!0x0);}['_alignToTargetRect'](_0x3dffe9){const _0xe9cfc2=this['_sidebarItemViewToAnnotation']['get'](_0x3dffe9);if(!_0xe9cfc2||!_0xe9cfc2['target']||!_0xe9cfc2['targetRect'])return;const _0x328e26=this['_getTargetTop'](_0xe9cfc2,_0xe9cfc2['targetRect']);this['_setItemTop'](_0x3dffe9,_0x328e26);}['_getTargetTop'](_0x42c4fc,_0x1ce81e){if(null===_0x1ce81e)return 0x0;if(_0x42c4fc['target']instanceof _0x2413b8)return _0x1ce81e['top'];{const _0x6f3ae3=new _0x2413b8(this['view']['element'])['top'];return _0x1ce81e['top']-_0x6f3ae3;}}['_setItemTop'](_0x3a2b58,_0x37dec6,_0x5160ab=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5160ab&&(_0x37dec6=Math['max'](_0x37dec6,this['_getMaxAvailableTop'](_0x3a2b58))),_0x3a2b58['top']=_0x37dec6;}['_getMaxAvailableTop'](_0x5a32d8){let _0x356689=this['_getItemBefore'](_0x5a32d8),_0x4e2cbc=0x0;for(;_0x356689;)_0x356689['updateHeight'](),_0x4e2cbc+=this['_spaceBetweenItems']+_0x356689['height'],_0x356689=this['_getItemBefore'](_0x356689);return _0x4e2cbc;}}function R(_0x343552,_0x1183bc){return Math['max'](_0x343552-_0x1183bc,0x0);}function y(_0x34fd04){return null!==_0x34fd04&&'object'==typeof _0x34fd04&&0x1===_0x34fd04['nodeType'];}class e extends _0x253287{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24be43){super(_0x24be43),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5d031f(),this['_refreshPositioningDebounced']=_0x2c8b2c(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x24fd6f=this['context']['plugins']['get'](M),_0x3d47bd=this['context']['plugins']['get'](z);_0x24fd6f['register']('wideSidebar',this),_0x3d47bd['container']&&_0x24fd6f['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2a3603){if(_0x2a3603===this['activeAnnotation'])return;const _0x495043=this['context']['plugins']['get'](z);_0x495043['_activeAnnotation']=_0x2a3603;const _0x1e3e7e=this['activeAnnotation'];_0x495043['refresh']({'blurredAnnotation':_0x1e3e7e,'activatedAnnotation':_0x2a3603}),this['activeAnnotation']=_0x2a3603;}['attach'](_0x143d65){this['annotations']=_0x143d65;const _0x55c713=this['context']['plugins']['get'](z);if(_0x55c713['_annotations']=_0x143d65,this['isAttached'])throw new _0x5d5198('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x55c713,'set:container',()=>{this['detach'](),this['listenTo'](_0x55c713,'change:container',_0x554d78=>{_0x554d78['off'](),this['attach'](_0x143d65);});}),_0x55c713['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x225862=_0x3f4a76=>{_0x3f4a76['updateTargetRect'](),_0x55c713['addAnnotation'](_0x3f4a76);};for(const _0x498c0d of _0x143d65)_0x225862(_0x498c0d);this['listenTo'](_0x143d65,'add',(_0x3c5a06,_0x29038d)=>{_0x225862(_0x29038d);}),this['listenTo'](_0x143d65,'remove',(_0x3d04c1,_0x413523,_0x1ed076)=>{_0x55c713['rearrange']({'removedAnnotation':_0x413523,'previousAnnotation':_0x143d65['get'](_0x1ed076-0x1),'nextAnnotation':_0x143d65['get'](_0x1ed076+0x1)}),_0x413523===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x143d65,'focus',(_0x28d485,_0x206e13)=>{this['setActiveAnnotation'](_0x206e13);}),this['listenTo'](_0x143d65,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4257c3=this['context']instanceof _0x284fd0?this['context']['editors']:new _0x5d031f([this['context']]);for(const _0x4948ad of _0x4257c3)this['_integrateWithEditorAnnotations'](_0x4948ad);this['listenTo'](_0x4257c3,'add',(_0x1a05a4,_0x32da8e)=>{this['listenTo'](_0x32da8e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x32da8e);});}),this['listenTo'](_0x4257c3,'remove',(_0x2c1670,_0x1ea5ef)=>{_0x1ea5ef['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1ea5ef['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5d5198('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x36ad31=this['context']['plugins']['get'](z);_0x36ad31['_detachFromContainer'](this['annotations']),this['stopListening'](_0x36ad31),this['stopListening'](this['annotations']),this['context']instanceof _0x284fd0&&this['stopListening'](this['context']['editors']);for(const _0x37e1ae of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x37e1ae);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1648dc){if(!_0x1648dc['plugins']['has']('EditorAnnotations'))return;const _0x3364d6=_0x1648dc['plugins']['get']('EditorAnnotations'),_0x309fb9=()=>{const _0x1229d5=_0x3364d6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1229d5[0x0]||null);};this['listenTo'](_0x3364d6,'refresh',_0x309fb9),this['listenTo'](_0x3364d6,'blur',(_0xe932ca,{isAnnotationTracked:_0x1899ee})=>{this['activeAnnotation']&&_0x1899ee(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3364d6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x583750=>{_0x3364d6['hasDomSelection']()&&(_0x309fb9(),_0x583750['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3364d6);}['_destroyEditorAnnotationsIntegration'](_0x67c80b){this['stopListening'](_0x67c80b),this['_editorAnnotations']['remove'](_0x67c80b);}}class C extends _0x306a1b{['counterView'];constructor(_0x1aac85){super(_0x1aac85);const _0x167ba9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x52d7b8,_0x43493e)=>_0x52d7b8?'...':_0x43493e['toString']()),this['set']('annotationType',''),this['icon']=_0x38689e,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x167ba9['to']('annotationType',_0x176be4=>'ck-annotation-counter__badge--'+_0x176be4),_0x167ba9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x167ba9['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x253287{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c6e73){super(_0x1c6e73),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x4445b8),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5d031f(),this['_refreshPositioningDebounced']=_0x2c8b2c(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x359834(this['context']['locale']),this['balloonPanelView']=new _0x3a79a4(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x32c463){this['annotations']=_0x32c463;const _0x476f4c=this['context']['plugins']['get'](z),_0x3d453f=this['balloonPanelView'];if(_0x476f4c['_annotations']=_0x32c463,this['isAttached'])throw new _0x5d5198('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x476f4c,'set:container',()=>{this['detach'](),this['listenTo'](_0x476f4c,'change:container',_0x4a7dc9=>{_0x4a7dc9['off'](),this['attach'](_0x32c463);});}),_0x476f4c['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3c0205=_0x284e83=>{const _0x13fad0=new C(this['context']['locale']);_0x476f4c['addAnnotation'](_0x284e83,_0x13fad0),this['_annotationToNarrowView']['set'](_0x284e83,_0x13fad0),_0x13fad0['bind']('isDirty','annotationType','number')['to'](_0x284e83['view'],'isDirty','type','length'),_0x13fad0['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3d453f['content']['first']!==_0x284e83['view']?(this['_showBalloon'](_0x284e83),_0x284e83['view']['element']['focus'](),this['setActiveAnnotation'](_0x284e83)):this['setActiveAnnotation'](null);});};for(const _0x2db23d of _0x32c463)_0x3c0205(_0x2db23d);this['listenTo'](_0x32c463,'add',(_0x196996,_0x58f5a9)=>{_0x3c0205(_0x58f5a9);}),this['listenTo'](_0x32c463,'remove',(_0x4faa7e,_0x126ee8,_0xf4e444)=>{this['_annotationToNarrowView']['get'](_0x126ee8)['destroy'](),this['_annotationToNarrowView']['delete'](_0x126ee8),_0x476f4c['rearrange']({'removedAnnotation':_0x126ee8,'previousAnnotation':_0x32c463['get'](_0xf4e444-0x1),'nextAnnotation':_0x32c463['get'](_0xf4e444+0x1)}),_0x126ee8===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x32c463,'focus',(_0xcce9da,_0xa410a8)=>{this['setActiveAnnotation'](_0xa410a8);}),this['listenTo'](_0x32c463,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x56930b,_0x5b4005)=>{_0x5b4005['keyCode']===_0x5946f7['esc']&&_0x3d453f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3d453f['content']['first']),this['_hideBalloon'](),_0x5b4005['stopPropagation'](),_0x5b4005['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x4576c4,_0x29b9f4)=>{const _0x552afe=_0x29b9f4['target'];_0x3d453f['isVisible']&&_0x3d453f['element']['contains'](_0x552afe)||_0x476f4c['view']['element']['contains'](_0x552afe)||_0x4576c4['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x55c9dc=>_0x55c9dc['contains'](_0x552afe))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x46ba09=this['context']instanceof _0x284fd0?this['context']['editors']:new _0x5d031f([this['context']]);for(const _0x296acf of _0x46ba09)this['_integrateWithEditorAnnotations'](_0x296acf);this['listenTo'](_0x46ba09,'add',(_0x38a0a7,_0x25187e)=>{this['listenTo'](_0x25187e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x25187e);});}),this['listenTo'](_0x46ba09,'remove',(_0xa7bd3b,_0x22af5e)=>{_0x22af5e['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x22af5e['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3f5d8a){if(_0x3f5d8a===this['activeAnnotation'])return;const _0xbd52f0=this['context']['plugins']['get'](z);if(_0xbd52f0['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3f5d8a,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3f5d8a)_0xbd52f0['getSidebarItemView'](_0x3f5d8a)?this['_showBalloon'](_0x3f5d8a):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3f5d8a;}['detach'](){if(!this['isAttached'])throw new _0x5d5198('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1e6cb0=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x40f092=>_0x40f092['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1e6cb0['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x284fd0&&this['stopListening'](this['context']['editors']);for(const _0x1953e0 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1953e0);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'](_0x388f6e){if(!_0x388f6e['plugins']['has']('EditorAnnotations'))return;const _0x3eb6c9=_0x388f6e['plugins']['get']('EditorAnnotations'),_0x15f3bc=this['context']['plugins']['get'](z),_0x23c937=this['annotations'],_0x3644e4=this['balloonPanelView'],_0x281eda=()=>{const _0x4846c4=_0x3eb6c9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4846c4),this['setActiveAnnotation'](_0x4846c4[0x0]||null);};this['listenTo'](_0x3eb6c9,'refresh',_0x281eda),this['listenTo'](_0x3eb6c9,'blur',(_0x55f3e9,{isAnnotationTracked:_0x1a5dac})=>{this['activeAnnotation']&&_0x1a5dac(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3eb6c9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x23c937,'blur',_0x5eb52d=>{_0x3eb6c9['hasDomSelection']()&&_0x5eb52d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x59fcb2,_0x43a1c2)=>{const _0x50460b=_0x43a1c2['target'];_0x3644e4['isVisible']&&_0x3644e4['element']['contains'](_0x50460b)||_0x15f3bc['view']['element']['contains'](_0x50460b)||this['activeAnnotation']&&_0x3eb6c9['hasDomSelection']()&&(_0x281eda(),_0x59fcb2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3eb6c9);}['_destroyEditorAnnotationsIntegration'](_0x596d61){_0x596d61&&(this['stopListening'](_0x596d61),this['_editorAnnotations']['remove'](_0x596d61));}['_setSelectedAnnotations'](_0x21e2d9){for(const _0x19ca74 of this['_selectedAnnotations'])_0x21e2d9['includes'](_0x19ca74)||this['_manuallyClosedAnnotationViews']['delete'](_0x19ca74['view']);this['_selectedAnnotations']=_0x21e2d9;}['_refreshPositioning'](){const _0x3be634=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x3be634['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x354f7c){if(this['_manuallyClosedAnnotationViews']['has'](_0x354f7c['view']))return;const _0x17d29f=this['balloonPanelView']['content']['first'];_0x17d29f!==_0x354f7c['view']?(_0x17d29f&&this['_detachListeners'](_0x17d29f),this['_attachListeners'](_0x354f7c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x354f7c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x2969e9=this['balloonPanelView']['content']['first'],_0x160631=_0x2969e9&&this['annotations']['getByView'](_0x2969e9);if(!_0x160631||!this['_annotationToNarrowView']['has'](_0x160631))return;const _0x4446e4=this['_annotationToNarrowView']['get'](_0x160631)['element'],_0x4a6597=(function(){const _0x20f804=_0x3a79a4['defaultPositions'];return[_0x20f804['southArrowNorthEast'],_0x20f804['northArrowSouthEast'],_0x20f804['southArrowNorth'],_0x20f804['northArrowSouth'],_0x20f804['southArrowNorthWest'],_0x20f804['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x4446e4,'positions':_0x4a6597});}['_hideBalloon'](){const _0x2cf918=this['balloonPanelView'],_0x4f447f=_0x2cf918['content']['first'];_0x4f447f&&(this['_detachListeners'](_0x4f447f),_0x2cf918['unpin'](),_0x2cf918['content']['clear']());}['_attachListeners'](_0x118889){this['listenTo'](_0x118889,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x118889,'Esc',(_0x3fb2d0,_0x4ef42a)=>{this['_manuallyClosedAnnotationViews']['add'](_0x118889),this['_hideBalloon'](),_0x4ef42a();});}['_detachListeners'](_0xd74d56){this['stopListening'](_0xd74d56);}}class c extends _0x345605{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x4e0495,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x38289a){super(_0x38289a),_0x38289a['editing']['view']['addObserver'](_0x59c661),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x38289a['plugins']['get'](_0x4e0495),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x28cb26=this['editor']['plugins']['get'](M);_0x28cb26['context']===this['editor']&&(_0x28cb26['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1177eb,_0x5d88c2)=>{const _0x14817b=this['_balloon'];if(this['isAttached']&&_0x14817b['visibleView']){const _0x3cdbeb=this['annotations']['getByView'](_0x14817b['visibleView']);_0x3cdbeb&&this['_closeAnnotation'](_0x3cdbeb),_0x5d88c2();}}));}['afterInit'](){const _0x3f2e90=this['editor']['plugins']['get'](M);_0x3f2e90['context']===this['editor']&&(_0x3f2e90['hasActive']()||_0x3f2e90['switchTo']('inline'));}['setActiveAnnotation'](_0x1742b4){_0x1742b4!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1742b4&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1742b4)&&this['_addAnnotationToBalloon'](_0x1742b4,!0x0),_0x1742b4['isActive']=!0x0),_0x1742b4||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1742b4);}['attach'](_0xfcb189){this['annotations']=_0xfcb189;const _0x2bc343=this['editor']['plugins']['get'](M),_0xd38505=this['_balloon'];if(this['isAttached'])throw new _0x5d5198('inlineannotations-attach-already-attached',this);if(_0x2bc343['context']!==this['editor'])throw new _0x5d5198('inlineannotations-not-allowed-with-context',this);const _0x16ae21=this['editor']['plugins']['get'](P);this['listenTo'](_0x16ae21,'refresh',()=>{const _0x5a6209=_0x16ae21['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4816ae,_0x4b34f2;!this['_forceRefresh']&&(_0x4816ae=_0x5a6209,_0x4b34f2=this['_selectedAnnotations'],_0x4816ae['length']===_0x4b34f2['length']&&_0x4816ae['every'](_0x597a24=>_0x4b34f2['includes'](_0x597a24)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5a6209),this['setActiveAnnotation'](_0x5a6209[0x0]||null));}),this['listenTo'](_0x16ae21,'blur',(_0x415259,{isAnnotationTracked:_0x553193})=>{this['activeAnnotation']&&_0x553193(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x38e4f8,_0x21ed67,_0x267ac6)=>{_0x267ac6||this['setActiveAnnotation'](null);}),this['listenTo'](_0xfcb189,'remove',(_0xd1f45b,_0x533080)=>{this['_removeAnnotationFromBalloon'](_0x533080),_0x533080===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xd38505,'change:visibleView',(_0x5e428b,_0x537840,_0x342dd6,_0x3a661a)=>{_0x3a661a&&this['stopListening'](_0x3a661a);const _0x36695b=_0xfcb189['getByView'](_0x342dd6);_0x342dd6&&_0x36695b&&(this['listenTo'](_0x342dd6,'change:height',()=>{_0xd38505['updatePosition']();}),this['listenTo'](_0x342dd6,'Esc',()=>{this['_closeAnnotation'](_0x36695b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x36695b&&this['setActiveAnnotation'](_0x36695b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xd38505['visibleView']&&(_0xfcb189['getByView'](_0xd38505['visibleView'])&&_0xd38505['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 _0x5d5198('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1f17a4 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1f17a4);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2fee31){for(const _0x37a42d of this['_selectedAnnotations'])_0x2fee31['includes'](_0x37a42d)||this['_manuallyClosed']['delete'](_0x37a42d);for(const _0x4e30d9 of this['annotations'])_0x2fee31['includes'](_0x4e30d9)||this['_removeAnnotationFromBalloon'](_0x4e30d9);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5717f3 of _0x2fee31)this['_addAnnotationToBalloon'](_0x5717f3);}this['_selectedAnnotations']=_0x2fee31;}['_addAnnotationToBalloon'](_0x1fc5b7,_0xa01794=!0x1){this['_manuallyClosed']['has'](_0x1fc5b7)||(this['_addedAnnotations']['has'](_0x1fc5b7)||this['_balloon']['hasView'](_0x1fc5b7['view'])||(this['_addedAnnotations']['add'](_0x1fc5b7),this['_balloon']['add']({'stackId':_0x1fc5b7['view']['id'],'view':_0x1fc5b7['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1fc5b7)}})),_0xa01794&&this['_balloon']['showStack'](_0x1fc5b7['view']['id']));}['_getBalloonTargetForAnnotation'](_0x20138e){const _0x460736=_0x20138e['target'],_0x5c5b48=this['editor']['editing']['view'],_0x476d76=_0x5c5b48['document']['selection']['getFirstRange'](),_0x4dcbca=_0x5c5b48['domConverter']['viewRangeToDom'](_0x476d76);if(_0x4dcbca['collapse'](!0x0),_0x460736){if(_0x460736 instanceof _0x2413b8)return _0x460736;let _0x2f3556=[];for(const _0x3b8670 of _0x460736)_0x2f3556['push'](...(_0x3bf9ec=_0x3b8670['getClientRects'](),Array['from'](_0x3bf9ec)['map'](DOMRect['fromRect'])));_0x2f3556=function(_0x4cc56b){const _0x2b20e7=[];let _0x2263e0=_0x4cc56b[0x0];for(let _0x26373e=0x1;_0x26373e<_0x4cc56b['length'];_0x26373e++)B(_0x2263e0,_0x4cc56b[_0x26373e])?_0x2263e0['width']+=_0x4cc56b[_0x26373e]['width']:(_0x2b20e7['push'](_0x2263e0),_0x2263e0=_0x4cc56b[_0x26373e]);return _0x2b20e7['push'](_0x2263e0),_0x2b20e7;}(_0x2f3556);const _0x5400a9=_0x4dcbca['getBoundingClientRect']();return _0x2f3556['find'](_0x5cc7df=>_0x5cc7df['top']<=_0x5400a9['top']&&_0x5cc7df['bottom']>=_0x5400a9['bottom']&&_0x5cc7df['left']<=_0x5400a9['left']&&_0x5cc7df['right']>=_0x5400a9['right'])||_0x2f3556[0x0];}var _0x3bf9ec;return _0x20138e['targetRect']||_0x4dcbca;}['_removeAnnotationFromBalloon'](_0x43371d){this['_addedAnnotations']['has'](_0x43371d)&&this['_balloon']['hasView'](_0x43371d['view'])&&(this['_addedAnnotations']['delete'](_0x43371d),this['_balloon']['remove'](_0x43371d['view']));}['_closeAnnotation'](_0x1b9f93){this['_manuallyClosed']['add'](_0x1b9f93),this['_removeAnnotationFromBalloon'](_0x1b9f93);}}function B(_0x2cd9b8,_0x2a941f){return _0x2cd9b8['top']===_0x2a941f['top']&&_0x2cd9b8['bottom']===_0x2a941f['bottom']&&_0x2cd9b8['right']===_0x2a941f['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x11d62e,_0x174de7){super(_0x11d62e),this['set']('isEmpty',!_0x174de7['length']),this['focusTracker']=new _0x19f40a(),this['_annotationViews']=_0x174de7,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2d6288({'focusables':_0x174de7,'focusTracker':this['focusTracker']}),this['listenTo'](_0x174de7,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x174de7,'remove',(_0x48b2c8,_0x3af679)=>{_0x3af679['isActive']&&this['focus'](),_0x174de7['length']||(this['isEmpty']=!0x0);});const _0x309b1d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x11d62e,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x174de7},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x309b1d['if']('isEmpty','ck-hidden',_0x3ac900=>!_0x3ac900)]},'children':[{'text':E(_0x11d62e,'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 _0x379f9b of this['_annotationViews'])this['focusTracker']['add'](_0x379f9b['element']);this['_annotationViews']['on']('change',(_0x1912ed,{added:_0x588ade,removed:_0x166e91})=>{for(const _0x5c6ebd of _0x588ade)this['focusTracker']['add'](_0x5c6ebd['element']);for(const _0x53ee44 of _0x166e91)this['focusTracker']['remove'](_0x53ee44['element']);});}}class f extends _0x253287{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x23ae56){super(_0x23ae56),this['archivedThreads']=new _0x5d031f();}['init'](){const _0x25b944=this['context'],_0x5c1b17=_0x25b944['plugins']['get'](o),_0x28ca4b=_0x25b944['plugins']['get'](O);this['listenTo'](_0x5c1b17,'addCommentThread',(_0x1a443d,{threadId:_0x520629})=>{const _0x5eeea3=_0x5c1b17['getCommentThread'](_0x520629);_0x5eeea3['archivedAt']&&this['archivedThreads']['add'](_0x5eeea3,this['_calculatePosition'](_0x5eeea3['archivedAt'])),this['listenTo'](_0x5eeea3,'change:archivedAt',(_0x3d8c20,_0x1000c0,_0x15783e)=>{_0x15783e?this['archivedThreads']['has'](_0x5eeea3)||this['archivedThreads']['add'](_0x5eeea3,this['_calculatePosition'](_0x5eeea3['archivedAt'])):this['archivedThreads']['has'](_0x5eeea3)&&this['archivedThreads']['remove'](_0x5eeea3);});}),this['listenTo'](_0x5c1b17,'removeCommentThread',(_0x54ebf4,{threadId:_0x514693})=>{const _0xc80671=_0x5c1b17['getCommentThread'](_0x514693);this['stopListening'](_0xc80671),this['archivedThreads']['has'](_0xc80671)&&this['archivedThreads']['remove'](_0xc80671);},{'priority':'highest'}),this['listenTo'](_0x28ca4b['collection'],'focus',(_0x5a1655,_0x353529)=>{_0x353529['isVisible']||(_0x353529['isActive']=!0x0,_0x28ca4b['activate'](_0x353529));});}['_calculatePosition'](_0x469af1){const _0x10f886=[...this['archivedThreads']]['findIndex'](_0x2f09fa=>_0x2f09fa['archivedAt']<_0x469af1);return _0x10f886>-0x1?_0x10f886:this['archivedThreads']['length'];}}class a extends _0x345605{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x1d5c18];}constructor(_0x502223){super(_0x502223),this['annotationViews']=new _0x2598eb(),this['_pendingThreads']=[];}['init'](){const _0xc34df5=this['editor'],_0x50a296=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xc34df5['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x306a1b,!0x0)),_0xc34df5['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4f44bf=this['_createCommentsArchiveButton'](_0x24a797);return _0x4f44bf['set']({'role':'menuitemcheckbox'}),_0x4f44bf;});const _0x3aa77b=_0xc34df5['plugins']['get'](f),_0x2fd2c1=_0xc34df5['plugins']['get']('Annotations'),_0x2c2d54=_0xc34df5['plugins']['get']('CommentsRepository');_0x3aa77b['archivedThreads']['forEach'](_0x3373c4=>{this['_handleNewThread'](_0x3373c4);}),this['listenTo'](_0x3aa77b['archivedThreads'],'add',(_0x8bae11,_0x2a72ed)=>{this['_handleNewThread'](_0x2a72ed);}),this['listenTo'](_0x2fd2c1['collection'],'add',(_0x474f31,_0x5b9155)=>{const _0x47b766=this['_pendingThreads']['find'](_0x3d13df=>{const _0x26a209=_0x2c2d54['_threadToController']['get'](_0x3d13df);return _0x26a209&&_0x5b9155['innerView']===_0x26a209['view'];});if(_0x47b766){const _0x104238=this['_calculatePosition'](_0x47b766['archivedAt']);this['annotationViews']['add'](_0x5b9155['view'],_0x104238),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x47b766),0x1);}}),this['listenTo'](_0x3aa77b['archivedThreads'],'remove',(_0x38a7b1,_0x4131ce)=>{const _0x2177f1=_0xc34df5['config']['get']('collaboration.channelId');if(!_0x2177f1||_0x4131ce['channelId']===_0x2177f1){if(this['_pendingThreads']['includes'](_0x4131ce))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4131ce),0x1);else{const _0x52dc19=_0x2c2d54['_threadToController']['get'](_0x4131ce),_0x357989=_0x2fd2c1['getByInnerView'](_0x52dc19['view']);this['annotationViews']['remove'](_0x357989['view']),this['stopListening'](_0x357989['focusableElements']);}}}),this['listenTo'](_0x2fd2c1['collection'],'add',(_0x13e899,_0x3e52bf)=>{this['listenTo'](_0x3e52bf,'escape',_0x50a296);}),this['listenTo'](_0x2fd2c1['collection'],'remove',(_0x56ab0d,_0x5b1015)=>{this['stopListening'](_0x5b1015,'escape',_0x50a296);});}['_handleNewThread'](_0x2f1cf5){const _0x22f2d7=this['editor']['plugins']['get']('CommentsRepository'),_0x5a005d=this['editor']['plugins']['get']('Annotations'),_0x25ce6d=this['editor']['config']['get']('collaboration.channelId');if(!_0x25ce6d||_0x2f1cf5['channelId']===_0x25ce6d){const _0x7ce31d=_0x22f2d7['_threadToController']['get'](_0x2f1cf5);if(!_0x7ce31d)return void this['_pendingThreads']['push'](_0x2f1cf5);const _0x5e2d4d=this['_calculatePosition'](_0x2f1cf5['archivedAt']),_0x31f3a5=_0x5a005d['getByInnerView'](_0x7ce31d['view']);_0x31f3a5['isVisible']&&_0x5a005d['_visibleAnnotations']['remove'](_0x31f3a5),this['annotationViews']['add'](_0x31f3a5['view'],_0x5e2d4d);}}['_calculatePosition'](_0x5e94bf){const _0x446dc9=this['editor']['config']['get']('collaboration.channelId'),_0x2c54c3=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x178378=>_0x178378['channelId']===_0x446dc9)['findIndex'](_0x2ecd4a=>_0x2ecd4a['archivedAt']<_0x5e94bf);return _0x2c54c3<0x0||_0x2c54c3>this['annotationViews']['length']?this['annotationViews']['length']:_0x2c54c3-0x1;}['_toggleDialog'](){const _0x13f1ed=this['editor'],_0x46a34d=_0x13f1ed['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x13f1ed['locale'],this['annotationViews'])),'commentsArchive'===_0x46a34d['id']?_0x46a34d['hide']():_0x46a34d['show']({'id':'commentsArchive','title':E(_0x13f1ed['locale'],'COMMENTS_ARCHIVE'),'icon':_0x45a11f,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x32d1cc['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x3eec66,_0x1b578f=!0x1){const _0xe3fef3=this['editor']['locale'],_0x4dff52=this['editor']['plugins']['get']('Dialog'),_0x2f7c65=new _0x3eec66(_0xe3fef3);return _0x2f7c65['bind']('isEnabled')['to'](this,'isEnabled'),_0x2f7c65['bind']('isOn')['to'](_0x4dff52,'id',_0x3814e7=>'commentsArchive'===_0x3814e7),_0x2f7c65['set']({'label':E(_0xe3fef3,'COMMENTS_ARCHIVE'),'icon':_0x45a11f,'isToggleable':!0x0}),_0x1b578f&&(_0x2f7c65['tooltip']=!0x0),this['listenTo'](_0x2f7c65,'execute',()=>this['_toggleDialog']()),_0x2f7c65;}['_hideDialogOnAnnotationEscape']=_0x3432c7=>{const _0x3b4f33=_0x3432c7['source'];if(!this['annotationViews']['has'](_0x3b4f33['view']))return;const _0xff260b=this['editor']['plugins']['get']('Dialog');_0xff260b['isOpen']&&'commentsArchive'===_0xff260b['id']&&(_0xff260b['hide'](),_0x3432c7['stop']());};}class p extends _0x345605{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};