@ckeditor/ckeditor5-comments 38.2.0-alpha.1 → 39.0.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 (163) hide show
  1. package/README.md +0 -1
  2. package/build/comments.js +1 -1
  3. package/build/translations/ar.js +1 -1
  4. package/build/translations/bg.js +1 -1
  5. package/build/translations/bn.js +1 -1
  6. package/build/translations/ca.js +1 -1
  7. package/build/translations/cs.js +1 -1
  8. package/build/translations/da.js +1 -1
  9. package/build/translations/de.js +1 -1
  10. package/build/translations/el.js +1 -1
  11. package/build/translations/es.js +1 -1
  12. package/build/translations/et.js +1 -1
  13. package/build/translations/fi.js +1 -1
  14. package/build/translations/fr.js +1 -1
  15. package/build/translations/gl.js +1 -1
  16. package/build/translations/he.js +1 -1
  17. package/build/translations/hi.js +1 -1
  18. package/build/translations/hr.js +1 -1
  19. package/build/translations/hu.js +1 -1
  20. package/build/translations/id.js +1 -1
  21. package/build/translations/ja.js +1 -1
  22. package/build/translations/ko.js +1 -1
  23. package/build/translations/lt.js +1 -1
  24. package/build/translations/ms.js +1 -1
  25. package/build/translations/nl.js +1 -1
  26. package/build/translations/no.js +1 -1
  27. package/build/translations/pl.js +1 -1
  28. package/build/translations/pt.js +1 -1
  29. package/build/translations/ro.js +1 -1
  30. package/build/translations/ru.js +1 -1
  31. package/build/translations/sq.js +1 -1
  32. package/build/translations/sr.js +1 -1
  33. package/build/translations/sv.js +1 -1
  34. package/build/translations/th.js +1 -1
  35. package/build/translations/tr.js +1 -1
  36. package/build/translations/uk.js +1 -1
  37. package/build/translations/vi.js +1 -1
  38. package/build/translations/zh-cn.js +1 -1
  39. package/build/translations/zh.js +1 -1
  40. package/lang/translations/ar.po +1 -1
  41. package/lang/translations/bg.po +1 -1
  42. package/lang/translations/bn.po +1 -1
  43. package/lang/translations/ca.po +1 -1
  44. package/lang/translations/cs.po +1 -1
  45. package/lang/translations/da.po +1 -1
  46. package/lang/translations/de.po +1 -1
  47. package/lang/translations/el.po +1 -1
  48. package/lang/translations/es.po +1 -1
  49. package/lang/translations/et.po +1 -1
  50. package/lang/translations/fi.po +1 -1
  51. package/lang/translations/fr.po +1 -1
  52. package/lang/translations/gl.po +12 -12
  53. package/lang/translations/he.po +1 -1
  54. package/lang/translations/hi.po +1 -1
  55. package/lang/translations/hr.po +1 -1
  56. package/lang/translations/hu.po +1 -1
  57. package/lang/translations/id.po +1 -1
  58. package/lang/translations/ja.po +1 -1
  59. package/lang/translations/ko.po +1 -1
  60. package/lang/translations/lt.po +1 -1
  61. package/lang/translations/ms.po +1 -1
  62. package/lang/translations/nl.po +1 -1
  63. package/lang/translations/no.po +1 -1
  64. package/lang/translations/pl.po +1 -1
  65. package/lang/translations/pt.po +1 -1
  66. package/lang/translations/ro.po +1 -1
  67. package/lang/translations/ru.po +1 -1
  68. package/lang/translations/sq.po +2 -2
  69. package/lang/translations/sr.po +1 -1
  70. package/lang/translations/sv.po +1 -1
  71. package/lang/translations/th.po +1 -1
  72. package/lang/translations/tr.po +1 -1
  73. package/lang/translations/uk.po +1 -1
  74. package/lang/translations/vi.po +1 -1
  75. package/lang/translations/zh-cn.po +1 -1
  76. package/lang/translations/zh.po +1 -1
  77. package/package.json +4 -5
  78. package/src/annotations/annotation.d.ts +10 -6
  79. package/src/annotations/annotation.js +2 -2
  80. package/src/annotations/annotationcollection.d.ts +7 -3
  81. package/src/annotations/annotationcollection.js +2 -2
  82. package/src/annotations/annotations.d.ts +10 -6
  83. package/src/annotations/annotations.js +2 -2
  84. package/src/annotations/annotationsuis.d.ts +9 -5
  85. package/src/annotations/annotationsuis.js +2 -2
  86. package/src/annotations/editorannotations.d.ts +8 -4
  87. package/src/annotations/editorannotations.js +2 -2
  88. package/src/annotations/inlineannotations.d.ts +10 -6
  89. package/src/annotations/inlineannotations.js +2 -2
  90. package/src/annotations/narrowsidebar.d.ts +10 -6
  91. package/src/annotations/narrowsidebar.js +2 -2
  92. package/src/annotations/sidebar.d.ts +9 -5
  93. package/src/annotations/sidebar.js +2 -2
  94. package/src/annotations/view/annotationcounterbuttonview.d.ts +6 -2
  95. package/src/annotations/view/annotationcounterbuttonview.js +2 -2
  96. package/src/annotations/view/annotationview.d.ts +6 -2
  97. package/src/annotations/view/annotationview.js +2 -2
  98. package/src/annotations/view/sidebaritemview.d.ts +6 -2
  99. package/src/annotations/view/sidebaritemview.js +2 -2
  100. package/src/annotations/view/sidebarview.d.ts +6 -2
  101. package/src/annotations/view/sidebarview.js +2 -2
  102. package/src/annotations/widesidebar.d.ts +9 -5
  103. package/src/annotations/widesidebar.js +2 -2
  104. package/src/augmentation.d.ts +5 -1
  105. package/src/augmentation.js +1 -1
  106. package/src/comments/addcommentthreadcommand.d.ts +5 -1
  107. package/src/comments/addcommentthreadcommand.js +2 -2
  108. package/src/comments/commentsarchive.d.ts +8 -4
  109. package/src/comments/commentsarchive.js +2 -2
  110. package/src/comments/commentsarchiveui.d.ts +9 -5
  111. package/src/comments/commentsarchiveui.js +2 -2
  112. package/src/comments/commentsediting.d.ts +10 -6
  113. package/src/comments/commentsediting.js +2 -2
  114. package/src/comments/commentsrepository.d.ts +30 -13
  115. package/src/comments/commentsrepository.js +2 -2
  116. package/src/comments/commentsui.d.ts +9 -5
  117. package/src/comments/commentsui.js +2 -2
  118. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +5 -1
  119. package/src/comments/integrations/commentsrestrictededitingmode.js +2 -2
  120. package/src/comments/integrations/importword.d.ts +5 -1
  121. package/src/comments/integrations/importword.js +2 -2
  122. package/src/comments/ui/commenteditor/commenteditor.d.ts +9 -5
  123. package/src/comments/ui/commenteditor/commenteditor.js +2 -2
  124. package/src/comments/ui/commenteditor/commenteditorui.d.ts +7 -3
  125. package/src/comments/ui/commenteditor/commenteditorui.js +2 -2
  126. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +7 -3
  127. package/src/comments/ui/commenteditor/commenteditoruiview.js +2 -2
  128. package/src/comments/ui/commentthreadcontroller.d.ts +6 -6
  129. package/src/comments/ui/commentthreadcontroller.js +2 -2
  130. package/src/comments/ui/view/basecommentthreadview.d.ts +12 -8
  131. package/src/comments/ui/view/basecommentthreadview.js +2 -2
  132. package/src/comments/ui/view/basecommentview.d.ts +8 -4
  133. package/src/comments/ui/view/basecommentview.js +2 -2
  134. package/src/comments/ui/view/collapsedcommentsview.d.ts +6 -2
  135. package/src/comments/ui/view/collapsedcommentsview.js +2 -2
  136. package/src/comments/ui/view/commentcontentview.d.ts +6 -2
  137. package/src/comments/ui/view/commentcontentview.js +2 -2
  138. package/src/comments/ui/view/commentinputview.d.ts +8 -4
  139. package/src/comments/ui/view/commentinputview.js +2 -2
  140. package/src/comments/ui/view/commentsarchiveview.d.ts +7 -3
  141. package/src/comments/ui/view/commentsarchiveview.js +2 -2
  142. package/src/comments/ui/view/commentslistview.d.ts +9 -5
  143. package/src/comments/ui/view/commentslistview.js +2 -2
  144. package/src/comments/ui/view/commentthreadheaderview.d.ts +7 -3
  145. package/src/comments/ui/view/commentthreadheaderview.js +2 -2
  146. package/src/comments/ui/view/commentthreadinputview.d.ts +9 -5
  147. package/src/comments/ui/view/commentthreadinputview.js +2 -2
  148. package/src/comments/ui/view/commentthreadview.d.ts +11 -7
  149. package/src/comments/ui/view/commentthreadview.js +2 -2
  150. package/src/comments/ui/view/commentview.d.ts +12 -8
  151. package/src/comments/ui/view/commentview.js +2 -2
  152. package/src/comments.d.ts +14 -10
  153. package/src/comments.js +2 -2
  154. package/src/commentsonly.d.ts +6 -2
  155. package/src/commentsonly.js +2 -2
  156. package/src/config.d.ts +11 -7
  157. package/src/config.js +1 -1
  158. package/src/index.d.ts +24 -21
  159. package/src/index.js +2 -2
  160. package/src/utils/common-translations.d.ts +5 -1
  161. package/src/utils/common-translations.js +2 -2
  162. package/src/utils/createmutationobserver.d.ts +2 -1
  163. package/src/utils/createmutationobserver.js +2 -2
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1f0f=['refilterAnnotations','context','annotationsuis-register-invalid-interface','destroy','deactivate','from','filter','stopListening','has','register','collection','annotationsuis-annotation-mismatch','isActive','_assertAnnotationDoesNotBelongToMultipleUIs','activeUIs','hasActive','setActiveAnnotation','_uis','_setSelectedAnnotations','_uisData','listenTo','function','find','length','detach','switchTo','pluginName','attach','delete','get','_deactivateAllAnnotations','annotationsuis-register-already-registered','size','plugins','remove','add','deactivateAll','change:activeAnnotation','annotationsuis-missing-ui','_activateAnnotation','_visibleAnnotations','_removeActiveAnnotation','set','activate','push'];(function(_0x53383d,_0x1f0f67){const _0x297bf6=function(_0x548cf3){while(--_0x548cf3){_0x53383d['push'](_0x53383d['shift']());}};_0x297bf6(++_0x1f0f67);}(_0x1f0f,0x1c1));const _0x297b=function(_0x53383d,_0x1f0f67){_0x53383d=_0x53383d-0x0;let _0x297bf6=_0x1f0f[_0x53383d];return _0x297bf6;};import{ContextPlugin as _0x40411a}from'ckeditor5/src/core.js';import{CKEditorError as _0x376d14}from'ckeditor5/src/utils.js';import _0x24fd78,{bindAnnotationCollections as _0x1b4c36}from'./annotationcollection.js';import _0x34fbae from'./annotations.js';export default class j extends _0x40411a{static get['requires'](){return[_0x34fbae];}static get[_0x297b('0x1b')](){return'AnnotationsUIs';}constructor(_0xb8ec72){super(_0xb8ec72),this[_0x297b('0xf')]=new Set(),this['_uis']=new Map(),this[_0x297b('0x14')]=new Map();}['init'](){const _0x10f672=this[_0x297b('0x2')][_0x297b('0x22')][_0x297b('0x1e')](_0x34fbae);this[_0x297b('0x15')](_0x10f672,_0x297b('0x28'),(_0x4994ff,_0x4fdd63)=>{for(const _0x4edef9 of this['activeUIs']){const _0x542d41=this['_uis'][_0x297b('0x1e')](_0x4edef9);(0x0,this[_0x297b('0x14')][_0x297b('0x1e')](_0x4edef9)['filter'])(_0x4fdd63)&&_0x542d41[_0x297b('0x11')](_0x4fdd63);}}),this['listenTo'](_0x10f672,_0x297b('0x1f'),()=>{for(const _0x16ab6a of this[_0x297b('0xf')]){this[_0x297b('0x12')]['get'](_0x16ab6a)[_0x297b('0x11')](null);}}),this[_0x297b('0x15')](_0x10f672[_0x297b('0x29')],_0x297b('0x24'),(_0x349dd8,_0x3cc24d)=>{this[_0x297b('0xe')](_0x3cc24d);});}[_0x297b('0x10')](){return this[_0x297b('0xf')][_0x297b('0x21')]>0x0;}[_0x297b('0xd')](_0x17ad99){return this[_0x297b('0xf')][_0x297b('0x9')](_0x17ad99);}[_0x297b('0x2c')](_0x133e8a,_0x53c8d2=()=>!0x0){const _0x33a5ab=this[_0x297b('0x2')][_0x297b('0x22')][_0x297b('0x1e')](_0x34fbae);if(!this[_0x297b('0x12')][_0x297b('0x9')](_0x133e8a))throw new _0x376d14(_0x297b('0x27'),this,{'uiName':_0x133e8a});this['isActive'](_0x133e8a)&&this[_0x297b('0x5')](_0x133e8a),this[_0x297b('0xf')]['add'](_0x133e8a);const _0x260361=new _0x24fd78(),_0x2e51f8=_0x33a5ab[_0x297b('0x29')];_0x1b4c36({'source':_0x2e51f8,'target':_0x260361,'filter':_0x53c8d2}),this['_uisData'][_0x297b('0x2b')](_0x133e8a,{'collection':_0x260361,'filter':_0x53c8d2});const _0x4beaa7=this[_0x297b('0x12')][_0x297b('0x1e')](_0x133e8a);_0x4beaa7['attach'](_0x260361),this[_0x297b('0x15')](_0x4beaa7,_0x297b('0x26'),(_0x376256,_0x2b3408,_0x15392a,_0x245935)=>{_0x245935&&_0x33a5ab[_0x297b('0x2a')](_0x245935),_0x15392a&&_0x33a5ab['_addActiveAnnotation'](_0x15392a);});}[_0x297b('0x5')](_0xedc3d7){if(this[_0x297b('0xf')][_0x297b('0x1d')](_0xedc3d7),!this[_0x297b('0x12')][_0x297b('0x9')](_0xedc3d7))throw new _0x376d14(_0x297b('0x27'),this,{'uiName':_0xedc3d7});const _0x803254=this[_0x297b('0x12')][_0x297b('0x1e')](_0xedc3d7);_0x803254['detach'](),this[_0x297b('0x8')](_0x803254),this[_0x297b('0x14')][_0x297b('0x1e')](_0xedc3d7)['collection'][_0x297b('0x4')](),this[_0x297b('0x14')][_0x297b('0x1d')](_0xedc3d7);}[_0x297b('0x1a')](_0x22a62b){if(!this[_0x297b('0x12')][_0x297b('0x9')](_0x22a62b))throw new _0x376d14(_0x297b('0x27'),this,{'uiName':_0x22a62b});const _0xb93b30=this[_0x297b('0x2')]['plugins']['get'](_0x34fbae),_0x19d223=Array[_0x297b('0x6')](_0xb93b30['activeAnnotations'])[0x0]||null;this[_0x297b('0x25')](),this[_0x297b('0x2c')](_0x22a62b);const _0x3a939c=this[_0x297b('0x12')][_0x297b('0x1e')](_0x22a62b);_0x3a939c[_0x297b('0x11')](_0x19d223),_0x3a939c[_0x297b('0x13')]&&_0x19d223&&_0x3a939c[_0x297b('0x13')]([_0x19d223]);}[_0x297b('0x25')](){for(const _0x290885 of this[_0x297b('0xf')])this[_0x297b('0x5')](_0x290885);}[_0x297b('0xa')](_0x1e6242,_0x36edfc){if(this[_0x297b('0x12')][_0x297b('0x9')](_0x1e6242))throw new _0x376d14(_0x297b('0x20'));if(_0x297b('0x16')!=typeof _0x36edfc[_0x297b('0x1c')]||_0x297b('0x16')!=typeof _0x36edfc[_0x297b('0x19')]||_0x297b('0x16')!=typeof _0x36edfc[_0x297b('0x11')])throw new _0x376d14(_0x297b('0x3'),null);this[_0x297b('0x12')][_0x297b('0x2b')](_0x1e6242,_0x36edfc);}[_0x297b('0x1')](){const _0x49e854=this[_0x297b('0x2')][_0x297b('0x22')]['get'](_0x34fbae)[_0x297b('0xb')],_0x3b121d=new Map(),_0x2d4590=Array[_0x297b('0x6')](this['activeUIs']);for(const _0x53ee29 of this['activeUIs']){const _0x4635da=this[_0x297b('0x14')]['get'](_0x53ee29)[_0x297b('0xb')];for(const _0x1cdd0e of _0x4635da)_0x3b121d[_0x297b('0x2b')](_0x1cdd0e,_0x53ee29);}for(const _0x250660 of _0x49e854){const _0x2e9a8a=_0x3b121d['get'](_0x250660);this[_0x297b('0xe')](_0x250660);const _0x4a74bd=_0x2d4590[_0x297b('0x17')](_0x1692f0=>this['_uisData'][_0x297b('0x1e')](_0x1692f0)[_0x297b('0x7')](_0x250660));_0x2e9a8a!==_0x4a74bd&&(_0x2e9a8a&&this[_0x297b('0x14')][_0x297b('0x1e')](_0x2e9a8a)[_0x297b('0xb')][_0x297b('0x23')](_0x250660),_0x4a74bd&&this[_0x297b('0x14')][_0x297b('0x1e')](_0x4a74bd)[_0x297b('0xb')]['add'](_0x250660));}}[_0x297b('0x4')](){this[_0x297b('0x25')](),super[_0x297b('0x4')]();}[_0x297b('0xe')](_0x110b3b){const _0x40e22f=[];for(const _0x7b3efc of this[_0x297b('0xf')]){(0x0,this[_0x297b('0x14')][_0x297b('0x1e')](_0x7b3efc)[_0x297b('0x7')])(_0x110b3b)&&_0x40e22f[_0x297b('0x0')](_0x7b3efc);}if(_0x40e22f[_0x297b('0x18')]>0x1)throw new _0x376d14(_0x297b('0xc'),null,{'matchedUIs':_0x40e22f,'annotationType':_0x110b3b['type']});}}
23
+ const _0x2f6b=['change:activeAnnotation','remove','init','_visibleAnnotations','delete','AnnotationsUIs','_activateAnnotation','type','activeUIs','_assertAnnotationDoesNotBelongToMultipleUIs','_setSelectedAnnotations','activate','stopListening','function','_deactivateAllAnnotations','push','refilterAnnotations','collection','hasActive','find','context','attach','listenTo','isActive','get','length','deactivateAll','deactivate','add','register','from','_uis','activeAnnotations','detach','plugins','setActiveAnnotation','set','has','_removeActiveAnnotation','annotationsuis-missing-ui','annotationsuis-register-already-registered','size','pluginName','_uisData','destroy'];(function(_0x3f1a36,_0x2f6b49){const _0x222e3c=function(_0x31c5c5){while(--_0x31c5c5){_0x3f1a36['push'](_0x3f1a36['shift']());}};_0x222e3c(++_0x2f6b49);}(_0x2f6b,0x16d));const _0x222e=function(_0x3f1a36,_0x2f6b49){_0x3f1a36=_0x3f1a36-0x0;let _0x222e3c=_0x2f6b[_0x3f1a36];return _0x222e3c;};import{ContextPlugin as _0x86448f}from'ckeditor5/src/core';import{CKEditorError as _0x519c9e}from'ckeditor5/src/utils';import _0x45efe3,{bindAnnotationCollections as _0x242ca8}from'./annotationcollection';import _0x5c75f1 from'./annotations';export default class M extends _0x86448f{static get['requires'](){return[_0x5c75f1];}static get[_0x222e('0x25')](){return _0x222e('0x0');}constructor(_0x2f73b5){super(_0x2f73b5),this[_0x222e('0x3')]=new Set(),this[_0x222e('0x1a')]=new Map(),this[_0x222e('0x26')]=new Map();}[_0x222e('0x2a')](){const _0x2e4d1e=this[_0x222e('0xf')][_0x222e('0x1d')][_0x222e('0x13')](_0x5c75f1);this[_0x222e('0x11')](_0x2e4d1e,_0x222e('0x1'),(_0x1fc851,_0x59715a)=>{for(const _0x3f305b of this[_0x222e('0x3')]){const _0x190799=this[_0x222e('0x1a')][_0x222e('0x13')](_0x3f305b);(0x0,this[_0x222e('0x26')][_0x222e('0x13')](_0x3f305b)['filter'])(_0x59715a)&&_0x190799[_0x222e('0x1e')](_0x59715a);}}),this[_0x222e('0x11')](_0x2e4d1e,_0x222e('0x9'),()=>{for(const _0x20f974 of this[_0x222e('0x3')]){this[_0x222e('0x1a')][_0x222e('0x13')](_0x20f974)[_0x222e('0x1e')](null);}}),this[_0x222e('0x11')](_0x2e4d1e['_visibleAnnotations'],_0x222e('0x17'),(_0x44faa0,_0x8dd248)=>{this[_0x222e('0x4')](_0x8dd248);});}[_0x222e('0xd')](){return this[_0x222e('0x3')][_0x222e('0x24')]>0x0;}[_0x222e('0x12')](_0x55785f){return this[_0x222e('0x3')]['has'](_0x55785f);}[_0x222e('0x6')](_0x4f7173,_0x27da01=()=>!0x0){const _0x2b42a=this['context'][_0x222e('0x1d')][_0x222e('0x13')](_0x5c75f1);if(!this[_0x222e('0x1a')][_0x222e('0x20')](_0x4f7173))throw new _0x519c9e(_0x222e('0x22'),this,{'uiName':_0x4f7173});this[_0x222e('0x12')](_0x4f7173)&&this[_0x222e('0x16')](_0x4f7173),this['activeUIs'][_0x222e('0x17')](_0x4f7173);const _0x191c09=new _0x45efe3(),_0x5890f7=_0x2b42a[_0x222e('0x2b')];_0x242ca8({'source':_0x5890f7,'target':_0x191c09,'filter':_0x27da01}),this[_0x222e('0x26')]['set'](_0x4f7173,{'collection':_0x191c09,'filter':_0x27da01});const _0x11cd83=this['_uis'][_0x222e('0x13')](_0x4f7173);_0x11cd83[_0x222e('0x10')](_0x191c09),this[_0x222e('0x11')](_0x11cd83,_0x222e('0x28'),(_0xda4c12,_0x4f5f75,_0x4e281e,_0x3d9045)=>{_0x3d9045&&_0x2b42a[_0x222e('0x21')](_0x3d9045),_0x4e281e&&_0x2b42a['_addActiveAnnotation'](_0x4e281e);});}['deactivate'](_0x1318c8){if(this['activeUIs'][_0x222e('0x2c')](_0x1318c8),!this[_0x222e('0x1a')][_0x222e('0x20')](_0x1318c8))throw new _0x519c9e(_0x222e('0x22'),this,{'uiName':_0x1318c8});const _0x47484d=this[_0x222e('0x1a')]['get'](_0x1318c8);_0x47484d['detach'](),this[_0x222e('0x7')](_0x47484d),this[_0x222e('0x26')][_0x222e('0x13')](_0x1318c8)[_0x222e('0xc')][_0x222e('0x27')](),this['_uisData']['delete'](_0x1318c8);}['switchTo'](_0x534e78){if(!this[_0x222e('0x1a')][_0x222e('0x20')](_0x534e78))throw new _0x519c9e(_0x222e('0x22'),this,{'uiName':_0x534e78});const _0x47a29c=this[_0x222e('0xf')]['plugins']['get'](_0x5c75f1),_0x47d1e4=Array['from'](_0x47a29c[_0x222e('0x1b')])[0x0]||null;this[_0x222e('0x15')](),this['activate'](_0x534e78);const _0x39f707=this[_0x222e('0x1a')][_0x222e('0x13')](_0x534e78);_0x39f707['setActiveAnnotation'](_0x47d1e4),_0x39f707[_0x222e('0x5')]&&_0x47d1e4&&_0x39f707[_0x222e('0x5')]([_0x47d1e4]);}[_0x222e('0x15')](){for(const _0x39acd6 of this[_0x222e('0x3')])this[_0x222e('0x16')](_0x39acd6);}[_0x222e('0x18')](_0x37f437,_0x15cf1f){if(this[_0x222e('0x1a')][_0x222e('0x20')](_0x37f437))throw new _0x519c9e(_0x222e('0x23'));if(_0x222e('0x8')!=typeof _0x15cf1f[_0x222e('0x10')]||'function'!=typeof _0x15cf1f[_0x222e('0x1c')]||_0x222e('0x8')!=typeof _0x15cf1f[_0x222e('0x1e')])throw new _0x519c9e('annotationsuis-register-invalid-interface',null);this[_0x222e('0x1a')][_0x222e('0x1f')](_0x37f437,_0x15cf1f);}[_0x222e('0xb')](){const _0x49baaa=this[_0x222e('0xf')]['plugins']['get'](_0x5c75f1)[_0x222e('0xc')],_0x5a92ae=new Map(),_0x3a505f=Array[_0x222e('0x19')](this[_0x222e('0x3')]);for(const _0x534575 of this[_0x222e('0x3')]){const _0x1d615f=this[_0x222e('0x26')][_0x222e('0x13')](_0x534575)[_0x222e('0xc')];for(const _0x522227 of _0x1d615f)_0x5a92ae[_0x222e('0x1f')](_0x522227,_0x534575);}for(const _0x85fcf6 of _0x49baaa){const _0x30e0f8=_0x5a92ae[_0x222e('0x13')](_0x85fcf6);this[_0x222e('0x4')](_0x85fcf6);const _0x4822e2=_0x3a505f[_0x222e('0xe')](_0x56dbe7=>this[_0x222e('0x26')][_0x222e('0x13')](_0x56dbe7)['filter'](_0x85fcf6));_0x30e0f8!==_0x4822e2&&(_0x30e0f8&&this[_0x222e('0x26')][_0x222e('0x13')](_0x30e0f8)[_0x222e('0xc')][_0x222e('0x29')](_0x85fcf6),_0x4822e2&&this[_0x222e('0x26')]['get'](_0x4822e2)['collection'][_0x222e('0x17')](_0x85fcf6));}}[_0x222e('0x27')](){this[_0x222e('0x15')](),super[_0x222e('0x27')]();}[_0x222e('0x4')](_0x183ea5){const _0x170f4d=[];for(const _0x49a39e of this[_0x222e('0x3')]){(0x0,this[_0x222e('0x26')]['get'](_0x49a39e)['filter'])(_0x183ea5)&&_0x170f4d[_0x222e('0xa')](_0x49a39e);}if(_0x170f4d[_0x222e('0x14')]>0x1)throw new _0x519c9e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x170f4d,'annotationType':_0x183ea5[_0x222e('0x2')]});}}
@@ -1,11 +1,15 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module comments/annotations/editorannotations
3
7
  * @publicApi
