@ckeditor/ckeditor5-comments 47.6.1 → 48.0.0-alpha.0

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 (403) hide show
  1. package/LICENSE.md +1 -1
  2. package/ckeditor5-metadata.json +53 -53
  3. package/{src → dist}/annotations/annotation.d.ts +4 -4
  4. package/{src → dist}/annotations/annotationcollection.d.ts +2 -2
  5. package/{src → dist}/annotations/annotations.d.ts +3 -3
  6. package/{src → dist}/annotations/annotationsuis.d.ts +2 -2
  7. package/{src → dist}/annotations/editorannotations.d.ts +1 -1
  8. package/{src → dist}/annotations/inlineannotations.d.ts +2 -2
  9. package/{src → dist}/annotations/narrowsidebar.d.ts +2 -2
  10. package/{src → dist}/annotations/sidebar.d.ts +2 -2
  11. package/{src → dist}/annotations/view/annotationcounterbuttonview.d.ts +2 -2
  12. package/{src → dist}/annotations/view/annotationview.d.ts +2 -2
  13. package/{src → dist}/annotations/view/sidebaritemview.d.ts +2 -2
  14. package/{src → dist}/annotations/view/sidebarview.d.ts +2 -2
  15. package/{src → dist}/annotations/widesidebar.d.ts +1 -1
  16. package/{src → dist}/comments/addcommentthreadcommand.d.ts +2 -2
  17. package/{src → dist}/comments/commentsarchive.d.ts +2 -2
  18. package/{src → dist}/comments/commentsarchiveui.d.ts +2 -2
  19. package/{src → dist}/comments/commentsediting.d.ts +3 -3
  20. package/{src → dist}/comments/commentsrepository.d.ts +7 -7
  21. package/{src → dist}/comments/commentsui.d.ts +1 -1
  22. package/{src → dist}/comments/integrations/clipboard.d.ts +2 -2
  23. package/{src → dist}/comments/integrations/commentsrestrictededitingmode.d.ts +1 -1
  24. package/{src → dist}/comments/integrations/importword.d.ts +1 -1
  25. package/{src → dist}/comments/integrations/showcommenthighlights.d.ts +1 -1
  26. package/{src → dist}/comments/ui/commenteditor/commenteditor.d.ts +3 -3
  27. package/{src → dist}/comments/ui/commenteditor/commenteditorui.d.ts +2 -2
  28. package/{src → dist}/comments/ui/commenteditor/commenteditoruiview.d.ts +3 -3
  29. package/{src → dist}/comments/ui/commentthreadcontroller.d.ts +2 -2
  30. package/{src → dist}/comments/ui/view/basecommentthreadview.d.ts +3 -3
  31. package/{src → dist}/comments/ui/view/basecommentview.d.ts +3 -3
  32. package/{src → dist}/comments/ui/view/collapsedcommentsview.d.ts +2 -2
  33. package/{src → dist}/comments/ui/view/commentcontentview.d.ts +2 -2
  34. package/{src → dist}/comments/ui/view/commentinputview.d.ts +3 -3
  35. package/{src → dist}/comments/ui/view/commentsarchiveview.d.ts +2 -2
  36. package/{src → dist}/comments/ui/view/commentslistview.d.ts +2 -2
  37. package/{src → dist}/comments/ui/view/commentthreadheadercontextview.d.ts +2 -2
  38. package/{src → dist}/comments/ui/view/commentthreadheaderview.d.ts +2 -2
  39. package/{src → dist}/comments/ui/view/commentthreadinputview.d.ts +4 -4
  40. package/{src → dist}/comments/ui/view/commentthreadview.d.ts +4 -4
  41. package/{src → dist}/comments/ui/view/commentview.d.ts +5 -5
  42. package/{src → dist}/comments.d.ts +1 -1
  43. package/{src → dist}/commentsonly.d.ts +1 -1
  44. package/{src → dist}/config.d.ts +1 -1
  45. package/dist/index-content.css +15 -15
  46. package/dist/index-editor.css +468 -496
  47. package/dist/index.css +472 -736
  48. package/dist/index.js +11 -11
  49. package/dist/translations/af.js +1 -1
  50. package/dist/translations/af.umd.js +1 -1
  51. package/dist/translations/ar.js +1 -1
  52. package/dist/translations/ar.umd.js +1 -1
  53. package/dist/translations/ast.js +1 -1
  54. package/dist/translations/ast.umd.js +1 -1
  55. package/dist/translations/az.js +1 -1
  56. package/dist/translations/az.umd.js +1 -1
  57. package/dist/translations/be.js +1 -1
  58. package/dist/translations/be.umd.js +1 -1
  59. package/dist/translations/bg.js +1 -1
  60. package/dist/translations/bg.umd.js +1 -1
  61. package/dist/translations/bn.js +1 -1
  62. package/dist/translations/bn.umd.js +1 -1
  63. package/dist/translations/bs.js +1 -1
  64. package/dist/translations/bs.umd.js +1 -1
  65. package/dist/translations/ca.js +1 -1
  66. package/dist/translations/ca.umd.js +1 -1
  67. package/dist/translations/cs.js +1 -1
  68. package/dist/translations/cs.umd.js +1 -1
  69. package/dist/translations/da.js +1 -1
  70. package/dist/translations/da.umd.js +1 -1
  71. package/dist/translations/de-ch.js +1 -1
  72. package/dist/translations/de-ch.umd.js +1 -1
  73. package/dist/translations/de.js +1 -1
  74. package/dist/translations/de.umd.js +1 -1
  75. package/dist/translations/el.js +1 -1
  76. package/dist/translations/el.umd.js +1 -1
  77. package/dist/translations/en-au.js +1 -1
  78. package/dist/translations/en-au.umd.js +1 -1
  79. package/dist/translations/en-gb.js +1 -1
  80. package/dist/translations/en-gb.umd.js +1 -1
  81. package/dist/translations/en.js +1 -1
  82. package/dist/translations/en.umd.js +1 -1
  83. package/dist/translations/eo.js +1 -1
  84. package/dist/translations/eo.umd.js +1 -1
  85. package/dist/translations/es-co.js +1 -1
  86. package/dist/translations/es-co.umd.js +1 -1
  87. package/dist/translations/es.js +1 -1
  88. package/dist/translations/es.umd.js +1 -1
  89. package/dist/translations/et.js +1 -1
  90. package/dist/translations/et.umd.js +1 -1
  91. package/dist/translations/eu.js +1 -1
  92. package/dist/translations/eu.umd.js +1 -1
  93. package/dist/translations/fa.js +1 -1
  94. package/dist/translations/fa.umd.js +1 -1
  95. package/dist/translations/fi.js +1 -1
  96. package/dist/translations/fi.umd.js +1 -1
  97. package/dist/translations/fr.js +1 -1
  98. package/dist/translations/fr.umd.js +1 -1
  99. package/dist/translations/gl.js +1 -1
  100. package/dist/translations/gl.umd.js +1 -1
  101. package/dist/translations/gu.js +1 -1
  102. package/dist/translations/gu.umd.js +1 -1
  103. package/dist/translations/he.js +1 -1
  104. package/dist/translations/he.umd.js +1 -1
  105. package/dist/translations/hi.js +1 -1
  106. package/dist/translations/hi.umd.js +1 -1
  107. package/dist/translations/hr.js +1 -1
  108. package/dist/translations/hr.umd.js +1 -1
  109. package/dist/translations/hu.js +1 -1
  110. package/dist/translations/hu.umd.js +1 -1
  111. package/dist/translations/hy.js +1 -1
  112. package/dist/translations/hy.umd.js +1 -1
  113. package/dist/translations/id.js +1 -1
  114. package/dist/translations/id.umd.js +1 -1
  115. package/dist/translations/it.js +1 -1
  116. package/dist/translations/it.umd.js +1 -1
  117. package/dist/translations/ja.js +1 -1
  118. package/dist/translations/ja.umd.js +1 -1
  119. package/dist/translations/jv.js +1 -1
  120. package/dist/translations/jv.umd.js +1 -1
  121. package/dist/translations/kk.js +1 -1
  122. package/dist/translations/kk.umd.js +1 -1
  123. package/dist/translations/km.js +1 -1
  124. package/dist/translations/km.umd.js +1 -1
  125. package/dist/translations/kn.js +1 -1
  126. package/dist/translations/kn.umd.js +1 -1
  127. package/dist/translations/ko.js +1 -1
  128. package/dist/translations/ko.umd.js +1 -1
  129. package/dist/translations/ku.js +1 -1
  130. package/dist/translations/ku.umd.js +1 -1
  131. package/dist/translations/lt.js +1 -1
  132. package/dist/translations/lt.umd.js +1 -1
  133. package/dist/translations/lv.js +1 -1
  134. package/dist/translations/lv.umd.js +1 -1
  135. package/dist/translations/ms.js +1 -1
  136. package/dist/translations/ms.umd.js +1 -1
  137. package/dist/translations/nb.js +1 -1
  138. package/dist/translations/nb.umd.js +1 -1
  139. package/dist/translations/ne.js +1 -1
  140. package/dist/translations/ne.umd.js +1 -1
  141. package/dist/translations/nl.js +1 -1
  142. package/dist/translations/nl.umd.js +1 -1
  143. package/dist/translations/no.js +1 -1
  144. package/dist/translations/no.umd.js +1 -1
  145. package/dist/translations/oc.js +1 -1
  146. package/dist/translations/oc.umd.js +1 -1
  147. package/dist/translations/pl.js +1 -1
  148. package/dist/translations/pl.umd.js +1 -1
  149. package/dist/translations/pt-br.js +1 -1
  150. package/dist/translations/pt-br.umd.js +1 -1
  151. package/dist/translations/pt.js +1 -1
  152. package/dist/translations/pt.umd.js +1 -1
  153. package/dist/translations/ro.js +1 -1
  154. package/dist/translations/ro.umd.js +1 -1
  155. package/dist/translations/ru.js +1 -1
  156. package/dist/translations/ru.umd.js +1 -1
  157. package/dist/translations/si.js +1 -1
  158. package/dist/translations/si.umd.js +1 -1
  159. package/dist/translations/sk.js +1 -1
  160. package/dist/translations/sk.umd.js +1 -1
  161. package/dist/translations/sl.js +1 -1
  162. package/dist/translations/sl.umd.js +1 -1
  163. package/dist/translations/sq.js +1 -1
  164. package/dist/translations/sq.umd.js +1 -1
  165. package/dist/translations/sr-latn.js +1 -1
  166. package/dist/translations/sr-latn.umd.js +1 -1
  167. package/dist/translations/sr.js +1 -1
  168. package/dist/translations/sr.umd.js +1 -1
  169. package/dist/translations/sv.js +1 -1
  170. package/dist/translations/sv.umd.js +1 -1
  171. package/dist/translations/th.js +1 -1
  172. package/dist/translations/th.umd.js +1 -1
  173. package/dist/translations/ti.js +1 -1
  174. package/dist/translations/ti.umd.js +1 -1
  175. package/dist/translations/tk.js +1 -1
  176. package/dist/translations/tk.umd.js +1 -1
  177. package/dist/translations/tr.js +1 -1
  178. package/dist/translations/tr.umd.js +1 -1
  179. package/dist/translations/tt.js +1 -1
  180. package/dist/translations/tt.umd.js +1 -1
  181. package/dist/translations/ug.js +1 -1
  182. package/dist/translations/ug.umd.js +1 -1
  183. package/dist/translations/uk.js +1 -1
  184. package/dist/translations/uk.umd.js +1 -1
  185. package/dist/translations/ur.js +1 -1
  186. package/dist/translations/ur.umd.js +1 -1
  187. package/dist/translations/uz.js +1 -1
  188. package/dist/translations/uz.umd.js +1 -1
  189. package/dist/translations/vi.js +1 -1
  190. package/dist/translations/vi.umd.js +1 -1
  191. package/dist/translations/zh-cn.js +1 -1
  192. package/dist/translations/zh-cn.umd.js +1 -1
  193. package/dist/translations/zh.js +1 -1
  194. package/dist/translations/zh.umd.js +1 -1
  195. package/{src → dist}/utils/common-translations.d.ts +1 -1
  196. package/package.json +27 -52
  197. package/build/comments.js +0 -5
  198. package/build/translations/af.js +0 -1
  199. package/build/translations/ar.js +0 -1
  200. package/build/translations/ast.js +0 -1
  201. package/build/translations/az.js +0 -1
  202. package/build/translations/be.js +0 -1
  203. package/build/translations/bg.js +0 -1
  204. package/build/translations/bn.js +0 -1
  205. package/build/translations/bs.js +0 -1
  206. package/build/translations/ca.js +0 -1
  207. package/build/translations/cs.js +0 -1
  208. package/build/translations/da.js +0 -1
  209. package/build/translations/de-ch.js +0 -1
  210. package/build/translations/de.js +0 -1
  211. package/build/translations/el.js +0 -1
  212. package/build/translations/en-au.js +0 -1
  213. package/build/translations/en-gb.js +0 -1
  214. package/build/translations/eo.js +0 -1
  215. package/build/translations/es-co.js +0 -1
  216. package/build/translations/es.js +0 -1
  217. package/build/translations/et.js +0 -1
  218. package/build/translations/eu.js +0 -1
  219. package/build/translations/fa.js +0 -1
  220. package/build/translations/fi.js +0 -1
  221. package/build/translations/fr.js +0 -1
  222. package/build/translations/gl.js +0 -1
  223. package/build/translations/gu.js +0 -1
  224. package/build/translations/he.js +0 -1
  225. package/build/translations/hi.js +0 -1
  226. package/build/translations/hr.js +0 -1
  227. package/build/translations/hu.js +0 -1
  228. package/build/translations/hy.js +0 -1
  229. package/build/translations/id.js +0 -1
  230. package/build/translations/it.js +0 -1
  231. package/build/translations/ja.js +0 -1
  232. package/build/translations/jv.js +0 -1
  233. package/build/translations/kk.js +0 -1
  234. package/build/translations/km.js +0 -1
  235. package/build/translations/kn.js +0 -1
  236. package/build/translations/ko.js +0 -1
  237. package/build/translations/ku.js +0 -1
  238. package/build/translations/lt.js +0 -1
  239. package/build/translations/lv.js +0 -1
  240. package/build/translations/ms.js +0 -1
  241. package/build/translations/nb.js +0 -1
  242. package/build/translations/ne.js +0 -1
  243. package/build/translations/nl.js +0 -1
  244. package/build/translations/no.js +0 -1
  245. package/build/translations/oc.js +0 -1
  246. package/build/translations/pl.js +0 -1
  247. package/build/translations/pt-br.js +0 -1
  248. package/build/translations/pt.js +0 -1
  249. package/build/translations/ro.js +0 -1
  250. package/build/translations/ru.js +0 -1
  251. package/build/translations/si.js +0 -1
  252. package/build/translations/sk.js +0 -1
  253. package/build/translations/sl.js +0 -1
  254. package/build/translations/sq.js +0 -1
  255. package/build/translations/sr-latn.js +0 -1
  256. package/build/translations/sr.js +0 -1
  257. package/build/translations/sv.js +0 -1
  258. package/build/translations/th.js +0 -1
  259. package/build/translations/ti.js +0 -1
  260. package/build/translations/tk.js +0 -1
  261. package/build/translations/tr.js +0 -1
  262. package/build/translations/tt.js +0 -1
  263. package/build/translations/ug.js +0 -1
  264. package/build/translations/uk.js +0 -1
  265. package/build/translations/ur.js +0 -1
  266. package/build/translations/uz.js +0 -1
  267. package/build/translations/vi.js +0 -1
  268. package/build/translations/zh-cn.js +0 -1
  269. package/build/translations/zh.js +0 -1
  270. package/lang/contexts.json +0 -42
  271. package/lang/translations/af.po +0 -176
  272. package/lang/translations/ar.po +0 -184
  273. package/lang/translations/ast.po +0 -176
  274. package/lang/translations/az.po +0 -176
  275. package/lang/translations/be.po +0 -178
  276. package/lang/translations/bg.po +0 -176
  277. package/lang/translations/bn.po +0 -176
  278. package/lang/translations/bs.po +0 -178
  279. package/lang/translations/ca.po +0 -176
  280. package/lang/translations/cs.po +0 -178
  281. package/lang/translations/da.po +0 -176
  282. package/lang/translations/de-ch.po +0 -176
  283. package/lang/translations/de.po +0 -176
  284. package/lang/translations/el.po +0 -176
  285. package/lang/translations/en-au.po +0 -176
  286. package/lang/translations/en-gb.po +0 -176
  287. package/lang/translations/en.po +0 -176
  288. package/lang/translations/eo.po +0 -176
  289. package/lang/translations/es-co.po +0 -176
  290. package/lang/translations/es.po +0 -176
  291. package/lang/translations/et.po +0 -176
  292. package/lang/translations/eu.po +0 -176
  293. package/lang/translations/fa.po +0 -174
  294. package/lang/translations/fi.po +0 -176
  295. package/lang/translations/fr.po +0 -176
  296. package/lang/translations/gl.po +0 -176
  297. package/lang/translations/gu.po +0 -176
  298. package/lang/translations/he.po +0 -176
  299. package/lang/translations/hi.po +0 -176
  300. package/lang/translations/hr.po +0 -178
  301. package/lang/translations/hu.po +0 -176
  302. package/lang/translations/hy.po +0 -176
  303. package/lang/translations/id.po +0 -174
  304. package/lang/translations/it.po +0 -176
  305. package/lang/translations/ja.po +0 -174
  306. package/lang/translations/jv.po +0 -176
  307. package/lang/translations/kk.po +0 -176
  308. package/lang/translations/km.po +0 -174
  309. package/lang/translations/kn.po +0 -176
  310. package/lang/translations/ko.po +0 -174
  311. package/lang/translations/ku.po +0 -176
  312. package/lang/translations/lt.po +0 -178
  313. package/lang/translations/lv.po +0 -178
  314. package/lang/translations/ms.po +0 -174
  315. package/lang/translations/nb.po +0 -176
  316. package/lang/translations/ne.po +0 -176
  317. package/lang/translations/nl.po +0 -176
  318. package/lang/translations/no.po +0 -176
  319. package/lang/translations/oc.po +0 -176
  320. package/lang/translations/pl.po +0 -178
  321. package/lang/translations/pt-br.po +0 -176
  322. package/lang/translations/pt.po +0 -176
  323. package/lang/translations/ro.po +0 -178
  324. package/lang/translations/ru.po +0 -178
  325. package/lang/translations/si.po +0 -176
  326. package/lang/translations/sk.po +0 -178
  327. package/lang/translations/sl.po +0 -180
  328. package/lang/translations/sq.po +0 -176
  329. package/lang/translations/sr-latn.po +0 -178
  330. package/lang/translations/sr.po +0 -178
  331. package/lang/translations/sv.po +0 -176
  332. package/lang/translations/th.po +0 -174
  333. package/lang/translations/ti.po +0 -176
  334. package/lang/translations/tk.po +0 -176
  335. package/lang/translations/tr.po +0 -176
  336. package/lang/translations/tt.po +0 -174
  337. package/lang/translations/ug.po +0 -174
  338. package/lang/translations/uk.po +0 -178
  339. package/lang/translations/ur.po +0 -176
  340. package/lang/translations/uz.po +0 -176
  341. package/lang/translations/vi.po +0 -174
  342. package/lang/translations/zh-cn.po +0 -174
  343. package/lang/translations/zh.po +0 -174
  344. package/src/annotations/annotation.js +0 -24
  345. package/src/annotations/annotationcollection.js +0 -23
  346. package/src/annotations/annotations.js +0 -23
  347. package/src/annotations/annotationsuis.js +0 -23
  348. package/src/annotations/editorannotations.js +0 -23
  349. package/src/annotations/inlineannotations.js +0 -23
  350. package/src/annotations/narrowsidebar.js +0 -23
  351. package/src/annotations/sidebar.js +0 -23
  352. package/src/annotations/view/annotationcounterbuttonview.js +0 -23
  353. package/src/annotations/view/annotationview.js +0 -23
  354. package/src/annotations/view/sidebaritemview.js +0 -24
  355. package/src/annotations/view/sidebarview.js +0 -24
  356. package/src/annotations/widesidebar.js +0 -23
  357. package/src/augmentation.js +0 -23
  358. package/src/comments/addcommentthreadcommand.js +0 -23
  359. package/src/comments/commentsarchive.js +0 -23
  360. package/src/comments/commentsarchiveui.js +0 -23
  361. package/src/comments/commentsediting.js +0 -23
  362. package/src/comments/commentsrepository.js +0 -25
  363. package/src/comments/commentsui.js +0 -23
  364. package/src/comments/integrations/clipboard.js +0 -23
  365. package/src/comments/integrations/commentsrestrictededitingmode.js +0 -23
  366. package/src/comments/integrations/importword.js +0 -23
  367. package/src/comments/integrations/showcommenthighlights.js +0 -23
  368. package/src/comments/ui/commenteditor/commenteditor.js +0 -24
  369. package/src/comments/ui/commenteditor/commenteditorui.js +0 -23
  370. package/src/comments/ui/commenteditor/commenteditoruiview.js +0 -23
  371. package/src/comments/ui/commentthreadcontroller.js +0 -24
  372. package/src/comments/ui/view/basecommentthreadview.js +0 -23
  373. package/src/comments/ui/view/basecommentview.js +0 -23
  374. package/src/comments/ui/view/collapsedcommentsview.js +0 -23
  375. package/src/comments/ui/view/commentcontentview.js +0 -23
  376. package/src/comments/ui/view/commentinputview.js +0 -23
  377. package/src/comments/ui/view/commentsarchiveview.js +0 -23
  378. package/src/comments/ui/view/commentslistview.js +0 -23
  379. package/src/comments/ui/view/commentthreadheadercontextview.js +0 -23
  380. package/src/comments/ui/view/commentthreadheaderview.js +0 -23
  381. package/src/comments/ui/view/commentthreadinputview.js +0 -23
  382. package/src/comments/ui/view/commentthreadview.js +0 -24
  383. package/src/comments/ui/view/commentview.js +0 -24
  384. package/src/comments.js +0 -23
  385. package/src/commentsonly.js +0 -23
  386. package/src/config.js +0 -23
  387. package/src/index.js +0 -23
  388. package/src/utils/common-translations.js +0 -23
  389. package/src/utils/createmutationobserver.js +0 -23
  390. package/src/utils/splitmarkername.js +0 -23
  391. package/theme/annotation-inline.css +0 -50
  392. package/theme/annotation.css +0 -151
  393. package/theme/comment.css +0 -182
  394. package/theme/commentinput.css +0 -103
  395. package/theme/commentmarker.css +0 -45
  396. package/theme/commentsarchive.css +0 -49
  397. package/theme/commentthread.css +0 -256
  398. package/theme/sidebar-narrow.css +0 -91
  399. package/theme/sidebar.css +0 -72
  400. /package/{src → dist}/augmentation.d.ts +0 -0
  401. /package/{src → dist}/index.d.ts +0 -0
  402. /package/{src → dist}/utils/createmutationobserver.d.ts +0 -0
  403. /package/{src → dist}/utils/splitmarkername.d.ts +0 -0
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x46ffda,ContextPlugin as _0x593a50,PendingActions as lt,Command as _0x4a97fb,Plugin as _0x37aa4b,Context as _0x1df1f0}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x4e6f5b,uid as _0x477669,KeystrokeHandler as jt,FocusTracker as _0x37af46,diff as _0x58ed47,Collection as _0x3d0741,Rect as _0x2dcba1,CKEditorError as _0x14fd42,first as _0x337871,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x1bbf07,keyCodes as _0x23ec74}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3848c4,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x9a6bed,trimHtml as ts,LateFocusDropdownButtonView as _0x304a89,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x32ac22}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x533250}from'es-toolkit/compat';import{IconUndo as _0x10fb73,IconCheck as _0x3695aa,IconPencil as _0x4a06d8,IconRemoveComment as _0x2fb6a9,IconThreeVerticalDots as _0x1dbf8b,IconAddComment as _0xb70e92,IconCommentsArchive as _0x52ca58}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x599a03,ButtonView as _0x1c15c2,ViewCollection as _0x4fc9fb,createDropdown as _0x1780b4,ListView as _0x5f4a95,focusChildOnDropdownOpen as _0x5a966,ListItemView as _0x589c3e,MenuBarMenuListItemButtonView as _0x34ca18,BodyCollection as _0x287999,BalloonPanelView as _0xa8377a,ContextualBalloon as _0x47c029,Dialog as _0x1d5abd,DialogViewPosition as _0x17a0a9}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x753941}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x5154ad}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x241183}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
- _0x4e6f5b(){['model'];['view'];constructor(_0x29af07,_0xc7ff98){super(),this['model']=_0x29af07,this['model']['_isAttached']=!0x0,this['view']=_0xc7ff98,this['listenTo'](_0xc7ff98,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0xc7ff98,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0xc7ff98,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0xc7ff98,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0xc7ff98,'addComment',(_0x43ffd7,_0x510102)=>this['addComment'](_0x510102)),this['listenTo'](_0xc7ff98,'updateComment',(_0x18fe55,_0x29e733,_0x590782)=>this['updateComment'](_0x29e733,_0x590782)),this['listenTo'](_0xc7ff98,'removeComment',(_0xaff06e,_0x5bb784)=>this['removeComment'](_0x5bb784));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x20a4b0){this['model']['addComment']({'content':_0x20a4b0,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x1db8d4,_0x4baba5){this['model']['getComment'](_0x1db8d4)['update']({'content':_0x4baba5});}['removeComment'](_0x3602b5){this['model']['getComment'](_0x3602b5)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x35adc7,_0x3fda60,_0x4cb281){const t=_0x35adc7['t'];switch(_0x3fda60){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Reply\x20to\x20reopen\x20discussion...':return t('Reply\x20to\x20reopen\x20discussion...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20was\x20made\x20on\x20an\x20element':return t('Comment\x20was\x20made\x20on\x20an\x20element');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Marked\x20as\x20resolved':return t('Marked\x20as\x20resolved');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Resolve':return t('Resolve');case'Reopen':return t('Reopen');case'Remove':return t('Remove');case'Reply':return t('Reply');case'Save':return t('Save');case'Annotations\x20sidebar':return t('Annotations\x20sidebar');case'Annotations\x20list':return t('Annotations\x20list');case'Thread\x20comments':return t('Thread\x20comments');case'THREAD_CONTEXT_LABEL':return t({'string':'Thread\x20context:\x20%0','id':'THREAD_CONTEXT_LABEL'},_0x4cb281);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x4cb281);case'COMMENT_THREAD_DESCRIPTION':return t({'string':'Press\x20Enter\x20for\x20more\x20options.\x20Press\x20Escape\x20to\x20exit.','id':'COMMENT_THREAD_DESCRIPTION'});case'COMMENT_ARIA_LABEL':return t({'string':'Comment\x20by\x20%0.\x20Created\x20on\x20%1.\x20%2.\x20%3','id':'COMMENT_ARIA_LABEL'},_0x4cb281);case'LEAVE_COMMENT_ANNOUNCEMENT':return t({'string':'Leaving\x20a\x20content\x20with\x20comments.','id':'LEAVE_COMMENT_ANNOUNCEMENT'});case'ENTER_COMMENT_ANNOUNCEMENT':return t({'string':'Entering\x20a\x20content\x20with\x20comments.\x20Press\x20%0\x20to\x20go\x20to\x20the\x20discussion.','id':'ENTER_COMMENT_ANNOUNCEMENT'},_0x4cb281);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x4cb281);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0x4cb281);case'EXTERNAL_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20external\x20source.','id':'EXTERNAL_COMMENT'});case'EXTERNAL_IMPORT_WORD_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20imported\x20Word\x20file.','id':'EXTERNAL_IMPORT_WORD_COMMENT'});case'EXTERNAL_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20external\x20source\x20(added\x20by\x20%0)','id':'EXTERNAL_AVATAR'},_0x4cb281);case'EXTERNAL_IMPORT_WORD_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20a\x20Word\x20document\x20imported\x20by\x20%0','id':'EXTERNAL_IMPORT_WORD_AVATAR'},_0x4cb281);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x4e03be,_0x55846e){super(_0x4e03be);const _0xe56dfe=_0x477669();this['main']=this['createCollection'](),this['editable']=new Vt(_0x4e03be,_0x55846e,void 0x0,{'label':()=>N(_0x4e03be,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x4e03be['uiLanguageDirection'],'lang':_0x4e03be['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xe56dfe},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x3d3104){super(_0x3d3104),this['view']=new Rt(_0x3d3104['locale'],_0x3d3104['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2a5e32=this['editor']['editing']['view'],_0x38b793=this['view']['editable'],_0x1327bd=_0x2a5e32['document']['getRoot']();_0x38b793['name']=_0x1327bd['rootName'],this['view']['render']();const _0x16f174=_0x38b793['element'];this['setEditableElement'](_0x38b793['name'],_0x16f174),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2a5e32['attachDomRoot'](_0x16f174),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
- _0x4e6f5b(_0x46ffda){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x199e79={}){function _0x12295b(_0x5ee57d){return _0x5ee57d['map'](_0x54cb61=>String['fromCharCode'](_0x54cb61))['join']('');}(_0x199e79=Object['assign']({},_0x199e79))['plugins']||(_0x199e79['plugins']=hs['defaultPlugins']),super(_0x199e79),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x12295b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12295b([0x76,0x69,0x65,0x77])][_0x12295b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x12295b([0x61,0x75,0x74,0x6f]),this[_0x12295b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x12295b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x12295b([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x12295b([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x12295b([0x6f,0x6b])});}['create'](){const _0x4bdf45=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4bdf45))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3e254c=>{const _0x51d7d1=this['model']['document']['getRoot'](),_0x204924=_0x51d7d1&&_0x51d7d1['getChild'](_0x51d7d1['childCount']-0x1);_0x3e254c['setSelection'](_0x204924,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1f91bb=this['editing']['view'],_0x5d4422=_0x1f91bb['document']['getRoot'](),_0x1ba586=_0x5d4422['getChild'](0x0);_0x5d4422['childCount']>0x1||!_0x1ba586||'p'!=_0x1ba586['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x1f91bb,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1ba586['placeholder']=this['placeholder']),Ft({'view':_0x1f91bb,'element':_0x1ba586,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1ba586);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x23ddad,_0x22caa6={}){super(_0x23ddad),this['editor']=null,this['_editorConfig']=_0x22caa6,this['set']('value',_0x22caa6['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x23ddad,'Reply...')),this['set']('submitLabel',N(_0x23ddad,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x37af46(),this['focusCycler']=new _0x599a03({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x189b42,_0x4a2489)=>{this['cancelButtonView']['fire']('execute'),_0x4a2489();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3da45b,_0x213218)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x213218());}),this['on']('submit',(_0x35375c,_0x146a85)=>{_0x146a85['length']>0xfde8?(alert(N(_0x23ddad,'TOO_LONG_COMMENT_ALERT',[_0x146a85['length'],0xfde8])),_0x35375c['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x429d59=this['editor'];this['element']['insertBefore'](_0x429d59['ui']['element'],this['element']['firstChild']),_0x429d59['model']['document']['on']('change',()=>this['value']=_0x429d59['getData']()),_0x429d59['bind']('placeholder')['to'](this),this['focusables']['add'](_0x429d59['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x131db2){-0x1===_0x131db2?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x6936f7}=this,_0x1f99ff=new _0x1c15c2(_0x6936f7);return _0x1f99ff['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1f99ff['withText']=!0x0,_0x1f99ff['bind']('label')['to'](this,'submitLabel'),_0x1f99ff['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1f99ff['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1c2cd6,_0x2196fd)=>!_0x2196fd&&!!_0x1c2cd6['trim']()),_0x1f99ff;}['_createCancelButton'](){const {locale:_0x2f6d73}=this,_0x4c1131=new _0x1c15c2(_0x2f6d73);return _0x4c1131['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4c1131['label']=N(_0x2f6d73,'Cancel'),_0x4c1131['withText']=!0x0,_0x4c1131['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4c1131;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x14a6c8=>{this['focusTracker']['add'](_0x14a6c8['element']);}),this['focusables']['on']('change',(_0x49e89d,_0x43a7bd)=>{for(const _0x590526 of Array['from'](_0x43a7bd['added'])['reverse']())this['focusTracker']['add'](_0x590526['element']);});}}class ie extends kt{constructor(_0x3a43a7,_0x85e269,_0x3b61f8){super(_0x3a43a7),this['commentInputView']=new es(_0x3a43a7,_0x3b61f8),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1f3613,_0x4560be)=>_0x1f3613||!!_0x4560be),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x3848c4(_0x3a43a7,_0x85e269),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x543995){this['commentInputView']['focus'](_0x543995);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xa28e70,_0x4b43e4)=>{const {submitButtonView:_0x58cfa8,cancelButtonView:_0x3d8a86,editor:_0x45f86b}=this['commentInputView'];[_0x58cfa8['element'],_0x3d8a86['element'],_0x45f86b?_0x45f86b['editing']['view']['getDomRoot']():null]['filter'](_0x24255f=>_0x24255f)['some'](_0x5c0534=>_0x5c0534['contains'](_0x4b43e4['target']))||(this['focus'](),_0x4b43e4['preventDefault']());});}}class rs extends kt{constructor(_0x35c418){super(_0x35c418);const _0x2992d4=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2992d4['to']('count',_0x1289ea=>N(_0x35c418,'NUMBER_OF_COMMENTS',_0x1289ea))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x145dbc,_0x53c1f1,_0xb7dc05){super(_0x145dbc);const _0x4036d0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x53c1f1['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x53c1f1,this['_config']=_0xb7dc05,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x37af46(),this['keystrokes']=new jt(),this['focusCycler']=new _0x599a03({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x46b3b0=>this['commentViews']['map'](_0x38094e=>_0x38094e['element'])['includes'](_0x46b3b0['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x145dbc),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x341833=>_0x341833-this['_config']['maxCommentsWhenCollapsed']);for(const _0x27eff0 of _0x53c1f1['comments'])this['_handleNewCommentModel'](_0x27eff0);this['_handleInfoComment'](),this['listenTo'](_0x53c1f1['comments'],'add',(_0x527d9e,_0x201ad1)=>{const _0xc411e9=this['_calculatePosition'](_0x201ad1);this['length']++,this['_handleNewCommentModel'](_0x201ad1,_0xc411e9),this['refreshVisibleViews']();}),this['listenTo'](_0x53c1f1['comments'],'remove',(_0x41a1cc,_0x36b93b)=>{this['length']--,this['_handleRemoveCommentModel'](_0x36b93b),this['refreshVisibleViews']();}),this['listenTo'](_0x53c1f1,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x53c1f1,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x4036d0['if']('length','ck-hidden',_0x55e6d1=>!_0x55e6d1)],'aria-label':N(_0x145dbc,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x1effbd){-0x1===_0x1effbd?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x289583 of this['commentViews'])_0x289583['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x21ad1f,_0x5a1664){const _0x357774=new this['_config']['CommentView'](this['locale'],_0x21ad1f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x357774['viewUid']=_0x21ad1f['id'],_0x357774['delegate']('removeComment')['to'](this),_0x357774['delegate']('updateComment')['to'](this),_0x357774['delegate']('resolveCommentThread')['to'](this),_0x357774['delegate']('editorReady')['to'](this),_0x357774['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x357774,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x357774,_0x5a1664);}['_calculatePosition'](_0x1e58a3){const _0xba9f44=this['_model']['_findOptimalIndex'](_0x1e58a3);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1e58a3['authoredAt']?_0xba9f44-0x1:_0xba9f44:_0xba9f44-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x1614f4={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x1614f4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x1614f4));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x20aec0){const _0x5a819d=this['commentViews']['remove'](_0x20aec0['id']);this['stopListening'](_0x5a819d),_0x5a819d['isEditMode']&&this['_updateHasDirtyComment'](),_0x5a819d['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5bbb7b=>_0x5bbb7b['isEditMode']);}['_rearrangeCollapse'](){const _0x40c585=function(_0x2ea1b1){const _0x387418=new _0x3d0741();for(const _0x11e761 of _0x2ea1b1)_0x387418['add'](_0x11e761);return _0x387418;}(this['commentViews']),_0x29c697=this['_collapsedCommentsView']['count'];for(let _0x45815f=0x1;_0x45815f<=_0x29c697;_0x45815f++)_0x40c585['remove'](0x1);for(const _0x115dd7 of _0x40c585)_0x115dd7['collapse']();_0x29c697>0x0&&_0x40c585['add'](this['_collapsedCommentsView'],0x1),ns(_0x58ed47(Array['from'](this['visibleViews']),Array['from'](_0x40c585)),this['visibleViews'],_0x40c585);}['_rearrangeExpand'](){ns(_0x58ed47(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4942f9 of this['visibleViews'])_0x4942f9['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x31c65a=>{this['focusTracker']['add'](_0x31c65a['element']),this['keystrokes']['listenTo'](_0x31c65a['element']);}),this['commentViews']['on']('change',(_0x171f9c,_0x4e7323)=>{for(const _0x4be409 of _0x4e7323['removed'])this['focusTracker']['remove'](_0x4be409['element']),this['keystrokes']['stopListening'](_0x4be409['element']);for(const _0x35a5dc of Array['from'](_0x4e7323['added'])['reverse']())this['focusTracker']['add'](_0x35a5dc['element']),this['keystrokes']['listenTo'](_0x35a5dc['element']);});}}function ns(_0x16f5ea,_0x48990c,_0x23e89d){let _0x1618e3=0x0;for(const _0x34a1b9 of _0x16f5ea)switch(_0x34a1b9){case'insert':_0x48990c['add'](_0x23e89d['get'](_0x1618e3),_0x1618e3),_0x1618e3++;break;case'delete':_0x48990c['remove'](_0x1618e3);break;case'equal':_0x1618e3++;}}class oe extends kt{constructor(_0x35eb28){super(_0x35eb28);const _0x55c4ad=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x55c4ad['to']('contextValue',_0x4913ae=>N(_0x35eb28,'THREAD_CONTEXT_LABEL',_0x4913ae)),'tabindex':-0x1},'children':[{'text':_0x55c4ad['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x69bc7f,_0x595244){super(_0x69bc7f);const _0x537e37=this['bindTemplate'];this['_model']=_0x595244,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x37af46(),this['keystrokes']=new jt(),this['focusCycler']=new _0x599a03({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x362c15=>!!_0x362c15),this['bind']('contextValue')['to'](this['_model'],'context',_0x384b8d=>_0x384b8d&&_0x384b8d['value']?this['_trimContextValue'](_0x384b8d['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x537e37['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x153660=new _0x1c15c2(this['locale']);return _0x153660['label']=N(this['locale'],'Reopen'),_0x153660['tooltip']=N(this['locale'],'Reopen'),_0x153660['icon']=_0x10fb73,_0x153660['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2ccdf1=>!_0x2ccdf1),_0x153660['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x72d175,_0x3838b5)=>_0x72d175&&_0x3838b5),_0x153660['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x153660;}['_trimContextValue'](_0x2b1aec){if(_0x2b1aec['length']<0x96)return _0x2b1aec;const _0x1f61d6=_0x2b1aec['lastIndexOf']('\x20',0x93);return _0x2b1aec['substring'](0x0,_0x1f61d6>-0x1?_0x1f61d6:0x93)+'...';}['_attachContextActions'](){const _0x175a1d=this['element']['querySelector']('.ck-context'),_0x18beb9=_0x175a1d['querySelector']('.ck-context__value');this['listenTo'](_0x175a1d,'mouseenter',()=>{_0x18beb9['offsetWidth']<_0x18beb9['scrollWidth']&&_0x175a1d['classList']['add']('overlay');}),this['listenTo'](_0x175a1d,'mouseleave',()=>{_0x175a1d['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3c07e6 of this['focusables'])this['focusTracker']['add'](_0x3c07e6['element']),this['keystrokes']['listenTo'](_0x3c07e6['element']);}['_createContextView'](){const _0x4ac47d=new oe(this['locale']);return _0x4ac47d['bind']('contextValue')['to'](this),_0x4ac47d;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5a8e18,_0x3766e6,_0x447cc4,_0x5b0835){super(_0x5a8e18),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3766e6,this['_localUser']=_0x447cc4,this['_config']=_0x5b0835,this['commentThreadHeaderView']=new Xt(_0x5a8e18,_0x3766e6),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5a8e18,N(_0x5a8e18,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5a8e18,_0x3766e6,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5b0835)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x3cddf4,_0x2a4cf1)=>_0x3cddf4||!!_0x2a4cf1),this['bind']('isUnlinked')['to'](_0x3766e6,'unlinkedAt',_0x23415f=>!!_0x23415f),this['bind']('ariaLabel')['to'](this,'length',_0x49be2f=>{const _0x17b4fa=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x49be2f,_0x17b4fa]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x37af46(),this['keystrokes']=new jt(),this['focusCycler']=new _0x599a03({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3ec53c=>_0x3ec53c['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3c62b7=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x50807b=_0x3c62b7['commentInputView'];return _0x3c62b7['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x50807b,'value',(_0x4cbb97,_0x2e9a4a,_0x288785,_0x570f44,_0x2f6748)=>!!_0x2f6748||!!_0x570f44&&_0x288785&&!_0x2e9a4a||_0x4cbb97&&_0x288785&&!_0x2e9a4a),_0x50807b['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x512e50,_0x124713,_0x1e1c1d)=>{let _0x4a40e6;return _0x4a40e6=_0x1e1c1d&&_0x124713?'Reply\x20to\x20reopen\x20discussion...':_0x512e50?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x4a40e6);}),_0x50807b['bind']('submitLabel')['to'](this,'length',_0x1b4feb=>N(this['locale'],_0x1b4feb?'Reply':'Comment')),_0x50807b['on']('submit',(_0x359d93,_0xcadbf9)=>{this['fire']('addComment',_0xcadbf9),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x50807b['on']('cancel',()=>{this['focus']();}),_0x50807b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x50807b['on']('cancel',_0x370b60=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x370b60['stop']());}),this['on']('change:isActive',(_0x442a36,_0x4370fb,_0x2ace9c)=>{_0x2ace9c||this['length']||_0x50807b['value']||this['fire']('removeCommentThread');}),_0x3c62b7;}}class gt extends/* #__PURE__ -- @preserve */
27
- ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x5b880a,_0x5988d2,_0x120969,_0x28fea3){super(_0x5b880a,_0x5988d2,_0x120969,_0x28fea3),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5b880a,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x218057,_0x10b7f4,_0x485450)=>{_0x485450||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x286be2,_0xece8ca,_0x1a3388)=>{_0x1a3388&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3fea70=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3fea70['if']('isActive','ck-thread--active'),_0x3fea70['if']('isUnlinked','ck-thread--unlinked'),_0x3fea70['to']('actionIndicator',_0x5a9ff4=>_0x5a9ff4?'ck-thread--'+_0x5a9ff4:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3fea70['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id']},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container'),this['_model']['on']('change:archivedAt',()=>{this['_updateArchivedThreadHeader']();}),this['_updateArchivedThreadHeader']();}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0x5ece2c of this['commentsListView']['commentViews'])_0x5ece2c['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x58ee59}=this,_0x48390b=this['commentsListView']['commentViews']['get'](0x0);_0x48390b===this['_boundFirstCommentView']||_0x48390b['isSystemComment']||(this['_boundFirstCommentView']=_0x48390b,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x48390b,'actionIndicator',_0x1fba9b=>'remove'===_0x1fba9b?'remove':null),_0x48390b['placeholder']=N(_0x58ee59,'Write\x20a\x20comment...'),_0x48390b['removeButton']['on']('execute',_0x43b625=>{_0x43b625['stop'](),this['showConfirm'](N(_0x58ee59,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x48390b['focus']();}),_0x48390b['actionBar']['add'](this['resolveButton'],0x0),_0x48390b['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x540660=new _0x9a6bed(this['locale']);return _0x540660['label']=N(this['locale'],'Resolve'),_0x540660['tooltip']=N(this['locale'],'Resolve'),_0x540660['icon']=_0x3695aa,_0x540660['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x540660['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x997a2e=>!_0x997a2e),_0x540660['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xba94fc,_0x30f455)=>_0xba94fc&&!_0x30f455),_0x540660['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x540660;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x547918){super(_0x547918),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5a85dc,_0x2b2e3b,_0x782823)=>{this['element']['innerHTML']=_0x782823;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x44d696,_0x103d02,_0x496c93){super(_0x44d696),this['_model']=_0x103d02,this['_config']=_0x496c93,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x103d02,'content',_0x103d02,'authoredAt',(_0x1f8622,_0x5e1526)=>N(_0x44d696,'COMMENT_ARIA_LABEL',[_0x103d02['author']['name'],_0x496c93['formatDateTime'](_0x5e1526),new DOMParser()['parseFromString'](_0x1f8622,'text/html')['body']['textContent'],_0x103d02['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x44d696,N(_0x44d696,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x4fc9fb(),this['focusTracker']=new _0x37af46(),this['keystrokes']=new jt(),this['focusCycler']=new _0x599a03({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x483372=>_0x483372['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x135914=new is(this['locale']);return _0x135914['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x5d3f9a,_0x24d6fe)=>_0x24d6fe?ts(_0x5d3f9a,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x5d3f9a),_0x135914;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x40685e=new es(this['locale'],this['_config']['editorConfig']);return _0x40685e['value']=this['_model']['content'],_0x40685e['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x40685e['submitLabel']=N(this['locale'],'Save'),_0x40685e['on']('submit',(_0x4331ea,_0x1f6447)=>{this['fire']('updateComment',this['_model']['id'],_0x1f6447),this['switchToDisplayMode'](),this['focus']();}),_0x40685e['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x40685e['once']('editorReady',()=>{_0x40685e['focus']();}),_0x40685e['createEditor'](),_0x40685e['delegate']('editorReady')['to'](this),_0x40685e['delegate']('editorDestroyed')['to'](this),_0x40685e;}['_setupKeyboardNavigation'](){const _0x3c525d=this['element'];this['keystrokes']['listenTo'](_0x3c525d);for(const _0x1296a0 of this['focusables'])this['focusTracker']['add'](_0x1296a0['element']),this['keystrokes']['listenTo'](_0x1296a0['element']);this['focusables']['on']('change',(_0x269b41,_0x268316)=>{for(const _0x41c648 of _0x268316['removed'])this['focusTracker']['remove'](_0x41c648['element']),this['keystrokes']['stopListening'](_0x41c648['element']);for(const _0x79845d of _0x268316['added'])this['focusTracker']['add'](_0x79845d['element']),this['keystrokes']['listenTo'](_0x79845d['element']);}),this['keystrokes']['set']('enter',(_0xade7be,_0x3e0dba)=>{_0x3c525d===_0xade7be['target']&&(this['focusCycler']['focusFirst'](),_0x3e0dba());}),this['keystrokes']['set']('esc',(_0x597a3e,_0x3a8032)=>{_0x3c525d!==_0x597a3e['target']&&(this['focus'](),_0x3a8032());});}}class Tt extends/* #__PURE__ -- @preserve */
28
- ti(di){['actionBar'];['userView'];constructor(_0x4bdb2f,_0x5c8309,_0x4e8f4a){super(_0x4bdb2f,_0x5c8309,_0x4e8f4a),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x4bdb2f,'Reply...')),this['bind']('authoredAt')['to'](_0x5c8309),this['bind']('resolvedAt')['to'](_0x5c8309),this['actionBar']=this['createCollection'](),this['isSystemComment']||(this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this['createCollection'](),this['items']['addMany']([this['editButton'],this['removeButton']]),this['dropdown']=this['_createDropdown'](),this['actionBar']['add'](this['dropdown']),this['focusables']['add'](this['dropdown'])),this['userView']=new _0x3848c4(_0x4bdb2f,_0x5c8309['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5c8309,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x521573=this['bindTemplate'],_0x46c5ed=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x521573['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x521573['to']('authoredAt',_0x2028a6=>this['_config']['formatDateTime'](_0x2028a6))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x521573['if']('isEditMode','ck-comment__actions--hidden'),_0x521573['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']},this['ariaDescriptionView']];return this['_model']['isExternal']&&_0x46c5ed['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x521573['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x521573['if']('isEditMode','ck-comment--edit'),_0x521573['if']('isSystemComment','ck-comment--info'),_0x521573['to']('actionIndicator',_0x2858ce=>_0x2858ce?'ck-comment--'+_0x2858ce:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id'],'role':'group'},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':_0x46c5ed}]}]};}['_createEditButton'](){const _0x4ff3c6=new _0x1c15c2(this['locale']);return _0x4ff3c6['label']=N(this['locale'],'Edit'),_0x4ff3c6['icon']=_0x4a06d8,_0x4ff3c6['withText']=!0x0,_0x4ff3c6['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x4ff3c6['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x43ca98=>!_0x43ca98),_0x4ff3c6['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x4ff3c6['on']('execute',()=>this['switchToEditMode']()),_0x4ff3c6;}['_createRemoveButton'](){const _0x28d41f=new _0x1c15c2(this['locale']);return _0x28d41f['label']=N(this['locale'],'Remove'),_0x28d41f['icon']=_0x2fb6a9,_0x28d41f['withText']=!0x0,_0x28d41f['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x28d41f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1d61ee=>!_0x1d61ee),_0x28d41f['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x28d41f['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x28d41f;}['_createDropdown'](){const _0x1f14b0=_0x1780b4(this['locale'],_0x304a89),_0x43fb09=_0x1f14b0['panelView']['children'],_0x541b36=new _0x5f4a95(this['locale']),_0x251bd3=_0x1f14b0['bindTemplate'];_0x5a966(_0x1f14b0,()=>this['items']['find'](_0x1ed22d=>_0x1ed22d['isVisible'])),_0x1f14b0['extendTemplate']({'attributes':{'class':[_0x251bd3['if']('isVisible','ck-hidden',_0x2d26c8=>!_0x2d26c8)]}});const _0x53602f=(_0x5bcc51,_0x3eab45=-0x1)=>{const _0x15a760=new _0x589c3e(this['locale']);_0x15a760['children']['add'](_0x5bcc51);const _0x1842dd=_0x3eab45>-0x1?_0x3eab45:_0x541b36['items']['length'];_0x541b36['items']['add'](_0x15a760,_0x1842dd);const _0xd74b52=Array['from'](this['items']);_0x1f14b0['unbind']('isEnabled','isVisible'),_0x1f14b0['bind']('isEnabled')['toMany'](_0xd74b52,'isEnabled',(..._0x91711a)=>_0x91711a['some'](_0x4c4fcc=>_0x4c4fcc)),_0x1f14b0['bind']('isVisible')['toMany'](_0xd74b52,'isVisible',(..._0x26da5e)=>_0x26da5e['some'](_0x284573=>_0x284573));};_0x1f14b0['panelPosition']='sw',_0x1f14b0['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x1dbf8b});for(const _0x398b39 of this['items'])_0x53602f(_0x398b39);return _0x43fb09['add'](_0x541b36),_0x1f14b0['listenTo'](this['items'],'add',(_0x568a16,_0x228fe8,_0x2ebc5f)=>{_0x53602f(_0x228fe8,_0x2ebc5f);}),_0x1f14b0['listenTo'](this['items'],'remove',(_0x67c6f5,_0x328b69,_0x3bb6e1)=>{_0x541b36['items']['remove'](_0x3bb6e1);}),_0x1f14b0;}['_attachActions'](_0xc77481,_0x46922c){const _0x1563c8=_0xc77481&&_0xc77481['element'];_0x1563c8&&(this['listenTo'](_0x1563c8,'mouseenter',()=>this['actionIndicator']=_0x46922c),this['listenTo'](_0x1563c8,'focus',()=>this['actionIndicator']=_0x46922c),this['listenTo'](_0x1563c8,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x1563c8,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x4d92ae=super['_createCommentInputView']();return _0x4d92ae['bind']('placeholder')['to'](this),_0x4d92ae;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x15545b){const _0x33929d=Dt(_0x15545b,0x1e),_0x34f781=new MutationObserver(_0x282391=>{for(const _0x493b87 of _0x282391)('attributes'==_0x493b87['type']&&'class'==_0x493b87['attributeName']||'childList'==_0x493b87['type']||'characterData'==_0x493b87['type'])&&_0x33929d();});return{'attach'(_0x19f451){_0x34f781['observe'](_0x19f451,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x34f781['disconnect'](),_0x33929d['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x23dbd9,_0x43c83e){super(_0x23dbd9),this['id']=_0x477669(),this['focusTracker']=new _0x37af46(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x3597fa,_0x3d8a27)=>this['fire']('Esc',_0x3d8a27)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x43c83e),this['mainView']=_0x43c83e;const _0x33cd7e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x33cd7e['if']('isActive','ck-annotation-wrapper--active')],'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['focusTracker']['add'](this['element']),this['keystrokes']['listenTo'](this['element']),this['_mutationObserver']['attach'](this['element']);}['destroy'](){this['content']['clear'](),this['keystrokes']['destroy'](),this['focusTracker']['destroy'](),this['_mutationObserver']['detach'](),super['destroy']();}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['_updateHeight'](){const _0x5edd7f=this['element']['clientHeight'];_0x5edd7f&&(this['height']=_0x5edd7f);}}class T extends/* #__PURE__ -- @preserve */
29
- _0x4e6f5b(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5f3b26,target:_0x26ec1e,type:_0x54db84,isVisible:_0x30958e=!0x0}){super(),this['view']=_0x5f3b26,this['view']['element']||this['view']['render'](),this['_type']=_0x54db84,this['_target']=_0x26ec1e,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3d0741([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5e6452,_0x4c610b)=>{this['view']['focusTracker']['add'](_0x4c610b);}),this['focusableElements']['on']('remove',(_0x459965,_0x3ddb47)=>{this['view']['focusTracker']['remove'](_0x3ddb47);}),this['set']('isVisible',_0x30958e);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x174d20=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x174d20),_0x174d20;}get['targetRect'](){const _0x3a3e7e=this['target'];if(null===_0x3a3e7e)return null;if(_0x3a3e7e instanceof _0x2dcba1)return _0x3a3e7e;const _0x3e154f=_0x3a3e7e['filter'](_0x47c990=>function(_0x309318){const _0x19be36=_0x309318['offsetParent'];if(_0x19be36)return!0x0;const _0x1cf42f=_0x309318['getClientRects']()['item'](0x0);return!!_0x1cf42f;}(_0x47c990));return 0x0===_0x3e154f['length']?null:new _0x2dcba1(_0x3e154f[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3b7117){this['view']['isActive']=_0x3b7117,this['view']['mainView']['isActive']=_0x3b7117;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4928eb){if(!(null===_0x4928eb||_0x4928eb instanceof _0x2dcba1||Array['isArray'](_0x4928eb)&&_0x4928eb['every'](_0x406adb=>fi(_0x406adb))))throw new _0x14fd42('annotation-invalid-target',null,{'target':_0x4928eb});}['_getNormalizedTarget'](){const _0x57ea2f='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x57ea2f)?[_0x57ea2f]:_0x57ea2f;}}function fi(_0x393772){return null!==_0x393772&&'object'==typeof _0x393772&&'nodeType'in _0x393772&&0x1===_0x393772['nodeType'];}class S extends _0x3d0741{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x23c808=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x37af46(),this['_focusTracker']['on']('change:isFocused',(_0x528564,_0x2d1275,_0x462c48)=>{_0x462c48||this['fire']('blur');});for(const _0x5e9380 of _0x23c808)this['add'](_0x5e9380);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3848c9){if(this['has'](_0x3848c9))throw new _0x14fd42('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3848c9['innerView'],_0x3848c9),this['_viewToAnnotation']['set'](_0x3848c9['view'],_0x3848c9);for(const _0x3351bb of _0x3848c9['focusableElements'])this['_focusTracker']['add'](_0x3351bb);this['listenTo'](_0x3848c9['focusableElements'],'add',(_0x5e3848,_0x2b5251)=>{this['_focusTracker']['add'](_0x2b5251);}),this['listenTo'](_0x3848c9['focusableElements'],'remove',(_0x245a1e,_0x321577)=>{this['_focusTracker']['remove'](_0x321577);}),this['listenTo'](_0x3848c9['view']['focusTracker'],'change:isFocused',(_0x5d1de2,_0x5318a5,_0xe1addf)=>{_0xe1addf&&this['fire']('focus',_0x3848c9);}),_0x3848c9['updateTargetRect']();const _0x25745b=this['_getOrderInContent'](_0x3848c9['view']['targetRect']);return super['add'](_0x3848c9,_0x25745b);}['remove'](_0x44f4a4){if(!this['has'](_0x44f4a4))throw new _0x14fd42('annotationcollection-not-existing-item',null);this['stopListening'](_0x44f4a4['view']['focusTracker']),this['stopListening'](_0x44f4a4['focusableElements']);for(const _0x442bad of _0x44f4a4['focusableElements'])this['_focusTracker']['remove'](_0x442bad);return this['_viewToAnnotation']['delete'](_0x44f4a4['view']),this['_innerViewToAnnotation']['delete'](_0x44f4a4['innerView']),super['remove'](_0x44f4a4);}['getByInnerView'](_0x32d391){return this['_innerViewToAnnotation']['get'](_0x32d391);}['getByView'](_0x50f9f6){return this['_viewToAnnotation']['get'](_0x50f9f6);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x4459d0 of this)_0x4459d0['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1a28cf=Array['from'](this)['sort']((_0x157a86,_0x284395)=>w(_0x157a86['view']['targetRect'],_0x284395['view']['targetRect']));for(let _0x371d2d=_0x1a28cf['length']-0x1;_0x371d2d>0x0;_0x371d2d--){const _0x5c742b=_0x1a28cf[_0x371d2d];_0x371d2d!==this['getIndex'](_0x5c742b)&&(this['remove'](_0x5c742b),this['add'](_0x5c742b));}}['_getOrderInContent'](_0xe4cf6d){let _0x4a424e=0x0;if(!_0xe4cf6d)return this['length'];for(const _0x333f0a of this){const _0x253487=_0x333f0a['view']['targetRect'];if(_0x253487){if(w(_0xe4cf6d,_0x253487)<0x0)return _0x4a424e;_0x4a424e++;}}return _0x4a424e;}}function v({source:_0x45b15f,target:_0x16bde6,filter:_0x15da42}){for(const _0x19b1a1 of _0x45b15f)_0x15da42(_0x19b1a1)&&_0x16bde6['add'](_0x19b1a1);_0x16bde6['listenTo'](_0x45b15f,'add',(_0x170cf5,_0x12cb00)=>{_0x15da42(_0x12cb00)&&_0x16bde6['add'](_0x12cb00);}),_0x16bde6['listenTo'](_0x45b15f,'remove',(_0x1e1707,_0x5a8280)=>{_0x16bde6['has'](_0x5a8280)&&_0x16bde6['remove'](_0x5a8280);});}function w(_0x2d7078,_0x103639){if(null===_0x2d7078&&null===_0x103639)return 0x0;if(null===_0x2d7078)return-0x1;if(null===_0x103639)return 0x1;const _0x5ea1ea=_0x2d7078['top']-_0x103639['top'];return 0x0==_0x5ea1ea?_0x2d7078['left']-_0x103639['left']:_0x5ea1ea;}class y extends _0x593a50{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x164cbf){if(super(_0x164cbf),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x164cbf instanceof _0x46ffda){const _0x485a55=_0x164cbf['locale'];_0x164cbf['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x485a55,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2fb7cc){this['collection']['add'](_0x2fb7cc);}['remove'](_0x38f44d){this['collection']['remove'](_0x38f44d),_0x38f44d['destroy']();}['refreshVisibility'](){for(const _0x5611a6 of this['collection'])_0x5611a6['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x25214e){return this['collection']['getByInnerView'](_0x25214e);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x290152 of this['collection'])_0x290152['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x216b22){this['fire']('_activateAnnotation',_0x216b22);}['createAnnotation'](_0x54084b){return new T(_0x54084b);}['createAnnotationView'](_0x36867a,_0xea8756){return new E(_0x36867a,_0xea8756);}['_addActiveAnnotation'](_0x10973c){const _0x523711=new Set(this['activeAnnotations']);_0x523711['add'](_0x10973c),this['activeAnnotations']=_0x523711;}['_removeActiveAnnotation'](_0x407d3f){const _0x32efed=new Set(this['activeAnnotations']);_0x32efed['delete'](_0x407d3f),this['activeAnnotations']=_0x32efed;}['_bindAnnotationsToVisibleAnnotations'](){const _0x35e291=this['collection'],_0xb08b2a=this['_visibleAnnotations'];function _0x28d354(_0x3448d4){const _0x2dab0b=_0x3448d4['source'];_0x2dab0b['isVisible']&&!_0xb08b2a['has'](_0x2dab0b)?_0xb08b2a['add'](_0x2dab0b):!_0x2dab0b['isVisible']&&_0xb08b2a['has'](_0x2dab0b)&&_0xb08b2a['remove'](_0x2dab0b),_0x2dab0b['view']['focusTracker']['remove'](_0x2dab0b['view']['element']),_0x2dab0b['view']['focusTracker']['add'](_0x2dab0b['view']['element']);}this['listenTo'](_0x35e291,'add',(_0x49abd9,_0x31551b)=>{_0x31551b['isVisible']&&_0xb08b2a['add'](_0x31551b),this['listenTo'](_0x31551b,'change:isVisible',_0x28d354);}),this['listenTo'](_0x35e291,'remove',(_0x435005,_0x4819e8)=>{_0xb08b2a['has'](_0x4819e8)&&_0xb08b2a['remove'](_0x4819e8),this['stopListening'](_0x4819e8,'change:isVisible',_0x28d354);});}['_setupEnterAnnotationKeystroke'](){const _0xe44d8=_0x3c3813=>{_0x3c3813['on']('ready',()=>{_0x3c3813['keystrokes']['set'](_0x5154ad,(_0x4bac0a,_0x91fb8c)=>{const _0x545b65=_0x337871(this['activeAnnotations']['values']());_0x545b65&&(_0x545b65['view']['focus'](),_0x91fb8c());});});};this['context']instanceof _0x46ffda?_0xe44d8(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x259d02,_0xcf3a83)=>{_0xe44d8(_0xcf3a83);});}['_setupEscapeAnnotationHandling'](){const _0x31ca9b=_0x1173f3=>{const _0x2c5117=_0x1173f3['source'],_0x39c66c=[];let _0x4e17b5;if(Array['isArray'](_0x2c5117['target'])){_0x4e17b5=_0x2c5117['target'][0x0],this['context']instanceof _0x46ffda?_0x39c66c['push'](this['context']):this['context']['editors']&&_0x39c66c['push'](...this['context']['editors']);for(const _0x3fd882 of _0x39c66c)for(const _0x147ac2 of _0x3fd882['editing']['view']['domRoots']['values']())if(_0x147ac2['contains'](_0x4e17b5))return void _0x3fd882['editing']['view']['focus']();_0x4e17b5['focus']();}};this['listenTo'](this['collection'],'add',(_0x594d1d,_0x1301fc)=>{this['listenTo'](_0x1301fc,'escape',_0x31ca9b,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x36ffec,_0x5341c0)=>{this['stopListening'](_0x5341c0,'escape',_0x31ca9b);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x593a50{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ff54d){super(_0x4ff54d),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1f347f=this['context']['config'];_0x1f347f['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1f347f['define']('comments.maxThreadTotalWeight',0x1f4),_0x1f347f['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1f347f['define']('comments.CommentThreadView',gt),_0x1f347f['define']('comments.CommentView',Tt),_0x1f347f['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5a9507=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x45a52c,_0x4549d4)=>this['_addCommentThread'](_0x4549d4)),this['on']('submitCommentThread',(_0x4dcbd9,_0x51c849)=>this['_submitCommentThread'](_0x51c849)),this['on']('resolveCommentThread',(_0x5a865f,_0x3c19ba)=>this['_resolveCommentThread'](_0x3c19ba)),this['on']('resolveCommentThread',(_0x1ca2b2,_0x5f2a40)=>this['_updateActiveAnnotation'](_0x5f2a40),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3d90d6,_0x157d53)=>this['_reopenCommentThread'](_0x157d53)),this['on']('reopenCommentThread',(_0x24ba52,_0x437183)=>this['_updateActiveAnnotation'](_0x437183),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2520fd,_0x144cd7)=>this['_removeCommentThread'](_0x144cd7)),this['on']('updateCommentThread',(_0x518bbd,_0x58fbb4)=>this['_updateCommentThread'](_0x58fbb4)),this['on']('updateCommentThread',(_0x5d3064,_0x1fcd84)=>this['_updateActiveAnnotation'](_0x1fcd84),{'priority':'lowest'}),this['on']('addComment',(_0x4d0c9f,_0x35f8e2)=>this['_addComment'](_0x35f8e2)),this['on']('updateComment',(_0x9900de,_0x11882b)=>this['_updateComment'](_0x11882b)),this['on']('removeComment',(_0x44a71a,_0x3eb30f)=>this['_removeComment'](_0x3eb30f)),this['on']('addComment',(_0x266594,{threadId:_0x1b3f0b,isFromAdapter:_0x4f0100})=>{if(_0x4f0100)return;const _0x55bad3=this['getCommentThread'](_0x1b3f0b),_0x3ed784=_0x55bad3&&this['_threadToController']['get'](_0x55bad3);_0x3ed784&&_0x3ed784['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5a9507,'change:activeAnnotations',(_0x2b0b83,_0x4917ae,_0xd701f8)=>{const _0x46e80c=Array['from'](_0xd701f8)['map'](_0x294adb=>this['_viewToController']['get'](_0x294adb['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x46e80c?_0x46e80c['model']:null;});}set['adapter'](_0xd4b20e){if(this['_adapter'])throw new _0x14fd42('commentsrepository-adapter-already-set');this['_adapter']=_0xd4b20e;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3259eb=_t,threadId:_0x16c86f=_0x477669(),comments:_0x37a231=[],unlinkedAt:_0x50b5cc=null,resolvedAt:_0x164982=null,resolvedBy:_0xbd7765=null,target:_0x149a09=null,context:_0x52db0a=null,attributes:_0x4dc2c4={},isResolvable:_0x4e23c2=!0x0,isSubmitted:_0x5658a6=!0x1,isFromAdapter:_0x4b47be=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x3259eb),{'channelId':_0x3259eb,'threadId':_0x16c86f,'comments':_0x37a231,'unlinkedAt':_0x50b5cc,'resolvedAt':_0x164982,'resolvedBy':_0xbd7765,'target':_0x149a09,'context':_0x52db0a,'attributes':_0x4dc2c4,'isFromAdapter':_0x4b47be,'isResolvable':_0x4e23c2,'isSubmitted':_0x5658a6}),this['getCommentThread'](_0x16c86f);}['openNewCommentThread']({channelId:_0x42b4d1=_t,threadId:_0x31034f=_0x477669(),target:_0x3ab013,context:_0x43fb64=null,isResolvable:_0x53ffa7=!0x0}){if(this['_readOnlyChannels']['has'](_0x42b4d1)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3ab013)throw new _0x14fd42('commentsrepository-missing-target');const _0x34bd71=this['addCommentThread']({'channelId':_0x42b4d1,'threadId':_0x31034f,'target':_0x3ab013,'context':_0x43fb64,'isResolvable':_0x53ffa7});if(!_0x34bd71)return null;const _0xa8a262=this['_threadToController']['get'](_0x34bd71),_0x427fc9=_0xa8a262['view']['commentThreadInputView']['commentInputView'],_0x4d4345=this['context']['plugins']['get'](y),_0x316efe=_0x4d4345['getByInnerView'](_0xa8a262['view']);return _0x4d4345['activate'](_0x316efe),_0x427fc9['once']('editorReady',()=>_0x427fc9['focus']()),_0x34bd71;}['hasCommentThread'](_0x4b4af4){if('string'!=typeof _0x4b4af4)throw new _0x14fd42('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4b4af4);}['updateCommentThread']({channelId:_0x11a61d=_t,threadId:_0x177513,context:_0x2a3190,unlinkedAt:_0x375c32,attributes:_0x2229b9,isFromAdapter:_0x2f21a9=!0x1}){return this['fire'](Nt('updateCommentThread',_0x11a61d),{'channelId':_0x11a61d,'threadId':_0x177513,'context':_0x2a3190,'unlinkedAt':_0x375c32,'attributes':_0x2229b9,'isFromAdapter':_0x2f21a9}),this['getCommentThread'](_0x177513);}['getCommentThread'](_0x19163e){if('string'!=typeof _0x19163e)throw new _0x14fd42('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x19163e);}['fetchCommentThread']({channelId:_0x3c6ad4,threadId:_0x4978da}={}){const _0x2b7aac=this['getCommentThread'](_0x4978da);if(_0x2b7aac)return Promise['resolve'](_0x2b7aac);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x14fd42('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3c6ad4,'threadId':_0x4978da})['then'](_0x1cb286=>this['hasCommentThread'](_0x4978da)?this['getCommentThread'](_0x4978da):_0x1cb286?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3c6ad4},_0x1cb286)):void 0x0)['catch'](_0x3db020=>{throw console['error'](_0x3db020),new _0x14fd42('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x59d4fa,skipNotAttached:_0x8b7b2e=!0x1,skipEmpty:_0x16350f=!0x1,toJSON:_0x5112f7=!0x1}={}){const _0x15f7f9=[];for(const _0x9bf29e of this['_threads']['values']())_0x59d4fa&&_0x9bf29e['channelId']!==_0x59d4fa||_0x8b7b2e&&!_0x9bf29e['isAttached']||_0x16350f&&0x0===_0x9bf29e['length']||_0x15f7f9['push'](_0x9bf29e);return _0x5112f7?_0x15f7f9['map'](_0x583878=>_0x583878['toJSON']()):_0x15f7f9;}['getAnnotationForCommentThread'](_0x52222d){const _0x574520=this['_threadToController']['get'](_0x52222d);if(!_0x574520)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x574520['view'])||null;}['getCommentThreadForAnnotation'](_0x54c0a8){const _0x2a2c04=this['_viewToController']['get'](_0x54c0a8['innerView']);return _0x2a2c04?_0x2a2c04['model']:null;}['setActiveCommentThread'](_0x2d7cd6){const _0x57d71f=this['context']['plugins']['get'](y);if(!_0x2d7cd6)return void(this['activeCommentThread']&&_0x57d71f['deactivateAll']());const _0x20232d=this['getCommentThread'](_0x2d7cd6);if(!_0x20232d)throw new _0x14fd42('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2d7cd6});if(!this['_threadToController']['has'](_0x20232d))throw new _0x14fd42('commentsrepository-active-not-attached',null,{'threadId':_0x2d7cd6});const _0x4d7848=_0x57d71f['getByInnerView'](this['_threadToController']['get'](_0x20232d)['view']);_0x57d71f['activate'](_0x4d7848);}['switchReadOnly'](_0x387c87,_0x1d772f){_0x387c87?this['_readOnlyChannels']['add'](_0x1d772f):this['_readOnlyChannels']['delete'](_0x1d772f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2d1cd5){return this['_readOnlyChannels']['has'](_0x2d1cd5)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x217c2f,_0x259b6b){return new vt(_0x217c2f,_0x259b6b);}['setPermissions'](_0x308af2,_0x354692=_t){this['_permissions']['set'](_0x354692,_0x308af2),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x8ed698=_t){return this['_permissions']['has'](_0x8ed698)?this['_permissions']['get'](_0x8ed698):bt;}['_addCommentThread']({channelId:_0x2dd53a,threadId:_0x324bad,comments:_0x20fd1a,unlinkedAt:_0x243203,resolvedAt:_0x52db90,resolvedBy:_0x3e4b77,target:_0x3bf556,context:_0x5ce33f,attributes:_0x51ce3c,isFromAdapter:_0x4bec49,isResolvable:_0x266abf,isSubmitted:_0xda564d}){if('string'!=typeof _0x324bad)throw new _0x14fd42('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x324bad});if(this['hasCommentThread'](_0x324bad))throw new _0x14fd42('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x324bad});const _0x570e21=new pi(this,{'channelId':_0x2dd53a,'id':_0x324bad,'context':_0x5ce33f,'attributes':_0x51ce3c,'unlinkedAt':_0x243203,'resolvedAt':_0x52db90,'resolvedBy':_0x3e4b77?this['context']['plugins']['get'](it)['getUser'](_0x3e4b77):null,'isResolvable':_0x266abf,'isSubmitted':_0xda564d||_0x4bec49});this['_threads']['set'](_0x324bad,_0x570e21);for(const _0xf84ce9 of _0x20fd1a)_0x570e21['_add'](this['_createNewComment']({'threadId':_0x324bad,..._0xf84ce9}));return _0x3bf556&&_0x570e21['attachTo'](_0x3bf556),_0x4bec49||!_0x570e21['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2dd53a,'threadId':_0x324bad});}['_submitCommentThread']({channelId:_0x3b0180,threadId:_0x375d67}){if(!this['hasCommentThread'](_0x375d67))throw new _0x14fd42('commentsrepository-missing-comment-thread',this);const _0x562bf1=this['getCommentThread'](_0x375d67);if(_0x562bf1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x26066f,comments:_0x38a56e,resolvedAt:_0x298087,resolvedBy:_0x5b4b97,context:_0x422af3,attributes:_0x19f838}=_0x562bf1,_0x56f15c=this['context']['plugins']['get']('PendingActions'),_0x225173=_0x56f15c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3b0180,'threadId':_0x26066f,'comments':_0x38a56e['map'](_0x7a7518=>_0x7a7518['toJSON']()),'resolvedAt':_0x298087,'resolvedBy':_0x5b4b97?_0x5b4b97['id']:_0x5b4b97,'context':_0x422af3,'attributes':_0x19f838})['then'](({comments:_0x5e5e37})=>{_0x56f15c['remove'](_0x225173);for(const _0x7fc9b of _0x5e5e37)this['_updateComment']({'channelId':_0x3b0180,'threadId':_0x375d67,'commentId':_0x7fc9b['commentId'],'createdAt':_0x7fc9b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x460037=>{throw console['error'](_0x460037),new _0x14fd42('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x508458,target:_0x5d1684}){const _0x19cd96=this['getCommentThread'](_0x508458);if(!_0x19cd96)throw new _0x14fd42('commentsrepository-attach-missing-comment-thread',this);const _0x5f35cb=this['context']['plugins']['get']('PendingActions'),_0x1d51fe=this['context']['plugins']['get'](y),_0x5f43b4=this['_createCommentThreadView'](_0x19cd96),_0x5814c6=new vt(_0x19cd96,_0x5f43b4);let _0x51e848=null;_0x5f43b4['on']('change:isDirty',(_0x35a11a,_0x5cefe7,_0x183b7b)=>{_0x183b7b?_0x51e848=_0x5f35cb['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x51e848&&(_0x5f35cb['remove'](_0x51e848),_0x51e848=null);}),this['_threadToController']['set'](_0x19cd96,_0x5814c6),this['_viewToController']['set'](_0x5f43b4,_0x5814c6);const _0x3541dc=new E(this['context']['locale'],_0x5f43b4);_0x3541dc['bind']('length')['to'](_0x5f43b4),_0x3541dc['bind']('isDirty')['to'](_0x5f43b4,'isDirty',_0x5f43b4,'length',(_0xd26589,_0x130cf9)=>_0xd26589||!_0x130cf9),_0x3541dc['bind']('isActive')['to'](_0x5f43b4),_0x3541dc['type']='comment';const _0x5f4521=new T({'view':_0x3541dc,'target':_0x5d1684,'type':'comment','isVisible':!_0x19cd96['archivedAt']&&!!('function'==typeof _0x5d1684?_0x5d1684():_0x5d1684)});return _0x5f43b4['on']('escape',()=>{_0x5f4521['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5f43b4,_0x5f4521),_0x1d51fe['add'](_0x5f4521),_0x5f4521;}['_bindAnnotationToEditors'](_0x5c01a9,_0x224b7c){this['listenTo'](_0x5c01a9,'editorReady',(_0x3f6329,_0x5879d2)=>{const _0xac9e0c=_0x5879d2['ui']['view']['body']['bodyCollectionContainer'];_0x224b7c['focusableElements']['add'](_0xac9e0c),this['context']instanceof _0x46ffda&&this['context']['ui']['focusTracker']['add'](_0xac9e0c);},{'priority':'highest'}),this['listenTo'](_0x5c01a9,'editorDestroyed',(_0x5b7276,_0x5b58bc)=>{const _0x42f7ce=_0x5b58bc['ui']['view']['body']['bodyCollectionContainer'];_0x224b7c['focusableElements']['has'](_0x42f7ce)&&_0x224b7c['focusableElements']['remove'](_0x42f7ce),this['context']instanceof _0x46ffda&&this['context']['ui']['focusTracker']['remove'](_0x42f7ce);});}['_unbindEditors'](_0x2325f9){this['stopListening'](_0x2325f9,'editorReady'),this['stopListening'](_0x2325f9,'editorDestroyed');}['_createCommentThreadView'](_0x3f47a6){const _0x192a24=this['context']['plugins']['get'](it),{config:_0x53cf51,locale:_0x471ad2}=this['context'],_0x1e23ef=pt(_0x53cf51['get']('locale'),_0x471ad2);return new(0x0,(_0x53cf51['get']('comments'))['CommentThreadView'])(_0x471ad2,_0x3f47a6,_0x192a24['me'],{'editorConfig':{..._0x53cf51['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x53cf51['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x53cf51['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x53cf51['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x53cf51['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1e23ef,'CommentView':_0x53cf51['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5fcf82,channelId:_0x2f329d,resolvedAt:_0xad000f,resolvedBy:_0x749689,isFromAdapter:_0x3eef5c}){if(!this['hasCommentThread'](_0x5fcf82))throw new _0x14fd42('commentsrepository-missing-comment-thread',null,{'threadId':_0x5fcf82});const _0x5b0d88=this['getCommentThread'](_0x5fcf82);if(_0x5b0d88['isResolved'])throw new _0x14fd42('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5fcf82});const _0x33308e=this['context']['plugins']['get'](it);if(_0x5b0d88['resolvedBy']=_0x33308e['getUser'](_0x749689),_0x5b0d88['resolvedAt']=_0xad000f,_0x3eef5c||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x504c9e=this['context']['plugins']['get']('PendingActions'),_0x49a558=_0x504c9e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2f329d,'threadId':_0x5fcf82})['then'](({resolvedAt:_0x117b8a,resolvedBy:_0x732705})=>{_0x504c9e['remove'](_0x49a558),_0x5b0d88['resolvedBy']['id']!==_0x732705&&(_0x5b0d88['resolvedBy']=_0x33308e['getUser'](_0x732705)),_0x5b0d88['resolvedAt']=_0x117b8a;})['catch'](_0x2c4e5b=>{throw console['error'](_0x2c4e5b),new _0x14fd42('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x29e3b3,channelId:_0x33d1b9,isFromAdapter:_0x46c598}){if(!this['hasCommentThread'](_0x29e3b3))throw new _0x14fd42('commentsrepository-missing-comment-thread',null,{'threadId':_0x29e3b3});const _0xa26b29=this['getCommentThread'](_0x29e3b3);if(!_0xa26b29['isResolved'])throw new _0x14fd42('commentsrepository-reopen-comment-thread',null,{'threadId':_0x29e3b3});if(_0xa26b29['resolvedBy']=null,_0xa26b29['resolvedAt']=null,_0x46c598||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4afd8e=this['context']['plugins']['get']('PendingActions'),_0xa5bd5=_0x4afd8e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x33d1b9,'threadId':_0x29e3b3})['then'](()=>_0x4afd8e['remove'](_0xa5bd5))['catch'](_0x82e103=>{throw console['error'](_0x82e103),new _0x14fd42('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x32f9db,isFromAdapter:_0x31c196}){const _0x23caa7=this['getCommentThread'](_0x32f9db);if(!_0x23caa7)throw new _0x14fd42('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x32f9db),this['_threads']['delete'](_0x32f9db),!_0x23caa7['isSubmitted']||_0x31c196||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x427c9d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1be1f0}=_0x23caa7,_0x532b52=_0x427c9d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1be1f0,'threadId':_0x32f9db})['then'](()=>_0x427c9d['remove'](_0x532b52))['catch'](_0x31a01d=>{throw console['error'](_0x31a01d),new _0x14fd42('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x25f723,unlinkedAt:_0x159d32,context:_0x4d858d,attributes:_0x2043e0,isFromAdapter:_0x51a5d2}){if('string'!=typeof _0x25f723)throw new _0x14fd42('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x25f723});if(!this['hasCommentThread'](_0x25f723))throw new _0x14fd42('commentsrepository-missing-comment-thread',null,{'threadId':_0x25f723});const _0x303b08=this['getCommentThread'](_0x25f723);let _0x4c725b=!0x1;if(void 0x0!==_0x4d858d&&_0x303b08['context']!==_0x4d858d&&(_0x303b08['context']=_0x4d858d,_0x4c725b=!0x0),void 0x0!==_0x159d32&&_0x303b08['unlinkedAt']!==_0x159d32&&(_0x303b08['unlinkedAt']=_0x159d32,_0x4c725b=!0x0),_0x2043e0&&!At(_0x2043e0,_0x303b08['attributes'])&&(_0x303b08['attributes']=_0x2043e0,_0x4c725b=!0x0),!_0x4c725b)return Promise['resolve']();if(!_0x303b08['isSubmitted']||_0x51a5d2||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2c5cc2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x320b8d}=_0x303b08,_0x5a7f53=_0x2c5cc2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x320b8d,'threadId':_0x25f723,'context':_0x4d858d,'unlinkedAt':_0x159d32,'attributes':_0x2043e0})['then'](()=>_0x2c5cc2['remove'](_0x5a7f53))['catch'](_0x47e329=>{throw console['error'](_0x47e329),new _0x14fd42('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x59ded8){const _0x842056=this['context']['plugins']['get'](y),_0x25a425=this['getCommentThread'](_0x59ded8);if(_0x25a425['_isAttached']=!0x1,this['_threadToController']['has'](_0x25a425)){const _0x22fcee=this['_threadToController']['get'](_0x25a425),_0x484f4d=_0x22fcee['view'],_0x15553a=_0x842056['getByInnerView'](_0x484f4d);this['_threadToController']['delete'](_0x25a425),this['_viewToController']['delete'](_0x484f4d),_0x15553a&&_0x842056['remove'](_0x15553a),_0x22fcee['destroy'](),_0x484f4d['destroy']()['then'](()=>{this['_unbindEditors'](_0x484f4d);});}}['_updateActiveAnnotation']({threadId:_0x55dcb0,resolvedAt:_0x1ef279,unlinkedAt:_0x468bf0}){const _0x3b48c2=!!_0x1ef279,_0xf053d3=this['context']['plugins']['get'](y),_0x3c0718=this['getCommentThread'](_0x55dcb0);if(this['_threadToController']['has'](_0x3c0718)){const _0x2f4229=this['_threadToController']['get'](_0x3c0718)['view'],_0x2dc42e=_0xf053d3['getByInnerView'](_0x2f4229);_0x2dc42e&&(_0x3b48c2&&_0xf053d3['_removeActiveAnnotation'](_0x2dc42e),_0x468bf0?_0x2dc42e['isVisible']=!0x1:_0x2dc42e['refreshVisibility']());}}['_getExternalAuthor'](_0x2ccd88){const _0x3d0637=this['context']['plugins']['get'](it),_0x12441d=It('external:'+_0x2ccd88),_0x5d1415=_0x3d0637['getUser'](_0x12441d);return _0x5d1415||_0x3d0637['addUser']({'id':_0x12441d,'name':_0x2ccd88});}['_createNewComment']({threadId:_0x591bbd,commentId:_0x287609=_0x477669(),content:_0x3e4ffe,authorId:_0xe87f5,createdAt:_0x3aded1,attributes:_0x1a67cc}){if('string'!=typeof _0x287609)throw new _0x14fd42('commentsrepository-invalid-commentid');if('string'!=typeof _0xe87f5)throw new _0x14fd42('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3e4ffe||!_0x3e4ffe['trim']())throw new _0x14fd42('commentsrepository-invalid-comment-content');const _0x492c01=this['context']['plugins']['get'](it)['getUser'](_0xe87f5);if(!_0x492c01)throw new _0x14fd42('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xe87f5});let _0x598d92=null,_0x24847d=_0x3aded1;return _0x1a67cc?.['@external']&&(_0x598d92=this['_getExternalAuthor'](_0x1a67cc['@external']['authorName']),_0x24847d=new Date(_0x1a67cc['@external']['createdAt'])),new wi(this,{'threadId':_0x591bbd,'id':_0x287609,'author':_0x598d92||_0x492c01,'creator':_0x492c01,'content':_0x3e4ffe,'createdAt':_0x3aded1,'authoredAt':_0x24847d,'attributes':_0x1a67cc});}['_addComment'](_0x4216e0){let {threadId:_0x42e3a9,content:_0x2e1140,attributes:_0x19aea0,isFromAdapter:_0x5b5b90}=_0x4216e0;const _0xbd0220=this['getCommentThread'](_0x4216e0['threadId']);if(!_0xbd0220)throw new _0x14fd42('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xc848be=this['_createNewComment'](_0x4216e0),{id:_0x2b6abe}=_0xc848be;if(_0xbd0220['_add'](_0xc848be),_0x5b5b90||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0xbd0220['isSubmitted'])return Promise['resolve']();const _0x161a11=this['context']['plugins']['get']('PendingActions'),{channelId:_0x13f7ed}=_0xbd0220,_0x17db2e=_0x161a11['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x19aea0||(_0x19aea0={}),this['adapter']['addComment']({'channelId':_0x13f7ed,'threadId':_0x42e3a9,'commentId':_0x2b6abe,'content':_0x2e1140,'attributes':_0x19aea0})['then'](_0x17dad3=>{_0x161a11['remove'](_0x17db2e),_0x17dad3&&this['_updateComment']({'channelId':_0x13f7ed,'threadId':_0x42e3a9,'commentId':_0x2b6abe,'createdAt':_0x17dad3['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xbbae1b=>{throw console['error'](_0xbbae1b),new _0x14fd42('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4e9a22,commentId:_0x28863d,content:_0x442de7,createdAt:_0x55be48,attributes:_0x5276c2,isFromAdapter:_0x56d1e9}){if(void 0x0!==_0x442de7&&('string'!=typeof _0x442de7||!_0x442de7['trim']()['length']))throw new _0x14fd42('commentsrepository-update-comment-invalid-content');const _0x416597=this['getCommentThread'](_0x4e9a22),_0x58a16c=_0x416597['getComment'](_0x28863d);if(!_0x58a16c)throw new _0x14fd42('commentsrepository-update-missing-comment',this);let _0x505afb=!0x1;if(_0x442de7&&_0x442de7!==_0x58a16c['content']&&(_0x58a16c['isEditable']||_0x56d1e9)&&(_0x58a16c['content']=_0x442de7,_0x505afb=!0x0),_0x55be48&&_0x55be48!==_0x58a16c['createdAt']&&(_0x58a16c['createdAt']=_0x55be48,_0x58a16c['attributes']&&_0x58a16c['attributes']['@external']||(_0x58a16c['authoredAt']=_0x55be48),_0x505afb=!0x0),_0x5276c2&&!At(_0x5276c2,_0x58a16c['attributes'])&&(_0x58a16c['attributes']=_0x5276c2,_0x505afb=!0x0),!_0x505afb)return Promise['resolve']();if(_0x416597['fire']('commentUpdated'),_0x56d1e9||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2daf48=this['context']['plugins']['get']('PendingActions'),{channelId:_0x129a31}=this['getCommentThread'](_0x58a16c['threadId']),_0x267b41=_0x2daf48['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x129a31,'threadId':_0x4e9a22,'commentId':_0x28863d,'content':_0x442de7,'attributes':_0x5276c2})['then'](()=>_0x2daf48['remove'](_0x267b41))['catch'](_0x37e110=>{throw console['error'](_0x37e110),new _0x14fd42('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x36594d,commentId:_0x2919d5,isFromAdapter:_0x11ac11}){const _0x2df1c6=this['getCommentThread'](_0x36594d),_0x33b5ee=_0x2df1c6['getComment'](_0x2919d5);if(!_0x33b5ee)throw new _0x14fd42('commentsrepository-remove-missing-comment',this);if(_0x2df1c6['_remove'](_0x33b5ee),_0x11ac11||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3ea140=this['context']['plugins']['get']('PendingActions'),{channelId:_0xfca797}=_0x2df1c6,_0x282a0a=_0x3ea140['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xfca797,'threadId':_0x36594d,'commentId':_0x2919d5})['then'](()=>_0x3ea140['remove'](_0x282a0a))['catch'](_0x38430c=>{throw console['error'](_0x38430c),new _0x14fd42('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
- _0x4e6f5b(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4589dc,_0x41b70c){super();const _0x11f2e2=_0x41b70c['isResolvable'];this['channelId']=_0x41b70c['channelId'],this['id']=_0x41b70c['id'],this['comments']=new _0x3d0741(),this['_repository']=_0x4589dc,this['_isAttached']=!0x1,this['_isSubmitted']=_0x41b70c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4589dc,'_permissions',_0x4589dc,'_readOnlyChannels',()=>_0x4589dc['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4589dc,'_permissions',()=>_0x4589dc['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4589dc,'_permissions',()=>{const _0x4e2527=_0x4589dc['getPermissions'](this['channelId']);return _0x4e2527['write']||_0x4e2527['admin'];}),this['bind']('isResolvable')['to'](_0x4589dc,'_permissions',()=>_0x11f2e2&&_0x4589dc['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x41b70c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x54ea73,_0x439bac)=>_0x54ea73?_0x439bac?_0x54ea73<_0x439bac?_0x54ea73:_0x439bac:_0x54ea73:_0x439bac),this['set']('unlinkedAt',_0x41b70c['unlinkedAt']||null),this['set']('resolvedAt',_0x41b70c['resolvedAt']||null),this['set']('resolvedBy',_0x41b70c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x581f49=>!!_0x581f49),this['set']('attributes',_0x41b70c['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2702dd,_0x527989)=>_0x2702dd+_0x527989['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x4548a6,id:_0x1bd056}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x4548a6),{'channelId':_0x4548a6,'threadId':_0x1bd056});}['setUnlinkedAt'](_0x170d91){this['_update']({'unlinkedAt':_0x170d91});}['resolve']({resolvedAt:_0x1f2c8d=new Date(),resolvedBy:_0x2a7f2a='',isFromAdapter:_0x351d75=!0x1}={}){const _0x5ef029=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x3809bc,id:_0x17382b}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x3809bc),{'channelId':_0x3809bc,'threadId':_0x17382b,'resolvedAt':_0x1f2c8d,'resolvedBy':_0x2a7f2a||_0x5ef029['id'],'isFromAdapter':_0x351d75});}['reopen']({isFromAdapter:_0x50c943=!0x1}={}){const {channelId:_0xa4a13a,id:_0x1457af}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0xa4a13a),{'channelId':_0xa4a13a,'threadId':_0x1457af,'isFromAdapter':_0x50c943});}['setContext'](_0x5d8251){this['context']||this['_update']({'context':_0x5d8251});}['setAttribute'](_0x149772,_0x1c5de8){const _0x1f90a0=wt(this['attributes']);yt(_0x1f90a0,_0x149772,_0x1c5de8),this['_update']({'attributes':_0x1f90a0});}['removeAttribute'](_0x492718){const _0x4c7ae2=wt(this['attributes']);Ct(_0x4c7ae2,_0x492718),this['_update']({'attributes':_0x4c7ae2});}['remove']({isFromAdapter:_0x4dc9bc=!0x1}={}){const {channelId:_0x58f26b,id:_0x25d9c9}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x58f26b),{'channelId':_0x58f26b,'threadId':_0x25d9c9,'isFromAdapter':_0x4dc9bc});}['attachTo'](_0x29e7d1){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x29e7d1});}['addComment'](_0x449962){const {channelId:_0x3f62f7,id:_0x350297}=this;this['_repository']['fire'](Nt('addComment',_0x3f62f7,_0x350297),Object['assign']({'channelId':_0x3f62f7,'threadId':_0x350297},_0x449962));}['getComment'](_0x3b007b){if('string'!=typeof _0x3b007b)throw new _0x14fd42('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x3b007b});return this['comments']['get'](_0x3b007b);}['toJSON'](){return{'threadId':this['id'],'context':this['context'],'unlinkedAt':this['unlinkedAt'],'resolvedAt':this['resolvedAt'],'resolvedBy':this['resolvedBy']?this['resolvedBy']['id']:null,'archivedAt':this['archivedAt'],'comments':this['comments']['map'](_0x58902d=>_0x58902d['toJSON']()),'attributes':this['attributes']};}['_add'](_0x298435){return this['listenTo'](_0x298435,'change:authoredAt',()=>{const _0x4b2424=this['_findOptimalIndex'](_0x298435),_0x5138a2=this['comments'];_0x4b2424-0x1!=_0x5138a2['getIndex'](_0x298435)&&_0x4b2424+0x1!=_0x5138a2['getIndex'](_0x298435)&&(this['_remove'](_0x298435),this['_add'](_0x298435));}),this['comments']['add'](_0x298435,this['_findOptimalIndex'](_0x298435));}['_update'](_0x63eba8){const {channelId:_0x56d13c,id:_0x521881}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x56d13c),{..._0x63eba8,'channelId':_0x56d13c,'threadId':_0x521881});}['_remove'](_0x50fc34){return this['stopListening'](_0x50fc34),_0x50fc34['destroy'](),this['comments']['remove'](_0x50fc34);}['_findOptimalIndex'](_0x511621){const _0x39bde4=this['comments']['find'](_0x2f8833=>new Date(_0x2f8833['authoredAt'])['getTime']()>new Date(_0x511621['authoredAt'])['getTime']());return _0x39bde4?this['comments']['getIndex'](_0x39bde4):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
- _0x4e6f5b(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x565d0f,_0x5bde35){super();const _0x413eaa=_0x565d0f['context']['plugins']['get'](it)['me'],_0x1d9cd9=_0x565d0f['getCommentThread'](_0x5bde35['threadId']),_0x350e1a=0x0===_0x1d9cd9['comments']['length'],_0x3cfbbd=_0x413eaa===_0x5bde35['author'];this['id']=_0x5bde35['id'],this['threadId']=_0x5bde35['threadId'],this['author']=_0x5bde35['author'],this['creator']=_0x5bde35['creator'],this['isExternal']=Boolean(_0x5bde35['attributes']&&_0x5bde35['attributes']['@external']),this['set']('content',_0x5bde35['content']),this['createdAt']=_0x5bde35['createdAt']||new Date(),this['set']('authoredAt',_0x5bde35['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1d9cd9,'resolvedAt'),this['set']('attributes',_0x5bde35['attributes']||{}),this['bind']('isEditable')['to'](_0x565d0f,'_permissions',()=>{const _0x57fc2d=_0x565d0f['getPermissions'](_0x1d9cd9['channelId'])['write'],_0x5b2657=_0x565d0f['getPermissions'](_0x1d9cd9['channelId'])['modifyAll'];return _0x3cfbbd&&_0x57fc2d||!_0x3cfbbd&&_0x5b2657;}),this['bind']('isRemovable')['to'](_0x1d9cd9,'isRemovable',_0x565d0f,'_permissions',_0x3303d7=>{const _0x195873=_0x565d0f['getPermissions'](_0x1d9cd9['channelId'])['write'],_0x4c1a9c=_0x565d0f['getPermissions'](_0x1d9cd9['channelId'])['modifyAll'];return _0x3cfbbd&&_0x195873||_0x3303d7&&_0x350e1a||!_0x3cfbbd&&_0x4c1a9c&&!_0x350e1a;}),this['bind']('isReadOnly')['to'](_0x1d9cd9,'isReadOnly'),this['_repository']=_0x565d0f;}get['weight'](){return Math['max'](function(_0x14425e){const _0x5e332e=document['createElement']('div');return _0x5e332e['innerHTML']=_0x14425e,_0x5e332e['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1642a5){const {threadId:_0x20f575,id:_0xf49bb2}=this;if(!this['_repository']['hasCommentThread'](_0x20f575))throw new _0x14fd42('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x336778}=this['_repository']['getCommentThread'](_0x20f575);this['_repository']['fire'](Nt('updateComment',_0x336778,_0x20f575),{'channelId':_0x336778,'threadId':_0x20f575,'commentId':_0xf49bb2,..._0x1642a5});}['setAttribute'](_0x355f4b,_0x3c83e7){const _0x4a8299=wt(this['attributes']);yt(_0x4a8299,_0x355f4b,_0x3c83e7),this['update']({'attributes':_0x4a8299});}['removeAttribute'](_0x4e94b0){const _0x5da4c2=wt(this['attributes']);Ct(_0x5da4c2,_0x4e94b0),this['update']({'attributes':_0x5da4c2});}['remove'](_0x2eb479={}){if(!_0x2eb479['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x123951,id:_0x2b764e}=this;if(!this['_repository']['hasCommentThread'](_0x123951))throw new _0x14fd42('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2646bc}=this['_repository']['getCommentThread'](_0x123951);this['_repository']['fire'](Nt('removeComment',_0x2646bc,_0x123951),{'channelId':_0x2646bc,'threadId':_0x123951,'commentId':_0x2b764e,..._0x2eb479});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3d4b01,..._0x5befb5){for(const _0x3733c0 of _0x5befb5)void 0x0!==_0x3733c0&&(_0x3d4b01+=':'+String(_0x3733c0));return _0x3d4b01;}class ot extends _0x4a97fb{constructor(_0x589a8d){super(_0x589a8d),this['set']('hasContent',!0x1);}['refresh'](){const _0x72e883=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x3c350c of _0x72e883['getRanges']())if(this['_hasContent'](_0x3c350c))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x329340=_0x477669(),ranges:_0x123df9,comment:_0x47f754}={}){const _0x4c0ed0=this['editor']['model'],_0x40492f=_0x123df9??Array['from'](_0x4c0ed0['document']['selection']['getRanges']()),_0x236ab0=[];for(const _0x3e6a9d of _0x40492f)this['_hasContent'](_0x3e6a9d)&&_0x236ab0['push'](this['_trimToContent'](_0x3e6a9d));if(!_0x236ab0['length'])throw new _0x14fd42('addcommentthreadcommand-incorrect-ranges',null);_0x47f754&&this['_createCommentThread'](_0x329340,_0x47f754),this['_createMarkersFromRanges'](_0x329340,_0x236ab0,!!_0x47f754);}['_createMarkersFromRanges'](_0x808d1d,_0x495703,_0x50fb06){this['editor']['model']['change'](_0x36d589=>{for(const _0x3ee192 of _0x495703){const _0x1cdfd9=_0x477669()['substr'](0x1,0x5),_0x33e2a6='comment:'+_0x808d1d+':'+_0x1cdfd9;_0x36d589['addMarker'](_0x33e2a6,{'range':_0x3ee192,'usingOperation':_0x50fb06,'affectsData':_0x50fb06});}});}['_createCommentThread'](_0x55033b,_0x662b41){const _0x12afff=this['editor']['plugins']['get']('CommentsRepository'),_0x758e60=this['editor']['config']['get']('collaboration.channelId'),_0x44faec=this['editor']['plugins']['get']('Users')['me'];if(!_0x44faec)throw new _0x14fd42('addcommentthreadcommand-user-not-found',null);_0x12afff['addCommentThread']({'threadId':_0x55033b,'channelId':_0x758e60,'comments':[{'authorId':_0x44faec['id'],'content':_0x662b41,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x28578e){for(const _0x583737 of _0x28578e['getItems']())if(this['_itemIsContent'](_0x583737))return!0x0;return!0x1;}['_itemIsContent'](_0x5c52a5){return _0x5c52a5['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5c52a5)&&!_0x5c52a5['is']('element','tableCell');}['_trimToContent'](_0xf31ce8){const _0x12e87d=_0x2bd755=>!this['_itemIsContent'](_0x2bd755['item']),_0x32ee16=_0xf31ce8['start']['getLastMatchingPosition'](_0x12e87d),_0x3a63a4=_0xf31ce8['end']['getLastMatchingPosition'](_0x12e87d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x32ee16,_0x3a63a4);}}class b extends _0x37aa4b{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53dde8){super(_0x53dde8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xaddc0e=this['editor'],_0x25cc74=_0xaddc0e['model']['document']['selection'],_0x2ffd5c=_0x533250(()=>this['refreshSelectedViews'](),0xa);_0x25cc74['on']('change:range',(_0x591f55,_0x338aaf)=>{_0x338aaf['directChange']&&(_0x2ffd5c['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xaddc0e['editing']['view']['document'],'change:isFocused',(_0x2823d4,_0x136110,_0x2ec3e8)=>{_0x2ec3e8&&_0x2ffd5c();}),this['listenTo'](_0xaddc0e['ui']['focusTracker'],'change:isFocused',(_0x193af4,_0x126a88,_0x5016ec)=>{_0x5016ec||this['fire']('blur',{'isAnnotationTracked':_0xfcc239=>this['_editorAnnotationsData']['has'](_0xfcc239['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2f65e0){if(this['_editorAnnotations']['has'](_0x2f65e0['view']))return;this['_editorAnnotations']['add'](_0x2f65e0['view']),this['editor']['ui']['focusTracker']['add'](_0x2f65e0['view']['element']);const _0x4fd2cd=this['editor']['plugins']['get'](y);this['listenTo'](_0x4fd2cd['collection'],'remove',(_0x4caa28,_0x1f28c7)=>{this['editor']['ui']['focusTracker']['remove'](_0x1f28c7['view']['element']),this['_editorAnnotations']['delete'](_0x1f28c7['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x28ffc2){if('function'!=typeof _0x28ffc2)throw new _0x14fd42('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x28ffc2);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2121ad,annotations:_0x500e65}){const _0x139e47=[],_0x124eb4=this['editor']['model']['document']['selection'],_0x19bf40=Array['from'](_0x124eb4['getRanges']());for(const [_0x1fedf0,_0x38815d]of this['_editorAnnotationsData']){const _0x24ac33=_0x1da4fa(_0x38815d),_0x33eaca=_0x500e65['getByInnerView'](_0x1fedf0);_0x24ac33&&_0x33eaca&&_0x139e47['push']({'annotation':_0x33eaca,'range':_0x24ac33});}function _0x1da4fa(_0xb59c94){for(const _0x330bd3 of _0xb59c94)for(const _0x3e97f9 of _0x19bf40)if(_0x330bd3['containsRange'](_0x3e97f9,!_0x124eb4['isCollapsed']))return _0x330bd3;return null;}return _0x139e47['sort']((_0x3ead70,_0x3b2047)=>{const _0x4ec419=_0x3ead70['range'],_0x8ffbb1=_0x3b2047['range'];if(!_0x4ec419['isEqual'](_0x8ffbb1)){if(_0x4ec419['containsRange'](_0x8ffbb1,!0x0))return 0x1;if(_0x8ffbb1['containsRange'](_0x4ec419,!0x0))return-0x1;}return _0x3ead70['annotation']==_0x2121ad?-0x1:_0x3b2047['annotation']==_0x2121ad?0x1:0x0;})['map'](_0x43722c=>_0x43722c['annotation']);}get['_editorAnnotationsData'](){const _0x47a2b1=new Map();for(const _0x4dc0ff of Array['from'](this['_dataCollectors']))for(const [_0xed5fd1,_0x3a37d3]of _0x4dc0ff())_0x47a2b1['set'](_0xed5fd1,_0x3a37d3);return _0x47a2b1;}}class st extends _0x37aa4b{['afterInit'](){const _0x49b8a7=this['editor'];if(!_0x49b8a7['plugins']['has']('RestrictedEditingModeEditing'))return;_0x49b8a7['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x37aa4b{constructor(_0x3d2e34){super(_0x3d2e34),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3f2d7a=this['editor'],_0x113b1c=_0x3f2d7a['commands']['get']('importWord'),_0xfd364c=_0x3f2d7a['plugins']['get'](it);_0x113b1c&&(_0x113b1c['on']('execute',(_0x204a2b,[,_0x37791a])=>{_0x37791a['collaboration_features']={'comments':!0x0,'user_id':_0xfd364c['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x113b1c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2db7d9,_0x768f76){const {comment_threads:_0x54996a}=_0x768f76;_0x54996a&&_0x54996a['forEach'](({thread_id:_0x22788e,comments:_0x454ec2,is_resolved:_0x471c7c})=>{const _0x4d5dae=new Date(),_0x27c8c0=_0x454ec2['map'](({author:_0xdb4af,content:_0x2eb0e3,created_at:_0x9e249a})=>({'content':_0x2eb0e3,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x4d5dae,'attributes':{'@external':{'authorName':_0xdb4af,'createdAt':_0x9e249a?new Date(_0x9e249a):new Date(),'source':'importWord'}}})),_0x404400=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x404400,'threadId':_0x22788e,'comments':_0x27c8c0,'resolvedAt':_0x471c7c?_0x4d5dae:null});});}}class at extends _0x37aa4b{constructor(_0x34bdf1){super(_0x34bdf1),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x6ec189=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x6ec189,'contentInsertion',(_0x3d9325,_0x210d3e)=>this['_removeMarkersWithoutThreads'](_0x210d3e['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4cf84a){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4cf84a;const _0x5b50f0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x17be5d of _0x4cf84a['keys']()){const [_0x40a0c3,_0x5b852e]=_0x17be5d['split'](':');'comment'!=_0x40a0c3||_0x5b50f0['hasCommentThread'](_0x5b852e)||_0x4cf84a['delete'](_0x17be5d);}return _0x4cf84a;}['_registerMarkerInClipboardPipeline'](){const _0x1aa027=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3eb1f8=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3eb1f8&&_0x1aa027['_registerMarkerToCopy']('comment',_0x3eb1f8);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x47ea40){switch(_0x47ea40){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5ed174){const _0xf5c52f=_0x5ed174['split'](':');return{'group':_0xf5c52f[0x0],'id':_0xf5c52f[0x1],'part':_0xf5c52f[0x2]};}class ut extends _0x37aa4b{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5c1273,_0x27e0ef)=>{if(!_0x27e0ef['options']['showCommentHighlights'])return null;if(_0x27e0ef['options']['ignoreResolvedComments']){const {id:_0x3257a9}=ft(_0x5c1273['markerName']),_0x1256e8=this['editor']['plugins']['get'](o);if(_0x1256e8['getCommentThread'](_0x3257a9)?.['isResolved']&&_0x5c1273['item'])return _0x27e0ef['consumable']['consume'](_0x5c1273['item'],'addMarker:'+_0x5c1273['markerName']),_0x27e0ef['consumable']['consume'](_0x5c1273['item'],'removeMarker:'+_0x5c1273['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x15c22e=>{_0x15c22e['on']('addMarker:comment',(_0x131f18,_0x3ae77c,_0x1fa583)=>{if(!_0x1fa583['options']['showCommentHighlights'])return;const _0x1befea=_0x3ae77c['item'];if(!_0x1befea)return;const _0x3935d9=_0x1fa583['mapper']['toViewElement'](_0x1befea);this['editor']['model']['schema']['isObject'](_0x1befea)&&_0x3935d9&&!_0x3935d9['getCustomProperty']('widget')&&_0x3935d9['is']('containerElement')&&_0x241183(_0x3935d9,_0x1fa583['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x19f2a5,{writer:_0x89602,options:_0x359b77})=>{if(!_0x359b77['showCommentHighlights'])return null;const _0x121caa=_0x89602['createContainerElement']('div'),_0x5e2e5e=_0x89602['createEmptyElement']('hr');return _0x89602['addClass']('ck-horizontal-line',_0x121caa),_0x89602['insert'](_0x89602['createPositionAt'](_0x121caa,0x0),_0x5e2e5e),_0x121caa;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5b5db5,{writer:_0x5de24d,options:_0xbc076f})=>{if(!_0xbc076f['showCommentHighlights'])return null;const _0x111229=_0x5de24d['createContainerElement']('span'),_0x3950b0=_0x5de24d['createEmptyElement']('img');return _0x5de24d['addClass']('image-inline',_0x111229),_0x5de24d['insert'](_0x5de24d['createPositionAt'](_0x111229,0x0),_0x3950b0),_0x111229;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x56347d,{writer:_0x1767b1,options:_0x1313fb})=>{if(_0x1313fb['showCommentHighlights'])return _0x1767b1['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2d099f,_0x3acc5e,_0x384651)=>{_0x384651['options']['showCommentHighlights']&&_0x2d099f['stop']();},{'priority':'high'});}}class r extends _0x37aa4b{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x349f18){super(_0x349f18),this['set']('isThreadsLoadingPaused',!0x0),_0x349f18['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x542f08,_0x5efa94,_0x1c5733,_0x4ffb6f)=>{const _0x21f68e=_0x349f18['plugins']['get'](o),_0x2b5c64=_0x1c5733?ft(_0x1c5733)['id']:null;_0x349f18['model']['change'](()=>{if(_0x2b5c64){const _0x191ab7=this['getAllMarkersForId'](_0x2b5c64);for(const _0x200fad of _0x191ab7)_0x349f18['editing']['reconvertMarker'](_0x200fad);}if(_0x4ffb6f){const {id:_0x35fb0c}=ft(_0x4ffb6f),_0x5470cb=_0x21f68e['getCommentThread'](_0x35fb0c);if(_0x5470cb&&_0x5470cb['unlinkedAt'])return;if(_0x5470cb&&!_0x5470cb['isAttached'])return;const _0x275cda=this['getAllMarkersForId'](_0x35fb0c);for(const _0x5d9e5c of _0x275cda)_0x349f18['editing']['reconvertMarker'](_0x5d9e5c);}}),_0x2b5c64&&this['scrollToThreadMarker'](_0x2b5c64);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4538e4=this['editor'],_0x4520b7=_0x4538e4['plugins']['get'](o),_0x3796ee=_0x4538e4['config']['get']('collaboration.channelId'),_0x112033=_0x4520b7['getCommentThreads']()['filter'](_0x48d5b6=>_0x48d5b6['channelId']!==_0x3796ee);_0x4538e4['commands']['add']('addCommentThread',new ot(_0x4538e4)),this['listenTo'](_0x4538e4,'change:isReadOnly',(_0xaf4a34,_0x587dc7,_0x2af37f)=>{_0x4520b7['switchReadOnly'](_0x2af37f,_0x4538e4['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4520b7,dt('addCommentThread',_0x3796ee),(_0x963695,{threadId:_0x690ade})=>{const _0x4cdae6=this['editor']['plugins']['get'](o)['getCommentThread'](_0x690ade);_0x4cdae6?.['unlinkedAt']&&this['_attachArchivedThread'](_0x690ade);}),this['listenTo'](_0x4520b7,dt('removeCommentThread',_0x3796ee),(_0x585dcb,{threadId:_0x4c56b5})=>{_0x4538e4['model']['enqueueChange']({'isUndoable':!0x1},_0x59b061=>{const _0x1e2b26=this['getAllMarkersForId'](_0x4c56b5);for(const _0x518885 of _0x1e2b26)_0x59b061['removeMarker'](_0x518885);});}),this['listenTo'](_0x4520b7,dt('resolveCommentThread',_0x3796ee),(_0x47e75e,{threadId:_0x133842})=>{(this['_reconvertMarkers'](_0x133842),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x133842)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4520b7,dt('reopenCommentThread',_0x3796ee),(_0x57d453,{threadId:_0x5b8b9e})=>{this['_reconvertMarkers'](_0x5b8b9e);},{'priority':'low'}),this['listenTo'](_0x4520b7,dt('addComment',_0x3796ee),(_0x1dbb8c,{threadId:_0x2e7925,isFromAdapter:_0x1b54dc})=>{const _0x5d6829=this['getAllMarkersForId'](_0x2e7925);if(_0x1b54dc||0x0==_0x5d6829['length']||!_0x4520b7['hasCommentThread'](_0x2e7925))return;0x1===_0x4520b7['getCommentThread'](_0x2e7925)['length']&&_0x4538e4['model']['enqueueChange']({'isUndoable':!0x1},_0x588728=>{for(const _0x3924b9 of _0x5d6829)_0x588728['updateMarker'](_0x3924b9,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x112033);}['afterInit'](){!async function(_0x294631){const _0x117979=_0x2fe6a6([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x53b376=0x73460ab3,_0x23ec5c=0x73418ebb^_0x53b376,_0x127b19=window[_0x2fe6a6([0x44,0x61,0x74,0x65])][_0x2fe6a6([0x6e,0x6f,0x77])](),_0x38d3a4=_0x294631[_0x2fe6a6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x813322=new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ed6f0=>{_0x38d3a4[_0x2fe6a6([0x6f,0x6e,0x63,0x65])](_0x2fe6a6([0x72,0x65,0x61,0x64,0x79]),_0x2ed6f0);}),_0x5034f4={[_0x2fe6a6([0x6b,0x74,0x79])]:_0x2fe6a6([0x45,0x43]),[_0x2fe6a6([0x75,0x73,0x65])]:_0x2fe6a6([0x73,0x69,0x67]),[_0x2fe6a6([0x63,0x72,0x76])]:_0x2fe6a6([0x50,0x2d,0x32,0x35,0x36]),[_0x2fe6a6([0x78])]:_0x2fe6a6([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x2fe6a6([0x79])]:_0x2fe6a6([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x2fe6a6([0x61,0x6c,0x67])]:_0x2fe6a6([0x45,0x53,0x32,0x35,0x36])},_0x2c03df=_0x38d3a4[_0x2fe6a6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2fe6a6([0x67,0x65,0x74])](_0x2fe6a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x44078a(){let _0x345d7e,_0x2e25c7=null,_0x5c1a9c=null;try{if(_0x2c03df==_0x2fe6a6([0x47,0x50,0x4c]))return _0x2fe6a6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x345d7e=_0x1eca3c(),!_0x345d7e)return _0x2fe6a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x345d7e[_0x2fe6a6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5c1a9c=_0x2665ee(_0x345d7e[_0x2fe6a6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x345d7e[_0x2fe6a6([0x6a,0x74,0x69])])),await _0x226b37()?_0x207542()?_0x159b19()?_0x2fe6a6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3f87a0()?(_0x345d7e[_0x2fe6a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2fe6a6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e25c7=_0x5f5eff(_0x2fe6a6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4024fc()):_0x2fe6a6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2fe6a6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2fe6a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2fe6a6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x159b19(){const _0x29afaf=[_0x2fe6a6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2fe6a6([0x74,0x72,0x69,0x61,0x6c])][_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x345d7e[_0x2fe6a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x127b19/0x3e8:0xe10*_0x23ec5c;return _0x345d7e[_0x2fe6a6([0x65,0x78,0x70])]<_0x29afaf;}function _0x207542(){const _0x434b35=_0x345d7e[_0x2fe6a6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x434b35)return!0x1;if(_0x434b35[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fe6a6([0x2a])))return!0x0;if(_0x434b35[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fe6a6([0x43,0x4d,0x54])))return!0x0;if(_0x434b35[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fe6a6([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x13e893())return!0x0;if(_0x434b35[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fe6a6([0x52,0x43,0x4d,0x54]))){if(_0x3b1ada())return!0x0;if(_0x17a017()||_0x493726())return!0x0;}return!0x1;}function _0x3f87a0(){const _0x5a3e7c=_0x345d7e[_0x2fe6a6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5a3e7c||0x0==_0x5a3e7c[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3a7f29}=new URL(window[_0x2fe6a6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5a3e7c[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a7f29))return!0x0;const _0x545875=_0x3a7f29[_0x2fe6a6([0x73,0x70,0x6c,0x69,0x74])](_0x2fe6a6([0x2e]));return _0x5a3e7c[_0x2fe6a6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1dddcd=>_0x1dddcd[_0x2fe6a6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fe6a6([0x2a])))[_0x2fe6a6([0x6d,0x61,0x70])](_0x3361f1=>_0x3361f1[_0x2fe6a6([0x73,0x70,0x6c,0x69,0x74])](_0x2fe6a6([0x2e])))[_0x2fe6a6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a6a53=>_0x1a6a53[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x545875[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2fe6a6([0x6d,0x61,0x70])](_0x1ccdf9=>Array(_0x545875[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1ccdf9[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2fe6a6([0x66,0x69,0x6c,0x6c])](_0x1ccdf9[0x0]===_0x2fe6a6([0x2a])?_0x2fe6a6([0x2a]):'')[_0x2fe6a6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1ccdf9))[_0x2fe6a6([0x73,0x6f,0x6d,0x65])](_0x30e314=>_0x545875[_0x2fe6a6([0x65,0x76,0x65,0x72,0x79])]((_0x5afbe8,_0x4eb173)=>_0x30e314[_0x4eb173]===_0x5afbe8||_0x30e314[_0x4eb173]===_0x2fe6a6([0x2a])));}function _0x4024fc(){return _0x2e25c7&&_0x5c1a9c?new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5ab2d3,_0xcea8f2)=>{_0x2e25c7[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x5ab2d3,_0xcea8f2),_0x5c1a9c[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x4c53c1=>{_0x4c53c1!=_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64])&&_0x5ab2d3(_0x4c53c1);},_0xcea8f2);}):_0x2e25c7||_0x5c1a9c||_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2665ee(_0x21914f,_0x308325){return new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1786b3=>{if(_0x2fe237())return _0x1786b3(_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64]));_0x5aee53(),_0x38d3a4[_0x2fe6a6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2fe6a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x506948=!0x1;const _0x13a064=_0x477669();function _0x653cd9(_0x2d6ab6){return!!_0x2d6ab6&&(typeof _0x2d6ab6===_0x2fe6a6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2d6ab6===_0x2fe6a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2d6ab6[_0x2fe6a6([0x74,0x68,0x65,0x6e])]===_0x2fe6a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2d6ab6[_0x2fe6a6([0x63,0x61,0x74,0x63,0x68])]===_0x2fe6a6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x173e1d(_0x2079b6){_0x5aa586(_0x2079b6)[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x3314ae=>{if(!_0x3314ae||_0x3314ae[_0x2fe6a6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2fe6a6([0x6f,0x6b]))return _0x2fe6a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x986c2f(_0x31fe5f(_0x13a064+_0x308325))!=_0x3314ae[_0x2fe6a6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2fe6a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64]);})[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x2f1c7c=>(_0x3f5fd3(),_0x2f1c7c),()=>{const _0x154f7d=_0x50e7f8();return null==_0x154f7d?(_0x3f5fd3(),_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64])):_0x2fe6a6(_0x127b19-_0x154f7d>(0x574a8eb3^_0x53b376)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x1786b3)[_0x2fe6a6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1786b3(_0x2fe6a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4b3e2d=0x7370e433^_0x53b376;function _0x3f5fd3(){const _0x4f51a1=_0x2fe6a6([0x6c,0x6c,0x63,0x74,0x2d])+_0x986c2f(_0x31fe5f(_0x21914f)),_0x345776=_0x323991(_0x986c2f(window[_0x2fe6a6([0x4d,0x61,0x74,0x68])][_0x2fe6a6([0x63,0x65,0x69,0x6c])](_0x127b19/_0x4b3e2d)));window[_0x2fe6a6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2fe6a6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f51a1,_0x345776);}function _0x50e7f8(){const _0x4f0846=_0x2fe6a6([0x6c,0x6c,0x63,0x74,0x2d])+_0x986c2f(_0x31fe5f(_0x21914f)),_0xb04b7c=window[_0x2fe6a6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2fe6a6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f0846);return _0xb04b7c?window[_0x2fe6a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x323991(_0xb04b7c),0x10)*_0x4b3e2d:null;}function _0x5aa586(_0x9309b5){return new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x59eaa9,_0x584268)=>{_0x9309b5[_0x2fe6a6([0x74,0x68,0x65,0x6e])](_0x59eaa9,_0x584268),window[_0x2fe6a6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x584268,0x7347de73^_0x53b376);});}}_0x38d3a4[_0x2fe6a6([0x6f,0x6e])](_0x2fe6a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x56111c,_0x2941d9)=>{if(_0x2941d9[0x0]!=_0x21914f)return _0x1786b3(_0x2fe6a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2941d9[0x1]={..._0x2941d9[0x1],[_0x2fe6a6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x13a064};},{[_0x2fe6a6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2fe6a6([0x68,0x69,0x67,0x68])}),_0x38d3a4[_0x2fe6a6([0x6f,0x6e])](_0x2fe6a6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x57320f=>{_0x653cd9(_0x57320f[_0x2fe6a6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x506948=!0x0,_0x173e1d(_0x57320f[_0x2fe6a6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2fe6a6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2fe6a6([0x6c,0x6f,0x77])}),_0x813322[_0x2fe6a6([0x74,0x68,0x65,0x6e])](()=>{_0x506948||_0x1786b3(_0x2fe6a6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2fe237(){return _0x38d3a4[_0x2fe6a6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2fe6a6([0x76,0x69,0x65,0x77])][_0x2fe6a6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2fe6a6([0x61,0x75,0x74,0x6f]);}function _0x5aee53(){_0x38d3a4[_0x2fe6a6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2fe6a6([0x76,0x69,0x65,0x77])][_0x2fe6a6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2fe6a6([0x61,0x75,0x74,0x6f]);}}function _0x5f5eff(_0x43bd3a){const _0x4d1f20=[new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f077d=>setTimeout(_0x5f077d,0x734f347f^_0x53b376)),_0x813322[_0x2fe6a6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd90f9d=>{let _0x109192=0x0;_0x38d3a4[_0x2fe6a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2fe6a6([0x6f,0x6e])](_0x2fe6a6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x130431,_0x3fd20c)=>{_0x3fd20c[0x0][_0x2fe6a6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x109192++,_0x109192==(0x73460f5b^_0x53b376)&&(_0xd90f9d(),_0x130431[_0x2fe6a6([0x6f,0x66,0x66])]());});}))];return window[_0x2fe6a6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2fe6a6([0x72,0x61,0x63,0x65])](_0x4d1f20)[_0x2fe6a6([0x74,0x68,0x65,0x6e])](()=>_0x43bd3a);}async function _0x5c4614(){await _0x813322,_0x38d3a4[_0x2fe6a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2fe6a6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3782fb,_0x38d3a4[_0x2fe6a6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2fe6a6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3782fb,_0x38d3a4[_0x2fe6a6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2fe6a6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x13e893(){return window[_0x2fe6a6([0x67,0x6c,0x6f,0x62])]&&window[_0x2fe6a6([0x67,0x6c,0x6f,0x62])][_0x2fe6a6([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x3b1ada(){return _0x25481e(_0x2fe6a6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1eebda(_0x2fe6a6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2fe6a6([0x73,0x74,0x61,0x74,0x65])]==_0x2fe6a6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x17a017(){return _0x25481e(_0x2fe6a6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x493726(){return _0x25481e(_0x2fe6a6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x24ba63(_0x49d76b){const _0xdd36fa=_0x526d3d();_0x38d3a4[_0xdd36fa]=_0x2fe6a6([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x49d76b,_0x49d76b!=_0x2fe6a6([0x56,0x61,0x6c,0x69,0x64])&&_0x5c4614();}function _0x526d3d(){const _0x24a800=window[_0x2fe6a6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2fe6a6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2fe6a6([0x6e,0x6f,0x77])]())[_0x2fe6a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2fe6a6([0x2e]),'');let _0x23bddf=_0x2fe6a6([0x4b]);for(let _0x32fec2=0x0;_0x32fec2<_0x24a800[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x32fec2+=0x2){let _0x4996f8=window[_0x2fe6a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x24a800[_0x2fe6a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x32fec2,_0x32fec2+0x2));_0x4996f8>=_0x117979[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4996f8-=_0x117979[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x23bddf+=_0x117979[_0x4996f8];}return _0x23bddf;}function _0x1eca3c(){const _0x41348d=_0x2c03df[_0x2fe6a6([0x73,0x70,0x6c,0x69,0x74])](_0x2fe6a6([0x2e]));if(0x3!=_0x41348d[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2bcb4e(_0x41348d[0x1]);function _0x2bcb4e(_0x2de94a){const _0x43eea7=_0x1f4d5b(_0x2de94a);return _0x43eea7&&_0x2ebd01()?_0x43eea7:null;function _0x2ebd01(){const _0x10544e=_0x43eea7[_0x2fe6a6([0x6a,0x74,0x69])],_0x238894=window[_0x2fe6a6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10544e[_0x2fe6a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x10544e[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x196360={..._0x43eea7,[_0x2fe6a6([0x6a,0x74,0x69])]:_0x10544e[_0x2fe6a6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x10544e[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x196360[_0x2fe6a6([0x76,0x63])],_0x31fe5f(_0x196360)==_0x238894;}}}async function _0x226b37(){let _0x5cfa19=!0x0;try{const _0x1634c3=_0x2c03df[_0x2fe6a6([0x73,0x70,0x6c,0x69,0x74])](_0x2fe6a6([0x2e])),[_0x3b537e,_0x5e80e2,_0x16ac1d]=_0x1634c3;return _0x2694da(_0x3b537e),await _0x8bfda7(_0x3b537e,_0x5e80e2,_0x16ac1d),_0x5cfa19;}catch{return!0x1;}function _0x2694da(_0x28b04c){const _0x597e8d=_0x1f4d5b(_0x28b04c);_0x597e8d&&_0x597e8d[_0x2fe6a6([0x61,0x6c,0x67])]==_0x2fe6a6([0x45,0x53,0x32,0x35,0x36])||(_0x5cfa19=!0x1);}async function _0x8bfda7(_0x4106fd,_0x183fdc,_0x97df1e){const _0x33284c=window[_0x2fe6a6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2fe6a6([0x66,0x72,0x6f,0x6d])](_0xba3524(_0x97df1e),_0x50d72b=>_0x50d72b[_0x2fe6a6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x25e76c=new window[(_0x2fe6a6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2fe6a6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4106fd+_0x2fe6a6([0x2e])+_0x183fdc),_0x3f0f61=window[_0x2fe6a6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2fe6a6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3f0f61)return;const _0x3789f8=await _0x3f0f61[_0x2fe6a6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2fe6a6([0x6a,0x77,0x6b]),_0x5034f4,{[_0x2fe6a6([0x6e,0x61,0x6d,0x65])]:_0x2fe6a6([0x45,0x43,0x44,0x53,0x41]),[_0x2fe6a6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2fe6a6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2fe6a6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3f0f61[_0x2fe6a6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2fe6a6([0x6e,0x61,0x6d,0x65])]:_0x2fe6a6([0x45,0x43,0x44,0x53,0x41]),[_0x2fe6a6([0x68,0x61,0x73,0x68])]:{[_0x2fe6a6([0x6e,0x61,0x6d,0x65])]:_0x2fe6a6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3789f8,_0x33284c,_0x25e76c)||(_0x5cfa19=!0x1);}}function _0x1f4d5b(_0x2a9253){return _0x2a9253[_0x2fe6a6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2fe6a6([0x65,0x79]))?JSON[_0x2fe6a6([0x70,0x61,0x72,0x73,0x65])](_0xba3524(_0x2a9253)):null;}function _0xba3524(_0x4ca53a){return window[_0x2fe6a6([0x61,0x74,0x6f,0x62])](_0x4ca53a[_0x2fe6a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2fe6a6([0x2b]))[_0x2fe6a6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2fe6a6([0x2f])));}function _0x31fe5f(_0x59b58a){let _0x358292=0x1505;function _0x3a8102(_0x5d4633){for(let _0xcea788=0x0;_0xcea788<_0x5d4633[_0x2fe6a6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xcea788++){const _0x15488c=_0x5d4633[_0x2fe6a6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xcea788);_0x358292=(_0x358292<<0x5)+_0x358292+_0x15488c,_0x358292&=_0x358292;}}function _0x2495ef(_0x3b9c41){Array[_0x2fe6a6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3b9c41)?_0x3b9c41[_0x2fe6a6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2495ef):_0x3b9c41&&typeof _0x3b9c41==_0x2fe6a6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2fe6a6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3b9c41)[_0x2fe6a6([0x73,0x6f,0x72,0x74])]()[_0x2fe6a6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x22b0d4,_0x44afb0])=>{_0x3a8102(_0x22b0d4),_0x2495ef(_0x44afb0);}):_0x3a8102(window[_0x2fe6a6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3b9c41));}return _0x2495ef(_0x59b58a),_0x358292>>>0x0;}function _0x986c2f(_0x1b1f1d){return _0x1b1f1d[_0x2fe6a6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2fe6a6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2fe6a6([0x30]));}function _0x323991(_0x620594){return _0x620594[_0x2fe6a6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2fe6a6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2fe6a6([0x6a,0x6f,0x69,0x6e])]('');}function _0x25481e(_0x1a74ca){return _0x38d3a4[_0x2fe6a6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2fe6a6([0x68,0x61,0x73])](_0x1a74ca);}function _0x1eebda(_0x373b6b){return _0x38d3a4[_0x2fe6a6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2fe6a6([0x67,0x65,0x74])](_0x373b6b);}function _0x3782fb(){}function _0x2fe6a6(_0x56210b){return _0x56210b['map'](_0x30cdaa=>String['fromCharCode'](_0x30cdaa))['join']('');}_0x24ba63(await _0x44078a());}(this);}['destroy'](){const _0x482cce=this['editor']['plugins']['get'](o),_0x77d1d9=this['editor']['config']['get']('collaboration.channelId');for(const _0x367675 of _0x482cce['getCommentThreads']({'channelId':_0x77d1d9}))_0x482cce['_detachCommentThread'](_0x367675['id']),_0x482cce['_threads']['delete'](_0x367675['id']);super['destroy']();}['hasMarkerForId'](_0x38ac6c){return this['getAllMarkersForId'](_0x38ac6c)['length']>0x0;}['getAllMarkersForId'](_0x1559b5){const _0x160694=[];for(const _0x375aa9 of this['editor']['model']['markers'])_0x375aa9['name']['startsWith']('comment:'+_0x1559b5)&&_0x160694['push'](_0x375aa9);return _0x160694;}['scrollToThreadMarker'](_0x4388c9){setTimeout(()=>{const _0x93d1a7=this['_getTargetForId'](_0x4388c9);if(!_0x93d1a7)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x4388c9&&nt({'target':_0x93d1a7[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4233fe){this['editor']['model']['change'](()=>{for(const _0x31da8c of this['getAllMarkersForId'](_0x4233fe))this['editor']['editing']['reconvertMarker'](_0x31da8c);});}['_attachArchivedThread'](_0x41ce0f){const _0x1629fe=this['editor']['plugins']['get'](o),_0x2c880b=this['editor']['plugins']['get'](b),_0x137b4c=_0x1629fe['getCommentThread'](_0x41ce0f);if(!_0x137b4c['isAttached']){const _0x251092=_0x137b4c['attachTo'](()=>this['_getTargetForId'](_0x137b4c['id']));_0x2c880b['registerAnnotation'](_0x251092),_0x137b4c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3bd86c=this['editor'],_0x3f9a8c=_0x3bd86c['plugins']['get'](it);_0x3bd86c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x31b3a0,_0x4bce8c)=>{const {id:_0x188078}=ft(_0x31b3a0['markerName']),_0x3d200a=_0x3bd86c['plugins']['get'](o)['getCommentThread'](_0x188078),_0xd33f58=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x188078;let _0x50fea3;if(_0x3d200a&&_0x3d200a['isResolved']&&!_0xd33f58&&_0x31b3a0['item'])return _0x4bce8c['consumable']['consume'](_0x31b3a0['item'],'addMarker:'+_0x31b3a0['markerName']),_0x4bce8c['consumable']['consume'](_0x31b3a0['item'],'removeMarker:'+_0x31b3a0['markerName']),null;const _0x3ba45b=['ck-comment-marker'];return _0xd33f58&&_0x3ba45b['push']('ck-comment-marker--active'),_0x50fea3=_0x3d200a?.['length']?_0x3d200a['comments']['first']['author']['id']:_0x3f9a8c['me']['id'],{'classes':_0x3ba45b,'attributes':{'data-comment':_0x188078,'data-author-id':_0x50fea3}};}}),_0x3bd86c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4c34ef,{options:_0x23ed54})=>{if(_0x23ed54['showCommentHighlights'])return null;const _0x425a30=_0x3bd86c['plugins']['get'](o),_0x300390=_0x3bd86c['model']['markers']['get'](_0x4c34ef),{id:_0x58499e,part:_0x37ca2c}=ft(_0x4c34ef);return _0x300390&&!_0x300390['affectsData']||_0x23ed54['ignoreResolvedComments']&&_0x425a30['getCommentThread'](_0x58499e)?.['isResolved']?null:{'group':'comment','name':_0x37ca2c?_0x58499e+':'+_0x37ca2c:_0x58499e};}}),_0x3bd86c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2433c9,{writer:_0x232a6e})=>_0x232a6e['createElement']('$marker',{'data-name':'comment:'+_0x2433c9['getAttribute']('id')})}),_0x3bd86c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2800f9=this['editor'],_0xfb4a34=_0x2800f9['plugins']['get'](o),_0x57aaa3=new Set(),_0x4ccb36=new Set();_0x2800f9['model']['document']['registerPostFixer'](_0x5128c8=>{let _0x318d77=!0x1;for(const {name:_0x3a8173,data:_0x333e41}of _0x2800f9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1b5f39,id:_0xa720b8}=ft(_0x3a8173);let _0x1f4544=_0x333e41['newRange'];if('comment'!==_0x1b5f39||!_0x1f4544)continue;const _0x148b56='$graveyard'===_0x1f4544['root']['rootName'];_0x148b56||(_0x1f4544=ht(_0x1f4544,_0x2800f9['model']),!_0x1f4544||_0x1f4544['isCollapsed']||!_0x333e41['newRange']||_0x1f4544['isEqual'](_0x333e41['newRange']))?_0x2800f9['model']['hasContent'](_0x1f4544)&&!_0x148b56?this['isThreadsLoadingPaused']?_0x57aaa3['add'](_0x3a8173):this['_handleThreadMarker'](_0x3a8173,_0xa720b8):(_0x4ccb36['add'](_0x3a8173),_0x57aaa3['delete'](_0x3a8173),_0x5128c8['removeMarker'](_0x3a8173),_0x318d77=!0x0):(_0x5128c8['updateMarker'](_0x3a8173,{'range':_0x1f4544}),_0x318d77=!0x0);}return _0x318d77;}),this['on']('change:isThreadsLoadingPaused',(_0x25ab91,_0x1ad68f,_0x3198a3)=>{if(!_0x3198a3&&_0x57aaa3['size'])for(const _0xcbed3a of _0x57aaa3){const {id:_0x3fbdc8}=ft(_0xcbed3a);_0x57aaa3['delete'](_0xcbed3a),_0x2800f9['model']['markers']['get'](_0xcbed3a)&&this['_handleThreadMarker'](_0xcbed3a,_0x3fbdc8);}}),this['listenTo'](_0x2800f9['model']['document'],'change',()=>{for(const {name:_0x30a3f4,data:{newRange:_0x9c225c}}of _0x2800f9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x13f91e,id:_0x53c092}=ft(_0x30a3f4);if('comment'!==_0x13f91e)continue;const _0x14c29f=_0xfb4a34['getCommentThread'](_0x53c092),_0x256808=this['hasMarkerForId'](_0x53c092);_0x14c29f&&(!_0x14c29f['_hasTargetInContent']&&_0x9c225c&&_0x2800f9['editing']['view']['once']('render',()=>{const _0x1d638c=_0x2800f9['plugins']['get'](y),_0x2a9285=_0xfb4a34['_threadToController']['get'](_0x14c29f)['view'];_0x1d638c['getByInnerView'](_0x2a9285)['refreshVisibility']();},{'priority':'low'}),_0x14c29f['_hasTargetInContent']=_0x256808||!!_0x9c225c),_0x9c225c||(_0x4ccb36['add'](_0x30a3f4),_0x57aaa3['delete'](_0x30a3f4));}for(const _0x1eeeeb of _0x4ccb36){const {id:_0x57c955}=ft(_0x1eeeeb),_0x3d8f93=_0xfb4a34['getCommentThread'](_0x57c955);if(_0x57aaa3['delete'](_0x1eeeeb),!_0x3d8f93)continue;const _0x91d9b8=this['hasMarkerForId'](_0x57c955);_0x91d9b8||_0x3d8f93['isSubmitted']?_0x91d9b8||_0x3d8f93['unlinkedAt']||_0x3d8f93['setUnlinkedAt'](new Date()):_0x3d8f93['remove']();}_0x4ccb36['clear']();});}['_handleInitialThreads'](_0x37682a){_0x37682a['forEach'](_0x2e1509=>{_0x2e1509['unlinkedAt']&&this['_attachArchivedThread'](_0x2e1509['id']);});}['_getTargetForId'](_0x5d467d){const _0x40b8d7=this['editor'],_0x47dce2=this['getAllMarkersForId'](_0x5d467d);return et(_0x40b8d7['editing'],_0x47dce2);}['_getTextContext'](_0x4b72ce){const _0x2d1ec2=this['getAllMarkersForId'](_0x4b72ce);let _0x39814c='',_0x4a0c5f=!0x1;for(const _0x28b191 of _0x2d1ec2){const _0x1e04f0=_0x28b191['getRange']();for(const _0x2ffa5d of Array['from'](_0x1e04f0['getItems']()))_0x2ffa5d['is']('$textProxy')?(_0x39814c&&_0x4a0c5f&&(_0x39814c+='\x20',_0x4a0c5f=!0x1),_0x39814c+=_0x2ffa5d['data']):_0x4a0c5f=!0x0;_0x4a0c5f=!0x0;}return _0x39814c['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1a9983,_0x85dbd7){const _0x315332=this['editor'],_0x373c73=_0x315332['plugins']['get'](o);let _0x42deb6=_0x373c73['getCommentThread'](_0x85dbd7);const _0x4c3190=_0x315332['config']['get']('collaboration.channelId'),_0x21cb9e=_0x315332['plugins']['get'](b);if(_0x42deb6&&(_0x42deb6['unlinkedAt']&&_0x42deb6['setUnlinkedAt'](null),_0x42deb6['isAttached']))return _0x42deb6;return!this['getAllMarkersForId'](_0x85dbd7)[0x0]['managedUsingOperations']?_0x315332['editing']['view']['once']('render',()=>{if(_0x373c73['getCommentThread'](_0x85dbd7))return;const _0x396a41=_0x315332['plugins']['get'](y);_0x42deb6=_0x373c73['openNewCommentThread']({'channelId':_0x4c3190,'threadId':_0x85dbd7,'target':()=>this['_getTargetForId'](_0x85dbd7),'context':{'type':'text','value':this['_getTextContext'](_0x85dbd7)}});const _0x5cea9b=_0x373c73['_threadToController']['get'](_0x42deb6)['view'],_0x352952=_0x396a41['getByInnerView'](_0x5cea9b);_0x352952&&_0x21cb9e['registerAnnotation'](_0x352952);},{'priority':'low'}):_0x373c73['fetchCommentThread']({'channelId':_0x4c3190,'threadId':_0x85dbd7})['then'](_0x1b95b3=>{if('destroyed'!==_0x315332['state']){if(_0x42deb6=_0x1b95b3,_0x42deb6&&!_0x42deb6['isAttached']){const _0x1ea3bc=_0x42deb6['attachTo'](()=>this['_getTargetForId'](_0x85dbd7));_0x21cb9e['registerAnnotation'](_0x1ea3bc),_0x42deb6['isResolved']&&this['_reconvertMarkers'](_0x85dbd7);}else{if(!_0x42deb6){const _0x1812da=this['getAllMarkersForId'](_0x85dbd7);_0x315332['model']['change'](_0x1637c1=>{for(const _0x31dea7 of _0x1812da)_0x1637c1['removeMarker'](_0x31dea7);});}}}}),_0x42deb6;}['_handleThreadMarker'](_0x3e76ce,_0x34b120){const _0x352a19=this['_attachMarkerToThread'](_0x3e76ce,_0x34b120);_0x352a19&&!_0x352a19['context']&&_0x352a19['setContext']({'type':'text','value':this['_getTextContext'](_0x34b120)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1b3ada=this['editor'];rt(_0x1b3ada['model'],({left:_0x441b1a,entered:_0x385aa8})=>{for(const _0x2c7ea6 of _0x441b1a)if(mt(_0x2c7ea6)){_0x1b3ada['ui']['ariaLiveAnnouncer']['announce'](N(_0x1b3ada['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1422c8 of _0x385aa8)if(mt(_0x1422c8)){_0x1b3ada['ui']['ariaLiveAnnouncer']['announce'](N(_0x1b3ada['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x32ac22)));break;}});}}function dt(_0x46aa5a,_0x31a59f){return _0x31a59f?_0x46aa5a+':'+_0x31a59f:_0x46aa5a;}function ht(_0x3c6de8,_0x3d6647){const _0x4c07fc=_0x3d6647['schema'],_0x2df6b6=_0x3d6647['createRange'](_0x3c6de8['start']);for(const _0x3c087f of _0x3c6de8['getWalker']()){const {type:_0x3a954c,item:_0x132084,nextPosition:_0x508bfc}=_0x3c087f;if('text'===_0x3a954c||_0x4c07fc['isObject'](_0x132084)){const _0xd91dc9=_0x3d6647['createPositionBefore'](_0x132084);_0x2df6b6['isCollapsed']&&(_0x2df6b6['start']=_0xd91dc9),_0x2df6b6['end']=_0x508bfc;}}return _0x2df6b6;}function mt(_0x59339d){return'comment'===ft(_0x59339d['name'])['group'];}class s extends _0x37aa4b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x36da3e=this['editor'],_0x24eff1=_0x36da3e['plugins']['get'](o),_0xa41569=_0x36da3e['plugins']['get'](r),_0x3d80fa=_0x36da3e['plugins']['get'](y),_0x21c91c=_0x36da3e['plugins']['get'](b);_0x36da3e['ui']['componentFactory']['add']('comment',()=>{const _0x3a14cc=this['_createUIButton'](_0x1c15c2);return _0x3a14cc['tooltip']=!0x0,_0x3a14cc;}),_0x36da3e['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x34ca18)),_0x21c91c['addSourceCollector'](()=>{const _0x545cf0=[];for(const [_0x39e13f,_0x14c6f2]of _0x24eff1['_threadToController']){const _0x3c208d=_0xa41569['getAllMarkersForId'](_0x39e13f['id']),_0x57501a=_0x3c208d['map'](_0x2e2e02=>_0x2e2e02['getRange']());_0x3c208d['length']>0x0&&_0x545cf0['push']([_0x14c6f2['view'],_0x57501a]);}return _0x545cf0;}),this['listenTo'](_0x3d80fa,'change:activeAnnotations',(_0x209539,_0x1e6fea,_0x1cef69)=>{const _0x493d4d=Array['from'](_0x1cef69)['map'](_0x200158=>_0x200158['innerView'])['find'](_0x587322=>_0x24eff1['_viewToController']['has'](_0x587322));if(!_0x493d4d)return void(_0xa41569['activeMarker']=null);const _0x5d3222=_0x24eff1['_viewToController']['get'](_0x493d4d)['model']['id'],_0x364918='comment:'+_0x5d3222;_0x5d3222&&_0xa41569['hasMarkerForId'](_0x5d3222)?_0xa41569['activeMarker']=_0x364918:_0xa41569['activeMarker']&&(_0xa41569['activeMarker']=null);}),this['listenTo'](_0x24eff1,'removeCommentThread',(_0x49ffa1,{threadId:_0x28387a,isFromAdapter:_0x421348})=>{!_0x421348&&_0x36da3e['ui']['focusTracker']['isFocused']&&_0xa41569['hasMarkerForId'](_0x28387a)&&_0x36da3e['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x24eff1,'addComment',(_0x53d3ef,{threadId:_0x1b559a,isFromAdapter:_0x26e9ec})=>{if(_0x26e9ec||!_0xa41569['hasMarkerForId'](_0x1b559a)||!_0x24eff1['hasCommentThread'](_0x1b559a))return;0x1===_0x24eff1['getCommentThread'](_0x1b559a)['length']&&(_0x36da3e['editing']['view']['focus'](),_0x53d3ef['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x24daa4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1cfc3c;for(const _0x57909d in _0x24daa4){const _0x588184=_0x57909d,_0x57e269=_0x24daa4[_0x588184];if('commentsLicenseKeyValid'==_0x57e269||'commentsLicenseKeyInvalid'==_0x57e269||'commentsLicenseKeyExpired'==_0x57e269||'commentsLicenseKeyDomainLimit'==_0x57e269||'commentsLicenseKeyNotAllowed'==_0x57e269||'commentsLicenseKeyEvaluationLimit'==_0x57e269||'commentsLicenseKeyUsageLimit'==_0x57e269){delete _0x24daa4[_0x588184],_0x1cfc3c=_0x57e269,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1cfc3c&&_0x24daa4['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x8e78b5){const _0x587ec1=this['editor'],_0x458e52=new _0x8e78b5(_0x587ec1['locale']),_0x3ef7f6=_0x587ec1['commands']['get']('addCommentThread');return _0x458e52['set']({'label':N(_0x587ec1['locale'],'Comment'),'icon':_0xb70e92}),_0x458e52['bind']('isEnabled')['to'](_0x3ef7f6,'isEnabled',_0x3ef7f6,'hasContent',(_0xf79191,_0x7ca2eb)=>_0xf79191&&_0x7ca2eb),this['listenTo'](_0x458e52,'execute',()=>{_0x3ef7f6['execute']();}),_0x458e52;}}class i extends _0x37aa4b{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x453110){super(_0x453110),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5061b5,_0x2a2000,_0x11cd1b)=>{_0x11cd1b?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2e472d,_0xd2dd3f]of this['editor']['commands'])_0xd2dd3f['affectsData']&&'addCommentThread'!==_0x2e472d&&_0xd2dd3f['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x15a0ea=this['editor']['editing']['view']['document'];this['listenTo'](_0x15a0ea,'cut',_0x654bdb=>_0x654bdb['stop'](),{'priority':'highest'}),this['listenTo'](_0x15a0ea,'clipboardInput',_0xa72cee=>_0xa72cee['stop'](),{'priority':'highest'}),this['listenTo'](_0x15a0ea,'delete',_0x5deb72=>_0x5deb72['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5adf20,_0x5bc4cc]of this['editor']['commands'])_0x5bc4cc['affectsData']&&'addCommentThread'!==_0x5adf20&&_0x5bc4cc['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x593a50{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x210664){super(_0x210664),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x147842=this['context']['plugins']['get'](y);this['listenTo'](_0x147842,'_activateAnnotation',(_0x3bb385,_0x248477)=>{for(const _0x521733 of this['activeUIs']){const _0x5ecf44=this['_uis']['get'](_0x521733);(0x0,this['uisData']['get'](_0x521733)['filter'])(_0x248477)&&_0x5ecf44['setActiveAnnotation'](_0x248477);}}),this['listenTo'](_0x147842,'_deactivateAllAnnotations',()=>{for(const _0x5cc34b of this['activeUIs']){this['_uis']['get'](_0x5cc34b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x147842['_visibleAnnotations'],'add',(_0x5d31d3,_0x543bac)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x543bac);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x375724){return this['activeUIs']['has'](_0x375724);}['activate'](_0xbb5978,_0x494ff0=this['defaultFilter']){const _0x5cb72b=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0xbb5978))throw new _0x14fd42('annotationsuis-missing-ui',this,{'uiName':_0xbb5978});this['isActive'](_0xbb5978)&&this['deactivate'](_0xbb5978),this['activeUIs']['add'](_0xbb5978);const _0x27a29f=new S();v({'source':_0x5cb72b['_visibleAnnotations'],'target':_0x27a29f,'filter':_0x494ff0}),this['uisData']['set'](_0xbb5978,{'collection':_0x27a29f,'filter':_0x494ff0});const _0x58a7bc=this['_uis']['get'](_0xbb5978);_0x58a7bc['attach'](_0x27a29f),this['listenTo'](_0x58a7bc,'change:activeAnnotation',(_0x30f0c4,_0x478118,_0x1e4cf6,_0x456789)=>{_0x456789&&_0x5cb72b['_removeActiveAnnotation'](_0x456789),_0x1e4cf6&&_0x5cb72b['_addActiveAnnotation'](_0x1e4cf6);});}['deactivate'](_0x327574){if(this['activeUIs']['delete'](_0x327574),!this['_uis']['has'](_0x327574))throw new _0x14fd42('annotationsuis-missing-ui',this,{'uiName':_0x327574});const _0x3cdf6c=this['_uis']['get'](_0x327574);_0x3cdf6c['detach'](),this['stopListening'](_0x3cdf6c),this['uisData']['get'](_0x327574)['collection']['destroy'](),this['uisData']['delete'](_0x327574);}['switchTo'](_0x2bd873){if(!this['_uis']['has'](_0x2bd873))throw new _0x14fd42('annotationsuis-missing-ui',this,{'uiName':_0x2bd873});const _0x21cb44=this['context']['plugins']['get'](y),_0x44c097=Array['from'](_0x21cb44['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2bd873);const _0x2966bc=this['_uis']['get'](_0x2bd873);_0x2966bc['setActiveAnnotation'](_0x44c097),_0x2966bc['_setSelectedAnnotations']&&_0x44c097&&_0x2966bc['_setSelectedAnnotations']([_0x44c097]);}['deactivateAll'](){for(const _0xa47dc2 of this['activeUIs'])this['deactivate'](_0xa47dc2);}['register'](_0x196f22,_0x270aa2){if(this['_uis']['has'](_0x196f22))throw new _0x14fd42('annotationsuis-register-already-registered');if('function'!=typeof _0x270aa2['attach']||'function'!=typeof _0x270aa2['detach']||'function'!=typeof _0x270aa2['setActiveAnnotation'])throw new _0x14fd42('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x196f22,_0x270aa2);}['refilterAnnotations'](){const _0x3f1b98=this['context']['plugins']['get'](y)['collection'],_0x419124=new Map(),_0x8cf8d=Array['from'](this['activeUIs']);for(const _0x16c97c of this['activeUIs']){const _0x458f05=this['uisData']['get'](_0x16c97c)['collection'];for(const _0x4a990b of _0x458f05)_0x419124['set'](_0x4a990b,_0x16c97c);}for(const _0x232460 of _0x3f1b98){const _0x50ded4=_0x419124['get'](_0x232460);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x232460);const _0x272c31=_0x8cf8d['find'](_0x344f88=>this['uisData']['get'](_0x344f88)['filter'](_0x232460));_0x50ded4!==_0x272c31&&(_0x50ded4&&this['uisData']['get'](_0x50ded4)['collection']['remove'](_0x232460),_0x272c31&&this['uisData']['get'](_0x272c31)['collection']['add'](_0x232460));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x40d8c7){const _0x259703=[];for(const _0xdba043 of this['activeUIs']){(0x0,this['uisData']['get'](_0xdba043)['filter'])(_0x40d8c7)&&_0x259703['push'](_0xdba043);}if(_0x259703['length']>0x1)throw new _0x14fd42('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x259703,'annotationType':_0x40d8c7['type']});}}const _i=/* #__PURE__ -- @preserve */
32
- Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x507dd1){super(_0x507dd1);const _0x7ce048=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0x37af46(),this['focusCycler']=new _0x599a03({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x7ce048['to']('class')],'style':{'minHeight':_0x7ce048['to']('minHeight',_0x29ad23=>'number'==typeof _0x29ad23?_i(_0x29ad23+0xa):null)},'dir':_0x507dd1['uiLanguageDirection'],'role':'application','aria-label':N(_0x507dd1,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x507dd1,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x24add6=>{this['_updateItemPositionInFocusables'](_0x24add6['source']);}),this['list']['forEach'](_0x2b02b0=>{this['focusTracker']['add'](_0x2b02b0['element']),this['_updateItemPositionInFocusables'](_0x2b02b0);}),this['list']['on']('change',(_0x4cc7dc,_0x1dbc16)=>{for(const _0x502452 of _0x1dbc16['removed'])this['focusTracker']['remove'](_0x502452['element']),this['focusables']['remove'](_0x502452);for(const _0x16e82d of _0x1dbc16['added'])this['focusTracker']['add'](_0x16e82d['element']),this['_updateItemPositionInFocusables'](_0x16e82d);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x359a4a){const _0x42d74e=this['focusables']['getIndex'](_0x359a4a);let _0xb1c914,_0x3c2757;for(const _0x405086 of this['focusables'])if(_0x359a4a['top']<_0x405086['top']){_0xb1c914=_0x405086;break;}if(_0x3c2757=_0xb1c914?this['focusables']['getIndex'](_0xb1c914):this['focusables']['length'],-0x1!==_0x42d74e){if(_0x42d74e===_0x3c2757-0x1)return;this['focusables']['remove'](_0x359a4a),_0x3c2757=_0xb1c914?this['focusables']['getIndex'](_0xb1c914):this['focusables']['length'];}this['focusables']['add'](_0x359a4a,_0x3c2757);}}const Ot=/* #__PURE__ -- @preserve */
33
- Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x23153f){super(_0x23153f),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2ebdd5,_0x7f515f)=>_0x2ebdd5+_0x7f515f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3b2ef7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3b2ef7['to']('isAnimationDisabled',_0x1909f9=>_0x1909f9?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3b2ef7['to']('top',_0xdc9ec8=>Ot(_0xdc9ec8))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3d17f2=this['element']['clientHeight'];_0x3d17f2&&(this['height']=_0x3d17f2);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x593a50{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1989f1){super(_0x1989f1),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x263764=this['context']['config']['get']('sidebar.container');_0x263764&&this['setContainer'](_0x263764);}['setContainer'](_0x2e1ee0){if(!g(_0x2e1ee0))throw new _0x14fd42('sidebar-setcontainer-invalid-element');this['container']=_0x2e1ee0;}['_attachToContainer']({viewClass:_0x467c8f='',spaceBetweenItems:_0x34bfdf=0x19}={}){if(!g(this['container']))throw new _0x14fd42('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x467c8f,this['_spaceBetweenItems']=_0x34bfdf;}['rearrange']({removedAnnotation:_0x2d54cd,previousAnnotation:_0x3156de,nextAnnotation:_0x225762}){const _0x345199=this['getSidebarItemView'](_0x2d54cd);this['view']['list']['remove'](_0x345199),this['_destroySidebarItemView'](_0x2d54cd),_0x3156de&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3156de)),_0x225762&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x225762)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3ca031,activatedAnnotation:_0x257a40,disableAnimationOnActivatedAnnotation:_0x555c8f}){if(this['_activeAnnotation']=_0x257a40,_0x3ca031){_0x3ca031['isActive']=!0x1;const _0x14320d=this['getSidebarItemView'](_0x3ca031);_0x14320d&&_0x555c8f&&(_0x14320d['isAnimationDisabled']=!0x1);}if(_0x257a40){const _0xcfeff1=this['getSidebarItemView'](_0x257a40);_0xcfeff1&&(_0x257a40['isActive']=!0x0,_0x555c8f&&(_0xcfeff1['isAnimationDisabled']=!0x0,_0xcfeff1['top']+=0x1),this['_alignToTargetRect'](_0xcfeff1));}}['_detachFromContainer'](_0x10305a){if(this['view']['element']['remove'](),_0x10305a){for(const _0x2e6b50 of _0x10305a)this['_destroySidebarItemView'](_0x2e6b50);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2c7cab,_0x3465c5){_0x3465c5||(_0x3465c5=_0x2c7cab['view']);const _0x29cfed=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x29cfed,_0x2c7cab),this['_annotationToSidebarItemView']['set'](_0x2c7cab,_0x29cfed),_0x29cfed['content']['add'](_0x3465c5),this['listenTo'](_0x2c7cab['view'],'change:targetRect',(_0x415c3a,_0x235cf6,_0x307634)=>{const _0x49bff4=this['_getTargetTop'](_0x2c7cab,_0x307634);_0x29cfed['_targetTop']!=_0x49bff4&&(_0x29cfed['_targetTop']=_0x49bff4,this['_setItemTop'](_0x29cfed,_0x49bff4));}),this['listenTo'](_0x29cfed,'change:top',()=>{this['_recalculate'](_0x29cfed,'top');}),this['listenTo'](_0x29cfed,'change:bottom',()=>{this['_recalculate'](_0x29cfed,'bottom');}),this['_alignToTargetRect'](_0x29cfed);const _0x5729a0=this['_getItemBefore'](_0x29cfed);if(_0x5729a0)this['_alignAfterItem'](_0x5729a0,_0x29cfed)||this['_alignToTargetRect'](_0x29cfed);else this['_alignToTargetRect'](_0x29cfed);return this['_updateLastItem'](),this['view']['list']['add'](_0x29cfed),_0x29cfed;}['_alignForTopChange'](_0x536b26){if(!_0x536b26['content']['length'])return;const _0x445f9c=this['_getItemBefore'](_0x536b26);if(!_0x445f9c)return;const _0x1de513=this['_sidebarItemViewToAnnotation']['get'](_0x445f9c),_0x48977e=this['_activeAnnotation'];_0x48977e&&_0x48977e===_0x1de513?this['_alignAfterItem'](_0x445f9c,_0x536b26):this['_alignBeforeItem'](_0x536b26,_0x445f9c);}['_alignForBottomChange'](_0x1ea951){if(!_0x1ea951['content']['length'])return;const _0x1ce8b9=this['_getItemAfter'](_0x1ea951);if(!_0x1ce8b9)return;const _0x2040cc=this['_sidebarItemViewToAnnotation']['get'](_0x1ce8b9),_0x2ab501=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x79f0ba=this['_activeAnnotation'];_0x79f0ba&&_0x79f0ba===_0x2040cc&&_0x2ab501?(this['_alignBeforeItem'](_0x1ce8b9,_0x1ea951),this['_alignAfterItem'](_0x1ea951,_0x1ce8b9)):_0x79f0ba&&_0x79f0ba===_0x2040cc?this['_alignBeforeItem'](_0x1ce8b9,_0x1ea951):this['_alignAfterItem'](_0x1ea951,_0x1ce8b9);}['_recalculate'](_0x582348,_0x4769a1){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x44785c,changedProp:_0xf89bee}of this['_recalculateBuffer'])'top'===_0xf89bee?this['_alignForTopChange'](_0x44785c):this['_alignForBottomChange'](_0x44785c);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x582348,'changedProp':_0x4769a1});}['getSidebarItemView'](_0x412f9d){return this['_annotationToSidebarItemView']['get'](_0x412f9d);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x27260c){const _0x7a3182=this['getSidebarItemView'](_0x27260c);this['stopListening'](_0x7a3182),this['stopListening'](_0x27260c['view']),_0x7a3182['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x27260c),this['_sidebarItemViewToAnnotation']['delete'](_0x7a3182);}['_createSidebarView'](){const _0x50373e=new H(this['context']['locale']);return _0x50373e['render'](),this['on']('change:_lastItem',(_0x45d588,_0x465e4f,_0x4d649,_0x2f6c59)=>{_0x2f6c59&&_0x50373e['unbind']('minHeight'),_0x4d649?_0x50373e['bind']('minHeight')['to'](_0x4d649,'bottom'):_0x50373e['minHeight']=null;}),_0x50373e;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0xa1662a){const _0x4d2fe5=this['_sidebarItemViewToAnnotation']['get'](_0xa1662a),_0x2f73a2=_0x4d2fe5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4d2fe5)-0x1);return _0x2f73a2&&this['getSidebarItemView'](_0x2f73a2)||null;}['_getItemAfter'](_0x858dd9){const _0x43beae=this['_sidebarItemViewToAnnotation']['get'](_0x858dd9),_0x3daf1a=_0x43beae&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x43beae)+0x1);return _0x3daf1a&&this['getSidebarItemView'](_0x3daf1a)||null;}['_alignBeforeItem'](_0x1ac39e,_0x5cc2dd){_0x1ac39e['updateHeight']();const _0x137157=G(_0x5cc2dd['bottom']+this['_spaceBetweenItems'],_0x1ac39e['top']);return!!_0x137157&&(this['_setItemTop'](_0x5cc2dd,_0x5cc2dd['top']-_0x137157),!0x0);}['_alignAfterItem'](_0x32cd12,_0x331acd){_0x32cd12['updateHeight']();const _0x14349a=G(_0x32cd12['bottom']+this['_spaceBetweenItems'],_0x331acd['top']);return!!_0x14349a&&(this['_setItemTop'](_0x331acd,_0x331acd['top']+_0x14349a,!0x1),!0x0);}['_alignToTargetRect'](_0x48388d){const _0x1ed54f=this['_sidebarItemViewToAnnotation']['get'](_0x48388d);if(!_0x1ed54f||!_0x1ed54f['target']||!_0x1ed54f['targetRect'])return;const _0x18cff3=this['_getTargetTop'](_0x1ed54f,_0x1ed54f['targetRect']);this['_setItemTop'](_0x48388d,_0x18cff3);}['_getTargetTop'](_0x56610f,_0x636498){if(null===_0x636498)return 0x0;if(_0x56610f['target']instanceof _0x2dcba1)return _0x636498['top'];{const _0x5bde00=new _0x2dcba1(this['view']['element'])['top'];return _0x636498['top']-_0x5bde00;}}['_setItemTop'](_0x179005,_0x35517a,_0x2c6d8a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2c6d8a&&(_0x35517a=Math['max'](_0x35517a,this['_getMaxAvailableTop'](_0x179005))),_0x179005['top']=_0x35517a;}['_getMaxAvailableTop'](_0x58192f){let _0x39ac23=this['_getItemBefore'](_0x58192f),_0x3ec6c0=0x0;for(;_0x39ac23;)_0x39ac23['updateHeight'](),_0x3ec6c0+=this['_spaceBetweenItems']+_0x39ac23['height'],_0x39ac23=this['_getItemBefore'](_0x39ac23);return _0x3ec6c0;}}function G(_0x343279,_0xfcfc50){return Math['max'](_0x343279-_0xfcfc50,0x0);}function g(_0x53cd08){return null!==_0x53cd08&&'object'==typeof _0x53cd08&&0x1===_0x53cd08['nodeType'];}class e extends _0x593a50{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x223f63){super(_0x223f63),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3d0741(),this['_refreshPositioningDebounced']=_0x533250(()=>{_0x223f63['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5217ac=this['context']['plugins']['get'](j),_0x43ac1d=this['context']['plugins']['get'](z);_0x5217ac['register']('wideSidebar',this),_0x43ac1d['container']&&_0x5217ac['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x33f8b4){if(_0x33f8b4===this['activeAnnotation'])return;const _0x293570=this['context']['plugins']['get'](z);_0x293570['_activeAnnotation']=_0x33f8b4;const _0x93b213=this['activeAnnotation'];_0x293570['refresh']({'blurredAnnotation':_0x93b213,'activatedAnnotation':_0x33f8b4}),this['activeAnnotation']=_0x33f8b4;}['attach'](_0x20fb6f){this['annotations']=_0x20fb6f;const _0x5da70d=this['context']['plugins']['get'](z);if(_0x5da70d['_annotations']=_0x20fb6f,this['isAttached'])throw new _0x14fd42('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5da70d,'set:container',()=>{this['detach'](),this['listenTo'](_0x5da70d,'change:container',_0x30914e=>{_0x30914e['off'](),this['attach'](_0x20fb6f);});}),_0x5da70d['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x533c13=_0x150f31=>{_0x150f31['updateTargetRect'](),_0x5da70d['addAnnotation'](_0x150f31);};for(const _0x2c62ab of _0x20fb6f)_0x533c13(_0x2c62ab);this['listenTo'](_0x20fb6f,'add',(_0x421a12,_0xe73c17)=>{_0x533c13(_0xe73c17);}),this['listenTo'](_0x20fb6f,'remove',(_0x3224d9,_0x48fdc7,_0x18c1f8)=>{_0x5da70d['rearrange']({'removedAnnotation':_0x48fdc7,'previousAnnotation':_0x20fb6f['get'](_0x18c1f8-0x1),'nextAnnotation':_0x20fb6f['get'](_0x18c1f8+0x1)}),_0x48fdc7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x20fb6f,'focus',(_0x469a99,_0x1bac74)=>{this['setActiveAnnotation'](_0x1bac74);}),this['listenTo'](_0x20fb6f,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3d8df6=this['context']instanceof _0x1df1f0?this['context']['editors']:new _0x3d0741([this['context']]);for(const _0x54295c of _0x3d8df6)this['_integrateWithEditorAnnotations'](_0x54295c);this['listenTo'](_0x3d8df6,'add',(_0x5bef28,_0x1e74c9)=>{this['listenTo'](_0x1e74c9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1e74c9);});}),this['listenTo'](_0x3d8df6,'remove',(_0x541652,_0x170002)=>{_0x170002['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x170002['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x14fd42('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x39d1d7=this['context']['plugins']['get'](z);_0x39d1d7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x39d1d7),this['stopListening'](this['annotations']),this['context']instanceof _0x1df1f0&&this['stopListening'](this['context']['editors']);for(const _0x1b7161 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1b7161);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2e3320){if(!_0x2e3320['plugins']['has']('EditorAnnotations'))return;const _0xece4e4=_0x2e3320['plugins']['get']('EditorAnnotations'),_0x56be92=()=>{const _0x25b84b=_0xece4e4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x25b84b[0x0]||null);};this['listenTo'](_0xece4e4,'refresh',_0x56be92),this['listenTo'](_0xece4e4,'blur',(_0x53b5a2,{isAnnotationTracked:_0x5ea4b7})=>{this['activeAnnotation']&&_0x5ea4b7(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xece4e4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xf62b44=>{_0xece4e4['hasDomSelection']()&&(_0x56be92(),_0xf62b44['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xece4e4);}['_destroyEditorAnnotationsIntegration'](_0x216ca3){this['stopListening'](_0x216ca3),this['_editorAnnotations']['remove'](_0x216ca3);}}class C extends _0x1c15c2{['counterView'];constructor(_0x4c07f6){super(_0x4c07f6);const _0x2d61b6=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x461bbc,_0x450c6b)=>_0x461bbc?'...':_0x450c6b['toString']()),this['set']('annotationType',''),this['icon']=_0xb70e92,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2d61b6['to']('annotationType',_0x5803af=>'ck-annotation-counter__badge--'+_0x5803af),_0x2d61b6['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2d61b6['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x593a50{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e0114){super(_0x5e0114),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1bbf07())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3d0741(),this['_refreshPositioningDebounced']=_0x533250(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x287999(this['context']['locale']),this['balloonPanelView']=new _0xa8377a(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1822b3){this['annotations']=_0x1822b3;const _0x41ef1a=this['context']['plugins']['get'](z),_0x4d5dfb=this['balloonPanelView'];if(_0x41ef1a['_annotations']=_0x1822b3,this['isAttached'])throw new _0x14fd42('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x41ef1a,'set:container',()=>{this['detach'](),this['listenTo'](_0x41ef1a,'change:container',_0x1d2c90=>{_0x1d2c90['off'](),this['attach'](_0x1822b3);});}),_0x41ef1a['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x35bb0a=_0x5103a7=>{const _0x387d9e=new C(this['context']['locale']);_0x41ef1a['addAnnotation'](_0x5103a7,_0x387d9e),this['_annotationToNarrowView']['set'](_0x5103a7,_0x387d9e),_0x387d9e['bind']('isDirty','annotationType','number')['to'](_0x5103a7['view'],'isDirty','type','length'),_0x387d9e['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4d5dfb['content']['first']!==_0x5103a7['view']?(this['_showBalloon'](_0x5103a7),_0x5103a7['view']['element']['focus'](),this['setActiveAnnotation'](_0x5103a7)):this['setActiveAnnotation'](null);});};for(const _0x44c0a4 of _0x1822b3)_0x35bb0a(_0x44c0a4);this['listenTo'](_0x1822b3,'add',(_0x11bf3f,_0x1e7761)=>{_0x35bb0a(_0x1e7761);}),this['listenTo'](_0x1822b3,'remove',(_0x159d56,_0x22c560,_0x30081b)=>{this['_annotationToNarrowView']['get'](_0x22c560)['destroy'](),this['_annotationToNarrowView']['delete'](_0x22c560),_0x41ef1a['rearrange']({'removedAnnotation':_0x22c560,'previousAnnotation':_0x1822b3['get'](_0x30081b-0x1),'nextAnnotation':_0x1822b3['get'](_0x30081b+0x1)}),_0x22c560===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1822b3,'focus',(_0x59b3bc,_0x3c679f)=>{this['setActiveAnnotation'](_0x3c679f);}),this['listenTo'](_0x1822b3,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x6a84e8,_0x2155e1)=>{_0x2155e1['keyCode']===_0x23ec74['esc']&&_0x4d5dfb['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4d5dfb['content']['first']),this['_hideBalloon'](),_0x2155e1['stopPropagation'](),_0x2155e1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x335e70,_0x3e61d3)=>{const _0x2226d8=_0x3e61d3['target'];_0x4d5dfb['isVisible']&&_0x4d5dfb['element']['contains'](_0x2226d8)||_0x41ef1a['view']['element']['contains'](_0x2226d8)||_0x335e70['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x55e369=>_0x55e369['contains'](_0x2226d8))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x30e224=this['context']instanceof _0x1df1f0?this['context']['editors']:new _0x3d0741([this['context']]);for(const _0x2ebf84 of _0x30e224)this['_integrateWithEditorAnnotations'](_0x2ebf84);this['listenTo'](_0x30e224,'add',(_0x550edb,_0x492452)=>{this['listenTo'](_0x492452,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x492452);});}),this['listenTo'](_0x30e224,'remove',(_0xddcf16,_0x440f3b)=>{_0x440f3b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x440f3b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x156127){if(_0x156127===this['activeAnnotation'])return;const _0x90d61d=this['context']['plugins']['get'](z);if(_0x90d61d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x156127,'disableAnimationOnActivatedAnnotation':!0x0}),_0x156127)_0x90d61d['getSidebarItemView'](_0x156127)?this['_showBalloon'](_0x156127):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x156127;}['detach'](){if(!this['isAttached'])throw new _0x14fd42('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1302ff=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1c9783=>_0x1c9783['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1302ff['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1df1f0&&this['stopListening'](this['context']['editors']);for(const _0x4f79cb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4f79cb);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x3f5245){if(!_0x3f5245['plugins']['has']('EditorAnnotations'))return;const _0x3dddd5=_0x3f5245['plugins']['get']('EditorAnnotations'),_0x38632e=this['context']['plugins']['get'](z),_0x2f103f=this['annotations'],_0x2322b6=this['balloonPanelView'],_0x1d5a7e=()=>{const _0x15f1f3=_0x3dddd5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x15f1f3),this['setActiveAnnotation'](_0x15f1f3[0x0]||null);};this['listenTo'](_0x3dddd5,'refresh',_0x1d5a7e),this['listenTo'](_0x3dddd5,'blur',(_0x5b246b,{isAnnotationTracked:_0x5ad0ff})=>{this['activeAnnotation']&&_0x5ad0ff(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3dddd5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2f103f,'blur',_0x2d2fe9=>{_0x3dddd5['hasDomSelection']()&&_0x2d2fe9['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2e3769,_0x5d1d73)=>{const _0x1e3de2=_0x5d1d73['target'];_0x2322b6['isVisible']&&_0x2322b6['element']['contains'](_0x1e3de2)||_0x38632e['view']['element']['contains'](_0x1e3de2)||this['activeAnnotation']&&_0x3dddd5['hasDomSelection']()&&(_0x1d5a7e(),_0x2e3769['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3dddd5);}['_destroyEditorAnnotationsIntegration'](_0x146820){_0x146820&&(this['stopListening'](_0x146820),this['_editorAnnotations']['remove'](_0x146820));}['_setSelectedAnnotations'](_0x1d097b){for(const _0x1d13df of this['_selectedAnnotations'])_0x1d097b['includes'](_0x1d13df)||this['_manuallyClosedAnnotationViews']['delete'](_0x1d13df['view']);this['_selectedAnnotations']=_0x1d097b;}['_refreshPositioning'](){const _0x20dbd3=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x20dbd3['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x17f7dc){if(this['_manuallyClosedAnnotationViews']['has'](_0x17f7dc['view']))return;const _0x119267=this['balloonPanelView']['content']['first'];_0x119267!==_0x17f7dc['view']?(_0x119267&&this['_detachListeners'](_0x119267),this['_attachListeners'](_0x17f7dc['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x17f7dc['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x19a41f=this['balloonPanelView']['content']['first'],_0x906227=_0x19a41f&&this['annotations']['getByView'](_0x19a41f);if(!_0x906227||!this['_annotationToNarrowView']['has'](_0x906227))return;const _0x379866=this['_annotationToNarrowView']['get'](_0x906227)['element'],_0x41ca0f=(function(){const _0x374206=_0xa8377a['defaultPositions'];return[_0x374206['southArrowNorthEast'],_0x374206['northArrowSouthEast'],_0x374206['southArrowNorth'],_0x374206['northArrowSouth'],_0x374206['southArrowNorthWest'],_0x374206['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x379866,'positions':_0x41ca0f});}['_hideBalloon'](){const _0x46a7fd=this['balloonPanelView'],_0x195241=_0x46a7fd['content']['first'];_0x195241&&(this['_detachListeners'](_0x195241),_0x46a7fd['unpin'](),_0x46a7fd['content']['clear']());}['_attachListeners'](_0x5e8f69){this['listenTo'](_0x5e8f69,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5e8f69,'Esc',(_0x35ade1,_0xaf732e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5e8f69),this['_hideBalloon'](),_0xaf732e();});}['_detachListeners'](_0xa794fc){this['stopListening'](_0xa794fc);}}class c extends _0x37aa4b{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x47c029,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2eab37){super(_0x2eab37),_0x2eab37['editing']['view']['addObserver'](_0x753941),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2eab37['plugins']['get'](_0x47c029),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x533250(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x42dacd=this['editor']['plugins']['get'](j);_0x42dacd['context']===this['editor']&&(_0x42dacd['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x44918a,_0x3e491d)=>{const _0x49a1db=this['_balloon'];if(this['isAttached']&&_0x49a1db['visibleView']){const _0x32af1e=this['annotations']['getByView'](_0x49a1db['visibleView']);_0x32af1e&&this['_closeAnnotation'](_0x32af1e),_0x3e491d();}}));}['afterInit'](){const _0x39b476=this['editor']['plugins']['get'](j);_0x39b476['context']===this['editor']&&(_0x39b476['hasActive']()||_0x39b476['switchTo']('inline'));}['setActiveAnnotation'](_0x168171){_0x168171!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x168171&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x168171)&&this['_addAnnotationToBalloon'](_0x168171,!0x0),_0x168171['isActive']=!0x0),_0x168171||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x168171);}['attach'](_0x209355){this['annotations']=_0x209355;const _0x41fcbf=this['editor']['plugins']['get'](j),_0x1fcc4f=this['_balloon'];if(this['isAttached'])throw new _0x14fd42('inlineannotations-attach-already-attached',this);if(_0x41fcbf['context']!==this['editor'])throw new _0x14fd42('inlineannotations-not-allowed-with-context',this);const _0x204cc7=this['editor']['plugins']['get'](b);this['listenTo'](_0x204cc7,'refresh',()=>{const _0x1a58e0=_0x204cc7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x593e12,_0x84079a;!this['_forceRefresh']&&(_0x593e12=_0x1a58e0,_0x84079a=this['_selectedAnnotations'],_0x593e12['length']===_0x84079a['length']&&_0x593e12['every'](_0x539a28=>_0x84079a['includes'](_0x539a28)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1a58e0),this['setActiveAnnotation'](_0x1a58e0[0x0]||null));}),this['listenTo'](_0x204cc7,'blur',(_0x287fc2,{isAnnotationTracked:_0x50cffe})=>{this['activeAnnotation']&&_0x50cffe(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x204cc7,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4d6636,_0x340e8d,_0x3369ee)=>{_0x3369ee||this['setActiveAnnotation'](null);}),this['listenTo'](_0x209355,'remove',(_0x2e09a4,_0x3a814d)=>{this['_removeAnnotationFromBalloon'](_0x3a814d),_0x3a814d===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1fcc4f,'change:visibleView',(_0x3e7dc2,_0x4b46a8,_0x2ab79a,_0x5129e7)=>{_0x5129e7&&this['stopListening'](_0x5129e7);const _0x418c0a=_0x209355['getByView'](_0x2ab79a);_0x2ab79a&&_0x418c0a&&(this['listenTo'](_0x2ab79a,'change:height',()=>{_0x1fcc4f['updatePosition']();}),this['listenTo'](_0x2ab79a,'Esc',()=>{this['_closeAnnotation'](_0x418c0a),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x418c0a&&this['setActiveAnnotation'](_0x418c0a));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1fcc4f['visibleView']&&(_0x209355['getByView'](_0x1fcc4f['visibleView'])&&_0x1fcc4f['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x14fd42('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4941c7 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4941c7);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x55f87c){for(const _0x3df0cd of this['_selectedAnnotations'])_0x55f87c['includes'](_0x3df0cd)||this['_manuallyClosed']['delete'](_0x3df0cd);for(const _0x7884ef of this['annotations'])_0x55f87c['includes'](_0x7884ef)||this['_removeAnnotationFromBalloon'](_0x7884ef);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x103e07 of _0x55f87c)this['_addAnnotationToBalloon'](_0x103e07);}this['_selectedAnnotations']=_0x55f87c;}['_addAnnotationToBalloon'](_0x1645df,_0x4c812e=!0x1){this['_manuallyClosed']['has'](_0x1645df)||(this['_addedAnnotations']['has'](_0x1645df)||this['_balloon']['hasView'](_0x1645df['view'])||(this['_addedAnnotations']['add'](_0x1645df),this['_balloon']['add']({'stackId':_0x1645df['view']['id'],'view':_0x1645df['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1645df)}})),_0x4c812e&&this['_balloon']['showStack'](_0x1645df['view']['id']));}['_getBalloonTargetForAnnotation'](_0x53a7d7){const _0x41f909=_0x53a7d7['target'],_0x41f093=this['editor']['editing']['view'],_0xeecac4=_0x41f093['document']['selection']['getFirstRange'](),_0x21ea63=_0x41f093['domConverter']['viewRangeToDom'](_0xeecac4);if(_0x21ea63['collapse'](!0x0),_0x41f909){if(_0x41f909 instanceof _0x2dcba1)return _0x41f909;let _0x3d1c99=[];for(const _0x3195f1 of _0x41f909)_0x3d1c99['push'](...F(_0x3195f1['getClientRects']()));_0x3d1c99=function(_0x5fafaf){const _0x255759=[];let _0x39239e=_0x5fafaf[0x0];for(let _0x5e8042=0x1;_0x5e8042<_0x5fafaf['length'];_0x5e8042++)P(_0x39239e,_0x5fafaf[_0x5e8042])?_0x39239e['width']+=_0x5fafaf[_0x5e8042]['width']:(_0x255759['push'](_0x39239e),_0x39239e=_0x5fafaf[_0x5e8042]);return _0x255759['push'](_0x39239e),_0x255759;}(_0x3d1c99);const _0x28c73e=_0x21ea63['getBoundingClientRect']();return _0x3d1c99['find'](_0x2dfbaa=>_0x2dfbaa['top']<=_0x28c73e['top']&&_0x2dfbaa['bottom']>=_0x28c73e['bottom']&&_0x2dfbaa['left']<=_0x28c73e['left']&&_0x2dfbaa['right']>=_0x28c73e['right'])||_0x3d1c99[0x0];}return _0x53a7d7['targetRect']||_0x21ea63;}['_removeAnnotationFromBalloon'](_0x272dfd){this['_addedAnnotations']['has'](_0x272dfd)&&this['_balloon']['hasView'](_0x272dfd['view'])&&(this['_addedAnnotations']['delete'](_0x272dfd),this['_balloon']['remove'](_0x272dfd['view']));}['_closeAnnotation'](_0x1541e5){this['_manuallyClosed']['add'](_0x1541e5),this['_removeAnnotationFromBalloon'](_0x1541e5);}}function F(_0x42f487){return Array['from'](_0x42f487)['map'](DOMRect['fromRect']);}function P(_0x1a07d1,_0x2da7ed){return _0x1a07d1['top']===_0x2da7ed['top']&&_0x1a07d1['bottom']===_0x2da7ed['bottom']&&_0x1a07d1['right']===_0x2da7ed['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x46889f,_0x309e27){super(_0x46889f),this['set']('isEmpty',!_0x309e27['length']),this['focusTracker']=new _0x37af46(),this['_annotationViews']=_0x309e27,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x599a03({'focusables':_0x309e27,'focusTracker':this['focusTracker']}),this['listenTo'](_0x309e27,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x309e27,'remove',(_0x1f0d36,_0x182338)=>{_0x182338['isActive']&&this['focus'](),_0x309e27['length']||(this['isEmpty']=!0x0);});const _0x1947ef=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x46889f,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x309e27},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1947ef['if']('isEmpty','ck-hidden',_0x1fb94f=>!_0x1fb94f)]},'children':[{'text':N(_0x46889f,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x1ec61 of this['_annotationViews'])this['focusTracker']['add'](_0x1ec61['element']);this['_annotationViews']['on']('change',(_0x1ab281,{added:_0x59ca45,removed:_0x44747f})=>{for(const _0x38423b of _0x59ca45)this['focusTracker']['add'](_0x38423b['element']);for(const _0x1f938d of _0x44747f)this['focusTracker']['remove'](_0x1f938d['element']);});}}class p extends _0x593a50{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x247301){super(_0x247301),this['archivedThreads']=new _0x3d0741();}['init'](){const _0x4f987c=this['context'],_0x14a6a4=_0x4f987c['plugins']['get'](o),_0x58a19e=_0x4f987c['plugins']['get'](y);this['listenTo'](_0x14a6a4,'addCommentThread',(_0x401817,{threadId:_0x5f26f8})=>{const _0x53c929=_0x14a6a4['getCommentThread'](_0x5f26f8);_0x53c929['archivedAt']&&this['archivedThreads']['add'](_0x53c929,this['_calculatePosition'](_0x53c929['archivedAt'])),this['listenTo'](_0x53c929,'change:archivedAt',(_0x206745,_0x4abb29,_0x11e0d5)=>{_0x11e0d5?this['archivedThreads']['has'](_0x53c929)||this['archivedThreads']['add'](_0x53c929,this['_calculatePosition'](_0x53c929['archivedAt'])):this['archivedThreads']['has'](_0x53c929)&&this['archivedThreads']['remove'](_0x53c929);});}),this['listenTo'](_0x14a6a4,'removeCommentThread',(_0x2f02c0,{threadId:_0x56b280})=>{const _0x3af062=_0x14a6a4['getCommentThread'](_0x56b280);this['stopListening'](_0x3af062),this['archivedThreads']['has'](_0x3af062)&&this['archivedThreads']['remove'](_0x3af062);},{'priority':'highest'}),this['listenTo'](_0x58a19e['collection'],'focus',(_0x31af4c,_0x49635f)=>{_0x49635f['isVisible']||(_0x49635f['isActive']=!0x0,_0x58a19e['activate'](_0x49635f));});}['_calculatePosition'](_0x52e254){const _0x306630=[...this['archivedThreads']]['findIndex'](_0x2b8ae4=>_0x2b8ae4['archivedAt']<_0x52e254);return _0x306630>-0x1?_0x306630:this['archivedThreads']['length'];}}class a extends _0x37aa4b{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x1d5abd];}constructor(_0x3fa3c3){super(_0x3fa3c3),this['annotationViews']=new _0x4fc9fb(),this['_pendingThreads']=[];}['init'](){const _0x1b7738=this['editor'],_0x1b369e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1b7738['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1c15c2,!0x0)),_0x1b7738['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2b12f2=this['_createCommentsArchiveButton'](_0x34ca18);return _0x2b12f2['set']({'role':'menuitemcheckbox'}),_0x2b12f2;});const _0x3a8fa9=_0x1b7738['plugins']['get'](p),_0x1b37fd=_0x1b7738['plugins']['get']('Annotations'),_0x1e599d=_0x1b7738['plugins']['get']('CommentsRepository');_0x3a8fa9['archivedThreads']['forEach'](_0x29cb38=>{this['_handleNewThread'](_0x29cb38);}),this['listenTo'](_0x3a8fa9['archivedThreads'],'add',(_0x4d559a,_0x366479)=>{this['_handleNewThread'](_0x366479);}),this['listenTo'](_0x1b37fd['collection'],'add',(_0x1b7455,_0x2b57cd)=>{const _0x296bc2=this['_pendingThreads']['find'](_0xc333e7=>{const _0x35008c=_0x1e599d['_threadToController']['get'](_0xc333e7);return _0x35008c&&_0x2b57cd['innerView']===_0x35008c['view'];});if(_0x296bc2){const _0x212132=this['_calculatePosition'](_0x296bc2['archivedAt']);this['_addAnnotationToArchive'](_0x2b57cd,_0x212132),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x296bc2),0x1);}}),this['listenTo'](_0x3a8fa9['archivedThreads'],'remove',(_0x3273cb,_0x4d0723)=>{const _0x5d2059=_0x1b7738['config']['get']('collaboration.channelId');if(!_0x5d2059||_0x4d0723['channelId']===_0x5d2059){if(this['_pendingThreads']['includes'](_0x4d0723))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4d0723),0x1);else{const _0xff75f8=_0x1e599d['_threadToController']['get'](_0x4d0723),_0x596a03=_0x1b37fd['getByInnerView'](_0xff75f8['view']);this['annotationViews']['remove'](_0x596a03['view']),this['stopListening'](_0x596a03),this['stopListening'](_0x596a03['focusableElements']);}}}),this['listenTo'](_0x1b37fd['collection'],'add',(_0x53d743,_0x329e5f)=>{this['listenTo'](_0x329e5f,'escape',_0x1b369e);}),this['listenTo'](_0x1b37fd['collection'],'remove',(_0x117ded,_0x4c715b)=>{this['stopListening'](_0x4c715b,'escape',_0x1b369e);});}['_addAnnotationToArchive'](_0x46875b,_0x33742b){this['listenTo'](_0x46875b,'set:isVisible',_0x30e7c3=>{_0x30e7c3['return']=!0x1,_0x30e7c3['stop']();}),this['annotationViews']['add'](_0x46875b['view'],_0x33742b);}['_handleNewThread'](_0x135524){const _0x250fe4=this['editor']['plugins']['get']('CommentsRepository'),_0x37a542=this['editor']['plugins']['get']('Annotations'),_0x48f6d3=this['editor']['config']['get']('collaboration.channelId');if(!_0x48f6d3||_0x135524['channelId']===_0x48f6d3){const _0x2cc61b=_0x250fe4['_threadToController']['get'](_0x135524);if(!_0x2cc61b)return void this['_pendingThreads']['push'](_0x135524);const _0x4a735a=this['_calculatePosition'](_0x135524['archivedAt']),_0x675e80=_0x37a542['getByInnerView'](_0x2cc61b['view']);_0x675e80['isVisible']&&_0x37a542['_visibleAnnotations']['remove'](_0x675e80),this['_addAnnotationToArchive'](_0x675e80,_0x4a735a);}}['_calculatePosition'](_0x2f668f){const _0x4b5bdd=this['editor']['config']['get']('collaboration.channelId'),_0x4f3506=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x177a28=>_0x177a28['channelId']===_0x4b5bdd)['findIndex'](_0x14eaf6=>_0x14eaf6['archivedAt']<_0x2f668f);return _0x4f3506<0x0||_0x4f3506>this['annotationViews']['length']?this['annotationViews']['length']:_0x4f3506-0x1;}['_toggleDialog'](){const _0x363aa6=this['editor'],_0x1d9fb0=_0x363aa6['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x363aa6['locale'],this['annotationViews'])),'commentsArchive'===_0x1d9fb0['id']?_0x1d9fb0['hide']():_0x1d9fb0['show']({'id':'commentsArchive','title':N(_0x363aa6['locale'],'COMMENTS_ARCHIVE'),'icon':_0x52ca58,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x17a0a9['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2af3c6,_0x5e0291=!0x1){const _0x48c1a9=this['editor']['locale'],_0x12bcb6=this['editor']['plugins']['get']('Dialog'),_0x401ee7=new _0x2af3c6(_0x48c1a9);return _0x401ee7['bind']('isEnabled')['to'](this,'isEnabled'),_0x401ee7['bind']('isOn')['to'](_0x12bcb6,'id',_0x2c431a=>'commentsArchive'===_0x2c431a),_0x401ee7['set']({'label':N(_0x48c1a9,'COMMENTS_ARCHIVE'),'icon':_0x52ca58,'isToggleable':!0x0}),_0x5e0291&&(_0x401ee7['tooltip']=!0x0),this['listenTo'](_0x401ee7,'execute',()=>this['_toggleDialog']()),_0x401ee7;}['_hideDialogOnAnnotationEscape']=_0x34ddf6=>{const _0x44f3f8=_0x34ddf6['source'];if(!this['annotationViews']['has'](_0x44f3f8['view']))return;const _0x273cf7=this['editor']['plugins']['get']('Dialog');_0x273cf7['isOpen']&&'commentsArchive'===_0x273cf7['id']&&(_0x273cf7['hide'](),_0x34ddf6['stop']());};}class gi extends _0x37aa4b{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
23
+ import{Editor as _0x5707ed,ContextPlugin as _0x4e5218,PendingActions as _0xbc9174,Command as _0x4b2822,Plugin as _0x3549b7,Context as _0x430c8f}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x413137,uid as _0xd38b92,KeystrokeHandler as _0x4ff923,FocusTracker as _0x5b085d,diff as _0xa0b8e7,Collection as _0x3b337f,Rect as _0x2e7ae5,CKEditorError as _0x1b1980,first as _0x4e8b63,priorities as _0x42489c,scrollViewportToShowTarget as _0x262072,getEnvKeystrokeText as _0x2660aa,toUnit as _0x1a9879,DomEmitterMixin as _0xba838f,keyCodes as _0x5c8495}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x69ebf,AriaDescriptionView as _0x33705e,setupThreadKeyboardNavigation as _0x2c2338,ConfirmMixin as _0x190132,LateFocusButtonView as _0x2664e6,trimHtml as _0x568b40,LateFocusDropdownButtonView as _0x4fcbfd,FOCUS_ANNOTATION_KEYSTROKE as _0x626299,Users as _0x10cb81,getDateTimeFormatter as _0x4d6238,hashObject as _0x31eb8f,getAllMarkersDomElementsSorted as _0x217526,surroundingMarkersDetector as _0x1d04f1}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x2343c5,cloneDeep as _0xae9a1e,set as _0x3916ab,unset as _0x165f1c,isEqual as _0x4ec491,debounce as _0x14b05e}from'es-toolkit/compat';import{IconUndo as _0x2731bd,IconCheck as _0xeec188,IconPencil as _0x1720d5,IconRemoveComment as _0x166aaf,IconThreeVerticalDots as _0x57df41,IconAddComment as _0x1714f5,IconCommentsArchive as _0x317037}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x38ff0b,InlineEditableUIView as _0x4a51e5,EditorUI as _0x23a5de,View as _0x2e27f6,FocusCycler as _0x2e3f33,ButtonView as _0x2ef389,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
24
+ _0x413137(){['model'];['view'];constructor(_0x49f905,_0x6db090){super(),this['model']=_0x49f905,this['model']['_isAttached']=!0x0,this['view']=_0x6db090,this['listenTo'](_0x6db090,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x6db090,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x6db090,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x6db090,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x6db090,'addComment',(_0x54f56c,_0xacb7d2)=>this['addComment'](_0xacb7d2)),this['listenTo'](_0x6db090,'updateComment',(_0x3fe7ea,_0x562223,_0x3503d8)=>this['updateComment'](_0x562223,_0x3503d8)),this['listenTo'](_0x6db090,'removeComment',(_0x4a065b,_0x347522)=>this['removeComment'](_0x347522));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x4730c1){this['model']['addComment']({'content':_0x4730c1,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x148266,_0x826e43){this['model']['getComment'](_0x148266)['update']({'content':_0x826e43});}['removeComment'](_0x22e280){this['model']['getComment'](_0x22e280)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x4d84e7,_0x2da528,_0x1b5b2d){const t=_0x4d84e7['t'];switch(_0x2da528){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Reply\x20to\x20reopen\x20discussion...':return t('Reply\x20to\x20reopen\x20discussion...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20was\x20made\x20on\x20an\x20element':return t('Comment\x20was\x20made\x20on\x20an\x20element');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Marked\x20as\x20resolved':return t('Marked\x20as\x20resolved');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Resolve':return t('Resolve');case'Reopen':return t('Reopen');case'Remove':return t('Remove');case'Reply':return t('Reply');case'Save':return t('Save');case'Annotations\x20sidebar':return t('Annotations\x20sidebar');case'Annotations\x20list':return t('Annotations\x20list');case'Thread\x20comments':return t('Thread\x20comments');case'THREAD_CONTEXT_LABEL':return t({'string':'Thread\x20context:\x20%0','id':'THREAD_CONTEXT_LABEL'},_0x1b5b2d);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x1b5b2d);case'COMMENT_THREAD_DESCRIPTION':return t({'string':'Press\x20Enter\x20for\x20more\x20options.\x20Press\x20Escape\x20to\x20exit.','id':'COMMENT_THREAD_DESCRIPTION'});case'COMMENT_ARIA_LABEL':return t({'string':'Comment\x20by\x20%0.\x20Created\x20on\x20%1.\x20%2.\x20%3','id':'COMMENT_ARIA_LABEL'},_0x1b5b2d);case'LEAVE_COMMENT_ANNOUNCEMENT':return t({'string':'Leaving\x20a\x20content\x20with\x20comments.','id':'LEAVE_COMMENT_ANNOUNCEMENT'});case'ENTER_COMMENT_ANNOUNCEMENT':return t({'string':'Entering\x20a\x20content\x20with\x20comments.\x20Press\x20%0\x20to\x20go\x20to\x20the\x20discussion.','id':'ENTER_COMMENT_ANNOUNCEMENT'},_0x1b5b2d);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1b5b2d);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0x1b5b2d);case'EXTERNAL_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20external\x20source.','id':'EXTERNAL_COMMENT'});case'EXTERNAL_IMPORT_WORD_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20imported\x20Word\x20file.','id':'EXTERNAL_IMPORT_WORD_COMMENT'});case'EXTERNAL_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20external\x20source\x20(added\x20by\x20%0)','id':'EXTERNAL_AVATAR'},_0x1b5b2d);case'EXTERNAL_IMPORT_WORD_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20a\x20Word\x20document\x20imported\x20by\x20%0','id':'EXTERNAL_IMPORT_WORD_AVATAR'},_0x1b5b2d);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Et extends _0x38ff0b{['main'];['editable'];constructor(_0x1f9459,_0x668416){super(_0x1f9459);const _0x383128=_0xd38b92();this['main']=this['createCollection'](),this['editable']=new _0x4a51e5(_0x1f9459,_0x668416,void 0x0,{'label':()=>bt(_0x1f9459,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1f9459['uiLanguageDirection'],'lang':_0x1f9459['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x383128},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Nt extends _0x23a5de{['view'];constructor(_0xf10dbb){super(_0xf10dbb),this['view']=new Et(_0xf10dbb['locale'],_0xf10dbb['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x3fad26=this['editor']['editing']['view'],_0x3b0a64=this['view']['editable'],_0x205818=_0x3fad26['document']['getRoot']();_0x3b0a64['name']=_0x205818['rootName'],this['view']['render']();const _0x3351ba=_0x3b0a64['element'];this['setEditableElement'](_0x3b0a64['name'],_0x3351ba),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3fad26['attachDomRoot'](_0x3351ba),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
25
+ _0x413137(_0x5707ed){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>kt)());constructor(_0x44dd80={}){function _0x4f7b27(_0x1e8a0f){return _0x1e8a0f['map'](_0x25ca7f=>String['fromCharCode'](_0x25ca7f))['join']('');}(_0x44dd80=Object['assign']({},_0x44dd80))['plugins']||(_0x44dd80['plugins']=Ot['defaultPlugins']),super(_0x44dd80),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x4f7b27([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f7b27([0x76,0x69,0x65,0x77])][_0x4f7b27([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f7b27([0x61,0x75,0x74,0x6f]),this[_0x4f7b27([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4f7b27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f7b27([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4f7b27([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4f7b27([0x6f,0x6b])});}['create'](){const _0x18a5e1=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x18a5e1))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5ef1c4=>{const _0x2b7eec=this['model']['document']['getRoot'](),_0x21ab8b=_0x2b7eec&&_0x2b7eec['getChild'](_0x2b7eec['childCount']-0x1);_0x5ef1c4['setSelection'](_0x21ab8b,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x5ea0c4=this['editing']['view'],_0x504140=_0x5ea0c4['document']['getRoot'](),_0x2084b2=_0x504140['getChild'](0x0);_0x504140['childCount']>0x1||!_0x2084b2||'p'!=_0x2084b2['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x5ea0c4,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2084b2['placeholder']=this['placeholder']),ut({'view':_0x5ea0c4,'element':_0x2084b2,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2084b2);}}class Mt extends _0x2e27f6{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2720f7,_0x5d7c84={}){super(_0x2720f7),this['editor']=null,this['_editorConfig']=_0x5d7c84,this['set']('value',_0x5d7c84['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x2720f7,'Reply...')),this['set']('submitLabel',bt(_0x2720f7,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x4ff923(),this['focusTracker']=new _0x5b085d(),this['focusCycler']=new _0x2e3f33({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x406716,_0x4795eb)=>{this['cancelButtonView']['fire']('execute'),_0x4795eb();}),this['keystrokes']['set']('Ctrl+Enter',(_0x40fd72,_0x34e601)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x34e601());}),this['on']('submit',(_0xcb0433,_0x6c2fcc)=>{_0x6c2fcc['length']>0xfde8?(alert(bt(_0x2720f7,'TOO_LONG_COMMENT_ALERT',[_0x6c2fcc['length'],0xfde8])),_0xcb0433['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x5e7d55=this['editor'];this['element']['insertBefore'](_0x5e7d55['ui']['element'],this['element']['firstChild']),_0x5e7d55['model']['document']['on']('change',()=>this['value']=_0x5e7d55['getData']()),_0x5e7d55['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5e7d55['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x50af6f){-0x1===_0x50af6f?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x549e7e}=this,_0x136427=new _0x2ef389(_0x549e7e);return _0x136427['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x136427['withText']=!0x0,_0x136427['bind']('label')['to'](this,'submitLabel'),_0x136427['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x136427['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x33ab26,_0x2e0288)=>!_0x2e0288&&!!_0x33ab26['trim']()),_0x136427;}['_createCancelButton'](){const {locale:_0x3174e5}=this,_0x2adeea=new _0x2ef389(_0x3174e5);return _0x2adeea['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2adeea['label']=bt(_0x3174e5,'Cancel'),_0x2adeea['withText']=!0x0,_0x2adeea['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2adeea;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2c6a5b=>{this['focusTracker']['add'](_0x2c6a5b['element']);}),this['focusables']['on']('change',(_0x37e29f,_0x135c56)=>{for(const _0x14c495 of Array['from'](_0x135c56['added'])['reverse']())this['focusTracker']['add'](_0x14c495['element']);});}}class Rt extends _0x2e27f6{constructor(_0x391de1,_0x11865d,_0x590373){super(_0x391de1),this['commentInputView']=new Mt(_0x391de1,_0x590373),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x51a62b,_0x1f3067)=>_0x51a62b||!!_0x1f3067),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x69ebf(_0x391de1,_0x11865d),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x5c36a8){this['commentInputView']['focus'](_0x5c36a8);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x181bfa,_0x4ff328)=>{const {submitButtonView:_0x9255cf,cancelButtonView:_0x23ce5a,editor:_0x4ca7ed}=this['commentInputView'];[_0x9255cf['element'],_0x23ce5a['element'],_0x4ca7ed?_0x4ca7ed['editing']['view']['getDomRoot']():null]['filter'](_0x38c5d1=>_0x38c5d1)['some'](_0x430a13=>_0x430a13['contains'](_0x4ff328['target']))||(this['focus'](),_0x4ff328['preventDefault']());});}}class xt extends _0x2e27f6{constructor(_0x4f1987){super(_0x4f1987);const _0x1de049=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1de049['to']('count',_0x5520ae=>bt(_0x4f1987,'NUMBER_OF_COMMENTS',_0x5520ae))}]});}}class St extends _0x2e27f6{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1426b7,_0x2b1244,_0x6ddf41){super(_0x1426b7);const _0x1d01f1=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2b1244['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2b1244,this['_config']=_0x6ddf41,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5b085d(),this['keystrokes']=new _0x4ff923(),this['focusCycler']=new _0x2e3f33({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xe6e15f=>this['commentViews']['map'](_0x5df1dc=>_0x5df1dc['element'])['includes'](_0xe6e15f['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x1426b7),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3e93ba=>_0x3e93ba-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2fea37 of _0x2b1244['comments'])this['_handleNewCommentModel'](_0x2fea37);this['_handleInfoComment'](),this['listenTo'](_0x2b1244['comments'],'add',(_0x2bbdbf,_0x1e3dd6)=>{const _0x14ed76=this['_calculatePosition'](_0x1e3dd6);this['length']++,this['_handleNewCommentModel'](_0x1e3dd6,_0x14ed76),this['refreshVisibleViews']();}),this['listenTo'](_0x2b1244['comments'],'remove',(_0x89bf0,_0x2d1a6c)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2d1a6c),this['refreshVisibleViews']();}),this['listenTo'](_0x2b1244,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2b1244,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x1d01f1['if']('length','ck-hidden',_0x2b61b0=>!_0x2b61b0)],'aria-label':bt(_0x1426b7,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x4c2505){-0x1===_0x4c2505?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x6c10b6 of this['commentViews'])_0x6c10b6['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x457727,_0x451eb6){const _0x27c43a=new this['_config']['CommentView'](this['locale'],_0x457727,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x27c43a['viewUid']=_0x457727['id'],_0x27c43a['delegate']('removeComment')['to'](this),_0x27c43a['delegate']('updateComment')['to'](this),_0x27c43a['delegate']('resolveCommentThread')['to'](this),_0x27c43a['delegate']('editorReady')['to'](this),_0x27c43a['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x27c43a,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x27c43a,_0x451eb6);}['_calculatePosition'](_0x273d3b){const _0x16d85b=this['_model']['_findOptimalIndex'](_0x273d3b);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x273d3b['authoredAt']?_0x16d85b-0x1:_0x16d85b:_0x16d85b-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x40aa09={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x40aa09,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x40aa09));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x117b1e){const _0x58ca12=this['commentViews']['remove'](_0x117b1e['id']);this['stopListening'](_0x58ca12),_0x58ca12['isEditMode']&&this['_updateHasDirtyComment'](),_0x58ca12['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3e6c69=>_0x3e6c69['isEditMode']);}['_rearrangeCollapse'](){const _0x525e0d=function(_0x18910b){const _0x27e604=new _0x3b337f();for(const _0x17b328 of _0x18910b)_0x27e604['add'](_0x17b328);return _0x27e604;}(this['commentViews']),_0x1f4d59=this['_collapsedCommentsView']['count'];for(let _0x17a4af=0x1;_0x17a4af<=_0x1f4d59;_0x17a4af++)_0x525e0d['remove'](0x1);for(const _0x11852b of _0x525e0d)_0x11852b['collapse']();_0x1f4d59>0x0&&_0x525e0d['add'](this['_collapsedCommentsView'],0x1),Pt(_0xa0b8e7(Array['from'](this['visibleViews']),Array['from'](_0x525e0d)),this['visibleViews'],_0x525e0d);}['_rearrangeExpand'](){Pt(_0xa0b8e7(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x365b77 of this['visibleViews'])_0x365b77['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1ef9d1=>{this['focusTracker']['add'](_0x1ef9d1['element']),this['keystrokes']['listenTo'](_0x1ef9d1['element']);}),this['commentViews']['on']('change',(_0x2cdffa,_0x2c04d1)=>{for(const _0x183a69 of _0x2c04d1['removed'])this['focusTracker']['remove'](_0x183a69['element']),this['keystrokes']['stopListening'](_0x183a69['element']);for(const _0x1c0d85 of Array['from'](_0x2c04d1['added'])['reverse']())this['focusTracker']['add'](_0x1c0d85['element']),this['keystrokes']['listenTo'](_0x1c0d85['element']);});}}function Pt(_0x53e7e5,_0x17bb6b,_0x252b16){let _0x2e6e0d=0x0;for(const _0x1959d8 of _0x53e7e5)switch(_0x1959d8){case'insert':_0x17bb6b['add'](_0x252b16['get'](_0x2e6e0d),_0x2e6e0d),_0x2e6e0d++;break;case'delete':_0x17bb6b['remove'](_0x2e6e0d);break;case'equal':_0x2e6e0d++;}}class Lt extends _0x2e27f6{constructor(_0x47c051){super(_0x47c051);const _0x1c740d=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1c740d['to']('contextValue',_0x39392a=>bt(_0x47c051,'THREAD_CONTEXT_LABEL',_0x39392a)),'tabindex':-0x1},'children':[{'text':_0x1c740d['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x2e27f6{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x109572,_0x57ac9e){super(_0x109572);const _0x10ff18=this['bindTemplate'];this['_model']=_0x57ac9e,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5b085d(),this['keystrokes']=new _0x4ff923(),this['focusCycler']=new _0x2e3f33({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xc75625=>!!_0xc75625),this['bind']('contextValue')['to'](this['_model'],'context',_0x1fc978=>_0x1fc978&&_0x1fc978['value']?this['_trimContextValue'](_0x1fc978['value']):bt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x10ff18['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x570d10=new _0x2ef389(this['locale']);return _0x570d10['label']=bt(this['locale'],'Reopen'),_0x570d10['tooltip']=bt(this['locale'],'Reopen'),_0x570d10['icon']=_0x2731bd,_0x570d10['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x513e9e=>!_0x513e9e),_0x570d10['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x45e7dd,_0x1d9dc7)=>_0x45e7dd&&_0x1d9dc7),_0x570d10['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x570d10;}['_trimContextValue'](_0x23acc9){if(_0x23acc9['length']<0x96)return _0x23acc9;const _0x1e3435=_0x23acc9['lastIndexOf']('\x20',0x93);return _0x23acc9['substring'](0x0,_0x1e3435>-0x1?_0x1e3435:0x93)+'...';}['_attachContextActions'](){const _0x2431f3=this['element']['querySelector']('.ck-context'),_0x24b8b6=_0x2431f3['querySelector']('.ck-context__value');this['listenTo'](_0x2431f3,'mouseenter',()=>{_0x24b8b6['offsetWidth']<_0x24b8b6['scrollWidth']&&_0x2431f3['classList']['add']('overlay');}),this['listenTo'](_0x2431f3,'mouseleave',()=>{_0x2431f3['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4b4d95 of this['focusables'])this['focusTracker']['add'](_0x4b4d95['element']),this['keystrokes']['listenTo'](_0x4b4d95['element']);}['_createContextView'](){const _0x129b8e=new Lt(this['locale']);return _0x129b8e['bind']('contextValue')['to'](this),_0x129b8e;}}class Vt extends _0x2e27f6{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1d7d69,_0x102768,_0x1c5c85,_0x2ebf29){super(_0x1d7d69),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x102768,this['_localUser']=_0x1c5c85,this['_config']=_0x2ebf29,this['commentThreadHeaderView']=new Dt(_0x1d7d69,_0x102768),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x33705e(_0x1d7d69,bt(_0x1d7d69,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x1d7d69,_0x102768,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2ebf29)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x23ff7b,_0x2e8fea)=>_0x23ff7b||!!_0x2e8fea),this['bind']('isUnlinked')['to'](_0x102768,'unlinkedAt',_0x31db5c=>!!_0x31db5c),this['bind']('ariaLabel')['to'](this,'length',_0x5d76e2=>{const _0x481a57=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x5d76e2,_0x481a57]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5b085d(),this['keystrokes']=new _0x4ff923(),this['focusCycler']=new _0x2e3f33({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3c3cc6=>_0x3c3cc6['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x2c2338(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3862d1=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0xc9453a=_0x3862d1['commentInputView'];return _0x3862d1['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0xc9453a,'value',(_0x146f65,_0x2c0169,_0x11abfe,_0x22ff06,_0x5e0df7)=>!!_0x5e0df7||!!_0x22ff06&&_0x11abfe&&!_0x2c0169||_0x146f65&&_0x11abfe&&!_0x2c0169),_0xc9453a['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4b08ce,_0xc7df2b,_0x2b2c3e)=>{let _0x101d73;return _0x101d73=_0x2b2c3e&&_0xc7df2b?'Reply\x20to\x20reopen\x20discussion...':_0x4b08ce?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x101d73);}),_0xc9453a['bind']('submitLabel')['to'](this,'length',_0x53a6f9=>bt(this['locale'],_0x53a6f9?'Reply':'Comment')),_0xc9453a['on']('submit',(_0x23a74d,_0x20ddd4)=>{this['fire']('addComment',_0x20ddd4),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0xc9453a['on']('cancel',()=>{this['focus']();}),_0xc9453a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xc9453a['on']('cancel',_0x33946c=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x33946c['stop']());}),this['on']('change:isActive',(_0x41c553,_0x4ff4e5,_0x235add)=>{_0x235add||this['length']||_0xc9453a['value']||this['fire']('removeCommentThread');}),_0x3862d1;}}class Bt extends/* #__PURE__ -- @preserve */
27
+ _0x190132(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x301276,_0x2e4652,_0x391d40,_0x4b708c){super(_0x301276,_0x2e4652,_0x391d40,_0x4b708c),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x301276,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x20d983,_0x23ba6e,_0x44d63e)=>{_0x44d63e||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xe4827b,_0x160144,_0x5ed16f)=>{_0x5ed16f&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3003be=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3003be['if']('isActive','ck-thread--active'),_0x3003be['if']('isUnlinked','ck-thread--unlinked'),_0x3003be['to']('actionIndicator',_0x3e8b06=>_0x3e8b06?'ck-thread--'+_0x3e8b06:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3003be['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id']},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container'),this['_model']['on']('change:archivedAt',()=>{this['_updateArchivedThreadHeader']();}),this['_updateArchivedThreadHeader']();}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0x5d6917 of this['commentsListView']['commentViews'])_0x5d6917['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x47d9b6}=this,_0x4889a9=this['commentsListView']['commentViews']['get'](0x0);_0x4889a9===this['_boundFirstCommentView']||_0x4889a9['isSystemComment']||(this['_boundFirstCommentView']=_0x4889a9,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x4889a9,'actionIndicator',_0x9826ea=>'remove'===_0x9826ea?'remove':null),_0x4889a9['placeholder']=bt(_0x47d9b6,'Write\x20a\x20comment...'),_0x4889a9['removeButton']['on']('execute',_0xd1a8f3=>{_0xd1a8f3['stop'](),this['showConfirm'](bt(_0x47d9b6,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x4889a9['focus']();}),_0x4889a9['actionBar']['add'](this['resolveButton'],0x0),_0x4889a9['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x988f01=new _0x2664e6(this['locale']);return _0x988f01['label']=bt(this['locale'],'Resolve'),_0x988f01['tooltip']=bt(this['locale'],'Resolve'),_0x988f01['icon']=_0xeec188,_0x988f01['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x988f01['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x325596=>!_0x325596),_0x988f01['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5f5515,_0x3ddf92)=>_0x5f5515&&!_0x3ddf92),_0x988f01['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x988f01;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class Ht extends _0x2e27f6{constructor(_0xbffb4f){super(_0xbffb4f),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x370014,_0x1a023e,_0x1ee8e5)=>{this['element']['innerHTML']=_0x1ee8e5;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x2e27f6{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x537da9,_0x2bfd8f,_0x58772f){super(_0x537da9),this['_model']=_0x2bfd8f,this['_config']=_0x58772f,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x2bfd8f,'content',_0x2bfd8f,'authoredAt',(_0x18330a,_0x5ec5d6)=>bt(_0x537da9,'COMMENT_ARIA_LABEL',[_0x2bfd8f['author']['name'],_0x58772f['formatDateTime'](_0x5ec5d6),new DOMParser()['parseFromString'](_0x18330a,'text/html')['body']['textContent'],_0x2bfd8f['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x33705e(_0x537da9,bt(_0x537da9,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x5b085d(),this['keystrokes']=new _0x4ff923(),this['focusCycler']=new _0x2e3f33({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4a2ca1=>_0x4a2ca1['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x8a34c5=new Ht(this['locale']);return _0x8a34c5['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x128791,_0x123349)=>_0x123349?_0x568b40(_0x128791,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x128791),_0x8a34c5;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x753001=new Mt(this['locale'],this['_config']['editorConfig']);return _0x753001['value']=this['_model']['content'],_0x753001['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x753001['submitLabel']=bt(this['locale'],'Save'),_0x753001['on']('submit',(_0x2eb0c6,_0x4a3445)=>{this['fire']('updateComment',this['_model']['id'],_0x4a3445),this['switchToDisplayMode'](),this['focus']();}),_0x753001['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x753001['once']('editorReady',()=>{_0x753001['focus']();}),_0x753001['createEditor'](),_0x753001['delegate']('editorReady')['to'](this),_0x753001['delegate']('editorDestroyed')['to'](this),_0x753001;}['_setupKeyboardNavigation'](){const _0xb0ede2=this['element'];this['keystrokes']['listenTo'](_0xb0ede2);for(const _0x4fc5eb of this['focusables'])this['focusTracker']['add'](_0x4fc5eb['element']),this['keystrokes']['listenTo'](_0x4fc5eb['element']);this['focusables']['on']('change',(_0x4400c6,_0x46c139)=>{for(const _0x6d2993 of _0x46c139['removed'])this['focusTracker']['remove'](_0x6d2993['element']),this['keystrokes']['stopListening'](_0x6d2993['element']);for(const _0x47de6f of _0x46c139['added'])this['focusTracker']['add'](_0x47de6f['element']),this['keystrokes']['listenTo'](_0x47de6f['element']);}),this['keystrokes']['set']('enter',(_0x1c021a,_0x54dd92)=>{_0xb0ede2===_0x1c021a['target']&&(this['focusCycler']['focusFirst'](),_0x54dd92());}),this['keystrokes']['set']('esc',(_0x15e4f5,_0x4a17df)=>{_0xb0ede2!==_0x15e4f5['target']&&(this['focus'](),_0x4a17df());});}}class Ut extends/* #__PURE__ -- @preserve */
28
+ _0x190132(Ft){['actionBar'];['userView'];constructor(_0xf3dca1,_0x24aab2,_0x418870){super(_0xf3dca1,_0x24aab2,_0x418870),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0xf3dca1,'Reply...')),this['bind']('authoredAt')['to'](_0x24aab2),this['bind']('resolvedAt')['to'](_0x24aab2),this['actionBar']=this['createCollection'](),this['isSystemComment']||(this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this['createCollection'](),this['items']['addMany']([this['editButton'],this['removeButton']]),this['dropdown']=this['_createDropdown'](),this['actionBar']['add'](this['dropdown']),this['focusables']['add'](this['dropdown'])),this['userView']=new _0x69ebf(_0xf3dca1,_0x24aab2['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x24aab2,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x260ad1=this['bindTemplate'],_0x3aefe5=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x260ad1['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x260ad1['to']('authoredAt',_0x4b90fc=>this['_config']['formatDateTime'](_0x4b90fc))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x260ad1['if']('isEditMode','ck-comment__actions--hidden'),_0x260ad1['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']},this['ariaDescriptionView']];return this['_model']['isExternal']&&_0x3aefe5['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x260ad1['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x260ad1['if']('isEditMode','ck-comment--edit'),_0x260ad1['if']('isSystemComment','ck-comment--info'),_0x260ad1['to']('actionIndicator',_0x52e81f=>_0x52e81f?'ck-comment--'+_0x52e81f:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id'],'role':'group'},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':_0x3aefe5}]}]};}['_createEditButton'](){const _0x538b52=new _0x2ef389(this['locale']);return _0x538b52['label']=bt(this['locale'],'Edit'),_0x538b52['icon']=_0x1720d5,_0x538b52['withText']=!0x0,_0x538b52['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x538b52['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x489482=>!_0x489482),_0x538b52['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x538b52['on']('execute',()=>this['switchToEditMode']()),_0x538b52;}['_createRemoveButton'](){const _0x16439f=new _0x2ef389(this['locale']);return _0x16439f['label']=bt(this['locale'],'Remove'),_0x16439f['icon']=_0x166aaf,_0x16439f['withText']=!0x0,_0x16439f['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x16439f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2e55e6=>!_0x2e55e6),_0x16439f['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x16439f['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x16439f;}['_createDropdown'](){const _0x4a4dd9=it(this['locale'],_0x4fcbfd),_0x52cdb8=_0x4a4dd9['panelView']['children'],_0x39f222=new et(this['locale']),_0x425a98=_0x4a4dd9['bindTemplate'];st(_0x4a4dd9,()=>this['items']['find'](_0x48e376=>_0x48e376['isVisible'])),_0x4a4dd9['extendTemplate']({'attributes':{'class':[_0x425a98['if']('isVisible','ck-hidden',_0x261b39=>!_0x261b39)]}});const _0x154b5f=(_0x3aa85d,_0xd9416=-0x1)=>{const _0x531f08=new nt(this['locale']);_0x531f08['children']['add'](_0x3aa85d);const _0x5b5fe1=_0xd9416>-0x1?_0xd9416:_0x39f222['items']['length'];_0x39f222['items']['add'](_0x531f08,_0x5b5fe1);const _0x243939=Array['from'](this['items']);_0x4a4dd9['unbind']('isEnabled','isVisible'),_0x4a4dd9['bind']('isEnabled')['toMany'](_0x243939,'isEnabled',(..._0x4e8fcb)=>_0x4e8fcb['some'](_0x548ed6=>_0x548ed6)),_0x4a4dd9['bind']('isVisible')['toMany'](_0x243939,'isVisible',(..._0x4ee771)=>_0x4ee771['some'](_0x7100e7=>_0x7100e7));};_0x4a4dd9['panelPosition']='sw',_0x4a4dd9['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x57df41});for(const _0xcab0d6 of this['items'])_0x154b5f(_0xcab0d6);return _0x52cdb8['add'](_0x39f222),_0x4a4dd9['listenTo'](this['items'],'add',(_0x1095c6,_0x6290dc,_0x1e1fff)=>{_0x154b5f(_0x6290dc,_0x1e1fff);}),_0x4a4dd9['listenTo'](this['items'],'remove',(_0x1fa694,_0x360d34,_0x5da473)=>{_0x39f222['items']['remove'](_0x5da473);}),_0x4a4dd9;}['_attachActions'](_0x2b3dd7,_0x39b883){const _0x41d497=_0x2b3dd7&&_0x2b3dd7['element'];_0x41d497&&(this['listenTo'](_0x41d497,'mouseenter',()=>this['actionIndicator']=_0x39b883),this['listenTo'](_0x41d497,'focus',()=>this['actionIndicator']=_0x39b883),this['listenTo'](_0x41d497,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x41d497,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x24102a=super['_createCommentInputView']();return _0x24102a['bind']('placeholder')['to'](this),_0x24102a;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0xc114b5){const _0x1f3f20=_0x2343c5(_0xc114b5,0x1e),_0xc51ce7=new MutationObserver(_0x529a39=>{for(const _0x5e1243 of _0x529a39)('attributes'==_0x5e1243['type']&&'class'==_0x5e1243['attributeName']||'childList'==_0x5e1243['type']||'characterData'==_0x5e1243['type'])&&_0x1f3f20();});return{'attach'(_0x498060){_0xc51ce7['observe'](_0x498060,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xc51ce7['disconnect'](),_0x1f3f20['cancel']();}};}class Kt extends _0x2e27f6{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x434374,_0x2fcb4a){super(_0x434374),this['id']=_0xd38b92(),this['focusTracker']=new _0x5b085d(),this['keystrokes']=new _0x4ff923(),this['keystrokes']['set']('Esc',(_0x2fc6fd,_0x4e5531)=>this['fire']('Esc',_0x4e5531)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x2fcb4a),this['mainView']=_0x2fcb4a;const _0xe99e63=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xe99e63['if']('isActive','ck-annotation-wrapper--active')],'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['focusTracker']['add'](this['element']),this['keystrokes']['listenTo'](this['element']),this['_mutationObserver']['attach'](this['element']);}['destroy'](){this['content']['clear'](),this['keystrokes']['destroy'](),this['focusTracker']['destroy'](),this['_mutationObserver']['detach'](),super['destroy']();}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['_updateHeight'](){const _0x221573=this['element']['clientHeight'];_0x221573&&(this['height']=_0x221573);}}class Yt extends/* #__PURE__ -- @preserve */
29
+ _0x413137(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1aefa9,target:_0x502d84,type:_0x2eba51,isVisible:_0xb888f8=!0x0}){super(),this['view']=_0x1aefa9,this['view']['element']||this['view']['render'](),this['_type']=_0x2eba51,this['_target']=_0x502d84,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3b337f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xa6461a,_0x451e64)=>{this['view']['focusTracker']['add'](_0x451e64);}),this['focusableElements']['on']('remove',(_0x376f77,_0x26e5ef)=>{this['view']['focusTracker']['remove'](_0x26e5ef);}),this['set']('isVisible',_0xb888f8);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xadde10=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0xadde10),_0xadde10;}get['targetRect'](){const _0x59762f=this['target'];if(null===_0x59762f)return null;if(_0x59762f instanceof _0x2e7ae5)return _0x59762f;const _0x1b930c=_0x59762f['filter'](_0x1fb09f=>function(_0x484670){const _0x4b6cd8=_0x484670['offsetParent'];if(_0x4b6cd8)return!0x0;const _0x429cb2=_0x484670['getClientRects']()['item'](0x0);return!!_0x429cb2;}(_0x1fb09f));return 0x0===_0x1b930c['length']?null:_0x2e7ae5['getDomElementRects'](_0x1b930c[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x328073){this['view']['isActive']=_0x328073,this['view']['mainView']['isActive']=_0x328073;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x359d1f){if(!(null===_0x359d1f||_0x359d1f instanceof _0x2e7ae5||Array['isArray'](_0x359d1f)&&_0x359d1f['every'](_0x880850=>Gt(_0x880850))))throw new _0x1b1980('annotation-invalid-target',null,{'target':_0x359d1f});}['_getNormalizedTarget'](){const _0x419b20='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x419b20)?[_0x419b20]:_0x419b20;}}function Gt(_0x4617b9){return null!==_0x4617b9&&'object'==typeof _0x4617b9&&'nodeType'in _0x4617b9&&0x1===_0x4617b9['nodeType'];}class jt extends _0x3b337f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5433ac=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5b085d(),this['_focusTracker']['on']('change:isFocused',(_0x590bb8,_0x34eee0,_0x2a711d)=>{_0x2a711d||this['fire']('blur');});for(const _0x36d55e of _0x5433ac)this['add'](_0x36d55e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x538c60){if(this['has'](_0x538c60))throw new _0x1b1980('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x538c60['innerView'],_0x538c60),this['_viewToAnnotation']['set'](_0x538c60['view'],_0x538c60);for(const _0x5018c0 of _0x538c60['focusableElements'])this['_focusTracker']['add'](_0x5018c0);this['listenTo'](_0x538c60['focusableElements'],'add',(_0x22b504,_0x23797c)=>{this['_focusTracker']['add'](_0x23797c);}),this['listenTo'](_0x538c60['focusableElements'],'remove',(_0xe0c4af,_0x5ac004)=>{this['_focusTracker']['remove'](_0x5ac004);}),this['listenTo'](_0x538c60['view']['focusTracker'],'change:isFocused',(_0x2d6ef6,_0x59bc6a,_0x246152)=>{_0x246152&&this['fire']('focus',_0x538c60);}),_0x538c60['updateTargetRect']();const _0x488647=this['_getOrderInContent'](_0x538c60['view']['targetRect']);return super['add'](_0x538c60,_0x488647);}['remove'](_0x1e0e25){if(!this['has'](_0x1e0e25))throw new _0x1b1980('annotationcollection-not-existing-item',null);this['stopListening'](_0x1e0e25['view']['focusTracker']),this['stopListening'](_0x1e0e25['focusableElements']);for(const _0x2c5292 of _0x1e0e25['focusableElements'])this['_focusTracker']['remove'](_0x2c5292);return this['_viewToAnnotation']['delete'](_0x1e0e25['view']),this['_innerViewToAnnotation']['delete'](_0x1e0e25['innerView']),super['remove'](_0x1e0e25);}['getByInnerView'](_0x19d5dd){return this['_innerViewToAnnotation']['get'](_0x19d5dd);}['getByView'](_0x3034f9){return this['_viewToAnnotation']['get'](_0x3034f9);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x211503 of this)_0x211503['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2eed46=Array['from'](this)['sort']((_0x46401c,_0x4719d6)=>qt(_0x46401c['view']['targetRect'],_0x4719d6['view']['targetRect']));for(let _0x546387=_0x2eed46['length']-0x1;_0x546387>0x0;_0x546387--){const _0x1bb4ea=_0x2eed46[_0x546387];_0x546387!==this['getIndex'](_0x1bb4ea)&&(this['remove'](_0x1bb4ea),this['add'](_0x1bb4ea));}}['_getOrderInContent'](_0x25dc9a){let _0x17995e=0x0;if(!_0x25dc9a)return this['length'];for(const _0xe9a1c6 of this){const _0x8be4ab=_0xe9a1c6['view']['targetRect'];if(_0x8be4ab){if(qt(_0x25dc9a,_0x8be4ab)<0x0)return _0x17995e;_0x17995e++;}}return _0x17995e;}}function Xt({source:_0x1ffa4c,target:_0x2cb80e,filter:_0x44c1c2}){for(const _0x3ac1e2 of _0x1ffa4c)_0x44c1c2(_0x3ac1e2)&&_0x2cb80e['add'](_0x3ac1e2);_0x2cb80e['listenTo'](_0x1ffa4c,'add',(_0x1d74e7,_0x5277cc)=>{_0x44c1c2(_0x5277cc)&&_0x2cb80e['add'](_0x5277cc);}),_0x2cb80e['listenTo'](_0x1ffa4c,'remove',(_0x160cd5,_0x56394b)=>{_0x2cb80e['has'](_0x56394b)&&_0x2cb80e['remove'](_0x56394b);});}function qt(_0x12e2ba,_0x1782cb){if(null===_0x12e2ba&&null===_0x1782cb)return 0x0;if(null===_0x12e2ba)return-0x1;if(null===_0x1782cb)return 0x1;const _0x494476=_0x12e2ba['top']-_0x1782cb['top'];return 0x0==_0x494476?_0x12e2ba['left']-_0x1782cb['left']:_0x494476;}class $t extends _0x4e5218{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x13c089){if(super(_0x13c089),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x13c089 instanceof _0x5707ed){const _0x377d61=_0x13c089['locale'];_0x13c089['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5d54f1){this['collection']['add'](_0x5d54f1);}['remove'](_0x2c91a2){this['collection']['remove'](_0x2c91a2),_0x2c91a2['destroy']();}['refreshVisibility'](){for(const _0x12c5cc of this['collection'])_0x12c5cc['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1e969d){return this['collection']['getByInnerView'](_0x1e969d);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x57bc4f of this['collection'])_0x57bc4f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2cffb3){this['fire']('_activateAnnotation',_0x2cffb3);}['createAnnotation'](_0x1ff4dc){return new Yt(_0x1ff4dc);}['createAnnotationView'](_0x5c5c03,_0x402f48){return new Kt(_0x5c5c03,_0x402f48);}['_addActiveAnnotation'](_0x5df07a){const _0x5048ec=new Set(this['activeAnnotations']);_0x5048ec['add'](_0x5df07a),this['activeAnnotations']=_0x5048ec;}['_removeActiveAnnotation'](_0x3cbb32){const _0x2e0e0c=new Set(this['activeAnnotations']);_0x2e0e0c['delete'](_0x3cbb32),this['activeAnnotations']=_0x2e0e0c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2705b7=this['collection'],_0x2a9e12=this['_visibleAnnotations'];function _0x142a55(_0x427929){const _0x1a700d=_0x427929['source'];_0x1a700d['isVisible']&&!_0x2a9e12['has'](_0x1a700d)?_0x2a9e12['add'](_0x1a700d):!_0x1a700d['isVisible']&&_0x2a9e12['has'](_0x1a700d)&&_0x2a9e12['remove'](_0x1a700d),_0x1a700d['view']['focusTracker']['remove'](_0x1a700d['view']['element']),_0x1a700d['view']['focusTracker']['add'](_0x1a700d['view']['element']);}this['listenTo'](_0x2705b7,'add',(_0x16e4e3,_0x1ccb84)=>{_0x1ccb84['isVisible']&&_0x2a9e12['add'](_0x1ccb84),this['listenTo'](_0x1ccb84,'change:isVisible',_0x142a55);}),this['listenTo'](_0x2705b7,'remove',(_0x2bc15d,_0x1fed97)=>{_0x2a9e12['has'](_0x1fed97)&&_0x2a9e12['remove'](_0x1fed97),this['stopListening'](_0x1fed97,'change:isVisible',_0x142a55);});}['_setupEnterAnnotationKeystroke'](){const _0x3d99e2=_0x5361ed=>{_0x5361ed['on']('ready',()=>{_0x5361ed['keystrokes']['set'](_0x626299,(_0x231d5d,_0x41710f)=>{const _0x5b1fe5=_0x4e8b63(this['activeAnnotations']['values']());_0x5b1fe5&&(_0x5b1fe5['view']['focus'](),_0x41710f());});});};this['context']instanceof _0x5707ed?_0x3d99e2(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xd7993f,_0xee7e8)=>{_0x3d99e2(_0xee7e8);});}['_setupEscapeAnnotationHandling'](){const _0x41203a=_0x48d966=>{const _0x46dca8=_0x48d966['source'],_0x24b9cb=[];let _0x208767;if(Array['isArray'](_0x46dca8['target'])){_0x208767=_0x46dca8['target'][0x0],this['context']instanceof _0x5707ed?_0x24b9cb['push'](this['context']):this['context']['editors']&&_0x24b9cb['push'](...this['context']['editors']);for(const _0x253271 of _0x24b9cb)for(const _0x563702 of _0x253271['editing']['view']['domRoots']['values']())if(_0x563702['contains'](_0x208767))return void _0x253271['editing']['view']['focus']();_0x208767['focus']();}};this['listenTo'](this['collection'],'add',(_0x392bed,_0x3ef9f0)=>{this['listenTo'](_0x3ef9f0,'escape',_0x41203a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x582f48,_0x146fef)=>{this['stopListening'](_0x146fef,'escape',_0x41203a);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x4e5218{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0xbc9174,_0x10cb81];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11e34a){super(_0x11e34a),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xc0b40d=this['context']['config'];_0xc0b40d['define']('comments.maxCommentsWhenCollapsed',0x2),_0xc0b40d['define']('comments.maxThreadTotalWeight',0x1f4),_0xc0b40d['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xc0b40d['define']('comments.CommentThreadView',Bt),_0xc0b40d['define']('comments.CommentView',Ut),_0xc0b40d['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x50c3d0=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x49fa0a,_0x345407)=>this['_addCommentThread'](_0x345407)),this['on']('submitCommentThread',(_0x425dfb,_0xb04424)=>this['_submitCommentThread'](_0xb04424)),this['on']('resolveCommentThread',(_0x2c154b,_0x93d18f)=>this['_resolveCommentThread'](_0x93d18f)),this['on']('resolveCommentThread',(_0xaaa065,_0x23fdd7)=>this['_updateActiveAnnotation'](_0x23fdd7),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x4e20c9,_0x3f5a1e)=>this['_reopenCommentThread'](_0x3f5a1e)),this['on']('reopenCommentThread',(_0x2caacf,_0x50e64d)=>this['_updateActiveAnnotation'](_0x50e64d),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x48b389,_0x46a74d)=>this['_removeCommentThread'](_0x46a74d)),this['on']('updateCommentThread',(_0x42d5a1,_0x37db40)=>this['_updateCommentThread'](_0x37db40)),this['on']('updateCommentThread',(_0x128e6b,_0x3936c9)=>this['_updateActiveAnnotation'](_0x3936c9),{'priority':'lowest'}),this['on']('addComment',(_0x4f6f63,_0x36f000)=>this['_addComment'](_0x36f000)),this['on']('updateComment',(_0x3dd47c,_0xab84ae)=>this['_updateComment'](_0xab84ae)),this['on']('removeComment',(_0xbff37,_0x117fbf)=>this['_removeComment'](_0x117fbf)),this['on']('addComment',(_0x5f0e1a,{threadId:_0x2f9495,isFromAdapter:_0x5218cd})=>{if(_0x5218cd)return;const _0x3739ac=this['getCommentThread'](_0x2f9495),_0x1a7d6f=_0x3739ac&&this['_threadToController']['get'](_0x3739ac);_0x1a7d6f&&_0x1a7d6f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x50c3d0,'change:activeAnnotations',(_0xdaf8ec,_0x28dea5,_0x311f9b)=>{const _0x268952=Array['from'](_0x311f9b)['map'](_0x404ccb=>this['_viewToController']['get'](_0x404ccb['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x268952?_0x268952['model']:null;});}set['adapter'](_0x403ab4){if(this['_adapter'])throw new _0x1b1980('commentsrepository-adapter-already-set');this['_adapter']=_0x403ab4;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x343340=zt,threadId:_0x17e4f5=_0xd38b92(),comments:_0x4df5b6=[],unlinkedAt:_0x532248=null,resolvedAt:_0x7174e7=null,resolvedBy:_0x25cb98=null,target:_0x210775=null,context:_0x49435a=null,attributes:_0x4dcb1b={},isResolvable:_0x564d21=!0x0,isSubmitted:_0x59efb0=!0x1,isFromAdapter:_0x4bd92e=!0x1}={}){return this['fire'](ii('addCommentThread',_0x343340),{'channelId':_0x343340,'threadId':_0x17e4f5,'comments':_0x4df5b6,'unlinkedAt':_0x532248,'resolvedAt':_0x7174e7,'resolvedBy':_0x25cb98,'target':_0x210775,'context':_0x49435a,'attributes':_0x4dcb1b,'isFromAdapter':_0x4bd92e,'isResolvable':_0x564d21,'isSubmitted':_0x59efb0}),this['getCommentThread'](_0x17e4f5);}['openNewCommentThread']({channelId:_0x5def14=zt,threadId:_0x867bb4=_0xd38b92(),target:_0x1067d9,context:_0xf1f227=null,isResolvable:_0x491ab2=!0x0}){if(this['_readOnlyChannels']['has'](_0x5def14)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1067d9)throw new _0x1b1980('commentsrepository-missing-target');const _0xed1d7=this['addCommentThread']({'channelId':_0x5def14,'threadId':_0x867bb4,'target':_0x1067d9,'context':_0xf1f227,'isResolvable':_0x491ab2});if(!_0xed1d7)return null;const _0x56764a=this['_threadToController']['get'](_0xed1d7),_0x376a98=_0x56764a['view']['commentThreadInputView']['commentInputView'],_0x2e3f9a=this['context']['plugins']['get']($t),_0x3e1751=_0x2e3f9a['getByInnerView'](_0x56764a['view']);return _0x2e3f9a['activate'](_0x3e1751),_0x376a98['once']('editorReady',()=>_0x376a98['focus']()),_0xed1d7;}['hasCommentThread'](_0x4b7320){if('string'!=typeof _0x4b7320)throw new _0x1b1980('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4b7320);}['updateCommentThread']({channelId:_0x149bd1=zt,threadId:_0x3642fa,context:_0x4a7323,unlinkedAt:_0xbd0e1d,attributes:_0x513c46,isFromAdapter:_0x143d5a=!0x1}){return this['fire'](ii('updateCommentThread',_0x149bd1),{'channelId':_0x149bd1,'threadId':_0x3642fa,'context':_0x4a7323,'unlinkedAt':_0xbd0e1d,'attributes':_0x513c46,'isFromAdapter':_0x143d5a}),this['getCommentThread'](_0x3642fa);}['getCommentThread'](_0x2b41a5){if('string'!=typeof _0x2b41a5)throw new _0x1b1980('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2b41a5);}['fetchCommentThread']({channelId:_0x2b750c,threadId:_0x18417c}={}){const _0x440654=this['getCommentThread'](_0x18417c);if(_0x440654)return Promise['resolve'](_0x440654);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x1b1980('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2b750c,'threadId':_0x18417c})['then'](_0xc00b25=>this['hasCommentThread'](_0x18417c)?this['getCommentThread'](_0x18417c):_0xc00b25?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2b750c},_0xc00b25)):void 0x0)['catch'](_0x5504da=>{throw console['error'](_0x5504da),new _0x1b1980('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x3f3aac,skipNotAttached:_0x3090b3=!0x1,skipEmpty:_0x664d13=!0x1,toJSON:_0x57a12f=!0x1}={}){const _0x3cd145=[];for(const _0x43d0cb of this['_threads']['values']())_0x3f3aac&&_0x43d0cb['channelId']!==_0x3f3aac||_0x3090b3&&!_0x43d0cb['isAttached']||_0x664d13&&0x0===_0x43d0cb['length']||_0x3cd145['push'](_0x43d0cb);return _0x57a12f?_0x3cd145['map'](_0x26af2b=>_0x26af2b['toJSON']()):_0x3cd145;}['getAnnotationForCommentThread'](_0x4a1ba6){const _0x2a2fb1=this['_threadToController']['get'](_0x4a1ba6);if(!_0x2a2fb1)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x2a2fb1['view'])||null;}['getCommentThreadForAnnotation'](_0x441338){const _0xd3052e=this['_viewToController']['get'](_0x441338['innerView']);return _0xd3052e?_0xd3052e['model']:null;}['setActiveCommentThread'](_0xfcc049){const _0x5c5ca6=this['context']['plugins']['get']($t);if(!_0xfcc049)return void(this['activeCommentThread']&&_0x5c5ca6['deactivateAll']());const _0x24d3ca=this['getCommentThread'](_0xfcc049);if(!_0x24d3ca)throw new _0x1b1980('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xfcc049});if(!this['_threadToController']['has'](_0x24d3ca))throw new _0x1b1980('commentsrepository-active-not-attached',null,{'threadId':_0xfcc049});const _0x36c435=_0x5c5ca6['getByInnerView'](this['_threadToController']['get'](_0x24d3ca)['view']);_0x5c5ca6['activate'](_0x36c435);}['switchReadOnly'](_0x102dae,_0x41e503){_0x102dae?this['_readOnlyChannels']['add'](_0x41e503):this['_readOnlyChannels']['delete'](_0x41e503),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2008fb){return this['_readOnlyChannels']['has'](_0x2008fb)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3ba169,_0x453c38){return new It(_0x3ba169,_0x453c38);}['setPermissions'](_0x4f2d87,_0x563c9d=zt){this['_permissions']['set'](_0x563c9d,_0x4f2d87),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2863d2=zt){return this['_permissions']['has'](_0x2863d2)?this['_permissions']['get'](_0x2863d2):Jt;}['_addCommentThread']({channelId:_0x4dcfde,threadId:_0x2367f9,comments:_0x15c3bc,unlinkedAt:_0x3a7635,resolvedAt:_0x90ba20,resolvedBy:_0x368405,target:_0x1ec5ba,context:_0x43ea0c,attributes:_0x4344e3,isFromAdapter:_0x5520a0,isResolvable:_0x2d2d6a,isSubmitted:_0x40d98f}){if('string'!=typeof _0x2367f9)throw new _0x1b1980('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2367f9});if(this['hasCommentThread'](_0x2367f9))throw new _0x1b1980('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2367f9});const _0x5fd225=new Zt(this,{'channelId':_0x4dcfde,'id':_0x2367f9,'context':_0x43ea0c,'attributes':_0x4344e3,'unlinkedAt':_0x3a7635,'resolvedAt':_0x90ba20,'resolvedBy':_0x368405?this['context']['plugins']['get'](_0x10cb81)['getUser'](_0x368405):null,'isResolvable':_0x2d2d6a,'isSubmitted':_0x40d98f||_0x5520a0});this['_threads']['set'](_0x2367f9,_0x5fd225);for(const _0x511a41 of _0x15c3bc)_0x5fd225['_add'](this['_createNewComment']({'threadId':_0x2367f9,..._0x511a41}));return _0x1ec5ba&&_0x5fd225['attachTo'](_0x1ec5ba),_0x5520a0||!_0x5fd225['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4dcfde,'threadId':_0x2367f9});}['_submitCommentThread']({channelId:_0x22223e,threadId:_0x1fbe8a}){if(!this['hasCommentThread'](_0x1fbe8a))throw new _0x1b1980('commentsrepository-missing-comment-thread',this);const _0x1cbf9b=this['getCommentThread'](_0x1fbe8a);if(_0x1cbf9b['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2ab27c,comments:_0x50d2b3,resolvedAt:_0x501513,resolvedBy:_0x4fd153,context:_0x89396,attributes:_0x2371a2}=_0x1cbf9b,_0x5c4eb3=this['context']['plugins']['get']('PendingActions'),_0x31cb83=_0x5c4eb3['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x22223e,'threadId':_0x2ab27c,'comments':_0x50d2b3['map'](_0x3202c6=>_0x3202c6['toJSON']()),'resolvedAt':_0x501513,'resolvedBy':_0x4fd153?_0x4fd153['id']:_0x4fd153,'context':_0x89396,'attributes':_0x2371a2})['then'](({comments:_0x56f420})=>{_0x5c4eb3['remove'](_0x31cb83);for(const _0x3f8bea of _0x56f420)this['_updateComment']({'channelId':_0x22223e,'threadId':_0x1fbe8a,'commentId':_0x3f8bea['commentId'],'createdAt':_0x3f8bea['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x24b2de=>{throw console['error'](_0x24b2de),new _0x1b1980('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5391bf,target:_0x401205}){const _0x3466f4=this['getCommentThread'](_0x5391bf);if(!_0x3466f4)throw new _0x1b1980('commentsrepository-attach-missing-comment-thread',this);const _0x2b1ab6=this['context']['plugins']['get']('PendingActions'),_0x2b820f=this['context']['plugins']['get']($t),_0x4b3b26=this['_createCommentThreadView'](_0x3466f4),_0xf43015=new It(_0x3466f4,_0x4b3b26);let _0x3bb88f=null;_0x4b3b26['on']('change:isDirty',(_0x2e8aae,_0x56842b,_0x37fe4c)=>{_0x37fe4c?_0x3bb88f=_0x2b1ab6['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3bb88f&&(_0x2b1ab6['remove'](_0x3bb88f),_0x3bb88f=null);}),this['_threadToController']['set'](_0x3466f4,_0xf43015),this['_viewToController']['set'](_0x4b3b26,_0xf43015);const _0x35b1e5=new Kt(this['context']['locale'],_0x4b3b26);_0x35b1e5['bind']('length')['to'](_0x4b3b26),_0x35b1e5['bind']('isDirty')['to'](_0x4b3b26,'isDirty',_0x4b3b26,'length',(_0x307cee,_0x2f6753)=>_0x307cee||!_0x2f6753),_0x35b1e5['bind']('isActive')['to'](_0x4b3b26),_0x35b1e5['type']='comment';const _0x1f6e25=new Yt({'view':_0x35b1e5,'target':_0x401205,'type':'comment','isVisible':!_0x3466f4['archivedAt']&&!!('function'==typeof _0x401205?_0x401205():_0x401205)});return _0x4b3b26['on']('escape',()=>{_0x1f6e25['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4b3b26,_0x1f6e25),_0x2b820f['add'](_0x1f6e25),_0x1f6e25;}['_bindAnnotationToEditors'](_0x43d107,_0x196a6d){this['listenTo'](_0x43d107,'editorReady',(_0x560d60,_0x5e9225)=>{const _0x4f0ef8=_0x5e9225['ui']['view']['body']['bodyCollectionContainer'];_0x196a6d['focusableElements']['add'](_0x4f0ef8),this['context']instanceof _0x5707ed&&this['context']['ui']['focusTracker']['add'](_0x4f0ef8);},{'priority':'highest'}),this['listenTo'](_0x43d107,'editorDestroyed',(_0x4e33c1,_0x3a5776)=>{const _0x40796c=_0x3a5776['ui']['view']['body']['bodyCollectionContainer'];_0x196a6d['focusableElements']['has'](_0x40796c)&&_0x196a6d['focusableElements']['remove'](_0x40796c),this['context']instanceof _0x5707ed&&this['context']['ui']['focusTracker']['remove'](_0x40796c);});}['_unbindEditors'](_0x10c799){this['stopListening'](_0x10c799,'editorReady'),this['stopListening'](_0x10c799,'editorDestroyed');}['_createCommentThreadView'](_0x5472c4){const _0x58f5ca=this['context']['plugins']['get'](_0x10cb81),{config:_0xa02f5,locale:_0x360041}=this['context'],_0x50652d=_0x4d6238(_0xa02f5['get']('locale'),_0x360041);return new(0x0,(_0xa02f5['get']('comments'))['CommentThreadView'])(_0x360041,_0x5472c4,_0x58f5ca['me'],{'editorConfig':{..._0xa02f5['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xa02f5['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xa02f5['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xa02f5['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xa02f5['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x50652d,'CommentView':_0xa02f5['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x16f871,channelId:_0x51d55d,resolvedAt:_0x414042,resolvedBy:_0x534713,isFromAdapter:_0xa0e818}){if(!this['hasCommentThread'](_0x16f871))throw new _0x1b1980('commentsrepository-missing-comment-thread',null,{'threadId':_0x16f871});const _0x5af6b8=this['getCommentThread'](_0x16f871);if(_0x5af6b8['isResolved'])throw new _0x1b1980('commentsrepository-resolved-comment-thread',null,{'threadId':_0x16f871});const _0x17e8e0=this['context']['plugins']['get'](_0x10cb81);if(_0x5af6b8['resolvedBy']=_0x17e8e0['getUser'](_0x534713),_0x5af6b8['resolvedAt']=_0x414042,_0xa0e818||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3ddbac=this['context']['plugins']['get']('PendingActions'),_0x3d715c=_0x3ddbac['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x51d55d,'threadId':_0x16f871})['then'](({resolvedAt:_0x2e0082,resolvedBy:_0x304516})=>{_0x3ddbac['remove'](_0x3d715c),_0x5af6b8['resolvedBy']['id']!==_0x304516&&(_0x5af6b8['resolvedBy']=_0x17e8e0['getUser'](_0x304516)),_0x5af6b8['resolvedAt']=_0x2e0082;})['catch'](_0x1af706=>{throw console['error'](_0x1af706),new _0x1b1980('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x417cae,channelId:_0x5a8553,isFromAdapter:_0x2b0db2}){if(!this['hasCommentThread'](_0x417cae))throw new _0x1b1980('commentsrepository-missing-comment-thread',null,{'threadId':_0x417cae});const _0x56d43b=this['getCommentThread'](_0x417cae);if(!_0x56d43b['isResolved'])throw new _0x1b1980('commentsrepository-reopen-comment-thread',null,{'threadId':_0x417cae});if(_0x56d43b['resolvedBy']=null,_0x56d43b['resolvedAt']=null,_0x2b0db2||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1d2ec3=this['context']['plugins']['get']('PendingActions'),_0x2858d9=_0x1d2ec3['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5a8553,'threadId':_0x417cae})['then'](()=>_0x1d2ec3['remove'](_0x2858d9))['catch'](_0x4eac4c=>{throw console['error'](_0x4eac4c),new _0x1b1980('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4cad56,isFromAdapter:_0x40cf40}){const _0xc94a46=this['getCommentThread'](_0x4cad56);if(!_0xc94a46)throw new _0x1b1980('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4cad56),this['_threads']['delete'](_0x4cad56),!_0xc94a46['isSubmitted']||_0x40cf40||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x18c627=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4cf9f8}=_0xc94a46,_0xa52c39=_0x18c627['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4cf9f8,'threadId':_0x4cad56})['then'](()=>_0x18c627['remove'](_0xa52c39))['catch'](_0x4cfef4=>{throw console['error'](_0x4cfef4),new _0x1b1980('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x17af93,unlinkedAt:_0x3698f3,context:_0x4ae24c,attributes:_0x2206bd,isFromAdapter:_0x34dad5}){if('string'!=typeof _0x17af93)throw new _0x1b1980('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x17af93});if(!this['hasCommentThread'](_0x17af93))throw new _0x1b1980('commentsrepository-missing-comment-thread',null,{'threadId':_0x17af93});const _0x4f5247=this['getCommentThread'](_0x17af93);let _0x23a9e3=!0x1;if(void 0x0!==_0x4ae24c&&_0x4f5247['context']!==_0x4ae24c&&(_0x4f5247['context']=_0x4ae24c,_0x23a9e3=!0x0),void 0x0!==_0x3698f3&&_0x4f5247['unlinkedAt']!==_0x3698f3&&(_0x4f5247['unlinkedAt']=_0x3698f3,_0x23a9e3=!0x0),_0x2206bd&&!_0x4ec491(_0x2206bd,_0x4f5247['attributes'])&&(_0x4f5247['attributes']=_0x2206bd,_0x23a9e3=!0x0),!_0x23a9e3)return Promise['resolve']();if(!_0x4f5247['isSubmitted']||_0x34dad5||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2eab09=this['context']['plugins']['get']('PendingActions'),{channelId:_0x58da1e}=_0x4f5247,_0x5a5c25=_0x2eab09['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x58da1e,'threadId':_0x17af93,'context':_0x4ae24c,'unlinkedAt':_0x3698f3,'attributes':_0x2206bd})['then'](()=>_0x2eab09['remove'](_0x5a5c25))['catch'](_0x1f61e9=>{throw console['error'](_0x1f61e9),new _0x1b1980('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x36be8b){const _0x3251aa=this['context']['plugins']['get']($t),_0x120699=this['getCommentThread'](_0x36be8b);if(_0x120699['_isAttached']=!0x1,this['_threadToController']['has'](_0x120699)){const _0x224865=this['_threadToController']['get'](_0x120699),_0x2dd933=_0x224865['view'],_0x2da1e3=_0x3251aa['getByInnerView'](_0x2dd933);this['_threadToController']['delete'](_0x120699),this['_viewToController']['delete'](_0x2dd933),_0x2da1e3&&_0x3251aa['remove'](_0x2da1e3),_0x224865['destroy'](),_0x2dd933['destroy']()['then'](()=>{this['_unbindEditors'](_0x2dd933);});}}['_updateActiveAnnotation']({threadId:_0x2e677c,resolvedAt:_0x422da5,unlinkedAt:_0x172941}){const _0x68167c=!!_0x422da5,_0x4d69b7=this['context']['plugins']['get']($t),_0x419e4b=this['getCommentThread'](_0x2e677c);if(this['_threadToController']['has'](_0x419e4b)){const _0x225621=this['_threadToController']['get'](_0x419e4b)['view'],_0x5905d6=_0x4d69b7['getByInnerView'](_0x225621);_0x5905d6&&(_0x68167c&&_0x4d69b7['_removeActiveAnnotation'](_0x5905d6),_0x172941?_0x5905d6['isVisible']=!0x1:_0x5905d6['refreshVisibility']());}}['_getExternalAuthor'](_0x414df6){const _0x5dda38=this['context']['plugins']['get'](_0x10cb81),_0x2c13d5=_0x31eb8f('external:'+_0x414df6),_0x13a202=_0x5dda38['getUser'](_0x2c13d5);return _0x13a202||_0x5dda38['addUser']({'id':_0x2c13d5,'name':_0x414df6});}['_createNewComment']({threadId:_0x5de296,commentId:_0x158b59=_0xd38b92(),content:_0x51befc,authorId:_0x47d0f6,createdAt:_0x507ebc,attributes:_0x4675ee}){if('string'!=typeof _0x158b59)throw new _0x1b1980('commentsrepository-invalid-commentid');if('string'!=typeof _0x47d0f6)throw new _0x1b1980('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x51befc||!_0x51befc['trim']())throw new _0x1b1980('commentsrepository-invalid-comment-content');const _0x472bff=this['context']['plugins']['get'](_0x10cb81)['getUser'](_0x47d0f6);if(!_0x472bff)throw new _0x1b1980('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x47d0f6});let _0xce5c64=null,_0x2d71c6=_0x507ebc;return _0x4675ee?.['@external']&&(_0xce5c64=this['_getExternalAuthor'](_0x4675ee['@external']['authorName']),_0x2d71c6=new Date(_0x4675ee['@external']['createdAt'])),new ti(this,{'threadId':_0x5de296,'id':_0x158b59,'author':_0xce5c64||_0x472bff,'creator':_0x472bff,'content':_0x51befc,'createdAt':_0x507ebc,'authoredAt':_0x2d71c6,'attributes':_0x4675ee});}['_addComment'](_0x43fede){let {threadId:_0xc606b3,content:_0x247e8e,attributes:_0x431211,isFromAdapter:_0x372a50}=_0x43fede;const _0x59c747=this['getCommentThread'](_0x43fede['threadId']);if(!_0x59c747)throw new _0x1b1980('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5de2fc=this['_createNewComment'](_0x43fede),{id:_0x6f6440}=_0x5de2fc;if(_0x59c747['_add'](_0x5de2fc),_0x372a50||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x59c747['isSubmitted'])return Promise['resolve']();const _0x1c41d1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3a48ae}=_0x59c747,_0x59b6d7=_0x1c41d1['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x431211||(_0x431211={}),this['adapter']['addComment']({'channelId':_0x3a48ae,'threadId':_0xc606b3,'commentId':_0x6f6440,'content':_0x247e8e,'attributes':_0x431211})['then'](_0x5ba169=>{_0x1c41d1['remove'](_0x59b6d7),_0x5ba169&&this['_updateComment']({'channelId':_0x3a48ae,'threadId':_0xc606b3,'commentId':_0x6f6440,'createdAt':_0x5ba169['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4f2624=>{throw console['error'](_0x4f2624),new _0x1b1980('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0xc09ee1,commentId:_0x3979aa,content:_0x13a682,createdAt:_0x229834,attributes:_0x54eac7,isFromAdapter:_0x2df6b5}){if(void 0x0!==_0x13a682&&('string'!=typeof _0x13a682||!_0x13a682['trim']()['length']))throw new _0x1b1980('commentsrepository-update-comment-invalid-content');const _0x2b3b81=this['getCommentThread'](_0xc09ee1),_0x72b1b7=_0x2b3b81['getComment'](_0x3979aa);if(!_0x72b1b7)throw new _0x1b1980('commentsrepository-update-missing-comment',this);let _0x25998e=!0x1;if(_0x13a682&&_0x13a682!==_0x72b1b7['content']&&(_0x72b1b7['isEditable']||_0x2df6b5)&&(_0x72b1b7['content']=_0x13a682,_0x25998e=!0x0),_0x229834&&_0x229834!==_0x72b1b7['createdAt']&&(_0x72b1b7['createdAt']=_0x229834,_0x72b1b7['attributes']&&_0x72b1b7['attributes']['@external']||(_0x72b1b7['authoredAt']=_0x229834),_0x25998e=!0x0),_0x54eac7&&!_0x4ec491(_0x54eac7,_0x72b1b7['attributes'])&&(_0x72b1b7['attributes']=_0x54eac7,_0x25998e=!0x0),!_0x25998e)return Promise['resolve']();if(_0x2b3b81['fire']('commentUpdated'),_0x2df6b5||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x41e3d8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x49636e}=this['getCommentThread'](_0x72b1b7['threadId']),_0x26391b=_0x41e3d8['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x49636e,'threadId':_0xc09ee1,'commentId':_0x3979aa,'content':_0x13a682,'attributes':_0x54eac7})['then'](()=>_0x41e3d8['remove'](_0x26391b))['catch'](_0x152802=>{throw console['error'](_0x152802),new _0x1b1980('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x321c62,commentId:_0x5626fd,isFromAdapter:_0x545459}){const _0x20bbda=this['getCommentThread'](_0x321c62),_0x3549af=_0x20bbda['getComment'](_0x5626fd);if(!_0x3549af)throw new _0x1b1980('commentsrepository-remove-missing-comment',this);if(_0x20bbda['_remove'](_0x3549af),_0x545459||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4e955a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x289510}=_0x20bbda,_0x158c61=_0x4e955a['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x289510,'threadId':_0x321c62,'commentId':_0x5626fd})['then'](()=>_0x4e955a['remove'](_0x158c61))['catch'](_0x495789=>{throw console['error'](_0x495789),new _0x1b1980('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
30
+ _0x413137(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3582f3,_0x523692){super();const _0x36b368=_0x523692['isResolvable'];this['channelId']=_0x523692['channelId'],this['id']=_0x523692['id'],this['comments']=new _0x3b337f(),this['_repository']=_0x3582f3,this['_isAttached']=!0x1,this['_isSubmitted']=_0x523692['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3582f3,'_permissions',_0x3582f3,'_readOnlyChannels',()=>_0x3582f3['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3582f3,'_permissions',()=>_0x3582f3['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3582f3,'_permissions',()=>{const _0x4391af=_0x3582f3['getPermissions'](this['channelId']);return _0x4391af['write']||_0x4391af['admin'];}),this['bind']('isResolvable')['to'](_0x3582f3,'_permissions',()=>_0x36b368&&_0x3582f3['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x523692['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x179952,_0x4b94c5)=>_0x179952?_0x4b94c5?_0x179952<_0x4b94c5?_0x179952:_0x4b94c5:_0x179952:_0x4b94c5),this['set']('unlinkedAt',_0x523692['unlinkedAt']||null),this['set']('resolvedAt',_0x523692['resolvedAt']||null),this['set']('resolvedBy',_0x523692['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x21c280=>!!_0x21c280),this['set']('attributes',_0x523692['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x39ffe6,_0x18b208)=>_0x39ffe6+_0x18b208['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2baeb3,id:_0x5b8504}=this;this['_repository']['fire'](ii('submitCommentThread',_0x2baeb3),{'channelId':_0x2baeb3,'threadId':_0x5b8504});}['setUnlinkedAt'](_0x4cab4d){this['_update']({'unlinkedAt':_0x4cab4d});}['resolve']({resolvedAt:_0x2d98b9=new Date(),resolvedBy:_0x3001f6='',isFromAdapter:_0x9c2ae9=!0x1}={}){const _0x15bfff=this['_repository']['context']['plugins']['get'](_0x10cb81)['me'],{channelId:_0x2011e3,id:_0x4f71ac}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x2011e3),{'channelId':_0x2011e3,'threadId':_0x4f71ac,'resolvedAt':_0x2d98b9,'resolvedBy':_0x3001f6||_0x15bfff['id'],'isFromAdapter':_0x9c2ae9});}['reopen']({isFromAdapter:_0x15998f=!0x1}={}){const {channelId:_0x3a1f5d,id:_0x80155c}=this;this['_repository']['fire'](ii('reopenCommentThread',_0x3a1f5d),{'channelId':_0x3a1f5d,'threadId':_0x80155c,'isFromAdapter':_0x15998f});}['setContext'](_0x451a55){this['context']||this['_update']({'context':_0x451a55});}['setAttribute'](_0x3f31ef,_0x503278){const _0x384b9c=_0xae9a1e(this['attributes']);_0x3916ab(_0x384b9c,_0x3f31ef,_0x503278),this['_update']({'attributes':_0x384b9c});}['removeAttribute'](_0x303b6c){const _0x49d6ca=_0xae9a1e(this['attributes']);_0x165f1c(_0x49d6ca,_0x303b6c),this['_update']({'attributes':_0x49d6ca});}['remove']({isFromAdapter:_0x513293=!0x1}={}){const {channelId:_0x39e5e5,id:_0x3beb5d}=this;this['_repository']['fire'](ii('removeCommentThread',_0x39e5e5),{'channelId':_0x39e5e5,'threadId':_0x3beb5d,'isFromAdapter':_0x513293});}['attachTo'](_0x549f25){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x549f25});}['addComment'](_0x39e068){const {channelId:_0x532aac,id:_0x133739}=this;this['_repository']['fire'](ii('addComment',_0x532aac,_0x133739),Object['assign']({'channelId':_0x532aac,'threadId':_0x133739},_0x39e068));}['getComment'](_0x232149){if('string'!=typeof _0x232149)throw new _0x1b1980('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x232149});return this['comments']['get'](_0x232149);}['toJSON'](){return{'threadId':this['id'],'context':this['context'],'unlinkedAt':this['unlinkedAt'],'resolvedAt':this['resolvedAt'],'resolvedBy':this['resolvedBy']?this['resolvedBy']['id']:null,'archivedAt':this['archivedAt'],'comments':this['comments']['map'](_0x54b800=>_0x54b800['toJSON']()),'attributes':this['attributes']};}['_add'](_0xa1a67){return this['listenTo'](_0xa1a67,'change:authoredAt',()=>{const _0x44fa27=this['_findOptimalIndex'](_0xa1a67),_0x44f604=this['comments'];_0x44fa27-0x1!=_0x44f604['getIndex'](_0xa1a67)&&_0x44fa27+0x1!=_0x44f604['getIndex'](_0xa1a67)&&(this['_remove'](_0xa1a67),this['_add'](_0xa1a67));}),this['comments']['add'](_0xa1a67,this['_findOptimalIndex'](_0xa1a67));}['_update'](_0x46cc3a){const {channelId:_0x2afbcf,id:_0x518942}=this;this['_repository']['fire'](ii('updateCommentThread',_0x2afbcf),{..._0x46cc3a,'channelId':_0x2afbcf,'threadId':_0x518942});}['_remove'](_0x433362){return this['stopListening'](_0x433362),_0x433362['destroy'](),this['comments']['remove'](_0x433362);}['_findOptimalIndex'](_0x4ee9fb){const _0x2d27ab=this['comments']['find'](_0x44e5f3=>new Date(_0x44e5f3['authoredAt'])['getTime']()>new Date(_0x4ee9fb['authoredAt'])['getTime']());return _0x2d27ab?this['comments']['getIndex'](_0x2d27ab):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
31
+ _0x413137(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0xc88c60,_0x2edb58){super();const _0x517378=_0xc88c60['context']['plugins']['get'](_0x10cb81)['me'],_0x37bcd1=_0xc88c60['getCommentThread'](_0x2edb58['threadId']),_0x2bd990=0x0===_0x37bcd1['comments']['length'],_0x1c217b=_0x517378===_0x2edb58['author'];this['id']=_0x2edb58['id'],this['threadId']=_0x2edb58['threadId'],this['author']=_0x2edb58['author'],this['creator']=_0x2edb58['creator'],this['isExternal']=Boolean(_0x2edb58['attributes']&&_0x2edb58['attributes']['@external']),this['set']('content',_0x2edb58['content']),this['createdAt']=_0x2edb58['createdAt']||new Date(),this['set']('authoredAt',_0x2edb58['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x37bcd1,'resolvedAt'),this['set']('attributes',_0x2edb58['attributes']||{}),this['bind']('isEditable')['to'](_0xc88c60,'_permissions',()=>{const _0x505380=_0xc88c60['getPermissions'](_0x37bcd1['channelId'])['write'],_0x12eb9b=_0xc88c60['getPermissions'](_0x37bcd1['channelId'])['modifyAll'];return _0x1c217b&&_0x505380||!_0x1c217b&&_0x12eb9b;}),this['bind']('isRemovable')['to'](_0x37bcd1,'isRemovable',_0xc88c60,'_permissions',_0x551f84=>{const _0x46cff9=_0xc88c60['getPermissions'](_0x37bcd1['channelId'])['write'],_0x24b9b8=_0xc88c60['getPermissions'](_0x37bcd1['channelId'])['modifyAll'];return _0x1c217b&&_0x46cff9||_0x551f84&&_0x2bd990||!_0x1c217b&&_0x24b9b8&&!_0x2bd990;}),this['bind']('isReadOnly')['to'](_0x37bcd1,'isReadOnly'),this['_repository']=_0xc88c60;}get['weight'](){return Math['max'](function(_0x404711){const _0x54832c=document['createElement']('div');return _0x54832c['innerHTML']=_0x404711,_0x54832c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x4273bd){const {threadId:_0x4bc95d,id:_0x873c4c}=this;if(!this['_repository']['hasCommentThread'](_0x4bc95d))throw new _0x1b1980('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5d9c91}=this['_repository']['getCommentThread'](_0x4bc95d);this['_repository']['fire'](ii('updateComment',_0x5d9c91,_0x4bc95d),{'channelId':_0x5d9c91,'threadId':_0x4bc95d,'commentId':_0x873c4c,..._0x4273bd});}['setAttribute'](_0x5415ac,_0x235e8a){const _0x51d0ec=_0xae9a1e(this['attributes']);_0x3916ab(_0x51d0ec,_0x5415ac,_0x235e8a),this['update']({'attributes':_0x51d0ec});}['removeAttribute'](_0x5d0451){const _0x33bb7f=_0xae9a1e(this['attributes']);_0x165f1c(_0x33bb7f,_0x5d0451),this['update']({'attributes':_0x33bb7f});}['remove'](_0x344863={}){if(!_0x344863['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2f46ca,id:_0x3e7aa4}=this;if(!this['_repository']['hasCommentThread'](_0x2f46ca))throw new _0x1b1980('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x553302}=this['_repository']['getCommentThread'](_0x2f46ca);this['_repository']['fire'](ii('removeComment',_0x553302,_0x2f46ca),{'channelId':_0x553302,'threadId':_0x2f46ca,'commentId':_0x3e7aa4,..._0x344863});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x16513e,..._0x53321d){for(const _0x3dbe70 of _0x53321d)void 0x0!==_0x3dbe70&&(_0x16513e+=':'+String(_0x3dbe70));return _0x16513e;}class ei extends _0x4b2822{constructor(_0x13b628){super(_0x13b628),this['set']('hasContent',!0x1);}['refresh'](){const _0x1f14be=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4b1bc1 of _0x1f14be['getRanges']())if(this['_hasContent'](_0x4b1bc1))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x190849=_0xd38b92(),ranges:_0x35dc6e,comment:_0x13f635}={}){const _0xa06be8=this['editor']['model'],_0x5b7972=_0x35dc6e??Array['from'](_0xa06be8['document']['selection']['getRanges']()),_0x249a86=[];for(const _0x232dd2 of _0x5b7972)this['_hasContent'](_0x232dd2)&&_0x249a86['push'](this['_trimToContent'](_0x232dd2));if(!_0x249a86['length'])throw new _0x1b1980('addcommentthreadcommand-incorrect-ranges',null);_0x13f635&&this['_createCommentThread'](_0x190849,_0x13f635),this['_createMarkersFromRanges'](_0x190849,_0x249a86,!!_0x13f635);}['_createMarkersFromRanges'](_0x4eaab4,_0x596566,_0x53bce8){this['editor']['model']['change'](_0x53cd50=>{for(const _0x57003d of _0x596566){const _0x1e12c0=_0xd38b92()['substr'](0x1,0x5),_0x4ea2a0='comment:'+_0x4eaab4+':'+_0x1e12c0;_0x53cd50['addMarker'](_0x4ea2a0,{'range':_0x57003d,'usingOperation':_0x53bce8,'affectsData':_0x53bce8});}});}['_createCommentThread'](_0x92eb52,_0x53b870){const _0x415a28=this['editor']['plugins']['get']('CommentsRepository'),_0xa231b0=this['editor']['config']['get']('collaboration.channelId'),_0x237d5b=this['editor']['plugins']['get']('Users')['me'];if(!_0x237d5b)throw new _0x1b1980('addcommentthreadcommand-user-not-found',null);_0x415a28['addCommentThread']({'threadId':_0x92eb52,'channelId':_0xa231b0,'comments':[{'authorId':_0x237d5b['id'],'content':_0x53b870,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x176fc7){for(const _0x4bbd07 of _0x176fc7['getItems']())if(this['_itemIsContent'](_0x4bbd07))return!0x0;return!0x1;}['_itemIsContent'](_0x5ace5c){return _0x5ace5c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5ace5c)&&!_0x5ace5c['is']('element','tableCell');}['_trimToContent'](_0x412132){const _0x5df6b1=_0xb4d900=>!this['_itemIsContent'](_0xb4d900['item']),_0x398a46=_0x412132['start']['getLastMatchingPosition'](_0x5df6b1),_0x22444f=_0x412132['end']['getLastMatchingPosition'](_0x5df6b1,{'direction':'backward'});return this['editor']['model']['createRange'](_0x398a46,_0x22444f);}}class si extends _0x3549b7{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x28f0a9){super(_0x28f0a9),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x38113=this['editor'],_0x50cea4=_0x38113['model']['document']['selection'],_0x4ca8f6=_0x14b05e(()=>this['refreshSelectedViews'](),0xa);_0x50cea4['on']('change:range',(_0x3999f3,_0x5b74b3)=>{_0x5b74b3['directChange']&&(_0x4ca8f6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x38113['editing']['view']['document'],'change:isFocused',(_0x10c4ca,_0x18701b,_0x15a8fb)=>{_0x15a8fb&&_0x4ca8f6();}),this['listenTo'](_0x38113['ui']['focusTracker'],'change:isFocused',(_0x130173,_0x30400d,_0x59ea25)=>{_0x59ea25||this['fire']('blur',{'isAnnotationTracked':_0x5ba3d2=>this['_editorAnnotationsData']['has'](_0x5ba3d2['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x486a27){if(this['_editorAnnotations']['has'](_0x486a27['view']))return;this['_editorAnnotations']['add'](_0x486a27['view']),this['editor']['ui']['focusTracker']['add'](_0x486a27['view']['element']);const _0x2fa865=this['editor']['plugins']['get']($t);this['listenTo'](_0x2fa865['collection'],'remove',(_0x23876b,_0x3f956d)=>{this['editor']['ui']['focusTracker']['remove'](_0x3f956d['view']['element']),this['_editorAnnotations']['delete'](_0x3f956d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x374838){if('function'!=typeof _0x374838)throw new _0x1b1980('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x374838);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x12b99d,annotations:_0x1909f4}){const _0x2bb546=[],_0xfe98bc=this['editor']['model']['document']['selection'],_0x55d298=Array['from'](_0xfe98bc['getRanges']());for(const [_0x454497,_0x3ce62a]of this['_editorAnnotationsData']){const _0x1cb475=_0x553de3(_0x3ce62a),_0x4f8333=_0x1909f4['getByInnerView'](_0x454497);_0x1cb475&&_0x4f8333&&_0x2bb546['push']({'annotation':_0x4f8333,'range':_0x1cb475});}function _0x553de3(_0x2182f4){for(const _0x347695 of _0x2182f4)for(const _0x42e86f of _0x55d298)if(_0x347695['containsRange'](_0x42e86f,!_0xfe98bc['isCollapsed']))return _0x347695;return null;}return _0x2bb546['sort']((_0x49b588,_0x4042f4)=>{const _0x22f322=_0x49b588['range'],_0x4175d7=_0x4042f4['range'];if(!_0x22f322['isEqual'](_0x4175d7)){if(_0x22f322['containsRange'](_0x4175d7,!0x0))return 0x1;if(_0x4175d7['containsRange'](_0x22f322,!0x0))return-0x1;}return _0x49b588['annotation']==_0x12b99d?-0x1:_0x4042f4['annotation']==_0x12b99d?0x1:0x0;})['map'](_0x42a68d=>_0x42a68d['annotation']);}get['_editorAnnotationsData'](){const _0x17ea8f=new Map();for(const _0x589036 of Array['from'](this['_dataCollectors']))for(const [_0x36ce22,_0x36f4aa]of _0x589036())_0x17ea8f['set'](_0x36ce22,_0x36f4aa);return _0x17ea8f;}}class ni extends _0x3549b7{['afterInit'](){const _0x578eac=this['editor'];if(!_0x578eac['plugins']['has']('RestrictedEditingModeEditing'))return;_0x578eac['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x3549b7{constructor(_0x3a0b2a){super(_0x3a0b2a),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xc25787=this['editor'],_0xcdd739=_0xc25787['commands']['get']('importWord'),_0x57673c=_0xc25787['plugins']['get'](_0x10cb81);_0xcdd739&&(_0xcdd739['on']('execute',(_0x51ccb5,[,_0x193392])=>{_0x193392['collaboration_features']={'comments':!0x0,'user_id':_0x57673c['me']['id']};},{'priority':_0x42489c['high']+0xa}),this['listenTo'](_0xcdd739,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x3938c5,_0x26e9a0){const {comment_threads:_0x8155db}=_0x26e9a0;_0x8155db&&_0x8155db['forEach'](({thread_id:_0x49f29c,comments:_0x400137,is_resolved:_0x9e3d35})=>{const _0x56e591=new Date(),_0x3d52d8=_0x400137['map'](({author:_0x4bad5a,content:_0x3d95ed,created_at:_0x538823})=>({'content':_0x3d95ed,'authorId':this['editor']['plugins']['get'](_0x10cb81)['me']['id'],'createdAt':_0x56e591,'attributes':{'@external':{'authorName':_0x4bad5a,'createdAt':_0x538823?new Date(_0x538823):new Date(),'source':'importWord'}}})),_0x18b669=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x18b669,'threadId':_0x49f29c,'comments':_0x3d52d8,'resolvedAt':_0x9e3d35?_0x56e591:null});});}}class ri extends _0x3549b7{constructor(_0xbdba35){super(_0xbdba35),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x233456=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x233456,'contentInsertion',(_0x2c95b9,_0x35c724)=>this['_removeMarkersWithoutThreads'](_0x35c724['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xea7190){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xea7190;const _0x3fbd51=this['editor']['plugins']['get']('CommentsRepository');for(const _0x144f9e of _0xea7190['keys']()){const [_0x472cbb,_0x432933]=_0x144f9e['split'](':');'comment'!=_0x472cbb||_0x3fbd51['hasCommentThread'](_0x432933)||_0xea7190['delete'](_0x144f9e);}return _0xea7190;}['_registerMarkerInClipboardPipeline'](){const _0x2d727b=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x40027c=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x40027c&&_0x2d727b['_registerMarkerToCopy']('comment',_0x40027c);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x28c2d0){switch(_0x28c2d0){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x4bf009){const _0x84fa01=_0x4bf009['split'](':');return{'group':_0x84fa01[0x0],'id':_0x84fa01[0x1],'part':_0x84fa01[0x2]};}class ai extends _0x3549b7{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x13c6de,_0x3f8f68)=>{if(!_0x3f8f68['options']['showCommentHighlights'])return null;if(_0x3f8f68['options']['ignoreResolvedComments']){const {id:_0x10a4c7}=hi(_0x13c6de['markerName']),_0x5d3c1e=this['editor']['plugins']['get'](Qt);if(_0x5d3c1e['getCommentThread'](_0x10a4c7)?.['isResolved']&&_0x13c6de['item'])return _0x3f8f68['consumable']['consume'](_0x13c6de['item'],'addMarker:'+_0x13c6de['markerName']),_0x3f8f68['consumable']['consume'](_0x13c6de['item'],'removeMarker:'+_0x13c6de['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x348bfc=>{_0x348bfc['on']('addMarker:comment',(_0x131db6,_0x107223,_0x4985df)=>{if(!_0x4985df['options']['showCommentHighlights'])return;const _0x4298fc=_0x107223['item'];if(!_0x4298fc)return;const _0x10bc74=_0x4985df['mapper']['toViewElement'](_0x4298fc);this['editor']['model']['schema']['isObject'](_0x4298fc)&&_0x10bc74&&!_0x10bc74['getCustomProperty']('widget')&&_0x10bc74['is']('containerElement')&&Ct(_0x10bc74,_0x4985df['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x26fa14,{writer:_0x4f8908,options:_0x72be6d})=>{if(!_0x72be6d['showCommentHighlights'])return null;const _0x1b8687=_0x4f8908['createContainerElement']('div'),_0x1b9133=_0x4f8908['createEmptyElement']('hr');return _0x4f8908['addClass']('ck-horizontal-line',_0x1b8687),_0x4f8908['insert'](_0x4f8908['createPositionAt'](_0x1b8687,0x0),_0x1b9133),_0x1b8687;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x6daa4b,{writer:_0xed0473,options:_0x55b31f})=>{if(!_0x55b31f['showCommentHighlights'])return null;const _0x3cabf6=_0xed0473['createContainerElement']('span'),_0x352366=_0xed0473['createEmptyElement']('img');return _0xed0473['addClass']('image-inline',_0x3cabf6),_0xed0473['insert'](_0xed0473['createPositionAt'](_0x3cabf6,0x0),_0x352366),_0x3cabf6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x7010d3,{writer:_0x2000d3,options:_0x11de9d})=>{if(_0x11de9d['showCommentHighlights'])return _0x2000d3['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1b1112,_0x339478,_0x1f2fea)=>{_0x1f2fea['options']['showCommentHighlights']&&_0x1b1112['stop']();},{'priority':'high'});}}class ci extends _0x3549b7{static get['requires'](){return[Qt,si,_0x10cb81,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1567e0){super(_0x1567e0),this['set']('isThreadsLoadingPaused',!0x0),_0x1567e0['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xe8155d,_0xd10858,_0x1ea20d,_0x12a4c8)=>{const _0x397742=_0x1567e0['plugins']['get'](Qt),_0xe02ce6=_0x1ea20d?hi(_0x1ea20d)['id']:null;_0x1567e0['model']['change'](()=>{if(_0xe02ce6){const _0x28dafc=this['getAllMarkersForId'](_0xe02ce6);for(const _0x441e36 of _0x28dafc)_0x1567e0['editing']['reconvertMarker'](_0x441e36);}if(_0x12a4c8){const {id:_0x246f4f}=hi(_0x12a4c8),_0x372f42=_0x397742['getCommentThread'](_0x246f4f);if(_0x372f42&&_0x372f42['unlinkedAt'])return;if(_0x372f42&&!_0x372f42['isAttached'])return;const _0x5dd24b=this['getAllMarkersForId'](_0x246f4f);for(const _0x1f4738 of _0x5dd24b)_0x1567e0['editing']['reconvertMarker'](_0x1f4738);}}),_0xe02ce6&&this['scrollToThreadMarker'](_0xe02ce6);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xafb97a=this['editor'],_0x252f0c=_0xafb97a['plugins']['get'](Qt),_0x269b5a=_0xafb97a['config']['get']('collaboration.channelId'),_0x30f24e=_0x252f0c['getCommentThreads']()['filter'](_0xc7fdd8=>_0xc7fdd8['channelId']!==_0x269b5a);_0xafb97a['commands']['add']('addCommentThread',new ei(_0xafb97a)),this['listenTo'](_0xafb97a,'change:isReadOnly',(_0x25b053,_0x3cef00,_0x3b2c67)=>{_0x252f0c['switchReadOnly'](_0x3b2c67,_0xafb97a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x252f0c,di('addCommentThread',_0x269b5a),(_0x3cca60,{threadId:_0x2d4fd9})=>{const _0x214b46=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x2d4fd9);_0x214b46?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2d4fd9);}),this['listenTo'](_0x252f0c,di('removeCommentThread',_0x269b5a),(_0x386219,{threadId:_0x5e7941})=>{_0xafb97a['model']['enqueueChange']({'isUndoable':!0x1},_0x2c4e0a=>{const _0xb35f38=this['getAllMarkersForId'](_0x5e7941);for(const _0x52924e of _0xb35f38)_0x2c4e0a['removeMarker'](_0x52924e);});}),this['listenTo'](_0x252f0c,di('resolveCommentThread',_0x269b5a),(_0x147fe5,{threadId:_0x511945})=>{(this['_reconvertMarkers'](_0x511945),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x511945)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x252f0c,di('reopenCommentThread',_0x269b5a),(_0x320024,{threadId:_0x1ba3f7})=>{this['_reconvertMarkers'](_0x1ba3f7);},{'priority':'low'}),this['listenTo'](_0x252f0c,di('addComment',_0x269b5a),(_0x11edd0,{threadId:_0x6a31e2,isFromAdapter:_0x2bde04})=>{const _0x13e55b=this['getAllMarkersForId'](_0x6a31e2);if(_0x2bde04||0x0==_0x13e55b['length']||!_0x252f0c['hasCommentThread'](_0x6a31e2))return;0x1===_0x252f0c['getCommentThread'](_0x6a31e2)['length']&&_0xafb97a['model']['enqueueChange']({'isUndoable':!0x1},_0x5624cf=>{for(const _0x457a8e of _0x13e55b)_0x5624cf['updateMarker'](_0x457a8e,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x30f24e);}['afterInit'](){!async function(_0x5ca77a){const _0x1f0f99=_0x3a532b([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x4e89b6=0x73460ab3,_0x2ea39f=0x73418e7b^_0x4e89b6,_0x38a315=window[_0x3a532b([0x44,0x61,0x74,0x65])][_0x3a532b([0x6e,0x6f,0x77])](),_0x5014c0=_0x5ca77a[_0x3a532b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1ea55d=new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3feac2=>{_0x5014c0[_0x3a532b([0x6f,0x6e,0x63,0x65])](_0x3a532b([0x72,0x65,0x61,0x64,0x79]),_0x3feac2);}),_0x510758={[_0x3a532b([0x6b,0x74,0x79])]:_0x3a532b([0x45,0x43]),[_0x3a532b([0x75,0x73,0x65])]:_0x3a532b([0x73,0x69,0x67]),[_0x3a532b([0x63,0x72,0x76])]:_0x3a532b([0x50,0x2d,0x32,0x35,0x36]),[_0x3a532b([0x78])]:_0x3a532b([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x3a532b([0x79])]:_0x3a532b([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x3a532b([0x61,0x6c,0x67])]:_0x3a532b([0x45,0x53,0x32,0x35,0x36])},_0x9d18a4=_0x5014c0[_0x3a532b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3a532b([0x67,0x65,0x74])](_0x3a532b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x55251c(){let _0x4c8505,_0x2e738d=null,_0x227fcb=null;try{if(_0x9d18a4==_0x3a532b([0x47,0x50,0x4c]))return _0x3a532b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4c8505=_0x364d8f(),!_0x4c8505)return _0x3a532b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4c8505[_0x3a532b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x227fcb=_0x3b0d6e(_0x4c8505[_0x3a532b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4c8505[_0x3a532b([0x6a,0x74,0x69])])),await _0x36a04d()?_0x14a853()?_0x3c1499()?_0x3a532b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3b5460()?(_0x4c8505[_0x3a532b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3a532b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e738d=_0x11ae28(_0x3a532b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x148194()):_0x3a532b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3a532b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3a532b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3a532b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3c1499(){const _0x3b9b15=[_0x3a532b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3a532b([0x74,0x72,0x69,0x61,0x6c])][_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c8505[_0x3a532b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x38a315/0x3e8:0xe10*_0x2ea39f;return _0x4c8505[_0x3a532b([0x65,0x78,0x70])]<_0x3b9b15;}function _0x14a853(){const _0x16bb0b=_0x4c8505[_0x3a532b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x16bb0b)return!0x1;if(_0x16bb0b[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a532b([0x2a])))return!0x0;if(_0x16bb0b[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a532b([0x43,0x4d,0x54])))return!0x0;if(_0x16bb0b[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a532b([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x1238ea())return!0x0;if(_0x16bb0b[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a532b([0x52,0x43,0x4d,0x54]))){if(_0x164752())return!0x0;if(_0x461014()||_0x2d82c1())return!0x0;}return!0x1;}function _0x3b5460(){const _0x408482=_0x4c8505[_0x3a532b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x408482||0x0==_0x408482[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1f947a}=new URL(window[_0x3a532b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x408482[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f947a))return!0x0;const _0x5508c9=_0x1f947a[_0x3a532b([0x73,0x70,0x6c,0x69,0x74])](_0x3a532b([0x2e]));return _0x408482[_0x3a532b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4aee8a=>_0x4aee8a[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a532b([0x2a])))[_0x3a532b([0x6d,0x61,0x70])](_0x496e46=>_0x496e46[_0x3a532b([0x73,0x70,0x6c,0x69,0x74])](_0x3a532b([0x2e])))[_0x3a532b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x39f8e5=>_0x39f8e5[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5508c9[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3a532b([0x6d,0x61,0x70])](_0x5540e6=>Array(_0x5508c9[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5540e6[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3a532b([0x66,0x69,0x6c,0x6c])](_0x5540e6[0x0]===_0x3a532b([0x2a])?_0x3a532b([0x2a]):'')[_0x3a532b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5540e6))[_0x3a532b([0x73,0x6f,0x6d,0x65])](_0xd54ed5=>_0x5508c9[_0x3a532b([0x65,0x76,0x65,0x72,0x79])]((_0x319840,_0x251e22)=>_0xd54ed5[_0x251e22]===_0x319840||_0xd54ed5[_0x251e22]===_0x3a532b([0x2a])));}function _0x148194(){return _0x2e738d&&_0x227fcb?new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4d739e,_0x487beb)=>{_0x2e738d[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x4d739e,_0x487beb),_0x227fcb[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x3a78f1=>{_0x3a78f1!=_0x3a532b([0x56,0x61,0x6c,0x69,0x64])&&_0x4d739e(_0x3a78f1);},_0x487beb);}):_0x2e738d||_0x227fcb||_0x3a532b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3b0d6e(_0x367ad9,_0x321371){return new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x52c1df=>{if(_0x5b3475())return _0x52c1df(_0x3a532b([0x56,0x61,0x6c,0x69,0x64]));_0x2b3226(),_0x5014c0[_0x3a532b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3a532b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x407e14=!0x1;const _0x5ca43d=_0xd38b92();function _0x38a648(_0x3c3a5e){return!!_0x3c3a5e&&(typeof _0x3c3a5e===_0x3a532b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3c3a5e===_0x3a532b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3c3a5e[_0x3a532b([0x74,0x68,0x65,0x6e])]===_0x3a532b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3c3a5e[_0x3a532b([0x63,0x61,0x74,0x63,0x68])]===_0x3a532b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xcab991(_0x4f81cc){_0x41d44d(_0x4f81cc)[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x41886e=>{if(!_0x41886e||_0x41886e[_0x3a532b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3a532b([0x6f,0x6b]))return _0x3a532b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x36db7e(_0x35070e(_0x5ca43d+_0x321371))!=_0x41886e[_0x3a532b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3a532b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3a532b([0x56,0x61,0x6c,0x69,0x64]);})[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x523576=>(_0x2f8c69(),_0x523576),()=>{const _0x58c69f=_0x1518e3();return null==_0x58c69f?(_0x2f8c69(),_0x3a532b([0x56,0x61,0x6c,0x69,0x64])):_0x3a532b(_0x38a315-_0x58c69f>(0x574a8eb3^_0x4e89b6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x52c1df)[_0x3a532b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x52c1df(_0x3a532b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2e757e=0x7370e433^_0x4e89b6;function _0x2f8c69(){const _0x594135=_0x3a532b([0x6c,0x6c,0x63,0x74,0x2d])+_0x36db7e(_0x35070e(_0x367ad9)),_0x22f3fd=_0x1c8fc2(_0x36db7e(window[_0x3a532b([0x4d,0x61,0x74,0x68])][_0x3a532b([0x63,0x65,0x69,0x6c])](_0x38a315/_0x2e757e)));window[_0x3a532b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3a532b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x594135,_0x22f3fd);}function _0x1518e3(){const _0xabb6d5=_0x3a532b([0x6c,0x6c,0x63,0x74,0x2d])+_0x36db7e(_0x35070e(_0x367ad9)),_0x4de94a=window[_0x3a532b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3a532b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xabb6d5);return _0x4de94a?window[_0x3a532b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c8fc2(_0x4de94a),0x10)*_0x2e757e:null;}function _0x41d44d(_0x4411c9){return new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2b08a7,_0x34e29b)=>{_0x4411c9[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x2b08a7,_0x34e29b),window[_0x3a532b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x34e29b,0x7347de73^_0x4e89b6);});}}_0x5014c0[_0x3a532b([0x6f,0x6e])](_0x3a532b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x7834e8,_0x57c3a4)=>{if(_0x57c3a4[0x0]!=_0x367ad9)return _0x52c1df(_0x3a532b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x57c3a4[0x1]={..._0x57c3a4[0x1],[_0x3a532b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5ca43d};},{[_0x3a532b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3a532b([0x68,0x69,0x67,0x68])}),_0x5014c0[_0x3a532b([0x6f,0x6e])](_0x3a532b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3ede7c=>{_0x38a648(_0x3ede7c[_0x3a532b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x407e14=!0x0,_0xcab991(_0x3ede7c[_0x3a532b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3a532b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3a532b([0x6c,0x6f,0x77])}),_0x1ea55d[_0x3a532b([0x74,0x68,0x65,0x6e])](()=>{_0x407e14||_0x52c1df(_0x3a532b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5b3475(){return _0x5014c0[_0x3a532b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3a532b([0x76,0x69,0x65,0x77])][_0x3a532b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3a532b([0x61,0x75,0x74,0x6f]);}function _0x2b3226(){_0x5014c0[_0x3a532b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3a532b([0x76,0x69,0x65,0x77])][_0x3a532b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3a532b([0x61,0x75,0x74,0x6f]);}}function _0x11ae28(_0x112eda){const _0x4635f8=[new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xfb1a5e=>setTimeout(_0xfb1a5e,0x734f347f^_0x4e89b6)),_0x1ea55d[_0x3a532b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e7fc3=>{let _0x220940=0x0;_0x5014c0[_0x3a532b([0x6d,0x6f,0x64,0x65,0x6c])][_0x3a532b([0x6f,0x6e])](_0x3a532b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xbf9d2b,_0x57ecd9)=>{_0x57ecd9[0x0][_0x3a532b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x220940++,_0x220940==(0x73460f5b^_0x4e89b6)&&(_0x3e7fc3(),_0xbf9d2b[_0x3a532b([0x6f,0x66,0x66])]());});}))];return window[_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3a532b([0x72,0x61,0x63,0x65])](_0x4635f8)[_0x3a532b([0x74,0x68,0x65,0x6e])](()=>_0x112eda);}async function _0x4e5e64(){await _0x1ea55d,_0x5014c0[_0x3a532b([0x6d,0x6f,0x64,0x65,0x6c])][_0x3a532b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xeb97f4,_0x5014c0[_0x3a532b([0x6d,0x6f,0x64,0x65,0x6c])][_0x3a532b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xeb97f4,_0x5014c0[_0x3a532b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3a532b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1238ea(){return window[_0x3a532b([0x67,0x6c,0x6f,0x62])]&&window[_0x3a532b([0x67,0x6c,0x6f,0x62])][_0x3a532b([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x164752(){return _0x17f71b(_0x3a532b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x57fecd(_0x3a532b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3a532b([0x73,0x74,0x61,0x74,0x65])]==_0x3a532b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x461014(){return _0x17f71b(_0x3a532b([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x2d82c1(){return _0x17f71b(_0x3a532b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x462428(_0x187446){const _0x25774c=_0x464220();_0x5014c0[_0x25774c]=_0x3a532b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x187446,_0x187446!=_0x3a532b([0x56,0x61,0x6c,0x69,0x64])&&_0x4e5e64();}function _0x464220(){const _0x297f5c=window[_0x3a532b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3a532b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3a532b([0x6e,0x6f,0x77])]())[_0x3a532b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3a532b([0x2e]),'');let _0x3aee49=_0x3a532b([0x4b]);for(let _0x21bd2f=0x0;_0x21bd2f<_0x297f5c[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x21bd2f+=0x2){let _0x92511c=window[_0x3a532b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x297f5c[_0x3a532b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x21bd2f,_0x21bd2f+0x2));_0x92511c>=_0x1f0f99[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x92511c-=_0x1f0f99[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3aee49+=_0x1f0f99[_0x92511c];}return _0x3aee49;}function _0x364d8f(){const _0x10b082=_0x9d18a4[_0x3a532b([0x73,0x70,0x6c,0x69,0x74])](_0x3a532b([0x2e]));if(0x3!=_0x10b082[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3d35ba(_0x10b082[0x1]);function _0x3d35ba(_0x307ee5){const _0x238fc7=_0x46c02c(_0x307ee5);return _0x238fc7&&_0x1fb842()?_0x238fc7:null;function _0x1fb842(){const _0x59986f=_0x238fc7[_0x3a532b([0x6a,0x74,0x69])],_0x227498=window[_0x3a532b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x59986f[_0x3a532b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x59986f[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x47d5ba={..._0x238fc7,[_0x3a532b([0x6a,0x74,0x69])]:_0x59986f[_0x3a532b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x59986f[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x47d5ba[_0x3a532b([0x76,0x63])],_0x35070e(_0x47d5ba)==_0x227498;}}}async function _0x36a04d(){let _0x369a14=!0x0;try{const _0x3ed68e=_0x9d18a4[_0x3a532b([0x73,0x70,0x6c,0x69,0x74])](_0x3a532b([0x2e])),[_0x1c6fa0,_0xf2c509,_0x6b603e]=_0x3ed68e;return _0x46217a(_0x1c6fa0),await _0x131043(_0x1c6fa0,_0xf2c509,_0x6b603e),_0x369a14;}catch{return!0x1;}function _0x46217a(_0x369b63){const _0x254313=_0x46c02c(_0x369b63);_0x254313&&_0x254313[_0x3a532b([0x61,0x6c,0x67])]==_0x3a532b([0x45,0x53,0x32,0x35,0x36])||(_0x369a14=!0x1);}async function _0x131043(_0x24d51a,_0x2dca1b,_0x4c3e53){const _0x265825=window[_0x3a532b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3a532b([0x66,0x72,0x6f,0x6d])](_0x4a5882(_0x4c3e53),_0x901137=>_0x901137[_0x3a532b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x36c43d=new window[(_0x3a532b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3a532b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x24d51a+_0x3a532b([0x2e])+_0x2dca1b),_0x390536=window[_0x3a532b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3a532b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x390536)return;const _0x342ac1=await _0x390536[_0x3a532b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3a532b([0x6a,0x77,0x6b]),_0x510758,{[_0x3a532b([0x6e,0x61,0x6d,0x65])]:_0x3a532b([0x45,0x43,0x44,0x53,0x41]),[_0x3a532b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3a532b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3a532b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x390536[_0x3a532b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3a532b([0x6e,0x61,0x6d,0x65])]:_0x3a532b([0x45,0x43,0x44,0x53,0x41]),[_0x3a532b([0x68,0x61,0x73,0x68])]:{[_0x3a532b([0x6e,0x61,0x6d,0x65])]:_0x3a532b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x342ac1,_0x265825,_0x36c43d)||(_0x369a14=!0x1);}}function _0x46c02c(_0x35b39d){return _0x35b39d[_0x3a532b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3a532b([0x65,0x79]))?JSON[_0x3a532b([0x70,0x61,0x72,0x73,0x65])](_0x4a5882(_0x35b39d)):null;}function _0x4a5882(_0x4aade4){return window[_0x3a532b([0x61,0x74,0x6f,0x62])](_0x4aade4[_0x3a532b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3a532b([0x2b]))[_0x3a532b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3a532b([0x2f])));}function _0x35070e(_0x1d149f){let _0x528a98=0x1505;function _0x416dfa(_0x2ea2b7){for(let _0x5429c9=0x0;_0x5429c9<_0x2ea2b7[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5429c9++){const _0x2ff5ef=_0x2ea2b7[_0x3a532b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5429c9);_0x528a98=(_0x528a98<<0x5)+_0x528a98+_0x2ff5ef,_0x528a98&=_0x528a98;}}function _0x43f39a(_0x34e16f){Array[_0x3a532b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x34e16f)?_0x34e16f[_0x3a532b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x43f39a):_0x34e16f&&typeof _0x34e16f==_0x3a532b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3a532b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x34e16f)[_0x3a532b([0x73,0x6f,0x72,0x74])]()[_0x3a532b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x445a69,_0x38e39a])=>{_0x416dfa(_0x445a69),_0x43f39a(_0x38e39a);}):_0x416dfa(window[_0x3a532b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x34e16f));}return _0x43f39a(_0x1d149f),_0x528a98>>>0x0;}function _0x36db7e(_0x1d4f02){return _0x1d4f02[_0x3a532b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3a532b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3a532b([0x30]));}function _0x1c8fc2(_0x18b300){return _0x18b300[_0x3a532b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3a532b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3a532b([0x6a,0x6f,0x69,0x6e])]('');}function _0x17f71b(_0x5f2452){return _0x5014c0[_0x3a532b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3a532b([0x68,0x61,0x73])](_0x5f2452);}function _0x57fecd(_0x21afa6){return _0x5014c0[_0x3a532b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3a532b([0x67,0x65,0x74])](_0x21afa6);}function _0xeb97f4(){}function _0x3a532b(_0x8ec2bb){return _0x8ec2bb['map'](_0x2f79d6=>String['fromCharCode'](_0x2f79d6))['join']('');}_0x462428(await _0x55251c());}(this);}['destroy'](){const _0x28ffa6=this['editor']['plugins']['get'](Qt),_0x427c0c=this['editor']['config']['get']('collaboration.channelId');for(const _0x3f6eae of _0x28ffa6['getCommentThreads']({'channelId':_0x427c0c}))_0x28ffa6['_detachCommentThread'](_0x3f6eae['id']),_0x28ffa6['_threads']['delete'](_0x3f6eae['id']);super['destroy']();}['hasMarkerForId'](_0xeafaa3){return this['getAllMarkersForId'](_0xeafaa3)['length']>0x0;}['getAllMarkersForId'](_0x509789){const _0x2debbb=[];for(const _0x3aea37 of this['editor']['model']['markers'])_0x3aea37['name']['startsWith']('comment:'+_0x509789)&&_0x2debbb['push'](_0x3aea37);return _0x2debbb;}['scrollToThreadMarker'](_0x45f39f){setTimeout(()=>{const _0x25efe2=this['_getTargetForId'](_0x45f39f);if(!_0x25efe2)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x45f39f&&_0x262072({'target':_0x25efe2[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2b29c2){this['editor']['model']['change'](()=>{for(const _0x29e3b5 of this['getAllMarkersForId'](_0x2b29c2))this['editor']['editing']['reconvertMarker'](_0x29e3b5);});}['_attachArchivedThread'](_0x3b9651){const _0xd1f0d3=this['editor']['plugins']['get'](Qt),_0x367a7d=this['editor']['plugins']['get'](si),_0x41b41c=_0xd1f0d3['getCommentThread'](_0x3b9651);if(!_0x41b41c['isAttached']){const _0x34c237=_0x41b41c['attachTo'](()=>this['_getTargetForId'](_0x41b41c['id']));_0x367a7d['registerAnnotation'](_0x34c237),_0x41b41c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x88279b=this['editor'],_0x59a9f9=_0x88279b['plugins']['get'](_0x10cb81);_0x88279b['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x16c851,_0x19e562)=>{const {id:_0xe7595c}=hi(_0x16c851['markerName']),_0x3f1c8e=_0x88279b['plugins']['get'](Qt)['getCommentThread'](_0xe7595c),_0x315b62=this['activeMarker']&&hi(this['activeMarker'])['id']===_0xe7595c;let _0x2541d3;if(_0x3f1c8e&&_0x3f1c8e['isResolved']&&!_0x315b62&&_0x16c851['item'])return _0x19e562['consumable']['consume'](_0x16c851['item'],'addMarker:'+_0x16c851['markerName']),_0x19e562['consumable']['consume'](_0x16c851['item'],'removeMarker:'+_0x16c851['markerName']),null;const _0xdbd1d8=['ck-comment-marker'];return _0x315b62&&_0xdbd1d8['push']('ck-comment-marker--active'),_0x2541d3=_0x3f1c8e?.['length']?_0x3f1c8e['comments']['first']['author']['id']:_0x59a9f9['me']['id'],{'classes':_0xdbd1d8,'attributes':{'data-comment':_0xe7595c,'data-author-id':_0x2541d3}};}}),_0x88279b['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x15555d,{options:_0x23a484})=>{if(_0x23a484['showCommentHighlights'])return null;const _0x358a0b=_0x88279b['plugins']['get'](Qt),_0x2102ed=_0x88279b['model']['markers']['get'](_0x15555d),{id:_0x43697c,part:_0x341595}=hi(_0x15555d);return _0x2102ed&&!_0x2102ed['affectsData']||_0x23a484['ignoreResolvedComments']&&_0x358a0b['getCommentThread'](_0x43697c)?.['isResolved']?null:{'group':'comment','name':_0x341595?_0x43697c+':'+_0x341595:_0x43697c};}}),_0x88279b['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4f7c85,{writer:_0x5d38ac})=>_0x5d38ac['createElement']('$marker',{'data-name':'comment:'+_0x4f7c85['getAttribute']('id')})}),_0x88279b['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x512271=this['editor'],_0x1ab43e=_0x512271['plugins']['get'](Qt),_0x34a3dc=new Set(),_0x27402b=new Set();_0x512271['model']['document']['registerPostFixer'](_0x4d2423=>{let _0x35acfb=!0x1;for(const {name:_0x253965,data:_0xf271ae}of _0x512271['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4ccd78,id:_0x38c8b2}=hi(_0x253965);let _0x5107a4=_0xf271ae['newRange'];if('comment'!==_0x4ccd78||!_0x5107a4)continue;const _0x1b79aa='$graveyard'===_0x5107a4['root']['rootName'];_0x1b79aa||(_0x5107a4=li(_0x5107a4,_0x512271['model']),!_0x5107a4||_0x5107a4['isCollapsed']||!_0xf271ae['newRange']||_0x5107a4['isEqual'](_0xf271ae['newRange']))?_0x512271['model']['hasContent'](_0x5107a4)&&!_0x1b79aa?this['isThreadsLoadingPaused']?_0x34a3dc['add'](_0x253965):this['_handleThreadMarker'](_0x253965,_0x38c8b2):(_0x27402b['add'](_0x253965),_0x34a3dc['delete'](_0x253965),_0x4d2423['removeMarker'](_0x253965),_0x35acfb=!0x0):(_0x4d2423['updateMarker'](_0x253965,{'range':_0x5107a4}),_0x35acfb=!0x0);}return _0x35acfb;}),this['on']('change:isThreadsLoadingPaused',(_0x2f4609,_0x21f4e1,_0x177738)=>{if(!_0x177738&&_0x34a3dc['size'])for(const _0xb39ac7 of _0x34a3dc){const {id:_0x26c226}=hi(_0xb39ac7);_0x34a3dc['delete'](_0xb39ac7),_0x512271['model']['markers']['get'](_0xb39ac7)&&this['_handleThreadMarker'](_0xb39ac7,_0x26c226);}}),this['listenTo'](_0x512271['model']['document'],'change',()=>{for(const {name:_0xd1b6d3,data:{newRange:_0x51575e}}of _0x512271['model']['document']['differ']['getChangedMarkers']()){const {group:_0x138ec7,id:_0x4cabf0}=hi(_0xd1b6d3);if('comment'!==_0x138ec7)continue;const _0x2e69d2=_0x1ab43e['getCommentThread'](_0x4cabf0),_0x230401=this['hasMarkerForId'](_0x4cabf0);_0x2e69d2&&(!_0x2e69d2['_hasTargetInContent']&&_0x51575e&&_0x512271['editing']['view']['once']('render',()=>{const _0x303a47=_0x512271['plugins']['get']($t),_0x1cfb35=_0x1ab43e['_threadToController']['get'](_0x2e69d2)['view'];_0x303a47['getByInnerView'](_0x1cfb35)['refreshVisibility']();},{'priority':'low'}),_0x2e69d2['_hasTargetInContent']=_0x230401||!!_0x51575e),_0x51575e||(_0x27402b['add'](_0xd1b6d3),_0x34a3dc['delete'](_0xd1b6d3));}for(const _0x586e6b of _0x27402b){const {id:_0x7bb1b7}=hi(_0x586e6b),_0x211642=_0x1ab43e['getCommentThread'](_0x7bb1b7);if(_0x34a3dc['delete'](_0x586e6b),!_0x211642)continue;const _0x3f5ba5=this['hasMarkerForId'](_0x7bb1b7);_0x3f5ba5||_0x211642['isSubmitted']?_0x3f5ba5||_0x211642['unlinkedAt']||_0x211642['setUnlinkedAt'](new Date()):_0x211642['remove']();}_0x27402b['clear']();});}['_handleInitialThreads'](_0x3297d9){_0x3297d9['forEach'](_0x91897a=>{_0x91897a['unlinkedAt']&&this['_attachArchivedThread'](_0x91897a['id']);});}['_getTargetForId'](_0x4f86af){const _0x59fd16=this['editor'],_0x5e6459=this['getAllMarkersForId'](_0x4f86af);return _0x217526(_0x59fd16['editing'],_0x5e6459);}['_getTextContext'](_0x37d018){const _0x144040=this['getAllMarkersForId'](_0x37d018);let _0x772f18='',_0x2b3323=!0x1;for(const _0x31ae0f of _0x144040){const _0xc0166a=_0x31ae0f['getRange']();for(const _0x57a2ca of Array['from'](_0xc0166a['getItems']()))_0x57a2ca['is']('$textProxy')?(_0x772f18&&_0x2b3323&&(_0x772f18+='\x20',_0x2b3323=!0x1),_0x772f18+=_0x57a2ca['data']):_0x2b3323=!0x0;_0x2b3323=!0x0;}return _0x772f18['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1c05ec,_0x403859){const _0x4470e3=this['editor'],_0x35fa44=_0x4470e3['plugins']['get'](Qt);let _0x203eb0=_0x35fa44['getCommentThread'](_0x403859);const _0x41575a=_0x4470e3['config']['get']('collaboration.channelId'),_0x24795a=_0x4470e3['plugins']['get'](si);if(_0x203eb0&&(_0x203eb0['unlinkedAt']&&_0x203eb0['setUnlinkedAt'](null),_0x203eb0['isAttached']))return _0x203eb0;return!this['getAllMarkersForId'](_0x403859)[0x0]['managedUsingOperations']?_0x4470e3['editing']['view']['once']('render',()=>{if(_0x35fa44['getCommentThread'](_0x403859))return;const _0x473a36=_0x4470e3['plugins']['get']($t);_0x203eb0=_0x35fa44['openNewCommentThread']({'channelId':_0x41575a,'threadId':_0x403859,'target':()=>this['_getTargetForId'](_0x403859),'context':{'type':'text','value':this['_getTextContext'](_0x403859)}});const _0x350908=_0x35fa44['_threadToController']['get'](_0x203eb0)['view'],_0x48e580=_0x473a36['getByInnerView'](_0x350908);_0x48e580&&_0x24795a['registerAnnotation'](_0x48e580);},{'priority':'low'}):_0x35fa44['fetchCommentThread']({'channelId':_0x41575a,'threadId':_0x403859})['then'](_0x54ebbb=>{if('destroyed'!==_0x4470e3['state']){if(_0x203eb0=_0x54ebbb,_0x203eb0&&!_0x203eb0['isAttached']){const _0x5305d0=_0x203eb0['attachTo'](()=>this['_getTargetForId'](_0x403859));_0x24795a['registerAnnotation'](_0x5305d0),_0x203eb0['isResolved']&&this['_reconvertMarkers'](_0x403859);}else{if(!_0x203eb0){const _0x55c74a=this['getAllMarkersForId'](_0x403859);_0x4470e3['model']['change'](_0x414d3=>{for(const _0xe8691f of _0x55c74a)_0x414d3['removeMarker'](_0xe8691f);});}}}}),_0x203eb0;}['_handleThreadMarker'](_0x25c007,_0xc6fb47){const _0x43b5a3=this['_attachMarkerToThread'](_0x25c007,_0xc6fb47);_0x43b5a3&&!_0x43b5a3['context']&&_0x43b5a3['setContext']({'type':'text','value':this['_getTextContext'](_0xc6fb47)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1964e3=this['editor'];_0x1d04f1(_0x1964e3['model'],({left:_0x273783,entered:_0x4d1385})=>{for(const _0x548861 of _0x273783)if(ui(_0x548861)){_0x1964e3['ui']['ariaLiveAnnouncer']['announce'](bt(_0x1964e3['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xd3eeb7 of _0x4d1385)if(ui(_0xd3eeb7)){_0x1964e3['ui']['ariaLiveAnnouncer']['announce'](bt(_0x1964e3['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x2660aa(_0x626299)));break;}});}}function di(_0x24ce84,_0x517fa8){return _0x517fa8?_0x24ce84+':'+_0x517fa8:_0x24ce84;}function li(_0x5438b5,_0x158f50){const _0x135a92=_0x158f50['schema'],_0x5b9fcb=_0x158f50['createRange'](_0x5438b5['start']);for(const _0x553aa8 of _0x5438b5['getWalker']()){const {type:_0x22f8f3,item:_0x33ca62,nextPosition:_0x351e52}=_0x553aa8;if('text'===_0x22f8f3||_0x135a92['isObject'](_0x33ca62)){const _0x528b71=_0x158f50['createPositionBefore'](_0x33ca62);_0x5b9fcb['isCollapsed']&&(_0x5b9fcb['start']=_0x528b71),_0x5b9fcb['end']=_0x351e52;}}return _0x5b9fcb;}function ui(_0x5d18dd){return'comment'===hi(_0x5d18dd['name'])['group'];}class mi extends _0x3549b7{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x4d213c=this['editor'],_0x433a7d=_0x4d213c['plugins']['get'](Qt),_0x231151=_0x4d213c['plugins']['get'](ci),_0x2da7b5=_0x4d213c['plugins']['get']($t),_0x546719=_0x4d213c['plugins']['get'](si);_0x4d213c['ui']['componentFactory']['add']('comment',()=>{const _0xd9c5d0=this['_createUIButton'](_0x2ef389);return _0xd9c5d0['tooltip']=!0x0,_0xd9c5d0;}),_0x4d213c['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x546719['addSourceCollector'](()=>{const _0x3af0ee=[];for(const [_0x288f48,_0x2a4d68]of _0x433a7d['_threadToController']){const _0xc0e06a=_0x231151['getAllMarkersForId'](_0x288f48['id']),_0x58c98c=_0xc0e06a['map'](_0x5349da=>_0x5349da['getRange']());_0xc0e06a['length']>0x0&&_0x3af0ee['push']([_0x2a4d68['view'],_0x58c98c]);}return _0x3af0ee;}),this['listenTo'](_0x2da7b5,'change:activeAnnotations',(_0x188643,_0x4f53c9,_0x1430ff)=>{const _0x5bb9f0=Array['from'](_0x1430ff)['map'](_0x5b541d=>_0x5b541d['innerView'])['find'](_0x1864c8=>_0x433a7d['_viewToController']['has'](_0x1864c8));if(!_0x5bb9f0)return void(_0x231151['activeMarker']=null);const _0x219a02=_0x433a7d['_viewToController']['get'](_0x5bb9f0)['model']['id'],_0xacc2e3='comment:'+_0x219a02;_0x219a02&&_0x231151['hasMarkerForId'](_0x219a02)?_0x231151['activeMarker']=_0xacc2e3:_0x231151['activeMarker']&&(_0x231151['activeMarker']=null);}),this['listenTo'](_0x433a7d,'removeCommentThread',(_0x321cf9,{threadId:_0x2111fc,isFromAdapter:_0x4e0ab7})=>{!_0x4e0ab7&&_0x4d213c['ui']['focusTracker']['isFocused']&&_0x231151['hasMarkerForId'](_0x2111fc)&&_0x4d213c['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x433a7d,'addComment',(_0x3d950d,{threadId:_0x4e16d4,isFromAdapter:_0x363600})=>{if(_0x363600||!_0x231151['hasMarkerForId'](_0x4e16d4)||!_0x433a7d['hasCommentThread'](_0x4e16d4))return;0x1===_0x433a7d['getCommentThread'](_0x4e16d4)['length']&&(_0x4d213c['editing']['view']['focus'](),_0x3d950d['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1d648c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2c4412;for(const _0x1f183b in _0x1d648c){const _0x16571a=_0x1f183b,_0x36f3a7=_0x1d648c[_0x16571a];if('commentsLicenseKeyValid'==_0x36f3a7||'commentsLicenseKeyInvalid'==_0x36f3a7||'commentsLicenseKeyExpired'==_0x36f3a7||'commentsLicenseKeyDomainLimit'==_0x36f3a7||'commentsLicenseKeyNotAllowed'==_0x36f3a7||'commentsLicenseKeyEvaluationLimit'==_0x36f3a7||'commentsLicenseKeyUsageLimit'==_0x36f3a7){delete _0x1d648c[_0x16571a],_0x2c4412=_0x36f3a7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2c4412&&_0x1d648c['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2c4412&&_0x1d648c['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2c4412&&_0x1d648c['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2c4412&&_0x1d648c['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2c4412&&_0x1d648c['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x2c4412&&_0x1d648c['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x25f989){const _0x5c9686=this['editor'],_0x551b4b=new _0x25f989(_0x5c9686['locale']),_0x517084=_0x5c9686['commands']['get']('addCommentThread');return _0x551b4b['set']({'label':bt(_0x5c9686['locale'],'Comment'),'icon':_0x1714f5}),_0x551b4b['bind']('isEnabled')['to'](_0x517084,'isEnabled',_0x517084,'hasContent',(_0x20d478,_0x10aefd)=>_0x20d478&&_0x10aefd),this['listenTo'](_0x551b4b,'execute',()=>{_0x517084['execute']();}),_0x551b4b;}}class fi extends _0x3549b7{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x7ead42){super(_0x7ead42),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5beed8,_0xb65d3c,_0x3643b3)=>{_0x3643b3?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x216e11,_0x5acc4e]of this['editor']['commands'])_0x5acc4e['affectsData']&&'addCommentThread'!==_0x216e11&&_0x5acc4e['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x55ceed=this['editor']['editing']['view']['document'];this['listenTo'](_0x55ceed,'cut',_0x5f5995=>_0x5f5995['stop'](),{'priority':'highest'}),this['listenTo'](_0x55ceed,'clipboardInput',_0x20f931=>_0x20f931['stop'](),{'priority':'highest'}),this['listenTo'](_0x55ceed,'delete',_0x37bf36=>_0x37bf36['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x190982,_0xd02d40]of this['editor']['commands'])_0xd02d40['affectsData']&&'addCommentThread'!==_0x190982&&_0xd02d40['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x4e5218{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x162602){super(_0x162602),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x358899=this['context']['plugins']['get']($t);this['listenTo'](_0x358899,'_activateAnnotation',(_0x6fb526,_0x64856b)=>{for(const _0x24b3f3 of this['activeUIs']){const _0x2ba913=this['_uis']['get'](_0x24b3f3);(0x0,this['uisData']['get'](_0x24b3f3)['filter'])(_0x64856b)&&_0x2ba913['setActiveAnnotation'](_0x64856b);}}),this['listenTo'](_0x358899,'_deactivateAllAnnotations',()=>{for(const _0x2ea6c1 of this['activeUIs']){this['_uis']['get'](_0x2ea6c1)['setActiveAnnotation'](null);}}),this['listenTo'](_0x358899['_visibleAnnotations'],'add',(_0x25b6fb,_0x3e3fad)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3e3fad);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1fcdd2){return this['activeUIs']['has'](_0x1fcdd2);}['activate'](_0x4a250a,_0x18f775=this['defaultFilter']){const _0xf07172=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x4a250a))throw new _0x1b1980('annotationsuis-missing-ui',this,{'uiName':_0x4a250a});this['isActive'](_0x4a250a)&&this['deactivate'](_0x4a250a),this['activeUIs']['add'](_0x4a250a);const _0x29aa2c=new jt();Xt({'source':_0xf07172['_visibleAnnotations'],'target':_0x29aa2c,'filter':_0x18f775}),this['uisData']['set'](_0x4a250a,{'collection':_0x29aa2c,'filter':_0x18f775});const _0x2e40f5=this['_uis']['get'](_0x4a250a);_0x2e40f5['attach'](_0x29aa2c),this['listenTo'](_0x2e40f5,'change:activeAnnotation',(_0x554754,_0x79cbb,_0x312090,_0x57b39f)=>{_0x57b39f&&_0xf07172['_removeActiveAnnotation'](_0x57b39f),_0x312090&&_0xf07172['_addActiveAnnotation'](_0x312090);});}['deactivate'](_0x74fe6d){if(this['activeUIs']['delete'](_0x74fe6d),!this['_uis']['has'](_0x74fe6d))throw new _0x1b1980('annotationsuis-missing-ui',this,{'uiName':_0x74fe6d});const _0x27a571=this['_uis']['get'](_0x74fe6d);_0x27a571['detach'](),this['stopListening'](_0x27a571),this['uisData']['get'](_0x74fe6d)['collection']['destroy'](),this['uisData']['delete'](_0x74fe6d);}['switchTo'](_0x446da3){if(!this['_uis']['has'](_0x446da3))throw new _0x1b1980('annotationsuis-missing-ui',this,{'uiName':_0x446da3});const _0x234037=this['context']['plugins']['get']($t),_0x548b7a=Array['from'](_0x234037['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x446da3);const _0x727e40=this['_uis']['get'](_0x446da3);_0x727e40['setActiveAnnotation'](_0x548b7a),_0x727e40['_setSelectedAnnotations']&&_0x548b7a&&_0x727e40['_setSelectedAnnotations']([_0x548b7a]);}['deactivateAll'](){for(const _0x2b7a97 of this['activeUIs'])this['deactivate'](_0x2b7a97);}['register'](_0x8c173e,_0x44b070){if(this['_uis']['has'](_0x8c173e))throw new _0x1b1980('annotationsuis-register-already-registered');if('function'!=typeof _0x44b070['attach']||'function'!=typeof _0x44b070['detach']||'function'!=typeof _0x44b070['setActiveAnnotation'])throw new _0x1b1980('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x8c173e,_0x44b070);}['refilterAnnotations'](){const _0xa17890=this['context']['plugins']['get']($t)['collection'],_0x577337=new Map(),_0x36ef3a=Array['from'](this['activeUIs']);for(const _0x21cf90 of this['activeUIs']){const _0x53f176=this['uisData']['get'](_0x21cf90)['collection'];for(const _0x38272b of _0x53f176)_0x577337['set'](_0x38272b,_0x21cf90);}for(const _0x529acf of _0xa17890){const _0x4cbf27=_0x577337['get'](_0x529acf);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x529acf);const _0x202c26=_0x36ef3a['find'](_0x33bc1f=>this['uisData']['get'](_0x33bc1f)['filter'](_0x529acf));_0x4cbf27!==_0x202c26&&(_0x4cbf27&&this['uisData']['get'](_0x4cbf27)['collection']['remove'](_0x529acf),_0x202c26&&this['uisData']['get'](_0x202c26)['collection']['add'](_0x529acf));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x592dde){const _0x479b6c=[];for(const _0x382dd1 of this['activeUIs']){(0x0,this['uisData']['get'](_0x382dd1)['filter'])(_0x592dde)&&_0x479b6c['push'](_0x382dd1);}if(_0x479b6c['length']>0x1)throw new _0x1b1980('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x479b6c,'annotationType':_0x592dde['type']});}}const wi=/* #__PURE__ -- @preserve */
32
+ _0x1a9879('px');class _i extends _0x2e27f6{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x22f4ff){super(_0x22f4ff);const _0x5c2a82=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0x5b085d(),this['focusCycler']=new _0x2e3f33({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5c2a82['to']('class')],'style':{'minHeight':_0x5c2a82['to']('minHeight',_0x26a3cc=>'number'==typeof _0x26a3cc?wi(_0x26a3cc+0xa):null)},'dir':_0x22f4ff['uiLanguageDirection'],'role':'application','aria-label':bt(_0x22f4ff,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x22f4ff,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x54fb1e=>{this['_updateItemPositionInFocusables'](_0x54fb1e['source']);}),this['list']['forEach'](_0x49fcc4=>{this['focusTracker']['add'](_0x49fcc4['element']),this['_updateItemPositionInFocusables'](_0x49fcc4);}),this['list']['on']('change',(_0x39f2ce,_0x512caf)=>{for(const _0xac70ea of _0x512caf['removed'])this['focusTracker']['remove'](_0xac70ea['element']),this['focusables']['remove'](_0xac70ea);for(const _0x159faa of _0x512caf['added'])this['focusTracker']['add'](_0x159faa['element']),this['_updateItemPositionInFocusables'](_0x159faa);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x100a23){const _0x19be66=this['focusables']['getIndex'](_0x100a23);let _0x2fe076,_0x1efce0;for(const _0x3e9bce of this['focusables'])if(_0x100a23['top']<_0x3e9bce['top']){_0x2fe076=_0x3e9bce;break;}if(_0x1efce0=_0x2fe076?this['focusables']['getIndex'](_0x2fe076):this['focusables']['length'],-0x1!==_0x19be66){if(_0x19be66===_0x1efce0-0x1)return;this['focusables']['remove'](_0x100a23),_0x1efce0=_0x2fe076?this['focusables']['getIndex'](_0x2fe076):this['focusables']['length'];}this['focusables']['add'](_0x100a23,_0x1efce0);}}const gi=/* #__PURE__ -- @preserve */
33
+ _0x1a9879('px');class Ai extends _0x2e27f6{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4e6c69){super(_0x4e6c69),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x8aec3f,_0x49e603)=>_0x8aec3f+_0x49e603),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xe4f97c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xe4f97c['to']('isAnimationDisabled',_0x2f8b92=>_0x2f8b92?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xe4f97c['to']('top',_0xaf76b9=>gi(_0xaf76b9))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5acb5b=this['element']['clientHeight'];_0x5acb5b&&(this['height']=_0x5acb5b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x4e5218{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b5057){super(_0x1b5057),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0xd45239=this['context']['config']['get']('sidebar.container');_0xd45239&&this['setContainer'](_0xd45239);}['setContainer'](_0x29bb81){if(!yi(_0x29bb81))throw new _0x1b1980('sidebar-setcontainer-invalid-element');this['container']=_0x29bb81;}['_attachToContainer']({viewClass:_0x33ffd6='',spaceBetweenItems:_0x4e5cd1=0x19}={}){if(!yi(this['container']))throw new _0x1b1980('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x33ffd6,this['_spaceBetweenItems']=_0x4e5cd1;}['rearrange']({removedAnnotation:_0xb12bae,previousAnnotation:_0x3bbafd,nextAnnotation:_0x31e921}){const _0x4efca2=this['getSidebarItemView'](_0xb12bae);this['view']['list']['remove'](_0x4efca2),this['_destroySidebarItemView'](_0xb12bae),_0x3bbafd&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3bbafd)),_0x31e921&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x31e921)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x6d731f,activatedAnnotation:_0x1baa7d,disableAnimationOnActivatedAnnotation:_0x3fff28}){if(this['_activeAnnotation']=_0x1baa7d,_0x6d731f){_0x6d731f['isActive']=!0x1;const _0x22271a=this['getSidebarItemView'](_0x6d731f);_0x22271a&&_0x3fff28&&(_0x22271a['isAnimationDisabled']=!0x1);}if(_0x1baa7d){const _0x2faef6=this['getSidebarItemView'](_0x1baa7d);_0x2faef6&&(_0x1baa7d['isActive']=!0x0,_0x3fff28&&(_0x2faef6['isAnimationDisabled']=!0x0,_0x2faef6['top']+=0x1),this['_alignToTargetRect'](_0x2faef6));}}['_detachFromContainer'](_0x2b6404){if(this['view']['element']['remove'](),_0x2b6404){for(const _0x4ec97f of _0x2b6404)this['_destroySidebarItemView'](_0x4ec97f);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1551d3,_0x1e5aa1){_0x1e5aa1||(_0x1e5aa1=_0x1551d3['view']);const _0x497cc8=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x497cc8,_0x1551d3),this['_annotationToSidebarItemView']['set'](_0x1551d3,_0x497cc8),_0x497cc8['content']['add'](_0x1e5aa1),this['listenTo'](_0x1551d3['view'],'change:targetRect',(_0x2b1b58,_0x3e9e28,_0x38bca6)=>{const _0x4f3e5b=this['_getTargetTop'](_0x1551d3,_0x38bca6);_0x497cc8['_targetTop']!=_0x4f3e5b&&(_0x497cc8['_targetTop']=_0x4f3e5b,this['_setItemTop'](_0x497cc8,_0x4f3e5b));}),this['listenTo'](_0x497cc8,'change:top',()=>{this['_recalculate'](_0x497cc8,'top');}),this['listenTo'](_0x497cc8,'change:bottom',()=>{this['_recalculate'](_0x497cc8,'bottom');}),this['_alignToTargetRect'](_0x497cc8);const _0x42a436=this['_getItemBefore'](_0x497cc8);if(_0x42a436)this['_alignAfterItem'](_0x42a436,_0x497cc8)||this['_alignToTargetRect'](_0x497cc8);else this['_alignToTargetRect'](_0x497cc8);return this['_updateLastItem'](),this['view']['list']['add'](_0x497cc8),_0x497cc8;}['_alignForTopChange'](_0xcd01c5){if(!_0xcd01c5['content']['length'])return;const _0x4332a1=this['_getItemBefore'](_0xcd01c5);if(!_0x4332a1)return;const _0x2bcd35=this['_sidebarItemViewToAnnotation']['get'](_0x4332a1),_0x517bd4=this['_activeAnnotation'];_0x517bd4&&_0x517bd4===_0x2bcd35?this['_alignAfterItem'](_0x4332a1,_0xcd01c5):this['_alignBeforeItem'](_0xcd01c5,_0x4332a1);}['_alignForBottomChange'](_0x1d3bdf){if(!_0x1d3bdf['content']['length'])return;const _0x1e1240=this['_getItemAfter'](_0x1d3bdf);if(!_0x1e1240)return;const _0x23630a=this['_sidebarItemViewToAnnotation']['get'](_0x1e1240),_0xdebba7=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x513cf3=this['_activeAnnotation'];_0x513cf3&&_0x513cf3===_0x23630a&&_0xdebba7?(this['_alignBeforeItem'](_0x1e1240,_0x1d3bdf),this['_alignAfterItem'](_0x1d3bdf,_0x1e1240)):_0x513cf3&&_0x513cf3===_0x23630a?this['_alignBeforeItem'](_0x1e1240,_0x1d3bdf):this['_alignAfterItem'](_0x1d3bdf,_0x1e1240);}['_recalculate'](_0x5895b4,_0x2723b7){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x311c2f,changedProp:_0x18ef6f}of this['_recalculateBuffer'])'top'===_0x18ef6f?this['_alignForTopChange'](_0x311c2f):this['_alignForBottomChange'](_0x311c2f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5895b4,'changedProp':_0x2723b7});}['getSidebarItemView'](_0x6060a0){return this['_annotationToSidebarItemView']['get'](_0x6060a0);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x38a794){const _0x49de7a=this['getSidebarItemView'](_0x38a794);this['stopListening'](_0x49de7a),this['stopListening'](_0x38a794['view']),_0x49de7a['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x38a794),this['_sidebarItemViewToAnnotation']['delete'](_0x49de7a);}['_createSidebarView'](){const _0x10e84c=new _i(this['context']['locale']);return _0x10e84c['render'](),this['on']('change:_lastItem',(_0x5ca60f,_0xc22194,_0x4dd287,_0xe536d6)=>{_0xe536d6&&_0x10e84c['unbind']('minHeight'),_0x4dd287?_0x10e84c['bind']('minHeight')['to'](_0x4dd287,'bottom'):_0x10e84c['minHeight']=null;}),_0x10e84c;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x2adc2e){const _0x2f7fa8=this['_sidebarItemViewToAnnotation']['get'](_0x2adc2e),_0x1e5f80=_0x2f7fa8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2f7fa8)-0x1);return _0x1e5f80&&this['getSidebarItemView'](_0x1e5f80)||null;}['_getItemAfter'](_0x4c503a){const _0x168ca8=this['_sidebarItemViewToAnnotation']['get'](_0x4c503a),_0x289454=_0x168ca8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x168ca8)+0x1);return _0x289454&&this['getSidebarItemView'](_0x289454)||null;}['_alignBeforeItem'](_0x1abc53,_0x5c3690){_0x1abc53['updateHeight']();const _0xc2589b=vi(_0x5c3690['bottom']+this['_spaceBetweenItems'],_0x1abc53['top']);return!!_0xc2589b&&(this['_setItemTop'](_0x5c3690,_0x5c3690['top']-_0xc2589b),!0x0);}['_alignAfterItem'](_0x3b62b8,_0x55658d){_0x3b62b8['updateHeight']();const _0x467bda=vi(_0x3b62b8['bottom']+this['_spaceBetweenItems'],_0x55658d['top']);return!!_0x467bda&&(this['_setItemTop'](_0x55658d,_0x55658d['top']+_0x467bda,!0x1),!0x0);}['_alignToTargetRect'](_0x34f6f4){const _0x450142=this['_sidebarItemViewToAnnotation']['get'](_0x34f6f4);if(!_0x450142||!_0x450142['target']||!_0x450142['targetRect'])return;const _0x754534=this['_getTargetTop'](_0x450142,_0x450142['targetRect']);this['_setItemTop'](_0x34f6f4,_0x754534);}['_getTargetTop'](_0x320723,_0x39697c){if(null===_0x39697c)return 0x0;if(_0x320723['target']instanceof _0x2e7ae5)return _0x39697c['top'];{const _0xb2dfd2=new _0x2e7ae5(this['view']['element'])['top'];return _0x39697c['top']-_0xb2dfd2;}}['_setItemTop'](_0x5483c9,_0x12e359,_0xa4cd78=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xa4cd78&&(_0x12e359=Math['max'](_0x12e359,this['_getMaxAvailableTop'](_0x5483c9))),_0x5483c9['top']=_0x12e359;}['_getMaxAvailableTop'](_0x62851){let _0x4c4c2a=this['_getItemBefore'](_0x62851),_0x5f27cf=0x0;for(;_0x4c4c2a;)_0x4c4c2a['updateHeight'](),_0x5f27cf+=this['_spaceBetweenItems']+_0x4c4c2a['height'],_0x4c4c2a=this['_getItemBefore'](_0x4c4c2a);return _0x5f27cf;}}function vi(_0x207ce8,_0x47607d){return Math['max'](_0x207ce8-_0x47607d,0x0);}function yi(_0x28658b){return null!==_0x28658b&&'object'==typeof _0x28658b&&0x1===_0x28658b['nodeType'];}class Ci extends _0x4e5218{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54d8cd){super(_0x54d8cd),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3b337f(),this['_refreshPositioningDebounced']=_0x14b05e(()=>{_0x54d8cd['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1311f6=this['context']['plugins']['get'](pi),_0x1e820f=this['context']['plugins']['get'](Ti);_0x1311f6['register']('wideSidebar',this),_0x1e820f['container']&&_0x1311f6['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5b7ec3){if(_0x5b7ec3===this['activeAnnotation'])return;const _0x472230=this['context']['plugins']['get'](Ti);_0x472230['_activeAnnotation']=_0x5b7ec3;const _0x138bd8=this['activeAnnotation'];_0x472230['refresh']({'blurredAnnotation':_0x138bd8,'activatedAnnotation':_0x5b7ec3}),this['activeAnnotation']=_0x5b7ec3;}['attach'](_0x2c15e2){this['annotations']=_0x2c15e2;const _0x331931=this['context']['plugins']['get'](Ti);if(_0x331931['_annotations']=_0x2c15e2,this['isAttached'])throw new _0x1b1980('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x331931,'set:container',()=>{this['detach'](),this['listenTo'](_0x331931,'change:container',_0xa9dc91=>{_0xa9dc91['off'](),this['attach'](_0x2c15e2);});}),_0x331931['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2c8c34=_0x46678d=>{_0x46678d['updateTargetRect'](),_0x331931['addAnnotation'](_0x46678d);};for(const _0x2011b5 of _0x2c15e2)_0x2c8c34(_0x2011b5);this['listenTo'](_0x2c15e2,'add',(_0x243b17,_0x54dfdc)=>{_0x2c8c34(_0x54dfdc);}),this['listenTo'](_0x2c15e2,'remove',(_0x3494e8,_0x2ed230,_0x1053e3)=>{_0x331931['rearrange']({'removedAnnotation':_0x2ed230,'previousAnnotation':_0x2c15e2['get'](_0x1053e3-0x1),'nextAnnotation':_0x2c15e2['get'](_0x1053e3+0x1)}),_0x2ed230===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2c15e2,'focus',(_0x42cb32,_0x3e4768)=>{this['setActiveAnnotation'](_0x3e4768);}),this['listenTo'](_0x2c15e2,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4849c9=this['context']instanceof _0x430c8f?this['context']['editors']:new _0x3b337f([this['context']]);for(const _0x2f0f5f of _0x4849c9)this['_integrateWithEditorAnnotations'](_0x2f0f5f);this['listenTo'](_0x4849c9,'add',(_0x5051c9,_0x1baf65)=>{this['listenTo'](_0x1baf65,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1baf65);});}),this['listenTo'](_0x4849c9,'remove',(_0x4abfb4,_0x126aac)=>{_0x126aac['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x126aac['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x1b1980('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5a444e=this['context']['plugins']['get'](Ti);_0x5a444e['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5a444e),this['stopListening'](this['annotations']),this['context']instanceof _0x430c8f&&this['stopListening'](this['context']['editors']);for(const _0x42a6cd of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x42a6cd);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x30142d){if(!_0x30142d['plugins']['has']('EditorAnnotations'))return;const _0x42050e=_0x30142d['plugins']['get']('EditorAnnotations'),_0x1e57c4=()=>{const _0x2c77cc=_0x42050e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2c77cc[0x0]||null);};this['listenTo'](_0x42050e,'refresh',_0x1e57c4),this['listenTo'](_0x42050e,'blur',(_0x387cc8,{isAnnotationTracked:_0xa542be})=>{this['activeAnnotation']&&_0xa542be(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x42050e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x2d51ce=>{_0x42050e['hasDomSelection']()&&(_0x1e57c4(),_0x2d51ce['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x42050e);}['_destroyEditorAnnotationsIntegration'](_0x5aa915){this['stopListening'](_0x5aa915),this['_editorAnnotations']['remove'](_0x5aa915);}}class Ii extends _0x2ef389{['counterView'];constructor(_0x2da66c){super(_0x2da66c);const _0x43a367=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x46d284,_0x1ffeba)=>_0x46d284?'...':_0x1ffeba['toString']()),this['set']('annotationType',''),this['icon']=_0x1714f5,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x2e27f6(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x43a367['to']('annotationType',_0x35b99e=>'ck-annotation-counter__badge--'+_0x35b99e),_0x43a367['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x43a367['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x4e5218{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51914e){super(_0x51914e),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xba838f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3b337f(),this['_refreshPositioningDebounced']=_0x14b05e(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x4e029b){this['annotations']=_0x4e029b;const _0xd89889=this['context']['plugins']['get'](Ti),_0x40c095=this['balloonPanelView'];if(_0xd89889['_annotations']=_0x4e029b,this['isAttached'])throw new _0x1b1980('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xd89889,'set:container',()=>{this['detach'](),this['listenTo'](_0xd89889,'change:container',_0x3af0d9=>{_0x3af0d9['off'](),this['attach'](_0x4e029b);});}),_0xd89889['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x44e695=_0x3bedd2=>{const _0x35f9e9=new Ii(this['context']['locale']);_0xd89889['addAnnotation'](_0x3bedd2,_0x35f9e9),this['_annotationToNarrowView']['set'](_0x3bedd2,_0x35f9e9),_0x35f9e9['bind']('isDirty','annotationType','number')['to'](_0x3bedd2['view'],'isDirty','type','length'),_0x35f9e9['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x40c095['content']['first']!==_0x3bedd2['view']?(this['_showBalloon'](_0x3bedd2),_0x3bedd2['view']['element']['focus'](),this['setActiveAnnotation'](_0x3bedd2)):this['setActiveAnnotation'](null);});};for(const _0x1275c7 of _0x4e029b)_0x44e695(_0x1275c7);this['listenTo'](_0x4e029b,'add',(_0x4c8c58,_0x2c82cd)=>{_0x44e695(_0x2c82cd);}),this['listenTo'](_0x4e029b,'remove',(_0x595497,_0x385508,_0x221db1)=>{this['_annotationToNarrowView']['get'](_0x385508)['destroy'](),this['_annotationToNarrowView']['delete'](_0x385508),_0xd89889['rearrange']({'removedAnnotation':_0x385508,'previousAnnotation':_0x4e029b['get'](_0x221db1-0x1),'nextAnnotation':_0x4e029b['get'](_0x221db1+0x1)}),_0x385508===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x4e029b,'focus',(_0x460eaf,_0x1e2336)=>{this['setActiveAnnotation'](_0x1e2336);}),this['listenTo'](_0x4e029b,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x48996f,_0x332bc6)=>{_0x332bc6['keyCode']===_0x5c8495['esc']&&_0x40c095['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x40c095['content']['first']),this['_hideBalloon'](),_0x332bc6['stopPropagation'](),_0x332bc6['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0xa235a0,_0x7fb295)=>{const _0x38683c=_0x7fb295['target'];_0x40c095['isVisible']&&_0x40c095['element']['contains'](_0x38683c)||_0xd89889['view']['element']['contains'](_0x38683c)||_0xa235a0['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4fe28e=>_0x4fe28e['contains'](_0x38683c))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x261f1d=this['context']instanceof _0x430c8f?this['context']['editors']:new _0x3b337f([this['context']]);for(const _0x6e67ad of _0x261f1d)this['_integrateWithEditorAnnotations'](_0x6e67ad);this['listenTo'](_0x261f1d,'add',(_0x68cadb,_0x19b5eb)=>{this['listenTo'](_0x19b5eb,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x19b5eb);});}),this['listenTo'](_0x261f1d,'remove',(_0x225b12,_0xd97049)=>{_0xd97049['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xd97049['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x29fab0){if(_0x29fab0===this['activeAnnotation'])return;const _0x460144=this['context']['plugins']['get'](Ti);if(_0x460144['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x29fab0,'disableAnimationOnActivatedAnnotation':!0x0}),_0x29fab0)_0x460144['getSidebarItemView'](_0x29fab0)?this['_showBalloon'](_0x29fab0):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x29fab0;}['detach'](){if(!this['isAttached'])throw new _0x1b1980('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4aa088=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2d29cc=>_0x2d29cc['destroy']()),this['_annotationToNarrowView']['clear'](),_0x4aa088['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x430c8f&&this['stopListening'](this['context']['editors']);for(const _0x30a67f of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x30a67f);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0xde4e47){if(!_0xde4e47['plugins']['has']('EditorAnnotations'))return;const _0x2e2ef0=_0xde4e47['plugins']['get']('EditorAnnotations'),_0x5e1e86=this['context']['plugins']['get'](Ti),_0x226409=this['annotations'],_0x2ab7dc=this['balloonPanelView'],_0x3219f4=()=>{const _0x2a4401=_0x2e2ef0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2a4401),this['setActiveAnnotation'](_0x2a4401[0x0]||null);};this['listenTo'](_0x2e2ef0,'refresh',_0x3219f4),this['listenTo'](_0x2e2ef0,'blur',(_0x50fb2f,{isAnnotationTracked:_0x57dd0d})=>{this['activeAnnotation']&&_0x57dd0d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2e2ef0,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x226409,'blur',_0x31a84e=>{_0x2e2ef0['hasDomSelection']()&&_0x31a84e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5095db,_0x4fbeb7)=>{const _0x460f35=_0x4fbeb7['target'];_0x2ab7dc['isVisible']&&_0x2ab7dc['element']['contains'](_0x460f35)||_0x5e1e86['view']['element']['contains'](_0x460f35)||this['activeAnnotation']&&_0x2e2ef0['hasDomSelection']()&&(_0x3219f4(),_0x5095db['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2e2ef0);}['_destroyEditorAnnotationsIntegration'](_0x23aa7c){_0x23aa7c&&(this['stopListening'](_0x23aa7c),this['_editorAnnotations']['remove'](_0x23aa7c));}['_setSelectedAnnotations'](_0x2574ac){for(const _0x91f0f8 of this['_selectedAnnotations'])_0x2574ac['includes'](_0x91f0f8)||this['_manuallyClosedAnnotationViews']['delete'](_0x91f0f8['view']);this['_selectedAnnotations']=_0x2574ac;}['_refreshPositioning'](){const _0x3da1d0=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3da1d0['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x592d14){if(this['_manuallyClosedAnnotationViews']['has'](_0x592d14['view']))return;const _0x241732=this['balloonPanelView']['content']['first'];_0x241732!==_0x592d14['view']?(_0x241732&&this['_detachListeners'](_0x241732),this['_attachListeners'](_0x592d14['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x592d14['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xe55527=this['balloonPanelView']['content']['first'],_0x4ef2ef=_0xe55527&&this['annotations']['getByView'](_0xe55527);if(!_0x4ef2ef||!this['_annotationToNarrowView']['has'](_0x4ef2ef))return;const _0x17e956=this['_annotationToNarrowView']['get'](_0x4ef2ef)['element'],_0x359abb=(function(){const _0x11bfb2=ht['defaultPositions'];return[_0x11bfb2['southArrowNorthEast'],_0x11bfb2['northArrowSouthEast'],_0x11bfb2['southArrowNorth'],_0x11bfb2['northArrowSouth'],_0x11bfb2['southArrowNorthWest'],_0x11bfb2['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x17e956,'positions':_0x359abb});}['_hideBalloon'](){const _0x476a75=this['balloonPanelView'],_0x58e276=_0x476a75['content']['first'];_0x58e276&&(this['_detachListeners'](_0x58e276),_0x476a75['unpin'](),_0x476a75['content']['clear']());}['_attachListeners'](_0x262397){this['listenTo'](_0x262397,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x262397,'Esc',(_0x4ae3d6,_0x4de6c0)=>{this['_manuallyClosedAnnotationViews']['add'](_0x262397),this['_hideBalloon'](),_0x4de6c0();});}['_detachListeners'](_0x1a60b1){this['stopListening'](_0x1a60b1);}}class Ei extends _0x3549b7{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5c3f40){super(_0x5c3f40),_0x5c3f40['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5c3f40['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x14b05e(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x57045f=this['editor']['plugins']['get'](pi);_0x57045f['context']===this['editor']&&(_0x57045f['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x385c47,_0x4e2e3c)=>{const _0x8fcae5=this['_balloon'];if(this['isAttached']&&_0x8fcae5['visibleView']){const _0x121f36=this['annotations']['getByView'](_0x8fcae5['visibleView']);_0x121f36&&this['_closeAnnotation'](_0x121f36),_0x4e2e3c();}}));}['afterInit'](){const _0x47a3df=this['editor']['plugins']['get'](pi);_0x47a3df['context']===this['editor']&&(_0x47a3df['hasActive']()||_0x47a3df['switchTo']('inline'));}['setActiveAnnotation'](_0xf0e50a){_0xf0e50a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0xf0e50a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0xf0e50a)&&this['_addAnnotationToBalloon'](_0xf0e50a,!0x0),_0xf0e50a['isActive']=!0x0),_0xf0e50a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0xf0e50a);}['attach'](_0x56caea){this['annotations']=_0x56caea;const _0x58df42=this['editor']['plugins']['get'](pi),_0x181c64=this['_balloon'];if(this['isAttached'])throw new _0x1b1980('inlineannotations-attach-already-attached',this);if(_0x58df42['context']!==this['editor'])throw new _0x1b1980('inlineannotations-not-allowed-with-context',this);const _0x2dc089=this['editor']['plugins']['get'](si);this['listenTo'](_0x2dc089,'refresh',()=>{const _0x130ef0=_0x2dc089['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1b1512,_0x586f38;!this['_forceRefresh']&&(_0x1b1512=_0x130ef0,_0x586f38=this['_selectedAnnotations'],_0x1b1512['length']===_0x586f38['length']&&_0x1b1512['every'](_0x216721=>_0x586f38['includes'](_0x216721)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x130ef0),this['setActiveAnnotation'](_0x130ef0[0x0]||null));}),this['listenTo'](_0x2dc089,'blur',(_0x11f47c,{isAnnotationTracked:_0x28c00c})=>{this['activeAnnotation']&&_0x28c00c(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2dc089,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2ddbac,_0x362bd3,_0x559e52)=>{_0x559e52||this['setActiveAnnotation'](null);}),this['listenTo'](_0x56caea,'remove',(_0x5b3e3d,_0x465a78)=>{this['_removeAnnotationFromBalloon'](_0x465a78),_0x465a78===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x181c64,'change:visibleView',(_0x4cb49a,_0x2276bd,_0x212eea,_0x5265c7)=>{_0x5265c7&&this['stopListening'](_0x5265c7);const _0x1e220e=_0x56caea['getByView'](_0x212eea);_0x212eea&&_0x1e220e&&(this['listenTo'](_0x212eea,'change:height',()=>{_0x181c64['updatePosition']();}),this['listenTo'](_0x212eea,'Esc',()=>{this['_closeAnnotation'](_0x1e220e),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1e220e&&this['setActiveAnnotation'](_0x1e220e));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x181c64['visibleView']&&(_0x56caea['getByView'](_0x181c64['visibleView'])&&_0x181c64['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x1b1980('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x5caea6 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x5caea6);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x2e68f0){for(const _0x138b5e of this['_selectedAnnotations'])_0x2e68f0['includes'](_0x138b5e)||this['_manuallyClosed']['delete'](_0x138b5e);for(const _0x15e3f2 of this['annotations'])_0x2e68f0['includes'](_0x15e3f2)||this['_removeAnnotationFromBalloon'](_0x15e3f2);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x42f06e of _0x2e68f0)this['_addAnnotationToBalloon'](_0x42f06e);}this['_selectedAnnotations']=_0x2e68f0;}['_addAnnotationToBalloon'](_0x39d073,_0x4d43cc=!0x1){this['_manuallyClosed']['has'](_0x39d073)||(this['_addedAnnotations']['has'](_0x39d073)||this['_balloon']['hasView'](_0x39d073['view'])||(this['_addedAnnotations']['add'](_0x39d073),this['_balloon']['add']({'stackId':_0x39d073['view']['id'],'view':_0x39d073['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x39d073)}})),_0x4d43cc&&this['_balloon']['showStack'](_0x39d073['view']['id']));}['_getBalloonTargetForAnnotation'](_0x36d44a){const _0x2b97e5=_0x36d44a['target'],_0x12f990=this['editor']['editing']['view'],_0x333785=_0x12f990['document']['selection']['getFirstRange'](),_0x2e619e=_0x12f990['domConverter']['viewRangeToDom'](_0x333785);if(_0x2e619e['collapse'](!0x0),_0x2b97e5){if(_0x2b97e5 instanceof _0x2e7ae5)return _0x2b97e5;let _0x1802ce=[];for(const _0x2b185f of _0x2b97e5)_0x1802ce['push'](..._0x2e7ae5['getDomElementRects'](_0x2b185f));_0x1802ce=function(_0x25947e){const _0x2939cf=[];let _0x3c21eb=_0x25947e[0x0];for(let _0x1b280c=0x1;_0x1b280c<_0x25947e['length'];_0x1b280c++)if(Ni(_0x3c21eb,_0x25947e[_0x1b280c])){const _0x2c0b2f=_0x25947e[_0x1b280c]['width'];_0x3c21eb['width']+=_0x2c0b2f,_0x3c21eb['right']+=_0x2c0b2f;}else _0x2939cf['push'](_0x3c21eb),_0x3c21eb=_0x25947e[_0x1b280c];return _0x2939cf['push'](_0x3c21eb),_0x2939cf;}(_0x1802ce);const _0x2f2901=_0x2e619e['getBoundingClientRect']();return _0x1802ce['find'](_0x30d4ca=>_0x30d4ca['top']<=_0x2f2901['top']&&_0x30d4ca['bottom']>=_0x2f2901['bottom']&&_0x30d4ca['left']<=_0x2f2901['left']&&_0x30d4ca['right']>=_0x2f2901['right'])||_0x1802ce[0x0];}return _0x36d44a['targetRect']||_0x2e619e;}['_removeAnnotationFromBalloon'](_0x37735c){this['_addedAnnotations']['has'](_0x37735c)&&this['_balloon']['hasView'](_0x37735c['view'])&&(this['_addedAnnotations']['delete'](_0x37735c),this['_balloon']['remove'](_0x37735c['view']));}['_closeAnnotation'](_0x4439df){this['_manuallyClosed']['add'](_0x4439df),this['_removeAnnotationFromBalloon'](_0x4439df);}}function Ni(_0x4ec689,_0x22fe0e){return _0x4ec689['top']===_0x22fe0e['top']&&_0x4ec689['bottom']===_0x22fe0e['bottom']&&_0x4ec689['right']===_0x22fe0e['left'];}class ki extends _0x2e27f6{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x449d27,_0x177c99){super(_0x449d27),this['set']('isEmpty',!_0x177c99['length']),this['focusTracker']=new _0x5b085d(),this['_annotationViews']=_0x177c99,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2e3f33({'focusables':_0x177c99,'focusTracker':this['focusTracker']}),this['listenTo'](_0x177c99,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x177c99,'remove',(_0x5cae16,_0x53f73f)=>{_0x53f73f['isActive']&&this['focus'](),_0x177c99['length']||(this['isEmpty']=!0x0);});const _0x3d5472=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x449d27,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x177c99},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x3d5472['if']('isEmpty','ck-hidden',_0x537611=>!_0x537611)]},'children':[{'text':bt(_0x449d27,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x3c224a of this['_annotationViews'])this['focusTracker']['add'](_0x3c224a['element']);this['_annotationViews']['on']('change',(_0x10508a,{added:_0x50d04e,removed:_0x2f06f2})=>{for(const _0x2e5aea of _0x50d04e)this['focusTracker']['add'](_0x2e5aea['element']);for(const _0x5ed5d1 of _0x2f06f2)this['focusTracker']['remove'](_0x5ed5d1['element']);});}}class Oi extends _0x4e5218{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x375e34){super(_0x375e34),this['archivedThreads']=new _0x3b337f();}['init'](){const _0x3fa3a9=this['context'],_0x2baf95=_0x3fa3a9['plugins']['get'](Qt),_0x2c6686=_0x3fa3a9['plugins']['get']($t);this['listenTo'](_0x2baf95,'addCommentThread',(_0x136491,{threadId:_0x3fbb1f})=>{const _0x5eb093=_0x2baf95['getCommentThread'](_0x3fbb1f);_0x5eb093['archivedAt']&&this['archivedThreads']['add'](_0x5eb093,this['_calculatePosition'](_0x5eb093['archivedAt'])),this['listenTo'](_0x5eb093,'change:archivedAt',(_0x58f3f3,_0x1417fe,_0x25d528)=>{_0x25d528?this['archivedThreads']['has'](_0x5eb093)||this['archivedThreads']['add'](_0x5eb093,this['_calculatePosition'](_0x5eb093['archivedAt'])):this['archivedThreads']['has'](_0x5eb093)&&this['archivedThreads']['remove'](_0x5eb093);});}),this['listenTo'](_0x2baf95,'removeCommentThread',(_0x4d30d1,{threadId:_0xcf8433})=>{const _0x56b9ac=_0x2baf95['getCommentThread'](_0xcf8433);this['stopListening'](_0x56b9ac),this['archivedThreads']['has'](_0x56b9ac)&&this['archivedThreads']['remove'](_0x56b9ac);},{'priority':'highest'}),this['listenTo'](_0x2c6686['collection'],'focus',(_0x2c180c,_0x142bd9)=>{_0x142bd9['isVisible']||(_0x142bd9['isActive']=!0x0,_0x2c6686['activate'](_0x142bd9));});}['_calculatePosition'](_0x1a3f08){const _0xd84e14=[...this['archivedThreads']]['findIndex'](_0x2709c5=>_0x2709c5['archivedAt']<_0x1a3f08);return _0xd84e14>-0x1?_0xd84e14:this['archivedThreads']['length'];}}class Mi extends _0x3549b7{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x5aaf68){super(_0x5aaf68),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x1d4af1=this['editor'],_0x50e840=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1d4af1['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2ef389,!0x0)),_0x1d4af1['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5d8d83=this['_createCommentsArchiveButton'](ot);return _0x5d8d83['set']({'role':'menuitemcheckbox'}),_0x5d8d83;});const _0x405799=_0x1d4af1['plugins']['get'](Oi),_0x3fef3c=_0x1d4af1['plugins']['get']('Annotations'),_0x51a885=_0x1d4af1['plugins']['get']('CommentsRepository');_0x405799['archivedThreads']['forEach'](_0x5e68a9=>{this['_handleNewThread'](_0x5e68a9);}),this['listenTo'](_0x405799['archivedThreads'],'add',(_0x4e9444,_0x2d5dd0)=>{this['_handleNewThread'](_0x2d5dd0);}),this['listenTo'](_0x3fef3c['collection'],'add',(_0x2a7ac8,_0x291c0f)=>{const _0x2b810b=this['_pendingThreads']['find'](_0x5ab0d3=>{const _0xda2f5f=_0x51a885['_threadToController']['get'](_0x5ab0d3);return _0xda2f5f&&_0x291c0f['innerView']===_0xda2f5f['view'];});if(_0x2b810b){const _0x4717d7=this['_calculatePosition'](_0x2b810b['archivedAt']);this['_addAnnotationToArchive'](_0x291c0f,_0x4717d7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2b810b),0x1);}}),this['listenTo'](_0x405799['archivedThreads'],'remove',(_0x5d4184,_0x308c47)=>{const _0x4923e1=_0x1d4af1['config']['get']('collaboration.channelId');if(!_0x4923e1||_0x308c47['channelId']===_0x4923e1){if(this['_pendingThreads']['includes'](_0x308c47))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x308c47),0x1);else{const _0x521852=_0x51a885['_threadToController']['get'](_0x308c47),_0x586e51=_0x3fef3c['getByInnerView'](_0x521852['view']);this['annotationViews']['remove'](_0x586e51['view']),this['stopListening'](_0x586e51),this['stopListening'](_0x586e51['focusableElements']);}}}),this['listenTo'](_0x3fef3c['collection'],'add',(_0x2758db,_0x2502f7)=>{this['listenTo'](_0x2502f7,'escape',_0x50e840);}),this['listenTo'](_0x3fef3c['collection'],'remove',(_0x3f2625,_0x54f30a)=>{this['stopListening'](_0x54f30a,'escape',_0x50e840);});}['_addAnnotationToArchive'](_0x3e8b66,_0x24fbc0){this['listenTo'](_0x3e8b66,'set:isVisible',_0x41eed6=>{_0x41eed6['return']=!0x1,_0x41eed6['stop']();}),this['annotationViews']['add'](_0x3e8b66['view'],_0x24fbc0);}['_handleNewThread'](_0x5ac901){const _0x5d7221=this['editor']['plugins']['get']('CommentsRepository'),_0x161d7c=this['editor']['plugins']['get']('Annotations'),_0x1f59d7=this['editor']['config']['get']('collaboration.channelId');if(!_0x1f59d7||_0x5ac901['channelId']===_0x1f59d7){const _0x1d44fc=_0x5d7221['_threadToController']['get'](_0x5ac901);if(!_0x1d44fc)return void this['_pendingThreads']['push'](_0x5ac901);const _0x273777=this['_calculatePosition'](_0x5ac901['archivedAt']),_0x2f181b=_0x161d7c['getByInnerView'](_0x1d44fc['view']);_0x2f181b['isVisible']&&_0x161d7c['_visibleAnnotations']['remove'](_0x2f181b),this['_addAnnotationToArchive'](_0x2f181b,_0x273777);}}['_calculatePosition'](_0x29edec){const _0x52b76b=this['editor']['config']['get']('collaboration.channelId'),_0x47ac4f=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x3f0791=>_0x3f0791['channelId']===_0x52b76b)['findIndex'](_0x5989bf=>_0x5989bf['archivedAt']<_0x29edec);return _0x47ac4f<0x0||_0x47ac4f>this['annotationViews']['length']?this['annotationViews']['length']:_0x47ac4f-0x1;}['_toggleDialog'](){const _0x17abbf=this['editor'],_0x4e3583=_0x17abbf['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x17abbf['locale'],this['annotationViews'])),'commentsArchive'===_0x4e3583['id']?_0x4e3583['hide']():_0x4e3583['show']({'id':'commentsArchive','title':bt(_0x17abbf['locale'],'COMMENTS_ARCHIVE'),'icon':_0x317037,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2c3836,_0x19418b=!0x1){const _0x104464=this['editor']['locale'],_0x3b94eb=this['editor']['plugins']['get']('Dialog'),_0x4529a0=new _0x2c3836(_0x104464);return _0x4529a0['bind']('isEnabled')['to'](this,'isEnabled'),_0x4529a0['bind']('isOn')['to'](_0x3b94eb,'id',_0x2e6c57=>'commentsArchive'===_0x2e6c57),_0x4529a0['set']({'label':bt(_0x104464,'COMMENTS_ARCHIVE'),'icon':_0x317037,'isToggleable':!0x0}),_0x19418b&&(_0x4529a0['tooltip']=!0x0),this['listenTo'](_0x4529a0,'execute',()=>this['_toggleDialog']()),_0x4529a0;}['_hideDialogOnAnnotationEscape']=_0x252a22=>{const _0x319b28=_0x252a22['source'];if(!this['annotationViews']['has'](_0x319b28['view']))return;const _0x2af4ec=this['editor']['plugins']['get']('Dialog');_0x2af4ec['isOpen']&&'commentsArchive'===_0x2af4ec['id']&&(_0x2af4ec['hide'](),_0x252a22['stop']());};}class Ri extends _0x3549b7{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};