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

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 _0x38b534,ContextPlugin as _0x3dc007,PendingActions as ht,Command as _0xd067e3,Plugin as _0x17ed19,Context as _0x2dad3b}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x300858,uid as _0x9d400b,KeystrokeHandler as jt,FocusTracker as _0x28a20a,diff as _0x288092,Collection as _0x869a3,Rect as _0x3184b7,CKEditorError as _0x39e81a,first as _0x4f5db6,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x42642f,keyCodes as _0x41172f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x246627,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x299104,trimHtml as _0x2d29f9,LateFocusDropdownButtonView as _0x126240,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x37b951}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x318dec}from'es-toolkit/compat';import{IconUndo as _0x26183a,IconCheck as _0x314b3b,IconPencil as _0x18ba6e,IconRemoveComment as _0x3cf269,IconThreeVerticalDots as _0x4e511d,IconAddComment as _0x2fbfc4,IconCommentsArchive as _0x46cc68}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x61476c,ButtonView as _0x31f757,ViewCollection as _0xfb1a30,createDropdown as _0x11d7aa,ListView as _0x355c85,focusChildOnDropdownOpen as _0xe79bf2,ListItemView as _0x5e755c,MenuBarMenuListItemButtonView as _0x405369,BodyCollection as _0x2f2915,BalloonPanelView as _0x185a85,ContextualBalloon as _0x2bbe93,Dialog as _0x4deb73,DialogViewPosition as _0xb3a9d8}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x54cd2f}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 _0x3e011f}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x1e73fa}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
24
- _0x300858(){['model'];['view'];constructor(_0x18bbc7,_0x579d9e){super(),this['model']=_0x18bbc7,this['model']['_isAttached']=!0x0,this['view']=_0x579d9e,this['listenTo'](_0x579d9e,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x579d9e,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x579d9e,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x579d9e,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x579d9e,'addComment',(_0x2c5723,_0x17f585)=>this['addComment'](_0x17f585)),this['listenTo'](_0x579d9e,'updateComment',(_0x48f543,_0x495a91,_0x213cea)=>this['updateComment'](_0x495a91,_0x213cea)),this['listenTo'](_0x579d9e,'removeComment',(_0x4c1a03,_0x238d80)=>this['removeComment'](_0x238d80));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x5df9de){this['model']['addComment']({'content':_0x5df9de,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x524602,_0x3e8fb9){this['model']['getComment'](_0x524602)['update']({'content':_0x3e8fb9});}['removeComment'](_0x4f5047){this['model']['getComment'](_0x4f5047)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x11f800,_0x2ac9d3,_0x3f58d9){const t=_0x11f800['t'];switch(_0x2ac9d3){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'},_0x3f58d9);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'},_0x3f58d9);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'},_0x3f58d9);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'},_0x3f58d9);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x3f58d9);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'},_0x3f58d9);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'},_0x3f58d9);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'},_0x3f58d9);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(_0x30981e,_0x4d8f2f){super(_0x30981e);const _0x4f79ae=_0x9d400b();this['main']=this['createCollection'](),this['editable']=new $t(_0x30981e,_0x4d8f2f,void 0x0,{'label':()=>E(_0x30981e,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x30981e['uiLanguageDirection'],'lang':_0x30981e['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x4f79ae},'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(_0x35a8f8){super(_0x35a8f8),this['view']=new Ut(_0x35a8f8['locale'],_0x35a8f8['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x506b6d=this['editor']['editing']['view'],_0x288a9b=this['view']['editable'],_0x441d55=_0x506b6d['document']['getRoot']();_0x288a9b['name']=_0x441d55['rootName'],this['view']['render']();const _0x5ecc5f=_0x288a9b['element'];this['setEditableElement'](_0x288a9b['name'],_0x5ecc5f),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x506b6d['attachDomRoot'](_0x5ecc5f),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
25
- _0x300858(_0x38b534){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Nt)());constructor(_0x183d54={}){function _0x52f5ea(_0x458ffc){return _0x458ffc['map'](_0x55399c=>String['fromCharCode'](_0x55399c))['join']('');}(_0x183d54=Object['assign']({},_0x183d54))['plugins']||(_0x183d54['plugins']=Qt['defaultPlugins']),super(_0x183d54),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[_0x52f5ea([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52f5ea([0x76,0x69,0x65,0x77])][_0x52f5ea([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x52f5ea([0x61,0x75,0x74,0x6f]),this[_0x52f5ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x52f5ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x52f5ea([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x52f5ea([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x52f5ea([0x6f,0x6b])});}['create'](){const _0x376fad=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x376fad))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x26b839=>{const _0x4d6edd=this['model']['document']['getRoot'](),_0x363597=_0x4d6edd&&_0x4d6edd['getChild'](_0x4d6edd['childCount']-0x1);_0x26b839['setSelection'](_0x363597,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x28071f=this['editing']['view'],_0x1583ce=_0x28071f['document']['getRoot'](),_0x167cc8=_0x1583ce['getChild'](0x0);_0x1583ce['childCount']>0x1||!_0x167cc8||'p'!=_0x167cc8['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x28071f,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x167cc8['placeholder']=this['placeholder']),Ft({'view':_0x28071f,'element':_0x167cc8,'keepOnFocus':!0x0}),this['placeholderElement']=_0x167cc8);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x50d713,_0x5a3d5e={}){super(_0x50d713),this['editor']=null,this['_editorConfig']=_0x5a3d5e,this['set']('value',_0x5a3d5e['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x50d713,'Reply...')),this['set']('submitLabel',E(_0x50d713,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x28a20a(),this['focusCycler']=new _0x61476c({'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',(_0x57f105,_0x40a77b)=>{this['cancelButtonView']['fire']('execute'),_0x40a77b();}),this['keystrokes']['set']('Ctrl+Enter',(_0x50f601,_0x516909)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x516909());}),this['on']('submit',(_0x26e591,_0x4db87f)=>{_0x4db87f['length']>0xfde8?(alert(E(_0x50d713,'TOO_LONG_COMMENT_ALERT',[_0x4db87f['length'],0xfde8])),_0x26e591['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 _0x3c4951=this['editor'];this['element']['insertBefore'](_0x3c4951['ui']['element'],this['element']['firstChild']),_0x3c4951['model']['document']['on']('change',()=>this['value']=_0x3c4951['getData']()),_0x3c4951['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3c4951['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x260604){-0x1===_0x260604?(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:_0x49d436}=this,_0x4ddf8a=new _0x31f757(_0x49d436);return _0x4ddf8a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4ddf8a['withText']=!0x0,_0x4ddf8a['bind']('label')['to'](this,'submitLabel'),_0x4ddf8a['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4ddf8a['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xed5274,_0x68a23b)=>!_0x68a23b&&!!_0xed5274['trim']()),_0x4ddf8a;}['_createCancelButton'](){const {locale:_0x18e5cb}=this,_0x63397c=new _0x31f757(_0x18e5cb);return _0x63397c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x63397c['label']=E(_0x18e5cb,'Cancel'),_0x63397c['withText']=!0x0,_0x63397c['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x63397c;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x72f4ce=>{this['focusTracker']['add'](_0x72f4ce['element']);}),this['focusables']['on']('change',(_0x392c8b,_0x139e5d)=>{for(const _0x597eab of Array['from'](_0x139e5d['added'])['reverse']())this['focusTracker']['add'](_0x597eab['element']);});}}class ie extends kt{constructor(_0x47e903,_0xc6c770,_0x505cf2){super(_0x47e903),this['commentInputView']=new os(_0x47e903,_0x505cf2),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x90697e,_0xef50e2)=>_0x90697e||!!_0xef50e2),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 _0x246627(_0x47e903,_0xc6c770),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'](_0x56f950){this['commentInputView']['focus'](_0x56f950);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x69ec01,_0x3a0b5a)=>{const {submitButtonView:_0x5069cd,cancelButtonView:_0xe4f449,editor:_0x56368e}=this['commentInputView'];[_0x5069cd['element'],_0xe4f449['element'],_0x56368e?_0x56368e['editing']['view']['getDomRoot']():null]['filter'](_0x3e4c18=>_0x3e4c18)['some'](_0x450454=>_0x450454['contains'](_0x3a0b5a['target']))||(this['focus'](),_0x3a0b5a['preventDefault']());});}}class cs extends kt{constructor(_0x2ac080){super(_0x2ac080);const _0x1fc1dc=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1fc1dc['to']('count',_0x38910f=>E(_0x2ac080,'NUMBER_OF_COMMENTS',_0x38910f))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x428399,_0x815b9,_0x58389a){super(_0x428399);const _0x4a2c6f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x815b9['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x815b9,this['_config']=_0x58389a,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x28a20a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x61476c({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x50c819=>this['commentViews']['map'](_0x49c0fe=>_0x49c0fe['element'])['includes'](_0x50c819['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x428399),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xdd6dc0=>_0xdd6dc0-this['_config']['maxCommentsWhenCollapsed']);for(const _0x3e1221 of _0x815b9['comments'])this['_handleNewCommentModel'](_0x3e1221);this['_handleInfoComment'](),this['listenTo'](_0x815b9['comments'],'add',(_0x4a03ea,_0x4ac702)=>{const _0x2325e5=this['_calculatePosition'](_0x4ac702);this['length']++,this['_handleNewCommentModel'](_0x4ac702,_0x2325e5),this['refreshVisibleViews']();}),this['listenTo'](_0x815b9['comments'],'remove',(_0x19d776,_0x4c030c)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4c030c),this['refreshVisibleViews']();}),this['listenTo'](_0x815b9,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x815b9,'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',_0x4a2c6f['if']('length','ck-hidden',_0x2d009d=>!_0x2d009d)],'aria-label':E(_0x428399,'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'](_0x17df84){-0x1===_0x17df84?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x19e339 of this['commentViews'])_0x19e339['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x523407,_0x2c963a){const _0x3cf392=new this['_config']['CommentView'](this['locale'],_0x523407,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3cf392['viewUid']=_0x523407['id'],_0x3cf392['delegate']('removeComment')['to'](this),_0x3cf392['delegate']('updateComment')['to'](this),_0x3cf392['delegate']('resolveCommentThread')['to'](this),_0x3cf392['delegate']('editorReady')['to'](this),_0x3cf392['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3cf392,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3cf392,_0x2c963a);}['_calculatePosition'](_0x536071){const _0x5318dd=this['_model']['_findOptimalIndex'](_0x536071);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x536071['authoredAt']?_0x5318dd-0x1:_0x5318dd:_0x5318dd-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x360b6a={'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'],_0x360b6a,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x360b6a));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x431b14){const _0x36d9dc=this['commentViews']['remove'](_0x431b14['id']);this['stopListening'](_0x36d9dc),_0x36d9dc['isEditMode']&&this['_updateHasDirtyComment'](),_0x36d9dc['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x39d3a1=>_0x39d3a1['isEditMode']);}['_rearrangeCollapse'](){const _0x13e902=function(_0x22d800){const _0x453f1a=new _0x869a3();for(const _0x41c934 of _0x22d800)_0x453f1a['add'](_0x41c934);return _0x453f1a;}(this['commentViews']),_0x21f3a0=this['_collapsedCommentsView']['count'];for(let _0x131b43=0x1;_0x131b43<=_0x21f3a0;_0x131b43++)_0x13e902['remove'](0x1);for(const _0x3a3c50 of _0x13e902)_0x3a3c50['collapse']();_0x21f3a0>0x0&&_0x13e902['add'](this['_collapsedCommentsView'],0x1),ns(_0x288092(Array['from'](this['visibleViews']),Array['from'](_0x13e902)),this['visibleViews'],_0x13e902);}['_rearrangeExpand'](){ns(_0x288092(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2385bc of this['visibleViews'])_0x2385bc['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2c7af2=>{this['focusTracker']['add'](_0x2c7af2['element']),this['keystrokes']['listenTo'](_0x2c7af2['element']);}),this['commentViews']['on']('change',(_0x5de423,_0x1f22b9)=>{for(const _0x1cf3e4 of _0x1f22b9['removed'])this['focusTracker']['remove'](_0x1cf3e4['element']),this['keystrokes']['stopListening'](_0x1cf3e4['element']);for(const _0x49b124 of Array['from'](_0x1f22b9['added'])['reverse']())this['focusTracker']['add'](_0x49b124['element']),this['keystrokes']['listenTo'](_0x49b124['element']);});}}function ns(_0x309fc3,_0x45d1c6,_0x27f5ce){let _0xb9920b=0x0;for(const _0x1d8d8c of _0x309fc3)switch(_0x1d8d8c){case'insert':_0x45d1c6['add'](_0x27f5ce['get'](_0xb9920b),_0xb9920b),_0xb9920b++;break;case'delete':_0x45d1c6['remove'](_0xb9920b);break;case'equal':_0xb9920b++;}}class as extends kt{constructor(_0x532700){super(_0x532700);const _0x1a90d7=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1a90d7['to']('contextValue',_0x859877=>E(_0x532700,'THREAD_CONTEXT_LABEL',_0x859877)),'tabindex':-0x1},'children':[{'text':_0x1a90d7['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4a9089,_0x874269){super(_0x4a9089);const _0x5d734f=this['bindTemplate'];this['_model']=_0x874269,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x28a20a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x61476c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3f6588=>!!_0x3f6588),this['bind']('contextValue')['to'](this['_model'],'context',_0x4e4b1b=>_0x4e4b1b&&_0x4e4b1b['value']?this['_trimContextValue'](_0x4e4b1b['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',_0x5d734f['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 _0x42b06d=new _0x31f757(this['locale']);return _0x42b06d['label']=E(this['locale'],'Reopen'),_0x42b06d['tooltip']=E(this['locale'],'Reopen'),_0x42b06d['icon']=_0x26183a,_0x42b06d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x328fe6=>!_0x328fe6),_0x42b06d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5670b3,_0x161815)=>_0x5670b3&&_0x161815),_0x42b06d['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x42b06d;}['_trimContextValue'](_0x1ef5f3){if(_0x1ef5f3['length']<0x96)return _0x1ef5f3;const _0x242a2e=_0x1ef5f3['lastIndexOf']('\x20',0x93);return _0x1ef5f3['substring'](0x0,_0x242a2e>-0x1?_0x242a2e:0x93)+'...';}['_attachContextActions'](){const _0x4e7b0f=this['element']['querySelector']('.ck-context'),_0xae87cc=_0x4e7b0f['querySelector']('.ck-context__value');this['listenTo'](_0x4e7b0f,'mouseenter',()=>{_0xae87cc['offsetWidth']<_0xae87cc['scrollWidth']&&_0x4e7b0f['classList']['add']('overlay');}),this['listenTo'](_0x4e7b0f,'mouseleave',()=>{_0x4e7b0f['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x557a78 of this['focusables'])this['focusTracker']['add'](_0x557a78['element']),this['keystrokes']['listenTo'](_0x557a78['element']);}['_createContextView'](){const _0x406e03=new as(this['locale']);return _0x406e03['bind']('contextValue')['to'](this),_0x406e03;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3d3fd2,_0x29bcba,_0x994ffe,_0x14167f){super(_0x3d3fd2),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x29bcba,this['_localUser']=_0x994ffe,this['_config']=_0x14167f,this['commentThreadHeaderView']=new Xt(_0x3d3fd2,_0x29bcba),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3d3fd2,E(_0x3d3fd2,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3d3fd2,_0x29bcba,Object['assign']({'CommentView':this['_config']['CommentView']},_0x14167f)),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',(_0x2809b2,_0x20bfa3)=>_0x2809b2||!!_0x20bfa3),this['bind']('isUnlinked')['to'](_0x29bcba,'unlinkedAt',_0x432f7b=>!!_0x432f7b),this['bind']('ariaLabel')['to'](this,'length',_0x1865f8=>{const _0x586778=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x1865f8,_0x586778]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x28a20a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x61476c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5d2f81=>_0x5d2f81['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 _0x32f8e7=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x414c55=_0x32f8e7['commentInputView'];return _0x32f8e7['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x414c55,'value',(_0x42798b,_0x37952a,_0x293460,_0x5d76d3,_0x1ec0ba)=>!!_0x1ec0ba||!!_0x5d76d3&&_0x293460&&!_0x37952a||_0x42798b&&_0x293460&&!_0x37952a),_0x414c55['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x33a9a2,_0x128b6f,_0x548d3)=>{let _0x326d8a;return _0x326d8a=_0x548d3&&_0x128b6f?'Reply\x20to\x20reopen\x20discussion...':_0x33a9a2?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x326d8a);}),_0x414c55['bind']('submitLabel')['to'](this,'length',_0x13c174=>E(this['locale'],_0x13c174?'Reply':'Comment')),_0x414c55['on']('submit',(_0x19b56d,_0x31f5b4)=>{this['fire']('addComment',_0x31f5b4),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x414c55['on']('cancel',()=>{this['focus']();}),_0x414c55['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x414c55['on']('cancel',_0x174b0b=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x174b0b['stop']());}),this['on']('change:isActive',(_0x197fc3,_0x35f4af,_0x298353)=>{_0x298353||this['length']||_0x414c55['value']||this['fire']('removeCommentThread');}),_0x32f8e7;}}class vt extends/* #__PURE__ -- @preserve */
27
- ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x23a543,_0x41c7fa,_0x49a6dd,_0x111953){super(_0x23a543,_0x41c7fa,_0x49a6dd,_0x111953),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x23a543,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x45f83d,_0x355182,_0x289bb0)=>{_0x289bb0||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x40c1cf,_0x47ade1,_0x52b06c)=>{_0x52b06c&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5dbe6e=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5dbe6e['if']('isActive','ck-thread--active'),_0x5dbe6e['if']('isUnlinked','ck-thread--unlinked'),_0x5dbe6e['if']('isConfirm','ck-thread--remove-confirmation'),_0x5dbe6e['to']('actionIndicator',_0x5da34f=>_0x5da34f?'ck-thread--'+_0x5da34f:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5dbe6e['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 _0x59c85f of this['commentsListView']['commentViews'])_0x59c85f['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0xbe4ae4}=this,_0x5bbdab=this['commentsListView']['commentViews']['get'](0x0);_0x5bbdab===this['_boundFirstCommentView']||_0x5bbdab['isSystemComment']||(this['_boundFirstCommentView']=_0x5bbdab,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x5bbdab,'actionIndicator',_0x1e757b=>'remove'===_0x1e757b?'remove':null),_0x5bbdab['placeholder']=E(_0xbe4ae4,'Write\x20a\x20comment...'),_0x5bbdab['removeButton']['on']('execute',_0x488ce5=>{_0x488ce5['stop'](),this['showConfirm'](E(_0xbe4ae4,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x5bbdab['focus']();}),_0x5bbdab['actionBar']['add'](this['resolveButton'],0x0),_0x5bbdab['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x14e2e8=new _0x299104(this['locale']);return _0x14e2e8['label']=E(this['locale'],'Resolve'),_0x14e2e8['tooltip']=E(this['locale'],'Resolve'),_0x14e2e8['icon']=_0x314b3b,_0x14e2e8['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x14e2e8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1af28c=>!_0x1af28c),_0x14e2e8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x250e51,_0x25c4eb)=>_0x250e51&&!_0x25c4eb),_0x14e2e8['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x14e2e8;}['_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(_0x3ebfa0){super(_0x3ebfa0),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x2dfa84,_0x261096,_0x345604)=>{this['element']['innerHTML']=_0x345604;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x51fb83,_0x2df270,_0x229122){super(_0x51fb83),this['_model']=_0x2df270,this['_config']=_0x229122,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x2df270,'content',_0x2df270,'authoredAt',(_0x554c14,_0x1fd50f)=>E(_0x51fb83,'COMMENT_ARIA_LABEL',[_0x2df270['author']['name'],_0x229122['formatDateTime'](_0x1fd50f),new DOMParser()['parseFromString'](_0x554c14,'text/html')['body']['textContent'],_0x2df270['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x51fb83,E(_0x51fb83,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xfb1a30(),this['focusTracker']=new _0x28a20a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x61476c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x123a86=>_0x123a86['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 _0x4a57cb=new es(this['locale']);return _0x4a57cb['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x54449e,_0x24343b)=>_0x24343b?_0x2d29f9(_0x54449e,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x54449e),_0x4a57cb;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x544953=new os(this['locale'],this['_config']['editorConfig']);return _0x544953['value']=this['_model']['content'],_0x544953['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x544953['submitLabel']=E(this['locale'],'Save'),_0x544953['on']('submit',(_0x5989fb,_0x5c6fc3)=>{this['fire']('updateComment',this['_model']['id'],_0x5c6fc3),this['switchToDisplayMode'](),this['focus']();}),_0x544953['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x544953['once']('editorReady',()=>{_0x544953['focus']();}),_0x544953['createEditor'](),_0x544953['delegate']('editorReady')['to'](this),_0x544953['delegate']('editorDestroyed')['to'](this),_0x544953;}['_setupKeyboardNavigation'](){const _0x1b3fa9=this['element'];this['keystrokes']['listenTo'](_0x1b3fa9);for(const _0x35f4b6 of this['focusables'])this['focusTracker']['add'](_0x35f4b6['element']),this['keystrokes']['listenTo'](_0x35f4b6['element']);this['focusables']['on']('change',(_0x26b84e,_0x3a0f41)=>{for(const _0x2be35b of _0x3a0f41['removed'])this['focusTracker']['remove'](_0x2be35b['element']),this['keystrokes']['stopListening'](_0x2be35b['element']);for(const _0x32e221 of _0x3a0f41['added'])this['focusTracker']['add'](_0x32e221['element']),this['keystrokes']['listenTo'](_0x32e221['element']);}),this['keystrokes']['set']('enter',(_0x214101,_0x4a1b1b)=>{_0x1b3fa9===_0x214101['target']&&(this['focusCycler']['focusFirst'](),_0x4a1b1b());}),this['keystrokes']['set']('esc',(_0x99467d,_0x4dd430)=>{_0x1b3fa9!==_0x99467d['target']&&(this['focus'](),_0x4dd430());});}}class gt extends/* #__PURE__ -- @preserve */
28
- ti(hs){['actionBar'];['userView'];constructor(_0x1ca0c9,_0x234ae1,_0x45c717){super(_0x1ca0c9,_0x234ae1,_0x45c717),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x1ca0c9,'Reply...')),this['bind']('authoredAt')['to'](_0x234ae1),this['bind']('resolvedAt')['to'](_0x234ae1),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 _0x246627(_0x1ca0c9,_0x234ae1['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x234ae1,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x2e5db3=this['bindTemplate'],_0x15a905=[{'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':_0x2e5db3['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x2e5db3['to']('authoredAt',_0x146571=>this['_config']['formatDateTime'](_0x146571))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x2e5db3['if']('isEditMode','ck-comment__actions--hidden'),_0x2e5db3['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']&&_0x15a905['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x2e5db3['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x2e5db3['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x2e5db3['if']('isEditMode','ck-comment--edit'),_0x2e5db3['if']('isSystemComment','ck-comment--info'),_0x2e5db3['to']('actionIndicator',_0x31364a=>_0x31364a?'ck-comment--'+_0x31364a:'')],'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':_0x15a905}]}]};}['_createEditButton'](){const _0x28f109=new _0x31f757(this['locale']);return _0x28f109['label']=E(this['locale'],'Edit'),_0x28f109['icon']=_0x18ba6e,_0x28f109['withText']=!0x0,_0x28f109['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x28f109['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xaf0f1b=>!_0xaf0f1b),_0x28f109['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x28f109['on']('execute',()=>this['switchToEditMode']()),_0x28f109;}['_createRemoveButton'](){const _0x1808fb=new _0x31f757(this['locale']);return _0x1808fb['label']=E(this['locale'],'Remove'),_0x1808fb['icon']=_0x3cf269,_0x1808fb['withText']=!0x0,_0x1808fb['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1808fb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x556b0d=>!_0x556b0d),_0x1808fb['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1808fb['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1808fb;}['_createDropdown'](){const _0x4a59d8=_0x11d7aa(this['locale'],_0x126240),_0xaee345=_0x4a59d8['panelView']['children'],_0x3ec65d=new _0x355c85(this['locale']),_0x38c08e=_0x4a59d8['bindTemplate'];_0xe79bf2(_0x4a59d8,()=>this['items']['find'](_0x513963=>_0x513963['isVisible'])),_0x4a59d8['extendTemplate']({'attributes':{'class':[_0x38c08e['if']('isVisible','ck-hidden',_0x3161bb=>!_0x3161bb)]}});const _0x1ce543=(_0x5de04a,_0x1cb50e=-0x1)=>{const _0x2586a3=new _0x5e755c(this['locale']);_0x2586a3['children']['add'](_0x5de04a);const _0x4a1cf4=_0x1cb50e>-0x1?_0x1cb50e:_0x3ec65d['items']['length'];_0x3ec65d['items']['add'](_0x2586a3,_0x4a1cf4);const _0x24eb77=Array['from'](this['items']);_0x4a59d8['unbind']('isEnabled','isVisible'),_0x4a59d8['bind']('isEnabled')['toMany'](_0x24eb77,'isEnabled',(..._0x1672e6)=>_0x1672e6['some'](_0x42e24d=>_0x42e24d)),_0x4a59d8['bind']('isVisible')['toMany'](_0x24eb77,'isVisible',(..._0x54cc08)=>_0x54cc08['some'](_0x4326a8=>_0x4326a8));};_0x4a59d8['panelPosition']='sw',_0x4a59d8['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x4e511d});for(const _0xbb1703 of this['items'])_0x1ce543(_0xbb1703);return _0xaee345['add'](_0x3ec65d),_0x4a59d8['listenTo'](this['items'],'add',(_0x291394,_0x48ef4d,_0x4c265a)=>{_0x1ce543(_0x48ef4d,_0x4c265a);}),_0x4a59d8['listenTo'](this['items'],'remove',(_0x3b2e87,_0xaae825,_0x3fc4e7)=>{_0x3ec65d['items']['remove'](_0x3fc4e7);}),_0x4a59d8;}['_attachActions'](_0x5de05e,_0x1c55ac){const _0x298b18=_0x5de05e&&_0x5de05e['element'];_0x298b18&&(this['listenTo'](_0x298b18,'mouseenter',()=>this['actionIndicator']=_0x1c55ac),this['listenTo'](_0x298b18,'focus',()=>this['actionIndicator']=_0x1c55ac),this['listenTo'](_0x298b18,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x298b18,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x4771ed=super['_createCommentInputView']();return _0x4771ed['bind']('placeholder')['to'](this),_0x4771ed;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x11d0a6){const _0x212dc8=Dt(_0x11d0a6,0x1e),_0x24afaf=new MutationObserver(_0x5d685b=>{for(const _0x24d699 of _0x5d685b)('attributes'==_0x24d699['type']&&'class'==_0x24d699['attributeName']||'childList'==_0x24d699['type']||'characterData'==_0x24d699['type'])&&_0x212dc8();});return{'attach'(_0x5ae57e){_0x24afaf['observe'](_0x5ae57e,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x24afaf['disconnect'](),_0x212dc8['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x470360,_0x535876){super(_0x470360),this['id']=_0x9d400b(),this['focusTracker']=new _0x28a20a(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x5dffe1,_0x5e472f)=>this['fire']('Esc',_0x5e472f)),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'](_0x535876),this['mainView']=_0x535876;const _0x110db8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x110db8['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 _0x3d214d=this['element']['clientHeight'];_0x3d214d&&(this['height']=_0x3d214d);}}class d extends/* #__PURE__ -- @preserve */
29
- _0x300858(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3613fe,target:_0x10a0e7,type:_0x361bf9,isVisible:_0x5c7def=!0x0}){super(),this['view']=_0x3613fe,this['view']['element']||this['view']['render'](),this['_type']=_0x361bf9,this['_target']=_0x10a0e7,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x869a3([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3619a6,_0x303e0f)=>{this['view']['focusTracker']['add'](_0x303e0f);}),this['focusableElements']['on']('remove',(_0x5c4773,_0x5d83a9)=>{this['view']['focusTracker']['remove'](_0x5d83a9);}),this['set']('isVisible',_0x5c7def);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x231410=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x231410),_0x231410;}get['targetRect'](){const _0x49e3e8=this['target'];if(null===_0x49e3e8)return null;if(_0x49e3e8 instanceof _0x3184b7)return _0x49e3e8;const _0x556515=_0x49e3e8['filter'](_0x2011c6=>function(_0x14d944){const _0x27cbbd=_0x14d944['offsetParent'];if(_0x27cbbd)return!0x0;const _0x2f12bb=_0x14d944['getClientRects']()['item'](0x0);return!!_0x2f12bb;}(_0x2011c6));return 0x0===_0x556515['length']?null:new _0x3184b7(_0x556515[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1e288f){this['view']['isActive']=_0x1e288f,this['view']['mainView']['isActive']=_0x1e288f;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4cd2c9){if(!(null===_0x4cd2c9||_0x4cd2c9 instanceof _0x3184b7||Array['isArray'](_0x4cd2c9)&&_0x4cd2c9['every'](_0x280439=>li(_0x280439))))throw new _0x39e81a('annotation-invalid-target',null,{'target':_0x4cd2c9});}['_getNormalizedTarget'](){const _0x29701a='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x29701a)?[_0x29701a]:_0x29701a;}}function li(_0x13795e){return null!==_0x13795e&&'object'==typeof _0x13795e&&'nodeType'in _0x13795e&&0x1===_0x13795e['nodeType'];}class _ extends _0x869a3{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x739049=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x28a20a(),this['_focusTracker']['on']('change:isFocused',(_0x8032a1,_0x314763,_0x928a98)=>{_0x928a98||this['fire']('blur');});for(const _0x40a2c0 of _0x739049)this['add'](_0x40a2c0);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x14da12){if(this['has'](_0x14da12))throw new _0x39e81a('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x14da12['innerView'],_0x14da12),this['_viewToAnnotation']['set'](_0x14da12['view'],_0x14da12);for(const _0x3d7d78 of _0x14da12['focusableElements'])this['_focusTracker']['add'](_0x3d7d78);this['listenTo'](_0x14da12['focusableElements'],'add',(_0x1941be,_0x2deebe)=>{this['_focusTracker']['add'](_0x2deebe);}),this['listenTo'](_0x14da12['focusableElements'],'remove',(_0x179491,_0x1d8508)=>{this['_focusTracker']['remove'](_0x1d8508);}),this['listenTo'](_0x14da12['view']['focusTracker'],'change:isFocused',(_0x2f284a,_0x4934ea,_0x5b2d9c)=>{_0x5b2d9c&&this['fire']('focus',_0x14da12);}),_0x14da12['updateTargetRect']();const _0x56fb68=this['_getOrderInContent'](_0x14da12['view']['targetRect']);return super['add'](_0x14da12,_0x56fb68);}['remove'](_0x14ef29){if(!this['has'](_0x14ef29))throw new _0x39e81a('annotationcollection-not-existing-item',null);this['stopListening'](_0x14ef29['view']['focusTracker']),this['stopListening'](_0x14ef29['focusableElements']);for(const _0x3ce146 of _0x14ef29['focusableElements'])this['_focusTracker']['remove'](_0x3ce146);return this['_viewToAnnotation']['delete'](_0x14ef29['view']),this['_innerViewToAnnotation']['delete'](_0x14ef29['innerView']),super['remove'](_0x14ef29);}['getByInnerView'](_0xcda3ca){return this['_innerViewToAnnotation']['get'](_0xcda3ca);}['getByView'](_0x4ac18a){return this['_viewToAnnotation']['get'](_0x4ac18a);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x146fb1 of this)_0x146fb1['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4a4536=Array['from'](this)['sort']((_0x14bc11,_0x1b5acd)=>v(_0x14bc11['view']['targetRect'],_0x1b5acd['view']['targetRect']));for(let _0x40605c=_0x4a4536['length']-0x1;_0x40605c>0x0;_0x40605c--){const _0x200bad=_0x4a4536[_0x40605c];_0x40605c!==this['getIndex'](_0x200bad)&&(this['remove'](_0x200bad),this['add'](_0x200bad));}}['_getOrderInContent'](_0x41da8e){let _0xf06e23=0x0;if(!_0x41da8e)return this['length'];for(const _0x2f39fa of this){const _0x2fa135=_0x2f39fa['view']['targetRect'];if(_0x2fa135){if(v(_0x41da8e,_0x2fa135)<0x0)return _0xf06e23;_0xf06e23++;}}return _0xf06e23;}}function v(_0x1755b0,_0xa3bad5){if(null===_0x1755b0&&null===_0xa3bad5)return 0x0;if(null===_0x1755b0)return-0x1;if(null===_0xa3bad5)return 0x1;const _0xf278f3=_0x1755b0['top']-_0xa3bad5['top'];return 0x0==_0xf278f3?_0x1755b0['left']-_0xa3bad5['left']:_0xf278f3;}class O extends _0x3dc007{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x491093){if(super(_0x491093),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x491093 instanceof _0x38b534){const _0x1008b7=_0x491093['locale'];_0x491093['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x1008b7,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x1008b7,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x1008b7,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x1008b7,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x1008b7,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x1008b7,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x1008b7,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x361955){this['collection']['add'](_0x361955);}['remove'](_0x1b7481){this['collection']['remove'](_0x1b7481),_0x1b7481['destroy']();}['refreshVisibility'](){for(const _0x5caa87 of this['collection'])_0x5caa87['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3a0a13){return this['collection']['getByInnerView'](_0x3a0a13);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xe25a5c of this['collection'])_0xe25a5c['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2aca2c){this['fire']('_activateAnnotation',_0x2aca2c);}['createAnnotation'](_0x159a65){return new d(_0x159a65);}['createAnnotationView'](_0x2e38cf,_0x7949b8){return new S(_0x2e38cf,_0x7949b8);}['_addActiveAnnotation'](_0x13a4e4){const _0x31fce4=new Set(this['activeAnnotations']);_0x31fce4['add'](_0x13a4e4),this['activeAnnotations']=_0x31fce4;}['_removeActiveAnnotation'](_0x34243f){const _0xc04990=new Set(this['activeAnnotations']);_0xc04990['delete'](_0x34243f),this['activeAnnotations']=_0xc04990;}['_bindAnnotationsToVisibleAnnotations'](){const _0x352c81=this['collection'],_0x25b05f=this['_visibleAnnotations'];function _0x2bdf77(_0x429b39){const _0x4e8e42=_0x429b39['source'];_0x4e8e42['isVisible']&&!_0x25b05f['has'](_0x4e8e42)?_0x25b05f['add'](_0x4e8e42):!_0x4e8e42['isVisible']&&_0x25b05f['has'](_0x4e8e42)&&_0x25b05f['remove'](_0x4e8e42),_0x4e8e42['view']['focusTracker']['remove'](_0x4e8e42['view']['element']),_0x4e8e42['view']['focusTracker']['add'](_0x4e8e42['view']['element']);}this['listenTo'](_0x352c81,'add',(_0x32da94,_0x3ecfbe)=>{_0x3ecfbe['isVisible']&&_0x25b05f['add'](_0x3ecfbe),this['listenTo'](_0x3ecfbe,'change:isVisible',_0x2bdf77);}),this['listenTo'](_0x352c81,'remove',(_0x26beef,_0x437d71)=>{_0x25b05f['has'](_0x437d71)&&_0x25b05f['remove'](_0x437d71),this['stopListening'](_0x437d71,'change:isVisible',_0x2bdf77);});}['_setupEnterAnnotationKeystroke'](){const _0x76f1e2=_0x391d93=>{_0x391d93['on']('ready',()=>{_0x391d93['keystrokes']['set'](_0x3e011f,(_0x470028,_0x2bde01)=>{const _0x3aea6c=_0x4f5db6(this['activeAnnotations']['values']());_0x3aea6c&&(_0x3aea6c['view']['focus'](),_0x2bde01());});});};this['context']instanceof _0x38b534?_0x76f1e2(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x288662,_0x25f9ad)=>{_0x76f1e2(_0x25f9ad);});}['_setupEscapeAnnotationHandling'](){const _0x502053=_0x59cd87=>{const _0x42f37e=_0x59cd87['source'],_0x21805a=[];let _0x550039;if(Array['isArray'](_0x42f37e['target'])){_0x550039=_0x42f37e['target'][0x0],this['context']instanceof _0x38b534?_0x21805a['push'](this['context']):this['context']['editors']&&_0x21805a['push'](...this['context']['editors']);for(const _0x5f147a of _0x21805a)for(const _0x32c675 of _0x5f147a['editing']['view']['domRoots']['values']())if(_0x32c675['contains'](_0x550039))return void _0x5f147a['editing']['view']['focus']();_0x550039['focus']();}};this['listenTo'](this['collection'],'add',(_0x463aff,_0x15a738)=>{this['listenTo'](_0x15a738,'escape',_0x502053,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5b6607,_0x56d42a)=>{this['stopListening'](_0x56d42a,'escape',_0x502053);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x3dc007{['_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(_0x264d8f){super(_0x264d8f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x37a508=this['context']['config'];_0x37a508['define']('comments.maxCommentsWhenCollapsed',0x2),_0x37a508['define']('comments.maxThreadTotalWeight',0x1f4),_0x37a508['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x37a508['define']('comments.CommentThreadView',vt),_0x37a508['define']('comments.CommentView',gt),_0x37a508['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xa69c08=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3b6430,_0x1df5ae)=>this['_addCommentThread'](_0x1df5ae)),this['on']('submitCommentThread',(_0x39483f,_0x1a833b)=>this['_submitCommentThread'](_0x1a833b)),this['on']('resolveCommentThread',(_0x476c92,_0x3197b0)=>this['_resolveCommentThread'](_0x3197b0)),this['on']('resolveCommentThread',(_0x549b53,_0x66bfe1)=>this['_updateActiveAnnotation'](_0x66bfe1),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1130d4,_0x5afd5d)=>this['_reopenCommentThread'](_0x5afd5d)),this['on']('reopenCommentThread',(_0xbefdf0,_0x4a32c6)=>this['_updateActiveAnnotation'](_0x4a32c6),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4b2c18,_0x1e8b63)=>this['_removeCommentThread'](_0x1e8b63)),this['on']('updateCommentThread',(_0x1233dc,_0x2476a1)=>this['_updateCommentThread'](_0x2476a1)),this['on']('updateCommentThread',(_0x56f4c8,_0x52a1fc)=>this['_updateActiveAnnotation'](_0x52a1fc),{'priority':'lowest'}),this['on']('addComment',(_0x4af73d,_0x18821a)=>this['_addComment'](_0x18821a)),this['on']('updateComment',(_0x51a2b4,_0x2c054a)=>this['_updateComment'](_0x2c054a)),this['on']('removeComment',(_0x1fa4a0,_0x71a7f9)=>this['_removeComment'](_0x71a7f9)),this['on']('addComment',(_0x4283ed,{threadId:_0x1965d1,isFromAdapter:_0x21d79b})=>{if(_0x21d79b)return;const _0x1cca8b=this['getCommentThread'](_0x1965d1),_0x2c0939=_0x1cca8b&&this['_threadToController']['get'](_0x1cca8b);_0x2c0939&&_0x2c0939['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xa69c08,'change:activeAnnotations',(_0x1ef7ea,_0x4ae682,_0x72847)=>{const _0x20a404=Array['from'](_0x72847)['map'](_0x32356d=>this['_viewToController']['get'](_0x32356d['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x20a404?_0x20a404['model']:null;});}set['adapter'](_0x3415ac){if(this['_adapter'])throw new _0x39e81a('commentsrepository-adapter-already-set');this['_adapter']=_0x3415ac;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x50000c=Tt,threadId:_0x1d9ae5=_0x9d400b(),comments:_0x1d76b8=[],unlinkedAt:_0x3915cb=null,resolvedAt:_0x284be7=null,resolvedBy:_0x16dd04=null,target:_0x5b87b6=null,context:_0x5c7b0a=null,attributes:_0x1f993b={},isResolvable:_0x5d65e5=!0x0,isSubmitted:_0x50e34d=!0x1,isFromAdapter:_0x550b89=!0x1}={}){return this['fire'](bt('addCommentThread',_0x50000c),{'channelId':_0x50000c,'threadId':_0x1d9ae5,'comments':_0x1d76b8,'unlinkedAt':_0x3915cb,'resolvedAt':_0x284be7,'resolvedBy':_0x16dd04,'target':_0x5b87b6,'context':_0x5c7b0a,'attributes':_0x1f993b,'isFromAdapter':_0x550b89,'isResolvable':_0x5d65e5,'isSubmitted':_0x50e34d}),this['getCommentThread'](_0x1d9ae5);}['openNewCommentThread']({channelId:_0x31a108=Tt,threadId:_0x2fa3d4=_0x9d400b(),target:_0x9ec7a3,context:_0x3b41ab=null,isResolvable:_0xb85839=!0x0}){if(this['_readOnlyChannels']['has'](_0x31a108)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x9ec7a3)throw new _0x39e81a('commentsrepository-missing-target');const _0x1a6f89=this['addCommentThread']({'channelId':_0x31a108,'threadId':_0x2fa3d4,'target':_0x9ec7a3,'context':_0x3b41ab,'isResolvable':_0xb85839});if(!_0x1a6f89)return null;const _0x36bcbe=this['_threadToController']['get'](_0x1a6f89),_0x233dc5=_0x36bcbe['view']['commentThreadInputView']['commentInputView'],_0x4e54cb=this['context']['plugins']['get'](O),_0x48ea19=_0x4e54cb['getByInnerView'](_0x36bcbe['view']);return _0x4e54cb['activate'](_0x48ea19),_0x233dc5['once']('editorReady',()=>_0x233dc5['focus']()),_0x1a6f89;}['hasCommentThread'](_0x12c10f){if('string'!=typeof _0x12c10f)throw new _0x39e81a('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x12c10f);}['updateCommentThread']({channelId:_0x1ac9ba=Tt,threadId:_0x4a9340,context:_0xd2f13c,unlinkedAt:_0x3de398,attributes:_0x14270b,isFromAdapter:_0x33dead=!0x1}){return this['fire'](bt('updateCommentThread',_0x1ac9ba),{'channelId':_0x1ac9ba,'threadId':_0x4a9340,'context':_0xd2f13c,'unlinkedAt':_0x3de398,'attributes':_0x14270b,'isFromAdapter':_0x33dead}),this['getCommentThread'](_0x4a9340);}['getCommentThread'](_0x107156){if('string'!=typeof _0x107156)throw new _0x39e81a('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x107156);}['fetchCommentThread']({channelId:_0x29331f,threadId:_0x783159}={}){const _0x2db8ed=this['getCommentThread'](_0x783159);if(_0x2db8ed)return Promise['resolve'](_0x2db8ed);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x39e81a('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x29331f,'threadId':_0x783159})['then'](_0x4776a2=>this['hasCommentThread'](_0x783159)?this['getCommentThread'](_0x783159):_0x4776a2?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x29331f},_0x4776a2)):void 0x0)['catch'](_0x5835ef=>{throw console['error'](_0x5835ef),new _0x39e81a('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x551b93,skipNotAttached:_0x4c17e6=!0x1,skipEmpty:_0x147b2e=!0x1,toJSON:_0x397489=!0x1}={}){const _0x2a0c81=[];for(const _0x1dedf1 of this['_threads']['values']())_0x551b93&&_0x1dedf1['channelId']!==_0x551b93||_0x4c17e6&&!_0x1dedf1['isAttached']||_0x147b2e&&0x0===_0x1dedf1['length']||_0x2a0c81['push'](_0x1dedf1);return _0x397489?_0x2a0c81['map'](_0x40fb2c=>_0x40fb2c['toJSON']()):_0x2a0c81;}['setActiveCommentThread'](_0x43a169){const _0x17103d=this['context']['plugins']['get'](O);if(!_0x43a169)return void(this['activeCommentThread']&&_0x17103d['deactivateAll']());const _0xb89a93=this['getCommentThread'](_0x43a169);if(!_0xb89a93)throw new _0x39e81a('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x43a169});if(!this['_threadToController']['has'](_0xb89a93))throw new _0x39e81a('commentsrepository-active-not-attached',null,{'threadId':_0x43a169});const _0x50e5fe=_0x17103d['getByInnerView'](this['_threadToController']['get'](_0xb89a93)['view']);_0x17103d['activate'](_0x50e5fe);}['switchReadOnly'](_0xcd19d4,_0x3e31ab){_0xcd19d4?this['_readOnlyChannels']['add'](_0x3e31ab):this['_readOnlyChannels']['delete'](_0x3e31ab),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x3f0849){return this['_readOnlyChannels']['has'](_0x3f0849)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1ff87c,_0x5f20bf){return new Ct(_0x1ff87c,_0x5f20bf);}['setPermissions'](_0x5a99f0,_0x4dcbab=Tt){this['_permissions']['set'](_0x4dcbab,_0x5a99f0),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xc7d3c2=Tt){return this['_permissions']['has'](_0xc7d3c2)?this['_permissions']['get'](_0xc7d3c2):_t;}['_addCommentThread']({channelId:_0x2542f8,threadId:_0x2f2b95,comments:_0x38d8f0,unlinkedAt:_0x58d755,resolvedAt:_0x163a3b,resolvedBy:_0x11be08,target:_0x1acb4a,context:_0x12379a,attributes:_0x1d22b0,isFromAdapter:_0x46e338,isResolvable:_0x5a78e9,isSubmitted:_0x2c44de}){if('string'!=typeof _0x2f2b95)throw new _0x39e81a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2f2b95});if(this['hasCommentThread'](_0x2f2b95))throw new _0x39e81a('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2f2b95});const _0x3840a3=new ui(this,{'channelId':_0x2542f8,'id':_0x2f2b95,'context':_0x12379a,'attributes':_0x1d22b0,'unlinkedAt':_0x58d755,'resolvedAt':_0x163a3b,'resolvedBy':_0x11be08?this['context']['plugins']['get'](it)['getUser'](_0x11be08):null,'isResolvable':_0x5a78e9,'isSubmitted':_0x2c44de||_0x46e338});this['_threads']['set'](_0x2f2b95,_0x3840a3);for(const _0x1df0ec of _0x38d8f0)_0x3840a3['_add'](this['_createNewComment']({'threadId':_0x2f2b95,..._0x1df0ec}));return _0x1acb4a&&_0x3840a3['attachTo'](_0x1acb4a),_0x46e338||!_0x3840a3['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2542f8,'threadId':_0x2f2b95});}['_submitCommentThread']({channelId:_0x11df6d,threadId:_0x357b17}){if(!this['hasCommentThread'](_0x357b17))throw new _0x39e81a('commentsrepository-missing-comment-thread',this);const _0x5f51ee=this['getCommentThread'](_0x357b17);if(_0x5f51ee['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x496667,comments:_0x1caaaa,resolvedAt:_0x24fba7,resolvedBy:_0x497528,context:_0x4b9948,attributes:_0x346be6}=_0x5f51ee,_0xefc3a0=this['context']['plugins']['get']('PendingActions'),_0x20d202=_0xefc3a0['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x11df6d,'threadId':_0x496667,'comments':_0x1caaaa['map'](_0x49d64c=>_0x49d64c['toJSON']()),'resolvedAt':_0x24fba7,'resolvedBy':_0x497528?_0x497528['id']:_0x497528,'context':_0x4b9948,'attributes':_0x346be6})['then'](({comments:_0x271950})=>{_0xefc3a0['remove'](_0x20d202);for(const _0x4dc6e0 of _0x271950)this['_updateComment']({'channelId':_0x11df6d,'threadId':_0x357b17,'commentId':_0x4dc6e0['commentId'],'createdAt':_0x4dc6e0['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3cd188=>{throw console['error'](_0x3cd188),new _0x39e81a('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x316de6,target:_0x3b5712}){const _0x1af4ef=this['getCommentThread'](_0x316de6);if(!_0x1af4ef)throw new _0x39e81a('commentsrepository-attach-missing-comment-thread',this);const _0x481c77=this['context']['plugins']['get']('PendingActions'),_0x2181dd=this['context']['plugins']['get'](O),_0x369e5f=this['_createCommentThreadView'](_0x1af4ef),_0xb06248=new Ct(_0x1af4ef,_0x369e5f);let _0x111465=null;_0x369e5f['on']('change:isDirty',(_0x23226f,_0x1103de,_0x5a3ade)=>{_0x5a3ade?_0x111465=_0x481c77['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x111465&&(_0x481c77['remove'](_0x111465),_0x111465=null);}),this['_threadToController']['set'](_0x1af4ef,_0xb06248),this['_viewToController']['set'](_0x369e5f,_0xb06248);const _0x5841dc=new S(this['context']['locale'],_0x369e5f);_0x5841dc['bind']('length')['to'](_0x369e5f),_0x5841dc['bind']('isDirty')['to'](_0x369e5f,'isDirty',_0x369e5f,'length',(_0x222880,_0xd62c82)=>_0x222880||!_0xd62c82),_0x5841dc['bind']('isActive')['to'](_0x369e5f),_0x5841dc['type']='comment';const _0x34abde=new d({'view':_0x5841dc,'target':_0x3b5712,'type':'comment','isVisible':!_0x1af4ef['archivedAt']});return _0x369e5f['on']('escape',()=>{_0x34abde['fire']('escape');}),this['_bindAnnotationToEditors'](_0x369e5f,_0x34abde),_0x2181dd['add'](_0x34abde),_0x34abde;}['_bindAnnotationToEditors'](_0x3be4c3,_0x3bf37e){this['listenTo'](_0x3be4c3,'editorReady',(_0x36823a,_0x42bf3b)=>{const _0xb07b75=_0x42bf3b['ui']['view']['body']['bodyCollectionContainer'];_0x3bf37e['focusableElements']['add'](_0xb07b75),this['context']instanceof _0x38b534&&this['context']['ui']['focusTracker']['add'](_0xb07b75);},{'priority':'highest'}),this['listenTo'](_0x3be4c3,'editorDestroyed',(_0x10ad0d,_0x38e82d)=>{const _0x27bcfb=_0x38e82d['ui']['view']['body']['bodyCollectionContainer'];_0x3bf37e['focusableElements']['has'](_0x27bcfb)&&_0x3bf37e['focusableElements']['remove'](_0x27bcfb),this['context']instanceof _0x38b534&&this['context']['ui']['focusTracker']['remove'](_0x27bcfb);});}['_unbindEditors'](_0x2f9a85){this['stopListening'](_0x2f9a85,'editorReady'),this['stopListening'](_0x2f9a85,'editorDestroyed');}['_createCommentThreadView'](_0x2651b1){const _0x1f3534=this['context']['plugins']['get'](it),{config:_0x28d77c,locale:_0x1291ba}=this['context'],_0x5322a2=lt(_0x28d77c['get']('locale'),_0x1291ba);return new(0x0,(_0x28d77c['get']('comments'))['CommentThreadView'])(_0x1291ba,_0x2651b1,_0x1f3534['me'],{'editorConfig':{..._0x28d77c['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x28d77c['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x28d77c['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x28d77c['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x28d77c['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5322a2,'CommentView':_0x28d77c['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5a38c3,channelId:_0x1fec3d,resolvedAt:_0x1090e9,resolvedBy:_0x705738,isFromAdapter:_0x34aa40}){if(!this['hasCommentThread'](_0x5a38c3))throw new _0x39e81a('commentsrepository-missing-comment-thread',null,{'threadId':_0x5a38c3});const _0x22a2cb=this['getCommentThread'](_0x5a38c3);if(_0x22a2cb['isResolved'])throw new _0x39e81a('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5a38c3});const _0x19b288=this['context']['plugins']['get'](it);if(_0x22a2cb['resolvedBy']=_0x19b288['getUser'](_0x705738),_0x22a2cb['resolvedAt']=_0x1090e9,_0x34aa40||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x59bb6d=this['context']['plugins']['get']('PendingActions'),_0x440d69=_0x59bb6d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1fec3d,'threadId':_0x5a38c3})['then'](({resolvedAt:_0x390566,resolvedBy:_0xa1b415})=>{_0x59bb6d['remove'](_0x440d69),_0x22a2cb['resolvedBy']['id']!==_0xa1b415&&(_0x22a2cb['resolvedBy']=_0x19b288['getUser'](_0xa1b415)),_0x22a2cb['resolvedAt']=_0x390566;})['catch'](_0x3c69c3=>{throw console['error'](_0x3c69c3),new _0x39e81a('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x38c6eb,channelId:_0x55a0b1,isFromAdapter:_0x57499f}){if(!this['hasCommentThread'](_0x38c6eb))throw new _0x39e81a('commentsrepository-missing-comment-thread',null,{'threadId':_0x38c6eb});const _0x558c5c=this['getCommentThread'](_0x38c6eb);if(!_0x558c5c['isResolved'])throw new _0x39e81a('commentsrepository-reopen-comment-thread',null,{'threadId':_0x38c6eb});if(_0x558c5c['resolvedBy']=null,_0x558c5c['resolvedAt']=null,_0x57499f||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4ae7d4=this['context']['plugins']['get']('PendingActions'),_0x38f4de=_0x4ae7d4['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x55a0b1,'threadId':_0x38c6eb})['then'](()=>_0x4ae7d4['remove'](_0x38f4de))['catch'](_0x5df167=>{throw console['error'](_0x5df167),new _0x39e81a('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x1c64ef,isFromAdapter:_0x58ab2d}){const _0x2dfd2f=this['getCommentThread'](_0x1c64ef);if(!_0x2dfd2f)throw new _0x39e81a('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1c64ef),this['_threads']['delete'](_0x1c64ef),!_0x2dfd2f['isSubmitted']||_0x58ab2d||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4ba301=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1f81de}=_0x2dfd2f,_0x431cec=_0x4ba301['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1f81de,'threadId':_0x1c64ef})['then'](()=>_0x4ba301['remove'](_0x431cec))['catch'](_0x1799b8=>{throw console['error'](_0x1799b8),new _0x39e81a('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1437ec,unlinkedAt:_0x3c0125,context:_0x516df7,attributes:_0x570e9e,isFromAdapter:_0x360a0f}){if('string'!=typeof _0x1437ec)throw new _0x39e81a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1437ec});if(!this['hasCommentThread'](_0x1437ec))throw new _0x39e81a('commentsrepository-missing-comment-thread',null,{'threadId':_0x1437ec});const _0x364b4f=this['getCommentThread'](_0x1437ec);let _0x2c541f=!0x1;if(void 0x0!==_0x516df7&&_0x364b4f['context']!==_0x516df7&&(_0x364b4f['context']=_0x516df7,_0x2c541f=!0x0),void 0x0!==_0x3c0125&&_0x364b4f['unlinkedAt']!==_0x3c0125&&(_0x364b4f['unlinkedAt']=_0x3c0125,_0x2c541f=!0x0),_0x570e9e&&!wt(_0x570e9e,_0x364b4f['attributes'])&&(_0x364b4f['attributes']=_0x570e9e,_0x2c541f=!0x0),!_0x2c541f)return Promise['resolve']();if(!_0x364b4f['isSubmitted']||_0x360a0f||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x8dd078=this['context']['plugins']['get']('PendingActions'),{channelId:_0x364599}=_0x364b4f,_0x20044c=_0x8dd078['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x364599,'threadId':_0x1437ec,'context':_0x516df7,'unlinkedAt':_0x3c0125,'attributes':_0x570e9e})['then'](()=>_0x8dd078['remove'](_0x20044c))['catch'](_0x51e17b=>{throw console['error'](_0x51e17b),new _0x39e81a('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x42ba8c){const _0x3b4f97=this['context']['plugins']['get'](O),_0x3112d1=this['getCommentThread'](_0x42ba8c);if(_0x3112d1['_isAttached']=!0x1,this['_threadToController']['has'](_0x3112d1)){const _0x59a340=this['_threadToController']['get'](_0x3112d1),_0x526d17=_0x59a340['view'],_0x377eff=_0x3b4f97['getByInnerView'](_0x526d17);this['_threadToController']['delete'](_0x3112d1),this['_viewToController']['delete'](_0x526d17),_0x377eff&&_0x3b4f97['remove'](_0x377eff),_0x59a340['destroy'](),_0x526d17['destroy']()['then'](()=>{this['_unbindEditors'](_0x526d17);});}}['_updateActiveAnnotation']({threadId:_0x591120,resolvedAt:_0x148c21,unlinkedAt:_0x27c55e}){const _0x13f5b4=!!_0x148c21,_0x2976b7=this['context']['plugins']['get'](O),_0x16f6f2=this['getCommentThread'](_0x591120);if(this['_threadToController']['has'](_0x16f6f2)){const _0x133df3=this['_threadToController']['get'](_0x16f6f2)['view'],_0x507d4b=_0x2976b7['getByInnerView'](_0x133df3);_0x507d4b&&(_0x13f5b4&&_0x2976b7['_removeActiveAnnotation'](_0x507d4b),_0x27c55e?_0x507d4b['isVisible']=!0x1:_0x507d4b['refreshVisibility']());}}['_getExternalAuthor'](_0x1aecbc){const _0x5d3c7d=this['context']['plugins']['get'](it),_0x33c1db=pt('external:'+_0x1aecbc),_0x180a42=_0x5d3c7d['getUser'](_0x33c1db);return _0x180a42||_0x5d3c7d['addUser']({'id':_0x33c1db,'name':_0x1aecbc});}['_createNewComment']({threadId:_0x553ed9,commentId:_0x4ba4b0=_0x9d400b(),content:_0xa0b015,authorId:_0x36e5ce,createdAt:_0x247797,attributes:_0x237e16}){if('string'!=typeof _0x4ba4b0)throw new _0x39e81a('commentsrepository-invalid-commentid');if('string'!=typeof _0x36e5ce)throw new _0x39e81a('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xa0b015||!_0xa0b015['trim']())throw new _0x39e81a('commentsrepository-invalid-comment-content');const _0x3df3e9=this['context']['plugins']['get'](it)['getUser'](_0x36e5ce);if(!_0x3df3e9)throw new _0x39e81a('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x36e5ce});let _0x5b18c6=null,_0x8f8062=_0x247797;return _0x237e16?.['@external']&&(_0x5b18c6=this['_getExternalAuthor'](_0x237e16['@external']['authorName']),_0x8f8062=new Date(_0x237e16['@external']['createdAt'])),new fi(this,{'threadId':_0x553ed9,'id':_0x4ba4b0,'author':_0x5b18c6||_0x3df3e9,'creator':_0x3df3e9,'content':_0xa0b015,'createdAt':_0x247797,'authoredAt':_0x8f8062,'attributes':_0x237e16});}['_addComment'](_0x3dc32c){let {threadId:_0x10d47d,content:_0x7efdb4,attributes:_0x46ddde,isFromAdapter:_0x5c28d7}=_0x3dc32c;const _0x47eb5e=this['getCommentThread'](_0x3dc32c['threadId']);if(!_0x47eb5e)throw new _0x39e81a('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x289d18=this['_createNewComment'](_0x3dc32c),{id:_0x5ed9da}=_0x289d18;if(_0x47eb5e['_add'](_0x289d18),_0x5c28d7||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x47eb5e['isSubmitted'])return Promise['resolve']();const _0x18802f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x377a38}=_0x47eb5e,_0x3049ce=_0x18802f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x46ddde||(_0x46ddde={}),this['adapter']['addComment']({'channelId':_0x377a38,'threadId':_0x10d47d,'commentId':_0x5ed9da,'content':_0x7efdb4,'attributes':_0x46ddde})['then'](_0x5ad051=>{_0x18802f['remove'](_0x3049ce),_0x5ad051&&this['_updateComment']({'channelId':_0x377a38,'threadId':_0x10d47d,'commentId':_0x5ed9da,'createdAt':_0x5ad051['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x54447f=>{throw console['error'](_0x54447f),new _0x39e81a('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4e4c16,commentId:_0x207271,content:_0x431570,createdAt:_0x591434,attributes:_0x53d093,isFromAdapter:_0x1231cd}){if(void 0x0!==_0x431570&&('string'!=typeof _0x431570||!_0x431570['trim']()['length']))throw new _0x39e81a('commentsrepository-update-comment-invalid-content');const _0x33019d=this['getCommentThread'](_0x4e4c16),_0x421c83=_0x33019d['getComment'](_0x207271);if(!_0x421c83)throw new _0x39e81a('commentsrepository-update-missing-comment',this);let _0x388121=!0x1;if(_0x431570&&_0x431570!==_0x421c83['content']&&(_0x421c83['isEditable']||_0x1231cd)&&(_0x421c83['content']=_0x431570,_0x388121=!0x0),_0x591434&&_0x591434!==_0x421c83['createdAt']&&(_0x421c83['createdAt']=_0x591434,_0x421c83['attributes']&&_0x421c83['attributes']['@external']||(_0x421c83['authoredAt']=_0x591434),_0x388121=!0x0),_0x53d093&&!wt(_0x53d093,_0x421c83['attributes'])&&(_0x421c83['attributes']=_0x53d093,_0x388121=!0x0),!_0x388121)return Promise['resolve']();if(_0x33019d['fire']('commentUpdated'),_0x1231cd||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x45b3d9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1e69b5}=this['getCommentThread'](_0x421c83['threadId']),_0x12d660=_0x45b3d9['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1e69b5,'threadId':_0x4e4c16,'commentId':_0x207271,'content':_0x431570,'attributes':_0x53d093})['then'](()=>_0x45b3d9['remove'](_0x12d660))['catch'](_0x55e731=>{throw console['error'](_0x55e731),new _0x39e81a('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1fda7e,commentId:_0x45dc66,isFromAdapter:_0x4836ef}){const _0x2c12fc=this['getCommentThread'](_0x1fda7e),_0x25b0a0=_0x2c12fc['getComment'](_0x45dc66);if(!_0x25b0a0)throw new _0x39e81a('commentsrepository-remove-missing-comment',this);if(_0x2c12fc['_remove'](_0x25b0a0),_0x4836ef||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xb37092=this['context']['plugins']['get']('PendingActions'),{channelId:_0x295905}=_0x2c12fc,_0x54d4dd=_0xb37092['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x295905,'threadId':_0x1fda7e,'commentId':_0x45dc66})['then'](()=>_0xb37092['remove'](_0x54d4dd))['catch'](_0x545150=>{throw console['error'](_0x545150),new _0x39e81a('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
30
- _0x300858(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5551a6,_0x35823d){super();const _0xf0e8c6=_0x35823d['isResolvable'];this['channelId']=_0x35823d['channelId'],this['id']=_0x35823d['id'],this['comments']=new _0x869a3(),this['_repository']=_0x5551a6,this['_isAttached']=!0x1,this['_isSubmitted']=_0x35823d['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5551a6,'_permissions',_0x5551a6,'_readOnlyChannels',()=>_0x5551a6['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5551a6,'_permissions',()=>_0x5551a6['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5551a6,'_permissions',()=>{const _0x322150=_0x5551a6['getPermissions'](this['channelId']);return _0x322150['write']||_0x322150['admin'];}),this['bind']('isResolvable')['to'](_0x5551a6,'_permissions',()=>_0xf0e8c6&&_0x5551a6['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x35823d['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x393be4,_0x25b3fa)=>_0x393be4?_0x25b3fa?_0x393be4<_0x25b3fa?_0x393be4:_0x25b3fa:_0x393be4:_0x25b3fa),this['set']('unlinkedAt',_0x35823d['unlinkedAt']||null),this['set']('resolvedAt',_0x35823d['resolvedAt']||null),this['set']('resolvedBy',_0x35823d['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x29ba41=>!!_0x29ba41),this['set']('attributes',_0x35823d['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xc96b0b,_0x528082)=>_0xc96b0b+_0x528082['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x4c9060,id:_0x4eeba9}=this;this['_repository']['fire'](bt('submitCommentThread',_0x4c9060),{'channelId':_0x4c9060,'threadId':_0x4eeba9});}['setUnlinkedAt'](_0x5bb76a){this['_update']({'unlinkedAt':_0x5bb76a});}['resolve']({resolvedAt:_0x1a532a=new Date(),resolvedBy:_0xdca340=null,isFromAdapter:_0x3596f6=!0x1}={}){const _0x466bb3=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x4996cd,id:_0x47ca41}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x4996cd),{'channelId':_0x4996cd,'threadId':_0x47ca41,'resolvedAt':_0x1a532a,'resolvedBy':_0xdca340||_0x466bb3['id'],'isFromAdapter':_0x3596f6});}['reopen']({isFromAdapter:_0x3b474a=!0x1}={}){const {channelId:_0x215671,id:_0x8d437e}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x215671),{'channelId':_0x215671,'threadId':_0x8d437e,'isFromAdapter':_0x3b474a});}['setContext'](_0x385b90){this['context']||this['_update']({'context':_0x385b90});}['setAttribute'](_0x875bd8,_0x509c09){const _0xa68130=It(this['attributes']);At(_0xa68130,_0x875bd8,_0x509c09),this['_update']({'attributes':_0xa68130});}['removeAttribute'](_0xb56808){const _0x323276=It(this['attributes']);yt(_0x323276,_0xb56808),this['_update']({'attributes':_0x323276});}['remove']({isFromAdapter:_0x4d2834=!0x1}={}){const {channelId:_0x2136c1,id:_0x1bf0fa}=this;this['_repository']['fire'](bt('removeCommentThread',_0x2136c1),{'channelId':_0x2136c1,'threadId':_0x1bf0fa,'isFromAdapter':_0x4d2834});}['attachTo'](_0x66ab17){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x66ab17});}['addComment'](_0xc56d03){const {channelId:_0x4dd7c4,id:_0x1a7a67}=this;this['_repository']['fire'](bt('addComment',_0x4dd7c4,_0x1a7a67),Object['assign']({'channelId':_0x4dd7c4,'threadId':_0x1a7a67},_0xc56d03));}['getComment'](_0x326498){if('string'!=typeof _0x326498)throw new _0x39e81a('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x326498});return this['comments']['get'](_0x326498);}['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'](_0x22d0a5=>_0x22d0a5['toJSON']()),'attributes':this['attributes']};}['_add'](_0x47f541){return this['listenTo'](_0x47f541,'change:authoredAt',()=>{const _0x370ce0=this['_findOptimalIndex'](_0x47f541),_0xe892b=this['comments'];_0x370ce0-0x1!=_0xe892b['getIndex'](_0x47f541)&&_0x370ce0+0x1!=_0xe892b['getIndex'](_0x47f541)&&(this['_remove'](_0x47f541),this['_add'](_0x47f541));}),this['comments']['add'](_0x47f541,this['_findOptimalIndex'](_0x47f541));}['_update'](_0x354988){const {channelId:_0xc84832,id:_0x14d824}=this;this['_repository']['fire'](bt('updateCommentThread',_0xc84832),{..._0x354988,'channelId':_0xc84832,'threadId':_0x14d824});}['_remove'](_0x3e38f6){return this['stopListening'](_0x3e38f6),_0x3e38f6['destroy'](),this['comments']['remove'](_0x3e38f6);}['_findOptimalIndex'](_0x3a2429){const _0x3f7892=this['comments']['find'](_0x49bd3f=>new Date(_0x49bd3f['authoredAt'])['getTime']()>new Date(_0x3a2429['authoredAt'])['getTime']());return _0x3f7892?this['comments']['getIndex'](_0x3f7892):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
31
- _0x300858(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x59265c,_0x243fe9){super();const _0x17cd14=_0x59265c['context']['plugins']['get'](it)['me'],_0x12978c=_0x59265c['getCommentThread'](_0x243fe9['threadId']),_0x2dd759=0x0===_0x12978c['comments']['length'],_0x331dc2=_0x17cd14===_0x243fe9['author'];this['id']=_0x243fe9['id'],this['threadId']=_0x243fe9['threadId'],this['author']=_0x243fe9['author'],this['creator']=_0x243fe9['creator'],this['isExternal']=Boolean(_0x243fe9['attributes']&&_0x243fe9['attributes']['@external']),this['set']('content',_0x243fe9['content']),this['createdAt']=_0x243fe9['createdAt']||new Date(),this['set']('authoredAt',_0x243fe9['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x12978c,'resolvedAt'),this['set']('attributes',_0x243fe9['attributes']||{}),this['bind']('isEditable')['to'](_0x59265c,'_permissions',()=>{const _0x35d561=_0x59265c['getPermissions'](_0x12978c['channelId'])['write'],_0x299ae0=_0x59265c['getPermissions'](_0x12978c['channelId'])['modifyAll'];return _0x331dc2&&_0x35d561||!_0x331dc2&&_0x299ae0;}),this['bind']('isRemovable')['to'](_0x12978c,'isRemovable',_0x59265c,'_permissions',_0x193453=>{const _0xc85d4e=_0x59265c['getPermissions'](_0x12978c['channelId'])['write'],_0x5af230=_0x59265c['getPermissions'](_0x12978c['channelId'])['modifyAll'];return _0x331dc2&&_0xc85d4e||_0x193453&&_0x2dd759||!_0x331dc2&&_0x5af230&&!_0x2dd759;}),this['bind']('isReadOnly')['to'](_0x12978c,'isReadOnly'),this['_repository']=_0x59265c;}get['weight'](){return Math['max'](function(_0x2e23a0){const _0x20bec8=document['createElement']('div');return _0x20bec8['innerHTML']=_0x2e23a0,_0x20bec8['textContent']['length'];}(this['content']),0xc8);}['update'](_0x58dd7b){const {threadId:_0xa885ce,id:_0x293225}=this;if(!this['_repository']['hasCommentThread'](_0xa885ce))throw new _0x39e81a('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x47cee5}=this['_repository']['getCommentThread'](_0xa885ce);this['_repository']['fire'](bt('updateComment',_0x47cee5,_0xa885ce),{'channelId':_0x47cee5,'threadId':_0xa885ce,'commentId':_0x293225,..._0x58dd7b});}['setAttribute'](_0x48efe1,_0x2e5a90){const _0x4773aa=It(this['attributes']);At(_0x4773aa,_0x48efe1,_0x2e5a90),this['update']({'attributes':_0x4773aa});}['removeAttribute'](_0x50e909){const _0x1fdb5b=It(this['attributes']);yt(_0x1fdb5b,_0x50e909),this['update']({'attributes':_0x1fdb5b});}['remove'](_0x1986c0={}){if(!_0x1986c0['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x354981,id:_0x4e63df}=this;if(!this['_repository']['hasCommentThread'](_0x354981))throw new _0x39e81a('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2d3aee}=this['_repository']['getCommentThread'](_0x354981);this['_repository']['fire'](bt('removeComment',_0x2d3aee,_0x354981),{'channelId':_0x2d3aee,'threadId':_0x354981,'commentId':_0x4e63df,..._0x1986c0});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x348b47,..._0x440a68){for(const _0x29aea5 of _0x440a68)void 0x0!==_0x29aea5&&(_0x348b47+=':'+String(_0x29aea5));return _0x348b47;}class J extends _0xd067e3{['refresh'](){const _0x319d90=this['editor']['model']['document']['selection'];for(const _0x42c491 of _0x319d90['getRanges']())if(this['_hasContent'](_0x42c491))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x15f894=_0x9d400b()}={}){const _0x23b75d=this['editor']['model'],_0x281e10=[];for(const _0x13c9e9 of _0x23b75d['document']['selection']['getRanges']())this['_hasContent'](_0x13c9e9)&&_0x281e10['push'](this['_trimToContent'](_0x13c9e9));_0x23b75d['change'](_0xf1e4c1=>{for(const _0x5d35a4 of _0x281e10){const _0xa8b52f=_0x9d400b()['substr'](0x1,0x5),_0xe206d7='comment:'+_0x15f894+':'+_0xa8b52f;_0xf1e4c1['addMarker'](_0xe206d7,{'range':_0x5d35a4,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x4e2621){for(const _0x4e33cc of _0x4e2621['getItems']())if(this['_itemIsContent'](_0x4e33cc))return!0x0;return!0x1;}['_itemIsContent'](_0x50fc48){return _0x50fc48['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x50fc48)&&!_0x50fc48['is']('element','tableCell');}['_trimToContent'](_0x21e546){const _0xbb7faf=_0x5f36c2=>!this['_itemIsContent'](_0x5f36c2['item']),_0x4a59a9=_0x21e546['start']['getLastMatchingPosition'](_0xbb7faf),_0x4708c9=_0x21e546['end']['getLastMatchingPosition'](_0xbb7faf,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4a59a9,_0x4708c9);}}class P extends _0x17ed19{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x452b91){super(_0x452b91),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x435007=this['editor'],_0x432e3f=_0x435007['model']['document']['selection'],_0x247ffe=_0x318dec(()=>this['refreshSelectedViews'](),0xa);_0x432e3f['on']('change:range',(_0x2da078,_0x1bc71d)=>{_0x1bc71d['directChange']&&(_0x247ffe['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x435007['editing']['view']['document'],'change:isFocused',(_0x23422b,_0x3f49f6,_0x7445cf)=>{_0x7445cf&&_0x247ffe();}),this['listenTo'](_0x435007['ui']['focusTracker'],'change:isFocused',(_0x2fa0b3,_0x50d191,_0x3e21c1)=>{_0x3e21c1||_0x435007['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x1ccb80=>this['_editorAnnotationsData']['has'](_0x1ccb80['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x120a43){if(this['_editorAnnotations']['has'](_0x120a43['view']))return;this['_editorAnnotations']['add'](_0x120a43['view']),this['editor']['ui']['focusTracker']['add'](_0x120a43['view']['element']);const _0xf9b2d6=this['editor']['plugins']['get'](O);this['listenTo'](_0xf9b2d6['collection'],'remove',(_0x562640,_0x12bf3c)=>{this['editor']['ui']['focusTracker']['remove'](_0x12bf3c['view']['element']),this['_editorAnnotations']['delete'](_0x12bf3c['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x44ccda){if('function'!=typeof _0x44ccda)throw new _0x39e81a('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x44ccda);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3a60f5,annotations:_0x2d79e5}){const _0x3b4a89=[],_0x107e3c=this['editor']['model']['document']['selection'],_0x3c4eb5=Array['from'](_0x107e3c['getRanges']());for(const [_0x2f2fa8,_0x367847]of this['_editorAnnotationsData']){const _0x2d9b02=_0x469c0a(_0x367847),_0x229f04=_0x2d79e5['getByInnerView'](_0x2f2fa8);_0x2d9b02&&_0x229f04&&_0x3b4a89['push']({'annotation':_0x229f04,'range':_0x2d9b02});}function _0x469c0a(_0x418694){for(const _0x1cef03 of _0x418694)for(const _0x4ce88e of _0x3c4eb5)if(_0x1cef03['containsRange'](_0x4ce88e,!_0x107e3c['isCollapsed']))return _0x1cef03;return null;}return _0x3b4a89['sort']((_0x93eec,_0x55b0d9)=>{const _0x5adcfc=_0x93eec['range'],_0x32b747=_0x55b0d9['range'];if(!_0x5adcfc['isEqual'](_0x32b747)){if(_0x5adcfc['containsRange'](_0x32b747,!0x0))return 0x1;if(_0x32b747['containsRange'](_0x5adcfc,!0x0))return-0x1;}return _0x93eec['annotation']==_0x3a60f5?-0x1:_0x55b0d9['annotation']==_0x3a60f5?0x1:0x0;})['map'](_0x4bc031=>_0x4bc031['annotation']);}get['_editorAnnotationsData'](){const _0x3a40f4=new Map();for(const _0x11426b of Array['from'](this['_dataCollectors']))for(const [_0x5e0aaf,_0xf149c2]of _0x11426b())_0x3a40f4['set'](_0x5e0aaf,_0xf149c2);return _0x3a40f4;}}class st extends _0x17ed19{['afterInit'](){const _0x3e7100=this['editor'];if(!_0x3e7100['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3e7100['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x17ed19{constructor(_0x1bcb83){super(_0x1bcb83),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2a44c6=this['editor'],_0xe85347=_0x2a44c6['commands']['get']('importWord'),_0x5ab2f7=_0x2a44c6['plugins']['get'](it);_0xe85347&&(_0xe85347['on']('execute',(_0x442f7c,[,_0x4fceaa])=>{_0x4fceaa['collaboration_features']={'comments':!0x0,'user_id':_0x5ab2f7['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0xe85347,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2cbd8c,_0x4b154a){const {comment_threads:_0x778232}=_0x4b154a;_0x778232&&_0x778232['forEach'](({thread_id:_0x52bb0d,comments:_0x26f01b,is_resolved:_0x27f381})=>{const _0x42c1df=new Date(),_0x1fa96e=_0x26f01b['map'](({author:_0x464bab,content:_0x1fd304,created_at:_0x53d878})=>({'content':_0x1fd304,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x42c1df,'attributes':{'@external':{'authorName':_0x464bab,'createdAt':_0x53d878?new Date(_0x53d878):new Date(),'source':'importWord'}}})),_0x3e1c57=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3e1c57,'threadId':_0x52bb0d,'comments':_0x1fa96e,'resolvedAt':_0x27f381?_0x42c1df:null});});}}class at extends _0x17ed19{constructor(_0x53c92d){super(_0x53c92d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x44e148=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x44e148,'contentInsertion',(_0x10dd06,_0x8061aa)=>this['_removeMarkersWithoutThreads'](_0x8061aa['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xbcfe9f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xbcfe9f;const _0x49f0c9=this['editor']['plugins']['get']('CommentsRepository');for(const _0x451d2a of _0xbcfe9f['keys']()){const [_0x4f2dec,_0x230d27]=_0x451d2a['split'](':');'comment'!=_0x4f2dec||_0x49f0c9['hasCommentThread'](_0x230d27)||_0xbcfe9f['delete'](_0x451d2a);}return _0xbcfe9f;}['_registerMarkerInClipboardPipeline'](){const _0x3d252f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4830dc=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4830dc&&_0x3d252f['_registerMarkerToCopy']('comment',_0x4830dc);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1d1e5c){switch(_0x1d1e5c){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 _0x17ed19{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x56d6c7,_0xf7403c)=>{if(!_0xf7403c['options']['showCommentHighlights'])return null;if(_0xf7403c['options']['ignoreResolvedComments']){const {id:_0x4e0fb9}=er(_0x56d6c7['markerName']),_0x4c580c=this['editor']['plugins']['get'](o);if(_0x4c580c['getCommentThread'](_0x4e0fb9)?.['isResolved']&&_0x56d6c7['item'])return _0xf7403c['consumable']['consume'](_0x56d6c7['item'],'addMarker:'+_0x56d6c7['markerName']),_0xf7403c['consumable']['consume'](_0x56d6c7['item'],'removeMarker:'+_0x56d6c7['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x35bd5e=>{_0x35bd5e['on']('addMarker:comment',(_0x5e246f,_0x2e9dd0,_0xd7bb3d)=>{if(!_0xd7bb3d['options']['showCommentHighlights'])return;const _0xdaee5e=_0x2e9dd0['item'];if(!_0xdaee5e)return;const _0x66ead5=_0xd7bb3d['mapper']['toViewElement'](_0xdaee5e);this['editor']['model']['schema']['isObject'](_0xdaee5e)&&_0x66ead5&&!_0x66ead5['getCustomProperty']('widget')&&_0x66ead5['is']('containerElement')&&_0x1e73fa(_0x66ead5,_0xd7bb3d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0xeb003d,{writer:_0x5ea5f5,options:_0x39e3b1})=>{if(!_0x39e3b1['showCommentHighlights'])return null;const _0x48fb75=_0x5ea5f5['createContainerElement']('div'),_0x18ce3f=_0x5ea5f5['createEmptyElement']('hr');return _0x5ea5f5['addClass']('ck-horizontal-line',_0x48fb75),_0x5ea5f5['insert'](_0x5ea5f5['createPositionAt'](_0x48fb75,0x0),_0x18ce3f),_0x48fb75;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5073d2,{writer:_0x5cf957,options:_0x5737a3})=>{if(!_0x5737a3['showCommentHighlights'])return null;const _0x4e66f2=_0x5cf957['createContainerElement']('span'),_0x2ea7c5=_0x5cf957['createEmptyElement']('img');return _0x5cf957['addClass']('image-inline',_0x4e66f2),_0x5cf957['insert'](_0x5cf957['createPositionAt'](_0x4e66f2,0x0),_0x2ea7c5),_0x4e66f2;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x21eb48,{writer:_0xba21b6,options:_0x359225})=>{if(_0x359225['showCommentHighlights'])return _0xba21b6['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x41e58d,_0x5c8ffd,_0x1dead6)=>{_0x1dead6['options']['showCommentHighlights']&&_0x41e58d['stop']();},{'priority':'high'});}}class r extends _0x17ed19{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(_0x34491a){super(_0x34491a),this['set']('isThreadsLoadingPaused',!0x0),_0x34491a['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xdb0e00,_0x548de1,_0x327ed3,_0x1455d1)=>{const _0x551292=_0x34491a['plugins']['get'](o),_0x5f442c=_0x327ed3?er(_0x327ed3)['id']:null;_0x34491a['model']['change'](()=>{if(_0x5f442c){const _0x445c6c=this['getAllMarkersForId'](_0x5f442c);for(const _0x11d175 of _0x445c6c)_0x34491a['editing']['reconvertMarker'](_0x11d175);}if(_0x1455d1){const {id:_0x15b272}=er(_0x1455d1),_0x5f3747=_0x551292['getCommentThread'](_0x15b272);if(_0x5f3747&&_0x5f3747['unlinkedAt'])return;if(_0x5f3747&&!_0x5f3747['isAttached'])return;const _0x5bd63c=this['getAllMarkersForId'](_0x15b272);for(const _0x370e64 of _0x5bd63c)_0x34491a['editing']['reconvertMarker'](_0x370e64);}}),_0x5f442c&&this['scrollToThreadMarker'](_0x5f442c);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x403d43=this['editor'],_0x2ec106=_0x403d43['plugins']['get'](o),_0x29f09e=_0x403d43['config']['get']('collaboration.channelId'),_0x3c59d2=_0x2ec106['getCommentThreads']()['filter'](_0x4a1897=>_0x4a1897['channelId']!==_0x29f09e);_0x403d43['commands']['add']('addCommentThread',new J(_0x403d43)),this['listenTo'](_0x403d43,'change:isReadOnly',(_0x348f38,_0x252c79,_0x4a5992)=>{_0x2ec106['switchReadOnly'](_0x4a5992,_0x403d43['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2ec106,ft('addCommentThread',_0x29f09e),(_0x1570ea,{threadId:_0x192cef})=>{const _0x1c7f00=this['editor']['plugins']['get'](o)['getCommentThread'](_0x192cef);_0x1c7f00?.['unlinkedAt']&&this['_attachArchivedThread'](_0x192cef);}),this['listenTo'](_0x2ec106,ft('removeCommentThread',_0x29f09e),(_0xbd4bc,{threadId:_0x21d815})=>{_0x403d43['model']['enqueueChange']({'isUndoable':!0x1},_0x575abd=>{const _0x43910b=this['getAllMarkersForId'](_0x21d815);for(const _0x390316 of _0x43910b)_0x575abd['removeMarker'](_0x390316);});}),this['listenTo'](_0x2ec106,ft('resolveCommentThread',_0x29f09e),(_0xc4b5e8,{threadId:_0x1cb344})=>{(this['_reconvertMarkers'](_0x1cb344),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1cb344)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2ec106,ft('reopenCommentThread',_0x29f09e),(_0x22afc5,{threadId:_0x41f2e5})=>{this['_reconvertMarkers'](_0x41f2e5);},{'priority':'low'}),this['listenTo'](_0x2ec106,ft('addComment',_0x29f09e),(_0x417938,{threadId:_0x5a9b08,isFromAdapter:_0x1d62e7})=>{const _0x595a87=this['getAllMarkersForId'](_0x5a9b08);if(_0x1d62e7||0x0==_0x595a87['length']||!_0x2ec106['hasCommentThread'](_0x5a9b08))return;0x1===_0x2ec106['getCommentThread'](_0x5a9b08)['length']&&_0x403d43['model']['enqueueChange']({'isUndoable':!0x1},_0xdcc9f2=>{for(const _0x52acd4 of _0x595a87)_0xdcc9f2['updateMarker'](_0x52acd4,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3c59d2);}['afterInit'](){!async function(_0x556719){const _0x228133=_0xa5db1a([0x4b,0x6f,0x4f,0x48,0x31,0x37,0x30,0x65,0x7a,0x6e,0x50,0x71,0x62,0x6b,0x4d,0x68,0x76,0x42,0x4e,0x74,0x59,0x56,0x77,0x53,0x4a,0x32,0x57,0x33,0x47,0x51,0x44,0x36,0x6c,0x54,0x69,0x35,0x78,0x34,0x43,0x63,0x67,0x75,0x49,0x66,0x5a,0x41,0x45,0x46,0x39,0x38,0x52,0x61,0x64,0x70,0x6a,0x55,0x73,0x4c,0x6d,0x72,0x58,0x79]),_0x4321b9=0x4123ede9,_0x3787b2=0x41248469^_0x4321b9,_0x502cc8=window[_0xa5db1a([0x44,0x61,0x74,0x65])][_0xa5db1a([0x6e,0x6f,0x77])](),_0x3988ba=_0x556719[_0xa5db1a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x47a0ea=new window[(_0xa5db1a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1a731d=>{_0x3988ba[_0xa5db1a([0x6f,0x6e,0x63,0x65])](_0xa5db1a([0x72,0x65,0x61,0x64,0x79]),_0x1a731d);}),_0x1b5610={[_0xa5db1a([0x6b,0x74,0x79])]:_0xa5db1a([0x45,0x43]),[_0xa5db1a([0x75,0x73,0x65])]:_0xa5db1a([0x73,0x69,0x67]),[_0xa5db1a([0x63,0x72,0x76])]:_0xa5db1a([0x50,0x2d,0x32,0x35,0x36]),[_0xa5db1a([0x78])]:_0xa5db1a([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]),[_0xa5db1a([0x79])]:_0xa5db1a([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]),[_0xa5db1a([0x61,0x6c,0x67])]:_0xa5db1a([0x45,0x53,0x32,0x35,0x36])},_0x176ed6=_0x3988ba[_0xa5db1a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xa5db1a([0x67,0x65,0x74])](_0xa5db1a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5de169(){let _0x521026,_0x41ac9d=null,_0x853593=null;try{if(_0x176ed6==_0xa5db1a([0x47,0x50,0x4c]))return _0xa5db1a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x521026=_0x2fdaec(),!_0x521026)return _0xa5db1a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x521026[_0xa5db1a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x853593=_0x40c127(_0x521026[_0xa5db1a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x521026[_0xa5db1a([0x6a,0x74,0x69])])),await _0x1a3462()?_0x34b0f7()?_0x30eac1()?_0xa5db1a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4e4721()?(_0x521026[_0xa5db1a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xa5db1a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x41ac9d=_0x45c6c7(_0xa5db1a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x521026[_0xa5db1a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xa5db1a([0x74,0x72,0x69,0x61,0x6c])&&(_0x41ac9d=_0x45c6c7(_0xa5db1a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x473c59()):_0xa5db1a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xa5db1a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xa5db1a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xa5db1a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x30eac1(){const _0x476759=[_0xa5db1a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xa5db1a([0x74,0x72,0x69,0x61,0x6c])][_0xa5db1a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x521026[_0xa5db1a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x502cc8/0x3e8:0xe10*_0x3787b2;return _0x521026[_0xa5db1a([0x65,0x78,0x70])]<_0x476759;}function _0x34b0f7(){const _0x4634b3=_0x521026[_0xa5db1a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4634b3)return!0x1;if(_0x4634b3[_0xa5db1a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa5db1a([0x2a])))return!0x0;if(_0x4634b3[_0xa5db1a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa5db1a([0x43,0x4d,0x54])))return!0x0;if(_0x4634b3[_0xa5db1a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa5db1a([0x52,0x43,0x4d,0x54]))){if(_0x2d10c1())return!0x0;if(_0x9aa29f()||_0x1589cf())return!0x0;}return!0x1;}function _0x4e4721(){const _0x5d02fd=_0x521026[_0xa5db1a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5d02fd||0x0==_0x5d02fd[_0xa5db1a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x53c35f}=new URL(window[_0xa5db1a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5d02fd[_0xa5db1a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x53c35f))return!0x0;const _0x1f7653=_0x53c35f[_0xa5db1a([0x73,0x70,0x6c,0x69,0x74])](_0xa5db1a([0x2e]));return _0x5d02fd[_0xa5db1a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x15de5a=>_0x15de5a[_0xa5db1a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa5db1a([0x2a])))[_0xa5db1a([0x6d,0x61,0x70])](_0x19dd26=>_0x19dd26[_0xa5db1a([0x73,0x70,0x6c,0x69,0x74])](_0xa5db1a([0x2e])))[_0xa5db1a([0x73,0x6f,0x6d,0x65])](_0x44b3c7=>_0x1f7653[_0xa5db1a([0x65,0x76,0x65,0x72,0x79])]((_0x193357,_0x38e222)=>_0x44b3c7[_0x38e222]===_0x193357||_0x44b3c7[_0x38e222]===_0xa5db1a([0x2a])));}function _0x473c59(){return _0x41ac9d&&_0x853593?new window[(_0xa5db1a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x346379,_0x4ad49c)=>{_0x41ac9d[_0xa5db1a([0x74,0x68,0x65,0x6e])](_0x346379,_0x4ad49c),_0x853593[_0xa5db1a([0x74,0x68,0x65,0x6e])](_0x55bcf7=>{_0x55bcf7!=_0xa5db1a([0x56,0x61,0x6c,0x69,0x64])&&_0x346379(_0x55bcf7);},_0x4ad49c);}):_0x41ac9d||_0x853593||_0xa5db1a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x40c127(_0xf7c125,_0x263901){return new window[(_0xa5db1a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x34e4e4=>{if(_0x2c8fd2())return _0x34e4e4(_0xa5db1a([0x56,0x61,0x6c,0x69,0x64]));_0x3efd9c(),_0x3988ba[_0xa5db1a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xa5db1a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x26b31e=!0x1;const _0x8b026e=_0x9d400b();function _0x598ee9(_0x4e7148){return!!_0x4e7148&&(typeof _0x4e7148===_0xa5db1a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4e7148===_0xa5db1a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4e7148[_0xa5db1a([0x74,0x68,0x65,0x6e])]===_0xa5db1a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4e7148[_0xa5db1a([0x63,0x61,0x74,0x63,0x68])]===_0xa5db1a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1aaf52(_0x531a02){_0xedba39(_0x531a02)[_0xa5db1a([0x74,0x68,0x65,0x6e])](_0x46ce12=>{if(!_0x46ce12||_0x46ce12[_0xa5db1a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xa5db1a([0x6f,0x6b]))return _0xa5db1a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x9badb9(_0x3b8dac(_0x8b026e+_0x263901))!=_0x46ce12[_0xa5db1a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xa5db1a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xa5db1a([0x56,0x61,0x6c,0x69,0x64]);})[_0xa5db1a([0x74,0x68,0x65,0x6e])](_0x5c6e1c=>(_0x9b605b(),_0x5c6e1c),()=>{const _0x2a6b7e=_0x223795();return null==_0x2a6b7e?(_0x9b605b(),_0xa5db1a([0x56,0x61,0x6c,0x69,0x64])):_0xa5db1a(_0x502cc8-_0x2a6b7e>(0x652f69e9^_0x4321b9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xa5db1a([0x74,0x68,0x65,0x6e])](_0x34e4e4)[_0xa5db1a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x34e4e4(_0xa5db1a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1a8fdc=0x41150369^_0x4321b9;function _0x9b605b(){const _0x5204cc=_0xa5db1a([0x6c,0x6c,0x63,0x74,0x2d])+_0x9badb9(_0x3b8dac(_0xf7c125)),_0x35ef2c=_0x33d302(_0x9badb9(window[_0xa5db1a([0x4d,0x61,0x74,0x68])][_0xa5db1a([0x63,0x65,0x69,0x6c])](_0x502cc8/_0x1a8fdc)));window[_0xa5db1a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xa5db1a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5204cc,_0x35ef2c);}function _0x223795(){const _0x1e7718=_0xa5db1a([0x6c,0x6c,0x63,0x74,0x2d])+_0x9badb9(_0x3b8dac(_0xf7c125)),_0x451709=window[_0xa5db1a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xa5db1a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1e7718);return _0x451709?window[_0xa5db1a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x33d302(_0x451709),0x10)*_0x1a8fdc:null;}function _0xedba39(_0x5a6e6b){return new window[(_0xa5db1a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x6028c2,_0x2dba4e)=>{_0x5a6e6b[_0xa5db1a([0x74,0x68,0x65,0x6e])](_0x6028c2,_0x2dba4e),window[_0xa5db1a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2dba4e,0x41223929^_0x4321b9);});}}_0x3988ba[_0xa5db1a([0x6f,0x6e])](_0xa5db1a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x312a85,_0x11931f)=>{if(_0x11931f[0x0]!=_0xf7c125)return _0x34e4e4(_0xa5db1a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x11931f[0x1]={..._0x11931f[0x1],[_0xa5db1a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x8b026e};},{[_0xa5db1a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xa5db1a([0x68,0x69,0x67,0x68])}),_0x3988ba[_0xa5db1a([0x6f,0x6e])](_0xa5db1a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xf624d5=>{_0x598ee9(_0xf624d5[_0xa5db1a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x26b31e=!0x0,_0x1aaf52(_0xf624d5[_0xa5db1a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xa5db1a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xa5db1a([0x6c,0x6f,0x77])}),_0x47a0ea[_0xa5db1a([0x74,0x68,0x65,0x6e])](()=>{_0x26b31e||_0x34e4e4(_0xa5db1a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2c8fd2(){return _0x3988ba[_0xa5db1a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa5db1a([0x76,0x69,0x65,0x77])][_0xa5db1a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xa5db1a([0x61,0x75,0x74,0x6f]);}function _0x3efd9c(){_0x3988ba[_0xa5db1a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa5db1a([0x76,0x69,0x65,0x77])][_0xa5db1a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xa5db1a([0x61,0x75,0x74,0x6f]);}}function _0x45c6c7(_0x3b273c){const _0x514c5b=[new window[(_0xa5db1a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ac3d4=>setTimeout(_0x2ac3d4,0x412ad325^_0x4321b9)),_0x47a0ea[_0xa5db1a([0x74,0x68,0x65,0x6e])](()=>new window[(_0xa5db1a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b294b=>{let _0x3fa21d=0x0;_0x3988ba[_0xa5db1a([0x6d,0x6f,0x64,0x65,0x6c])][_0xa5db1a([0x6f,0x6e])](_0xa5db1a([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x361491,_0x423ea1)=>{_0x423ea1[0x0][_0xa5db1a([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3fa21d++,_0x3fa21d==(0x4123ec11^_0x4321b9)&&(_0x4b294b(),_0x361491[_0xa5db1a([0x6f,0x66,0x66])]());});}))];return window[_0xa5db1a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xa5db1a([0x72,0x61,0x63,0x65])](_0x514c5b)[_0xa5db1a([0x74,0x68,0x65,0x6e])](()=>_0x3b273c);}async function _0x1fc109(){await _0x47a0ea,_0x3988ba[_0xa5db1a([0x6d,0x6f,0x64,0x65,0x6c])][_0xa5db1a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x9c2c43,_0x3988ba[_0xa5db1a([0x6d,0x6f,0x64,0x65,0x6c])][_0xa5db1a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x9c2c43,_0x3988ba[_0xa5db1a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xa5db1a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2d10c1(){return _0x37fe23(_0xa5db1a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4afcde(_0xa5db1a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xa5db1a([0x73,0x74,0x61,0x74,0x65])]==_0xa5db1a([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x9aa29f(){return _0x37fe23(_0xa5db1a([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 _0x1589cf(){return _0x37fe23(_0xa5db1a([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x539d5b(_0x246d2c){const _0x46f1da=_0x17812f();_0x3988ba[_0x46f1da]=_0xa5db1a([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x246d2c,_0x246d2c!=_0xa5db1a([0x56,0x61,0x6c,0x69,0x64])&&_0x1fc109();}function _0x17812f(){const _0x38bb67=window[_0xa5db1a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xa5db1a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xa5db1a([0x6e,0x6f,0x77])]())[_0xa5db1a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xa5db1a([0x2e]),'');let _0x2a41a7=_0xa5db1a([0x4b]);for(let _0x48d426=0x0;_0x48d426<_0x38bb67[_0xa5db1a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x48d426+=0x2){let _0x44d10d=window[_0xa5db1a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x38bb67[_0xa5db1a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x48d426,_0x48d426+0x2));_0x44d10d>=_0x228133[_0xa5db1a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x44d10d-=_0x228133[_0xa5db1a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2a41a7+=_0x228133[_0x44d10d];}return _0x2a41a7;}function _0x2fdaec(){const _0x1ed809=_0x176ed6[_0xa5db1a([0x73,0x70,0x6c,0x69,0x74])](_0xa5db1a([0x2e]));if(0x3!=_0x1ed809[_0xa5db1a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5ebd5a(_0x1ed809[0x1]);function _0x5ebd5a(_0x1ed7e2){const _0x33f596=_0x218cc0(_0x1ed7e2);return _0x33f596&&_0x411237()?_0x33f596:null;function _0x411237(){const _0x34bd96=_0x33f596[_0xa5db1a([0x6a,0x74,0x69])],_0x250455=window[_0xa5db1a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34bd96[_0xa5db1a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x34bd96[_0xa5db1a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x39601f={..._0x33f596,[_0xa5db1a([0x6a,0x74,0x69])]:_0x34bd96[_0xa5db1a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x34bd96[_0xa5db1a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x39601f[_0xa5db1a([0x76,0x63])],_0x3b8dac(_0x39601f)==_0x250455;}}}async function _0x1a3462(){let _0x50067e=!0x0;try{const _0x318085=_0x176ed6[_0xa5db1a([0x73,0x70,0x6c,0x69,0x74])](_0xa5db1a([0x2e])),[_0x15aaa7,_0x285644,_0x2bda9e]=_0x318085;return _0x3b2290(_0x15aaa7),await _0x3cc4f3(_0x15aaa7,_0x285644,_0x2bda9e),_0x50067e;}catch{return!0x1;}function _0x3b2290(_0x34ad1f){const _0x890cc7=_0x218cc0(_0x34ad1f);_0x890cc7&&_0x890cc7[_0xa5db1a([0x61,0x6c,0x67])]==_0xa5db1a([0x45,0x53,0x32,0x35,0x36])||(_0x50067e=!0x1);}async function _0x3cc4f3(_0x5f0c69,_0x5c7ee2,_0x2f38a1){const _0x3262bf=window[_0xa5db1a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xa5db1a([0x66,0x72,0x6f,0x6d])](_0x204c04(_0x2f38a1),_0x1d8cc7=>_0x1d8cc7[_0xa5db1a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3c2aab=new window[(_0xa5db1a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xa5db1a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5f0c69+_0xa5db1a([0x2e])+_0x5c7ee2),_0x23fae2=window[_0xa5db1a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xa5db1a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x23fae2)return;const _0x1f9655=await _0x23fae2[_0xa5db1a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xa5db1a([0x6a,0x77,0x6b]),_0x1b5610,{[_0xa5db1a([0x6e,0x61,0x6d,0x65])]:_0xa5db1a([0x45,0x43,0x44,0x53,0x41]),[_0xa5db1a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xa5db1a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xa5db1a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x23fae2[_0xa5db1a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xa5db1a([0x6e,0x61,0x6d,0x65])]:_0xa5db1a([0x45,0x43,0x44,0x53,0x41]),[_0xa5db1a([0x68,0x61,0x73,0x68])]:{[_0xa5db1a([0x6e,0x61,0x6d,0x65])]:_0xa5db1a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1f9655,_0x3262bf,_0x3c2aab)||(_0x50067e=!0x1);}}function _0x218cc0(_0x3d1c4a){return _0x3d1c4a[_0xa5db1a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xa5db1a([0x65,0x79]))?JSON[_0xa5db1a([0x70,0x61,0x72,0x73,0x65])](_0x204c04(_0x3d1c4a)):null;}function _0x204c04(_0x3965ff){return window[_0xa5db1a([0x61,0x74,0x6f,0x62])](_0x3965ff[_0xa5db1a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xa5db1a([0x2b]))[_0xa5db1a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xa5db1a([0x2f])));}function _0x3b8dac(_0xebd823){let _0x5b6da8=0x1505;function _0x4efd9c(_0x243ad3){for(let _0x217444=0x0;_0x217444<_0x243ad3[_0xa5db1a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x217444++){const _0x21e6ca=_0x243ad3[_0xa5db1a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x217444);_0x5b6da8=(_0x5b6da8<<0x5)+_0x5b6da8+_0x21e6ca,_0x5b6da8&=_0x5b6da8;}}function _0x3c8e21(_0x2f3974){Array[_0xa5db1a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2f3974)?_0x2f3974[_0xa5db1a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3c8e21):_0x2f3974&&typeof _0x2f3974==_0xa5db1a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xa5db1a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2f3974)[_0xa5db1a([0x73,0x6f,0x72,0x74])]()[_0xa5db1a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2de8ea,_0x29de5a])=>{_0x4efd9c(_0x2de8ea),_0x3c8e21(_0x29de5a);}):_0x4efd9c(window[_0xa5db1a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2f3974));}return _0x3c8e21(_0xebd823),_0x5b6da8>>>0x0;}function _0x9badb9(_0x445911){return _0x445911[_0xa5db1a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xa5db1a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xa5db1a([0x30]));}function _0x33d302(_0x47c6d0){return _0x47c6d0[_0xa5db1a([0x73,0x70,0x6c,0x69,0x74])]('')[_0xa5db1a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xa5db1a([0x6a,0x6f,0x69,0x6e])]('');}function _0x37fe23(_0x381dda){return _0x3988ba[_0xa5db1a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xa5db1a([0x68,0x61,0x73])](_0x381dda);}function _0x4afcde(_0x41044e){return _0x3988ba[_0xa5db1a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xa5db1a([0x67,0x65,0x74])](_0x41044e);}function _0x9c2c43(){}function _0xa5db1a(_0x449cb6){return _0x449cb6['map'](_0xa66767=>String['fromCharCode'](_0xa66767))['join']('');}_0x539d5b(await _0x5de169());}(this);}['destroy'](){const _0x510253=this['editor']['plugins']['get'](o),_0x57e774=this['editor']['config']['get']('collaboration.channelId');for(const _0x3bc24e of _0x510253['getCommentThreads']({'channelId':_0x57e774}))_0x510253['_detachCommentThread'](_0x3bc24e['id']),_0x510253['_threads']['delete'](_0x3bc24e['id']);super['destroy']();}['hasMarkerForId'](_0x4bb0b4){return this['getAllMarkersForId'](_0x4bb0b4)['length']>0x0;}['getAllMarkersForId'](_0x57e2ba){const _0x42e9a4=[];for(const _0xa5ad48 of this['editor']['model']['markers'])_0xa5ad48['name']['startsWith']('comment:'+_0x57e2ba)&&_0x42e9a4['push'](_0xa5ad48);return _0x42e9a4;}['scrollToThreadMarker'](_0x5f076e){const _0x5656aa=this['_getTargetForId'](_0x5f076e);_0x5656aa&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x5f076e&&rt({'target':_0x5656aa[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x13493c){this['editor']['model']['change'](()=>{for(const _0x39a8fb of this['getAllMarkersForId'](_0x13493c))this['editor']['editing']['reconvertMarker'](_0x39a8fb);});}['_attachArchivedThread'](_0x384199){const _0x1854a1=this['editor']['plugins']['get'](o),_0x3d981c=this['editor']['plugins']['get'](P),_0x58cad9=_0x1854a1['getCommentThread'](_0x384199);if(!_0x58cad9['isAttached']){const _0x47c11c=_0x58cad9['attachTo'](()=>this['_getTargetForId'](_0x58cad9['id']));_0x3d981c['registerAnnotation'](_0x47c11c),_0x58cad9['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1a7245=this['editor'],_0x11c049=_0x1a7245['plugins']['get'](it);_0x1a7245['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x429f36,_0x4a17e9)=>{const {id:_0xa9caa0}=er(_0x429f36['markerName']),_0x54801c=_0x1a7245['plugins']['get'](o)['getCommentThread'](_0xa9caa0),_0x44e3c1=this['activeMarker']&&er(this['activeMarker'])['id']===_0xa9caa0;let _0x503243;if(_0x54801c&&_0x54801c['isResolved']&&!_0x44e3c1&&_0x429f36['item'])return _0x4a17e9['consumable']['consume'](_0x429f36['item'],'addMarker:'+_0x429f36['markerName']),_0x4a17e9['consumable']['consume'](_0x429f36['item'],'removeMarker:'+_0x429f36['markerName']),null;const _0x2b2ce=['ck-comment-marker'];return _0x44e3c1&&_0x2b2ce['push']('ck-comment-marker--active'),_0x503243=_0x54801c?.['length']?_0x54801c['comments']['first']['author']['id']:_0x11c049['me']['id'],{'classes':_0x2b2ce,'attributes':{'data-comment':_0xa9caa0,'data-author-id':_0x503243}};}}),_0x1a7245['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1933e9,{options:_0x2c010b})=>{if(_0x2c010b['showCommentHighlights'])return null;const _0x357e93=_0x1a7245['plugins']['get'](o),_0x28daa0=_0x1a7245['model']['markers']['get'](_0x1933e9),{id:_0x112cfd,part:_0x2d98fd}=er(_0x1933e9);return _0x28daa0&&!_0x28daa0['affectsData']||_0x2c010b['ignoreResolvedComments']&&_0x357e93['getCommentThread'](_0x112cfd)?.['isResolved']?null:{'group':'comment','name':_0x2d98fd?_0x112cfd+':'+_0x2d98fd:_0x112cfd};}}),_0x1a7245['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x43bf1a,{writer:_0x4196d7})=>_0x4196d7['createElement']('$marker',{'data-name':'comment:'+_0x43bf1a['getAttribute']('id')})}),_0x1a7245['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x27290b=this['editor'],_0xf3c6a9=_0x27290b['plugins']['get'](o),_0x124cdd=new Set(),_0x357501=new Set();_0x27290b['model']['document']['registerPostFixer'](_0x5698ff=>{let _0x32bfe5=!0x1;for(const {name:_0x38cca1,data:_0x35bc0b}of _0x27290b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1b2613,id:_0x4c5b13}=er(_0x38cca1);let _0x52e315=_0x35bc0b['newRange'];if('comment'!==_0x1b2613||!_0x52e315)continue;const _0x448f83='$graveyard'===_0x52e315['root']['rootName'];_0x448f83||(_0x52e315=dt(_0x52e315,_0x27290b['model']),!_0x52e315||_0x52e315['isCollapsed']||!_0x35bc0b['newRange']||_0x52e315['isEqual'](_0x35bc0b['newRange']))?_0x27290b['model']['hasContent'](_0x52e315)&&!_0x448f83?this['isThreadsLoadingPaused']?_0x124cdd['add'](_0x38cca1):this['_handleThreadMarker'](_0x38cca1,_0x4c5b13):(_0x357501['add'](_0x38cca1),_0x124cdd['delete'](_0x38cca1),_0x5698ff['removeMarker'](_0x38cca1),_0x32bfe5=!0x0):(_0x5698ff['updateMarker'](_0x38cca1,{'range':_0x52e315}),_0x32bfe5=!0x0);}return _0x32bfe5;}),this['on']('change:isThreadsLoadingPaused',(_0x160837,_0x6956e,_0x11a2c7)=>{if(!_0x11a2c7&&_0x124cdd['size'])for(const _0x3b1fef of _0x124cdd){const {id:_0x43429a}=er(_0x3b1fef);_0x124cdd['delete'](_0x3b1fef),_0x27290b['model']['markers']['get'](_0x3b1fef)&&this['_handleThreadMarker'](_0x3b1fef,_0x43429a);}}),this['listenTo'](_0x27290b['model']['document'],'change',()=>{for(const {name:_0x4141ea,data:{newRange:_0x3a9a4d}}of _0x27290b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x389ad4,id:_0x3c2873}=er(_0x4141ea);if('comment'!==_0x389ad4)continue;const _0x1637c6=_0xf3c6a9['getCommentThread'](_0x3c2873),_0x1fea0a=this['hasMarkerForId'](_0x3c2873);_0x1637c6&&(!_0x1637c6['_hasTargetInContent']&&_0x3a9a4d&&_0x27290b['editing']['view']['once']('render',()=>{const _0x51fece=_0x27290b['plugins']['get'](O),_0x5b8b84=_0xf3c6a9['_threadToController']['get'](_0x1637c6)['view'];_0x51fece['getByInnerView'](_0x5b8b84)['refreshVisibility']();},{'priority':'low'}),_0x1637c6['_hasTargetInContent']=_0x1fea0a||!!_0x3a9a4d),_0x3a9a4d||(_0x357501['add'](_0x4141ea),_0x124cdd['delete'](_0x4141ea));}for(const _0x5e97bd of _0x357501){const {id:_0x2b4a3b}=er(_0x5e97bd),_0x347c2d=_0xf3c6a9['getCommentThread'](_0x2b4a3b);if(_0x124cdd['delete'](_0x5e97bd),!_0x347c2d)continue;const _0x59045c=this['hasMarkerForId'](_0x2b4a3b);_0x59045c||_0x347c2d['isSubmitted']?_0x59045c||_0x347c2d['unlinkedAt']||_0x347c2d['setUnlinkedAt'](new Date()):_0x347c2d['remove']();}_0x357501['clear']();});}['_handleInitialThreads'](_0x9f2b78){_0x9f2b78['forEach'](_0x1596ff=>{_0x1596ff['unlinkedAt']&&this['_attachArchivedThread'](_0x1596ff['id']);});}['_getTargetForId'](_0x46d05f){const _0x2d8a4b=this['editor'],_0x2f947c=this['getAllMarkersForId'](_0x46d05f);return et(_0x2d8a4b['editing'],_0x2f947c);}['_getTextContext'](_0x31eba3){const _0x329a3a=this['getAllMarkersForId'](_0x31eba3);let _0x2d45a0='',_0x314db1=!0x1;for(const _0xa73ba9 of _0x329a3a){const _0x57ab53=_0xa73ba9['getRange']();for(const _0xff2771 of Array['from'](_0x57ab53['getItems']()))_0xff2771['is']('$textProxy')?(_0x2d45a0&&_0x314db1&&(_0x2d45a0+='\x20',_0x314db1=!0x1),_0x2d45a0+=_0xff2771['data']):_0x314db1=!0x0;_0x314db1=!0x0;}return _0x2d45a0['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xa8bf1e,_0x12e993){const _0x7de15=this['editor'],_0x193efa=_0x7de15['plugins']['get'](o);let _0x2f68f9=_0x193efa['getCommentThread'](_0x12e993);const _0x2c04b4=_0x7de15['config']['get']('collaboration.channelId'),_0x1792e3=_0x7de15['plugins']['get'](P);if(_0x2f68f9&&(_0x2f68f9['unlinkedAt']&&_0x2f68f9['setUnlinkedAt'](null),_0x2f68f9['isAttached']))return _0x2f68f9;return!this['getAllMarkersForId'](_0x12e993)[0x0]['managedUsingOperations']?_0x7de15['editing']['view']['once']('render',()=>{if(_0x193efa['getCommentThread'](_0x12e993))return;const _0x3bf14c=_0x7de15['plugins']['get'](O);_0x2f68f9=_0x193efa['openNewCommentThread']({'channelId':_0x2c04b4,'threadId':_0x12e993,'target':()=>this['_getTargetForId'](_0x12e993),'context':{'type':'text','value':this['_getTextContext'](_0x12e993)}});const _0x4ce434=_0x193efa['_threadToController']['get'](_0x2f68f9)['view'],_0x45fa1a=_0x3bf14c['getByInnerView'](_0x4ce434);_0x45fa1a&&_0x1792e3['registerAnnotation'](_0x45fa1a);},{'priority':'low'}):_0x193efa['fetchCommentThread']({'channelId':_0x2c04b4,'threadId':_0x12e993})['then'](_0x5ced62=>{if('destroyed'!==_0x7de15['state']){if(_0x2f68f9=_0x5ced62,_0x2f68f9&&!_0x2f68f9['isAttached']){const _0x2fed1e=_0x2f68f9['attachTo'](()=>this['_getTargetForId'](_0x12e993));_0x1792e3['registerAnnotation'](_0x2fed1e),_0x2f68f9['isResolved']&&this['_reconvertMarkers'](_0x12e993);}else{if(!_0x2f68f9){const _0x46c30f=this['getAllMarkersForId'](_0x12e993);_0x7de15['model']['change'](_0x17d8a0=>{for(const _0x328223 of _0x46c30f)_0x17d8a0['removeMarker'](_0x328223);});}}}}),_0x2f68f9;}['_handleThreadMarker'](_0x3d7f29,_0x4377f8){const _0x38fd95=this['_attachMarkerToThread'](_0x3d7f29,_0x4377f8);_0x38fd95&&!_0x38fd95['context']&&_0x38fd95['setContext']({'type':'text','value':this['_getTextContext'](_0x4377f8)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1e2f91=this['editor'];ot(_0x1e2f91['model'],({left:_0x45e527,entered:_0x13a048})=>{for(const _0x4d5343 of _0x45e527)if(mt(_0x4d5343)){_0x1e2f91['ui']['ariaLiveAnnouncer']['announce'](E(_0x1e2f91['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x49e512 of _0x13a048)if(mt(_0x49e512)){_0x1e2f91['ui']['ariaLiveAnnouncer']['announce'](E(_0x1e2f91['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x37b951)));break;}});}}function ft(_0x3c616e,_0x461fa4){return _0x461fa4?_0x3c616e+':'+_0x461fa4:_0x3c616e;}function er(_0x526bed){const _0x130013=_0x526bed['split'](':');return{'group':_0x130013[0x0],'id':_0x130013[0x1],'part':_0x130013[0x2]};}function dt(_0x2df2a1,_0x40f90a){const _0x168421=_0x40f90a['schema'],_0x46e253=_0x40f90a['createRange'](_0x2df2a1['start']);for(const _0x2631f9 of _0x2df2a1['getWalker']()){const {type:_0xb459b1,item:_0x3f726c,nextPosition:_0x41d4a0}=_0x2631f9;if('text'===_0xb459b1||_0x168421['isObject'](_0x3f726c)){const _0x100789=_0x40f90a['createPositionBefore'](_0x3f726c);_0x46e253['isCollapsed']&&(_0x46e253['start']=_0x100789),_0x46e253['end']=_0x41d4a0;}}return _0x46e253;}function mt(_0x47fd12){return'comment'===er(_0x47fd12['name'])['group'];}class i extends _0x17ed19{['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 _0x22fbd0=this['editor'],_0x93bb66=_0x22fbd0['plugins']['get'](o),_0x4d44a9=_0x22fbd0['plugins']['get'](r),_0x584ba5=_0x22fbd0['plugins']['get'](O),_0x268609=_0x22fbd0['plugins']['get'](P);_0x22fbd0['ui']['componentFactory']['add']('comment',()=>{const _0x3a3e86=this['_createUIButton'](_0x31f757);return _0x3a3e86['tooltip']=!0x0,_0x3a3e86;}),_0x22fbd0['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x405369)),_0x268609['addSourceCollector'](()=>{const _0x310faf=[];for(const [_0x4f234d,_0x59c299]of _0x93bb66['_threadToController']){const _0x1cd8ff=_0x4d44a9['getAllMarkersForId'](_0x4f234d['id']),_0x5b7774=_0x1cd8ff['map'](_0x443723=>_0x443723['getRange']());_0x1cd8ff['length']>0x0&&_0x310faf['push']([_0x59c299['view'],_0x5b7774]);}return _0x310faf;}),this['listenTo'](_0x584ba5,'change:activeAnnotations',(_0xf4dda8,_0x2f12db,_0x59683e)=>{const _0x55ca9e=Array['from'](_0x59683e)['map'](_0x15fc3d=>_0x15fc3d['innerView'])['find'](_0x487796=>_0x93bb66['_viewToController']['has'](_0x487796));if(!_0x55ca9e)return void(_0x4d44a9['activeMarker']=null);const _0x25b325=_0x93bb66['_viewToController']['get'](_0x55ca9e)['model']['id'],_0xb7d530='comment:'+_0x25b325;_0x25b325&&_0x4d44a9['hasMarkerForId'](_0x25b325)?_0x4d44a9['activeMarker']=_0xb7d530:_0x4d44a9['activeMarker']&&(_0x4d44a9['activeMarker']=null);}),this['listenTo'](_0x93bb66,'removeCommentThread',(_0x544cab,{threadId:_0x3d844c,isFromAdapter:_0x4cf185})=>{!_0x4cf185&&_0x22fbd0['ui']['focusTracker']['isFocused']&&_0x4d44a9['hasMarkerForId'](_0x3d844c)&&_0x22fbd0['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x93bb66,'addComment',(_0x5a3e7d,{threadId:_0x16ba59,isFromAdapter:_0xf354c6})=>{if(_0xf354c6||!_0x4d44a9['hasMarkerForId'](_0x16ba59)||!_0x93bb66['hasCommentThread'](_0x16ba59))return;0x1===_0x93bb66['getCommentThread'](_0x16ba59)['length']&&(_0x22fbd0['editing']['view']['focus'](),_0x5a3e7d['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x421523=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5c414a;for(const _0x5f0646 in _0x421523){const _0x193243=_0x5f0646,_0x2b3945=_0x421523[_0x193243];if('commentsLicenseKeyValid'==_0x2b3945||'commentsLicenseKeyInvalid'==_0x2b3945||'commentsLicenseKeyExpired'==_0x2b3945||'commentsLicenseKeyDomainLimit'==_0x2b3945||'commentsLicenseKeyNotAllowed'==_0x2b3945||'commentsLicenseKeyEvaluationLimit'==_0x2b3945||'commentsLicenseKeyTrialLimit'==_0x2b3945||'commentsLicenseKeyUsageLimit'==_0x2b3945){delete _0x421523[_0x193243],_0x5c414a=_0x2b3945,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x5c414a&&_0x421523['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x5c414a&&_0x421523['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x5c414a&&_0x421523['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x5c414a&&_0x421523['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x5c414a&&_0x421523['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x5c414a&&_0x421523['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x5c414a&&_0x421523['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2dd44f){const _0x246d7d=this['editor'],_0x5244e4=new _0x2dd44f(_0x246d7d['locale']),_0x2004ef=_0x246d7d['commands']['get']('addCommentThread');return _0x5244e4['set']({'label':E(_0x246d7d['locale'],'Comment'),'icon':_0x2fbfc4}),_0x5244e4['bind']('isEnabled')['to'](_0x2004ef),this['listenTo'](_0x5244e4,'execute',()=>{_0x2004ef['execute']();}),_0x5244e4;}}class s extends _0x17ed19{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x41da26){super(_0x41da26),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xad13b,_0x586bfa,_0xb162bd)=>{_0xb162bd?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x5effda,_0x3616d9]of this['editor']['commands'])_0x3616d9['affectsData']&&'addCommentThread'!==_0x5effda&&_0x3616d9['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 _0x5306e=this['editor']['editing']['view']['document'];this['listenTo'](_0x5306e,'cut',_0x3e09a8=>_0x3e09a8['stop'](),{'priority':'highest'}),this['listenTo'](_0x5306e,'clipboardInput',_0x28acb9=>_0x28acb9['stop'](),{'priority':'highest'}),this['listenTo'](_0x5306e,'delete',_0xf6a109=>_0xf6a109['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2c5695,_0x33bbb4]of this['editor']['commands'])_0x33bbb4['affectsData']&&'addCommentThread'!==_0x2c5695&&_0x33bbb4['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 _0x3dc007{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x201196){super(_0x201196),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x385f7e=this['context']['plugins']['get'](O);this['listenTo'](_0x385f7e,'_activateAnnotation',(_0x328880,_0x402aeb)=>{for(const _0x4ed691 of this['activeUIs']){const _0x37c6d8=this['_uis']['get'](_0x4ed691);(0x0,this['uisData']['get'](_0x4ed691)['filter'])(_0x402aeb)&&_0x37c6d8['setActiveAnnotation'](_0x402aeb);}}),this['listenTo'](_0x385f7e,'_deactivateAllAnnotations',()=>{for(const _0xc67a3 of this['activeUIs']){this['_uis']['get'](_0xc67a3)['setActiveAnnotation'](null);}}),this['listenTo'](_0x385f7e['_visibleAnnotations'],'add',(_0x595d2d,_0x3e308a)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3e308a);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3457b4){return this['activeUIs']['has'](_0x3457b4);}['activate'](_0x11fb3f,_0x518f42=this['defaultFilter']){const _0x21cf06=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x11fb3f))throw new _0x39e81a('annotationsuis-missing-ui',this,{'uiName':_0x11fb3f});this['isActive'](_0x11fb3f)&&this['deactivate'](_0x11fb3f),this['activeUIs']['add'](_0x11fb3f);const _0x36632f=new _();!function({source:_0x143e06,target:_0x112f36,filter:_0x2f5247}){for(const _0x15de6e of _0x143e06)_0x2f5247(_0x15de6e)&&_0x112f36['add'](_0x15de6e);_0x112f36['listenTo'](_0x143e06,'add',(_0x3987e3,_0x4340af)=>{_0x2f5247(_0x4340af)&&_0x112f36['add'](_0x4340af);}),_0x112f36['listenTo'](_0x143e06,'remove',(_0x51d1d7,_0x36fed9)=>{_0x112f36['has'](_0x36fed9)&&_0x112f36['remove'](_0x36fed9);});}({'source':_0x21cf06['_visibleAnnotations'],'target':_0x36632f,'filter':_0x518f42}),this['uisData']['set'](_0x11fb3f,{'collection':_0x36632f,'filter':_0x518f42});const _0x87b6d1=this['_uis']['get'](_0x11fb3f);_0x87b6d1['attach'](_0x36632f),this['listenTo'](_0x87b6d1,'change:activeAnnotation',(_0x1e6c6b,_0x25eb9f,_0x566017,_0x3d7371)=>{_0x3d7371&&_0x21cf06['_removeActiveAnnotation'](_0x3d7371),_0x566017&&_0x21cf06['_addActiveAnnotation'](_0x566017);});}['deactivate'](_0xdac71d){if(this['activeUIs']['delete'](_0xdac71d),!this['_uis']['has'](_0xdac71d))throw new _0x39e81a('annotationsuis-missing-ui',this,{'uiName':_0xdac71d});const _0x51fc0f=this['_uis']['get'](_0xdac71d);_0x51fc0f['detach'](),this['stopListening'](_0x51fc0f),this['uisData']['get'](_0xdac71d)['collection']['destroy'](),this['uisData']['delete'](_0xdac71d);}['switchTo'](_0x37d566){if(!this['_uis']['has'](_0x37d566))throw new _0x39e81a('annotationsuis-missing-ui',this,{'uiName':_0x37d566});const _0x3fda6d=this['context']['plugins']['get'](O),_0x56fb1a=Array['from'](_0x3fda6d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x37d566);const _0x3f3318=this['_uis']['get'](_0x37d566);_0x3f3318['setActiveAnnotation'](_0x56fb1a),_0x3f3318['_setSelectedAnnotations']&&_0x56fb1a&&_0x3f3318['_setSelectedAnnotations']([_0x56fb1a]);}['deactivateAll'](){for(const _0x51d815 of this['activeUIs'])this['deactivate'](_0x51d815);}['register'](_0x2a54da,_0xf107f9){if(this['_uis']['has'](_0x2a54da))throw new _0x39e81a('annotationsuis-register-already-registered');if('function'!=typeof _0xf107f9['attach']||'function'!=typeof _0xf107f9['detach']||'function'!=typeof _0xf107f9['setActiveAnnotation'])throw new _0x39e81a('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2a54da,_0xf107f9);}['refilterAnnotations'](){const _0x5b2194=this['context']['plugins']['get'](O)['collection'],_0x2e4ca6=new Map(),_0x4e61a9=Array['from'](this['activeUIs']);for(const _0x142ec6 of this['activeUIs']){const _0x1ace26=this['uisData']['get'](_0x142ec6)['collection'];for(const _0x39e6ba of _0x1ace26)_0x2e4ca6['set'](_0x39e6ba,_0x142ec6);}for(const _0x2adf0c of _0x5b2194){const _0x18b2fe=_0x2e4ca6['get'](_0x2adf0c);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2adf0c);const _0x4b9c3c=_0x4e61a9['find'](_0x2686ed=>this['uisData']['get'](_0x2686ed)['filter'](_0x2adf0c));_0x18b2fe!==_0x4b9c3c&&(_0x18b2fe&&this['uisData']['get'](_0x18b2fe)['collection']['remove'](_0x2adf0c),_0x4b9c3c&&this['uisData']['get'](_0x4b9c3c)['collection']['add'](_0x2adf0c));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1b8172){const _0x15c95a=[];for(const _0x12f5a3 of this['activeUIs']){(0x0,this['uisData']['get'](_0x12f5a3)['filter'])(_0x1b8172)&&_0x15c95a['push'](_0x12f5a3);}if(_0x15c95a['length']>0x1)throw new _0x39e81a('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x15c95a,'annotationType':_0x1b8172['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4adeec){super(_0x4adeec);const _0x5b59ca=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 _0x28a20a(),this['focusCycler']=new _0x61476c({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5b59ca['to']('class')],'style':{'minHeight':_0x5b59ca['to']('minHeight',_0x15e89e=>'number'==typeof _0x15e89e?pi(_0x15e89e+0xa):null)},'dir':_0x4adeec['uiLanguageDirection'],'role':'application','aria-label':E(_0x4adeec,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x4adeec,'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',_0x5516f5=>{this['_updateItemPositionInFocusables'](_0x5516f5['source']);}),this['list']['forEach'](_0x10d0a3=>{this['focusTracker']['add'](_0x10d0a3['element']),this['_updateItemPositionInFocusables'](_0x10d0a3);}),this['list']['on']('change',(_0x80b90,_0xe2c361)=>{for(const _0x582d28 of _0xe2c361['removed'])this['focusTracker']['remove'](_0x582d28['element']),this['focusables']['remove'](_0x582d28);for(const _0x59a456 of _0xe2c361['added'])this['focusTracker']['add'](_0x59a456['element']),this['_updateItemPositionInFocusables'](_0x59a456);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x593a27){const _0x8f58d1=this['focusables']['getIndex'](_0x593a27);let _0x3109fc,_0x563acf;for(const _0x11b5d1 of this['focusables'])if(_0x593a27['top']<_0x11b5d1['top']){_0x3109fc=_0x11b5d1;break;}if(_0x563acf=_0x3109fc?this['focusables']['getIndex'](_0x3109fc):this['focusables']['length'],-0x1!==_0x8f58d1){if(_0x8f58d1===_0x563acf-0x1)return;this['focusables']['remove'](_0x593a27),_0x563acf=_0x3109fc?this['focusables']['getIndex'](_0x3109fc):this['focusables']['length'];}this['focusables']['add'](_0x593a27,_0x563acf);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1c5c8a){super(_0x1c5c8a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x52e1a0,_0x5a52b4)=>_0x52e1a0+_0x5a52b4),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x51b6b7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x51b6b7['to']('isAnimationDisabled',_0x1dd19f=>_0x1dd19f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x51b6b7['to']('top',_0x1d84a5=>Ht(_0x1d84a5))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x45c33d=this['element']['clientHeight'];_0x45c33d&&(this['height']=_0x45c33d);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x3dc007{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4b2352){super(_0x4b2352),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 _0x2285c9=this['context']['config']['get']('sidebar.container');_0x2285c9&&this['setContainer'](_0x2285c9);}['setContainer'](_0x2bb4ce){if(!y(_0x2bb4ce))throw new _0x39e81a('sidebar-setcontainer-invalid-element');this['container']=_0x2bb4ce;}['_attachToContainer']({viewClass:_0x2cb83d='',spaceBetweenItems:_0x221b59=0x19}={}){if(!y(this['container']))throw new _0x39e81a('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2cb83d,this['_spaceBetweenItems']=_0x221b59;}['rearrange']({removedAnnotation:_0x4b7d9e,previousAnnotation:_0x1d4556,nextAnnotation:_0x1f62ab}){const _0x59ef17=this['getSidebarItemView'](_0x4b7d9e);this['view']['list']['remove'](_0x59ef17),this['_destroySidebarItemView'](_0x4b7d9e),_0x1d4556&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1d4556)),_0x1f62ab&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1f62ab)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x21accd,activatedAnnotation:_0x564b7e,disableAnimationOnActivatedAnnotation:_0x1ff307}){if(this['_activeAnnotation']=_0x564b7e,_0x21accd){_0x21accd['isActive']=!0x1;const _0x30ce44=this['getSidebarItemView'](_0x21accd);_0x30ce44&&_0x1ff307&&(_0x30ce44['isAnimationDisabled']=!0x1);}if(_0x564b7e){const _0x32f401=this['getSidebarItemView'](_0x564b7e);_0x32f401&&(_0x564b7e['isActive']=!0x0,_0x1ff307&&(_0x32f401['isAnimationDisabled']=!0x0,_0x32f401['top']+=0x1),this['_alignToTargetRect'](_0x32f401));}}['_detachFromContainer'](_0x27bed5){if(this['view']['element']['remove'](),_0x27bed5){for(const _0x380894 of _0x27bed5)this['_destroySidebarItemView'](_0x380894);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1a36f2,_0x4d6c27){_0x4d6c27||(_0x4d6c27=_0x1a36f2['view']);const _0x320b3c=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x320b3c,_0x1a36f2),this['_annotationToSidebarItemView']['set'](_0x1a36f2,_0x320b3c),_0x320b3c['content']['add'](_0x4d6c27),this['listenTo'](_0x1a36f2['view'],'change:targetRect',(_0x3e0485,_0x3c7d20,_0x1cd300)=>{const _0x15ee58=this['_getTargetTop'](_0x1a36f2,_0x1cd300);_0x320b3c['_targetTop']!=_0x15ee58&&(_0x320b3c['_targetTop']=_0x15ee58,this['_setItemTop'](_0x320b3c,_0x15ee58));}),this['listenTo'](_0x320b3c,'change:top',()=>{this['_recalculate'](_0x320b3c,'top');}),this['listenTo'](_0x320b3c,'change:bottom',()=>{this['_recalculate'](_0x320b3c,'bottom');}),this['_alignToTargetRect'](_0x320b3c);const _0x5ce5e6=this['_getItemBefore'](_0x320b3c);if(_0x5ce5e6)this['_alignAfterItem'](_0x5ce5e6,_0x320b3c)||this['_alignToTargetRect'](_0x320b3c);else this['_alignToTargetRect'](_0x320b3c);return this['_updateLastItem'](),this['view']['list']['add'](_0x320b3c),_0x320b3c;}['_alignForTopChange'](_0x2f77d6){if(!_0x2f77d6['content']['length'])return;const _0x59cfb3=this['_getItemBefore'](_0x2f77d6);if(!_0x59cfb3)return;const _0x588ca8=this['_sidebarItemViewToAnnotation']['get'](_0x59cfb3),_0x26358e=this['_activeAnnotation'];_0x26358e&&_0x26358e===_0x588ca8?this['_alignAfterItem'](_0x59cfb3,_0x2f77d6):this['_alignBeforeItem'](_0x2f77d6,_0x59cfb3);}['_alignForBottomChange'](_0x3ed791){if(!_0x3ed791['content']['length'])return;const _0x28ddca=this['_getItemAfter'](_0x3ed791);if(!_0x28ddca)return;const _0x50d7f3=this['_sidebarItemViewToAnnotation']['get'](_0x28ddca),_0x2042b3=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x309c52=this['_activeAnnotation'];_0x309c52&&_0x309c52===_0x50d7f3&&_0x2042b3?(this['_alignBeforeItem'](_0x28ddca,_0x3ed791),this['_alignAfterItem'](_0x3ed791,_0x28ddca)):_0x309c52&&_0x309c52===_0x50d7f3?this['_alignBeforeItem'](_0x28ddca,_0x3ed791):this['_alignAfterItem'](_0x3ed791,_0x28ddca);}['_recalculate'](_0xe9947b,_0x2d2058){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xd251a8,changedProp:_0x890e14}of this['_recalculateBuffer'])'top'===_0x890e14?this['_alignForTopChange'](_0xd251a8):this['_alignForBottomChange'](_0xd251a8);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xe9947b,'changedProp':_0x2d2058});}['getSidebarItemView'](_0x3a6c8e){return this['_annotationToSidebarItemView']['get'](_0x3a6c8e);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x17dff4){const _0x906d38=this['getSidebarItemView'](_0x17dff4);this['stopListening'](_0x906d38),this['stopListening'](_0x17dff4['view']),_0x906d38['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x17dff4),this['_sidebarItemViewToAnnotation']['delete'](_0x906d38);}['_createSidebarView'](){const _0x194339=new F(this['context']['locale']);return _0x194339['render'](),this['on']('change:_lastItem',(_0x26fa21,_0x55f527,_0x5ca621,_0x3acabe)=>{_0x3acabe&&_0x194339['unbind']('minHeight'),_0x5ca621?_0x194339['bind']('minHeight')['to'](_0x5ca621,'bottom'):_0x194339['minHeight']=null;}),_0x194339;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x815904){const _0x1b7cf2=this['_sidebarItemViewToAnnotation']['get'](_0x815904),_0x1e3b7d=_0x1b7cf2&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1b7cf2)-0x1);return _0x1e3b7d&&this['getSidebarItemView'](_0x1e3b7d)||null;}['_getItemAfter'](_0x1f363d){const _0x44abdf=this['_sidebarItemViewToAnnotation']['get'](_0x1f363d),_0x2cd644=_0x44abdf&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x44abdf)+0x1);return _0x2cd644&&this['getSidebarItemView'](_0x2cd644)||null;}['_alignBeforeItem'](_0x79a1f6,_0x5a6c83){_0x79a1f6['updateHeight']();const _0x22cd2a=R(_0x5a6c83['bottom']+this['_spaceBetweenItems'],_0x79a1f6['top']);return!!_0x22cd2a&&(this['_setItemTop'](_0x5a6c83,_0x5a6c83['top']-_0x22cd2a),!0x0);}['_alignAfterItem'](_0x4ef9d6,_0x1e65d2){_0x4ef9d6['updateHeight']();const _0x1240af=R(_0x4ef9d6['bottom']+this['_spaceBetweenItems'],_0x1e65d2['top']);return!!_0x1240af&&(this['_setItemTop'](_0x1e65d2,_0x1e65d2['top']+_0x1240af,!0x1),!0x0);}['_alignToTargetRect'](_0x228028){const _0x24a160=this['_sidebarItemViewToAnnotation']['get'](_0x228028);if(!_0x24a160||!_0x24a160['target']||!_0x24a160['targetRect'])return;const _0x5edab1=this['_getTargetTop'](_0x24a160,_0x24a160['targetRect']);this['_setItemTop'](_0x228028,_0x5edab1);}['_getTargetTop'](_0x1b9f15,_0x51c9ac){if(null===_0x51c9ac)return 0x0;if(_0x1b9f15['target']instanceof _0x3184b7)return _0x51c9ac['top'];{const _0x597466=new _0x3184b7(this['view']['element'])['top'];return _0x51c9ac['top']-_0x597466;}}['_setItemTop'](_0x4d0367,_0x4f31b8,_0x3b2365=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x3b2365&&(_0x4f31b8=Math['max'](_0x4f31b8,this['_getMaxAvailableTop'](_0x4d0367))),_0x4d0367['top']=_0x4f31b8;}['_getMaxAvailableTop'](_0x42ae15){let _0x1ee143=this['_getItemBefore'](_0x42ae15),_0x4cb14d=0x0;for(;_0x1ee143;)_0x1ee143['updateHeight'](),_0x4cb14d+=this['_spaceBetweenItems']+_0x1ee143['height'],_0x1ee143=this['_getItemBefore'](_0x1ee143);return _0x4cb14d;}}function R(_0x12af95,_0x505ae4){return Math['max'](_0x12af95-_0x505ae4,0x0);}function y(_0x31911f){return null!==_0x31911f&&'object'==typeof _0x31911f&&0x1===_0x31911f['nodeType'];}class e extends _0x3dc007{['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(_0x1d0f72){super(_0x1d0f72),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x869a3(),this['_refreshPositioningDebounced']=_0x318dec(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x13b206=this['context']['plugins']['get'](M),_0x50c414=this['context']['plugins']['get'](z);_0x13b206['register']('wideSidebar',this),_0x50c414['container']&&_0x13b206['switchTo']('wideSidebar');}['setActiveAnnotation'](_0xe9cd7){if(_0xe9cd7===this['activeAnnotation'])return;const _0x1ec894=this['context']['plugins']['get'](z);_0x1ec894['_activeAnnotation']=_0xe9cd7;const _0x5e0a5b=this['activeAnnotation'];_0x1ec894['refresh']({'blurredAnnotation':_0x5e0a5b,'activatedAnnotation':_0xe9cd7}),this['activeAnnotation']=_0xe9cd7;}['attach'](_0x3d4678){this['annotations']=_0x3d4678;const _0xcd465=this['context']['plugins']['get'](z);if(_0xcd465['_annotations']=_0x3d4678,this['isAttached'])throw new _0x39e81a('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xcd465,'set:container',()=>{this['detach'](),this['listenTo'](_0xcd465,'change:container',_0x2bcc53=>{_0x2bcc53['off'](),this['attach'](_0x3d4678);});}),_0xcd465['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x217fc8=_0x39368a=>{_0x39368a['updateTargetRect'](),_0xcd465['addAnnotation'](_0x39368a);};for(const _0xccc804 of _0x3d4678)_0x217fc8(_0xccc804);this['listenTo'](_0x3d4678,'add',(_0x23e106,_0x564db5)=>{_0x217fc8(_0x564db5);}),this['listenTo'](_0x3d4678,'remove',(_0x909405,_0x132bdb,_0x53dc5e)=>{_0xcd465['rearrange']({'removedAnnotation':_0x132bdb,'previousAnnotation':_0x3d4678['get'](_0x53dc5e-0x1),'nextAnnotation':_0x3d4678['get'](_0x53dc5e+0x1)}),_0x132bdb===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3d4678,'focus',(_0xdb3e76,_0x505989)=>{this['setActiveAnnotation'](_0x505989);}),this['listenTo'](_0x3d4678,'blur',()=>{this['setActiveAnnotation'](null);});const _0xe2e0fa=this['context']instanceof _0x2dad3b?this['context']['editors']:new _0x869a3([this['context']]);for(const _0x1d1835 of _0xe2e0fa)this['_integrateWithEditorAnnotations'](_0x1d1835);this['listenTo'](_0xe2e0fa,'add',(_0x430b89,_0x2198a0)=>{this['listenTo'](_0x2198a0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2198a0);});}),this['listenTo'](_0xe2e0fa,'remove',(_0x75f9ef,_0x2bf906)=>{_0x2bf906['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2bf906['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x39e81a('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x23b04d=this['context']['plugins']['get'](z);_0x23b04d['_detachFromContainer'](this['annotations']),this['stopListening'](_0x23b04d),this['stopListening'](this['annotations']),this['context']instanceof _0x2dad3b&&this['stopListening'](this['context']['editors']);for(const _0x2cced5 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2cced5);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x208204){if(!_0x208204['plugins']['has']('EditorAnnotations'))return;const _0x54436d=_0x208204['plugins']['get']('EditorAnnotations'),_0x375968=()=>{const _0x12cd13=_0x54436d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x12cd13[0x0]||null);};this['listenTo'](_0x54436d,'refresh',_0x375968),this['listenTo'](_0x54436d,'blur',(_0x79846c,{isAnnotationTracked:_0x4e5271})=>{this['activeAnnotation']&&_0x4e5271(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x54436d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x56e113=>{_0x54436d['hasDomSelection']()&&(_0x375968(),_0x56e113['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x54436d);}['_destroyEditorAnnotationsIntegration'](_0x229428){this['stopListening'](_0x229428),this['_editorAnnotations']['remove'](_0x229428);}}class C extends _0x31f757{['counterView'];constructor(_0x411d25){super(_0x411d25);const _0x536ef0=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0xd448e2,_0x48f843)=>_0xd448e2?'...':_0x48f843['toString']()),this['set']('annotationType',''),this['icon']=_0x2fbfc4,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x536ef0['to']('annotationType',_0x5a7b3a=>'ck-annotation-counter__badge--'+_0x5a7b3a),_0x536ef0['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x536ef0['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x3dc007{['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(_0x4eee01){super(_0x4eee01),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x42642f),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x869a3(),this['_refreshPositioningDebounced']=_0x318dec(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2f2915(this['context']['locale']),this['balloonPanelView']=new _0x185a85(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x43ab7d){this['annotations']=_0x43ab7d;const _0x5b7dae=this['context']['plugins']['get'](z),_0x3eb2ba=this['balloonPanelView'];if(_0x5b7dae['_annotations']=_0x43ab7d,this['isAttached'])throw new _0x39e81a('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5b7dae,'set:container',()=>{this['detach'](),this['listenTo'](_0x5b7dae,'change:container',_0x1c59f7=>{_0x1c59f7['off'](),this['attach'](_0x43ab7d);});}),_0x5b7dae['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x261bc3=_0x3ee5e1=>{const _0x15ca53=new C(this['context']['locale']);_0x5b7dae['addAnnotation'](_0x3ee5e1,_0x15ca53),this['_annotationToNarrowView']['set'](_0x3ee5e1,_0x15ca53),_0x15ca53['bind']('isDirty','annotationType','number')['to'](_0x3ee5e1['view'],'isDirty','type','length'),_0x15ca53['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3eb2ba['content']['first']!==_0x3ee5e1['view']?(this['_showBalloon'](_0x3ee5e1),_0x3ee5e1['view']['element']['focus'](),this['setActiveAnnotation'](_0x3ee5e1)):this['setActiveAnnotation'](null);});};for(const _0xa3436a of _0x43ab7d)_0x261bc3(_0xa3436a);this['listenTo'](_0x43ab7d,'add',(_0x57ac49,_0x4f93c5)=>{_0x261bc3(_0x4f93c5);}),this['listenTo'](_0x43ab7d,'remove',(_0x284b43,_0x1cd2b7,_0x74cf80)=>{this['_annotationToNarrowView']['get'](_0x1cd2b7)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1cd2b7),_0x5b7dae['rearrange']({'removedAnnotation':_0x1cd2b7,'previousAnnotation':_0x43ab7d['get'](_0x74cf80-0x1),'nextAnnotation':_0x43ab7d['get'](_0x74cf80+0x1)}),_0x1cd2b7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x43ab7d,'focus',(_0x15fb54,_0x4ace81)=>{this['setActiveAnnotation'](_0x4ace81);}),this['listenTo'](_0x43ab7d,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x12856c,_0x4908e1)=>{_0x4908e1['keyCode']===_0x41172f['esc']&&_0x3eb2ba['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3eb2ba['content']['first']),this['_hideBalloon'](),_0x4908e1['stopPropagation'](),_0x4908e1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x274be4,_0xefdeab)=>{const _0x391f62=_0xefdeab['target'];_0x3eb2ba['isVisible']&&_0x3eb2ba['element']['contains'](_0x391f62)||_0x5b7dae['view']['element']['contains'](_0x391f62)||_0x274be4['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xa1e7e7=>_0xa1e7e7['contains'](_0x391f62))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x531daa=this['context']instanceof _0x2dad3b?this['context']['editors']:new _0x869a3([this['context']]);for(const _0x436bb8 of _0x531daa)this['_integrateWithEditorAnnotations'](_0x436bb8);this['listenTo'](_0x531daa,'add',(_0x5bf77e,_0x5514cc)=>{this['listenTo'](_0x5514cc,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5514cc);});}),this['listenTo'](_0x531daa,'remove',(_0x49ab13,_0x3cb539)=>{_0x3cb539['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3cb539['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x373fd9){if(_0x373fd9===this['activeAnnotation'])return;const _0x53d26e=this['context']['plugins']['get'](z);if(_0x53d26e['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x373fd9,'disableAnimationOnActivatedAnnotation':!0x0}),_0x373fd9)_0x53d26e['getSidebarItemView'](_0x373fd9)?this['_showBalloon'](_0x373fd9):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x373fd9;}['detach'](){if(!this['isAttached'])throw new _0x39e81a('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3e6d06=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x43c64a=>_0x43c64a['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3e6d06['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2dad3b&&this['stopListening'](this['context']['editors']);for(const _0x35e5ba of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x35e5ba);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'](_0x2fb273){if(!_0x2fb273['plugins']['has']('EditorAnnotations'))return;const _0x513e48=_0x2fb273['plugins']['get']('EditorAnnotations'),_0x228771=this['context']['plugins']['get'](z),_0x452a02=this['annotations'],_0x17e5c5=this['balloonPanelView'],_0x1a365b=()=>{const _0x191257=_0x513e48['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x191257),this['setActiveAnnotation'](_0x191257[0x0]||null);};this['listenTo'](_0x513e48,'refresh',_0x1a365b),this['listenTo'](_0x513e48,'blur',(_0xc968c9,{isAnnotationTracked:_0x1753b9})=>{this['activeAnnotation']&&_0x1753b9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x513e48,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x452a02,'blur',_0x4e3fb7=>{_0x513e48['hasDomSelection']()&&_0x4e3fb7['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5a90dd,_0x22957a)=>{const _0x8b2cbb=_0x22957a['target'];_0x17e5c5['isVisible']&&_0x17e5c5['element']['contains'](_0x8b2cbb)||_0x228771['view']['element']['contains'](_0x8b2cbb)||this['activeAnnotation']&&_0x513e48['hasDomSelection']()&&(_0x1a365b(),_0x5a90dd['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x513e48);}['_destroyEditorAnnotationsIntegration'](_0x131039){_0x131039&&(this['stopListening'](_0x131039),this['_editorAnnotations']['remove'](_0x131039));}['_setSelectedAnnotations'](_0x24cb0c){for(const _0x33bc97 of this['_selectedAnnotations'])_0x24cb0c['includes'](_0x33bc97)||this['_manuallyClosedAnnotationViews']['delete'](_0x33bc97['view']);this['_selectedAnnotations']=_0x24cb0c;}['_refreshPositioning'](){const _0x2af5c7=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x2af5c7['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2000c5){if(this['_manuallyClosedAnnotationViews']['has'](_0x2000c5['view']))return;const _0x13199c=this['balloonPanelView']['content']['first'];_0x13199c!==_0x2000c5['view']?(_0x13199c&&this['_detachListeners'](_0x13199c),this['_attachListeners'](_0x2000c5['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2000c5['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xf3ce09=this['balloonPanelView']['content']['first'],_0x3921d4=_0xf3ce09&&this['annotations']['getByView'](_0xf3ce09);if(!_0x3921d4||!this['_annotationToNarrowView']['has'](_0x3921d4))return;const _0x34e7c9=this['_annotationToNarrowView']['get'](_0x3921d4)['element'],_0x1d1fe0=(function(){const _0x5a42fc=_0x185a85['defaultPositions'];return[_0x5a42fc['southArrowNorthEast'],_0x5a42fc['northArrowSouthEast'],_0x5a42fc['southArrowNorth'],_0x5a42fc['northArrowSouth'],_0x5a42fc['southArrowNorthWest'],_0x5a42fc['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x34e7c9,'positions':_0x1d1fe0});}['_hideBalloon'](){const _0x1f2feb=this['balloonPanelView'],_0x5f0fdc=_0x1f2feb['content']['first'];_0x5f0fdc&&(this['_detachListeners'](_0x5f0fdc),_0x1f2feb['unpin'](),_0x1f2feb['content']['clear']());}['_attachListeners'](_0x312353){this['listenTo'](_0x312353,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x312353,'Esc',(_0x399a96,_0x2b165d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x312353),this['_hideBalloon'](),_0x2b165d();});}['_detachListeners'](_0x5da99c){this['stopListening'](_0x5da99c);}}class c extends _0x17ed19{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x2bbe93,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d618d){super(_0x5d618d),_0x5d618d['editing']['view']['addObserver'](_0x54cd2f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5d618d['plugins']['get'](_0x2bbe93),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x4c3fee=this['editor']['plugins']['get'](M);_0x4c3fee['context']===this['editor']&&(_0x4c3fee['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x386fd0,_0x40d5fe)=>{const _0x3a1a9e=this['_balloon'];if(this['isAttached']&&_0x3a1a9e['visibleView']){const _0x58f263=this['annotations']['getByView'](_0x3a1a9e['visibleView']);_0x58f263&&this['_closeAnnotation'](_0x58f263),_0x40d5fe();}}));}['afterInit'](){const _0x2c8377=this['editor']['plugins']['get'](M);_0x2c8377['context']===this['editor']&&(_0x2c8377['hasActive']()||_0x2c8377['switchTo']('inline'));}['setActiveAnnotation'](_0x27f70c){_0x27f70c!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x27f70c&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x27f70c)&&this['_addAnnotationToBalloon'](_0x27f70c,!0x0),_0x27f70c['isActive']=!0x0),_0x27f70c||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x27f70c);}['attach'](_0x26e999){this['annotations']=_0x26e999;const _0x4e84e4=this['editor']['plugins']['get'](M),_0x5af98d=this['_balloon'];if(this['isAttached'])throw new _0x39e81a('inlineannotations-attach-already-attached',this);if(_0x4e84e4['context']!==this['editor'])throw new _0x39e81a('inlineannotations-not-allowed-with-context',this);const _0x3e4b8b=this['editor']['plugins']['get'](P);this['listenTo'](_0x3e4b8b,'refresh',()=>{const _0x4bca22=_0x3e4b8b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x578e20,_0x2c3a17;!this['_forceRefresh']&&(_0x578e20=_0x4bca22,_0x2c3a17=this['_selectedAnnotations'],_0x578e20['length']===_0x2c3a17['length']&&_0x578e20['every'](_0x250933=>_0x2c3a17['includes'](_0x250933)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4bca22),this['setActiveAnnotation'](_0x4bca22[0x0]||null));}),this['listenTo'](_0x3e4b8b,'blur',(_0x3480b6,{isAnnotationTracked:_0x370c41})=>{this['activeAnnotation']&&_0x370c41(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x206eda,_0x562ece,_0x258e52)=>{_0x258e52||this['setActiveAnnotation'](null);}),this['listenTo'](_0x26e999,'remove',(_0x4bb216,_0x43a7d2)=>{this['_removeAnnotationFromBalloon'](_0x43a7d2),_0x43a7d2===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5af98d,'change:visibleView',(_0x67c9b6,_0x105590,_0x315857,_0x52ef4d)=>{_0x52ef4d&&this['stopListening'](_0x52ef4d);const _0x172891=_0x26e999['getByView'](_0x315857);_0x315857&&_0x172891&&(this['listenTo'](_0x315857,'change:height',()=>{_0x5af98d['updatePosition']();}),this['listenTo'](_0x315857,'Esc',()=>{this['_closeAnnotation'](_0x172891),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x172891&&this['setActiveAnnotation'](_0x172891));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5af98d['visibleView']&&(_0x26e999['getByView'](_0x5af98d['visibleView'])&&_0x5af98d['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 _0x39e81a('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2d54e5 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2d54e5);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x502c3d){for(const _0x255cb1 of this['_selectedAnnotations'])_0x502c3d['includes'](_0x255cb1)||this['_manuallyClosed']['delete'](_0x255cb1);for(const _0x52ed76 of this['annotations'])_0x502c3d['includes'](_0x52ed76)||this['_removeAnnotationFromBalloon'](_0x52ed76);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5b7ddc of _0x502c3d)this['_addAnnotationToBalloon'](_0x5b7ddc);}this['_selectedAnnotations']=_0x502c3d;}['_addAnnotationToBalloon'](_0x3c2a1a,_0x14b16e=!0x1){this['_manuallyClosed']['has'](_0x3c2a1a)||(this['_addedAnnotations']['has'](_0x3c2a1a)||this['_balloon']['hasView'](_0x3c2a1a['view'])||(this['_addedAnnotations']['add'](_0x3c2a1a),this['_balloon']['add']({'stackId':_0x3c2a1a['view']['id'],'view':_0x3c2a1a['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3c2a1a)}})),_0x14b16e&&this['_balloon']['showStack'](_0x3c2a1a['view']['id']));}['_getBalloonTargetForAnnotation'](_0x250b8a){const _0x31024=_0x250b8a['target'],_0x33dd70=this['editor']['editing']['view'],_0xefeb45=_0x33dd70['document']['selection']['getFirstRange'](),_0x1f59c9=_0x33dd70['domConverter']['viewRangeToDom'](_0xefeb45);if(_0x1f59c9['collapse'](!0x0),_0x31024){if(_0x31024 instanceof _0x3184b7)return _0x31024;let _0x1d8873=[];for(const _0x4a13e3 of _0x31024)_0x1d8873['push'](...(_0x4c6ff0=_0x4a13e3['getClientRects'](),Array['from'](_0x4c6ff0)['map'](DOMRect['fromRect'])));_0x1d8873=function(_0x41703a){const _0x223ffe=[];let _0x1e2c5e=_0x41703a[0x0];for(let _0x4e4ef8=0x1;_0x4e4ef8<_0x41703a['length'];_0x4e4ef8++)B(_0x1e2c5e,_0x41703a[_0x4e4ef8])?_0x1e2c5e['width']+=_0x41703a[_0x4e4ef8]['width']:(_0x223ffe['push'](_0x1e2c5e),_0x1e2c5e=_0x41703a[_0x4e4ef8]);return _0x223ffe['push'](_0x1e2c5e),_0x223ffe;}(_0x1d8873);const _0x474b93=_0x1f59c9['getBoundingClientRect']();return _0x1d8873['find'](_0x4fb558=>_0x4fb558['top']<=_0x474b93['top']&&_0x4fb558['bottom']>=_0x474b93['bottom']&&_0x4fb558['left']<=_0x474b93['left']&&_0x4fb558['right']>=_0x474b93['right'])||_0x1d8873[0x0];}var _0x4c6ff0;return _0x250b8a['targetRect']||_0x1f59c9;}['_removeAnnotationFromBalloon'](_0x48d176){this['_addedAnnotations']['has'](_0x48d176)&&this['_balloon']['hasView'](_0x48d176['view'])&&(this['_addedAnnotations']['delete'](_0x48d176),this['_balloon']['remove'](_0x48d176['view']));}['_closeAnnotation'](_0xd28d56){this['_manuallyClosed']['add'](_0xd28d56),this['_removeAnnotationFromBalloon'](_0xd28d56);}}function B(_0x134e56,_0x4a2194){return _0x134e56['top']===_0x4a2194['top']&&_0x134e56['bottom']===_0x4a2194['bottom']&&_0x134e56['right']===_0x4a2194['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x30f416,_0x5986bc){super(_0x30f416),this['set']('isEmpty',!_0x5986bc['length']),this['focusTracker']=new _0x28a20a(),this['_annotationViews']=_0x5986bc,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x61476c({'focusables':_0x5986bc,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5986bc,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5986bc,'remove',(_0x28af50,_0xc37d67)=>{_0xc37d67['isActive']&&this['focus'](),_0x5986bc['length']||(this['isEmpty']=!0x0);});const _0x1e424b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x30f416,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5986bc},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1e424b['if']('isEmpty','ck-hidden',_0x2cfc71=>!_0x2cfc71)]},'children':[{'text':E(_0x30f416,'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 _0x23bd45 of this['_annotationViews'])this['focusTracker']['add'](_0x23bd45['element']);this['_annotationViews']['on']('change',(_0x31144d,{added:_0xd5fc48,removed:_0x3a809b})=>{for(const _0x54a345 of _0xd5fc48)this['focusTracker']['add'](_0x54a345['element']);for(const _0x3aed28 of _0x3a809b)this['focusTracker']['remove'](_0x3aed28['element']);});}}class f extends _0x3dc007{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x1bc573){super(_0x1bc573),this['archivedThreads']=new _0x869a3();}['init'](){const _0x582274=this['context'],_0x35626e=_0x582274['plugins']['get'](o),_0x16887f=_0x582274['plugins']['get'](O);this['listenTo'](_0x35626e,'addCommentThread',(_0x168e20,{threadId:_0x4d5b54})=>{const _0x50e120=_0x35626e['getCommentThread'](_0x4d5b54);_0x50e120['archivedAt']&&this['archivedThreads']['add'](_0x50e120,this['_calculatePosition'](_0x50e120['archivedAt'])),this['listenTo'](_0x50e120,'change:archivedAt',(_0x2f107b,_0x5bfc9e,_0x2bf5c0)=>{_0x2bf5c0?this['archivedThreads']['has'](_0x50e120)||this['archivedThreads']['add'](_0x50e120,this['_calculatePosition'](_0x50e120['archivedAt'])):this['archivedThreads']['has'](_0x50e120)&&this['archivedThreads']['remove'](_0x50e120);});}),this['listenTo'](_0x35626e,'removeCommentThread',(_0x2cb7bb,{threadId:_0x5205fc})=>{const _0xa47ba=_0x35626e['getCommentThread'](_0x5205fc);this['stopListening'](_0xa47ba),this['archivedThreads']['has'](_0xa47ba)&&this['archivedThreads']['remove'](_0xa47ba);},{'priority':'highest'}),this['listenTo'](_0x16887f['collection'],'focus',(_0x20dece,_0x425efd)=>{_0x425efd['isVisible']||(_0x425efd['isActive']=!0x0,_0x16887f['activate'](_0x425efd));});}['_calculatePosition'](_0x41ea8b){const _0x1acb8f=[...this['archivedThreads']]['findIndex'](_0x1c0fae=>_0x1c0fae['archivedAt']<_0x41ea8b);return _0x1acb8f>-0x1?_0x1acb8f:this['archivedThreads']['length'];}}class a extends _0x17ed19{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x4deb73];}constructor(_0x20d0c0){super(_0x20d0c0),this['annotationViews']=new _0xfb1a30(),this['_pendingThreads']=[];}['init'](){const _0x5b9d1c=this['editor'],_0x4ec669=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5b9d1c['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x31f757,!0x0)),_0x5b9d1c['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4ce63a=this['_createCommentsArchiveButton'](_0x405369);return _0x4ce63a['set']({'role':'menuitemcheckbox'}),_0x4ce63a;});const _0x4d86ef=_0x5b9d1c['plugins']['get'](f),_0xba0985=_0x5b9d1c['plugins']['get']('Annotations'),_0xb81397=_0x5b9d1c['plugins']['get']('CommentsRepository');_0x4d86ef['archivedThreads']['forEach'](_0x3c03a1=>{this['_handleNewThread'](_0x3c03a1);}),this['listenTo'](_0x4d86ef['archivedThreads'],'add',(_0x5105f2,_0x596fa8)=>{this['_handleNewThread'](_0x596fa8);}),this['listenTo'](_0xba0985['collection'],'add',(_0x29950b,_0x162d81)=>{const _0x38bc3c=this['_pendingThreads']['find'](_0x2c7f12=>{const _0x3426fd=_0xb81397['_threadToController']['get'](_0x2c7f12);return _0x3426fd&&_0x162d81['innerView']===_0x3426fd['view'];});if(_0x38bc3c){const _0x1d91f0=this['_calculatePosition'](_0x38bc3c['archivedAt']);this['annotationViews']['add'](_0x162d81['view'],_0x1d91f0),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x38bc3c),0x1);}}),this['listenTo'](_0x4d86ef['archivedThreads'],'remove',(_0x577064,_0x50cbeb)=>{const _0x10be5a=_0x5b9d1c['config']['get']('collaboration.channelId');if(!_0x10be5a||_0x50cbeb['channelId']===_0x10be5a){if(this['_pendingThreads']['includes'](_0x50cbeb))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x50cbeb),0x1);else{const _0x1eeafc=_0xb81397['_threadToController']['get'](_0x50cbeb),_0x480076=_0xba0985['getByInnerView'](_0x1eeafc['view']);this['annotationViews']['remove'](_0x480076['view']),this['stopListening'](_0x480076['focusableElements']);}}}),this['listenTo'](_0xba0985['collection'],'add',(_0x48844f,_0x30f905)=>{this['listenTo'](_0x30f905,'escape',_0x4ec669);}),this['listenTo'](_0xba0985['collection'],'remove',(_0xcaf3cc,_0x3d5b9f)=>{this['stopListening'](_0x3d5b9f,'escape',_0x4ec669);});}['_handleNewThread'](_0x43fa04){const _0x28e758=this['editor']['plugins']['get']('CommentsRepository'),_0x5e4b93=this['editor']['plugins']['get']('Annotations'),_0xc38ec5=this['editor']['config']['get']('collaboration.channelId');if(!_0xc38ec5||_0x43fa04['channelId']===_0xc38ec5){const _0xe40d6=_0x28e758['_threadToController']['get'](_0x43fa04);if(!_0xe40d6)return void this['_pendingThreads']['push'](_0x43fa04);const _0x288ac4=this['_calculatePosition'](_0x43fa04['archivedAt']),_0xeec8e9=_0x5e4b93['getByInnerView'](_0xe40d6['view']);_0xeec8e9['isVisible']&&_0x5e4b93['_visibleAnnotations']['remove'](_0xeec8e9),this['annotationViews']['add'](_0xeec8e9['view'],_0x288ac4);}}['_calculatePosition'](_0x1b153d){const _0x50f509=this['editor']['config']['get']('collaboration.channelId'),_0x32ee4d=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x3d18b1=>_0x3d18b1['channelId']===_0x50f509)['findIndex'](_0xdb50a4=>_0xdb50a4['archivedAt']<_0x1b153d);return _0x32ee4d<0x0||_0x32ee4d>this['annotationViews']['length']?this['annotationViews']['length']:_0x32ee4d-0x1;}['_toggleDialog'](){const _0x2e226f=this['editor'],_0x45f763=_0x2e226f['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x2e226f['locale'],this['annotationViews'])),'commentsArchive'===_0x45f763['id']?_0x45f763['hide']():_0x45f763['show']({'id':'commentsArchive','title':E(_0x2e226f['locale'],'COMMENTS_ARCHIVE'),'icon':_0x46cc68,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xb3a9d8['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x469941,_0x4e0b6e=!0x1){const _0x851085=this['editor']['locale'],_0x481752=this['editor']['plugins']['get']('Dialog'),_0x5987b4=new _0x469941(_0x851085);return _0x5987b4['bind']('isEnabled')['to'](this,'isEnabled'),_0x5987b4['bind']('isOn')['to'](_0x481752,'id',_0x3736ef=>'commentsArchive'===_0x3736ef),_0x5987b4['set']({'label':E(_0x851085,'COMMENTS_ARCHIVE'),'icon':_0x46cc68,'isToggleable':!0x0}),_0x4e0b6e&&(_0x5987b4['tooltip']=!0x0),this['listenTo'](_0x5987b4,'execute',()=>this['_toggleDialog']()),_0x5987b4;}['_hideDialogOnAnnotationEscape']=_0x3e316a=>{const _0x1b4a14=_0x3e316a['source'];if(!this['annotationViews']['has'](_0x1b4a14['view']))return;const _0x456759=this['editor']['plugins']['get']('Dialog');_0x456759['isOpen']&&'commentsArchive'===_0x456759['id']&&(_0x456759['hide'](),_0x3e316a['stop']());};}class p extends _0x17ed19{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};
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};