4
8
  */
5
- import { Plugin, type Editor } from 'ckeditor5/src/core.js';
6
- import Annotations from './annotations.js';
7
- import type Annotation from './annotation.js';
8
- import type AnnotationCollection from './annotationcollection.js';
9
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
10
+ import Annotations from './annotations';
11
+ import type Annotation from './annotation';
12
+ import type AnnotationCollection from './annotationcollection';
9
13
  /**
10
14
  * Integrates {@link module:comments/annotations/annotations~Annotations annotations} with the editor to provide proper behavior
11
15
  * for annotations created through the editor features.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5270=['editorannotations-invalid-source-callback','getOrderedSelectedAnnotations','function','remove','selection','focusTracker','isCollapsed','hasDomSelection','uiUpdate','from','_dataCollectors','change:isFocused','element','directChange','push','fire','getByInnerView','innerView','refresh','listenTo','blur','model','view','refreshSelectedViews','has','cancel','range','containsRange','change:range','plugins','requires','isEqual','document','pluginName','_editorAnnotationsData','annotation','EditorAnnotations','editing','map','get','add','isReadOnly','getRanges','editor','update','_editorAnnotations'];(function(_0x30fa39,_0x5270e1){const _0x2c5c94=function(_0x54386a){while(--_0x54386a){_0x30fa39['push'](_0x30fa39['shift']());}};_0x2c5c94(++_0x5270e1);}(_0x5270,0x131));const _0x2c5c=function(_0x30fa39,_0x5270e1){_0x30fa39=_0x30fa39-0x0;let _0x2c5c94=_0x5270[_0x30fa39];return _0x2c5c94;};import{Plugin as _0x20b683}from'ckeditor5/src/core.js';import{CKEditorError as _0x3cf08c}from'ckeditor5/src/utils.js';import{debounce as _0x39d604}from'lodash-es';import _0x319f93 from'./annotations.js';export default class k extends _0x20b683{static get[_0x2c5c('0x1')](){return[_0x319f93];}static get[_0x2c5c('0x4')](){return _0x2c5c('0x7');}constructor(_0x3f427a){super(_0x3f427a),this[_0x2c5c('0x1b')]=new Set(),this[_0x2c5c('0x10')]=new Set();}['init'](){const _0x2b1ca2=this[_0x2c5c('0xe')],_0x2146da=_0x2b1ca2[_0x2c5c('0x26')]['document'][_0x2c5c('0x15')],_0x3e3aa0=_0x39d604(()=>this[_0x2c5c('0x28')](),0xa);_0x2146da['on'](_0x2c5c('0x2d'),(_0xb0b203,_0x4d84f1)=>{_0x4d84f1[_0x2c5c('0x1e')]&&(_0x3e3aa0[_0x2c5c('0x2a')](),this['refreshSelectedViews']());}),this[_0x2c5c('0x24')](_0x2b1ca2[_0x2c5c('0x8')][_0x2c5c('0x27')][_0x2c5c('0x3')],'change:isFocused',(_0x43e546,_0x9ca4ac,_0x516cde)=>{_0x516cde&&_0x3e3aa0();}),this[_0x2c5c('0x24')](_0x2b1ca2['ui'][_0x2c5c('0x16')],_0x2c5c('0x1c'),(_0x2b0ba0,_0x16a01b,_0x21f294)=>{_0x21f294||_0x2b1ca2[_0x2c5c('0xc')]||this[_0x2c5c('0x20')](_0x2c5c('0x25'),{'isAnnotationTracked':_0x5c49c2=>this['_editorAnnotationsData'][_0x2c5c('0x29')](_0x5c49c2[_0x2c5c('0x22')])});}),this[_0x2c5c('0x24')](this['editor']['ui'],_0x2c5c('0xf'),()=>this[_0x2c5c('0x20')](_0x2c5c('0x19')));}['registerAnnotation'](_0x594687){if(this['_editorAnnotations']['has'](_0x594687[_0x2c5c('0x27')]))return;this[_0x2c5c('0x10')][_0x2c5c('0xb')](_0x594687[_0x2c5c('0x27')]),this['editor']['ui'][_0x2c5c('0x16')][_0x2c5c('0xb')](_0x594687['view'][_0x2c5c('0x1d')]);const _0x52b7fc=this[_0x2c5c('0xe')][_0x2c5c('0x0')][_0x2c5c('0xa')](_0x319f93);this[_0x2c5c('0x24')](_0x52b7fc['collection'],_0x2c5c('0x14'),(_0x493e51,_0x4a358a)=>{this[_0x2c5c('0xe')]['ui'][_0x2c5c('0x16')]['remove'](_0x4a358a[_0x2c5c('0x27')][_0x2c5c('0x1d')]),this[_0x2c5c('0x10')]['delete'](_0x4a358a[_0x2c5c('0x27')]);});}[_0x2c5c('0x18')](){return this[_0x2c5c('0xe')][_0x2c5c('0x8')][_0x2c5c('0x27')][_0x2c5c('0x18')];}['addSourceCollector'](_0xf991d8){if(_0x2c5c('0x13')!=typeof _0xf991d8)throw new _0x3cf08c(_0x2c5c('0x11'));this[_0x2c5c('0x1b')][_0x2c5c('0xb')](_0xf991d8);}[_0x2c5c('0x28')](){this[_0x2c5c('0x20')](_0x2c5c('0x23'));}[_0x2c5c('0x12')]({activeAnnotation:_0x5911e2,annotations:_0x30fafc}){const _0x261d92=[],_0x776d9f=this[_0x2c5c('0xe')][_0x2c5c('0x26')][_0x2c5c('0x3')][_0x2c5c('0x15')],_0x24c262=Array['from'](_0x776d9f[_0x2c5c('0xd')]());for(const [_0x3532a1,_0x2521ed]of this[_0x2c5c('0x5')]){const _0x27793a=_0x37cd13(_0x2521ed),_0x184df2=_0x30fafc[_0x2c5c('0x21')](_0x3532a1);_0x27793a&&_0x184df2&&_0x261d92[_0x2c5c('0x1f')]({'annotation':_0x184df2,'range':_0x27793a});}function _0x37cd13(_0x54df90){for(const _0x4655d0 of _0x54df90)for(const _0x155556 of _0x24c262)if(_0x4655d0['containsRange'](_0x155556,!_0x776d9f[_0x2c5c('0x17')]))return _0x4655d0;return null;}return _0x261d92['sort']((_0x117af9,_0x3acf27)=>{const _0x217291=_0x117af9[_0x2c5c('0x2b')],_0x4d9026=_0x3acf27[_0x2c5c('0x2b')];if(!_0x217291[_0x2c5c('0x2')](_0x4d9026)){if(_0x217291[_0x2c5c('0x2c')](_0x4d9026,!0x0))return 0x1;if(_0x4d9026['containsRange'](_0x217291,!0x0))return-0x1;}return _0x117af9[_0x2c5c('0x6')]==_0x5911e2?-0x1:_0x3acf27[_0x2c5c('0x6')]==_0x5911e2?0x1:0x0;})[_0x2c5c('0x9')](_0x325062=>_0x325062[_0x2c5c('0x6')]);}get['_editorAnnotationsData'](){const _0x18c184=new Map();for(const _0x3845ba of Array[_0x2c5c('0x1a')](this['_dataCollectors']))for(const [_0x25d46d,_0x265182]of _0x3845ba())_0x18c184['set'](_0x25d46d,_0x265182);return _0x18c184;}}
23
+ const _0x43ea=['isCollapsed','editorannotations-invalid-source-callback','document','_dataCollectors','change:range','fire','delete','init','registerAnnotation','from','change:isFocused','pluginName','addSourceCollector','collection','sort','_editorAnnotations','requires','editing','annotation','model','blur','uiUpdate','getRanges','plugins','selection','editor','containsRange','isReadOnly','focusTracker','has','getByInnerView','_editorAnnotationsData','function','hasDomSelection','remove','directChange','listenTo','view','range','innerView','push','update','refresh','add','refreshSelectedViews'];(function(_0x4cd92d,_0x43ea9f){const _0x1b6d04=function(_0x7ddee9){while(--_0x7ddee9){_0x4cd92d['push'](_0x4cd92d['shift']());}};_0x1b6d04(++_0x43ea9f);}(_0x43ea,0x1a7));const _0x1b6d=function(_0x4cd92d,_0x43ea9f){_0x4cd92d=_0x4cd92d-0x0;let _0x1b6d04=_0x43ea[_0x4cd92d];return _0x1b6d04;};import{Plugin as _0x12c412}from'ckeditor5/src/core';import{CKEditorError as _0x33b60c}from'ckeditor5/src/utils';import{debounce as _0x312117}from'lodash-es';import _0x2cb62e from'./annotations';export default class k extends _0x12c412{static get[_0x1b6d('0x2b')](){return[_0x2cb62e];}static get[_0x1b6d('0x26')](){return'EditorAnnotations';}constructor(_0x1961dd){super(_0x1961dd),this[_0x1b6d('0x1e')]=new Set(),this[_0x1b6d('0x2a')]=new Set();}[_0x1b6d('0x22')](){const _0x110d48=this[_0x1b6d('0x7')],_0x33d9e8=_0x110d48[_0x1b6d('0x1')][_0x1b6d('0x1d')][_0x1b6d('0x6')],_0x9cfba3=_0x312117(()=>this[_0x1b6d('0x1a')](),0xa);_0x33d9e8['on'](_0x1b6d('0x1f'),(_0x3bce26,_0x12aa5e)=>{_0x12aa5e[_0x1b6d('0x11')]&&(_0x9cfba3['cancel'](),this[_0x1b6d('0x1a')]());}),this[_0x1b6d('0x12')](_0x110d48['editing']['view'][_0x1b6d('0x1d')],_0x1b6d('0x25'),(_0x3e7fc4,_0x3e15ee,_0x25edcd)=>{_0x25edcd&&_0x9cfba3();}),this['listenTo'](_0x110d48['ui'][_0x1b6d('0xa')],_0x1b6d('0x25'),(_0x373bc1,_0x5ba019,_0x47e9e4)=>{_0x47e9e4||_0x110d48[_0x1b6d('0x9')]||this['fire'](_0x1b6d('0x2'),{'isAnnotationTracked':_0x13427b=>this['_editorAnnotationsData'][_0x1b6d('0xb')](_0x13427b[_0x1b6d('0x15')])});}),this[_0x1b6d('0x12')](this[_0x1b6d('0x7')]['ui'],_0x1b6d('0x17'),()=>this[_0x1b6d('0x20')](_0x1b6d('0x3')));}[_0x1b6d('0x23')](_0x3d8cfd){if(this[_0x1b6d('0x2a')][_0x1b6d('0xb')](_0x3d8cfd[_0x1b6d('0x13')]))return;this[_0x1b6d('0x2a')][_0x1b6d('0x19')](_0x3d8cfd['view']),this[_0x1b6d('0x7')]['ui'][_0x1b6d('0xa')][_0x1b6d('0x19')](_0x3d8cfd['view']['element']);const _0x5da015=this[_0x1b6d('0x7')][_0x1b6d('0x5')]['get'](_0x2cb62e);this[_0x1b6d('0x12')](_0x5da015[_0x1b6d('0x28')],_0x1b6d('0x10'),(_0xd83084,_0x538cd7)=>{this[_0x1b6d('0x7')]['ui']['focusTracker']['remove'](_0x538cd7[_0x1b6d('0x13')]['element']),this[_0x1b6d('0x2a')][_0x1b6d('0x21')](_0x538cd7[_0x1b6d('0x13')]);});}[_0x1b6d('0xf')](){return this[_0x1b6d('0x7')][_0x1b6d('0x2c')][_0x1b6d('0x13')][_0x1b6d('0xf')];}[_0x1b6d('0x27')](_0x2d3ac4){if(_0x1b6d('0xe')!=typeof _0x2d3ac4)throw new _0x33b60c(_0x1b6d('0x1c'));this[_0x1b6d('0x1e')]['add'](_0x2d3ac4);}['refreshSelectedViews'](){this['fire'](_0x1b6d('0x18'));}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1afe65,annotations:_0x5df738}){const _0x5d76a4=[],_0x55984e=this[_0x1b6d('0x7')][_0x1b6d('0x1')][_0x1b6d('0x1d')][_0x1b6d('0x6')],_0x25b46b=Array[_0x1b6d('0x24')](_0x55984e[_0x1b6d('0x4')]());for(const [_0x49cf18,_0x1dcb39]of this[_0x1b6d('0xd')]){const _0x3e9c29=_0x19482b(_0x1dcb39),_0x51e08a=_0x5df738[_0x1b6d('0xc')](_0x49cf18);_0x3e9c29&&_0x51e08a&&_0x5d76a4[_0x1b6d('0x16')]({'annotation':_0x51e08a,'range':_0x3e9c29});}function _0x19482b(_0x40965e){for(const _0x45f424 of _0x40965e)for(const _0x32abfd of _0x25b46b)if(_0x45f424[_0x1b6d('0x8')](_0x32abfd,!_0x55984e[_0x1b6d('0x1b')]))return _0x45f424;return null;}return _0x5d76a4[_0x1b6d('0x29')]((_0xcbc8e6,_0x2eb3e7)=>{const _0x5e95a7=_0xcbc8e6[_0x1b6d('0x14')],_0x1c31bb=_0x2eb3e7[_0x1b6d('0x14')];if(!_0x5e95a7['isEqual'](_0x1c31bb)){if(_0x5e95a7[_0x1b6d('0x8')](_0x1c31bb,!0x0))return 0x1;if(_0x1c31bb[_0x1b6d('0x8')](_0x5e95a7,!0x0))return-0x1;}return _0xcbc8e6[_0x1b6d('0x0')]==_0x1afe65?-0x1:_0x2eb3e7[_0x1b6d('0x0')]==_0x1afe65?0x1:0x0;})['map'](_0x3ecae8=>_0x3ecae8[_0x1b6d('0x0')]);}get['_editorAnnotationsData'](){const _0x4860a0=new Map();for(const _0x28fd39 of Array['from'](this[_0x1b6d('0x1e')]))for(const [_0x19fac1,_0x368542]of _0x28fd39())_0x4860a0['set'](_0x19fac1,_0x368542);return _0x4860a0;}}
@@ -1,14 +1,18 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module comments/annotations/inlineannotations
3
7
  * @publicApi
4
8
  */
