@ckeditor/ckeditor5-comments 38.1.0 → 38.1.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 (85) hide show
  1. package/build/comments.js +1 -1
  2. package/package.json +3 -3
  3. package/src/annotations/annotation.d.ts +86 -86
  4. package/src/annotations/annotation.js +1 -1
  5. package/src/annotations/annotationcollection.d.ts +94 -94
  6. package/src/annotations/annotationcollection.js +1 -1
  7. package/src/annotations/annotations.d.ts +150 -150
  8. package/src/annotations/annotations.js +1 -1
  9. package/src/annotations/annotationsuis.d.ts +228 -228
  10. package/src/annotations/annotationsuis.js +1 -1
  11. package/src/annotations/editorannotations.d.ts +63 -63
  12. package/src/annotations/editorannotations.js +1 -1
  13. package/src/annotations/inlineannotations.d.ts +86 -86
  14. package/src/annotations/inlineannotations.js +1 -1
  15. package/src/annotations/narrowsidebar.d.ts +81 -81
  16. package/src/annotations/narrowsidebar.js +1 -1
  17. package/src/annotations/sidebar.d.ts +96 -96
  18. package/src/annotations/sidebar.js +1 -1
  19. package/src/annotations/view/annotationcounterbuttonview.d.ts +25 -25
  20. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  21. package/src/annotations/view/annotationview.d.ts +86 -86
  22. package/src/annotations/view/annotationview.js +1 -1
  23. package/src/annotations/view/sidebaritemview.d.ts +51 -51
  24. package/src/annotations/view/sidebaritemview.js +1 -1
  25. package/src/annotations/view/sidebarview.d.ts +28 -28
  26. package/src/annotations/view/sidebarview.js +1 -1
  27. package/src/annotations/widesidebar.d.ts +73 -73
  28. package/src/annotations/widesidebar.js +1 -1
  29. package/src/augmentation.d.ts +48 -48
  30. package/src/comments/addcommentthreadcommand.d.ts +31 -31
  31. package/src/comments/addcommentthreadcommand.js +1 -1
  32. package/src/comments/commentsarchive.d.ts +27 -27
  33. package/src/comments/commentsarchive.js +1 -1
  34. package/src/comments/commentsarchiveui.d.ts +34 -34
  35. package/src/comments/commentsarchiveui.js +1 -1
  36. package/src/comments/commentsediting.d.ts +75 -75
  37. package/src/comments/commentsediting.js +1 -1
  38. package/src/comments/commentsrepository.d.ts +1088 -1088
  39. package/src/comments/commentsrepository.js +1 -1
  40. package/src/comments/commentsui.d.ts +29 -29
  41. package/src/comments/commentsui.js +1 -1
  42. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +13 -13
  43. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  44. package/src/comments/integrations/importword.d.ts +17 -17
  45. package/src/comments/integrations/importword.js +1 -1
  46. package/src/comments/ui/commenteditor/commenteditor.d.ts +32 -32
  47. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  48. package/src/comments/ui/commenteditor/commenteditorui.d.ts +27 -27
  49. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  50. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -32
  51. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  52. package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
  53. package/src/comments/ui/commentthreadcontroller.js +1 -1
  54. package/src/comments/ui/view/basecommentthreadview.d.ts +108 -108
  55. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  56. package/src/comments/ui/view/basecommentview.d.ts +108 -108
  57. package/src/comments/ui/view/basecommentview.js +1 -1
  58. package/src/comments/ui/view/collapsedcommentsview.d.ts +9 -9
  59. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  60. package/src/comments/ui/view/commentcontentview.d.ts +10 -10
  61. package/src/comments/ui/view/commentcontentview.js +1 -1
  62. package/src/comments/ui/view/commentinputview.d.ts +82 -82
  63. package/src/comments/ui/view/commentinputview.js +1 -1
  64. package/src/comments/ui/view/commentsarchiveview.d.ts +34 -34
  65. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  66. package/src/comments/ui/view/commentslistview.d.ts +96 -96
  67. package/src/comments/ui/view/commentslistview.js +1 -1
  68. package/src/comments/ui/view/commentthreadheaderview.d.ts +46 -46
  69. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  70. package/src/comments/ui/view/commentthreadinputview.d.ts +37 -37
  71. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  72. package/src/comments/ui/view/commentthreadview.d.ts +113 -113
  73. package/src/comments/ui/view/commentthreadview.js +1 -1
  74. package/src/comments/ui/view/commentview.d.ts +239 -239
  75. package/src/comments/ui/view/commentview.js +1 -1
  76. package/src/comments.d.ts +31 -31
  77. package/src/comments.js +1 -1
  78. package/src/commentsonly.d.ts +29 -29
  79. package/src/commentsonly.js +1 -1
  80. package/src/config.d.ts +172 -172
  81. package/src/index.d.ts +21 -21
  82. package/src/utils/common-translations.d.ts +5 -5
  83. package/src/utils/common-translations.js +1 -1
  84. package/src/utils/createmutationobserver.d.ts +13 -13
  85. package/src/utils/createmutationobserver.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1614=['isCollapsed','change:isFocused','uiUpdate','editorannotations-invalid-source-callback','view','annotation','has','directChange','listenTo','add','remove','delete','from','document','cancel','range','change:range','fire','isReadOnly','pluginName','containsRange','_editorAnnotations','addSourceCollector','selection','requires','push','editing','isEqual','focusTracker','_editorAnnotationsData','update','innerView','registerAnnotation','refreshSelectedViews','collection','getRanges','map','editor','plugins','model','element','set','hasDomSelection','init','sort','blur','_dataCollectors'];(function(_0xbd48ee,_0x1614fe){const _0x52d83b=function(_0x4b7d42){while(--_0x4b7d42){_0xbd48ee['push'](_0xbd48ee['shift']());}};_0x52d83b(++_0x1614fe);}(_0x1614,0x95));const _0x52d8=function(_0xbd48ee,_0x1614fe){_0xbd48ee=_0xbd48ee-0x0;let _0x52d83b=_0x1614[_0xbd48ee];return _0x52d83b;};import{Plugin as _0x47fa28}from'ckeditor5/src/core';import{CKEditorError as _0x47250c}from'ckeditor5/src/utils';import{debounce as _0x1dab99}from'lodash-es';import _0x2b0ba4 from'./annotations';export default class k extends _0x47fa28{static get[_0x52d8('0x10')](){return[_0x2b0ba4];}static get[_0x52d8('0xb')](){return'EditorAnnotations';}constructor(_0x247029){super(_0x247029),this['_dataCollectors']=new Set(),this[_0x52d8('0xd')]=new Set();}[_0x52d8('0x23')](){const _0x2e0e09=this['editor'],_0x25da80=_0x2e0e09[_0x52d8('0x1f')][_0x52d8('0x5')][_0x52d8('0xf')],_0x29bb7f=_0x1dab99(()=>this['refreshSelectedViews'](),0xa);_0x25da80['on'](_0x52d8('0x8'),(_0x25c16f,_0x1bac87)=>{_0x1bac87[_0x52d8('0x2e')]&&(_0x29bb7f[_0x52d8('0x6')](),this[_0x52d8('0x19')]());}),this[_0x52d8('0x0')](_0x2e0e09[_0x52d8('0x12')][_0x52d8('0x2b')][_0x52d8('0x5')],_0x52d8('0x28'),(_0x263ab5,_0x2a9de7,_0x30f865)=>{_0x30f865&&_0x29bb7f();}),this[_0x52d8('0x0')](_0x2e0e09['ui'][_0x52d8('0x14')],'change:isFocused',(_0x3a33e2,_0x247629,_0x172467)=>{_0x172467||_0x2e0e09[_0x52d8('0xa')]||this[_0x52d8('0x9')](_0x52d8('0x25'),{'isAnnotationTracked':_0x1fee9f=>this[_0x52d8('0x15')][_0x52d8('0x2d')](_0x1fee9f[_0x52d8('0x17')])});}),this['listenTo'](this[_0x52d8('0x1d')]['ui'],_0x52d8('0x16'),()=>this[_0x52d8('0x9')](_0x52d8('0x29')));}[_0x52d8('0x18')](_0x49fc1c){if(this['_editorAnnotations'][_0x52d8('0x2d')](_0x49fc1c[_0x52d8('0x2b')]))return;this[_0x52d8('0xd')]['add'](_0x49fc1c['view']),this[_0x52d8('0x1d')]['ui'][_0x52d8('0x14')][_0x52d8('0x1')](_0x49fc1c[_0x52d8('0x2b')][_0x52d8('0x20')]);const _0x137e23=this[_0x52d8('0x1d')][_0x52d8('0x1e')]['get'](_0x2b0ba4);this[_0x52d8('0x0')](_0x137e23[_0x52d8('0x1a')],'remove',(_0xdc57c0,_0x376087)=>{this[_0x52d8('0x1d')]['ui'][_0x52d8('0x14')][_0x52d8('0x2')](_0x376087[_0x52d8('0x2b')]['element']),this[_0x52d8('0xd')][_0x52d8('0x3')](_0x376087['view']);});}[_0x52d8('0x22')](){return this['editor']['editing']['view'][_0x52d8('0x22')];}[_0x52d8('0xe')](_0x4a4032){if('function'!=typeof _0x4a4032)throw new _0x47250c(_0x52d8('0x2a'));this[_0x52d8('0x26')][_0x52d8('0x1')](_0x4a4032);}[_0x52d8('0x19')](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x37804e,annotations:_0x305138}){const _0x4af3f6=[],_0x51b232=this[_0x52d8('0x1d')][_0x52d8('0x1f')][_0x52d8('0x5')][_0x52d8('0xf')],_0x226aba=Array[_0x52d8('0x4')](_0x51b232[_0x52d8('0x1b')]());for(const [_0x295ec4,_0xc3222b]of this[_0x52d8('0x15')]){const _0x262f2d=_0x3350e1(_0xc3222b),_0x15ba0b=_0x305138['getByInnerView'](_0x295ec4);_0x262f2d&&_0x15ba0b&&_0x4af3f6[_0x52d8('0x11')]({'annotation':_0x15ba0b,'range':_0x262f2d});}function _0x3350e1(_0x2190e1){for(const _0x9d02b9 of _0x2190e1)for(const _0x5a8bb5 of _0x226aba)if(_0x9d02b9['containsRange'](_0x5a8bb5,!_0x51b232[_0x52d8('0x27')]))return _0x9d02b9;return null;}return _0x4af3f6[_0x52d8('0x24')]((_0x4ad68f,_0x43c0b4)=>{const _0x1ca454=_0x4ad68f[_0x52d8('0x7')],_0x34e822=_0x43c0b4[_0x52d8('0x7')];if(!_0x1ca454[_0x52d8('0x13')](_0x34e822)){if(_0x1ca454['containsRange'](_0x34e822,!0x0))return 0x1;if(_0x34e822[_0x52d8('0xc')](_0x1ca454,!0x0))return-0x1;}return _0x4ad68f[_0x52d8('0x2c')]==_0x37804e?-0x1:_0x43c0b4[_0x52d8('0x2c')]==_0x37804e?0x1:0x0;})[_0x52d8('0x1c')](_0x34aab0=>_0x34aab0[_0x52d8('0x2c')]);}get[_0x52d8('0x15')](){const _0x45d1ca=new Map();for(const _0x53dc34 of Array[_0x52d8('0x4')](this[_0x52d8('0x26')]))for(const [_0x102106,_0x1db288]of _0x53dc34())_0x45d1ca[_0x52d8('0x21')](_0x102106,_0x1db288);return _0x45d1ca;}}
