@ckeditor/ckeditor5-comments 48.5.0 → 48.5.1

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 (76) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/index.js +11 -11
  3. package/dist/translations/af.umd.js +1 -1
  4. package/dist/translations/ar.umd.js +1 -1
  5. package/dist/translations/ast.umd.js +1 -1
  6. package/dist/translations/az.umd.js +1 -1
  7. package/dist/translations/be.umd.js +1 -1
  8. package/dist/translations/bg.umd.js +1 -1
  9. package/dist/translations/bn.umd.js +1 -1
  10. package/dist/translations/bs.umd.js +1 -1
  11. package/dist/translations/ca.umd.js +1 -1
  12. package/dist/translations/cs.umd.js +1 -1
  13. package/dist/translations/da.umd.js +1 -1
  14. package/dist/translations/de-ch.umd.js +1 -1
  15. package/dist/translations/de.umd.js +1 -1
  16. package/dist/translations/el.umd.js +1 -1
  17. package/dist/translations/en-au.umd.js +1 -1
  18. package/dist/translations/en-gb.umd.js +1 -1
  19. package/dist/translations/en.umd.js +1 -1
  20. package/dist/translations/eo.umd.js +1 -1
  21. package/dist/translations/es-co.umd.js +1 -1
  22. package/dist/translations/es.umd.js +1 -1
  23. package/dist/translations/et.umd.js +1 -1
  24. package/dist/translations/eu.umd.js +1 -1
  25. package/dist/translations/fa.umd.js +1 -1
  26. package/dist/translations/fi.umd.js +1 -1
  27. package/dist/translations/fr.umd.js +1 -1
  28. package/dist/translations/gl.umd.js +1 -1
  29. package/dist/translations/gu.umd.js +1 -1
  30. package/dist/translations/he.umd.js +1 -1
  31. package/dist/translations/hi.umd.js +1 -1
  32. package/dist/translations/hr.umd.js +1 -1
  33. package/dist/translations/hu.umd.js +1 -1
  34. package/dist/translations/hy.umd.js +1 -1
  35. package/dist/translations/id.umd.js +1 -1
  36. package/dist/translations/it.umd.js +1 -1
  37. package/dist/translations/ja.umd.js +1 -1
  38. package/dist/translations/jv.umd.js +1 -1
  39. package/dist/translations/kk.umd.js +1 -1
  40. package/dist/translations/km.umd.js +1 -1
  41. package/dist/translations/kn.umd.js +1 -1
  42. package/dist/translations/ko.umd.js +1 -1
  43. package/dist/translations/ku.umd.js +1 -1
  44. package/dist/translations/lt.umd.js +1 -1
  45. package/dist/translations/lv.umd.js +1 -1
  46. package/dist/translations/ms.umd.js +1 -1
  47. package/dist/translations/nb.umd.js +1 -1
  48. package/dist/translations/ne.umd.js +1 -1
  49. package/dist/translations/nl.umd.js +1 -1
  50. package/dist/translations/no.umd.js +1 -1
  51. package/dist/translations/oc.umd.js +1 -1
  52. package/dist/translations/pl.umd.js +1 -1
  53. package/dist/translations/pt-br.umd.js +1 -1
  54. package/dist/translations/pt.umd.js +1 -1
  55. package/dist/translations/ro.umd.js +1 -1
  56. package/dist/translations/ru.umd.js +1 -1
  57. package/dist/translations/si.umd.js +1 -1
  58. package/dist/translations/sk.umd.js +1 -1
  59. package/dist/translations/sl.umd.js +1 -1
  60. package/dist/translations/sq.umd.js +1 -1
  61. package/dist/translations/sr-latn.umd.js +1 -1
  62. package/dist/translations/sr.umd.js +1 -1
  63. package/dist/translations/sv.umd.js +1 -1
  64. package/dist/translations/th.umd.js +1 -1
  65. package/dist/translations/ti.umd.js +1 -1
  66. package/dist/translations/tk.umd.js +1 -1
  67. package/dist/translations/tr.umd.js +1 -1
  68. package/dist/translations/tt.umd.js +1 -1
  69. package/dist/translations/ug.umd.js +1 -1
  70. package/dist/translations/uk.umd.js +1 -1
  71. package/dist/translations/ur.umd.js +1 -1
  72. package/dist/translations/uz.umd.js +1 -1
  73. package/dist/translations/vi.umd.js +1 -1
  74. package/dist/translations/zh-cn.umd.js +1 -1
  75. package/dist/translations/zh.umd.js +1 -1
  76. package/package.json +17 -17
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x254461,Context as _0x5d61fe,ContextPlugin as _0x3d8ace,Editor as _0x5d3c65,PendingActions as _0x434878,Plugin as _0x36d238}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x59fadc,Collection as _0xeae5cd,DomEmitterMixin as _0x34dc61,FocusTracker as _0x1749d2,KeystrokeHandler as _0x2781fd,ObservableMixin as _0x5f10cb,Rect as _0x276b72,diff as _0x355eae,first as _0x102981,getEnvKeystrokeText as _0x5fe013,keyCodes as _0x39b378,priorities as _0x130a0b,scrollViewportToShowTarget as _0x3dd6c4,toUnit as _0x4833c6,uid as _0x144583}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x160d68,ConfirmMixin as _0x2b4f0a,FOCUS_ANNOTATION_KEYSTROKE as _0x235769,LateFocusButtonView as _0x18913b,LateFocusDropdownButtonView as _0x41f32c,UserView as _0x58238e,Users as _0x46e177,getAllMarkersDomElementsSorted as _0x3b4bee,getDateTimeFormatter as _0x4ac7c3,hashObject as _0x8e868c,setupThreadKeyboardNavigation as _0x1cc400,surroundingMarkersDetector as _0x624c26,trimHtml as _0x93f90c}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x4c34d4,debounce as _0xd4e18c,isEqual as _0x2d4811,set as _0x8c206d,throttle as _0x58d35e,unset as _0x4feec0}from'es-toolkit/compat';import{IconAddComment as _0x64587f,IconCheck as _0x29b66f,IconCommentsArchive as _0x453301,IconPencil as _0x27b417,IconRemoveComment as _0x255d55,IconThreeVerticalDots as _0x3ce8b4,IconUndo as _0x284c9a}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x37a9d4,BodyCollection as _0x2c9604,ButtonView as _0x5dc461,ContextualBalloon as _0x34753a,Dialog as _0x11e02b,DialogViewPosition as _0x49c5b3,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
- _0x5f10cb();var bt=class extends It{['model'];['view'];constructor(_0x309ca7,_0x44d505){super(),this['model']=_0x309ca7,this['model']['_isAttached']=!0x0,this['view']=_0x44d505,this['listenTo'](_0x44d505,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x44d505,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x44d505,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x44d505,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x44d505,'addComment',(_0x2dd287,_0x3c696b)=>this['addComment'](_0x3c696b)),this['listenTo'](_0x44d505,'updateComment',(_0x2a5e77,_0x3475fc,_0x51a8e0)=>this['updateComment'](_0x3475fc,_0x51a8e0)),this['listenTo'](_0x44d505,'removeComment',(_0x56e256,_0x1a3cd0)=>this['removeComment'](_0x1a3cd0));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x32b075){this['model']['addComment']({'content':_0x32b075,'authorId':this['view']['_localUser']['id']});}updateComment(_0x326b95,_0xecbf12){this['model']['getComment'](_0x326b95)['update']({'content':_0xecbf12});}removeComment(_0xc5bc5){this['model']['getComment'](_0xc5bc5)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x799ce1,_0x388b1a,_0x897f1b){const t=_0x799ce1['t'];switch(_0x388b1a){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'},_0x897f1b);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'},_0x897f1b);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'},_0x897f1b);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'},_0x897f1b);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x897f1b);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'},_0x897f1b);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'},_0x897f1b);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'},_0x897f1b);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(_0x1a7a3b,_0x214286){super(_0x1a7a3b);const _0x5560c9=_0x144583();this['main']=this['createCollection'](),this['editable']=new st(_0x1a7a3b,_0x214286,void 0x0,{'label':()=>Et(_0x1a7a3b,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1a7a3b['uiLanguageDirection'],'lang':_0x1a7a3b['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5560c9},'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(_0x47bac1){super(_0x47bac1),this['view']=new kt(_0x47bac1['locale'],_0x47bac1['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x3b975d=this['editor']['editing']['view'],_0x151bc1=this['view']['editable'];_0x151bc1['name']=_0x3b975d['document']['getRoot']()['rootName'],this['view']['render']();const _0xb3c855=_0x151bc1['element'];this['setEditableElement'](_0x151bc1['name'],_0xb3c855),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3b975d['attachDomRoot'](_0xb3c855),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x5f10cb(_0x5d3c65);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x2e91e8={}){(_0x2e91e8=Object['assign']({},_0x2e91e8))['plugins']||(_0x2e91e8['plugins']=CommentEditor['defaultPlugins']),super(_0x2e91e8),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 _0x5cc3ba=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5cc3ba))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2e0dad=>{const _0x488b8d=this['model']['document']['getRoot'](),_0x377088=_0x488b8d&&_0x488b8d['getChild'](_0x488b8d['childCount']-0x1);_0x2e0dad['setSelection'](_0x377088,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x2192d8=this['editing']['view'],_0x169fda=_0x2192d8['document']['getRoot'](),_0x78d48e=_0x169fda['getChild'](0x0);_0x169fda['childCount']>0x1||!_0x78d48e||'p'!=_0x78d48e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x2192d8,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x78d48e['placeholder']=this['placeholder']),ut({'view':_0x2192d8,'element':_0x78d48e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x78d48e);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x18f2fd,_0x3ada0d={}){super(_0x18f2fd),this['editor']=null,this['_editorConfig']=_0x3ada0d,this['set']('value',_0x3ada0d['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x18f2fd,'Reply...')),this['set']('submitLabel',Et(_0x18f2fd,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x2781fd(),this['focusTracker']=new _0x1749d2(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x127547=>!_0x127547['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',(_0x2b665f,_0x5d65f2)=>{this['cancelButtonView']['fire']('execute'),_0x5d65f2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4a88b8,_0x36daa6)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x36daa6());}),this['on']('submit',(_0x17dfe0,_0x2dae31)=>{_0x2dae31['length']>0xfde8?(alert(Et(_0x18f2fd,'TOO_LONG_COMMENT_ALERT',[_0x2dae31['length'],0xfde8])),_0x17dfe0['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 _0x28fa7e=this['editor'];this['element']['insertBefore'](_0x28fa7e['ui']['element'],this['element']['firstChild']),_0x28fa7e['model']['document']['on']('change',()=>this['value']=_0x28fa7e['getData']()),_0x28fa7e['bind']('placeholder')['to'](this),this['focusables']['add'](_0x28fa7e['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3e8374){-0x1===_0x3e8374?(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:_0x546ff3}=this,_0x2c070a=new _0x5dc461(_0x546ff3);return _0x2c070a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2c070a['withText']=!0x0,_0x2c070a['bind']('label')['to'](this,'submitLabel'),_0x2c070a['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2c070a['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x189dc0,_0x2d8d24)=>!_0x2d8d24&&!!_0x189dc0['trim']()),_0x2c070a;}_createCancelButton(){const {locale:_0x22615a}=this,_0x276e7e=new _0x5dc461(_0x22615a);return _0x276e7e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x276e7e['label']=Et(_0x22615a,'Cancel'),_0x276e7e['withText']=!0x0,_0x276e7e['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x276e7e;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x321303=>{this['focusTracker']['add'](_0x321303['element']);}),this['focusables']['on']('change',(_0x3933d0,_0x45a56b)=>{for(const _0x57adf6 of Array['from'](_0x45a56b['added'])['reverse']())this['focusTracker']['add'](_0x57adf6['element']);});}},xt=class extends ht{constructor(_0x3eba3b,_0x2df31d,_0x487a51){super(_0x3eba3b),this['commentInputView']=new St(_0x3eba3b,_0x487a51),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3c1fe9,_0x53e68e)=>_0x3c1fe9||!!_0x53e68e),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 _0x58238e(_0x3eba3b,_0x2df31d),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'](_0x148289){this['commentInputView']['focus'](_0x148289);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x270482,_0x59ff98)=>{const {submitButtonView:_0x1c53d4,cancelButtonView:_0x22c706,editor:_0x29ae7b}=this['commentInputView'];[_0x1c53d4['element'],_0x22c706['element'],_0x29ae7b?_0x29ae7b['editing']['view']['getDomRoot']():null]['filter'](_0x108596=>_0x108596)['some'](_0x198c1c=>_0x198c1c['contains'](_0x59ff98['target']))||(this['focus'](),_0x59ff98['preventDefault']());});}},Pt=class extends ht{constructor(_0x3e5a8a){super(_0x3e5a8a);const _0x488138=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x488138['to']('count',_0x52434f=>Et(_0x3e5a8a,'NUMBER_OF_COMMENTS',_0x52434f))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x46dd8a,_0x349ccf,_0xe7424b){super(_0x46dd8a);const _0x2afd9f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x349ccf['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x349ccf,this['_config']=_0xe7424b,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1749d2(),this['keystrokes']=new _0x2781fd(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x488f4d=>this['commentViews']['map'](_0x45a6c3=>_0x45a6c3['element'])['includes'](_0x488f4d['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x46dd8a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2b5f41=>_0x2b5f41-this['_config']['maxCommentsWhenCollapsed']);for(const _0x34c395 of _0x349ccf['comments'])this['_handleNewCommentModel'](_0x34c395);this['_handleInfoComment'](),this['listenTo'](_0x349ccf['comments'],'add',(_0x257003,_0x3f7337)=>{const _0x4c5a81=this['_calculatePosition'](_0x3f7337);this['length']++,this['_handleNewCommentModel'](_0x3f7337,_0x4c5a81),this['refreshVisibleViews']();}),this['listenTo'](_0x349ccf['comments'],'remove',(_0x1bfe6c,_0x1dc310)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1dc310),this['refreshVisibleViews']();}),this['listenTo'](_0x349ccf,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x349ccf,'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',_0x2afd9f['if']('length','ck-hidden',_0x2a9032=>!_0x2a9032)],'aria-label':Et(_0x46dd8a,'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'](_0x2e4629){-0x1===_0x2e4629?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x74fee4 of this['commentViews'])_0x74fee4['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x4a64aa,_0xe574e1){const _0x5bdc48=new this['_config']['CommentView'](this['locale'],_0x4a64aa,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5bdc48['viewUid']=_0x4a64aa['id'],_0x5bdc48['delegate']('removeComment')['to'](this),_0x5bdc48['delegate']('updateComment')['to'](this),_0x5bdc48['delegate']('resolveCommentThread')['to'](this),_0x5bdc48['delegate']('editorReady')['to'](this),_0x5bdc48['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5bdc48,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5bdc48,_0xe574e1);}_calculatePosition(_0xa07ece){const _0x48ad63=this['_model']['_findOptimalIndex'](_0xa07ece);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xa07ece['authoredAt']?_0x48ad63-0x1:_0x48ad63:_0x48ad63-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x27ad8c={'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'],_0x27ad8c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x27ad8c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x50774d){const _0x545852=this['commentViews']['remove'](_0x50774d['id']);this['stopListening'](_0x545852),_0x545852['isEditMode']&&this['_updateHasDirtyComment'](),_0x545852['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x57ad63=>_0x57ad63['isEditMode']);}['_rearrangeCollapse'](){const _0x2591cf=function(_0x2bb1a8){const _0x5d1525=new _0xeae5cd();for(const _0x13cfca of _0x2bb1a8)_0x5d1525['add'](_0x13cfca);return _0x5d1525;}(this['commentViews']),_0x488d2e=this['_collapsedCommentsView']['count'];for(let _0x329142=0x1;_0x329142<=_0x488d2e;_0x329142++)_0x2591cf['remove'](0x1);for(const _0x44bce4 of _0x2591cf)_0x44bce4['collapse']();_0x488d2e>0x0&&_0x2591cf['add'](this['_collapsedCommentsView'],0x1),Dt(_0x355eae(Array['from'](this['visibleViews']),Array['from'](_0x2591cf)),this['visibleViews'],_0x2591cf);}['_rearrangeExpand'](){Dt(_0x355eae(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1fc51d of this['visibleViews'])_0x1fc51d['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x550f3a=>{this['focusTracker']['add'](_0x550f3a['element']),this['keystrokes']['listenTo'](_0x550f3a['element']);}),this['commentViews']['on']('change',(_0x531aa6,_0x3555a7)=>{for(const _0x558d80 of _0x3555a7['removed'])this['focusTracker']['remove'](_0x558d80['element']),this['keystrokes']['stopListening'](_0x558d80['element']);for(const _0x5d97d2 of Array['from'](_0x3555a7['added'])['reverse']())this['focusTracker']['add'](_0x5d97d2['element']),this['keystrokes']['listenTo'](_0x5d97d2['element']);});}};function Dt(_0xf3f1b6,_0x54a6b1,_0x370d7a){let _0x7d9ffa=0x0;for(const _0x46c9fc of _0xf3f1b6)switch(_0x46c9fc){case'insert':_0x54a6b1['add'](_0x370d7a['get'](_0x7d9ffa),_0x7d9ffa),_0x7d9ffa++;break;case'delete':_0x54a6b1['remove'](_0x7d9ffa);break;case'equal':_0x7d9ffa++;}}var Vt=class extends ht{constructor(_0x1c5ad0){super(_0x1c5ad0);const _0x56415b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x56415b['to']('contextValue',_0x3224f7=>Et(_0x1c5ad0,'THREAD_CONTEXT_LABEL',_0x3224f7)),'tabindex':-0x1},'children':[{'text':_0x56415b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x21ce39,_0x11a5e1){super(_0x21ce39);const _0x4cc4c5=this['bindTemplate'];this['_model']=_0x11a5e1,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1749d2(),this['keystrokes']=new _0x2781fd(),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',_0x5d770f=>!!_0x5d770f),this['bind']('contextValue')['to'](this['_model'],'context',_0x4bb86b=>_0x4bb86b&&_0x4bb86b['value']?this['_trimContextValue'](_0x4bb86b['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',_0x4cc4c5['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 _0x2d0d2a=new _0x5dc461(this['locale']);return _0x2d0d2a['label']=Et(this['locale'],'Reopen'),_0x2d0d2a['tooltip']=Et(this['locale'],'Reopen'),_0x2d0d2a['icon']=_0x284c9a,_0x2d0d2a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x38f093=>!_0x38f093),_0x2d0d2a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x892c6f,_0x4ae017)=>_0x892c6f&&_0x4ae017),_0x2d0d2a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2d0d2a;}_trimContextValue(_0x582aab){if(_0x582aab['length']<0x96)return _0x582aab;const _0x3e2bc5=_0x582aab['lastIndexOf']('\x20',0x93);return _0x582aab['substring'](0x0,_0x3e2bc5>-0x1?_0x3e2bc5:0x93)+'...';}_attachContextActions(){const _0x3c4ad0=this['element']['querySelector']('.ck-context'),_0x3b0b57=_0x3c4ad0['querySelector']('.ck-context__value');this['listenTo'](_0x3c4ad0,'mouseenter',()=>{_0x3b0b57['offsetWidth']<_0x3b0b57['scrollWidth']&&_0x3c4ad0['classList']['add']('overlay');}),this['listenTo'](_0x3c4ad0,'mouseleave',()=>{_0x3c4ad0['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x2f532e of this['focusables'])this['focusTracker']['add'](_0x2f532e['element']),this['keystrokes']['listenTo'](_0x2f532e['element']);}_createContextView(){const _0x4a9371=new Vt(this['locale']);return _0x4a9371['bind']('contextValue')['to'](this),_0x4a9371;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x4e5b83,_0x186afc,_0x33d3e6,_0x16f7e5){super(_0x4e5b83),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x186afc,this['_localUser']=_0x33d3e6,this['_config']=_0x16f7e5,this['commentThreadHeaderView']=new Bt(_0x4e5b83,_0x186afc),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x160d68(_0x4e5b83,Et(_0x4e5b83,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x4e5b83,_0x186afc,Object['assign']({'CommentView':this['_config']['CommentView']},_0x16f7e5)),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',(_0x375ff3,_0x51e5c4)=>_0x375ff3||!!_0x51e5c4),this['bind']('isUnlinked')['to'](_0x186afc,'unlinkedAt',_0x38c910=>!!_0x38c910);let _0x749223=null;const _0x113978=()=>{const _0x49e185=this['_model']['comments']['first']||null;_0x49e185!==_0x749223&&(_0x749223&&this['stopListening'](_0x749223,'change:content'),_0x749223=_0x49e185,_0x49e185&&this['listenTo'](_0x49e185,'change:content',_0x113978));const _0x3030fb=_0x49e185?_0x49e185['author']['name']:this['_localUser']['name'],_0x3bf2b0=_0x49e185?new DOMParser()['parseFromString'](_0x93f90c(_0x49e185['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x278b89=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x3030fb]);this['set']('ariaLabel',_0x3bf2b0?_0x278b89+'\x20'+_0x3bf2b0:_0x278b89);};this['listenTo'](this['_model']['comments'],'change',_0x113978),_0x113978(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1749d2(),this['keystrokes']=new _0x2781fd(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5b7b90=>_0x5b7b90['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x1cc400(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x11dc93=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2f10b3=_0x11dc93['commentInputView'];return _0x11dc93['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2f10b3,'value',(_0x55eef9,_0x320827,_0x914d4c,_0x2d061f,_0x51d72b)=>!!_0x51d72b||!!_0x2d061f&&_0x914d4c&&!_0x320827||_0x55eef9&&_0x914d4c&&!_0x320827),_0x2f10b3['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xf78b7d,_0x426d8b,_0x442506)=>{let _0x314f83;return _0x314f83=_0x442506&&_0x426d8b?'Reply\x20to\x20reopen\x20discussion...':_0xf78b7d?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x314f83);}),_0x2f10b3['bind']('submitLabel')['to'](this,'length',_0x2184ad=>Et(this['locale'],_0x2184ad?'Reply':'Comment')),_0x2f10b3['on']('submit',(_0x3cc2b4,_0x28acb9)=>{this['fire']('addComment',_0x28acb9),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2f10b3['on']('cancel',()=>{this['focus']();}),_0x2f10b3['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2f10b3['on']('cancel',_0x164520=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x164520['stop']());}),this['on']('change:isActive',(_0x40d572,_0x242c6c,_0x2789b9)=>{_0x2789b9||this['length']||_0x2f10b3['value']||this['fire']('removeCommentThread');}),_0x11dc93;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x2b4f0a(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x1c1bf9,_0x47c86e,_0x55887f,_0x2e60d9){super(_0x1c1bf9,_0x47c86e,_0x55887f,_0x2e60d9),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1c1bf9,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x15f158,_0x1f8991,_0x333b84)=>{_0x333b84||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x38d1bc,_0x1b3516,_0x421fb3)=>{_0x421fb3&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x228abd=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x228abd['if']('isActive','ck-thread--active'),_0x228abd['if']('isUnlinked','ck-thread--unlinked'),_0x228abd['to']('actionIndicator',_0x562204=>_0x562204?'ck-thread--'+_0x562204:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x228abd['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 _0x399dbb of this['commentsListView']['commentViews'])_0x399dbb['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x164c29}=this,_0x174225=this['commentsListView']['commentViews']['get'](0x0);_0x174225===this['_boundFirstCommentView']||_0x174225['isSystemComment']||(this['_boundFirstCommentView']=_0x174225,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x174225,'actionIndicator',_0x39b54e=>'remove'===_0x39b54e?'remove':null),_0x174225['placeholder']=Et(_0x164c29,'Write\x20a\x20comment...'),_0x174225['removeButton']['on']('execute',_0x11404c=>{_0x11404c['stop'](),this['showConfirm'](Et(_0x164c29,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x174225['focus']();}),_0x174225['actionBar']['add'](this['resolveButton'],0x0),_0x174225['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x149ad7=new _0x18913b(this['locale']);return _0x149ad7['label']=Et(this['locale'],'Resolve'),_0x149ad7['tooltip']=Et(this['locale'],'Resolve'),_0x149ad7['icon']=_0x29b66f,_0x149ad7['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x149ad7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x7bcc6f=>!_0x7bcc6f),_0x149ad7['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5cb183,_0xd2cef4)=>_0x5cb183&&!_0xd2cef4),_0x149ad7['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x149ad7;}_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(_0x2a347a){super(_0x2a347a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0xda48e8,_0x1fe7da,_0x25676b)=>{this['element']['innerHTML']=_0x25676b;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x4915eb,_0x333b40,_0x53fb2c){super(_0x4915eb),this['_model']=_0x333b40,this['_config']=_0x53fb2c,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x333b40,'content',_0x333b40,'authoredAt',(_0x42ea66,_0x4e446e)=>Et(_0x4915eb,'COMMENT_ARIA_LABEL',[_0x333b40['author']['name'],_0x53fb2c['formatDateTime'](_0x4e446e),new DOMParser()['parseFromString'](_0x42ea66,'text/html')['body']['textContent'],_0x333b40['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x160d68(_0x4915eb,Et(_0x4915eb,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x1749d2(),this['keystrokes']=new _0x2781fd(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4aef14=>_0x4aef14['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 _0x14511d=new Wt(this['locale']);return _0x14511d['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x150ef9,_0x322619)=>_0x322619?_0x93f90c(_0x150ef9,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x150ef9),_0x14511d;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5667be=new St(this['locale'],this['_config']['editorConfig']);return _0x5667be['value']=this['_model']['content'],_0x5667be['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5667be['submitLabel']=Et(this['locale'],'Save'),_0x5667be['on']('submit',(_0x5efcb7,_0x6093ee)=>{this['fire']('updateComment',this['_model']['id'],_0x6093ee),this['switchToDisplayMode'](),this['focus']();}),_0x5667be['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5667be['once']('editorReady',()=>{_0x5667be['focus']();}),_0x5667be['createEditor'](),_0x5667be['delegate']('editorReady')['to'](this),_0x5667be['delegate']('editorDestroyed')['to'](this),_0x5667be;}_setupKeyboardNavigation(){const _0x3d072b=this['element'];this['keystrokes']['listenTo'](_0x3d072b);for(const _0x12f6e5 of this['focusables'])this['focusTracker']['add'](_0x12f6e5['element']),this['keystrokes']['listenTo'](_0x12f6e5['element']);this['focusables']['on']('change',(_0x401e7b,_0x12d1b2)=>{for(const _0x10e478 of _0x12d1b2['removed'])this['focusTracker']['remove'](_0x10e478['element']),this['keystrokes']['stopListening'](_0x10e478['element']);for(const _0x5694ae of _0x12d1b2['added'])this['focusTracker']['add'](_0x5694ae['element']),this['keystrokes']['listenTo'](_0x5694ae['element']);}),this['keystrokes']['set']('enter',(_0x3af631,_0x83ffe8)=>{_0x3d072b===_0x3af631['target']&&(this['focusCycler']['focusFirst'](),_0x83ffe8());}),this['keystrokes']['set']('esc',(_0x5d58ce,_0x43733f)=>{_0x3d072b!==_0x5d58ce['target']&&(this['focus'](),_0x43733f());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x2b4f0a(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x2767ca,_0x4b21c2,_0x3f0b06){super(_0x2767ca,_0x4b21c2,_0x3f0b06),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x2767ca,'Reply...')),this['bind']('authoredAt')['to'](_0x4b21c2),this['bind']('resolvedAt')['to'](_0x4b21c2),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 _0x58238e(_0x2767ca,_0x4b21c2['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4b21c2,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x80819e=this['bindTemplate'],_0x302d53=[{'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':_0x80819e['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x80819e['to']('authoredAt',_0x186dbf=>this['_config']['formatDateTime'](_0x186dbf))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x80819e['if']('isEditMode','ck-comment__actions--hidden'),_0x80819e['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']&&_0x302d53['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x80819e['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x80819e['if']('isEditMode','ck-comment--edit'),_0x80819e['if']('isSystemComment','ck-comment--info'),_0x80819e['to']('actionIndicator',_0x248fda=>_0x248fda?'ck-comment--'+_0x248fda:'')],'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':_0x302d53}]}]};}_createEditButton(){const _0x7a18c=new _0x5dc461(this['locale']);return _0x7a18c['label']=Et(this['locale'],'Edit'),_0x7a18c['icon']=_0x27b417,_0x7a18c['withText']=!0x0,_0x7a18c['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x7a18c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2a888d=>!_0x2a888d),_0x7a18c['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x7a18c['on']('execute',()=>this['switchToEditMode']()),_0x7a18c;}_createRemoveButton(){const _0x51fde7=new _0x5dc461(this['locale']);return _0x51fde7['label']=Et(this['locale'],'Remove'),_0x51fde7['icon']=_0x255d55,_0x51fde7['withText']=!0x0,_0x51fde7['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x51fde7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x370942=>!_0x370942),_0x51fde7['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x51fde7['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x51fde7;}_createDropdown(){const _0x57c09e=ct(this['locale'],_0x41f32c),_0xb9bf32=_0x57c09e['panelView']['children'],_0x57ac6a=new ot(this['locale']),_0x2aaceb=_0x57c09e['bindTemplate'];dt(_0x57c09e,()=>this['items']['find'](_0x17d218=>_0x17d218['isVisible'])),_0x57c09e['extendTemplate']({'attributes':{'class':[_0x2aaceb['if']('isVisible','ck-hidden',_0x242c33=>!_0x242c33)]}});const _0xfb40f1=(_0x30d3bc,_0x59737d=-0x1)=>{const _0x421677=new nt(this['locale']);_0x421677['children']['add'](_0x30d3bc);const _0x25f671=_0x59737d>-0x1?_0x59737d:_0x57ac6a['items']['length'];_0x57ac6a['items']['add'](_0x421677,_0x25f671);const _0x5b8e3a=Array['from'](this['items']);_0x57c09e['unbind']('isEnabled','isVisible'),_0x57c09e['bind']('isEnabled')['toMany'](_0x5b8e3a,'isEnabled',(..._0x22303d)=>_0x22303d['some'](_0x1398f3=>_0x1398f3)),_0x57c09e['bind']('isVisible')['toMany'](_0x5b8e3a,'isVisible',(..._0x3c0cfa)=>_0x3c0cfa['some'](_0x448d71=>_0x448d71));};_0x57c09e['panelPosition']='sw',_0x57c09e['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x3ce8b4});for(const _0x35e42e of this['items'])_0xfb40f1(_0x35e42e);return _0xb9bf32['add'](_0x57ac6a),_0x57c09e['listenTo'](this['items'],'add',(_0xb300e3,_0x5632fa,_0x5b67ae)=>{_0xfb40f1(_0x5632fa,_0x5b67ae);}),_0x57c09e['listenTo'](this['items'],'remove',(_0x2a8a64,_0x1357a1,_0x46904c)=>{_0x57ac6a['items']['remove'](_0x46904c);}),_0x57c09e;}_attachActions(_0x35faab,_0x4ce84c){const _0x40971d=_0x35faab&&_0x35faab['element'];_0x40971d&&(this['listenTo'](_0x40971d,'mouseenter',()=>this['actionIndicator']=_0x4ce84c),this['listenTo'](_0x40971d,'focus',()=>this['actionIndicator']=_0x4ce84c),this['listenTo'](_0x40971d,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x40971d,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x321ea0=super['_createCommentInputView']();return _0x321ea0['bind']('placeholder')['to'](this),_0x321ea0;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x50a949){const _0xf8b22d=_0x58d35e(_0x50a949,0x1e),_0x5cfc49=new MutationObserver(_0x117c65=>{for(const _0x39955b of _0x117c65)('attributes'==_0x39955b['type']&&'class'==_0x39955b['attributeName']||'childList'==_0x39955b['type']||'characterData'==_0x39955b['type'])&&_0xf8b22d();});return{'attach'(_0x31e127){_0x5cfc49['observe'](_0x31e127,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5cfc49['disconnect'](),_0xf8b22d['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x48c6bd,_0xd656b5){super(_0x48c6bd),this['id']=_0x144583(),this['focusTracker']=new _0x1749d2(),this['keystrokes']=new _0x2781fd(),this['keystrokes']['set']('Esc',(_0x455845,_0x18d1d7)=>this['fire']('Esc',_0x18d1d7)),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'](_0xd656b5),this['mainView']=_0xd656b5;const _0x3599b7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3599b7['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 _0x55b3a0=this['element']['clientHeight'];_0x55b3a0&&(this['height']=_0x55b3a0);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x5f10cb();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x5e2106,target:_0x498dc1,type:_0x103b38,isVisible:_0x183788=!0x0}){super(),this['view']=_0x5e2106,this['view']['element']||this['view']['render'](),this['_type']=_0x103b38,this['_target']=_0x498dc1,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xeae5cd([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x13c85c,_0x115321)=>{this['view']['focusTracker']['add'](_0x115321);}),this['focusableElements']['on']('remove',(_0x2896f0,_0x1aa739)=>{this['view']['focusTracker']['remove'](_0x1aa739);}),this['set']('isVisible',_0x183788);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x1346c5=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x1346c5),_0x1346c5;}get targetRect(){const _0x1ddc29=this['target'];if(null===_0x1ddc29)return null;if(_0x1ddc29 instanceof _0x276b72)return _0x1ddc29;const _0x121ffa=_0x1ddc29['filter'](_0x1d3e70=>function(_0x40ce69){return!!_0x40ce69['offsetParent']||!!_0x40ce69['getClientRects']()['item'](0x0);}(_0x1d3e70));return 0x0===_0x121ffa['length']?null:_0x276b72['getDomElementRects'](_0x121ffa[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x218c7f){this['view']['isActive']=_0x218c7f,this['view']['mainView']['isActive']=_0x218c7f;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x422f29){if(!(null===_0x422f29||_0x422f29 instanceof _0x276b72||Array['isArray'](_0x422f29)&&_0x422f29['every'](_0x16844f=>zt(_0x16844f))))throw new _0x59fadc('annotation-invalid-target',null,{'target':_0x422f29});}_getNormalizedTarget(){const _0x3a72e5='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x3a72e5)?[_0x3a72e5]:_0x3a72e5;}};function zt(_0x585abe){return null!==_0x585abe&&'object'==typeof _0x585abe&&'nodeType'in _0x585abe&&0x1===_0x585abe['nodeType'];}var Jt=class extends _0xeae5cd{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x291f47=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1749d2(),this['_focusTracker']['on']('change:isFocused',(_0x4897cd,_0xefa70b,_0x1a715d)=>{_0x1a715d||this['fire']('blur');});for(const _0x39ee71 of _0x291f47)this['add'](_0x39ee71);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2ee109){if(this['has'](_0x2ee109))throw new _0x59fadc('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2ee109['innerView'],_0x2ee109),this['_viewToAnnotation']['set'](_0x2ee109['view'],_0x2ee109);for(const _0x3d3f6d of _0x2ee109['focusableElements'])this['_focusTracker']['add'](_0x3d3f6d);if(this['listenTo'](_0x2ee109['focusableElements'],'add',(_0x44d902,_0xd0cd64)=>{this['_focusTracker']['add'](_0xd0cd64);}),this['listenTo'](_0x2ee109['focusableElements'],'remove',(_0x170bf6,_0x1fad18)=>{this['_focusTracker']['remove'](_0x1fad18);}),this['listenTo'](_0x2ee109['view']['focusTracker'],'change:isFocused',(_0x2c0265,_0x516ce1,_0x1ab215)=>{_0x1ab215&&this['fire']('focus',_0x2ee109);}),_0x2ee109['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x88e9af of this)_0x88e9af['updateTargetRect']();}const _0x31a2f2=this['_getOrderInContent'](_0x2ee109['view']['targetRect']);return super['add'](_0x2ee109,_0x31a2f2);}['remove'](_0x2a9301){if(!this['has'](_0x2a9301))throw new _0x59fadc('annotationcollection-not-existing-item',null);this['stopListening'](_0x2a9301['view']['focusTracker']),this['stopListening'](_0x2a9301['focusableElements']);for(const _0x44e211 of _0x2a9301['focusableElements'])this['_focusTracker']['remove'](_0x44e211);return this['_viewToAnnotation']['delete'](_0x2a9301['view']),this['_innerViewToAnnotation']['delete'](_0x2a9301['innerView']),super['remove'](_0x2a9301);}getByInnerView(_0x1c4b0e){return this['_innerViewToAnnotation']['get'](_0x1c4b0e);}getByView(_0x55abad){return this['_viewToAnnotation']['get'](_0x55abad);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x53b16a of this)_0x53b16a['updateTargetRect']();this['_sort']();}_sort(){const _0x55ad0a=Array['from'](this)['sort']((_0x20ec23,_0x50da89)=>Zt(_0x20ec23['view']['targetRect'],_0x50da89['view']['targetRect']));for(let _0x32cd35=_0x55ad0a['length']-0x1;_0x32cd35>0x0;_0x32cd35--){const _0x467631=_0x55ad0a[_0x32cd35];_0x32cd35!==this['getIndex'](_0x467631)&&(this['remove'](_0x467631),this['add'](_0x467631));}}_getOrderInContent(_0x575345){let _0x327490=0x0;if(!_0x575345)return this['length'];for(const _0x162478 of this){const _0x3b98bf=_0x162478['view']['targetRect'];if(_0x3b98bf){if(Zt(_0x575345,_0x3b98bf)<0x0)return _0x327490;_0x327490++;}}return _0x327490;}_areCachedRectsStale(){const _0x6a095e=this['get'](0x0);if(!_0x6a095e)return!0x1;const _0x2192dc=_0x6a095e['view']['targetRect'],_0x115fa0=_0x6a095e['targetRect'];return!(!_0x2192dc||!_0x115fa0)&&(_0x2192dc['top']!==_0x115fa0['top']||_0x2192dc['left']!==_0x115fa0['left']);}};function Qt({source:_0x33beb5,target:_0x1905c6,filter:_0x5b8237}){for(const _0x34d5dd of _0x33beb5)_0x5b8237(_0x34d5dd)&&_0x1905c6['add'](_0x34d5dd);_0x1905c6['listenTo'](_0x33beb5,'add',(_0x5a9837,_0x57082b)=>{_0x5b8237(_0x57082b)&&_0x1905c6['add'](_0x57082b);}),_0x1905c6['listenTo'](_0x33beb5,'remove',(_0x3e28d2,_0x5b6c91)=>{_0x1905c6['has'](_0x5b6c91)&&_0x1905c6['remove'](_0x5b6c91);});}function Zt(_0x491d43,_0x1e08f5){if(null===_0x491d43&&null===_0x1e08f5)return 0x0;if(null===_0x491d43)return-0x1;if(null===_0x1e08f5)return 0x1;const _0x21f3c4=_0x491d43['top']-_0x1e08f5['top'];return 0x0==_0x21f3c4?_0x491d43['left']-_0x1e08f5['left']:_0x21f3c4;}var ti=class extends _0x3d8ace{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b3281){if(super(_0x2b3281),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2b3281 instanceof _0x5d3c65){const _0x3e2484=_0x2b3281['locale'];_0x2b3281['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3f8c86){this['collection']['add'](_0x3f8c86);}['remove'](_0x157b98){this['collection']['remove'](_0x157b98),_0x157b98['destroy']();}refreshVisibility(){for(const _0x281d4f of this['collection'])_0x281d4f['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x2317e2){return this['collection']['getByInnerView'](_0x2317e2);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x398519 of this['collection'])_0x398519['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x56a49c){this['fire']('_activateAnnotation',_0x56a49c);}createAnnotation(_0x2e45db){return new $t(_0x2e45db);}createAnnotationView(_0x8d3a16,_0x3bccbb){return new qt(_0x8d3a16,_0x3bccbb);}_addActiveAnnotation(_0xe9627b){const _0x189dd5=new Set(this['activeAnnotations']);_0x189dd5['add'](_0xe9627b),this['activeAnnotations']=_0x189dd5;}_removeActiveAnnotation(_0x49f8ef){const _0x278017=new Set(this['activeAnnotations']);_0x278017['delete'](_0x49f8ef),this['activeAnnotations']=_0x278017;}_bindAnnotationsToVisibleAnnotations(){const _0x3a13c8=this['collection'],_0x3a74f4=this['_visibleAnnotations'];function _0x285087(_0x4c2b9a){const _0x4cc02f=_0x4c2b9a['source'];_0x4cc02f['isVisible']&&!_0x3a74f4['has'](_0x4cc02f)?_0x3a74f4['add'](_0x4cc02f):!_0x4cc02f['isVisible']&&_0x3a74f4['has'](_0x4cc02f)&&_0x3a74f4['remove'](_0x4cc02f),_0x4cc02f['view']['focusTracker']['remove'](_0x4cc02f['view']['element']),_0x4cc02f['view']['focusTracker']['add'](_0x4cc02f['view']['element']);}this['listenTo'](_0x3a13c8,'add',(_0x386b62,_0xc7b063)=>{_0xc7b063['isVisible']&&_0x3a74f4['add'](_0xc7b063),this['listenTo'](_0xc7b063,'change:isVisible',_0x285087);}),this['listenTo'](_0x3a13c8,'remove',(_0x3767a4,_0x1675cf)=>{_0x3a74f4['has'](_0x1675cf)&&_0x3a74f4['remove'](_0x1675cf),this['stopListening'](_0x1675cf,'change:isVisible',_0x285087);});}_setupEnterAnnotationKeystroke(){const _0x36171a=_0xb0365=>{_0xb0365['on']('ready',()=>{_0xb0365['keystrokes']['set'](_0x235769,(_0x139be5,_0x5d554d)=>{const _0x260d78=_0x102981(this['activeAnnotations']['values']());_0x260d78&&(_0x260d78['view']['focus'](),_0x5d554d());});});};this['context']instanceof _0x5d3c65?_0x36171a(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x12bab5,_0x19e7aa)=>{_0x36171a(_0x19e7aa);});}_setupEscapeAnnotationHandling(){const _0x292e92=_0x1c228d=>{const _0x18241c=_0x1c228d['source'],_0x51577c=[];let _0x532254;if(Array['isArray'](_0x18241c['target'])){_0x532254=_0x18241c['target'][0x0],this['context']instanceof _0x5d3c65?_0x51577c['push'](this['context']):this['context']['editors']&&_0x51577c['push'](...this['context']['editors']);for(const _0x45a276 of _0x51577c)for(const _0x295d85 of _0x45a276['editing']['view']['domRoots']['values']())if(_0x295d85['contains'](_0x532254))return void _0x45a276['editing']['view']['focus']();_0x532254['focus']();}};this['listenTo'](this['collection'],'add',(_0x541b01,_0x4200cc)=>{this['listenTo'](_0x4200cc,'escape',_0x292e92,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x255067,_0x12358e)=>{this['stopListening'](_0x12358e,'escape',_0x292e92);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x5f10cb(),ni=/* #__PURE__ -- @preserve */
31
- _0x5f10cb();var oi=class extends _0x3d8ace{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x434878,_0x46e177];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x32948f){super(_0x32948f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x9e2152=this['context']['config'];_0x9e2152['define']('comments.maxCommentsWhenCollapsed',0x2),_0x9e2152['define']('comments.maxThreadTotalWeight',0x1f4),_0x9e2152['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x9e2152['define']('comments.CommentThreadView',Ut),_0x9e2152['define']('comments.CommentView',Yt),_0x9e2152['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x33c173=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x299835,_0x57a71e)=>this['_addCommentThread'](_0x57a71e)),this['on']('submitCommentThread',(_0x4d25e9,_0xea510d)=>this['_submitCommentThread'](_0xea510d)),this['on']('resolveCommentThread',(_0x937bf,_0x31ec22)=>this['_resolveCommentThread'](_0x31ec22)),this['on']('resolveCommentThread',(_0x2ffdd8,_0xa8ab49)=>this['_updateActiveAnnotation'](_0xa8ab49),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x59753e,_0x24d6ed)=>this['_reopenCommentThread'](_0x24d6ed)),this['on']('reopenCommentThread',(_0x4b4496,_0x9af588)=>this['_updateActiveAnnotation'](_0x9af588),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x497c63,_0x4d443e)=>this['_removeCommentThread'](_0x4d443e)),this['on']('updateCommentThread',(_0x51dcb7,_0x116e45)=>this['_updateCommentThread'](_0x116e45)),this['on']('updateCommentThread',(_0x4fb75a,_0x4050f4)=>this['_updateActiveAnnotation'](_0x4050f4),{'priority':'lowest'}),this['on']('addComment',(_0x493c9f,_0x315140)=>this['_addComment'](_0x315140)),this['on']('updateComment',(_0x406f75,_0x44d4b8)=>this['_updateComment'](_0x44d4b8)),this['on']('removeComment',(_0x13cd4b,_0x1f8e47)=>this['_removeComment'](_0x1f8e47)),this['on']('addComment',(_0x26a692,{threadId:_0x3b898a,isFromAdapter:_0x497b34})=>{if(_0x497b34)return;const _0x5dfdde=this['getCommentThread'](_0x3b898a),_0x204b4b=_0x5dfdde&&this['_threadToController']['get'](_0x5dfdde);_0x204b4b&&_0x204b4b['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x33c173,'change:activeAnnotations',(_0x36ddd7,_0x24238e,_0x34a95a)=>{const _0x569fa2=Array['from'](_0x34a95a)['map'](_0xf4370d=>this['_viewToController']['get'](_0xf4370d['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x569fa2?_0x569fa2['model']:null;});}set adapter(_0x113c94){if(this['_adapter'])throw new _0x59fadc('commentsrepository-adapter-already-set');this['_adapter']=_0x113c94;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x42a074=ii,threadId:_0x5d1cd9=_0x144583(),comments:_0x597dd6=[],unlinkedAt:_0x183265=null,resolvedAt:_0xc4d9e7=null,resolvedBy:_0x3c3934=null,target:_0x39c288=null,context:_0x5b81fe=null,attributes:_0xea185c={},isResolvable:_0x15d038=!0x0,isSubmitted:_0x39f192=!0x1,isFromAdapter:_0x15a78b=!0x1}={}){return this['fire'](ai('addCommentThread',_0x42a074),{'channelId':_0x42a074,'threadId':_0x5d1cd9,'comments':_0x597dd6,'unlinkedAt':_0x183265,'resolvedAt':_0xc4d9e7,'resolvedBy':_0x3c3934,'target':_0x39c288,'context':_0x5b81fe,'attributes':_0xea185c,'isFromAdapter':_0x15a78b,'isResolvable':_0x15d038,'isSubmitted':_0x39f192}),this['getCommentThread'](_0x5d1cd9);}openNewCommentThread({channelId:_0x4a77da=ii,threadId:_0xd55be8=_0x144583(),target:_0x2ca8ba,context:_0x1544ca=null,isResolvable:_0x2b5e6f=!0x0}){if(this['_readOnlyChannels']['has'](_0x4a77da)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2ca8ba)throw new _0x59fadc('commentsrepository-missing-target');const _0x1ca532=this['addCommentThread']({'channelId':_0x4a77da,'threadId':_0xd55be8,'target':_0x2ca8ba,'context':_0x1544ca,'isResolvable':_0x2b5e6f});if(!_0x1ca532)return null;const _0x5b53b8=this['_threadToController']['get'](_0x1ca532),_0x5101b1=_0x5b53b8['view']['commentThreadInputView']['commentInputView'],_0x10e4c4=this['context']['plugins']['get'](ti),_0x3acf1c=_0x10e4c4['getByInnerView'](_0x5b53b8['view']);return _0x10e4c4['activate'](_0x3acf1c),_0x5101b1['once']('editorReady',()=>_0x5101b1['focus']()),_0x1ca532;}hasCommentThread(_0xd415ae){if('string'!=typeof _0xd415ae)throw new _0x59fadc('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xd415ae);}updateCommentThread({channelId:_0x2a5114=ii,threadId:_0x5d026a,context:_0x5b1c75,unlinkedAt:_0x53f493,attributes:_0x25f136,isFromAdapter:_0x2862dd=!0x1}){return this['fire'](ai('updateCommentThread',_0x2a5114),{'channelId':_0x2a5114,'threadId':_0x5d026a,'context':_0x5b1c75,'unlinkedAt':_0x53f493,'attributes':_0x25f136,'isFromAdapter':_0x2862dd}),this['getCommentThread'](_0x5d026a);}getCommentThread(_0x4cf3b2){if('string'!=typeof _0x4cf3b2)throw new _0x59fadc('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4cf3b2);}fetchCommentThread({channelId:_0x54e5ce,threadId:_0x5f1268}={}){const _0x4eaff7=this['getCommentThread'](_0x5f1268);if(_0x4eaff7)return Promise['resolve'](_0x4eaff7);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x59fadc('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x54e5ce,'threadId':_0x5f1268})['then'](_0xb83db1=>this['hasCommentThread'](_0x5f1268)?this['getCommentThread'](_0x5f1268):_0xb83db1?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x54e5ce},_0xb83db1)):void 0x0)['catch'](_0x390af2=>{throw console['error'](_0x390af2),new _0x59fadc('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x3e3125,skipNotAttached:_0x242aff=!0x1,skipEmpty:_0x4e0a5a=!0x1,toJSON:_0x1e7f0f=!0x1}={}){const _0x413e86=[];for(const _0x168708 of this['_threads']['values']())_0x3e3125&&_0x168708['channelId']!==_0x3e3125||_0x242aff&&!_0x168708['isAttached']||_0x4e0a5a&&0x0===_0x168708['length']||_0x413e86['push'](_0x168708);return _0x1e7f0f?_0x413e86['map'](_0x468a52=>_0x468a52['toJSON']()):_0x413e86;}getAnnotationForCommentThread(_0x415d33){const _0x5b283a=this['_threadToController']['get'](_0x415d33);return _0x5b283a&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x5b283a['view'])||null;}getCommentThreadForAnnotation(_0x1f85a8){const _0x260ae1=this['_viewToController']['get'](_0x1f85a8['innerView']);return _0x260ae1?_0x260ae1['model']:null;}setActiveCommentThread(_0x4bfadd){const _0x21c005=this['context']['plugins']['get'](ti);if(!_0x4bfadd)return void(this['activeCommentThread']&&_0x21c005['deactivateAll']());const _0x464ccd=this['getCommentThread'](_0x4bfadd);if(!_0x464ccd)throw new _0x59fadc('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4bfadd});if(!this['_threadToController']['has'](_0x464ccd))throw new _0x59fadc('commentsrepository-active-not-attached',null,{'threadId':_0x4bfadd});const _0x31afde=_0x21c005['getByInnerView'](this['_threadToController']['get'](_0x464ccd)['view']);_0x21c005['activate'](_0x31afde);}switchReadOnly(_0x308fba,_0x360af4){_0x308fba?this['_readOnlyChannels']['add'](_0x360af4):this['_readOnlyChannels']['delete'](_0x360af4),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x48d21f){return this['_readOnlyChannels']['has'](_0x48d21f)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x4bdc7b,_0x374ac8){return new bt(_0x4bdc7b,_0x374ac8);}setPermissions(_0x3c6d63,_0x172cb7=ii){this['_permissions']['set'](_0x172cb7,_0x3c6d63),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x5cb37a=ii){return this['_permissions']['has'](_0x5cb37a)?this['_permissions']['get'](_0x5cb37a):ei;}_addCommentThread({channelId:_0x4b90c3,threadId:_0xac1dec,comments:_0x387edb,unlinkedAt:_0x59f564,resolvedAt:_0x3284d0,resolvedBy:_0xef95c7,target:_0x5ee805,context:_0x4a8e4a,attributes:_0x49b018,isFromAdapter:_0xf93837,isResolvable:_0x1733f3,isSubmitted:_0x440b84}){if('string'!=typeof _0xac1dec)throw new _0x59fadc('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xac1dec});if(this['hasCommentThread'](_0xac1dec))throw new _0x59fadc('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xac1dec});const _0x31cb5a=new ri(this,{'channelId':_0x4b90c3,'id':_0xac1dec,'context':_0x4a8e4a,'attributes':_0x49b018,'unlinkedAt':_0x59f564,'resolvedAt':_0x3284d0,'resolvedBy':_0xef95c7?this['context']['plugins']['get'](_0x46e177)['getUser'](_0xef95c7):null,'isResolvable':_0x1733f3,'isSubmitted':_0x440b84||_0xf93837});this['_threads']['set'](_0xac1dec,_0x31cb5a);for(const _0x5a79f5 of _0x387edb)_0x31cb5a['_add'](this['_createNewComment']({'threadId':_0xac1dec,..._0x5a79f5}));return _0x5ee805&&_0x31cb5a['attachTo'](_0x5ee805),_0xf93837||!_0x31cb5a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4b90c3,'threadId':_0xac1dec});}_submitCommentThread({channelId:_0x4042d0,threadId:_0x363871}){if(!this['hasCommentThread'](_0x363871))throw new _0x59fadc('commentsrepository-missing-comment-thread',this);const _0x4d7d5f=this['getCommentThread'](_0x363871);if(_0x4d7d5f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4c127b,comments:_0x10d8e3,resolvedAt:_0x2d5d82,resolvedBy:_0x28c0e3,context:_0xe429e,attributes:_0x2844bf}=_0x4d7d5f,_0x1b8929=this['context']['plugins']['get']('PendingActions'),_0x2cecb3=_0x1b8929['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4042d0,'threadId':_0x4c127b,'comments':_0x10d8e3['map'](_0x339184=>_0x339184['toJSON']()),'resolvedAt':_0x2d5d82,'resolvedBy':_0x28c0e3?_0x28c0e3['id']:_0x28c0e3,'context':_0xe429e,'attributes':_0x2844bf})['then'](({comments:_0x3999e2})=>{_0x1b8929['remove'](_0x2cecb3);for(const _0x5b0f94 of _0x3999e2)this['_updateComment']({'channelId':_0x4042d0,'threadId':_0x363871,'commentId':_0x5b0f94['commentId'],'createdAt':_0x5b0f94['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4dd873=>{throw console['error'](_0x4dd873),new _0x59fadc('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x36bc27,target:_0x4aa51d}){const _0xe4829e=this['getCommentThread'](_0x36bc27);if(!_0xe4829e)throw new _0x59fadc('commentsrepository-attach-missing-comment-thread',this);const _0x4c0773=this['context']['plugins']['get']('PendingActions'),_0x29f3a6=this['context']['plugins']['get'](ti),_0x39d308=this['_createCommentThreadView'](_0xe4829e),_0xe46a43=new bt(_0xe4829e,_0x39d308);let _0x36ea6e=null;_0x39d308['on']('change:isDirty',(_0x120deb,_0x39520d,_0x18fd88)=>{_0x18fd88?_0x36ea6e=_0x4c0773['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x36ea6e&&(_0x4c0773['remove'](_0x36ea6e),_0x36ea6e=null);}),this['_threadToController']['set'](_0xe4829e,_0xe46a43),this['_viewToController']['set'](_0x39d308,_0xe46a43);const _0x47a3bb=new qt(this['context']['locale'],_0x39d308);_0x47a3bb['bind']('length')['to'](_0x39d308),_0x47a3bb['bind']('isDirty')['to'](_0x39d308,'isDirty',_0x39d308,'length',(_0xe58c7c,_0x4e3ebd)=>_0xe58c7c||!_0x4e3ebd),_0x47a3bb['bind']('isActive')['to'](_0x39d308),_0x47a3bb['type']='comment';const _0xe914c=new $t({'view':_0x47a3bb,'target':_0x4aa51d,'type':'comment','isVisible':!_0xe4829e['archivedAt']&&!!('function'==typeof _0x4aa51d?_0x4aa51d():_0x4aa51d)});return _0x39d308['on']('escape',()=>{_0xe914c['fire']('escape');}),this['_bindAnnotationToEditors'](_0x39d308,_0xe914c),_0x29f3a6['add'](_0xe914c),_0xe914c;}_bindAnnotationToEditors(_0x4f9e21,_0x322dc2){this['listenTo'](_0x4f9e21,'editorReady',(_0x384888,_0x240dbe)=>{const _0x11b12e=_0x240dbe['ui']['view']['body']['bodyCollectionContainer'];_0x322dc2['focusableElements']['add'](_0x11b12e),this['context']instanceof _0x5d3c65&&this['context']['ui']['focusTracker']['add'](_0x11b12e);},{'priority':'highest'}),this['listenTo'](_0x4f9e21,'editorDestroyed',(_0x35b469,_0x4a69fa)=>{const _0x2e270b=_0x4a69fa['ui']['view']['body']['bodyCollectionContainer'];_0x322dc2['focusableElements']['has'](_0x2e270b)&&_0x322dc2['focusableElements']['remove'](_0x2e270b),this['context']instanceof _0x5d3c65&&this['context']['ui']['focusTracker']['remove'](_0x2e270b);});}_unbindEditors(_0x22faed){this['stopListening'](_0x22faed,'editorReady'),this['stopListening'](_0x22faed,'editorDestroyed');}_createCommentThreadView(_0x16907b){const _0x179cc4=this['context']['plugins']['get'](_0x46e177),{config:_0x89a113,locale:_0xc3fe8f}=this['context'],_0xbe7c66=_0x4ac7c3(_0x89a113['get']('locale'),_0xc3fe8f);return new(0x0,(_0x89a113['get']('comments'))['CommentThreadView'])(_0xc3fe8f,_0x16907b,_0x179cc4['me'],{'editorConfig':{..._0x89a113['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x89a113['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x89a113['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x89a113['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x89a113['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xbe7c66,'CommentView':_0x89a113['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x240696,channelId:_0x5aa4c6,resolvedAt:_0x397eb0,resolvedBy:_0x3e203e,isFromAdapter:_0x226074}){if(!this['hasCommentThread'](_0x240696))throw new _0x59fadc('commentsrepository-missing-comment-thread',null,{'threadId':_0x240696});const _0x45e970=this['getCommentThread'](_0x240696);if(_0x45e970['isResolved'])throw new _0x59fadc('commentsrepository-resolved-comment-thread',null,{'threadId':_0x240696});const _0x4dbae4=this['context']['plugins']['get'](_0x46e177);if(_0x45e970['resolvedBy']=_0x4dbae4['getUser'](_0x3e203e),_0x45e970['resolvedAt']=_0x397eb0,_0x226074||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x50d951=this['context']['plugins']['get']('PendingActions'),_0x477960=_0x50d951['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x5aa4c6,'threadId':_0x240696})['then'](({resolvedAt:_0x57acc1,resolvedBy:_0x42e592})=>{_0x50d951['remove'](_0x477960),_0x45e970['resolvedBy']['id']!==_0x42e592&&(_0x45e970['resolvedBy']=_0x4dbae4['getUser'](_0x42e592)),_0x45e970['resolvedAt']=_0x57acc1;})['catch'](_0x355f44=>{throw console['error'](_0x355f44),new _0x59fadc('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x36db62,channelId:_0x3921de,isFromAdapter:_0xfe1df5}){if(!this['hasCommentThread'](_0x36db62))throw new _0x59fadc('commentsrepository-missing-comment-thread',null,{'threadId':_0x36db62});const _0x2e50f6=this['getCommentThread'](_0x36db62);if(!_0x2e50f6['isResolved'])throw new _0x59fadc('commentsrepository-reopen-comment-thread',null,{'threadId':_0x36db62});if(_0x2e50f6['resolvedBy']=null,_0x2e50f6['resolvedAt']=null,_0xfe1df5||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x53b5f6=this['context']['plugins']['get']('PendingActions'),_0x1da7f=_0x53b5f6['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3921de,'threadId':_0x36db62})['then'](()=>_0x53b5f6['remove'](_0x1da7f))['catch'](_0x405e3a=>{throw console['error'](_0x405e3a),new _0x59fadc('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x7673bb,isFromAdapter:_0x558346}){const _0x110930=this['getCommentThread'](_0x7673bb);if(!_0x110930)throw new _0x59fadc('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x7673bb),this['_threads']['delete'](_0x7673bb),!_0x110930['isSubmitted']||_0x558346||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x48a66f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x19a036}=_0x110930,_0x828e73=_0x48a66f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x19a036,'threadId':_0x7673bb})['then'](()=>_0x48a66f['remove'](_0x828e73))['catch'](_0x276ac5=>{throw console['error'](_0x276ac5),new _0x59fadc('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x33c016,unlinkedAt:_0x20e5fc,context:_0x111bb0,attributes:_0x45d764,isFromAdapter:_0x18fb66}){if('string'!=typeof _0x33c016)throw new _0x59fadc('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x33c016});if(!this['hasCommentThread'](_0x33c016))throw new _0x59fadc('commentsrepository-missing-comment-thread',null,{'threadId':_0x33c016});const _0x18762b=this['getCommentThread'](_0x33c016);let _0x469fa6=!0x1;if(void 0x0!==_0x111bb0&&_0x18762b['context']!==_0x111bb0&&(_0x18762b['context']=_0x111bb0,_0x469fa6=!0x0),void 0x0!==_0x20e5fc&&_0x18762b['unlinkedAt']!==_0x20e5fc&&(_0x18762b['unlinkedAt']=_0x20e5fc,_0x469fa6=!0x0),_0x45d764&&!_0x2d4811(_0x45d764,_0x18762b['attributes'])&&(_0x18762b['attributes']=_0x45d764,_0x469fa6=!0x0),!_0x469fa6)return Promise['resolve']();if(!_0x18762b['isSubmitted']||_0x18fb66||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xf1165e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x557189}=_0x18762b,_0x471ece=_0xf1165e['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x557189,'threadId':_0x33c016,'context':_0x111bb0,'unlinkedAt':_0x20e5fc,'attributes':_0x45d764})['then'](()=>_0xf1165e['remove'](_0x471ece))['catch'](_0x38adac=>{throw console['error'](_0x38adac),new _0x59fadc('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x2693a6){const _0x586d54=this['context']['plugins']['get'](ti),_0x4719d7=this['getCommentThread'](_0x2693a6);if(_0x4719d7['_isAttached']=!0x1,this['_threadToController']['has'](_0x4719d7)){const _0x10b462=this['_threadToController']['get'](_0x4719d7),_0x4b4e23=_0x10b462['view'],_0x3f8b62=_0x586d54['getByInnerView'](_0x4b4e23);this['_threadToController']['delete'](_0x4719d7),this['_viewToController']['delete'](_0x4b4e23),_0x3f8b62&&_0x586d54['remove'](_0x3f8b62),_0x10b462['destroy'](),_0x4b4e23['destroy']()['then'](()=>{this['_unbindEditors'](_0x4b4e23);});}}_updateActiveAnnotation({threadId:_0x1b05b4,resolvedAt:_0x838cd0,unlinkedAt:_0x5585a0}){const _0x55239c=!!_0x838cd0,_0x37ab3e=this['context']['plugins']['get'](ti),_0x466729=this['getCommentThread'](_0x1b05b4);if(this['_threadToController']['has'](_0x466729)){const _0x674ef8=this['_threadToController']['get'](_0x466729)['view'],_0xb98fdd=_0x37ab3e['getByInnerView'](_0x674ef8);_0xb98fdd&&(_0x55239c&&_0x37ab3e['_removeActiveAnnotation'](_0xb98fdd),_0x5585a0?_0xb98fdd['isVisible']=!0x1:_0xb98fdd['refreshVisibility']());}}_getExternalAuthor(_0x1cc337){const _0x4a237d=this['context']['plugins']['get'](_0x46e177),_0x48e01e=_0x8e868c('external:'+_0x1cc337),_0x5dee80=_0x4a237d['getUser'](_0x48e01e);return _0x5dee80||_0x4a237d['addUser']({'id':_0x48e01e,'name':_0x1cc337});}_createNewComment({threadId:_0x27afee,commentId:_0x37180f=_0x144583(),content:_0x8bf0b0,authorId:_0x25dbbd,createdAt:_0x2eaaa7,attributes:_0x27e4e7}){if('string'!=typeof _0x37180f)throw new _0x59fadc('commentsrepository-invalid-commentid');if('string'!=typeof _0x25dbbd)throw new _0x59fadc('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x8bf0b0||!_0x8bf0b0['trim']())throw new _0x59fadc('commentsrepository-invalid-comment-content');const _0x2f16a9=this['context']['plugins']['get'](_0x46e177)['getUser'](_0x25dbbd);if(!_0x2f16a9)throw new _0x59fadc('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x25dbbd});let _0x4d7f1d=null,_0x3d2254=_0x2eaaa7;return _0x27e4e7?.['@external']&&(_0x4d7f1d=this['_getExternalAuthor'](_0x27e4e7['@external']['authorName']),_0x3d2254=new Date(_0x27e4e7['@external']['createdAt'])),new hi(this,{'threadId':_0x27afee,'id':_0x37180f,'author':_0x4d7f1d||_0x2f16a9,'creator':_0x2f16a9,'content':_0x8bf0b0,'createdAt':_0x2eaaa7,'authoredAt':_0x3d2254,'attributes':_0x27e4e7});}_addComment(_0x4cd040){let {threadId:_0x68321b,content:_0x4f7e54,attributes:_0x3d4a02,isFromAdapter:_0x8a2a4e}=_0x4cd040;const _0x4dff22=this['getCommentThread'](_0x4cd040['threadId']);if(!_0x4dff22)throw new _0x59fadc('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x6d571b=this['_createNewComment'](_0x4cd040),{id:_0x1322e9}=_0x6d571b;if(_0x4dff22['_add'](_0x6d571b),_0x8a2a4e||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4dff22['isSubmitted'])return Promise['resolve']();const _0x4051cc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x30b658}=_0x4dff22,_0x160c6b=_0x4051cc['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3d4a02||(_0x3d4a02={}),this['adapter']['addComment']({'channelId':_0x30b658,'threadId':_0x68321b,'commentId':_0x1322e9,'content':_0x4f7e54,'attributes':_0x3d4a02})['then'](_0x276654=>{_0x4051cc['remove'](_0x160c6b),_0x276654&&this['_updateComment']({'channelId':_0x30b658,'threadId':_0x68321b,'commentId':_0x1322e9,'createdAt':_0x276654['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5de390=>{throw console['error'](_0x5de390),new _0x59fadc('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x43deb1,commentId:_0x3742a0,content:_0x387c9a,createdAt:_0x8006af,attributes:_0x3e3b36,isFromAdapter:_0x21d6ec}){if(void 0x0!==_0x387c9a&&('string'!=typeof _0x387c9a||!_0x387c9a['trim']()['length']))throw new _0x59fadc('commentsrepository-update-comment-invalid-content');const _0x5ee736=this['getCommentThread'](_0x43deb1),_0x4305c8=_0x5ee736['getComment'](_0x3742a0);if(!_0x4305c8)throw new _0x59fadc('commentsrepository-update-missing-comment',this);let _0x753208=!0x1;if(_0x387c9a&&_0x387c9a!==_0x4305c8['content']&&(_0x4305c8['isEditable']||_0x21d6ec)&&(_0x4305c8['content']=_0x387c9a,_0x753208=!0x0),_0x8006af&&_0x8006af!==_0x4305c8['createdAt']&&(_0x4305c8['createdAt']=_0x8006af,_0x4305c8['isExternal']||(_0x4305c8['authoredAt']=_0x8006af),_0x753208=!0x0),_0x3e3b36&&!_0x2d4811(_0x3e3b36,_0x4305c8['attributes'])&&(_0x4305c8['attributes']=_0x3e3b36,_0x753208=!0x0),!_0x753208)return Promise['resolve']();if(_0x5ee736['fire']('commentUpdated'),_0x21d6ec||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x550a3f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x42e905}=this['getCommentThread'](_0x4305c8['threadId']),_0x15ca52=_0x550a3f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x42e905,'threadId':_0x43deb1,'commentId':_0x3742a0,'content':_0x387c9a,'attributes':_0x3e3b36})['then'](()=>_0x550a3f['remove'](_0x15ca52))['catch'](_0x467b41=>{throw console['error'](_0x467b41),new _0x59fadc('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x51eb38,commentId:_0x34601b,isFromAdapter:_0xf884df}){const _0x59b97d=this['getCommentThread'](_0x51eb38),_0x5c0484=_0x59b97d['getComment'](_0x34601b);if(!_0x5c0484)throw new _0x59fadc('commentsrepository-remove-missing-comment',this);if(_0x59b97d['_remove'](_0x5c0484),_0xf884df||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xd0f215=this['context']['plugins']['get']('PendingActions'),{channelId:_0x33608f}=_0x59b97d,_0x1f33b9=_0xd0f215['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x33608f,'threadId':_0x51eb38,'commentId':_0x34601b})['then'](()=>_0xd0f215['remove'](_0x1f33b9))['catch'](_0x325fd0=>{throw console['error'](_0x325fd0),new _0x59fadc('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x4c5cf7,_0x3305c6){super();const _0x14e006=_0x3305c6['isResolvable'];this['channelId']=_0x3305c6['channelId'],this['id']=_0x3305c6['id'],this['comments']=new _0xeae5cd(),this['_repository']=_0x4c5cf7,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3305c6['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4c5cf7,'_permissions',_0x4c5cf7,'_readOnlyChannels',()=>_0x4c5cf7['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4c5cf7,'_permissions',()=>_0x4c5cf7['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4c5cf7,'_permissions',()=>{const _0x22336e=_0x4c5cf7['getPermissions'](this['channelId']);return _0x22336e['write']||_0x22336e['admin'];}),this['bind']('isResolvable')['to'](_0x4c5cf7,'_permissions',()=>_0x14e006&&_0x4c5cf7['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3305c6['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x38ad97,_0x22a47b)=>_0x38ad97?_0x22a47b?_0x38ad97<_0x22a47b?_0x38ad97:_0x22a47b:_0x38ad97:_0x22a47b),this['set']('unlinkedAt',_0x3305c6['unlinkedAt']||null),this['set']('resolvedAt',_0x3305c6['resolvedAt']||null),this['set']('resolvedBy',_0x3305c6['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x391a63=>!!_0x391a63),this['set']('attributes',_0x3305c6['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x1b3eea,_0x5d4fdc)=>_0x1b3eea+_0x5d4fdc['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0xbed12d,id:_0x1dad2b}=this;this['_repository']['fire'](ai('submitCommentThread',_0xbed12d),{'channelId':_0xbed12d,'threadId':_0x1dad2b});}setUnlinkedAt(_0x13c574){this['_update']({'unlinkedAt':_0x13c574});}['resolve']({resolvedAt:_0x868784=new Date(),resolvedBy:_0x492619='',isFromAdapter:_0x528f49=!0x1}={}){const _0x3ad340=this['_repository']['context']['plugins']['get'](_0x46e177)['me'],{channelId:_0x442932,id:_0x140046}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x442932),{'channelId':_0x442932,'threadId':_0x140046,'resolvedAt':_0x868784,'resolvedBy':_0x492619||_0x3ad340['id'],'isFromAdapter':_0x528f49});}['reopen']({isFromAdapter:_0x2dd53a=!0x1}={}){const {channelId:_0xe51c02,id:_0x2af41a}=this;this['_repository']['fire'](ai('reopenCommentThread',_0xe51c02),{'channelId':_0xe51c02,'threadId':_0x2af41a,'isFromAdapter':_0x2dd53a});}setContext(_0x1f21ac){this['context']||this['_update']({'context':_0x1f21ac});}setAttribute(_0xc0ffea,_0x46763d){const _0x58bbf0=_0x4c34d4(this['attributes']);_0x8c206d(_0x58bbf0,_0xc0ffea,_0x46763d),this['_update']({'attributes':_0x58bbf0});}removeAttribute(_0x21ba21){const _0x5629df=_0x4c34d4(this['attributes']);_0x4feec0(_0x5629df,_0x21ba21),this['_update']({'attributes':_0x5629df});}['remove']({isFromAdapter:_0x5bff4b=!0x1}={}){const {channelId:_0x1eb39f,id:_0x1e9e7c}=this;this['_repository']['fire'](ai('removeCommentThread',_0x1eb39f),{'channelId':_0x1eb39f,'threadId':_0x1e9e7c,'isFromAdapter':_0x5bff4b});}attachTo(_0x39187c){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x39187c});}addComment(_0x7984a4){const {channelId:_0x34f4c6,id:_0x2c6ff9}=this;this['_repository']['fire'](ai('addComment',_0x34f4c6,_0x2c6ff9),Object['assign']({'channelId':_0x34f4c6,'threadId':_0x2c6ff9},_0x7984a4));}getComment(_0x55ac27){if('string'!=typeof _0x55ac27)throw new _0x59fadc('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x55ac27});return this['comments']['get'](_0x55ac27);}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'](_0x3bea5e=>_0x3bea5e['toJSON']()),'attributes':this['attributes']};}['_add'](_0x994a6b){return this['listenTo'](_0x994a6b,'change:authoredAt',()=>{const _0x5e7f1f=this['_findOptimalIndex'](_0x994a6b),_0x3b07d1=this['comments'];_0x5e7f1f-0x1!=_0x3b07d1['getIndex'](_0x994a6b)&&_0x5e7f1f+0x1!=_0x3b07d1['getIndex'](_0x994a6b)&&(this['_remove'](_0x994a6b),this['_add'](_0x994a6b));}),this['comments']['add'](_0x994a6b,this['_findOptimalIndex'](_0x994a6b));}_update(_0x10ebf8){const {channelId:_0x47a533,id:_0x50bf52}=this;this['_repository']['fire'](ai('updateCommentThread',_0x47a533),{..._0x10ebf8,'channelId':_0x47a533,'threadId':_0x50bf52});}['_remove'](_0x253923){return this['stopListening'](_0x253923),_0x253923['destroy'](),this['comments']['remove'](_0x253923);}_findOptimalIndex(_0x1d3e33){const _0x3d1396=this['comments']['find'](_0x26edc0=>new Date(_0x26edc0['authoredAt'])['getTime']()>new Date(_0x1d3e33['authoredAt'])['getTime']());return _0x3d1396?this['comments']['getIndex'](_0x3d1396):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x26c0cd,_0xb7c449){super();const _0x38a3c0=_0x26c0cd['context']['plugins']['get'](_0x46e177)['me'],_0xaef80a=_0x26c0cd['getCommentThread'](_0xb7c449['threadId']),_0x3f48ca=0x0===_0xaef80a['comments']['length'],_0x27f43d=_0x38a3c0===_0xb7c449['author'];this['id']=_0xb7c449['id'],this['threadId']=_0xb7c449['threadId'],this['author']=_0xb7c449['author'],this['creator']=_0xb7c449['creator'],this['set']('content',_0xb7c449['content']),this['createdAt']=_0xb7c449['createdAt']||new Date(),this['set']('authoredAt',_0xb7c449['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xaef80a,'resolvedAt'),this['set']('attributes',_0xb7c449['attributes']||{}),this['bind']('isEditable')['to'](_0x26c0cd,'_permissions',()=>{const _0x574982=_0x26c0cd['getPermissions'](_0xaef80a['channelId'])['write'],_0x4d65a4=_0x26c0cd['getPermissions'](_0xaef80a['channelId'])['modifyAll'];return _0x27f43d&&_0x574982||!_0x27f43d&&_0x4d65a4;}),this['bind']('isRemovable')['to'](_0xaef80a,'isRemovable',_0x26c0cd,'_permissions',_0xa557f7=>{const _0x188001=_0x26c0cd['getPermissions'](_0xaef80a['channelId'])['write'],_0x8a1595=_0x26c0cd['getPermissions'](_0xaef80a['channelId'])['modifyAll'];return _0x27f43d&&_0x188001||_0xa557f7&&_0x3f48ca||!_0x27f43d&&_0x8a1595&&!_0x3f48ca;}),this['bind']('isReadOnly')['to'](_0xaef80a,'isReadOnly'),this['_repository']=_0x26c0cd;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x55a185){const _0x1dedf2=document['createElement']('div');return _0x1dedf2['innerHTML']=_0x55a185,_0x1dedf2['textContent']['length'];}(this['content']),0xc8);}update(_0x15410b){const {threadId:_0x528617,id:_0x430122}=this;if(!this['_repository']['hasCommentThread'](_0x528617))throw new _0x59fadc('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x449f2c}=this['_repository']['getCommentThread'](_0x528617);this['_repository']['fire'](ai('updateComment',_0x449f2c,_0x528617),{'channelId':_0x449f2c,'threadId':_0x528617,'commentId':_0x430122,..._0x15410b});}setAttribute(_0x261fee,_0x32b115){const _0x3fff49=_0x4c34d4(this['attributes']);_0x8c206d(_0x3fff49,_0x261fee,_0x32b115),this['update']({'attributes':_0x3fff49});}removeAttribute(_0x5da327){const _0x52403b=_0x4c34d4(this['attributes']);_0x4feec0(_0x52403b,_0x5da327),this['update']({'attributes':_0x52403b});}['remove'](_0x8aa851={}){if(!_0x8aa851['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x489293,id:_0xbc600e}=this;if(!this['_repository']['hasCommentThread'](_0x489293))throw new _0x59fadc('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xfafd3e}=this['_repository']['getCommentThread'](_0x489293);this['_repository']['fire'](ai('removeComment',_0xfafd3e,_0x489293),{'channelId':_0xfafd3e,'threadId':_0x489293,'commentId':_0xbc600e,..._0x8aa851});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x46f2b5,..._0x245125){for(const _0x2d05c8 of _0x245125)void 0x0!==_0x2d05c8&&(_0x46f2b5+=':'+String(_0x2d05c8));return _0x46f2b5;}var ci=class extends _0x254461{constructor(_0x2b54a9){super(_0x2b54a9),this['set']('hasContent',!0x1);}['refresh'](){const _0x368cbf=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5e2e5e of _0x368cbf['getRanges']())if(this['_hasContent'](_0x5e2e5e))return void(this['hasContent']=!0x0);}execute({threadId:_0x39027c=_0x144583(),ranges:_0x12de7e,comment:_0x8fc196}={}){const _0x2be287=this['editor']['model'],_0x201e9a=_0x12de7e??Array['from'](_0x2be287['document']['selection']['getRanges']()),_0x507e08=[];for(const _0x5657be of _0x201e9a)this['_hasContent'](_0x5657be)&&_0x507e08['push'](this['_trimToContent'](_0x5657be));if(!_0x507e08['length'])throw new _0x59fadc('addcommentthreadcommand-incorrect-ranges',null);_0x8fc196&&this['_createCommentThread'](_0x39027c,_0x8fc196),this['_createMarkersFromRanges'](_0x39027c,_0x507e08,!!_0x8fc196);}_createMarkersFromRanges(_0x532025,_0x12d173,_0x1778fa){this['editor']['model']['change'](_0x335950=>{for(const _0x406ca7 of _0x12d173){const _0x389965='comment:'+_0x532025+':'+_0x144583()['substr'](0x1,0x5);_0x335950['addMarker'](_0x389965,{'range':_0x406ca7,'usingOperation':_0x1778fa,'affectsData':_0x1778fa});}});}_createCommentThread(_0x284a1c,_0xc95409){const _0x1406c3=this['editor']['plugins']['get']('CommentsRepository'),_0x18a5ea=this['editor']['config']['get']('collaboration.channelId'),_0x55df5a=this['editor']['plugins']['get']('Users')['me'];if(!_0x55df5a)throw new _0x59fadc('addcommentthreadcommand-user-not-found',null);_0x1406c3['addCommentThread']({'threadId':_0x284a1c,'channelId':_0x18a5ea,'comments':[{'authorId':_0x55df5a['id'],'content':_0xc95409,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x2169fc){for(const _0x8afbc of _0x2169fc['getItems']())if(this['_itemIsContent'](_0x8afbc))return!0x0;return!0x1;}_itemIsContent(_0x41ec94){return _0x41ec94['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x41ec94)&&!_0x41ec94['is']('element','tableCell');}_trimToContent(_0x154610){const _0x19cd40=_0x4b5c31=>!this['_itemIsContent'](_0x4b5c31['item']),_0x17f726=_0x154610['start']['getLastMatchingPosition'](_0x19cd40),_0x1b51c4=_0x154610['end']['getLastMatchingPosition'](_0x19cd40,{'direction':'backward'});return this['editor']['model']['createRange'](_0x17f726,_0x1b51c4);}},di=class extends _0x36d238{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1013aa){super(_0x1013aa),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x2f6ea5=this['editor'],_0x4169d7=_0x2f6ea5['model']['document']['selection'],_0x37c25d=_0xd4e18c(()=>this['refreshSelectedViews'](),0xa);_0x4169d7['on']('change:range',(_0x2a17cb,_0x51378a)=>{_0x51378a['directChange']&&(_0x37c25d['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2f6ea5['editing']['view']['document'],'change:isFocused',(_0x5b7fb3,_0x35d802,_0x301dc9)=>{_0x301dc9&&_0x37c25d();}),this['listenTo'](_0x2f6ea5['ui']['focusTracker'],'change:isFocused',(_0x447b35,_0x234966,_0x25eaf0)=>{_0x25eaf0||this['fire']('blur',{'isAnnotationTracked':_0x44df6a=>this['_editorAnnotationsData']['has'](_0x44df6a['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0xce5702){if(this['_editorAnnotations']['has'](_0xce5702['view']))return;this['_editorAnnotations']['add'](_0xce5702['view']),this['editor']['ui']['focusTracker']['add'](_0xce5702['view']['element']);const _0xa3592c=this['editor']['plugins']['get'](ti);this['listenTo'](_0xa3592c['collection'],'remove',(_0x1a2735,_0x3ba7cf)=>{this['editor']['ui']['focusTracker']['remove'](_0x3ba7cf['view']['element']),this['_editorAnnotations']['delete'](_0x3ba7cf['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x4fa3f6){if('function'!=typeof _0x4fa3f6)throw new _0x59fadc('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4fa3f6);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x17abd1,annotations:_0xcd79b2}){const _0x58c45b=[],_0x5b22d5=this['editor']['model']['document']['selection'],_0xda02e1=Array['from'](_0x5b22d5['getRanges']());for(const [_0x40098e,_0x199566]of this['_editorAnnotationsData']){const _0x59aeca=_0x8e28b4(_0x199566),_0x5e2594=_0xcd79b2['getByInnerView'](_0x40098e);_0x59aeca&&_0x5e2594&&_0x58c45b['push']({'annotation':_0x5e2594,'range':_0x59aeca});}function _0x8e28b4(_0x2aec56){for(const _0x10c0a5 of _0x2aec56)for(const _0x5e8fd9 of _0xda02e1)if(_0x10c0a5['containsRange'](_0x5e8fd9,!_0x5b22d5['isCollapsed']))return _0x10c0a5;return null;}const _0x1fb696=new Map(Array['from'](_0xcd79b2,(_0x481eaf,_0x1befd6)=>[_0x481eaf,_0x1befd6]));return _0x58c45b['sort']((_0x3fe0cd,_0x1426af)=>{const _0x57b892=_0x3fe0cd['range'],_0x334162=_0x1426af['range'];if(!_0x57b892['isEqual'](_0x334162)){if(_0x57b892['containsRange'](_0x334162,!0x0))return 0x1;if(_0x334162['containsRange'](_0x57b892,!0x0))return-0x1;}return _0x3fe0cd['annotation']==_0x17abd1?-0x1:_0x1426af['annotation']==_0x17abd1?0x1:(_0x1fb696['get'](_0x3fe0cd['annotation'])??0x0)-(_0x1fb696['get'](_0x1426af['annotation'])??0x0);})['map'](_0x2c85df=>_0x2c85df['annotation']);}get _editorAnnotationsData(){const _0x3510c4=new Map();for(const _0x58945e of Array['from'](this['_dataCollectors']))for(const [_0x581218,_0x509557]of _0x58945e())_0x3510c4['set'](_0x581218,_0x509557);return _0x3510c4;}},li=class extends _0x36d238{afterInit(){const _0x51ad1a=this['editor'];_0x51ad1a['plugins']['has']('RestrictedEditingModeEditing')&&_0x51ad1a['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x36d238{constructor(_0xf21fc8){super(_0xf21fc8),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x9b75d5=this['editor'],_0x21f11f=_0x9b75d5['commands']['get']('importWord'),_0x21bf46=_0x9b75d5['plugins']['get'](_0x46e177);_0x21f11f&&(_0x21f11f['on']('execute',(_0x422a38,[,_0x147bcd])=>{_0x147bcd['collaboration_features']={'comments':!0x0,'user_id':_0x21bf46['me']['id']};},{'priority':_0x130a0b['high']+0xa}),this['listenTo'](_0x21f11f,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0xbf9465,_0x344ebd){const {comment_threads:_0x8f230b}=_0x344ebd;_0x8f230b&&_0x8f230b['forEach'](({thread_id:_0x3eb6ea,comments:_0x211bf9,is_resolved:_0x3063b7})=>{const _0x548d32=new Date(),_0xdcc23e=_0x211bf9['map'](({author:_0x32a1e6,content:_0x3c3bef,created_at:_0x1a71d5})=>({'content':_0x3c3bef,'authorId':this['editor']['plugins']['get'](_0x46e177)['me']['id'],'createdAt':_0x548d32,'attributes':{'@external':{'authorName':_0x32a1e6,'createdAt':_0x1a71d5?new Date(_0x1a71d5):new Date(),'source':'importWord'}}})),_0x1c6f4d=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x1c6f4d,'threadId':_0x3eb6ea,'comments':_0xdcc23e,'resolvedAt':_0x3063b7?_0x548d32:null});});}},ui=class extends _0x36d238{constructor(_0xe40d24){super(_0xe40d24),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x1c5f82=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1c5f82,'contentInsertion',(_0x340ba7,_0x2fc2c7)=>this['_removeMarkersWithoutThreads'](_0x2fc2c7['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x5ab4e8){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5ab4e8;const _0x185983=this['editor']['plugins']['get']('CommentsRepository');for(const _0x455e7c of _0x5ab4e8['keys']()){const [_0x7c8b07,_0x4db7c1]=_0x455e7c['split'](':');'comment'!=_0x7c8b07||_0x185983['hasCommentThread'](_0x4db7c1)||_0x5ab4e8['delete'](_0x455e7c);}return _0x5ab4e8;}_registerMarkerInClipboardPipeline(){const _0x101ce2=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x12602a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x12602a&&_0x101ce2['_registerMarkerToCopy']('comment',_0x12602a);}_mapCommentsCopyConfigToRegisterConfiguration(_0xbd82b5){switch(_0xbd82b5){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x3977dd){const _0x1b4e3a=_0x3977dd['split'](':');return{'group':_0x1b4e3a[0x0],'id':_0x1b4e3a[0x1],'part':_0x1b4e3a[0x2]};}var pi=class extends _0x36d238{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x476697,_0x359be4)=>{if(!_0x359be4['options']['showCommentHighlights'])return null;if(_0x359be4['options']['ignoreResolvedComments']){const {id:_0x1e6aa2}=fi(_0x476697['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1e6aa2)?.['isResolved']&&_0x476697['item'])return _0x359be4['consumable']['consume'](_0x476697['item'],'addMarker:'+_0x476697['markerName']),_0x359be4['consumable']['consume'](_0x476697['item'],'removeMarker:'+_0x476697['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5e3c1b=>{_0x5e3c1b['on']('addMarker:comment',(_0x463c7c,_0x5142a1,_0x3ea732)=>{if(!_0x3ea732['options']['showCommentHighlights'])return;const _0x79ff8f=_0x5142a1['item'];if(!_0x79ff8f)return;const _0x2c8871=_0x3ea732['mapper']['toViewElement'](_0x79ff8f);this['editor']['model']['schema']['isObject'](_0x79ff8f)&&_0x2c8871&&!_0x2c8871['getCustomProperty']('widget')&&_0x2c8871['is']('containerElement')&&Ct(_0x2c8871,_0x3ea732['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5e42c1,{writer:_0x4319c8,options:_0x1a2fa7})=>{if(!_0x1a2fa7['showCommentHighlights'])return null;const _0x4fd349=_0x4319c8['createContainerElement']('div'),_0x42ffea=_0x4319c8['createEmptyElement']('hr');return _0x4319c8['addClass']('ck-horizontal-line',_0x4fd349),_0x4319c8['insert'](_0x4319c8['createPositionAt'](_0x4fd349,0x0),_0x42ffea),_0x4fd349;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2fb1f4,{writer:_0x317c52,options:_0x2716cd})=>{if(!_0x2716cd['showCommentHighlights'])return null;const _0xccb704=_0x317c52['createContainerElement']('span'),_0x55fc92=_0x317c52['createEmptyElement']('img');return _0x317c52['addClass']('image-inline',_0xccb704),_0x317c52['insert'](_0x317c52['createPositionAt'](_0xccb704,0x0),_0x55fc92),_0xccb704;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5bef04,{writer:_0x40734e,options:_0x42c741})=>{if(_0x42c741['showCommentHighlights'])return _0x40734e['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2fc58d,_0x20d289,_0x475d5a)=>{_0x475d5a['options']['showCommentHighlights']&&_0x2fc58d['stop']();},{'priority':'high'});}},wi=class extends _0x36d238{static get requires(){return[oi,di,_0x46e177,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x331218){super(_0x331218),this['set']('isThreadsLoadingPaused',!0x0),_0x331218['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2bbeec,_0x271f7f,_0x538062,_0x37f4a9)=>{const _0x251abe=_0x331218['plugins']['get'](oi),_0x4c6220=_0x538062?fi(_0x538062)['id']:null;_0x331218['model']['change'](()=>{if(_0x4c6220){const _0x3c4700=this['getAllMarkersForId'](_0x4c6220);for(const _0x1e0e26 of _0x3c4700)_0x331218['editing']['reconvertMarker'](_0x1e0e26);}if(_0x37f4a9){const {id:_0x24d1f2}=fi(_0x37f4a9),_0x30a4d9=_0x251abe['getCommentThread'](_0x24d1f2);if(_0x30a4d9&&_0x30a4d9['unlinkedAt'])return;if(_0x30a4d9&&!_0x30a4d9['isAttached'])return;const _0x15e80c=this['getAllMarkersForId'](_0x24d1f2);for(const _0x3e284e of _0x15e80c)_0x331218['editing']['reconvertMarker'](_0x3e284e);}}),_0x4c6220&&this['scrollToThreadMarker'](_0x4c6220);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x46ed1c=this['editor'],_0xfdec3f=_0x46ed1c['plugins']['get'](oi),_0x55447e=_0x46ed1c['config']['get']('collaboration.channelId'),_0x5295b2=_0xfdec3f['getCommentThreads']()['filter'](_0x20f364=>_0x20f364['channelId']!==_0x55447e);_0x46ed1c['commands']['add']('addCommentThread',new ci(_0x46ed1c)),this['listenTo'](_0x46ed1c,'change:isReadOnly',(_0x1de9e9,_0xfd42c3,_0x2a21ab)=>{_0xfdec3f['switchReadOnly'](_0x2a21ab,_0x46ed1c['config']['get']('collaboration.channelId'));}),this['listenTo'](_0xfdec3f,gi('addCommentThread',_0x55447e),(_0x11c2a6,{threadId:_0x2ba799})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2ba799)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2ba799);}),this['listenTo'](_0xfdec3f,gi('removeCommentThread',_0x55447e),(_0xa65a54,{threadId:_0x154958})=>{_0x46ed1c['model']['enqueueChange']({'isUndoable':!0x1},_0x4b1162=>{const _0x3d990d=this['getAllMarkersForId'](_0x154958);for(const _0x183d72 of _0x3d990d)_0x4b1162['removeMarker'](_0x183d72);});}),this['listenTo'](_0xfdec3f,gi('resolveCommentThread',_0x55447e),(_0x27bc1c,{threadId:_0x1f3126})=>{this['_reconvertMarkers'](_0x1f3126);const _0x2c0118=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x2c0118['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1f3126)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0xfdec3f,gi('reopenCommentThread',_0x55447e),(_0x50de4a,{threadId:_0x230525})=>{this['_reconvertMarkers'](_0x230525);},{'priority':'low'}),this['listenTo'](_0xfdec3f,gi('addComment',_0x55447e),(_0x17cc46,{threadId:_0x10f4d0,isFromAdapter:_0x84ecc})=>{const _0x3b60ba=this['getAllMarkersForId'](_0x10f4d0);!_0x84ecc&&0x0!=_0x3b60ba['length']&&_0xfdec3f['hasCommentThread'](_0x10f4d0)&&0x1===_0xfdec3f['getCommentThread'](_0x10f4d0)['length']&&_0x46ed1c['model']['enqueueChange']({'isUndoable':!0x1},_0x1a998d=>{for(const _0x4db0cc of _0x3b60ba)_0x1a998d['updateMarker'](_0x4db0cc,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5295b2);}afterInit(){!async function(_0x53f7c1){const _0x5a084c='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x314196=0x79470,_0x25f063={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x5bbc2c(_0x253243){const _0x162434=new window['Promise'](_0x498611=>{_0x253243['once']('ready',_0x498611);}),_0x56b695=window['Date']['now'](),_0x38e1b5=_0x253243['config']['get']('licenseKey');async function _0x1ce4ad(){let _0xefdaf3,_0x1c7ccf=null,_0x2eaf91=null;try{return'GPL'==_0x38e1b5?'NotAllowed':(_0xefdaf3=_0x18b4d1(),_0xefdaf3?(_0xefdaf3['usageEndpoint']&&(_0x2eaf91=_0x196a2e(_0xefdaf3['usageEndpoint'],_0xefdaf3['jti'])),await _0x1d0d7f()?_0x173213()?_0x6d78bb()?'Expired':_0x5afcab()?('evaluation'==_0xefdaf3['licenseType']&&(_0x1c7ccf=_0x32e093('EvaluationLimit')),await _0xb367a4()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x6d78bb(){const _0x2a60fd=['evaluation','trial']['includes'](_0xefdaf3['licenseType'])?_0x56b695/0x3e8:0xe10*_0x314196;return _0xefdaf3['exp']<_0x2a60fd;}function _0x173213(){const _0x32f50a=_0xefdaf3['features'];if(!_0x32f50a)return!0x1;if(_0x32f50a['includes']('*'))return!0x0;if(_0x32f50a['includes']('CMT'))return!0x0;if(_0x32f50a['includes']('TRILIUM')&&_0xf92540())return!0x0;if(_0x32f50a['includes']('RCMT')){if(_0xb207b6())return!0x0;if(_0x414ede()||_0x30485b())return!0x0;}return!0x1;}function _0x5afcab(){const _0x3acc27=_0xefdaf3['licensedHosts'];if(!_0x3acc27||0x0==_0x3acc27['length'])return!0x0;const {hostname:_0x5ae5cc}=new URL(window['location']['href']);if(_0x3acc27['includes'](_0x5ae5cc))return!0x0;const _0x1976bd=_0x5ae5cc['split']('.');return _0x3acc27['filter'](_0x1f7093=>_0x1f7093['includes']('*'))['map'](_0x50a91b=>_0x50a91b['split']('.'))['filter'](_0x44227e=>_0x44227e['length']<=_0x1976bd['length'])['map'](_0x40cdb8=>Array(_0x1976bd['length']-_0x40cdb8['length'])['fill']('*'===_0x40cdb8[0x0]?'*':'')['concat'](_0x40cdb8))['some'](_0x5aaf1f=>_0x1976bd['every']((_0x5cabdd,_0x5845fb)=>_0x5aaf1f[_0x5845fb]===_0x5cabdd||'*'===_0x5aaf1f[_0x5845fb]));}function _0xb367a4(){return _0x1c7ccf&&_0x2eaf91?new window['Promise']((_0x5bfeb8,_0x70cdef)=>{_0x1c7ccf['then'](_0x5bfeb8,_0x70cdef),_0x2eaf91['then'](_0x15bf6b=>{'Valid'!=_0x15bf6b&&_0x5bfeb8(_0x15bf6b);},_0x70cdef);}):_0x1c7ccf||_0x2eaf91||'Valid';}}function _0x196a2e(_0xc313b0,_0x3fdcde){return new window['Promise'](_0x281c86=>{if(_0x346e66())return _0x281c86('Valid');_0x10a245(),_0x253243['decorate']('_sendUsageRequest');let _0x36700f=!0x1;const _0x5eeefe=_0x144583();function _0x4083cd(_0x5576b6){return!!_0x5576b6&&('object'==typeof _0x5576b6||'function'==typeof _0x5576b6)&&'function'==typeof _0x5576b6['then']&&'function'==typeof _0x5576b6['catch'];}function _0x476f92(_0x544e13){_0x23c9db(_0x544e13)['then'](_0x6570c2=>_0x6570c2&&'ok'==_0x6570c2['status']?_0x42f4a5(_0x1a002f(_0x5eeefe+_0x3fdcde))!=_0x6570c2['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4fdda5=>(_0xb775c4(),_0x4fdda5),()=>{const _0x5e428f=_0x5179f7();return null==_0x5e428f?(_0xb775c4(),'Valid'):_0x56b695-_0x5e428f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x281c86)['catch'](()=>{_0x281c86('UsageLimit');});const _0x172ee2=0x36ee80;function _0xb775c4(){const _0x428207='llct-'+_0x42f4a5(_0x1a002f(_0xc313b0)),_0xd968d8=_0x6de1a1(_0x42f4a5(window['Math']['ceil'](_0x56b695/_0x172ee2)));window['localStorage']['setItem'](_0x428207,_0xd968d8);}function _0x5179f7(){const _0xa5fe3e='llct-'+_0x42f4a5(_0x1a002f(_0xc313b0)),_0x3f93e5=window['localStorage']['getItem'](_0xa5fe3e);return _0x3f93e5?window['parseInt'](_0x6de1a1(_0x3f93e5),0x10)*_0x172ee2:null;}function _0x23c9db(_0x44f6ce){return new window['Promise']((_0x4c6479,_0x4b8fcc)=>{_0x44f6ce['then'](_0x4c6479,_0x4b8fcc),window['setTimeout'](_0x4b8fcc,0x1d4c0);});}}_0x253243['on']('_sendUsageRequest',(_0x1c6bf2,_0x591f01)=>{if(_0x591f01[0x0]!=_0xc313b0)return _0x281c86('UsageLimit');_0x591f01[0x1]={..._0x591f01[0x1],'requestId':_0x5eeefe};},{'priority':'high'}),_0x253243['on']('_sendUsageRequest',_0x577dec=>{_0x4083cd(_0x577dec['return'])&&(_0x36700f=!0x0,_0x476f92(_0x577dec['return']));},{'priority':'low'}),_0x162434['then'](()=>{_0x36700f||_0x281c86('UsageLimit');});});function _0x346e66(){return'auto'==_0x253243['editing']['view']['_overlayModeHint'];}function _0x10a245(){_0x253243['editing']['view']['_overlayModeHint']='auto';}}function _0x32e093(_0x14fa5d){const _0x5d6fe6=[new window['Promise'](_0x4315b4=>setTimeout(_0x4315b4,0x93ecc)),_0x162434['then'](()=>new window['Promise'](_0xd16b0f=>{let _0x3c240b=0x0;_0x253243['model']['on']('applyOperation',(_0x4bc488,_0x1b555d)=>{_0x1b555d[0x0]['isDocumentOperation']&&_0x3c240b++,0x5e8==_0x3c240b&&(_0xd16b0f(),_0x4bc488['off']());});}))];return window['Promise']['race'](_0x5d6fe6)['then'](()=>_0x14fa5d);}async function _0x3c70fd(){await _0x162434,_0x253243['model']['change']=_0x228139,_0x253243['model']['enqueueChange']=_0x228139,_0x253243['enableReadOnlyMode']('model');}function _0xf92540(){return window['glob']&&window['glob']['triliumVersion'];}function _0xb207b6(){return _0x2903c9('WebSocketGateway')&&'connected'==_0x340431('WebSocketGateway')['state'];}function _0x414ede(){return _0x2903c9('RevisionViewerIntegration');}function _0x30485b(){return _0x2903c9('TrackChangesDataGetter');}function _0x273c29(_0x16c0ea){const _0xd9a922=_0x563fdf();_0x253243[_0xd9a922]='commentsLicenseKey'+_0x16c0ea,'Valid'!=_0x16c0ea&&_0x3c70fd();}function _0x563fdf(){const _0x143784=window['String'](window['performance']['now']())['replace']('.','');let _0xc23692='m';for(let _0x3dd13b=0x0;_0x3dd13b<_0x143784['length'];_0x3dd13b+=0x2){let _0x4042da=window['parseInt'](_0x143784['substring'](_0x3dd13b,_0x3dd13b+0x2));_0x4042da>=0x3e&&(_0x4042da-=0x3e),_0xc23692+=_0x5a084c[_0x4042da];}return _0xc23692;}function _0x18b4d1(){const _0x5d60be=_0x38e1b5['split']('.');if(0x3!=_0x5d60be['length'])return null;return _0x194073(_0x5d60be[0x1]);function _0x194073(_0x149249){const _0x4b83c9=_0x4ff6c3(_0x149249);return _0x4b83c9&&_0x534b62()?_0x4b83c9:null;function _0x534b62(){const _0xad32f9=_0x4b83c9['jti'],_0x272401=window['parseInt'](_0xad32f9['substring'](_0xad32f9['length']-0x8),0x10),_0x43bc5a={..._0x4b83c9,'jti':_0xad32f9['substring'](0x0,_0xad32f9['length']-0x8)};return delete _0x43bc5a['vc'],_0x1a002f(_0x43bc5a)==_0x272401;}}}async function _0x1d0d7f(){let _0x26d71d=!0x0;try{const [_0x2738cb,_0x536ab8,_0x3d9966]=_0x38e1b5['split']('.');return _0x29f972(_0x2738cb),await _0x238abe(_0x2738cb,_0x536ab8,_0x3d9966),_0x26d71d;}catch{return!0x1;}function _0x29f972(_0x125315){const _0x482cb8=_0x4ff6c3(_0x125315);_0x482cb8&&'ES256'==_0x482cb8['alg']||(_0x26d71d=!0x1);}async function _0x238abe(_0x1af640,_0x1f0a92,_0x1317ae){const _0x25fed7=window['Uint8Array']['from'](_0x3a8e31(_0x1317ae),_0x183fa0=>_0x183fa0['charCodeAt'](0x0)),_0x379272=new window['TextEncoder']()['encode'](_0x1af640+'.'+_0x1f0a92),_0x4d4059=window['crypto']['subtle'];if(!_0x4d4059)return;const _0x3e8064=await _0x4d4059['importKey']('jwk',_0x25f063,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4d4059['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3e8064,_0x25fed7,_0x379272)||(_0x26d71d=!0x1);}}function _0x4ff6c3(_0x45e4fc){return _0x45e4fc['startsWith']('ey')?JSON['parse'](_0x3a8e31(_0x45e4fc)):null;}function _0x3a8e31(_0x54012e){return window['atob'](_0x54012e['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1a002f(_0x3ea5c5){let _0x8272e7=0x1505;function _0x2016a5(_0x3f73a6){for(let _0x56b947=0x0;_0x56b947<_0x3f73a6['length'];_0x56b947++){const _0x480748=_0x3f73a6['charCodeAt'](_0x56b947);_0x8272e7=(_0x8272e7<<0x5)+_0x8272e7+_0x480748,_0x8272e7&=_0x8272e7;}}function _0x525c66(_0xa7f484){Array['isArray'](_0xa7f484)?_0xa7f484['forEach'](_0x525c66):_0xa7f484&&'object'==typeof _0xa7f484?Object['entries'](_0xa7f484)['sort']()['forEach'](([_0x817c5e,_0x296492])=>{_0x2016a5(_0x817c5e),_0x525c66(_0x296492);}):_0x2016a5(window['String'](_0xa7f484));}return _0x525c66(_0x3ea5c5),_0x8272e7>>>0x0;}function _0x42f4a5(_0x144487){return _0x144487['toString'](0x10)['padStart'](0x8,'0');}function _0x6de1a1(_0x12c3ba){return _0x12c3ba['split']('')['reverse']()['join']('');}function _0x2903c9(_0x3d76da){return _0x253243['plugins']['has'](_0x3d76da);}function _0x340431(_0x12abcc){return _0x253243['plugins']['get'](_0x12abcc);}function _0x228139(){}_0x273c29(await _0x1ce4ad());}_0x5bbc2c(_0x53f7c1['editor']);}(this);}destroy(){const _0x395693=this['editor']['plugins']['get'](oi),_0x5934db=this['editor']['config']['get']('collaboration.channelId');for(const _0x159cd9 of _0x395693['getCommentThreads']({'channelId':_0x5934db}))_0x395693['_detachCommentThread'](_0x159cd9['id']),_0x395693['_threads']['delete'](_0x159cd9['id']);super['destroy']();}['hasMarkerForId'](_0x4dd7b4){return this['getAllMarkersForId'](_0x4dd7b4)['length']>0x0;}getAllMarkersForId(_0x1fa15c){const _0x1b652d=[];for(const _0x2e8bee of this['editor']['model']['markers'])_0x2e8bee['name']['startsWith']('comment:'+_0x1fa15c)&&_0x1b652d['push'](_0x2e8bee);return _0x1b652d;}['scrollToThreadMarker'](_0xb107aa){setTimeout(()=>{const _0x4e4660=this['_getTargetForId'](_0xb107aa);_0x4e4660&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0xb107aa&&_0x3dd6c4({'target':_0x4e4660[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x1840d9){this['editor']['model']['change'](()=>{for(const _0x52749f of this['getAllMarkersForId'](_0x1840d9))this['editor']['editing']['reconvertMarker'](_0x52749f);});}_attachArchivedThread(_0x998f5a){const _0x3bd0cf=this['editor']['plugins']['get'](oi),_0x34d32f=this['editor']['plugins']['get'](di),_0x2d8558=_0x3bd0cf['getCommentThread'](_0x998f5a);if(!_0x2d8558['isAttached']){const _0x23379d=_0x2d8558['attachTo'](()=>this['_getTargetForId'](_0x2d8558['id']));_0x34d32f['registerAnnotation'](_0x23379d),_0x2d8558['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x180b4c=this['editor'],_0x108459=_0x180b4c['plugins']['get'](_0x46e177);_0x180b4c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x58ccf8,_0x588e50)=>{const {id:_0x245d79}=fi(_0x58ccf8['markerName']),_0xa250bb=_0x180b4c['plugins']['get'](oi)['getCommentThread'](_0x245d79),_0x28b276=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x245d79;let _0x351df8;if(_0xa250bb&&_0xa250bb['isResolved']&&!_0x28b276&&_0x58ccf8['item'])return _0x588e50['consumable']['consume'](_0x58ccf8['item'],'addMarker:'+_0x58ccf8['markerName']),_0x588e50['consumable']['consume'](_0x58ccf8['item'],'removeMarker:'+_0x58ccf8['markerName']),null;const _0x55eac3=['ck-comment-marker'];return _0x28b276&&_0x55eac3['push']('ck-comment-marker--active'),_0x351df8=_0xa250bb?.['length']?_0xa250bb['comments']['first']['author']['id']:_0x108459['me']['id'],{'classes':_0x55eac3,'attributes':{'data-comment':_0x245d79,'data-author-id':_0x351df8}};}}),_0x180b4c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2ea714,{options:_0x1d67af})=>{if(_0x1d67af['showCommentHighlights'])return null;const _0xad6fe3=_0x180b4c['plugins']['get'](oi),_0x1adba4=_0x180b4c['model']['markers']['get'](_0x2ea714),{id:_0x68c8ad,part:_0xeca8a0}=fi(_0x2ea714);return _0x1adba4&&!_0x1adba4['affectsData']||_0x1d67af['ignoreResolvedComments']&&_0xad6fe3['getCommentThread'](_0x68c8ad)?.['isResolved']?null:{'group':'comment','name':_0xeca8a0?_0x68c8ad+':'+_0xeca8a0:_0x68c8ad};}}),_0x180b4c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2a5f1a,{writer:_0xd90fc4})=>_0xd90fc4['createElement']('$marker',{'data-name':'comment:'+_0x2a5f1a['getAttribute']('id')})}),_0x180b4c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3f63b5=this['editor'],_0xcf4974=_0x3f63b5['plugins']['get'](oi),_0x549ad0=new Set(),_0xe0d2b7=new Set();_0x3f63b5['model']['document']['registerPostFixer'](_0x4ae8ab=>{let _0x6c46b1=!0x1;for(const {name:_0x2c752a,data:_0x328bc0}of _0x3f63b5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3e5bb4,id:_0x2769d2}=fi(_0x2c752a);let _0x4e6a69=_0x328bc0['newRange'];if('comment'!==_0x3e5bb4||!_0x4e6a69)continue;const _0x3dec51='$graveyard'===_0x4e6a69['root']['rootName'];_0x3dec51||(_0x4e6a69=_i(_0x4e6a69,_0x3f63b5['model']),!_0x4e6a69||_0x4e6a69['isCollapsed']||!_0x328bc0['newRange']||_0x4e6a69['isEqual'](_0x328bc0['newRange']))?_0x3f63b5['model']['hasContent'](_0x4e6a69)&&!_0x3dec51?this['isThreadsLoadingPaused']?_0x549ad0['add'](_0x2c752a):this['_handleThreadMarker'](_0x2c752a,_0x2769d2):(_0xe0d2b7['add'](_0x2c752a),_0x549ad0['delete'](_0x2c752a),_0x4ae8ab['removeMarker'](_0x2c752a),_0x6c46b1=!0x0):(_0x4ae8ab['updateMarker'](_0x2c752a,{'range':_0x4e6a69}),_0x6c46b1=!0x0);}return _0x6c46b1;}),this['on']('change:isThreadsLoadingPaused',(_0x4fcd22,_0x2373b4,_0x1e0dc4)=>{if(!_0x1e0dc4&&_0x549ad0['size'])for(const _0x49c722 of _0x549ad0){const {id:_0xf392c3}=fi(_0x49c722);_0x549ad0['delete'](_0x49c722),_0x3f63b5['model']['markers']['get'](_0x49c722)&&this['_handleThreadMarker'](_0x49c722,_0xf392c3);}}),this['listenTo'](_0x3f63b5['model']['document'],'change',()=>{for(const {name:_0x1a4abc,data:{newRange:_0x4dd63b}}of _0x3f63b5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5365e2,id:_0xbd1a76}=fi(_0x1a4abc);if('comment'!==_0x5365e2)continue;const _0x1e3db1=_0xcf4974['getCommentThread'](_0xbd1a76),_0x362e1e=this['hasMarkerForId'](_0xbd1a76);_0x1e3db1&&(!_0x1e3db1['_hasTargetInContent']&&_0x4dd63b&&_0x3f63b5['editing']['view']['once']('render',()=>{const _0x1f9466=_0x3f63b5['plugins']['get'](ti),_0x140a9d=_0xcf4974['_threadToController']['get'](_0x1e3db1)['view'];_0x1f9466['getByInnerView'](_0x140a9d)['refreshVisibility']();},{'priority':'low'}),_0x1e3db1['_hasTargetInContent']=_0x362e1e||!!_0x4dd63b),_0x4dd63b||(_0xe0d2b7['add'](_0x1a4abc),_0x549ad0['delete'](_0x1a4abc));}for(const _0x371ef1 of _0xe0d2b7){const {id:_0x258545}=fi(_0x371ef1),_0x5a246c=_0xcf4974['getCommentThread'](_0x258545);if(_0x549ad0['delete'](_0x371ef1),!_0x5a246c)continue;const _0x323eaf=this['hasMarkerForId'](_0x258545);_0x323eaf||_0x5a246c['isSubmitted']?_0x323eaf||_0x5a246c['unlinkedAt']||_0x5a246c['setUnlinkedAt'](new Date()):_0x5a246c['remove']();}_0xe0d2b7['clear']();});}_handleInitialThreads(_0x374229){_0x374229['forEach'](_0x2d8c1b=>{_0x2d8c1b['unlinkedAt']&&this['_attachArchivedThread'](_0x2d8c1b['id']);});}_getTargetForId(_0xdf22fc){const _0x39258a=this['editor'],_0x4728a1=this['getAllMarkersForId'](_0xdf22fc);return _0x3b4bee(_0x39258a['editing'],_0x4728a1);}_getTextContext(_0x2d8c58){const _0x2bc954=this['getAllMarkersForId'](_0x2d8c58);let _0x5d431c='',_0x776e05=!0x1;for(const _0x43ea60 of _0x2bc954){const _0x53b51b=_0x43ea60['getRange']();for(const _0x22d011 of Array['from'](_0x53b51b['getItems']()))_0x22d011['is']('$textProxy')?(_0x5d431c&&_0x776e05&&(_0x5d431c+='\x20',_0x776e05=!0x1),_0x5d431c+=_0x22d011['data']):_0x776e05=!0x0;_0x776e05=!0x0;}return _0x5d431c['substring'](0x0,0x96);}_attachMarkerToThread(_0xf6bd3c,_0x5608ce){const _0x3e4757=this['editor'],_0x9d4e4=_0x3e4757['plugins']['get'](oi);let _0x1c545f=_0x9d4e4['getCommentThread'](_0x5608ce);const _0x2026eb=_0x3e4757['config']['get']('collaboration.channelId'),_0x1428c6=_0x3e4757['plugins']['get'](di);return _0x1c545f&&(_0x1c545f['unlinkedAt']&&_0x1c545f['setUnlinkedAt'](null),_0x1c545f['isAttached'])||(this['getAllMarkersForId'](_0x5608ce)[0x0]['managedUsingOperations']?_0x9d4e4['fetchCommentThread']({'channelId':_0x2026eb,'threadId':_0x5608ce})['then'](_0x308211=>{if('destroyed'!==_0x3e4757['state']){if(_0x1c545f=_0x308211,_0x1c545f&&!_0x1c545f['isAttached']){const _0x32897b=_0x1c545f['attachTo'](()=>this['_getTargetForId'](_0x5608ce));_0x1428c6['registerAnnotation'](_0x32897b),_0x1c545f['isResolved']&&this['_reconvertMarkers'](_0x5608ce);}else{if(!_0x1c545f){const _0x120af6=this['getAllMarkersForId'](_0x5608ce);_0x3e4757['model']['change'](_0x294e06=>{for(const _0x2f27d0 of _0x120af6)_0x294e06['removeMarker'](_0x2f27d0);});}}}}):_0x3e4757['editing']['view']['once']('render',()=>{if(_0x9d4e4['getCommentThread'](_0x5608ce))return;const _0xf20c2d=_0x3e4757['plugins']['get'](ti);_0x1c545f=_0x9d4e4['openNewCommentThread']({'channelId':_0x2026eb,'threadId':_0x5608ce,'target':()=>this['_getTargetForId'](_0x5608ce),'context':{'type':'text','value':this['_getTextContext'](_0x5608ce)}});const _0x36660c=_0x9d4e4['_threadToController']['get'](_0x1c545f)['view'],_0x81bf09=_0xf20c2d['getByInnerView'](_0x36660c);_0x81bf09&&_0x1428c6['registerAnnotation'](_0x81bf09);},{'priority':'low'})),_0x1c545f;}['_handleThreadMarker'](_0x4fae3e,_0x374ff2){const _0x2767e3=this['_attachMarkerToThread'](_0x4fae3e,_0x374ff2);_0x2767e3&&!_0x2767e3['context']&&_0x2767e3['setContext']({'type':'text','value':this['_getTextContext'](_0x374ff2)});}_initAriaMarkerChangeAnnouncements(){const _0x116f88=this['editor'];_0x624c26(_0x116f88['model'],({left:_0x23afba,entered:_0x335072})=>{for(const _0xa76c4b of _0x23afba)if(Ai(_0xa76c4b)){_0x116f88['ui']['ariaLiveAnnouncer']['announce'](Et(_0x116f88['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x160298 of _0x335072)if(Ai(_0x160298)){_0x116f88['ui']['ariaLiveAnnouncer']['announce'](Et(_0x116f88['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x5fe013(_0x235769)));break;}});}};function gi(_0x327be3,_0x5c3360){return _0x5c3360?_0x327be3+':'+_0x5c3360:_0x327be3;}function _i(_0x35370c,_0x54ba5b){const _0xafdad4=_0x54ba5b['schema'],_0x50fbac=_0x54ba5b['createRange'](_0x35370c['start']);for(const _0x190647 of _0x35370c['getWalker']()){const {type:_0xf2d954,item:_0x2c7c5f,nextPosition:_0x4f4238}=_0x190647;if('text'===_0xf2d954||_0xafdad4['isObject'](_0x2c7c5f)){const _0x2618f5=_0x54ba5b['createPositionBefore'](_0x2c7c5f);_0x50fbac['isCollapsed']&&(_0x50fbac['start']=_0x2618f5),_0x50fbac['end']=_0x4f4238;}}return _0x50fbac;}function Ai(_0x42e4c5){return'comment'===fi(_0x42e4c5['name'])['group'];}var vi=class extends _0x36d238{['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 _0x278304=this['editor'],_0x2e3834=_0x278304['plugins']['get'](oi),_0x4f8eea=_0x278304['plugins']['get'](wi),_0x29b40f=_0x278304['plugins']['get'](ti),_0x1a5ac0=_0x278304['plugins']['get'](di);_0x278304['ui']['componentFactory']['add']('comment',()=>{const _0x3aa3af=this['_createUIButton'](_0x5dc461);return _0x3aa3af['tooltip']=!0x0,_0x3aa3af;}),_0x278304['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x1a5ac0['addSourceCollector'](()=>{const _0x42854e=[];for(const [_0x3a8f26,_0x1f10e3]of _0x2e3834['_threadToController']){const _0x37f49b=_0x4f8eea['getAllMarkersForId'](_0x3a8f26['id']),_0x116ceb=_0x37f49b['map'](_0x3538d2=>_0x3538d2['getRange']());_0x37f49b['length']>0x0&&_0x42854e['push']([_0x1f10e3['view'],_0x116ceb]);}return _0x42854e;}),this['listenTo'](_0x29b40f,'change:activeAnnotations',(_0x42ddd0,_0x5d0e77,_0x22b2eb)=>{const _0x5c2821=Array['from'](_0x22b2eb)['map'](_0x578e1c=>_0x578e1c['innerView'])['find'](_0xbe0d31=>_0x2e3834['_viewToController']['has'](_0xbe0d31));if(!_0x5c2821)return void(_0x4f8eea['activeMarker']=null);const _0x5cffe8=_0x2e3834['_viewToController']['get'](_0x5c2821)['model']['id'],_0x4c44bc='comment:'+_0x5cffe8;_0x5cffe8&&_0x4f8eea['hasMarkerForId'](_0x5cffe8)?_0x4f8eea['activeMarker']=_0x4c44bc:_0x4f8eea['activeMarker']&&(_0x4f8eea['activeMarker']=null);}),this['listenTo'](_0x2e3834,'removeCommentThread',(_0x5ebe89,{threadId:_0x4cf600,isFromAdapter:_0x9cf5fd})=>{!_0x9cf5fd&&_0x278304['ui']['focusTracker']['isFocused']&&_0x4f8eea['hasMarkerForId'](_0x4cf600)&&_0x278304['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2e3834,'addComment',(_0x1140ce,{threadId:_0x2fd390,isFromAdapter:_0x1ea83c})=>{!_0x1ea83c&&_0x4f8eea['hasMarkerForId'](_0x2fd390)&&_0x2e3834['hasCommentThread'](_0x2fd390)&&0x1===_0x2e3834['getCommentThread'](_0x2fd390)['length']&&(_0x278304['editing']['view']['focus'](),_0x1140ce['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x5571a7=[this['editor']];for(const _0x55577b of _0x5571a7){let _0x56f8fa;for(const _0x383617 in _0x55577b){const _0xf72ed=_0x383617,_0x241190=_0x55577b[_0xf72ed];if('commentsLicenseKeyValid'==_0x241190||'commentsLicenseKeyInvalid'==_0x241190||'commentsLicenseKeyExpired'==_0x241190||'commentsLicenseKeyDomainLimit'==_0x241190||'commentsLicenseKeyNotAllowed'==_0x241190||'commentsLicenseKeyEvaluationLimit'==_0x241190||'commentsLicenseKeyUsageLimit'==_0x241190){delete _0x55577b[_0xf72ed],_0x56f8fa=_0x241190,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x56f8fa&&_0x55577b['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x56f8fa&&_0x55577b['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x56f8fa&&_0x55577b['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x56f8fa&&_0x55577b['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x56f8fa&&_0x55577b['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x56f8fa&&_0x55577b['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x4524c8){const _0x3320ea=this['editor'],_0x590745=new _0x4524c8(_0x3320ea['locale']),_0x5cee25=_0x3320ea['commands']['get']('addCommentThread');return _0x590745['set']({'label':Et(_0x3320ea['locale'],'Comment'),'icon':_0x64587f}),_0x590745['bind']('isEnabled')['to'](_0x5cee25,'isEnabled',_0x5cee25,'hasContent',(_0x23af37,_0x389c1e)=>_0x23af37&&_0x389c1e),this['listenTo'](_0x590745,'execute',()=>{_0x5cee25['execute']();}),_0x590745;}},yi=class extends _0x36d238{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x3af0df){super(_0x3af0df),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x338bd8,_0x121eda,_0x4c32f5)=>{_0x4c32f5?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x16cb58,_0x58bec2]of this['editor']['commands'])_0x58bec2['affectsData']&&'addCommentThread'!==_0x16cb58&&_0x58bec2['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 _0x173376=this['editor']['editing']['view']['document'];this['listenTo'](_0x173376,'cut',_0x13cba5=>_0x13cba5['stop'](),{'priority':'highest'}),this['listenTo'](_0x173376,'clipboardInput',_0x4fa1ee=>_0x4fa1ee['stop'](),{'priority':'highest'}),this['listenTo'](_0x173376,'delete',_0x11456a=>_0x11456a['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x11c249,_0x48fd18]of this['editor']['commands'])_0x48fd18['affectsData']&&'addCommentThread'!==_0x11c249&&_0x48fd18['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 _0x3d8ace{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51ce9b){super(_0x51ce9b),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x49357d=this['context']['plugins']['get'](ti);this['listenTo'](_0x49357d,'_activateAnnotation',(_0x25e01c,_0x38bb0a)=>{for(const _0x56c9f3 of this['activeUIs']){const _0x1f96aa=this['_uis']['get'](_0x56c9f3);(0x0,this['uisData']['get'](_0x56c9f3)['filter'])(_0x38bb0a)&&_0x1f96aa['setActiveAnnotation'](_0x38bb0a);}}),this['listenTo'](_0x49357d,'_deactivateAllAnnotations',()=>{for(const _0xe2fa4d of this['activeUIs'])this['_uis']['get'](_0xe2fa4d)['setActiveAnnotation'](null);}),this['listenTo'](_0x49357d['_visibleAnnotations'],'add',(_0x3c381c,_0x468ffd)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x468ffd);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x1f77a8){return this['activeUIs']['has'](_0x1f77a8);}activate(_0x3d093f,_0x55979a=this['defaultFilter']){const _0x3bcfc7=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x3d093f))throw new _0x59fadc('annotationsuis-missing-ui',this,{'uiName':_0x3d093f});this['isActive'](_0x3d093f)&&this['deactivate'](_0x3d093f),this['activeUIs']['add'](_0x3d093f);const _0x163ea7=new Jt();Qt({'source':_0x3bcfc7['_visibleAnnotations'],'target':_0x163ea7,'filter':_0x55979a}),this['uisData']['set'](_0x3d093f,{'collection':_0x163ea7,'filter':_0x55979a});const _0x3d31b1=this['_uis']['get'](_0x3d093f);_0x3d31b1['attach'](_0x163ea7),this['listenTo'](_0x3d31b1,'change:activeAnnotation',(_0x13a728,_0x1f9a2d,_0x1437cc,_0x290a4d)=>{_0x290a4d&&_0x3bcfc7['_removeActiveAnnotation'](_0x290a4d),_0x1437cc&&_0x3bcfc7['_addActiveAnnotation'](_0x1437cc);});}deactivate(_0x55b5a0){if(this['activeUIs']['delete'](_0x55b5a0),!this['_uis']['has'](_0x55b5a0))throw new _0x59fadc('annotationsuis-missing-ui',this,{'uiName':_0x55b5a0});const _0x184dde=this['_uis']['get'](_0x55b5a0);_0x184dde['detach'](),this['stopListening'](_0x184dde),this['uisData']['get'](_0x55b5a0)['collection']['destroy'](),this['uisData']['delete'](_0x55b5a0);}switchTo(_0x1e7570){if(!this['_uis']['has'](_0x1e7570))throw new _0x59fadc('annotationsuis-missing-ui',this,{'uiName':_0x1e7570});const _0xac9371=this['context']['plugins']['get'](ti),_0x446a72=Array['from'](_0xac9371['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1e7570);const _0x38b4a1=this['_uis']['get'](_0x1e7570);_0x38b4a1['setActiveAnnotation'](_0x446a72),_0x38b4a1['_setSelectedAnnotations']&&_0x446a72&&_0x38b4a1['_setSelectedAnnotations']([_0x446a72]);}deactivateAll(){for(const _0xe5f83c of this['activeUIs'])this['deactivate'](_0xe5f83c);}register(_0x5ebbfa,_0x669e3f){if(this['_uis']['has'](_0x5ebbfa))throw new _0x59fadc('annotationsuis-register-already-registered');if('function'!=typeof _0x669e3f['attach']||'function'!=typeof _0x669e3f['detach']||'function'!=typeof _0x669e3f['setActiveAnnotation'])throw new _0x59fadc('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5ebbfa,_0x669e3f);}refilterAnnotations(){const _0x57a946=this['context']['plugins']['get'](ti)['collection'],_0x265ae0=new Map(),_0x24f633=Array['from'](this['activeUIs']);for(const _0x213a4f of this['activeUIs']){const _0x44d4de=this['uisData']['get'](_0x213a4f)['collection'];for(const _0x219d8e of _0x44d4de)_0x265ae0['set'](_0x219d8e,_0x213a4f);}for(const _0x28038c of _0x57a946){const _0x3cbb7e=_0x265ae0['get'](_0x28038c);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x28038c);const _0x975912=_0x24f633['find'](_0x428e90=>this['uisData']['get'](_0x428e90)['filter'](_0x28038c));_0x3cbb7e!==_0x975912&&(_0x3cbb7e&&this['uisData']['get'](_0x3cbb7e)['collection']['remove'](_0x28038c),_0x975912&&this['uisData']['get'](_0x975912)['collection']['add'](_0x28038c));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0xd790f7){const _0x2c10fd=[];for(const _0x440eb6 of this['activeUIs']){(0x0,this['uisData']['get'](_0x440eb6)['filter'])(_0xd790f7)&&_0x2c10fd['push'](_0x440eb6);}if(_0x2c10fd['length']>0x1)throw new _0x59fadc('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2c10fd,'annotationType':_0xd790f7['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x4833c6('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x1631b3){super(_0x1631b3);const _0x4cb014=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 _0x1749d2(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4cb014['to']('class')],'style':{'minHeight':_0x4cb014['to']('minHeight',_0x154213=>'number'==typeof _0x154213?Ci(_0x154213+0xa):null)},'dir':_0x1631b3['uiLanguageDirection'],'role':'application','aria-label':Et(_0x1631b3,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x1631b3,'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',_0x72ca9b=>{this['_updateItemPositionInFocusables'](_0x72ca9b['source']);}),this['list']['forEach'](_0x713cf=>{this['focusTracker']['add'](_0x713cf['element']),this['_updateItemPositionInFocusables'](_0x713cf);}),this['list']['on']('change',(_0x5224ae,_0x56222f)=>{for(const _0x5894d6 of _0x56222f['removed'])this['focusTracker']['remove'](_0x5894d6['element']),this['focusables']['remove'](_0x5894d6);for(const _0x40e8c4 of _0x56222f['added'])this['focusTracker']['add'](_0x40e8c4['element']),this['_updateItemPositionInFocusables'](_0x40e8c4);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x4ff7de){const _0x37be61=this['focusables']['getIndex'](_0x4ff7de);let _0x2afb38,_0x4e08cc;for(const _0x522420 of this['focusables'])if(_0x4ff7de['top']<_0x522420['top']){_0x2afb38=_0x522420;break;}if(_0x4e08cc=_0x2afb38?this['focusables']['getIndex'](_0x2afb38):this['focusables']['length'],-0x1!==_0x37be61){if(_0x37be61===_0x4e08cc-0x1)return;this['focusables']['remove'](_0x4ff7de),_0x4e08cc=_0x2afb38?this['focusables']['getIndex'](_0x2afb38):this['focusables']['length'];}this['focusables']['add'](_0x4ff7de,_0x4e08cc);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x4833c6('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x445318){super(_0x445318),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x55a08b,_0x47478b)=>_0x55a08b+_0x47478b),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1daf49=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1daf49['to']('isAnimationDisabled',_0x3789a5=>_0x3789a5?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1daf49['to']('top',_0x411f05=>bi(_0x411f05))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x106857=this['element']['clientHeight'];_0x106857&&(this['height']=_0x106857);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x3d8ace{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x32e429){super(_0x32e429),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 _0x3c9b66=this['context']['config']['get']('sidebar.container');_0x3c9b66&&this['setContainer'](_0x3c9b66);}setContainer(_0x8df702){if(!Oi(_0x8df702))throw new _0x59fadc('sidebar-setcontainer-invalid-element');this['container']=_0x8df702;}_attachToContainer({viewClass:_0x1eb379='',spaceBetweenItems:_0x1319a3=0x19}={}){if(!Oi(this['container']))throw new _0x59fadc('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1eb379,this['_spaceBetweenItems']=_0x1319a3;}['rearrange']({removedAnnotation:_0x4b3ffd,previousAnnotation:_0x22cc3a,nextAnnotation:_0x1440cb}){const _0x39e4e9=this['getSidebarItemView'](_0x4b3ffd);this['view']['list']['remove'](_0x39e4e9),this['_destroySidebarItemView'](_0x4b3ffd),_0x22cc3a&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x22cc3a)),_0x1440cb&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1440cb)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1eb97c,activatedAnnotation:_0x18119d,disableAnimationOnActivatedAnnotation:_0x1125d5}){if(this['_activeAnnotation']=_0x18119d,_0x1eb97c){_0x1eb97c['isActive']=!0x1;const _0x347e79=this['getSidebarItemView'](_0x1eb97c);_0x347e79&&_0x1125d5&&(_0x347e79['isAnimationDisabled']=!0x1);}if(_0x18119d){const _0x519c9a=this['getSidebarItemView'](_0x18119d);_0x519c9a&&(_0x18119d['isActive']=!0x0,_0x1125d5&&(_0x519c9a['isAnimationDisabled']=!0x0,_0x519c9a['top']+=0x1),this['_alignToTargetRect'](_0x519c9a));}}_detachFromContainer(_0x560549){if(this['view']['element']['remove'](),_0x560549){for(const _0x4867d1 of _0x560549)this['_destroySidebarItemView'](_0x4867d1);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x59e524,_0x12f315){_0x12f315||(_0x12f315=_0x59e524['view']);const _0x3c66c8=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3c66c8,_0x59e524),this['_annotationToSidebarItemView']['set'](_0x59e524,_0x3c66c8),_0x3c66c8['content']['add'](_0x12f315),this['listenTo'](_0x59e524['view'],'change:targetRect',(_0x2bb159,_0xb8df42,_0x40c54b)=>{const _0x20b3ba=this['_getTargetTop'](_0x59e524,_0x40c54b);_0x3c66c8['_targetTop']!=_0x20b3ba&&(_0x3c66c8['_targetTop']=_0x20b3ba,this['_setItemTop'](_0x3c66c8,_0x20b3ba));}),this['listenTo'](_0x3c66c8,'change:top',()=>{this['_recalculate'](_0x3c66c8,'top');}),this['listenTo'](_0x3c66c8,'change:bottom',()=>{this['_recalculate'](_0x3c66c8,'bottom');}),this['_alignToTargetRect'](_0x3c66c8);const _0x1a6a4a=this['_getItemBefore'](_0x3c66c8);return _0x1a6a4a&&this['_alignAfterItem'](_0x1a6a4a,_0x3c66c8)||this['_alignToTargetRect'](_0x3c66c8),this['_updateLastItem'](),this['view']['list']['add'](_0x3c66c8),_0x3c66c8;}['_alignForTopChange'](_0x13bc5d){if(!_0x13bc5d['content']['length'])return;const _0xd9f164=this['_getItemBefore'](_0x13bc5d);if(!_0xd9f164)return;const _0x136188=this['_sidebarItemViewToAnnotation']['get'](_0xd9f164),_0x38111e=this['_activeAnnotation'];_0x38111e&&_0x38111e===_0x136188?this['_alignAfterItem'](_0xd9f164,_0x13bc5d):this['_alignBeforeItem'](_0x13bc5d,_0xd9f164);}_alignForBottomChange(_0x21751c){if(!_0x21751c['content']['length'])return;const _0x51f2a1=this['_getItemAfter'](_0x21751c);if(!_0x51f2a1)return;const _0x51dfec=this['_sidebarItemViewToAnnotation']['get'](_0x51f2a1),_0x292deb=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3ee8ab=this['_activeAnnotation'];_0x3ee8ab&&_0x3ee8ab===_0x51dfec&&_0x292deb?(this['_alignBeforeItem'](_0x51f2a1,_0x21751c),this['_alignAfterItem'](_0x21751c,_0x51f2a1)):_0x3ee8ab&&_0x3ee8ab===_0x51dfec?this['_alignBeforeItem'](_0x51f2a1,_0x21751c):this['_alignAfterItem'](_0x21751c,_0x51f2a1);}_recalculate(_0x406b86,_0x19e19b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2c1893,changedProp:_0x4910f9}of this['_recalculateBuffer'])'top'===_0x4910f9?this['_alignForTopChange'](_0x2c1893):this['_alignForBottomChange'](_0x2c1893);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x406b86,'changedProp':_0x19e19b});}getSidebarItemView(_0x58c55d){return this['_annotationToSidebarItemView']['get'](_0x58c55d);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x26ab98){const _0x358075=this['getSidebarItemView'](_0x26ab98);this['stopListening'](_0x358075),this['stopListening'](_0x26ab98['view']),_0x358075['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x26ab98),this['_sidebarItemViewToAnnotation']['delete'](_0x358075);}_createSidebarView(){const _0x35da7c=new Ii(this['context']['locale']);return _0x35da7c['render'](),this['on']('change:_lastItem',(_0x3c2755,_0x10c5f1,_0x51ca6e,_0x2f3224)=>{_0x2f3224&&_0x35da7c['unbind']('minHeight'),_0x51ca6e?_0x35da7c['bind']('minHeight')['to'](_0x51ca6e,'bottom'):_0x35da7c['minHeight']=null;}),_0x35da7c;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x20e5d0){const _0x15b70e=this['_sidebarItemViewToAnnotation']['get'](_0x20e5d0),_0x39eb36=_0x15b70e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x15b70e)-0x1);return _0x39eb36&&this['getSidebarItemView'](_0x39eb36)||null;}_getItemAfter(_0x52f7be){const _0x3edf68=this['_sidebarItemViewToAnnotation']['get'](_0x52f7be),_0x64f58a=_0x3edf68&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3edf68)+0x1);return _0x64f58a&&this['getSidebarItemView'](_0x64f58a)||null;}_alignBeforeItem(_0x51ac20,_0x3c3f7e){_0x51ac20['updateHeight']();const _0x4c6251=Ni(_0x3c3f7e['bottom']+this['_spaceBetweenItems'],_0x51ac20['top']);return!!_0x4c6251&&(this['_setItemTop'](_0x3c3f7e,_0x3c3f7e['top']-_0x4c6251),!0x0);}_alignAfterItem(_0x503dd0,_0x19cf14){_0x503dd0['updateHeight']();const _0x5a904e=Ni(_0x503dd0['bottom']+this['_spaceBetweenItems'],_0x19cf14['top']);return!!_0x5a904e&&(this['_setItemTop'](_0x19cf14,_0x19cf14['top']+_0x5a904e,!0x1),!0x0);}_alignToTargetRect(_0x2f2a04){const _0x582480=this['_sidebarItemViewToAnnotation']['get'](_0x2f2a04);if(!_0x582480||!_0x582480['target']||!_0x582480['targetRect'])return;const _0x4ff99e=this['_getTargetTop'](_0x582480,_0x582480['targetRect']);this['_setItemTop'](_0x2f2a04,_0x4ff99e);}_getTargetTop(_0x550ece,_0x29ac05){if(null===_0x29ac05)return 0x0;if(_0x550ece['target']instanceof _0x276b72)return _0x29ac05['top'];{const _0x56eda7=new _0x276b72(this['view']['element'])['top'];return _0x29ac05['top']-_0x56eda7;}}_setItemTop(_0x13bc7c,_0x597589,_0x2bd99b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2bd99b&&(_0x597589=Math['max'](_0x597589,this['_getMaxAvailableTop'](_0x13bc7c))),_0x13bc7c['top']=_0x597589;}_getMaxAvailableTop(_0x3d4d82){let _0x165844=this['_getItemBefore'](_0x3d4d82),_0x25860d=0x0;for(;_0x165844;)_0x165844['updateHeight'](),_0x25860d+=this['_spaceBetweenItems']+_0x165844['height'],_0x165844=this['_getItemBefore'](_0x165844);return _0x25860d;}};function Ni(_0x367db0,_0x5f3058){return Math['max'](_0x367db0-_0x5f3058,0x0);}function Oi(_0x2d5f71){return null!==_0x2d5f71&&'object'==typeof _0x2d5f71&&0x1===_0x2d5f71['nodeType'];}var Mi=class extends _0x3d8ace{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(_0x1f1fd2){super(_0x1f1fd2),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xeae5cd(),this['_refreshPositioningDebounced']=_0xd4e18c(()=>{_0x1f1fd2['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x3b6800=this['context']['plugins']['get'](Ti),_0x192a26=this['context']['plugins']['get'](ki);_0x3b6800['register']('wideSidebar',this),_0x192a26['container']&&_0x3b6800['switchTo']('wideSidebar');}setActiveAnnotation(_0x44c8d5){if(_0x44c8d5===this['activeAnnotation'])return;const _0x5d9196=this['context']['plugins']['get'](ki);_0x5d9196['_activeAnnotation']=_0x44c8d5;const _0x474d05=this['activeAnnotation'];_0x5d9196['refresh']({'blurredAnnotation':_0x474d05,'activatedAnnotation':_0x44c8d5}),this['activeAnnotation']=_0x44c8d5;}attach(_0x50c6b3){this['annotations']=_0x50c6b3;const _0x41e826=this['context']['plugins']['get'](ki);if(_0x41e826['_annotations']=_0x50c6b3,this['isAttached'])throw new _0x59fadc('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x41e826,'set:container',()=>{this['detach'](),this['listenTo'](_0x41e826,'change:container',_0x1c0ca5=>{_0x1c0ca5['off'](),this['attach'](_0x50c6b3);});}),_0x41e826['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x274568=_0xd2f326=>{_0xd2f326['updateTargetRect'](),_0x41e826['addAnnotation'](_0xd2f326);};for(const _0x12cac8 of _0x50c6b3)_0x274568(_0x12cac8);this['listenTo'](_0x50c6b3,'add',(_0x173783,_0x108851)=>{_0x274568(_0x108851);}),this['listenTo'](_0x50c6b3,'remove',(_0x3584d6,_0x47e203,_0x174c9b)=>{_0x41e826['rearrange']({'removedAnnotation':_0x47e203,'previousAnnotation':_0x50c6b3['get'](_0x174c9b-0x1),'nextAnnotation':_0x50c6b3['get'](_0x174c9b+0x1)}),_0x47e203===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x50c6b3,'focus',(_0x4cda74,_0x5a1c86)=>{this['setActiveAnnotation'](_0x5a1c86);}),this['listenTo'](_0x50c6b3,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1621b7=this['context']instanceof _0x5d61fe?this['context']['editors']:new _0xeae5cd([this['context']]);for(const _0x457525 of _0x1621b7)this['_integrateWithEditorAnnotations'](_0x457525);this['listenTo'](_0x1621b7,'add',(_0x5a877d,_0x37e55a)=>{this['listenTo'](_0x37e55a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x37e55a);});}),this['listenTo'](_0x1621b7,'remove',(_0x3b890f,_0x2cacc0)=>{_0x2cacc0['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2cacc0['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x59fadc('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x23da3b=this['context']['plugins']['get'](ki);_0x23da3b['_detachFromContainer'](this['annotations']),this['stopListening'](_0x23da3b),this['stopListening'](this['annotations']),this['context']instanceof _0x5d61fe&&this['stopListening'](this['context']['editors']);for(const _0x3554d2 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3554d2);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x342f97){if(!_0x342f97['plugins']['has']('EditorAnnotations'))return;const _0x365ab9=_0x342f97['plugins']['get']('EditorAnnotations'),_0x4c911b=()=>{const _0x323bba=_0x365ab9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x323bba[0x0]||null);};this['listenTo'](_0x365ab9,'refresh',_0x4c911b),this['listenTo'](_0x365ab9,'blur',(_0x47ab24,{isAnnotationTracked:_0x1b1847})=>{this['activeAnnotation']&&_0x1b1847(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x365ab9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xd13078=>{_0x365ab9['hasDomSelection']()&&(_0x4c911b(),_0xd13078['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x365ab9);}_destroyEditorAnnotationsIntegration(_0x3d4b2d){this['stopListening'](_0x3d4b2d),this['_editorAnnotations']['remove'](_0x3d4b2d);}},Ri=class extends _0x5dc461{counterView;constructor(_0xfae990){super(_0xfae990);const _0x300ec1=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x11089b,_0x292780)=>_0x11089b?'...':_0x292780['toString']()),this['set']('annotationType',''),this['icon']=_0x64587f,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x300ec1['to']('annotationType',_0xd95e66=>'ck-annotation-counter__badge--'+_0xd95e66),_0x300ec1['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x300ec1['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x3d8ace{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(_0x2095cf){super(_0x2095cf),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x34dc61())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xeae5cd(),this['_refreshPositioningDebounced']=_0xd4e18c(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2c9604(this['context']['locale']),this['balloonPanelView']=new _0x37a9d4(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x333c32){this['annotations']=_0x333c32;const _0x3b07f6=this['context']['plugins']['get'](ki),_0x1fecb7=this['balloonPanelView'];if(_0x3b07f6['_annotations']=_0x333c32,this['isAttached'])throw new _0x59fadc('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3b07f6,'set:container',()=>{this['detach'](),this['listenTo'](_0x3b07f6,'change:container',_0x1cf1a2=>{_0x1cf1a2['off'](),this['attach'](_0x333c32);});}),_0x3b07f6['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x30d56f=_0x584b01=>{const _0x2e8f10=new Ri(this['context']['locale']);_0x3b07f6['addAnnotation'](_0x584b01,_0x2e8f10),this['_annotationToNarrowView']['set'](_0x584b01,_0x2e8f10),_0x2e8f10['bind']('isDirty','annotationType','number')['to'](_0x584b01['view'],'isDirty','type','length'),_0x2e8f10['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1fecb7['content']['first']!==_0x584b01['view']?(this['_showBalloon'](_0x584b01),_0x584b01['view']['element']['focus'](),this['setActiveAnnotation'](_0x584b01)):this['setActiveAnnotation'](null);});};for(const _0x431d0a of _0x333c32)_0x30d56f(_0x431d0a);this['listenTo'](_0x333c32,'add',(_0x1342c8,_0x203ff2)=>{_0x30d56f(_0x203ff2);}),this['listenTo'](_0x333c32,'remove',(_0x28ad7f,_0x57bb9e,_0x2d1536)=>{this['_annotationToNarrowView']['get'](_0x57bb9e)['destroy'](),this['_annotationToNarrowView']['delete'](_0x57bb9e),_0x3b07f6['rearrange']({'removedAnnotation':_0x57bb9e,'previousAnnotation':_0x333c32['get'](_0x2d1536-0x1),'nextAnnotation':_0x333c32['get'](_0x2d1536+0x1)}),_0x57bb9e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x333c32,'focus',(_0x5055d2,_0x503843)=>{this['setActiveAnnotation'](_0x503843);}),this['listenTo'](_0x333c32,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x51cbe8,_0x292efb)=>{_0x292efb['keyCode']===_0x39b378['esc']&&_0x1fecb7['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1fecb7['content']['first']),this['_hideBalloon'](),_0x292efb['stopPropagation'](),_0x292efb['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1ddd3d,_0x40ff3c)=>{const _0x4d4233=_0x40ff3c['target'];_0x1fecb7['isVisible']&&_0x1fecb7['element']['contains'](_0x4d4233)||_0x3b07f6['view']['element']['contains'](_0x4d4233)||_0x1ddd3d['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x5f16cc=>_0x5f16cc['contains'](_0x4d4233))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x536b78=this['context']instanceof _0x5d61fe?this['context']['editors']:new _0xeae5cd([this['context']]);for(const _0x1ad0ba of _0x536b78)this['_integrateWithEditorAnnotations'](_0x1ad0ba);this['listenTo'](_0x536b78,'add',(_0x311781,_0x52bb9d)=>{this['listenTo'](_0x52bb9d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x52bb9d);});}),this['listenTo'](_0x536b78,'remove',(_0x501bf7,_0x66362b)=>{_0x66362b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x66362b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x3a2288){if(_0x3a2288===this['activeAnnotation'])return;const _0x31e91e=this['context']['plugins']['get'](ki);_0x31e91e['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3a2288,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3a2288&&_0x31e91e['getSidebarItemView'](_0x3a2288)?this['_showBalloon'](_0x3a2288):this['_hideBalloon'](),this['activeAnnotation']=_0x3a2288;}detach(){if(!this['isAttached'])throw new _0x59fadc('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x55c7a7=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x48fe44=>_0x48fe44['destroy']()),this['_annotationToNarrowView']['clear'](),_0x55c7a7['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5d61fe&&this['stopListening'](this['context']['editors']);for(const _0x1362ca of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1362ca);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(_0x26a746){if(!_0x26a746['plugins']['has']('EditorAnnotations'))return;const _0x13f53f=_0x26a746['plugins']['get']('EditorAnnotations'),_0x322edf=this['context']['plugins']['get'](ki),_0x1af031=this['annotations'],_0x471d70=this['balloonPanelView'],_0x262402=()=>{const _0x5fd2b8=_0x13f53f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x5fd2b8),this['setActiveAnnotation'](_0x5fd2b8[0x0]||null);};this['listenTo'](_0x13f53f,'refresh',_0x262402),this['listenTo'](_0x13f53f,'blur',(_0x9eb033,{isAnnotationTracked:_0x1a6fd7})=>{this['activeAnnotation']&&_0x1a6fd7(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x13f53f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1af031,'blur',_0x1994bb=>{_0x13f53f['hasDomSelection']()&&_0x1994bb['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x48ff09,_0x429bbd)=>{const _0xae5e00=_0x429bbd['target'];_0x471d70['isVisible']&&_0x471d70['element']['contains'](_0xae5e00)||_0x322edf['view']['element']['contains'](_0xae5e00)||this['activeAnnotation']&&_0x13f53f['hasDomSelection']()&&(_0x262402(),_0x48ff09['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x13f53f);}_destroyEditorAnnotationsIntegration(_0x444faa){_0x444faa&&(this['stopListening'](_0x444faa),this['_editorAnnotations']['remove'](_0x444faa));}_setSelectedAnnotations(_0x1ac723){for(const _0x613c2a of this['_selectedAnnotations'])_0x1ac723['includes'](_0x613c2a)||this['_manuallyClosedAnnotationViews']['delete'](_0x613c2a['view']);this['_selectedAnnotations']=_0x1ac723;}_refreshPositioning(){const _0xa2861=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xa2861['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xfdfbc6){if(this['_manuallyClosedAnnotationViews']['has'](_0xfdfbc6['view']))return;const _0x1a906d=this['balloonPanelView']['content']['first'];_0x1a906d!==_0xfdfbc6['view']?(_0x1a906d&&this['_detachListeners'](_0x1a906d),this['_attachListeners'](_0xfdfbc6['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xfdfbc6['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x132a55=this['balloonPanelView']['content']['first'],_0x6c9ac1=_0x132a55&&this['annotations']['getByView'](_0x132a55);if(!_0x6c9ac1||!this['_annotationToNarrowView']['has'](_0x6c9ac1))return;const _0x2c676b=this['_annotationToNarrowView']['get'](_0x6c9ac1)['element'],_0x2e89c4=(function(){const _0x8744e0=_0x37a9d4['defaultPositions'];return[_0x8744e0['southArrowNorthEast'],_0x8744e0['northArrowSouthEast'],_0x8744e0['southArrowNorth'],_0x8744e0['northArrowSouth'],_0x8744e0['southArrowNorthWest'],_0x8744e0['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2c676b,'positions':_0x2e89c4});}['_hideBalloon'](){const _0x4684f8=this['balloonPanelView'],_0x51a179=_0x4684f8['content']['first'];_0x51a179&&(this['_detachListeners'](_0x51a179),_0x4684f8['unpin'](),_0x4684f8['content']['clear']());}_attachListeners(_0x99d742){this['listenTo'](_0x99d742,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x99d742,'Esc',(_0x33384d,_0x11c63c)=>{this['_manuallyClosedAnnotationViews']['add'](_0x99d742),this['_hideBalloon'](),_0x11c63c();});}_detachListeners(_0x1fed88){this['stopListening'](_0x1fed88);}},xi=class extends _0x36d238{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x34753a,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5aa2cc){super(_0x5aa2cc),_0x5aa2cc['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5aa2cc['plugins']['get'](_0x34753a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0xd4e18c(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x4485c3=this['editor']['plugins']['get'](Ti);_0x4485c3['context']===this['editor']&&(_0x4485c3['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x810a4a,_0x458c55)=>{const _0x116c09=this['_balloon'];if(this['isAttached']&&_0x116c09['visibleView']){const _0x32253c=this['annotations']['getByView'](_0x116c09['visibleView']);_0x32253c&&this['_closeAnnotation'](_0x32253c),_0x458c55();}}));}afterInit(){const _0x19f631=this['editor']['plugins']['get'](Ti);_0x19f631['context']===this['editor']&&(_0x19f631['hasActive']()||_0x19f631['switchTo']('inline'));}setActiveAnnotation(_0x10994e){_0x10994e!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x10994e&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x10994e)&&this['_addAnnotationToBalloon'](_0x10994e,!0x0),_0x10994e['isActive']=!0x0),_0x10994e||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x10994e);}attach(_0x5a7f66){this['annotations']=_0x5a7f66;const _0x53fc85=this['editor']['plugins']['get'](Ti),_0x1468fc=this['_balloon'];if(this['isAttached'])throw new _0x59fadc('inlineannotations-attach-already-attached',this);if(_0x53fc85['context']!==this['editor'])throw new _0x59fadc('inlineannotations-not-allowed-with-context',this);const _0x4f4498=this['editor']['plugins']['get'](di);this['listenTo'](_0x4f4498,'refresh',()=>{const _0x6d981f=_0x4f4498['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0xa84619,_0x3c4343;!this['_forceRefresh']&&(_0xa84619=_0x6d981f,_0x3c4343=this['_selectedAnnotations'],_0xa84619['length']===_0x3c4343['length']&&_0xa84619['every'](_0x3d97d9=>_0x3c4343['includes'](_0x3d97d9)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x6d981f),this['setActiveAnnotation'](_0x6d981f[0x0]||null));}),this['listenTo'](_0x4f4498,'blur',(_0x40189f,{isAnnotationTracked:_0x2a45d2})=>{this['activeAnnotation']&&_0x2a45d2(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4f4498,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x51f1e0,_0x108ff5,_0x421387)=>{_0x421387||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5a7f66,'remove',(_0x2bb7ca,_0x3a8d4b)=>{this['_removeAnnotationFromBalloon'](_0x3a8d4b),_0x3a8d4b===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1468fc,'change:visibleView',(_0x434ffa,_0x53d8d2,_0x3e3fe3,_0x4089b9)=>{_0x4089b9&&this['stopListening'](_0x4089b9);const _0x425401=_0x5a7f66['getByView'](_0x3e3fe3);_0x3e3fe3&&_0x425401&&(this['listenTo'](_0x3e3fe3,'change:height',()=>{_0x1468fc['updatePosition']();}),this['listenTo'](_0x3e3fe3,'Esc',()=>{this['_closeAnnotation'](_0x425401),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x425401&&this['setActiveAnnotation'](_0x425401));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1468fc['visibleView']&&_0x5a7f66['getByView'](_0x1468fc['visibleView'])&&_0x1468fc['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 _0x59fadc('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x205630 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x205630);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x3120a1){for(const _0x5bd7ed of this['_selectedAnnotations'])_0x3120a1['includes'](_0x5bd7ed)||this['_manuallyClosed']['delete'](_0x5bd7ed);for(const _0x586f7e of this['annotations'])_0x3120a1['includes'](_0x586f7e)||this['_removeAnnotationFromBalloon'](_0x586f7e);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x19a563 of _0x3120a1)this['_addAnnotationToBalloon'](_0x19a563);}this['_selectedAnnotations']=_0x3120a1;}_addAnnotationToBalloon(_0x331f32,_0x3432a4=!0x1){this['_manuallyClosed']['has'](_0x331f32)||(this['_addedAnnotations']['has'](_0x331f32)||this['_balloon']['hasView'](_0x331f32['view'])||(this['_addedAnnotations']['add'](_0x331f32),this['_balloon']['add']({'stackId':_0x331f32['view']['id'],'view':_0x331f32['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x331f32)}})),_0x3432a4&&this['_balloon']['showStack'](_0x331f32['view']['id']));}_getBalloonTargetForAnnotation(_0x5d46d7){const _0x2ec02e=_0x5d46d7['target'],_0x4742b0=this['editor']['editing']['view'],_0x284b65=_0x4742b0['document']['selection']['getFirstRange'](),_0x45ae05=_0x4742b0['domConverter']['viewRangeToDom'](_0x284b65);if(_0x45ae05['collapse'](!0x0),_0x2ec02e){if(_0x2ec02e instanceof _0x276b72)return _0x2ec02e;let _0x2e13ab=[];for(const _0x1f43dc of _0x2ec02e)_0x2e13ab['push'](..._0x276b72['getDomElementRects'](_0x1f43dc));_0x2e13ab=function(_0x4ad218){const _0x31c543=[];let _0x280db9=_0x4ad218[0x0];for(let _0x150361=0x1;_0x150361<_0x4ad218['length'];_0x150361++)if(Pi(_0x280db9,_0x4ad218[_0x150361])){const _0x40a60f=_0x4ad218[_0x150361]['width'];_0x280db9['width']+=_0x40a60f,_0x280db9['right']+=_0x40a60f;}else _0x31c543['push'](_0x280db9),_0x280db9=_0x4ad218[_0x150361];return _0x31c543['push'](_0x280db9),_0x31c543;}(_0x2e13ab);const _0x32bee5=_0x45ae05['getBoundingClientRect']();return _0x2e13ab['find'](_0x1d39c2=>_0x1d39c2['top']<=_0x32bee5['top']&&_0x1d39c2['bottom']>=_0x32bee5['bottom']&&_0x1d39c2['left']<=_0x32bee5['left']&&_0x1d39c2['right']>=_0x32bee5['right'])||_0x2e13ab[0x0];}return _0x5d46d7['targetRect']||_0x45ae05;}_removeAnnotationFromBalloon(_0x2713c3){this['_addedAnnotations']['has'](_0x2713c3)&&this['_balloon']['hasView'](_0x2713c3['view'])&&(this['_addedAnnotations']['delete'](_0x2713c3),this['_balloon']['remove'](_0x2713c3['view']));}_closeAnnotation(_0x2123a1){this['_manuallyClosed']['add'](_0x2123a1),this['_removeAnnotationFromBalloon'](_0x2123a1);}};function Pi(_0x26d1ed,_0x8d6ba){return _0x26d1ed['top']===_0x8d6ba['top']&&_0x26d1ed['bottom']===_0x8d6ba['bottom']&&_0x26d1ed['right']===_0x8d6ba['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x5754a7,_0x4c2824){super(_0x5754a7),this['set']('isEmpty',!_0x4c2824['length']),this['focusTracker']=new _0x1749d2(),this['_annotationViews']=_0x4c2824,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x4c2824,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4c2824,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4c2824,'remove',(_0xed41d6,_0x3033c3)=>{_0x3033c3['isActive']&&this['focus'](),_0x4c2824['length']||(this['isEmpty']=!0x0);});const _0x20a277=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x5754a7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4c2824},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x20a277['if']('isEmpty','ck-hidden',_0x5f4ef3=>!_0x5f4ef3)]},'children':[{'text':Et(_0x5754a7,'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 _0x4e82f0 of this['_annotationViews'])this['focusTracker']['add'](_0x4e82f0['element']);this['_annotationViews']['on']('change',(_0x31e834,{added:_0x2f73cf,removed:_0x1af6a0})=>{for(const _0x163cac of _0x2f73cf)this['focusTracker']['add'](_0x163cac['element']);for(const _0x2384a1 of _0x1af6a0)this['focusTracker']['remove'](_0x2384a1['element']);});}},Di=class extends _0x3d8ace{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x57ea90){super(_0x57ea90),this['archivedThreads']=new _0xeae5cd();}init(){const _0x6612e1=this['context'],_0xe94aab=_0x6612e1['plugins']['get'](oi),_0x46912b=_0x6612e1['plugins']['get'](ti);this['listenTo'](_0xe94aab,'addCommentThread',(_0x36c842,{threadId:_0x212640})=>{const _0x248205=_0xe94aab['getCommentThread'](_0x212640);_0x248205['archivedAt']&&this['archivedThreads']['add'](_0x248205,this['_calculatePosition'](_0x248205['archivedAt'])),this['listenTo'](_0x248205,'change:archivedAt',(_0x6889df,_0x3d6716,_0x2713c4)=>{_0x2713c4?this['archivedThreads']['has'](_0x248205)||this['archivedThreads']['add'](_0x248205,this['_calculatePosition'](_0x248205['archivedAt'])):this['archivedThreads']['has'](_0x248205)&&this['archivedThreads']['remove'](_0x248205);});}),this['listenTo'](_0xe94aab,'removeCommentThread',(_0x13cf5e,{threadId:_0x33db30})=>{const _0xf3069d=_0xe94aab['getCommentThread'](_0x33db30);this['stopListening'](_0xf3069d),this['archivedThreads']['has'](_0xf3069d)&&this['archivedThreads']['remove'](_0xf3069d);},{'priority':'highest'}),this['listenTo'](_0x46912b['collection'],'focus',(_0x1e96d6,_0x44d977)=>{_0x44d977['isVisible']||(_0x44d977['isActive']=!0x0,_0x46912b['activate'](_0x44d977));});}_calculatePosition(_0x55c32d){const _0x540915=[...this['archivedThreads']]['findIndex'](_0x5c3e03=>_0x5c3e03['archivedAt']<_0x55c32d);return _0x540915>-0x1?_0x540915:this['archivedThreads']['length'];}},Vi=class extends _0x36d238{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x11e02b];}constructor(_0x148aed){super(_0x148aed),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x379a77=this['editor'],_0x1a1f9b=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x379a77['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5dc461,!0x0)),_0x379a77['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x25409f=this['_createCommentsArchiveButton'](rt);return _0x25409f['set']({'role':'menuitemcheckbox'}),_0x25409f;});const _0x36f19d=_0x379a77['plugins']['get'](Di),_0x59ac72=_0x379a77['plugins']['get']('Annotations'),_0x234574=_0x379a77['plugins']['get']('CommentsRepository');_0x36f19d['archivedThreads']['forEach'](_0x477613=>{this['_handleNewThread'](_0x477613);}),this['listenTo'](_0x36f19d['archivedThreads'],'add',(_0x2b3042,_0x5307a6)=>{this['_handleNewThread'](_0x5307a6);}),this['listenTo'](_0x59ac72['collection'],'add',(_0x49f910,_0xf87aea)=>{const _0x71cdad=this['_pendingThreads']['find'](_0x541432=>{const _0x472390=_0x234574['_threadToController']['get'](_0x541432);return _0x472390&&_0xf87aea['innerView']===_0x472390['view'];});if(_0x71cdad){const _0x1e588f=this['_calculatePosition'](_0x71cdad['archivedAt']);this['_addAnnotationToArchive'](_0xf87aea,_0x1e588f),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x71cdad),0x1);}}),this['listenTo'](_0x36f19d['archivedThreads'],'remove',(_0x381a75,_0x3f285c)=>{const _0x376a74=_0x379a77['config']['get']('collaboration.channelId');if(!_0x376a74||_0x3f285c['channelId']===_0x376a74){if(this['_pendingThreads']['includes'](_0x3f285c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3f285c),0x1);else{const _0x518961=_0x234574['_threadToController']['get'](_0x3f285c),_0x27e9e6=_0x59ac72['getByInnerView'](_0x518961['view']);this['annotationViews']['remove'](_0x27e9e6['view']),this['stopListening'](_0x27e9e6),this['stopListening'](_0x27e9e6['focusableElements']);}}}),this['listenTo'](_0x59ac72['collection'],'add',(_0x4cd6c7,_0x14c54b)=>{this['listenTo'](_0x14c54b,'escape',_0x1a1f9b);}),this['listenTo'](_0x59ac72['collection'],'remove',(_0x8be235,_0x48382b)=>{this['stopListening'](_0x48382b,'escape',_0x1a1f9b);});}_addAnnotationToArchive(_0x2ef06a,_0x41838b){this['listenTo'](_0x2ef06a,'set:isVisible',_0x6bc71b=>{_0x6bc71b['return']=!0x1,_0x6bc71b['stop']();}),this['annotationViews']['add'](_0x2ef06a['view'],_0x41838b);}['_handleNewThread'](_0x86f3da){const _0x551700=this['editor']['plugins']['get']('CommentsRepository'),_0x57fbd5=this['editor']['plugins']['get']('Annotations'),_0x5ccae6=this['editor']['config']['get']('collaboration.channelId');if(!_0x5ccae6||_0x86f3da['channelId']===_0x5ccae6){const _0x3999f0=_0x551700['_threadToController']['get'](_0x86f3da);if(!_0x3999f0)return void this['_pendingThreads']['push'](_0x86f3da);const _0xdcd3aa=this['_calculatePosition'](_0x86f3da['archivedAt']),_0x14fc16=_0x57fbd5['getByInnerView'](_0x3999f0['view']);_0x14fc16['isVisible']&&_0x57fbd5['_visibleAnnotations']['remove'](_0x14fc16),this['_addAnnotationToArchive'](_0x14fc16,_0xdcd3aa);}}_calculatePosition(_0x188565){const _0x5a51e7=this['editor']['config']['get']('collaboration.channelId'),_0x2c2a11=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x594bf5=>_0x594bf5['channelId']===_0x5a51e7)['findIndex'](_0x55cd2a=>_0x55cd2a['archivedAt']<_0x188565);return _0x2c2a11<0x0||_0x2c2a11>this['annotationViews']['length']?this['annotationViews']['length']:_0x2c2a11-0x1;}_toggleDialog(){const _0xaae6b4=this['editor'],_0xb2e13a=_0xaae6b4['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0xaae6b4['locale'],this['annotationViews'])),'commentsArchive'===_0xb2e13a['id']?_0xb2e13a['hide']():_0xb2e13a['show']({'id':'commentsArchive','title':Et(_0xaae6b4['locale'],'COMMENTS_ARCHIVE'),'icon':_0x453301,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x49c5b3['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x17d234,_0x20bc87=!0x1){const _0x5a67d9=this['editor']['locale'],_0x19565c=this['editor']['plugins']['get']('Dialog'),_0x2ae619=new _0x17d234(_0x5a67d9);return _0x2ae619['bind']('isEnabled')['to'](this,'isEnabled'),_0x2ae619['bind']('isOn')['to'](_0x19565c,'id',_0x5bc8bf=>'commentsArchive'===_0x5bc8bf),_0x2ae619['set']({'label':Et(_0x5a67d9,'COMMENTS_ARCHIVE'),'icon':_0x453301,'isToggleable':!0x0}),_0x20bc87&&(_0x2ae619['tooltip']=!0x0),this['listenTo'](_0x2ae619,'execute',()=>this['_toggleDialog']()),_0x2ae619;}_hideDialogOnAnnotationEscape=_0x16f49b=>{const _0x49f507=_0x16f49b['source'];if(!this['annotationViews']['has'](_0x49f507['view']))return;const _0x5349c8=this['editor']['plugins']['get']('Dialog');_0x5349c8['isOpen']&&'commentsArchive'===_0x5349c8['id']&&(_0x5349c8['hide'](),_0x16f49b['stop']());};},Bi=class extends _0x36d238{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 _0x1efa30,Context as _0x3e496a,ContextPlugin as _0xa2dbe,Editor as _0x651c85,PendingActions as _0x2fc7c7,Plugin as _0x53a0a0}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x48784c,Collection as _0x40e5e7,DomEmitterMixin as _0x4f6b20,FocusTracker as _0x91f952,KeystrokeHandler as _0x2a604e,ObservableMixin as _0x3b50a4,Rect as _0x3a8ad1,diff as _0x48b9c2,first as _0x59466b,getEnvKeystrokeText as _0x1692a3,keyCodes as _0x1dece6,priorities as _0x4890d3,scrollViewportToShowTarget as _0x363ecf,toUnit as _0x372316,uid as _0x3fd960}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x48d34a,ConfirmMixin as _0x17600c,FOCUS_ANNOTATION_KEYSTROKE as _0x4ef251,LateFocusButtonView as _0x476355,LateFocusDropdownButtonView as _0x46f104,UserView as _0x562d15,Users as _0x89d66a,getAllMarkersDomElementsSorted as _0x5f336f,getDateTimeFormatter as _0x51bb95,hashObject as _0x362dd1,setupThreadKeyboardNavigation as _0x131846,surroundingMarkersDetector as _0x3101b7,trimHtml as _0x344d90}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x180e09,debounce as _0x121a24,isEqual as _0x51876e,set as _0x579040,throttle as _0x34dd5c,unset as _0x4bbee6}from'es-toolkit/compat';import{IconAddComment as _0x413d95,IconCheck as _0x4e02b7,IconCommentsArchive as _0x32a812,IconPencil as _0xa2ff04,IconRemoveComment as _0x49ac6a,IconThreeVerticalDots as _0x133143,IconUndo as _0x852169}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x1ab0fb,BodyCollection as _0x3127b0,ButtonView as _0x3e41ef,ContextualBalloon as _0x4f3387,Dialog as _0x5c93bc,DialogViewPosition as _0x5c8bae,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
+ _0x3b50a4();var bt=class extends It{['model'];['view'];constructor(_0x1d6605,_0x370e72){super(),this['model']=_0x1d6605,this['model']['_isAttached']=!0x0,this['view']=_0x370e72,this['listenTo'](_0x370e72,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x370e72,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x370e72,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x370e72,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x370e72,'addComment',(_0x28852b,_0x3fa2f6)=>this['addComment'](_0x3fa2f6)),this['listenTo'](_0x370e72,'updateComment',(_0x1bc746,_0x15e56c,_0x2ae812)=>this['updateComment'](_0x15e56c,_0x2ae812)),this['listenTo'](_0x370e72,'removeComment',(_0x2a3622,_0x5671e8)=>this['removeComment'](_0x5671e8));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x2a7e37){this['model']['addComment']({'content':_0x2a7e37,'authorId':this['view']['_localUser']['id']});}updateComment(_0x1494e5,_0x99726f){this['model']['getComment'](_0x1494e5)['update']({'content':_0x99726f});}removeComment(_0x217812){this['model']['getComment'](_0x217812)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x392fc3,_0x32488e,_0x4ebafd){const t=_0x392fc3['t'];switch(_0x32488e){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'},_0x4ebafd);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'},_0x4ebafd);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'},_0x4ebafd);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'},_0x4ebafd);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x4ebafd);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'},_0x4ebafd);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'},_0x4ebafd);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'},_0x4ebafd);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(_0x2f171a,_0x5ea3c9){super(_0x2f171a);const _0x136c5d=_0x3fd960();this['main']=this['createCollection'](),this['editable']=new st(_0x2f171a,_0x5ea3c9,void 0x0,{'label':()=>Et(_0x2f171a,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x2f171a['uiLanguageDirection'],'lang':_0x2f171a['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x136c5d},'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(_0x3e84b8){super(_0x3e84b8),this['view']=new kt(_0x3e84b8['locale'],_0x3e84b8['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x382c85=this['editor']['editing']['view'],_0x895858=this['view']['editable'];_0x895858['name']=_0x382c85['document']['getRoot']()['rootName'],this['view']['render']();const _0x5b6839=_0x895858['element'];this['setEditableElement'](_0x895858['name'],_0x5b6839),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x382c85['attachDomRoot'](_0x5b6839),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0x3b50a4(_0x651c85);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x3f9762={}){(_0x3f9762=Object['assign']({},_0x3f9762))['plugins']||(_0x3f9762['plugins']=CommentEditor['defaultPlugins']),super(_0x3f9762),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 _0xca07a3=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xca07a3))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4a2d4c=>{const _0x5ad4c3=this['model']['document']['getRoot'](),_0x1ea0e3=_0x5ad4c3&&_0x5ad4c3['getChild'](_0x5ad4c3['childCount']-0x1);_0x4a2d4c['setSelection'](_0x1ea0e3,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x55ff9c=this['editing']['view'],_0x46fc8c=_0x55ff9c['document']['getRoot'](),_0x43c9c5=_0x46fc8c['getChild'](0x0);_0x46fc8c['childCount']>0x1||!_0x43c9c5||'p'!=_0x43c9c5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x55ff9c,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x43c9c5['placeholder']=this['placeholder']),ut({'view':_0x55ff9c,'element':_0x43c9c5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x43c9c5);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x2d72d5,_0x3007a1={}){super(_0x2d72d5),this['editor']=null,this['_editorConfig']=_0x3007a1,this['set']('value',_0x3007a1['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x2d72d5,'Reply...')),this['set']('submitLabel',Et(_0x2d72d5,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x2a604e(),this['focusTracker']=new _0x91f952(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x153a2a=>!_0x153a2a['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',(_0x546aeb,_0x5172a1)=>{this['cancelButtonView']['fire']('execute'),_0x5172a1();}),this['keystrokes']['set']('Ctrl+Enter',(_0x99bf97,_0x18fdf2)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x18fdf2());}),this['on']('submit',(_0x3a9934,_0x172000)=>{_0x172000['length']>0xfde8?(alert(Et(_0x2d72d5,'TOO_LONG_COMMENT_ALERT',[_0x172000['length'],0xfde8])),_0x3a9934['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 _0x749eef=this['editor'];this['element']['insertBefore'](_0x749eef['ui']['element'],this['element']['firstChild']),_0x749eef['model']['document']['on']('change',()=>this['value']=_0x749eef['getData']()),_0x749eef['bind']('placeholder')['to'](this),this['focusables']['add'](_0x749eef['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x196de0){-0x1===_0x196de0?(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:_0x16ae9c}=this,_0x203adb=new _0x3e41ef(_0x16ae9c);return _0x203adb['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x203adb['withText']=!0x0,_0x203adb['bind']('label')['to'](this,'submitLabel'),_0x203adb['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x203adb['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x153271,_0x1de541)=>!_0x1de541&&!!_0x153271['trim']()),_0x203adb;}_createCancelButton(){const {locale:_0x48b8f6}=this,_0x375bfe=new _0x3e41ef(_0x48b8f6);return _0x375bfe['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x375bfe['label']=Et(_0x48b8f6,'Cancel'),_0x375bfe['withText']=!0x0,_0x375bfe['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x375bfe;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3e7dfe=>{this['focusTracker']['add'](_0x3e7dfe['element']);}),this['focusables']['on']('change',(_0x57f57d,_0x11618c)=>{for(const _0x3b04f7 of Array['from'](_0x11618c['added'])['reverse']())this['focusTracker']['add'](_0x3b04f7['element']);});}},xt=class extends ht{constructor(_0x1052fc,_0x692cd,_0x534080){super(_0x1052fc),this['commentInputView']=new St(_0x1052fc,_0x534080),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2f100a,_0x101017)=>_0x2f100a||!!_0x101017),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 _0x562d15(_0x1052fc,_0x692cd),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'](_0x30bddd){this['commentInputView']['focus'](_0x30bddd);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x3afc73,_0x12f419)=>{const {submitButtonView:_0xa304ef,cancelButtonView:_0x34e453,editor:_0x212345}=this['commentInputView'];[_0xa304ef['element'],_0x34e453['element'],_0x212345?_0x212345['editing']['view']['getDomRoot']():null]['filter'](_0x24216d=>_0x24216d)['some'](_0x20b55f=>_0x20b55f['contains'](_0x12f419['target']))||(this['focus'](),_0x12f419['preventDefault']());});}},Pt=class extends ht{constructor(_0x1963b1){super(_0x1963b1);const _0x125b8a=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x125b8a['to']('count',_0x4abe3e=>Et(_0x1963b1,'NUMBER_OF_COMMENTS',_0x4abe3e))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x898874,_0x1f48ba,_0x55b8e3){super(_0x898874);const _0xb8bbc4=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1f48ba['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1f48ba,this['_config']=_0x55b8e3,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x91f952(),this['keystrokes']=new _0x2a604e(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x389df7=>this['commentViews']['map'](_0x5cb720=>_0x5cb720['element'])['includes'](_0x389df7['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x898874),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x436de3=>_0x436de3-this['_config']['maxCommentsWhenCollapsed']);for(const _0x7eb70a of _0x1f48ba['comments'])this['_handleNewCommentModel'](_0x7eb70a);this['_handleInfoComment'](),this['listenTo'](_0x1f48ba['comments'],'add',(_0x356e21,_0x530294)=>{const _0x5ce98c=this['_calculatePosition'](_0x530294);this['length']++,this['_handleNewCommentModel'](_0x530294,_0x5ce98c),this['refreshVisibleViews']();}),this['listenTo'](_0x1f48ba['comments'],'remove',(_0x2eff40,_0x1094c9)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1094c9),this['refreshVisibleViews']();}),this['listenTo'](_0x1f48ba,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1f48ba,'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',_0xb8bbc4['if']('length','ck-hidden',_0x49031e=>!_0x49031e)],'aria-label':Et(_0x898874,'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'](_0x2901f6){-0x1===_0x2901f6?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x2fc333 of this['commentViews'])_0x2fc333['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x5edafc,_0x3196da){const _0x124aca=new this['_config']['CommentView'](this['locale'],_0x5edafc,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x124aca['viewUid']=_0x5edafc['id'],_0x124aca['delegate']('removeComment')['to'](this),_0x124aca['delegate']('updateComment')['to'](this),_0x124aca['delegate']('resolveCommentThread')['to'](this),_0x124aca['delegate']('editorReady')['to'](this),_0x124aca['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x124aca,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x124aca,_0x3196da);}_calculatePosition(_0x229a3c){const _0x5bfe4a=this['_model']['_findOptimalIndex'](_0x229a3c);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x229a3c['authoredAt']?_0x5bfe4a-0x1:_0x5bfe4a:_0x5bfe4a-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xcc09ec={'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'],_0xcc09ec,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xcc09ec));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x24f1a3){const _0x4fa21a=this['commentViews']['remove'](_0x24f1a3['id']);this['stopListening'](_0x4fa21a),_0x4fa21a['isEditMode']&&this['_updateHasDirtyComment'](),_0x4fa21a['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1fda24=>_0x1fda24['isEditMode']);}['_rearrangeCollapse'](){const _0x2c67fe=function(_0x6cf861){const _0x4874f5=new _0x40e5e7();for(const _0x1f88b5 of _0x6cf861)_0x4874f5['add'](_0x1f88b5);return _0x4874f5;}(this['commentViews']),_0x59d547=this['_collapsedCommentsView']['count'];for(let _0x49bca4=0x1;_0x49bca4<=_0x59d547;_0x49bca4++)_0x2c67fe['remove'](0x1);for(const _0x55ad3e of _0x2c67fe)_0x55ad3e['collapse']();_0x59d547>0x0&&_0x2c67fe['add'](this['_collapsedCommentsView'],0x1),Dt(_0x48b9c2(Array['from'](this['visibleViews']),Array['from'](_0x2c67fe)),this['visibleViews'],_0x2c67fe);}['_rearrangeExpand'](){Dt(_0x48b9c2(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x43da66 of this['visibleViews'])_0x43da66['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x468744=>{this['focusTracker']['add'](_0x468744['element']),this['keystrokes']['listenTo'](_0x468744['element']);}),this['commentViews']['on']('change',(_0x206e4a,_0x1d3a28)=>{for(const _0x357c5d of _0x1d3a28['removed'])this['focusTracker']['remove'](_0x357c5d['element']),this['keystrokes']['stopListening'](_0x357c5d['element']);for(const _0x7ddb26 of Array['from'](_0x1d3a28['added'])['reverse']())this['focusTracker']['add'](_0x7ddb26['element']),this['keystrokes']['listenTo'](_0x7ddb26['element']);});}};function Dt(_0x1f40c7,_0x337a1d,_0x4cd15b){let _0x3e30e9=0x0;for(const _0x105aa8 of _0x1f40c7)switch(_0x105aa8){case'insert':_0x337a1d['add'](_0x4cd15b['get'](_0x3e30e9),_0x3e30e9),_0x3e30e9++;break;case'delete':_0x337a1d['remove'](_0x3e30e9);break;case'equal':_0x3e30e9++;}}var Vt=class extends ht{constructor(_0x1f0764){super(_0x1f0764);const _0x5c5a1d=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5c5a1d['to']('contextValue',_0x75794=>Et(_0x1f0764,'THREAD_CONTEXT_LABEL',_0x75794)),'tabindex':-0x1},'children':[{'text':_0x5c5a1d['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x49d89f,_0x98fa93){super(_0x49d89f);const _0x5428a2=this['bindTemplate'];this['_model']=_0x98fa93,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x91f952(),this['keystrokes']=new _0x2a604e(),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',_0x5abc28=>!!_0x5abc28),this['bind']('contextValue')['to'](this['_model'],'context',_0x52255c=>_0x52255c&&_0x52255c['value']?this['_trimContextValue'](_0x52255c['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',_0x5428a2['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 _0x111a6b=new _0x3e41ef(this['locale']);return _0x111a6b['label']=Et(this['locale'],'Reopen'),_0x111a6b['tooltip']=Et(this['locale'],'Reopen'),_0x111a6b['icon']=_0x852169,_0x111a6b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x114f9e=>!_0x114f9e),_0x111a6b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4220b1,_0x3b86c4)=>_0x4220b1&&_0x3b86c4),_0x111a6b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x111a6b;}_trimContextValue(_0x230b51){if(_0x230b51['length']<0x96)return _0x230b51;const _0x5c6343=_0x230b51['lastIndexOf']('\x20',0x93);return _0x230b51['substring'](0x0,_0x5c6343>-0x1?_0x5c6343:0x93)+'...';}_attachContextActions(){const _0x487e7f=this['element']['querySelector']('.ck-context'),_0x3f8cd7=_0x487e7f['querySelector']('.ck-context__value');this['listenTo'](_0x487e7f,'mouseenter',()=>{_0x3f8cd7['offsetWidth']<_0x3f8cd7['scrollWidth']&&_0x487e7f['classList']['add']('overlay');}),this['listenTo'](_0x487e7f,'mouseleave',()=>{_0x487e7f['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x27927d of this['focusables'])this['focusTracker']['add'](_0x27927d['element']),this['keystrokes']['listenTo'](_0x27927d['element']);}_createContextView(){const _0x5920f2=new Vt(this['locale']);return _0x5920f2['bind']('contextValue')['to'](this),_0x5920f2;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x5ec459,_0x129a7b,_0x169f78,_0x26e485){super(_0x5ec459),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x129a7b,this['_localUser']=_0x169f78,this['_config']=_0x26e485,this['commentThreadHeaderView']=new Bt(_0x5ec459,_0x129a7b),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x48d34a(_0x5ec459,Et(_0x5ec459,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x5ec459,_0x129a7b,Object['assign']({'CommentView':this['_config']['CommentView']},_0x26e485)),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',(_0x33c970,_0x5702c4)=>_0x33c970||!!_0x5702c4),this['bind']('isUnlinked')['to'](_0x129a7b,'unlinkedAt',_0x22e9d3=>!!_0x22e9d3);let _0xc4eeb9=null;const _0x422f77=()=>{const _0x5e2b69=this['_model']['comments']['first']||null;_0x5e2b69!==_0xc4eeb9&&(_0xc4eeb9&&this['stopListening'](_0xc4eeb9,'change:content'),_0xc4eeb9=_0x5e2b69,_0x5e2b69&&this['listenTo'](_0x5e2b69,'change:content',_0x422f77));const _0x7b9fc4=_0x5e2b69?_0x5e2b69['author']['name']:this['_localUser']['name'],_0x45837b=_0x5e2b69?new DOMParser()['parseFromString'](_0x344d90(_0x5e2b69['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x3be9ae=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x7b9fc4]);this['set']('ariaLabel',_0x45837b?_0x3be9ae+'\x20'+_0x45837b:_0x3be9ae);};this['listenTo'](this['_model']['comments'],'change',_0x422f77),_0x422f77(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x91f952(),this['keystrokes']=new _0x2a604e(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2778a1=>_0x2778a1['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x131846(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x1d951a=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0xe5e31c=_0x1d951a['commentInputView'];return _0x1d951a['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0xe5e31c,'value',(_0x36192a,_0x23d111,_0x7b615b,_0x47cff9,_0x1ce769)=>!!_0x1ce769||!!_0x47cff9&&_0x7b615b&&!_0x23d111||_0x36192a&&_0x7b615b&&!_0x23d111),_0xe5e31c['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5bb4f9,_0x492eb0,_0x5b2490)=>{let _0x1b437a;return _0x1b437a=_0x5b2490&&_0x492eb0?'Reply\x20to\x20reopen\x20discussion...':_0x5bb4f9?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x1b437a);}),_0xe5e31c['bind']('submitLabel')['to'](this,'length',_0x1e5dc1=>Et(this['locale'],_0x1e5dc1?'Reply':'Comment')),_0xe5e31c['on']('submit',(_0x4ac237,_0x13bd12)=>{this['fire']('addComment',_0x13bd12),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0xe5e31c['on']('cancel',()=>{this['focus']();}),_0xe5e31c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xe5e31c['on']('cancel',_0x177cc8=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x177cc8['stop']());}),this['on']('change:isActive',(_0x565be0,_0x1abcac,_0xbea486)=>{_0xbea486||this['length']||_0xe5e31c['value']||this['fire']('removeCommentThread');}),_0x1d951a;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x17600c(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x5973ba,_0x417c1a,_0x198d01,_0x34e2e9){super(_0x5973ba,_0x417c1a,_0x198d01,_0x34e2e9),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5973ba,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x500972,_0xa1d0e,_0x2d0861)=>{_0x2d0861||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1d61e8,_0x27ed6f,_0x2dba7a)=>{_0x2dba7a&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x14d605=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x14d605['if']('isActive','ck-thread--active'),_0x14d605['if']('isUnlinked','ck-thread--unlinked'),_0x14d605['to']('actionIndicator',_0x4811e2=>_0x4811e2?'ck-thread--'+_0x4811e2:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x14d605['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 _0x14afc0 of this['commentsListView']['commentViews'])_0x14afc0['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x3ca57e}=this,_0x4760bd=this['commentsListView']['commentViews']['get'](0x0);_0x4760bd===this['_boundFirstCommentView']||_0x4760bd['isSystemComment']||(this['_boundFirstCommentView']=_0x4760bd,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x4760bd,'actionIndicator',_0x3e7560=>'remove'===_0x3e7560?'remove':null),_0x4760bd['placeholder']=Et(_0x3ca57e,'Write\x20a\x20comment...'),_0x4760bd['removeButton']['on']('execute',_0x28f3a6=>{_0x28f3a6['stop'](),this['showConfirm'](Et(_0x3ca57e,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x4760bd['focus']();}),_0x4760bd['actionBar']['add'](this['resolveButton'],0x0),_0x4760bd['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x3f35b1=new _0x476355(this['locale']);return _0x3f35b1['label']=Et(this['locale'],'Resolve'),_0x3f35b1['tooltip']=Et(this['locale'],'Resolve'),_0x3f35b1['icon']=_0x4e02b7,_0x3f35b1['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x3f35b1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3d21f6=>!_0x3d21f6),_0x3f35b1['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x306267,_0x620984)=>_0x306267&&!_0x620984),_0x3f35b1['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x3f35b1;}_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(_0x11e9d7){super(_0x11e9d7),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x24ef81,_0x292017,_0x44fcd7)=>{this['element']['innerHTML']=_0x44fcd7;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x276e52,_0x1b45cf,_0x3ab7de){super(_0x276e52),this['_model']=_0x1b45cf,this['_config']=_0x3ab7de,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1b45cf,'content',_0x1b45cf,'authoredAt',(_0x4cf9f5,_0x55ebd3)=>Et(_0x276e52,'COMMENT_ARIA_LABEL',[_0x1b45cf['author']['name'],_0x3ab7de['formatDateTime'](_0x55ebd3),new DOMParser()['parseFromString'](_0x4cf9f5,'text/html')['body']['textContent'],_0x1b45cf['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x48d34a(_0x276e52,Et(_0x276e52,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x91f952(),this['keystrokes']=new _0x2a604e(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x146332=>_0x146332['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 _0x20f353=new Wt(this['locale']);return _0x20f353['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x55b6f3,_0x3d1b7c)=>_0x3d1b7c?_0x344d90(_0x55b6f3,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x55b6f3),_0x20f353;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x1933db=new St(this['locale'],this['_config']['editorConfig']);return _0x1933db['value']=this['_model']['content'],_0x1933db['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1933db['submitLabel']=Et(this['locale'],'Save'),_0x1933db['on']('submit',(_0x4f8e64,_0x412535)=>{this['fire']('updateComment',this['_model']['id'],_0x412535),this['switchToDisplayMode'](),this['focus']();}),_0x1933db['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x1933db['once']('editorReady',()=>{_0x1933db['focus']();}),_0x1933db['createEditor'](),_0x1933db['delegate']('editorReady')['to'](this),_0x1933db['delegate']('editorDestroyed')['to'](this),_0x1933db;}_setupKeyboardNavigation(){const _0x5c5834=this['element'];this['keystrokes']['listenTo'](_0x5c5834);for(const _0x30864a of this['focusables'])this['focusTracker']['add'](_0x30864a['element']),this['keystrokes']['listenTo'](_0x30864a['element']);this['focusables']['on']('change',(_0x56fd83,_0x1903ff)=>{for(const _0x270d7f of _0x1903ff['removed'])this['focusTracker']['remove'](_0x270d7f['element']),this['keystrokes']['stopListening'](_0x270d7f['element']);for(const _0x473b16 of _0x1903ff['added'])this['focusTracker']['add'](_0x473b16['element']),this['keystrokes']['listenTo'](_0x473b16['element']);}),this['keystrokes']['set']('enter',(_0xaf06b8,_0x2c0f78)=>{_0x5c5834===_0xaf06b8['target']&&(this['focusCycler']['focusFirst'](),_0x2c0f78());}),this['keystrokes']['set']('esc',(_0x5da187,_0x3671af)=>{_0x5c5834!==_0x5da187['target']&&(this['focus'](),_0x3671af());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x17600c(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x2dd7cb,_0x2f9d4a,_0x55deec){super(_0x2dd7cb,_0x2f9d4a,_0x55deec),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x2dd7cb,'Reply...')),this['bind']('authoredAt')['to'](_0x2f9d4a),this['bind']('resolvedAt')['to'](_0x2f9d4a),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 _0x562d15(_0x2dd7cb,_0x2f9d4a['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2f9d4a,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x5440f0=this['bindTemplate'],_0xc712b3=[{'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':_0x5440f0['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x5440f0['to']('authoredAt',_0x5dda0c=>this['_config']['formatDateTime'](_0x5dda0c))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x5440f0['if']('isEditMode','ck-comment__actions--hidden'),_0x5440f0['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']&&_0xc712b3['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x5440f0['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x5440f0['if']('isEditMode','ck-comment--edit'),_0x5440f0['if']('isSystemComment','ck-comment--info'),_0x5440f0['to']('actionIndicator',_0x97ec6c=>_0x97ec6c?'ck-comment--'+_0x97ec6c:'')],'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':_0xc712b3}]}]};}_createEditButton(){const _0x1daf0b=new _0x3e41ef(this['locale']);return _0x1daf0b['label']=Et(this['locale'],'Edit'),_0x1daf0b['icon']=_0xa2ff04,_0x1daf0b['withText']=!0x0,_0x1daf0b['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1daf0b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5aef3f=>!_0x5aef3f),_0x1daf0b['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1daf0b['on']('execute',()=>this['switchToEditMode']()),_0x1daf0b;}_createRemoveButton(){const _0x566006=new _0x3e41ef(this['locale']);return _0x566006['label']=Et(this['locale'],'Remove'),_0x566006['icon']=_0x49ac6a,_0x566006['withText']=!0x0,_0x566006['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x566006['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x55a2e5=>!_0x55a2e5),_0x566006['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x566006['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x566006;}_createDropdown(){const _0x2f8e09=ct(this['locale'],_0x46f104),_0x43bf4e=_0x2f8e09['panelView']['children'],_0x5d3228=new ot(this['locale']),_0x2993b9=_0x2f8e09['bindTemplate'];dt(_0x2f8e09,()=>this['items']['find'](_0x5a1be6=>_0x5a1be6['isVisible'])),_0x2f8e09['extendTemplate']({'attributes':{'class':[_0x2993b9['if']('isVisible','ck-hidden',_0x36e60a=>!_0x36e60a)]}});const _0x2bc793=(_0x2391b8,_0x10acec=-0x1)=>{const _0x3abad8=new nt(this['locale']);_0x3abad8['children']['add'](_0x2391b8);const _0x3ec95d=_0x10acec>-0x1?_0x10acec:_0x5d3228['items']['length'];_0x5d3228['items']['add'](_0x3abad8,_0x3ec95d);const _0x27cc0d=Array['from'](this['items']);_0x2f8e09['unbind']('isEnabled','isVisible'),_0x2f8e09['bind']('isEnabled')['toMany'](_0x27cc0d,'isEnabled',(..._0x3deda7)=>_0x3deda7['some'](_0x49b460=>_0x49b460)),_0x2f8e09['bind']('isVisible')['toMany'](_0x27cc0d,'isVisible',(..._0x45f8c5)=>_0x45f8c5['some'](_0x453d9b=>_0x453d9b));};_0x2f8e09['panelPosition']='sw',_0x2f8e09['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x133143});for(const _0x4b8108 of this['items'])_0x2bc793(_0x4b8108);return _0x43bf4e['add'](_0x5d3228),_0x2f8e09['listenTo'](this['items'],'add',(_0x5b309c,_0x3cdc59,_0x4e095c)=>{_0x2bc793(_0x3cdc59,_0x4e095c);}),_0x2f8e09['listenTo'](this['items'],'remove',(_0x46a4cb,_0xa6ce5e,_0x9c2271)=>{_0x5d3228['items']['remove'](_0x9c2271);}),_0x2f8e09;}_attachActions(_0x6a87f2,_0x23c758){const _0x4adca1=_0x6a87f2&&_0x6a87f2['element'];_0x4adca1&&(this['listenTo'](_0x4adca1,'mouseenter',()=>this['actionIndicator']=_0x23c758),this['listenTo'](_0x4adca1,'focus',()=>this['actionIndicator']=_0x23c758),this['listenTo'](_0x4adca1,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x4adca1,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x4f5cfd=super['_createCommentInputView']();return _0x4f5cfd['bind']('placeholder')['to'](this),_0x4f5cfd;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x4cdc7f){const _0x2dcad9=_0x34dd5c(_0x4cdc7f,0x1e),_0x234f6c=new MutationObserver(_0x4f8ef6=>{for(const _0x4f9505 of _0x4f8ef6)('attributes'==_0x4f9505['type']&&'class'==_0x4f9505['attributeName']||'childList'==_0x4f9505['type']||'characterData'==_0x4f9505['type'])&&_0x2dcad9();});return{'attach'(_0x1a8abf){_0x234f6c['observe'](_0x1a8abf,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x234f6c['disconnect'](),_0x2dcad9['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x53c702,_0x13e69f){super(_0x53c702),this['id']=_0x3fd960(),this['focusTracker']=new _0x91f952(),this['keystrokes']=new _0x2a604e(),this['keystrokes']['set']('Esc',(_0x4115da,_0x441edd)=>this['fire']('Esc',_0x441edd)),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'](_0x13e69f),this['mainView']=_0x13e69f;const _0x13468d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x13468d['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 _0x47273d=this['element']['clientHeight'];_0x47273d&&(this['height']=_0x47273d);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0x3b50a4();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x386c0a,target:_0x25ca35,type:_0x53675d,isVisible:_0x2e66ce=!0x0}){super(),this['view']=_0x386c0a,this['view']['element']||this['view']['render'](),this['_type']=_0x53675d,this['_target']=_0x25ca35,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x40e5e7([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5f5850,_0x259dae)=>{this['view']['focusTracker']['add'](_0x259dae);}),this['focusableElements']['on']('remove',(_0xcaded2,_0x280a45)=>{this['view']['focusTracker']['remove'](_0x280a45);}),this['set']('isVisible',_0x2e66ce);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x3c4dd5=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x3c4dd5),_0x3c4dd5;}get targetRect(){const _0xb20ab4=this['target'];if(null===_0xb20ab4)return null;if(_0xb20ab4 instanceof _0x3a8ad1)return _0xb20ab4;const _0x268747=_0xb20ab4['filter'](_0x2aef6f=>function(_0x8299e0){return!!_0x8299e0['offsetParent']||!!_0x8299e0['getClientRects']()['item'](0x0);}(_0x2aef6f));return 0x0===_0x268747['length']?null:_0x3a8ad1['getDomElementRects'](_0x268747[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x9a57bb){this['view']['isActive']=_0x9a57bb,this['view']['mainView']['isActive']=_0x9a57bb;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x169c57){if(!(null===_0x169c57||_0x169c57 instanceof _0x3a8ad1||Array['isArray'](_0x169c57)&&_0x169c57['every'](_0x40efe1=>zt(_0x40efe1))))throw new _0x48784c('annotation-invalid-target',null,{'target':_0x169c57});}_getNormalizedTarget(){const _0x50926b='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x50926b)?[_0x50926b]:_0x50926b;}};function zt(_0x3aec5f){return null!==_0x3aec5f&&'object'==typeof _0x3aec5f&&'nodeType'in _0x3aec5f&&0x1===_0x3aec5f['nodeType'];}var Jt=class extends _0x40e5e7{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x3b8d47=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x91f952(),this['_focusTracker']['on']('change:isFocused',(_0x15347f,_0x49fb13,_0xdb7036)=>{_0xdb7036||this['fire']('blur');});for(const _0x3ba78e of _0x3b8d47)this['add'](_0x3ba78e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1db311){if(this['has'](_0x1db311))throw new _0x48784c('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1db311['innerView'],_0x1db311),this['_viewToAnnotation']['set'](_0x1db311['view'],_0x1db311);for(const _0x2fe7db of _0x1db311['focusableElements'])this['_focusTracker']['add'](_0x2fe7db);if(this['listenTo'](_0x1db311['focusableElements'],'add',(_0x260225,_0x5e736f)=>{this['_focusTracker']['add'](_0x5e736f);}),this['listenTo'](_0x1db311['focusableElements'],'remove',(_0x431839,_0xb13938)=>{this['_focusTracker']['remove'](_0xb13938);}),this['listenTo'](_0x1db311['view']['focusTracker'],'change:isFocused',(_0x173a37,_0x3a60c6,_0x51a30a)=>{_0x51a30a&&this['fire']('focus',_0x1db311);}),_0x1db311['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x54c1eb of this)_0x54c1eb['updateTargetRect']();}const _0x38d357=this['_getOrderInContent'](_0x1db311['view']['targetRect']);return super['add'](_0x1db311,_0x38d357);}['remove'](_0x4aefa9){if(!this['has'](_0x4aefa9))throw new _0x48784c('annotationcollection-not-existing-item',null);this['stopListening'](_0x4aefa9['view']['focusTracker']),this['stopListening'](_0x4aefa9['focusableElements']);for(const _0x42b371 of _0x4aefa9['focusableElements'])this['_focusTracker']['remove'](_0x42b371);return this['_viewToAnnotation']['delete'](_0x4aefa9['view']),this['_innerViewToAnnotation']['delete'](_0x4aefa9['innerView']),super['remove'](_0x4aefa9);}getByInnerView(_0x332703){return this['_innerViewToAnnotation']['get'](_0x332703);}getByView(_0x281699){return this['_viewToAnnotation']['get'](_0x281699);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x1963e6 of this)_0x1963e6['updateTargetRect']();this['_sort']();}_sort(){const _0x54bceb=Array['from'](this)['sort']((_0x1dc79d,_0x583efe)=>Zt(_0x1dc79d['view']['targetRect'],_0x583efe['view']['targetRect']));for(let _0x24b4f9=_0x54bceb['length']-0x1;_0x24b4f9>0x0;_0x24b4f9--){const _0x2dea93=_0x54bceb[_0x24b4f9];_0x24b4f9!==this['getIndex'](_0x2dea93)&&(this['remove'](_0x2dea93),this['add'](_0x2dea93));}}_getOrderInContent(_0x40a1b6){let _0xe4397e=0x0;if(!_0x40a1b6)return this['length'];for(const _0x446e37 of this){const _0xa3056c=_0x446e37['view']['targetRect'];if(_0xa3056c){if(Zt(_0x40a1b6,_0xa3056c)<0x0)return _0xe4397e;_0xe4397e++;}}return _0xe4397e;}_areCachedRectsStale(){const _0x3ce09b=this['get'](0x0);if(!_0x3ce09b)return!0x1;const _0x113506=_0x3ce09b['view']['targetRect'],_0x2b988f=_0x3ce09b['targetRect'];return!(!_0x113506||!_0x2b988f)&&(_0x113506['top']!==_0x2b988f['top']||_0x113506['left']!==_0x2b988f['left']);}};function Qt({source:_0x4cac61,target:_0x45d4ae,filter:_0x41c56a}){for(const _0x1dae87 of _0x4cac61)_0x41c56a(_0x1dae87)&&_0x45d4ae['add'](_0x1dae87);_0x45d4ae['listenTo'](_0x4cac61,'add',(_0x4f53bd,_0x356d8a)=>{_0x41c56a(_0x356d8a)&&_0x45d4ae['add'](_0x356d8a);}),_0x45d4ae['listenTo'](_0x4cac61,'remove',(_0x12df36,_0x97c64)=>{_0x45d4ae['has'](_0x97c64)&&_0x45d4ae['remove'](_0x97c64);});}function Zt(_0x4ed680,_0x36c658){if(null===_0x4ed680&&null===_0x36c658)return 0x0;if(null===_0x4ed680)return-0x1;if(null===_0x36c658)return 0x1;const _0x3fae84=_0x4ed680['top']-_0x36c658['top'];return 0x0==_0x3fae84?_0x4ed680['left']-_0x36c658['left']:_0x3fae84;}var ti=class extends _0xa2dbe{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x127992){if(super(_0x127992),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x127992 instanceof _0x651c85){const _0x232145=_0x127992['locale'];_0x127992['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x232145,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x232145,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x232145,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x232145,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x232145,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x232145,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x232145,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5f28ef){this['collection']['add'](_0x5f28ef);}['remove'](_0x2a3504){this['collection']['remove'](_0x2a3504),_0x2a3504['destroy']();}refreshVisibility(){for(const _0x1daf37 of this['collection'])_0x1daf37['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x4c260f){return this['collection']['getByInnerView'](_0x4c260f);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0xef8dd2 of this['collection'])_0xef8dd2['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0xa9cb57){this['fire']('_activateAnnotation',_0xa9cb57);}createAnnotation(_0x5b8a85){return new $t(_0x5b8a85);}createAnnotationView(_0x116956,_0x48c42a){return new qt(_0x116956,_0x48c42a);}_addActiveAnnotation(_0xbfc37a){const _0x405246=new Set(this['activeAnnotations']);_0x405246['add'](_0xbfc37a),this['activeAnnotations']=_0x405246;}_removeActiveAnnotation(_0x19b557){const _0x1fd531=new Set(this['activeAnnotations']);_0x1fd531['delete'](_0x19b557),this['activeAnnotations']=_0x1fd531;}_bindAnnotationsToVisibleAnnotations(){const _0x236c4c=this['collection'],_0x143174=this['_visibleAnnotations'];function _0x494376(_0x1f318d){const _0x47b7b2=_0x1f318d['source'];_0x47b7b2['isVisible']&&!_0x143174['has'](_0x47b7b2)?_0x143174['add'](_0x47b7b2):!_0x47b7b2['isVisible']&&_0x143174['has'](_0x47b7b2)&&_0x143174['remove'](_0x47b7b2),_0x47b7b2['view']['focusTracker']['remove'](_0x47b7b2['view']['element']),_0x47b7b2['view']['focusTracker']['add'](_0x47b7b2['view']['element']);}this['listenTo'](_0x236c4c,'add',(_0x2ff0de,_0x17bfd9)=>{_0x17bfd9['isVisible']&&_0x143174['add'](_0x17bfd9),this['listenTo'](_0x17bfd9,'change:isVisible',_0x494376);}),this['listenTo'](_0x236c4c,'remove',(_0x4d40c5,_0x52bbd4)=>{_0x143174['has'](_0x52bbd4)&&_0x143174['remove'](_0x52bbd4),this['stopListening'](_0x52bbd4,'change:isVisible',_0x494376);});}_setupEnterAnnotationKeystroke(){const _0x483d32=_0x337400=>{_0x337400['on']('ready',()=>{_0x337400['keystrokes']['set'](_0x4ef251,(_0x119ca8,_0x540487)=>{const _0x1934b1=_0x59466b(this['activeAnnotations']['values']());_0x1934b1&&(_0x1934b1['view']['focus'](),_0x540487());});});};this['context']instanceof _0x651c85?_0x483d32(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x429305,_0x4584ef)=>{_0x483d32(_0x4584ef);});}_setupEscapeAnnotationHandling(){const _0x5ea9df=_0x468711=>{const _0x8d50b=_0x468711['source'],_0x60cdd3=[];let _0x592f08;if(Array['isArray'](_0x8d50b['target'])){_0x592f08=_0x8d50b['target'][0x0],this['context']instanceof _0x651c85?_0x60cdd3['push'](this['context']):this['context']['editors']&&_0x60cdd3['push'](...this['context']['editors']);for(const _0x377dcf of _0x60cdd3)for(const _0x2c7596 of _0x377dcf['editing']['view']['domRoots']['values']())if(_0x2c7596['contains'](_0x592f08))return void _0x377dcf['editing']['view']['focus']();_0x592f08['focus']();}};this['listenTo'](this['collection'],'add',(_0x2593d1,_0x1be17d)=>{this['listenTo'](_0x1be17d,'escape',_0x5ea9df,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x407cc2,_0x4d9694)=>{this['stopListening'](_0x4d9694,'escape',_0x5ea9df);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0x3b50a4(),ni=/* #__PURE__ -- @preserve */
31
+ _0x3b50a4();var oi=class extends _0xa2dbe{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x2fc7c7,_0x89d66a];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2eccc0){super(_0x2eccc0),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3e3e07=this['context']['config'];_0x3e3e07['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3e3e07['define']('comments.maxThreadTotalWeight',0x1f4),_0x3e3e07['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3e3e07['define']('comments.CommentThreadView',Ut),_0x3e3e07['define']('comments.CommentView',Yt),_0x3e3e07['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x5949e5=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x370805,_0x5b3b0a)=>this['_addCommentThread'](_0x5b3b0a)),this['on']('submitCommentThread',(_0x564780,_0x24f0dc)=>this['_submitCommentThread'](_0x24f0dc)),this['on']('resolveCommentThread',(_0x259d3b,_0x1f603f)=>this['_resolveCommentThread'](_0x1f603f)),this['on']('resolveCommentThread',(_0x43b901,_0x5f49eb)=>this['_updateActiveAnnotation'](_0x5f49eb),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x22fff9,_0x4c72c8)=>this['_reopenCommentThread'](_0x4c72c8)),this['on']('reopenCommentThread',(_0x3561c0,_0x211e94)=>this['_updateActiveAnnotation'](_0x211e94),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1d363e,_0x2f446f)=>this['_removeCommentThread'](_0x2f446f)),this['on']('updateCommentThread',(_0x378776,_0x37c317)=>this['_updateCommentThread'](_0x37c317)),this['on']('updateCommentThread',(_0x2d404c,_0x3ab506)=>this['_updateActiveAnnotation'](_0x3ab506),{'priority':'lowest'}),this['on']('addComment',(_0x1573d1,_0x27f29a)=>this['_addComment'](_0x27f29a)),this['on']('updateComment',(_0x1910f9,_0x2c2424)=>this['_updateComment'](_0x2c2424)),this['on']('removeComment',(_0x1d41b8,_0x28cce2)=>this['_removeComment'](_0x28cce2)),this['on']('addComment',(_0x473171,{threadId:_0x147bef,isFromAdapter:_0x3a81a2})=>{if(_0x3a81a2)return;const _0xd2b8ab=this['getCommentThread'](_0x147bef),_0x40b91b=_0xd2b8ab&&this['_threadToController']['get'](_0xd2b8ab);_0x40b91b&&_0x40b91b['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5949e5,'change:activeAnnotations',(_0x28e20e,_0x37b240,_0x4ba95f)=>{const _0x48aff0=Array['from'](_0x4ba95f)['map'](_0x4f03b8=>this['_viewToController']['get'](_0x4f03b8['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x48aff0?_0x48aff0['model']:null;});}set adapter(_0x4010cf){if(this['_adapter'])throw new _0x48784c('commentsrepository-adapter-already-set');this['_adapter']=_0x4010cf;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x3a53e5=ii,threadId:_0x5d2a52=_0x3fd960(),comments:_0x29aa02=[],unlinkedAt:_0x52db65=null,resolvedAt:_0x12238f=null,resolvedBy:_0x17a512=null,target:_0x41c6d9=null,context:_0x4ceb5a=null,attributes:_0x20672e={},isResolvable:_0x5eeede=!0x0,isSubmitted:_0x3d703f=!0x1,isFromAdapter:_0x796e6a=!0x1}={}){return this['fire'](ai('addCommentThread',_0x3a53e5),{'channelId':_0x3a53e5,'threadId':_0x5d2a52,'comments':_0x29aa02,'unlinkedAt':_0x52db65,'resolvedAt':_0x12238f,'resolvedBy':_0x17a512,'target':_0x41c6d9,'context':_0x4ceb5a,'attributes':_0x20672e,'isFromAdapter':_0x796e6a,'isResolvable':_0x5eeede,'isSubmitted':_0x3d703f}),this['getCommentThread'](_0x5d2a52);}openNewCommentThread({channelId:_0x1e1f77=ii,threadId:_0x3f0508=_0x3fd960(),target:_0x2c1a96,context:_0x26957f=null,isResolvable:_0x48e68f=!0x0}){if(this['_readOnlyChannels']['has'](_0x1e1f77)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2c1a96)throw new _0x48784c('commentsrepository-missing-target');const _0x47d2fa=this['addCommentThread']({'channelId':_0x1e1f77,'threadId':_0x3f0508,'target':_0x2c1a96,'context':_0x26957f,'isResolvable':_0x48e68f});if(!_0x47d2fa)return null;const _0xfa5733=this['_threadToController']['get'](_0x47d2fa),_0x425880=_0xfa5733['view']['commentThreadInputView']['commentInputView'],_0x32d53f=this['context']['plugins']['get'](ti),_0x2384bd=_0x32d53f['getByInnerView'](_0xfa5733['view']);return _0x32d53f['activate'](_0x2384bd),_0x425880['once']('editorReady',()=>_0x425880['focus']()),_0x47d2fa;}hasCommentThread(_0x344796){if('string'!=typeof _0x344796)throw new _0x48784c('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x344796);}updateCommentThread({channelId:_0x1b7b4d=ii,threadId:_0x3e19dd,context:_0x1fb169,unlinkedAt:_0x4cdc0a,attributes:_0x253182,isFromAdapter:_0x52a228=!0x1}){return this['fire'](ai('updateCommentThread',_0x1b7b4d),{'channelId':_0x1b7b4d,'threadId':_0x3e19dd,'context':_0x1fb169,'unlinkedAt':_0x4cdc0a,'attributes':_0x253182,'isFromAdapter':_0x52a228}),this['getCommentThread'](_0x3e19dd);}getCommentThread(_0x174c62){if('string'!=typeof _0x174c62)throw new _0x48784c('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x174c62);}fetchCommentThread({channelId:_0x40010e,threadId:_0xd81370}={}){const _0x56a8e8=this['getCommentThread'](_0xd81370);if(_0x56a8e8)return Promise['resolve'](_0x56a8e8);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x48784c('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x40010e,'threadId':_0xd81370})['then'](_0x221c92=>this['hasCommentThread'](_0xd81370)?this['getCommentThread'](_0xd81370):_0x221c92?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x40010e},_0x221c92)):void 0x0)['catch'](_0x46bdec=>{throw console['error'](_0x46bdec),new _0x48784c('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x20333b,skipNotAttached:_0x4a657b=!0x1,skipEmpty:_0x4026cb=!0x1,toJSON:_0x53fdc4=!0x1}={}){const _0x43fe1c=[];for(const _0x2f9379 of this['_threads']['values']())_0x20333b&&_0x2f9379['channelId']!==_0x20333b||_0x4a657b&&!_0x2f9379['isAttached']||_0x4026cb&&0x0===_0x2f9379['length']||_0x43fe1c['push'](_0x2f9379);return _0x53fdc4?_0x43fe1c['map'](_0x4730d1=>_0x4730d1['toJSON']()):_0x43fe1c;}getAnnotationForCommentThread(_0x5294f8){const _0x4cc574=this['_threadToController']['get'](_0x5294f8);return _0x4cc574&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x4cc574['view'])||null;}getCommentThreadForAnnotation(_0x13cb5d){const _0x138960=this['_viewToController']['get'](_0x13cb5d['innerView']);return _0x138960?_0x138960['model']:null;}setActiveCommentThread(_0x19961a){const _0x1cd93c=this['context']['plugins']['get'](ti);if(!_0x19961a)return void(this['activeCommentThread']&&_0x1cd93c['deactivateAll']());const _0x2e2994=this['getCommentThread'](_0x19961a);if(!_0x2e2994)throw new _0x48784c('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x19961a});if(!this['_threadToController']['has'](_0x2e2994))throw new _0x48784c('commentsrepository-active-not-attached',null,{'threadId':_0x19961a});const _0x181bcd=_0x1cd93c['getByInnerView'](this['_threadToController']['get'](_0x2e2994)['view']);_0x1cd93c['activate'](_0x181bcd);}switchReadOnly(_0x3287a7,_0xcd3b65){_0x3287a7?this['_readOnlyChannels']['add'](_0xcd3b65):this['_readOnlyChannels']['delete'](_0xcd3b65),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5a9b09){return this['_readOnlyChannels']['has'](_0x5a9b09)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x25cdce,_0x17940e){return new bt(_0x25cdce,_0x17940e);}setPermissions(_0x716944,_0x446019=ii){this['_permissions']['set'](_0x446019,_0x716944),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x5c810b=ii){return this['_permissions']['has'](_0x5c810b)?this['_permissions']['get'](_0x5c810b):ei;}_addCommentThread({channelId:_0x500879,threadId:_0x23b202,comments:_0xcf3145,unlinkedAt:_0x52956b,resolvedAt:_0x30918b,resolvedBy:_0x3f1438,target:_0x10c3f1,context:_0x584532,attributes:_0x2ac2a3,isFromAdapter:_0x31dcbc,isResolvable:_0x18372b,isSubmitted:_0x4d103e}){if('string'!=typeof _0x23b202)throw new _0x48784c('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x23b202});if(this['hasCommentThread'](_0x23b202))throw new _0x48784c('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x23b202});const _0xc8187f=new ri(this,{'channelId':_0x500879,'id':_0x23b202,'context':_0x584532,'attributes':_0x2ac2a3,'unlinkedAt':_0x52956b,'resolvedAt':_0x30918b,'resolvedBy':_0x3f1438?this['context']['plugins']['get'](_0x89d66a)['getUser'](_0x3f1438):null,'isResolvable':_0x18372b,'isSubmitted':_0x4d103e||_0x31dcbc});this['_threads']['set'](_0x23b202,_0xc8187f);for(const _0x170dbb of _0xcf3145)_0xc8187f['_add'](this['_createNewComment']({'threadId':_0x23b202,..._0x170dbb}));return _0x10c3f1&&_0xc8187f['attachTo'](_0x10c3f1),_0x31dcbc||!_0xc8187f['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x500879,'threadId':_0x23b202});}_submitCommentThread({channelId:_0x5d560b,threadId:_0x43ff13}){if(!this['hasCommentThread'](_0x43ff13))throw new _0x48784c('commentsrepository-missing-comment-thread',this);const _0x4866b1=this['getCommentThread'](_0x43ff13);if(_0x4866b1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x3aec35,comments:_0x528e87,resolvedAt:_0x9a6815,resolvedBy:_0x52ba1b,context:_0xb96d03,attributes:_0x53de15}=_0x4866b1,_0x202a96=this['context']['plugins']['get']('PendingActions'),_0x3e5810=_0x202a96['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x5d560b,'threadId':_0x3aec35,'comments':_0x528e87['map'](_0x1b0c7b=>_0x1b0c7b['toJSON']()),'resolvedAt':_0x9a6815,'resolvedBy':_0x52ba1b?_0x52ba1b['id']:_0x52ba1b,'context':_0xb96d03,'attributes':_0x53de15})['then'](({comments:_0x5f3a07})=>{_0x202a96['remove'](_0x3e5810);for(const _0x4ca145 of _0x5f3a07)this['_updateComment']({'channelId':_0x5d560b,'threadId':_0x43ff13,'commentId':_0x4ca145['commentId'],'createdAt':_0x4ca145['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x41e0c1=>{throw console['error'](_0x41e0c1),new _0x48784c('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x4f2bdb,target:_0x55acb5}){const _0x3542b3=this['getCommentThread'](_0x4f2bdb);if(!_0x3542b3)throw new _0x48784c('commentsrepository-attach-missing-comment-thread',this);const _0x50922d=this['context']['plugins']['get']('PendingActions'),_0x29c925=this['context']['plugins']['get'](ti),_0x3a7dd3=this['_createCommentThreadView'](_0x3542b3),_0x4b5e7b=new bt(_0x3542b3,_0x3a7dd3);let _0x358016=null;_0x3a7dd3['on']('change:isDirty',(_0x5c32b5,_0x494d3c,_0x39b5f2)=>{_0x39b5f2?_0x358016=_0x50922d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x358016&&(_0x50922d['remove'](_0x358016),_0x358016=null);}),this['_threadToController']['set'](_0x3542b3,_0x4b5e7b),this['_viewToController']['set'](_0x3a7dd3,_0x4b5e7b);const _0x148241=new qt(this['context']['locale'],_0x3a7dd3);_0x148241['bind']('length')['to'](_0x3a7dd3),_0x148241['bind']('isDirty')['to'](_0x3a7dd3,'isDirty',_0x3a7dd3,'length',(_0x2fad70,_0x10888d)=>_0x2fad70||!_0x10888d),_0x148241['bind']('isActive')['to'](_0x3a7dd3),_0x148241['type']='comment';const _0x4aa455=new $t({'view':_0x148241,'target':_0x55acb5,'type':'comment','isVisible':!_0x3542b3['archivedAt']&&!!('function'==typeof _0x55acb5?_0x55acb5():_0x55acb5)});return _0x3a7dd3['on']('escape',()=>{_0x4aa455['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3a7dd3,_0x4aa455),_0x29c925['add'](_0x4aa455),_0x4aa455;}_bindAnnotationToEditors(_0x2416e1,_0x9532db){this['listenTo'](_0x2416e1,'editorReady',(_0x12f858,_0xfee052)=>{const _0x3a2570=_0xfee052['ui']['view']['body']['bodyCollectionContainer'];_0x9532db['focusableElements']['add'](_0x3a2570),this['context']instanceof _0x651c85&&this['context']['ui']['focusTracker']['add'](_0x3a2570);},{'priority':'highest'}),this['listenTo'](_0x2416e1,'editorDestroyed',(_0x3a7b11,_0x17d439)=>{const _0x3e9c75=_0x17d439['ui']['view']['body']['bodyCollectionContainer'];_0x9532db['focusableElements']['has'](_0x3e9c75)&&_0x9532db['focusableElements']['remove'](_0x3e9c75),this['context']instanceof _0x651c85&&this['context']['ui']['focusTracker']['remove'](_0x3e9c75);});}_unbindEditors(_0x44e387){this['stopListening'](_0x44e387,'editorReady'),this['stopListening'](_0x44e387,'editorDestroyed');}_createCommentThreadView(_0x422bd2){const _0x2f6335=this['context']['plugins']['get'](_0x89d66a),{config:_0x23d6b5,locale:_0x7441d9}=this['context'],_0x3182c7=_0x51bb95(_0x23d6b5['get']('locale'),_0x7441d9);return new(0x0,(_0x23d6b5['get']('comments'))['CommentThreadView'])(_0x7441d9,_0x422bd2,_0x2f6335['me'],{'editorConfig':{..._0x23d6b5['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x23d6b5['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x23d6b5['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x23d6b5['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x23d6b5['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3182c7,'CommentView':_0x23d6b5['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x2aae01,channelId:_0x239e52,resolvedAt:_0x81dd7c,resolvedBy:_0x44db8b,isFromAdapter:_0x5ca046}){if(!this['hasCommentThread'](_0x2aae01))throw new _0x48784c('commentsrepository-missing-comment-thread',null,{'threadId':_0x2aae01});const _0x4272f7=this['getCommentThread'](_0x2aae01);if(_0x4272f7['isResolved'])throw new _0x48784c('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2aae01});const _0x7a3bf9=this['context']['plugins']['get'](_0x89d66a);if(_0x4272f7['resolvedBy']=_0x7a3bf9['getUser'](_0x44db8b),_0x4272f7['resolvedAt']=_0x81dd7c,_0x5ca046||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x58c03b=this['context']['plugins']['get']('PendingActions'),_0x31a522=_0x58c03b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x239e52,'threadId':_0x2aae01})['then'](({resolvedAt:_0x1e8e9a,resolvedBy:_0x185748})=>{_0x58c03b['remove'](_0x31a522),_0x4272f7['resolvedBy']['id']!==_0x185748&&(_0x4272f7['resolvedBy']=_0x7a3bf9['getUser'](_0x185748)),_0x4272f7['resolvedAt']=_0x1e8e9a;})['catch'](_0x1ec815=>{throw console['error'](_0x1ec815),new _0x48784c('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x38ea90,channelId:_0x2a31f6,isFromAdapter:_0x5183b2}){if(!this['hasCommentThread'](_0x38ea90))throw new _0x48784c('commentsrepository-missing-comment-thread',null,{'threadId':_0x38ea90});const _0x225022=this['getCommentThread'](_0x38ea90);if(!_0x225022['isResolved'])throw new _0x48784c('commentsrepository-reopen-comment-thread',null,{'threadId':_0x38ea90});if(_0x225022['resolvedBy']=null,_0x225022['resolvedAt']=null,_0x5183b2||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x209371=this['context']['plugins']['get']('PendingActions'),_0x588f23=_0x209371['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2a31f6,'threadId':_0x38ea90})['then'](()=>_0x209371['remove'](_0x588f23))['catch'](_0x135160=>{throw console['error'](_0x135160),new _0x48784c('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x5f0656,isFromAdapter:_0x35f95f}){const _0x32b318=this['getCommentThread'](_0x5f0656);if(!_0x32b318)throw new _0x48784c('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5f0656),this['_threads']['delete'](_0x5f0656),!_0x32b318['isSubmitted']||_0x35f95f||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x222aaa=this['context']['plugins']['get']('PendingActions'),{channelId:_0x55dd50}=_0x32b318,_0x3884fd=_0x222aaa['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x55dd50,'threadId':_0x5f0656})['then'](()=>_0x222aaa['remove'](_0x3884fd))['catch'](_0x5d9feb=>{throw console['error'](_0x5d9feb),new _0x48784c('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x170ee5,unlinkedAt:_0x358eb3,context:_0x351639,attributes:_0x30c831,isFromAdapter:_0x81a903}){if('string'!=typeof _0x170ee5)throw new _0x48784c('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x170ee5});if(!this['hasCommentThread'](_0x170ee5))throw new _0x48784c('commentsrepository-missing-comment-thread',null,{'threadId':_0x170ee5});const _0x5594a6=this['getCommentThread'](_0x170ee5);let _0x3a28f2=!0x1;if(void 0x0!==_0x351639&&_0x5594a6['context']!==_0x351639&&(_0x5594a6['context']=_0x351639,_0x3a28f2=!0x0),void 0x0!==_0x358eb3&&_0x5594a6['unlinkedAt']!==_0x358eb3&&(_0x5594a6['unlinkedAt']=_0x358eb3,_0x3a28f2=!0x0),_0x30c831&&!_0x51876e(_0x30c831,_0x5594a6['attributes'])&&(_0x5594a6['attributes']=_0x30c831,_0x3a28f2=!0x0),!_0x3a28f2)return Promise['resolve']();if(!_0x5594a6['isSubmitted']||_0x81a903||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2e2782=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5308f8}=_0x5594a6,_0x4d6470=_0x2e2782['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5308f8,'threadId':_0x170ee5,'context':_0x351639,'unlinkedAt':_0x358eb3,'attributes':_0x30c831})['then'](()=>_0x2e2782['remove'](_0x4d6470))['catch'](_0x4043e2=>{throw console['error'](_0x4043e2),new _0x48784c('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x407277){const _0x5c54d3=this['context']['plugins']['get'](ti),_0x29668c=this['getCommentThread'](_0x407277);if(_0x29668c['_isAttached']=!0x1,this['_threadToController']['has'](_0x29668c)){const _0x18dcd6=this['_threadToController']['get'](_0x29668c),_0x16c363=_0x18dcd6['view'],_0x69c0ec=_0x5c54d3['getByInnerView'](_0x16c363);this['_threadToController']['delete'](_0x29668c),this['_viewToController']['delete'](_0x16c363),_0x69c0ec&&_0x5c54d3['remove'](_0x69c0ec),_0x18dcd6['destroy'](),_0x16c363['destroy']()['then'](()=>{this['_unbindEditors'](_0x16c363);});}}_updateActiveAnnotation({threadId:_0x3356ec,resolvedAt:_0x15eaed,unlinkedAt:_0x165eed}){const _0x3abdf1=!!_0x15eaed,_0x457360=this['context']['plugins']['get'](ti),_0xc40686=this['getCommentThread'](_0x3356ec);if(this['_threadToController']['has'](_0xc40686)){const _0xd1f958=this['_threadToController']['get'](_0xc40686)['view'],_0x3f8d06=_0x457360['getByInnerView'](_0xd1f958);_0x3f8d06&&(_0x3abdf1&&_0x457360['_removeActiveAnnotation'](_0x3f8d06),_0x165eed?_0x3f8d06['isVisible']=!0x1:_0x3f8d06['refreshVisibility']());}}_getExternalAuthor(_0x358e9a){const _0x53e614=this['context']['plugins']['get'](_0x89d66a),_0x3884bd=_0x362dd1('external:'+_0x358e9a),_0x2b531b=_0x53e614['getUser'](_0x3884bd);return _0x2b531b||_0x53e614['addUser']({'id':_0x3884bd,'name':_0x358e9a});}_createNewComment({threadId:_0x153084,commentId:_0x77164d=_0x3fd960(),content:_0x3f9dc0,authorId:_0x33102f,createdAt:_0x5b9cb0,attributes:_0x2b7e4d}){if('string'!=typeof _0x77164d)throw new _0x48784c('commentsrepository-invalid-commentid');if('string'!=typeof _0x33102f)throw new _0x48784c('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3f9dc0||!_0x3f9dc0['trim']())throw new _0x48784c('commentsrepository-invalid-comment-content');const _0x54b564=this['context']['plugins']['get'](_0x89d66a)['getUser'](_0x33102f);if(!_0x54b564)throw new _0x48784c('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x33102f});let _0x11571e=null,_0x5d611f=_0x5b9cb0;return _0x2b7e4d?.['@external']&&(_0x11571e=this['_getExternalAuthor'](_0x2b7e4d['@external']['authorName']),_0x5d611f=new Date(_0x2b7e4d['@external']['createdAt'])),new hi(this,{'threadId':_0x153084,'id':_0x77164d,'author':_0x11571e||_0x54b564,'creator':_0x54b564,'content':_0x3f9dc0,'createdAt':_0x5b9cb0,'authoredAt':_0x5d611f,'attributes':_0x2b7e4d});}_addComment(_0x44ae93){let {threadId:_0x37fcd8,content:_0x1bb0b6,attributes:_0x4dda7a,isFromAdapter:_0x272c11}=_0x44ae93;const _0x38be4b=this['getCommentThread'](_0x44ae93['threadId']);if(!_0x38be4b)throw new _0x48784c('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xcdf385=this['_createNewComment'](_0x44ae93),{id:_0xa4733b}=_0xcdf385;if(_0x38be4b['_add'](_0xcdf385),_0x272c11||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x38be4b['isSubmitted'])return Promise['resolve']();const _0x271804=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4762f4}=_0x38be4b,_0x1dd302=_0x271804['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4dda7a||(_0x4dda7a={}),this['adapter']['addComment']({'channelId':_0x4762f4,'threadId':_0x37fcd8,'commentId':_0xa4733b,'content':_0x1bb0b6,'attributes':_0x4dda7a})['then'](_0x151ffe=>{_0x271804['remove'](_0x1dd302),_0x151ffe&&this['_updateComment']({'channelId':_0x4762f4,'threadId':_0x37fcd8,'commentId':_0xa4733b,'createdAt':_0x151ffe['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1960a1=>{throw console['error'](_0x1960a1),new _0x48784c('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x46ff30,commentId:_0xf48166,content:_0x1c17f1,createdAt:_0x2df4b0,attributes:_0xda8dfb,isFromAdapter:_0x1a5f33}){if(void 0x0!==_0x1c17f1&&('string'!=typeof _0x1c17f1||!_0x1c17f1['trim']()['length']))throw new _0x48784c('commentsrepository-update-comment-invalid-content');const _0x104929=this['getCommentThread'](_0x46ff30),_0x412037=_0x104929['getComment'](_0xf48166);if(!_0x412037)throw new _0x48784c('commentsrepository-update-missing-comment',this);let _0x318536=!0x1;if(_0x1c17f1&&_0x1c17f1!==_0x412037['content']&&(_0x412037['isEditable']||_0x1a5f33)&&(_0x412037['content']=_0x1c17f1,_0x318536=!0x0),_0x2df4b0&&_0x2df4b0!==_0x412037['createdAt']&&(_0x412037['createdAt']=_0x2df4b0,_0x412037['isExternal']||(_0x412037['authoredAt']=_0x2df4b0),_0x318536=!0x0),_0xda8dfb&&!_0x51876e(_0xda8dfb,_0x412037['attributes'])&&(_0x412037['attributes']=_0xda8dfb,_0x318536=!0x0),!_0x318536)return Promise['resolve']();if(_0x104929['fire']('commentUpdated'),_0x1a5f33||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x268cfc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3020a4}=this['getCommentThread'](_0x412037['threadId']),_0x58a8b6=_0x268cfc['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3020a4,'threadId':_0x46ff30,'commentId':_0xf48166,'content':_0x1c17f1,'attributes':_0xda8dfb})['then'](()=>_0x268cfc['remove'](_0x58a8b6))['catch'](_0x322466=>{throw console['error'](_0x322466),new _0x48784c('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x52a19d,commentId:_0x217c01,isFromAdapter:_0x2d88ee}){const _0x28c10e=this['getCommentThread'](_0x52a19d),_0x48a395=_0x28c10e['getComment'](_0x217c01);if(!_0x48a395)throw new _0x48784c('commentsrepository-remove-missing-comment',this);if(_0x28c10e['_remove'](_0x48a395),_0x2d88ee||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x238fcf=this['context']['plugins']['get']('PendingActions'),{channelId:_0x133c0d}=_0x28c10e,_0x16f49b=_0x238fcf['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x133c0d,'threadId':_0x52a19d,'commentId':_0x217c01})['then'](()=>_0x238fcf['remove'](_0x16f49b))['catch'](_0x43411f=>{throw console['error'](_0x43411f),new _0x48784c('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x52be01,_0x1bf6ab){super();const _0x5491a8=_0x1bf6ab['isResolvable'];this['channelId']=_0x1bf6ab['channelId'],this['id']=_0x1bf6ab['id'],this['comments']=new _0x40e5e7(),this['_repository']=_0x52be01,this['_isAttached']=!0x1,this['_isSubmitted']=_0x1bf6ab['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x52be01,'_permissions',_0x52be01,'_readOnlyChannels',()=>_0x52be01['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x52be01,'_permissions',()=>_0x52be01['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x52be01,'_permissions',()=>{const _0x371e7a=_0x52be01['getPermissions'](this['channelId']);return _0x371e7a['write']||_0x371e7a['admin'];}),this['bind']('isResolvable')['to'](_0x52be01,'_permissions',()=>_0x5491a8&&_0x52be01['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x1bf6ab['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x555b38,_0x3c2df1)=>_0x555b38?_0x3c2df1?_0x555b38<_0x3c2df1?_0x555b38:_0x3c2df1:_0x555b38:_0x3c2df1),this['set']('unlinkedAt',_0x1bf6ab['unlinkedAt']||null),this['set']('resolvedAt',_0x1bf6ab['resolvedAt']||null),this['set']('resolvedBy',_0x1bf6ab['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x280eeb=>!!_0x280eeb),this['set']('attributes',_0x1bf6ab['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x53f329,_0x13b0f9)=>_0x53f329+_0x13b0f9['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x18c53c,id:_0x347865}=this;this['_repository']['fire'](ai('submitCommentThread',_0x18c53c),{'channelId':_0x18c53c,'threadId':_0x347865});}setUnlinkedAt(_0x1ec33d){this['_update']({'unlinkedAt':_0x1ec33d});}['resolve']({resolvedAt:_0x2e9b7d=new Date(),resolvedBy:_0x299954='',isFromAdapter:_0x309533=!0x1}={}){const _0x35e205=this['_repository']['context']['plugins']['get'](_0x89d66a)['me'],{channelId:_0x44f1a8,id:_0x4cdaea}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x44f1a8),{'channelId':_0x44f1a8,'threadId':_0x4cdaea,'resolvedAt':_0x2e9b7d,'resolvedBy':_0x299954||_0x35e205['id'],'isFromAdapter':_0x309533});}['reopen']({isFromAdapter:_0x120fed=!0x1}={}){const {channelId:_0x52f647,id:_0x7a842b}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x52f647),{'channelId':_0x52f647,'threadId':_0x7a842b,'isFromAdapter':_0x120fed});}setContext(_0x19eec0){this['context']||this['_update']({'context':_0x19eec0});}setAttribute(_0x5f0cc,_0x7a595d){const _0x271f22=_0x180e09(this['attributes']);_0x579040(_0x271f22,_0x5f0cc,_0x7a595d),this['_update']({'attributes':_0x271f22});}removeAttribute(_0x362606){const _0x26d1e1=_0x180e09(this['attributes']);_0x4bbee6(_0x26d1e1,_0x362606),this['_update']({'attributes':_0x26d1e1});}['remove']({isFromAdapter:_0x365ce8=!0x1}={}){const {channelId:_0x5c935a,id:_0x16e891}=this;this['_repository']['fire'](ai('removeCommentThread',_0x5c935a),{'channelId':_0x5c935a,'threadId':_0x16e891,'isFromAdapter':_0x365ce8});}attachTo(_0x14d4cb){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x14d4cb});}addComment(_0x29d609){const {channelId:_0x3b9752,id:_0x246d58}=this;this['_repository']['fire'](ai('addComment',_0x3b9752,_0x246d58),Object['assign']({'channelId':_0x3b9752,'threadId':_0x246d58},_0x29d609));}getComment(_0x594fbe){if('string'!=typeof _0x594fbe)throw new _0x48784c('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x594fbe});return this['comments']['get'](_0x594fbe);}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'](_0x2611cb=>_0x2611cb['toJSON']()),'attributes':this['attributes']};}['_add'](_0x202971){return this['listenTo'](_0x202971,'change:authoredAt',()=>{const _0x2af453=this['_findOptimalIndex'](_0x202971),_0x401c44=this['comments'];_0x2af453-0x1!=_0x401c44['getIndex'](_0x202971)&&_0x2af453+0x1!=_0x401c44['getIndex'](_0x202971)&&(this['_remove'](_0x202971),this['_add'](_0x202971));}),this['comments']['add'](_0x202971,this['_findOptimalIndex'](_0x202971));}_update(_0x6e05d1){const {channelId:_0x3c687c,id:_0x555934}=this;this['_repository']['fire'](ai('updateCommentThread',_0x3c687c),{..._0x6e05d1,'channelId':_0x3c687c,'threadId':_0x555934});}['_remove'](_0x4f44ba){return this['stopListening'](_0x4f44ba),_0x4f44ba['destroy'](),this['comments']['remove'](_0x4f44ba);}_findOptimalIndex(_0x174117){const _0x256cdf=this['comments']['find'](_0x184ed0=>new Date(_0x184ed0['authoredAt'])['getTime']()>new Date(_0x174117['authoredAt'])['getTime']());return _0x256cdf?this['comments']['getIndex'](_0x256cdf):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x5c4b59,_0x2266a1){super();const _0x2eb698=_0x5c4b59['context']['plugins']['get'](_0x89d66a)['me'],_0xa8255f=_0x5c4b59['getCommentThread'](_0x2266a1['threadId']),_0x2a23f2=0x0===_0xa8255f['comments']['length'],_0x3d4686=_0x2eb698===_0x2266a1['author'];this['id']=_0x2266a1['id'],this['threadId']=_0x2266a1['threadId'],this['author']=_0x2266a1['author'],this['creator']=_0x2266a1['creator'],this['set']('content',_0x2266a1['content']),this['createdAt']=_0x2266a1['createdAt']||new Date(),this['set']('authoredAt',_0x2266a1['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xa8255f,'resolvedAt'),this['set']('attributes',_0x2266a1['attributes']||{}),this['bind']('isEditable')['to'](_0x5c4b59,'_permissions',()=>{const _0x3c937a=_0x5c4b59['getPermissions'](_0xa8255f['channelId'])['write'],_0x2d7103=_0x5c4b59['getPermissions'](_0xa8255f['channelId'])['modifyAll'];return _0x3d4686&&_0x3c937a||!_0x3d4686&&_0x2d7103;}),this['bind']('isRemovable')['to'](_0xa8255f,'isRemovable',_0x5c4b59,'_permissions',_0x41ac6e=>{const _0x198f33=_0x5c4b59['getPermissions'](_0xa8255f['channelId'])['write'],_0x451a01=_0x5c4b59['getPermissions'](_0xa8255f['channelId'])['modifyAll'];return _0x3d4686&&_0x198f33||_0x41ac6e&&_0x2a23f2||!_0x3d4686&&_0x451a01&&!_0x2a23f2;}),this['bind']('isReadOnly')['to'](_0xa8255f,'isReadOnly'),this['_repository']=_0x5c4b59;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x3ba449){const _0x1c558a=document['createElement']('div');return _0x1c558a['innerHTML']=_0x3ba449,_0x1c558a['textContent']['length'];}(this['content']),0xc8);}update(_0xed8af4){const {threadId:_0x12d9b9,id:_0x30d817}=this;if(!this['_repository']['hasCommentThread'](_0x12d9b9))throw new _0x48784c('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x140270}=this['_repository']['getCommentThread'](_0x12d9b9);this['_repository']['fire'](ai('updateComment',_0x140270,_0x12d9b9),{'channelId':_0x140270,'threadId':_0x12d9b9,'commentId':_0x30d817,..._0xed8af4});}setAttribute(_0x33ad17,_0x5088dd){const _0x31f29a=_0x180e09(this['attributes']);_0x579040(_0x31f29a,_0x33ad17,_0x5088dd),this['update']({'attributes':_0x31f29a});}removeAttribute(_0x51bf64){const _0xe82df8=_0x180e09(this['attributes']);_0x4bbee6(_0xe82df8,_0x51bf64),this['update']({'attributes':_0xe82df8});}['remove'](_0x33b1d9={}){if(!_0x33b1d9['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2cc18e,id:_0x4e4005}=this;if(!this['_repository']['hasCommentThread'](_0x2cc18e))throw new _0x48784c('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x36d244}=this['_repository']['getCommentThread'](_0x2cc18e);this['_repository']['fire'](ai('removeComment',_0x36d244,_0x2cc18e),{'channelId':_0x36d244,'threadId':_0x2cc18e,'commentId':_0x4e4005,..._0x33b1d9});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x5cc65d,..._0x460bb1){for(const _0x32e969 of _0x460bb1)void 0x0!==_0x32e969&&(_0x5cc65d+=':'+String(_0x32e969));return _0x5cc65d;}var ci=class extends _0x1efa30{constructor(_0x5d0732){super(_0x5d0732),this['set']('hasContent',!0x1);}['refresh'](){const _0x28480a=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xcc2f35 of _0x28480a['getRanges']())if(this['_hasContent'](_0xcc2f35))return void(this['hasContent']=!0x0);}execute({threadId:_0x1dcaa4=_0x3fd960(),ranges:_0x409318,comment:_0x510f12}={}){const _0x591a41=this['editor']['model'],_0x5114a0=_0x409318??Array['from'](_0x591a41['document']['selection']['getRanges']()),_0x19935d=[];for(const _0x437a4f of _0x5114a0)this['_hasContent'](_0x437a4f)&&_0x19935d['push'](this['_trimToContent'](_0x437a4f));if(!_0x19935d['length'])throw new _0x48784c('addcommentthreadcommand-incorrect-ranges',null);_0x510f12&&this['_createCommentThread'](_0x1dcaa4,_0x510f12),this['_createMarkersFromRanges'](_0x1dcaa4,_0x19935d,!!_0x510f12);}_createMarkersFromRanges(_0x2f6dfe,_0x2c3d2e,_0x16888){this['editor']['model']['change'](_0x355b5b=>{for(const _0x27e45b of _0x2c3d2e){const _0x325d17='comment:'+_0x2f6dfe+':'+_0x3fd960()['substr'](0x1,0x5);_0x355b5b['addMarker'](_0x325d17,{'range':_0x27e45b,'usingOperation':_0x16888,'affectsData':_0x16888});}});}_createCommentThread(_0x2f21a6,_0x4325e0){const _0xe933f3=this['editor']['plugins']['get']('CommentsRepository'),_0x105e29=this['editor']['config']['get']('collaboration.channelId'),_0x304647=this['editor']['plugins']['get']('Users')['me'];if(!_0x304647)throw new _0x48784c('addcommentthreadcommand-user-not-found',null);_0xe933f3['addCommentThread']({'threadId':_0x2f21a6,'channelId':_0x105e29,'comments':[{'authorId':_0x304647['id'],'content':_0x4325e0,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x510c27){for(const _0x42d47d of _0x510c27['getItems']())if(this['_itemIsContent'](_0x42d47d))return!0x0;return!0x1;}_itemIsContent(_0xd0aa8d){return _0xd0aa8d['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xd0aa8d)&&!_0xd0aa8d['is']('element','tableCell');}_trimToContent(_0x76a43f){const _0x1366af=_0x4532dd=>!this['_itemIsContent'](_0x4532dd['item']),_0x16ec09=_0x76a43f['start']['getLastMatchingPosition'](_0x1366af),_0x2ae6e0=_0x76a43f['end']['getLastMatchingPosition'](_0x1366af,{'direction':'backward'});return this['editor']['model']['createRange'](_0x16ec09,_0x2ae6e0);}},di=class extends _0x53a0a0{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39daf7){super(_0x39daf7),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x41697a=this['editor'],_0x1dbb0c=_0x41697a['model']['document']['selection'],_0x17e467=_0x121a24(()=>this['refreshSelectedViews'](),0xa);_0x1dbb0c['on']('change:range',(_0x50faad,_0x4dc8ee)=>{_0x4dc8ee['directChange']&&(_0x17e467['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x41697a['editing']['view']['document'],'change:isFocused',(_0xe0e3e9,_0x52b1cf,_0xec10f)=>{_0xec10f&&_0x17e467();}),this['listenTo'](_0x41697a['ui']['focusTracker'],'change:isFocused',(_0x18471e,_0x2b1e8c,_0x2b50f1)=>{_0x2b50f1||this['fire']('blur',{'isAnnotationTracked':_0x11b065=>this['_editorAnnotationsData']['has'](_0x11b065['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0xafbfaf){if(this['_editorAnnotations']['has'](_0xafbfaf['view']))return;this['_editorAnnotations']['add'](_0xafbfaf['view']),this['editor']['ui']['focusTracker']['add'](_0xafbfaf['view']['element']);const _0x6fcc84=this['editor']['plugins']['get'](ti);this['listenTo'](_0x6fcc84['collection'],'remove',(_0x15301d,_0xc837ca)=>{this['editor']['ui']['focusTracker']['remove'](_0xc837ca['view']['element']),this['_editorAnnotations']['delete'](_0xc837ca['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0xecfc12){if('function'!=typeof _0xecfc12)throw new _0x48784c('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xecfc12);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x224b17,annotations:_0x4ecc59}){const _0x142719=[],_0x19378d=this['editor']['model']['document']['selection'],_0x28d5dc=Array['from'](_0x19378d['getRanges']());for(const [_0x2472c7,_0x633865]of this['_editorAnnotationsData']){const _0x43636d=_0x3e6647(_0x633865),_0x3f94e0=_0x4ecc59['getByInnerView'](_0x2472c7);_0x43636d&&_0x3f94e0&&_0x142719['push']({'annotation':_0x3f94e0,'range':_0x43636d});}function _0x3e6647(_0x31fed6){for(const _0x3906a8 of _0x31fed6)for(const _0x54f6bf of _0x28d5dc)if(_0x3906a8['containsRange'](_0x54f6bf,!_0x19378d['isCollapsed']))return _0x3906a8;return null;}const _0x7f17f4=new Map(Array['from'](_0x4ecc59,(_0xc1dc7e,_0x4d1f34)=>[_0xc1dc7e,_0x4d1f34]));return _0x142719['sort']((_0x40fa3f,_0x35bcef)=>{const _0x392856=_0x40fa3f['range'],_0x254033=_0x35bcef['range'];if(!_0x392856['isEqual'](_0x254033)){if(_0x392856['containsRange'](_0x254033,!0x0))return 0x1;if(_0x254033['containsRange'](_0x392856,!0x0))return-0x1;}return _0x40fa3f['annotation']==_0x224b17?-0x1:_0x35bcef['annotation']==_0x224b17?0x1:(_0x7f17f4['get'](_0x40fa3f['annotation'])??0x0)-(_0x7f17f4['get'](_0x35bcef['annotation'])??0x0);})['map'](_0x2d7d76=>_0x2d7d76['annotation']);}get _editorAnnotationsData(){const _0x2d9c84=new Map();for(const _0x2156ca of Array['from'](this['_dataCollectors']))for(const [_0x57d675,_0x403cb7]of _0x2156ca())_0x2d9c84['set'](_0x57d675,_0x403cb7);return _0x2d9c84;}},li=class extends _0x53a0a0{afterInit(){const _0x1ebaf1=this['editor'];_0x1ebaf1['plugins']['has']('RestrictedEditingModeEditing')&&_0x1ebaf1['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x53a0a0{constructor(_0x1d819f){super(_0x1d819f),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x1c9d53=this['editor'],_0x84392e=_0x1c9d53['commands']['get']('importWord'),_0x454079=_0x1c9d53['plugins']['get'](_0x89d66a);_0x84392e&&(_0x84392e['on']('execute',(_0x67f9a5,[,_0x539559])=>{_0x539559['collaboration_features']={'comments':!0x0,'user_id':_0x454079['me']['id']};},{'priority':_0x4890d3['high']+0xa}),this['listenTo'](_0x84392e,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x4aeaee,_0x28107e){const {comment_threads:_0x30447a}=_0x28107e;_0x30447a&&_0x30447a['forEach'](({thread_id:_0x1fdffe,comments:_0x278dcb,is_resolved:_0x55aa4e})=>{const _0x58f740=new Date(),_0x60f5ec=_0x278dcb['map'](({author:_0x5c9fb2,content:_0x2921ce,created_at:_0x2389f0})=>({'content':_0x2921ce,'authorId':this['editor']['plugins']['get'](_0x89d66a)['me']['id'],'createdAt':_0x58f740,'attributes':{'@external':{'authorName':_0x5c9fb2,'createdAt':_0x2389f0?new Date(_0x2389f0):new Date(),'source':'importWord'}}})),_0x3602fc=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x3602fc,'threadId':_0x1fdffe,'comments':_0x60f5ec,'resolvedAt':_0x55aa4e?_0x58f740:null});});}},ui=class extends _0x53a0a0{constructor(_0x5ed3dc){super(_0x5ed3dc),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x329d4a=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x329d4a,'contentInsertion',(_0x12e909,_0x2e9f50)=>this['_removeMarkersWithoutThreads'](_0x2e9f50['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x19802d){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x19802d;const _0x47a143=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1efd21 of _0x19802d['keys']()){const [_0x413515,_0x12c066]=_0x1efd21['split'](':');'comment'!=_0x413515||_0x47a143['hasCommentThread'](_0x12c066)||_0x19802d['delete'](_0x1efd21);}return _0x19802d;}_registerMarkerInClipboardPipeline(){const _0x22930f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x467d1a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x467d1a&&_0x22930f['_registerMarkerToCopy']('comment',_0x467d1a);}_mapCommentsCopyConfigToRegisterConfiguration(_0xe70399){switch(_0xe70399){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x3bb22c){const _0xea9002=_0x3bb22c['split'](':');return{'group':_0xea9002[0x0],'id':_0xea9002[0x1],'part':_0xea9002[0x2]};}var pi=class extends _0x53a0a0{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3f2ec3,_0x1f6d3b)=>{if(!_0x1f6d3b['options']['showCommentHighlights'])return null;if(_0x1f6d3b['options']['ignoreResolvedComments']){const {id:_0xc1985a}=fi(_0x3f2ec3['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0xc1985a)?.['isResolved']&&_0x3f2ec3['item'])return _0x1f6d3b['consumable']['consume'](_0x3f2ec3['item'],'addMarker:'+_0x3f2ec3['markerName']),_0x1f6d3b['consumable']['consume'](_0x3f2ec3['item'],'removeMarker:'+_0x3f2ec3['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2ec4d3=>{_0x2ec4d3['on']('addMarker:comment',(_0x15ab5a,_0x2e7bc7,_0x53a4f0)=>{if(!_0x53a4f0['options']['showCommentHighlights'])return;const _0x20bc99=_0x2e7bc7['item'];if(!_0x20bc99)return;const _0x115a62=_0x53a4f0['mapper']['toViewElement'](_0x20bc99);this['editor']['model']['schema']['isObject'](_0x20bc99)&&_0x115a62&&!_0x115a62['getCustomProperty']('widget')&&_0x115a62['is']('containerElement')&&Ct(_0x115a62,_0x53a4f0['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x10a7a6,{writer:_0x27adb3,options:_0x2a7ca4})=>{if(!_0x2a7ca4['showCommentHighlights'])return null;const _0x3de39a=_0x27adb3['createContainerElement']('div'),_0x4b7cc1=_0x27adb3['createEmptyElement']('hr');return _0x27adb3['addClass']('ck-horizontal-line',_0x3de39a),_0x27adb3['insert'](_0x27adb3['createPositionAt'](_0x3de39a,0x0),_0x4b7cc1),_0x3de39a;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x293fd2,{writer:_0x41b599,options:_0x59a816})=>{if(!_0x59a816['showCommentHighlights'])return null;const _0x2ff38e=_0x41b599['createContainerElement']('span'),_0x57663e=_0x41b599['createEmptyElement']('img');return _0x41b599['addClass']('image-inline',_0x2ff38e),_0x41b599['insert'](_0x41b599['createPositionAt'](_0x2ff38e,0x0),_0x57663e),_0x2ff38e;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3ec5fd,{writer:_0x42eed3,options:_0x3d3554})=>{if(_0x3d3554['showCommentHighlights'])return _0x42eed3['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3bc17d,_0x370cf8,_0x3bff92)=>{_0x3bff92['options']['showCommentHighlights']&&_0x3bc17d['stop']();},{'priority':'high'});}},wi=class extends _0x53a0a0{static get requires(){return[oi,di,_0x89d66a,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d507b){super(_0x5d507b),this['set']('isThreadsLoadingPaused',!0x0),_0x5d507b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1b3886,_0xd74a54,_0x55e31c,_0x24b5d9)=>{const _0x1cbbd7=_0x5d507b['plugins']['get'](oi),_0x558891=_0x55e31c?fi(_0x55e31c)['id']:null;_0x5d507b['model']['change'](()=>{if(_0x558891){const _0x2c1f6b=this['getAllMarkersForId'](_0x558891);for(const _0x243226 of _0x2c1f6b)_0x5d507b['editing']['reconvertMarker'](_0x243226);}if(_0x24b5d9){const {id:_0x33a460}=fi(_0x24b5d9),_0x2ce54f=_0x1cbbd7['getCommentThread'](_0x33a460);if(_0x2ce54f&&_0x2ce54f['unlinkedAt'])return;if(_0x2ce54f&&!_0x2ce54f['isAttached'])return;const _0x111b3f=this['getAllMarkersForId'](_0x33a460);for(const _0x28af67 of _0x111b3f)_0x5d507b['editing']['reconvertMarker'](_0x28af67);}}),_0x558891&&this['scrollToThreadMarker'](_0x558891);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x4d6cfc=this['editor'],_0x3ac4a0=_0x4d6cfc['plugins']['get'](oi),_0x9526b6=_0x4d6cfc['config']['get']('collaboration.channelId'),_0x26522a=_0x3ac4a0['getCommentThreads']()['filter'](_0x5552b6=>_0x5552b6['channelId']!==_0x9526b6);_0x4d6cfc['commands']['add']('addCommentThread',new ci(_0x4d6cfc)),this['listenTo'](_0x4d6cfc,'change:isReadOnly',(_0x57903a,_0x41e148,_0x4c85c6)=>{_0x3ac4a0['switchReadOnly'](_0x4c85c6,_0x4d6cfc['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3ac4a0,gi('addCommentThread',_0x9526b6),(_0x1f7cad,{threadId:_0x529b16})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x529b16)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x529b16);}),this['listenTo'](_0x3ac4a0,gi('removeCommentThread',_0x9526b6),(_0x1ca34a,{threadId:_0x5e008f})=>{_0x4d6cfc['model']['enqueueChange']({'isUndoable':!0x1},_0x62f127=>{const _0xb8c6a8=this['getAllMarkersForId'](_0x5e008f);for(const _0x1e9de1 of _0xb8c6a8)_0x62f127['removeMarker'](_0x1e9de1);});}),this['listenTo'](_0x3ac4a0,gi('resolveCommentThread',_0x9526b6),(_0x2f80cb,{threadId:_0x2c9005})=>{this['_reconvertMarkers'](_0x2c9005);const _0x18267d=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x18267d['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2c9005)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3ac4a0,gi('reopenCommentThread',_0x9526b6),(_0x51413a,{threadId:_0x2b3b35})=>{this['_reconvertMarkers'](_0x2b3b35);},{'priority':'low'}),this['listenTo'](_0x3ac4a0,gi('addComment',_0x9526b6),(_0x4f2d1c,{threadId:_0x5aad17,isFromAdapter:_0x4e5228})=>{const _0x3728e6=this['getAllMarkersForId'](_0x5aad17);!_0x4e5228&&0x0!=_0x3728e6['length']&&_0x3ac4a0['hasCommentThread'](_0x5aad17)&&0x1===_0x3ac4a0['getCommentThread'](_0x5aad17)['length']&&_0x4d6cfc['model']['enqueueChange']({'isUndoable':!0x1},_0x5f3bb4=>{for(const _0x1a7675 of _0x3728e6)_0x5f3bb4['updateMarker'](_0x1a7675,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x26522a);}afterInit(){!async function(_0x9311e2){const _0x26bb6f='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x1a9838=0x795c0,_0x1a9a28={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x37b9df(_0x2fb8de){const _0x1efe06=new window['Promise'](_0x3223e9=>{_0x2fb8de['once']('ready',_0x3223e9);}),_0x492d89=window['Date']['now'](),_0x41e910=_0x2fb8de['config']['get']('licenseKey');async function _0x2a0def(){let _0x1278a0,_0x1a01c1=null,_0x52b196=null;try{return'GPL'==_0x41e910?'NotAllowed':(_0x1278a0=_0x8bd18c(),_0x1278a0?(_0x1278a0['usageEndpoint']&&(_0x52b196=_0x51abee(_0x1278a0['usageEndpoint'],_0x1278a0['jti'])),await _0x40e51f()?_0x2d9c79()?_0x1b5222()?'Expired':_0x4c9403()?('evaluation'==_0x1278a0['licenseType']&&(_0x1a01c1=_0x1f8d52('EvaluationLimit')),await _0x2e4232()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1b5222(){const _0x4ea283=['evaluation','trial']['includes'](_0x1278a0['licenseType'])?_0x492d89/0x3e8:0xe10*_0x1a9838;return _0x1278a0['exp']<_0x4ea283;}function _0x2d9c79(){const _0x2d3804=_0x1278a0['features'];if(!_0x2d3804)return!0x1;if(_0x2d3804['includes']('*'))return!0x0;if(_0x2d3804['includes']('CMT'))return!0x0;if(_0x2d3804['includes']('TRILIUM')&&_0x15d9a1())return!0x0;if(_0x2d3804['includes']('RCMT')){if(_0x5bdc3a())return!0x0;if(_0x30df47()||_0x262a3e())return!0x0;}return!0x1;}function _0x4c9403(){const _0x587bf0=_0x1278a0['licensedHosts'];if(!_0x587bf0||0x0==_0x587bf0['length'])return!0x0;const {hostname:_0x40b5dc}=new URL(window['location']['href']);if(_0x587bf0['includes'](_0x40b5dc))return!0x0;const _0xb07655=_0x40b5dc['split']('.');return _0x587bf0['filter'](_0x1bf697=>_0x1bf697['includes']('*'))['map'](_0x1b8d44=>_0x1b8d44['split']('.'))['filter'](_0x24c660=>_0x24c660['length']<=_0xb07655['length'])['map'](_0x2a7f01=>Array(_0xb07655['length']-_0x2a7f01['length'])['fill']('*'===_0x2a7f01[0x0]?'*':'')['concat'](_0x2a7f01))['some'](_0x4011a1=>_0xb07655['every']((_0x546737,_0x46fe8b)=>_0x4011a1[_0x46fe8b]===_0x546737||'*'===_0x4011a1[_0x46fe8b]));}function _0x2e4232(){return _0x1a01c1&&_0x52b196?new window['Promise']((_0x513ada,_0x30457f)=>{_0x1a01c1['then'](_0x513ada,_0x30457f),_0x52b196['then'](_0x124734=>{'Valid'!=_0x124734&&_0x513ada(_0x124734);},_0x30457f);}):_0x1a01c1||_0x52b196||'Valid';}}function _0x51abee(_0x20ce4e,_0x2b7730){return new window['Promise'](_0x4d0430=>{if(_0x531a28())return _0x4d0430('Valid');_0x24b6a7(),_0x2fb8de['decorate']('_sendUsageRequest');let _0x5d4ffe=!0x1;const _0x31dbfa=_0x3fd960();function _0x1b829a(_0x3c89b5){return!!_0x3c89b5&&('object'==typeof _0x3c89b5||'function'==typeof _0x3c89b5)&&'function'==typeof _0x3c89b5['then']&&'function'==typeof _0x3c89b5['catch'];}function _0x147222(_0x2b27f8){_0x36c9eb(_0x2b27f8)['then'](_0x508c5d=>_0x508c5d&&'ok'==_0x508c5d['status']?_0x4628bf(_0x2c8e7f(_0x31dbfa+_0x2b7730))!=_0x508c5d['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x10ffbd=>(_0x9235be(),_0x10ffbd),()=>{const _0x1ea91c=_0x185a30();return null==_0x1ea91c?(_0x9235be(),'Valid'):_0x492d89-_0x1ea91c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4d0430)['catch'](()=>{_0x4d0430('UsageLimit');});const _0x1397a4=0x36ee80;function _0x9235be(){const _0x5d08da='llct-'+_0x4628bf(_0x2c8e7f(_0x20ce4e)),_0x2ac0dc=_0x4af367(_0x4628bf(window['Math']['ceil'](_0x492d89/_0x1397a4)));window['localStorage']['setItem'](_0x5d08da,_0x2ac0dc);}function _0x185a30(){const _0xd8638a='llct-'+_0x4628bf(_0x2c8e7f(_0x20ce4e)),_0x199737=window['localStorage']['getItem'](_0xd8638a);return _0x199737?window['parseInt'](_0x4af367(_0x199737),0x10)*_0x1397a4:null;}function _0x36c9eb(_0x3d87c1){return new window['Promise']((_0x17d7e9,_0xa4670f)=>{_0x3d87c1['then'](_0x17d7e9,_0xa4670f),window['setTimeout'](_0xa4670f,0x1d4c0);});}}_0x2fb8de['on']('_sendUsageRequest',(_0x1a5549,_0x17d498)=>{if(_0x17d498[0x0]!=_0x20ce4e)return _0x4d0430('UsageLimit');_0x17d498[0x1]={..._0x17d498[0x1],'requestId':_0x31dbfa};},{'priority':'high'}),_0x2fb8de['on']('_sendUsageRequest',_0x12abaa=>{_0x1b829a(_0x12abaa['return'])&&(_0x5d4ffe=!0x0,_0x147222(_0x12abaa['return']));},{'priority':'low'}),_0x1efe06['then'](()=>{_0x5d4ffe||_0x4d0430('UsageLimit');});});function _0x531a28(){return'auto'==_0x2fb8de['editing']['view']['_overlayModeHint'];}function _0x24b6a7(){_0x2fb8de['editing']['view']['_overlayModeHint']='auto';}}function _0x1f8d52(_0x1b6d6a){const _0xa253e2=[new window['Promise'](_0x17990b=>setTimeout(_0x17990b,0x93ecc)),_0x1efe06['then'](()=>new window['Promise'](_0x220e6a=>{let _0x46f2f0=0x0;_0x2fb8de['model']['on']('applyOperation',(_0x4c64cd,_0x401695)=>{_0x401695[0x0]['isDocumentOperation']&&_0x46f2f0++,0x5e8==_0x46f2f0&&(_0x220e6a(),_0x4c64cd['off']());});}))];return window['Promise']['race'](_0xa253e2)['then'](()=>_0x1b6d6a);}async function _0x413ddb(){await _0x1efe06,_0x2fb8de['model']['change']=_0x22400e,_0x2fb8de['model']['enqueueChange']=_0x22400e,_0x2fb8de['enableReadOnlyMode']('model');}function _0x15d9a1(){return window['glob']&&window['glob']['triliumVersion'];}function _0x5bdc3a(){return _0x12aa6e('WebSocketGateway')&&'connected'==_0x231ee6('WebSocketGateway')['state'];}function _0x30df47(){return _0x12aa6e('RevisionViewerIntegration');}function _0x262a3e(){return _0x12aa6e('TrackChangesDataGetter');}function _0xd29132(_0x59e14a){const _0x2b7579=_0x58954f();_0x2fb8de[_0x2b7579]='commentsLicenseKey'+_0x59e14a,'Valid'!=_0x59e14a&&_0x413ddb();}function _0x58954f(){const _0x593b03=window['String'](window['performance']['now']())['replace']('.','');let _0x570be0='m';for(let _0x85e94d=0x0;_0x85e94d<_0x593b03['length'];_0x85e94d+=0x2){let _0x54e724=window['parseInt'](_0x593b03['substring'](_0x85e94d,_0x85e94d+0x2));_0x54e724>=0x3e&&(_0x54e724-=0x3e),_0x570be0+=_0x26bb6f[_0x54e724];}return _0x570be0;}function _0x8bd18c(){const _0x8311b7=_0x41e910['split']('.');if(0x3!=_0x8311b7['length'])return null;return _0x1be1a8(_0x8311b7[0x1]);function _0x1be1a8(_0x5b137a){const _0xff9f8e=_0x211e87(_0x5b137a);return _0xff9f8e&&_0x2f4bd8()?_0xff9f8e:null;function _0x2f4bd8(){const _0x4ef85f=_0xff9f8e['jti'],_0x266aca=window['parseInt'](_0x4ef85f['substring'](_0x4ef85f['length']-0x8),0x10),_0x4149e6={..._0xff9f8e,'jti':_0x4ef85f['substring'](0x0,_0x4ef85f['length']-0x8)};return delete _0x4149e6['vc'],_0x2c8e7f(_0x4149e6)==_0x266aca;}}}async function _0x40e51f(){let _0x4eb51b=!0x0;try{const [_0x46e63a,_0x40432f,_0x546004]=_0x41e910['split']('.');return _0x44476e(_0x46e63a),await _0x757e28(_0x46e63a,_0x40432f,_0x546004),_0x4eb51b;}catch{return!0x1;}function _0x44476e(_0x66bbab){const _0x4f2dec=_0x211e87(_0x66bbab);_0x4f2dec&&'ES256'==_0x4f2dec['alg']||(_0x4eb51b=!0x1);}async function _0x757e28(_0x423380,_0x3b679d,_0x1eab39){const _0x1c03cd=window['Uint8Array']['from'](_0x4350a0(_0x1eab39),_0x13d345=>_0x13d345['charCodeAt'](0x0)),_0x4c0ddb=new window['TextEncoder']()['encode'](_0x423380+'.'+_0x3b679d),_0x584a07=window['crypto']['subtle'];if(!_0x584a07)return;const _0x32e934=await _0x584a07['importKey']('jwk',_0x1a9a28,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x584a07['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x32e934,_0x1c03cd,_0x4c0ddb)||(_0x4eb51b=!0x1);}}function _0x211e87(_0x2a89f2){return _0x2a89f2['startsWith']('ey')?JSON['parse'](_0x4350a0(_0x2a89f2)):null;}function _0x4350a0(_0x8253c6){return window['atob'](_0x8253c6['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2c8e7f(_0x43951a){let _0x59fc78=0x1505;function _0x30c52a(_0x29aabd){for(let _0x5cb261=0x0;_0x5cb261<_0x29aabd['length'];_0x5cb261++){const _0x5d8454=_0x29aabd['charCodeAt'](_0x5cb261);_0x59fc78=(_0x59fc78<<0x5)+_0x59fc78+_0x5d8454,_0x59fc78&=_0x59fc78;}}function _0x359c0a(_0x129888){Array['isArray'](_0x129888)?_0x129888['forEach'](_0x359c0a):_0x129888&&'object'==typeof _0x129888?Object['entries'](_0x129888)['sort']()['forEach'](([_0x30e19f,_0x19eecd])=>{_0x30c52a(_0x30e19f),_0x359c0a(_0x19eecd);}):_0x30c52a(window['String'](_0x129888));}return _0x359c0a(_0x43951a),_0x59fc78>>>0x0;}function _0x4628bf(_0x49cca6){return _0x49cca6['toString'](0x10)['padStart'](0x8,'0');}function _0x4af367(_0x2a5018){return _0x2a5018['split']('')['reverse']()['join']('');}function _0x12aa6e(_0xca1493){return _0x2fb8de['plugins']['has'](_0xca1493);}function _0x231ee6(_0xcc393){return _0x2fb8de['plugins']['get'](_0xcc393);}function _0x22400e(){}_0xd29132(await _0x2a0def());}_0x37b9df(_0x9311e2['editor']);}(this);}destroy(){const _0x211950=this['editor']['plugins']['get'](oi),_0xb7342c=this['editor']['config']['get']('collaboration.channelId');for(const _0x20822d of _0x211950['getCommentThreads']({'channelId':_0xb7342c}))_0x211950['_detachCommentThread'](_0x20822d['id']),_0x211950['_threads']['delete'](_0x20822d['id']);super['destroy']();}['hasMarkerForId'](_0x1a7108){return this['getAllMarkersForId'](_0x1a7108)['length']>0x0;}getAllMarkersForId(_0x3c21f9){const _0xe9c50b=[];for(const _0x2d484b of this['editor']['model']['markers'])_0x2d484b['name']['startsWith']('comment:'+_0x3c21f9)&&_0xe9c50b['push'](_0x2d484b);return _0xe9c50b;}['scrollToThreadMarker'](_0x19cb6b){setTimeout(()=>{const _0x4c55e2=this['_getTargetForId'](_0x19cb6b);_0x4c55e2&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x19cb6b&&_0x363ecf({'target':_0x4c55e2[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x19a321){this['editor']['model']['change'](()=>{for(const _0xd7bcb3 of this['getAllMarkersForId'](_0x19a321))this['editor']['editing']['reconvertMarker'](_0xd7bcb3);});}_attachArchivedThread(_0x44bb31){const _0x2c128a=this['editor']['plugins']['get'](oi),_0x3f7c16=this['editor']['plugins']['get'](di),_0x5f3fcd=_0x2c128a['getCommentThread'](_0x44bb31);if(!_0x5f3fcd['isAttached']){const _0xc3184=_0x5f3fcd['attachTo'](()=>this['_getTargetForId'](_0x5f3fcd['id']));_0x3f7c16['registerAnnotation'](_0xc3184),_0x5f3fcd['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x26b79d=this['editor'],_0x2ccf65=_0x26b79d['plugins']['get'](_0x89d66a);_0x26b79d['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x53d195,_0x2d12b6)=>{const {id:_0x393c1b}=fi(_0x53d195['markerName']),_0x4b6ba8=_0x26b79d['plugins']['get'](oi)['getCommentThread'](_0x393c1b),_0x15f901=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x393c1b;let _0x32a567;if(_0x4b6ba8&&_0x4b6ba8['isResolved']&&!_0x15f901&&_0x53d195['item'])return _0x2d12b6['consumable']['consume'](_0x53d195['item'],'addMarker:'+_0x53d195['markerName']),_0x2d12b6['consumable']['consume'](_0x53d195['item'],'removeMarker:'+_0x53d195['markerName']),null;const _0x15c163=['ck-comment-marker'];return _0x15f901&&_0x15c163['push']('ck-comment-marker--active'),_0x32a567=_0x4b6ba8?.['length']?_0x4b6ba8['comments']['first']['author']['id']:_0x2ccf65['me']['id'],{'classes':_0x15c163,'attributes':{'data-comment':_0x393c1b,'data-author-id':_0x32a567}};}}),_0x26b79d['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x147f7c,{options:_0x5b4b19})=>{if(_0x5b4b19['showCommentHighlights'])return null;const _0x1df10b=_0x26b79d['plugins']['get'](oi),_0x2a7dab=_0x26b79d['model']['markers']['get'](_0x147f7c),{id:_0x31a618,part:_0x54e198}=fi(_0x147f7c);return _0x2a7dab&&!_0x2a7dab['affectsData']||_0x5b4b19['ignoreResolvedComments']&&_0x1df10b['getCommentThread'](_0x31a618)?.['isResolved']?null:{'group':'comment','name':_0x54e198?_0x31a618+':'+_0x54e198:_0x31a618};}}),_0x26b79d['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x35826f,{writer:_0x25a765})=>_0x25a765['createElement']('$marker',{'data-name':'comment:'+_0x35826f['getAttribute']('id')})}),_0x26b79d['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x29230e=this['editor'],_0x333820=_0x29230e['plugins']['get'](oi),_0x3476b5=new Set(),_0x5b0113=new Set();_0x29230e['model']['document']['registerPostFixer'](_0x244dc8=>{let _0x5e6651=!0x1;for(const {name:_0x33db5d,data:_0x190c79}of _0x29230e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3a9017,id:_0x243854}=fi(_0x33db5d);let _0x561ff5=_0x190c79['newRange'];if('comment'!==_0x3a9017||!_0x561ff5)continue;const _0x21de0a='$graveyard'===_0x561ff5['root']['rootName'];_0x21de0a||(_0x561ff5=_i(_0x561ff5,_0x29230e['model']),!_0x561ff5||_0x561ff5['isCollapsed']||!_0x190c79['newRange']||_0x561ff5['isEqual'](_0x190c79['newRange']))?_0x29230e['model']['hasContent'](_0x561ff5)&&!_0x21de0a?this['isThreadsLoadingPaused']?_0x3476b5['add'](_0x33db5d):this['_handleThreadMarker'](_0x33db5d,_0x243854):(_0x5b0113['add'](_0x33db5d),_0x3476b5['delete'](_0x33db5d),_0x244dc8['removeMarker'](_0x33db5d),_0x5e6651=!0x0):(_0x244dc8['updateMarker'](_0x33db5d,{'range':_0x561ff5}),_0x5e6651=!0x0);}return _0x5e6651;}),this['on']('change:isThreadsLoadingPaused',(_0x81239,_0x490efb,_0x2e38fb)=>{if(!_0x2e38fb&&_0x3476b5['size'])for(const _0x3e1195 of _0x3476b5){const {id:_0x27677f}=fi(_0x3e1195);_0x3476b5['delete'](_0x3e1195),_0x29230e['model']['markers']['get'](_0x3e1195)&&this['_handleThreadMarker'](_0x3e1195,_0x27677f);}}),this['listenTo'](_0x29230e['model']['document'],'change',()=>{for(const {name:_0x488903,data:{newRange:_0x11c9cc}}of _0x29230e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x31643b,id:_0x95f97a}=fi(_0x488903);if('comment'!==_0x31643b)continue;const _0x51e853=_0x333820['getCommentThread'](_0x95f97a),_0x335b6c=this['hasMarkerForId'](_0x95f97a);_0x51e853&&(!_0x51e853['_hasTargetInContent']&&_0x11c9cc&&_0x29230e['editing']['view']['once']('render',()=>{const _0x35e071=_0x29230e['plugins']['get'](ti),_0x59ed70=_0x333820['_threadToController']['get'](_0x51e853)['view'];_0x35e071['getByInnerView'](_0x59ed70)['refreshVisibility']();},{'priority':'low'}),_0x51e853['_hasTargetInContent']=_0x335b6c||!!_0x11c9cc),_0x11c9cc||(_0x5b0113['add'](_0x488903),_0x3476b5['delete'](_0x488903));}for(const _0x5e7aa2 of _0x5b0113){const {id:_0x1fafa9}=fi(_0x5e7aa2),_0x430110=_0x333820['getCommentThread'](_0x1fafa9);if(_0x3476b5['delete'](_0x5e7aa2),!_0x430110)continue;const _0x30c08e=this['hasMarkerForId'](_0x1fafa9);_0x30c08e||_0x430110['isSubmitted']?_0x30c08e||_0x430110['unlinkedAt']||_0x430110['setUnlinkedAt'](new Date()):_0x430110['remove']();}_0x5b0113['clear']();});}_handleInitialThreads(_0xd5039d){_0xd5039d['forEach'](_0x223780=>{_0x223780['unlinkedAt']&&this['_attachArchivedThread'](_0x223780['id']);});}_getTargetForId(_0x510aaa){const _0x126005=this['editor'],_0x430e=this['getAllMarkersForId'](_0x510aaa);return _0x5f336f(_0x126005['editing'],_0x430e);}_getTextContext(_0x84be15){const _0x1194d6=this['getAllMarkersForId'](_0x84be15);let _0x30c602='',_0x42e71f=!0x1;for(const _0x3b23be of _0x1194d6){const _0x2041df=_0x3b23be['getRange']();for(const _0x167bfb of Array['from'](_0x2041df['getItems']()))_0x167bfb['is']('$textProxy')?(_0x30c602&&_0x42e71f&&(_0x30c602+='\x20',_0x42e71f=!0x1),_0x30c602+=_0x167bfb['data']):_0x42e71f=!0x0;_0x42e71f=!0x0;}return _0x30c602['substring'](0x0,0x96);}_attachMarkerToThread(_0x4ac407,_0x5a019c){const _0x5628cb=this['editor'],_0x528883=_0x5628cb['plugins']['get'](oi);let _0x5d5bdf=_0x528883['getCommentThread'](_0x5a019c);const _0x41113a=_0x5628cb['config']['get']('collaboration.channelId'),_0x559321=_0x5628cb['plugins']['get'](di);return _0x5d5bdf&&(_0x5d5bdf['unlinkedAt']&&_0x5d5bdf['setUnlinkedAt'](null),_0x5d5bdf['isAttached'])||(this['getAllMarkersForId'](_0x5a019c)[0x0]['managedUsingOperations']?_0x528883['fetchCommentThread']({'channelId':_0x41113a,'threadId':_0x5a019c})['then'](_0x641a2a=>{if('destroyed'!==_0x5628cb['state']){if(_0x5d5bdf=_0x641a2a,_0x5d5bdf&&!_0x5d5bdf['isAttached']){const _0x20af6d=_0x5d5bdf['attachTo'](()=>this['_getTargetForId'](_0x5a019c));_0x559321['registerAnnotation'](_0x20af6d),_0x5d5bdf['isResolved']&&this['_reconvertMarkers'](_0x5a019c);}else{if(!_0x5d5bdf){const _0x823f26=this['getAllMarkersForId'](_0x5a019c);_0x5628cb['model']['change'](_0x3db86b=>{for(const _0x13fd33 of _0x823f26)_0x3db86b['removeMarker'](_0x13fd33);});}}}}):_0x5628cb['editing']['view']['once']('render',()=>{if(_0x528883['getCommentThread'](_0x5a019c))return;const _0x363bfc=_0x5628cb['plugins']['get'](ti);_0x5d5bdf=_0x528883['openNewCommentThread']({'channelId':_0x41113a,'threadId':_0x5a019c,'target':()=>this['_getTargetForId'](_0x5a019c),'context':{'type':'text','value':this['_getTextContext'](_0x5a019c)}});const _0x56696d=_0x528883['_threadToController']['get'](_0x5d5bdf)['view'],_0x4d81f7=_0x363bfc['getByInnerView'](_0x56696d);_0x4d81f7&&_0x559321['registerAnnotation'](_0x4d81f7);},{'priority':'low'})),_0x5d5bdf;}['_handleThreadMarker'](_0x37e240,_0x4f29da){const _0x31d110=this['_attachMarkerToThread'](_0x37e240,_0x4f29da);_0x31d110&&!_0x31d110['context']&&_0x31d110['setContext']({'type':'text','value':this['_getTextContext'](_0x4f29da)});}_initAriaMarkerChangeAnnouncements(){const _0x818bb6=this['editor'];_0x3101b7(_0x818bb6['model'],({left:_0x23fb83,entered:_0x3fbf3a})=>{for(const _0x21a5f6 of _0x23fb83)if(Ai(_0x21a5f6)){_0x818bb6['ui']['ariaLiveAnnouncer']['announce'](Et(_0x818bb6['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x13a63e of _0x3fbf3a)if(Ai(_0x13a63e)){_0x818bb6['ui']['ariaLiveAnnouncer']['announce'](Et(_0x818bb6['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x1692a3(_0x4ef251)));break;}});}};function gi(_0x3e42fe,_0xede33){return _0xede33?_0x3e42fe+':'+_0xede33:_0x3e42fe;}function _i(_0x3100dc,_0x10f3eb){const _0x48abb8=_0x10f3eb['schema'],_0x2ea2ed=_0x10f3eb['createRange'](_0x3100dc['start']);for(const _0x502d47 of _0x3100dc['getWalker']()){const {type:_0x571b04,item:_0x3bc0cb,nextPosition:_0x4c0131}=_0x502d47;if('text'===_0x571b04||_0x48abb8['isObject'](_0x3bc0cb)){const _0x30c4f1=_0x10f3eb['createPositionBefore'](_0x3bc0cb);_0x2ea2ed['isCollapsed']&&(_0x2ea2ed['start']=_0x30c4f1),_0x2ea2ed['end']=_0x4c0131;}}return _0x2ea2ed;}function Ai(_0x1b6912){return'comment'===fi(_0x1b6912['name'])['group'];}var vi=class extends _0x53a0a0{['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 _0x8823f3=this['editor'],_0x5c5dc4=_0x8823f3['plugins']['get'](oi),_0x585e41=_0x8823f3['plugins']['get'](wi),_0x3570b0=_0x8823f3['plugins']['get'](ti),_0x19378c=_0x8823f3['plugins']['get'](di);_0x8823f3['ui']['componentFactory']['add']('comment',()=>{const _0x8034fd=this['_createUIButton'](_0x3e41ef);return _0x8034fd['tooltip']=!0x0,_0x8034fd;}),_0x8823f3['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x19378c['addSourceCollector'](()=>{const _0x94adf8=[];for(const [_0x18d926,_0x498abf]of _0x5c5dc4['_threadToController']){const _0x1e9611=_0x585e41['getAllMarkersForId'](_0x18d926['id']),_0x4edc5d=_0x1e9611['map'](_0x3c0177=>_0x3c0177['getRange']());_0x1e9611['length']>0x0&&_0x94adf8['push']([_0x498abf['view'],_0x4edc5d]);}return _0x94adf8;}),this['listenTo'](_0x3570b0,'change:activeAnnotations',(_0x68088b,_0x51b67b,_0x29c504)=>{const _0x301c32=Array['from'](_0x29c504)['map'](_0x2fd1f0=>_0x2fd1f0['innerView'])['find'](_0xd4ad9c=>_0x5c5dc4['_viewToController']['has'](_0xd4ad9c));if(!_0x301c32)return void(_0x585e41['activeMarker']=null);const _0x59fe2e=_0x5c5dc4['_viewToController']['get'](_0x301c32)['model']['id'],_0x1d6bbe='comment:'+_0x59fe2e;_0x59fe2e&&_0x585e41['hasMarkerForId'](_0x59fe2e)?_0x585e41['activeMarker']=_0x1d6bbe:_0x585e41['activeMarker']&&(_0x585e41['activeMarker']=null);}),this['listenTo'](_0x5c5dc4,'removeCommentThread',(_0x16cab2,{threadId:_0x46c99e,isFromAdapter:_0x1acf68})=>{!_0x1acf68&&_0x8823f3['ui']['focusTracker']['isFocused']&&_0x585e41['hasMarkerForId'](_0x46c99e)&&_0x8823f3['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x5c5dc4,'addComment',(_0x2b5536,{threadId:_0x3ca78d,isFromAdapter:_0x2b8488})=>{!_0x2b8488&&_0x585e41['hasMarkerForId'](_0x3ca78d)&&_0x5c5dc4['hasCommentThread'](_0x3ca78d)&&0x1===_0x5c5dc4['getCommentThread'](_0x3ca78d)['length']&&(_0x8823f3['editing']['view']['focus'](),_0x2b5536['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x439861=[this['editor']];for(const _0x47f042 of _0x439861){let _0x116e1f;for(const _0x37cd6c in _0x47f042){const _0x841039=_0x37cd6c,_0x5d61bd=_0x47f042[_0x841039];if('commentsLicenseKeyValid'==_0x5d61bd||'commentsLicenseKeyInvalid'==_0x5d61bd||'commentsLicenseKeyExpired'==_0x5d61bd||'commentsLicenseKeyDomainLimit'==_0x5d61bd||'commentsLicenseKeyNotAllowed'==_0x5d61bd||'commentsLicenseKeyEvaluationLimit'==_0x5d61bd||'commentsLicenseKeyUsageLimit'==_0x5d61bd){delete _0x47f042[_0x841039],_0x116e1f=_0x5d61bd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x116e1f&&_0x47f042['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x116e1f&&_0x47f042['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x116e1f&&_0x47f042['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x116e1f&&_0x47f042['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x116e1f&&_0x47f042['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x116e1f&&_0x47f042['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x43876a){const _0x57e19e=this['editor'],_0x243acd=new _0x43876a(_0x57e19e['locale']),_0x403895=_0x57e19e['commands']['get']('addCommentThread');return _0x243acd['set']({'label':Et(_0x57e19e['locale'],'Comment'),'icon':_0x413d95}),_0x243acd['bind']('isEnabled')['to'](_0x403895,'isEnabled',_0x403895,'hasContent',(_0x434df9,_0x5b6f83)=>_0x434df9&&_0x5b6f83),this['listenTo'](_0x243acd,'execute',()=>{_0x403895['execute']();}),_0x243acd;}},yi=class extends _0x53a0a0{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x287461){super(_0x287461),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2f10f2,_0x7f8dbd,_0x4780c6)=>{_0x4780c6?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x42aa00,_0x4498c6]of this['editor']['commands'])_0x4498c6['affectsData']&&'addCommentThread'!==_0x42aa00&&_0x4498c6['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 _0x3e9c5d=this['editor']['editing']['view']['document'];this['listenTo'](_0x3e9c5d,'cut',_0x51c225=>_0x51c225['stop'](),{'priority':'highest'}),this['listenTo'](_0x3e9c5d,'clipboardInput',_0x7716f2=>_0x7716f2['stop'](),{'priority':'highest'}),this['listenTo'](_0x3e9c5d,'delete',_0x339814=>_0x339814['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0xbefdc3,_0x30b8f2]of this['editor']['commands'])_0x30b8f2['affectsData']&&'addCommentThread'!==_0xbefdc3&&_0x30b8f2['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 _0xa2dbe{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x984921){super(_0x984921),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x59d47b=this['context']['plugins']['get'](ti);this['listenTo'](_0x59d47b,'_activateAnnotation',(_0x5daedc,_0x548cdd)=>{for(const _0x5633cb of this['activeUIs']){const _0x51fe6b=this['_uis']['get'](_0x5633cb);(0x0,this['uisData']['get'](_0x5633cb)['filter'])(_0x548cdd)&&_0x51fe6b['setActiveAnnotation'](_0x548cdd);}}),this['listenTo'](_0x59d47b,'_deactivateAllAnnotations',()=>{for(const _0x3eea6a of this['activeUIs'])this['_uis']['get'](_0x3eea6a)['setActiveAnnotation'](null);}),this['listenTo'](_0x59d47b['_visibleAnnotations'],'add',(_0x3ce6c3,_0x506d8e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x506d8e);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x45378e){return this['activeUIs']['has'](_0x45378e);}activate(_0x3b43ba,_0x52c7d5=this['defaultFilter']){const _0x135581=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x3b43ba))throw new _0x48784c('annotationsuis-missing-ui',this,{'uiName':_0x3b43ba});this['isActive'](_0x3b43ba)&&this['deactivate'](_0x3b43ba),this['activeUIs']['add'](_0x3b43ba);const _0x552338=new Jt();Qt({'source':_0x135581['_visibleAnnotations'],'target':_0x552338,'filter':_0x52c7d5}),this['uisData']['set'](_0x3b43ba,{'collection':_0x552338,'filter':_0x52c7d5});const _0x4e583f=this['_uis']['get'](_0x3b43ba);_0x4e583f['attach'](_0x552338),this['listenTo'](_0x4e583f,'change:activeAnnotation',(_0x43aecf,_0x521573,_0x15a045,_0x3bde35)=>{_0x3bde35&&_0x135581['_removeActiveAnnotation'](_0x3bde35),_0x15a045&&_0x135581['_addActiveAnnotation'](_0x15a045);});}deactivate(_0x17b3f3){if(this['activeUIs']['delete'](_0x17b3f3),!this['_uis']['has'](_0x17b3f3))throw new _0x48784c('annotationsuis-missing-ui',this,{'uiName':_0x17b3f3});const _0x499511=this['_uis']['get'](_0x17b3f3);_0x499511['detach'](),this['stopListening'](_0x499511),this['uisData']['get'](_0x17b3f3)['collection']['destroy'](),this['uisData']['delete'](_0x17b3f3);}switchTo(_0xa1b6ae){if(!this['_uis']['has'](_0xa1b6ae))throw new _0x48784c('annotationsuis-missing-ui',this,{'uiName':_0xa1b6ae});const _0x3d13af=this['context']['plugins']['get'](ti),_0x149b10=Array['from'](_0x3d13af['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xa1b6ae);const _0x5d602a=this['_uis']['get'](_0xa1b6ae);_0x5d602a['setActiveAnnotation'](_0x149b10),_0x5d602a['_setSelectedAnnotations']&&_0x149b10&&_0x5d602a['_setSelectedAnnotations']([_0x149b10]);}deactivateAll(){for(const _0x51e047 of this['activeUIs'])this['deactivate'](_0x51e047);}register(_0x30e281,_0x5b6929){if(this['_uis']['has'](_0x30e281))throw new _0x48784c('annotationsuis-register-already-registered');if('function'!=typeof _0x5b6929['attach']||'function'!=typeof _0x5b6929['detach']||'function'!=typeof _0x5b6929['setActiveAnnotation'])throw new _0x48784c('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x30e281,_0x5b6929);}refilterAnnotations(){const _0x42bf06=this['context']['plugins']['get'](ti)['collection'],_0x25e9fa=new Map(),_0x3d96b7=Array['from'](this['activeUIs']);for(const _0x40327e of this['activeUIs']){const _0x5a802b=this['uisData']['get'](_0x40327e)['collection'];for(const _0x2de38a of _0x5a802b)_0x25e9fa['set'](_0x2de38a,_0x40327e);}for(const _0x39e9f1 of _0x42bf06){const _0x57bd94=_0x25e9fa['get'](_0x39e9f1);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x39e9f1);const _0x382fb1=_0x3d96b7['find'](_0x4a07ea=>this['uisData']['get'](_0x4a07ea)['filter'](_0x39e9f1));_0x57bd94!==_0x382fb1&&(_0x57bd94&&this['uisData']['get'](_0x57bd94)['collection']['remove'](_0x39e9f1),_0x382fb1&&this['uisData']['get'](_0x382fb1)['collection']['add'](_0x39e9f1));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x1a6049){const _0x2aad85=[];for(const _0xefe8d4 of this['activeUIs']){(0x0,this['uisData']['get'](_0xefe8d4)['filter'])(_0x1a6049)&&_0x2aad85['push'](_0xefe8d4);}if(_0x2aad85['length']>0x1)throw new _0x48784c('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2aad85,'annotationType':_0x1a6049['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x372316('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4351fe){super(_0x4351fe);const _0x2d534c=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 _0x91f952(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2d534c['to']('class')],'style':{'minHeight':_0x2d534c['to']('minHeight',_0x2eb9cd=>'number'==typeof _0x2eb9cd?Ci(_0x2eb9cd+0xa):null)},'dir':_0x4351fe['uiLanguageDirection'],'role':'application','aria-label':Et(_0x4351fe,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x4351fe,'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',_0x5e8590=>{this['_updateItemPositionInFocusables'](_0x5e8590['source']);}),this['list']['forEach'](_0x3a81b3=>{this['focusTracker']['add'](_0x3a81b3['element']),this['_updateItemPositionInFocusables'](_0x3a81b3);}),this['list']['on']('change',(_0x465cee,_0x571401)=>{for(const _0x29b0f6 of _0x571401['removed'])this['focusTracker']['remove'](_0x29b0f6['element']),this['focusables']['remove'](_0x29b0f6);for(const _0x3a89cb of _0x571401['added'])this['focusTracker']['add'](_0x3a89cb['element']),this['_updateItemPositionInFocusables'](_0x3a89cb);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0xdfae7){const _0x146fbe=this['focusables']['getIndex'](_0xdfae7);let _0x5be9fb,_0x4ee8bc;for(const _0x5f08e9 of this['focusables'])if(_0xdfae7['top']<_0x5f08e9['top']){_0x5be9fb=_0x5f08e9;break;}if(_0x4ee8bc=_0x5be9fb?this['focusables']['getIndex'](_0x5be9fb):this['focusables']['length'],-0x1!==_0x146fbe){if(_0x146fbe===_0x4ee8bc-0x1)return;this['focusables']['remove'](_0xdfae7),_0x4ee8bc=_0x5be9fb?this['focusables']['getIndex'](_0x5be9fb):this['focusables']['length'];}this['focusables']['add'](_0xdfae7,_0x4ee8bc);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x372316('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x2c913c){super(_0x2c913c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x39a13a,_0x290d7f)=>_0x39a13a+_0x290d7f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3393f4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3393f4['to']('isAnimationDisabled',_0x4a435f=>_0x4a435f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3393f4['to']('top',_0xa47ecd=>bi(_0xa47ecd))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x8c1eed=this['element']['clientHeight'];_0x8c1eed&&(this['height']=_0x8c1eed);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0xa2dbe{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1a8735){super(_0x1a8735),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 _0x41b098=this['context']['config']['get']('sidebar.container');_0x41b098&&this['setContainer'](_0x41b098);}setContainer(_0x56286a){if(!Oi(_0x56286a))throw new _0x48784c('sidebar-setcontainer-invalid-element');this['container']=_0x56286a;}_attachToContainer({viewClass:_0x31e5be='',spaceBetweenItems:_0xe6bf5c=0x19}={}){if(!Oi(this['container']))throw new _0x48784c('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x31e5be,this['_spaceBetweenItems']=_0xe6bf5c;}['rearrange']({removedAnnotation:_0x1610f5,previousAnnotation:_0xc315ed,nextAnnotation:_0x3a09ee}){const _0x1d1cfe=this['getSidebarItemView'](_0x1610f5);this['view']['list']['remove'](_0x1d1cfe),this['_destroySidebarItemView'](_0x1610f5),_0xc315ed&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xc315ed)),_0x3a09ee&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3a09ee)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x359a5e,activatedAnnotation:_0x2dccc3,disableAnimationOnActivatedAnnotation:_0x2163be}){if(this['_activeAnnotation']=_0x2dccc3,_0x359a5e){_0x359a5e['isActive']=!0x1;const _0x53e15f=this['getSidebarItemView'](_0x359a5e);_0x53e15f&&_0x2163be&&(_0x53e15f['isAnimationDisabled']=!0x1);}if(_0x2dccc3){const _0x273690=this['getSidebarItemView'](_0x2dccc3);_0x273690&&(_0x2dccc3['isActive']=!0x0,_0x2163be&&(_0x273690['isAnimationDisabled']=!0x0,_0x273690['top']+=0x1),this['_alignToTargetRect'](_0x273690));}}_detachFromContainer(_0x30262b){if(this['view']['element']['remove'](),_0x30262b){for(const _0x460727 of _0x30262b)this['_destroySidebarItemView'](_0x460727);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x11b27c,_0x23b3cf){_0x23b3cf||(_0x23b3cf=_0x11b27c['view']);const _0x27484c=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x27484c,_0x11b27c),this['_annotationToSidebarItemView']['set'](_0x11b27c,_0x27484c),_0x27484c['content']['add'](_0x23b3cf),this['listenTo'](_0x11b27c['view'],'change:targetRect',(_0x1ee5f8,_0x1e8162,_0x5be9b2)=>{const _0x3e868e=this['_getTargetTop'](_0x11b27c,_0x5be9b2);_0x27484c['_targetTop']!=_0x3e868e&&(_0x27484c['_targetTop']=_0x3e868e,this['_setItemTop'](_0x27484c,_0x3e868e));}),this['listenTo'](_0x27484c,'change:top',()=>{this['_recalculate'](_0x27484c,'top');}),this['listenTo'](_0x27484c,'change:bottom',()=>{this['_recalculate'](_0x27484c,'bottom');}),this['_alignToTargetRect'](_0x27484c);const _0x10eeab=this['_getItemBefore'](_0x27484c);return _0x10eeab&&this['_alignAfterItem'](_0x10eeab,_0x27484c)||this['_alignToTargetRect'](_0x27484c),this['_updateLastItem'](),this['view']['list']['add'](_0x27484c),_0x27484c;}['_alignForTopChange'](_0x27f636){if(!_0x27f636['content']['length'])return;const _0x3af2ce=this['_getItemBefore'](_0x27f636);if(!_0x3af2ce)return;const _0x22a437=this['_sidebarItemViewToAnnotation']['get'](_0x3af2ce),_0x48ede5=this['_activeAnnotation'];_0x48ede5&&_0x48ede5===_0x22a437?this['_alignAfterItem'](_0x3af2ce,_0x27f636):this['_alignBeforeItem'](_0x27f636,_0x3af2ce);}_alignForBottomChange(_0x18bc1c){if(!_0x18bc1c['content']['length'])return;const _0xc56860=this['_getItemAfter'](_0x18bc1c);if(!_0xc56860)return;const _0x7bc674=this['_sidebarItemViewToAnnotation']['get'](_0xc56860),_0xc9aa0d=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xf54ef2=this['_activeAnnotation'];_0xf54ef2&&_0xf54ef2===_0x7bc674&&_0xc9aa0d?(this['_alignBeforeItem'](_0xc56860,_0x18bc1c),this['_alignAfterItem'](_0x18bc1c,_0xc56860)):_0xf54ef2&&_0xf54ef2===_0x7bc674?this['_alignBeforeItem'](_0xc56860,_0x18bc1c):this['_alignAfterItem'](_0x18bc1c,_0xc56860);}_recalculate(_0xf263b4,_0x305306){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2761b4,changedProp:_0x59cf7b}of this['_recalculateBuffer'])'top'===_0x59cf7b?this['_alignForTopChange'](_0x2761b4):this['_alignForBottomChange'](_0x2761b4);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xf263b4,'changedProp':_0x305306});}getSidebarItemView(_0x5a00e4){return this['_annotationToSidebarItemView']['get'](_0x5a00e4);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x236418){const _0x425246=this['getSidebarItemView'](_0x236418);this['stopListening'](_0x425246),this['stopListening'](_0x236418['view']),_0x425246['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x236418),this['_sidebarItemViewToAnnotation']['delete'](_0x425246);}_createSidebarView(){const _0xc5a179=new Ii(this['context']['locale']);return _0xc5a179['render'](),this['on']('change:_lastItem',(_0xb16de8,_0x290afb,_0xe13321,_0x5d015a)=>{_0x5d015a&&_0xc5a179['unbind']('minHeight'),_0xe13321?_0xc5a179['bind']('minHeight')['to'](_0xe13321,'bottom'):_0xc5a179['minHeight']=null;}),_0xc5a179;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x37a437){const _0x9954df=this['_sidebarItemViewToAnnotation']['get'](_0x37a437),_0x8886b=_0x9954df&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x9954df)-0x1);return _0x8886b&&this['getSidebarItemView'](_0x8886b)||null;}_getItemAfter(_0x460aa5){const _0x30a48b=this['_sidebarItemViewToAnnotation']['get'](_0x460aa5),_0x5951d2=_0x30a48b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x30a48b)+0x1);return _0x5951d2&&this['getSidebarItemView'](_0x5951d2)||null;}_alignBeforeItem(_0x37811b,_0x3a2bdd){_0x37811b['updateHeight']();const _0x53abe5=Ni(_0x3a2bdd['bottom']+this['_spaceBetweenItems'],_0x37811b['top']);return!!_0x53abe5&&(this['_setItemTop'](_0x3a2bdd,_0x3a2bdd['top']-_0x53abe5),!0x0);}_alignAfterItem(_0x418c19,_0x1ac82e){_0x418c19['updateHeight']();const _0x13bca2=Ni(_0x418c19['bottom']+this['_spaceBetweenItems'],_0x1ac82e['top']);return!!_0x13bca2&&(this['_setItemTop'](_0x1ac82e,_0x1ac82e['top']+_0x13bca2,!0x1),!0x0);}_alignToTargetRect(_0x27c941){const _0x17fc02=this['_sidebarItemViewToAnnotation']['get'](_0x27c941);if(!_0x17fc02||!_0x17fc02['target']||!_0x17fc02['targetRect'])return;const _0x5eac68=this['_getTargetTop'](_0x17fc02,_0x17fc02['targetRect']);this['_setItemTop'](_0x27c941,_0x5eac68);}_getTargetTop(_0x25697f,_0x4c2758){if(null===_0x4c2758)return 0x0;if(_0x25697f['target']instanceof _0x3a8ad1)return _0x4c2758['top'];{const _0x36c5f0=new _0x3a8ad1(this['view']['element'])['top'];return _0x4c2758['top']-_0x36c5f0;}}_setItemTop(_0x3a4c51,_0x24220d,_0x35e5ea=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x35e5ea&&(_0x24220d=Math['max'](_0x24220d,this['_getMaxAvailableTop'](_0x3a4c51))),_0x3a4c51['top']=_0x24220d;}_getMaxAvailableTop(_0x42e56b){let _0x4620bd=this['_getItemBefore'](_0x42e56b),_0x50e29d=0x0;for(;_0x4620bd;)_0x4620bd['updateHeight'](),_0x50e29d+=this['_spaceBetweenItems']+_0x4620bd['height'],_0x4620bd=this['_getItemBefore'](_0x4620bd);return _0x50e29d;}};function Ni(_0xe37f71,_0x615a73){return Math['max'](_0xe37f71-_0x615a73,0x0);}function Oi(_0x51dd89){return null!==_0x51dd89&&'object'==typeof _0x51dd89&&0x1===_0x51dd89['nodeType'];}var Mi=class extends _0xa2dbe{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(_0xbe8b88){super(_0xbe8b88),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x40e5e7(),this['_refreshPositioningDebounced']=_0x121a24(()=>{_0xbe8b88['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x516472=this['context']['plugins']['get'](Ti),_0x3ff7e2=this['context']['plugins']['get'](ki);_0x516472['register']('wideSidebar',this),_0x3ff7e2['container']&&_0x516472['switchTo']('wideSidebar');}setActiveAnnotation(_0xf9322){if(_0xf9322===this['activeAnnotation'])return;const _0x358ecf=this['context']['plugins']['get'](ki);_0x358ecf['_activeAnnotation']=_0xf9322;const _0x1f6277=this['activeAnnotation'];_0x358ecf['refresh']({'blurredAnnotation':_0x1f6277,'activatedAnnotation':_0xf9322}),this['activeAnnotation']=_0xf9322;}attach(_0x370c5c){this['annotations']=_0x370c5c;const _0x477ccf=this['context']['plugins']['get'](ki);if(_0x477ccf['_annotations']=_0x370c5c,this['isAttached'])throw new _0x48784c('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x477ccf,'set:container',()=>{this['detach'](),this['listenTo'](_0x477ccf,'change:container',_0x1be67d=>{_0x1be67d['off'](),this['attach'](_0x370c5c);});}),_0x477ccf['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3d3c0e=_0x32ad4a=>{_0x32ad4a['updateTargetRect'](),_0x477ccf['addAnnotation'](_0x32ad4a);};for(const _0xf08bf7 of _0x370c5c)_0x3d3c0e(_0xf08bf7);this['listenTo'](_0x370c5c,'add',(_0x49c049,_0x3eef93)=>{_0x3d3c0e(_0x3eef93);}),this['listenTo'](_0x370c5c,'remove',(_0x293603,_0x3a536c,_0x33c902)=>{_0x477ccf['rearrange']({'removedAnnotation':_0x3a536c,'previousAnnotation':_0x370c5c['get'](_0x33c902-0x1),'nextAnnotation':_0x370c5c['get'](_0x33c902+0x1)}),_0x3a536c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x370c5c,'focus',(_0x435245,_0x451572)=>{this['setActiveAnnotation'](_0x451572);}),this['listenTo'](_0x370c5c,'blur',()=>{this['setActiveAnnotation'](null);});const _0x161d1d=this['context']instanceof _0x3e496a?this['context']['editors']:new _0x40e5e7([this['context']]);for(const _0x399f41 of _0x161d1d)this['_integrateWithEditorAnnotations'](_0x399f41);this['listenTo'](_0x161d1d,'add',(_0x3567d2,_0x212483)=>{this['listenTo'](_0x212483,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x212483);});}),this['listenTo'](_0x161d1d,'remove',(_0x1a8cd0,_0x40cecb)=>{_0x40cecb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x40cecb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x48784c('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x437075=this['context']['plugins']['get'](ki);_0x437075['_detachFromContainer'](this['annotations']),this['stopListening'](_0x437075),this['stopListening'](this['annotations']),this['context']instanceof _0x3e496a&&this['stopListening'](this['context']['editors']);for(const _0x257047 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x257047);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x17b6ae){if(!_0x17b6ae['plugins']['has']('EditorAnnotations'))return;const _0x1be021=_0x17b6ae['plugins']['get']('EditorAnnotations'),_0x26d0e2=()=>{const _0x20c508=_0x1be021['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x20c508[0x0]||null);};this['listenTo'](_0x1be021,'refresh',_0x26d0e2),this['listenTo'](_0x1be021,'blur',(_0x21e98d,{isAnnotationTracked:_0x481cc2})=>{this['activeAnnotation']&&_0x481cc2(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1be021,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1e4303=>{_0x1be021['hasDomSelection']()&&(_0x26d0e2(),_0x1e4303['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1be021);}_destroyEditorAnnotationsIntegration(_0x5dc256){this['stopListening'](_0x5dc256),this['_editorAnnotations']['remove'](_0x5dc256);}},Ri=class extends _0x3e41ef{counterView;constructor(_0x5a30e9){super(_0x5a30e9);const _0xa622b5=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4b8d7f,_0x5b17de)=>_0x4b8d7f?'...':_0x5b17de['toString']()),this['set']('annotationType',''),this['icon']=_0x413d95,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xa622b5['to']('annotationType',_0x9efd7c=>'ck-annotation-counter__badge--'+_0x9efd7c),_0xa622b5['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xa622b5['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0xa2dbe{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(_0x50fd36){super(_0x50fd36),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x4f6b20())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x40e5e7(),this['_refreshPositioningDebounced']=_0x121a24(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3127b0(this['context']['locale']),this['balloonPanelView']=new _0x1ab0fb(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x4f5cdc){this['annotations']=_0x4f5cdc;const _0x46bf1e=this['context']['plugins']['get'](ki),_0x25da39=this['balloonPanelView'];if(_0x46bf1e['_annotations']=_0x4f5cdc,this['isAttached'])throw new _0x48784c('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x46bf1e,'set:container',()=>{this['detach'](),this['listenTo'](_0x46bf1e,'change:container',_0x5d614a=>{_0x5d614a['off'](),this['attach'](_0x4f5cdc);});}),_0x46bf1e['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3efe85=_0x110558=>{const _0x12685b=new Ri(this['context']['locale']);_0x46bf1e['addAnnotation'](_0x110558,_0x12685b),this['_annotationToNarrowView']['set'](_0x110558,_0x12685b),_0x12685b['bind']('isDirty','annotationType','number')['to'](_0x110558['view'],'isDirty','type','length'),_0x12685b['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x25da39['content']['first']!==_0x110558['view']?(this['_showBalloon'](_0x110558),_0x110558['view']['element']['focus'](),this['setActiveAnnotation'](_0x110558)):this['setActiveAnnotation'](null);});};for(const _0xefca1a of _0x4f5cdc)_0x3efe85(_0xefca1a);this['listenTo'](_0x4f5cdc,'add',(_0x3a4d13,_0x417fda)=>{_0x3efe85(_0x417fda);}),this['listenTo'](_0x4f5cdc,'remove',(_0x46e6a2,_0x3c8e8d,_0x4d7fe5)=>{this['_annotationToNarrowView']['get'](_0x3c8e8d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3c8e8d),_0x46bf1e['rearrange']({'removedAnnotation':_0x3c8e8d,'previousAnnotation':_0x4f5cdc['get'](_0x4d7fe5-0x1),'nextAnnotation':_0x4f5cdc['get'](_0x4d7fe5+0x1)}),_0x3c8e8d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x4f5cdc,'focus',(_0x3b146f,_0x179ddc)=>{this['setActiveAnnotation'](_0x179ddc);}),this['listenTo'](_0x4f5cdc,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x400c94,_0x16a605)=>{_0x16a605['keyCode']===_0x1dece6['esc']&&_0x25da39['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x25da39['content']['first']),this['_hideBalloon'](),_0x16a605['stopPropagation'](),_0x16a605['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x57957e,_0x2a16b9)=>{const _0x27b1d2=_0x2a16b9['target'];_0x25da39['isVisible']&&_0x25da39['element']['contains'](_0x27b1d2)||_0x46bf1e['view']['element']['contains'](_0x27b1d2)||_0x57957e['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3629f1=>_0x3629f1['contains'](_0x27b1d2))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xe92252=this['context']instanceof _0x3e496a?this['context']['editors']:new _0x40e5e7([this['context']]);for(const _0x3c880a of _0xe92252)this['_integrateWithEditorAnnotations'](_0x3c880a);this['listenTo'](_0xe92252,'add',(_0x372ccc,_0x14284e)=>{this['listenTo'](_0x14284e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x14284e);});}),this['listenTo'](_0xe92252,'remove',(_0x1696d3,_0x926c20)=>{_0x926c20['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x926c20['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x12c8d1){if(_0x12c8d1===this['activeAnnotation'])return;const _0x19597e=this['context']['plugins']['get'](ki);_0x19597e['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x12c8d1,'disableAnimationOnActivatedAnnotation':!0x0}),_0x12c8d1&&_0x19597e['getSidebarItemView'](_0x12c8d1)?this['_showBalloon'](_0x12c8d1):this['_hideBalloon'](),this['activeAnnotation']=_0x12c8d1;}detach(){if(!this['isAttached'])throw new _0x48784c('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2c2f00=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3d8f07=>_0x3d8f07['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2c2f00['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3e496a&&this['stopListening'](this['context']['editors']);for(const _0x515b53 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x515b53);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(_0x163a94){if(!_0x163a94['plugins']['has']('EditorAnnotations'))return;const _0x230ed4=_0x163a94['plugins']['get']('EditorAnnotations'),_0x56aea5=this['context']['plugins']['get'](ki),_0x1af457=this['annotations'],_0x5d1313=this['balloonPanelView'],_0x58d766=()=>{const _0x7c20f6=_0x230ed4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x7c20f6),this['setActiveAnnotation'](_0x7c20f6[0x0]||null);};this['listenTo'](_0x230ed4,'refresh',_0x58d766),this['listenTo'](_0x230ed4,'blur',(_0x18909e,{isAnnotationTracked:_0x4f7aeb})=>{this['activeAnnotation']&&_0x4f7aeb(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x230ed4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1af457,'blur',_0x242b0d=>{_0x230ed4['hasDomSelection']()&&_0x242b0d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5a6ec2,_0x4d6efc)=>{const _0x29c277=_0x4d6efc['target'];_0x5d1313['isVisible']&&_0x5d1313['element']['contains'](_0x29c277)||_0x56aea5['view']['element']['contains'](_0x29c277)||this['activeAnnotation']&&_0x230ed4['hasDomSelection']()&&(_0x58d766(),_0x5a6ec2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x230ed4);}_destroyEditorAnnotationsIntegration(_0x47156a){_0x47156a&&(this['stopListening'](_0x47156a),this['_editorAnnotations']['remove'](_0x47156a));}_setSelectedAnnotations(_0x326c75){for(const _0x2be106 of this['_selectedAnnotations'])_0x326c75['includes'](_0x2be106)||this['_manuallyClosedAnnotationViews']['delete'](_0x2be106['view']);this['_selectedAnnotations']=_0x326c75;}_refreshPositioning(){const _0x3ac269=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3ac269['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1e73b7){if(this['_manuallyClosedAnnotationViews']['has'](_0x1e73b7['view']))return;const _0x56eb48=this['balloonPanelView']['content']['first'];_0x56eb48!==_0x1e73b7['view']?(_0x56eb48&&this['_detachListeners'](_0x56eb48),this['_attachListeners'](_0x1e73b7['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1e73b7['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x2ee430=this['balloonPanelView']['content']['first'],_0x4577f2=_0x2ee430&&this['annotations']['getByView'](_0x2ee430);if(!_0x4577f2||!this['_annotationToNarrowView']['has'](_0x4577f2))return;const _0x4afe7b=this['_annotationToNarrowView']['get'](_0x4577f2)['element'],_0x350fc5=(function(){const _0x55efe9=_0x1ab0fb['defaultPositions'];return[_0x55efe9['southArrowNorthEast'],_0x55efe9['northArrowSouthEast'],_0x55efe9['southArrowNorth'],_0x55efe9['northArrowSouth'],_0x55efe9['southArrowNorthWest'],_0x55efe9['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x4afe7b,'positions':_0x350fc5});}['_hideBalloon'](){const _0x2d3015=this['balloonPanelView'],_0x4f3952=_0x2d3015['content']['first'];_0x4f3952&&(this['_detachListeners'](_0x4f3952),_0x2d3015['unpin'](),_0x2d3015['content']['clear']());}_attachListeners(_0x2acc92){this['listenTo'](_0x2acc92,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2acc92,'Esc',(_0x3de777,_0x386bed)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2acc92),this['_hideBalloon'](),_0x386bed();});}_detachListeners(_0x39a63f){this['stopListening'](_0x39a63f);}},xi=class extends _0x53a0a0{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x4f3387,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53e66a){super(_0x53e66a),_0x53e66a['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x53e66a['plugins']['get'](_0x4f3387),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x121a24(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x2ecf28=this['editor']['plugins']['get'](Ti);_0x2ecf28['context']===this['editor']&&(_0x2ecf28['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x295f62,_0x40620b)=>{const _0x559a52=this['_balloon'];if(this['isAttached']&&_0x559a52['visibleView']){const _0x38691e=this['annotations']['getByView'](_0x559a52['visibleView']);_0x38691e&&this['_closeAnnotation'](_0x38691e),_0x40620b();}}));}afterInit(){const _0x170b08=this['editor']['plugins']['get'](Ti);_0x170b08['context']===this['editor']&&(_0x170b08['hasActive']()||_0x170b08['switchTo']('inline'));}setActiveAnnotation(_0x2d1b4d){_0x2d1b4d!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2d1b4d&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2d1b4d)&&this['_addAnnotationToBalloon'](_0x2d1b4d,!0x0),_0x2d1b4d['isActive']=!0x0),_0x2d1b4d||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2d1b4d);}attach(_0x726179){this['annotations']=_0x726179;const _0x166e28=this['editor']['plugins']['get'](Ti),_0x284c7a=this['_balloon'];if(this['isAttached'])throw new _0x48784c('inlineannotations-attach-already-attached',this);if(_0x166e28['context']!==this['editor'])throw new _0x48784c('inlineannotations-not-allowed-with-context',this);const _0x4ab483=this['editor']['plugins']['get'](di);this['listenTo'](_0x4ab483,'refresh',()=>{const _0x528438=_0x4ab483['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3c52bc,_0x5ccc5d;!this['_forceRefresh']&&(_0x3c52bc=_0x528438,_0x5ccc5d=this['_selectedAnnotations'],_0x3c52bc['length']===_0x5ccc5d['length']&&_0x3c52bc['every'](_0x250b27=>_0x5ccc5d['includes'](_0x250b27)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x528438),this['setActiveAnnotation'](_0x528438[0x0]||null));}),this['listenTo'](_0x4ab483,'blur',(_0x31869b,{isAnnotationTracked:_0x2425f6})=>{this['activeAnnotation']&&_0x2425f6(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4ab483,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x5c0b73,_0x180576,_0x50beba)=>{_0x50beba||this['setActiveAnnotation'](null);}),this['listenTo'](_0x726179,'remove',(_0x13fecf,_0x2731ec)=>{this['_removeAnnotationFromBalloon'](_0x2731ec),_0x2731ec===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x284c7a,'change:visibleView',(_0x20d8cc,_0x17f3e9,_0x14cd07,_0x3f1520)=>{_0x3f1520&&this['stopListening'](_0x3f1520);const _0x4fce88=_0x726179['getByView'](_0x14cd07);_0x14cd07&&_0x4fce88&&(this['listenTo'](_0x14cd07,'change:height',()=>{_0x284c7a['updatePosition']();}),this['listenTo'](_0x14cd07,'Esc',()=>{this['_closeAnnotation'](_0x4fce88),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4fce88&&this['setActiveAnnotation'](_0x4fce88));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x284c7a['visibleView']&&_0x726179['getByView'](_0x284c7a['visibleView'])&&_0x284c7a['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 _0x48784c('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4293d6 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4293d6);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x40ce23){for(const _0x5626db of this['_selectedAnnotations'])_0x40ce23['includes'](_0x5626db)||this['_manuallyClosed']['delete'](_0x5626db);for(const _0x8dedd7 of this['annotations'])_0x40ce23['includes'](_0x8dedd7)||this['_removeAnnotationFromBalloon'](_0x8dedd7);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1acb4c of _0x40ce23)this['_addAnnotationToBalloon'](_0x1acb4c);}this['_selectedAnnotations']=_0x40ce23;}_addAnnotationToBalloon(_0x3d5fb3,_0xfd297a=!0x1){this['_manuallyClosed']['has'](_0x3d5fb3)||(this['_addedAnnotations']['has'](_0x3d5fb3)||this['_balloon']['hasView'](_0x3d5fb3['view'])||(this['_addedAnnotations']['add'](_0x3d5fb3),this['_balloon']['add']({'stackId':_0x3d5fb3['view']['id'],'view':_0x3d5fb3['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3d5fb3)}})),_0xfd297a&&this['_balloon']['showStack'](_0x3d5fb3['view']['id']));}_getBalloonTargetForAnnotation(_0x2fa575){const _0x443f14=_0x2fa575['target'],_0x2bed5a=this['editor']['editing']['view'],_0x368688=_0x2bed5a['document']['selection']['getFirstRange'](),_0x3f908e=_0x2bed5a['domConverter']['viewRangeToDom'](_0x368688);if(_0x3f908e['collapse'](!0x0),_0x443f14){if(_0x443f14 instanceof _0x3a8ad1)return _0x443f14;let _0x20f6e7=[];for(const _0x3f5e5b of _0x443f14)_0x20f6e7['push'](..._0x3a8ad1['getDomElementRects'](_0x3f5e5b));_0x20f6e7=function(_0x266155){const _0x4eeb10=[];let _0x2eb0b5=_0x266155[0x0];for(let _0x4c380d=0x1;_0x4c380d<_0x266155['length'];_0x4c380d++)if(Pi(_0x2eb0b5,_0x266155[_0x4c380d])){const _0x284a48=_0x266155[_0x4c380d]['width'];_0x2eb0b5['width']+=_0x284a48,_0x2eb0b5['right']+=_0x284a48;}else _0x4eeb10['push'](_0x2eb0b5),_0x2eb0b5=_0x266155[_0x4c380d];return _0x4eeb10['push'](_0x2eb0b5),_0x4eeb10;}(_0x20f6e7);const _0x769af0=_0x3f908e['getBoundingClientRect']();return _0x20f6e7['find'](_0x557ab3=>_0x557ab3['top']<=_0x769af0['top']&&_0x557ab3['bottom']>=_0x769af0['bottom']&&_0x557ab3['left']<=_0x769af0['left']&&_0x557ab3['right']>=_0x769af0['right'])||_0x20f6e7[0x0];}return _0x2fa575['targetRect']||_0x3f908e;}_removeAnnotationFromBalloon(_0x1f7723){this['_addedAnnotations']['has'](_0x1f7723)&&this['_balloon']['hasView'](_0x1f7723['view'])&&(this['_addedAnnotations']['delete'](_0x1f7723),this['_balloon']['remove'](_0x1f7723['view']));}_closeAnnotation(_0x2f8fae){this['_manuallyClosed']['add'](_0x2f8fae),this['_removeAnnotationFromBalloon'](_0x2f8fae);}};function Pi(_0x19efd6,_0xb71d41){return _0x19efd6['top']===_0xb71d41['top']&&_0x19efd6['bottom']===_0xb71d41['bottom']&&_0x19efd6['right']===_0xb71d41['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x501777,_0x29789c){super(_0x501777),this['set']('isEmpty',!_0x29789c['length']),this['focusTracker']=new _0x91f952(),this['_annotationViews']=_0x29789c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x29789c,'focusTracker':this['focusTracker']}),this['listenTo'](_0x29789c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x29789c,'remove',(_0x375ea2,_0x23bd33)=>{_0x23bd33['isActive']&&this['focus'](),_0x29789c['length']||(this['isEmpty']=!0x0);});const _0x1ead3c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x501777,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x29789c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1ead3c['if']('isEmpty','ck-hidden',_0x4fa982=>!_0x4fa982)]},'children':[{'text':Et(_0x501777,'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 _0x5d4d6e of this['_annotationViews'])this['focusTracker']['add'](_0x5d4d6e['element']);this['_annotationViews']['on']('change',(_0x2f7bb3,{added:_0x5680ba,removed:_0x556d0e})=>{for(const _0x5134e1 of _0x5680ba)this['focusTracker']['add'](_0x5134e1['element']);for(const _0x3b5d66 of _0x556d0e)this['focusTracker']['remove'](_0x3b5d66['element']);});}},Di=class extends _0xa2dbe{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x554124){super(_0x554124),this['archivedThreads']=new _0x40e5e7();}init(){const _0x542acc=this['context'],_0x3ab306=_0x542acc['plugins']['get'](oi),_0x1e7ffd=_0x542acc['plugins']['get'](ti);this['listenTo'](_0x3ab306,'addCommentThread',(_0x30398a,{threadId:_0x4cb519})=>{const _0x3d64bc=_0x3ab306['getCommentThread'](_0x4cb519);_0x3d64bc['archivedAt']&&this['archivedThreads']['add'](_0x3d64bc,this['_calculatePosition'](_0x3d64bc['archivedAt'])),this['listenTo'](_0x3d64bc,'change:archivedAt',(_0x1b4257,_0x1f2932,_0x1b8cc7)=>{_0x1b8cc7?this['archivedThreads']['has'](_0x3d64bc)||this['archivedThreads']['add'](_0x3d64bc,this['_calculatePosition'](_0x3d64bc['archivedAt'])):this['archivedThreads']['has'](_0x3d64bc)&&this['archivedThreads']['remove'](_0x3d64bc);});}),this['listenTo'](_0x3ab306,'removeCommentThread',(_0x12bcd9,{threadId:_0x5e01ec})=>{const _0x172b3a=_0x3ab306['getCommentThread'](_0x5e01ec);this['stopListening'](_0x172b3a),this['archivedThreads']['has'](_0x172b3a)&&this['archivedThreads']['remove'](_0x172b3a);},{'priority':'highest'}),this['listenTo'](_0x1e7ffd['collection'],'focus',(_0x31e5bf,_0x3ea5c5)=>{_0x3ea5c5['isVisible']||(_0x3ea5c5['isActive']=!0x0,_0x1e7ffd['activate'](_0x3ea5c5));});}_calculatePosition(_0x8b6fd3){const _0x2dfdb8=[...this['archivedThreads']]['findIndex'](_0x7c1bb8=>_0x7c1bb8['archivedAt']<_0x8b6fd3);return _0x2dfdb8>-0x1?_0x2dfdb8:this['archivedThreads']['length'];}},Vi=class extends _0x53a0a0{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x5c93bc];}constructor(_0x11e175){super(_0x11e175),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x50ce3a=this['editor'],_0x23d45c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x50ce3a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3e41ef,!0x0)),_0x50ce3a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xbfcfe7=this['_createCommentsArchiveButton'](rt);return _0xbfcfe7['set']({'role':'menuitemcheckbox'}),_0xbfcfe7;});const _0x55ebb0=_0x50ce3a['plugins']['get'](Di),_0x303111=_0x50ce3a['plugins']['get']('Annotations'),_0x151495=_0x50ce3a['plugins']['get']('CommentsRepository');_0x55ebb0['archivedThreads']['forEach'](_0x2b81c4=>{this['_handleNewThread'](_0x2b81c4);}),this['listenTo'](_0x55ebb0['archivedThreads'],'add',(_0xb37673,_0x60ec2a)=>{this['_handleNewThread'](_0x60ec2a);}),this['listenTo'](_0x303111['collection'],'add',(_0x2c0f1b,_0x286d10)=>{const _0x4c3d62=this['_pendingThreads']['find'](_0x349872=>{const _0x99d85a=_0x151495['_threadToController']['get'](_0x349872);return _0x99d85a&&_0x286d10['innerView']===_0x99d85a['view'];});if(_0x4c3d62){const _0x10ae7a=this['_calculatePosition'](_0x4c3d62['archivedAt']);this['_addAnnotationToArchive'](_0x286d10,_0x10ae7a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4c3d62),0x1);}}),this['listenTo'](_0x55ebb0['archivedThreads'],'remove',(_0x2539b9,_0x2f901c)=>{const _0x230b49=_0x50ce3a['config']['get']('collaboration.channelId');if(!_0x230b49||_0x2f901c['channelId']===_0x230b49){if(this['_pendingThreads']['includes'](_0x2f901c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2f901c),0x1);else{const _0x3363c8=_0x151495['_threadToController']['get'](_0x2f901c),_0x5b41bd=_0x303111['getByInnerView'](_0x3363c8['view']);this['annotationViews']['remove'](_0x5b41bd['view']),this['stopListening'](_0x5b41bd),this['stopListening'](_0x5b41bd['focusableElements']);}}}),this['listenTo'](_0x303111['collection'],'add',(_0x4f6579,_0x3a4318)=>{this['listenTo'](_0x3a4318,'escape',_0x23d45c);}),this['listenTo'](_0x303111['collection'],'remove',(_0x5d5628,_0x44e044)=>{this['stopListening'](_0x44e044,'escape',_0x23d45c);});}_addAnnotationToArchive(_0x1792e1,_0x531d8f){this['listenTo'](_0x1792e1,'set:isVisible',_0x2da97f=>{_0x2da97f['return']=!0x1,_0x2da97f['stop']();}),this['annotationViews']['add'](_0x1792e1['view'],_0x531d8f);}['_handleNewThread'](_0x63410f){const _0x594943=this['editor']['plugins']['get']('CommentsRepository'),_0x159293=this['editor']['plugins']['get']('Annotations'),_0x420bf7=this['editor']['config']['get']('collaboration.channelId');if(!_0x420bf7||_0x63410f['channelId']===_0x420bf7){const _0x57f954=_0x594943['_threadToController']['get'](_0x63410f);if(!_0x57f954)return void this['_pendingThreads']['push'](_0x63410f);const _0x187528=this['_calculatePosition'](_0x63410f['archivedAt']),_0x447259=_0x159293['getByInnerView'](_0x57f954['view']);_0x447259['isVisible']&&_0x159293['_visibleAnnotations']['remove'](_0x447259),this['_addAnnotationToArchive'](_0x447259,_0x187528);}}_calculatePosition(_0x88ecdf){const _0x3f37b8=this['editor']['config']['get']('collaboration.channelId'),_0x3862b4=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0xdb950c=>_0xdb950c['channelId']===_0x3f37b8)['findIndex'](_0xc75bec=>_0xc75bec['archivedAt']<_0x88ecdf);return _0x3862b4<0x0||_0x3862b4>this['annotationViews']['length']?this['annotationViews']['length']:_0x3862b4-0x1;}_toggleDialog(){const _0x154bf2=this['editor'],_0x21e817=_0x154bf2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x154bf2['locale'],this['annotationViews'])),'commentsArchive'===_0x21e817['id']?_0x21e817['hide']():_0x21e817['show']({'id':'commentsArchive','title':Et(_0x154bf2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x32a812,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5c8bae['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x2f3b0b,_0x4569a1=!0x1){const _0x36e458=this['editor']['locale'],_0x22a906=this['editor']['plugins']['get']('Dialog'),_0x184ff6=new _0x2f3b0b(_0x36e458);return _0x184ff6['bind']('isEnabled')['to'](this,'isEnabled'),_0x184ff6['bind']('isOn')['to'](_0x22a906,'id',_0x16140c=>'commentsArchive'===_0x16140c),_0x184ff6['set']({'label':Et(_0x36e458,'COMMENTS_ARCHIVE'),'icon':_0x32a812,'isToggleable':!0x0}),_0x4569a1&&(_0x184ff6['tooltip']=!0x0),this['listenTo'](_0x184ff6,'execute',()=>this['_toggleDialog']()),_0x184ff6;}_hideDialogOnAnnotationEscape=_0x5ebbd6=>{const _0x2e8179=_0x5ebbd6['source'];if(!this['annotationViews']['has'](_0x2e8179['view']))return;const _0x341d54=this['editor']['plugins']['get']('Dialog');_0x341d54['isOpen']&&'commentsArchive'===_0x341d54['id']&&(_0x341d54['hide'](),_0x5ebbd6['stop']());};},Bi=class extends _0x53a0a0{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};