5
- import { Plugin, type Editor } from 'ckeditor5/src/core.js';
6
- import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
7
- import EditorAnnotations from './editorannotations.js';
8
- import { ContextualBalloon } from 'ckeditor5/src/ui.js';
9
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
10
+ import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
11
+ import EditorAnnotations from './editorannotations';
12
+ import { ContextualBalloon } from 'ckeditor5/src/ui';
9
13
  import './../../theme/annotation-inline.css';
10
- import type Annotation from './annotation.js';
11
- import type AnnotationCollection from './annotationcollection.js';
14
+ import type Annotation from './annotation';
15
+ import type AnnotationCollection from './annotationcollection';
12
16
  /**
13
17
  * The popup-style UI for displaying annotations next to editor target elements.
14
18
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x29aa=['add','domConverter','context','keystrokes','update','_addedAnnotations','detach','hasActive','annotations','isFocused','getByView','editableElement','bottom','focus','_selectedAnnotations','_forceRefresh','right','delete','isAttached','change:visibleView','setActiveAnnotation','Esc','showStack','view','InlineAnnotations','pluginName','plugins','find','inlineannotations-not-allowed-with-context','visibleView','getFirstRange','editing','targetRect','includes','afterInit','_balloon','from','length','change:height','every','hasView','stopListening','editor','width','left','collapse','_addAnnotationToBalloon','isActive','has','_manuallyClosed','change:isFocused','_closeAnnotation','requires','focusTracker','get','refresh','mousedown','set','activeAnnotation','addObserver','switchTo','top','selection','inlineannotations-attach-already-attached','remove','inline','getBoundingClientRect','clear','_removeAnnotationFromBalloon','target','listenTo','document','getClientRects','register','_setSelectedAnnotations','_getBalloonTargetForAnnotation','push','updatePosition'];(function(_0x29b6df,_0x29aa63){const _0x5b265e=function(_0x4f6504){while(--_0x4f6504){_0x29b6df['push'](_0x29b6df['shift']());}};_0x5b265e(++_0x29aa63);}(_0x29aa,0x113));const _0x5b26=function(_0x29b6df,_0x29aa63){_0x29b6df=_0x29b6df-0x0;let _0x5b265e=_0x29aa[_0x29b6df];return _0x5b265e;};import{Plugin as _0x28f0fa}from'ckeditor5/src/core.js';import _0x3fb22b from'./annotationsuis.js';import _0x79915c from'./editorannotations.js';import{ContextualBalloon as _0x17c37d}from'ckeditor5/src/ui.js';import{MouseObserver as _0x31d23a}from'ckeditor5/src/engine.js';import{CKEditorError as _0xf89ff9,Rect as _0x54d489}from'ckeditor5/src/utils.js';import'./../../theme/annotation-inline.css';export default class c extends _0x28f0fa{static get[_0x5b26('0xb')](){return[_0x79915c,_0x17c37d,_0x3fb22b];}static get[_0x5b26('0x3e')](){return _0x5b26('0x3d');}constructor(_0x1625de){super(_0x1625de),_0x1625de[_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x12')](_0x31d23a),this[_0x5b26('0x37')]=!0x1,this[_0x5b26('0x10')](_0x5b26('0x11'),null),this[_0x5b26('0x2d')]=null,this[_0x5b26('0x8')]=new Set(),this[_0x5b26('0x48')]=_0x1625de[_0x5b26('0x3f')]['get'](_0x17c37d),this['_addedAnnotations']=new Set(),this[_0x5b26('0x33')]=[],this[_0x5b26('0x34')]=!0x1;}['init'](){const _0x5829b6=this[_0x5b26('0x1')][_0x5b26('0x3f')]['get'](_0x3fb22b);_0x5829b6[_0x5b26('0x27')]===this[_0x5b26('0x1')]&&(_0x5829b6[_0x5b26('0x20')](_0x5b26('0x18'),this),this[_0x5b26('0x1')][_0x5b26('0x28')][_0x5b26('0x10')](_0x5b26('0x3a'),(_0x408e4a,_0x5a40d7)=>{const _0x5bd676=this['_balloon'];if(this[_0x5b26('0x37')]&&_0x5bd676[_0x5b26('0x42')]){const _0x5d7fb4=this['annotations'][_0x5b26('0x2f')](_0x5bd676['visibleView']);_0x5d7fb4&&this['_closeAnnotation'](_0x5d7fb4),_0x5a40d7();}}));}[_0x5b26('0x47')](){const _0x2f45f2=this['editor']['plugins'][_0x5b26('0xd')](_0x3fb22b);_0x2f45f2[_0x5b26('0x27')]===this['editor']&&(_0x2f45f2[_0x5b26('0x2c')]()||_0x2f45f2[_0x5b26('0x13')](_0x5b26('0x18')));}['setActiveAnnotation'](_0xaa0552){_0xaa0552!==this[_0x5b26('0x11')]&&(this['activeAnnotation']&&(this[_0x5b26('0x11')][_0x5b26('0x6')]=!0x1),_0xaa0552&&this['editor']['ui'][_0x5b26('0xc')][_0x5b26('0x2e')]&&(this[_0x5b26('0x2d')]['has'](_0xaa0552)&&this[_0x5b26('0x5')](_0xaa0552,!0x0),_0xaa0552[_0x5b26('0x6')]=!0x0),_0xaa0552||this[_0x5b26('0x21')]([]),this[_0x5b26('0x11')]=_0xaa0552);}['attach'](_0x5ad459){this[_0x5b26('0x2d')]=_0x5ad459;const _0x39edce=this[_0x5b26('0x1')][_0x5b26('0x3f')][_0x5b26('0xd')](_0x3fb22b),_0x3d4f7d=this[_0x5b26('0x48')];if(this[_0x5b26('0x37')])throw new _0xf89ff9(_0x5b26('0x16'),this);if(_0x39edce[_0x5b26('0x27')]!==this[_0x5b26('0x1')])throw new _0xf89ff9(_0x5b26('0x41'),this);const _0x18d196=this['editor'][_0x5b26('0x3f')]['get'](_0x79915c);this[_0x5b26('0x1d')](_0x18d196,_0x5b26('0xe'),()=>{const _0x4e12a6=_0x18d196['getOrderedSelectedAnnotations']({'annotations':this[_0x5b26('0x2d')],'activeAnnotation':this[_0x5b26('0x11')]});var _0x3ebf1f,_0x36dd5d;!this[_0x5b26('0x34')]&&(_0x3ebf1f=_0x4e12a6,_0x36dd5d=this[_0x5b26('0x33')],_0x3ebf1f[_0x5b26('0x4a')]===_0x36dd5d[_0x5b26('0x4a')]&&_0x3ebf1f[_0x5b26('0x4c')](_0xdf860c=>_0x36dd5d[_0x5b26('0x46')](_0xdf860c)))||(this[_0x5b26('0x34')]=!0x1,this[_0x5b26('0x21')](_0x4e12a6),this['setActiveAnnotation'](_0x4e12a6[0x0]||null));}),this['listenTo'](_0x18d196,'blur',(_0x371fdb,{isAnnotationTracked:_0x4ca3a2})=>{this[_0x5b26('0x11')]&&_0x4ca3a2(this['activeAnnotation'])&&(this[_0x5b26('0x21')]([]),this['setActiveAnnotation'](null));}),this[_0x5b26('0x1d')](this[_0x5b26('0x1')]['ui'][_0x5b26('0xc')],_0x5b26('0x9'),(_0x44f975,_0x50b1ee,_0x4b5f1b)=>{_0x4b5f1b||this['setActiveAnnotation'](null);}),this[_0x5b26('0x1d')](_0x5ad459,_0x5b26('0x17'),(_0x128f95,_0x604f2)=>{this[_0x5b26('0x1b')](_0x604f2),_0x604f2===this['activeAnnotation']&&this[_0x5b26('0x39')](null);}),this[_0x5b26('0x1d')](_0x3d4f7d,_0x5b26('0x38'),(_0x116a60,_0x57a1e8,_0x49e4d6,_0x3dd117)=>{_0x3dd117&&this['stopListening'](_0x3dd117);const _0x535bba=_0x5ad459['getByView'](_0x49e4d6);_0x49e4d6&&_0x535bba&&(this['listenTo'](_0x49e4d6,_0x5b26('0x4b'),()=>{_0x3d4f7d[_0x5b26('0x24')]();}),this['listenTo'](_0x49e4d6,_0x5b26('0x3a'),()=>{this[_0x5b26('0xa')](_0x535bba),this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x32')]();}),this[_0x5b26('0x11')]!==_0x535bba&&this[_0x5b26('0x39')](_0x535bba));}),this[_0x5b26('0x1d')](this[_0x5b26('0x1')]['ui'],_0x5b26('0x29'),()=>{_0x3d4f7d[_0x5b26('0x42')]&&(_0x5ad459['getByView'](_0x3d4f7d[_0x5b26('0x42')])&&_0x3d4f7d[_0x5b26('0x24')]());}),this[_0x5b26('0x1d')](this['editor'][_0x5b26('0x44')][_0x5b26('0x3c')]['document'],_0x5b26('0xf'),()=>{this[_0x5b26('0x34')]=!0x0,this[_0x5b26('0x8')][_0x5b26('0x1a')]();}),this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x1e')]['selection'][_0x5b26('0x30')]&&this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x32')](),this[_0x5b26('0x37')]=!0x0;}[_0x5b26('0x2b')](){if(!this[_0x5b26('0x37')])throw new _0xf89ff9('inlineannotations-detach-not-attached',this);this[_0x5b26('0x39')](null);for(const _0x36ebc8 of this[_0x5b26('0x2a')])this[_0x5b26('0x1b')](_0x36ebc8);this[_0x5b26('0x0')](),this['isAttached']=!0x1,this[_0x5b26('0x2d')]=null;}['destroy'](){this[_0x5b26('0x37')]&&this[_0x5b26('0x2b')]();}[_0x5b26('0x21')](_0x4e5bae){for(const _0x19cc09 of this['_selectedAnnotations'])_0x4e5bae['includes'](_0x19cc09)||this['_manuallyClosed'][_0x5b26('0x36')](_0x19cc09);for(const _0xa7ff14 of this[_0x5b26('0x2d')])_0x4e5bae['includes'](_0xa7ff14)||this[_0x5b26('0x1b')](_0xa7ff14);if(this[_0x5b26('0x1')]['ui'][_0x5b26('0xc')][_0x5b26('0x2e')])for(const _0x51df62 of _0x4e5bae)this[_0x5b26('0x5')](_0x51df62);this[_0x5b26('0x33')]=_0x4e5bae;}['_addAnnotationToBalloon'](_0x540e12,_0x4fa06c=!0x1){this[_0x5b26('0x8')][_0x5b26('0x7')](_0x540e12)||(this[_0x5b26('0x2a')][_0x5b26('0x7')](_0x540e12)||this['_balloon'][_0x5b26('0x4d')](_0x540e12['view'])||(this[_0x5b26('0x2a')][_0x5b26('0x25')](_0x540e12),this['_balloon']['add']({'stackId':_0x540e12['view']['id'],'view':_0x540e12[_0x5b26('0x3c')],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x540e12)}})),_0x4fa06c&&this['_balloon'][_0x5b26('0x3b')](_0x540e12[_0x5b26('0x3c')]['id']));}[_0x5b26('0x22')](_0x4720d3){const _0x15507b=_0x4720d3[_0x5b26('0x1c')],_0x34106d=this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')],_0x41bdf3=_0x34106d['document'][_0x5b26('0x15')][_0x5b26('0x43')](),_0x419ff3=_0x34106d[_0x5b26('0x26')]['viewRangeToDom'](_0x41bdf3);if(_0x419ff3[_0x5b26('0x4')](!0x0),_0x15507b){if(_0x15507b instanceof _0x54d489)return _0x15507b;let _0x6d09c3=[];for(const _0x31ef6d of _0x15507b)_0x6d09c3[_0x5b26('0x23')](...(_0x245fae=_0x31ef6d[_0x5b26('0x1f')](),Array[_0x5b26('0x49')](_0x245fae)['map'](DOMRect['fromRect'])));_0x6d09c3=function(_0x5c8da1){const _0x497801=[];let _0x594d5e=_0x5c8da1[0x0];for(let _0x351fd5=0x1;_0x351fd5<_0x5c8da1[_0x5b26('0x4a')];_0x351fd5++)F(_0x594d5e,_0x5c8da1[_0x351fd5])?_0x594d5e[_0x5b26('0x2')]+=_0x5c8da1[_0x351fd5][_0x5b26('0x2')]:(_0x497801[_0x5b26('0x23')](_0x594d5e),_0x594d5e=_0x5c8da1[_0x351fd5]);return _0x497801[_0x5b26('0x23')](_0x594d5e),_0x497801;}(_0x6d09c3);const _0x4e9f4c=_0x419ff3[_0x5b26('0x19')]();return _0x6d09c3[_0x5b26('0x40')](_0x102802=>_0x102802[_0x5b26('0x14')]<=_0x4e9f4c[_0x5b26('0x14')]&&_0x102802[_0x5b26('0x31')]>=_0x4e9f4c[_0x5b26('0x31')]&&_0x102802[_0x5b26('0x3')]<=_0x4e9f4c[_0x5b26('0x3')]&&_0x102802[_0x5b26('0x35')]>=_0x4e9f4c['right'])||_0x6d09c3[0x0];}var _0x245fae;return _0x4720d3[_0x5b26('0x45')]||_0x419ff3;}[_0x5b26('0x1b')](_0x1ece28){this[_0x5b26('0x2a')][_0x5b26('0x7')](_0x1ece28)&&this[_0x5b26('0x48')][_0x5b26('0x4d')](_0x1ece28['view'])&&(this[_0x5b26('0x2a')]['delete'](_0x1ece28),this['_balloon'][_0x5b26('0x17')](_0x1ece28[_0x5b26('0x3c')]));}[_0x5b26('0xa')](_0x3326fa){this['_manuallyClosed'][_0x5b26('0x25')](_0x3326fa),this[_0x5b26('0x1b')](_0x3326fa);}}function F(_0x19b089,_0x2b857b){return _0x19b089['top']===_0x2b857b[_0x5b26('0x14')]&&_0x19b089[_0x5b26('0x31')]===_0x2b857b[_0x5b26('0x31')]&&_0x19b089['right']===_0x2b857b[_0x5b26('0x3')];}
23
+ const _0x56f9=['requires','top','collapse','isFocused','set','attach','refresh','remove','_selectedAnnotations','InlineAnnotations','afterInit','plugins','destroy','left','blur','change:visibleView','showStack','getBoundingClientRect','_addedAnnotations','hasView','focusTracker','hasActive','Esc','width','setActiveAnnotation','selection','activeAnnotation','listenTo','map','bottom','register','_balloon','view','isAttached','getFirstRange','inline','_removeAnnotationFromBalloon','editing','length','add','getByView','_closeAnnotation','includes','every','init','change:height','_setSelectedAnnotations','addObserver','_addAnnotationToBalloon','document','delete','fromRect','_forceRefresh','domConverter','annotations','update','stopListening','targetRect','inlineannotations-not-allowed-with-context','right','focus','getClientRects','editor','isActive','find','get','keystrokes','visibleView','detach','_manuallyClosed','context','has','pluginName','push','_getBalloonTargetForAnnotation','getOrderedSelectedAnnotations','updatePosition'];(function(_0x8fb7bb,_0x56f9a5){const _0x29af8a=function(_0x1aba22){while(--_0x1aba22){_0x8fb7bb['push'](_0x8fb7bb['shift']());}};_0x29af8a(++_0x56f9a5);}(_0x56f9,0x89));const _0x29af=function(_0x8fb7bb,_0x56f9a5){_0x8fb7bb=_0x8fb7bb-0x0;let _0x29af8a=_0x56f9[_0x8fb7bb];return _0x29af8a;};import{Plugin as _0x4e4fb3}from'ckeditor5/src/core';import _0xa0360a from'./annotationsuis';import _0xac1013 from'./editorannotations';import{ContextualBalloon as _0x187e5f}from'ckeditor5/src/ui';import{MouseObserver as _0x482d2d}from'ckeditor5/src/engine';import{CKEditorError as _0x5aceb7,Rect as _0x2f9ec5}from'ckeditor5/src/utils';import'./../../theme/annotation-inline.css';export default class c extends _0x4e4fb3{static get[_0x29af('0x11')](){return[_0xac1013,_0x187e5f,_0xa0360a];}static get[_0x29af('0xc')](){return _0x29af('0x1a');}constructor(_0x1611d6){super(_0x1611d6),_0x1611d6[_0x29af('0x36')][_0x29af('0x31')][_0x29af('0x40')](_0x482d2d),this['isAttached']=!0x1,this[_0x29af('0x15')](_0x29af('0x2b'),null),this[_0x29af('0x47')]=null,this[_0x29af('0x9')]=new Set(),this['_balloon']=_0x1611d6['plugins'][_0x29af('0x5')](_0x187e5f),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this[_0x29af('0x45')]=!0x1;}[_0x29af('0x3d')](){const _0x5977d1=this[_0x29af('0x2')][_0x29af('0x1c')][_0x29af('0x5')](_0xa0360a);_0x5977d1[_0x29af('0xa')]===this[_0x29af('0x2')]&&(_0x5977d1[_0x29af('0x2f')]('inline',this),this[_0x29af('0x2')][_0x29af('0x6')][_0x29af('0x15')]('Esc',(_0x4f5068,_0x45550e)=>{const _0x32e8e9=this[_0x29af('0x30')];if(this[_0x29af('0x32')]&&_0x32e8e9['visibleView']){const _0x4e815e=this[_0x29af('0x47')][_0x29af('0x39')](_0x32e8e9['visibleView']);_0x4e815e&&this[_0x29af('0x3a')](_0x4e815e),_0x45550e();}}));}[_0x29af('0x1b')](){const _0x2cbf1f=this[_0x29af('0x2')][_0x29af('0x1c')][_0x29af('0x5')](_0xa0360a);_0x2cbf1f['context']===this[_0x29af('0x2')]&&(_0x2cbf1f[_0x29af('0x26')]()||_0x2cbf1f['switchTo'](_0x29af('0x34')));}[_0x29af('0x29')](_0x1abbaf){_0x1abbaf!==this[_0x29af('0x2b')]&&(this[_0x29af('0x2b')]&&(this[_0x29af('0x2b')][_0x29af('0x3')]=!0x1),_0x1abbaf&&this[_0x29af('0x2')]['ui'][_0x29af('0x25')][_0x29af('0x14')]&&(this[_0x29af('0x47')][_0x29af('0xb')](_0x1abbaf)&&this[_0x29af('0x41')](_0x1abbaf,!0x0),_0x1abbaf['isActive']=!0x0),_0x1abbaf||this[_0x29af('0x3f')]([]),this['activeAnnotation']=_0x1abbaf);}[_0x29af('0x16')](_0x3caa34){this['annotations']=_0x3caa34;const _0x5639c6=this['editor'][_0x29af('0x1c')][_0x29af('0x5')](_0xa0360a),_0x4bfff0=this[_0x29af('0x30')];if(this['isAttached'])throw new _0x5aceb7('inlineannotations-attach-already-attached',this);if(_0x5639c6[_0x29af('0xa')]!==this[_0x29af('0x2')])throw new _0x5aceb7(_0x29af('0x4b'),this);const _0x5ef627=this[_0x29af('0x2')][_0x29af('0x1c')][_0x29af('0x5')](_0xac1013);this[_0x29af('0x2c')](_0x5ef627,_0x29af('0x17'),()=>{const _0x12abbe=_0x5ef627[_0x29af('0xf')]({'annotations':this[_0x29af('0x47')],'activeAnnotation':this[_0x29af('0x2b')]});var _0x6b9807,_0x8bccd7;!this[_0x29af('0x45')]&&(_0x6b9807=_0x12abbe,_0x8bccd7=this['_selectedAnnotations'],_0x6b9807[_0x29af('0x37')]===_0x8bccd7[_0x29af('0x37')]&&_0x6b9807[_0x29af('0x3c')](_0x4662e5=>_0x8bccd7[_0x29af('0x3b')](_0x4662e5)))||(this['_forceRefresh']=!0x1,this[_0x29af('0x3f')](_0x12abbe),this[_0x29af('0x29')](_0x12abbe[0x0]||null));}),this[_0x29af('0x2c')](_0x5ef627,_0x29af('0x1f'),(_0x5d7824,{isAnnotationTracked:_0x4f53aa})=>{this[_0x29af('0x2b')]&&_0x4f53aa(this[_0x29af('0x2b')])&&(this[_0x29af('0x3f')]([]),this[_0x29af('0x29')](null));}),this[_0x29af('0x2c')](this[_0x29af('0x2')]['ui'][_0x29af('0x25')],'change:isFocused',(_0x336656,_0xd63b83,_0x57a091)=>{_0x57a091||this['setActiveAnnotation'](null);}),this[_0x29af('0x2c')](_0x3caa34,'remove',(_0x25e725,_0x8a22a)=>{this[_0x29af('0x35')](_0x8a22a),_0x8a22a===this[_0x29af('0x2b')]&&this[_0x29af('0x29')](null);}),this[_0x29af('0x2c')](_0x4bfff0,_0x29af('0x20'),(_0x43d651,_0x27678a,_0x151789,_0x5ce006)=>{_0x5ce006&&this['stopListening'](_0x5ce006);const _0x3cf1a3=_0x3caa34[_0x29af('0x39')](_0x151789);_0x151789&&_0x3cf1a3&&(this[_0x29af('0x2c')](_0x151789,_0x29af('0x3e'),()=>{_0x4bfff0[_0x29af('0x10')]();}),this['listenTo'](_0x151789,_0x29af('0x27'),()=>{this['_closeAnnotation'](_0x3cf1a3),this[_0x29af('0x2')][_0x29af('0x36')]['view'][_0x29af('0x0')]();}),this[_0x29af('0x2b')]!==_0x3cf1a3&&this[_0x29af('0x29')](_0x3cf1a3));}),this[_0x29af('0x2c')](this[_0x29af('0x2')]['ui'],_0x29af('0x48'),()=>{_0x4bfff0['visibleView']&&(_0x3caa34[_0x29af('0x39')](_0x4bfff0[_0x29af('0x7')])&&_0x4bfff0[_0x29af('0x10')]());}),this[_0x29af('0x2c')](this[_0x29af('0x2')][_0x29af('0x36')][_0x29af('0x31')]['document'],'mousedown',()=>{this[_0x29af('0x45')]=!0x0,this[_0x29af('0x9')]['clear']();}),this[_0x29af('0x2')]['editing'][_0x29af('0x31')][_0x29af('0x42')][_0x29af('0x2a')]['editableElement']&&this[_0x29af('0x2')][_0x29af('0x36')][_0x29af('0x31')][_0x29af('0x0')](),this['isAttached']=!0x0;}[_0x29af('0x8')](){if(!this[_0x29af('0x32')])throw new _0x5aceb7('inlineannotations-detach-not-attached',this);this[_0x29af('0x29')](null);for(const _0x589aa6 of this[_0x29af('0x23')])this['_removeAnnotationFromBalloon'](_0x589aa6);this[_0x29af('0x49')](),this[_0x29af('0x32')]=!0x1,this[_0x29af('0x47')]=null;}[_0x29af('0x1d')](){this['isAttached']&&this[_0x29af('0x8')]();}[_0x29af('0x3f')](_0x41acac){for(const _0x2c5b3d of this[_0x29af('0x19')])_0x41acac[_0x29af('0x3b')](_0x2c5b3d)||this['_manuallyClosed']['delete'](_0x2c5b3d);for(const _0x519f07 of this[_0x29af('0x47')])_0x41acac[_0x29af('0x3b')](_0x519f07)||this[_0x29af('0x35')](_0x519f07);if(this[_0x29af('0x2')]['ui'][_0x29af('0x25')][_0x29af('0x14')])for(const _0x517ef6 of _0x41acac)this[_0x29af('0x41')](_0x517ef6);this[_0x29af('0x19')]=_0x41acac;}[_0x29af('0x41')](_0x46f350,_0x57391c=!0x1){this[_0x29af('0x9')][_0x29af('0xb')](_0x46f350)||(this['_addedAnnotations'][_0x29af('0xb')](_0x46f350)||this[_0x29af('0x30')][_0x29af('0x24')](_0x46f350[_0x29af('0x31')])||(this[_0x29af('0x23')][_0x29af('0x38')](_0x46f350),this[_0x29af('0x30')][_0x29af('0x38')]({'stackId':_0x46f350[_0x29af('0x31')]['id'],'view':_0x46f350['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x46f350)}})),_0x57391c&&this['_balloon'][_0x29af('0x21')](_0x46f350[_0x29af('0x31')]['id']));}[_0x29af('0xe')](_0x1ff727){const _0x57fcb2=_0x1ff727['target'],_0x344e61=this[_0x29af('0x2')]['editing'][_0x29af('0x31')],_0x4d14a0=_0x344e61[_0x29af('0x42')][_0x29af('0x2a')][_0x29af('0x33')](),_0x3a9570=_0x344e61[_0x29af('0x46')]['viewRangeToDom'](_0x4d14a0);if(_0x3a9570[_0x29af('0x13')](!0x0),_0x57fcb2){if(_0x57fcb2 instanceof _0x2f9ec5)return _0x57fcb2;let _0x144ca5=[];for(const _0x5e4863 of _0x57fcb2)_0x144ca5[_0x29af('0xd')](...(_0x2d5d8d=_0x5e4863[_0x29af('0x1')](),Array['from'](_0x2d5d8d)[_0x29af('0x2d')](DOMRect[_0x29af('0x44')])));_0x144ca5=function(_0x4aba1b){const _0x42fa25=[];let _0x42d96b=_0x4aba1b[0x0];for(let _0x47eabb=0x1;_0x47eabb<_0x4aba1b['length'];_0x47eabb++)F(_0x42d96b,_0x4aba1b[_0x47eabb])?_0x42d96b['width']+=_0x4aba1b[_0x47eabb][_0x29af('0x28')]:(_0x42fa25['push'](_0x42d96b),_0x42d96b=_0x4aba1b[_0x47eabb]);return _0x42fa25[_0x29af('0xd')](_0x42d96b),_0x42fa25;}(_0x144ca5);const _0x108215=_0x3a9570[_0x29af('0x22')]();return _0x144ca5[_0x29af('0x4')](_0x1996a3=>_0x1996a3[_0x29af('0x12')]<=_0x108215[_0x29af('0x12')]&&_0x1996a3['bottom']>=_0x108215[_0x29af('0x2e')]&&_0x1996a3[_0x29af('0x1e')]<=_0x108215[_0x29af('0x1e')]&&_0x1996a3['right']>=_0x108215[_0x29af('0x4c')])||_0x144ca5[0x0];}var _0x2d5d8d;return _0x1ff727[_0x29af('0x4a')]||_0x3a9570;}['_removeAnnotationFromBalloon'](_0x13ce21){this['_addedAnnotations'][_0x29af('0xb')](_0x13ce21)&&this[_0x29af('0x30')][_0x29af('0x24')](_0x13ce21[_0x29af('0x31')])&&(this[_0x29af('0x23')][_0x29af('0x43')](_0x13ce21),this['_balloon'][_0x29af('0x18')](_0x13ce21[_0x29af('0x31')]));}[_0x29af('0x3a')](_0x5dc2cd){this[_0x29af('0x9')][_0x29af('0x38')](_0x5dc2cd),this[_0x29af('0x35')](_0x5dc2cd);}}function F(_0x3fef60,_0x29e14a){return _0x3fef60['top']===_0x29e14a[_0x29af('0x12')]&&_0x3fef60['bottom']===_0x29e14a[_0x29af('0x2e')]&&_0x3fef60[_0x29af('0x4c')]===_0x29e14a['left'];}
@@ -1,14 +1,18 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module comments/annotations/narrowsidebar
3
7
  * @publicApi
4
8
  */