23
+ const _0x32b7=['element','refresh','isCollapsed','hasDomSelection','set','pluginName','selection','getOrderedSelectedAnnotations','blur','focusTracker','refreshSelectedViews','collection','directChange','map','getRanges','annotation','innerView','_editorAnnotationsData','remove','listenTo','push','getByInnerView','cancel','has','document','add','change:range','isEqual','from','isReadOnly','_editorAnnotations','plugins','editor','function','editorannotations-invalid-source-callback','_dataCollectors','uiUpdate','fire','view','model','editing','range','get','init','update','addSourceCollector','change:isFocused','containsRange'];(function(_0x5d7009,_0x32b7b1){const _0x14d6cd=function(_0x10d720){while(--_0x10d720){_0x5d7009['push'](_0x5d7009['shift']());}};_0x14d6cd(++_0x32b7b1);}(_0x32b7,0x1ec));const _0x14d6=function(_0x5d7009,_0x32b7b1){_0x5d7009=_0x5d7009-0x0;let _0x14d6cd=_0x32b7[_0x5d7009];return _0x14d6cd;};import{Plugin as _0x2c1bd5}from'ckeditor5/src/core';import{CKEditorError as _0x26e1ba}from'ckeditor5/src/utils';import{debounce as _0x2dc048}from'lodash-es';import _0x54e1fb from'./annotations';export default class k extends _0x2c1bd5{static get['requires'](){return[_0x54e1fb];}static get[_0x14d6('0x29')](){return'EditorAnnotations';}constructor(_0x1538fe){super(_0x1538fe),this[_0x14d6('0x17')]=new Set(),this['_editorAnnotations']=new Set();}[_0x14d6('0x1f')](){const _0x153aca=this['editor'],_0x5c0b7e=_0x153aca['model'][_0x14d6('0xc')][_0x14d6('0x2a')],_0x544140=_0x2dc048(()=>this[_0x14d6('0x2e')](),0xa);_0x5c0b7e['on'](_0x14d6('0xe'),(_0x12bce5,_0x5e7778)=>{_0x5e7778[_0x14d6('0x0')]&&(_0x544140[_0x14d6('0xa')](),this['refreshSelectedViews']());}),this[_0x14d6('0x7')](_0x153aca[_0x14d6('0x1c')][_0x14d6('0x1a')][_0x14d6('0xc')],_0x14d6('0x22'),(_0x26913c,_0x2443f4,_0x1ebcf8)=>{_0x1ebcf8&&_0x544140();}),this[_0x14d6('0x7')](_0x153aca['ui']['focusTracker'],_0x14d6('0x22'),(_0x27e60b,_0x164451,_0x51b5aa)=>{_0x51b5aa||_0x153aca[_0x14d6('0x11')]||this[_0x14d6('0x19')](_0x14d6('0x2c'),{'isAnnotationTracked':_0x3b3cc8=>this['_editorAnnotationsData']['has'](_0x3b3cc8[_0x14d6('0x4')])});}),this[_0x14d6('0x7')](this['editor']['ui'],_0x14d6('0x20'),()=>this['fire'](_0x14d6('0x18')));}['registerAnnotation'](_0xd6f92d){if(this[_0x14d6('0x12')][_0x14d6('0xb')](_0xd6f92d[_0x14d6('0x1a')]))return;this[_0x14d6('0x12')][_0x14d6('0xd')](_0xd6f92d[_0x14d6('0x1a')]),this[_0x14d6('0x14')]['ui'][_0x14d6('0x2d')][_0x14d6('0xd')](_0xd6f92d[_0x14d6('0x1a')][_0x14d6('0x24')]);const _0x37379c=this[_0x14d6('0x14')][_0x14d6('0x13')][_0x14d6('0x1e')](_0x54e1fb);this[_0x14d6('0x7')](_0x37379c[_0x14d6('0x2f')],_0x14d6('0x6'),(_0x123158,_0x1371f9)=>{this[_0x14d6('0x14')]['ui'][_0x14d6('0x2d')][_0x14d6('0x6')](_0x1371f9[_0x14d6('0x1a')][_0x14d6('0x24')]),this[_0x14d6('0x12')]['delete'](_0x1371f9[_0x14d6('0x1a')]);});}[_0x14d6('0x27')](){return this[_0x14d6('0x14')][_0x14d6('0x1c')][_0x14d6('0x1a')][_0x14d6('0x27')];}[_0x14d6('0x21')](_0x385686){if(_0x14d6('0x15')!=typeof _0x385686)throw new _0x26e1ba(_0x14d6('0x16'));this['_dataCollectors'][_0x14d6('0xd')](_0x385686);}[_0x14d6('0x2e')](){this[_0x14d6('0x19')](_0x14d6('0x25'));}[_0x14d6('0x2b')]({activeAnnotation:_0x4115d3,annotations:_0x2adb37}){const _0x58cdf4=[],_0x4270dc=this[_0x14d6('0x14')][_0x14d6('0x1b')]['document'][_0x14d6('0x2a')],_0x5a3561=Array[_0x14d6('0x10')](_0x4270dc[_0x14d6('0x2')]());for(const [_0x1dc852,_0x1ca95d]of this['_editorAnnotationsData']){const _0x5693dd=_0x369163(_0x1ca95d),_0x584437=_0x2adb37[_0x14d6('0x9')](_0x1dc852);_0x5693dd&&_0x584437&&_0x58cdf4[_0x14d6('0x8')]({'annotation':_0x584437,'range':_0x5693dd});}function _0x369163(_0x149bd7){for(const _0x1876aa of _0x149bd7)for(const _0x22c1a7 of _0x5a3561)if(_0x1876aa[_0x14d6('0x23')](_0x22c1a7,!_0x4270dc[_0x14d6('0x26')]))return _0x1876aa;return null;}return _0x58cdf4['sort']((_0x391634,_0x3b1de9)=>{const _0x5405c9=_0x391634[_0x14d6('0x1d')],_0x590765=_0x3b1de9[_0x14d6('0x1d')];if(!_0x5405c9[_0x14d6('0xf')](_0x590765)){if(_0x5405c9[_0x14d6('0x23')](_0x590765,!0x0))return 0x1;if(_0x590765['containsRange'](_0x5405c9,!0x0))return-0x1;}return _0x391634[_0x14d6('0x3')]==_0x4115d3?-0x1:_0x3b1de9[_0x14d6('0x3')]==_0x4115d3?0x1:0x0;})[_0x14d6('0x1')](_0x31f601=>_0x31f601[_0x14d6('0x3')]);}get[_0x14d6('0x5')](){const _0x2ac5d4=new Map();for(const _0x129bee of Array[_0x14d6('0x10')](this[_0x14d6('0x17')]))for(const [_0xb5af54,_0x5e5885]of _0x129bee())_0x2ac5d4[_0x14d6('0x28')](_0xb5af54,_0x5e5885);return _0x2ac5d4;}}
@@ -1,86 +1,86 @@
1
- /**
2
- * @module comments/annotations/inlineannotations
3
- * @publicApi
4
- */
5
- import { Plugin, type Editor } from 'ckeditor5/src/core';
6
- import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
7
- import EditorAnnotations from './editorannotations';
8
- import { ContextualBalloon } from 'ckeditor5/src/ui';
9
- import './../../theme/annotation-inline.css';
10
- import type Annotation from './annotation';
11
- import type AnnotationCollection from './annotationcollection';
12
- /**
13
- * The popup-style UI for displaying annotations next to editor target elements.
14
- *
15
- * It displays {@link module:comments/annotations/annotation~Annotation annotations} in the
16
- * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon balloon} where the current
17
- * {@link module:comments/annotations/inlineannotations~InlineAnnotations#activeAnnotation} is the displayed one.
18
- *
19
- * Note: this UI type works only with {@link module:core/editor/editor~Editor the Editor} and cannot be used in integrations where
20
- * there is only {@link module:core/context~Context context} without any editor.
21
- *
22
- * This UI is intended for narrow screens.
23
- *
24
- * To activate this UI use one of the following:
25
- *
26
- * ```ts
27
- * editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'inline' );
28
- * editor.plugins.get( 'AnnotationsUIs' ).activate( 'inline', filter );
29
- * ```
30
- *
31
- * See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
32
- */
33
- export default class InlineAnnotations extends Plugin implements AnnotationsUI<Plugin> {
34
- /**
35
- * An active annotation tracked by this UI.
36
- *
37
- * @observable
38
- */
39
- activeAnnotation: Annotation | null;
40
- isAttached: boolean;
41
- /**
42
- * A collection of annotations controlled by this UI.
43
- *
44
- * This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
45
- *
46
- * It is set to `null` if `InlineAnnotations` is not
47
- * {@link module:comments/annotations/inlineannotations~InlineAnnotations#attach attached}.
48
- */
49
- annotations: AnnotationCollection | null;
50
- /**
51
- * @inheritDoc
52
- */
53
- static get requires(): readonly [typeof EditorAnnotations, typeof ContextualBalloon, typeof AnnotationsUIs];
54
- /**
55
- * @inheritDoc
56
- */
57
- static get pluginName(): "InlineAnnotations";
58
- /**
59
- * @inheritDoc
60
- */
61
- constructor(editor: Editor);
62
- /**
63
- * @inheritDoc
64
- */
65
- init(): void;
66
- /**
67
- * @inheritDoc
68
- */
69
- afterInit(): void;
70
- /**
71
- * Sets the active annotation for this UI.
72
- */
73
- setActiveAnnotation(annotation: Annotation | null): void;
74
- /**
75
- * @inheritDoc
76
- */
77
- attach(annotations: AnnotationCollection): void;
78
- /**
79
- * @inheritDoc
80
- */
81
- detach(): void;
82
- /**
83
- * @inheritDoc
84
- */
85
- destroy(): void;
86
- }
1
+ /**
2
+ * @module comments/annotations/inlineannotations
3
+ * @publicApi
4
+ */
5
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
6
+ import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
7
+ import EditorAnnotations from './editorannotations';
8
+ import { ContextualBalloon } from 'ckeditor5/src/ui';
9
+ import './../../theme/annotation-inline.css';
10
+ import type Annotation from './annotation';
11
+ import type AnnotationCollection from './annotationcollection';
12
+ /**
13
+ * The popup-style UI for displaying annotations next to editor target elements.
14
+ *
15
+ * It displays {@link module:comments/annotations/annotation~Annotation annotations} in the
16
+ * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon balloon} where the current
17
+ * {@link module:comments/annotations/inlineannotations~InlineAnnotations#activeAnnotation} is the displayed one.
18
+ *
19
+ * Note: this UI type works only with {@link module:core/editor/editor~Editor the Editor} and cannot be used in integrations where
20
+ * there is only {@link module:core/context~Context context} without any editor.
21
+ *
22
+ * This UI is intended for narrow screens.
23
+ *
24
+ * To activate this UI use one of the following:
25
+ *
26
+ * ```ts
27
+ * editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'inline' );
28
+ * editor.plugins.get( 'AnnotationsUIs' ).activate( 'inline', filter );
29
+ * ```
30
+ *
31
+ * See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
32
+ */
33
+ export default class InlineAnnotations extends Plugin implements AnnotationsUI<Plugin> {
34
+ /**
35
+ * An active annotation tracked by this UI.
36
+ *
37
+ * @observable
38
+ */
39
+ activeAnnotation: Annotation | null;
40
+ isAttached: boolean;
41
+ /**
42
+ * A collection of annotations controlled by this UI.
43
+ *
44
+ * This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
45
+ *
46
+ * It is set to `null` if `InlineAnnotations` is not
47
+ * {@link module:comments/annotations/inlineannotations~InlineAnnotations#attach attached}.
48
+ */
49
+ annotations: AnnotationCollection | null;
50
+ /**
51
+ * @inheritDoc
52
+ */
53
+ static get requires(): readonly [typeof EditorAnnotations, typeof ContextualBalloon, typeof AnnotationsUIs];
54
+ /**
55
+ * @inheritDoc
56
+ */
57
+ static get pluginName(): "InlineAnnotations";
58
+ /**
59
+ * @inheritDoc
60
+ */
61
+ constructor(editor: Editor);
62
+ /**
63
+ * @inheritDoc
64
+ */
65
+ init(): void;
66
+ /**
67
+ * @inheritDoc
68
+ */
69
+ afterInit(): void;
70
+ /**
71
+ * Sets the active annotation for this UI.
72
+ */
73
+ setActiveAnnotation(annotation: Annotation | null): void;
74
+ /**
75
+ * @inheritDoc
76
+ */
77
+ attach(annotations: AnnotationCollection): void;
78
+ /**
79
+ * @inheritDoc
80
+ */
81
+ detach(): void;
82
+ /**
83
+ * @inheritDoc
84
+ */
85
+ destroy(): void;
86
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x6945=['listenTo','attach','init','annotations','keystrokes','detach','stopListening','_addedAnnotations','get','inlineannotations-attach-already-attached','domConverter','inlineannotations-not-allowed-with-context','_setSelectedAnnotations','isActive','isAttached','_selectedAnnotations','push','length','_forceRefresh','change:isFocused','getByView','view','change:visibleView','includes','hasView','targetRect','activeAnnotation','updatePosition','addObserver','fromRect','update','visibleView','register','_closeAnnotation','has','focus','right','switchTo','map','_addAnnotationToBalloon','editing','isFocused','width','set','requires','top','blur','_removeAnnotationFromBalloon','document','plugins','editableElement','_getBalloonTargetForAnnotation','hasActive','focusTracker','setActiveAnnotation','delete','bottom','target','left','context','from','editor','selection','find','clear','mousedown','change:height','collapse','InlineAnnotations','_manuallyClosed','_balloon','showStack','remove','getOrderedSelectedAnnotations','getFirstRange','getClientRects'];(function(_0x289491,_0x694508){const _0xf4d811=function(_0x1b43c3){while(--_0x1b43c3){_0x289491['push'](_0x289491['shift']());}};_0xf4d811(++_0x694508);}(_0x6945,0x10e));const _0xf4d8=function(_0x289491,_0x694508){_0x289491=_0x289491-0x0;let _0xf4d811=_0x6945[_0x289491];return _0xf4d811;};import{Plugin as _0x41a291}from'ckeditor5/src/core';import _0x4c08a8 from'./annotationsuis';import _0x5de9fa from'./editorannotations';import{ContextualBalloon as _0x4e5a9f}from'ckeditor5/src/ui';import{MouseObserver as _0x494030}from'ckeditor5/src/engine';import{CKEditorError as _0x4ca28e,Rect as _0xde2100}from'ckeditor5/src/utils';import'./../../theme/annotation-inline.css';export default class c extends _0x41a291{static get[_0xf4d8('0x2')](){return[_0x5de9fa,_0x4e5a9f,_0x4c08a8];}static get['pluginName'](){return _0xf4d8('0x1a');}constructor(_0x106424){super(_0x106424),_0x106424[_0xf4d8('0x4a')][_0xf4d8('0x37')][_0xf4d8('0x3e')](_0x494030),this[_0xf4d8('0x30')]=!0x1,this[_0xf4d8('0x1')](_0xf4d8('0x3c'),null),this[_0xf4d8('0x25')]=null,this[_0xf4d8('0x1b')]=new Set(),this['_balloon']=_0x106424[_0xf4d8('0x7')][_0xf4d8('0x2a')](_0x4e5a9f),this[_0xf4d8('0x29')]=new Set(),this['_selectedAnnotations']=[],this[_0xf4d8('0x34')]=!0x1;}[_0xf4d8('0x24')](){const _0x31667f=this[_0xf4d8('0x13')][_0xf4d8('0x7')][_0xf4d8('0x2a')](_0x4c08a8);_0x31667f[_0xf4d8('0x11')]===this[_0xf4d8('0x13')]&&(_0x31667f[_0xf4d8('0x42')]('inline',this),this[_0xf4d8('0x13')][_0xf4d8('0x26')][_0xf4d8('0x1')]('Esc',(_0x351736,_0x3c751f)=>{const _0x9f0631=this[_0xf4d8('0x1c')];if(this[_0xf4d8('0x30')]&&_0x9f0631['visibleView']){const _0x1ce3c2=this[_0xf4d8('0x25')]['getByView'](_0x9f0631[_0xf4d8('0x41')]);_0x1ce3c2&&this[_0xf4d8('0x43')](_0x1ce3c2),_0x3c751f();}}));}['afterInit'](){const _0x2b1e93=this[_0xf4d8('0x13')][_0xf4d8('0x7')]['get'](_0x4c08a8);_0x2b1e93[_0xf4d8('0x11')]===this[_0xf4d8('0x13')]&&(_0x2b1e93[_0xf4d8('0xa')]()||_0x2b1e93[_0xf4d8('0x47')]('inline'));}[_0xf4d8('0xc')](_0x492347){_0x492347!==this[_0xf4d8('0x3c')]&&(this[_0xf4d8('0x3c')]&&(this[_0xf4d8('0x3c')]['isActive']=!0x1),_0x492347&&this[_0xf4d8('0x13')]['ui'][_0xf4d8('0xb')][_0xf4d8('0x4b')]&&(this['annotations'][_0xf4d8('0x44')](_0x492347)&&this['_addAnnotationToBalloon'](_0x492347,!0x0),_0x492347[_0xf4d8('0x2f')]=!0x0),_0x492347||this[_0xf4d8('0x2e')]([]),this['activeAnnotation']=_0x492347);}[_0xf4d8('0x23')](_0x256190){this[_0xf4d8('0x25')]=_0x256190;const _0x242883=this[_0xf4d8('0x13')][_0xf4d8('0x7')]['get'](_0x4c08a8),_0x16af13=this[_0xf4d8('0x1c')];if(this['isAttached'])throw new _0x4ca28e(_0xf4d8('0x2b'),this);if(_0x242883['context']!==this['editor'])throw new _0x4ca28e(_0xf4d8('0x2d'),this);const _0x29164f=this['editor']['plugins'][_0xf4d8('0x2a')](_0x5de9fa);this[_0xf4d8('0x22')](_0x29164f,'refresh',()=>{const _0x4a5512=_0x29164f[_0xf4d8('0x1f')]({'annotations':this[_0xf4d8('0x25')],'activeAnnotation':this[_0xf4d8('0x3c')]});var _0x32c96f,_0x16e284;!this[_0xf4d8('0x34')]&&(_0x32c96f=_0x4a5512,_0x16e284=this[_0xf4d8('0x31')],_0x32c96f[_0xf4d8('0x33')]===_0x16e284[_0xf4d8('0x33')]&&_0x32c96f['every'](_0x5104c2=>_0x16e284[_0xf4d8('0x39')](_0x5104c2)))||(this[_0xf4d8('0x34')]=!0x1,this[_0xf4d8('0x2e')](_0x4a5512),this[_0xf4d8('0xc')](_0x4a5512[0x0]||null));}),this[_0xf4d8('0x22')](_0x29164f,_0xf4d8('0x4'),(_0x1b9bae,{isAnnotationTracked:_0x2d8eac})=>{this[_0xf4d8('0x3c')]&&_0x2d8eac(this[_0xf4d8('0x3c')])&&(this['_setSelectedAnnotations']([]),this[_0xf4d8('0xc')](null));}),this[_0xf4d8('0x22')](this[_0xf4d8('0x13')]['ui'][_0xf4d8('0xb')],_0xf4d8('0x35'),(_0x4f60d7,_0x501647,_0x5b8129)=>{_0x5b8129||this[_0xf4d8('0xc')](null);}),this['listenTo'](_0x256190,'remove',(_0x12fed7,_0x35b4b8)=>{this['_removeAnnotationFromBalloon'](_0x35b4b8),_0x35b4b8===this[_0xf4d8('0x3c')]&&this[_0xf4d8('0xc')](null);}),this['listenTo'](_0x16af13,_0xf4d8('0x38'),(_0x858980,_0x35ec85,_0x815065,_0x381aba)=>{_0x381aba&&this['stopListening'](_0x381aba);const _0x1a9185=_0x256190['getByView'](_0x815065);_0x815065&&_0x1a9185&&(this[_0xf4d8('0x22')](_0x815065,_0xf4d8('0x18'),()=>{_0x16af13['updatePosition']();}),this[_0xf4d8('0x22')](_0x815065,'Esc',()=>{this[_0xf4d8('0x43')](_0x1a9185),this['editor'][_0xf4d8('0x4a')][_0xf4d8('0x37')][_0xf4d8('0x45')]();}),this[_0xf4d8('0x3c')]!==_0x1a9185&&this[_0xf4d8('0xc')](_0x1a9185));}),this[_0xf4d8('0x22')](this[_0xf4d8('0x13')]['ui'],_0xf4d8('0x40'),()=>{_0x16af13['visibleView']&&(_0x256190[_0xf4d8('0x36')](_0x16af13[_0xf4d8('0x41')])&&_0x16af13[_0xf4d8('0x3d')]());}),this['listenTo'](this[_0xf4d8('0x13')][_0xf4d8('0x4a')][_0xf4d8('0x37')][_0xf4d8('0x6')],_0xf4d8('0x17'),()=>{this['_forceRefresh']=!0x0,this[_0xf4d8('0x1b')][_0xf4d8('0x16')]();}),this['editor']['editing'][_0xf4d8('0x37')][_0xf4d8('0x6')][_0xf4d8('0x14')][_0xf4d8('0x8')]&&this[_0xf4d8('0x13')]['editing'][_0xf4d8('0x37')][_0xf4d8('0x45')](),this[_0xf4d8('0x30')]=!0x0;}[_0xf4d8('0x27')](){if(!this[_0xf4d8('0x30')])throw new _0x4ca28e('inlineannotations-detach-not-attached',this);this[_0xf4d8('0xc')](null);for(const _0x47cf47 of this[_0xf4d8('0x29')])this[_0xf4d8('0x5')](_0x47cf47);this[_0xf4d8('0x28')](),this[_0xf4d8('0x30')]=!0x1,this[_0xf4d8('0x25')]=null;}['destroy'](){this[_0xf4d8('0x30')]&&this[_0xf4d8('0x27')]();}[_0xf4d8('0x2e')](_0x411f00){for(const _0x199564 of this['_selectedAnnotations'])_0x411f00['includes'](_0x199564)||this[_0xf4d8('0x1b')]['delete'](_0x199564);for(const _0x3de0d0 of this[_0xf4d8('0x25')])_0x411f00[_0xf4d8('0x39')](_0x3de0d0)||this[_0xf4d8('0x5')](_0x3de0d0);if(this[_0xf4d8('0x13')]['ui']['focusTracker'][_0xf4d8('0x4b')])for(const _0x426352 of _0x411f00)this[_0xf4d8('0x49')](_0x426352);this[_0xf4d8('0x31')]=_0x411f00;}['_addAnnotationToBalloon'](_0x3b0553,_0x3427a2=!0x1){this['_manuallyClosed'][_0xf4d8('0x44')](_0x3b0553)||(this[_0xf4d8('0x29')][_0xf4d8('0x44')](_0x3b0553)||this[_0xf4d8('0x1c')]['hasView'](_0x3b0553['view'])||(this[_0xf4d8('0x29')]['add'](_0x3b0553),this[_0xf4d8('0x1c')]['add']({'stackId':_0x3b0553[_0xf4d8('0x37')]['id'],'view':_0x3b0553[_0xf4d8('0x37')],'position':{'target':()=>this[_0xf4d8('0x9')](_0x3b0553)}})),_0x3427a2&&this[_0xf4d8('0x1c')][_0xf4d8('0x1d')](_0x3b0553[_0xf4d8('0x37')]['id']));}[_0xf4d8('0x9')](_0x1af791){const _0x2c7a17=_0x1af791[_0xf4d8('0xf')],_0x43a2d4=this['editor'][_0xf4d8('0x4a')][_0xf4d8('0x37')],_0x5932ff=_0x43a2d4[_0xf4d8('0x6')][_0xf4d8('0x14')][_0xf4d8('0x20')](),_0xde21bb=_0x43a2d4[_0xf4d8('0x2c')]['viewRangeToDom'](_0x5932ff);if(_0xde21bb[_0xf4d8('0x19')](!0x0),_0x2c7a17){if(_0x2c7a17 instanceof _0xde2100)return _0x2c7a17;let _0x6a3f9a=[];for(const _0x23d3d2 of _0x2c7a17)_0x6a3f9a[_0xf4d8('0x32')](...(_0xbc1230=_0x23d3d2[_0xf4d8('0x21')](),Array[_0xf4d8('0x12')](_0xbc1230)[_0xf4d8('0x48')](DOMRect[_0xf4d8('0x3f')])));_0x6a3f9a=function(_0x14f62a){const _0x5c9060=[];let _0x1bc178=_0x14f62a[0x0];for(let _0x2f7017=0x1;_0x2f7017<_0x14f62a[_0xf4d8('0x33')];_0x2f7017++)F(_0x1bc178,_0x14f62a[_0x2f7017])?_0x1bc178['width']+=_0x14f62a[_0x2f7017][_0xf4d8('0x0')]:(_0x5c9060[_0xf4d8('0x32')](_0x1bc178),_0x1bc178=_0x14f62a[_0x2f7017]);return _0x5c9060[_0xf4d8('0x32')](_0x1bc178),_0x5c9060;}(_0x6a3f9a);const _0xacacb3=_0xde21bb['getBoundingClientRect']();return _0x6a3f9a[_0xf4d8('0x15')](_0x34d007=>_0x34d007[_0xf4d8('0x3')]<=_0xacacb3[_0xf4d8('0x3')]&&_0x34d007[_0xf4d8('0xe')]>=_0xacacb3['bottom']&&_0x34d007[_0xf4d8('0x10')]<=_0xacacb3[_0xf4d8('0x10')]&&_0x34d007['right']>=_0xacacb3['right'])||_0x6a3f9a[0x0];}var _0xbc1230;return _0x1af791[_0xf4d8('0x3b')]||_0xde21bb;}[_0xf4d8('0x5')](_0x58036c){this[_0xf4d8('0x29')][_0xf4d8('0x44')](_0x58036c)&&this[_0xf4d8('0x1c')][_0xf4d8('0x3a')](_0x58036c[_0xf4d8('0x37')])&&(this[_0xf4d8('0x29')][_0xf4d8('0xd')](_0x58036c),this[_0xf4d8('0x1c')][_0xf4d8('0x1e')](_0x58036c[_0xf4d8('0x37')]));}[_0xf4d8('0x43')](_0x570093){this[_0xf4d8('0x1b')]['add'](_0x570093),this[_0xf4d8('0x5')](_0x570093);}}function F(_0x465812,_0xbe5da5){return _0x465812[_0xf4d8('0x3')]===_0xbe5da5[_0xf4d8('0x3')]&&_0x465812[_0xf4d8('0xe')]===_0xbe5da5[_0xf4d8('0xe')]&&_0x465812[_0xf4d8('0x46')]===_0xbe5da5[_0xf4d8('0x10')];}
23
+ const _0x68ec=['targetRect','_addAnnotationToBalloon','Esc','viewRangeToDom','hasView','isAttached','editableElement','getClientRects','view','hasActive','switchTo','updatePosition','activeAnnotation','detach','change:height','delete','map','getOrderedSelectedAnnotations','selection','update','stopListening','get','has','annotations','remove','target','listenTo','setActiveAnnotation','pluginName','destroy','_getBalloonTargetForAnnotation','getFirstRange','width','every','_addedAnnotations','attach','fromRect','left','afterInit','push','_closeAnnotation','mousedown','getBoundingClientRect','_setSelectedAnnotations','includes','isFocused','keystrokes','inlineannotations-detach-not-attached','focus','inline','domConverter','document','find','_forceRefresh','from','getByView','_selectedAnnotations','length','plugins','_manuallyClosed','editor','isActive','right','showStack','top','editing','change:visibleView','requires','clear','refresh','register','inlineannotations-not-allowed-with-context','InlineAnnotations','add','addObserver','visibleView','set','_balloon','_removeAnnotationFromBalloon','bottom','focusTracker','context'];(function(_0x35f67e,_0x68ecb3){const _0x11dcd7=function(_0x4aa1b6){while(--_0x4aa1b6){_0x35f67e['push'](_0x35f67e['shift']());}};_0x11dcd7(++_0x68ecb3);}(_0x68ec,0x146));const _0x11dc=function(_0x35f67e,_0x68ecb3){_0x35f67e=_0x35f67e-0x0;let _0x11dcd7=_0x68ec[_0x35f67e];return _0x11dcd7;};import{Plugin as _0x5665cc}from'ckeditor5/src/core';import _0x2d0665 from'./annotationsuis';import _0x10931f from'./editorannotations';import{ContextualBalloon as _0x22bb93}from'ckeditor5/src/ui';import{MouseObserver as _0x4a0163}from'ckeditor5/src/engine';import{CKEditorError as _0x2606df,Rect as _0x559d6e}from'ckeditor5/src/utils';import'./../../theme/annotation-inline.css';export default class c extends _0x5665cc{static get[_0x11dc('0x45')](){return[_0x10931f,_0x22bb93,_0x2d0665];}static get[_0x11dc('0x1e')](){return _0x11dc('0x4a');}constructor(_0x3853b9){super(_0x3853b9),_0x3853b9[_0x11dc('0x43')][_0x11dc('0xa')][_0x11dc('0x4c')](_0x4a0163),this['isAttached']=!0x1,this[_0x11dc('0x4e')]('activeAnnotation',null),this[_0x11dc('0x19')]=null,this[_0x11dc('0x3d')]=new Set(),this[_0x11dc('0x4f')]=_0x3853b9[_0x11dc('0x3c')][_0x11dc('0x17')](_0x22bb93),this[_0x11dc('0x24')]=new Set(),this['_selectedAnnotations']=[],this[_0x11dc('0x37')]=!0x1;}['init'](){const _0x1030e4=this[_0x11dc('0x3e')][_0x11dc('0x3c')][_0x11dc('0x17')](_0x2d0665);_0x1030e4[_0x11dc('0x1')]===this[_0x11dc('0x3e')]&&(_0x1030e4[_0x11dc('0x48')](_0x11dc('0x33'),this),this['editor'][_0x11dc('0x30')][_0x11dc('0x4e')]('Esc',(_0x53a118,_0x5a3a8a)=>{const _0x511be4=this[_0x11dc('0x4f')];if(this[_0x11dc('0x7')]&&_0x511be4[_0x11dc('0x4d')]){const _0x2beca9=this[_0x11dc('0x19')][_0x11dc('0x39')](_0x511be4['visibleView']);_0x2beca9&&this[_0x11dc('0x2a')](_0x2beca9),_0x5a3a8a();}}));}[_0x11dc('0x28')](){const _0x1aa42d=this[_0x11dc('0x3e')][_0x11dc('0x3c')][_0x11dc('0x17')](_0x2d0665);_0x1aa42d[_0x11dc('0x1')]===this[_0x11dc('0x3e')]&&(_0x1aa42d[_0x11dc('0xb')]()||_0x1aa42d[_0x11dc('0xc')](_0x11dc('0x33')));}[_0x11dc('0x1d')](_0x569be5){_0x569be5!==this[_0x11dc('0xe')]&&(this[_0x11dc('0xe')]&&(this['activeAnnotation'][_0x11dc('0x3f')]=!0x1),_0x569be5&&this[_0x11dc('0x3e')]['ui'][_0x11dc('0x0')][_0x11dc('0x2f')]&&(this[_0x11dc('0x19')][_0x11dc('0x18')](_0x569be5)&&this[_0x11dc('0x3')](_0x569be5,!0x0),_0x569be5[_0x11dc('0x3f')]=!0x0),_0x569be5||this[_0x11dc('0x2d')]([]),this[_0x11dc('0xe')]=_0x569be5);}[_0x11dc('0x25')](_0x19146c){this[_0x11dc('0x19')]=_0x19146c;const _0x5e7ad6=this[_0x11dc('0x3e')][_0x11dc('0x3c')][_0x11dc('0x17')](_0x2d0665),_0x107406=this[_0x11dc('0x4f')];if(this['isAttached'])throw new _0x2606df('inlineannotations-attach-already-attached',this);if(_0x5e7ad6[_0x11dc('0x1')]!==this[_0x11dc('0x3e')])throw new _0x2606df(_0x11dc('0x49'),this);const _0x18cc90=this[_0x11dc('0x3e')][_0x11dc('0x3c')][_0x11dc('0x17')](_0x10931f);this[_0x11dc('0x1c')](_0x18cc90,_0x11dc('0x47'),()=>{const _0x758bc4=_0x18cc90[_0x11dc('0x13')]({'annotations':this[_0x11dc('0x19')],'activeAnnotation':this['activeAnnotation']});var _0x3e5322,_0x20dc6c;!this[_0x11dc('0x37')]&&(_0x3e5322=_0x758bc4,_0x20dc6c=this[_0x11dc('0x3a')],_0x3e5322['length']===_0x20dc6c[_0x11dc('0x3b')]&&_0x3e5322[_0x11dc('0x23')](_0x34ab17=>_0x20dc6c[_0x11dc('0x2e')](_0x34ab17)))||(this[_0x11dc('0x37')]=!0x1,this[_0x11dc('0x2d')](_0x758bc4),this['setActiveAnnotation'](_0x758bc4[0x0]||null));}),this[_0x11dc('0x1c')](_0x18cc90,'blur',(_0x4d9956,{isAnnotationTracked:_0x4aa1b8})=>{this[_0x11dc('0xe')]&&_0x4aa1b8(this[_0x11dc('0xe')])&&(this[_0x11dc('0x2d')]([]),this[_0x11dc('0x1d')](null));}),this['listenTo'](this[_0x11dc('0x3e')]['ui'][_0x11dc('0x0')],'change:isFocused',(_0x448002,_0x27c2b5,_0x4ce9f7)=>{_0x4ce9f7||this[_0x11dc('0x1d')](null);}),this[_0x11dc('0x1c')](_0x19146c,_0x11dc('0x1a'),(_0x7cc125,_0x2191b0)=>{this['_removeAnnotationFromBalloon'](_0x2191b0),_0x2191b0===this[_0x11dc('0xe')]&&this[_0x11dc('0x1d')](null);}),this[_0x11dc('0x1c')](_0x107406,_0x11dc('0x44'),(_0x5c3a5b,_0x6b34b2,_0x6e2403,_0x264d89)=>{_0x264d89&&this[_0x11dc('0x16')](_0x264d89);const _0x13af38=_0x19146c['getByView'](_0x6e2403);_0x6e2403&&_0x13af38&&(this['listenTo'](_0x6e2403,_0x11dc('0x10'),()=>{_0x107406['updatePosition']();}),this[_0x11dc('0x1c')](_0x6e2403,_0x11dc('0x4'),()=>{this[_0x11dc('0x2a')](_0x13af38),this[_0x11dc('0x3e')][_0x11dc('0x43')][_0x11dc('0xa')][_0x11dc('0x32')]();}),this[_0x11dc('0xe')]!==_0x13af38&&this[_0x11dc('0x1d')](_0x13af38));}),this[_0x11dc('0x1c')](this[_0x11dc('0x3e')]['ui'],_0x11dc('0x15'),()=>{_0x107406['visibleView']&&(_0x19146c[_0x11dc('0x39')](_0x107406[_0x11dc('0x4d')])&&_0x107406[_0x11dc('0xd')]());}),this[_0x11dc('0x1c')](this[_0x11dc('0x3e')]['editing'][_0x11dc('0xa')]['document'],_0x11dc('0x2b'),()=>{this[_0x11dc('0x37')]=!0x0,this[_0x11dc('0x3d')][_0x11dc('0x46')]();}),this[_0x11dc('0x3e')][_0x11dc('0x43')]['view'][_0x11dc('0x35')][_0x11dc('0x14')][_0x11dc('0x8')]&&this[_0x11dc('0x3e')][_0x11dc('0x43')][_0x11dc('0xa')][_0x11dc('0x32')](),this[_0x11dc('0x7')]=!0x0;}[_0x11dc('0xf')](){if(!this[_0x11dc('0x7')])throw new _0x2606df(_0x11dc('0x31'),this);this[_0x11dc('0x1d')](null);for(const _0xcfb3da of this[_0x11dc('0x24')])this[_0x11dc('0x50')](_0xcfb3da);this[_0x11dc('0x16')](),this[_0x11dc('0x7')]=!0x1,this['annotations']=null;}[_0x11dc('0x1f')](){this[_0x11dc('0x7')]&&this['detach']();}[_0x11dc('0x2d')](_0x4c139c){for(const _0xb8a520 of this[_0x11dc('0x3a')])_0x4c139c[_0x11dc('0x2e')](_0xb8a520)||this['_manuallyClosed']['delete'](_0xb8a520);for(const _0x3d870e of this[_0x11dc('0x19')])_0x4c139c[_0x11dc('0x2e')](_0x3d870e)||this[_0x11dc('0x50')](_0x3d870e);if(this[_0x11dc('0x3e')]['ui'][_0x11dc('0x0')][_0x11dc('0x2f')])for(const _0x16d9db of _0x4c139c)this['_addAnnotationToBalloon'](_0x16d9db);this[_0x11dc('0x3a')]=_0x4c139c;}[_0x11dc('0x3')](_0x316563,_0x126f15=!0x1){this[_0x11dc('0x3d')]['has'](_0x316563)||(this['_addedAnnotations'][_0x11dc('0x18')](_0x316563)||this[_0x11dc('0x4f')][_0x11dc('0x6')](_0x316563[_0x11dc('0xa')])||(this['_addedAnnotations'][_0x11dc('0x4b')](_0x316563),this[_0x11dc('0x4f')][_0x11dc('0x4b')]({'stackId':_0x316563[_0x11dc('0xa')]['id'],'view':_0x316563['view'],'position':{'target':()=>this[_0x11dc('0x20')](_0x316563)}})),_0x126f15&&this['_balloon'][_0x11dc('0x41')](_0x316563[_0x11dc('0xa')]['id']));}[_0x11dc('0x20')](_0x1a5c8d){const _0x40b303=_0x1a5c8d[_0x11dc('0x1b')],_0x157aff=this[_0x11dc('0x3e')][_0x11dc('0x43')][_0x11dc('0xa')],_0x5a8d07=_0x157aff[_0x11dc('0x35')][_0x11dc('0x14')][_0x11dc('0x21')](),_0x15f0c1=_0x157aff[_0x11dc('0x34')][_0x11dc('0x5')](_0x5a8d07);if(_0x15f0c1['collapse'](!0x0),_0x40b303){if(_0x40b303 instanceof _0x559d6e)return _0x40b303;let _0xb5c670=[];for(const _0x8fb271 of _0x40b303)_0xb5c670['push'](...(_0x34a59f=_0x8fb271[_0x11dc('0x9')](),Array[_0x11dc('0x38')](_0x34a59f)[_0x11dc('0x12')](DOMRect[_0x11dc('0x26')])));_0xb5c670=function(_0x878bf8){const _0x55834b=[];let _0x5c79e3=_0x878bf8[0x0];for(let _0xf46029=0x1;_0xf46029<_0x878bf8[_0x11dc('0x3b')];_0xf46029++)F(_0x5c79e3,_0x878bf8[_0xf46029])?_0x5c79e3[_0x11dc('0x22')]+=_0x878bf8[_0xf46029][_0x11dc('0x22')]:(_0x55834b[_0x11dc('0x29')](_0x5c79e3),_0x5c79e3=_0x878bf8[_0xf46029]);return _0x55834b[_0x11dc('0x29')](_0x5c79e3),_0x55834b;}(_0xb5c670);const _0x31dac0=_0x15f0c1[_0x11dc('0x2c')]();return _0xb5c670[_0x11dc('0x36')](_0x966fd0=>_0x966fd0[_0x11dc('0x42')]<=_0x31dac0[_0x11dc('0x42')]&&_0x966fd0[_0x11dc('0x51')]>=_0x31dac0[_0x11dc('0x51')]&&_0x966fd0[_0x11dc('0x27')]<=_0x31dac0['left']&&_0x966fd0[_0x11dc('0x40')]>=_0x31dac0[_0x11dc('0x40')])||_0xb5c670[0x0];}var _0x34a59f;return _0x1a5c8d[_0x11dc('0x2')]||_0x15f0c1;}[_0x11dc('0x50')](_0x4d1f65){this[_0x11dc('0x24')][_0x11dc('0x18')](_0x4d1f65)&&this['_balloon'][_0x11dc('0x6')](_0x4d1f65[_0x11dc('0xa')])&&(this['_addedAnnotations'][_0x11dc('0x11')](_0x4d1f65),this['_balloon'][_0x11dc('0x1a')](_0x4d1f65['view']));}[_0x11dc('0x2a')](_0x830b4f){this['_manuallyClosed'][_0x11dc('0x4b')](_0x830b4f),this[_0x11dc('0x50')](_0x830b4f);}}function F(_0x1c639e,_0x3393b6){return _0x1c639e[_0x11dc('0x42')]===_0x3393b6[_0x11dc('0x42')]&&_0x1c639e['bottom']===_0x3393b6[_0x11dc('0x51')]&&_0x1c639e['right']===_0x3393b6['left'];}
@@ -1,81 +1,81 @@
1
- /**
2
- * @module comments/annotations/narrowsidebar
3
- * @publicApi
4
- */
5
- import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core';
6
- import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
7
- import Sidebar from './sidebar';
8
- import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui';
9
- import '../../theme/sidebar-narrow.css';
10
- import type Annotation from './annotation';
11
- import type { default as AnnotationCollection } from './annotationcollection';
12
- /**
13
- * The narrow sidebar UI for displaying annotations.
14
- *
15
- * Binds {@link module:comments/annotations/annotations~Annotations} plugin with
16
- * {@link module:comments/annotations/sidebar~Sidebar} plugin to display annotations in the sidebar as
17
- * {@link module:comments/annotations/view/annotationcounterbuttonview~AnnotationCounterButtonView small icons}.
18
- *
19
- * After selecting an annotation the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} with an
20
- * {@link module:comments/annotations/view/annotationview~AnnotationView} appears attached to the sidebar item.
21
- *
22
- * This UI is intended for medium-sized viewports.
23
- *
24
- * To activate this UI use one of the following:
25
- *
26
- * ```ts
27
- * editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'narrowSidebar' );
28
- * editor.plugins.get( 'AnnotationsUIs' ).activate( 'narrowSidebar', filter );
29
- * ```
30
- *
31
- * See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
32
- */
33
- export default class NarrowSidebar extends ContextPlugin implements AnnotationsUI<ContextPlugin> {
34
- /**
35
- * An active annotation tracked by this UI.
36
- */
37
- activeAnnotation: Annotation | null;
38
- bodyCollection: BodyCollection;
39
- balloonPanelView: BalloonPanelView;
40
- isAttached: boolean;
41
- /**
42
- * A collection of annotations controlled by this UI.
43
- *
44
- * This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
45
- *
46
- * It is set to `null` if `NarrowSidebar` is not {@link module:comments/annotations/narrowsidebar~NarrowSidebar#attach attached}.
47
- */
48
- annotations: AnnotationCollection | null;
49
- /**
50
- * @inheritDoc
51
- */
52
- static get requires(): readonly [typeof Sidebar, typeof AnnotationsUIs];
53
- /**
54
- * @inheritDoc
55
- */
56
- static get pluginName(): "NarrowSidebar";
57
- /**
58
- * @inheritDoc
59
- */
60
- constructor(context: Context | Editor);
61
- /**
62
- * @inheritDoc
63
- */
64
- init(): void;
65
- /**
66
- * @inheritDoc
67
- */
68
- attach(annotations: AnnotationCollection): void;
69
- /**
70
- * Sets the active annotation for this UI.
71
- */
72
- setActiveAnnotation(annotation: Annotation | null): void;
73
- /**
74
- * @inheritDoc
75
- */
76
- detach(): void;
77
- /**
78
- * @inheritDoc
79
- */
80
- destroy(): void;
81
- }
1
+ /**
2
+ * @module comments/annotations/narrowsidebar
3
+ * @publicApi
4
+ */
5
+ import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core';
6
+ import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
7
+ import Sidebar from './sidebar';
8
+ import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui';
9
+ import '../../theme/sidebar-narrow.css';
10
+ import type Annotation from './annotation';
11
+ import type { default as AnnotationCollection } from './annotationcollection';
12
+ /**
13
+ * The narrow sidebar UI for displaying annotations.
14
+ *
15
+ * Binds {@link module:comments/annotations/annotations~Annotations} plugin with
16
+ * {@link module:comments/annotations/sidebar~Sidebar} plugin to display annotations in the sidebar as
17
+ * {@link module:comments/annotations/view/annotationcounterbuttonview~AnnotationCounterButtonView small icons}.
18
+ *
19
+ * After selecting an annotation the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} with an
20
+ * {@link module:comments/annotations/view/annotationview~AnnotationView} appears attached to the sidebar item.
21
+ *
22
+ * This UI is intended for medium-sized viewports.
23
+ *
24
+ * To activate this UI use one of the following:
25
+ *
26
+ * ```ts
27
+ * editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'narrowSidebar' );
28
+ * editor.plugins.get( 'AnnotationsUIs' ).activate( 'narrowSidebar', filter );
29
+ * ```
30
+ *
31
+ * See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
32
+ */
33
+ export default class NarrowSidebar extends ContextPlugin implements AnnotationsUI<ContextPlugin> {
34
+ /**
35
+ * An active annotation tracked by this UI.
36
+ */
37
+ activeAnnotation: Annotation | null;
38
+ bodyCollection: BodyCollection;
39
+ balloonPanelView: BalloonPanelView;
40
+ isAttached: boolean;
41
+ /**
42
+ * A collection of annotations controlled by this UI.
43
+ *
44
+ * This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
45
+ *
46
+ * It is set to `null` if `NarrowSidebar` is not {@link module:comments/annotations/narrowsidebar~NarrowSidebar#attach attached}.
47
+ */
48
+ annotations: AnnotationCollection | null;
49
+ /**
50
+ * @inheritDoc
51
+ */
52
+ static get requires(): readonly [typeof Sidebar, typeof AnnotationsUIs];
53
+ /**
54
+ * @inheritDoc
55
+ */
56
+ static get pluginName(): "NarrowSidebar";
57
+ /**
58
+ * @inheritDoc
59
+ */
60
+ constructor(context: Context | Editor);
61
+ /**
62
+ * @inheritDoc
63
+ */
64
+ init(): void;
65
+ /**
66
+ * @inheritDoc
67
+ */
68
+ attach(annotations: AnnotationCollection): void;
69
+ /**
70
+ * Sets the active annotation for this UI.
71
+ */
72
+ setActiveAnnotation(annotation: Annotation | null): void;
73
+ /**
74
+ * @inheritDoc
75
+ */
76
+ detach(): void;
77
+ /**
78
+ * @inheritDoc
79
+ */
80
+ destroy(): void;
81
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5b49=['_detachListeners','high','get','southArrowNorthWest','change:container','remove','execute','register','type','stopPropagation','balloonPanelView','number','includes','context','getByView','bodyCollection','listenTo','_updateBalloonPosition','unpin','content','element','editors','stopListening','_setSelectedAnnotations','annotationType','_selectedAnnotations','_showBalloon','_refreshPositioning','defaultPositions','northArrowSouth','preventClosingBalloon','requires','delete','isDirty','preventDefault','EditorAnnotations','isVisible','getOrderedSelectedAnnotations','_integrateWithEditorAnnotations','southArrowNorthEast','ck-sidebar--narrow','plugins','pin','from','create','focus','_destroyEditorAnnotationsIntegration','_annotationToNarrowView','blur','target','cancel','isAttached','Esc','activeAnnotation','keydown','mousedown','_manuallyClosedAnnotationViews','set','refresh','hasDomSelection','rearrange','removeEventListener','attach','attachToDom','first','change:height','pluginName','NarrowSidebar','narrowsidebar-attach-already-attached','locale','_refreshPositioningDebounced','contains','off','clear','detach','resize','_domEmitter','length','bind','setActiveAnnotation','has','add','_hideBalloon','view','northArrowSouthEast','destroy','init','narrowSidebar','_attachListeners','getSidebarItemView','addAnnotation','narrowsidebar-detach-not-attached','annotations','southArrowNorth','_editorAnnotations'];(function(_0x25739d,_0x5b4932){const _0x502727=function(_0x22df0f){while(--_0x22df0f){_0x25739d['push'](_0x25739d['shift']());}};_0x502727(++_0x5b4932);}(_0x5b49,0x101));const _0x5027=function(_0x25739d,_0x5b4932){_0x25739d=_0x25739d-0x0;let _0x502727=_0x5b49[_0x25739d];return _0x502727;};import{ContextPlugin as _0x899252,Context as _0x26f1e2}from'ckeditor5/src/core';import _0x25ddf0 from'./annotationsuis';import _0x838c25 from'./sidebar';import _0x13d6d5 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x21547a,BodyCollection as _0xc6c072}from'ckeditor5/src/ui';import{CKEditorError as _0x4da9d6,DomEmitterMixin as _0x19c28c,keyCodes as _0x54f606,Collection as _0x55f92f}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x555798}from'lodash-es';import _0x3f5c70 from'./editorannotations';export default class s extends _0x899252{static get[_0x5027('0x3b')](){return[_0x838c25,_0x25ddf0];}static get[_0x5027('0x5e')](){return _0x5027('0x0');}constructor(_0x4ee07f){super(_0x4ee07f),this[_0x5027('0x4f')]=!0x1,this[_0x5027('0x54')]=new Set(),this[_0x5027('0x9')]=Object[_0x5027('0x48')](_0x19c28c),this[_0x5027('0x4b')]=new Map(),this[_0x5027('0x55')]('activeAnnotation',null),this[_0x5027('0x19')]=null,this[_0x5027('0x35')]=[],this[_0x5027('0x1b')]=new _0x55f92f(),this[_0x5027('0x3')]=_0x555798(()=>{this[_0x5027('0x37')]();},0xfa,{'leading':!0x1});}[_0x5027('0x13')](){this['context'][_0x5027('0x45')][_0x5027('0x1e')](_0x25ddf0)[_0x5027('0x23')](_0x5027('0x14'),this),this['bodyCollection']=new _0xc6c072(this[_0x5027('0x29')]['locale']),this[_0x5027('0x26')]=new _0x21547a(this[_0x5027('0x29')][_0x5027('0x2')]),this[_0x5027('0x2b')][_0x5027('0x5b')](),this[_0x5027('0x2b')][_0x5027('0xe')](this[_0x5027('0x26')]);}['attach'](_0x18f85d){this[_0x5027('0x19')]=_0x18f85d;const _0x2ad062=this[_0x5027('0x29')]['plugins'][_0x5027('0x1e')](_0x838c25),_0x26b565=this[_0x5027('0x26')];if(_0x2ad062['_annotations']=_0x18f85d,this[_0x5027('0x4f')])throw new _0x4da9d6(_0x5027('0x1'),this);this['isAttached']=!0x0,this[_0x5027('0x2c')](_0x2ad062,'set:container',()=>{this[_0x5027('0x7')](),this[_0x5027('0x2c')](_0x2ad062,_0x5027('0x20'),_0x4aa58a=>{_0x4aa58a[_0x5027('0x5')](),this[_0x5027('0x5a')](_0x18f85d);});}),_0x2ad062['_attachToContainer']({'viewClass':_0x5027('0x44'),'spaceBetweenItems':0x5});const _0x1b3e12=_0x4d0d92=>{const _0x4daea2=new _0x13d6d5(this[_0x5027('0x29')][_0x5027('0x2')]);_0x2ad062[_0x5027('0x17')](_0x4d0d92,_0x4daea2),this[_0x5027('0x4b')]['set'](_0x4d0d92,_0x4daea2),_0x4daea2[_0x5027('0xb')]('isDirty',_0x5027('0x34'),_0x5027('0x27'))['to'](_0x4d0d92[_0x5027('0x10')],_0x5027('0x3d'),_0x5027('0x24'),_0x5027('0xa')),_0x4daea2['on'](_0x5027('0x22'),()=>{this[_0x5027('0x54')][_0x5027('0x6')](),_0x26b565[_0x5027('0x2f')][_0x5027('0x5c')]!==_0x4d0d92[_0x5027('0x10')]?(this[_0x5027('0x36')](_0x4d0d92),_0x4d0d92[_0x5027('0x10')]['element']['focus'](),this['setActiveAnnotation'](_0x4d0d92)):this[_0x5027('0xc')](null);});};for(const _0x4bcab8 of _0x18f85d)_0x1b3e12(_0x4bcab8);this['listenTo'](_0x18f85d,_0x5027('0xe'),(_0x8f72c9,_0x5d1d3f)=>{_0x1b3e12(_0x5d1d3f);}),this[_0x5027('0x2c')](_0x18f85d,_0x5027('0x21'),(_0x158c21,_0x4827f1,_0x2a5324)=>{this['_annotationToNarrowView'][_0x5027('0x1e')](_0x4827f1)[_0x5027('0x12')](),this['_annotationToNarrowView'][_0x5027('0x3c')](_0x4827f1),_0x2ad062[_0x5027('0x58')]({'removedAnnotation':_0x4827f1,'previousAnnotation':_0x18f85d['get'](_0x2a5324-0x1),'nextAnnotation':_0x18f85d['get'](_0x2a5324+0x1)}),_0x4827f1===this['activeAnnotation']&&this[_0x5027('0xc')](null);},{'priority':'low'}),this[_0x5027('0x2c')](_0x18f85d,_0x5027('0x49'),(_0x4fd83e,_0x533137)=>{this[_0x5027('0xc')](_0x533137);}),this[_0x5027('0x2c')](_0x18f85d,_0x5027('0x4c'),()=>{this[_0x5027('0xc')](null);}),this[_0x5027('0x9')][_0x5027('0x2c')](document,_0x5027('0x52'),(_0x3f3add,_0x2f52cc)=>{_0x2f52cc['keyCode']===_0x54f606['esc']&&_0x26b565[_0x5027('0x40')]&&(this[_0x5027('0x54')][_0x5027('0xe')](_0x26b565[_0x5027('0x2f')][_0x5027('0x5c')]),this[_0x5027('0xf')](),_0x2f52cc[_0x5027('0x25')](),_0x2f52cc[_0x5027('0x3e')]());}),this[_0x5027('0x9')][_0x5027('0x2c')](document,_0x5027('0x53'),(_0x3edfc8,_0x329a3d)=>{const _0x323a12=_0x329a3d['target'];_0x26b565[_0x5027('0x40')]&&_0x26b565[_0x5027('0x30')]['contains'](_0x323a12)||_0x2ad062[_0x5027('0x10')][_0x5027('0x30')][_0x5027('0x4')](_0x323a12)||_0x3edfc8[_0x5027('0x3a')]||(this[_0x5027('0x54')][_0x5027('0x6')](),this[_0x5027('0xf')](),this[_0x5027('0xc')](null));});const _0x2dcd50=this[_0x5027('0x29')]instanceof _0x26f1e2?this[_0x5027('0x29')][_0x5027('0x31')]:new _0x55f92f([this['context']]);for(const _0x10a030 of _0x2dcd50)this[_0x5027('0x42')](_0x10a030);this[_0x5027('0x2c')](_0x2dcd50,_0x5027('0xe'),(_0x1f2922,_0x549da4)=>{this[_0x5027('0x2c')](_0x549da4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x549da4);});}),this['listenTo'](_0x2dcd50,_0x5027('0x21'),(_0x32b0a7,_0x3632a0)=>{_0x3632a0[_0x5027('0x45')][_0x5027('0xd')](_0x5027('0x3f'))&&this[_0x5027('0x4a')](_0x3632a0[_0x5027('0x45')][_0x5027('0x1e')](_0x5027('0x3f')));}),window['addEventListener'](_0x5027('0x8'),this[_0x5027('0x3')]),this[_0x5027('0x37')]();}[_0x5027('0xc')](_0xa36d22){if(_0xa36d22===this[_0x5027('0x51')])return;const _0x1efaf8=this[_0x5027('0x29')][_0x5027('0x45')][_0x5027('0x1e')](_0x838c25);if(_0x1efaf8[_0x5027('0x56')]({'blurredAnnotation':this[_0x5027('0x51')],'activatedAnnotation':_0xa36d22,'disableAnimationOnActivatedAnnotation':!0x0}),_0xa36d22)_0x1efaf8[_0x5027('0x16')](_0xa36d22)?this[_0x5027('0x36')](_0xa36d22):this['_hideBalloon']();else this[_0x5027('0xf')]();this[_0x5027('0x51')]=_0xa36d22;}[_0x5027('0x7')](){if(!this[_0x5027('0x4f')])throw new _0x4da9d6(_0x5027('0x18'),this);this[_0x5027('0xc')](null);const _0x2e640f=this[_0x5027('0x29')]['plugins'][_0x5027('0x1e')](_0x838c25);this[_0x5027('0xf')](),Array[_0x5027('0x47')](this[_0x5027('0x4b')]['values'](),_0x10cf93=>_0x10cf93['destroy']()),this[_0x5027('0x4b')][_0x5027('0x6')](),_0x2e640f['_detachFromContainer'](this['annotations']),this[_0x5027('0x32')](),this[_0x5027('0x9')][_0x5027('0x32')](),this['context']instanceof _0x26f1e2&&this[_0x5027('0x32')](this[_0x5027('0x29')][_0x5027('0x31')]);for(const _0x41c127 of Array[_0x5027('0x47')](this['_editorAnnotations']))this[_0x5027('0x4a')](_0x41c127);window[_0x5027('0x59')](_0x5027('0x8'),this[_0x5027('0x3')]),this[_0x5027('0x3')][_0x5027('0x4e')](),this['_selectedAnnotations']=[],this[_0x5027('0x4f')]=!0x1,this[_0x5027('0x19')]=null;}[_0x5027('0x12')](){this[_0x5027('0x4f')]&&this[_0x5027('0x7')](),this[_0x5027('0x2b')]['detachFromDom']();}[_0x5027('0x42')](_0x31a418){const _0x22fb64=_0x31a418['plugins'][_0x5027('0x1e')](_0x3f5c70),_0x20d2a1=this[_0x5027('0x29')]['plugins'][_0x5027('0x1e')](_0x838c25),_0x459ea0=this[_0x5027('0x19')],_0x32803e=this[_0x5027('0x26')],_0x48d52b=()=>{const _0x4d9cd3=_0x22fb64[_0x5027('0x41')]({'annotations':this[_0x5027('0x19')],'activeAnnotation':this[_0x5027('0x51')]});this[_0x5027('0x33')](_0x4d9cd3),this['setActiveAnnotation'](_0x4d9cd3[0x0]||null);};this[_0x5027('0x2c')](_0x22fb64,_0x5027('0x56'),_0x48d52b),this[_0x5027('0x2c')](_0x22fb64,'blur',(_0x3e7c22,{isAnnotationTracked:_0x46a47e})=>{this[_0x5027('0x51')]&&_0x46a47e(this[_0x5027('0x51')])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x22fb64,'uiUpdate',()=>{this[_0x5027('0x3')]();}),this[_0x5027('0x2c')](_0x459ea0,_0x5027('0x4c'),_0x4026f0=>{_0x22fb64[_0x5027('0x57')]()&&_0x4026f0['stop']();},{'priority':_0x5027('0x1d')}),this[_0x5027('0x2c')](this[_0x5027('0x9')],_0x5027('0x53'),(_0x292e2d,_0xc47533)=>{const _0x49aa93=_0xc47533[_0x5027('0x4d')];_0x32803e[_0x5027('0x40')]&&_0x32803e[_0x5027('0x30')][_0x5027('0x4')](_0x49aa93)||_0x20d2a1[_0x5027('0x10')]['element']['contains'](_0x49aa93)||this[_0x5027('0x51')]&&_0x22fb64[_0x5027('0x57')]()&&(_0x48d52b(),_0x292e2d[_0x5027('0x3a')]=!0x0);},{'priority':_0x5027('0x1d')}),this['_editorAnnotations']['add'](_0x22fb64);}[_0x5027('0x4a')](_0x287125){_0x287125&&(this['stopListening'](_0x287125),this[_0x5027('0x1b')]['remove'](_0x287125));}[_0x5027('0x33')](_0x4e7c69){for(const _0x392e0e of this['_selectedAnnotations'])_0x4e7c69[_0x5027('0x28')](_0x392e0e)||this[_0x5027('0x54')][_0x5027('0x3c')](_0x392e0e[_0x5027('0x10')]);this['_selectedAnnotations']=_0x4e7c69;}[_0x5027('0x37')](){const _0x808271=this[_0x5027('0x26')];this[_0x5027('0x19')]['refreshPositioning'](),_0x808271[_0x5027('0x40')]&&this['_updateBalloonPosition']();}[_0x5027('0x36')](_0x4163d3){if(this[_0x5027('0x54')][_0x5027('0xd')](_0x4163d3['view']))return;const _0x441de9=this[_0x5027('0x26')][_0x5027('0x2f')][_0x5027('0x5c')];_0x441de9!==_0x4163d3[_0x5027('0x10')]?(_0x441de9&&this[_0x5027('0x1c')](_0x441de9),this[_0x5027('0x15')](_0x4163d3['view']),this[_0x5027('0x26')][_0x5027('0x2f')][_0x5027('0x6')](),this[_0x5027('0x26')][_0x5027('0x2f')][_0x5027('0xe')](_0x4163d3[_0x5027('0x10')]),this[_0x5027('0x2d')]()):this['_updateBalloonPosition']();}[_0x5027('0x2d')](){const _0x5621c7=this['balloonPanelView'][_0x5027('0x2f')][_0x5027('0x5c')],_0x3890a4=_0x5621c7&&this['annotations'][_0x5027('0x2a')](_0x5621c7);if(!_0x3890a4||!this[_0x5027('0x4b')][_0x5027('0xd')](_0x3890a4))return;const _0xca87f2=this[_0x5027('0x4b')][_0x5027('0x1e')](_0x3890a4)[_0x5027('0x30')],_0x3793dd=function(){const _0x51a4f9=_0x21547a[_0x5027('0x38')];return[_0x51a4f9[_0x5027('0x43')],_0x51a4f9[_0x5027('0x11')],_0x51a4f9[_0x5027('0x1a')],_0x51a4f9[_0x5027('0x39')],_0x51a4f9[_0x5027('0x1f')],_0x51a4f9['northArrowSouthWest']];}();this[_0x5027('0x26')][_0x5027('0x46')]({'target':_0xca87f2,'positions':_0x3793dd});}[_0x5027('0xf')](){const _0x3395ca=this['balloonPanelView'],_0x10d654=_0x3395ca[_0x5027('0x2f')][_0x5027('0x5c')];_0x10d654&&(this[_0x5027('0x1c')](_0x10d654),_0x3395ca[_0x5027('0x2e')](),_0x3395ca['content'][_0x5027('0x6')]());}[_0x5027('0x15')](_0x159023){this[_0x5027('0x2c')](_0x159023,_0x5027('0x5d'),()=>this[_0x5027('0x2d')]()),this[_0x5027('0x2c')](_0x159023,_0x5027('0x50'),(_0x52cdf2,_0x4897a5)=>{this[_0x5027('0x54')][_0x5027('0xe')](_0x159023),this[_0x5027('0xf')](),_0x4897a5();});}[_0x5027('0x1c')](_0x35b95d){this[_0x5027('0x32')](_0x35b95d);}}
23
+ const _0x4bdf=['_editorAnnotations','getByView','_hideBalloon','_integrateWithEditorAnnotations','listenTo','getOrderedSelectedAnnotations','keydown','view','balloonPanelView','rearrange','content','annotations','from','refreshPositioning','southArrowNorthWest','_domEmitter','ready','_detachFromContainer','add','type','refresh','_showBalloon','remove','annotationType','isAttached','clear','number','values','delete','hasDomSelection','stopListening','northArrowSouthEast','_manuallyClosedAnnotationViews','execute','addEventListener','Esc','requires','keyCode','northArrowSouthWest','set:container','contains','unpin','_setSelectedAnnotations','blur','change:container','southArrowNorth','first','low','isVisible','southArrowNorthEast','detach','defaultPositions','isDirty','northArrowSouth','element','bind','target','get','_annotationToNarrowView','EditorAnnotations','activeAnnotation','register','_destroyEditorAnnotationsIntegration','bodyCollection','high','mousedown','addAnnotation','init','focus','editors','locale','_updateBalloonPosition','set','attach','NarrowSidebar','_detachListeners','_refreshPositioningDebounced','off','_attachListeners','_selectedAnnotations','length','stop','_refreshPositioning','plugins','detachFromDom','narrowSidebar','preventClosingBalloon','context','esc','pin','resize','setActiveAnnotation','removeEventListener','cancel','stopPropagation','has','destroy'];(function(_0x625103,_0x4bdfab){const _0x2af638=function(_0x1d0cbb){while(--_0x1d0cbb){_0x625103['push'](_0x625103['shift']());}};_0x2af638(++_0x4bdfab);}(_0x4bdf,0x7d));const _0x2af6=function(_0x625103,_0x4bdfab){_0x625103=_0x625103-0x0;let _0x2af638=_0x4bdf[_0x625103];return _0x2af638;};import{ContextPlugin as _0x13cc88,Context as _0x5e950c}from'ckeditor5/src/core';import _0x102ee3 from'./annotationsuis';import _0x50b4bf from'./sidebar';import _0x52e1a2 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x29e017,BodyCollection as _0x281ec5}from'ckeditor5/src/ui';import{CKEditorError as _0x1b69fc,DomEmitterMixin as _0x180125,keyCodes as _0x2dca77,Collection as _0x3342ee}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x9fd33b}from'lodash-es';import _0x2ce106 from'./editorannotations';export default class s extends _0x13cc88{static get[_0x2af6('0x8')](){return[_0x50b4bf,_0x102ee3];}static get['pluginName'](){return _0x2af6('0x2e');}constructor(_0x3e48ea){super(_0x3e48ea),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this[_0x2af6('0x54')]=Object['create'](_0x180125),this[_0x2af6('0x1e')]=new Map(),this[_0x2af6('0x2c')](_0x2af6('0x20'),null),this[_0x2af6('0x50')]=null,this['_selectedAnnotations']=[],this[_0x2af6('0x45')]=new _0x3342ee(),this['_refreshPositioningDebounced']=_0x9fd33b(()=>{this[_0x2af6('0x36')]();},0xfa,{'leading':!0x1});}[_0x2af6('0x27')](){this['context'][_0x2af6('0x37')][_0x2af6('0x1d')](_0x102ee3)[_0x2af6('0x21')](_0x2af6('0x39'),this),this[_0x2af6('0x23')]=new _0x281ec5(this['context'][_0x2af6('0x2a')]),this[_0x2af6('0x4d')]=new _0x29e017(this['context']['locale']),this[_0x2af6('0x23')]['attachToDom'](),this[_0x2af6('0x23')]['add'](this[_0x2af6('0x4d')]);}[_0x2af6('0x2d')](_0x64fc4c){this[_0x2af6('0x50')]=_0x64fc4c;const _0xbbcc9=this['context'][_0x2af6('0x37')][_0x2af6('0x1d')](_0x50b4bf),_0x439ba3=this[_0x2af6('0x4d')];if(_0xbbcc9['_annotations']=_0x64fc4c,this[_0x2af6('0x5d')])throw new _0x1b69fc('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this[_0x2af6('0x49')](_0xbbcc9,_0x2af6('0xb'),()=>{this[_0x2af6('0x16')](),this[_0x2af6('0x49')](_0xbbcc9,_0x2af6('0x10'),_0x195d30=>{_0x195d30[_0x2af6('0x31')](),this['attach'](_0x64fc4c);});}),_0xbbcc9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x593c73=_0x44f523=>{const _0x6be0a5=new _0x52e1a2(this[_0x2af6('0x3b')][_0x2af6('0x2a')]);_0xbbcc9[_0x2af6('0x26')](_0x44f523,_0x6be0a5),this['_annotationToNarrowView'][_0x2af6('0x2c')](_0x44f523,_0x6be0a5),_0x6be0a5[_0x2af6('0x1b')](_0x2af6('0x18'),_0x2af6('0x5c'),_0x2af6('0x5f'))['to'](_0x44f523['view'],_0x2af6('0x18'),_0x2af6('0x58'),_0x2af6('0x34')),_0x6be0a5['on'](_0x2af6('0x5'),()=>{this[_0x2af6('0x4')][_0x2af6('0x5e')](),_0x439ba3[_0x2af6('0x4f')][_0x2af6('0x12')]!==_0x44f523[_0x2af6('0x4c')]?(this[_0x2af6('0x5a')](_0x44f523),_0x44f523[_0x2af6('0x4c')][_0x2af6('0x1a')][_0x2af6('0x28')](),this[_0x2af6('0x3f')](_0x44f523)):this[_0x2af6('0x3f')](null);});};for(const _0xf6d57e of _0x64fc4c)_0x593c73(_0xf6d57e);this[_0x2af6('0x49')](_0x64fc4c,_0x2af6('0x57'),(_0x19d488,_0x548482)=>{_0x593c73(_0x548482);}),this['listenTo'](_0x64fc4c,_0x2af6('0x5b'),(_0x5c07bc,_0x537a44,_0x4507b0)=>{this[_0x2af6('0x1e')][_0x2af6('0x1d')](_0x537a44)['destroy'](),this[_0x2af6('0x1e')][_0x2af6('0x0')](_0x537a44),_0xbbcc9[_0x2af6('0x4e')]({'removedAnnotation':_0x537a44,'previousAnnotation':_0x64fc4c[_0x2af6('0x1d')](_0x4507b0-0x1),'nextAnnotation':_0x64fc4c[_0x2af6('0x1d')](_0x4507b0+0x1)}),_0x537a44===this['activeAnnotation']&&this[_0x2af6('0x3f')](null);},{'priority':_0x2af6('0x13')}),this['listenTo'](_0x64fc4c,_0x2af6('0x28'),(_0x2a2c64,_0x207f12)=>{this[_0x2af6('0x3f')](_0x207f12);}),this[_0x2af6('0x49')](_0x64fc4c,_0x2af6('0xf'),()=>{this[_0x2af6('0x3f')](null);}),this['_domEmitter'][_0x2af6('0x49')](document,_0x2af6('0x4b'),(_0x465c96,_0x216f3e)=>{_0x216f3e[_0x2af6('0x9')]===_0x2dca77[_0x2af6('0x3c')]&&_0x439ba3['isVisible']&&(this[_0x2af6('0x4')][_0x2af6('0x57')](_0x439ba3[_0x2af6('0x4f')][_0x2af6('0x12')]),this[_0x2af6('0x47')](),_0x216f3e[_0x2af6('0x42')](),_0x216f3e['preventDefault']());}),this[_0x2af6('0x54')][_0x2af6('0x49')](document,_0x2af6('0x25'),(_0x407bae,_0x38505b)=>{const _0x5835f4=_0x38505b[_0x2af6('0x1c')];_0x439ba3[_0x2af6('0x14')]&&_0x439ba3['element'][_0x2af6('0xc')](_0x5835f4)||_0xbbcc9['view']['element'][_0x2af6('0xc')](_0x5835f4)||_0x407bae[_0x2af6('0x3a')]||(this[_0x2af6('0x4')][_0x2af6('0x5e')](),this[_0x2af6('0x47')](),this[_0x2af6('0x3f')](null));});const _0x35fd24=this['context']instanceof _0x5e950c?this['context'][_0x2af6('0x29')]:new _0x3342ee([this[_0x2af6('0x3b')]]);for(const _0x3ec005 of _0x35fd24)this[_0x2af6('0x48')](_0x3ec005);this[_0x2af6('0x49')](_0x35fd24,_0x2af6('0x57'),(_0x28a075,_0x50f6d6)=>{this[_0x2af6('0x49')](_0x50f6d6,_0x2af6('0x55'),()=>{this['_integrateWithEditorAnnotations'](_0x50f6d6);});}),this['listenTo'](_0x35fd24,'remove',(_0x2a9cb7,_0x3ead03)=>{_0x3ead03['plugins'][_0x2af6('0x43')](_0x2af6('0x1f'))&&this[_0x2af6('0x22')](_0x3ead03['plugins']['get'](_0x2af6('0x1f')));}),window[_0x2af6('0x6')]('resize',this[_0x2af6('0x30')]),this[_0x2af6('0x36')]();}[_0x2af6('0x3f')](_0x1b7bf3){if(_0x1b7bf3===this[_0x2af6('0x20')])return;const _0x2d421d=this[_0x2af6('0x3b')][_0x2af6('0x37')][_0x2af6('0x1d')](_0x50b4bf);if(_0x2d421d[_0x2af6('0x59')]({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1b7bf3,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1b7bf3)_0x2d421d['getSidebarItemView'](_0x1b7bf3)?this['_showBalloon'](_0x1b7bf3):this[_0x2af6('0x47')]();else this['_hideBalloon']();this[_0x2af6('0x20')]=_0x1b7bf3;}['detach'](){if(!this[_0x2af6('0x5d')])throw new _0x1b69fc('narrowsidebar-detach-not-attached',this);this[_0x2af6('0x3f')](null);const _0x439919=this[_0x2af6('0x3b')][_0x2af6('0x37')][_0x2af6('0x1d')](_0x50b4bf);this[_0x2af6('0x47')](),Array[_0x2af6('0x51')](this['_annotationToNarrowView'][_0x2af6('0x60')](),_0x9aee6f=>_0x9aee6f[_0x2af6('0x44')]()),this[_0x2af6('0x1e')][_0x2af6('0x5e')](),_0x439919[_0x2af6('0x56')](this[_0x2af6('0x50')]),this['stopListening'](),this['_domEmitter'][_0x2af6('0x2')](),this[_0x2af6('0x3b')]instanceof _0x5e950c&&this['stopListening'](this['context'][_0x2af6('0x29')]);for(const _0x294e5b of Array[_0x2af6('0x51')](this[_0x2af6('0x45')]))this[_0x2af6('0x22')](_0x294e5b);window[_0x2af6('0x40')](_0x2af6('0x3e'),this[_0x2af6('0x30')]),this[_0x2af6('0x30')][_0x2af6('0x41')](),this[_0x2af6('0x33')]=[],this[_0x2af6('0x5d')]=!0x1,this[_0x2af6('0x50')]=null;}[_0x2af6('0x44')](){this['isAttached']&&this[_0x2af6('0x16')](),this[_0x2af6('0x23')][_0x2af6('0x38')]();}['_integrateWithEditorAnnotations'](_0x4195fd){const _0x4c3fb9=_0x4195fd[_0x2af6('0x37')][_0x2af6('0x1d')](_0x2ce106),_0x445da8=this[_0x2af6('0x3b')][_0x2af6('0x37')]['get'](_0x50b4bf),_0x1b32b5=this[_0x2af6('0x50')],_0x3f0421=this['balloonPanelView'],_0x587368=()=>{const _0x159807=_0x4c3fb9[_0x2af6('0x4a')]({'annotations':this[_0x2af6('0x50')],'activeAnnotation':this['activeAnnotation']});this[_0x2af6('0xe')](_0x159807),this[_0x2af6('0x3f')](_0x159807[0x0]||null);};this[_0x2af6('0x49')](_0x4c3fb9,'refresh',_0x587368),this[_0x2af6('0x49')](_0x4c3fb9,_0x2af6('0xf'),(_0x4c59a0,{isAnnotationTracked:_0x47dc52})=>{this['activeAnnotation']&&_0x47dc52(this['activeAnnotation'])&&(this[_0x2af6('0xe')]([]),this[_0x2af6('0x3f')](null));}),this['listenTo'](_0x4c3fb9,'uiUpdate',()=>{this[_0x2af6('0x30')]();}),this[_0x2af6('0x49')](_0x1b32b5,_0x2af6('0xf'),_0x1f9cce=>{_0x4c3fb9[_0x2af6('0x1')]()&&_0x1f9cce[_0x2af6('0x35')]();},{'priority':_0x2af6('0x24')}),this[_0x2af6('0x49')](this[_0x2af6('0x54')],_0x2af6('0x25'),(_0x163cc5,_0x31781f)=>{const _0x1260f9=_0x31781f[_0x2af6('0x1c')];_0x3f0421[_0x2af6('0x14')]&&_0x3f0421['element'][_0x2af6('0xc')](_0x1260f9)||_0x445da8[_0x2af6('0x4c')]['element'][_0x2af6('0xc')](_0x1260f9)||this[_0x2af6('0x20')]&&_0x4c3fb9[_0x2af6('0x1')]()&&(_0x587368(),_0x163cc5['preventClosingBalloon']=!0x0);},{'priority':_0x2af6('0x24')}),this['_editorAnnotations'][_0x2af6('0x57')](_0x4c3fb9);}[_0x2af6('0x22')](_0x759842){_0x759842&&(this[_0x2af6('0x2')](_0x759842),this[_0x2af6('0x45')]['remove'](_0x759842));}[_0x2af6('0xe')](_0xc87d7){for(const _0x327b05 of this[_0x2af6('0x33')])_0xc87d7['includes'](_0x327b05)||this[_0x2af6('0x4')][_0x2af6('0x0')](_0x327b05[_0x2af6('0x4c')]);this[_0x2af6('0x33')]=_0xc87d7;}[_0x2af6('0x36')](){const _0x34b05b=this['balloonPanelView'];this[_0x2af6('0x50')][_0x2af6('0x52')](),_0x34b05b[_0x2af6('0x14')]&&this['_updateBalloonPosition']();}[_0x2af6('0x5a')](_0x346936){if(this[_0x2af6('0x4')][_0x2af6('0x43')](_0x346936['view']))return;const _0x1c165a=this[_0x2af6('0x4d')][_0x2af6('0x4f')][_0x2af6('0x12')];_0x1c165a!==_0x346936[_0x2af6('0x4c')]?(_0x1c165a&&this[_0x2af6('0x2f')](_0x1c165a),this[_0x2af6('0x32')](_0x346936[_0x2af6('0x4c')]),this[_0x2af6('0x4d')][_0x2af6('0x4f')][_0x2af6('0x5e')](),this[_0x2af6('0x4d')][_0x2af6('0x4f')][_0x2af6('0x57')](_0x346936['view']),this[_0x2af6('0x2b')]()):this['_updateBalloonPosition']();}[_0x2af6('0x2b')](){const _0x3c1b6e=this['balloonPanelView'][_0x2af6('0x4f')][_0x2af6('0x12')],_0x483869=_0x3c1b6e&&this[_0x2af6('0x50')][_0x2af6('0x46')](_0x3c1b6e);if(!_0x483869||!this[_0x2af6('0x1e')][_0x2af6('0x43')](_0x483869))return;const _0x32078a=this[_0x2af6('0x1e')]['get'](_0x483869)['element'],_0x4fb68b=function(){const _0x1467f2=_0x29e017[_0x2af6('0x17')];return[_0x1467f2[_0x2af6('0x15')],_0x1467f2[_0x2af6('0x3')],_0x1467f2[_0x2af6('0x11')],_0x1467f2[_0x2af6('0x19')],_0x1467f2[_0x2af6('0x53')],_0x1467f2[_0x2af6('0xa')]];}();this[_0x2af6('0x4d')][_0x2af6('0x3d')]({'target':_0x32078a,'positions':_0x4fb68b});}[_0x2af6('0x47')](){const _0xebcd79=this[_0x2af6('0x4d')],_0x3df7a6=_0xebcd79['content'][_0x2af6('0x12')];_0x3df7a6&&(this[_0x2af6('0x2f')](_0x3df7a6),_0xebcd79[_0x2af6('0xd')](),_0xebcd79[_0x2af6('0x4f')][_0x2af6('0x5e')]());}['_attachListeners'](_0x5d46d4){this['listenTo'](_0x5d46d4,'change:height',()=>this[_0x2af6('0x2b')]()),this['listenTo'](_0x5d46d4,_0x2af6('0x7'),(_0x36cf51,_0x1d5670)=>{this['_manuallyClosedAnnotationViews'][_0x2af6('0x57')](_0x5d46d4),this[_0x2af6('0x47')](),_0x1d5670();});}[_0x2af6('0x2f')](_0x550dd7){this['stopListening'](_0x550dd7);}}