@ckeditor/ckeditor5-comments 48.5.0-alpha.0 → 48.5.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/index.js +11 -11
  2. package/dist/translations/af.umd.js +1 -1
  3. package/dist/translations/ar.umd.js +1 -1
  4. package/dist/translations/ast.umd.js +1 -1
  5. package/dist/translations/az.umd.js +1 -1
  6. package/dist/translations/be.umd.js +1 -1
  7. package/dist/translations/bg.umd.js +1 -1
  8. package/dist/translations/bn.umd.js +1 -1
  9. package/dist/translations/bs.umd.js +1 -1
  10. package/dist/translations/ca.umd.js +1 -1
  11. package/dist/translations/cs.umd.js +1 -1
  12. package/dist/translations/da.umd.js +1 -1
  13. package/dist/translations/de-ch.umd.js +1 -1
  14. package/dist/translations/de.umd.js +1 -1
  15. package/dist/translations/el.umd.js +1 -1
  16. package/dist/translations/en-au.umd.js +1 -1
  17. package/dist/translations/en-gb.umd.js +1 -1
  18. package/dist/translations/en.umd.js +1 -1
  19. package/dist/translations/eo.umd.js +1 -1
  20. package/dist/translations/es-co.umd.js +1 -1
  21. package/dist/translations/es.umd.js +1 -1
  22. package/dist/translations/et.umd.js +1 -1
  23. package/dist/translations/eu.umd.js +1 -1
  24. package/dist/translations/fa.umd.js +1 -1
  25. package/dist/translations/fi.umd.js +1 -1
  26. package/dist/translations/fr.umd.js +1 -1
  27. package/dist/translations/gl.umd.js +1 -1
  28. package/dist/translations/gu.umd.js +1 -1
  29. package/dist/translations/he.umd.js +1 -1
  30. package/dist/translations/hi.umd.js +1 -1
  31. package/dist/translations/hr.umd.js +1 -1
  32. package/dist/translations/hu.umd.js +1 -1
  33. package/dist/translations/hy.umd.js +1 -1
  34. package/dist/translations/id.umd.js +1 -1
  35. package/dist/translations/it.umd.js +1 -1
  36. package/dist/translations/ja.umd.js +1 -1
  37. package/dist/translations/jv.umd.js +1 -1
  38. package/dist/translations/kk.umd.js +1 -1
  39. package/dist/translations/km.umd.js +1 -1
  40. package/dist/translations/kn.umd.js +1 -1
  41. package/dist/translations/ko.umd.js +1 -1
  42. package/dist/translations/ku.umd.js +1 -1
  43. package/dist/translations/lt.umd.js +1 -1
  44. package/dist/translations/lv.umd.js +1 -1
  45. package/dist/translations/ms.umd.js +1 -1
  46. package/dist/translations/nb.umd.js +1 -1
  47. package/dist/translations/ne.umd.js +1 -1
  48. package/dist/translations/nl.umd.js +1 -1
  49. package/dist/translations/no.umd.js +1 -1
  50. package/dist/translations/oc.umd.js +1 -1
  51. package/dist/translations/pl.umd.js +1 -1
  52. package/dist/translations/pt-br.umd.js +1 -1
  53. package/dist/translations/pt.umd.js +1 -1
  54. package/dist/translations/ro.umd.js +1 -1
  55. package/dist/translations/ru.umd.js +1 -1
  56. package/dist/translations/si.umd.js +1 -1
  57. package/dist/translations/sk.umd.js +1 -1
  58. package/dist/translations/sl.umd.js +1 -1
  59. package/dist/translations/sq.umd.js +1 -1
  60. package/dist/translations/sr-latn.umd.js +1 -1
  61. package/dist/translations/sr.umd.js +1 -1
  62. package/dist/translations/sv.umd.js +1 -1
  63. package/dist/translations/th.umd.js +1 -1
  64. package/dist/translations/ti.umd.js +1 -1
  65. package/dist/translations/tk.umd.js +1 -1
  66. package/dist/translations/tr.umd.js +1 -1
  67. package/dist/translations/tt.umd.js +1 -1
  68. package/dist/translations/ug.umd.js +1 -1
  69. package/dist/translations/uk.umd.js +1 -1
  70. package/dist/translations/ur.umd.js +1 -1
  71. package/dist/translations/uz.umd.js +1 -1
  72. package/dist/translations/vi.umd.js +1 -1
  73. package/dist/translations/zh-cn.umd.js +1 -1
  74. package/dist/translations/zh.umd.js +1 -1
  75. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x1a9525,Context as _0x3e1edc,ContextPlugin as _0x1432af,Editor as _0x5696da,PendingActions as _0x148d44,Plugin as _0x3fdf7a}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x4d38da,Collection as _0x261848,DomEmitterMixin as _0x24513d,FocusTracker as _0x32b87,KeystrokeHandler as _0x5876cf,ObservableMixin as _0x21f796,Rect as _0x424c5e,diff as _0x55084f,first as _0x151bdd,getEnvKeystrokeText as _0x55d878,keyCodes as _0x2a605a,priorities as _0x52033f,scrollViewportToShowTarget as _0x461c21,toUnit as _0x56832f,uid as _0x579286}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x147252,ConfirmMixin as _0x9d5b0,FOCUS_ANNOTATION_KEYSTROKE as _0x1691ba,LateFocusButtonView as _0x5f0bed,LateFocusDropdownButtonView as _0x38c522,UserView as _0x3d8946,Users as _0x2c9993,getAllMarkersDomElementsSorted as _0x398587,getDateTimeFormatter as _0x5f2125,hashObject as _0x43ffc0,setupThreadKeyboardNavigation as _0x265502,surroundingMarkersDetector as _0x54398c,trimHtml as _0x1d4d4c}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x323998,debounce as _0x56eba8,isEqual as _0x7a5633,set as _0x35bdfd,throttle as _0x3d70b3,unset as _0x2ce193}from'es-toolkit/compat';import{IconAddComment as _0x526159,IconCheck as _0x343d40,IconCommentsArchive as _0x4c97a9,IconPencil as _0x3cc420,IconRemoveComment as _0x3b5ac5,IconThreeVerticalDots as _0x530954,IconUndo as _0x5547ed}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x41d702,BodyCollection as _0x306044,ButtonView as _0x390df4,ContextualBalloon as _0x36c62a,Dialog as _0x250a9b,DialogViewPosition as _0x26f4e4,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
- _0x21f796();var bt=class extends It{['model'];['view'];constructor(_0x1e75c9,_0x1bfd49){super(),this['model']=_0x1e75c9,this['model']['_isAttached']=!0x0,this['view']=_0x1bfd49,this['listenTo'](_0x1bfd49,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1bfd49,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1bfd49,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1bfd49,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1bfd49,'addComment',(_0x31d7fc,_0x55b252)=>this['addComment'](_0x55b252)),this['listenTo'](_0x1bfd49,'updateComment',(_0x2f57cb,_0x3f2e48,_0x2a0bdc)=>this['updateComment'](_0x3f2e48,_0x2a0bdc)),this['listenTo'](_0x1bfd49,'removeComment',(_0x206747,_0x1e6c29)=>this['removeComment'](_0x1e6c29));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x2a3757){this['model']['addComment']({'content':_0x2a3757,'authorId':this['view']['_localUser']['id']});}updateComment(_0x3e3790,_0x5d2fcd){this['model']['getComment'](_0x3e3790)['update']({'content':_0x5d2fcd});}removeComment(_0x2b37f4){this['model']['getComment'](_0x2b37f4)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x49f161,_0x3d20ae,_0x42d654){const t=_0x49f161['t'];switch(_0x3d20ae){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'},_0x42d654);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x42d654);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'},_0x42d654);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'},_0x42d654);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x42d654);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'},_0x42d654);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'},_0x42d654);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'},_0x42d654);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'';}}var kt=class extends it{['main'];editable;constructor(_0x5e9117,_0x33b395){super(_0x5e9117);const _0xe5193=_0x579286();this['main']=this['createCollection'](),this['editable']=new st(_0x5e9117,_0x33b395,void 0x0,{'label':()=>Et(_0x5e9117,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x5e9117['uiLanguageDirection'],'lang':_0x5e9117['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xe5193},'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']();}},Nt=class extends tt{['view'];constructor(_0x5089f2){super(_0x5089f2),this['view']=new kt(_0x5089f2['locale'],_0x5089f2['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x5972e5=this['editor']['editing']['view'],_0x55ab56=this['view']['editable'];_0x55ab56['name']=_0x5972e5['document']['getRoot']()['rootName'],this['view']['render']();const _0x429c0d=_0x55ab56['element'];this['setEditableElement'](_0x55ab56['name'],_0x429c0d),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5972e5['attachDomRoot'](_0x429c0d),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x21f796(_0x5696da);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x504243={}){(_0x504243=Object['assign']({},_0x504243))['plugins']||(_0x504243['plugins']=CommentEditor['defaultPlugins']),super(_0x504243),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0xd17770=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xd17770))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xe37b68=>{const _0x4efebd=this['model']['document']['getRoot'](),_0x53b878=_0x4efebd&&_0x4efebd['getChild'](_0x4efebd['childCount']-0x1);_0xe37b68['setSelection'](_0x53b878,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x3ae82a=this['editing']['view'],_0x26635d=_0x3ae82a['document']['getRoot'](),_0x323056=_0x26635d['getChild'](0x0);_0x26635d['childCount']>0x1||!_0x323056||'p'!=_0x323056['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x3ae82a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x323056['placeholder']=this['placeholder']),ut({'view':_0x3ae82a,'element':_0x323056,'keepOnFocus':!0x0}),this['placeholderElement']=_0x323056);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x2fe1a7,_0xe13106={}){super(_0x2fe1a7),this['editor']=null,this['_editorConfig']=_0xe13106,this['set']('value',_0xe13106['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x2fe1a7,'Reply...')),this['set']('submitLabel',Et(_0x2fe1a7,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x5876cf(),this['focusTracker']=new _0x32b87(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5eb2d9=>!_0x5eb2d9['defaultPrevented']},'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',(_0x3256de,_0x3368a3)=>{this['cancelButtonView']['fire']('execute'),_0x3368a3();}),this['keystrokes']['set']('Ctrl+Enter',(_0x52568b,_0x2520fc)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x2520fc());}),this['on']('submit',(_0xa64d4c,_0x357860)=>{_0x357860['length']>0xfde8?(alert(Et(_0x2fe1a7,'TOO_LONG_COMMENT_ALERT',[_0x357860['length'],0xfde8])),_0xa64d4c['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1532b7=this['editor'];this['element']['insertBefore'](_0x1532b7['ui']['element'],this['element']['firstChild']),_0x1532b7['model']['document']['on']('change',()=>this['value']=_0x1532b7['getData']()),_0x1532b7['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1532b7['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x220296){-0x1===_0x220296?(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:_0x45ceb3}=this,_0x3bd95e=new _0x390df4(_0x45ceb3);return _0x3bd95e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3bd95e['withText']=!0x0,_0x3bd95e['bind']('label')['to'](this,'submitLabel'),_0x3bd95e['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3bd95e['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x36d732,_0x3ade44)=>!_0x3ade44&&!!_0x36d732['trim']()),_0x3bd95e;}_createCancelButton(){const {locale:_0xeba10e}=this,_0x6c45c5=new _0x390df4(_0xeba10e);return _0x6c45c5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x6c45c5['label']=Et(_0xeba10e,'Cancel'),_0x6c45c5['withText']=!0x0,_0x6c45c5['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x6c45c5;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3c5b28=>{this['focusTracker']['add'](_0x3c5b28['element']);}),this['focusables']['on']('change',(_0x4b1c3d,_0x15dd8f)=>{for(const _0x229fe0 of Array['from'](_0x15dd8f['added'])['reverse']())this['focusTracker']['add'](_0x229fe0['element']);});}},xt=class extends ht{constructor(_0x30f319,_0x479788,_0x55e446){super(_0x30f319),this['commentInputView']=new St(_0x30f319,_0x55e446),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x231d6a,_0x33e18f)=>_0x231d6a||!!_0x33e18f),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 _0x3d8946(_0x30f319,_0x479788),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'](_0x282a16){this['commentInputView']['focus'](_0x282a16);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x5f4587,_0x1331da)=>{const {submitButtonView:_0x1f3496,cancelButtonView:_0x1c7957,editor:_0x17392f}=this['commentInputView'];[_0x1f3496['element'],_0x1c7957['element'],_0x17392f?_0x17392f['editing']['view']['getDomRoot']():null]['filter'](_0x1fcf71=>_0x1fcf71)['some'](_0xbe8ce3=>_0xbe8ce3['contains'](_0x1331da['target']))||(this['focus'](),_0x1331da['preventDefault']());});}},Pt=class extends ht{constructor(_0x56d316){super(_0x56d316);const _0x10756e=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x10756e['to']('count',_0x44d94a=>Et(_0x56d316,'NUMBER_OF_COMMENTS',_0x44d94a))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x415b0a,_0x4f0983,_0x3762d0){super(_0x415b0a);const _0x5cfd18=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4f0983['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4f0983,this['_config']=_0x3762d0,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x32b87(),this['keystrokes']=new _0x5876cf(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e1770=>this['commentViews']['map'](_0x206050=>_0x206050['element'])['includes'](_0x3e1770['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x415b0a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x6eb253=>_0x6eb253-this['_config']['maxCommentsWhenCollapsed']);for(const _0x392790 of _0x4f0983['comments'])this['_handleNewCommentModel'](_0x392790);this['_handleInfoComment'](),this['listenTo'](_0x4f0983['comments'],'add',(_0x5d0f49,_0x1c64c7)=>{const _0x26d157=this['_calculatePosition'](_0x1c64c7);this['length']++,this['_handleNewCommentModel'](_0x1c64c7,_0x26d157),this['refreshVisibleViews']();}),this['listenTo'](_0x4f0983['comments'],'remove',(_0xd860fd,_0xf127c3)=>{this['length']--,this['_handleRemoveCommentModel'](_0xf127c3),this['refreshVisibleViews']();}),this['listenTo'](_0x4f0983,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4f0983,'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',_0x5cfd18['if']('length','ck-hidden',_0x221fe9=>!_0x221fe9)],'aria-label':Et(_0x415b0a,'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'](_0x4a8590){-0x1===_0x4a8590?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x4c18f9 of this['commentViews'])_0x4c18f9['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x531887,_0x3f562f){const _0x15296a=new this['_config']['CommentView'](this['locale'],_0x531887,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x15296a['viewUid']=_0x531887['id'],_0x15296a['delegate']('removeComment')['to'](this),_0x15296a['delegate']('updateComment')['to'](this),_0x15296a['delegate']('resolveCommentThread')['to'](this),_0x15296a['delegate']('editorReady')['to'](this),_0x15296a['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x15296a,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x15296a,_0x3f562f);}_calculatePosition(_0x409a23){const _0x544a88=this['_model']['_findOptimalIndex'](_0x409a23);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x409a23['authoredAt']?_0x544a88-0x1:_0x544a88:_0x544a88-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x361f39={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x361f39,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x361f39));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x4cf74e){const _0x34140c=this['commentViews']['remove'](_0x4cf74e['id']);this['stopListening'](_0x34140c),_0x34140c['isEditMode']&&this['_updateHasDirtyComment'](),_0x34140c['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x322b4a=>_0x322b4a['isEditMode']);}['_rearrangeCollapse'](){const _0x5cbe5=function(_0xdffc2d){const _0x2275c4=new _0x261848();for(const _0x5f203a of _0xdffc2d)_0x2275c4['add'](_0x5f203a);return _0x2275c4;}(this['commentViews']),_0x21143e=this['_collapsedCommentsView']['count'];for(let _0x557aa2=0x1;_0x557aa2<=_0x21143e;_0x557aa2++)_0x5cbe5['remove'](0x1);for(const _0x1ffb66 of _0x5cbe5)_0x1ffb66['collapse']();_0x21143e>0x0&&_0x5cbe5['add'](this['_collapsedCommentsView'],0x1),Dt(_0x55084f(Array['from'](this['visibleViews']),Array['from'](_0x5cbe5)),this['visibleViews'],_0x5cbe5);}['_rearrangeExpand'](){Dt(_0x55084f(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x390e71 of this['visibleViews'])_0x390e71['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x3d87bd=>{this['focusTracker']['add'](_0x3d87bd['element']),this['keystrokes']['listenTo'](_0x3d87bd['element']);}),this['commentViews']['on']('change',(_0x553de5,_0x57ba75)=>{for(const _0x15ee9b of _0x57ba75['removed'])this['focusTracker']['remove'](_0x15ee9b['element']),this['keystrokes']['stopListening'](_0x15ee9b['element']);for(const _0xccaea2 of Array['from'](_0x57ba75['added'])['reverse']())this['focusTracker']['add'](_0xccaea2['element']),this['keystrokes']['listenTo'](_0xccaea2['element']);});}};function Dt(_0x4c2915,_0x5f44f7,_0x3cf78c){let _0x59dbb0=0x0;for(const _0x156432 of _0x4c2915)switch(_0x156432){case'insert':_0x5f44f7['add'](_0x3cf78c['get'](_0x59dbb0),_0x59dbb0),_0x59dbb0++;break;case'delete':_0x5f44f7['remove'](_0x59dbb0);break;case'equal':_0x59dbb0++;}}var Vt=class extends ht{constructor(_0x4aa412){super(_0x4aa412);const _0x36a4c6=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x36a4c6['to']('contextValue',_0x24582b=>Et(_0x4aa412,'THREAD_CONTEXT_LABEL',_0x24582b)),'tabindex':-0x1},'children':[{'text':_0x36a4c6['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x3c0f91,_0x346d23){super(_0x3c0f91);const _0x106337=this['bindTemplate'];this['_model']=_0x346d23,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x32b87(),this['keystrokes']=new _0x5876cf(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x37aa6c=>!!_0x37aa6c),this['bind']('contextValue')['to'](this['_model'],'context',_0x15de17=>_0x15de17&&_0x15de17['value']?this['_trimContextValue'](_0x15de17['value']):Et(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',_0x106337['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 _0x1c6f60=new _0x390df4(this['locale']);return _0x1c6f60['label']=Et(this['locale'],'Reopen'),_0x1c6f60['tooltip']=Et(this['locale'],'Reopen'),_0x1c6f60['icon']=_0x5547ed,_0x1c6f60['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2826f2=>!_0x2826f2),_0x1c6f60['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4db8e7,_0x19fd16)=>_0x4db8e7&&_0x19fd16),_0x1c6f60['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1c6f60;}_trimContextValue(_0x46a947){if(_0x46a947['length']<0x96)return _0x46a947;const _0x216d84=_0x46a947['lastIndexOf']('\x20',0x93);return _0x46a947['substring'](0x0,_0x216d84>-0x1?_0x216d84:0x93)+'...';}_attachContextActions(){const _0x19db28=this['element']['querySelector']('.ck-context'),_0x207a2a=_0x19db28['querySelector']('.ck-context__value');this['listenTo'](_0x19db28,'mouseenter',()=>{_0x207a2a['offsetWidth']<_0x207a2a['scrollWidth']&&_0x19db28['classList']['add']('overlay');}),this['listenTo'](_0x19db28,'mouseleave',()=>{_0x19db28['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x1b7555 of this['focusables'])this['focusTracker']['add'](_0x1b7555['element']),this['keystrokes']['listenTo'](_0x1b7555['element']);}_createContextView(){const _0xf9f01d=new Vt(this['locale']);return _0xf9f01d['bind']('contextValue')['to'](this),_0xf9f01d;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x226fe7,_0x3fe319,_0x1fc246,_0x449a9a){super(_0x226fe7),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3fe319,this['_localUser']=_0x1fc246,this['_config']=_0x449a9a,this['commentThreadHeaderView']=new Bt(_0x226fe7,_0x3fe319),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x147252(_0x226fe7,Et(_0x226fe7,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x226fe7,_0x3fe319,Object['assign']({'CommentView':this['_config']['CommentView']},_0x449a9a)),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',(_0x2d67a7,_0x298213)=>_0x2d67a7||!!_0x298213),this['bind']('isUnlinked')['to'](_0x3fe319,'unlinkedAt',_0x572d74=>!!_0x572d74);let _0x515eec=null;const _0x6e54c7=()=>{const _0x2415d1=this['_model']['comments']['first']||null;_0x2415d1!==_0x515eec&&(_0x515eec&&this['stopListening'](_0x515eec,'change:content'),_0x515eec=_0x2415d1,_0x2415d1&&this['listenTo'](_0x2415d1,'change:content',_0x6e54c7));const _0x397898=_0x2415d1?_0x2415d1['author']['name']:this['_localUser']['name'],_0x144ae9=_0x2415d1?new DOMParser()['parseFromString'](_0x1d4d4c(_0x2415d1['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x5b2e34=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x397898]);this['set']('ariaLabel',_0x144ae9?_0x5b2e34+'\x20'+_0x144ae9:_0x5b2e34);};this['listenTo'](this['_model']['comments'],'change',_0x6e54c7),_0x6e54c7(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x32b87(),this['keystrokes']=new _0x5876cf(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2c2bc0=>_0x2c2bc0['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x265502(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x336fb9=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x427ce7=_0x336fb9['commentInputView'];return _0x336fb9['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x427ce7,'value',(_0x31f1f4,_0x4e2ac7,_0x119a19,_0x32c29a,_0x464026)=>!!_0x464026||!!_0x32c29a&&_0x119a19&&!_0x4e2ac7||_0x31f1f4&&_0x119a19&&!_0x4e2ac7),_0x427ce7['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x326840,_0xcff063,_0xefed2e)=>{let _0x1cd8a2;return _0x1cd8a2=_0xefed2e&&_0xcff063?'Reply\x20to\x20reopen\x20discussion...':_0x326840?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x1cd8a2);}),_0x427ce7['bind']('submitLabel')['to'](this,'length',_0x4a6e5f=>Et(this['locale'],_0x4a6e5f?'Reply':'Comment')),_0x427ce7['on']('submit',(_0x52db15,_0x26dc1d)=>{this['fire']('addComment',_0x26dc1d),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x427ce7['on']('cancel',()=>{this['focus']();}),_0x427ce7['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x427ce7['on']('cancel',_0x2f5122=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2f5122['stop']());}),this['on']('change:isActive',(_0x1d607e,_0x2b90f2,_0x11311f)=>{_0x11311f||this['length']||_0x427ce7['value']||this['fire']('removeCommentThread');}),_0x336fb9;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x9d5b0(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x53c57c,_0x48b290,_0x4ce52c,_0x1d1510){super(_0x53c57c,_0x48b290,_0x4ce52c,_0x1d1510),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x53c57c,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x561dfb,_0x535d3b,_0x571a0d)=>{_0x571a0d||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5f3266,_0x570047,_0x1dc9bc)=>{_0x1dc9bc&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x42b472=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x42b472['if']('isActive','ck-thread--active'),_0x42b472['if']('isUnlinked','ck-thread--unlinked'),_0x42b472['to']('actionIndicator',_0x2c6b7b=>_0x2c6b7b?'ck-thread--'+_0x2c6b7b:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x42b472['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 _0x4df380 of this['commentsListView']['commentViews'])_0x4df380['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x1ff55e}=this,_0x15d195=this['commentsListView']['commentViews']['get'](0x0);_0x15d195===this['_boundFirstCommentView']||_0x15d195['isSystemComment']||(this['_boundFirstCommentView']=_0x15d195,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x15d195,'actionIndicator',_0x220d81=>'remove'===_0x220d81?'remove':null),_0x15d195['placeholder']=Et(_0x1ff55e,'Write\x20a\x20comment...'),_0x15d195['removeButton']['on']('execute',_0xa38502=>{_0xa38502['stop'](),this['showConfirm'](Et(_0x1ff55e,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x15d195['focus']();}),_0x15d195['actionBar']['add'](this['resolveButton'],0x0),_0x15d195['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0xf9cccc=new _0x5f0bed(this['locale']);return _0xf9cccc['label']=Et(this['locale'],'Resolve'),_0xf9cccc['tooltip']=Et(this['locale'],'Resolve'),_0xf9cccc['icon']=_0x343d40,_0xf9cccc['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xf9cccc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5cc1e0=>!_0x5cc1e0),_0xf9cccc['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4b4773,_0x2b6e2b)=>_0x4b4773&&!_0x2b6e2b),_0xf9cccc['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xf9cccc;}_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']));}},Wt=class extends ht{constructor(_0x383317){super(_0x383317),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x37634b,_0x5e86eb,_0x4e6209)=>{this['element']['innerHTML']=_0x4e6209;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x1b8e1e,_0x15afa3,_0x3fad95){super(_0x1b8e1e),this['_model']=_0x15afa3,this['_config']=_0x3fad95,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x15afa3,'content',_0x15afa3,'authoredAt',(_0x1e89c2,_0x31b01e)=>Et(_0x1b8e1e,'COMMENT_ARIA_LABEL',[_0x15afa3['author']['name'],_0x3fad95['formatDateTime'](_0x31b01e),new DOMParser()['parseFromString'](_0x1e89c2,'text/html')['body']['textContent'],_0x15afa3['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x147252(_0x1b8e1e,Et(_0x1b8e1e,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x32b87(),this['keystrokes']=new _0x5876cf(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x26f347=>_0x26f347['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x42b4ef=new Wt(this['locale']);return _0x42b4ef['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4f0235,_0x5a9efd)=>_0x5a9efd?_0x1d4d4c(_0x4f0235,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4f0235),_0x42b4ef;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x405315=new St(this['locale'],this['_config']['editorConfig']);return _0x405315['value']=this['_model']['content'],_0x405315['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x405315['submitLabel']=Et(this['locale'],'Save'),_0x405315['on']('submit',(_0x20da4f,_0x23473c)=>{this['fire']('updateComment',this['_model']['id'],_0x23473c),this['switchToDisplayMode'](),this['focus']();}),_0x405315['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x405315['once']('editorReady',()=>{_0x405315['focus']();}),_0x405315['createEditor'](),_0x405315['delegate']('editorReady')['to'](this),_0x405315['delegate']('editorDestroyed')['to'](this),_0x405315;}_setupKeyboardNavigation(){const _0x682d09=this['element'];this['keystrokes']['listenTo'](_0x682d09);for(const _0x9e7494 of this['focusables'])this['focusTracker']['add'](_0x9e7494['element']),this['keystrokes']['listenTo'](_0x9e7494['element']);this['focusables']['on']('change',(_0x2ce781,_0x1ba201)=>{for(const _0x2a51ed of _0x1ba201['removed'])this['focusTracker']['remove'](_0x2a51ed['element']),this['keystrokes']['stopListening'](_0x2a51ed['element']);for(const _0x1475db of _0x1ba201['added'])this['focusTracker']['add'](_0x1475db['element']),this['keystrokes']['listenTo'](_0x1475db['element']);}),this['keystrokes']['set']('enter',(_0x1b0a66,_0x119c8e)=>{_0x682d09===_0x1b0a66['target']&&(this['focusCycler']['focusFirst'](),_0x119c8e());}),this['keystrokes']['set']('esc',(_0x454267,_0x476f5a)=>{_0x682d09!==_0x454267['target']&&(this['focus'](),_0x476f5a());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x9d5b0(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x117da7,_0x47dd9e,_0x265778){super(_0x117da7,_0x47dd9e,_0x265778),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x117da7,'Reply...')),this['bind']('authoredAt')['to'](_0x47dd9e),this['bind']('resolvedAt')['to'](_0x47dd9e),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 _0x3d8946(_0x117da7,_0x47dd9e['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x47dd9e,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x58d458=this['bindTemplate'],_0x12b318=[{'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':_0x58d458['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x58d458['to']('authoredAt',_0x3583f9=>this['_config']['formatDateTime'](_0x3583f9))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x58d458['if']('isEditMode','ck-comment__actions--hidden'),_0x58d458['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']&&_0x12b318['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x58d458['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x58d458['if']('isEditMode','ck-comment--edit'),_0x58d458['if']('isSystemComment','ck-comment--info'),_0x58d458['to']('actionIndicator',_0x21a545=>_0x21a545?'ck-comment--'+_0x21a545:'')],'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':_0x12b318}]}]};}_createEditButton(){const _0x7a02bd=new _0x390df4(this['locale']);return _0x7a02bd['label']=Et(this['locale'],'Edit'),_0x7a02bd['icon']=_0x3cc420,_0x7a02bd['withText']=!0x0,_0x7a02bd['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x7a02bd['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2b301a=>!_0x2b301a),_0x7a02bd['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x7a02bd['on']('execute',()=>this['switchToEditMode']()),_0x7a02bd;}_createRemoveButton(){const _0x2f8ae1=new _0x390df4(this['locale']);return _0x2f8ae1['label']=Et(this['locale'],'Remove'),_0x2f8ae1['icon']=_0x3b5ac5,_0x2f8ae1['withText']=!0x0,_0x2f8ae1['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x2f8ae1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3070d1=>!_0x3070d1),_0x2f8ae1['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x2f8ae1['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x2f8ae1;}_createDropdown(){const _0x1c676b=ct(this['locale'],_0x38c522),_0x5762d4=_0x1c676b['panelView']['children'],_0xbd0415=new ot(this['locale']),_0x4810dc=_0x1c676b['bindTemplate'];dt(_0x1c676b,()=>this['items']['find'](_0x43d278=>_0x43d278['isVisible'])),_0x1c676b['extendTemplate']({'attributes':{'class':[_0x4810dc['if']('isVisible','ck-hidden',_0x148eac=>!_0x148eac)]}});const _0xaa92a6=(_0x53736c,_0x265380=-0x1)=>{const _0x267989=new nt(this['locale']);_0x267989['children']['add'](_0x53736c);const _0x81de3=_0x265380>-0x1?_0x265380:_0xbd0415['items']['length'];_0xbd0415['items']['add'](_0x267989,_0x81de3);const _0x5c0f06=Array['from'](this['items']);_0x1c676b['unbind']('isEnabled','isVisible'),_0x1c676b['bind']('isEnabled')['toMany'](_0x5c0f06,'isEnabled',(..._0x334d1a)=>_0x334d1a['some'](_0x4366a8=>_0x4366a8)),_0x1c676b['bind']('isVisible')['toMany'](_0x5c0f06,'isVisible',(..._0x3112bf)=>_0x3112bf['some'](_0xd87c69=>_0xd87c69));};_0x1c676b['panelPosition']='sw',_0x1c676b['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x530954});for(const _0x55f128 of this['items'])_0xaa92a6(_0x55f128);return _0x5762d4['add'](_0xbd0415),_0x1c676b['listenTo'](this['items'],'add',(_0x8d5a5b,_0x2005b5,_0x571c17)=>{_0xaa92a6(_0x2005b5,_0x571c17);}),_0x1c676b['listenTo'](this['items'],'remove',(_0x115078,_0x2f3a63,_0x191d48)=>{_0xbd0415['items']['remove'](_0x191d48);}),_0x1c676b;}_attachActions(_0x8b5e28,_0x440578){const _0x2de4a2=_0x8b5e28&&_0x8b5e28['element'];_0x2de4a2&&(this['listenTo'](_0x2de4a2,'mouseenter',()=>this['actionIndicator']=_0x440578),this['listenTo'](_0x2de4a2,'focus',()=>this['actionIndicator']=_0x440578),this['listenTo'](_0x2de4a2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2de4a2,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x98cf1d=super['_createCommentInputView']();return _0x98cf1d['bind']('placeholder')['to'](this),_0x98cf1d;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x4452f8){const _0x3b7485=_0x3d70b3(_0x4452f8,0x1e),_0x481a7b=new MutationObserver(_0x21f504=>{for(const _0x445b6a of _0x21f504)('attributes'==_0x445b6a['type']&&'class'==_0x445b6a['attributeName']||'childList'==_0x445b6a['type']||'characterData'==_0x445b6a['type'])&&_0x3b7485();});return{'attach'(_0x355550){_0x481a7b['observe'](_0x355550,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x481a7b['disconnect'](),_0x3b7485['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x2a66ab,_0x4991ee){super(_0x2a66ab),this['id']=_0x579286(),this['focusTracker']=new _0x32b87(),this['keystrokes']=new _0x5876cf(),this['keystrokes']['set']('Esc',(_0x5cf125,_0x3d8ee9)=>this['fire']('Esc',_0x3d8ee9)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x4991ee),this['mainView']=_0x4991ee;const _0x4d6ddd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4d6ddd['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 _0x1732c9=this['element']['clientHeight'];_0x1732c9&&(this['height']=_0x1732c9);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x21f796();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x34d484,target:_0x45276c,type:_0x29ed89,isVisible:_0x2f39cf=!0x0}){super(),this['view']=_0x34d484,this['view']['element']||this['view']['render'](),this['_type']=_0x29ed89,this['_target']=_0x45276c,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x261848([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x38d5d5,_0x7ea3a7)=>{this['view']['focusTracker']['add'](_0x7ea3a7);}),this['focusableElements']['on']('remove',(_0x14f18e,_0x1c96f2)=>{this['view']['focusTracker']['remove'](_0x1c96f2);}),this['set']('isVisible',_0x2f39cf);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x42b0fc=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x42b0fc),_0x42b0fc;}get targetRect(){const _0x1162c4=this['target'];if(null===_0x1162c4)return null;if(_0x1162c4 instanceof _0x424c5e)return _0x1162c4;const _0xda9319=_0x1162c4['filter'](_0x3b29b5=>function(_0x23ab89){return!!_0x23ab89['offsetParent']||!!_0x23ab89['getClientRects']()['item'](0x0);}(_0x3b29b5));return 0x0===_0xda9319['length']?null:_0x424c5e['getDomElementRects'](_0xda9319[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x53736b){this['view']['isActive']=_0x53736b,this['view']['mainView']['isActive']=_0x53736b;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x2510c4){if(!(null===_0x2510c4||_0x2510c4 instanceof _0x424c5e||Array['isArray'](_0x2510c4)&&_0x2510c4['every'](_0x45bf5e=>zt(_0x45bf5e))))throw new _0x4d38da('annotation-invalid-target',null,{'target':_0x2510c4});}_getNormalizedTarget(){const _0x207228='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x207228)?[_0x207228]:_0x207228;}};function zt(_0x82a1a9){return null!==_0x82a1a9&&'object'==typeof _0x82a1a9&&'nodeType'in _0x82a1a9&&0x1===_0x82a1a9['nodeType'];}var Jt=class extends _0x261848{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x50ea69=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x32b87(),this['_focusTracker']['on']('change:isFocused',(_0x400dcd,_0x1ec266,_0x3f2ec0)=>{_0x3f2ec0||this['fire']('blur');});for(const _0x3b1e62 of _0x50ea69)this['add'](_0x3b1e62);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x43a700){if(this['has'](_0x43a700))throw new _0x4d38da('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x43a700['innerView'],_0x43a700),this['_viewToAnnotation']['set'](_0x43a700['view'],_0x43a700);for(const _0x100add of _0x43a700['focusableElements'])this['_focusTracker']['add'](_0x100add);if(this['listenTo'](_0x43a700['focusableElements'],'add',(_0x13ec9b,_0x24ad8d)=>{this['_focusTracker']['add'](_0x24ad8d);}),this['listenTo'](_0x43a700['focusableElements'],'remove',(_0x49402e,_0xbfe94e)=>{this['_focusTracker']['remove'](_0xbfe94e);}),this['listenTo'](_0x43a700['view']['focusTracker'],'change:isFocused',(_0x7b2c2f,_0x132730,_0x1fa048)=>{_0x1fa048&&this['fire']('focus',_0x43a700);}),_0x43a700['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x1b6023 of this)_0x1b6023['updateTargetRect']();}const _0x56ff55=this['_getOrderInContent'](_0x43a700['view']['targetRect']);return super['add'](_0x43a700,_0x56ff55);}['remove'](_0x3c0475){if(!this['has'](_0x3c0475))throw new _0x4d38da('annotationcollection-not-existing-item',null);this['stopListening'](_0x3c0475['view']['focusTracker']),this['stopListening'](_0x3c0475['focusableElements']);for(const _0x8db678 of _0x3c0475['focusableElements'])this['_focusTracker']['remove'](_0x8db678);return this['_viewToAnnotation']['delete'](_0x3c0475['view']),this['_innerViewToAnnotation']['delete'](_0x3c0475['innerView']),super['remove'](_0x3c0475);}getByInnerView(_0x2999d7){return this['_innerViewToAnnotation']['get'](_0x2999d7);}getByView(_0x4246d3){return this['_viewToAnnotation']['get'](_0x4246d3);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0xa03335 of this)_0xa03335['updateTargetRect']();this['_sort']();}_sort(){const _0x386538=Array['from'](this)['sort']((_0x1336b3,_0x25724d)=>Zt(_0x1336b3['view']['targetRect'],_0x25724d['view']['targetRect']));for(let _0x4f4312=_0x386538['length']-0x1;_0x4f4312>0x0;_0x4f4312--){const _0x127b6e=_0x386538[_0x4f4312];_0x4f4312!==this['getIndex'](_0x127b6e)&&(this['remove'](_0x127b6e),this['add'](_0x127b6e));}}_getOrderInContent(_0x2fcc){let _0x2fe4d4=0x0;if(!_0x2fcc)return this['length'];for(const _0xc90379 of this){const _0x2af211=_0xc90379['view']['targetRect'];if(_0x2af211){if(Zt(_0x2fcc,_0x2af211)<0x0)return _0x2fe4d4;_0x2fe4d4++;}}return _0x2fe4d4;}_areCachedRectsStale(){const _0x3ff8b0=this['get'](0x0);if(!_0x3ff8b0)return!0x1;const _0xf5c92a=_0x3ff8b0['view']['targetRect'],_0x37266d=_0x3ff8b0['targetRect'];return!(!_0xf5c92a||!_0x37266d)&&(_0xf5c92a['top']!==_0x37266d['top']||_0xf5c92a['left']!==_0x37266d['left']);}};function Qt({source:_0x7defb0,target:_0x33148a,filter:_0x22c432}){for(const _0x342325 of _0x7defb0)_0x22c432(_0x342325)&&_0x33148a['add'](_0x342325);_0x33148a['listenTo'](_0x7defb0,'add',(_0x5a2c19,_0x45af67)=>{_0x22c432(_0x45af67)&&_0x33148a['add'](_0x45af67);}),_0x33148a['listenTo'](_0x7defb0,'remove',(_0x1dc75d,_0x116618)=>{_0x33148a['has'](_0x116618)&&_0x33148a['remove'](_0x116618);});}function Zt(_0x1e5c95,_0x30eb4b){if(null===_0x1e5c95&&null===_0x30eb4b)return 0x0;if(null===_0x1e5c95)return-0x1;if(null===_0x30eb4b)return 0x1;const _0x4f9da1=_0x1e5c95['top']-_0x30eb4b['top'];return 0x0==_0x4f9da1?_0x1e5c95['left']-_0x30eb4b['left']:_0x4f9da1;}var ti=class extends _0x1432af{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x30d577){if(super(_0x30d577),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x30d577 instanceof _0x5696da){const _0x24caa1=_0x30d577['locale'];_0x30d577['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x24caa1,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x24caa1,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x24caa1,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x24caa1,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x24caa1,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x24caa1,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x24caa1,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4b6ab2){this['collection']['add'](_0x4b6ab2);}['remove'](_0x19cf58){this['collection']['remove'](_0x19cf58),_0x19cf58['destroy']();}refreshVisibility(){for(const _0x4bc039 of this['collection'])_0x4bc039['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x24b345){return this['collection']['getByInnerView'](_0x24b345);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0xb39e1b of this['collection'])_0xb39e1b['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x111a7a){this['fire']('_activateAnnotation',_0x111a7a);}createAnnotation(_0x3d8f28){return new $t(_0x3d8f28);}createAnnotationView(_0x19a466,_0x5e7e10){return new qt(_0x19a466,_0x5e7e10);}_addActiveAnnotation(_0x243e2a){const _0x2c8097=new Set(this['activeAnnotations']);_0x2c8097['add'](_0x243e2a),this['activeAnnotations']=_0x2c8097;}_removeActiveAnnotation(_0x9bafb8){const _0x54485e=new Set(this['activeAnnotations']);_0x54485e['delete'](_0x9bafb8),this['activeAnnotations']=_0x54485e;}_bindAnnotationsToVisibleAnnotations(){const _0x3802fa=this['collection'],_0x2fc833=this['_visibleAnnotations'];function _0x12e495(_0x2e8a29){const _0x5f4da7=_0x2e8a29['source'];_0x5f4da7['isVisible']&&!_0x2fc833['has'](_0x5f4da7)?_0x2fc833['add'](_0x5f4da7):!_0x5f4da7['isVisible']&&_0x2fc833['has'](_0x5f4da7)&&_0x2fc833['remove'](_0x5f4da7),_0x5f4da7['view']['focusTracker']['remove'](_0x5f4da7['view']['element']),_0x5f4da7['view']['focusTracker']['add'](_0x5f4da7['view']['element']);}this['listenTo'](_0x3802fa,'add',(_0x1c2a82,_0x187ae1)=>{_0x187ae1['isVisible']&&_0x2fc833['add'](_0x187ae1),this['listenTo'](_0x187ae1,'change:isVisible',_0x12e495);}),this['listenTo'](_0x3802fa,'remove',(_0x583ae0,_0x220445)=>{_0x2fc833['has'](_0x220445)&&_0x2fc833['remove'](_0x220445),this['stopListening'](_0x220445,'change:isVisible',_0x12e495);});}_setupEnterAnnotationKeystroke(){const _0x15ad83=_0x141551=>{_0x141551['on']('ready',()=>{_0x141551['keystrokes']['set'](_0x1691ba,(_0x3b827b,_0x1b7dd3)=>{const _0x252a5d=_0x151bdd(this['activeAnnotations']['values']());_0x252a5d&&(_0x252a5d['view']['focus'](),_0x1b7dd3());});});};this['context']instanceof _0x5696da?_0x15ad83(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2bec9d,_0x40e781)=>{_0x15ad83(_0x40e781);});}_setupEscapeAnnotationHandling(){const _0x57980e=_0x10f4a2=>{const _0x3a18f5=_0x10f4a2['source'],_0x3fb904=[];let _0x23de5f;if(Array['isArray'](_0x3a18f5['target'])){_0x23de5f=_0x3a18f5['target'][0x0],this['context']instanceof _0x5696da?_0x3fb904['push'](this['context']):this['context']['editors']&&_0x3fb904['push'](...this['context']['editors']);for(const _0xb5de2c of _0x3fb904)for(const _0x709602 of _0xb5de2c['editing']['view']['domRoots']['values']())if(_0x709602['contains'](_0x23de5f))return void _0xb5de2c['editing']['view']['focus']();_0x23de5f['focus']();}};this['listenTo'](this['collection'],'add',(_0x17c5e4,_0x1afd9c)=>{this['listenTo'](_0x1afd9c,'escape',_0x57980e,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xa16687,_0x256251)=>{this['stopListening'](_0x256251,'escape',_0x57980e);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x21f796(),ni=/* #__PURE__ -- @preserve */
31
- _0x21f796();var oi=class extends _0x1432af{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x148d44,_0x2c9993];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f5bf7){super(_0x5f5bf7),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x542125=this['context']['config'];_0x542125['define']('comments.maxCommentsWhenCollapsed',0x2),_0x542125['define']('comments.maxThreadTotalWeight',0x1f4),_0x542125['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x542125['define']('comments.CommentThreadView',Ut),_0x542125['define']('comments.CommentView',Yt),_0x542125['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x2a7138=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x46396b,_0x3a22ee)=>this['_addCommentThread'](_0x3a22ee)),this['on']('submitCommentThread',(_0x347edf,_0x31497b)=>this['_submitCommentThread'](_0x31497b)),this['on']('resolveCommentThread',(_0x3cca20,_0x5469e0)=>this['_resolveCommentThread'](_0x5469e0)),this['on']('resolveCommentThread',(_0x2de1fe,_0x3055e4)=>this['_updateActiveAnnotation'](_0x3055e4),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1350b8,_0x58ff91)=>this['_reopenCommentThread'](_0x58ff91)),this['on']('reopenCommentThread',(_0x3a2e0d,_0x28c535)=>this['_updateActiveAnnotation'](_0x28c535),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x592bc4,_0x77aeb9)=>this['_removeCommentThread'](_0x77aeb9)),this['on']('updateCommentThread',(_0x56ecd6,_0x53dba2)=>this['_updateCommentThread'](_0x53dba2)),this['on']('updateCommentThread',(_0x5b7602,_0x2eb67f)=>this['_updateActiveAnnotation'](_0x2eb67f),{'priority':'lowest'}),this['on']('addComment',(_0xd48353,_0x5f0362)=>this['_addComment'](_0x5f0362)),this['on']('updateComment',(_0x2454fa,_0x4d43db)=>this['_updateComment'](_0x4d43db)),this['on']('removeComment',(_0x43f39b,_0xccc496)=>this['_removeComment'](_0xccc496)),this['on']('addComment',(_0x13cbd5,{threadId:_0x3a8b6c,isFromAdapter:_0x3e17f5})=>{if(_0x3e17f5)return;const _0x355a88=this['getCommentThread'](_0x3a8b6c),_0x29decb=_0x355a88&&this['_threadToController']['get'](_0x355a88);_0x29decb&&_0x29decb['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2a7138,'change:activeAnnotations',(_0x42cb13,_0x4eb2e5,_0x1d8412)=>{const _0x48863f=Array['from'](_0x1d8412)['map'](_0xc7aaac=>this['_viewToController']['get'](_0xc7aaac['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x48863f?_0x48863f['model']:null;});}set adapter(_0x23809e){if(this['_adapter'])throw new _0x4d38da('commentsrepository-adapter-already-set');this['_adapter']=_0x23809e;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x895959=ii,threadId:_0x35755e=_0x579286(),comments:_0x51f3be=[],unlinkedAt:_0x3b4a05=null,resolvedAt:_0x8fb565=null,resolvedBy:_0x280738=null,target:_0x7c463=null,context:_0x53f3f1=null,attributes:_0x20f3ad={},isResolvable:_0x1e1364=!0x0,isSubmitted:_0xb97fdb=!0x1,isFromAdapter:_0x61e249=!0x1}={}){return this['fire'](ai('addCommentThread',_0x895959),{'channelId':_0x895959,'threadId':_0x35755e,'comments':_0x51f3be,'unlinkedAt':_0x3b4a05,'resolvedAt':_0x8fb565,'resolvedBy':_0x280738,'target':_0x7c463,'context':_0x53f3f1,'attributes':_0x20f3ad,'isFromAdapter':_0x61e249,'isResolvable':_0x1e1364,'isSubmitted':_0xb97fdb}),this['getCommentThread'](_0x35755e);}openNewCommentThread({channelId:_0x147b4d=ii,threadId:_0x3f64f4=_0x579286(),target:_0x357727,context:_0x7ba521=null,isResolvable:_0x2d911e=!0x0}){if(this['_readOnlyChannels']['has'](_0x147b4d)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x357727)throw new _0x4d38da('commentsrepository-missing-target');const _0x14deb5=this['addCommentThread']({'channelId':_0x147b4d,'threadId':_0x3f64f4,'target':_0x357727,'context':_0x7ba521,'isResolvable':_0x2d911e});if(!_0x14deb5)return null;const _0x1f66f7=this['_threadToController']['get'](_0x14deb5),_0x27e849=_0x1f66f7['view']['commentThreadInputView']['commentInputView'],_0xb78eda=this['context']['plugins']['get'](ti),_0x5ca913=_0xb78eda['getByInnerView'](_0x1f66f7['view']);return _0xb78eda['activate'](_0x5ca913),_0x27e849['once']('editorReady',()=>_0x27e849['focus']()),_0x14deb5;}hasCommentThread(_0x3f45a2){if('string'!=typeof _0x3f45a2)throw new _0x4d38da('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3f45a2);}updateCommentThread({channelId:_0xbecc3e=ii,threadId:_0x1af50c,context:_0x5335bb,unlinkedAt:_0x45aed9,attributes:_0x1cfe3d,isFromAdapter:_0x5cdfbb=!0x1}){return this['fire'](ai('updateCommentThread',_0xbecc3e),{'channelId':_0xbecc3e,'threadId':_0x1af50c,'context':_0x5335bb,'unlinkedAt':_0x45aed9,'attributes':_0x1cfe3d,'isFromAdapter':_0x5cdfbb}),this['getCommentThread'](_0x1af50c);}getCommentThread(_0x13aa76){if('string'!=typeof _0x13aa76)throw new _0x4d38da('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x13aa76);}fetchCommentThread({channelId:_0x5385d5,threadId:_0x548abd}={}){const _0x5bfed5=this['getCommentThread'](_0x548abd);if(_0x5bfed5)return Promise['resolve'](_0x5bfed5);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4d38da('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5385d5,'threadId':_0x548abd})['then'](_0x29efac=>this['hasCommentThread'](_0x548abd)?this['getCommentThread'](_0x548abd):_0x29efac?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5385d5},_0x29efac)):void 0x0)['catch'](_0x1ed5ef=>{throw console['error'](_0x1ed5ef),new _0x4d38da('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x48b7f8,skipNotAttached:_0x4e0ba9=!0x1,skipEmpty:_0x38678a=!0x1,toJSON:_0x1686ba=!0x1}={}){const _0x473198=[];for(const _0x1c3345 of this['_threads']['values']())_0x48b7f8&&_0x1c3345['channelId']!==_0x48b7f8||_0x4e0ba9&&!_0x1c3345['isAttached']||_0x38678a&&0x0===_0x1c3345['length']||_0x473198['push'](_0x1c3345);return _0x1686ba?_0x473198['map'](_0x3268b9=>_0x3268b9['toJSON']()):_0x473198;}getAnnotationForCommentThread(_0x3fa50f){const _0x43bfaf=this['_threadToController']['get'](_0x3fa50f);return _0x43bfaf&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x43bfaf['view'])||null;}getCommentThreadForAnnotation(_0x362eeb){const _0x26b22f=this['_viewToController']['get'](_0x362eeb['innerView']);return _0x26b22f?_0x26b22f['model']:null;}setActiveCommentThread(_0x5e4ed0){const _0x212032=this['context']['plugins']['get'](ti);if(!_0x5e4ed0)return void(this['activeCommentThread']&&_0x212032['deactivateAll']());const _0x4e8c3d=this['getCommentThread'](_0x5e4ed0);if(!_0x4e8c3d)throw new _0x4d38da('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5e4ed0});if(!this['_threadToController']['has'](_0x4e8c3d))throw new _0x4d38da('commentsrepository-active-not-attached',null,{'threadId':_0x5e4ed0});const _0x227c46=_0x212032['getByInnerView'](this['_threadToController']['get'](_0x4e8c3d)['view']);_0x212032['activate'](_0x227c46);}switchReadOnly(_0x1becec,_0x59006f){_0x1becec?this['_readOnlyChannels']['add'](_0x59006f):this['_readOnlyChannels']['delete'](_0x59006f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x7ed4c2){return this['_readOnlyChannels']['has'](_0x7ed4c2)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x3c1ad2,_0x3ffe80){return new bt(_0x3c1ad2,_0x3ffe80);}setPermissions(_0x456e1a,_0x567e25=ii){this['_permissions']['set'](_0x567e25,_0x456e1a),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x5c520a=ii){return this['_permissions']['has'](_0x5c520a)?this['_permissions']['get'](_0x5c520a):ei;}_addCommentThread({channelId:_0x21707a,threadId:_0x2526a3,comments:_0x3502ce,unlinkedAt:_0x36eaa1,resolvedAt:_0x51ab37,resolvedBy:_0x321be4,target:_0x1eebed,context:_0x1af2b7,attributes:_0x311b04,isFromAdapter:_0x151951,isResolvable:_0x64016c,isSubmitted:_0x3c47bf}){if('string'!=typeof _0x2526a3)throw new _0x4d38da('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2526a3});if(this['hasCommentThread'](_0x2526a3))throw new _0x4d38da('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2526a3});const _0x88a48=new ri(this,{'channelId':_0x21707a,'id':_0x2526a3,'context':_0x1af2b7,'attributes':_0x311b04,'unlinkedAt':_0x36eaa1,'resolvedAt':_0x51ab37,'resolvedBy':_0x321be4?this['context']['plugins']['get'](_0x2c9993)['getUser'](_0x321be4):null,'isResolvable':_0x64016c,'isSubmitted':_0x3c47bf||_0x151951});this['_threads']['set'](_0x2526a3,_0x88a48);for(const _0x272d2b of _0x3502ce)_0x88a48['_add'](this['_createNewComment']({'threadId':_0x2526a3,..._0x272d2b}));return _0x1eebed&&_0x88a48['attachTo'](_0x1eebed),_0x151951||!_0x88a48['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x21707a,'threadId':_0x2526a3});}_submitCommentThread({channelId:_0x17234b,threadId:_0x1aa973}){if(!this['hasCommentThread'](_0x1aa973))throw new _0x4d38da('commentsrepository-missing-comment-thread',this);const _0x574350=this['getCommentThread'](_0x1aa973);if(_0x574350['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x39eca3,comments:_0x1614ca,resolvedAt:_0x16e127,resolvedBy:_0x25e162,context:_0xbdc69b,attributes:_0x344bc2}=_0x574350,_0x118d21=this['context']['plugins']['get']('PendingActions'),_0xad8ba9=_0x118d21['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x17234b,'threadId':_0x39eca3,'comments':_0x1614ca['map'](_0x1b143e=>_0x1b143e['toJSON']()),'resolvedAt':_0x16e127,'resolvedBy':_0x25e162?_0x25e162['id']:_0x25e162,'context':_0xbdc69b,'attributes':_0x344bc2})['then'](({comments:_0xf904e4})=>{_0x118d21['remove'](_0xad8ba9);for(const _0x59fb62 of _0xf904e4)this['_updateComment']({'channelId':_0x17234b,'threadId':_0x1aa973,'commentId':_0x59fb62['commentId'],'createdAt':_0x59fb62['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1a37b4=>{throw console['error'](_0x1a37b4),new _0x4d38da('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x2ffe18,target:_0x36c9ca}){const _0x26d6a4=this['getCommentThread'](_0x2ffe18);if(!_0x26d6a4)throw new _0x4d38da('commentsrepository-attach-missing-comment-thread',this);const _0xcc8371=this['context']['plugins']['get']('PendingActions'),_0x4579b7=this['context']['plugins']['get'](ti),_0x1f8fb3=this['_createCommentThreadView'](_0x26d6a4),_0x36e7e5=new bt(_0x26d6a4,_0x1f8fb3);let _0x3882b3=null;_0x1f8fb3['on']('change:isDirty',(_0x13f050,_0x1c9716,_0x2c994d)=>{_0x2c994d?_0x3882b3=_0xcc8371['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3882b3&&(_0xcc8371['remove'](_0x3882b3),_0x3882b3=null);}),this['_threadToController']['set'](_0x26d6a4,_0x36e7e5),this['_viewToController']['set'](_0x1f8fb3,_0x36e7e5);const _0x3741ef=new qt(this['context']['locale'],_0x1f8fb3);_0x3741ef['bind']('length')['to'](_0x1f8fb3),_0x3741ef['bind']('isDirty')['to'](_0x1f8fb3,'isDirty',_0x1f8fb3,'length',(_0x252843,_0x1ce4b1)=>_0x252843||!_0x1ce4b1),_0x3741ef['bind']('isActive')['to'](_0x1f8fb3),_0x3741ef['type']='comment';const _0x588a66=new $t({'view':_0x3741ef,'target':_0x36c9ca,'type':'comment','isVisible':!_0x26d6a4['archivedAt']&&!!('function'==typeof _0x36c9ca?_0x36c9ca():_0x36c9ca)});return _0x1f8fb3['on']('escape',()=>{_0x588a66['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1f8fb3,_0x588a66),_0x4579b7['add'](_0x588a66),_0x588a66;}_bindAnnotationToEditors(_0x23d39a,_0x2f7478){this['listenTo'](_0x23d39a,'editorReady',(_0x4397b9,_0x3cdfa8)=>{const _0x4697a1=_0x3cdfa8['ui']['view']['body']['bodyCollectionContainer'];_0x2f7478['focusableElements']['add'](_0x4697a1),this['context']instanceof _0x5696da&&this['context']['ui']['focusTracker']['add'](_0x4697a1);},{'priority':'highest'}),this['listenTo'](_0x23d39a,'editorDestroyed',(_0x53b314,_0x265ed5)=>{const _0x4c3f0f=_0x265ed5['ui']['view']['body']['bodyCollectionContainer'];_0x2f7478['focusableElements']['has'](_0x4c3f0f)&&_0x2f7478['focusableElements']['remove'](_0x4c3f0f),this['context']instanceof _0x5696da&&this['context']['ui']['focusTracker']['remove'](_0x4c3f0f);});}_unbindEditors(_0x42f416){this['stopListening'](_0x42f416,'editorReady'),this['stopListening'](_0x42f416,'editorDestroyed');}_createCommentThreadView(_0x14a56e){const _0x36aa2f=this['context']['plugins']['get'](_0x2c9993),{config:_0x253e34,locale:_0x3032da}=this['context'],_0x59c644=_0x5f2125(_0x253e34['get']('locale'),_0x3032da);return new(0x0,(_0x253e34['get']('comments'))['CommentThreadView'])(_0x3032da,_0x14a56e,_0x36aa2f['me'],{'editorConfig':{..._0x253e34['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x253e34['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x253e34['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x253e34['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x253e34['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x59c644,'CommentView':_0x253e34['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x344e51,channelId:_0xbff4b,resolvedAt:_0x22433c,resolvedBy:_0x291296,isFromAdapter:_0x592a9f}){if(!this['hasCommentThread'](_0x344e51))throw new _0x4d38da('commentsrepository-missing-comment-thread',null,{'threadId':_0x344e51});const _0x44542b=this['getCommentThread'](_0x344e51);if(_0x44542b['isResolved'])throw new _0x4d38da('commentsrepository-resolved-comment-thread',null,{'threadId':_0x344e51});const _0x390560=this['context']['plugins']['get'](_0x2c9993);if(_0x44542b['resolvedBy']=_0x390560['getUser'](_0x291296),_0x44542b['resolvedAt']=_0x22433c,_0x592a9f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3cbc19=this['context']['plugins']['get']('PendingActions'),_0x1a00d2=_0x3cbc19['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xbff4b,'threadId':_0x344e51})['then'](({resolvedAt:_0x483ddd,resolvedBy:_0x3b8639})=>{_0x3cbc19['remove'](_0x1a00d2),_0x44542b['resolvedBy']['id']!==_0x3b8639&&(_0x44542b['resolvedBy']=_0x390560['getUser'](_0x3b8639)),_0x44542b['resolvedAt']=_0x483ddd;})['catch'](_0x42a97c=>{throw console['error'](_0x42a97c),new _0x4d38da('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x53e4ec,channelId:_0x3d1c0c,isFromAdapter:_0x13e380}){if(!this['hasCommentThread'](_0x53e4ec))throw new _0x4d38da('commentsrepository-missing-comment-thread',null,{'threadId':_0x53e4ec});const _0x176f73=this['getCommentThread'](_0x53e4ec);if(!_0x176f73['isResolved'])throw new _0x4d38da('commentsrepository-reopen-comment-thread',null,{'threadId':_0x53e4ec});if(_0x176f73['resolvedBy']=null,_0x176f73['resolvedAt']=null,_0x13e380||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x59e102=this['context']['plugins']['get']('PendingActions'),_0xbbf325=_0x59e102['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3d1c0c,'threadId':_0x53e4ec})['then'](()=>_0x59e102['remove'](_0xbbf325))['catch'](_0x1b1b89=>{throw console['error'](_0x1b1b89),new _0x4d38da('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x28d452,isFromAdapter:_0x3671bf}){const _0x1def32=this['getCommentThread'](_0x28d452);if(!_0x1def32)throw new _0x4d38da('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x28d452),this['_threads']['delete'](_0x28d452),!_0x1def32['isSubmitted']||_0x3671bf||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1f5a1c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3a6630}=_0x1def32,_0x2af919=_0x1f5a1c['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3a6630,'threadId':_0x28d452})['then'](()=>_0x1f5a1c['remove'](_0x2af919))['catch'](_0x52cfde=>{throw console['error'](_0x52cfde),new _0x4d38da('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x5c9fc3,unlinkedAt:_0x586f3c,context:_0x442c21,attributes:_0xc6b4b1,isFromAdapter:_0x2683a2}){if('string'!=typeof _0x5c9fc3)throw new _0x4d38da('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5c9fc3});if(!this['hasCommentThread'](_0x5c9fc3))throw new _0x4d38da('commentsrepository-missing-comment-thread',null,{'threadId':_0x5c9fc3});const _0x28d604=this['getCommentThread'](_0x5c9fc3);let _0x51aba1=!0x1;if(void 0x0!==_0x442c21&&_0x28d604['context']!==_0x442c21&&(_0x28d604['context']=_0x442c21,_0x51aba1=!0x0),void 0x0!==_0x586f3c&&_0x28d604['unlinkedAt']!==_0x586f3c&&(_0x28d604['unlinkedAt']=_0x586f3c,_0x51aba1=!0x0),_0xc6b4b1&&!_0x7a5633(_0xc6b4b1,_0x28d604['attributes'])&&(_0x28d604['attributes']=_0xc6b4b1,_0x51aba1=!0x0),!_0x51aba1)return Promise['resolve']();if(!_0x28d604['isSubmitted']||_0x2683a2||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4d7e5a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3126c6}=_0x28d604,_0x579678=_0x4d7e5a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x3126c6,'threadId':_0x5c9fc3,'context':_0x442c21,'unlinkedAt':_0x586f3c,'attributes':_0xc6b4b1})['then'](()=>_0x4d7e5a['remove'](_0x579678))['catch'](_0xfa95c0=>{throw console['error'](_0xfa95c0),new _0x4d38da('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x5e3feb){const _0x4f6f12=this['context']['plugins']['get'](ti),_0x2ac84a=this['getCommentThread'](_0x5e3feb);if(_0x2ac84a['_isAttached']=!0x1,this['_threadToController']['has'](_0x2ac84a)){const _0x67ec44=this['_threadToController']['get'](_0x2ac84a),_0x3dc105=_0x67ec44['view'],_0x301579=_0x4f6f12['getByInnerView'](_0x3dc105);this['_threadToController']['delete'](_0x2ac84a),this['_viewToController']['delete'](_0x3dc105),_0x301579&&_0x4f6f12['remove'](_0x301579),_0x67ec44['destroy'](),_0x3dc105['destroy']()['then'](()=>{this['_unbindEditors'](_0x3dc105);});}}_updateActiveAnnotation({threadId:_0x1f93a9,resolvedAt:_0x389cfa,unlinkedAt:_0xad525e}){const _0x24c4ff=!!_0x389cfa,_0x13bc32=this['context']['plugins']['get'](ti),_0x3db2ea=this['getCommentThread'](_0x1f93a9);if(this['_threadToController']['has'](_0x3db2ea)){const _0x428e82=this['_threadToController']['get'](_0x3db2ea)['view'],_0x4acab4=_0x13bc32['getByInnerView'](_0x428e82);_0x4acab4&&(_0x24c4ff&&_0x13bc32['_removeActiveAnnotation'](_0x4acab4),_0xad525e?_0x4acab4['isVisible']=!0x1:_0x4acab4['refreshVisibility']());}}_getExternalAuthor(_0x271fc9){const _0xa12261=this['context']['plugins']['get'](_0x2c9993),_0x5c210d=_0x43ffc0('external:'+_0x271fc9),_0x43be63=_0xa12261['getUser'](_0x5c210d);return _0x43be63||_0xa12261['addUser']({'id':_0x5c210d,'name':_0x271fc9});}_createNewComment({threadId:_0x171c24,commentId:_0x39b49c=_0x579286(),content:_0x40bc22,authorId:_0x20adb6,createdAt:_0x5be08c,attributes:_0xadb21c}){if('string'!=typeof _0x39b49c)throw new _0x4d38da('commentsrepository-invalid-commentid');if('string'!=typeof _0x20adb6)throw new _0x4d38da('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x40bc22||!_0x40bc22['trim']())throw new _0x4d38da('commentsrepository-invalid-comment-content');const _0x3833f2=this['context']['plugins']['get'](_0x2c9993)['getUser'](_0x20adb6);if(!_0x3833f2)throw new _0x4d38da('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x20adb6});let _0x40410b=null,_0x48f983=_0x5be08c;return _0xadb21c?.['@external']&&(_0x40410b=this['_getExternalAuthor'](_0xadb21c['@external']['authorName']),_0x48f983=new Date(_0xadb21c['@external']['createdAt'])),new hi(this,{'threadId':_0x171c24,'id':_0x39b49c,'author':_0x40410b||_0x3833f2,'creator':_0x3833f2,'content':_0x40bc22,'createdAt':_0x5be08c,'authoredAt':_0x48f983,'attributes':_0xadb21c});}_addComment(_0x30f6aa){let {threadId:_0x2682a8,content:_0x5bf7ae,attributes:_0x3999e,isFromAdapter:_0x357269}=_0x30f6aa;const _0x10c0aa=this['getCommentThread'](_0x30f6aa['threadId']);if(!_0x10c0aa)throw new _0x4d38da('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x23632f=this['_createNewComment'](_0x30f6aa),{id:_0x32b924}=_0x23632f;if(_0x10c0aa['_add'](_0x23632f),_0x357269||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x10c0aa['isSubmitted'])return Promise['resolve']();const _0x3540c7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x262172}=_0x10c0aa,_0x11c441=_0x3540c7['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3999e||(_0x3999e={}),this['adapter']['addComment']({'channelId':_0x262172,'threadId':_0x2682a8,'commentId':_0x32b924,'content':_0x5bf7ae,'attributes':_0x3999e})['then'](_0x504717=>{_0x3540c7['remove'](_0x11c441),_0x504717&&this['_updateComment']({'channelId':_0x262172,'threadId':_0x2682a8,'commentId':_0x32b924,'createdAt':_0x504717['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2b277b=>{throw console['error'](_0x2b277b),new _0x4d38da('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x5be1c0,commentId:_0x381234,content:_0x5b6188,createdAt:_0x511d30,attributes:_0x14b25f,isFromAdapter:_0x207d06}){if(void 0x0!==_0x5b6188&&('string'!=typeof _0x5b6188||!_0x5b6188['trim']()['length']))throw new _0x4d38da('commentsrepository-update-comment-invalid-content');const _0x2dd3bc=this['getCommentThread'](_0x5be1c0),_0x5b48a3=_0x2dd3bc['getComment'](_0x381234);if(!_0x5b48a3)throw new _0x4d38da('commentsrepository-update-missing-comment',this);let _0x13936e=!0x1;if(_0x5b6188&&_0x5b6188!==_0x5b48a3['content']&&(_0x5b48a3['isEditable']||_0x207d06)&&(_0x5b48a3['content']=_0x5b6188,_0x13936e=!0x0),_0x511d30&&_0x511d30!==_0x5b48a3['createdAt']&&(_0x5b48a3['createdAt']=_0x511d30,_0x5b48a3['isExternal']||(_0x5b48a3['authoredAt']=_0x511d30),_0x13936e=!0x0),_0x14b25f&&!_0x7a5633(_0x14b25f,_0x5b48a3['attributes'])&&(_0x5b48a3['attributes']=_0x14b25f,_0x13936e=!0x0),!_0x13936e)return Promise['resolve']();if(_0x2dd3bc['fire']('commentUpdated'),_0x207d06||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x53365d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x47b9b8}=this['getCommentThread'](_0x5b48a3['threadId']),_0x2af750=_0x53365d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x47b9b8,'threadId':_0x5be1c0,'commentId':_0x381234,'content':_0x5b6188,'attributes':_0x14b25f})['then'](()=>_0x53365d['remove'](_0x2af750))['catch'](_0x48064e=>{throw console['error'](_0x48064e),new _0x4d38da('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x2c1a5b,commentId:_0x546831,isFromAdapter:_0x541748}){const _0x402881=this['getCommentThread'](_0x2c1a5b),_0x3ecb13=_0x402881['getComment'](_0x546831);if(!_0x3ecb13)throw new _0x4d38da('commentsrepository-remove-missing-comment',this);if(_0x402881['_remove'](_0x3ecb13),_0x541748||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x143de0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4a33f5}=_0x402881,_0x233721=_0x143de0['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4a33f5,'threadId':_0x2c1a5b,'commentId':_0x546831})['then'](()=>_0x143de0['remove'](_0x233721))['catch'](_0x85a501=>{throw console['error'](_0x85a501),new _0x4d38da('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x4b300e,_0x4fa5cc){super();const _0x2fd6a8=_0x4fa5cc['isResolvable'];this['channelId']=_0x4fa5cc['channelId'],this['id']=_0x4fa5cc['id'],this['comments']=new _0x261848(),this['_repository']=_0x4b300e,this['_isAttached']=!0x1,this['_isSubmitted']=_0x4fa5cc['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4b300e,'_permissions',_0x4b300e,'_readOnlyChannels',()=>_0x4b300e['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4b300e,'_permissions',()=>_0x4b300e['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4b300e,'_permissions',()=>{const _0x4efad3=_0x4b300e['getPermissions'](this['channelId']);return _0x4efad3['write']||_0x4efad3['admin'];}),this['bind']('isResolvable')['to'](_0x4b300e,'_permissions',()=>_0x2fd6a8&&_0x4b300e['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x4fa5cc['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x3e304f,_0x55f55b)=>_0x3e304f?_0x55f55b?_0x3e304f<_0x55f55b?_0x3e304f:_0x55f55b:_0x3e304f:_0x55f55b),this['set']('unlinkedAt',_0x4fa5cc['unlinkedAt']||null),this['set']('resolvedAt',_0x4fa5cc['resolvedAt']||null),this['set']('resolvedBy',_0x4fa5cc['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x57d342=>!!_0x57d342),this['set']('attributes',_0x4fa5cc['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x22fd53,_0x6c98cc)=>_0x22fd53+_0x6c98cc['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x225c52,id:_0x499fa1}=this;this['_repository']['fire'](ai('submitCommentThread',_0x225c52),{'channelId':_0x225c52,'threadId':_0x499fa1});}setUnlinkedAt(_0x30be3f){this['_update']({'unlinkedAt':_0x30be3f});}['resolve']({resolvedAt:_0x54a58=new Date(),resolvedBy:_0x3c22ba='',isFromAdapter:_0x391713=!0x1}={}){const _0x3a80f3=this['_repository']['context']['plugins']['get'](_0x2c9993)['me'],{channelId:_0xf1fc8d,id:_0x493ffd}=this;this['_repository']['fire'](ai('resolveCommentThread',_0xf1fc8d),{'channelId':_0xf1fc8d,'threadId':_0x493ffd,'resolvedAt':_0x54a58,'resolvedBy':_0x3c22ba||_0x3a80f3['id'],'isFromAdapter':_0x391713});}['reopen']({isFromAdapter:_0x3504f9=!0x1}={}){const {channelId:_0x50c7e9,id:_0x3979e2}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x50c7e9),{'channelId':_0x50c7e9,'threadId':_0x3979e2,'isFromAdapter':_0x3504f9});}setContext(_0x3da399){this['context']||this['_update']({'context':_0x3da399});}setAttribute(_0x35374f,_0x7c064b){const _0x3653b1=_0x323998(this['attributes']);_0x35bdfd(_0x3653b1,_0x35374f,_0x7c064b),this['_update']({'attributes':_0x3653b1});}removeAttribute(_0x30d019){const _0x33872a=_0x323998(this['attributes']);_0x2ce193(_0x33872a,_0x30d019),this['_update']({'attributes':_0x33872a});}['remove']({isFromAdapter:_0x35f649=!0x1}={}){const {channelId:_0x5c66ee,id:_0x1df91c}=this;this['_repository']['fire'](ai('removeCommentThread',_0x5c66ee),{'channelId':_0x5c66ee,'threadId':_0x1df91c,'isFromAdapter':_0x35f649});}attachTo(_0x2f1016){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2f1016});}addComment(_0x202067){const {channelId:_0x4ce7e4,id:_0x564279}=this;this['_repository']['fire'](ai('addComment',_0x4ce7e4,_0x564279),Object['assign']({'channelId':_0x4ce7e4,'threadId':_0x564279},_0x202067));}getComment(_0x5bd9b9){if('string'!=typeof _0x5bd9b9)throw new _0x4d38da('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5bd9b9});return this['comments']['get'](_0x5bd9b9);}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'](_0x1ddd06=>_0x1ddd06['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2b5907){return this['listenTo'](_0x2b5907,'change:authoredAt',()=>{const _0x3f37ca=this['_findOptimalIndex'](_0x2b5907),_0xa1238=this['comments'];_0x3f37ca-0x1!=_0xa1238['getIndex'](_0x2b5907)&&_0x3f37ca+0x1!=_0xa1238['getIndex'](_0x2b5907)&&(this['_remove'](_0x2b5907),this['_add'](_0x2b5907));}),this['comments']['add'](_0x2b5907,this['_findOptimalIndex'](_0x2b5907));}_update(_0x12ca8d){const {channelId:_0x4de243,id:_0x166cff}=this;this['_repository']['fire'](ai('updateCommentThread',_0x4de243),{..._0x12ca8d,'channelId':_0x4de243,'threadId':_0x166cff});}['_remove'](_0xfe4af9){return this['stopListening'](_0xfe4af9),_0xfe4af9['destroy'](),this['comments']['remove'](_0xfe4af9);}_findOptimalIndex(_0x18078a){const _0x19c274=this['comments']['find'](_0x358043=>new Date(_0x358043['authoredAt'])['getTime']()>new Date(_0x18078a['authoredAt'])['getTime']());return _0x19c274?this['comments']['getIndex'](_0x19c274):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x2bf181,_0x114f7b){super();const _0x456fc7=_0x2bf181['context']['plugins']['get'](_0x2c9993)['me'],_0x169dda=_0x2bf181['getCommentThread'](_0x114f7b['threadId']),_0x3da5c8=0x0===_0x169dda['comments']['length'],_0x1a8119=_0x456fc7===_0x114f7b['author'];this['id']=_0x114f7b['id'],this['threadId']=_0x114f7b['threadId'],this['author']=_0x114f7b['author'],this['creator']=_0x114f7b['creator'],this['set']('content',_0x114f7b['content']),this['createdAt']=_0x114f7b['createdAt']||new Date(),this['set']('authoredAt',_0x114f7b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x169dda,'resolvedAt'),this['set']('attributes',_0x114f7b['attributes']||{}),this['bind']('isEditable')['to'](_0x2bf181,'_permissions',()=>{const _0xdb5a4f=_0x2bf181['getPermissions'](_0x169dda['channelId'])['write'],_0x414d25=_0x2bf181['getPermissions'](_0x169dda['channelId'])['modifyAll'];return _0x1a8119&&_0xdb5a4f||!_0x1a8119&&_0x414d25;}),this['bind']('isRemovable')['to'](_0x169dda,'isRemovable',_0x2bf181,'_permissions',_0x272f5a=>{const _0x400f63=_0x2bf181['getPermissions'](_0x169dda['channelId'])['write'],_0x460583=_0x2bf181['getPermissions'](_0x169dda['channelId'])['modifyAll'];return _0x1a8119&&_0x400f63||_0x272f5a&&_0x3da5c8||!_0x1a8119&&_0x460583&&!_0x3da5c8;}),this['bind']('isReadOnly')['to'](_0x169dda,'isReadOnly'),this['_repository']=_0x2bf181;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x25696b){const _0x39c5e6=document['createElement']('div');return _0x39c5e6['innerHTML']=_0x25696b,_0x39c5e6['textContent']['length'];}(this['content']),0xc8);}update(_0x2e2644){const {threadId:_0x4fae4d,id:_0x5ba883}=this;if(!this['_repository']['hasCommentThread'](_0x4fae4d))throw new _0x4d38da('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x497b17}=this['_repository']['getCommentThread'](_0x4fae4d);this['_repository']['fire'](ai('updateComment',_0x497b17,_0x4fae4d),{'channelId':_0x497b17,'threadId':_0x4fae4d,'commentId':_0x5ba883,..._0x2e2644});}setAttribute(_0x690cf7,_0x2eee74){const _0x4523a4=_0x323998(this['attributes']);_0x35bdfd(_0x4523a4,_0x690cf7,_0x2eee74),this['update']({'attributes':_0x4523a4});}removeAttribute(_0x40780d){const _0x74be13=_0x323998(this['attributes']);_0x2ce193(_0x74be13,_0x40780d),this['update']({'attributes':_0x74be13});}['remove'](_0x3fefd5={}){if(!_0x3fefd5['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x363ec5,id:_0x97334f}=this;if(!this['_repository']['hasCommentThread'](_0x363ec5))throw new _0x4d38da('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2a3272}=this['_repository']['getCommentThread'](_0x363ec5);this['_repository']['fire'](ai('removeComment',_0x2a3272,_0x363ec5),{'channelId':_0x2a3272,'threadId':_0x363ec5,'commentId':_0x97334f,..._0x3fefd5});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x557dd3,..._0x945ecf){for(const _0x4a7126 of _0x945ecf)void 0x0!==_0x4a7126&&(_0x557dd3+=':'+String(_0x4a7126));return _0x557dd3;}var ci=class extends _0x1a9525{constructor(_0x588ea4){super(_0x588ea4),this['set']('hasContent',!0x1);}['refresh'](){const _0x3f637a=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x45cf12 of _0x3f637a['getRanges']())if(this['_hasContent'](_0x45cf12))return void(this['hasContent']=!0x0);}execute({threadId:_0x136e5a=_0x579286(),ranges:_0x281db0,comment:_0x45ae1c}={}){const _0x1eb33b=this['editor']['model'],_0x32a4b7=_0x281db0??Array['from'](_0x1eb33b['document']['selection']['getRanges']()),_0x14a07c=[];for(const _0x2412f5 of _0x32a4b7)this['_hasContent'](_0x2412f5)&&_0x14a07c['push'](this['_trimToContent'](_0x2412f5));if(!_0x14a07c['length'])throw new _0x4d38da('addcommentthreadcommand-incorrect-ranges',null);_0x45ae1c&&this['_createCommentThread'](_0x136e5a,_0x45ae1c),this['_createMarkersFromRanges'](_0x136e5a,_0x14a07c,!!_0x45ae1c);}_createMarkersFromRanges(_0x264e21,_0x3bf212,_0x34441b){this['editor']['model']['change'](_0x15afd5=>{for(const _0x23cab9 of _0x3bf212){const _0x565833='comment:'+_0x264e21+':'+_0x579286()['substr'](0x1,0x5);_0x15afd5['addMarker'](_0x565833,{'range':_0x23cab9,'usingOperation':_0x34441b,'affectsData':_0x34441b});}});}_createCommentThread(_0x775c9c,_0x57c725){const _0x5b3bb9=this['editor']['plugins']['get']('CommentsRepository'),_0x2a054b=this['editor']['config']['get']('collaboration.channelId'),_0x495b81=this['editor']['plugins']['get']('Users')['me'];if(!_0x495b81)throw new _0x4d38da('addcommentthreadcommand-user-not-found',null);_0x5b3bb9['addCommentThread']({'threadId':_0x775c9c,'channelId':_0x2a054b,'comments':[{'authorId':_0x495b81['id'],'content':_0x57c725,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x29d6ab){for(const _0x53dcdc of _0x29d6ab['getItems']())if(this['_itemIsContent'](_0x53dcdc))return!0x0;return!0x1;}_itemIsContent(_0x28e79e){return _0x28e79e['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x28e79e)&&!_0x28e79e['is']('element','tableCell');}_trimToContent(_0x5aae91){const _0x177b19=_0x1df87a=>!this['_itemIsContent'](_0x1df87a['item']),_0x3dca70=_0x5aae91['start']['getLastMatchingPosition'](_0x177b19),_0x2ad392=_0x5aae91['end']['getLastMatchingPosition'](_0x177b19,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3dca70,_0x2ad392);}},di=class extends _0x3fdf7a{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d6c77){super(_0x1d6c77),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x14d4aa=this['editor'],_0x4cd2ca=_0x14d4aa['model']['document']['selection'],_0xb48d44=_0x56eba8(()=>this['refreshSelectedViews'](),0xa);_0x4cd2ca['on']('change:range',(_0x185674,_0x9fede7)=>{_0x9fede7['directChange']&&(_0xb48d44['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x14d4aa['editing']['view']['document'],'change:isFocused',(_0x1dd32f,_0x5de69c,_0x19dcab)=>{_0x19dcab&&_0xb48d44();}),this['listenTo'](_0x14d4aa['ui']['focusTracker'],'change:isFocused',(_0xd9f1ef,_0x1c3400,_0x5415ff)=>{_0x5415ff||this['fire']('blur',{'isAnnotationTracked':_0xe34e4b=>this['_editorAnnotationsData']['has'](_0xe34e4b['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x2443b7){if(this['_editorAnnotations']['has'](_0x2443b7['view']))return;this['_editorAnnotations']['add'](_0x2443b7['view']),this['editor']['ui']['focusTracker']['add'](_0x2443b7['view']['element']);const _0x42b3dc=this['editor']['plugins']['get'](ti);this['listenTo'](_0x42b3dc['collection'],'remove',(_0x50a5cb,_0x409586)=>{this['editor']['ui']['focusTracker']['remove'](_0x409586['view']['element']),this['_editorAnnotations']['delete'](_0x409586['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x2a6c3a){if('function'!=typeof _0x2a6c3a)throw new _0x4d38da('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2a6c3a);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x4c9ed2,annotations:_0x155123}){const _0x3e233c=[],_0x5b9b8f=this['editor']['model']['document']['selection'],_0x287fb1=Array['from'](_0x5b9b8f['getRanges']());for(const [_0x21fb3c,_0x1c555e]of this['_editorAnnotationsData']){const _0x35b47f=_0x1d2f98(_0x1c555e),_0x595d36=_0x155123['getByInnerView'](_0x21fb3c);_0x35b47f&&_0x595d36&&_0x3e233c['push']({'annotation':_0x595d36,'range':_0x35b47f});}function _0x1d2f98(_0x3141bc){for(const _0x1f603f of _0x3141bc)for(const _0x28410b of _0x287fb1)if(_0x1f603f['containsRange'](_0x28410b,!_0x5b9b8f['isCollapsed']))return _0x1f603f;return null;}const _0x5ab4d6=new Map(Array['from'](_0x155123,(_0xea580c,_0x52a237)=>[_0xea580c,_0x52a237]));return _0x3e233c['sort']((_0x37de9b,_0x4c7c32)=>{const _0x3b08c4=_0x37de9b['range'],_0x1fce03=_0x4c7c32['range'];if(!_0x3b08c4['isEqual'](_0x1fce03)){if(_0x3b08c4['containsRange'](_0x1fce03,!0x0))return 0x1;if(_0x1fce03['containsRange'](_0x3b08c4,!0x0))return-0x1;}return _0x37de9b['annotation']==_0x4c9ed2?-0x1:_0x4c7c32['annotation']==_0x4c9ed2?0x1:(_0x5ab4d6['get'](_0x37de9b['annotation'])??0x0)-(_0x5ab4d6['get'](_0x4c7c32['annotation'])??0x0);})['map'](_0x4f0bdd=>_0x4f0bdd['annotation']);}get _editorAnnotationsData(){const _0x3f022a=new Map();for(const _0x5a5bcc of Array['from'](this['_dataCollectors']))for(const [_0xce1b8d,_0x227f3d]of _0x5a5bcc())_0x3f022a['set'](_0xce1b8d,_0x227f3d);return _0x3f022a;}},li=class extends _0x3fdf7a{afterInit(){const _0x105fd6=this['editor'];_0x105fd6['plugins']['has']('RestrictedEditingModeEditing')&&_0x105fd6['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x3fdf7a{constructor(_0x234844){super(_0x234844),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x73f93f=this['editor'],_0x1404d0=_0x73f93f['commands']['get']('importWord'),_0xaca672=_0x73f93f['plugins']['get'](_0x2c9993);_0x1404d0&&(_0x1404d0['on']('execute',(_0x31f49c,[,_0x23535f])=>{_0x23535f['collaboration_features']={'comments':!0x0,'user_id':_0xaca672['me']['id']};},{'priority':_0x52033f['high']+0xa}),this['listenTo'](_0x1404d0,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0xc7ac1c,_0x57bf24){const {comment_threads:_0x1695fa}=_0x57bf24;_0x1695fa&&_0x1695fa['forEach'](({thread_id:_0x317467,comments:_0x2ae4a6,is_resolved:_0xd9c2f0})=>{const _0x1218a9=new Date(),_0x5ece9c=_0x2ae4a6['map'](({author:_0x2fd13e,content:_0x1c5bce,created_at:_0x3ac75f})=>({'content':_0x1c5bce,'authorId':this['editor']['plugins']['get'](_0x2c9993)['me']['id'],'createdAt':_0x1218a9,'attributes':{'@external':{'authorName':_0x2fd13e,'createdAt':_0x3ac75f?new Date(_0x3ac75f):new Date(),'source':'importWord'}}})),_0x21c7d1=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x21c7d1,'threadId':_0x317467,'comments':_0x5ece9c,'resolvedAt':_0xd9c2f0?_0x1218a9:null});});}},ui=class extends _0x3fdf7a{constructor(_0x3c0b9b){super(_0x3c0b9b),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x100c7c=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x100c7c,'contentInsertion',(_0x31d88c,_0x1cca8b)=>this['_removeMarkersWithoutThreads'](_0x1cca8b['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x5630e8){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5630e8;const _0xb80d2b=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4cbe07 of _0x5630e8['keys']()){const [_0x40c287,_0x5917fc]=_0x4cbe07['split'](':');'comment'!=_0x40c287||_0xb80d2b['hasCommentThread'](_0x5917fc)||_0x5630e8['delete'](_0x4cbe07);}return _0x5630e8;}_registerMarkerInClipboardPipeline(){const _0x2d130f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x503ceb=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x503ceb&&_0x2d130f['_registerMarkerToCopy']('comment',_0x503ceb);}_mapCommentsCopyConfigToRegisterConfiguration(_0x497c17){switch(_0x497c17){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x147a11){const _0x58dd45=_0x147a11['split'](':');return{'group':_0x58dd45[0x0],'id':_0x58dd45[0x1],'part':_0x58dd45[0x2]};}var pi=class extends _0x3fdf7a{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1de0e3,_0xd6b634)=>{if(!_0xd6b634['options']['showCommentHighlights'])return null;if(_0xd6b634['options']['ignoreResolvedComments']){const {id:_0x54d675}=fi(_0x1de0e3['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x54d675)?.['isResolved']&&_0x1de0e3['item'])return _0xd6b634['consumable']['consume'](_0x1de0e3['item'],'addMarker:'+_0x1de0e3['markerName']),_0xd6b634['consumable']['consume'](_0x1de0e3['item'],'removeMarker:'+_0x1de0e3['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x85527f=>{_0x85527f['on']('addMarker:comment',(_0x2124c3,_0x3f8378,_0x76e662)=>{if(!_0x76e662['options']['showCommentHighlights'])return;const _0xf1047a=_0x3f8378['item'];if(!_0xf1047a)return;const _0x4d63fc=_0x76e662['mapper']['toViewElement'](_0xf1047a);this['editor']['model']['schema']['isObject'](_0xf1047a)&&_0x4d63fc&&!_0x4d63fc['getCustomProperty']('widget')&&_0x4d63fc['is']('containerElement')&&Ct(_0x4d63fc,_0x76e662['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3bde2e,{writer:_0x2a0554,options:_0x312b24})=>{if(!_0x312b24['showCommentHighlights'])return null;const _0x2b5a1b=_0x2a0554['createContainerElement']('div'),_0x40e68f=_0x2a0554['createEmptyElement']('hr');return _0x2a0554['addClass']('ck-horizontal-line',_0x2b5a1b),_0x2a0554['insert'](_0x2a0554['createPositionAt'](_0x2b5a1b,0x0),_0x40e68f),_0x2b5a1b;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x13331e,{writer:_0x28736f,options:_0x5104fa})=>{if(!_0x5104fa['showCommentHighlights'])return null;const _0x2a7d0e=_0x28736f['createContainerElement']('span'),_0x497836=_0x28736f['createEmptyElement']('img');return _0x28736f['addClass']('image-inline',_0x2a7d0e),_0x28736f['insert'](_0x28736f['createPositionAt'](_0x2a7d0e,0x0),_0x497836),_0x2a7d0e;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x41bd2f,{writer:_0x34a0b0,options:_0x599f3d})=>{if(_0x599f3d['showCommentHighlights'])return _0x34a0b0['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4f3564,_0x299efc,_0x26f5f9)=>{_0x26f5f9['options']['showCommentHighlights']&&_0x4f3564['stop']();},{'priority':'high'});}},wi=class extends _0x3fdf7a{static get requires(){return[oi,di,_0x2c9993,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x337452){super(_0x337452),this['set']('isThreadsLoadingPaused',!0x0),_0x337452['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x38957b,_0xd36dca,_0x46f786,_0x1030f1)=>{const _0x1c9a1e=_0x337452['plugins']['get'](oi),_0x44e412=_0x46f786?fi(_0x46f786)['id']:null;_0x337452['model']['change'](()=>{if(_0x44e412){const _0x5db3f4=this['getAllMarkersForId'](_0x44e412);for(const _0x2d25c4 of _0x5db3f4)_0x337452['editing']['reconvertMarker'](_0x2d25c4);}if(_0x1030f1){const {id:_0x38c40f}=fi(_0x1030f1),_0x47808d=_0x1c9a1e['getCommentThread'](_0x38c40f);if(_0x47808d&&_0x47808d['unlinkedAt'])return;if(_0x47808d&&!_0x47808d['isAttached'])return;const _0x3194af=this['getAllMarkersForId'](_0x38c40f);for(const _0x3d7160 of _0x3194af)_0x337452['editing']['reconvertMarker'](_0x3d7160);}}),_0x44e412&&this['scrollToThreadMarker'](_0x44e412);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x3ab9b7=this['editor'],_0x187243=_0x3ab9b7['plugins']['get'](oi),_0x4bf281=_0x3ab9b7['config']['get']('collaboration.channelId'),_0x31f9b5=_0x187243['getCommentThreads']()['filter'](_0x102db8=>_0x102db8['channelId']!==_0x4bf281);_0x3ab9b7['commands']['add']('addCommentThread',new ci(_0x3ab9b7)),this['listenTo'](_0x3ab9b7,'change:isReadOnly',(_0xd3aa09,_0x571197,_0x451f85)=>{_0x187243['switchReadOnly'](_0x451f85,_0x3ab9b7['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x187243,gi('addCommentThread',_0x4bf281),(_0x53f02d,{threadId:_0x9b4d66})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x9b4d66)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x9b4d66);}),this['listenTo'](_0x187243,gi('removeCommentThread',_0x4bf281),(_0x3e25e3,{threadId:_0x100385})=>{_0x3ab9b7['model']['enqueueChange']({'isUndoable':!0x1},_0x1f4d6f=>{const _0x2e0ed5=this['getAllMarkersForId'](_0x100385);for(const _0x55f9b8 of _0x2e0ed5)_0x1f4d6f['removeMarker'](_0x55f9b8);});}),this['listenTo'](_0x187243,gi('resolveCommentThread',_0x4bf281),(_0x17fbab,{threadId:_0x52f904})=>{this['_reconvertMarkers'](_0x52f904);const _0xe4c5b=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0xe4c5b['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x52f904)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x187243,gi('reopenCommentThread',_0x4bf281),(_0x5beeaf,{threadId:_0x5905b9})=>{this['_reconvertMarkers'](_0x5905b9);},{'priority':'low'}),this['listenTo'](_0x187243,gi('addComment',_0x4bf281),(_0xa950e0,{threadId:_0x55790b,isFromAdapter:_0x22dca7})=>{const _0x2871c9=this['getAllMarkersForId'](_0x55790b);!_0x22dca7&&0x0!=_0x2871c9['length']&&_0x187243['hasCommentThread'](_0x55790b)&&0x1===_0x187243['getCommentThread'](_0x55790b)['length']&&_0x3ab9b7['model']['enqueueChange']({'isUndoable':!0x1},_0x15be96=>{for(const _0x2c62b0 of _0x2871c9)_0x15be96['updateMarker'](_0x2c62b0,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x31f9b5);}afterInit(){!async function(_0x2d2f0d){const _0x412205='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x1edf3a=0x793c8,_0x50f6d7={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x15ef8e(_0x39a3ad){const _0x12dd5f=new window['Promise'](_0x15533e=>{_0x39a3ad['once']('ready',_0x15533e);}),_0x4a0acd=window['Date']['now'](),_0x3c91bb=_0x39a3ad['config']['get']('licenseKey');async function _0x4105c5(){let _0x468e2c,_0x342d8d=null,_0x172223=null;try{return'GPL'==_0x3c91bb?'NotAllowed':(_0x468e2c=_0x584756(),_0x468e2c?(_0x468e2c['usageEndpoint']&&(_0x172223=_0x6797cf(_0x468e2c['usageEndpoint'],_0x468e2c['jti'])),await _0x217eba()?_0x297444()?_0x1597ef()?'Expired':_0x2284e8()?('evaluation'==_0x468e2c['licenseType']&&(_0x342d8d=_0xd18ce3('EvaluationLimit')),await _0x493d6a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1597ef(){const _0x342753=['evaluation','trial']['includes'](_0x468e2c['licenseType'])?_0x4a0acd/0x3e8:0xe10*_0x1edf3a;return _0x468e2c['exp']<_0x342753;}function _0x297444(){const _0x307645=_0x468e2c['features'];if(!_0x307645)return!0x1;if(_0x307645['includes']('*'))return!0x0;if(_0x307645['includes']('CMT'))return!0x0;if(_0x307645['includes']('TRILIUM')&&_0xd1c647())return!0x0;if(_0x307645['includes']('RCMT')){if(_0x32a9db())return!0x0;if(_0x1bfda7()||_0x529f42())return!0x0;}return!0x1;}function _0x2284e8(){const _0x4c1544=_0x468e2c['licensedHosts'];if(!_0x4c1544||0x0==_0x4c1544['length'])return!0x0;const {hostname:_0x90e848}=new URL(window['location']['href']);if(_0x4c1544['includes'](_0x90e848))return!0x0;const _0x8eb848=_0x90e848['split']('.');return _0x4c1544['filter'](_0x183c28=>_0x183c28['includes']('*'))['map'](_0xfc1f74=>_0xfc1f74['split']('.'))['filter'](_0x1b2537=>_0x1b2537['length']<=_0x8eb848['length'])['map'](_0x5d56ec=>Array(_0x8eb848['length']-_0x5d56ec['length'])['fill']('*'===_0x5d56ec[0x0]?'*':'')['concat'](_0x5d56ec))['some'](_0x1cb504=>_0x8eb848['every']((_0x32cb35,_0x4e516e)=>_0x1cb504[_0x4e516e]===_0x32cb35||'*'===_0x1cb504[_0x4e516e]));}function _0x493d6a(){return _0x342d8d&&_0x172223?new window['Promise']((_0x35114a,_0x3ee32a)=>{_0x342d8d['then'](_0x35114a,_0x3ee32a),_0x172223['then'](_0x32b256=>{'Valid'!=_0x32b256&&_0x35114a(_0x32b256);},_0x3ee32a);}):_0x342d8d||_0x172223||'Valid';}}function _0x6797cf(_0x3db61c,_0x35a13c){return new window['Promise'](_0x1df98a=>{if(_0x1cbde0())return _0x1df98a('Valid');_0x451c47(),_0x39a3ad['decorate']('_sendUsageRequest');let _0x889bd3=!0x1;const _0x7cd2be=_0x579286();function _0x1f7ac3(_0x3c1303){return!!_0x3c1303&&('object'==typeof _0x3c1303||'function'==typeof _0x3c1303)&&'function'==typeof _0x3c1303['then']&&'function'==typeof _0x3c1303['catch'];}function _0x4a9e06(_0x5418a1){_0x2f9dd1(_0x5418a1)['then'](_0x47077b=>_0x47077b&&'ok'==_0x47077b['status']?_0x2e8ae7(_0x10e467(_0x7cd2be+_0x35a13c))!=_0x47077b['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x17c950=>(_0x5c3811(),_0x17c950),()=>{const _0x50954f=_0x1c0cea();return null==_0x50954f?(_0x5c3811(),'Valid'):_0x4a0acd-_0x50954f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1df98a)['catch'](()=>{_0x1df98a('UsageLimit');});const _0x33a5dd=0x36ee80;function _0x5c3811(){const _0x15b1a0='llct-'+_0x2e8ae7(_0x10e467(_0x3db61c)),_0x30b4a=_0x4a268c(_0x2e8ae7(window['Math']['ceil'](_0x4a0acd/_0x33a5dd)));window['localStorage']['setItem'](_0x15b1a0,_0x30b4a);}function _0x1c0cea(){const _0xfb236d='llct-'+_0x2e8ae7(_0x10e467(_0x3db61c)),_0x46272d=window['localStorage']['getItem'](_0xfb236d);return _0x46272d?window['parseInt'](_0x4a268c(_0x46272d),0x10)*_0x33a5dd:null;}function _0x2f9dd1(_0x4727f8){return new window['Promise']((_0x45594e,_0x26ea1c)=>{_0x4727f8['then'](_0x45594e,_0x26ea1c),window['setTimeout'](_0x26ea1c,0x1d4c0);});}}_0x39a3ad['on']('_sendUsageRequest',(_0x3f587f,_0x21cfe0)=>{if(_0x21cfe0[0x0]!=_0x3db61c)return _0x1df98a('UsageLimit');_0x21cfe0[0x1]={..._0x21cfe0[0x1],'requestId':_0x7cd2be};},{'priority':'high'}),_0x39a3ad['on']('_sendUsageRequest',_0x18adf4=>{_0x1f7ac3(_0x18adf4['return'])&&(_0x889bd3=!0x0,_0x4a9e06(_0x18adf4['return']));},{'priority':'low'}),_0x12dd5f['then'](()=>{_0x889bd3||_0x1df98a('UsageLimit');});});function _0x1cbde0(){return'auto'==_0x39a3ad['editing']['view']['_overlayModeHint'];}function _0x451c47(){_0x39a3ad['editing']['view']['_overlayModeHint']='auto';}}function _0xd18ce3(_0xa3c13c){const _0x9f3b15=[new window['Promise'](_0x2e2b73=>setTimeout(_0x2e2b73,0x93ecc)),_0x12dd5f['then'](()=>new window['Promise'](_0x15622b=>{let _0x398dc1=0x0;_0x39a3ad['model']['on']('applyOperation',(_0x4cf7b6,_0x4970a9)=>{_0x4970a9[0x0]['isDocumentOperation']&&_0x398dc1++,0x5e8==_0x398dc1&&(_0x15622b(),_0x4cf7b6['off']());});}))];return window['Promise']['race'](_0x9f3b15)['then'](()=>_0xa3c13c);}async function _0x54fc5d(){await _0x12dd5f,_0x39a3ad['model']['change']=_0x1a295e,_0x39a3ad['model']['enqueueChange']=_0x1a295e,_0x39a3ad['enableReadOnlyMode']('model');}function _0xd1c647(){return window['glob']&&window['glob']['triliumVersion'];}function _0x32a9db(){return _0x5b3d6e('WebSocketGateway')&&'connected'==_0x30cec5('WebSocketGateway')['state'];}function _0x1bfda7(){return _0x5b3d6e('RevisionViewerIntegration');}function _0x529f42(){return _0x5b3d6e('TrackChangesDataGetter');}function _0x303b80(_0xb75870){const _0x1fd124=_0x35fa4f();_0x39a3ad[_0x1fd124]='commentsLicenseKey'+_0xb75870,'Valid'!=_0xb75870&&_0x54fc5d();}function _0x35fa4f(){const _0x5cd381=window['String'](window['performance']['now']())['replace']('.','');let _0x1e8002='m';for(let _0x5e69b5=0x0;_0x5e69b5<_0x5cd381['length'];_0x5e69b5+=0x2){let _0x57714f=window['parseInt'](_0x5cd381['substring'](_0x5e69b5,_0x5e69b5+0x2));_0x57714f>=0x3e&&(_0x57714f-=0x3e),_0x1e8002+=_0x412205[_0x57714f];}return _0x1e8002;}function _0x584756(){const _0x50aa92=_0x3c91bb['split']('.');if(0x3!=_0x50aa92['length'])return null;return _0x1872c9(_0x50aa92[0x1]);function _0x1872c9(_0x2495da){const _0x33b159=_0x2d5596(_0x2495da);return _0x33b159&&_0x741ab4()?_0x33b159:null;function _0x741ab4(){const _0x282d1d=_0x33b159['jti'],_0x18b4d7=window['parseInt'](_0x282d1d['substring'](_0x282d1d['length']-0x8),0x10),_0x57b227={..._0x33b159,'jti':_0x282d1d['substring'](0x0,_0x282d1d['length']-0x8)};return delete _0x57b227['vc'],_0x10e467(_0x57b227)==_0x18b4d7;}}}async function _0x217eba(){let _0x50c162=!0x0;try{const [_0x56ad2f,_0x19fb3c,_0x4fd6d5]=_0x3c91bb['split']('.');return _0x39fd16(_0x56ad2f),await _0x37a360(_0x56ad2f,_0x19fb3c,_0x4fd6d5),_0x50c162;}catch{return!0x1;}function _0x39fd16(_0x2c0074){const _0x1e3086=_0x2d5596(_0x2c0074);_0x1e3086&&'ES256'==_0x1e3086['alg']||(_0x50c162=!0x1);}async function _0x37a360(_0x22073a,_0x400a93,_0x3ad20f){const _0x46cb92=window['Uint8Array']['from'](_0x412749(_0x3ad20f),_0x244d5d=>_0x244d5d['charCodeAt'](0x0)),_0xbbc381=new window['TextEncoder']()['encode'](_0x22073a+'.'+_0x400a93),_0x5c2fb5=window['crypto']['subtle'];if(!_0x5c2fb5)return;const _0x122354=await _0x5c2fb5['importKey']('jwk',_0x50f6d7,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5c2fb5['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x122354,_0x46cb92,_0xbbc381)||(_0x50c162=!0x1);}}function _0x2d5596(_0x322c21){return _0x322c21['startsWith']('ey')?JSON['parse'](_0x412749(_0x322c21)):null;}function _0x412749(_0x3efba7){return window['atob'](_0x3efba7['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x10e467(_0x15aa02){let _0x3be773=0x1505;function _0x17e4bb(_0x3d5117){for(let _0x103827=0x0;_0x103827<_0x3d5117['length'];_0x103827++){const _0x54858b=_0x3d5117['charCodeAt'](_0x103827);_0x3be773=(_0x3be773<<0x5)+_0x3be773+_0x54858b,_0x3be773&=_0x3be773;}}function _0x5b421a(_0xeb168a){Array['isArray'](_0xeb168a)?_0xeb168a['forEach'](_0x5b421a):_0xeb168a&&'object'==typeof _0xeb168a?Object['entries'](_0xeb168a)['sort']()['forEach'](([_0x36afc9,_0x11d0c6])=>{_0x17e4bb(_0x36afc9),_0x5b421a(_0x11d0c6);}):_0x17e4bb(window['String'](_0xeb168a));}return _0x5b421a(_0x15aa02),_0x3be773>>>0x0;}function _0x2e8ae7(_0x1da8aa){return _0x1da8aa['toString'](0x10)['padStart'](0x8,'0');}function _0x4a268c(_0x5de176){return _0x5de176['split']('')['reverse']()['join']('');}function _0x5b3d6e(_0x8376fe){return _0x39a3ad['plugins']['has'](_0x8376fe);}function _0x30cec5(_0x37c037){return _0x39a3ad['plugins']['get'](_0x37c037);}function _0x1a295e(){}_0x303b80(await _0x4105c5());}_0x15ef8e(_0x2d2f0d['editor']);}(this);}destroy(){const _0x5b76c9=this['editor']['plugins']['get'](oi),_0x2b5a7d=this['editor']['config']['get']('collaboration.channelId');for(const _0x54e127 of _0x5b76c9['getCommentThreads']({'channelId':_0x2b5a7d}))_0x5b76c9['_detachCommentThread'](_0x54e127['id']),_0x5b76c9['_threads']['delete'](_0x54e127['id']);super['destroy']();}['hasMarkerForId'](_0x37552b){return this['getAllMarkersForId'](_0x37552b)['length']>0x0;}getAllMarkersForId(_0x3e113f){const _0x49084d=[];for(const _0x1b8b1c of this['editor']['model']['markers'])_0x1b8b1c['name']['startsWith']('comment:'+_0x3e113f)&&_0x49084d['push'](_0x1b8b1c);return _0x49084d;}['scrollToThreadMarker'](_0x1ee2eb){setTimeout(()=>{const _0x1e71d9=this['_getTargetForId'](_0x1ee2eb);_0x1e71d9&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x1ee2eb&&_0x461c21({'target':_0x1e71d9[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x2f2ed6){this['editor']['model']['change'](()=>{for(const _0x39aae1 of this['getAllMarkersForId'](_0x2f2ed6))this['editor']['editing']['reconvertMarker'](_0x39aae1);});}_attachArchivedThread(_0x4695ba){const _0x31916d=this['editor']['plugins']['get'](oi),_0x5939dd=this['editor']['plugins']['get'](di),_0x2203ab=_0x31916d['getCommentThread'](_0x4695ba);if(!_0x2203ab['isAttached']){const _0x7d2dba=_0x2203ab['attachTo'](()=>this['_getTargetForId'](_0x2203ab['id']));_0x5939dd['registerAnnotation'](_0x7d2dba),_0x2203ab['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x1b8eee=this['editor'],_0x258519=_0x1b8eee['plugins']['get'](_0x2c9993);_0x1b8eee['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3bd64c,_0x3803ae)=>{const {id:_0x2b1384}=fi(_0x3bd64c['markerName']),_0x227e18=_0x1b8eee['plugins']['get'](oi)['getCommentThread'](_0x2b1384),_0x235d89=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x2b1384;let _0x1a8c6b;if(_0x227e18&&_0x227e18['isResolved']&&!_0x235d89&&_0x3bd64c['item'])return _0x3803ae['consumable']['consume'](_0x3bd64c['item'],'addMarker:'+_0x3bd64c['markerName']),_0x3803ae['consumable']['consume'](_0x3bd64c['item'],'removeMarker:'+_0x3bd64c['markerName']),null;const _0x2065d6=['ck-comment-marker'];return _0x235d89&&_0x2065d6['push']('ck-comment-marker--active'),_0x1a8c6b=_0x227e18?.['length']?_0x227e18['comments']['first']['author']['id']:_0x258519['me']['id'],{'classes':_0x2065d6,'attributes':{'data-comment':_0x2b1384,'data-author-id':_0x1a8c6b}};}}),_0x1b8eee['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1ea51a,{options:_0x119dc8})=>{if(_0x119dc8['showCommentHighlights'])return null;const _0x222a0b=_0x1b8eee['plugins']['get'](oi),_0x2b12e9=_0x1b8eee['model']['markers']['get'](_0x1ea51a),{id:_0x4628cf,part:_0x525688}=fi(_0x1ea51a);return _0x2b12e9&&!_0x2b12e9['affectsData']||_0x119dc8['ignoreResolvedComments']&&_0x222a0b['getCommentThread'](_0x4628cf)?.['isResolved']?null:{'group':'comment','name':_0x525688?_0x4628cf+':'+_0x525688:_0x4628cf};}}),_0x1b8eee['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x404979,{writer:_0x25621d})=>_0x25621d['createElement']('$marker',{'data-name':'comment:'+_0x404979['getAttribute']('id')})}),_0x1b8eee['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x26e115=this['editor'],_0x5b3bf2=_0x26e115['plugins']['get'](oi),_0x54c943=new Set(),_0x298813=new Set();_0x26e115['model']['document']['registerPostFixer'](_0x95d2ed=>{let _0x438f01=!0x1;for(const {name:_0x428458,data:_0x32cd88}of _0x26e115['model']['document']['differ']['getChangedMarkers']()){const {group:_0x382c56,id:_0x3f866e}=fi(_0x428458);let _0x338149=_0x32cd88['newRange'];if('comment'!==_0x382c56||!_0x338149)continue;const _0x4274e3='$graveyard'===_0x338149['root']['rootName'];_0x4274e3||(_0x338149=_i(_0x338149,_0x26e115['model']),!_0x338149||_0x338149['isCollapsed']||!_0x32cd88['newRange']||_0x338149['isEqual'](_0x32cd88['newRange']))?_0x26e115['model']['hasContent'](_0x338149)&&!_0x4274e3?this['isThreadsLoadingPaused']?_0x54c943['add'](_0x428458):this['_handleThreadMarker'](_0x428458,_0x3f866e):(_0x298813['add'](_0x428458),_0x54c943['delete'](_0x428458),_0x95d2ed['removeMarker'](_0x428458),_0x438f01=!0x0):(_0x95d2ed['updateMarker'](_0x428458,{'range':_0x338149}),_0x438f01=!0x0);}return _0x438f01;}),this['on']('change:isThreadsLoadingPaused',(_0x47efe7,_0x57d77b,_0x4f4803)=>{if(!_0x4f4803&&_0x54c943['size'])for(const _0x3ece5f of _0x54c943){const {id:_0x1ce74e}=fi(_0x3ece5f);_0x54c943['delete'](_0x3ece5f),_0x26e115['model']['markers']['get'](_0x3ece5f)&&this['_handleThreadMarker'](_0x3ece5f,_0x1ce74e);}}),this['listenTo'](_0x26e115['model']['document'],'change',()=>{for(const {name:_0x2fe457,data:{newRange:_0x18b069}}of _0x26e115['model']['document']['differ']['getChangedMarkers']()){const {group:_0xac3d59,id:_0x585213}=fi(_0x2fe457);if('comment'!==_0xac3d59)continue;const _0x110b36=_0x5b3bf2['getCommentThread'](_0x585213),_0x1b9a20=this['hasMarkerForId'](_0x585213);_0x110b36&&(!_0x110b36['_hasTargetInContent']&&_0x18b069&&_0x26e115['editing']['view']['once']('render',()=>{const _0x149dfa=_0x26e115['plugins']['get'](ti),_0x79f524=_0x5b3bf2['_threadToController']['get'](_0x110b36)['view'];_0x149dfa['getByInnerView'](_0x79f524)['refreshVisibility']();},{'priority':'low'}),_0x110b36['_hasTargetInContent']=_0x1b9a20||!!_0x18b069),_0x18b069||(_0x298813['add'](_0x2fe457),_0x54c943['delete'](_0x2fe457));}for(const _0x12223c of _0x298813){const {id:_0x1fa266}=fi(_0x12223c),_0x51e29e=_0x5b3bf2['getCommentThread'](_0x1fa266);if(_0x54c943['delete'](_0x12223c),!_0x51e29e)continue;const _0x20e00c=this['hasMarkerForId'](_0x1fa266);_0x20e00c||_0x51e29e['isSubmitted']?_0x20e00c||_0x51e29e['unlinkedAt']||_0x51e29e['setUnlinkedAt'](new Date()):_0x51e29e['remove']();}_0x298813['clear']();});}_handleInitialThreads(_0x4ab346){_0x4ab346['forEach'](_0x2f0d2b=>{_0x2f0d2b['unlinkedAt']&&this['_attachArchivedThread'](_0x2f0d2b['id']);});}_getTargetForId(_0x6e1bb8){const _0x5206bb=this['editor'],_0x4c4899=this['getAllMarkersForId'](_0x6e1bb8);return _0x398587(_0x5206bb['editing'],_0x4c4899);}_getTextContext(_0x32739c){const _0xb88c04=this['getAllMarkersForId'](_0x32739c);let _0x22deee='',_0x55d818=!0x1;for(const _0x1336a1 of _0xb88c04){const _0x189ca5=_0x1336a1['getRange']();for(const _0x1debf8 of Array['from'](_0x189ca5['getItems']()))_0x1debf8['is']('$textProxy')?(_0x22deee&&_0x55d818&&(_0x22deee+='\x20',_0x55d818=!0x1),_0x22deee+=_0x1debf8['data']):_0x55d818=!0x0;_0x55d818=!0x0;}return _0x22deee['substring'](0x0,0x96);}_attachMarkerToThread(_0x11c74d,_0xf325ec){const _0x177fca=this['editor'],_0x51a620=_0x177fca['plugins']['get'](oi);let _0x4b9064=_0x51a620['getCommentThread'](_0xf325ec);const _0x456747=_0x177fca['config']['get']('collaboration.channelId'),_0x428832=_0x177fca['plugins']['get'](di);return _0x4b9064&&(_0x4b9064['unlinkedAt']&&_0x4b9064['setUnlinkedAt'](null),_0x4b9064['isAttached'])||(this['getAllMarkersForId'](_0xf325ec)[0x0]['managedUsingOperations']?_0x51a620['fetchCommentThread']({'channelId':_0x456747,'threadId':_0xf325ec})['then'](_0x1f8d34=>{if('destroyed'!==_0x177fca['state']){if(_0x4b9064=_0x1f8d34,_0x4b9064&&!_0x4b9064['isAttached']){const _0x17b10c=_0x4b9064['attachTo'](()=>this['_getTargetForId'](_0xf325ec));_0x428832['registerAnnotation'](_0x17b10c),_0x4b9064['isResolved']&&this['_reconvertMarkers'](_0xf325ec);}else{if(!_0x4b9064){const _0xd624e4=this['getAllMarkersForId'](_0xf325ec);_0x177fca['model']['change'](_0x47a0ea=>{for(const _0x2104dc of _0xd624e4)_0x47a0ea['removeMarker'](_0x2104dc);});}}}}):_0x177fca['editing']['view']['once']('render',()=>{if(_0x51a620['getCommentThread'](_0xf325ec))return;const _0xe477e7=_0x177fca['plugins']['get'](ti);_0x4b9064=_0x51a620['openNewCommentThread']({'channelId':_0x456747,'threadId':_0xf325ec,'target':()=>this['_getTargetForId'](_0xf325ec),'context':{'type':'text','value':this['_getTextContext'](_0xf325ec)}});const _0x262801=_0x51a620['_threadToController']['get'](_0x4b9064)['view'],_0x32ff7c=_0xe477e7['getByInnerView'](_0x262801);_0x32ff7c&&_0x428832['registerAnnotation'](_0x32ff7c);},{'priority':'low'})),_0x4b9064;}['_handleThreadMarker'](_0x4e3000,_0x4b9ad7){const _0x5b464a=this['_attachMarkerToThread'](_0x4e3000,_0x4b9ad7);_0x5b464a&&!_0x5b464a['context']&&_0x5b464a['setContext']({'type':'text','value':this['_getTextContext'](_0x4b9ad7)});}_initAriaMarkerChangeAnnouncements(){const _0x350a59=this['editor'];_0x54398c(_0x350a59['model'],({left:_0x1de13f,entered:_0x12c013})=>{for(const _0xca4539 of _0x1de13f)if(Ai(_0xca4539)){_0x350a59['ui']['ariaLiveAnnouncer']['announce'](Et(_0x350a59['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4ca422 of _0x12c013)if(Ai(_0x4ca422)){_0x350a59['ui']['ariaLiveAnnouncer']['announce'](Et(_0x350a59['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x55d878(_0x1691ba)));break;}});}};function gi(_0x4ac689,_0x5eab06){return _0x5eab06?_0x4ac689+':'+_0x5eab06:_0x4ac689;}function _i(_0x23e927,_0xea956c){const _0x18f083=_0xea956c['schema'],_0x107c22=_0xea956c['createRange'](_0x23e927['start']);for(const _0x437c3c of _0x23e927['getWalker']()){const {type:_0x4c0948,item:_0x329907,nextPosition:_0x27c516}=_0x437c3c;if('text'===_0x4c0948||_0x18f083['isObject'](_0x329907)){const _0x5c2570=_0xea956c['createPositionBefore'](_0x329907);_0x107c22['isCollapsed']&&(_0x107c22['start']=_0x5c2570),_0x107c22['end']=_0x27c516;}}return _0x107c22;}function Ai(_0x2b1527){return'comment'===fi(_0x2b1527['name'])['group'];}var vi=class extends _0x3fdf7a{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,wi,di,ti];}get CommentsListView(){return Lt;}get CommentThreadInputView(){return xt;}init(){const _0x4c1771=this['editor'],_0x2e7a4c=_0x4c1771['plugins']['get'](oi),_0x40debd=_0x4c1771['plugins']['get'](wi),_0x41e0b1=_0x4c1771['plugins']['get'](ti),_0x547e05=_0x4c1771['plugins']['get'](di);_0x4c1771['ui']['componentFactory']['add']('comment',()=>{const _0x5848ce=this['_createUIButton'](_0x390df4);return _0x5848ce['tooltip']=!0x0,_0x5848ce;}),_0x4c1771['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x547e05['addSourceCollector'](()=>{const _0xad59b2=[];for(const [_0x214529,_0x1b6cef]of _0x2e7a4c['_threadToController']){const _0x2d5895=_0x40debd['getAllMarkersForId'](_0x214529['id']),_0x35d5ec=_0x2d5895['map'](_0x22f182=>_0x22f182['getRange']());_0x2d5895['length']>0x0&&_0xad59b2['push']([_0x1b6cef['view'],_0x35d5ec]);}return _0xad59b2;}),this['listenTo'](_0x41e0b1,'change:activeAnnotations',(_0x4ed3f2,_0x5d67a7,_0x49f93c)=>{const _0x1ed2aa=Array['from'](_0x49f93c)['map'](_0x3ae5ed=>_0x3ae5ed['innerView'])['find'](_0x5f3b76=>_0x2e7a4c['_viewToController']['has'](_0x5f3b76));if(!_0x1ed2aa)return void(_0x40debd['activeMarker']=null);const _0x5c9263=_0x2e7a4c['_viewToController']['get'](_0x1ed2aa)['model']['id'],_0x456c1c='comment:'+_0x5c9263;_0x5c9263&&_0x40debd['hasMarkerForId'](_0x5c9263)?_0x40debd['activeMarker']=_0x456c1c:_0x40debd['activeMarker']&&(_0x40debd['activeMarker']=null);}),this['listenTo'](_0x2e7a4c,'removeCommentThread',(_0x850bd2,{threadId:_0x468f63,isFromAdapter:_0x5db77c})=>{!_0x5db77c&&_0x4c1771['ui']['focusTracker']['isFocused']&&_0x40debd['hasMarkerForId'](_0x468f63)&&_0x4c1771['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2e7a4c,'addComment',(_0x7c2097,{threadId:_0x2cdeab,isFromAdapter:_0xb92045})=>{!_0xb92045&&_0x40debd['hasMarkerForId'](_0x2cdeab)&&_0x2e7a4c['hasCommentThread'](_0x2cdeab)&&0x1===_0x2e7a4c['getCommentThread'](_0x2cdeab)['length']&&(_0x4c1771['editing']['view']['focus'](),_0x7c2097['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x48f63f=[this['editor']];for(const _0x27ad7f of _0x48f63f){let _0x37cc8c;for(const _0x1dc9b2 in _0x27ad7f){const _0xfda8a5=_0x1dc9b2,_0x78d891=_0x27ad7f[_0xfda8a5];if('commentsLicenseKeyValid'==_0x78d891||'commentsLicenseKeyInvalid'==_0x78d891||'commentsLicenseKeyExpired'==_0x78d891||'commentsLicenseKeyDomainLimit'==_0x78d891||'commentsLicenseKeyNotAllowed'==_0x78d891||'commentsLicenseKeyEvaluationLimit'==_0x78d891||'commentsLicenseKeyUsageLimit'==_0x78d891){delete _0x27ad7f[_0xfda8a5],_0x37cc8c=_0x78d891,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x37cc8c&&_0x27ad7f['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x37cc8c&&_0x27ad7f['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x37cc8c&&_0x27ad7f['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x37cc8c&&_0x27ad7f['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x37cc8c&&_0x27ad7f['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x37cc8c&&_0x27ad7f['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x3bd891){const _0x2134c7=this['editor'],_0x393401=new _0x3bd891(_0x2134c7['locale']),_0x341c14=_0x2134c7['commands']['get']('addCommentThread');return _0x393401['set']({'label':Et(_0x2134c7['locale'],'Comment'),'icon':_0x526159}),_0x393401['bind']('isEnabled')['to'](_0x341c14,'isEnabled',_0x341c14,'hasContent',(_0x1a0734,_0x454b43)=>_0x1a0734&&_0x454b43),this['listenTo'](_0x393401,'execute',()=>{_0x341c14['execute']();}),_0x393401;}},yi=class extends _0x3fdf7a{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x10ea72){super(_0x10ea72),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x11f9ad,_0x5351f1,_0x5743dd)=>{_0x5743dd?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x4392a5,_0x3498cc]of this['editor']['commands'])_0x3498cc['affectsData']&&'addCommentThread'!==_0x4392a5&&_0x3498cc['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4e5cfc=this['editor']['editing']['view']['document'];this['listenTo'](_0x4e5cfc,'cut',_0x3d3e8a=>_0x3d3e8a['stop'](),{'priority':'highest'}),this['listenTo'](_0x4e5cfc,'clipboardInput',_0x4864a1=>_0x4864a1['stop'](),{'priority':'highest'}),this['listenTo'](_0x4e5cfc,'delete',_0x3a895a=>_0x3a895a['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x5e2199,_0x55d21b]of this['editor']['commands'])_0x55d21b['affectsData']&&'addCommentThread'!==_0x5e2199&&_0x55d21b['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}},Ti=class extends _0x1432af{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x392b12){super(_0x392b12),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x376c66=this['context']['plugins']['get'](ti);this['listenTo'](_0x376c66,'_activateAnnotation',(_0x3a4e78,_0x1b7bc3)=>{for(const _0x2de3ec of this['activeUIs']){const _0x35c83a=this['_uis']['get'](_0x2de3ec);(0x0,this['uisData']['get'](_0x2de3ec)['filter'])(_0x1b7bc3)&&_0x35c83a['setActiveAnnotation'](_0x1b7bc3);}}),this['listenTo'](_0x376c66,'_deactivateAllAnnotations',()=>{for(const _0x4819d9 of this['activeUIs'])this['_uis']['get'](_0x4819d9)['setActiveAnnotation'](null);}),this['listenTo'](_0x376c66['_visibleAnnotations'],'add',(_0x50a9ac,_0x10a4f9)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x10a4f9);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x2314f7){return this['activeUIs']['has'](_0x2314f7);}activate(_0x5190cf,_0x4f9ce2=this['defaultFilter']){const _0x1fe751=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x5190cf))throw new _0x4d38da('annotationsuis-missing-ui',this,{'uiName':_0x5190cf});this['isActive'](_0x5190cf)&&this['deactivate'](_0x5190cf),this['activeUIs']['add'](_0x5190cf);const _0x548b8f=new Jt();Qt({'source':_0x1fe751['_visibleAnnotations'],'target':_0x548b8f,'filter':_0x4f9ce2}),this['uisData']['set'](_0x5190cf,{'collection':_0x548b8f,'filter':_0x4f9ce2});const _0x25e181=this['_uis']['get'](_0x5190cf);_0x25e181['attach'](_0x548b8f),this['listenTo'](_0x25e181,'change:activeAnnotation',(_0x1e7d10,_0x1ab9bf,_0x1c2ff9,_0xf714b4)=>{_0xf714b4&&_0x1fe751['_removeActiveAnnotation'](_0xf714b4),_0x1c2ff9&&_0x1fe751['_addActiveAnnotation'](_0x1c2ff9);});}deactivate(_0x1bd751){if(this['activeUIs']['delete'](_0x1bd751),!this['_uis']['has'](_0x1bd751))throw new _0x4d38da('annotationsuis-missing-ui',this,{'uiName':_0x1bd751});const _0x473b0f=this['_uis']['get'](_0x1bd751);_0x473b0f['detach'](),this['stopListening'](_0x473b0f),this['uisData']['get'](_0x1bd751)['collection']['destroy'](),this['uisData']['delete'](_0x1bd751);}switchTo(_0x500ad5){if(!this['_uis']['has'](_0x500ad5))throw new _0x4d38da('annotationsuis-missing-ui',this,{'uiName':_0x500ad5});const _0x52cffb=this['context']['plugins']['get'](ti),_0x5b5f3e=Array['from'](_0x52cffb['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x500ad5);const _0x3f68f1=this['_uis']['get'](_0x500ad5);_0x3f68f1['setActiveAnnotation'](_0x5b5f3e),_0x3f68f1['_setSelectedAnnotations']&&_0x5b5f3e&&_0x3f68f1['_setSelectedAnnotations']([_0x5b5f3e]);}deactivateAll(){for(const _0x2d9a01 of this['activeUIs'])this['deactivate'](_0x2d9a01);}register(_0x534296,_0x241305){if(this['_uis']['has'](_0x534296))throw new _0x4d38da('annotationsuis-register-already-registered');if('function'!=typeof _0x241305['attach']||'function'!=typeof _0x241305['detach']||'function'!=typeof _0x241305['setActiveAnnotation'])throw new _0x4d38da('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x534296,_0x241305);}refilterAnnotations(){const _0x2f75a2=this['context']['plugins']['get'](ti)['collection'],_0x4abb38=new Map(),_0x10e0ac=Array['from'](this['activeUIs']);for(const _0x1f234a of this['activeUIs']){const _0x426204=this['uisData']['get'](_0x1f234a)['collection'];for(const _0x29559a of _0x426204)_0x4abb38['set'](_0x29559a,_0x1f234a);}for(const _0x359fee of _0x2f75a2){const _0x3ee5a2=_0x4abb38['get'](_0x359fee);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x359fee);const _0x168e4a=_0x10e0ac['find'](_0x49e01f=>this['uisData']['get'](_0x49e01f)['filter'](_0x359fee));_0x3ee5a2!==_0x168e4a&&(_0x3ee5a2&&this['uisData']['get'](_0x3ee5a2)['collection']['remove'](_0x359fee),_0x168e4a&&this['uisData']['get'](_0x168e4a)['collection']['add'](_0x359fee));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x1fce89){const _0x2867e8=[];for(const _0x3c5240 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3c5240)['filter'])(_0x1fce89)&&_0x2867e8['push'](_0x3c5240);}if(_0x2867e8['length']>0x1)throw new _0x4d38da('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2867e8,'annotationType':_0x1fce89['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x56832f('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0xdbd779){super(_0xdbd779);const _0x260625=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 _0x32b87(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x260625['to']('class')],'style':{'minHeight':_0x260625['to']('minHeight',_0x2783e5=>'number'==typeof _0x2783e5?Ci(_0x2783e5+0xa):null)},'dir':_0xdbd779['uiLanguageDirection'],'role':'application','aria-label':Et(_0xdbd779,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0xdbd779,'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',_0x5ee97b=>{this['_updateItemPositionInFocusables'](_0x5ee97b['source']);}),this['list']['forEach'](_0x12b586=>{this['focusTracker']['add'](_0x12b586['element']),this['_updateItemPositionInFocusables'](_0x12b586);}),this['list']['on']('change',(_0x2036e,_0x4271e9)=>{for(const _0x4e9871 of _0x4271e9['removed'])this['focusTracker']['remove'](_0x4e9871['element']),this['focusables']['remove'](_0x4e9871);for(const _0x246988 of _0x4271e9['added'])this['focusTracker']['add'](_0x246988['element']),this['_updateItemPositionInFocusables'](_0x246988);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x5789d7){const _0x8ccb36=this['focusables']['getIndex'](_0x5789d7);let _0x5b8245,_0x36da03;for(const _0x2f6c7a of this['focusables'])if(_0x5789d7['top']<_0x2f6c7a['top']){_0x5b8245=_0x2f6c7a;break;}if(_0x36da03=_0x5b8245?this['focusables']['getIndex'](_0x5b8245):this['focusables']['length'],-0x1!==_0x8ccb36){if(_0x8ccb36===_0x36da03-0x1)return;this['focusables']['remove'](_0x5789d7),_0x36da03=_0x5b8245?this['focusables']['getIndex'](_0x5b8245):this['focusables']['length'];}this['focusables']['add'](_0x5789d7,_0x36da03);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x56832f('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x4aad60){super(_0x4aad60),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x3b4714,_0x3ade98)=>_0x3b4714+_0x3ade98),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5927ca=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5927ca['to']('isAnimationDisabled',_0x50a9a7=>_0x50a9a7?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5927ca['to']('top',_0x1e118b=>bi(_0x1e118b))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x3f8442=this['element']['clientHeight'];_0x3f8442&&(this['height']=_0x3f8442);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x1432af{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x455bf0){super(_0x455bf0),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 _0x4eb9cf=this['context']['config']['get']('sidebar.container');_0x4eb9cf&&this['setContainer'](_0x4eb9cf);}setContainer(_0x36f4a6){if(!Oi(_0x36f4a6))throw new _0x4d38da('sidebar-setcontainer-invalid-element');this['container']=_0x36f4a6;}_attachToContainer({viewClass:_0x256923='',spaceBetweenItems:_0x5ef57b=0x19}={}){if(!Oi(this['container']))throw new _0x4d38da('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x256923,this['_spaceBetweenItems']=_0x5ef57b;}['rearrange']({removedAnnotation:_0x3d3e34,previousAnnotation:_0x4a981e,nextAnnotation:_0x1c5544}){const _0x587c9a=this['getSidebarItemView'](_0x3d3e34);this['view']['list']['remove'](_0x587c9a),this['_destroySidebarItemView'](_0x3d3e34),_0x4a981e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4a981e)),_0x1c5544&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1c5544)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x13c417,activatedAnnotation:_0x19bbf0,disableAnimationOnActivatedAnnotation:_0x32429d}){if(this['_activeAnnotation']=_0x19bbf0,_0x13c417){_0x13c417['isActive']=!0x1;const _0x301f91=this['getSidebarItemView'](_0x13c417);_0x301f91&&_0x32429d&&(_0x301f91['isAnimationDisabled']=!0x1);}if(_0x19bbf0){const _0x1f347f=this['getSidebarItemView'](_0x19bbf0);_0x1f347f&&(_0x19bbf0['isActive']=!0x0,_0x32429d&&(_0x1f347f['isAnimationDisabled']=!0x0,_0x1f347f['top']+=0x1),this['_alignToTargetRect'](_0x1f347f));}}_detachFromContainer(_0x36b926){if(this['view']['element']['remove'](),_0x36b926){for(const _0x13a6a3 of _0x36b926)this['_destroySidebarItemView'](_0x13a6a3);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x31ccc6,_0x377c93){_0x377c93||(_0x377c93=_0x31ccc6['view']);const _0xd92bc4=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xd92bc4,_0x31ccc6),this['_annotationToSidebarItemView']['set'](_0x31ccc6,_0xd92bc4),_0xd92bc4['content']['add'](_0x377c93),this['listenTo'](_0x31ccc6['view'],'change:targetRect',(_0x34ec8f,_0x4d73f7,_0x4b78fb)=>{const _0x19f5c5=this['_getTargetTop'](_0x31ccc6,_0x4b78fb);_0xd92bc4['_targetTop']!=_0x19f5c5&&(_0xd92bc4['_targetTop']=_0x19f5c5,this['_setItemTop'](_0xd92bc4,_0x19f5c5));}),this['listenTo'](_0xd92bc4,'change:top',()=>{this['_recalculate'](_0xd92bc4,'top');}),this['listenTo'](_0xd92bc4,'change:bottom',()=>{this['_recalculate'](_0xd92bc4,'bottom');}),this['_alignToTargetRect'](_0xd92bc4);const _0x3a3f62=this['_getItemBefore'](_0xd92bc4);return _0x3a3f62&&this['_alignAfterItem'](_0x3a3f62,_0xd92bc4)||this['_alignToTargetRect'](_0xd92bc4),this['_updateLastItem'](),this['view']['list']['add'](_0xd92bc4),_0xd92bc4;}['_alignForTopChange'](_0x2e6a4d){if(!_0x2e6a4d['content']['length'])return;const _0x559f2c=this['_getItemBefore'](_0x2e6a4d);if(!_0x559f2c)return;const _0x547098=this['_sidebarItemViewToAnnotation']['get'](_0x559f2c),_0x31252c=this['_activeAnnotation'];_0x31252c&&_0x31252c===_0x547098?this['_alignAfterItem'](_0x559f2c,_0x2e6a4d):this['_alignBeforeItem'](_0x2e6a4d,_0x559f2c);}_alignForBottomChange(_0x3c1457){if(!_0x3c1457['content']['length'])return;const _0x4a2f4a=this['_getItemAfter'](_0x3c1457);if(!_0x4a2f4a)return;const _0x10b0e4=this['_sidebarItemViewToAnnotation']['get'](_0x4a2f4a),_0x157d65=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x168445=this['_activeAnnotation'];_0x168445&&_0x168445===_0x10b0e4&&_0x157d65?(this['_alignBeforeItem'](_0x4a2f4a,_0x3c1457),this['_alignAfterItem'](_0x3c1457,_0x4a2f4a)):_0x168445&&_0x168445===_0x10b0e4?this['_alignBeforeItem'](_0x4a2f4a,_0x3c1457):this['_alignAfterItem'](_0x3c1457,_0x4a2f4a);}_recalculate(_0x57d0bb,_0x1de1fa){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x597e96,changedProp:_0x33dab3}of this['_recalculateBuffer'])'top'===_0x33dab3?this['_alignForTopChange'](_0x597e96):this['_alignForBottomChange'](_0x597e96);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x57d0bb,'changedProp':_0x1de1fa});}getSidebarItemView(_0x3dbdc3){return this['_annotationToSidebarItemView']['get'](_0x3dbdc3);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x139307){const _0x445ff9=this['getSidebarItemView'](_0x139307);this['stopListening'](_0x445ff9),this['stopListening'](_0x139307['view']),_0x445ff9['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x139307),this['_sidebarItemViewToAnnotation']['delete'](_0x445ff9);}_createSidebarView(){const _0x1edb2c=new Ii(this['context']['locale']);return _0x1edb2c['render'](),this['on']('change:_lastItem',(_0x1b904f,_0x3e418e,_0x33502c,_0x233b94)=>{_0x233b94&&_0x1edb2c['unbind']('minHeight'),_0x33502c?_0x1edb2c['bind']('minHeight')['to'](_0x33502c,'bottom'):_0x1edb2c['minHeight']=null;}),_0x1edb2c;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x642301){const _0x3dcdea=this['_sidebarItemViewToAnnotation']['get'](_0x642301),_0xd1ae44=_0x3dcdea&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3dcdea)-0x1);return _0xd1ae44&&this['getSidebarItemView'](_0xd1ae44)||null;}_getItemAfter(_0xff88cd){const _0x543361=this['_sidebarItemViewToAnnotation']['get'](_0xff88cd),_0x4b39e5=_0x543361&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x543361)+0x1);return _0x4b39e5&&this['getSidebarItemView'](_0x4b39e5)||null;}_alignBeforeItem(_0x4670bf,_0xe51f73){_0x4670bf['updateHeight']();const _0x3a4e0d=Ni(_0xe51f73['bottom']+this['_spaceBetweenItems'],_0x4670bf['top']);return!!_0x3a4e0d&&(this['_setItemTop'](_0xe51f73,_0xe51f73['top']-_0x3a4e0d),!0x0);}_alignAfterItem(_0x1af493,_0x115ab1){_0x1af493['updateHeight']();const _0x269814=Ni(_0x1af493['bottom']+this['_spaceBetweenItems'],_0x115ab1['top']);return!!_0x269814&&(this['_setItemTop'](_0x115ab1,_0x115ab1['top']+_0x269814,!0x1),!0x0);}_alignToTargetRect(_0xbf2841){const _0x4fb0a2=this['_sidebarItemViewToAnnotation']['get'](_0xbf2841);if(!_0x4fb0a2||!_0x4fb0a2['target']||!_0x4fb0a2['targetRect'])return;const _0x1766ea=this['_getTargetTop'](_0x4fb0a2,_0x4fb0a2['targetRect']);this['_setItemTop'](_0xbf2841,_0x1766ea);}_getTargetTop(_0x141a83,_0x3d1c1b){if(null===_0x3d1c1b)return 0x0;if(_0x141a83['target']instanceof _0x424c5e)return _0x3d1c1b['top'];{const _0x3049d8=new _0x424c5e(this['view']['element'])['top'];return _0x3d1c1b['top']-_0x3049d8;}}_setItemTop(_0x2fd228,_0xdefe83,_0x1aba9a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1aba9a&&(_0xdefe83=Math['max'](_0xdefe83,this['_getMaxAvailableTop'](_0x2fd228))),_0x2fd228['top']=_0xdefe83;}_getMaxAvailableTop(_0x3ce336){let _0x22f076=this['_getItemBefore'](_0x3ce336),_0x155642=0x0;for(;_0x22f076;)_0x22f076['updateHeight'](),_0x155642+=this['_spaceBetweenItems']+_0x22f076['height'],_0x22f076=this['_getItemBefore'](_0x22f076);return _0x155642;}};function Ni(_0x4db855,_0x39894b){return Math['max'](_0x4db855-_0x39894b,0x0);}function Oi(_0x512b45){return null!==_0x512b45&&'object'==typeof _0x512b45&&0x1===_0x512b45['nodeType'];}var Mi=class extends _0x1432af{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35d2d1){super(_0x35d2d1),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x261848(),this['_refreshPositioningDebounced']=_0x56eba8(()=>{_0x35d2d1['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x559628=this['context']['plugins']['get'](Ti),_0x23cfaa=this['context']['plugins']['get'](ki);_0x559628['register']('wideSidebar',this),_0x23cfaa['container']&&_0x559628['switchTo']('wideSidebar');}setActiveAnnotation(_0x4a63e2){if(_0x4a63e2===this['activeAnnotation'])return;const _0x1d09e3=this['context']['plugins']['get'](ki);_0x1d09e3['_activeAnnotation']=_0x4a63e2;const _0x31fdcf=this['activeAnnotation'];_0x1d09e3['refresh']({'blurredAnnotation':_0x31fdcf,'activatedAnnotation':_0x4a63e2}),this['activeAnnotation']=_0x4a63e2;}attach(_0x370a7b){this['annotations']=_0x370a7b;const _0x164be1=this['context']['plugins']['get'](ki);if(_0x164be1['_annotations']=_0x370a7b,this['isAttached'])throw new _0x4d38da('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x164be1,'set:container',()=>{this['detach'](),this['listenTo'](_0x164be1,'change:container',_0x24bb9=>{_0x24bb9['off'](),this['attach'](_0x370a7b);});}),_0x164be1['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x39ed6c=_0x15ec4f=>{_0x15ec4f['updateTargetRect'](),_0x164be1['addAnnotation'](_0x15ec4f);};for(const _0x4d8766 of _0x370a7b)_0x39ed6c(_0x4d8766);this['listenTo'](_0x370a7b,'add',(_0x3156c1,_0x520a1a)=>{_0x39ed6c(_0x520a1a);}),this['listenTo'](_0x370a7b,'remove',(_0x257072,_0x3ee55f,_0x3b6c66)=>{_0x164be1['rearrange']({'removedAnnotation':_0x3ee55f,'previousAnnotation':_0x370a7b['get'](_0x3b6c66-0x1),'nextAnnotation':_0x370a7b['get'](_0x3b6c66+0x1)}),_0x3ee55f===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x370a7b,'focus',(_0x390f2e,_0x410b35)=>{this['setActiveAnnotation'](_0x410b35);}),this['listenTo'](_0x370a7b,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2741fa=this['context']instanceof _0x3e1edc?this['context']['editors']:new _0x261848([this['context']]);for(const _0x52dd7f of _0x2741fa)this['_integrateWithEditorAnnotations'](_0x52dd7f);this['listenTo'](_0x2741fa,'add',(_0x51115c,_0x2e3ed9)=>{this['listenTo'](_0x2e3ed9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2e3ed9);});}),this['listenTo'](_0x2741fa,'remove',(_0x39cc3e,_0x3147e2)=>{_0x3147e2['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3147e2['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x4d38da('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1961ec=this['context']['plugins']['get'](ki);_0x1961ec['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1961ec),this['stopListening'](this['annotations']),this['context']instanceof _0x3e1edc&&this['stopListening'](this['context']['editors']);for(const _0x1a7434 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1a7434);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x159504){if(!_0x159504['plugins']['has']('EditorAnnotations'))return;const _0x5b02ef=_0x159504['plugins']['get']('EditorAnnotations'),_0x2ab384=()=>{const _0x6ef3e3=_0x5b02ef['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x6ef3e3[0x0]||null);};this['listenTo'](_0x5b02ef,'refresh',_0x2ab384),this['listenTo'](_0x5b02ef,'blur',(_0x33bd28,{isAnnotationTracked:_0x53894a})=>{this['activeAnnotation']&&_0x53894a(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5b02ef,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x117aa2=>{_0x5b02ef['hasDomSelection']()&&(_0x2ab384(),_0x117aa2['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5b02ef);}_destroyEditorAnnotationsIntegration(_0x1226b8){this['stopListening'](_0x1226b8),this['_editorAnnotations']['remove'](_0x1226b8);}},Ri=class extends _0x390df4{counterView;constructor(_0x4850f1){super(_0x4850f1);const _0x46ede9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2867f5,_0x138b49)=>_0x2867f5?'...':_0x138b49['toString']()),this['set']('annotationType',''),this['icon']=_0x526159,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x46ede9['to']('annotationType',_0x2c52d6=>'ck-annotation-counter__badge--'+_0x2c52d6),_0x46ede9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x46ede9['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x1432af{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x34a073){super(_0x34a073),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x24513d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x261848(),this['_refreshPositioningDebounced']=_0x56eba8(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x306044(this['context']['locale']),this['balloonPanelView']=new _0x41d702(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x5d19cd){this['annotations']=_0x5d19cd;const _0x39fdcf=this['context']['plugins']['get'](ki),_0x468b62=this['balloonPanelView'];if(_0x39fdcf['_annotations']=_0x5d19cd,this['isAttached'])throw new _0x4d38da('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x39fdcf,'set:container',()=>{this['detach'](),this['listenTo'](_0x39fdcf,'change:container',_0x84ae22=>{_0x84ae22['off'](),this['attach'](_0x5d19cd);});}),_0x39fdcf['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x6cd5e2=_0x3f6c8b=>{const _0xd1a3e6=new Ri(this['context']['locale']);_0x39fdcf['addAnnotation'](_0x3f6c8b,_0xd1a3e6),this['_annotationToNarrowView']['set'](_0x3f6c8b,_0xd1a3e6),_0xd1a3e6['bind']('isDirty','annotationType','number')['to'](_0x3f6c8b['view'],'isDirty','type','length'),_0xd1a3e6['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x468b62['content']['first']!==_0x3f6c8b['view']?(this['_showBalloon'](_0x3f6c8b),_0x3f6c8b['view']['element']['focus'](),this['setActiveAnnotation'](_0x3f6c8b)):this['setActiveAnnotation'](null);});};for(const _0x494e40 of _0x5d19cd)_0x6cd5e2(_0x494e40);this['listenTo'](_0x5d19cd,'add',(_0x5894e8,_0x4689dc)=>{_0x6cd5e2(_0x4689dc);}),this['listenTo'](_0x5d19cd,'remove',(_0x4bf49a,_0x34bf58,_0xdf1660)=>{this['_annotationToNarrowView']['get'](_0x34bf58)['destroy'](),this['_annotationToNarrowView']['delete'](_0x34bf58),_0x39fdcf['rearrange']({'removedAnnotation':_0x34bf58,'previousAnnotation':_0x5d19cd['get'](_0xdf1660-0x1),'nextAnnotation':_0x5d19cd['get'](_0xdf1660+0x1)}),_0x34bf58===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5d19cd,'focus',(_0x4f4e67,_0x4da61f)=>{this['setActiveAnnotation'](_0x4da61f);}),this['listenTo'](_0x5d19cd,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x19fe3a,_0x1f7237)=>{_0x1f7237['keyCode']===_0x2a605a['esc']&&_0x468b62['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x468b62['content']['first']),this['_hideBalloon'](),_0x1f7237['stopPropagation'](),_0x1f7237['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5666e9,_0x5380a0)=>{const _0x72fae3=_0x5380a0['target'];_0x468b62['isVisible']&&_0x468b62['element']['contains'](_0x72fae3)||_0x39fdcf['view']['element']['contains'](_0x72fae3)||_0x5666e9['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xdc0461=>_0xdc0461['contains'](_0x72fae3))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1ba230=this['context']instanceof _0x3e1edc?this['context']['editors']:new _0x261848([this['context']]);for(const _0x567815 of _0x1ba230)this['_integrateWithEditorAnnotations'](_0x567815);this['listenTo'](_0x1ba230,'add',(_0x10aaac,_0x5f3e80)=>{this['listenTo'](_0x5f3e80,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5f3e80);});}),this['listenTo'](_0x1ba230,'remove',(_0x256b34,_0x22f603)=>{_0x22f603['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x22f603['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x3a32b3){if(_0x3a32b3===this['activeAnnotation'])return;const _0x5947c2=this['context']['plugins']['get'](ki);_0x5947c2['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3a32b3,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3a32b3&&_0x5947c2['getSidebarItemView'](_0x3a32b3)?this['_showBalloon'](_0x3a32b3):this['_hideBalloon'](),this['activeAnnotation']=_0x3a32b3;}detach(){if(!this['isAttached'])throw new _0x4d38da('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x27e1d0=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x57ab96=>_0x57ab96['destroy']()),this['_annotationToNarrowView']['clear'](),_0x27e1d0['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3e1edc&&this['stopListening'](this['context']['editors']);for(const _0x5c905e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5c905e);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(_0x12fdf1){if(!_0x12fdf1['plugins']['has']('EditorAnnotations'))return;const _0x2b9896=_0x12fdf1['plugins']['get']('EditorAnnotations'),_0x2c476f=this['context']['plugins']['get'](ki),_0x1409c1=this['annotations'],_0x3b4b71=this['balloonPanelView'],_0x503bc5=()=>{const _0x4f0382=_0x2b9896['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4f0382),this['setActiveAnnotation'](_0x4f0382[0x0]||null);};this['listenTo'](_0x2b9896,'refresh',_0x503bc5),this['listenTo'](_0x2b9896,'blur',(_0x38ef28,{isAnnotationTracked:_0x13504b})=>{this['activeAnnotation']&&_0x13504b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2b9896,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1409c1,'blur',_0x2eac49=>{_0x2b9896['hasDomSelection']()&&_0x2eac49['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x26dc7f,_0x41b6d4)=>{const _0x1814b6=_0x41b6d4['target'];_0x3b4b71['isVisible']&&_0x3b4b71['element']['contains'](_0x1814b6)||_0x2c476f['view']['element']['contains'](_0x1814b6)||this['activeAnnotation']&&_0x2b9896['hasDomSelection']()&&(_0x503bc5(),_0x26dc7f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2b9896);}_destroyEditorAnnotationsIntegration(_0x4909f8){_0x4909f8&&(this['stopListening'](_0x4909f8),this['_editorAnnotations']['remove'](_0x4909f8));}_setSelectedAnnotations(_0x360257){for(const _0x4ba581 of this['_selectedAnnotations'])_0x360257['includes'](_0x4ba581)||this['_manuallyClosedAnnotationViews']['delete'](_0x4ba581['view']);this['_selectedAnnotations']=_0x360257;}_refreshPositioning(){const _0x58f642=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x58f642['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x20737d){if(this['_manuallyClosedAnnotationViews']['has'](_0x20737d['view']))return;const _0x29d001=this['balloonPanelView']['content']['first'];_0x29d001!==_0x20737d['view']?(_0x29d001&&this['_detachListeners'](_0x29d001),this['_attachListeners'](_0x20737d['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x20737d['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x348e7a=this['balloonPanelView']['content']['first'],_0x4aefff=_0x348e7a&&this['annotations']['getByView'](_0x348e7a);if(!_0x4aefff||!this['_annotationToNarrowView']['has'](_0x4aefff))return;const _0x362890=this['_annotationToNarrowView']['get'](_0x4aefff)['element'],_0x50f0fe=(function(){const _0x5203c9=_0x41d702['defaultPositions'];return[_0x5203c9['southArrowNorthEast'],_0x5203c9['northArrowSouthEast'],_0x5203c9['southArrowNorth'],_0x5203c9['northArrowSouth'],_0x5203c9['southArrowNorthWest'],_0x5203c9['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x362890,'positions':_0x50f0fe});}['_hideBalloon'](){const _0x522562=this['balloonPanelView'],_0x295cca=_0x522562['content']['first'];_0x295cca&&(this['_detachListeners'](_0x295cca),_0x522562['unpin'](),_0x522562['content']['clear']());}_attachListeners(_0x420a00){this['listenTo'](_0x420a00,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x420a00,'Esc',(_0x4f51a5,_0x50b72f)=>{this['_manuallyClosedAnnotationViews']['add'](_0x420a00),this['_hideBalloon'](),_0x50b72f();});}_detachListeners(_0x2543ab){this['stopListening'](_0x2543ab);}},xi=class extends _0x3fdf7a{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x36c62a,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ad540){super(_0x4ad540),_0x4ad540['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4ad540['plugins']['get'](_0x36c62a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x56eba8(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x3c386a=this['editor']['plugins']['get'](Ti);_0x3c386a['context']===this['editor']&&(_0x3c386a['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x12997e,_0x19377e)=>{const _0x50d0ae=this['_balloon'];if(this['isAttached']&&_0x50d0ae['visibleView']){const _0x1d0480=this['annotations']['getByView'](_0x50d0ae['visibleView']);_0x1d0480&&this['_closeAnnotation'](_0x1d0480),_0x19377e();}}));}afterInit(){const _0x1693b4=this['editor']['plugins']['get'](Ti);_0x1693b4['context']===this['editor']&&(_0x1693b4['hasActive']()||_0x1693b4['switchTo']('inline'));}setActiveAnnotation(_0x237a47){_0x237a47!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x237a47&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x237a47)&&this['_addAnnotationToBalloon'](_0x237a47,!0x0),_0x237a47['isActive']=!0x0),_0x237a47||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x237a47);}attach(_0x2eff0a){this['annotations']=_0x2eff0a;const _0x31ced0=this['editor']['plugins']['get'](Ti),_0x1b68f6=this['_balloon'];if(this['isAttached'])throw new _0x4d38da('inlineannotations-attach-already-attached',this);if(_0x31ced0['context']!==this['editor'])throw new _0x4d38da('inlineannotations-not-allowed-with-context',this);const _0x9c90a0=this['editor']['plugins']['get'](di);this['listenTo'](_0x9c90a0,'refresh',()=>{const _0x43d309=_0x9c90a0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x5dd287,_0x16405d;!this['_forceRefresh']&&(_0x5dd287=_0x43d309,_0x16405d=this['_selectedAnnotations'],_0x5dd287['length']===_0x16405d['length']&&_0x5dd287['every'](_0x128799=>_0x16405d['includes'](_0x128799)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x43d309),this['setActiveAnnotation'](_0x43d309[0x0]||null));}),this['listenTo'](_0x9c90a0,'blur',(_0x1cc85d,{isAnnotationTracked:_0x1210fd})=>{this['activeAnnotation']&&_0x1210fd(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x9c90a0,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x28ea71,_0x4e17db,_0x58f4eb)=>{_0x58f4eb||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2eff0a,'remove',(_0x1aa295,_0x2af738)=>{this['_removeAnnotationFromBalloon'](_0x2af738),_0x2af738===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1b68f6,'change:visibleView',(_0x5318d8,_0xcf4ad3,_0x4e2807,_0x2ae538)=>{_0x2ae538&&this['stopListening'](_0x2ae538);const _0x5c0833=_0x2eff0a['getByView'](_0x4e2807);_0x4e2807&&_0x5c0833&&(this['listenTo'](_0x4e2807,'change:height',()=>{_0x1b68f6['updatePosition']();}),this['listenTo'](_0x4e2807,'Esc',()=>{this['_closeAnnotation'](_0x5c0833),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5c0833&&this['setActiveAnnotation'](_0x5c0833));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1b68f6['visibleView']&&_0x2eff0a['getByView'](_0x1b68f6['visibleView'])&&_0x1b68f6['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 _0x4d38da('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xf0509f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xf0509f);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x51e5bc){for(const _0x3f672a of this['_selectedAnnotations'])_0x51e5bc['includes'](_0x3f672a)||this['_manuallyClosed']['delete'](_0x3f672a);for(const _0x43235c of this['annotations'])_0x51e5bc['includes'](_0x43235c)||this['_removeAnnotationFromBalloon'](_0x43235c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1de079 of _0x51e5bc)this['_addAnnotationToBalloon'](_0x1de079);}this['_selectedAnnotations']=_0x51e5bc;}_addAnnotationToBalloon(_0x5cf671,_0x292987=!0x1){this['_manuallyClosed']['has'](_0x5cf671)||(this['_addedAnnotations']['has'](_0x5cf671)||this['_balloon']['hasView'](_0x5cf671['view'])||(this['_addedAnnotations']['add'](_0x5cf671),this['_balloon']['add']({'stackId':_0x5cf671['view']['id'],'view':_0x5cf671['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5cf671)}})),_0x292987&&this['_balloon']['showStack'](_0x5cf671['view']['id']));}_getBalloonTargetForAnnotation(_0xb6002a){const _0x21400d=_0xb6002a['target'],_0xaee1cb=this['editor']['editing']['view'],_0x5dbc2c=_0xaee1cb['document']['selection']['getFirstRange'](),_0x4ff5be=_0xaee1cb['domConverter']['viewRangeToDom'](_0x5dbc2c);if(_0x4ff5be['collapse'](!0x0),_0x21400d){if(_0x21400d instanceof _0x424c5e)return _0x21400d;let _0x550185=[];for(const _0xe35160 of _0x21400d)_0x550185['push'](..._0x424c5e['getDomElementRects'](_0xe35160));_0x550185=function(_0x1ffa5f){const _0x1127d8=[];let _0x5cf349=_0x1ffa5f[0x0];for(let _0x2f27d7=0x1;_0x2f27d7<_0x1ffa5f['length'];_0x2f27d7++)if(Pi(_0x5cf349,_0x1ffa5f[_0x2f27d7])){const _0x60357d=_0x1ffa5f[_0x2f27d7]['width'];_0x5cf349['width']+=_0x60357d,_0x5cf349['right']+=_0x60357d;}else _0x1127d8['push'](_0x5cf349),_0x5cf349=_0x1ffa5f[_0x2f27d7];return _0x1127d8['push'](_0x5cf349),_0x1127d8;}(_0x550185);const _0x30de3f=_0x4ff5be['getBoundingClientRect']();return _0x550185['find'](_0x50508a=>_0x50508a['top']<=_0x30de3f['top']&&_0x50508a['bottom']>=_0x30de3f['bottom']&&_0x50508a['left']<=_0x30de3f['left']&&_0x50508a['right']>=_0x30de3f['right'])||_0x550185[0x0];}return _0xb6002a['targetRect']||_0x4ff5be;}_removeAnnotationFromBalloon(_0x12b22b){this['_addedAnnotations']['has'](_0x12b22b)&&this['_balloon']['hasView'](_0x12b22b['view'])&&(this['_addedAnnotations']['delete'](_0x12b22b),this['_balloon']['remove'](_0x12b22b['view']));}_closeAnnotation(_0x1e45be){this['_manuallyClosed']['add'](_0x1e45be),this['_removeAnnotationFromBalloon'](_0x1e45be);}};function Pi(_0x47566c,_0xbbc8f0){return _0x47566c['top']===_0xbbc8f0['top']&&_0x47566c['bottom']===_0xbbc8f0['bottom']&&_0x47566c['right']===_0xbbc8f0['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x57d20e,_0x5ea8c0){super(_0x57d20e),this['set']('isEmpty',!_0x5ea8c0['length']),this['focusTracker']=new _0x32b87(),this['_annotationViews']=_0x5ea8c0,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x5ea8c0,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5ea8c0,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5ea8c0,'remove',(_0x4e54c4,_0x17b50d)=>{_0x17b50d['isActive']&&this['focus'](),_0x5ea8c0['length']||(this['isEmpty']=!0x0);});const _0x5b285f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x57d20e,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5ea8c0},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5b285f['if']('isEmpty','ck-hidden',_0x3292af=>!_0x3292af)]},'children':[{'text':Et(_0x57d20e,'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 _0x21b246 of this['_annotationViews'])this['focusTracker']['add'](_0x21b246['element']);this['_annotationViews']['on']('change',(_0xcd89e2,{added:_0x98ac7f,removed:_0x24e1ff})=>{for(const _0x512ab0 of _0x98ac7f)this['focusTracker']['add'](_0x512ab0['element']);for(const _0xc1ea63 of _0x24e1ff)this['focusTracker']['remove'](_0xc1ea63['element']);});}},Di=class extends _0x1432af{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x499297){super(_0x499297),this['archivedThreads']=new _0x261848();}init(){const _0x4dbb2f=this['context'],_0x1a92c3=_0x4dbb2f['plugins']['get'](oi),_0x59681e=_0x4dbb2f['plugins']['get'](ti);this['listenTo'](_0x1a92c3,'addCommentThread',(_0x54f1c2,{threadId:_0x589f3c})=>{const _0x55a111=_0x1a92c3['getCommentThread'](_0x589f3c);_0x55a111['archivedAt']&&this['archivedThreads']['add'](_0x55a111,this['_calculatePosition'](_0x55a111['archivedAt'])),this['listenTo'](_0x55a111,'change:archivedAt',(_0x9a647f,_0x11359c,_0x40749a)=>{_0x40749a?this['archivedThreads']['has'](_0x55a111)||this['archivedThreads']['add'](_0x55a111,this['_calculatePosition'](_0x55a111['archivedAt'])):this['archivedThreads']['has'](_0x55a111)&&this['archivedThreads']['remove'](_0x55a111);});}),this['listenTo'](_0x1a92c3,'removeCommentThread',(_0x6205fc,{threadId:_0x17a23b})=>{const _0x4e5069=_0x1a92c3['getCommentThread'](_0x17a23b);this['stopListening'](_0x4e5069),this['archivedThreads']['has'](_0x4e5069)&&this['archivedThreads']['remove'](_0x4e5069);},{'priority':'highest'}),this['listenTo'](_0x59681e['collection'],'focus',(_0x12c9a3,_0x506059)=>{_0x506059['isVisible']||(_0x506059['isActive']=!0x0,_0x59681e['activate'](_0x506059));});}_calculatePosition(_0x1be833){const _0x39c07f=[...this['archivedThreads']]['findIndex'](_0x34a88c=>_0x34a88c['archivedAt']<_0x1be833);return _0x39c07f>-0x1?_0x39c07f:this['archivedThreads']['length'];}},Vi=class extends _0x3fdf7a{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x250a9b];}constructor(_0x5adace){super(_0x5adace),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x331e74=this['editor'],_0x2a0c0f=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x331e74['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x390df4,!0x0)),_0x331e74['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x58cdaf=this['_createCommentsArchiveButton'](rt);return _0x58cdaf['set']({'role':'menuitemcheckbox'}),_0x58cdaf;});const _0x221ec6=_0x331e74['plugins']['get'](Di),_0x449ca2=_0x331e74['plugins']['get']('Annotations'),_0x5904fb=_0x331e74['plugins']['get']('CommentsRepository');_0x221ec6['archivedThreads']['forEach'](_0x545696=>{this['_handleNewThread'](_0x545696);}),this['listenTo'](_0x221ec6['archivedThreads'],'add',(_0x782a82,_0x4c04df)=>{this['_handleNewThread'](_0x4c04df);}),this['listenTo'](_0x449ca2['collection'],'add',(_0x3c692b,_0x1a8ce5)=>{const _0x7542b6=this['_pendingThreads']['find'](_0x471a8e=>{const _0x2e557b=_0x5904fb['_threadToController']['get'](_0x471a8e);return _0x2e557b&&_0x1a8ce5['innerView']===_0x2e557b['view'];});if(_0x7542b6){const _0x26cd4d=this['_calculatePosition'](_0x7542b6['archivedAt']);this['_addAnnotationToArchive'](_0x1a8ce5,_0x26cd4d),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x7542b6),0x1);}}),this['listenTo'](_0x221ec6['archivedThreads'],'remove',(_0x36987e,_0x477430)=>{const _0x270ccb=_0x331e74['config']['get']('collaboration.channelId');if(!_0x270ccb||_0x477430['channelId']===_0x270ccb){if(this['_pendingThreads']['includes'](_0x477430))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x477430),0x1);else{const _0x5cff9d=_0x5904fb['_threadToController']['get'](_0x477430),_0xa1f643=_0x449ca2['getByInnerView'](_0x5cff9d['view']);this['annotationViews']['remove'](_0xa1f643['view']),this['stopListening'](_0xa1f643),this['stopListening'](_0xa1f643['focusableElements']);}}}),this['listenTo'](_0x449ca2['collection'],'add',(_0x4e9b3d,_0x361c0d)=>{this['listenTo'](_0x361c0d,'escape',_0x2a0c0f);}),this['listenTo'](_0x449ca2['collection'],'remove',(_0x5e461b,_0x3bc351)=>{this['stopListening'](_0x3bc351,'escape',_0x2a0c0f);});}_addAnnotationToArchive(_0x58942c,_0x14601e){this['listenTo'](_0x58942c,'set:isVisible',_0x4b520d=>{_0x4b520d['return']=!0x1,_0x4b520d['stop']();}),this['annotationViews']['add'](_0x58942c['view'],_0x14601e);}['_handleNewThread'](_0x2d5c15){const _0x124536=this['editor']['plugins']['get']('CommentsRepository'),_0xf847c1=this['editor']['plugins']['get']('Annotations'),_0x45cd5f=this['editor']['config']['get']('collaboration.channelId');if(!_0x45cd5f||_0x2d5c15['channelId']===_0x45cd5f){const _0x3ee73b=_0x124536['_threadToController']['get'](_0x2d5c15);if(!_0x3ee73b)return void this['_pendingThreads']['push'](_0x2d5c15);const _0x5518f6=this['_calculatePosition'](_0x2d5c15['archivedAt']),_0x4b5107=_0xf847c1['getByInnerView'](_0x3ee73b['view']);_0x4b5107['isVisible']&&_0xf847c1['_visibleAnnotations']['remove'](_0x4b5107),this['_addAnnotationToArchive'](_0x4b5107,_0x5518f6);}}_calculatePosition(_0x293462){const _0x9b221d=this['editor']['config']['get']('collaboration.channelId'),_0x3f6d7d=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x23d974=>_0x23d974['channelId']===_0x9b221d)['findIndex'](_0x275525=>_0x275525['archivedAt']<_0x293462);return _0x3f6d7d<0x0||_0x3f6d7d>this['annotationViews']['length']?this['annotationViews']['length']:_0x3f6d7d-0x1;}_toggleDialog(){const _0x1eb9dd=this['editor'],_0x4a171e=_0x1eb9dd['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x1eb9dd['locale'],this['annotationViews'])),'commentsArchive'===_0x4a171e['id']?_0x4a171e['hide']():_0x4a171e['show']({'id':'commentsArchive','title':Et(_0x1eb9dd['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4c97a9,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x26f4e4['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x3fc14d,_0x1f553f=!0x1){const _0x25c061=this['editor']['locale'],_0x51888e=this['editor']['plugins']['get']('Dialog'),_0x17c289=new _0x3fc14d(_0x25c061);return _0x17c289['bind']('isEnabled')['to'](this,'isEnabled'),_0x17c289['bind']('isOn')['to'](_0x51888e,'id',_0x3b4374=>'commentsArchive'===_0x3b4374),_0x17c289['set']({'label':Et(_0x25c061,'COMMENTS_ARCHIVE'),'icon':_0x4c97a9,'isToggleable':!0x0}),_0x1f553f&&(_0x17c289['tooltip']=!0x0),this['listenTo'](_0x17c289,'execute',()=>this['_toggleDialog']()),_0x17c289;}_hideDialogOnAnnotationEscape=_0x56c62f=>{const _0x41b759=_0x56c62f['source'];if(!this['annotationViews']['has'](_0x41b759['view']))return;const _0x1b9896=this['editor']['plugins']['get']('Dialog');_0x1b9896['isOpen']&&'commentsArchive'===_0x1b9896['id']&&(_0x1b9896['hide'](),_0x56c62f['stop']());};},Bi=class extends _0x3fdf7a{static get requires(){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
23
+ import{Command as _0x2d7293,Context as _0x345ccf,ContextPlugin as _0x2886e3,Editor as _0x4acb07,PendingActions as _0x4847f1,Plugin as _0x3831f5}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x587c70,Collection as _0x43adb0,DomEmitterMixin as _0x341190,FocusTracker as _0x52e6a6,KeystrokeHandler as _0x1c4986,ObservableMixin as _0xf65c5e,Rect as _0x132048,diff as _0x11a26f,first as _0x48a874,getEnvKeystrokeText as _0x68f48c,keyCodes as _0x42efc2,priorities as _0x48dc95,scrollViewportToShowTarget as _0x2c8209,toUnit as _0x455aab,uid as _0x348c57}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x49723f,ConfirmMixin as _0x1dca03,FOCUS_ANNOTATION_KEYSTROKE as _0x1880a8,LateFocusButtonView as _0x472aab,LateFocusDropdownButtonView as _0x262490,UserView as _0x411e69,Users as _0x5b5781,getAllMarkersDomElementsSorted as _0x50ca2d,getDateTimeFormatter as _0x3c2e31,hashObject as _0x46a734,setupThreadKeyboardNavigation as _0x26d96b,surroundingMarkersDetector as _0x56ef5a,trimHtml as _0x3dfab0}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x335fae,debounce as _0xbc46bc,isEqual as _0x8ea8ca,set as _0xe4f958,throttle as _0x2f41cf,unset as _0x7243f}from'es-toolkit/compat';import{IconAddComment as _0x4f7611,IconCheck as _0x2e83fc,IconCommentsArchive as _0x188b5f,IconPencil as _0x581276,IconRemoveComment as _0x3e209f,IconThreeVerticalDots as _0x280fcb,IconUndo as _0x55df86}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0xce8472,BodyCollection as _0x47ef85,ButtonView as _0x44164c,ContextualBalloon as _0x24ce3a,Dialog as _0x28d408,DialogViewPosition as _0x14f9e6,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
+ _0xf65c5e();var bt=class extends It{['model'];['view'];constructor(_0x21a1e1,_0x33bc83){super(),this['model']=_0x21a1e1,this['model']['_isAttached']=!0x0,this['view']=_0x33bc83,this['listenTo'](_0x33bc83,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x33bc83,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x33bc83,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x33bc83,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x33bc83,'addComment',(_0xf967ce,_0x4fb38b)=>this['addComment'](_0x4fb38b)),this['listenTo'](_0x33bc83,'updateComment',(_0x2d8541,_0x3254ed,_0x5e85f8)=>this['updateComment'](_0x3254ed,_0x5e85f8)),this['listenTo'](_0x33bc83,'removeComment',(_0x1364b2,_0x4ea905)=>this['removeComment'](_0x4ea905));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x4c1418){this['model']['addComment']({'content':_0x4c1418,'authorId':this['view']['_localUser']['id']});}updateComment(_0x322ff8,_0x43cee5){this['model']['getComment'](_0x322ff8)['update']({'content':_0x43cee5});}removeComment(_0x1250ad){this['model']['getComment'](_0x1250ad)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x16bad9,_0x571e1c,_0x44ed19){const t=_0x16bad9['t'];switch(_0x571e1c){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'},_0x44ed19);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x44ed19);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'},_0x44ed19);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'},_0x44ed19);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x44ed19);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'},_0x44ed19);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'},_0x44ed19);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'},_0x44ed19);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'';}}var kt=class extends it{['main'];editable;constructor(_0x52dc9b,_0x4bd38c){super(_0x52dc9b);const _0x75ed6c=_0x348c57();this['main']=this['createCollection'](),this['editable']=new st(_0x52dc9b,_0x4bd38c,void 0x0,{'label':()=>Et(_0x52dc9b,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x52dc9b['uiLanguageDirection'],'lang':_0x52dc9b['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x75ed6c},'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']();}},Nt=class extends tt{['view'];constructor(_0x4c963e){super(_0x4c963e),this['view']=new kt(_0x4c963e['locale'],_0x4c963e['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x39a61a=this['editor']['editing']['view'],_0x4b1d76=this['view']['editable'];_0x4b1d76['name']=_0x39a61a['document']['getRoot']()['rootName'],this['view']['render']();const _0x43d972=_0x4b1d76['element'];this['setEditableElement'](_0x4b1d76['name'],_0x43d972),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x39a61a['attachDomRoot'](_0x43d972),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0xf65c5e(_0x4acb07);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x241c87={}){(_0x241c87=Object['assign']({},_0x241c87))['plugins']||(_0x241c87['plugins']=CommentEditor['defaultPlugins']),super(_0x241c87),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0x2ebd4d=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2ebd4d))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5b0d1b=>{const _0x33e84d=this['model']['document']['getRoot'](),_0x3f4e7e=_0x33e84d&&_0x33e84d['getChild'](_0x33e84d['childCount']-0x1);_0x5b0d1b['setSelection'](_0x3f4e7e,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x3f6bd1=this['editing']['view'],_0x216852=_0x3f6bd1['document']['getRoot'](),_0x4da806=_0x216852['getChild'](0x0);_0x216852['childCount']>0x1||!_0x4da806||'p'!=_0x4da806['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x3f6bd1,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4da806['placeholder']=this['placeholder']),ut({'view':_0x3f6bd1,'element':_0x4da806,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4da806);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x50a424,_0x384d06={}){super(_0x50a424),this['editor']=null,this['_editorConfig']=_0x384d06,this['set']('value',_0x384d06['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x50a424,'Reply...')),this['set']('submitLabel',Et(_0x50a424,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x1c4986(),this['focusTracker']=new _0x52e6a6(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2cf096=>!_0x2cf096['defaultPrevented']},'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',(_0x3b1778,_0x3aaf58)=>{this['cancelButtonView']['fire']('execute'),_0x3aaf58();}),this['keystrokes']['set']('Ctrl+Enter',(_0x591aef,_0x427c92)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x427c92());}),this['on']('submit',(_0x1871b8,_0x4fc26e)=>{_0x4fc26e['length']>0xfde8?(alert(Et(_0x50a424,'TOO_LONG_COMMENT_ALERT',[_0x4fc26e['length'],0xfde8])),_0x1871b8['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x47a4b8=this['editor'];this['element']['insertBefore'](_0x47a4b8['ui']['element'],this['element']['firstChild']),_0x47a4b8['model']['document']['on']('change',()=>this['value']=_0x47a4b8['getData']()),_0x47a4b8['bind']('placeholder')['to'](this),this['focusables']['add'](_0x47a4b8['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x18fa9c){-0x1===_0x18fa9c?(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:_0x58f621}=this,_0xfc22dc=new _0x44164c(_0x58f621);return _0xfc22dc['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xfc22dc['withText']=!0x0,_0xfc22dc['bind']('label')['to'](this,'submitLabel'),_0xfc22dc['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xfc22dc['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2fc519,_0x30e371)=>!_0x30e371&&!!_0x2fc519['trim']()),_0xfc22dc;}_createCancelButton(){const {locale:_0xe2dcc3}=this,_0x1249b3=new _0x44164c(_0xe2dcc3);return _0x1249b3['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1249b3['label']=Et(_0xe2dcc3,'Cancel'),_0x1249b3['withText']=!0x0,_0x1249b3['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1249b3;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x595d33=>{this['focusTracker']['add'](_0x595d33['element']);}),this['focusables']['on']('change',(_0x37f5b0,_0x1ffd3d)=>{for(const _0x2528e7 of Array['from'](_0x1ffd3d['added'])['reverse']())this['focusTracker']['add'](_0x2528e7['element']);});}},xt=class extends ht{constructor(_0x1bd4b4,_0x564a93,_0x5b0639){super(_0x1bd4b4),this['commentInputView']=new St(_0x1bd4b4,_0x5b0639),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1991d2,_0x469d47)=>_0x1991d2||!!_0x469d47),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 _0x411e69(_0x1bd4b4,_0x564a93),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'](_0x183838){this['commentInputView']['focus'](_0x183838);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x299f7f,_0x499242)=>{const {submitButtonView:_0x549171,cancelButtonView:_0x480125,editor:_0x43effa}=this['commentInputView'];[_0x549171['element'],_0x480125['element'],_0x43effa?_0x43effa['editing']['view']['getDomRoot']():null]['filter'](_0x4a1aa3=>_0x4a1aa3)['some'](_0x616465=>_0x616465['contains'](_0x499242['target']))||(this['focus'](),_0x499242['preventDefault']());});}},Pt=class extends ht{constructor(_0x27d606){super(_0x27d606);const _0x5edeee=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5edeee['to']('count',_0x40d8e4=>Et(_0x27d606,'NUMBER_OF_COMMENTS',_0x40d8e4))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0xcc9035,_0x4554fe,_0x3e9e3c){super(_0xcc9035);const _0x53fe45=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4554fe['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4554fe,this['_config']=_0x3e9e3c,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x52e6a6(),this['keystrokes']=new _0x1c4986(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x9ba6dc=>this['commentViews']['map'](_0x2ad5f2=>_0x2ad5f2['element'])['includes'](_0x9ba6dc['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0xcc9035),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2f049a=>_0x2f049a-this['_config']['maxCommentsWhenCollapsed']);for(const _0x6d596b of _0x4554fe['comments'])this['_handleNewCommentModel'](_0x6d596b);this['_handleInfoComment'](),this['listenTo'](_0x4554fe['comments'],'add',(_0xe4d797,_0x37e16a)=>{const _0x4dccaf=this['_calculatePosition'](_0x37e16a);this['length']++,this['_handleNewCommentModel'](_0x37e16a,_0x4dccaf),this['refreshVisibleViews']();}),this['listenTo'](_0x4554fe['comments'],'remove',(_0x21c05c,_0x5da7c9)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5da7c9),this['refreshVisibleViews']();}),this['listenTo'](_0x4554fe,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4554fe,'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',_0x53fe45['if']('length','ck-hidden',_0x2c8e80=>!_0x2c8e80)],'aria-label':Et(_0xcc9035,'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'](_0x2a8279){-0x1===_0x2a8279?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x36c748 of this['commentViews'])_0x36c748['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x46b3ec,_0x223021){const _0x3b123d=new this['_config']['CommentView'](this['locale'],_0x46b3ec,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3b123d['viewUid']=_0x46b3ec['id'],_0x3b123d['delegate']('removeComment')['to'](this),_0x3b123d['delegate']('updateComment')['to'](this),_0x3b123d['delegate']('resolveCommentThread')['to'](this),_0x3b123d['delegate']('editorReady')['to'](this),_0x3b123d['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3b123d,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3b123d,_0x223021);}_calculatePosition(_0x65ce45){const _0x3bc0bf=this['_model']['_findOptimalIndex'](_0x65ce45);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x65ce45['authoredAt']?_0x3bc0bf-0x1:_0x3bc0bf:_0x3bc0bf-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x56ed36={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x56ed36,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x56ed36));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x5e26e4){const _0x212caf=this['commentViews']['remove'](_0x5e26e4['id']);this['stopListening'](_0x212caf),_0x212caf['isEditMode']&&this['_updateHasDirtyComment'](),_0x212caf['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x15b53c=>_0x15b53c['isEditMode']);}['_rearrangeCollapse'](){const _0x4e5e0d=function(_0x1fb559){const _0x4ac516=new _0x43adb0();for(const _0x588199 of _0x1fb559)_0x4ac516['add'](_0x588199);return _0x4ac516;}(this['commentViews']),_0x42bc2c=this['_collapsedCommentsView']['count'];for(let _0x66694e=0x1;_0x66694e<=_0x42bc2c;_0x66694e++)_0x4e5e0d['remove'](0x1);for(const _0x3d21f9 of _0x4e5e0d)_0x3d21f9['collapse']();_0x42bc2c>0x0&&_0x4e5e0d['add'](this['_collapsedCommentsView'],0x1),Dt(_0x11a26f(Array['from'](this['visibleViews']),Array['from'](_0x4e5e0d)),this['visibleViews'],_0x4e5e0d);}['_rearrangeExpand'](){Dt(_0x11a26f(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3f2807 of this['visibleViews'])_0x3f2807['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x13a963=>{this['focusTracker']['add'](_0x13a963['element']),this['keystrokes']['listenTo'](_0x13a963['element']);}),this['commentViews']['on']('change',(_0x1563b0,_0x13f1d9)=>{for(const _0x3eda44 of _0x13f1d9['removed'])this['focusTracker']['remove'](_0x3eda44['element']),this['keystrokes']['stopListening'](_0x3eda44['element']);for(const _0x49228d of Array['from'](_0x13f1d9['added'])['reverse']())this['focusTracker']['add'](_0x49228d['element']),this['keystrokes']['listenTo'](_0x49228d['element']);});}};function Dt(_0x468410,_0xda65e5,_0x3b7184){let _0x418ca0=0x0;for(const _0x2de7ba of _0x468410)switch(_0x2de7ba){case'insert':_0xda65e5['add'](_0x3b7184['get'](_0x418ca0),_0x418ca0),_0x418ca0++;break;case'delete':_0xda65e5['remove'](_0x418ca0);break;case'equal':_0x418ca0++;}}var Vt=class extends ht{constructor(_0x1b6dab){super(_0x1b6dab);const _0x930c5d=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x930c5d['to']('contextValue',_0x235a73=>Et(_0x1b6dab,'THREAD_CONTEXT_LABEL',_0x235a73)),'tabindex':-0x1},'children':[{'text':_0x930c5d['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x406e67,_0x9b7484){super(_0x406e67);const _0x47da21=this['bindTemplate'];this['_model']=_0x9b7484,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x52e6a6(),this['keystrokes']=new _0x1c4986(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4326a0=>!!_0x4326a0),this['bind']('contextValue')['to'](this['_model'],'context',_0x2f0a41=>_0x2f0a41&&_0x2f0a41['value']?this['_trimContextValue'](_0x2f0a41['value']):Et(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',_0x47da21['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 _0x56474f=new _0x44164c(this['locale']);return _0x56474f['label']=Et(this['locale'],'Reopen'),_0x56474f['tooltip']=Et(this['locale'],'Reopen'),_0x56474f['icon']=_0x55df86,_0x56474f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x33f0a1=>!_0x33f0a1),_0x56474f['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x15de0b,_0x5d970b)=>_0x15de0b&&_0x5d970b),_0x56474f['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x56474f;}_trimContextValue(_0x596aa7){if(_0x596aa7['length']<0x96)return _0x596aa7;const _0x1c05cd=_0x596aa7['lastIndexOf']('\x20',0x93);return _0x596aa7['substring'](0x0,_0x1c05cd>-0x1?_0x1c05cd:0x93)+'...';}_attachContextActions(){const _0x5b7730=this['element']['querySelector']('.ck-context'),_0x1f6177=_0x5b7730['querySelector']('.ck-context__value');this['listenTo'](_0x5b7730,'mouseenter',()=>{_0x1f6177['offsetWidth']<_0x1f6177['scrollWidth']&&_0x5b7730['classList']['add']('overlay');}),this['listenTo'](_0x5b7730,'mouseleave',()=>{_0x5b7730['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x370c22 of this['focusables'])this['focusTracker']['add'](_0x370c22['element']),this['keystrokes']['listenTo'](_0x370c22['element']);}_createContextView(){const _0x28ebf4=new Vt(this['locale']);return _0x28ebf4['bind']('contextValue')['to'](this),_0x28ebf4;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x1e57ed,_0x2f1e7a,_0x4de6e9,_0x2c6597){super(_0x1e57ed),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2f1e7a,this['_localUser']=_0x4de6e9,this['_config']=_0x2c6597,this['commentThreadHeaderView']=new Bt(_0x1e57ed,_0x2f1e7a),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x49723f(_0x1e57ed,Et(_0x1e57ed,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x1e57ed,_0x2f1e7a,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2c6597)),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',(_0x43cf9f,_0x3793ce)=>_0x43cf9f||!!_0x3793ce),this['bind']('isUnlinked')['to'](_0x2f1e7a,'unlinkedAt',_0x5458b7=>!!_0x5458b7);let _0x1ade67=null;const _0x5ee886=()=>{const _0x312c69=this['_model']['comments']['first']||null;_0x312c69!==_0x1ade67&&(_0x1ade67&&this['stopListening'](_0x1ade67,'change:content'),_0x1ade67=_0x312c69,_0x312c69&&this['listenTo'](_0x312c69,'change:content',_0x5ee886));const _0x21d407=_0x312c69?_0x312c69['author']['name']:this['_localUser']['name'],_0x161cf3=_0x312c69?new DOMParser()['parseFromString'](_0x3dfab0(_0x312c69['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x1ddfea=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x21d407]);this['set']('ariaLabel',_0x161cf3?_0x1ddfea+'\x20'+_0x161cf3:_0x1ddfea);};this['listenTo'](this['_model']['comments'],'change',_0x5ee886),_0x5ee886(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x52e6a6(),this['keystrokes']=new _0x1c4986(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x32701e=>_0x32701e['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x26d96b(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x304b87=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x59a95c=_0x304b87['commentInputView'];return _0x304b87['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x59a95c,'value',(_0x7e2a95,_0x5ca7dc,_0x3d414c,_0x160aa5,_0xfec3bf)=>!!_0xfec3bf||!!_0x160aa5&&_0x3d414c&&!_0x5ca7dc||_0x7e2a95&&_0x3d414c&&!_0x5ca7dc),_0x59a95c['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x21e9f,_0x47aed5,_0x2e0437)=>{let _0x4e91db;return _0x4e91db=_0x2e0437&&_0x47aed5?'Reply\x20to\x20reopen\x20discussion...':_0x21e9f?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x4e91db);}),_0x59a95c['bind']('submitLabel')['to'](this,'length',_0x532bc9=>Et(this['locale'],_0x532bc9?'Reply':'Comment')),_0x59a95c['on']('submit',(_0x5f2392,_0x44d427)=>{this['fire']('addComment',_0x44d427),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x59a95c['on']('cancel',()=>{this['focus']();}),_0x59a95c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x59a95c['on']('cancel',_0x4a15db=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4a15db['stop']());}),this['on']('change:isActive',(_0x4212f3,_0x52284b,_0x46e52c)=>{_0x46e52c||this['length']||_0x59a95c['value']||this['fire']('removeCommentThread');}),_0x304b87;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x1dca03(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x1219e0,_0xbbbfea,_0x24f31f,_0x55b752){super(_0x1219e0,_0xbbbfea,_0x24f31f,_0x55b752),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1219e0,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x40b1e5,_0x1a2381,_0x507ec3)=>{_0x507ec3||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x20189e,_0x2b9f4b,_0x39043c)=>{_0x39043c&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x5d1586=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5d1586['if']('isActive','ck-thread--active'),_0x5d1586['if']('isUnlinked','ck-thread--unlinked'),_0x5d1586['to']('actionIndicator',_0x154cec=>_0x154cec?'ck-thread--'+_0x154cec:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5d1586['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 _0x1e2d9f of this['commentsListView']['commentViews'])_0x1e2d9f['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x156f54}=this,_0x2f7892=this['commentsListView']['commentViews']['get'](0x0);_0x2f7892===this['_boundFirstCommentView']||_0x2f7892['isSystemComment']||(this['_boundFirstCommentView']=_0x2f7892,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2f7892,'actionIndicator',_0x148865=>'remove'===_0x148865?'remove':null),_0x2f7892['placeholder']=Et(_0x156f54,'Write\x20a\x20comment...'),_0x2f7892['removeButton']['on']('execute',_0x1bd2f9=>{_0x1bd2f9['stop'](),this['showConfirm'](Et(_0x156f54,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2f7892['focus']();}),_0x2f7892['actionBar']['add'](this['resolveButton'],0x0),_0x2f7892['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x107a4f=new _0x472aab(this['locale']);return _0x107a4f['label']=Et(this['locale'],'Resolve'),_0x107a4f['tooltip']=Et(this['locale'],'Resolve'),_0x107a4f['icon']=_0x2e83fc,_0x107a4f['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x107a4f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3e2f02=>!_0x3e2f02),_0x107a4f['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xfd32e9,_0x274620)=>_0xfd32e9&&!_0x274620),_0x107a4f['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x107a4f;}_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']));}},Wt=class extends ht{constructor(_0x339be0){super(_0x339be0),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x3e49ad,_0x411eb0,_0x48c67f)=>{this['element']['innerHTML']=_0x48c67f;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x3a8963,_0x1bf9a0,_0x27b733){super(_0x3a8963),this['_model']=_0x1bf9a0,this['_config']=_0x27b733,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1bf9a0,'content',_0x1bf9a0,'authoredAt',(_0x56db7f,_0x48f901)=>Et(_0x3a8963,'COMMENT_ARIA_LABEL',[_0x1bf9a0['author']['name'],_0x27b733['formatDateTime'](_0x48f901),new DOMParser()['parseFromString'](_0x56db7f,'text/html')['body']['textContent'],_0x1bf9a0['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x49723f(_0x3a8963,Et(_0x3a8963,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x52e6a6(),this['keystrokes']=new _0x1c4986(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x360b0e=>_0x360b0e['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x44f0d2=new Wt(this['locale']);return _0x44f0d2['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x1ad72b,_0x41d0ee)=>_0x41d0ee?_0x3dfab0(_0x1ad72b,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x1ad72b),_0x44f0d2;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x36e494=new St(this['locale'],this['_config']['editorConfig']);return _0x36e494['value']=this['_model']['content'],_0x36e494['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x36e494['submitLabel']=Et(this['locale'],'Save'),_0x36e494['on']('submit',(_0x446d66,_0x3cfcd0)=>{this['fire']('updateComment',this['_model']['id'],_0x3cfcd0),this['switchToDisplayMode'](),this['focus']();}),_0x36e494['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x36e494['once']('editorReady',()=>{_0x36e494['focus']();}),_0x36e494['createEditor'](),_0x36e494['delegate']('editorReady')['to'](this),_0x36e494['delegate']('editorDestroyed')['to'](this),_0x36e494;}_setupKeyboardNavigation(){const _0x3fb03d=this['element'];this['keystrokes']['listenTo'](_0x3fb03d);for(const _0xc75d03 of this['focusables'])this['focusTracker']['add'](_0xc75d03['element']),this['keystrokes']['listenTo'](_0xc75d03['element']);this['focusables']['on']('change',(_0x22873a,_0x250395)=>{for(const _0x3bb6ff of _0x250395['removed'])this['focusTracker']['remove'](_0x3bb6ff['element']),this['keystrokes']['stopListening'](_0x3bb6ff['element']);for(const _0x26aed8 of _0x250395['added'])this['focusTracker']['add'](_0x26aed8['element']),this['keystrokes']['listenTo'](_0x26aed8['element']);}),this['keystrokes']['set']('enter',(_0xc646b2,_0xdcde0d)=>{_0x3fb03d===_0xc646b2['target']&&(this['focusCycler']['focusFirst'](),_0xdcde0d());}),this['keystrokes']['set']('esc',(_0x485b1f,_0x44e0a1)=>{_0x3fb03d!==_0x485b1f['target']&&(this['focus'](),_0x44e0a1());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x1dca03(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x576bb7,_0x4f61d9,_0x1e3aa9){super(_0x576bb7,_0x4f61d9,_0x1e3aa9),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x576bb7,'Reply...')),this['bind']('authoredAt')['to'](_0x4f61d9),this['bind']('resolvedAt')['to'](_0x4f61d9),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 _0x411e69(_0x576bb7,_0x4f61d9['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4f61d9,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x523e9d=this['bindTemplate'],_0x47b084=[{'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':_0x523e9d['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x523e9d['to']('authoredAt',_0x2cb333=>this['_config']['formatDateTime'](_0x2cb333))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x523e9d['if']('isEditMode','ck-comment__actions--hidden'),_0x523e9d['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']&&_0x47b084['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x523e9d['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x523e9d['if']('isEditMode','ck-comment--edit'),_0x523e9d['if']('isSystemComment','ck-comment--info'),_0x523e9d['to']('actionIndicator',_0x407d1b=>_0x407d1b?'ck-comment--'+_0x407d1b:'')],'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':_0x47b084}]}]};}_createEditButton(){const _0x4d4534=new _0x44164c(this['locale']);return _0x4d4534['label']=Et(this['locale'],'Edit'),_0x4d4534['icon']=_0x581276,_0x4d4534['withText']=!0x0,_0x4d4534['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x4d4534['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5bfafb=>!_0x5bfafb),_0x4d4534['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x4d4534['on']('execute',()=>this['switchToEditMode']()),_0x4d4534;}_createRemoveButton(){const _0x28d861=new _0x44164c(this['locale']);return _0x28d861['label']=Et(this['locale'],'Remove'),_0x28d861['icon']=_0x3e209f,_0x28d861['withText']=!0x0,_0x28d861['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x28d861['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5cb03b=>!_0x5cb03b),_0x28d861['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x28d861['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x28d861;}_createDropdown(){const _0x11465a=ct(this['locale'],_0x262490),_0x4e62b9=_0x11465a['panelView']['children'],_0x57cb70=new ot(this['locale']),_0x48195f=_0x11465a['bindTemplate'];dt(_0x11465a,()=>this['items']['find'](_0x3cd3f0=>_0x3cd3f0['isVisible'])),_0x11465a['extendTemplate']({'attributes':{'class':[_0x48195f['if']('isVisible','ck-hidden',_0x24f83e=>!_0x24f83e)]}});const _0x3e622a=(_0x45efe9,_0x12506f=-0x1)=>{const _0x317e93=new nt(this['locale']);_0x317e93['children']['add'](_0x45efe9);const _0x280a8b=_0x12506f>-0x1?_0x12506f:_0x57cb70['items']['length'];_0x57cb70['items']['add'](_0x317e93,_0x280a8b);const _0x2523b2=Array['from'](this['items']);_0x11465a['unbind']('isEnabled','isVisible'),_0x11465a['bind']('isEnabled')['toMany'](_0x2523b2,'isEnabled',(..._0x422013)=>_0x422013['some'](_0x582910=>_0x582910)),_0x11465a['bind']('isVisible')['toMany'](_0x2523b2,'isVisible',(..._0x3be7cb)=>_0x3be7cb['some'](_0x20d66e=>_0x20d66e));};_0x11465a['panelPosition']='sw',_0x11465a['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x280fcb});for(const _0x13cb6c of this['items'])_0x3e622a(_0x13cb6c);return _0x4e62b9['add'](_0x57cb70),_0x11465a['listenTo'](this['items'],'add',(_0x4a6b13,_0x2a7cbe,_0x6ef28f)=>{_0x3e622a(_0x2a7cbe,_0x6ef28f);}),_0x11465a['listenTo'](this['items'],'remove',(_0x3f1795,_0x4a0930,_0x5dbaf3)=>{_0x57cb70['items']['remove'](_0x5dbaf3);}),_0x11465a;}_attachActions(_0x4a7dbf,_0x3feb71){const _0x24d3f0=_0x4a7dbf&&_0x4a7dbf['element'];_0x24d3f0&&(this['listenTo'](_0x24d3f0,'mouseenter',()=>this['actionIndicator']=_0x3feb71),this['listenTo'](_0x24d3f0,'focus',()=>this['actionIndicator']=_0x3feb71),this['listenTo'](_0x24d3f0,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x24d3f0,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x1f7b68=super['_createCommentInputView']();return _0x1f7b68['bind']('placeholder')['to'](this),_0x1f7b68;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x310249){const _0x3a63f6=_0x2f41cf(_0x310249,0x1e),_0x49f171=new MutationObserver(_0xd5649f=>{for(const _0xf7b543 of _0xd5649f)('attributes'==_0xf7b543['type']&&'class'==_0xf7b543['attributeName']||'childList'==_0xf7b543['type']||'characterData'==_0xf7b543['type'])&&_0x3a63f6();});return{'attach'(_0x16b4a6){_0x49f171['observe'](_0x16b4a6,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x49f171['disconnect'](),_0x3a63f6['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x59c646,_0x1de940){super(_0x59c646),this['id']=_0x348c57(),this['focusTracker']=new _0x52e6a6(),this['keystrokes']=new _0x1c4986(),this['keystrokes']['set']('Esc',(_0x275a13,_0x475fbf)=>this['fire']('Esc',_0x475fbf)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x1de940),this['mainView']=_0x1de940;const _0x5778fc=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x5778fc['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 _0x2d32d8=this['element']['clientHeight'];_0x2d32d8&&(this['height']=_0x2d32d8);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0xf65c5e();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x120401,target:_0x40eddb,type:_0x2f40f8,isVisible:_0x4ed875=!0x0}){super(),this['view']=_0x120401,this['view']['element']||this['view']['render'](),this['_type']=_0x2f40f8,this['_target']=_0x40eddb,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x43adb0([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4bdc95,_0x29c52f)=>{this['view']['focusTracker']['add'](_0x29c52f);}),this['focusableElements']['on']('remove',(_0x3d698e,_0xe12c11)=>{this['view']['focusTracker']['remove'](_0xe12c11);}),this['set']('isVisible',_0x4ed875);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x206fd4=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x206fd4),_0x206fd4;}get targetRect(){const _0x114161=this['target'];if(null===_0x114161)return null;if(_0x114161 instanceof _0x132048)return _0x114161;const _0x109bfc=_0x114161['filter'](_0x1633f5=>function(_0x219188){return!!_0x219188['offsetParent']||!!_0x219188['getClientRects']()['item'](0x0);}(_0x1633f5));return 0x0===_0x109bfc['length']?null:_0x132048['getDomElementRects'](_0x109bfc[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x5776bf){this['view']['isActive']=_0x5776bf,this['view']['mainView']['isActive']=_0x5776bf;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x1a085d){if(!(null===_0x1a085d||_0x1a085d instanceof _0x132048||Array['isArray'](_0x1a085d)&&_0x1a085d['every'](_0x719687=>zt(_0x719687))))throw new _0x587c70('annotation-invalid-target',null,{'target':_0x1a085d});}_getNormalizedTarget(){const _0x4a5e7b='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x4a5e7b)?[_0x4a5e7b]:_0x4a5e7b;}};function zt(_0x351863){return null!==_0x351863&&'object'==typeof _0x351863&&'nodeType'in _0x351863&&0x1===_0x351863['nodeType'];}var Jt=class extends _0x43adb0{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x2f37ce=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x52e6a6(),this['_focusTracker']['on']('change:isFocused',(_0x5dc4b5,_0x1e734c,_0x35727d)=>{_0x35727d||this['fire']('blur');});for(const _0x1158e2 of _0x2f37ce)this['add'](_0x1158e2);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1356e7){if(this['has'](_0x1356e7))throw new _0x587c70('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1356e7['innerView'],_0x1356e7),this['_viewToAnnotation']['set'](_0x1356e7['view'],_0x1356e7);for(const _0xb52d59 of _0x1356e7['focusableElements'])this['_focusTracker']['add'](_0xb52d59);if(this['listenTo'](_0x1356e7['focusableElements'],'add',(_0x1dde7d,_0x5aa659)=>{this['_focusTracker']['add'](_0x5aa659);}),this['listenTo'](_0x1356e7['focusableElements'],'remove',(_0x742409,_0x17efa3)=>{this['_focusTracker']['remove'](_0x17efa3);}),this['listenTo'](_0x1356e7['view']['focusTracker'],'change:isFocused',(_0x3de8e4,_0x67cacd,_0xd77b71)=>{_0xd77b71&&this['fire']('focus',_0x1356e7);}),_0x1356e7['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x4f3174 of this)_0x4f3174['updateTargetRect']();}const _0x2b389c=this['_getOrderInContent'](_0x1356e7['view']['targetRect']);return super['add'](_0x1356e7,_0x2b389c);}['remove'](_0x341d2c){if(!this['has'](_0x341d2c))throw new _0x587c70('annotationcollection-not-existing-item',null);this['stopListening'](_0x341d2c['view']['focusTracker']),this['stopListening'](_0x341d2c['focusableElements']);for(const _0x136e86 of _0x341d2c['focusableElements'])this['_focusTracker']['remove'](_0x136e86);return this['_viewToAnnotation']['delete'](_0x341d2c['view']),this['_innerViewToAnnotation']['delete'](_0x341d2c['innerView']),super['remove'](_0x341d2c);}getByInnerView(_0x5c8825){return this['_innerViewToAnnotation']['get'](_0x5c8825);}getByView(_0x183848){return this['_viewToAnnotation']['get'](_0x183848);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x2628af of this)_0x2628af['updateTargetRect']();this['_sort']();}_sort(){const _0x16d881=Array['from'](this)['sort']((_0x3aedbe,_0x196339)=>Zt(_0x3aedbe['view']['targetRect'],_0x196339['view']['targetRect']));for(let _0x3907b2=_0x16d881['length']-0x1;_0x3907b2>0x0;_0x3907b2--){const _0x3f60cb=_0x16d881[_0x3907b2];_0x3907b2!==this['getIndex'](_0x3f60cb)&&(this['remove'](_0x3f60cb),this['add'](_0x3f60cb));}}_getOrderInContent(_0x541d39){let _0x3c0e99=0x0;if(!_0x541d39)return this['length'];for(const _0xce9921 of this){const _0x32fc6e=_0xce9921['view']['targetRect'];if(_0x32fc6e){if(Zt(_0x541d39,_0x32fc6e)<0x0)return _0x3c0e99;_0x3c0e99++;}}return _0x3c0e99;}_areCachedRectsStale(){const _0x49f6b9=this['get'](0x0);if(!_0x49f6b9)return!0x1;const _0x361a7b=_0x49f6b9['view']['targetRect'],_0x17ccfb=_0x49f6b9['targetRect'];return!(!_0x361a7b||!_0x17ccfb)&&(_0x361a7b['top']!==_0x17ccfb['top']||_0x361a7b['left']!==_0x17ccfb['left']);}};function Qt({source:_0x5ea43d,target:_0x2acf77,filter:_0x996aeb}){for(const _0x3f02d3 of _0x5ea43d)_0x996aeb(_0x3f02d3)&&_0x2acf77['add'](_0x3f02d3);_0x2acf77['listenTo'](_0x5ea43d,'add',(_0x46b02e,_0x3ee3ae)=>{_0x996aeb(_0x3ee3ae)&&_0x2acf77['add'](_0x3ee3ae);}),_0x2acf77['listenTo'](_0x5ea43d,'remove',(_0x504a5f,_0x57ea51)=>{_0x2acf77['has'](_0x57ea51)&&_0x2acf77['remove'](_0x57ea51);});}function Zt(_0x2b877f,_0x452e6d){if(null===_0x2b877f&&null===_0x452e6d)return 0x0;if(null===_0x2b877f)return-0x1;if(null===_0x452e6d)return 0x1;const _0x12e318=_0x2b877f['top']-_0x452e6d['top'];return 0x0==_0x12e318?_0x2b877f['left']-_0x452e6d['left']:_0x12e318;}var ti=class extends _0x2886e3{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x27bc20){if(super(_0x27bc20),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x27bc20 instanceof _0x4acb07){const _0x3be5af=_0x27bc20['locale'];_0x27bc20['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x3be5af,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x3be5af,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x3be5af,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x3be5af,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x3be5af,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x3be5af,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x3be5af,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x54be10){this['collection']['add'](_0x54be10);}['remove'](_0x1ff7a0){this['collection']['remove'](_0x1ff7a0),_0x1ff7a0['destroy']();}refreshVisibility(){for(const _0x301266 of this['collection'])_0x301266['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x3d839b){return this['collection']['getByInnerView'](_0x3d839b);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x5dce8e of this['collection'])_0x5dce8e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x5d7ecb){this['fire']('_activateAnnotation',_0x5d7ecb);}createAnnotation(_0xf84bc8){return new $t(_0xf84bc8);}createAnnotationView(_0x5d0398,_0x11e1e7){return new qt(_0x5d0398,_0x11e1e7);}_addActiveAnnotation(_0x3ffa79){const _0x5af2b0=new Set(this['activeAnnotations']);_0x5af2b0['add'](_0x3ffa79),this['activeAnnotations']=_0x5af2b0;}_removeActiveAnnotation(_0xf88f16){const _0x4b4f57=new Set(this['activeAnnotations']);_0x4b4f57['delete'](_0xf88f16),this['activeAnnotations']=_0x4b4f57;}_bindAnnotationsToVisibleAnnotations(){const _0x3ab9ef=this['collection'],_0x861fac=this['_visibleAnnotations'];function _0xff83b8(_0x19089b){const _0x314d8a=_0x19089b['source'];_0x314d8a['isVisible']&&!_0x861fac['has'](_0x314d8a)?_0x861fac['add'](_0x314d8a):!_0x314d8a['isVisible']&&_0x861fac['has'](_0x314d8a)&&_0x861fac['remove'](_0x314d8a),_0x314d8a['view']['focusTracker']['remove'](_0x314d8a['view']['element']),_0x314d8a['view']['focusTracker']['add'](_0x314d8a['view']['element']);}this['listenTo'](_0x3ab9ef,'add',(_0x84b8d6,_0xc6aa28)=>{_0xc6aa28['isVisible']&&_0x861fac['add'](_0xc6aa28),this['listenTo'](_0xc6aa28,'change:isVisible',_0xff83b8);}),this['listenTo'](_0x3ab9ef,'remove',(_0x35a69d,_0x1aa6d4)=>{_0x861fac['has'](_0x1aa6d4)&&_0x861fac['remove'](_0x1aa6d4),this['stopListening'](_0x1aa6d4,'change:isVisible',_0xff83b8);});}_setupEnterAnnotationKeystroke(){const _0x27600e=_0x32fd8e=>{_0x32fd8e['on']('ready',()=>{_0x32fd8e['keystrokes']['set'](_0x1880a8,(_0x342937,_0x4756e6)=>{const _0x3fe08d=_0x48a874(this['activeAnnotations']['values']());_0x3fe08d&&(_0x3fe08d['view']['focus'](),_0x4756e6());});});};this['context']instanceof _0x4acb07?_0x27600e(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1c0d9d,_0x5b69b5)=>{_0x27600e(_0x5b69b5);});}_setupEscapeAnnotationHandling(){const _0x1e81cc=_0x8c75e=>{const _0x583482=_0x8c75e['source'],_0x50defc=[];let _0x2a48fb;if(Array['isArray'](_0x583482['target'])){_0x2a48fb=_0x583482['target'][0x0],this['context']instanceof _0x4acb07?_0x50defc['push'](this['context']):this['context']['editors']&&_0x50defc['push'](...this['context']['editors']);for(const _0x262370 of _0x50defc)for(const _0x273be4 of _0x262370['editing']['view']['domRoots']['values']())if(_0x273be4['contains'](_0x2a48fb))return void _0x262370['editing']['view']['focus']();_0x2a48fb['focus']();}};this['listenTo'](this['collection'],'add',(_0x157967,_0x296c9c)=>{this['listenTo'](_0x296c9c,'escape',_0x1e81cc,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3bf6e5,_0x1f4f64)=>{this['stopListening'](_0x1f4f64,'escape',_0x1e81cc);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0xf65c5e(),ni=/* #__PURE__ -- @preserve */
31
+ _0xf65c5e();var oi=class extends _0x2886e3{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x4847f1,_0x5b5781];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x17e576){super(_0x17e576),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3dc4cb=this['context']['config'];_0x3dc4cb['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3dc4cb['define']('comments.maxThreadTotalWeight',0x1f4),_0x3dc4cb['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3dc4cb['define']('comments.CommentThreadView',Ut),_0x3dc4cb['define']('comments.CommentView',Yt),_0x3dc4cb['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0xab2371=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5b7221,_0x1681c7)=>this['_addCommentThread'](_0x1681c7)),this['on']('submitCommentThread',(_0x2aed0b,_0x28534d)=>this['_submitCommentThread'](_0x28534d)),this['on']('resolveCommentThread',(_0x2b5045,_0xa1202d)=>this['_resolveCommentThread'](_0xa1202d)),this['on']('resolveCommentThread',(_0x4a69e7,_0x33aab2)=>this['_updateActiveAnnotation'](_0x33aab2),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2ecba4,_0x5f30df)=>this['_reopenCommentThread'](_0x5f30df)),this['on']('reopenCommentThread',(_0x2292b3,_0x133942)=>this['_updateActiveAnnotation'](_0x133942),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5955c4,_0x141357)=>this['_removeCommentThread'](_0x141357)),this['on']('updateCommentThread',(_0x2b075d,_0x1b5df9)=>this['_updateCommentThread'](_0x1b5df9)),this['on']('updateCommentThread',(_0x146647,_0x31dffb)=>this['_updateActiveAnnotation'](_0x31dffb),{'priority':'lowest'}),this['on']('addComment',(_0x557e21,_0x830b65)=>this['_addComment'](_0x830b65)),this['on']('updateComment',(_0x35eb35,_0x1f19e1)=>this['_updateComment'](_0x1f19e1)),this['on']('removeComment',(_0x39f667,_0x4fe31d)=>this['_removeComment'](_0x4fe31d)),this['on']('addComment',(_0x3d54c7,{threadId:_0xa21c44,isFromAdapter:_0x54fa05})=>{if(_0x54fa05)return;const _0x3a270b=this['getCommentThread'](_0xa21c44),_0x5cd942=_0x3a270b&&this['_threadToController']['get'](_0x3a270b);_0x5cd942&&_0x5cd942['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xab2371,'change:activeAnnotations',(_0x7104d7,_0x3ba0b7,_0x3e7156)=>{const _0x229ed9=Array['from'](_0x3e7156)['map'](_0x9cfde4=>this['_viewToController']['get'](_0x9cfde4['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x229ed9?_0x229ed9['model']:null;});}set adapter(_0x2ce41a){if(this['_adapter'])throw new _0x587c70('commentsrepository-adapter-already-set');this['_adapter']=_0x2ce41a;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x5e7fd6=ii,threadId:_0x2f0188=_0x348c57(),comments:_0x4a0c5d=[],unlinkedAt:_0x45d854=null,resolvedAt:_0x1b0c4a=null,resolvedBy:_0x5f1053=null,target:_0xc74584=null,context:_0x2a7e87=null,attributes:_0x1ead84={},isResolvable:_0x1acb07=!0x0,isSubmitted:_0x2eae2d=!0x1,isFromAdapter:_0x463c1a=!0x1}={}){return this['fire'](ai('addCommentThread',_0x5e7fd6),{'channelId':_0x5e7fd6,'threadId':_0x2f0188,'comments':_0x4a0c5d,'unlinkedAt':_0x45d854,'resolvedAt':_0x1b0c4a,'resolvedBy':_0x5f1053,'target':_0xc74584,'context':_0x2a7e87,'attributes':_0x1ead84,'isFromAdapter':_0x463c1a,'isResolvable':_0x1acb07,'isSubmitted':_0x2eae2d}),this['getCommentThread'](_0x2f0188);}openNewCommentThread({channelId:_0x48feb2=ii,threadId:_0x31d5f9=_0x348c57(),target:_0x34e8b1,context:_0x1b8294=null,isResolvable:_0x60f5d9=!0x0}){if(this['_readOnlyChannels']['has'](_0x48feb2)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x34e8b1)throw new _0x587c70('commentsrepository-missing-target');const _0x5133f9=this['addCommentThread']({'channelId':_0x48feb2,'threadId':_0x31d5f9,'target':_0x34e8b1,'context':_0x1b8294,'isResolvable':_0x60f5d9});if(!_0x5133f9)return null;const _0x16df33=this['_threadToController']['get'](_0x5133f9),_0x3d57a9=_0x16df33['view']['commentThreadInputView']['commentInputView'],_0x4e5a14=this['context']['plugins']['get'](ti),_0x3d2bf6=_0x4e5a14['getByInnerView'](_0x16df33['view']);return _0x4e5a14['activate'](_0x3d2bf6),_0x3d57a9['once']('editorReady',()=>_0x3d57a9['focus']()),_0x5133f9;}hasCommentThread(_0x90e0c4){if('string'!=typeof _0x90e0c4)throw new _0x587c70('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x90e0c4);}updateCommentThread({channelId:_0x483d9d=ii,threadId:_0x2902df,context:_0x2a5ca7,unlinkedAt:_0x5d856f,attributes:_0x8312e0,isFromAdapter:_0x5e5eb8=!0x1}){return this['fire'](ai('updateCommentThread',_0x483d9d),{'channelId':_0x483d9d,'threadId':_0x2902df,'context':_0x2a5ca7,'unlinkedAt':_0x5d856f,'attributes':_0x8312e0,'isFromAdapter':_0x5e5eb8}),this['getCommentThread'](_0x2902df);}getCommentThread(_0x2bdf6e){if('string'!=typeof _0x2bdf6e)throw new _0x587c70('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2bdf6e);}fetchCommentThread({channelId:_0x5e6628,threadId:_0x28d536}={}){const _0xa9fa3e=this['getCommentThread'](_0x28d536);if(_0xa9fa3e)return Promise['resolve'](_0xa9fa3e);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x587c70('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5e6628,'threadId':_0x28d536})['then'](_0x5cc87d=>this['hasCommentThread'](_0x28d536)?this['getCommentThread'](_0x28d536):_0x5cc87d?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5e6628},_0x5cc87d)):void 0x0)['catch'](_0x4836c4=>{throw console['error'](_0x4836c4),new _0x587c70('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x113489,skipNotAttached:_0x2bb703=!0x1,skipEmpty:_0x9689f6=!0x1,toJSON:_0x51bf93=!0x1}={}){const _0x560210=[];for(const _0x5db999 of this['_threads']['values']())_0x113489&&_0x5db999['channelId']!==_0x113489||_0x2bb703&&!_0x5db999['isAttached']||_0x9689f6&&0x0===_0x5db999['length']||_0x560210['push'](_0x5db999);return _0x51bf93?_0x560210['map'](_0x46a0a1=>_0x46a0a1['toJSON']()):_0x560210;}getAnnotationForCommentThread(_0x2b4264){const _0x307864=this['_threadToController']['get'](_0x2b4264);return _0x307864&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x307864['view'])||null;}getCommentThreadForAnnotation(_0x14cae1){const _0x3ffd6f=this['_viewToController']['get'](_0x14cae1['innerView']);return _0x3ffd6f?_0x3ffd6f['model']:null;}setActiveCommentThread(_0x18a7df){const _0x1d6dae=this['context']['plugins']['get'](ti);if(!_0x18a7df)return void(this['activeCommentThread']&&_0x1d6dae['deactivateAll']());const _0x4070c4=this['getCommentThread'](_0x18a7df);if(!_0x4070c4)throw new _0x587c70('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x18a7df});if(!this['_threadToController']['has'](_0x4070c4))throw new _0x587c70('commentsrepository-active-not-attached',null,{'threadId':_0x18a7df});const _0xfb9d75=_0x1d6dae['getByInnerView'](this['_threadToController']['get'](_0x4070c4)['view']);_0x1d6dae['activate'](_0xfb9d75);}switchReadOnly(_0xab5f0c,_0x19b24f){_0xab5f0c?this['_readOnlyChannels']['add'](_0x19b24f):this['_readOnlyChannels']['delete'](_0x19b24f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1721a3){return this['_readOnlyChannels']['has'](_0x1721a3)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x57f88b,_0x54bce1){return new bt(_0x57f88b,_0x54bce1);}setPermissions(_0x3f9781,_0x13ea02=ii){this['_permissions']['set'](_0x13ea02,_0x3f9781),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x216ebb=ii){return this['_permissions']['has'](_0x216ebb)?this['_permissions']['get'](_0x216ebb):ei;}_addCommentThread({channelId:_0x47a90e,threadId:_0x4f88ee,comments:_0x5bf8cb,unlinkedAt:_0x141934,resolvedAt:_0xef070f,resolvedBy:_0x3e2ecb,target:_0x5cc771,context:_0x2ea1a7,attributes:_0x2ddbf9,isFromAdapter:_0x1b7db3,isResolvable:_0x339df5,isSubmitted:_0x29c598}){if('string'!=typeof _0x4f88ee)throw new _0x587c70('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4f88ee});if(this['hasCommentThread'](_0x4f88ee))throw new _0x587c70('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4f88ee});const _0x19671c=new ri(this,{'channelId':_0x47a90e,'id':_0x4f88ee,'context':_0x2ea1a7,'attributes':_0x2ddbf9,'unlinkedAt':_0x141934,'resolvedAt':_0xef070f,'resolvedBy':_0x3e2ecb?this['context']['plugins']['get'](_0x5b5781)['getUser'](_0x3e2ecb):null,'isResolvable':_0x339df5,'isSubmitted':_0x29c598||_0x1b7db3});this['_threads']['set'](_0x4f88ee,_0x19671c);for(const _0x3b9004 of _0x5bf8cb)_0x19671c['_add'](this['_createNewComment']({'threadId':_0x4f88ee,..._0x3b9004}));return _0x5cc771&&_0x19671c['attachTo'](_0x5cc771),_0x1b7db3||!_0x19671c['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x47a90e,'threadId':_0x4f88ee});}_submitCommentThread({channelId:_0x2c1610,threadId:_0x134297}){if(!this['hasCommentThread'](_0x134297))throw new _0x587c70('commentsrepository-missing-comment-thread',this);const _0x14855f=this['getCommentThread'](_0x134297);if(_0x14855f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x49d697,comments:_0x1e734a,resolvedAt:_0x5073e6,resolvedBy:_0x130fd7,context:_0x32d214,attributes:_0xff971d}=_0x14855f,_0x2e1b03=this['context']['plugins']['get']('PendingActions'),_0x58dd5c=_0x2e1b03['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2c1610,'threadId':_0x49d697,'comments':_0x1e734a['map'](_0x370cb7=>_0x370cb7['toJSON']()),'resolvedAt':_0x5073e6,'resolvedBy':_0x130fd7?_0x130fd7['id']:_0x130fd7,'context':_0x32d214,'attributes':_0xff971d})['then'](({comments:_0x292da7})=>{_0x2e1b03['remove'](_0x58dd5c);for(const _0x41942c of _0x292da7)this['_updateComment']({'channelId':_0x2c1610,'threadId':_0x134297,'commentId':_0x41942c['commentId'],'createdAt':_0x41942c['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x52c9f7=>{throw console['error'](_0x52c9f7),new _0x587c70('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x556a61,target:_0x5aa9c3}){const _0x5ea33d=this['getCommentThread'](_0x556a61);if(!_0x5ea33d)throw new _0x587c70('commentsrepository-attach-missing-comment-thread',this);const _0x4403dc=this['context']['plugins']['get']('PendingActions'),_0x3c5390=this['context']['plugins']['get'](ti),_0x4c5ddf=this['_createCommentThreadView'](_0x5ea33d),_0x18bd74=new bt(_0x5ea33d,_0x4c5ddf);let _0x514c10=null;_0x4c5ddf['on']('change:isDirty',(_0x520ddb,_0x25db1f,_0x205cb1)=>{_0x205cb1?_0x514c10=_0x4403dc['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x514c10&&(_0x4403dc['remove'](_0x514c10),_0x514c10=null);}),this['_threadToController']['set'](_0x5ea33d,_0x18bd74),this['_viewToController']['set'](_0x4c5ddf,_0x18bd74);const _0x36256c=new qt(this['context']['locale'],_0x4c5ddf);_0x36256c['bind']('length')['to'](_0x4c5ddf),_0x36256c['bind']('isDirty')['to'](_0x4c5ddf,'isDirty',_0x4c5ddf,'length',(_0xc4747,_0x372f4d)=>_0xc4747||!_0x372f4d),_0x36256c['bind']('isActive')['to'](_0x4c5ddf),_0x36256c['type']='comment';const _0x1986e6=new $t({'view':_0x36256c,'target':_0x5aa9c3,'type':'comment','isVisible':!_0x5ea33d['archivedAt']&&!!('function'==typeof _0x5aa9c3?_0x5aa9c3():_0x5aa9c3)});return _0x4c5ddf['on']('escape',()=>{_0x1986e6['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4c5ddf,_0x1986e6),_0x3c5390['add'](_0x1986e6),_0x1986e6;}_bindAnnotationToEditors(_0x272d8e,_0x298b14){this['listenTo'](_0x272d8e,'editorReady',(_0xff473e,_0x400870)=>{const _0x2f9a8f=_0x400870['ui']['view']['body']['bodyCollectionContainer'];_0x298b14['focusableElements']['add'](_0x2f9a8f),this['context']instanceof _0x4acb07&&this['context']['ui']['focusTracker']['add'](_0x2f9a8f);},{'priority':'highest'}),this['listenTo'](_0x272d8e,'editorDestroyed',(_0x27a417,_0x3e4744)=>{const _0x30f5dd=_0x3e4744['ui']['view']['body']['bodyCollectionContainer'];_0x298b14['focusableElements']['has'](_0x30f5dd)&&_0x298b14['focusableElements']['remove'](_0x30f5dd),this['context']instanceof _0x4acb07&&this['context']['ui']['focusTracker']['remove'](_0x30f5dd);});}_unbindEditors(_0x2be805){this['stopListening'](_0x2be805,'editorReady'),this['stopListening'](_0x2be805,'editorDestroyed');}_createCommentThreadView(_0x2cc1f6){const _0x371732=this['context']['plugins']['get'](_0x5b5781),{config:_0xe53bb0,locale:_0x1e5611}=this['context'],_0x42905a=_0x3c2e31(_0xe53bb0['get']('locale'),_0x1e5611);return new(0x0,(_0xe53bb0['get']('comments'))['CommentThreadView'])(_0x1e5611,_0x2cc1f6,_0x371732['me'],{'editorConfig':{..._0xe53bb0['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xe53bb0['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xe53bb0['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xe53bb0['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xe53bb0['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x42905a,'CommentView':_0xe53bb0['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x3499b0,channelId:_0xef2e1e,resolvedAt:_0x29f4ee,resolvedBy:_0x1f82d0,isFromAdapter:_0x440e30}){if(!this['hasCommentThread'](_0x3499b0))throw new _0x587c70('commentsrepository-missing-comment-thread',null,{'threadId':_0x3499b0});const _0x190dcf=this['getCommentThread'](_0x3499b0);if(_0x190dcf['isResolved'])throw new _0x587c70('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3499b0});const _0x387fa6=this['context']['plugins']['get'](_0x5b5781);if(_0x190dcf['resolvedBy']=_0x387fa6['getUser'](_0x1f82d0),_0x190dcf['resolvedAt']=_0x29f4ee,_0x440e30||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x147abc=this['context']['plugins']['get']('PendingActions'),_0x35152f=_0x147abc['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xef2e1e,'threadId':_0x3499b0})['then'](({resolvedAt:_0x44f5c6,resolvedBy:_0x2c1b11})=>{_0x147abc['remove'](_0x35152f),_0x190dcf['resolvedBy']['id']!==_0x2c1b11&&(_0x190dcf['resolvedBy']=_0x387fa6['getUser'](_0x2c1b11)),_0x190dcf['resolvedAt']=_0x44f5c6;})['catch'](_0x9107b5=>{throw console['error'](_0x9107b5),new _0x587c70('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x5ddf2f,channelId:_0x50a65f,isFromAdapter:_0x96589b}){if(!this['hasCommentThread'](_0x5ddf2f))throw new _0x587c70('commentsrepository-missing-comment-thread',null,{'threadId':_0x5ddf2f});const _0x3f06d9=this['getCommentThread'](_0x5ddf2f);if(!_0x3f06d9['isResolved'])throw new _0x587c70('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5ddf2f});if(_0x3f06d9['resolvedBy']=null,_0x3f06d9['resolvedAt']=null,_0x96589b||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3ee4a1=this['context']['plugins']['get']('PendingActions'),_0x298833=_0x3ee4a1['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x50a65f,'threadId':_0x5ddf2f})['then'](()=>_0x3ee4a1['remove'](_0x298833))['catch'](_0x35ea89=>{throw console['error'](_0x35ea89),new _0x587c70('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x5f17c3,isFromAdapter:_0x340bab}){const _0x5b9e2b=this['getCommentThread'](_0x5f17c3);if(!_0x5b9e2b)throw new _0x587c70('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5f17c3),this['_threads']['delete'](_0x5f17c3),!_0x5b9e2b['isSubmitted']||_0x340bab||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x519a28=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3a0329}=_0x5b9e2b,_0x40d289=_0x519a28['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3a0329,'threadId':_0x5f17c3})['then'](()=>_0x519a28['remove'](_0x40d289))['catch'](_0x49b552=>{throw console['error'](_0x49b552),new _0x587c70('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x5b970a,unlinkedAt:_0x2a788c,context:_0x3b1f62,attributes:_0x5b7e72,isFromAdapter:_0x3911da}){if('string'!=typeof _0x5b970a)throw new _0x587c70('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5b970a});if(!this['hasCommentThread'](_0x5b970a))throw new _0x587c70('commentsrepository-missing-comment-thread',null,{'threadId':_0x5b970a});const _0x57edf4=this['getCommentThread'](_0x5b970a);let _0x5b64ee=!0x1;if(void 0x0!==_0x3b1f62&&_0x57edf4['context']!==_0x3b1f62&&(_0x57edf4['context']=_0x3b1f62,_0x5b64ee=!0x0),void 0x0!==_0x2a788c&&_0x57edf4['unlinkedAt']!==_0x2a788c&&(_0x57edf4['unlinkedAt']=_0x2a788c,_0x5b64ee=!0x0),_0x5b7e72&&!_0x8ea8ca(_0x5b7e72,_0x57edf4['attributes'])&&(_0x57edf4['attributes']=_0x5b7e72,_0x5b64ee=!0x0),!_0x5b64ee)return Promise['resolve']();if(!_0x57edf4['isSubmitted']||_0x3911da||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x15a122=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7a4a4}=_0x57edf4,_0x2cecc0=_0x15a122['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x7a4a4,'threadId':_0x5b970a,'context':_0x3b1f62,'unlinkedAt':_0x2a788c,'attributes':_0x5b7e72})['then'](()=>_0x15a122['remove'](_0x2cecc0))['catch'](_0x438d56=>{throw console['error'](_0x438d56),new _0x587c70('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x37ca0f){const _0x390bee=this['context']['plugins']['get'](ti),_0x48ad2d=this['getCommentThread'](_0x37ca0f);if(_0x48ad2d['_isAttached']=!0x1,this['_threadToController']['has'](_0x48ad2d)){const _0x3b65bf=this['_threadToController']['get'](_0x48ad2d),_0x181f9f=_0x3b65bf['view'],_0x529e81=_0x390bee['getByInnerView'](_0x181f9f);this['_threadToController']['delete'](_0x48ad2d),this['_viewToController']['delete'](_0x181f9f),_0x529e81&&_0x390bee['remove'](_0x529e81),_0x3b65bf['destroy'](),_0x181f9f['destroy']()['then'](()=>{this['_unbindEditors'](_0x181f9f);});}}_updateActiveAnnotation({threadId:_0x289640,resolvedAt:_0x5d199b,unlinkedAt:_0x53bb3d}){const _0x55674a=!!_0x5d199b,_0x2cb776=this['context']['plugins']['get'](ti),_0x1242ce=this['getCommentThread'](_0x289640);if(this['_threadToController']['has'](_0x1242ce)){const _0x5891c1=this['_threadToController']['get'](_0x1242ce)['view'],_0x27e55d=_0x2cb776['getByInnerView'](_0x5891c1);_0x27e55d&&(_0x55674a&&_0x2cb776['_removeActiveAnnotation'](_0x27e55d),_0x53bb3d?_0x27e55d['isVisible']=!0x1:_0x27e55d['refreshVisibility']());}}_getExternalAuthor(_0x30036c){const _0x54ce7a=this['context']['plugins']['get'](_0x5b5781),_0x172b32=_0x46a734('external:'+_0x30036c),_0x19929b=_0x54ce7a['getUser'](_0x172b32);return _0x19929b||_0x54ce7a['addUser']({'id':_0x172b32,'name':_0x30036c});}_createNewComment({threadId:_0x16b522,commentId:_0x2d0c84=_0x348c57(),content:_0x4ff08d,authorId:_0x1400f1,createdAt:_0xd114cc,attributes:_0x526870}){if('string'!=typeof _0x2d0c84)throw new _0x587c70('commentsrepository-invalid-commentid');if('string'!=typeof _0x1400f1)throw new _0x587c70('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4ff08d||!_0x4ff08d['trim']())throw new _0x587c70('commentsrepository-invalid-comment-content');const _0x211b7e=this['context']['plugins']['get'](_0x5b5781)['getUser'](_0x1400f1);if(!_0x211b7e)throw new _0x587c70('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1400f1});let _0x114b4a=null,_0x41a329=_0xd114cc;return _0x526870?.['@external']&&(_0x114b4a=this['_getExternalAuthor'](_0x526870['@external']['authorName']),_0x41a329=new Date(_0x526870['@external']['createdAt'])),new hi(this,{'threadId':_0x16b522,'id':_0x2d0c84,'author':_0x114b4a||_0x211b7e,'creator':_0x211b7e,'content':_0x4ff08d,'createdAt':_0xd114cc,'authoredAt':_0x41a329,'attributes':_0x526870});}_addComment(_0x350da5){let {threadId:_0x436557,content:_0x30a355,attributes:_0x262be8,isFromAdapter:_0x353c8c}=_0x350da5;const _0x574ed7=this['getCommentThread'](_0x350da5['threadId']);if(!_0x574ed7)throw new _0x587c70('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x12c8ce=this['_createNewComment'](_0x350da5),{id:_0x4ae384}=_0x12c8ce;if(_0x574ed7['_add'](_0x12c8ce),_0x353c8c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x574ed7['isSubmitted'])return Promise['resolve']();const _0x5bc095=this['context']['plugins']['get']('PendingActions'),{channelId:_0x50be65}=_0x574ed7,_0xdd8b26=_0x5bc095['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x262be8||(_0x262be8={}),this['adapter']['addComment']({'channelId':_0x50be65,'threadId':_0x436557,'commentId':_0x4ae384,'content':_0x30a355,'attributes':_0x262be8})['then'](_0x18372e=>{_0x5bc095['remove'](_0xdd8b26),_0x18372e&&this['_updateComment']({'channelId':_0x50be65,'threadId':_0x436557,'commentId':_0x4ae384,'createdAt':_0x18372e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xda282f=>{throw console['error'](_0xda282f),new _0x587c70('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x2f5313,commentId:_0x3df1fd,content:_0x58c3f5,createdAt:_0x34d8ed,attributes:_0x7a9955,isFromAdapter:_0x4eff32}){if(void 0x0!==_0x58c3f5&&('string'!=typeof _0x58c3f5||!_0x58c3f5['trim']()['length']))throw new _0x587c70('commentsrepository-update-comment-invalid-content');const _0x9edf2d=this['getCommentThread'](_0x2f5313),_0xb28962=_0x9edf2d['getComment'](_0x3df1fd);if(!_0xb28962)throw new _0x587c70('commentsrepository-update-missing-comment',this);let _0x394171=!0x1;if(_0x58c3f5&&_0x58c3f5!==_0xb28962['content']&&(_0xb28962['isEditable']||_0x4eff32)&&(_0xb28962['content']=_0x58c3f5,_0x394171=!0x0),_0x34d8ed&&_0x34d8ed!==_0xb28962['createdAt']&&(_0xb28962['createdAt']=_0x34d8ed,_0xb28962['isExternal']||(_0xb28962['authoredAt']=_0x34d8ed),_0x394171=!0x0),_0x7a9955&&!_0x8ea8ca(_0x7a9955,_0xb28962['attributes'])&&(_0xb28962['attributes']=_0x7a9955,_0x394171=!0x0),!_0x394171)return Promise['resolve']();if(_0x9edf2d['fire']('commentUpdated'),_0x4eff32||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1ae7fa=this['context']['plugins']['get']('PendingActions'),{channelId:_0x415540}=this['getCommentThread'](_0xb28962['threadId']),_0x580f39=_0x1ae7fa['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x415540,'threadId':_0x2f5313,'commentId':_0x3df1fd,'content':_0x58c3f5,'attributes':_0x7a9955})['then'](()=>_0x1ae7fa['remove'](_0x580f39))['catch'](_0x40740e=>{throw console['error'](_0x40740e),new _0x587c70('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x30f25d,commentId:_0x373530,isFromAdapter:_0x1da79d}){const _0x57e32d=this['getCommentThread'](_0x30f25d),_0x543cb2=_0x57e32d['getComment'](_0x373530);if(!_0x543cb2)throw new _0x587c70('commentsrepository-remove-missing-comment',this);if(_0x57e32d['_remove'](_0x543cb2),_0x1da79d||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x18b243=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1c35a6}=_0x57e32d,_0x67d1bf=_0x18b243['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1c35a6,'threadId':_0x30f25d,'commentId':_0x373530})['then'](()=>_0x18b243['remove'](_0x67d1bf))['catch'](_0x47472c=>{throw console['error'](_0x47472c),new _0x587c70('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x5e008e,_0x3ba4b9){super();const _0x56e3da=_0x3ba4b9['isResolvable'];this['channelId']=_0x3ba4b9['channelId'],this['id']=_0x3ba4b9['id'],this['comments']=new _0x43adb0(),this['_repository']=_0x5e008e,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3ba4b9['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5e008e,'_permissions',_0x5e008e,'_readOnlyChannels',()=>_0x5e008e['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5e008e,'_permissions',()=>_0x5e008e['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5e008e,'_permissions',()=>{const _0x5d0342=_0x5e008e['getPermissions'](this['channelId']);return _0x5d0342['write']||_0x5d0342['admin'];}),this['bind']('isResolvable')['to'](_0x5e008e,'_permissions',()=>_0x56e3da&&_0x5e008e['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3ba4b9['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5eb954,_0x5e7a36)=>_0x5eb954?_0x5e7a36?_0x5eb954<_0x5e7a36?_0x5eb954:_0x5e7a36:_0x5eb954:_0x5e7a36),this['set']('unlinkedAt',_0x3ba4b9['unlinkedAt']||null),this['set']('resolvedAt',_0x3ba4b9['resolvedAt']||null),this['set']('resolvedBy',_0x3ba4b9['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x15b5af=>!!_0x15b5af),this['set']('attributes',_0x3ba4b9['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x1ec4ad,_0x171985)=>_0x1ec4ad+_0x171985['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x31ba03,id:_0x593a36}=this;this['_repository']['fire'](ai('submitCommentThread',_0x31ba03),{'channelId':_0x31ba03,'threadId':_0x593a36});}setUnlinkedAt(_0x806dc6){this['_update']({'unlinkedAt':_0x806dc6});}['resolve']({resolvedAt:_0x2abc29=new Date(),resolvedBy:_0x12cfdc='',isFromAdapter:_0x7c87c0=!0x1}={}){const _0x93396d=this['_repository']['context']['plugins']['get'](_0x5b5781)['me'],{channelId:_0x2587cf,id:_0xb21653}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x2587cf),{'channelId':_0x2587cf,'threadId':_0xb21653,'resolvedAt':_0x2abc29,'resolvedBy':_0x12cfdc||_0x93396d['id'],'isFromAdapter':_0x7c87c0});}['reopen']({isFromAdapter:_0x112741=!0x1}={}){const {channelId:_0x34a1ac,id:_0x4c10eb}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x34a1ac),{'channelId':_0x34a1ac,'threadId':_0x4c10eb,'isFromAdapter':_0x112741});}setContext(_0x2c81b8){this['context']||this['_update']({'context':_0x2c81b8});}setAttribute(_0x474c0c,_0x477eef){const _0x1aeb65=_0x335fae(this['attributes']);_0xe4f958(_0x1aeb65,_0x474c0c,_0x477eef),this['_update']({'attributes':_0x1aeb65});}removeAttribute(_0x1c8c16){const _0xc08b30=_0x335fae(this['attributes']);_0x7243f(_0xc08b30,_0x1c8c16),this['_update']({'attributes':_0xc08b30});}['remove']({isFromAdapter:_0x42799c=!0x1}={}){const {channelId:_0x159b58,id:_0x598139}=this;this['_repository']['fire'](ai('removeCommentThread',_0x159b58),{'channelId':_0x159b58,'threadId':_0x598139,'isFromAdapter':_0x42799c});}attachTo(_0x4b48ae){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x4b48ae});}addComment(_0x600103){const {channelId:_0x3129e4,id:_0x2b414c}=this;this['_repository']['fire'](ai('addComment',_0x3129e4,_0x2b414c),Object['assign']({'channelId':_0x3129e4,'threadId':_0x2b414c},_0x600103));}getComment(_0x31115e){if('string'!=typeof _0x31115e)throw new _0x587c70('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x31115e});return this['comments']['get'](_0x31115e);}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'](_0x2f2c21=>_0x2f2c21['toJSON']()),'attributes':this['attributes']};}['_add'](_0x11f8cd){return this['listenTo'](_0x11f8cd,'change:authoredAt',()=>{const _0x23e216=this['_findOptimalIndex'](_0x11f8cd),_0x47d4da=this['comments'];_0x23e216-0x1!=_0x47d4da['getIndex'](_0x11f8cd)&&_0x23e216+0x1!=_0x47d4da['getIndex'](_0x11f8cd)&&(this['_remove'](_0x11f8cd),this['_add'](_0x11f8cd));}),this['comments']['add'](_0x11f8cd,this['_findOptimalIndex'](_0x11f8cd));}_update(_0x1dece1){const {channelId:_0x1867e2,id:_0x3a5709}=this;this['_repository']['fire'](ai('updateCommentThread',_0x1867e2),{..._0x1dece1,'channelId':_0x1867e2,'threadId':_0x3a5709});}['_remove'](_0x413347){return this['stopListening'](_0x413347),_0x413347['destroy'](),this['comments']['remove'](_0x413347);}_findOptimalIndex(_0x2af57a){const _0x40db4d=this['comments']['find'](_0x27bc62=>new Date(_0x27bc62['authoredAt'])['getTime']()>new Date(_0x2af57a['authoredAt'])['getTime']());return _0x40db4d?this['comments']['getIndex'](_0x40db4d):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x1c5037,_0x5ebfd6){super();const _0xab0c99=_0x1c5037['context']['plugins']['get'](_0x5b5781)['me'],_0x342d8a=_0x1c5037['getCommentThread'](_0x5ebfd6['threadId']),_0xc57f35=0x0===_0x342d8a['comments']['length'],_0x5d595b=_0xab0c99===_0x5ebfd6['author'];this['id']=_0x5ebfd6['id'],this['threadId']=_0x5ebfd6['threadId'],this['author']=_0x5ebfd6['author'],this['creator']=_0x5ebfd6['creator'],this['set']('content',_0x5ebfd6['content']),this['createdAt']=_0x5ebfd6['createdAt']||new Date(),this['set']('authoredAt',_0x5ebfd6['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x342d8a,'resolvedAt'),this['set']('attributes',_0x5ebfd6['attributes']||{}),this['bind']('isEditable')['to'](_0x1c5037,'_permissions',()=>{const _0x15ff16=_0x1c5037['getPermissions'](_0x342d8a['channelId'])['write'],_0x578d23=_0x1c5037['getPermissions'](_0x342d8a['channelId'])['modifyAll'];return _0x5d595b&&_0x15ff16||!_0x5d595b&&_0x578d23;}),this['bind']('isRemovable')['to'](_0x342d8a,'isRemovable',_0x1c5037,'_permissions',_0xb2f75c=>{const _0x5814aa=_0x1c5037['getPermissions'](_0x342d8a['channelId'])['write'],_0x462227=_0x1c5037['getPermissions'](_0x342d8a['channelId'])['modifyAll'];return _0x5d595b&&_0x5814aa||_0xb2f75c&&_0xc57f35||!_0x5d595b&&_0x462227&&!_0xc57f35;}),this['bind']('isReadOnly')['to'](_0x342d8a,'isReadOnly'),this['_repository']=_0x1c5037;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x24c6f9){const _0x380a05=document['createElement']('div');return _0x380a05['innerHTML']=_0x24c6f9,_0x380a05['textContent']['length'];}(this['content']),0xc8);}update(_0x4d0458){const {threadId:_0x112dda,id:_0x40597b}=this;if(!this['_repository']['hasCommentThread'](_0x112dda))throw new _0x587c70('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x539ea5}=this['_repository']['getCommentThread'](_0x112dda);this['_repository']['fire'](ai('updateComment',_0x539ea5,_0x112dda),{'channelId':_0x539ea5,'threadId':_0x112dda,'commentId':_0x40597b,..._0x4d0458});}setAttribute(_0x363b08,_0x2cafba){const _0x42502f=_0x335fae(this['attributes']);_0xe4f958(_0x42502f,_0x363b08,_0x2cafba),this['update']({'attributes':_0x42502f});}removeAttribute(_0x4c938d){const _0x4cea64=_0x335fae(this['attributes']);_0x7243f(_0x4cea64,_0x4c938d),this['update']({'attributes':_0x4cea64});}['remove'](_0x4d4417={}){if(!_0x4d4417['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x27177a,id:_0x2d4fe6}=this;if(!this['_repository']['hasCommentThread'](_0x27177a))throw new _0x587c70('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x376d59}=this['_repository']['getCommentThread'](_0x27177a);this['_repository']['fire'](ai('removeComment',_0x376d59,_0x27177a),{'channelId':_0x376d59,'threadId':_0x27177a,'commentId':_0x2d4fe6,..._0x4d4417});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x1c3c36,..._0x31515d){for(const _0x2d591e of _0x31515d)void 0x0!==_0x2d591e&&(_0x1c3c36+=':'+String(_0x2d591e));return _0x1c3c36;}var ci=class extends _0x2d7293{constructor(_0xc0ee0b){super(_0xc0ee0b),this['set']('hasContent',!0x1);}['refresh'](){const _0x1201d0=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x35063e of _0x1201d0['getRanges']())if(this['_hasContent'](_0x35063e))return void(this['hasContent']=!0x0);}execute({threadId:_0x569eb6=_0x348c57(),ranges:_0x255f3b,comment:_0x565750}={}){const _0x28809a=this['editor']['model'],_0x1ba68f=_0x255f3b??Array['from'](_0x28809a['document']['selection']['getRanges']()),_0x3d07c8=[];for(const _0x2e7101 of _0x1ba68f)this['_hasContent'](_0x2e7101)&&_0x3d07c8['push'](this['_trimToContent'](_0x2e7101));if(!_0x3d07c8['length'])throw new _0x587c70('addcommentthreadcommand-incorrect-ranges',null);_0x565750&&this['_createCommentThread'](_0x569eb6,_0x565750),this['_createMarkersFromRanges'](_0x569eb6,_0x3d07c8,!!_0x565750);}_createMarkersFromRanges(_0x5e002a,_0x59b7ea,_0x48e845){this['editor']['model']['change'](_0x4ab92c=>{for(const _0x244e3f of _0x59b7ea){const _0x52988c='comment:'+_0x5e002a+':'+_0x348c57()['substr'](0x1,0x5);_0x4ab92c['addMarker'](_0x52988c,{'range':_0x244e3f,'usingOperation':_0x48e845,'affectsData':_0x48e845});}});}_createCommentThread(_0x552b84,_0xe6125e){const _0x56c3e9=this['editor']['plugins']['get']('CommentsRepository'),_0x4f9096=this['editor']['config']['get']('collaboration.channelId'),_0x5e1869=this['editor']['plugins']['get']('Users')['me'];if(!_0x5e1869)throw new _0x587c70('addcommentthreadcommand-user-not-found',null);_0x56c3e9['addCommentThread']({'threadId':_0x552b84,'channelId':_0x4f9096,'comments':[{'authorId':_0x5e1869['id'],'content':_0xe6125e,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x3ed400){for(const _0x3550c5 of _0x3ed400['getItems']())if(this['_itemIsContent'](_0x3550c5))return!0x0;return!0x1;}_itemIsContent(_0x1384e7){return _0x1384e7['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1384e7)&&!_0x1384e7['is']('element','tableCell');}_trimToContent(_0x412307){const _0x3ebfc1=_0x54ce23=>!this['_itemIsContent'](_0x54ce23['item']),_0x12129a=_0x412307['start']['getLastMatchingPosition'](_0x3ebfc1),_0x3e877c=_0x412307['end']['getLastMatchingPosition'](_0x3ebfc1,{'direction':'backward'});return this['editor']['model']['createRange'](_0x12129a,_0x3e877c);}},di=class extends _0x3831f5{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x445c3d){super(_0x445c3d),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x57c7ee=this['editor'],_0x2a4c62=_0x57c7ee['model']['document']['selection'],_0x4e8c6b=_0xbc46bc(()=>this['refreshSelectedViews'](),0xa);_0x2a4c62['on']('change:range',(_0x3ce76a,_0x4080a1)=>{_0x4080a1['directChange']&&(_0x4e8c6b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x57c7ee['editing']['view']['document'],'change:isFocused',(_0x291e4b,_0x1158bb,_0x1f5277)=>{_0x1f5277&&_0x4e8c6b();}),this['listenTo'](_0x57c7ee['ui']['focusTracker'],'change:isFocused',(_0x297cfd,_0x3d1ad9,_0x238f5a)=>{_0x238f5a||this['fire']('blur',{'isAnnotationTracked':_0x5c3a97=>this['_editorAnnotationsData']['has'](_0x5c3a97['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x31fca8){if(this['_editorAnnotations']['has'](_0x31fca8['view']))return;this['_editorAnnotations']['add'](_0x31fca8['view']),this['editor']['ui']['focusTracker']['add'](_0x31fca8['view']['element']);const _0x3ddc91=this['editor']['plugins']['get'](ti);this['listenTo'](_0x3ddc91['collection'],'remove',(_0x518b68,_0x3d069c)=>{this['editor']['ui']['focusTracker']['remove'](_0x3d069c['view']['element']),this['_editorAnnotations']['delete'](_0x3d069c['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x1fae64){if('function'!=typeof _0x1fae64)throw new _0x587c70('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1fae64);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x2bb395,annotations:_0x175ae5}){const _0x2acbe7=[],_0x635bff=this['editor']['model']['document']['selection'],_0x202ec2=Array['from'](_0x635bff['getRanges']());for(const [_0xe6dd95,_0x214eaf]of this['_editorAnnotationsData']){const _0x3631e6=_0x188881(_0x214eaf),_0x3dc0a7=_0x175ae5['getByInnerView'](_0xe6dd95);_0x3631e6&&_0x3dc0a7&&_0x2acbe7['push']({'annotation':_0x3dc0a7,'range':_0x3631e6});}function _0x188881(_0x458f61){for(const _0x5a103f of _0x458f61)for(const _0x94926f of _0x202ec2)if(_0x5a103f['containsRange'](_0x94926f,!_0x635bff['isCollapsed']))return _0x5a103f;return null;}const _0x17a752=new Map(Array['from'](_0x175ae5,(_0x354556,_0x1b6ff7)=>[_0x354556,_0x1b6ff7]));return _0x2acbe7['sort']((_0x4e249d,_0x186d3a)=>{const _0x33194e=_0x4e249d['range'],_0x4c5b6d=_0x186d3a['range'];if(!_0x33194e['isEqual'](_0x4c5b6d)){if(_0x33194e['containsRange'](_0x4c5b6d,!0x0))return 0x1;if(_0x4c5b6d['containsRange'](_0x33194e,!0x0))return-0x1;}return _0x4e249d['annotation']==_0x2bb395?-0x1:_0x186d3a['annotation']==_0x2bb395?0x1:(_0x17a752['get'](_0x4e249d['annotation'])??0x0)-(_0x17a752['get'](_0x186d3a['annotation'])??0x0);})['map'](_0x37ca7a=>_0x37ca7a['annotation']);}get _editorAnnotationsData(){const _0x4b7674=new Map();for(const _0x3a659e of Array['from'](this['_dataCollectors']))for(const [_0x475dbe,_0x396061]of _0x3a659e())_0x4b7674['set'](_0x475dbe,_0x396061);return _0x4b7674;}},li=class extends _0x3831f5{afterInit(){const _0x1226b1=this['editor'];_0x1226b1['plugins']['has']('RestrictedEditingModeEditing')&&_0x1226b1['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x3831f5{constructor(_0x49993a){super(_0x49993a),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x28be55=this['editor'],_0x52ae73=_0x28be55['commands']['get']('importWord'),_0x445f0d=_0x28be55['plugins']['get'](_0x5b5781);_0x52ae73&&(_0x52ae73['on']('execute',(_0x536fbe,[,_0x1a0ccd])=>{_0x1a0ccd['collaboration_features']={'comments':!0x0,'user_id':_0x445f0d['me']['id']};},{'priority':_0x48dc95['high']+0xa}),this['listenTo'](_0x52ae73,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x532204,_0x21cc89){const {comment_threads:_0x363713}=_0x21cc89;_0x363713&&_0x363713['forEach'](({thread_id:_0x6a1375,comments:_0x37de01,is_resolved:_0x2fcc8e})=>{const _0x5b350c=new Date(),_0xd9187b=_0x37de01['map'](({author:_0xb93db3,content:_0x3711fc,created_at:_0x157472})=>({'content':_0x3711fc,'authorId':this['editor']['plugins']['get'](_0x5b5781)['me']['id'],'createdAt':_0x5b350c,'attributes':{'@external':{'authorName':_0xb93db3,'createdAt':_0x157472?new Date(_0x157472):new Date(),'source':'importWord'}}})),_0x1b84c5=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x1b84c5,'threadId':_0x6a1375,'comments':_0xd9187b,'resolvedAt':_0x2fcc8e?_0x5b350c:null});});}},ui=class extends _0x3831f5{constructor(_0x381c71){super(_0x381c71),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x26400d=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x26400d,'contentInsertion',(_0x366907,_0x43f129)=>this['_removeMarkersWithoutThreads'](_0x43f129['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x311017){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x311017;const _0x562bae=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5cbd0d of _0x311017['keys']()){const [_0x313865,_0x3d9df6]=_0x5cbd0d['split'](':');'comment'!=_0x313865||_0x562bae['hasCommentThread'](_0x3d9df6)||_0x311017['delete'](_0x5cbd0d);}return _0x311017;}_registerMarkerInClipboardPipeline(){const _0x398ea8=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x29408f=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x29408f&&_0x398ea8['_registerMarkerToCopy']('comment',_0x29408f);}_mapCommentsCopyConfigToRegisterConfiguration(_0x5ef42a){switch(_0x5ef42a){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x39277b){const _0x200261=_0x39277b['split'](':');return{'group':_0x200261[0x0],'id':_0x200261[0x1],'part':_0x200261[0x2]};}var pi=class extends _0x3831f5{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x50d8af,_0x94083b)=>{if(!_0x94083b['options']['showCommentHighlights'])return null;if(_0x94083b['options']['ignoreResolvedComments']){const {id:_0x5c19a5}=fi(_0x50d8af['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x5c19a5)?.['isResolved']&&_0x50d8af['item'])return _0x94083b['consumable']['consume'](_0x50d8af['item'],'addMarker:'+_0x50d8af['markerName']),_0x94083b['consumable']['consume'](_0x50d8af['item'],'removeMarker:'+_0x50d8af['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x554122=>{_0x554122['on']('addMarker:comment',(_0x27b2ed,_0x4b1101,_0x4ca7c0)=>{if(!_0x4ca7c0['options']['showCommentHighlights'])return;const _0x46a7e4=_0x4b1101['item'];if(!_0x46a7e4)return;const _0x58caf6=_0x4ca7c0['mapper']['toViewElement'](_0x46a7e4);this['editor']['model']['schema']['isObject'](_0x46a7e4)&&_0x58caf6&&!_0x58caf6['getCustomProperty']('widget')&&_0x58caf6['is']('containerElement')&&Ct(_0x58caf6,_0x4ca7c0['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x35b64d,{writer:_0x4eff74,options:_0x4dd0be})=>{if(!_0x4dd0be['showCommentHighlights'])return null;const _0x5e6367=_0x4eff74['createContainerElement']('div'),_0xcfd8b3=_0x4eff74['createEmptyElement']('hr');return _0x4eff74['addClass']('ck-horizontal-line',_0x5e6367),_0x4eff74['insert'](_0x4eff74['createPositionAt'](_0x5e6367,0x0),_0xcfd8b3),_0x5e6367;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x138a3e,{writer:_0x297bde,options:_0x522889})=>{if(!_0x522889['showCommentHighlights'])return null;const _0x2d415d=_0x297bde['createContainerElement']('span'),_0x4e8276=_0x297bde['createEmptyElement']('img');return _0x297bde['addClass']('image-inline',_0x2d415d),_0x297bde['insert'](_0x297bde['createPositionAt'](_0x2d415d,0x0),_0x4e8276),_0x2d415d;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2c5121,{writer:_0xc10cc1,options:_0x12c87b})=>{if(_0x12c87b['showCommentHighlights'])return _0xc10cc1['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2d25e7,_0x43d661,_0x3ab961)=>{_0x3ab961['options']['showCommentHighlights']&&_0x2d25e7['stop']();},{'priority':'high'});}},wi=class extends _0x3831f5{static get requires(){return[oi,di,_0x5b5781,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4cdfdf){super(_0x4cdfdf),this['set']('isThreadsLoadingPaused',!0x0),_0x4cdfdf['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x88da05,_0x41da60,_0x2fe6ed,_0x58e1f6)=>{const _0x2dce03=_0x4cdfdf['plugins']['get'](oi),_0x5ec456=_0x2fe6ed?fi(_0x2fe6ed)['id']:null;_0x4cdfdf['model']['change'](()=>{if(_0x5ec456){const _0x1df8b0=this['getAllMarkersForId'](_0x5ec456);for(const _0x38702b of _0x1df8b0)_0x4cdfdf['editing']['reconvertMarker'](_0x38702b);}if(_0x58e1f6){const {id:_0x124a50}=fi(_0x58e1f6),_0x110de9=_0x2dce03['getCommentThread'](_0x124a50);if(_0x110de9&&_0x110de9['unlinkedAt'])return;if(_0x110de9&&!_0x110de9['isAttached'])return;const _0x5df82a=this['getAllMarkersForId'](_0x124a50);for(const _0x46b059 of _0x5df82a)_0x4cdfdf['editing']['reconvertMarker'](_0x46b059);}}),_0x5ec456&&this['scrollToThreadMarker'](_0x5ec456);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x44fccd=this['editor'],_0x705659=_0x44fccd['plugins']['get'](oi),_0x494f3e=_0x44fccd['config']['get']('collaboration.channelId'),_0x332aab=_0x705659['getCommentThreads']()['filter'](_0x4296a2=>_0x4296a2['channelId']!==_0x494f3e);_0x44fccd['commands']['add']('addCommentThread',new ci(_0x44fccd)),this['listenTo'](_0x44fccd,'change:isReadOnly',(_0x4c4c24,_0x435002,_0x3776c4)=>{_0x705659['switchReadOnly'](_0x3776c4,_0x44fccd['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x705659,gi('addCommentThread',_0x494f3e),(_0x273487,{threadId:_0x4ad385})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x4ad385)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4ad385);}),this['listenTo'](_0x705659,gi('removeCommentThread',_0x494f3e),(_0x4f7bc1,{threadId:_0x10d84a})=>{_0x44fccd['model']['enqueueChange']({'isUndoable':!0x1},_0x1ba8e5=>{const _0x6f6154=this['getAllMarkersForId'](_0x10d84a);for(const _0x2bed15 of _0x6f6154)_0x1ba8e5['removeMarker'](_0x2bed15);});}),this['listenTo'](_0x705659,gi('resolveCommentThread',_0x494f3e),(_0x41c142,{threadId:_0x30d9c1})=>{this['_reconvertMarkers'](_0x30d9c1);const _0x487cfe=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x487cfe['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x30d9c1)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x705659,gi('reopenCommentThread',_0x494f3e),(_0x3c4a58,{threadId:_0xe29a17})=>{this['_reconvertMarkers'](_0xe29a17);},{'priority':'low'}),this['listenTo'](_0x705659,gi('addComment',_0x494f3e),(_0x19c634,{threadId:_0x3f3bf2,isFromAdapter:_0x199d49})=>{const _0xecaeb5=this['getAllMarkersForId'](_0x3f3bf2);!_0x199d49&&0x0!=_0xecaeb5['length']&&_0x705659['hasCommentThread'](_0x3f3bf2)&&0x1===_0x705659['getCommentThread'](_0x3f3bf2)['length']&&_0x44fccd['model']['enqueueChange']({'isUndoable':!0x1},_0x238c4d=>{for(const _0x4543d5 of _0xecaeb5)_0x238c4d['updateMarker'](_0x4543d5,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x332aab);}afterInit(){!async function(_0x8ee123){const _0x336a32='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x1c9bf8=0x793f8,_0x1d9f8b={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x2ccabe(_0x37c19b){const _0x15a84d=new window['Promise'](_0x48fda8=>{_0x37c19b['once']('ready',_0x48fda8);}),_0x2a322b=window['Date']['now'](),_0x35a65e=_0x37c19b['config']['get']('licenseKey');async function _0x59b089(){let _0x39015c,_0x5d1f47=null,_0x242453=null;try{return'GPL'==_0x35a65e?'NotAllowed':(_0x39015c=_0x1d17aa(),_0x39015c?(_0x39015c['usageEndpoint']&&(_0x242453=_0x20043e(_0x39015c['usageEndpoint'],_0x39015c['jti'])),await _0x8b70b5()?_0x5a1d51()?_0x5e9bec()?'Expired':_0x34e171()?('evaluation'==_0x39015c['licenseType']&&(_0x5d1f47=_0x82e701('EvaluationLimit')),await _0x133e8c()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5e9bec(){const _0x5dfe2a=['evaluation','trial']['includes'](_0x39015c['licenseType'])?_0x2a322b/0x3e8:0xe10*_0x1c9bf8;return _0x39015c['exp']<_0x5dfe2a;}function _0x5a1d51(){const _0x582fcd=_0x39015c['features'];if(!_0x582fcd)return!0x1;if(_0x582fcd['includes']('*'))return!0x0;if(_0x582fcd['includes']('CMT'))return!0x0;if(_0x582fcd['includes']('TRILIUM')&&_0x27dd1f())return!0x0;if(_0x582fcd['includes']('RCMT')){if(_0x16ecbe())return!0x0;if(_0x723ff4()||_0xf53d17())return!0x0;}return!0x1;}function _0x34e171(){const _0x56b0aa=_0x39015c['licensedHosts'];if(!_0x56b0aa||0x0==_0x56b0aa['length'])return!0x0;const {hostname:_0x4e13d8}=new URL(window['location']['href']);if(_0x56b0aa['includes'](_0x4e13d8))return!0x0;const _0x2e6d2a=_0x4e13d8['split']('.');return _0x56b0aa['filter'](_0x3f42cf=>_0x3f42cf['includes']('*'))['map'](_0x368bb2=>_0x368bb2['split']('.'))['filter'](_0x53586b=>_0x53586b['length']<=_0x2e6d2a['length'])['map'](_0x184f9f=>Array(_0x2e6d2a['length']-_0x184f9f['length'])['fill']('*'===_0x184f9f[0x0]?'*':'')['concat'](_0x184f9f))['some'](_0x4e1f29=>_0x2e6d2a['every']((_0x4b911c,_0x543210)=>_0x4e1f29[_0x543210]===_0x4b911c||'*'===_0x4e1f29[_0x543210]));}function _0x133e8c(){return _0x5d1f47&&_0x242453?new window['Promise']((_0x41ca58,_0xc8ca3f)=>{_0x5d1f47['then'](_0x41ca58,_0xc8ca3f),_0x242453['then'](_0x51874c=>{'Valid'!=_0x51874c&&_0x41ca58(_0x51874c);},_0xc8ca3f);}):_0x5d1f47||_0x242453||'Valid';}}function _0x20043e(_0x20a3b3,_0x3fddcf){return new window['Promise'](_0x976747=>{if(_0x271c93())return _0x976747('Valid');_0x56f508(),_0x37c19b['decorate']('_sendUsageRequest');let _0x469dd9=!0x1;const _0x3e1ce3=_0x348c57();function _0x12d001(_0x4001d3){return!!_0x4001d3&&('object'==typeof _0x4001d3||'function'==typeof _0x4001d3)&&'function'==typeof _0x4001d3['then']&&'function'==typeof _0x4001d3['catch'];}function _0x4d6f20(_0x1ffa99){_0x1bceac(_0x1ffa99)['then'](_0x1c5b97=>_0x1c5b97&&'ok'==_0x1c5b97['status']?_0x4b1d2d(_0x3b7a75(_0x3e1ce3+_0x3fddcf))!=_0x1c5b97['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x1ad9aa=>(_0x117417(),_0x1ad9aa),()=>{const _0xc2ce41=_0x51b95f();return null==_0xc2ce41?(_0x117417(),'Valid'):_0x2a322b-_0xc2ce41>0x240c8400?'UsageLimit':'Valid';})['then'](_0x976747)['catch'](()=>{_0x976747('UsageLimit');});const _0x55b806=0x36ee80;function _0x117417(){const _0x50cef9='llct-'+_0x4b1d2d(_0x3b7a75(_0x20a3b3)),_0x1fd82c=_0x790767(_0x4b1d2d(window['Math']['ceil'](_0x2a322b/_0x55b806)));window['localStorage']['setItem'](_0x50cef9,_0x1fd82c);}function _0x51b95f(){const _0x494948='llct-'+_0x4b1d2d(_0x3b7a75(_0x20a3b3)),_0x3c5c7b=window['localStorage']['getItem'](_0x494948);return _0x3c5c7b?window['parseInt'](_0x790767(_0x3c5c7b),0x10)*_0x55b806:null;}function _0x1bceac(_0x4535b9){return new window['Promise']((_0x2ea880,_0x29ca2a)=>{_0x4535b9['then'](_0x2ea880,_0x29ca2a),window['setTimeout'](_0x29ca2a,0x1d4c0);});}}_0x37c19b['on']('_sendUsageRequest',(_0x46beeb,_0x3c4615)=>{if(_0x3c4615[0x0]!=_0x20a3b3)return _0x976747('UsageLimit');_0x3c4615[0x1]={..._0x3c4615[0x1],'requestId':_0x3e1ce3};},{'priority':'high'}),_0x37c19b['on']('_sendUsageRequest',_0x3a18e8=>{_0x12d001(_0x3a18e8['return'])&&(_0x469dd9=!0x0,_0x4d6f20(_0x3a18e8['return']));},{'priority':'low'}),_0x15a84d['then'](()=>{_0x469dd9||_0x976747('UsageLimit');});});function _0x271c93(){return'auto'==_0x37c19b['editing']['view']['_overlayModeHint'];}function _0x56f508(){_0x37c19b['editing']['view']['_overlayModeHint']='auto';}}function _0x82e701(_0x326bee){const _0x2ee48f=[new window['Promise'](_0x28adce=>setTimeout(_0x28adce,0x93ecc)),_0x15a84d['then'](()=>new window['Promise'](_0x1df4b6=>{let _0x61590c=0x0;_0x37c19b['model']['on']('applyOperation',(_0x4b9054,_0x44b5c3)=>{_0x44b5c3[0x0]['isDocumentOperation']&&_0x61590c++,0x5e8==_0x61590c&&(_0x1df4b6(),_0x4b9054['off']());});}))];return window['Promise']['race'](_0x2ee48f)['then'](()=>_0x326bee);}async function _0x5a732e(){await _0x15a84d,_0x37c19b['model']['change']=_0x435c60,_0x37c19b['model']['enqueueChange']=_0x435c60,_0x37c19b['enableReadOnlyMode']('model');}function _0x27dd1f(){return window['glob']&&window['glob']['triliumVersion'];}function _0x16ecbe(){return _0x584f0a('WebSocketGateway')&&'connected'==_0x49bed2('WebSocketGateway')['state'];}function _0x723ff4(){return _0x584f0a('RevisionViewerIntegration');}function _0xf53d17(){return _0x584f0a('TrackChangesDataGetter');}function _0x5bedac(_0xb25f84){const _0xc6db43=_0x29b8b7();_0x37c19b[_0xc6db43]='commentsLicenseKey'+_0xb25f84,'Valid'!=_0xb25f84&&_0x5a732e();}function _0x29b8b7(){const _0x11dc87=window['String'](window['performance']['now']())['replace']('.','');let _0x2da00c='m';for(let _0x771fb4=0x0;_0x771fb4<_0x11dc87['length'];_0x771fb4+=0x2){let _0x38fd3d=window['parseInt'](_0x11dc87['substring'](_0x771fb4,_0x771fb4+0x2));_0x38fd3d>=0x3e&&(_0x38fd3d-=0x3e),_0x2da00c+=_0x336a32[_0x38fd3d];}return _0x2da00c;}function _0x1d17aa(){const _0x19380b=_0x35a65e['split']('.');if(0x3!=_0x19380b['length'])return null;return _0x348c46(_0x19380b[0x1]);function _0x348c46(_0x1924bd){const _0x579e56=_0x5125ad(_0x1924bd);return _0x579e56&&_0x8ffa6()?_0x579e56:null;function _0x8ffa6(){const _0x1d4262=_0x579e56['jti'],_0x17f0f8=window['parseInt'](_0x1d4262['substring'](_0x1d4262['length']-0x8),0x10),_0x24a7a5={..._0x579e56,'jti':_0x1d4262['substring'](0x0,_0x1d4262['length']-0x8)};return delete _0x24a7a5['vc'],_0x3b7a75(_0x24a7a5)==_0x17f0f8;}}}async function _0x8b70b5(){let _0x31b28a=!0x0;try{const [_0x2c4d5c,_0x265f3d,_0x4631e3]=_0x35a65e['split']('.');return _0x588228(_0x2c4d5c),await _0x5dd122(_0x2c4d5c,_0x265f3d,_0x4631e3),_0x31b28a;}catch{return!0x1;}function _0x588228(_0x3e532f){const _0x28d637=_0x5125ad(_0x3e532f);_0x28d637&&'ES256'==_0x28d637['alg']||(_0x31b28a=!0x1);}async function _0x5dd122(_0x17a8ca,_0x28af74,_0xc370b6){const _0x31f648=window['Uint8Array']['from'](_0x2bfc7d(_0xc370b6),_0x4ed60d=>_0x4ed60d['charCodeAt'](0x0)),_0x566653=new window['TextEncoder']()['encode'](_0x17a8ca+'.'+_0x28af74),_0x3b1b4b=window['crypto']['subtle'];if(!_0x3b1b4b)return;const _0x42f5ea=await _0x3b1b4b['importKey']('jwk',_0x1d9f8b,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3b1b4b['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x42f5ea,_0x31f648,_0x566653)||(_0x31b28a=!0x1);}}function _0x5125ad(_0x2a54bf){return _0x2a54bf['startsWith']('ey')?JSON['parse'](_0x2bfc7d(_0x2a54bf)):null;}function _0x2bfc7d(_0x55ba8b){return window['atob'](_0x55ba8b['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3b7a75(_0x13f939){let _0x11a685=0x1505;function _0x4fb1ba(_0x1fd6ae){for(let _0x364ad0=0x0;_0x364ad0<_0x1fd6ae['length'];_0x364ad0++){const _0x202cc1=_0x1fd6ae['charCodeAt'](_0x364ad0);_0x11a685=(_0x11a685<<0x5)+_0x11a685+_0x202cc1,_0x11a685&=_0x11a685;}}function _0xfaba90(_0x55c97c){Array['isArray'](_0x55c97c)?_0x55c97c['forEach'](_0xfaba90):_0x55c97c&&'object'==typeof _0x55c97c?Object['entries'](_0x55c97c)['sort']()['forEach'](([_0x5c68ae,_0x18a6b2])=>{_0x4fb1ba(_0x5c68ae),_0xfaba90(_0x18a6b2);}):_0x4fb1ba(window['String'](_0x55c97c));}return _0xfaba90(_0x13f939),_0x11a685>>>0x0;}function _0x4b1d2d(_0x40e1bc){return _0x40e1bc['toString'](0x10)['padStart'](0x8,'0');}function _0x790767(_0x486f41){return _0x486f41['split']('')['reverse']()['join']('');}function _0x584f0a(_0x490faa){return _0x37c19b['plugins']['has'](_0x490faa);}function _0x49bed2(_0x3ba46a){return _0x37c19b['plugins']['get'](_0x3ba46a);}function _0x435c60(){}_0x5bedac(await _0x59b089());}_0x2ccabe(_0x8ee123['editor']);}(this);}destroy(){const _0x3d2719=this['editor']['plugins']['get'](oi),_0x2633d9=this['editor']['config']['get']('collaboration.channelId');for(const _0x31965f of _0x3d2719['getCommentThreads']({'channelId':_0x2633d9}))_0x3d2719['_detachCommentThread'](_0x31965f['id']),_0x3d2719['_threads']['delete'](_0x31965f['id']);super['destroy']();}['hasMarkerForId'](_0xc98574){return this['getAllMarkersForId'](_0xc98574)['length']>0x0;}getAllMarkersForId(_0x20ef7e){const _0x25ca2d=[];for(const _0x3ecf90 of this['editor']['model']['markers'])_0x3ecf90['name']['startsWith']('comment:'+_0x20ef7e)&&_0x25ca2d['push'](_0x3ecf90);return _0x25ca2d;}['scrollToThreadMarker'](_0x316cee){setTimeout(()=>{const _0x1fc8c0=this['_getTargetForId'](_0x316cee);_0x1fc8c0&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x316cee&&_0x2c8209({'target':_0x1fc8c0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x19ba19){this['editor']['model']['change'](()=>{for(const _0x15497c of this['getAllMarkersForId'](_0x19ba19))this['editor']['editing']['reconvertMarker'](_0x15497c);});}_attachArchivedThread(_0x570d4e){const _0x274e16=this['editor']['plugins']['get'](oi),_0x532060=this['editor']['plugins']['get'](di),_0x1488b5=_0x274e16['getCommentThread'](_0x570d4e);if(!_0x1488b5['isAttached']){const _0x3a221b=_0x1488b5['attachTo'](()=>this['_getTargetForId'](_0x1488b5['id']));_0x532060['registerAnnotation'](_0x3a221b),_0x1488b5['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x3a9b8e=this['editor'],_0x1e144e=_0x3a9b8e['plugins']['get'](_0x5b5781);_0x3a9b8e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x2aff67,_0x2ff732)=>{const {id:_0x2687ed}=fi(_0x2aff67['markerName']),_0xf64a5a=_0x3a9b8e['plugins']['get'](oi)['getCommentThread'](_0x2687ed),_0x36df5f=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x2687ed;let _0x1e6119;if(_0xf64a5a&&_0xf64a5a['isResolved']&&!_0x36df5f&&_0x2aff67['item'])return _0x2ff732['consumable']['consume'](_0x2aff67['item'],'addMarker:'+_0x2aff67['markerName']),_0x2ff732['consumable']['consume'](_0x2aff67['item'],'removeMarker:'+_0x2aff67['markerName']),null;const _0x4a38d0=['ck-comment-marker'];return _0x36df5f&&_0x4a38d0['push']('ck-comment-marker--active'),_0x1e6119=_0xf64a5a?.['length']?_0xf64a5a['comments']['first']['author']['id']:_0x1e144e['me']['id'],{'classes':_0x4a38d0,'attributes':{'data-comment':_0x2687ed,'data-author-id':_0x1e6119}};}}),_0x3a9b8e['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5e2df4,{options:_0x564fb9})=>{if(_0x564fb9['showCommentHighlights'])return null;const _0x10b17d=_0x3a9b8e['plugins']['get'](oi),_0x535312=_0x3a9b8e['model']['markers']['get'](_0x5e2df4),{id:_0x1a3fd0,part:_0x169f89}=fi(_0x5e2df4);return _0x535312&&!_0x535312['affectsData']||_0x564fb9['ignoreResolvedComments']&&_0x10b17d['getCommentThread'](_0x1a3fd0)?.['isResolved']?null:{'group':'comment','name':_0x169f89?_0x1a3fd0+':'+_0x169f89:_0x1a3fd0};}}),_0x3a9b8e['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x50af28,{writer:_0x2fca7b})=>_0x2fca7b['createElement']('$marker',{'data-name':'comment:'+_0x50af28['getAttribute']('id')})}),_0x3a9b8e['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x499675=this['editor'],_0x5b9e02=_0x499675['plugins']['get'](oi),_0x5fd313=new Set(),_0x57bb63=new Set();_0x499675['model']['document']['registerPostFixer'](_0x44f2e3=>{let _0x1f5db2=!0x1;for(const {name:_0x4f67dd,data:_0x5d8bdf}of _0x499675['model']['document']['differ']['getChangedMarkers']()){const {group:_0x57e820,id:_0x179a0c}=fi(_0x4f67dd);let _0x510a0d=_0x5d8bdf['newRange'];if('comment'!==_0x57e820||!_0x510a0d)continue;const _0x4a7c54='$graveyard'===_0x510a0d['root']['rootName'];_0x4a7c54||(_0x510a0d=_i(_0x510a0d,_0x499675['model']),!_0x510a0d||_0x510a0d['isCollapsed']||!_0x5d8bdf['newRange']||_0x510a0d['isEqual'](_0x5d8bdf['newRange']))?_0x499675['model']['hasContent'](_0x510a0d)&&!_0x4a7c54?this['isThreadsLoadingPaused']?_0x5fd313['add'](_0x4f67dd):this['_handleThreadMarker'](_0x4f67dd,_0x179a0c):(_0x57bb63['add'](_0x4f67dd),_0x5fd313['delete'](_0x4f67dd),_0x44f2e3['removeMarker'](_0x4f67dd),_0x1f5db2=!0x0):(_0x44f2e3['updateMarker'](_0x4f67dd,{'range':_0x510a0d}),_0x1f5db2=!0x0);}return _0x1f5db2;}),this['on']('change:isThreadsLoadingPaused',(_0x2ee806,_0x1cd84d,_0x2d873a)=>{if(!_0x2d873a&&_0x5fd313['size'])for(const _0x35c3c2 of _0x5fd313){const {id:_0x5974f5}=fi(_0x35c3c2);_0x5fd313['delete'](_0x35c3c2),_0x499675['model']['markers']['get'](_0x35c3c2)&&this['_handleThreadMarker'](_0x35c3c2,_0x5974f5);}}),this['listenTo'](_0x499675['model']['document'],'change',()=>{for(const {name:_0x11a268,data:{newRange:_0x2ba7ad}}of _0x499675['model']['document']['differ']['getChangedMarkers']()){const {group:_0x46c83e,id:_0x40501e}=fi(_0x11a268);if('comment'!==_0x46c83e)continue;const _0x2762e8=_0x5b9e02['getCommentThread'](_0x40501e),_0x343107=this['hasMarkerForId'](_0x40501e);_0x2762e8&&(!_0x2762e8['_hasTargetInContent']&&_0x2ba7ad&&_0x499675['editing']['view']['once']('render',()=>{const _0x1d9d6d=_0x499675['plugins']['get'](ti),_0x4704a7=_0x5b9e02['_threadToController']['get'](_0x2762e8)['view'];_0x1d9d6d['getByInnerView'](_0x4704a7)['refreshVisibility']();},{'priority':'low'}),_0x2762e8['_hasTargetInContent']=_0x343107||!!_0x2ba7ad),_0x2ba7ad||(_0x57bb63['add'](_0x11a268),_0x5fd313['delete'](_0x11a268));}for(const _0x530471 of _0x57bb63){const {id:_0x5e3ba3}=fi(_0x530471),_0x19afdb=_0x5b9e02['getCommentThread'](_0x5e3ba3);if(_0x5fd313['delete'](_0x530471),!_0x19afdb)continue;const _0x542774=this['hasMarkerForId'](_0x5e3ba3);_0x542774||_0x19afdb['isSubmitted']?_0x542774||_0x19afdb['unlinkedAt']||_0x19afdb['setUnlinkedAt'](new Date()):_0x19afdb['remove']();}_0x57bb63['clear']();});}_handleInitialThreads(_0x544e91){_0x544e91['forEach'](_0x26c8ef=>{_0x26c8ef['unlinkedAt']&&this['_attachArchivedThread'](_0x26c8ef['id']);});}_getTargetForId(_0x4f6740){const _0xcc5484=this['editor'],_0x4e4288=this['getAllMarkersForId'](_0x4f6740);return _0x50ca2d(_0xcc5484['editing'],_0x4e4288);}_getTextContext(_0x29de1){const _0x9aecdc=this['getAllMarkersForId'](_0x29de1);let _0x1d43d7='',_0x5da236=!0x1;for(const _0x28da35 of _0x9aecdc){const _0x1f6e58=_0x28da35['getRange']();for(const _0xef10cb of Array['from'](_0x1f6e58['getItems']()))_0xef10cb['is']('$textProxy')?(_0x1d43d7&&_0x5da236&&(_0x1d43d7+='\x20',_0x5da236=!0x1),_0x1d43d7+=_0xef10cb['data']):_0x5da236=!0x0;_0x5da236=!0x0;}return _0x1d43d7['substring'](0x0,0x96);}_attachMarkerToThread(_0x91ca74,_0xa376fb){const _0x59429a=this['editor'],_0x4af915=_0x59429a['plugins']['get'](oi);let _0x2583f=_0x4af915['getCommentThread'](_0xa376fb);const _0x3b2a8c=_0x59429a['config']['get']('collaboration.channelId'),_0x3fe108=_0x59429a['plugins']['get'](di);return _0x2583f&&(_0x2583f['unlinkedAt']&&_0x2583f['setUnlinkedAt'](null),_0x2583f['isAttached'])||(this['getAllMarkersForId'](_0xa376fb)[0x0]['managedUsingOperations']?_0x4af915['fetchCommentThread']({'channelId':_0x3b2a8c,'threadId':_0xa376fb})['then'](_0x2fdbc6=>{if('destroyed'!==_0x59429a['state']){if(_0x2583f=_0x2fdbc6,_0x2583f&&!_0x2583f['isAttached']){const _0x411858=_0x2583f['attachTo'](()=>this['_getTargetForId'](_0xa376fb));_0x3fe108['registerAnnotation'](_0x411858),_0x2583f['isResolved']&&this['_reconvertMarkers'](_0xa376fb);}else{if(!_0x2583f){const _0x13367d=this['getAllMarkersForId'](_0xa376fb);_0x59429a['model']['change'](_0x15ea14=>{for(const _0x339114 of _0x13367d)_0x15ea14['removeMarker'](_0x339114);});}}}}):_0x59429a['editing']['view']['once']('render',()=>{if(_0x4af915['getCommentThread'](_0xa376fb))return;const _0x3fd83b=_0x59429a['plugins']['get'](ti);_0x2583f=_0x4af915['openNewCommentThread']({'channelId':_0x3b2a8c,'threadId':_0xa376fb,'target':()=>this['_getTargetForId'](_0xa376fb),'context':{'type':'text','value':this['_getTextContext'](_0xa376fb)}});const _0x586c61=_0x4af915['_threadToController']['get'](_0x2583f)['view'],_0x39fa7e=_0x3fd83b['getByInnerView'](_0x586c61);_0x39fa7e&&_0x3fe108['registerAnnotation'](_0x39fa7e);},{'priority':'low'})),_0x2583f;}['_handleThreadMarker'](_0x1a3ea1,_0x3eb6df){const _0x34d586=this['_attachMarkerToThread'](_0x1a3ea1,_0x3eb6df);_0x34d586&&!_0x34d586['context']&&_0x34d586['setContext']({'type':'text','value':this['_getTextContext'](_0x3eb6df)});}_initAriaMarkerChangeAnnouncements(){const _0x5aba12=this['editor'];_0x56ef5a(_0x5aba12['model'],({left:_0x46636e,entered:_0x1c5f9c})=>{for(const _0x22b642 of _0x46636e)if(Ai(_0x22b642)){_0x5aba12['ui']['ariaLiveAnnouncer']['announce'](Et(_0x5aba12['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x14b9f7 of _0x1c5f9c)if(Ai(_0x14b9f7)){_0x5aba12['ui']['ariaLiveAnnouncer']['announce'](Et(_0x5aba12['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x68f48c(_0x1880a8)));break;}});}};function gi(_0x31e6da,_0x27bb7f){return _0x27bb7f?_0x31e6da+':'+_0x27bb7f:_0x31e6da;}function _i(_0x43dfdd,_0x1284e2){const _0x28c83a=_0x1284e2['schema'],_0xf8fa5e=_0x1284e2['createRange'](_0x43dfdd['start']);for(const _0x2e09af of _0x43dfdd['getWalker']()){const {type:_0x3ca13f,item:_0x206550,nextPosition:_0x5ec198}=_0x2e09af;if('text'===_0x3ca13f||_0x28c83a['isObject'](_0x206550)){const _0x593d0b=_0x1284e2['createPositionBefore'](_0x206550);_0xf8fa5e['isCollapsed']&&(_0xf8fa5e['start']=_0x593d0b),_0xf8fa5e['end']=_0x5ec198;}}return _0xf8fa5e;}function Ai(_0x521ef4){return'comment'===fi(_0x521ef4['name'])['group'];}var vi=class extends _0x3831f5{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,wi,di,ti];}get CommentsListView(){return Lt;}get CommentThreadInputView(){return xt;}init(){const _0x1185a4=this['editor'],_0x5d9d9d=_0x1185a4['plugins']['get'](oi),_0xad5507=_0x1185a4['plugins']['get'](wi),_0x3ffc20=_0x1185a4['plugins']['get'](ti),_0x576e1d=_0x1185a4['plugins']['get'](di);_0x1185a4['ui']['componentFactory']['add']('comment',()=>{const _0x4c7168=this['_createUIButton'](_0x44164c);return _0x4c7168['tooltip']=!0x0,_0x4c7168;}),_0x1185a4['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x576e1d['addSourceCollector'](()=>{const _0x25c404=[];for(const [_0x45214e,_0x5325b3]of _0x5d9d9d['_threadToController']){const _0x1a263c=_0xad5507['getAllMarkersForId'](_0x45214e['id']),_0x48bfc2=_0x1a263c['map'](_0x19c52a=>_0x19c52a['getRange']());_0x1a263c['length']>0x0&&_0x25c404['push']([_0x5325b3['view'],_0x48bfc2]);}return _0x25c404;}),this['listenTo'](_0x3ffc20,'change:activeAnnotations',(_0x5b9d50,_0x16da7d,_0x297ad7)=>{const _0x34301f=Array['from'](_0x297ad7)['map'](_0x389bbb=>_0x389bbb['innerView'])['find'](_0x12d2db=>_0x5d9d9d['_viewToController']['has'](_0x12d2db));if(!_0x34301f)return void(_0xad5507['activeMarker']=null);const _0x31fd61=_0x5d9d9d['_viewToController']['get'](_0x34301f)['model']['id'],_0x3834ab='comment:'+_0x31fd61;_0x31fd61&&_0xad5507['hasMarkerForId'](_0x31fd61)?_0xad5507['activeMarker']=_0x3834ab:_0xad5507['activeMarker']&&(_0xad5507['activeMarker']=null);}),this['listenTo'](_0x5d9d9d,'removeCommentThread',(_0x3acdc4,{threadId:_0x137c69,isFromAdapter:_0x42c8d6})=>{!_0x42c8d6&&_0x1185a4['ui']['focusTracker']['isFocused']&&_0xad5507['hasMarkerForId'](_0x137c69)&&_0x1185a4['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x5d9d9d,'addComment',(_0xa2fff,{threadId:_0x49789e,isFromAdapter:_0x3c2f6e})=>{!_0x3c2f6e&&_0xad5507['hasMarkerForId'](_0x49789e)&&_0x5d9d9d['hasCommentThread'](_0x49789e)&&0x1===_0x5d9d9d['getCommentThread'](_0x49789e)['length']&&(_0x1185a4['editing']['view']['focus'](),_0xa2fff['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x4c7031=[this['editor']];for(const _0x1e96fb of _0x4c7031){let _0x558b27;for(const _0x2f9463 in _0x1e96fb){const _0x46ee38=_0x2f9463,_0x3da2c4=_0x1e96fb[_0x46ee38];if('commentsLicenseKeyValid'==_0x3da2c4||'commentsLicenseKeyInvalid'==_0x3da2c4||'commentsLicenseKeyExpired'==_0x3da2c4||'commentsLicenseKeyDomainLimit'==_0x3da2c4||'commentsLicenseKeyNotAllowed'==_0x3da2c4||'commentsLicenseKeyEvaluationLimit'==_0x3da2c4||'commentsLicenseKeyUsageLimit'==_0x3da2c4){delete _0x1e96fb[_0x46ee38],_0x558b27=_0x3da2c4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x558b27&&_0x1e96fb['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x558b27&&_0x1e96fb['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x558b27&&_0x1e96fb['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x558b27&&_0x1e96fb['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x558b27&&_0x1e96fb['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x558b27&&_0x1e96fb['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0xb62599){const _0x892d46=this['editor'],_0x5ad3ab=new _0xb62599(_0x892d46['locale']),_0x494875=_0x892d46['commands']['get']('addCommentThread');return _0x5ad3ab['set']({'label':Et(_0x892d46['locale'],'Comment'),'icon':_0x4f7611}),_0x5ad3ab['bind']('isEnabled')['to'](_0x494875,'isEnabled',_0x494875,'hasContent',(_0x5cfc8a,_0x1d4def)=>_0x5cfc8a&&_0x1d4def),this['listenTo'](_0x5ad3ab,'execute',()=>{_0x494875['execute']();}),_0x5ad3ab;}},yi=class extends _0x3831f5{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x172bdf){super(_0x172bdf),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x690e69,_0x204672,_0x4a9e23)=>{_0x4a9e23?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x187267,_0x20966d]of this['editor']['commands'])_0x20966d['affectsData']&&'addCommentThread'!==_0x187267&&_0x20966d['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x350a98=this['editor']['editing']['view']['document'];this['listenTo'](_0x350a98,'cut',_0x5a1311=>_0x5a1311['stop'](),{'priority':'highest'}),this['listenTo'](_0x350a98,'clipboardInput',_0x46019c=>_0x46019c['stop'](),{'priority':'highest'}),this['listenTo'](_0x350a98,'delete',_0x58b646=>_0x58b646['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x2278c6,_0x39928b]of this['editor']['commands'])_0x39928b['affectsData']&&'addCommentThread'!==_0x2278c6&&_0x39928b['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}},Ti=class extends _0x2886e3{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d9dbc){super(_0x1d9dbc),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x138ba3=this['context']['plugins']['get'](ti);this['listenTo'](_0x138ba3,'_activateAnnotation',(_0x31b0cd,_0x18d006)=>{for(const _0x374ec6 of this['activeUIs']){const _0x44a445=this['_uis']['get'](_0x374ec6);(0x0,this['uisData']['get'](_0x374ec6)['filter'])(_0x18d006)&&_0x44a445['setActiveAnnotation'](_0x18d006);}}),this['listenTo'](_0x138ba3,'_deactivateAllAnnotations',()=>{for(const _0x59b60f of this['activeUIs'])this['_uis']['get'](_0x59b60f)['setActiveAnnotation'](null);}),this['listenTo'](_0x138ba3['_visibleAnnotations'],'add',(_0x1dde00,_0x5e6caf)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5e6caf);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x672575){return this['activeUIs']['has'](_0x672575);}activate(_0x2b41cb,_0x42ea58=this['defaultFilter']){const _0x2c3934=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x2b41cb))throw new _0x587c70('annotationsuis-missing-ui',this,{'uiName':_0x2b41cb});this['isActive'](_0x2b41cb)&&this['deactivate'](_0x2b41cb),this['activeUIs']['add'](_0x2b41cb);const _0x5eac35=new Jt();Qt({'source':_0x2c3934['_visibleAnnotations'],'target':_0x5eac35,'filter':_0x42ea58}),this['uisData']['set'](_0x2b41cb,{'collection':_0x5eac35,'filter':_0x42ea58});const _0x4dc177=this['_uis']['get'](_0x2b41cb);_0x4dc177['attach'](_0x5eac35),this['listenTo'](_0x4dc177,'change:activeAnnotation',(_0xb84b3e,_0x589b53,_0x3ceb5f,_0x3f7d13)=>{_0x3f7d13&&_0x2c3934['_removeActiveAnnotation'](_0x3f7d13),_0x3ceb5f&&_0x2c3934['_addActiveAnnotation'](_0x3ceb5f);});}deactivate(_0x597f6d){if(this['activeUIs']['delete'](_0x597f6d),!this['_uis']['has'](_0x597f6d))throw new _0x587c70('annotationsuis-missing-ui',this,{'uiName':_0x597f6d});const _0x531242=this['_uis']['get'](_0x597f6d);_0x531242['detach'](),this['stopListening'](_0x531242),this['uisData']['get'](_0x597f6d)['collection']['destroy'](),this['uisData']['delete'](_0x597f6d);}switchTo(_0x50d62c){if(!this['_uis']['has'](_0x50d62c))throw new _0x587c70('annotationsuis-missing-ui',this,{'uiName':_0x50d62c});const _0x1bc7e8=this['context']['plugins']['get'](ti),_0xd033b5=Array['from'](_0x1bc7e8['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x50d62c);const _0x10cfd9=this['_uis']['get'](_0x50d62c);_0x10cfd9['setActiveAnnotation'](_0xd033b5),_0x10cfd9['_setSelectedAnnotations']&&_0xd033b5&&_0x10cfd9['_setSelectedAnnotations']([_0xd033b5]);}deactivateAll(){for(const _0x2b9691 of this['activeUIs'])this['deactivate'](_0x2b9691);}register(_0x402076,_0x44d14b){if(this['_uis']['has'](_0x402076))throw new _0x587c70('annotationsuis-register-already-registered');if('function'!=typeof _0x44d14b['attach']||'function'!=typeof _0x44d14b['detach']||'function'!=typeof _0x44d14b['setActiveAnnotation'])throw new _0x587c70('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x402076,_0x44d14b);}refilterAnnotations(){const _0x26b62e=this['context']['plugins']['get'](ti)['collection'],_0x3d85d2=new Map(),_0x59f780=Array['from'](this['activeUIs']);for(const _0x546d2c of this['activeUIs']){const _0x330385=this['uisData']['get'](_0x546d2c)['collection'];for(const _0x337708 of _0x330385)_0x3d85d2['set'](_0x337708,_0x546d2c);}for(const _0x5aaa1f of _0x26b62e){const _0x15b771=_0x3d85d2['get'](_0x5aaa1f);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5aaa1f);const _0x3f0e63=_0x59f780['find'](_0x4ff3df=>this['uisData']['get'](_0x4ff3df)['filter'](_0x5aaa1f));_0x15b771!==_0x3f0e63&&(_0x15b771&&this['uisData']['get'](_0x15b771)['collection']['remove'](_0x5aaa1f),_0x3f0e63&&this['uisData']['get'](_0x3f0e63)['collection']['add'](_0x5aaa1f));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x4bd434){const _0x167e3a=[];for(const _0x43f48a of this['activeUIs']){(0x0,this['uisData']['get'](_0x43f48a)['filter'])(_0x4bd434)&&_0x167e3a['push'](_0x43f48a);}if(_0x167e3a['length']>0x1)throw new _0x587c70('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x167e3a,'annotationType':_0x4bd434['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x455aab('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2402c8){super(_0x2402c8);const _0x18dc95=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 _0x52e6a6(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x18dc95['to']('class')],'style':{'minHeight':_0x18dc95['to']('minHeight',_0x49dc2a=>'number'==typeof _0x49dc2a?Ci(_0x49dc2a+0xa):null)},'dir':_0x2402c8['uiLanguageDirection'],'role':'application','aria-label':Et(_0x2402c8,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x2402c8,'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',_0x256a8c=>{this['_updateItemPositionInFocusables'](_0x256a8c['source']);}),this['list']['forEach'](_0x2e5039=>{this['focusTracker']['add'](_0x2e5039['element']),this['_updateItemPositionInFocusables'](_0x2e5039);}),this['list']['on']('change',(_0x3ee612,_0x428ac7)=>{for(const _0x11086d of _0x428ac7['removed'])this['focusTracker']['remove'](_0x11086d['element']),this['focusables']['remove'](_0x11086d);for(const _0x31cdd4 of _0x428ac7['added'])this['focusTracker']['add'](_0x31cdd4['element']),this['_updateItemPositionInFocusables'](_0x31cdd4);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x236f6b){const _0x252e5f=this['focusables']['getIndex'](_0x236f6b);let _0x12237a,_0x50d5c5;for(const _0x6bce53 of this['focusables'])if(_0x236f6b['top']<_0x6bce53['top']){_0x12237a=_0x6bce53;break;}if(_0x50d5c5=_0x12237a?this['focusables']['getIndex'](_0x12237a):this['focusables']['length'],-0x1!==_0x252e5f){if(_0x252e5f===_0x50d5c5-0x1)return;this['focusables']['remove'](_0x236f6b),_0x50d5c5=_0x12237a?this['focusables']['getIndex'](_0x12237a):this['focusables']['length'];}this['focusables']['add'](_0x236f6b,_0x50d5c5);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x455aab('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x2ed619){super(_0x2ed619),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x283093,_0x9bb678)=>_0x283093+_0x9bb678),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x40d9e6=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x40d9e6['to']('isAnimationDisabled',_0x3be6e0=>_0x3be6e0?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x40d9e6['to']('top',_0x5ec61c=>bi(_0x5ec61c))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x5ebc8c=this['element']['clientHeight'];_0x5ebc8c&&(this['height']=_0x5ebc8c);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x2886e3{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x234038){super(_0x234038),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 _0x199318=this['context']['config']['get']('sidebar.container');_0x199318&&this['setContainer'](_0x199318);}setContainer(_0x3d9149){if(!Oi(_0x3d9149))throw new _0x587c70('sidebar-setcontainer-invalid-element');this['container']=_0x3d9149;}_attachToContainer({viewClass:_0x323d82='',spaceBetweenItems:_0x17405f=0x19}={}){if(!Oi(this['container']))throw new _0x587c70('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x323d82,this['_spaceBetweenItems']=_0x17405f;}['rearrange']({removedAnnotation:_0x71f6b2,previousAnnotation:_0x132520,nextAnnotation:_0xce70cd}){const _0x2c41f6=this['getSidebarItemView'](_0x71f6b2);this['view']['list']['remove'](_0x2c41f6),this['_destroySidebarItemView'](_0x71f6b2),_0x132520&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x132520)),_0xce70cd&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xce70cd)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x589eea,activatedAnnotation:_0x303587,disableAnimationOnActivatedAnnotation:_0x5a4792}){if(this['_activeAnnotation']=_0x303587,_0x589eea){_0x589eea['isActive']=!0x1;const _0x413e85=this['getSidebarItemView'](_0x589eea);_0x413e85&&_0x5a4792&&(_0x413e85['isAnimationDisabled']=!0x1);}if(_0x303587){const _0x207f3c=this['getSidebarItemView'](_0x303587);_0x207f3c&&(_0x303587['isActive']=!0x0,_0x5a4792&&(_0x207f3c['isAnimationDisabled']=!0x0,_0x207f3c['top']+=0x1),this['_alignToTargetRect'](_0x207f3c));}}_detachFromContainer(_0x1e2919){if(this['view']['element']['remove'](),_0x1e2919){for(const _0x43f5a4 of _0x1e2919)this['_destroySidebarItemView'](_0x43f5a4);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x5da89a,_0x117b1e){_0x117b1e||(_0x117b1e=_0x5da89a['view']);const _0x586771=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x586771,_0x5da89a),this['_annotationToSidebarItemView']['set'](_0x5da89a,_0x586771),_0x586771['content']['add'](_0x117b1e),this['listenTo'](_0x5da89a['view'],'change:targetRect',(_0x472746,_0xa501a3,_0x28b839)=>{const _0x3932e1=this['_getTargetTop'](_0x5da89a,_0x28b839);_0x586771['_targetTop']!=_0x3932e1&&(_0x586771['_targetTop']=_0x3932e1,this['_setItemTop'](_0x586771,_0x3932e1));}),this['listenTo'](_0x586771,'change:top',()=>{this['_recalculate'](_0x586771,'top');}),this['listenTo'](_0x586771,'change:bottom',()=>{this['_recalculate'](_0x586771,'bottom');}),this['_alignToTargetRect'](_0x586771);const _0x570db8=this['_getItemBefore'](_0x586771);return _0x570db8&&this['_alignAfterItem'](_0x570db8,_0x586771)||this['_alignToTargetRect'](_0x586771),this['_updateLastItem'](),this['view']['list']['add'](_0x586771),_0x586771;}['_alignForTopChange'](_0x31d15e){if(!_0x31d15e['content']['length'])return;const _0x15e9c4=this['_getItemBefore'](_0x31d15e);if(!_0x15e9c4)return;const _0x29433d=this['_sidebarItemViewToAnnotation']['get'](_0x15e9c4),_0x33c98a=this['_activeAnnotation'];_0x33c98a&&_0x33c98a===_0x29433d?this['_alignAfterItem'](_0x15e9c4,_0x31d15e):this['_alignBeforeItem'](_0x31d15e,_0x15e9c4);}_alignForBottomChange(_0x36ac8b){if(!_0x36ac8b['content']['length'])return;const _0x997320=this['_getItemAfter'](_0x36ac8b);if(!_0x997320)return;const _0x29c1cd=this['_sidebarItemViewToAnnotation']['get'](_0x997320),_0x49c008=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3e1dfc=this['_activeAnnotation'];_0x3e1dfc&&_0x3e1dfc===_0x29c1cd&&_0x49c008?(this['_alignBeforeItem'](_0x997320,_0x36ac8b),this['_alignAfterItem'](_0x36ac8b,_0x997320)):_0x3e1dfc&&_0x3e1dfc===_0x29c1cd?this['_alignBeforeItem'](_0x997320,_0x36ac8b):this['_alignAfterItem'](_0x36ac8b,_0x997320);}_recalculate(_0x25489e,_0x19820d){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5a69ff,changedProp:_0x545424}of this['_recalculateBuffer'])'top'===_0x545424?this['_alignForTopChange'](_0x5a69ff):this['_alignForBottomChange'](_0x5a69ff);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x25489e,'changedProp':_0x19820d});}getSidebarItemView(_0x327b3e){return this['_annotationToSidebarItemView']['get'](_0x327b3e);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x468d18){const _0x5d68b7=this['getSidebarItemView'](_0x468d18);this['stopListening'](_0x5d68b7),this['stopListening'](_0x468d18['view']),_0x5d68b7['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x468d18),this['_sidebarItemViewToAnnotation']['delete'](_0x5d68b7);}_createSidebarView(){const _0x675f3=new Ii(this['context']['locale']);return _0x675f3['render'](),this['on']('change:_lastItem',(_0x546586,_0x2a5c9e,_0x128f24,_0x472c6a)=>{_0x472c6a&&_0x675f3['unbind']('minHeight'),_0x128f24?_0x675f3['bind']('minHeight')['to'](_0x128f24,'bottom'):_0x675f3['minHeight']=null;}),_0x675f3;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x931a64){const _0x1bb667=this['_sidebarItemViewToAnnotation']['get'](_0x931a64),_0x24372c=_0x1bb667&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1bb667)-0x1);return _0x24372c&&this['getSidebarItemView'](_0x24372c)||null;}_getItemAfter(_0xab1db5){const _0x297469=this['_sidebarItemViewToAnnotation']['get'](_0xab1db5),_0x3c6339=_0x297469&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x297469)+0x1);return _0x3c6339&&this['getSidebarItemView'](_0x3c6339)||null;}_alignBeforeItem(_0x4fbabf,_0x3f3618){_0x4fbabf['updateHeight']();const _0x1ef233=Ni(_0x3f3618['bottom']+this['_spaceBetweenItems'],_0x4fbabf['top']);return!!_0x1ef233&&(this['_setItemTop'](_0x3f3618,_0x3f3618['top']-_0x1ef233),!0x0);}_alignAfterItem(_0x50b942,_0x3c71e9){_0x50b942['updateHeight']();const _0x22f7c1=Ni(_0x50b942['bottom']+this['_spaceBetweenItems'],_0x3c71e9['top']);return!!_0x22f7c1&&(this['_setItemTop'](_0x3c71e9,_0x3c71e9['top']+_0x22f7c1,!0x1),!0x0);}_alignToTargetRect(_0x538a50){const _0x461852=this['_sidebarItemViewToAnnotation']['get'](_0x538a50);if(!_0x461852||!_0x461852['target']||!_0x461852['targetRect'])return;const _0x43e3f3=this['_getTargetTop'](_0x461852,_0x461852['targetRect']);this['_setItemTop'](_0x538a50,_0x43e3f3);}_getTargetTop(_0x1238e8,_0x4f7b77){if(null===_0x4f7b77)return 0x0;if(_0x1238e8['target']instanceof _0x132048)return _0x4f7b77['top'];{const _0x6fefef=new _0x132048(this['view']['element'])['top'];return _0x4f7b77['top']-_0x6fefef;}}_setItemTop(_0x580dff,_0x174dbd,_0x14a450=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x14a450&&(_0x174dbd=Math['max'](_0x174dbd,this['_getMaxAvailableTop'](_0x580dff))),_0x580dff['top']=_0x174dbd;}_getMaxAvailableTop(_0x19ee0d){let _0x2f54d7=this['_getItemBefore'](_0x19ee0d),_0x52af91=0x0;for(;_0x2f54d7;)_0x2f54d7['updateHeight'](),_0x52af91+=this['_spaceBetweenItems']+_0x2f54d7['height'],_0x2f54d7=this['_getItemBefore'](_0x2f54d7);return _0x52af91;}};function Ni(_0xf448f9,_0x56f914){return Math['max'](_0xf448f9-_0x56f914,0x0);}function Oi(_0x49eda3){return null!==_0x49eda3&&'object'==typeof _0x49eda3&&0x1===_0x49eda3['nodeType'];}var Mi=class extends _0x2886e3{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x387d41){super(_0x387d41),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x43adb0(),this['_refreshPositioningDebounced']=_0xbc46bc(()=>{_0x387d41['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x3b2f56=this['context']['plugins']['get'](Ti),_0x46cbe2=this['context']['plugins']['get'](ki);_0x3b2f56['register']('wideSidebar',this),_0x46cbe2['container']&&_0x3b2f56['switchTo']('wideSidebar');}setActiveAnnotation(_0x4b5c0c){if(_0x4b5c0c===this['activeAnnotation'])return;const _0x38df2d=this['context']['plugins']['get'](ki);_0x38df2d['_activeAnnotation']=_0x4b5c0c;const _0x442b4b=this['activeAnnotation'];_0x38df2d['refresh']({'blurredAnnotation':_0x442b4b,'activatedAnnotation':_0x4b5c0c}),this['activeAnnotation']=_0x4b5c0c;}attach(_0x443f4d){this['annotations']=_0x443f4d;const _0x49bb1b=this['context']['plugins']['get'](ki);if(_0x49bb1b['_annotations']=_0x443f4d,this['isAttached'])throw new _0x587c70('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x49bb1b,'set:container',()=>{this['detach'](),this['listenTo'](_0x49bb1b,'change:container',_0x246452=>{_0x246452['off'](),this['attach'](_0x443f4d);});}),_0x49bb1b['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x507934=_0x550c45=>{_0x550c45['updateTargetRect'](),_0x49bb1b['addAnnotation'](_0x550c45);};for(const _0x2d1ab6 of _0x443f4d)_0x507934(_0x2d1ab6);this['listenTo'](_0x443f4d,'add',(_0xe8a7b5,_0x388a31)=>{_0x507934(_0x388a31);}),this['listenTo'](_0x443f4d,'remove',(_0x5a3194,_0xe364d4,_0x4a20f8)=>{_0x49bb1b['rearrange']({'removedAnnotation':_0xe364d4,'previousAnnotation':_0x443f4d['get'](_0x4a20f8-0x1),'nextAnnotation':_0x443f4d['get'](_0x4a20f8+0x1)}),_0xe364d4===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x443f4d,'focus',(_0x1c22c3,_0x5100e9)=>{this['setActiveAnnotation'](_0x5100e9);}),this['listenTo'](_0x443f4d,'blur',()=>{this['setActiveAnnotation'](null);});const _0x19b814=this['context']instanceof _0x345ccf?this['context']['editors']:new _0x43adb0([this['context']]);for(const _0x3a7e7d of _0x19b814)this['_integrateWithEditorAnnotations'](_0x3a7e7d);this['listenTo'](_0x19b814,'add',(_0x3cc7f9,_0x4bab00)=>{this['listenTo'](_0x4bab00,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4bab00);});}),this['listenTo'](_0x19b814,'remove',(_0x18ba6e,_0x449df3)=>{_0x449df3['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x449df3['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x587c70('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x7e19=this['context']['plugins']['get'](ki);_0x7e19['_detachFromContainer'](this['annotations']),this['stopListening'](_0x7e19),this['stopListening'](this['annotations']),this['context']instanceof _0x345ccf&&this['stopListening'](this['context']['editors']);for(const _0x464d24 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x464d24);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x5c404a){if(!_0x5c404a['plugins']['has']('EditorAnnotations'))return;const _0x2db7e7=_0x5c404a['plugins']['get']('EditorAnnotations'),_0x2633e9=()=>{const _0x44646c=_0x2db7e7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x44646c[0x0]||null);};this['listenTo'](_0x2db7e7,'refresh',_0x2633e9),this['listenTo'](_0x2db7e7,'blur',(_0x4de151,{isAnnotationTracked:_0x350ff6})=>{this['activeAnnotation']&&_0x350ff6(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2db7e7,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4b6d0d=>{_0x2db7e7['hasDomSelection']()&&(_0x2633e9(),_0x4b6d0d['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2db7e7);}_destroyEditorAnnotationsIntegration(_0x45ddd1){this['stopListening'](_0x45ddd1),this['_editorAnnotations']['remove'](_0x45ddd1);}},Ri=class extends _0x44164c{counterView;constructor(_0xa5c28f){super(_0xa5c28f);const _0x47dfec=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4ad9a9,_0xc4e386)=>_0x4ad9a9?'...':_0xc4e386['toString']()),this['set']('annotationType',''),this['icon']=_0x4f7611,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x47dfec['to']('annotationType',_0xe40485=>'ck-annotation-counter__badge--'+_0xe40485),_0x47dfec['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x47dfec['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x2886e3{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x41e8ea){super(_0x41e8ea),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x341190())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x43adb0(),this['_refreshPositioningDebounced']=_0xbc46bc(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x47ef85(this['context']['locale']),this['balloonPanelView']=new _0xce8472(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0xf57ce0){this['annotations']=_0xf57ce0;const _0x3d7b64=this['context']['plugins']['get'](ki),_0x591f3e=this['balloonPanelView'];if(_0x3d7b64['_annotations']=_0xf57ce0,this['isAttached'])throw new _0x587c70('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3d7b64,'set:container',()=>{this['detach'](),this['listenTo'](_0x3d7b64,'change:container',_0x466f1b=>{_0x466f1b['off'](),this['attach'](_0xf57ce0);});}),_0x3d7b64['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x502650=_0x9d4bd7=>{const _0x2a81b3=new Ri(this['context']['locale']);_0x3d7b64['addAnnotation'](_0x9d4bd7,_0x2a81b3),this['_annotationToNarrowView']['set'](_0x9d4bd7,_0x2a81b3),_0x2a81b3['bind']('isDirty','annotationType','number')['to'](_0x9d4bd7['view'],'isDirty','type','length'),_0x2a81b3['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x591f3e['content']['first']!==_0x9d4bd7['view']?(this['_showBalloon'](_0x9d4bd7),_0x9d4bd7['view']['element']['focus'](),this['setActiveAnnotation'](_0x9d4bd7)):this['setActiveAnnotation'](null);});};for(const _0xd39d32 of _0xf57ce0)_0x502650(_0xd39d32);this['listenTo'](_0xf57ce0,'add',(_0x434369,_0x54c906)=>{_0x502650(_0x54c906);}),this['listenTo'](_0xf57ce0,'remove',(_0x59d9e0,_0x2b595e,_0x24fa94)=>{this['_annotationToNarrowView']['get'](_0x2b595e)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2b595e),_0x3d7b64['rearrange']({'removedAnnotation':_0x2b595e,'previousAnnotation':_0xf57ce0['get'](_0x24fa94-0x1),'nextAnnotation':_0xf57ce0['get'](_0x24fa94+0x1)}),_0x2b595e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xf57ce0,'focus',(_0x4c46f7,_0x55fe65)=>{this['setActiveAnnotation'](_0x55fe65);}),this['listenTo'](_0xf57ce0,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x48926c,_0x14d6f6)=>{_0x14d6f6['keyCode']===_0x42efc2['esc']&&_0x591f3e['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x591f3e['content']['first']),this['_hideBalloon'](),_0x14d6f6['stopPropagation'](),_0x14d6f6['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x472dec,_0x516aa1)=>{const _0x28c1a0=_0x516aa1['target'];_0x591f3e['isVisible']&&_0x591f3e['element']['contains'](_0x28c1a0)||_0x3d7b64['view']['element']['contains'](_0x28c1a0)||_0x472dec['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x399e54=>_0x399e54['contains'](_0x28c1a0))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5f53a2=this['context']instanceof _0x345ccf?this['context']['editors']:new _0x43adb0([this['context']]);for(const _0x2fb66c of _0x5f53a2)this['_integrateWithEditorAnnotations'](_0x2fb66c);this['listenTo'](_0x5f53a2,'add',(_0x3ad95c,_0x287141)=>{this['listenTo'](_0x287141,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x287141);});}),this['listenTo'](_0x5f53a2,'remove',(_0x51f562,_0x479afa)=>{_0x479afa['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x479afa['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x2a1e94){if(_0x2a1e94===this['activeAnnotation'])return;const _0x536dc5=this['context']['plugins']['get'](ki);_0x536dc5['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2a1e94,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2a1e94&&_0x536dc5['getSidebarItemView'](_0x2a1e94)?this['_showBalloon'](_0x2a1e94):this['_hideBalloon'](),this['activeAnnotation']=_0x2a1e94;}detach(){if(!this['isAttached'])throw new _0x587c70('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xf5972a=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x33e363=>_0x33e363['destroy']()),this['_annotationToNarrowView']['clear'](),_0xf5972a['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x345ccf&&this['stopListening'](this['context']['editors']);for(const _0x2046e4 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2046e4);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(_0x1eba8c){if(!_0x1eba8c['plugins']['has']('EditorAnnotations'))return;const _0x47f9f6=_0x1eba8c['plugins']['get']('EditorAnnotations'),_0x3647f8=this['context']['plugins']['get'](ki),_0x167a8b=this['annotations'],_0x39fdc3=this['balloonPanelView'],_0x1a8bf7=()=>{const _0x5d338c=_0x47f9f6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x5d338c),this['setActiveAnnotation'](_0x5d338c[0x0]||null);};this['listenTo'](_0x47f9f6,'refresh',_0x1a8bf7),this['listenTo'](_0x47f9f6,'blur',(_0xb61dc0,{isAnnotationTracked:_0x2bdd91})=>{this['activeAnnotation']&&_0x2bdd91(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x47f9f6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x167a8b,'blur',_0x5d559d=>{_0x47f9f6['hasDomSelection']()&&_0x5d559d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x425c7f,_0x3e2340)=>{const _0xc1a22f=_0x3e2340['target'];_0x39fdc3['isVisible']&&_0x39fdc3['element']['contains'](_0xc1a22f)||_0x3647f8['view']['element']['contains'](_0xc1a22f)||this['activeAnnotation']&&_0x47f9f6['hasDomSelection']()&&(_0x1a8bf7(),_0x425c7f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x47f9f6);}_destroyEditorAnnotationsIntegration(_0x47e68c){_0x47e68c&&(this['stopListening'](_0x47e68c),this['_editorAnnotations']['remove'](_0x47e68c));}_setSelectedAnnotations(_0x4b091e){for(const _0xeb2514 of this['_selectedAnnotations'])_0x4b091e['includes'](_0xeb2514)||this['_manuallyClosedAnnotationViews']['delete'](_0xeb2514['view']);this['_selectedAnnotations']=_0x4b091e;}_refreshPositioning(){const _0x58a60d=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x58a60d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xac7e3a){if(this['_manuallyClosedAnnotationViews']['has'](_0xac7e3a['view']))return;const _0x2d96d1=this['balloonPanelView']['content']['first'];_0x2d96d1!==_0xac7e3a['view']?(_0x2d96d1&&this['_detachListeners'](_0x2d96d1),this['_attachListeners'](_0xac7e3a['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xac7e3a['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x1feb11=this['balloonPanelView']['content']['first'],_0x244e56=_0x1feb11&&this['annotations']['getByView'](_0x1feb11);if(!_0x244e56||!this['_annotationToNarrowView']['has'](_0x244e56))return;const _0x4fb433=this['_annotationToNarrowView']['get'](_0x244e56)['element'],_0x1fce1b=(function(){const _0x4ad0b9=_0xce8472['defaultPositions'];return[_0x4ad0b9['southArrowNorthEast'],_0x4ad0b9['northArrowSouthEast'],_0x4ad0b9['southArrowNorth'],_0x4ad0b9['northArrowSouth'],_0x4ad0b9['southArrowNorthWest'],_0x4ad0b9['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x4fb433,'positions':_0x1fce1b});}['_hideBalloon'](){const _0x1e5619=this['balloonPanelView'],_0x4247fa=_0x1e5619['content']['first'];_0x4247fa&&(this['_detachListeners'](_0x4247fa),_0x1e5619['unpin'](),_0x1e5619['content']['clear']());}_attachListeners(_0x88f78b){this['listenTo'](_0x88f78b,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x88f78b,'Esc',(_0x5ef3e3,_0x51981e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x88f78b),this['_hideBalloon'](),_0x51981e();});}_detachListeners(_0x2f4a5c){this['stopListening'](_0x2f4a5c);}},xi=class extends _0x3831f5{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x24ce3a,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x84e21f){super(_0x84e21f),_0x84e21f['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x84e21f['plugins']['get'](_0x24ce3a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0xbc46bc(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x576f1c=this['editor']['plugins']['get'](Ti);_0x576f1c['context']===this['editor']&&(_0x576f1c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x95a75f,_0x1753e6)=>{const _0x18edfa=this['_balloon'];if(this['isAttached']&&_0x18edfa['visibleView']){const _0x20b472=this['annotations']['getByView'](_0x18edfa['visibleView']);_0x20b472&&this['_closeAnnotation'](_0x20b472),_0x1753e6();}}));}afterInit(){const _0x21cd8d=this['editor']['plugins']['get'](Ti);_0x21cd8d['context']===this['editor']&&(_0x21cd8d['hasActive']()||_0x21cd8d['switchTo']('inline'));}setActiveAnnotation(_0x15db18){_0x15db18!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x15db18&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x15db18)&&this['_addAnnotationToBalloon'](_0x15db18,!0x0),_0x15db18['isActive']=!0x0),_0x15db18||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x15db18);}attach(_0x508aec){this['annotations']=_0x508aec;const _0x501d3a=this['editor']['plugins']['get'](Ti),_0x494533=this['_balloon'];if(this['isAttached'])throw new _0x587c70('inlineannotations-attach-already-attached',this);if(_0x501d3a['context']!==this['editor'])throw new _0x587c70('inlineannotations-not-allowed-with-context',this);const _0x58659f=this['editor']['plugins']['get'](di);this['listenTo'](_0x58659f,'refresh',()=>{const _0xefb60=_0x58659f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x142391,_0x1cdc20;!this['_forceRefresh']&&(_0x142391=_0xefb60,_0x1cdc20=this['_selectedAnnotations'],_0x142391['length']===_0x1cdc20['length']&&_0x142391['every'](_0x2734a8=>_0x1cdc20['includes'](_0x2734a8)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xefb60),this['setActiveAnnotation'](_0xefb60[0x0]||null));}),this['listenTo'](_0x58659f,'blur',(_0x18986b,{isAnnotationTracked:_0x191d76})=>{this['activeAnnotation']&&_0x191d76(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x58659f,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x233604,_0x208770,_0x3f9590)=>{_0x3f9590||this['setActiveAnnotation'](null);}),this['listenTo'](_0x508aec,'remove',(_0x4a2012,_0x4a0b0e)=>{this['_removeAnnotationFromBalloon'](_0x4a0b0e),_0x4a0b0e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x494533,'change:visibleView',(_0x32d53d,_0x27be4a,_0x6f3985,_0x2c64cd)=>{_0x2c64cd&&this['stopListening'](_0x2c64cd);const _0x1cfdb7=_0x508aec['getByView'](_0x6f3985);_0x6f3985&&_0x1cfdb7&&(this['listenTo'](_0x6f3985,'change:height',()=>{_0x494533['updatePosition']();}),this['listenTo'](_0x6f3985,'Esc',()=>{this['_closeAnnotation'](_0x1cfdb7),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1cfdb7&&this['setActiveAnnotation'](_0x1cfdb7));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x494533['visibleView']&&_0x508aec['getByView'](_0x494533['visibleView'])&&_0x494533['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 _0x587c70('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2304f2 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2304f2);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x45a372){for(const _0x5d6fcb of this['_selectedAnnotations'])_0x45a372['includes'](_0x5d6fcb)||this['_manuallyClosed']['delete'](_0x5d6fcb);for(const _0x5ff07 of this['annotations'])_0x45a372['includes'](_0x5ff07)||this['_removeAnnotationFromBalloon'](_0x5ff07);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5b4ca8 of _0x45a372)this['_addAnnotationToBalloon'](_0x5b4ca8);}this['_selectedAnnotations']=_0x45a372;}_addAnnotationToBalloon(_0x347d55,_0x78b0a3=!0x1){this['_manuallyClosed']['has'](_0x347d55)||(this['_addedAnnotations']['has'](_0x347d55)||this['_balloon']['hasView'](_0x347d55['view'])||(this['_addedAnnotations']['add'](_0x347d55),this['_balloon']['add']({'stackId':_0x347d55['view']['id'],'view':_0x347d55['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x347d55)}})),_0x78b0a3&&this['_balloon']['showStack'](_0x347d55['view']['id']));}_getBalloonTargetForAnnotation(_0x55e039){const _0x492f6d=_0x55e039['target'],_0x461fe2=this['editor']['editing']['view'],_0x12d186=_0x461fe2['document']['selection']['getFirstRange'](),_0x186e2b=_0x461fe2['domConverter']['viewRangeToDom'](_0x12d186);if(_0x186e2b['collapse'](!0x0),_0x492f6d){if(_0x492f6d instanceof _0x132048)return _0x492f6d;let _0x1f3384=[];for(const _0x4ea8e9 of _0x492f6d)_0x1f3384['push'](..._0x132048['getDomElementRects'](_0x4ea8e9));_0x1f3384=function(_0x2e940d){const _0x3247c4=[];let _0x5ed7d5=_0x2e940d[0x0];for(let _0x3abf07=0x1;_0x3abf07<_0x2e940d['length'];_0x3abf07++)if(Pi(_0x5ed7d5,_0x2e940d[_0x3abf07])){const _0x49899d=_0x2e940d[_0x3abf07]['width'];_0x5ed7d5['width']+=_0x49899d,_0x5ed7d5['right']+=_0x49899d;}else _0x3247c4['push'](_0x5ed7d5),_0x5ed7d5=_0x2e940d[_0x3abf07];return _0x3247c4['push'](_0x5ed7d5),_0x3247c4;}(_0x1f3384);const _0x126003=_0x186e2b['getBoundingClientRect']();return _0x1f3384['find'](_0x1f3f4f=>_0x1f3f4f['top']<=_0x126003['top']&&_0x1f3f4f['bottom']>=_0x126003['bottom']&&_0x1f3f4f['left']<=_0x126003['left']&&_0x1f3f4f['right']>=_0x126003['right'])||_0x1f3384[0x0];}return _0x55e039['targetRect']||_0x186e2b;}_removeAnnotationFromBalloon(_0x1a9852){this['_addedAnnotations']['has'](_0x1a9852)&&this['_balloon']['hasView'](_0x1a9852['view'])&&(this['_addedAnnotations']['delete'](_0x1a9852),this['_balloon']['remove'](_0x1a9852['view']));}_closeAnnotation(_0x302c24){this['_manuallyClosed']['add'](_0x302c24),this['_removeAnnotationFromBalloon'](_0x302c24);}};function Pi(_0x1c9812,_0x37d8f9){return _0x1c9812['top']===_0x37d8f9['top']&&_0x1c9812['bottom']===_0x37d8f9['bottom']&&_0x1c9812['right']===_0x37d8f9['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x508b37,_0xa6ac7){super(_0x508b37),this['set']('isEmpty',!_0xa6ac7['length']),this['focusTracker']=new _0x52e6a6(),this['_annotationViews']=_0xa6ac7,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0xa6ac7,'focusTracker':this['focusTracker']}),this['listenTo'](_0xa6ac7,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xa6ac7,'remove',(_0x1be2f1,_0x419384)=>{_0x419384['isActive']&&this['focus'](),_0xa6ac7['length']||(this['isEmpty']=!0x0);});const _0x46779a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x508b37,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xa6ac7},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x46779a['if']('isEmpty','ck-hidden',_0x44dce9=>!_0x44dce9)]},'children':[{'text':Et(_0x508b37,'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 _0xca973f of this['_annotationViews'])this['focusTracker']['add'](_0xca973f['element']);this['_annotationViews']['on']('change',(_0xc529da,{added:_0x1a2a50,removed:_0xfe9ba3})=>{for(const _0x2969cb of _0x1a2a50)this['focusTracker']['add'](_0x2969cb['element']);for(const _0x5681c9 of _0xfe9ba3)this['focusTracker']['remove'](_0x5681c9['element']);});}},Di=class extends _0x2886e3{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x45dcdd){super(_0x45dcdd),this['archivedThreads']=new _0x43adb0();}init(){const _0x468330=this['context'],_0xeefe4a=_0x468330['plugins']['get'](oi),_0x21a964=_0x468330['plugins']['get'](ti);this['listenTo'](_0xeefe4a,'addCommentThread',(_0x3a982c,{threadId:_0x54e68c})=>{const _0x16ac01=_0xeefe4a['getCommentThread'](_0x54e68c);_0x16ac01['archivedAt']&&this['archivedThreads']['add'](_0x16ac01,this['_calculatePosition'](_0x16ac01['archivedAt'])),this['listenTo'](_0x16ac01,'change:archivedAt',(_0x3909d5,_0x1ae503,_0x1fd71f)=>{_0x1fd71f?this['archivedThreads']['has'](_0x16ac01)||this['archivedThreads']['add'](_0x16ac01,this['_calculatePosition'](_0x16ac01['archivedAt'])):this['archivedThreads']['has'](_0x16ac01)&&this['archivedThreads']['remove'](_0x16ac01);});}),this['listenTo'](_0xeefe4a,'removeCommentThread',(_0x17bddd,{threadId:_0xf585d1})=>{const _0x16da10=_0xeefe4a['getCommentThread'](_0xf585d1);this['stopListening'](_0x16da10),this['archivedThreads']['has'](_0x16da10)&&this['archivedThreads']['remove'](_0x16da10);},{'priority':'highest'}),this['listenTo'](_0x21a964['collection'],'focus',(_0x442deb,_0x1dc9a5)=>{_0x1dc9a5['isVisible']||(_0x1dc9a5['isActive']=!0x0,_0x21a964['activate'](_0x1dc9a5));});}_calculatePosition(_0x298a4c){const _0x20b8e5=[...this['archivedThreads']]['findIndex'](_0x5e6bd0=>_0x5e6bd0['archivedAt']<_0x298a4c);return _0x20b8e5>-0x1?_0x20b8e5:this['archivedThreads']['length'];}},Vi=class extends _0x3831f5{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x28d408];}constructor(_0x4b0203){super(_0x4b0203),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x28d5e1=this['editor'],_0x4b2785=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x28d5e1['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x44164c,!0x0)),_0x28d5e1['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1ffad6=this['_createCommentsArchiveButton'](rt);return _0x1ffad6['set']({'role':'menuitemcheckbox'}),_0x1ffad6;});const _0x230790=_0x28d5e1['plugins']['get'](Di),_0x4c64d2=_0x28d5e1['plugins']['get']('Annotations'),_0x509c39=_0x28d5e1['plugins']['get']('CommentsRepository');_0x230790['archivedThreads']['forEach'](_0x5bea11=>{this['_handleNewThread'](_0x5bea11);}),this['listenTo'](_0x230790['archivedThreads'],'add',(_0x2f3c06,_0x15af32)=>{this['_handleNewThread'](_0x15af32);}),this['listenTo'](_0x4c64d2['collection'],'add',(_0x111aca,_0x1af175)=>{const _0x2f5ee5=this['_pendingThreads']['find'](_0x18a7c4=>{const _0x186417=_0x509c39['_threadToController']['get'](_0x18a7c4);return _0x186417&&_0x1af175['innerView']===_0x186417['view'];});if(_0x2f5ee5){const _0x3f08c7=this['_calculatePosition'](_0x2f5ee5['archivedAt']);this['_addAnnotationToArchive'](_0x1af175,_0x3f08c7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2f5ee5),0x1);}}),this['listenTo'](_0x230790['archivedThreads'],'remove',(_0x29442e,_0x2ec7e2)=>{const _0x2c59a8=_0x28d5e1['config']['get']('collaboration.channelId');if(!_0x2c59a8||_0x2ec7e2['channelId']===_0x2c59a8){if(this['_pendingThreads']['includes'](_0x2ec7e2))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2ec7e2),0x1);else{const _0x243e1d=_0x509c39['_threadToController']['get'](_0x2ec7e2),_0x5a74d4=_0x4c64d2['getByInnerView'](_0x243e1d['view']);this['annotationViews']['remove'](_0x5a74d4['view']),this['stopListening'](_0x5a74d4),this['stopListening'](_0x5a74d4['focusableElements']);}}}),this['listenTo'](_0x4c64d2['collection'],'add',(_0x313629,_0x337326)=>{this['listenTo'](_0x337326,'escape',_0x4b2785);}),this['listenTo'](_0x4c64d2['collection'],'remove',(_0x2830ca,_0x9249fb)=>{this['stopListening'](_0x9249fb,'escape',_0x4b2785);});}_addAnnotationToArchive(_0x515e43,_0x119ca6){this['listenTo'](_0x515e43,'set:isVisible',_0xd67a15=>{_0xd67a15['return']=!0x1,_0xd67a15['stop']();}),this['annotationViews']['add'](_0x515e43['view'],_0x119ca6);}['_handleNewThread'](_0x48408a){const _0x381d1e=this['editor']['plugins']['get']('CommentsRepository'),_0x296cf9=this['editor']['plugins']['get']('Annotations'),_0x461907=this['editor']['config']['get']('collaboration.channelId');if(!_0x461907||_0x48408a['channelId']===_0x461907){const _0x318f94=_0x381d1e['_threadToController']['get'](_0x48408a);if(!_0x318f94)return void this['_pendingThreads']['push'](_0x48408a);const _0x4aeebd=this['_calculatePosition'](_0x48408a['archivedAt']),_0x53d12f=_0x296cf9['getByInnerView'](_0x318f94['view']);_0x53d12f['isVisible']&&_0x296cf9['_visibleAnnotations']['remove'](_0x53d12f),this['_addAnnotationToArchive'](_0x53d12f,_0x4aeebd);}}_calculatePosition(_0x37a0f0){const _0x129bb0=this['editor']['config']['get']('collaboration.channelId'),_0xff8ef4=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0xeedbc8=>_0xeedbc8['channelId']===_0x129bb0)['findIndex'](_0x3ff3b1=>_0x3ff3b1['archivedAt']<_0x37a0f0);return _0xff8ef4<0x0||_0xff8ef4>this['annotationViews']['length']?this['annotationViews']['length']:_0xff8ef4-0x1;}_toggleDialog(){const _0x5d55b9=this['editor'],_0x4a72b1=_0x5d55b9['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x5d55b9['locale'],this['annotationViews'])),'commentsArchive'===_0x4a72b1['id']?_0x4a72b1['hide']():_0x4a72b1['show']({'id':'commentsArchive','title':Et(_0x5d55b9['locale'],'COMMENTS_ARCHIVE'),'icon':_0x188b5f,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x14f9e6['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x47753e,_0x10bd7a=!0x1){const _0x2e8de6=this['editor']['locale'],_0x43cd48=this['editor']['plugins']['get']('Dialog'),_0x25d5bd=new _0x47753e(_0x2e8de6);return _0x25d5bd['bind']('isEnabled')['to'](this,'isEnabled'),_0x25d5bd['bind']('isOn')['to'](_0x43cd48,'id',_0x408c9a=>'commentsArchive'===_0x408c9a),_0x25d5bd['set']({'label':Et(_0x2e8de6,'COMMENTS_ARCHIVE'),'icon':_0x188b5f,'isToggleable':!0x0}),_0x10bd7a&&(_0x25d5bd['tooltip']=!0x0),this['listenTo'](_0x25d5bd,'execute',()=>this['_toggleDialog']()),_0x25d5bd;}_hideDialogOnAnnotationEscape=_0x5b21aa=>{const _0x205dd8=_0x5b21aa['source'];if(!this['annotationViews']['has'](_0x205dd8['view']))return;const _0x3e79bf=this['editor']['plugins']['get']('Dialog');_0x3e79bf['isOpen']&&'commentsArchive'===_0x3e79bf['id']&&(_0x3e79bf['hide'](),_0x5b21aa['stop']());};},Bi=class extends _0x3831f5{static get requires(){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};