5
- import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core.js';
6
- import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
7
- import Sidebar from './sidebar.js';
8
- import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui.js';
9
+ import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core';
10
+ import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
11
+ import Sidebar from './sidebar';
12
+ import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui';
9
13
  import '../../theme/sidebar-narrow.css';
10
- import type Annotation from './annotation.js';
11
- import type { default as AnnotationCollection } from './annotationcollection.js';
14
+ import type Annotation from './annotation';
15
+ import type { default as AnnotationCollection } from './annotationcollection';
12
16
  /**
13
17
  * The narrow sidebar UI for displaying annotations.
14
18
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x7adf=['_detachFromContainer','southArrowNorth','northArrowSouth','ready','removeEventListener','detach','narrowsidebar-detach-not-attached','length','_updateBalloonPosition','stopListening','focusableElements','annotationType','contains','content','blur','attach','_manuallyClosedAnnotationViews','remove','_showBalloon','type','mousedown','delete','add','_attachListeners','_setSelectedAnnotations','high','EditorAnnotations','from','isAttached','set','northArrowSouthEast','isDirty','get','context','resize','_attachToContainer','_refreshPositioningDebounced','_annotationToNarrowView','editors','getOrderedSelectedAnnotations','keyCode','cancel','isVisible','target','init','getByView','northArrowSouthWest','register','_refreshPositioning','narrowsidebar-attach-already-attached','_editorAnnotations','bind','plugins','refresh','focus','locale','change:container','execute','_destroyEditorAnnotationsIntegration','annotations','defaultPositions','has','addAnnotation','activeAnnotation','listenTo','getSidebarItemView','keydown','first','Esc','preventDefault','preventClosingBalloon','element','low','setActiveAnnotation','balloonPanelView','narrowSidebar','ck-sidebar--narrow','_integrateWithEditorAnnotations','_selectedAnnotations','number','change:height','_domEmitter','view','southArrowNorthEast','set:container','destroy','bodyCollection','stopPropagation','_hideBalloon','_detachListeners','values','pin','_annotations','find','hasDomSelection'];(function(_0x379305,_0x7adf6a){const _0x9de2b9=function(_0x2f5d93){while(--_0x2f5d93){_0x379305['push'](_0x379305['shift']());}};_0x9de2b9(++_0x7adf6a);}(_0x7adf,0x14d));const _0x9de2=function(_0x379305,_0x7adf6a){_0x379305=_0x379305-0x0;let _0x9de2b9=_0x7adf[_0x379305];return _0x9de2b9;};import{ContextPlugin as _0x3fc041,Context as _0x1ffb9e}from'ckeditor5/src/core.js';import _0x1f5aa4 from'./annotationsuis.js';import _0x3c0dc3 from'./sidebar.js';import _0x42c2a9 from'./view/annotationcounterbuttonview.js';import{BalloonPanelView as _0x413905,BodyCollection as _0x2b3093}from'ckeditor5/src/ui.js';import{CKEditorError as _0xb1407,DomEmitterMixin as _0x4cadf5,keyCodes as _0x16f04b,Collection as _0x4f82ae}from'ckeditor5/src/utils.js';import'../../theme/sidebar-narrow.css';import{debounce as _0x17dd3f}from'lodash-es';import _0x314388 from'./editorannotations.js';export default class i extends _0x3fc041{static get['requires'](){return[_0x3c0dc3,_0x1f5aa4];}static get['pluginName'](){return'NarrowSidebar';}constructor(_0x531251){super(_0x531251),this[_0x9de2('0x4b')]=!0x1,this[_0x9de2('0x3f')]=new Set(),this[_0x9de2('0x21')]=Object['create'](_0x4cadf5),this[_0x9de2('0x54')]=new Map(),this[_0x9de2('0x4c')](_0x9de2('0xf'),null),this[_0x9de2('0xb')]=null,this[_0x9de2('0x1e')]=[],this[_0x9de2('0x2')]=new _0x4f82ae(),this['_refreshPositioningDebounced']=_0x17dd3f(()=>{this[_0x9de2('0x0')]();},0xfa,{'leading':!0x1});}[_0x9de2('0x5b')](){this[_0x9de2('0x50')][_0x9de2('0x4')][_0x9de2('0x4f')](_0x1f5aa4)[_0x9de2('0x5e')](_0x9de2('0x1b'),this),this['bodyCollection']=new _0x2b3093(this[_0x9de2('0x50')][_0x9de2('0x7')]),this[_0x9de2('0x1a')]=new _0x413905(this[_0x9de2('0x50')][_0x9de2('0x7')]),this[_0x9de2('0x26')]['attachToDom'](),this['bodyCollection'][_0x9de2('0x45')](this[_0x9de2('0x1a')]);}[_0x9de2('0x3e')](_0x1ea26a){this['annotations']=_0x1ea26a;const _0x295f26=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3),_0x2e9e48=this[_0x9de2('0x1a')];if(_0x295f26[_0x9de2('0x2c')]=_0x1ea26a,this[_0x9de2('0x4b')])throw new _0xb1407(_0x9de2('0x1'),this);this[_0x9de2('0x4b')]=!0x0,this[_0x9de2('0x10')](_0x295f26,_0x9de2('0x24'),()=>{this[_0x9de2('0x34')](),this[_0x9de2('0x10')](_0x295f26,_0x9de2('0x8'),_0x1a7ada=>{_0x1a7ada['off'](),this[_0x9de2('0x3e')](_0x1ea26a);});}),_0x295f26[_0x9de2('0x52')]({'viewClass':_0x9de2('0x1c'),'spaceBetweenItems':0x5});const _0x5826c0=_0x2ec63e=>{const _0x4266f0=new _0x42c2a9(this['context'][_0x9de2('0x7')]);_0x295f26[_0x9de2('0xe')](_0x2ec63e,_0x4266f0),this[_0x9de2('0x54')][_0x9de2('0x4c')](_0x2ec63e,_0x4266f0),_0x4266f0[_0x9de2('0x3')]('isDirty',_0x9de2('0x3a'),_0x9de2('0x1f'))['to'](_0x2ec63e[_0x9de2('0x22')],_0x9de2('0x4e'),_0x9de2('0x42'),_0x9de2('0x36')),_0x4266f0['on'](_0x9de2('0x9'),()=>{this[_0x9de2('0x3f')]['clear'](),_0x2e9e48['content'][_0x9de2('0x13')]!==_0x2ec63e[_0x9de2('0x22')]?(this[_0x9de2('0x41')](_0x2ec63e),_0x2ec63e['view'][_0x9de2('0x17')]['focus'](),this[_0x9de2('0x19')](_0x2ec63e)):this[_0x9de2('0x19')](null);});};for(const _0x5cc5c9 of _0x1ea26a)_0x5826c0(_0x5cc5c9);this[_0x9de2('0x10')](_0x1ea26a,_0x9de2('0x45'),(_0x4943cd,_0x585878)=>{_0x5826c0(_0x585878);}),this[_0x9de2('0x10')](_0x1ea26a,'remove',(_0x2523d2,_0x18ef2f,_0x273a2e)=>{this['_annotationToNarrowView'][_0x9de2('0x4f')](_0x18ef2f)['destroy'](),this[_0x9de2('0x54')][_0x9de2('0x44')](_0x18ef2f),_0x295f26['rearrange']({'removedAnnotation':_0x18ef2f,'previousAnnotation':_0x1ea26a[_0x9de2('0x4f')](_0x273a2e-0x1),'nextAnnotation':_0x1ea26a[_0x9de2('0x4f')](_0x273a2e+0x1)}),_0x18ef2f===this[_0x9de2('0xf')]&&this[_0x9de2('0x19')](null);},{'priority':_0x9de2('0x18')}),this['listenTo'](_0x1ea26a,_0x9de2('0x6'),(_0x354d90,_0x13bb46)=>{this[_0x9de2('0x19')](_0x13bb46);}),this[_0x9de2('0x10')](_0x1ea26a,_0x9de2('0x3d'),()=>{this[_0x9de2('0x19')](null);}),this['_domEmitter'][_0x9de2('0x10')](document,_0x9de2('0x12'),(_0x577a8c,_0x5a96c8)=>{_0x5a96c8[_0x9de2('0x57')]===_0x16f04b['esc']&&_0x2e9e48['isVisible']&&(this[_0x9de2('0x3f')]['add'](_0x2e9e48[_0x9de2('0x3c')][_0x9de2('0x13')]),this[_0x9de2('0x28')](),_0x5a96c8[_0x9de2('0x27')](),_0x5a96c8[_0x9de2('0x15')]());}),this[_0x9de2('0x21')]['listenTo'](document,_0x9de2('0x43'),(_0x2f5b41,_0x1b61aa)=>{const _0xefb7f2=_0x1b61aa[_0x9de2('0x5a')];_0x2e9e48[_0x9de2('0x59')]&&_0x2e9e48[_0x9de2('0x17')][_0x9de2('0x3b')](_0xefb7f2)||_0x295f26[_0x9de2('0x22')][_0x9de2('0x17')][_0x9de2('0x3b')](_0xefb7f2)||_0x2f5b41['preventClosingBalloon']||this[_0x9de2('0xf')]&&this[_0x9de2('0xf')][_0x9de2('0x39')][_0x9de2('0x2d')](_0x1c59a7=>_0x1c59a7[_0x9de2('0x3b')](_0xefb7f2))||(this['_manuallyClosedAnnotationViews']['clear'](),this[_0x9de2('0x28')](),this[_0x9de2('0x19')](null));});const _0x497e26=this['context']instanceof _0x1ffb9e?this[_0x9de2('0x50')][_0x9de2('0x55')]:new _0x4f82ae([this['context']]);for(const _0x584bd2 of _0x497e26)this['_integrateWithEditorAnnotations'](_0x584bd2);this[_0x9de2('0x10')](_0x497e26,_0x9de2('0x45'),(_0x1f9e68,_0x4a81ca)=>{this[_0x9de2('0x10')](_0x4a81ca,_0x9de2('0x32'),()=>{this[_0x9de2('0x1d')](_0x4a81ca);});}),this[_0x9de2('0x10')](_0x497e26,_0x9de2('0x40'),(_0x376aca,_0x38a3ae)=>{_0x38a3ae['plugins'][_0x9de2('0xd')](_0x9de2('0x49'))&&this['_destroyEditorAnnotationsIntegration'](_0x38a3ae[_0x9de2('0x4')][_0x9de2('0x4f')](_0x9de2('0x49')));}),window['addEventListener'](_0x9de2('0x51'),this[_0x9de2('0x53')]),this[_0x9de2('0x0')]();}['setActiveAnnotation'](_0x22ca18){if(_0x22ca18===this[_0x9de2('0xf')])return;const _0x49e114=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3);if(_0x49e114[_0x9de2('0x5')]({'blurredAnnotation':this[_0x9de2('0xf')],'activatedAnnotation':_0x22ca18,'disableAnimationOnActivatedAnnotation':!0x0}),_0x22ca18)_0x49e114[_0x9de2('0x11')](_0x22ca18)?this[_0x9de2('0x41')](_0x22ca18):this[_0x9de2('0x28')]();else this[_0x9de2('0x28')]();this[_0x9de2('0xf')]=_0x22ca18;}[_0x9de2('0x34')](){if(!this[_0x9de2('0x4b')])throw new _0xb1407(_0x9de2('0x35'),this);this[_0x9de2('0x19')](null);const _0x23df14=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3);this[_0x9de2('0x28')](),Array[_0x9de2('0x4a')](this[_0x9de2('0x54')][_0x9de2('0x2a')](),_0x27a5f0=>_0x27a5f0[_0x9de2('0x25')]()),this[_0x9de2('0x54')]['clear'](),_0x23df14[_0x9de2('0x2f')](this[_0x9de2('0xb')]),this[_0x9de2('0x38')](),this[_0x9de2('0x21')][_0x9de2('0x38')](),this[_0x9de2('0x50')]instanceof _0x1ffb9e&&this[_0x9de2('0x38')](this[_0x9de2('0x50')][_0x9de2('0x55')]);for(const _0x57ea8a of Array[_0x9de2('0x4a')](this[_0x9de2('0x2')]))this[_0x9de2('0xa')](_0x57ea8a);window[_0x9de2('0x33')](_0x9de2('0x51'),this[_0x9de2('0x53')]),this[_0x9de2('0x53')][_0x9de2('0x58')](),this[_0x9de2('0x1e')]=[],this['isAttached']=!0x1,this[_0x9de2('0xb')]=null;}[_0x9de2('0x25')](){this[_0x9de2('0x4b')]&&this[_0x9de2('0x34')](),this[_0x9de2('0x26')]['detachFromDom']();}[_0x9de2('0x1d')](_0x4fd4c6){const _0xbb04ca=_0x4fd4c6[_0x9de2('0x4')][_0x9de2('0x4f')](_0x314388),_0x666bb4=this[_0x9de2('0x50')]['plugins'][_0x9de2('0x4f')](_0x3c0dc3),_0x330a5b=this['annotations'],_0x2e8471=this[_0x9de2('0x1a')],_0x2c6ef9=()=>{const _0x4f361c=_0xbb04ca[_0x9de2('0x56')]({'annotations':this[_0x9de2('0xb')],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4f361c),this['setActiveAnnotation'](_0x4f361c[0x0]||null);};this[_0x9de2('0x10')](_0xbb04ca,'refresh',_0x2c6ef9),this['listenTo'](_0xbb04ca,_0x9de2('0x3d'),(_0x501b3d,{isAnnotationTracked:_0x1348b9})=>{this['activeAnnotation']&&_0x1348b9(this[_0x9de2('0xf')])&&(this['_setSelectedAnnotations']([]),this[_0x9de2('0x19')](null));}),this['listenTo'](_0xbb04ca,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this[_0x9de2('0x10')](_0x330a5b,'blur',_0x45bd9d=>{_0xbb04ca['hasDomSelection']()&&_0x45bd9d['stop']();},{'priority':_0x9de2('0x48')}),this[_0x9de2('0x10')](this['_domEmitter'],_0x9de2('0x43'),(_0x5e575e,_0x1f73ed)=>{const _0xc7437b=_0x1f73ed[_0x9de2('0x5a')];_0x2e8471[_0x9de2('0x59')]&&_0x2e8471[_0x9de2('0x17')][_0x9de2('0x3b')](_0xc7437b)||_0x666bb4[_0x9de2('0x22')][_0x9de2('0x17')][_0x9de2('0x3b')](_0xc7437b)||this[_0x9de2('0xf')]&&_0xbb04ca[_0x9de2('0x2e')]()&&(_0x2c6ef9(),_0x5e575e[_0x9de2('0x16')]=!0x0);},{'priority':_0x9de2('0x48')}),this[_0x9de2('0x2')]['add'](_0xbb04ca);}[_0x9de2('0xa')](_0x286c88){_0x286c88&&(this[_0x9de2('0x38')](_0x286c88),this[_0x9de2('0x2')][_0x9de2('0x40')](_0x286c88));}[_0x9de2('0x47')](_0x44c7fe){for(const _0x41c825 of this['_selectedAnnotations'])_0x44c7fe['includes'](_0x41c825)||this[_0x9de2('0x3f')]['delete'](_0x41c825[_0x9de2('0x22')]);this[_0x9de2('0x1e')]=_0x44c7fe;}[_0x9de2('0x0')](){const _0x3fb89f=this[_0x9de2('0x1a')];this['annotations']['refreshPositioning'](),_0x3fb89f[_0x9de2('0x59')]&&this['_updateBalloonPosition']();}[_0x9de2('0x41')](_0x51d801){if(this[_0x9de2('0x3f')]['has'](_0x51d801[_0x9de2('0x22')]))return;const _0x5c0c7e=this[_0x9de2('0x1a')][_0x9de2('0x3c')][_0x9de2('0x13')];_0x5c0c7e!==_0x51d801[_0x9de2('0x22')]?(_0x5c0c7e&&this[_0x9de2('0x29')](_0x5c0c7e),this['_attachListeners'](_0x51d801[_0x9de2('0x22')]),this[_0x9de2('0x1a')][_0x9de2('0x3c')]['clear'](),this['balloonPanelView']['content']['add'](_0x51d801['view']),this['_updateBalloonPosition']()):this[_0x9de2('0x37')]();}['_updateBalloonPosition'](){const _0x3ff643=this[_0x9de2('0x1a')][_0x9de2('0x3c')][_0x9de2('0x13')],_0x59e4cf=_0x3ff643&&this[_0x9de2('0xb')][_0x9de2('0x5c')](_0x3ff643);if(!_0x59e4cf||!this[_0x9de2('0x54')][_0x9de2('0xd')](_0x59e4cf))return;const _0x345bbe=this[_0x9de2('0x54')][_0x9de2('0x4f')](_0x59e4cf)[_0x9de2('0x17')],_0x111aac=function(){const _0x5017e7=_0x413905[_0x9de2('0xc')];return[_0x5017e7[_0x9de2('0x23')],_0x5017e7[_0x9de2('0x4d')],_0x5017e7[_0x9de2('0x30')],_0x5017e7[_0x9de2('0x31')],_0x5017e7['southArrowNorthWest'],_0x5017e7[_0x9de2('0x5d')]];}();this['balloonPanelView'][_0x9de2('0x2b')]({'target':_0x345bbe,'positions':_0x111aac});}[_0x9de2('0x28')](){const _0x379dcd=this[_0x9de2('0x1a')],_0x563520=_0x379dcd[_0x9de2('0x3c')][_0x9de2('0x13')];_0x563520&&(this[_0x9de2('0x29')](_0x563520),_0x379dcd['unpin'](),_0x379dcd[_0x9de2('0x3c')]['clear']());}[_0x9de2('0x46')](_0xc109d7){this['listenTo'](_0xc109d7,_0x9de2('0x20'),()=>this[_0x9de2('0x37')]()),this[_0x9de2('0x10')](_0xc109d7,_0x9de2('0x14'),(_0x11c58f,_0x326900)=>{this[_0x9de2('0x3f')]['add'](_0xc109d7),this[_0x9de2('0x28')](),_0x326900();});}[_0x9de2('0x29')](_0x5058db){this[_0x9de2('0x38')](_0x5058db);}}
23
+ const _0x44aa=['set:container','mousedown','remove','element','pluginName','keyCode','register','uiUpdate','northArrowSouth','_selectedAnnotations','keydown','_detachListeners','isAttached','has','focus','balloonPanelView','context','attachToDom','create','_attachListeners','annotations','resize','removeEventListener','_domEmitter','listenTo','low','ck-sidebar--narrow','refresh','values','_refreshPositioningDebounced','get','_refreshPositioning','stopListening','includes','find','clear','getByView','destroy','_showBalloon','southArrowNorth','_setSelectedAnnotations','blur','contains','delete','add','hasDomSelection','execute','getOrderedSelectedAnnotations','content','southArrowNorthWest','rearrange','esc','editors','EditorAnnotations','isDirty','_hideBalloon','detach','plugins','preventClosingBalloon','addEventListener','getSidebarItemView','requires','_annotationToNarrowView','isVisible','pin','_annotations','high','view','_editorAnnotations','activeAnnotation','_integrateWithEditorAnnotations','from','_destroyEditorAnnotationsIntegration','attach','cancel','_attachToContainer','Esc','length','_manuallyClosedAnnotationViews','type','addAnnotation','_updateBalloonPosition','focusableElements','first','bodyCollection','stopPropagation','narrowSidebar','set','defaultPositions','target','setActiveAnnotation'];(function(_0x42790c,_0x44aa37){const _0x48998b=function(_0x153ad7){while(--_0x153ad7){_0x42790c['push'](_0x42790c['shift']());}};_0x48998b(++_0x44aa37);}(_0x44aa,0x17b));const _0x4899=function(_0x42790c,_0x44aa37){_0x42790c=_0x42790c-0x0;let _0x48998b=_0x44aa[_0x42790c];return _0x48998b;};import{ContextPlugin as _0x21606a,Context as _0x5d04b1}from'ckeditor5/src/core';import _0x1c5bad from'./annotationsuis';import _0x1c84a2 from'./sidebar';import _0xd25026 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x39ced8,BodyCollection as _0x569cb6}from'ckeditor5/src/ui';import{CKEditorError as _0x4bb7b8,DomEmitterMixin as _0x404662,keyCodes as _0x297d0d,Collection as _0x14b5f8}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x4b3394}from'lodash-es';import _0x2aa2f4 from'./editorannotations';export default class s extends _0x21606a{static get[_0x4899('0x2e')](){return[_0x1c84a2,_0x1c5bad];}static get[_0x4899('0x50')](){return'NarrowSidebar';}constructor(_0xeb7cd4){super(_0xeb7cd4),this['isAttached']=!0x1,this[_0x4899('0x3f')]=new Set(),this['_domEmitter']=Object[_0x4899('0x3')](_0x404662),this[_0x4899('0x2f')]=new Map(),this[_0x4899('0x48')](_0x4899('0x36'),null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x14b5f8(),this[_0x4899('0xe')]=_0x4b3394(()=>{this[_0x4899('0x10')]();},0xfa,{'leading':!0x1});}['init'](){this[_0x4899('0x1')][_0x4899('0x2a')][_0x4899('0xf')](_0x1c5bad)[_0x4899('0x52')](_0x4899('0x47'),this),this[_0x4899('0x45')]=new _0x569cb6(this[_0x4899('0x1')]['locale']),this['balloonPanelView']=new _0x39ced8(this[_0x4899('0x1')]['locale']),this[_0x4899('0x45')][_0x4899('0x2')](),this[_0x4899('0x45')][_0x4899('0x1d')](this[_0x4899('0x0')]);}[_0x4899('0x3a')](_0x1959aa){this[_0x4899('0x5')]=_0x1959aa;const _0x27e765=this[_0x4899('0x1')][_0x4899('0x2a')]['get'](_0x1c84a2),_0x46a492=this[_0x4899('0x0')];if(_0x27e765[_0x4899('0x32')]=_0x1959aa,this['isAttached'])throw new _0x4bb7b8('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this[_0x4899('0x9')](_0x27e765,_0x4899('0x4c'),()=>{this[_0x4899('0x29')](),this['listenTo'](_0x27e765,'change:container',_0x4a6f12=>{_0x4a6f12['off'](),this[_0x4899('0x3a')](_0x1959aa);});}),_0x27e765[_0x4899('0x3c')]({'viewClass':_0x4899('0xb'),'spaceBetweenItems':0x5});const _0x24f6e7=_0x45b814=>{const _0x4037c9=new _0xd25026(this[_0x4899('0x1')]['locale']);_0x27e765[_0x4899('0x41')](_0x45b814,_0x4037c9),this['_annotationToNarrowView']['set'](_0x45b814,_0x4037c9),_0x4037c9['bind'](_0x4899('0x27'),'annotationType','number')['to'](_0x45b814['view'],_0x4899('0x27'),_0x4899('0x40'),_0x4899('0x3e')),_0x4037c9['on'](_0x4899('0x1f'),()=>{this[_0x4899('0x3f')][_0x4899('0x14')](),_0x46a492['content'][_0x4899('0x44')]!==_0x45b814[_0x4899('0x34')]?(this[_0x4899('0x17')](_0x45b814),_0x45b814[_0x4899('0x34')][_0x4899('0x4f')][_0x4899('0x5a')](),this[_0x4899('0x4b')](_0x45b814)):this[_0x4899('0x4b')](null);});};for(const _0x5a50e8 of _0x1959aa)_0x24f6e7(_0x5a50e8);this[_0x4899('0x9')](_0x1959aa,_0x4899('0x1d'),(_0x191a30,_0xdeeaf8)=>{_0x24f6e7(_0xdeeaf8);}),this[_0x4899('0x9')](_0x1959aa,'remove',(_0x44fe64,_0x5ffe0c,_0x562239)=>{this[_0x4899('0x2f')][_0x4899('0xf')](_0x5ffe0c)[_0x4899('0x16')](),this[_0x4899('0x2f')][_0x4899('0x1c')](_0x5ffe0c),_0x27e765[_0x4899('0x23')]({'removedAnnotation':_0x5ffe0c,'previousAnnotation':_0x1959aa['get'](_0x562239-0x1),'nextAnnotation':_0x1959aa[_0x4899('0xf')](_0x562239+0x1)}),_0x5ffe0c===this[_0x4899('0x36')]&&this[_0x4899('0x4b')](null);},{'priority':_0x4899('0xa')}),this[_0x4899('0x9')](_0x1959aa,'focus',(_0xbd8e31,_0x77239f)=>{this[_0x4899('0x4b')](_0x77239f);}),this[_0x4899('0x9')](_0x1959aa,_0x4899('0x1a'),()=>{this['setActiveAnnotation'](null);}),this['_domEmitter'][_0x4899('0x9')](document,_0x4899('0x56'),(_0x1ce23a,_0x17c15d)=>{_0x17c15d[_0x4899('0x51')]===_0x297d0d[_0x4899('0x24')]&&_0x46a492[_0x4899('0x30')]&&(this[_0x4899('0x3f')][_0x4899('0x1d')](_0x46a492['content'][_0x4899('0x44')]),this[_0x4899('0x28')](),_0x17c15d[_0x4899('0x46')](),_0x17c15d['preventDefault']());}),this[_0x4899('0x8')][_0x4899('0x9')](document,_0x4899('0x4d'),(_0x1e3666,_0x10707d)=>{const _0x49e8e1=_0x10707d[_0x4899('0x4a')];_0x46a492[_0x4899('0x30')]&&_0x46a492[_0x4899('0x4f')][_0x4899('0x1b')](_0x49e8e1)||_0x27e765[_0x4899('0x34')]['element'][_0x4899('0x1b')](_0x49e8e1)||_0x1e3666[_0x4899('0x2b')]||this['activeAnnotation']&&this[_0x4899('0x36')][_0x4899('0x43')][_0x4899('0x13')](_0x8a9f24=>_0x8a9f24[_0x4899('0x1b')](_0x49e8e1))||(this[_0x4899('0x3f')]['clear'](),this[_0x4899('0x28')](),this[_0x4899('0x4b')](null));});const _0x2a7acb=this[_0x4899('0x1')]instanceof _0x5d04b1?this[_0x4899('0x1')][_0x4899('0x25')]:new _0x14b5f8([this[_0x4899('0x1')]]);for(const _0x266fae of _0x2a7acb)this[_0x4899('0x37')](_0x266fae);this['listenTo'](_0x2a7acb,_0x4899('0x1d'),(_0x4e88a5,_0x33a62f)=>{this[_0x4899('0x9')](_0x33a62f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x33a62f);});}),this['listenTo'](_0x2a7acb,_0x4899('0x4e'),(_0x3e310a,_0x43b36d)=>{_0x43b36d[_0x4899('0x2a')][_0x4899('0x59')](_0x4899('0x26'))&&this[_0x4899('0x39')](_0x43b36d[_0x4899('0x2a')][_0x4899('0xf')](_0x4899('0x26')));}),window[_0x4899('0x2c')](_0x4899('0x6'),this[_0x4899('0xe')]),this[_0x4899('0x10')]();}[_0x4899('0x4b')](_0x49dffb){if(_0x49dffb===this[_0x4899('0x36')])return;const _0x28e567=this[_0x4899('0x1')]['plugins']['get'](_0x1c84a2);if(_0x28e567[_0x4899('0xc')]({'blurredAnnotation':this[_0x4899('0x36')],'activatedAnnotation':_0x49dffb,'disableAnimationOnActivatedAnnotation':!0x0}),_0x49dffb)_0x28e567[_0x4899('0x2d')](_0x49dffb)?this[_0x4899('0x17')](_0x49dffb):this[_0x4899('0x28')]();else this['_hideBalloon']();this[_0x4899('0x36')]=_0x49dffb;}[_0x4899('0x29')](){if(!this[_0x4899('0x58')])throw new _0x4bb7b8('narrowsidebar-detach-not-attached',this);this[_0x4899('0x4b')](null);const _0x55c40b=this[_0x4899('0x1')][_0x4899('0x2a')][_0x4899('0xf')](_0x1c84a2);this[_0x4899('0x28')](),Array[_0x4899('0x38')](this[_0x4899('0x2f')][_0x4899('0xd')](),_0x551521=>_0x551521['destroy']()),this[_0x4899('0x2f')][_0x4899('0x14')](),_0x55c40b['_detachFromContainer'](this[_0x4899('0x5')]),this[_0x4899('0x11')](),this[_0x4899('0x8')][_0x4899('0x11')](),this[_0x4899('0x1')]instanceof _0x5d04b1&&this[_0x4899('0x11')](this[_0x4899('0x1')][_0x4899('0x25')]);for(const _0x299702 of Array[_0x4899('0x38')](this[_0x4899('0x35')]))this[_0x4899('0x39')](_0x299702);window[_0x4899('0x7')](_0x4899('0x6'),this[_0x4899('0xe')]),this[_0x4899('0xe')][_0x4899('0x3b')](),this[_0x4899('0x55')]=[],this[_0x4899('0x58')]=!0x1,this[_0x4899('0x5')]=null;}['destroy'](){this[_0x4899('0x58')]&&this[_0x4899('0x29')](),this[_0x4899('0x45')]['detachFromDom']();}[_0x4899('0x37')](_0x2ce05f){const _0x3a8538=_0x2ce05f[_0x4899('0x2a')][_0x4899('0xf')](_0x2aa2f4),_0x224358=this['context'][_0x4899('0x2a')][_0x4899('0xf')](_0x1c84a2),_0x1b46b9=this[_0x4899('0x5')],_0x29e9b4=this['balloonPanelView'],_0x25b8f1=()=>{const _0x344086=_0x3a8538[_0x4899('0x20')]({'annotations':this['annotations'],'activeAnnotation':this[_0x4899('0x36')]});this['_setSelectedAnnotations'](_0x344086),this[_0x4899('0x4b')](_0x344086[0x0]||null);};this['listenTo'](_0x3a8538,_0x4899('0xc'),_0x25b8f1),this[_0x4899('0x9')](_0x3a8538,'blur',(_0x58e6df,{isAnnotationTracked:_0x3ff0d8})=>{this[_0x4899('0x36')]&&_0x3ff0d8(this[_0x4899('0x36')])&&(this[_0x4899('0x19')]([]),this['setActiveAnnotation'](null));}),this[_0x4899('0x9')](_0x3a8538,_0x4899('0x53'),()=>{this[_0x4899('0xe')]();}),this[_0x4899('0x9')](_0x1b46b9,_0x4899('0x1a'),_0x4728a1=>{_0x3a8538[_0x4899('0x1e')]()&&_0x4728a1['stop']();},{'priority':_0x4899('0x33')}),this[_0x4899('0x9')](this['_domEmitter'],_0x4899('0x4d'),(_0x38a3e5,_0xabed04)=>{const _0x3aa528=_0xabed04[_0x4899('0x4a')];_0x29e9b4['isVisible']&&_0x29e9b4[_0x4899('0x4f')][_0x4899('0x1b')](_0x3aa528)||_0x224358['view'][_0x4899('0x4f')][_0x4899('0x1b')](_0x3aa528)||this[_0x4899('0x36')]&&_0x3a8538[_0x4899('0x1e')]()&&(_0x25b8f1(),_0x38a3e5[_0x4899('0x2b')]=!0x0);},{'priority':_0x4899('0x33')}),this[_0x4899('0x35')][_0x4899('0x1d')](_0x3a8538);}[_0x4899('0x39')](_0x22e7cc){_0x22e7cc&&(this[_0x4899('0x11')](_0x22e7cc),this['_editorAnnotations']['remove'](_0x22e7cc));}[_0x4899('0x19')](_0x525d8d){for(const _0x3b1fa8 of this[_0x4899('0x55')])_0x525d8d[_0x4899('0x12')](_0x3b1fa8)||this['_manuallyClosedAnnotationViews'][_0x4899('0x1c')](_0x3b1fa8[_0x4899('0x34')]);this[_0x4899('0x55')]=_0x525d8d;}['_refreshPositioning'](){const _0x2ee624=this['balloonPanelView'];this[_0x4899('0x5')]['refreshPositioning'](),_0x2ee624['isVisible']&&this[_0x4899('0x42')]();}[_0x4899('0x17')](_0x30ecad){if(this[_0x4899('0x3f')][_0x4899('0x59')](_0x30ecad[_0x4899('0x34')]))return;const _0x546c1b=this[_0x4899('0x0')][_0x4899('0x21')][_0x4899('0x44')];_0x546c1b!==_0x30ecad[_0x4899('0x34')]?(_0x546c1b&&this[_0x4899('0x57')](_0x546c1b),this[_0x4899('0x4')](_0x30ecad[_0x4899('0x34')]),this[_0x4899('0x0')][_0x4899('0x21')][_0x4899('0x14')](),this['balloonPanelView'][_0x4899('0x21')]['add'](_0x30ecad['view']),this[_0x4899('0x42')]()):this['_updateBalloonPosition']();}[_0x4899('0x42')](){const _0x585dd3=this[_0x4899('0x0')]['content'][_0x4899('0x44')],_0x5d628a=_0x585dd3&&this[_0x4899('0x5')][_0x4899('0x15')](_0x585dd3);if(!_0x5d628a||!this[_0x4899('0x2f')][_0x4899('0x59')](_0x5d628a))return;const _0x135eb7=this[_0x4899('0x2f')][_0x4899('0xf')](_0x5d628a)[_0x4899('0x4f')],_0x1ba0a7=function(){const _0xd359ab=_0x39ced8[_0x4899('0x49')];return[_0xd359ab['southArrowNorthEast'],_0xd359ab['northArrowSouthEast'],_0xd359ab[_0x4899('0x18')],_0xd359ab[_0x4899('0x54')],_0xd359ab[_0x4899('0x22')],_0xd359ab['northArrowSouthWest']];}();this['balloonPanelView'][_0x4899('0x31')]({'target':_0x135eb7,'positions':_0x1ba0a7});}['_hideBalloon'](){const _0x124343=this[_0x4899('0x0')],_0x17e501=_0x124343[_0x4899('0x21')][_0x4899('0x44')];_0x17e501&&(this[_0x4899('0x57')](_0x17e501),_0x124343['unpin'](),_0x124343[_0x4899('0x21')]['clear']());}['_attachListeners'](_0x2aaa68){this[_0x4899('0x9')](_0x2aaa68,'change:height',()=>this[_0x4899('0x42')]()),this[_0x4899('0x9')](_0x2aaa68,_0x4899('0x3d'),(_0x10869a,_0x1a507b)=>{this[_0x4899('0x3f')][_0x4899('0x1d')](_0x2aaa68),this[_0x4899('0x28')](),_0x1a507b();});}[_0x4899('0x57')](_0x141ab0){this['stopListening'](_0x141ab0);}}
@@ -1,12 +1,16 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module comments/annotations/sidebar
3
7
  * @publicApi
4
8
  */
5
- import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
6
- import type { View } from 'ckeditor5/src/ui.js';
7
- import SidebarView from './view/sidebarview.js';
8
- import SidebarItemView from './view/sidebaritemview.js';
9
- import type Annotation from './annotation.js';
9
+ import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
10
+ import type { View } from 'ckeditor5/src/ui';
11
+ import SidebarView from './view/sidebarview';
12
+ import SidebarItemView from './view/sidebaritemview';
13
+ import type Annotation from './annotation';
10
14
  /**
11
15
  * Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
12
16
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x6c28=['getIndex','remove','context','minHeight','_setItemTop','_alignAfterItem','targetRect','sidebar.preventScrollOutOfView','bind','class','change:bottom','change:top','_spaceBetweenItems','list','_lastItem','_alignToTargetRect','object','_createSidebarView','render','_alignForBottomChange','set','_getItemAfter','length','locale','Sidebar','_getItemBefore','_annotations','_activeAnnotation','_alignBeforeItem','last','delete','content','get','listenTo','refresh','nodeType','_sidebarItemViewToAnnotation','_destroySidebarItemView','init','height','_getTargetTop','change:targetRect','_annotationToSidebarItemView','max','sidebar-attachtocontainer-missing-container','config','bottom','sidebar.container','view','target','clear','isAnimationDisabled','_updateLastItem','_recalculate','_attachToContainer','stopListening','getSidebarItemView','addAnnotation','_alignForTopChange','top','_recalculateBuffer','change:_lastItem','container','_targetTop','element','define','updateHeight','_getMaxAvailableTop','destroy','isActive'];(function(_0x1bef2f,_0x6c2880){const _0x5c34ec=function(_0x47cd6f){while(--_0x47cd6f){_0x1bef2f['push'](_0x1bef2f['shift']());}};_0x5c34ec(++_0x6c2880);}(_0x6c28,0xd9));const _0x5c34=function(_0x1bef2f,_0x6c2880){_0x1bef2f=_0x1bef2f-0x0;let _0x5c34ec=_0x6c28[_0x1bef2f];return _0x5c34ec;};import{ContextPlugin as _0x11dba3}from'ckeditor5/src/core.js';import{Rect as _0x6b676f,CKEditorError as _0x95ebce}from'ckeditor5/src/utils.js';import _0x2cbdf4 from'./view/sidebarview.js';import _0x4fa075 from'./view/sidebaritemview.js';export default class z extends _0x11dba3{static get['pluginName'](){return _0x5c34('0x11');}constructor(_0x460082){super(_0x460082),this[_0x5c34('0xd')](_0x5c34('0x7'),void 0x0),this['view']=this[_0x5c34('0xa')](),this[_0x5c34('0xd')]('container',null),this[_0x5c34('0x5')]=0x19,this[_0x5c34('0x1d')]=new Map(),this[_0x5c34('0x23')]=new Map(),this[_0x5c34('0x41')]['config'][_0x5c34('0x3a')]('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this[_0x5c34('0x35')]=[];}[_0x5c34('0x1f')](){const _0x9ddfb9=this[_0x5c34('0x41')][_0x5c34('0x26')][_0x5c34('0x19')](_0x5c34('0x28'));_0x9ddfb9&&this['setContainer'](_0x9ddfb9);}['setContainer'](_0x567c5a){if(!y(_0x567c5a))throw new _0x95ebce('sidebar-setcontainer-invalid-element');this[_0x5c34('0x37')]=_0x567c5a;}[_0x5c34('0x2f')]({viewClass:_0x10415b='',spaceBetweenItems:_0x2339f3=0x19}={}){if(!y(this[_0x5c34('0x37')]))throw new _0x95ebce(_0x5c34('0x25'),this);this[_0x5c34('0x37')]['appendChild'](this[_0x5c34('0x29')][_0x5c34('0x39')]),this[_0x5c34('0x29')][_0x5c34('0x2')]=_0x10415b,this[_0x5c34('0x5')]=_0x2339f3;}['rearrange']({removedAnnotation:_0x2e4bd9,previousAnnotation:_0x5c8e05,nextAnnotation:_0x552391}){const _0x2b8e8d=this[_0x5c34('0x31')](_0x2e4bd9);this[_0x5c34('0x29')][_0x5c34('0x6')][_0x5c34('0x40')](_0x2b8e8d),this[_0x5c34('0x1e')](_0x2e4bd9),_0x5c8e05&&this[_0x5c34('0x8')](this[_0x5c34('0x31')](_0x5c8e05)),_0x552391&&this[_0x5c34('0x8')](this[_0x5c34('0x31')](_0x552391)),this[_0x5c34('0x2d')]();}[_0x5c34('0x1b')]({blurredAnnotation:_0x51046d,activatedAnnotation:_0x133719,disableAnimationOnActivatedAnnotation:_0x3c20a5}){if(this['_activeAnnotation']=_0x133719,_0x51046d){_0x51046d[_0x5c34('0x3e')]=!0x1;const _0x489845=this[_0x5c34('0x31')](_0x51046d);_0x489845&&_0x3c20a5&&(_0x489845[_0x5c34('0x2c')]=!0x1);}if(_0x133719){const _0x421bf6=this[_0x5c34('0x31')](_0x133719);_0x421bf6&&(_0x133719[_0x5c34('0x3e')]=!0x0,_0x3c20a5&&(_0x421bf6[_0x5c34('0x2c')]=!0x0,_0x421bf6[_0x5c34('0x34')]+=0x1),this[_0x5c34('0x8')](_0x421bf6));}}['_detachFromContainer'](_0x535684){if(this[_0x5c34('0x29')]['element'][_0x5c34('0x40')](),_0x535684)for(const _0x7cecb1 of _0x535684)this['_destroySidebarItemView'](_0x7cecb1);this[_0x5c34('0x29')][_0x5c34('0x6')][_0x5c34('0x2b')](),this[_0x5c34('0x29')][_0x5c34('0x2')]='',this[_0x5c34('0x7')]=null;}[_0x5c34('0x32')](_0x45f56f,_0x2c59e7){_0x2c59e7||(_0x2c59e7=_0x45f56f['view']);const _0x6808bc=new _0x4fa075(this['context'][_0x5c34('0x10')]);this[_0x5c34('0x1d')]['set'](_0x6808bc,_0x45f56f),this[_0x5c34('0x23')][_0x5c34('0xd')](_0x45f56f,_0x6808bc),_0x6808bc[_0x5c34('0x18')]['add'](_0x2c59e7),this['listenTo'](_0x45f56f[_0x5c34('0x29')],_0x5c34('0x22'),(_0x2eac6,_0x559715,_0x504ef7)=>{const _0x18ab1=this[_0x5c34('0x21')](_0x45f56f,_0x504ef7);_0x6808bc[_0x5c34('0x38')]!=_0x18ab1&&(_0x6808bc[_0x5c34('0x38')]=_0x18ab1,this[_0x5c34('0x43')](_0x6808bc,_0x18ab1));}),this['listenTo'](_0x6808bc,_0x5c34('0x4'),()=>{this[_0x5c34('0x2e')](_0x6808bc,_0x5c34('0x34'));}),this[_0x5c34('0x1a')](_0x6808bc,_0x5c34('0x3'),()=>{this[_0x5c34('0x2e')](_0x6808bc,_0x5c34('0x27'));}),this['_alignToTargetRect'](_0x6808bc);const _0x5bbc6d=this['_getItemBefore'](_0x6808bc);if(_0x5bbc6d)this['_alignAfterItem'](_0x5bbc6d,_0x6808bc)||this['_alignToTargetRect'](_0x6808bc);else this[_0x5c34('0x8')](_0x6808bc);return this['_updateLastItem'](),this[_0x5c34('0x29')][_0x5c34('0x6')]['add'](_0x6808bc),_0x6808bc;}['_alignForTopChange'](_0x2e1626){if(!_0x2e1626['content']['length'])return;const _0xff19b9=this[_0x5c34('0x12')](_0x2e1626);if(!_0xff19b9)return;const _0x57b9cd=this['_sidebarItemViewToAnnotation'][_0x5c34('0x19')](_0xff19b9),_0x2f57bf=this[_0x5c34('0x14')];_0x2f57bf&&_0x2f57bf===_0x57b9cd?this[_0x5c34('0x44')](_0xff19b9,_0x2e1626):this['_alignBeforeItem'](_0x2e1626,_0xff19b9);}[_0x5c34('0xc')](_0x4a471e){if(!_0x4a471e[_0x5c34('0x18')]['length'])return;const _0x369c8d=this[_0x5c34('0xe')](_0x4a471e);if(!_0x369c8d)return;const _0x21b3a3=this[_0x5c34('0x1d')][_0x5c34('0x19')](_0x369c8d),_0x484fe6=this[_0x5c34('0x41')][_0x5c34('0x26')][_0x5c34('0x19')](_0x5c34('0x0')),_0x1a948c=this[_0x5c34('0x14')];_0x1a948c&&_0x1a948c===_0x21b3a3&&_0x484fe6?(this[_0x5c34('0x15')](_0x369c8d,_0x4a471e),this['_alignAfterItem'](_0x4a471e,_0x369c8d)):_0x1a948c&&_0x1a948c===_0x21b3a3?this[_0x5c34('0x15')](_0x369c8d,_0x4a471e):this[_0x5c34('0x44')](_0x4a471e,_0x369c8d);}[_0x5c34('0x2e')](_0xcf966d,_0xde88f1){0x0===this['_recalculateBuffer'][_0x5c34('0xf')]&&setTimeout(()=>{for(const {sidebarItemView:_0x9061f8,changedProp:_0x1f6d4c}of this[_0x5c34('0x35')])_0x5c34('0x34')===_0x1f6d4c?this[_0x5c34('0x33')](_0x9061f8):this[_0x5c34('0xc')](_0x9061f8);this['_recalculateBuffer']=[];},0xa),this[_0x5c34('0x35')]['push']({'sidebarItemView':_0xcf966d,'changedProp':_0xde88f1});}['getSidebarItemView'](_0x5ed5cf){return this['_annotationToSidebarItemView'][_0x5c34('0x19')](_0x5ed5cf);}[_0x5c34('0x3d')](){this[_0x5c34('0x30')](),this[_0x5c34('0x29')][_0x5c34('0x3d')]();}['_destroySidebarItemView'](_0x26bb88){const _0x155e34=this[_0x5c34('0x31')](_0x26bb88);this['stopListening'](_0x155e34),this[_0x5c34('0x30')](_0x26bb88[_0x5c34('0x29')]),_0x155e34[_0x5c34('0x3d')](),this[_0x5c34('0x23')][_0x5c34('0x17')](_0x26bb88),this[_0x5c34('0x1d')][_0x5c34('0x17')](_0x155e34);}[_0x5c34('0xa')](){const _0x13dc63=new _0x2cbdf4(this[_0x5c34('0x41')][_0x5c34('0x10')]);return _0x13dc63[_0x5c34('0xb')](),this['on'](_0x5c34('0x36'),(_0x58ff4f,_0x168047,_0x55ef8b,_0x34667c)=>{_0x34667c&&_0x13dc63['unbind'](_0x5c34('0x42')),_0x55ef8b?_0x13dc63[_0x5c34('0x1')](_0x5c34('0x42'))['to'](_0x55ef8b,_0x5c34('0x27')):_0x13dc63[_0x5c34('0x42')]=null;}),_0x13dc63;}[_0x5c34('0x2d')](){var _0x324a58;this[_0x5c34('0x7')]=(null===(_0x324a58=this[_0x5c34('0x13')])||void 0x0===_0x324a58?void 0x0:_0x324a58[_0x5c34('0x16')])?this[_0x5c34('0x31')](this[_0x5c34('0x13')][_0x5c34('0x16')]):null;}['_getItemBefore'](_0x99439a){var _0x34b021;const _0x419ca5=this[_0x5c34('0x1d')][_0x5c34('0x19')](_0x99439a),_0x63811f=_0x419ca5&&(null===(_0x34b021=this['_annotations'])||void 0x0===_0x34b021?void 0x0:_0x34b021[_0x5c34('0x19')](this[_0x5c34('0x13')][_0x5c34('0x3f')](_0x419ca5)-0x1));return _0x63811f&&this[_0x5c34('0x31')](_0x63811f)||null;}[_0x5c34('0xe')](_0x3ac7fe){var _0x324e17;const _0x157060=this[_0x5c34('0x1d')][_0x5c34('0x19')](_0x3ac7fe),_0x3aff75=_0x157060&&(null===(_0x324e17=this[_0x5c34('0x13')])||void 0x0===_0x324e17?void 0x0:_0x324e17[_0x5c34('0x19')](this[_0x5c34('0x13')][_0x5c34('0x3f')](_0x157060)+0x1));return _0x3aff75&&this[_0x5c34('0x31')](_0x3aff75)||null;}[_0x5c34('0x15')](_0x2d9c39,_0x1c84d3){_0x2d9c39[_0x5c34('0x3b')]();const _0x2e1ab4=M(_0x1c84d3['bottom']+this[_0x5c34('0x5')],_0x2d9c39[_0x5c34('0x34')]);return!!_0x2e1ab4&&(this['_setItemTop'](_0x1c84d3,_0x1c84d3['top']-_0x2e1ab4),!0x0);}[_0x5c34('0x44')](_0x49a022,_0x3f0bde){_0x49a022[_0x5c34('0x3b')]();const _0x27c3ae=M(_0x49a022['bottom']+this['_spaceBetweenItems'],_0x3f0bde['top']);return!!_0x27c3ae&&(this[_0x5c34('0x43')](_0x3f0bde,_0x3f0bde[_0x5c34('0x34')]+_0x27c3ae,!0x1),!0x0);}['_alignToTargetRect'](_0x2f7750){const _0x325063=this[_0x5c34('0x1d')]['get'](_0x2f7750);if(!_0x325063||!_0x325063[_0x5c34('0x2a')]||!_0x325063['targetRect'])return;const _0x351e54=this[_0x5c34('0x21')](_0x325063,_0x325063[_0x5c34('0x45')]);this[_0x5c34('0x43')](_0x2f7750,_0x351e54);}['_getTargetTop'](_0x39c090,_0x1b1d68){if(null===_0x1b1d68)return 0x0;if(_0x39c090[_0x5c34('0x2a')]instanceof _0x6b676f)return _0x1b1d68[_0x5c34('0x34')];{const _0x209fec=new _0x6b676f(this[_0x5c34('0x29')][_0x5c34('0x39')])[_0x5c34('0x34')];return _0x1b1d68[_0x5c34('0x34')]-_0x209fec;}}['_setItemTop'](_0x373311,_0x1465a0,_0x16bd11=this['context'][_0x5c34('0x26')][_0x5c34('0x19')](_0x5c34('0x0'))){_0x16bd11&&(_0x1465a0=Math[_0x5c34('0x24')](_0x1465a0,this[_0x5c34('0x3c')](_0x373311))),_0x373311[_0x5c34('0x34')]=_0x1465a0;}[_0x5c34('0x3c')](_0x3f696e){let _0x147cdc=this['_getItemBefore'](_0x3f696e),_0x255e4e=0x0;for(;_0x147cdc;)_0x147cdc['updateHeight'](),_0x255e4e+=this['_spaceBetweenItems']+_0x147cdc[_0x5c34('0x20')],_0x147cdc=this[_0x5c34('0x12')](_0x147cdc);return _0x255e4e;}}function M(_0x49b237,_0x4f9b5f){return Math['max'](_0x49b237-_0x4f9b5f,0x0);}function y(_0x3be8fd){return null!==_0x3be8fd&&_0x5c34('0x9')==typeof _0x3be8fd&&0x1===_0x3be8fd[_0x5c34('0x1c')];}
23
+ const _0x579b=['change:targetRect','_alignForTopChange','bottom','target','push','_sidebarItemViewToAnnotation','change:top','view','refresh','minHeight','last','_activeAnnotation','class','listenTo','getIndex','content','destroy','context','_setItemTop','container','_detachFromContainer','sidebar-setcontainer-invalid-element','locale','element','_updateLastItem','add','rearrange','set','stopListening','sidebar.preventScrollOutOfView','delete','setContainer','define','get','_alignAfterItem','_getTargetTop','_attachToContainer','sidebar.container','top','change:_lastItem','updateHeight','_recalculateBuffer','remove','_annotations','config','change:bottom','clear','_alignBeforeItem','targetRect','_annotationToSidebarItemView','_recalculate','_getItemBefore','max','bind','_alignForBottomChange','isAnimationDisabled','object','pluginName','list','_getItemAfter','_getMaxAvailableTop','nodeType','appendChild','_spaceBetweenItems','getSidebarItemView','_lastItem','_destroySidebarItemView','render','length','_createSidebarView','Sidebar','isActive','_alignToTargetRect'];(function(_0x18c2ac,_0x579b06){const _0x1bb21c=function(_0x4972ae){while(--_0x4972ae){_0x18c2ac['push'](_0x18c2ac['shift']());}};_0x1bb21c(++_0x579b06);}(_0x579b,0xcc));const _0x1bb2=function(_0x18c2ac,_0x579b06){_0x18c2ac=_0x18c2ac-0x0;let _0x1bb21c=_0x579b[_0x18c2ac];return _0x1bb21c;};import{ContextPlugin as _0x3ce82f}from'ckeditor5/src/core';import{Rect as _0x3d03cc,CKEditorError as _0x36b5e}from'ckeditor5/src/utils';import _0x16d3f8 from'./view/sidebarview';import _0x124176 from'./view/sidebaritemview';export default class z extends _0x3ce82f{static get[_0x1bb2('0x48')](){return _0x1bb2('0xc');}constructor(_0x385da3){super(_0x385da3),this[_0x1bb2('0x2a')](_0x1bb2('0x7'),void 0x0),this[_0x1bb2('0x16')]=this[_0x1bb2('0xb')](),this['set']('container',null),this[_0x1bb2('0x5')]=0x19,this[_0x1bb2('0x14')]=new Map(),this[_0x1bb2('0x40')]=new Map(),this[_0x1bb2('0x20')]['config'][_0x1bb2('0x2f')](_0x1bb2('0x2c'),!0x1),this[_0x1bb2('0x3a')]=null,this[_0x1bb2('0x1a')]=null,this['_recalculateBuffer']=[];}['init'](){const _0x509c10=this[_0x1bb2('0x20')][_0x1bb2('0x3b')][_0x1bb2('0x30')](_0x1bb2('0x34'));_0x509c10&&this[_0x1bb2('0x2e')](_0x509c10);}[_0x1bb2('0x2e')](_0x418023){if(!y(_0x418023))throw new _0x36b5e(_0x1bb2('0x24'));this[_0x1bb2('0x22')]=_0x418023;}[_0x1bb2('0x33')]({viewClass:_0x1e0b1d='',spaceBetweenItems:_0x377e6e=0x19}={}){if(!y(this[_0x1bb2('0x22')]))throw new _0x36b5e('sidebar-attachtocontainer-missing-container',this);this['container'][_0x1bb2('0x4')](this[_0x1bb2('0x16')][_0x1bb2('0x26')]),this[_0x1bb2('0x16')][_0x1bb2('0x1b')]=_0x1e0b1d,this[_0x1bb2('0x5')]=_0x377e6e;}[_0x1bb2('0x29')]({removedAnnotation:_0x4cbecf,previousAnnotation:_0x551bea,nextAnnotation:_0xe9283c}){const _0x8e50d9=this['getSidebarItemView'](_0x4cbecf);this[_0x1bb2('0x16')][_0x1bb2('0x0')][_0x1bb2('0x39')](_0x8e50d9),this[_0x1bb2('0x8')](_0x4cbecf),_0x551bea&&this[_0x1bb2('0xe')](this[_0x1bb2('0x6')](_0x551bea)),_0xe9283c&&this[_0x1bb2('0xe')](this['getSidebarItemView'](_0xe9283c)),this[_0x1bb2('0x27')]();}[_0x1bb2('0x17')]({blurredAnnotation:_0x1e2a25,activatedAnnotation:_0x5264f6,disableAnimationOnActivatedAnnotation:_0x576573}){if(this[_0x1bb2('0x1a')]=_0x5264f6,_0x1e2a25){_0x1e2a25[_0x1bb2('0xd')]=!0x1;const _0x10fee6=this[_0x1bb2('0x6')](_0x1e2a25);_0x10fee6&&_0x576573&&(_0x10fee6[_0x1bb2('0x46')]=!0x1);}if(_0x5264f6){const _0x9de0a0=this[_0x1bb2('0x6')](_0x5264f6);_0x9de0a0&&(_0x5264f6['isActive']=!0x0,_0x576573&&(_0x9de0a0[_0x1bb2('0x46')]=!0x0,_0x9de0a0[_0x1bb2('0x35')]+=0x1),this[_0x1bb2('0xe')](_0x9de0a0));}}[_0x1bb2('0x23')](_0x5a6d0c){if(this['view'][_0x1bb2('0x26')][_0x1bb2('0x39')](),_0x5a6d0c)for(const _0x2cd77c of _0x5a6d0c)this[_0x1bb2('0x8')](_0x2cd77c);this[_0x1bb2('0x16')][_0x1bb2('0x0')][_0x1bb2('0x3d')](),this[_0x1bb2('0x16')][_0x1bb2('0x1b')]='',this[_0x1bb2('0x7')]=null;}['addAnnotation'](_0x5bf5e0,_0x683a04){_0x683a04||(_0x683a04=_0x5bf5e0[_0x1bb2('0x16')]);const _0x512e19=new _0x124176(this[_0x1bb2('0x20')]['locale']);this[_0x1bb2('0x14')][_0x1bb2('0x2a')](_0x512e19,_0x5bf5e0),this[_0x1bb2('0x40')]['set'](_0x5bf5e0,_0x512e19),_0x512e19[_0x1bb2('0x1e')][_0x1bb2('0x28')](_0x683a04),this[_0x1bb2('0x1c')](_0x5bf5e0[_0x1bb2('0x16')],_0x1bb2('0xf'),(_0x1613ee,_0x44949a,_0x593f85)=>{const _0x53affb=this[_0x1bb2('0x32')](_0x5bf5e0,_0x593f85);_0x512e19['_targetTop']!=_0x53affb&&(_0x512e19['_targetTop']=_0x53affb,this[_0x1bb2('0x21')](_0x512e19,_0x53affb));}),this[_0x1bb2('0x1c')](_0x512e19,_0x1bb2('0x15'),()=>{this[_0x1bb2('0x41')](_0x512e19,_0x1bb2('0x35'));}),this[_0x1bb2('0x1c')](_0x512e19,_0x1bb2('0x3c'),()=>{this[_0x1bb2('0x41')](_0x512e19,_0x1bb2('0x11'));}),this[_0x1bb2('0xe')](_0x512e19);const _0xcbdcc7=this[_0x1bb2('0x42')](_0x512e19);if(_0xcbdcc7)this['_alignAfterItem'](_0xcbdcc7,_0x512e19)||this[_0x1bb2('0xe')](_0x512e19);else this[_0x1bb2('0xe')](_0x512e19);return this[_0x1bb2('0x27')](),this[_0x1bb2('0x16')][_0x1bb2('0x0')][_0x1bb2('0x28')](_0x512e19),_0x512e19;}[_0x1bb2('0x10')](_0x217e16){if(!_0x217e16[_0x1bb2('0x1e')][_0x1bb2('0xa')])return;const _0x36da67=this['_getItemBefore'](_0x217e16);if(!_0x36da67)return;const _0x4a24b0=this['_sidebarItemViewToAnnotation'][_0x1bb2('0x30')](_0x36da67),_0xdb8fff=this[_0x1bb2('0x1a')];_0xdb8fff&&_0xdb8fff===_0x4a24b0?this[_0x1bb2('0x31')](_0x36da67,_0x217e16):this[_0x1bb2('0x3e')](_0x217e16,_0x36da67);}[_0x1bb2('0x45')](_0x4a049d){if(!_0x4a049d[_0x1bb2('0x1e')]['length'])return;const _0x2bc4e6=this[_0x1bb2('0x1')](_0x4a049d);if(!_0x2bc4e6)return;const _0x5e502f=this[_0x1bb2('0x14')][_0x1bb2('0x30')](_0x2bc4e6),_0x5347f6=this[_0x1bb2('0x20')][_0x1bb2('0x3b')][_0x1bb2('0x30')]('sidebar.preventScrollOutOfView'),_0x46661d=this[_0x1bb2('0x1a')];_0x46661d&&_0x46661d===_0x5e502f&&_0x5347f6?(this[_0x1bb2('0x3e')](_0x2bc4e6,_0x4a049d),this[_0x1bb2('0x31')](_0x4a049d,_0x2bc4e6)):_0x46661d&&_0x46661d===_0x5e502f?this['_alignBeforeItem'](_0x2bc4e6,_0x4a049d):this[_0x1bb2('0x31')](_0x4a049d,_0x2bc4e6);}[_0x1bb2('0x41')](_0x2df1b3,_0x2a9fa5){0x0===this[_0x1bb2('0x38')][_0x1bb2('0xa')]&&setTimeout(()=>{for(const {sidebarItemView:_0x1046ba,changedProp:_0x1236f0}of this[_0x1bb2('0x38')])_0x1bb2('0x35')===_0x1236f0?this[_0x1bb2('0x10')](_0x1046ba):this['_alignForBottomChange'](_0x1046ba);this[_0x1bb2('0x38')]=[];},0xa),this[_0x1bb2('0x38')][_0x1bb2('0x13')]({'sidebarItemView':_0x2df1b3,'changedProp':_0x2a9fa5});}['getSidebarItemView'](_0x59a2f5){return this[_0x1bb2('0x40')]['get'](_0x59a2f5);}[_0x1bb2('0x1f')](){this[_0x1bb2('0x2b')](),this['view'][_0x1bb2('0x1f')]();}[_0x1bb2('0x8')](_0x30751f){const _0x149cb5=this[_0x1bb2('0x6')](_0x30751f);this[_0x1bb2('0x2b')](_0x149cb5),this['stopListening'](_0x30751f[_0x1bb2('0x16')]),_0x149cb5['destroy'](),this[_0x1bb2('0x40')]['delete'](_0x30751f),this[_0x1bb2('0x14')][_0x1bb2('0x2d')](_0x149cb5);}[_0x1bb2('0xb')](){const _0x109872=new _0x16d3f8(this['context'][_0x1bb2('0x25')]);return _0x109872[_0x1bb2('0x9')](),this['on'](_0x1bb2('0x36'),(_0x499230,_0x3c319d,_0x2eee4f,_0x51b3d9)=>{_0x51b3d9&&_0x109872['unbind']('minHeight'),_0x2eee4f?_0x109872[_0x1bb2('0x44')](_0x1bb2('0x18'))['to'](_0x2eee4f,_0x1bb2('0x11')):_0x109872[_0x1bb2('0x18')]=null;}),_0x109872;}[_0x1bb2('0x27')](){var _0x332dd4;this['_lastItem']=(null===(_0x332dd4=this[_0x1bb2('0x3a')])||void 0x0===_0x332dd4?void 0x0:_0x332dd4[_0x1bb2('0x19')])?this['getSidebarItemView'](this[_0x1bb2('0x3a')][_0x1bb2('0x19')]):null;}[_0x1bb2('0x42')](_0x24453){var _0x2b7893;const _0x1422b6=this['_sidebarItemViewToAnnotation']['get'](_0x24453),_0x4cba01=_0x1422b6&&(null===(_0x2b7893=this[_0x1bb2('0x3a')])||void 0x0===_0x2b7893?void 0x0:_0x2b7893[_0x1bb2('0x30')](this['_annotations']['getIndex'](_0x1422b6)-0x1));return _0x4cba01&&this[_0x1bb2('0x6')](_0x4cba01)||null;}[_0x1bb2('0x1')](_0x5c7b16){var _0x3db662;const _0x5c24af=this[_0x1bb2('0x14')][_0x1bb2('0x30')](_0x5c7b16),_0x1dec87=_0x5c24af&&(null===(_0x3db662=this['_annotations'])||void 0x0===_0x3db662?void 0x0:_0x3db662['get'](this[_0x1bb2('0x3a')][_0x1bb2('0x1d')](_0x5c24af)+0x1));return _0x1dec87&&this[_0x1bb2('0x6')](_0x1dec87)||null;}[_0x1bb2('0x3e')](_0x1e3ce8,_0x3a17a6){_0x1e3ce8[_0x1bb2('0x37')]();const _0x4971da=H(_0x3a17a6[_0x1bb2('0x11')]+this[_0x1bb2('0x5')],_0x1e3ce8[_0x1bb2('0x35')]);return!!_0x4971da&&(this['_setItemTop'](_0x3a17a6,_0x3a17a6[_0x1bb2('0x35')]-_0x4971da),!0x0);}['_alignAfterItem'](_0x4c5bc7,_0x216f3a){_0x4c5bc7[_0x1bb2('0x37')]();const _0x5f27b9=H(_0x4c5bc7[_0x1bb2('0x11')]+this[_0x1bb2('0x5')],_0x216f3a[_0x1bb2('0x35')]);return!!_0x5f27b9&&(this[_0x1bb2('0x21')](_0x216f3a,_0x216f3a[_0x1bb2('0x35')]+_0x5f27b9,!0x1),!0x0);}[_0x1bb2('0xe')](_0x2cc28f){const _0x2710dc=this[_0x1bb2('0x14')][_0x1bb2('0x30')](_0x2cc28f);if(!_0x2710dc||!_0x2710dc[_0x1bb2('0x12')]||!_0x2710dc['targetRect'])return;const _0x32e881=this[_0x1bb2('0x32')](_0x2710dc,_0x2710dc[_0x1bb2('0x3f')]);this[_0x1bb2('0x21')](_0x2cc28f,_0x32e881);}[_0x1bb2('0x32')](_0x2890a6,_0x2bb563){if(null===_0x2bb563)return 0x0;if(_0x2890a6[_0x1bb2('0x12')]instanceof _0x3d03cc)return _0x2bb563[_0x1bb2('0x35')];{const _0x413f31=new _0x3d03cc(this['view'][_0x1bb2('0x26')])[_0x1bb2('0x35')];return _0x2bb563[_0x1bb2('0x35')]-_0x413f31;}}[_0x1bb2('0x21')](_0x3cafa5,_0x2a47c0,_0x8d81b3=this['context'][_0x1bb2('0x3b')][_0x1bb2('0x30')](_0x1bb2('0x2c'))){_0x8d81b3&&(_0x2a47c0=Math[_0x1bb2('0x43')](_0x2a47c0,this[_0x1bb2('0x2')](_0x3cafa5))),_0x3cafa5[_0x1bb2('0x35')]=_0x2a47c0;}[_0x1bb2('0x2')](_0x326568){let _0x360a2e=this[_0x1bb2('0x42')](_0x326568),_0x838563=0x0;for(;_0x360a2e;)_0x360a2e[_0x1bb2('0x37')](),_0x838563+=this[_0x1bb2('0x5')]+_0x360a2e['height'],_0x360a2e=this[_0x1bb2('0x42')](_0x360a2e);return _0x838563;}}function H(_0x2bb70d,_0x280d0e){return Math[_0x1bb2('0x43')](_0x2bb70d-_0x280d0e,0x0);}function y(_0x1869e0){return null!==_0x1869e0&&_0x1bb2('0x47')==typeof _0x1869e0&&0x1===_0x1869e0[_0x1bb2('0x3')];}
@@ -1,9 +1,13 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module comments/annotations/view/annotationcounterbuttonview
3
7
  * @publicApi
4
8
  */
5
- import { ButtonView, View } from 'ckeditor5/src/ui.js';
6
- import type { Locale } from 'ckeditor5/src/utils.js';
9
+ import { ButtonView, View } from 'ckeditor5/src/ui';
10
+ import type { Locale } from 'ckeditor5/src/utils';
7
11
  /**
8
12
  * A view used in the sidebar by {@link module:comments/annotations/narrowsidebar~NarrowSidebar}.
9
13
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x100c=['bind','children','isDirty','_badge','span','annotationType','counterView','toString','set','ck-annotation-counter__badge','ck-annotation-counter__badge--','...','number','add','ck-annotation-counter','icon'];(function(_0x508987,_0x100cf4){const _0x554a46=function(_0x167d09){while(--_0x167d09){_0x508987['push'](_0x508987['shift']());}};_0x554a46(++_0x100cf4);}(_0x100c,0x1b6));const _0x554a=function(_0x508987,_0x100cf4){_0x508987=_0x508987-0x0;let _0x554a46=_0x100c[_0x508987];return _0x554a46;};import{ButtonView as _0x2ac189,View as _0x50cfb4}from'ckeditor5/src/ui.js';import _0x3b6bac from'../../../theme/icons/add-comment.svg';export default class D extends _0x2ac189{constructor(_0x51956e){super(_0x51956e);const _0x20bc60=this['bindTemplate'];this[_0x554a('0x2')](_0x554a('0xc'),!0x1),this[_0x554a('0x2')](_0x554a('0x6'),0x0),this[_0x554a('0xa')](_0x554a('0xd'))['to'](this,_0x554a('0xc'),this,_0x554a('0x6'),(_0x23d2a2,_0x22d9a4)=>_0x23d2a2?_0x554a('0x5'):_0x22d9a4[_0x554a('0x1')]()),this[_0x554a('0x2')](_0x554a('0xf'),''),this[_0x554a('0x9')]=_0x3b6bac,this['extendTemplate']({'attributes':{'class':[_0x554a('0x8')]}}),this[_0x554a('0x0')]=new _0x50cfb4(),this['counterView']['setTemplate']({'tag':_0x554a('0xe'),'attributes':{'class':[_0x554a('0x3'),_0x20bc60['to'](_0x554a('0xf'),_0x57c89c=>_0x554a('0x4')+_0x57c89c),_0x20bc60['if'](_0x554a('0xc'),'ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x20bc60['to']('_badge')}]}),this[_0x554a('0xb')][_0x554a('0x7')](this['counterView']);}}
23
+ const _0x2adc=['...','toString','span','ck-annotation-counter','setTemplate','number','set','icon','annotationType','extendTemplate','ck-annotation-counter__badge--edit-mode','children','add','ck-annotation-counter__badge','_badge','counterView','isDirty'];(function(_0x598520,_0x2adc33){const _0xf38186=function(_0x5333f3){while(--_0x5333f3){_0x598520['push'](_0x598520['shift']());}};_0xf38186(++_0x2adc33);}(_0x2adc,0x1dc));const _0xf381=function(_0x598520,_0x2adc33){_0x598520=_0x598520-0x0;let _0xf38186=_0x2adc[_0x598520];return _0xf38186;};import{ButtonView as _0x1c75f6,View as _0x11f0b6}from'ckeditor5/src/ui';import _0x46e691 from'../../../theme/icons/add-comment.svg';export default class D extends _0x1c75f6{constructor(_0x4896c5){super(_0x4896c5);const _0x539a66=this['bindTemplate'];this['set'](_0xf381('0x10'),!0x1),this[_0xf381('0x6')](_0xf381('0x5'),0x0),this['bind'](_0xf381('0xe'))['to'](this,_0xf381('0x10'),this,_0xf381('0x5'),(_0xecab9d,_0x1af177)=>_0xecab9d?_0xf381('0x0'):_0x1af177[_0xf381('0x1')]()),this[_0xf381('0x6')](_0xf381('0x8'),''),this[_0xf381('0x7')]=_0x46e691,this[_0xf381('0x9')]({'attributes':{'class':[_0xf381('0x3')]}}),this[_0xf381('0xf')]=new _0x11f0b6(),this[_0xf381('0xf')][_0xf381('0x4')]({'tag':_0xf381('0x2'),'attributes':{'class':[_0xf381('0xd'),_0x539a66['to'](_0xf381('0x8'),_0x551dc4=>'ck-annotation-counter__badge--'+_0x551dc4),_0x539a66['if'](_0xf381('0x10'),_0xf381('0xa'))]},'children':[{'text':_0x539a66['to'](_0xf381('0xe'))}]}),this[_0xf381('0xb')][_0xf381('0xc')](this['counterView']);}}
@@ -1,9 +1,13 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module comments/annotations/view/annotationview
3
7
  * @publicApi
4
8
  */
5
- import { View, type ViewCollection } from 'ckeditor5/src/ui.js';
6
- import { FocusTracker, KeystrokeHandler, type Rect, type Locale } from 'ckeditor5/src/utils.js';
9
+ import { View, type ViewCollection } from 'ckeditor5/src/ui';
10
+ import { FocusTracker, KeystrokeHandler, type Rect, type Locale } from 'ckeditor5/src/utils';
7
11
  import '../../../theme/annotation.css';
8
12
  /**
9
13
  * A wrapping view for any view added to the `Annotations` plugin.