@ckeditor/ckeditor5-real-time-collaboration 0.0.0-internal-20241017.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 (311) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +25 -0
  3. package/README.md +41 -0
  4. package/build/real-time-collaboration.js +5 -0
  5. package/build/translations/ar.js +1 -0
  6. package/build/translations/bg.js +1 -0
  7. package/build/translations/bn.js +1 -0
  8. package/build/translations/ca.js +1 -0
  9. package/build/translations/cs.js +1 -0
  10. package/build/translations/da.js +1 -0
  11. package/build/translations/de-ch.js +1 -0
  12. package/build/translations/de.js +1 -0
  13. package/build/translations/el.js +1 -0
  14. package/build/translations/en-au.js +1 -0
  15. package/build/translations/es.js +1 -0
  16. package/build/translations/et.js +1 -0
  17. package/build/translations/fa.js +1 -0
  18. package/build/translations/fi.js +1 -0
  19. package/build/translations/fr.js +1 -0
  20. package/build/translations/gl.js +1 -0
  21. package/build/translations/he.js +1 -0
  22. package/build/translations/hi.js +1 -0
  23. package/build/translations/hr.js +1 -0
  24. package/build/translations/hu.js +1 -0
  25. package/build/translations/id.js +1 -0
  26. package/build/translations/it.js +1 -0
  27. package/build/translations/ja.js +1 -0
  28. package/build/translations/ko.js +1 -0
  29. package/build/translations/lt.js +1 -0
  30. package/build/translations/lv.js +1 -0
  31. package/build/translations/ms.js +1 -0
  32. package/build/translations/nl.js +1 -0
  33. package/build/translations/no.js +1 -0
  34. package/build/translations/pl.js +1 -0
  35. package/build/translations/pt-br.js +1 -0
  36. package/build/translations/pt.js +1 -0
  37. package/build/translations/ro.js +1 -0
  38. package/build/translations/ru.js +1 -0
  39. package/build/translations/sk.js +1 -0
  40. package/build/translations/sr-latn.js +1 -0
  41. package/build/translations/sr.js +1 -0
  42. package/build/translations/sv.js +1 -0
  43. package/build/translations/th.js +1 -0
  44. package/build/translations/tk.js +1 -0
  45. package/build/translations/tr.js +1 -0
  46. package/build/translations/uk.js +1 -0
  47. package/build/translations/vi.js +1 -0
  48. package/build/translations/zh-cn.js +1 -0
  49. package/build/translations/zh.js +1 -0
  50. package/ckeditor5-metadata.json +87 -0
  51. package/dist/augmentation.d.ts +68 -0
  52. package/dist/common-translations.d.ts +13 -0
  53. package/dist/config.d.ts +52 -0
  54. package/dist/index-content.css +5 -0
  55. package/dist/index-editor.css +321 -0
  56. package/dist/index.css +423 -0
  57. package/dist/index.d.ts +18 -0
  58. package/dist/index.js +28 -0
  59. package/dist/presencelist/presencelistui.d.ts +51 -0
  60. package/dist/presencelist/view/presencecounterview.d.ts +15 -0
  61. package/dist/presencelist/view/presencedropdownlistitemview.d.ts +19 -0
  62. package/dist/presencelist/view/presencedropdownlistview.d.ts +36 -0
  63. package/dist/presencelist/view/presenceinlinelistitemview.d.ts +23 -0
  64. package/dist/presencelist/view/presenceinlinelistview.d.ts +38 -0
  65. package/dist/presencelist/view/presencelistview.d.ts +24 -0
  66. package/dist/presencelist.d.ts +40 -0
  67. package/dist/realtimecollaborativecomments/cloudservicescommentsadapter.d.ts +64 -0
  68. package/dist/realtimecollaborativecomments.d.ts +48 -0
  69. package/dist/realtimecollaborativeediting/realtimecollaborationclient.d.ts +149 -0
  70. package/dist/realtimecollaborativeediting/sessions.d.ts +130 -0
  71. package/dist/realtimecollaborativeediting/usermarkers.d.ts +52 -0
  72. package/dist/realtimecollaborativeediting/websocketgateway.d.ts +67 -0
  73. package/dist/realtimecollaborativeediting.d.ts +38 -0
  74. package/dist/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.d.ts +49 -0
  75. package/dist/realtimecollaborativerevisionhistory.d.ts +41 -0
  76. package/dist/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.d.ts +43 -0
  77. package/dist/realtimecollaborativetrackchanges.d.ts +39 -0
  78. package/dist/translations/ar.d.ts +8 -0
  79. package/dist/translations/ar.js +23 -0
  80. package/dist/translations/ar.umd.js +23 -0
  81. package/dist/translations/bg.d.ts +8 -0
  82. package/dist/translations/bg.js +23 -0
  83. package/dist/translations/bg.umd.js +23 -0
  84. package/dist/translations/bn.d.ts +8 -0
  85. package/dist/translations/bn.js +23 -0
  86. package/dist/translations/bn.umd.js +23 -0
  87. package/dist/translations/ca.d.ts +8 -0
  88. package/dist/translations/ca.js +23 -0
  89. package/dist/translations/ca.umd.js +23 -0
  90. package/dist/translations/cs.d.ts +8 -0
  91. package/dist/translations/cs.js +23 -0
  92. package/dist/translations/cs.umd.js +23 -0
  93. package/dist/translations/da.d.ts +8 -0
  94. package/dist/translations/da.js +23 -0
  95. package/dist/translations/da.umd.js +23 -0
  96. package/dist/translations/de-ch.d.ts +8 -0
  97. package/dist/translations/de-ch.js +23 -0
  98. package/dist/translations/de-ch.umd.js +23 -0
  99. package/dist/translations/de.d.ts +8 -0
  100. package/dist/translations/de.js +23 -0
  101. package/dist/translations/de.umd.js +23 -0
  102. package/dist/translations/el.d.ts +8 -0
  103. package/dist/translations/el.js +23 -0
  104. package/dist/translations/el.umd.js +23 -0
  105. package/dist/translations/en-au.d.ts +8 -0
  106. package/dist/translations/en-au.js +23 -0
  107. package/dist/translations/en-au.umd.js +23 -0
  108. package/dist/translations/en.d.ts +8 -0
  109. package/dist/translations/en.js +23 -0
  110. package/dist/translations/en.umd.js +23 -0
  111. package/dist/translations/es.d.ts +8 -0
  112. package/dist/translations/es.js +23 -0
  113. package/dist/translations/es.umd.js +23 -0
  114. package/dist/translations/et.d.ts +8 -0
  115. package/dist/translations/et.js +23 -0
  116. package/dist/translations/et.umd.js +23 -0
  117. package/dist/translations/fa.d.ts +8 -0
  118. package/dist/translations/fa.js +23 -0
  119. package/dist/translations/fa.umd.js +23 -0
  120. package/dist/translations/fi.d.ts +8 -0
  121. package/dist/translations/fi.js +23 -0
  122. package/dist/translations/fi.umd.js +23 -0
  123. package/dist/translations/fr.d.ts +8 -0
  124. package/dist/translations/fr.js +23 -0
  125. package/dist/translations/fr.umd.js +23 -0
  126. package/dist/translations/gl.d.ts +8 -0
  127. package/dist/translations/gl.js +23 -0
  128. package/dist/translations/gl.umd.js +23 -0
  129. package/dist/translations/he.d.ts +8 -0
  130. package/dist/translations/he.js +23 -0
  131. package/dist/translations/he.umd.js +23 -0
  132. package/dist/translations/hi.d.ts +8 -0
  133. package/dist/translations/hi.js +23 -0
  134. package/dist/translations/hi.umd.js +23 -0
  135. package/dist/translations/hr.d.ts +8 -0
  136. package/dist/translations/hr.js +23 -0
  137. package/dist/translations/hr.umd.js +23 -0
  138. package/dist/translations/hu.d.ts +8 -0
  139. package/dist/translations/hu.js +23 -0
  140. package/dist/translations/hu.umd.js +23 -0
  141. package/dist/translations/id.d.ts +8 -0
  142. package/dist/translations/id.js +23 -0
  143. package/dist/translations/id.umd.js +23 -0
  144. package/dist/translations/it.d.ts +8 -0
  145. package/dist/translations/it.js +23 -0
  146. package/dist/translations/it.umd.js +23 -0
  147. package/dist/translations/ja.d.ts +8 -0
  148. package/dist/translations/ja.js +23 -0
  149. package/dist/translations/ja.umd.js +23 -0
  150. package/dist/translations/ko.d.ts +8 -0
  151. package/dist/translations/ko.js +23 -0
  152. package/dist/translations/ko.umd.js +23 -0
  153. package/dist/translations/lt.d.ts +8 -0
  154. package/dist/translations/lt.js +23 -0
  155. package/dist/translations/lt.umd.js +23 -0
  156. package/dist/translations/lv.d.ts +8 -0
  157. package/dist/translations/lv.js +23 -0
  158. package/dist/translations/lv.umd.js +23 -0
  159. package/dist/translations/ms.d.ts +8 -0
  160. package/dist/translations/ms.js +23 -0
  161. package/dist/translations/ms.umd.js +23 -0
  162. package/dist/translations/nl.d.ts +8 -0
  163. package/dist/translations/nl.js +23 -0
  164. package/dist/translations/nl.umd.js +23 -0
  165. package/dist/translations/no.d.ts +8 -0
  166. package/dist/translations/no.js +23 -0
  167. package/dist/translations/no.umd.js +23 -0
  168. package/dist/translations/pl.d.ts +8 -0
  169. package/dist/translations/pl.js +23 -0
  170. package/dist/translations/pl.umd.js +23 -0
  171. package/dist/translations/pt-br.d.ts +8 -0
  172. package/dist/translations/pt-br.js +23 -0
  173. package/dist/translations/pt-br.umd.js +23 -0
  174. package/dist/translations/pt.d.ts +8 -0
  175. package/dist/translations/pt.js +23 -0
  176. package/dist/translations/pt.umd.js +23 -0
  177. package/dist/translations/ro.d.ts +8 -0
  178. package/dist/translations/ro.js +23 -0
  179. package/dist/translations/ro.umd.js +23 -0
  180. package/dist/translations/ru.d.ts +8 -0
  181. package/dist/translations/ru.js +23 -0
  182. package/dist/translations/ru.umd.js +23 -0
  183. package/dist/translations/sk.d.ts +8 -0
  184. package/dist/translations/sk.js +23 -0
  185. package/dist/translations/sk.umd.js +23 -0
  186. package/dist/translations/sr-latn.d.ts +8 -0
  187. package/dist/translations/sr-latn.js +23 -0
  188. package/dist/translations/sr-latn.umd.js +23 -0
  189. package/dist/translations/sr.d.ts +8 -0
  190. package/dist/translations/sr.js +23 -0
  191. package/dist/translations/sr.umd.js +23 -0
  192. package/dist/translations/sv.d.ts +8 -0
  193. package/dist/translations/sv.js +23 -0
  194. package/dist/translations/sv.umd.js +23 -0
  195. package/dist/translations/th.d.ts +8 -0
  196. package/dist/translations/th.js +23 -0
  197. package/dist/translations/th.umd.js +23 -0
  198. package/dist/translations/tk.d.ts +8 -0
  199. package/dist/translations/tk.js +23 -0
  200. package/dist/translations/tk.umd.js +23 -0
  201. package/dist/translations/tr.d.ts +8 -0
  202. package/dist/translations/tr.js +23 -0
  203. package/dist/translations/tr.umd.js +23 -0
  204. package/dist/translations/uk.d.ts +8 -0
  205. package/dist/translations/uk.js +23 -0
  206. package/dist/translations/uk.umd.js +23 -0
  207. package/dist/translations/vi.d.ts +8 -0
  208. package/dist/translations/vi.js +23 -0
  209. package/dist/translations/vi.umd.js +23 -0
  210. package/dist/translations/zh-cn.d.ts +8 -0
  211. package/dist/translations/zh-cn.js +23 -0
  212. package/dist/translations/zh-cn.umd.js +23 -0
  213. package/dist/translations/zh.d.ts +8 -0
  214. package/dist/translations/zh.js +23 -0
  215. package/dist/translations/zh.umd.js +23 -0
  216. package/lang/contexts.json +12 -0
  217. package/lang/translations/ar.po +64 -0
  218. package/lang/translations/bg.po +60 -0
  219. package/lang/translations/bn.po +60 -0
  220. package/lang/translations/ca.po +60 -0
  221. package/lang/translations/cs.po +62 -0
  222. package/lang/translations/da.po +60 -0
  223. package/lang/translations/de-ch.po +60 -0
  224. package/lang/translations/de.po +60 -0
  225. package/lang/translations/el.po +60 -0
  226. package/lang/translations/en-au.po +60 -0
  227. package/lang/translations/en.po +60 -0
  228. package/lang/translations/es.po +61 -0
  229. package/lang/translations/et.po +60 -0
  230. package/lang/translations/fa.po +60 -0
  231. package/lang/translations/fi.po +60 -0
  232. package/lang/translations/fr.po +61 -0
  233. package/lang/translations/gl.po +60 -0
  234. package/lang/translations/he.po +61 -0
  235. package/lang/translations/hi.po +60 -0
  236. package/lang/translations/hr.po +61 -0
  237. package/lang/translations/hu.po +60 -0
  238. package/lang/translations/id.po +59 -0
  239. package/lang/translations/it.po +61 -0
  240. package/lang/translations/ja.po +59 -0
  241. package/lang/translations/ko.po +59 -0
  242. package/lang/translations/lt.po +62 -0
  243. package/lang/translations/lv.po +61 -0
  244. package/lang/translations/ms.po +59 -0
  245. package/lang/translations/nl.po +60 -0
  246. package/lang/translations/no.po +60 -0
  247. package/lang/translations/pl.po +62 -0
  248. package/lang/translations/pt-br.po +61 -0
  249. package/lang/translations/pt.po +61 -0
  250. package/lang/translations/ro.po +61 -0
  251. package/lang/translations/ru.po +62 -0
  252. package/lang/translations/sk.po +62 -0
  253. package/lang/translations/sr-latn.po +61 -0
  254. package/lang/translations/sr.po +61 -0
  255. package/lang/translations/sv.po +60 -0
  256. package/lang/translations/th.po +59 -0
  257. package/lang/translations/tk.po +60 -0
  258. package/lang/translations/tr.po +60 -0
  259. package/lang/translations/uk.po +62 -0
  260. package/lang/translations/vi.po +59 -0
  261. package/lang/translations/zh-cn.po +59 -0
  262. package/lang/translations/zh.po +59 -0
  263. package/package.json +57 -0
  264. package/src/augmentation.d.ts +64 -0
  265. package/src/augmentation.js +23 -0
  266. package/src/common-translations.d.ts +9 -0
  267. package/src/common-translations.js +23 -0
  268. package/src/config.d.ts +48 -0
  269. package/src/config.js +23 -0
  270. package/src/index.d.ts +14 -0
  271. package/src/index.js +23 -0
  272. package/src/presencelist/presencelistui.d.ts +47 -0
  273. package/src/presencelist/presencelistui.js +23 -0
  274. package/src/presencelist/view/presencecounterview.d.ts +11 -0
  275. package/src/presencelist/view/presencecounterview.js +23 -0
  276. package/src/presencelist/view/presencedropdownlistitemview.d.ts +15 -0
  277. package/src/presencelist/view/presencedropdownlistitemview.js +23 -0
  278. package/src/presencelist/view/presencedropdownlistview.d.ts +32 -0
  279. package/src/presencelist/view/presencedropdownlistview.js +23 -0
  280. package/src/presencelist/view/presenceinlinelistitemview.d.ts +19 -0
  281. package/src/presencelist/view/presenceinlinelistitemview.js +23 -0
  282. package/src/presencelist/view/presenceinlinelistview.d.ts +34 -0
  283. package/src/presencelist/view/presenceinlinelistview.js +23 -0
  284. package/src/presencelist/view/presencelistview.d.ts +20 -0
  285. package/src/presencelist/view/presencelistview.js +23 -0
  286. package/src/presencelist.d.ts +36 -0
  287. package/src/presencelist.js +23 -0
  288. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.d.ts +60 -0
  289. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +23 -0
  290. package/src/realtimecollaborativecomments.d.ts +44 -0
  291. package/src/realtimecollaborativecomments.js +23 -0
  292. package/src/realtimecollaborativeediting/realtimecollaborationclient.d.ts +145 -0
  293. package/src/realtimecollaborativeediting/realtimecollaborationclient.js +23 -0
  294. package/src/realtimecollaborativeediting/sessions.d.ts +126 -0
  295. package/src/realtimecollaborativeediting/sessions.js +23 -0
  296. package/src/realtimecollaborativeediting/usermarkers.d.ts +48 -0
  297. package/src/realtimecollaborativeediting/usermarkers.js +23 -0
  298. package/src/realtimecollaborativeediting/websocketgateway.d.ts +63 -0
  299. package/src/realtimecollaborativeediting/websocketgateway.js +23 -0
  300. package/src/realtimecollaborativeediting.d.ts +34 -0
  301. package/src/realtimecollaborativeediting.js +23 -0
  302. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.d.ts +45 -0
  303. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +23 -0
  304. package/src/realtimecollaborativerevisionhistory.d.ts +37 -0
  305. package/src/realtimecollaborativerevisionhistory.js +23 -0
  306. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.d.ts +39 -0
  307. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +23 -0
  308. package/src/realtimecollaborativetrackchanges.d.ts +35 -0
  309. package/src/realtimecollaborativetrackchanges.js +23 -0
  310. package/theme/presencelist.css +262 -0
  311. package/theme/usermarkers.css +107 -0
@@ -0,0 +1,126 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module real-time-collaboration/realtimecollaborativeediting/sessions
7
+ * @publicApi
8
+ */
9
+ import { ContextPlugin, type Editor, type Context } from 'ckeditor5/src/core.js';
10
+ import { Collection } from 'ckeditor5/src/utils.js';
11
+ import WebSocketGateway from './websocketgateway.js';
12
+ import { Users, type User } from 'ckeditor5-collaboration/src/collaboration-core.js';
13
+ import type { User as ServerUserModel, SessionCollection, ISocket } from '@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';
14
+ export type ServerUser = ServerUserModel & User;
15
+ /**
16
+ *
17
+ * The `Sessions` plugin stores the information about the users and sessions connected to the rich text editor.
18
+ *
19
+ * The difference between the sessions plugin and the {@link module:collaboration-core/users~Users `Users` plugin} is that
20
+ * `Users` also keeps information about the users who are not currently connected to the editor (for example, a comment
21
+ * author who is currently offline).
22
+ *
23
+ * If your integration uses {@link module:core/context~Context} and there are multiple channels used, the `Sessions` plugin
24
+ * aggregates users connected to all the channels.
25
+ *
26
+ * There are two types of entries in the sessions plugin: connected users and sessions.
27
+ *
28
+ * There is one session for each connection to a given channel. For example, for each open editor instance connecting
29
+ * to a given channel ID, there will be a session. Every session has a user. However, the same user can be linked
30
+ * with multiple sessions (for example, the same user opened the same URL in multiple tabs).
31
+ *
32
+ * In other words, if the same user (with the same user ID) opens the same document in two different tabs, they will create
33
+ * two sessions but only one user will be connected. You will be able to see two selections in the same document, both in
34
+ * the same color, but only a single user in the {@link module:real-time-collaboration/presencelist~PresenceList user presence list}.
35
+ */
36
+ export default class Sessions extends ContextPlugin {
37
+ /**
38
+ * A map of session collections connected to the separate channels.
39
+ *
40
+ * The keys of the map are channel IDs and the values are collections of sessions.
41
+ *
42
+ * A session is represented by an object with the following properties:
43
+ * * `id` - A unique session ID.
44
+ * * `user` - A reference to the user.
45
+ */
46
+ channelSessions: Map<string, Collection<ISocket>>;
47
+ /**
48
+ * A map of user collections connected to the separate channels.
49
+ *
50
+ * The keys of the map are channel IDs and the values are collections of users.
51
+ */
52
+ channelConnectedUsers: Map<string, Collection<ISocket>>;
53
+ /**
54
+ * A collection of users currently connected to all channels.
55
+ *
56
+ * A local user is always the first element in this collection.
57
+ */
58
+ allConnectedUsers: Collection<User>;
59
+ /**
60
+ * @inheritDoc
61
+ */
62
+ static get pluginName(): "Sessions";
63
+ /**
64
+ * @inheritDoc
65
+ */
66
+ static get isOfficialPlugin(): true;
67
+ /**
68
+ * @inheritDoc
69
+ */
70
+ static get isPremiumPlugin(): true;
71
+ /**
72
+ * @inheritDoc
73
+ */
74
+ static get requires(): readonly [typeof WebSocketGateway, typeof Users];
75
+ /**
76
+ * @inheritDoc
77
+ */
78
+ constructor(context: Editor | Context);
79
+ /**
80
+ * @inheritDoc
81
+ */
82
+ init(): void;
83
+ /**
84
+ * Observes given service sessions and updates session and users according to it.
85
+ */
86
+ register(channelId: string, serviceSessions: SessionCollection): void;
87
+ /**
88
+ * Stops observing given service sessions and remove all related sessions and users.
89
+ */
90
+ unregister(channelId: string): void;
91
+ /**
92
+ * Session id of the current client.
93
+ */
94
+ get mySessionId(): string;
95
+ /**
96
+ * Returns a reference to the user connected with a session with the given ID.
97
+ */
98
+ getUserBySessionId(sessionId: string): ServerUser | undefined;
99
+ /**
100
+ * Returns a set of ids of all currently connected sessions for the given user.
101
+ *
102
+ * When one user is connected to the same document in two separate browser tabs
103
+ * then this users belongs to the two sessions.
104
+ *
105
+ * Optionally the result can be limited to the given channelId.
106
+ */
107
+ getUserSessions(user: ServerUser, channelId?: string): Set<string>;
108
+ /**
109
+ * Returns the role of a given user.
110
+ */
111
+ getUserRole(user: ServerUser): string | undefined;
112
+ }
113
+ /**
114
+ * Fired when the new user session is added.
115
+ *
116
+ * @eventName ~Sessions#sessionAdd:channelId
117
+ */
118
+ export type SessionAddEvent = {
119
+ name: 'sessionAdd' | `sessionAdd:${string}`;
120
+ args: [
121
+ {
122
+ channelId: string;
123
+ session: ISocket;
124
+ }
125
+ ];
126
+ };
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x4d0022=_0x3258;(function(_0x250eac,_0x5b015b){const _0xfc4bec=_0x3258,_0x1ebd67=_0x250eac();while(!![]){try{const _0x354194=parseInt(_0xfc4bec(0x180))/0x1+-parseInt(_0xfc4bec(0x1a3))/0x2*(parseInt(_0xfc4bec(0x1b1))/0x3)+-parseInt(_0xfc4bec(0x17e))/0x4+parseInt(_0xfc4bec(0x1af))/0x5+-parseInt(_0xfc4bec(0x195))/0x6+parseInt(_0xfc4bec(0x19c))/0x7*(-parseInt(_0xfc4bec(0x19a))/0x8)+parseInt(_0xfc4bec(0x198))/0x9;if(_0x354194===_0x5b015b)break;else _0x1ebd67['push'](_0x1ebd67['shift']());}catch(_0x16590c){_0x1ebd67['push'](_0x1ebd67['shift']());}}}(_0x2a9e,0x892b7));import{ContextPlugin as _0xf71ffe}from'ckeditor5/src/core.js';import{Collection as _0x3cefcd,CKEditorError as _0x25d0f4}from'ckeditor5/src/utils.js';import _0x4f3800 from'./websocketgateway.js';import{Users as _0x11511c}from'ckeditor5-collaboration/src/collaboration-core.js';function _0x3258(_0x20a015,_0x3bcb83){const _0x2a9ee7=_0x2a9e();return _0x3258=function(_0x3258fa,_0x1cc65f){_0x3258fa=_0x3258fa-0x17a;let _0x1cfd0c=_0x2a9ee7[_0x3258fa];return _0x1cfd0c;},_0x3258(_0x20a015,_0x3bcb83);}export default class i extends _0xf71ffe{static get[_0x4d0022(0x1a4)](){const _0x380f09=_0x4d0022;return _0x380f09(0x18a);}static get[_0x4d0022(0x1b0)](){return!0x0;}static get[_0x4d0022(0x1b2)](){return!0x0;}static get[_0x4d0022(0x187)](){return[_0x4f3800,_0x11511c];}constructor(_0x3e7429){const _0xd906bd=_0x4d0022;super(_0x3e7429),this[_0xd906bd(0x17c)]=new Map(),this[_0xd906bd(0x18d)]=new Map(),this[_0xd906bd(0x1ab)]=new _0x3cefcd(),this[_0xd906bd(0x185)]=new Map(),this[_0xd906bd(0x184)]=0x0,this[_0xd906bd(0x189)]=this[_0xd906bd(0x19e)][_0xd906bd(0x18c)][_0xd906bd(0x19b)](_0x11511c);}[_0x4d0022(0x17a)](){const _0x20b866=_0x4d0022,_0x554524=this[_0x20b866(0x19e)][_0x20b866(0x18c)][_0x20b866(0x19b)](_0x4f3800);this[_0x20b866(0x186)](_0x554524,_0x20b866(0x1a8),(_0x52837b,_0x391d54,_0x384b71)=>{const _0x36c8c5=_0x20b866;if(_0x36c8c5(0x17f)!==_0x384b71)this[_0x36c8c5(0x17c)][_0x36c8c5(0x192)](_0x34842e=>_0x34842e[_0x36c8c5(0x18e)]()),this[_0x36c8c5(0x18d)][_0x36c8c5(0x192)](_0x44646b=>_0x44646b[_0x36c8c5(0x18e)]()),this[_0x36c8c5(0x1ab)][_0x36c8c5(0x18e)]();else{for(const [_0xc01be9,_0x4bafc3]of this[_0x36c8c5(0x185)])for(const _0x3b15bb of _0x4bafc3)this[_0x36c8c5(0x1a7)](_0xc01be9,_0x3b15bb);}}),this[_0x20b866(0x197)](_0x554524[_0x20b866(0x1b3)]['me'],!0x0);}[_0x4d0022(0x1aa)](_0x32b997,_0x1dacc0){const _0x3efa96=_0x4d0022;if(this[_0x3efa96(0x185)][_0x3efa96(0x1a1)](_0x32b997))throw new _0x25d0f4(_0x3efa96(0x18f),null,{'channelId':_0x32b997});this[_0x3efa96(0x185)][_0x3efa96(0x1b5)](_0x32b997,_0x1dacc0),this[_0x3efa96(0x17c)][_0x3efa96(0x1b5)](_0x32b997,new _0x3cefcd()),this[_0x3efa96(0x18d)][_0x3efa96(0x1b5)](_0x32b997,new _0x3cefcd()),this[_0x3efa96(0x186)](_0x1dacc0,_0x3efa96(0x181),(_0x1c5f06,_0x3c0889)=>this[_0x3efa96(0x1a7)](_0x32b997,_0x3c0889)),this[_0x3efa96(0x186)](_0x1dacc0,_0x3efa96(0x1ae),(_0x43cae9,_0x4d93d5)=>this[_0x3efa96(0x1a9)](_0x32b997,_0x4d93d5));for(const _0x2ffab9 of _0x1dacc0)this[_0x3efa96(0x1a7)](_0x32b997,_0x2ffab9);}[_0x4d0022(0x182)](_0x3ef3a7){const _0x2755b3=_0x4d0022;if(!this[_0x2755b3(0x185)][_0x2755b3(0x1a1)](_0x3ef3a7))throw new _0x25d0f4(_0x2755b3(0x188),null,{'channelId':_0x3ef3a7});const _0xb44530=this[_0x2755b3(0x185)][_0x2755b3(0x19b)](_0x3ef3a7);this[_0x2755b3(0x196)](_0xb44530);for(const _0x3f8cfd of _0xb44530)_0x2755b3(0x17f)===this[_0x2755b3(0x19e)][_0x2755b3(0x18c)][_0x2755b3(0x19b)](_0x4f3800)[_0x2755b3(0x1a6)]&&this[_0x2755b3(0x1a9)](_0x3ef3a7,_0x3f8cfd);this[_0x2755b3(0x185)][_0x2755b3(0x17b)](_0x3ef3a7),this[_0x2755b3(0x17c)][_0x2755b3(0x17b)](_0x3ef3a7),this[_0x2755b3(0x18d)][_0x2755b3(0x17b)](_0x3ef3a7);}get[_0x4d0022(0x191)](){const _0x316bb9=_0x4d0022;return this[_0x316bb9(0x19e)][_0x316bb9(0x18c)][_0x316bb9(0x19b)](_0x4f3800)[_0x316bb9(0x1b3)][_0x316bb9(0x1a2)];}[_0x4d0022(0x1a5)](_0x9aa19e){const _0x1ee2b7=_0x4d0022;for(const _0x664bf of this[_0x1ee2b7(0x17c)][_0x1ee2b7(0x1a0)]())for(const _0x7f98d5 of _0x664bf)if(_0x7f98d5['id']===_0x9aa19e)return _0x7f98d5[_0x1ee2b7(0x199)];}[_0x4d0022(0x194)](_0x1d630c,_0x3fe967){const _0x2c95de=_0x4d0022,_0x11ac86=_0x3fe967?[this[_0x2c95de(0x17c)][_0x2c95de(0x19b)](_0x3fe967)]:this[_0x2c95de(0x17c)][_0x2c95de(0x1a0)](),_0xc15188=new Set();for(const _0x2eef1d of _0x11ac86)for(const _0x3d77b3 of _0x2eef1d)_0x3d77b3[_0x2c95de(0x199)]['id']===_0x1d630c['id']&&_0xc15188[_0x2c95de(0x181)](_0x3d77b3['id']);return _0xc15188;}[_0x4d0022(0x193)](_0x42e9bd){const _0x4ef072=_0x4d0022;for(const _0x27fb3a of this[_0x4ef072(0x17c)][_0x4ef072(0x1a0)]())for(const _0xea25e6 of _0x27fb3a)if(_0xea25e6[_0x4ef072(0x199)]===_0x42e9bd)return _0xea25e6[_0x4ef072(0x1ac)];}[_0x4d0022(0x1a7)](_0x470d53,_0x8581f7){const _0x63e010=_0x4d0022;if(_0x63e010(0x17f)!==this[_0x63e010(0x19e)][_0x63e010(0x18c)][_0x63e010(0x19b)](_0x4f3800)[_0x63e010(0x1a6)])return;const _0x331263=_0x8581f7[_0x63e010(0x199)],_0x22648e=this[_0x63e010(0x189)][_0x63e010(0x190)](_0x331263['id'])||this[_0x63e010(0x197)](_0x331263),_0x381a4b=Object[_0x63e010(0x19d)]({},_0x8581f7,{'user':_0x22648e});this[_0x63e010(0x17c)][_0x63e010(0x19b)](_0x470d53)[_0x63e010(0x181)](_0x381a4b);const _0xf8010b=this[_0x63e010(0x18d)][_0x63e010(0x19b)](_0x470d53);_0xf8010b[_0x63e010(0x1a1)](_0x22648e['id'])||_0xf8010b[_0x63e010(0x181)](_0x22648e),this[_0x63e010(0x1ab)][_0x63e010(0x1a1)](_0x22648e['id'])||this[_0x63e010(0x1ab)][_0x63e010(0x181)](_0x22648e,_0x22648e[_0x63e010(0x183)]?0x0:void 0x0),this[_0x63e010(0x1b6)](_0x63e010(0x17d)+_0x470d53,{'channelId':_0x470d53,'session':_0x381a4b});}[_0x4d0022(0x1a9)](_0xaaa170,_0x5cce2c){const _0x3c6301=_0x4d0022;if(_0x3c6301(0x17f)!==this[_0x3c6301(0x19e)][_0x3c6301(0x18c)][_0x3c6301(0x19b)](_0x4f3800)[_0x3c6301(0x1a6)])return;const _0x1e39ba=this[_0x3c6301(0x18d)][_0x3c6301(0x19b)](_0xaaa170),_0x261e60=_0x5cce2c[_0x3c6301(0x199)];_0x261e60['id']&&(this[_0x3c6301(0x17c)][_0x3c6301(0x19b)](_0xaaa170)[_0x3c6301(0x1ae)](_0x5cce2c['id']),_0x1e39ba[_0x3c6301(0x1a1)](_0x261e60['id'])&&!this[_0x3c6301(0x194)](_0x261e60,_0xaaa170)[_0x3c6301(0x1b4)]&&_0x1e39ba[_0x3c6301(0x1ae)](_0x261e60['id']),this[_0x3c6301(0x1ab)][_0x3c6301(0x19b)](_0x261e60['id'])&&!this[_0x3c6301(0x194)](_0x261e60)[_0x3c6301(0x1b4)]&&this[_0x3c6301(0x1ab)][_0x3c6301(0x1ae)](_0x261e60['id']));}[_0x4d0022(0x197)](_0xcce28f,_0x5efb23){const _0x1a9791=_0x4d0022,_0x42c5e4=this[_0x1a9791(0x189)][_0x1a9791(0x1ad)](_0xcce28f);return _0x5efb23&&this[_0x1a9791(0x189)][_0x1a9791(0x18b)](_0xcce28f['id']),_0x42c5e4[_0x1a9791(0x19f)]=this[_0x1a9791(0x184)]++,_0x42c5e4;}}function _0x2a9e(){const _0x37184d=['40dMOviT','get','1328691ZXiKfD','assign','context','orderNumber','values','has','sessionId','2504kPurCD','pluginName','getUserBySessionId','state','_handleSessionAdd','change:state','_handleSessionRemove','register','allConnectedUsers','role','addUser','remove','2325405HuDQwq','isOfficialPlugin','1983nFHfUL','isPremiumPlugin','connection','size','set','fire','init','delete','channelSessions','sessionAdd:','1774652TUunLZ','connected','172045vhKNqX','add','unregister','isMe','_uniqueUsersCount','_registeredSessions','listenTo','requires','sessions-unregister-not-exist','_users','Sessions','defineMe','plugins','channelConnectedUsers','clear','sessions-register-already-registered','getUser','mySessionId','forEach','getUserRole','getUserSessions','2435580ddGEnX','stopListening','_createUser','22958559iqEiNm','user'];_0x2a9e=function(){return _0x37184d;};return _0x2a9e();}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import { Plugin } from 'ckeditor5/src/core.js';
6
+ import Sessions from './sessions.js';
7
+ import '../../theme/usermarkers.css';
8
+ /**
9
+ * This plugin:
10
+ *
11
+ * 1. Creates marker operations with current user selection on demand.
12
+ * 2. Renders clients selection markers.
13
+ *
14
+ * This plugin does not create markers automatically, instead it provides an API for it {@link #createUserMarkerOperations}.
15
+ * {@link RealTimeCollaborationClient} uses this API to create user selection operations in the most optimal moment
16
+ * (as the last operation in the operations package) - this is to reach the best compression result.
17
+ */
18
+ export default class UserMarkers extends Plugin {
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get requires(): readonly [typeof Sessions];
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ static get pluginName(): "UserMarkers";
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static get isOfficialPlugin(): true;
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ static get isPremiumPlugin(): true;
35
+ /**
36
+ * @inheritDoc
37
+ */
38
+ init(): void;
39
+ afterInit(): void;
40
+ /**
41
+ * @inheritDoc
42
+ */
43
+ destroy(): void;
44
+ /**
45
+ * Creates marker operations with current user selection.
46
+ */
47
+ createUserMarkerOperations(): void;
48
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ function _0x965f(_0x26d5f9,_0x1c6df6){const _0x5b134a=_0x5b13();return _0x965f=function(_0x965f2e,_0x23ffdf){_0x965f2e=_0x965f2e-0xfd;let _0x9349bd=_0x5b134a[_0x965f2e];return _0x9349bd;},_0x965f(_0x26d5f9,_0x1c6df6);}function _0x5b13(){const _0x154f0f=['name','pluginName','orderNumber','add','15uzhpBR','deletionPosition','5567592SiNMvr','1623180PKjOmf','checkChild','addMarker','ck-user__marker_hovered','model','color','markerToHighlight','editingDowncast','ck-user__marker\x20','$graveyard','fromRange','document','selection','init','getFirstRange','user:position','undo','ck-user__selection','createUserMarkerOperations','innerHTML','UserMarkers','</span>⁠','parent','nodeAfter','listenTo','removeClass','requires','size','root','201982bJwxPH','change','isLimit','batch','type','remove','507420kheASw','plugins','getAttribute','user:','clear','toDomElement','2100393Jrssny','afterInit','setCustomProperty','startsWith','markerName','highest','getRange','stopListening','968495TJfgvL','mapper','4qwwzNo','20ldlfJd','schema','Escape','marker','reconvertMarker','userPositionMarker','getStart','getUserBySessionId','end','getSelectionClass','hasDomSelection','has','isPremiumPlugin','isCollapsed','element','span','update:user:range','rootName','markerToElement','classList','addEventListener','editing','delete','get','958836xCMNVz','data-session-id','tableCell','getCustomProperty','user:position:','⁠<span\x20class=\x22ck-user__marker-line\x22\x20contenteditable=\x22false\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span><span\x20class=\x22ck-user__marker-tooltip\x22\x20contenteditable=\x22false\x22\x20spellcheck=\x22false\x22>','contenteditable','removeMarker','destroy','getMarkerClass','createUIElement','markers','newRange','_domEmitter','updateMarker','isInline','editor','detach','mouseleave','markerNameToElements','getContainedElement','commands','hasContent','oldRange','getPositions','66hCGaiK','_createdBatches','getNearestSelectionRange','applyOperation','conversion','markerRange','mouseenter','toRange','for','keydown','render','start','set','createRange','49QUOuWv','change:range','isOfficialPlugin','isObject','enqueueChange','view','user:range','user:range:','$text','mySessionId','split','isSimilar'];_0x5b13=function(){return _0x154f0f;};return _0x5b13();}const _0x3289a6=_0x965f;(function(_0x19e65d,_0x14f197){const _0x97b56c=_0x965f,_0x3c79f1=_0x19e65d();while(!![]){try{const _0x3816b3=parseInt(_0x97b56c(0x17a))/0x1+-parseInt(_0x97b56c(0x111))/0x2*(parseInt(_0x97b56c(0x177))/0x3)+parseInt(_0x97b56c(0x127))/0x4*(-parseInt(_0x97b56c(0x125))/0x5)+parseInt(_0x97b56c(0x117))/0x6*(parseInt(_0x97b56c(0x167))/0x7)+-parseInt(_0x97b56c(0x179))/0x8+parseInt(_0x97b56c(0x11d))/0x9*(-parseInt(_0x97b56c(0x128))/0xa)+-parseInt(_0x97b56c(0x159))/0xb*(-parseInt(_0x97b56c(0x140))/0xc);if(_0x3816b3===_0x14f197)break;else _0x3c79f1['push'](_0x3c79f1['shift']());}catch(_0x1c8f54){_0x3c79f1['push'](_0x3c79f1['shift']());}}}(_0x5b13,0xcb6cf));import{Plugin as _0x3f9c84}from'ckeditor5/src/core.js';import{global as _0x35acd4,DomEmitterMixin as _0x2562b2}from'ckeditor5/src/utils.js';import _0x14e755 from'./sessions.js';import{LiveRange as _0x37aea5}from'ckeditor5/src/engine.js';import'../../theme/usermarkers.css';export default class H extends _0x3f9c84{constructor(){const _0x47b5a3=_0x965f;super(...arguments),this[_0x47b5a3(0x14d)]=new(_0x2562b2())();}static get[_0x3289a6(0x10e)](){return[_0x14e755];}static get[_0x3289a6(0x174)](){const _0x8adba=_0x3289a6;return _0x8adba(0x108);}static get[_0x3289a6(0x169)](){return!0x0;}static get[_0x3289a6(0x134)](){return!0x0;}[_0x3289a6(0x101)](){const _0xa9415d=_0x3289a6,_0x28fade=this[_0xa9415d(0x150)],_0x337e9a=_0x28fade[_0xa9415d(0x118)][_0xa9415d(0x13f)](_0x14e755);_0x28fade[_0xa9415d(0x15d)][_0xa9415d(0x161)](_0xa9415d(0x181))[_0xa9415d(0x13a)]({'model':_0xa9415d(0x103),'view':(_0xffc504,{writer:_0x2bbf2f})=>function(_0x3f612a,_0x4597b0,_0x21f452,_0x14e5b9){const _0x419f44=_0xa9415d,_0xbb3685=_0x3f612a[_0x419f44(0x121)][_0x419f44(0x171)](':')[0x2],_0x40ce34=_0x21f452[_0x419f44(0x12f)](_0xbb3685);if(!_0x40ce34||_0xbb3685===_0x21f452[_0x419f44(0x170)])return;if(!_0x14e5b9[_0x419f44(0x17e)][_0x419f44(0x129)][_0x419f44(0x17b)](_0x3f612a[_0x419f44(0x15e)][_0x419f44(0x164)],_0x419f44(0x16f)))return;const _0x39e308={'class':_0x419f44(0x182)+_0x40ce34[_0x419f44(0x17f)][_0x419f44(0x149)](),'data-name':_0x40ce34[_0x419f44(0x173)],'data-session-id':_0xbb3685},_0x214bca=_0x14e5b9[_0x419f44(0x17e)][_0x419f44(0x14b)][_0x419f44(0x13f)](_0x3f612a[_0x419f44(0x121)]),_0x376c69=_0x214bca[_0x419f44(0x12e)](),_0x44aa08=_0x376c69[_0x419f44(0x10b)],_0x1897ed=_0x14e5b9[_0x419f44(0x17e)][_0x419f44(0x129)];if(_0x44aa08&&_0x1897ed[_0x419f44(0x16a)](_0x44aa08)&&_0x1897ed[_0x419f44(0x14f)](_0x44aa08)&&!_0x14e5b9[_0x419f44(0x17e)][_0x419f44(0x14b)][_0x419f44(0x13f)](_0x419f44(0x16e)+_0xbb3685)[_0x419f44(0x123)]()[_0x419f44(0x135)])return;const _0x1916c7=_0x376c69[_0x419f44(0x10a)];return _0x14e5b9[_0x419f44(0x17e)][_0x419f44(0x129)][_0x419f44(0x113)](_0x1916c7)&&!_0x14e5b9[_0x419f44(0x17e)][_0x419f44(0x156)](_0x1916c7)&&(_0x39e308[_0x419f44(0x146)]=!0x1),function(_0x5766c0,_0x41b7cc,_0x5c14e7){const _0x1848c1=_0x419f44,_0x2c2c5d=_0x5766c0[_0x1848c1(0x14a)](_0x1848c1(0x137),_0x41b7cc);return _0x5766c0[_0x1848c1(0x11f)](_0x1848c1(0x12d),!0x0,_0x2c2c5d),_0x2c2c5d[_0x1848c1(0x163)]=function(_0x17184d){const _0xd7bfd9=_0x1848c1,_0x388849=this[_0xd7bfd9(0x11c)](_0x17184d);return _0x388849[_0xd7bfd9(0x107)]=_0xd7bfd9(0x145)+_0x5c14e7[_0xd7bfd9(0x173)]+_0xd7bfd9(0x109),_0x388849[_0xd7bfd9(0x13c)](_0xd7bfd9(0x15f),()=>{const _0x29b770=_0xd7bfd9;_0x388849[_0x29b770(0x13b)][_0x29b770(0x176)](_0x29b770(0x17d));}),_0x388849[_0xd7bfd9(0x13c)](_0xd7bfd9(0x152),()=>{const _0x249350=_0xd7bfd9;_0x388849[_0x249350(0x13b)][_0x249350(0x116)](_0x249350(0x17d));}),_0x388849;},_0x2c2c5d[_0x1848c1(0x172)]=function(_0x2a2c36){const _0x2da12e=_0x1848c1;return!(!this[_0x2da12e(0x143)](_0x2da12e(0x12d))||!_0x2a2c36[_0x2da12e(0x143)](_0x2da12e(0x12d))||this[_0x2da12e(0x119)](_0x2da12e(0x141))!=_0x2a2c36[_0x2da12e(0x119)](_0x2da12e(0x141)));},_0x2c2c5d;}(_0x4597b0,_0x39e308,_0x40ce34);}(_0xffc504,_0x2bbf2f,_0x337e9a,_0x28fade)}),_0x28fade[_0xa9415d(0x15d)][_0xa9415d(0x161)](_0xa9415d(0x181))[_0xa9415d(0x180)]({'model':_0xa9415d(0x16d),'view':_0x434574=>function(_0x23fb22,_0x530d81){const _0x533e37=_0xa9415d,_0x313bd7=_0x23fb22[_0x533e37(0x121)][_0x533e37(0x171)](':')[0x2];if(_0x313bd7===_0x530d81[_0x533e37(0x170)])return null;const _0x2cc36d=_0x530d81[_0x533e37(0x12f)](_0x313bd7);if(!_0x2cc36d)return{'id':_0x313bd7,'classes':[]};return{'id':_0x313bd7,'classes':[_0x533e37(0x105),_0x2cc36d[_0x533e37(0x17f)][_0x533e37(0x131)]()],'attributes':{'data-session-id':_0x313bd7},'priority':0x7d0+_0x2cc36d[_0x533e37(0x175)]};}(_0x434574,_0x337e9a)}),function(_0x510bb8){const _0xf08b1b=_0xa9415d,_0x9bb2c7=_0x510bb8[_0xf08b1b(0x17e)],_0x4b9853=new Map(),_0x2d2259=_0x510bb8[_0xf08b1b(0x118)][_0xf08b1b(0x13f)](_0x14e755);_0x9bb2c7[_0xf08b1b(0x14b)]['on'](_0xf08b1b(0x138),(_0x40f87c,_0x324c02,_0xc12046,_0x22e57c)=>{const _0x1b3bf7=_0xf08b1b;if(!_0x22e57c&&_0x4b9853[_0x1b3bf7(0x13f)](_0x324c02[_0x1b3bf7(0x173)]))return _0x4b9853[_0x1b3bf7(0x13f)](_0x324c02[_0x1b3bf7(0x173)])[_0x1b3bf7(0x151)](),void _0x4b9853[_0x1b3bf7(0x13e)](_0x324c02[_0x1b3bf7(0x173)]);const _0x288299=_0x324c02[_0x1b3bf7(0x173)][_0x1b3bf7(0x171)](':')[0x2];if(_0x288299===_0x2d2259[_0x1b3bf7(0x170)])return;const _0x21b97f=_0x1b3bf7(0x144)+_0x288299;_0x9bb2c7[_0x1b3bf7(0x14b)][_0x1b3bf7(0x133)](_0x21b97f)&&_0x510bb8[_0x1b3bf7(0x13d)][_0x1b3bf7(0x12c)](_0x21b97f),_0x324c02['on'](_0x1b3bf7(0x168),(_0x30e560,_0x5311fb,_0x142eb6)=>{const _0x46c2c9=_0x1b3bf7;if(_0x46c2c9(0xfd)!=_0x5311fb[_0x46c2c9(0x110)][_0x46c2c9(0x139)]&&_0x46c2c9(0xfd)==_0x324c02[_0x46c2c9(0x123)]()[_0x46c2c9(0x110)][_0x46c2c9(0x139)]&&!_0x4b9853[_0x46c2c9(0x133)](_0x324c02[_0x46c2c9(0x173)])){const _0x581b18=_0x9bb2c7[_0x46c2c9(0x129)][_0x46c2c9(0x15b)](_0x142eb6[_0x46c2c9(0x178)]);if(_0x581b18){const _0x2fefa5=_0x37aea5[_0x46c2c9(0xfe)](_0x581b18);_0x4b9853[_0x46c2c9(0x165)](_0x324c02[_0x46c2c9(0x173)],_0x2fefa5),_0x2fefa5['on'](_0x46c2c9(0x168),(_0x46ea70,_0x2bc37a,_0x3fff90)=>{const _0x321dd8=_0x46c2c9;if(_0x321dd8(0xfd)==_0x2fefa5[_0x321dd8(0x110)][_0x321dd8(0x139)]){const _0x65aba0=_0x9bb2c7[_0x321dd8(0x129)][_0x321dd8(0x15b)](_0x3fff90[_0x321dd8(0x178)]);_0x65aba0?(_0x2fefa5[_0x321dd8(0x164)]=_0x65aba0[_0x321dd8(0x164)],_0x2fefa5[_0x321dd8(0x130)]=_0x65aba0[_0x321dd8(0x130)]):(_0x4b9853[_0x321dd8(0x13e)](_0x324c02[_0x321dd8(0x173)]),_0x2fefa5[_0x321dd8(0x151)]());}});}}});}),_0x9bb2c7[_0xf08b1b(0xff)]['on'](_0xf08b1b(0x112),()=>{const _0x576e1b=_0xf08b1b;_0x4b9853[_0x576e1b(0x10f)]>0x0&&_0x9bb2c7[_0x576e1b(0x16b)]({'isUndoable':!0x1},_0x30c2e9=>{const _0x45027b=_0x576e1b;for(const [_0x1293e2,_0x140147]of _0x4b9853)_0x45027b(0xfd)==_0x9bb2c7[_0x45027b(0x14b)][_0x45027b(0x13f)](_0x1293e2)[_0x45027b(0x123)]()[_0x45027b(0x110)][_0x45027b(0x139)]&&(re(_0x1293e2[_0x45027b(0x171)](':')[0x2],_0x140147[_0x45027b(0x160)](),_0x9bb2c7,_0x30c2e9),_0x140147[_0x45027b(0x151)]());_0x4b9853[_0x45027b(0x11b)]();});});}(_0x28fade),this[_0xa9415d(0x14d)][_0xa9415d(0x10c)](_0x35acd4[_0xa9415d(0xff)],_0xa9415d(0x162),(_0x5e7569,{key:_0x4da10b})=>{const _0x11a7d0=_0xa9415d;_0x11a7d0(0x12a)===_0x4da10b&&function(_0x3588a3){const _0x555415=_0x11a7d0;_0x3588a3[_0x555415(0x13d)][_0x555415(0x16c)][_0x555415(0x112)](_0x2ce3b8=>{const _0x1e35e0=_0x555415;for(const _0x543d1d of _0x3588a3[_0x1e35e0(0x17e)][_0x1e35e0(0x14b)]){if(!_0x543d1d[_0x1e35e0(0x173)][_0x1e35e0(0x120)](_0x1e35e0(0x103)))continue;const _0x37035a=_0x3588a3[_0x1e35e0(0x13d)][_0x1e35e0(0x126)][_0x1e35e0(0x153)](_0x543d1d[_0x1e35e0(0x173)]);if(_0x37035a){for(const _0x4aafb5 of _0x37035a)_0x2ce3b8[_0x1e35e0(0x10d)](_0x1e35e0(0x17d),_0x4aafb5);}}});}(_0x28fade);},{'useCapture':!0x0});}[_0x3289a6(0x11e)](){const _0x3a9580=_0x3289a6,_0x20df96=this[_0x3a9580(0x150)],_0x2fd07d=_0x20df96[_0x3a9580(0x155)][_0x3a9580(0x13f)](_0x3a9580(0x104));_0x2fd07d&&_0x20df96[_0x3a9580(0x17e)]['on'](_0x3a9580(0x15c),(_0x5e5c50,_0x1865a5)=>{const _0x7a70a5=_0x3a9580,_0x1dd762=_0x1865a5[0x0];if(_0x7a70a5(0x12b)!=_0x1dd762[_0x7a70a5(0x115)]||!_0x1dd762[_0x7a70a5(0x173)][_0x7a70a5(0x120)](_0x7a70a5(0x11a)))return;const _0x2167d2=_0x1dd762[_0x7a70a5(0x114)];_0x2fd07d[_0x7a70a5(0x15a)][_0x7a70a5(0x133)](_0x2167d2)&&(_0x1dd762[_0x7a70a5(0x14c)]=_0x1dd762[_0x7a70a5(0x157)]?_0x20df96[_0x7a70a5(0x17e)][_0x7a70a5(0x166)](_0x1dd762[_0x7a70a5(0x157)][_0x7a70a5(0x164)],_0x1dd762[_0x7a70a5(0x157)][_0x7a70a5(0x130)]):null);},{'priority':_0x3a9580(0x122)});}[_0x3289a6(0x148)](){const _0xf19989=_0x3289a6;return this[_0xf19989(0x14d)][_0xf19989(0x124)](),super[_0xf19989(0x148)]();}[_0x3289a6(0x106)](){const _0x432de3=_0x3289a6,_0x41f655=this[_0x432de3(0x150)],_0xa9e824=_0x41f655[_0x432de3(0x17e)][_0x432de3(0xff)],_0x39b85f=_0x41f655[_0x432de3(0x118)][_0x432de3(0x13f)](_0x14e755);_0x41f655[_0x432de3(0x17e)][_0x432de3(0x16b)]({'isUndoable':!0x1},_0x4c3c72=>{const _0xe8ccdb=_0x432de3,_0x4b3556=_0xe8ccdb(0x16e)+_0x39b85f[_0xe8ccdb(0x170)],_0x273fc7=_0xe8ccdb(0x144)+_0x39b85f[_0xe8ccdb(0x170)],_0x58b9e0=_0x41f655[_0xe8ccdb(0x17e)][_0xe8ccdb(0x14b)][_0xe8ccdb(0x133)](_0x4b3556);_0x41f655[_0xe8ccdb(0x13d)][_0xe8ccdb(0x16c)][_0xe8ccdb(0x132)]?re(_0x39b85f[_0xe8ccdb(0x170)],_0xa9e824[_0xe8ccdb(0x100)][_0xe8ccdb(0x102)](),_0x41f655[_0xe8ccdb(0x17e)],_0x4c3c72):_0x58b9e0&&(_0x4c3c72[_0xe8ccdb(0x147)](_0x4b3556),_0x4c3c72[_0xe8ccdb(0x147)](_0x273fc7));});}}function re(_0x3e2559,_0x455e19,_0x2e59cb,_0x5b5165){const _0x3d082a=_0x3289a6,_0x5caacb=_0x3d082a(0x16e)+_0x3e2559,_0x23e948=_0x3d082a(0x144)+_0x3e2559,_0x2d8a49=_0x455e19[_0x3d082a(0x154)]();let _0x3444ea=_0x455e19[_0x3d082a(0x164)];_0x2d8a49&&_0x2d8a49['is'](_0x3d082a(0x136),_0x3d082a(0x142))&&(_0x3444ea=function(_0x4dcb11,_0x2d33ff){const _0x51545e=_0x3d082a;for(const _0x3ddf15 of _0x4dcb11[_0x51545e(0x158)]())if(_0x2d33ff[_0x51545e(0x129)][_0x51545e(0x17b)](_0x3ddf15,_0x51545e(0x16f)))return _0x3ddf15;}(_0x455e19,_0x2e59cb),_0x455e19=_0x5b5165[_0x3d082a(0x166)](_0x3444ea));const _0x146cd8=_0x5b5165[_0x3d082a(0x166)](_0x3444ea);_0x2e59cb[_0x3d082a(0x14b)][_0x3d082a(0x133)](_0x5caacb)?(_0x5b5165[_0x3d082a(0x14e)](_0x5caacb,{'range':_0x455e19}),_0x5b5165[_0x3d082a(0x14e)](_0x23e948,{'range':_0x146cd8})):(_0x5b5165[_0x3d082a(0x17c)](_0x5caacb,{'range':_0x455e19,'usingOperation':!0x0}),_0x5b5165[_0x3d082a(0x17c)](_0x23e948,{'range':_0x146cd8,'usingOperation':!0x0}));}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module real-time-collaboration/realtimecollaborativeediting/websocketgateway
7
+ * @publicApi
8
+ */
9
+ import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core.js';
10
+ import { WebSocketGateway as WebSocketGatewayProvider, type WebSocketGatewayState } from '@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';
11
+ import { Notification } from 'ckeditor5/src/ui.js';
12
+ export default class WebSocketGateway extends ContextPlugin {
13
+ static WebSocketGateway: typeof WebSocketGatewayProvider;
14
+ static initialReconnectionInterval: number;
15
+ connection: WebSocketGatewayProvider;
16
+ /**
17
+ * The connection state.
18
+ *
19
+ * The `connected` state is set when both, the browser and the WebSocket, are connected.
20
+ */
21
+ state: WebSocketGatewayState;
22
+ static get requires(): readonly ["CloudServices", typeof Notification];
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ static get pluginName(): "WebSocketGateway";
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static get isOfficialPlugin(): true;
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ static get isPremiumPlugin(): true;
35
+ constructor(context: Editor | Context);
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ init(): Promise<unknown>;
40
+ /**
41
+ * Registers a plugin that will be reconnected when the connection is back.
42
+ * The plugin needs to implement the `reconnect()` method.
43
+ */
44
+ addToReconnectionStack(plugin: ReconnectPlugin | ReconnectContextPlugin): void;
45
+ /**
46
+ * Removes the plugin from the reconnection stack.
47
+ */
48
+ removeFromReconnectionStack(plugin: ReconnectPlugin | ReconnectContextPlugin): void;
49
+ /**
50
+ * Checks if the plugin is present in the reconnection stack.
51
+ */
52
+ isInReconnectionStack(plugin: ReconnectPlugin | ReconnectContextPlugin): boolean;
53
+ /**
54
+ * @inheritDoc
55
+ */
56
+ destroy(): void;
57
+ }
58
+ interface Reconnect {
59
+ reconnect: () => void | Promise<void>;
60
+ }
61
+ export type ReconnectPlugin = Plugin & Reconnect;
62
+ export type ReconnectContextPlugin = ContextPlugin & Reconnect;
63
+ export {};
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x5707d0=_0x4b3e;function _0x4b3e(_0x73764c,_0x262d95){const _0x4c6f3b=_0x4c6f();return _0x4b3e=function(_0x4b3ea6,_0x3604f5){_0x4b3ea6=_0x4b3ea6-0x135;let _0x11acab=_0x4c6f3b[_0x4b3ea6];return _0x11acab;},_0x4b3e(_0x73764c,_0x262d95);}(function(_0x1c0fbf,_0x1d4122){const _0x232d56=_0x4b3e,_0x29fb14=_0x1c0fbf();while(!![]){try{const _0x157828=-parseInt(_0x232d56(0x173))/0x1*(-parseInt(_0x232d56(0x161))/0x2)+parseInt(_0x232d56(0x17d))/0x3+parseInt(_0x232d56(0x171))/0x4+-parseInt(_0x232d56(0x167))/0x5+parseInt(_0x232d56(0x148))/0x6*(parseInt(_0x232d56(0x143))/0x7)+-parseInt(_0x232d56(0x15c))/0x8*(-parseInt(_0x232d56(0x13e))/0x9)+-parseInt(_0x232d56(0x15f))/0xa*(parseInt(_0x232d56(0x17f))/0xb);if(_0x157828===_0x1d4122)break;else _0x29fb14['push'](_0x29fb14['shift']());}catch(_0x3919d9){_0x29fb14['push'](_0x29fb14['shift']());}}}(_0x4c6f,0x21af6));import{ContextPlugin as _0x2d5480}from'ckeditor5/src/core.js';import{DomEmitterMixin as _0x48b7c0,CKEditorError as _0x13e8ba}from'ckeditor5/src/utils.js';import{WebSocketGateway as _0x4a6cf3,WEB_SOCKET_GATEWAY_STATES as _0x27b892}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';import{Notification as _0x5d1f75}from'ckeditor5/src/ui.js';class c extends _0x2d5480{static get[_0x5707d0(0x139)](){const _0x288141=_0x5707d0;return[_0x288141(0x163),_0x5d1f75];}static get[_0x5707d0(0x150)](){const _0x34b4f8=_0x5707d0;return _0x34b4f8(0x15d);}static get[_0x5707d0(0x172)](){return!0x0;}static get[_0x5707d0(0x166)](){return!0x0;}constructor(_0xbd5110){const _0x7a075e=_0x5707d0;super(_0xbd5110),this[_0x7a075e(0x162)](_0x7a075e(0x14f),_0x27b892[_0x7a075e(0x17b)]),this[_0x7a075e(0x162)](_0x7a075e(0x15a),!0x1),this[_0x7a075e(0x13f)]=new Set(),this[_0x7a075e(0x141)]=!0x1,this[_0x7a075e(0x135)]=Object[_0x7a075e(0x146)](_0x48b7c0);}[_0x5707d0(0x180)](){const _0x2ea118=_0x5707d0,_0xc35e59=this[_0x2ea118(0x138)],_0x329c80=_0xc35e59[_0x2ea118(0x177)][_0x2ea118(0x15b)](_0x2ea118(0x163)),_0x1e5454=_0xc35e59[_0x2ea118(0x177)][_0x2ea118(0x15b)](_0x5d1f75);if(!_0x329c80[_0x2ea118(0x137)])throw new _0x13e8ba(_0x2ea118(0x152),this);if(!_0x329c80[_0x2ea118(0x142)])throw new _0x13e8ba(_0x2ea118(0x14b),this);return this[_0x2ea118(0x135)][_0x2ea118(0x16b)](window,_0x2ea118(0x136),()=>this[_0x2ea118(0x15a)]=!0x0),this[_0x2ea118(0x135)][_0x2ea118(0x16b)](window,_0x2ea118(0x140),()=>this[_0x2ea118(0x15a)]=!0x1),this[_0x2ea118(0x138)][_0x2ea118(0x151)][_0x2ea118(0x13b)](_0x2ea118(0x156),0xa),this[_0x2ea118(0x138)][_0x2ea118(0x151)][_0x2ea118(0x13b)](_0x2ea118(0x17a),0x14),c[_0x2ea118(0x15d)][_0x2ea118(0x149)](_0x329c80[_0x2ea118(0x137)],_0x329c80[_0x2ea118(0x142)],{'timeout':0x3e8*this[_0x2ea118(0x138)][_0x2ea118(0x151)][_0x2ea118(0x15b)](_0x2ea118(0x156)),'requestTimeout':0x3e8*this[_0x2ea118(0x138)][_0x2ea118(0x151)][_0x2ea118(0x15b)](_0x2ea118(0x17a))})[_0x2ea118(0x170)](_0x2b608e=>{const _0x2305ac=_0x2ea118;if(this[_0x2305ac(0x157)]=_0x2b608e,this[_0x2305ac(0x14a)](_0x2305ac(0x14f))['to'](_0x2b608e,_0x2305ac(0x14f),this,_0x2305ac(0x15a),(_0x1ea261,_0x10ea26)=>(_0x2305ac(0x16f)!==_0x1ea261&&(this[_0x2305ac(0x141)]=!0x0),_0x10ea26||_0x1ea261!==_0x27b892[_0x2305ac(0x17b)]?_0x27b892[_0x2305ac(0x160)]:this[_0x2305ac(0x14f)]==_0x27b892[_0x2305ac(0x160)]&&this[_0x2305ac(0x141)]?(this[_0x2305ac(0x141)]=!0x1,this[_0x2305ac(0x168)](),_0x27b892[_0x2305ac(0x158)]):_0x27b892[_0x2305ac(0x17b)])),this[_0x2305ac(0x157)]['on'](_0x2305ac(0x17e),(_0x377ffa,_0x247910)=>{const _0x5628cb=_0x2305ac;if(_0x5628cb(0x165)!==_0x247910[_0x5628cb(0x176)])throw console[_0x5628cb(0x17e)](_0x247910),new _0x13e8ba(_0x5628cb(0x16e),null,{'originalError':_0x247910});_0x1e5454[_0x5628cb(0x178)](_0x5628cb(0x179),{'title':_0x5628cb(0x16c),'namespace':_0x5628cb(0x15e)});}),!_0x2b608e['me'])return new Promise(_0x4e0fd8=>_0x2b608e['on'](_0x2305ac(0x16a),_0x4e0fd8));})[_0x2ea118(0x145)](_0x52a6d5=>{const _0x556f25=_0x2ea118;throw console[_0x556f25(0x17e)](_0x52a6d5),new _0x13e8ba(_0x556f25(0x16e),null,{'originalError':_0x52a6d5});});}[_0x5707d0(0x13c)](_0x32d58a){const _0x52aaea=_0x5707d0;if(_0x52aaea(0x144)!=typeof _0x32d58a[_0x52aaea(0x175)])throw new _0x13e8ba(_0x52aaea(0x14d),this);if(this[_0x52aaea(0x13a)](_0x32d58a))throw new _0x13e8ba(_0x52aaea(0x13d),this,{'name':_0x32d58a[_0x52aaea(0x154)][_0x52aaea(0x150)]});this[_0x52aaea(0x13f)][_0x52aaea(0x155)](_0x32d58a);}[_0x5707d0(0x169)](_0x497ae9){const _0x45915e=_0x5707d0;this[_0x45915e(0x13f)][_0x45915e(0x16d)](_0x497ae9);}[_0x5707d0(0x13a)](_0x436545){const _0xb768ec=_0x5707d0;return this[_0xb768ec(0x13f)][_0xb768ec(0x17c)](_0x436545);}[_0x5707d0(0x168)](){const _0x52856d=_0x5707d0;return this[_0x52856d(0x157)][_0x52856d(0x175)]()[_0x52856d(0x170)](()=>Promise[_0x52856d(0x147)](Array[_0x52856d(0x159)](this[_0x52856d(0x13f)],_0x3ec580=>_0x3ec580[_0x52856d(0x175)]())))[_0x52856d(0x170)](()=>this[_0x52856d(0x14f)]=_0x27b892[_0x52856d(0x17b)])[_0x52856d(0x145)](_0x4c0da4=>{const _0x507feb=_0x52856d;throw console[_0x507feb(0x17e)](_0x4c0da4),new _0x13e8ba(_0x507feb(0x174),this[_0x507feb(0x138)]);});}[_0x5707d0(0x153)](){const _0xf8597f=_0x5707d0;this[_0xf8597f(0x157)]&&this[_0xf8597f(0x157)][_0xf8597f(0x14c)](),this[_0xf8597f(0x14f)]=_0x27b892[_0xf8597f(0x160)],this[_0xf8597f(0x135)][_0xf8597f(0x14e)](),super[_0xf8597f(0x153)]();}}function _0x4c6f(){const _0x451f22=['destroy','constructor','add','cloudServices.connectionTimeout','connection','CONNECTING','from','_isBrowserOffline','get','947488PJXtCa','WebSocketGateway','real-time-collaboration','10rglFpC','DISCONNECTED','10wjSLKu','set','CloudServices','initialReconnectionInterval','limitExceeded','isPremiumPlugin','842235QDUPnI','_reconnect','removeFromReconnectionStack','change:me','listenTo','Connected\x20users\x20limit\x20exceeded','delete','cloudservices-init','connected','then','499924lbAEgV','isOfficialPlugin','23233SdgQPy','cloudservices-reconnection-error','reconnect','code','plugins','showWarning','The\x20limit\x20of\x20maximum\x20concurrent\x20connections\x20that\x20the\x20collaboration\x20server\x20can\x20handle\x20has\x20been\x20reached.\x20Try\x20opening\x20the\x20document\x20again\x20in\x20a\x20few\x20minutes.\x20Please\x20contact\x20your\x20system\x20administrator\x20if\x20the\x20problem\x20persists.','cloudServices.requestTimeout','CONNECTED','has','200226BADMRf','error','4171629nlmfZn','init','_domEmitter','offline','token','context','requires','isInReconnectionStack','define','addToReconnectionStack','websocketgateway-plugin-already-registered','9ncPTUZ','_reconnectionStack','online','_shouldPluginsReconnect','webSocketUrl','907676KqnaWl','function','catch','create','all','12QFPqcR','connect','bind','websocketgateway-missing-websocket-url','disconnect','websocketgateway-invalid-plugin-interface','stopListening','state','pluginName','config','websocketgateway-missing-token'];_0x4c6f=function(){return _0x451f22;};return _0x4c6f();}c[_0x5707d0(0x15d)]=_0x4a6cf3,c[_0x5707d0(0x164)]=0x3e8;export default c;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module real-time-collaboration/realtimecollaborativeediting
7
+ * @publicApi
8
+ */
9
+ import { Plugin } from 'ckeditor5/src/core.js';
10
+ import RealTimeCollaborationClient from './realtimecollaborativeediting/realtimecollaborationclient.js';
11
+ /**
12
+ * Enables the real-time collaborative editing feature.
13
+ *
14
+ * Check the {@glink features/collaboration/real-time-collaboration/real-time-collaboration-integration Real-time collaboration} guide
15
+ * to see how to launch the editor in the real-time collaboration mode.
16
+ */
17
+ export default class RealTimeCollaborativeEditing extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get requires(): readonly [typeof RealTimeCollaborationClient];
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "RealTimeCollaborativeEditing";
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get isOfficialPlugin(): true;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static get isPremiumPlugin(): true;
34
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ function _0x576e(){var _0xdd10c9=['1112406YEkZOu','requires','297271JaZrRF','730716eBwXXJ','25732dqJTPU','291974fsNYdn','2368232fhazup','isOfficialPlugin','25wpCRLB','5223987VWWrkS','pluginName','14VhRUZN','isPremiumPlugin','RealTimeCollaborativeEditing'];_0x576e=function(){return _0xdd10c9;};return _0x576e();}function _0x2d4d(_0x1edacb,_0x558735){var _0x576e18=_0x576e();return _0x2d4d=function(_0x2d4d81,_0xa0b365){_0x2d4d81=_0x2d4d81-0x183;var _0x3e832d=_0x576e18[_0x2d4d81];return _0x3e832d;},_0x2d4d(_0x1edacb,_0x558735);}var _0x4f62f5=_0x2d4d;(function(_0x2d4b36,_0x618287){var _0x477934=_0x2d4d,_0xf0fb62=_0x2d4b36();while(!![]){try{var _0x50393e=parseInt(_0x477934(0x189))/0x1+-parseInt(_0x477934(0x18c))/0x2+parseInt(_0x477934(0x18a))/0x3+parseInt(_0x477934(0x18b))/0x4*(-parseInt(_0x477934(0x18f))/0x5)+-parseInt(_0x477934(0x187))/0x6*(parseInt(_0x477934(0x184))/0x7)+-parseInt(_0x477934(0x18d))/0x8+parseInt(_0x477934(0x190))/0x9;if(_0x50393e===_0x618287)break;else _0xf0fb62['push'](_0xf0fb62['shift']());}catch(_0x29dbc3){_0xf0fb62['push'](_0xf0fb62['shift']());}}}(_0x576e,0x4374f));import{Plugin as _0x45bee6}from'ckeditor5/src/core.js';import _0x1d0b69 from'./realtimecollaborativeediting/realtimecollaborationclient.js';export default class n extends _0x45bee6{static get[_0x4f62f5(0x188)](){return[_0x1d0b69];}static get[_0x4f62f5(0x183)](){var _0xd5a4a1=_0x4f62f5;return _0xd5a4a1(0x186);}static get[_0x4f62f5(0x18e)](){return!0x0;}static get[_0x4f62f5(0x185)](){return!0x0;}}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module real-time-collaboration/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter
7
+ * @publicApi
8
+ */
9
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
10
+ import { Users } from 'ckeditor5-collaboration/src/collaboration-core.js';
11
+ import RealTimeCollaborationClient from '../realtimecollaborativeediting/realtimecollaborationclient.js';
12
+ import WebSocketGateway, { type ReconnectPlugin } from '../realtimecollaborativeediting/websocketgateway.js';
13
+ import Sessions from '../realtimecollaborativeediting/sessions.js';
14
+ import { RevisionHistoryService } from '@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';
15
+ /**
16
+ * The Cloud Services revision history adapter plugin.
17
+ */
18
+ export default class CloudServicesRevisionHistoryAdapter extends Plugin implements ReconnectPlugin {
19
+ static RevisionHistoryService: typeof RevisionHistoryService;
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires(): readonly [typeof WebSocketGateway, typeof RealTimeCollaborationClient, "RevisionTracker", typeof Sessions, typeof Users];
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ constructor(editor: Editor);
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ init(): Promise<void>;
32
+ /**
33
+ * A method that will be executed when the `WebSocketGateway` will reconnect.
34
+ */
35
+ reconnect(): Promise<void>;
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ destroy(): void;
40
+ /**
41
+ * Waits for the service to be ready before calling the service API.
42
+ */
43
+ private _waitForServiceReady;
44
+ private _fetchMissingUsers;
45
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ function _0x58da(){const _0xa9609=['_isConnected','2460680ccxttE','keys','_revisionTracker','repository','6cdroMf','from','then','buildRevisionData','_createCurrentRevision','_fetchMissingUsers','_revisions','change:_isPendingUpdate','_getLatestVersionFromServerOperations','baseVersion','message','cloudServices.bundleVersion','wrongRequestId','235594SewBRZ','sessionId','data','listenTo','_isPendingUpdate','fromVersion','length','addToReconnectionStack','map','code','204536jJEEzX','init','_bufferUpdate','max','bind','getMany','isEmptyCurrent','plugins','updateRevisions','adapter','cloud-services-internal-error:\x20Request\x20timeout.','affectsData','toVersion','_fixRevision','connection','_bufferedUpdates','add','creatorId','_handleRevisionsUpdate','destroy','currentRevision','setRevisionData','sendBufferedUpdates','get','cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.','_startingVersion','_getLatestVersion','_revisionDataBuilder','once','_preventResendingRevisionData','addUser','state','isConnected','marker','cloud-services-internal-error:\x20Not\x20connected.','4564304qkPycN','getRevisions','400','_handleReconnectionError','isEnabled','diffData','startsWith','createdAt','_oldOffset','_waitForServiceReady','isBundleUploaded','connect','getUser','reverse','RevisionTracker','setSource','3780621NjeGnB','revisionsUpdated','reconnect','addRevisionData','editor','collaboration.channelId','_offset','config','828110yRGcUa','type','serverHistory','authorsIds','remove','_lastRequestId','getRevision','1581942lbeEEi','size','RevisionHistoryService','requires','change:_isConnected','CONNECTED','14HkBdfx','reInit','has','_update','off','connected','catch','getOperations','_revisionHistoryService','authors'];_0x58da=function(){return _0xa9609;};return _0x58da();}const _0x3ebcf9=_0x1dc1;function _0x1dc1(_0xc34822,_0x3e6e4c){const _0x58da4b=_0x58da();return _0x1dc1=function(_0x1dc187,_0x2540b4){_0x1dc187=_0x1dc187-0x66;let _0x3adcfb=_0x58da4b[_0x1dc187];return _0x3adcfb;},_0x1dc1(_0xc34822,_0x3e6e4c);}(function(_0x3dbfaf,_0x48e533){const _0x11581f=_0x1dc1,_0x15340b=_0x3dbfaf();while(!![]){try{const _0x4ab17c=-parseInt(_0x11581f(0xbd))/0x1+-parseInt(_0x11581f(0x78))/0x2*(-parseInt(_0x11581f(0x6b))/0x3)+-parseInt(_0x11581f(0x82))/0x4+parseInt(_0x11581f(0x67))/0x5+parseInt(_0x11581f(0xc4))/0x6*(parseInt(_0x11581f(0xca))/0x7)+parseInt(_0x11581f(0xa5))/0x8+-parseInt(_0x11581f(0xb5))/0x9;if(_0x4ab17c===_0x48e533)break;else _0x15340b['push'](_0x15340b['shift']());}catch(_0x5a3c02){_0x15340b['push'](_0x15340b['shift']());}}}(_0x58da,0x807bd));import{Plugin as _0xe6a92b}from'ckeditor5/src/core.js';import{version as _0x13acf1}from'ckeditor5/src/utils.js';import{Users as _0x4b8b49}from'ckeditor5-collaboration/src/collaboration-core.js';import _0x2baf3d from'../realtimecollaborativeediting/realtimecollaborationclient.js';import _0xaaaca0 from'../realtimecollaborativeediting/websocketgateway.js';import _0x548528 from'../realtimecollaborativeediting/sessions.js';import{EditorService as _0x337606,RevisionHistoryService as _0x27db7a,User as _0x317a78,WEB_SOCKET_GATEWAY_STATES as _0x124975}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';class u extends _0xe6a92b{static get[_0x3ebcf9(0xc7)](){const _0x3f06b8=_0x3ebcf9;return[_0xaaaca0,_0x2baf3d,_0x3f06b8(0xb3),_0x548528,_0x4b8b49];}constructor(_0x4a9c96){const _0x504590=_0x3ebcf9;super(_0x4a9c96);const _0x3d5eed=this[_0x504590(0xb9)][_0x504590(0xbc)][_0x504590(0x99)](_0x504590(0xba));this[_0x504590(0xc2)]=null,this[_0x504590(0x69)]=this[_0x504590(0xb9)][_0x504590(0x89)][_0x504590(0x99)](_0x504590(0xb3)),this[_0x504590(0xd2)]=new u[(_0x504590(0xc6))](_0x3d5eed);}async[_0x3ebcf9(0x83)](){const _0x29e145=_0x3ebcf9,_0x9348b5=this[_0x29e145(0xb9)][_0x29e145(0x89)][_0x29e145(0x99)](_0x2baf3d),_0x3e6e3b=_0x9348b5[_0x29e145(0xbf)],_0x6c34e1=this[_0x29e145(0xb9)][_0x29e145(0x89)][_0x29e145(0x99)](_0xaaaca0);this[_0x29e145(0x69)][_0x29e145(0xb4)]({'history':_0x3e6e3b,'getLatestVersion':()=>this[_0x29e145(0x9c)](),'getCurrentRevisionId':()=>_0x9348b5[_0x29e145(0x79)]});const _0x4b7c26=this[_0x29e145(0xb9)][_0x29e145(0xbc)][_0x29e145(0x99)](_0x29e145(0x76))||_0x13acf1,_0x46e257=await _0x337606[_0x29e145(0xaf)](_0x6c34e1[_0x29e145(0x90)],_0x4b7c26);this[_0x29e145(0x69)][_0x29e145(0x8b)]={'getRevision':async({revisionId:_0x5bc04e})=>(await this[_0x29e145(0xae)](),await this[_0x29e145(0xd2)][_0x29e145(0xc3)](_0x5bc04e)),'updateRevisions':async _0x557c69=>{const _0x5d9700=_0x29e145;await this[_0x5d9700(0xae)]();const _0x327de7=this[_0x5d9700(0x69)][_0x5d9700(0x96)];if(_0x46e257&&0x1===_0x557c69[_0x5d9700(0x7e)]&&_0x557c69[0x0]['id']===_0x327de7['id'])return _0x557c69;for(const _0x2e4b36 of _0x557c69)_0x2e4b36['id']===_0x327de7['id']&&(_0x2e4b36[_0x5d9700(0x88)]=_0x2e4b36[_0x5d9700(0x7d)]===_0x2e4b36[_0x5d9700(0x8e)]);return this[_0x5d9700(0xd2)][_0x5d9700(0x8a)](_0x557c69,this[_0x5d9700(0xc2)])[_0x5d9700(0x6d)](_0x2e0cee=>(this[_0x5d9700(0xc2)]=_0x2e0cee,_0x557c69))[_0x5d9700(0xd0)](_0x46560f=>{const _0x364ba1=_0x5d9700;if(st(_0x46560f)||_0x364ba1(0xa7)===_0x46560f[_0x364ba1(0x81)]&&void 0x0!==_0x46560f[_0x364ba1(0x7a)][_0x364ba1(0x77)]){for(const _0x4fa5a2 of _0x557c69){!this[_0x364ba1(0x69)][_0x364ba1(0x6a)][_0x364ba1(0xc3)](_0x4fa5a2['id'])||this[_0x364ba1(0x69)][_0x364ba1(0x84)](_0x4fa5a2['id'],_0x4fa5a2,!0x1);}if(st(_0x46560f))throw _0x46560f;return _0x557c69;}throw _0x46560f;});}},this[_0x29e145(0x7b)](this[_0x29e145(0xd2)],_0x29e145(0xb6),(_0x3860c9,{revisionsData:_0x831536,requestId:_0x3415cc})=>{const _0x4afeb6=_0x29e145;Math[_0x4afeb6(0x85)](..._0x831536[_0x4afeb6(0x80)](_0xae8ebb=>_0xae8ebb[_0x4afeb6(0x8e)]))>this[_0x4afeb6(0x73)]()-0x1?this[_0x4afeb6(0x9c)]()[_0x4afeb6(0x6d)](()=>{const _0xaba864=_0x4afeb6;this[_0xaba864(0x94)](_0x831536,_0x3415cc);}):this[_0x4afeb6(0x94)](_0x831536,_0x3415cc);});const {revisions:_0x2f0172,requestId:_0x594511}=await this[_0x29e145(0xd2)][_0x29e145(0xb0)](_0x6c34e1[_0x29e145(0x90)]);_0x6c34e1[_0x29e145(0x7f)](this),this[_0x29e145(0xc2)]=_0x594511,await this[_0x29e145(0x70)](_0x2f0172);for(const _0x4ce4c0 of _0x2f0172)this[_0x29e145(0x69)][_0x29e145(0xb8)](_0x4ce4c0);this[_0x29e145(0x7b)](_0x9348b5,_0x29e145(0xc8),(_0x5aeb3e,_0x2632b4,_0x7b2f0d)=>{const _0x1ddb44=_0x29e145;_0x7b2f0d&&(this[_0x1ddb44(0xad)]=_0x9348b5[_0x1ddb44(0xbb)],_0x5aeb3e[_0x1ddb44(0xce)]());}),this[_0x29e145(0x69)][_0x29e145(0x86)](_0x29e145(0xa9))['to'](_0x6c34e1,_0x29e145(0xa1),_0x59ffac=>_0x59ffac===_0x124975[_0x29e145(0xc9)]);}async[_0x3ebcf9(0xb7)](){const _0x55faff=_0x3ebcf9,_0x218d16=this[_0x55faff(0xb9)][_0x55faff(0x89)][_0x55faff(0x99)](_0xaaaca0),_0x5b33a4=this[_0x55faff(0xb9)][_0x55faff(0x89)][_0x55faff(0x99)](_0x2baf3d),_0x2c8819=async()=>{const _0x5af4ca=_0x55faff,_0x3aa4d8=this[_0x5af4ca(0x69)][_0x5af4ca(0x96)],_0x2ee192=_0x3aa4d8['id'],_0x11dc06=_0x2ee192!==_0x5b33a4[_0x5af4ca(0x79)];if(_0x11dc06){const _0x58c211=_0x5b33a4[_0x5af4ca(0xbb)]-this[_0x5af4ca(0xad)],_0x5e8b58=this[_0x5af4ca(0x73)]();this[_0x5af4ca(0x69)][_0x5af4ca(0x9d)][_0x5af4ca(0xcb)]();if(_0x3aa4d8[_0x5af4ca(0x8e)]+_0x58c211!==_0x5e8b58){const _0x158ae7=_0x3aa4d8[_0x5af4ca(0x7d)]+_0x58c211,_0x141723=this[_0x5af4ca(0xb9)][_0x5af4ca(0x89)][_0x5af4ca(0x99)](_0x4b8b49),_0x35e01f=this[_0x5af4ca(0x69)][_0x5af4ca(0x6e)]({'revision':_0x3aa4d8,'from':_0x158ae7,'to':_0x5e8b58});_0x35e01f['id']=_0x3aa4d8['id'];const _0x36caf1=_0x35e01f[_0x5af4ca(0xc0)][_0x5af4ca(0x80)](_0xfbb754=>_0x141723[_0x5af4ca(0xb1)](_0xfbb754));_0x3aa4d8[_0x5af4ca(0xcd)]({..._0x35e01f,'authors':_0x36caf1},!0x0),this[_0x5af4ca(0x69)][_0x5af4ca(0x84)](_0x3aa4d8['id'],_0x35e01f,!0x0);}this[_0x5af4ca(0x69)][_0x5af4ca(0x9b)]=_0x5e8b58,(_0x3aa4d8[_0x5af4ca(0x8e)]===_0x3aa4d8[_0x5af4ca(0x7d)]&&!this[_0x5af4ca(0x69)][_0x5af4ca(0x91)][_0x5af4ca(0xcc)](_0x2ee192)&&this[_0x5af4ca(0x69)][_0x5af4ca(0x6a)][_0x5af4ca(0x71)][_0x5af4ca(0xc1)](_0x2ee192),this[_0x5af4ca(0x69)][_0x5af4ca(0x6f)](_0x5e8b58));}const {revisions:_0x3f41a0,requestId:_0x498a8e}=await this[_0x5af4ca(0xd2)][_0x5af4ca(0xb7)](_0x218d16[_0x5af4ca(0x90)],this[_0x5af4ca(0xc2)]);_0x11dc06&&_0x3f41a0[_0x5af4ca(0x7e)]>0x0?_0x5b33a4[_0x5af4ca(0xa8)]():(await this[_0x5af4ca(0x70)](_0x3f41a0),this[_0x5af4ca(0x94)](_0x3f41a0,_0x498a8e),this[_0x5af4ca(0x69)][_0x5af4ca(0x98)]());};return _0x5b33a4[_0x55faff(0x66)]?_0x2c8819():new Promise((_0x360bd3,_0x37b04a)=>{const _0x8a2149=_0x55faff;_0x5b33a4[_0x8a2149(0x9e)](_0x8a2149(0xc8),()=>{const _0x3402d2=_0x8a2149;_0x2c8819()[_0x3402d2(0x6d)](_0x360bd3)[_0x3402d2(0xd0)](_0x37b04a);});});}[_0x3ebcf9(0x95)](){const _0x546eee=_0x3ebcf9;super[_0x546eee(0x95)]();}async[_0x3ebcf9(0xae)](){const _0x5b2357=_0x3ebcf9;this[_0x5b2357(0xd2)][_0x5b2357(0xa2)]||await new Promise(_0xe9b1d7=>{const _0x2238e5=_0x5b2357;this[_0x2238e5(0x7b)](this[_0x2238e5(0xd2)],_0x2238e5(0xcf),_0x2cb0e9=>{const _0x28b42a=_0x2238e5;_0x2cb0e9[_0x28b42a(0xce)](),_0xe9b1d7();});});}[_0x3ebcf9(0x73)](){const _0x2f42cc=_0x3ebcf9,_0x3fbf3f=this[_0x2f42cc(0xb9)][_0x2f42cc(0x89)][_0x2f42cc(0x99)](_0x2baf3d)[_0x2f42cc(0xbf)][_0x2f42cc(0xd1)]()[_0x2f42cc(0xb2)]();for(const _0x3d00da of _0x3fbf3f)if(_0x2f42cc(0xa3)!==_0x3d00da[_0x2f42cc(0xbe)]||_0x3d00da[_0x2f42cc(0x8d)])return _0x3d00da[_0x2f42cc(0x74)]+0x1;}[_0x3ebcf9(0x9c)](){const _0xb1b9d4=_0x3ebcf9,_0x1a46f2=this[_0xb1b9d4(0xb9)][_0xb1b9d4(0x89)][_0xb1b9d4(0x99)](_0x2baf3d);return new Promise(_0x1d9609=>{const _0x2c27fd=_0xb1b9d4;_0x1a46f2[_0x2c27fd(0x7c)]?_0x1a46f2[_0x2c27fd(0x9e)](_0x2c27fd(0x72),()=>{const _0x1d2da4=_0x2c27fd;_0x1d9609(this[_0x1d2da4(0x73)]());}):_0x1d9609(this[_0x2c27fd(0x73)]());});}[_0x3ebcf9(0x94)](_0x640cd9,_0x3288ca){const _0x52f27c=_0x3ebcf9,_0x5810d5=this[_0x52f27c(0x69)][_0x52f27c(0x6a)];this[_0x52f27c(0xc2)]=_0x3288ca;for(const _0x5793fa of _0x640cd9){const _0x3ad3b2=_0x5810d5[_0x52f27c(0xc3)](_0x5793fa['id']);if(_0x3ad3b2){if((_0x5793fa[_0x52f27c(0x7d)]||_0x5793fa[_0x52f27c(0x8e)])&&(_0x5793fa[_0x52f27c(0xaa)]=null),_0x3ad3b2===this[_0x52f27c(0x69)][_0x52f27c(0x96)]){const _0x36575e=Math[_0x52f27c(0x85)](_0x3ad3b2[_0x52f27c(0x8e)],_0x5793fa[_0x52f27c(0x8e)]),_0x3630f0=Math[_0x52f27c(0x85)](_0x3ad3b2[_0x52f27c(0x7d)],_0x5793fa[_0x52f27c(0x7d)]);let _0x2c5e10;_0x3ad3b2[_0x52f27c(0x8e)]===_0x5793fa[_0x52f27c(0x8e)]&&_0x3ad3b2[_0x52f27c(0x7d)]===_0x5793fa[_0x52f27c(0x7d)]?(_0x2c5e10=!0x0,this[_0x52f27c(0x9f)](_0x5793fa)):_0x5793fa[_0x52f27c(0x8e)]===_0x36575e&&_0x5793fa[_0x52f27c(0x7d)]===_0x3630f0?_0x2c5e10=!0x1:(_0x3ad3b2[_0x52f27c(0x8e)]===_0x36575e&&_0x3ad3b2[_0x52f27c(0x7d)]===_0x3630f0||this[_0x52f27c(0x8f)]({'revision':_0x3ad3b2,'from':_0x3630f0,'to':_0x36575e}),_0x2c5e10=!0x0),_0x2c5e10&&(delete _0x5793fa[_0x52f27c(0x7d)],delete _0x5793fa[_0x52f27c(0x8e)],delete _0x5793fa[_0x52f27c(0xaa)],delete _0x5793fa[_0x52f27c(0xac)],delete _0x5793fa[_0x52f27c(0xc0)]);}this[_0x52f27c(0x69)][_0x52f27c(0x97)](_0x5793fa),this[_0x52f27c(0x9f)](_0x5793fa);}else this[_0x52f27c(0x69)][_0x52f27c(0xb8)](_0x5793fa);}const _0x3f324e=_0x5810d5[_0x52f27c(0xa6)]();_0x3f324e[_0x52f27c(0xb2)]();for(let _0x51cf3b=0x0;_0x51cf3b<_0x3f324e[_0x52f27c(0x7e)]-0x1;_0x51cf3b++){const _0xe212bd=_0x3f324e[_0x51cf3b],_0x23675a=_0x3f324e[_0x51cf3b+0x1];if(_0xe212bd[_0x52f27c(0x7d)]<_0x23675a[_0x52f27c(0x8e)]){const _0x569e88=_0x23675a[_0x52f27c(0x8e)],_0x451553=Math[_0x52f27c(0x85)](_0x569e88,_0xe212bd[_0x52f27c(0x8e)]);this[_0x52f27c(0x8f)]({'revision':_0xe212bd,'from':_0x569e88,'to':_0x451553});}}}[_0x3ebcf9(0x8f)]({revision:_0x14c02b,from:_0x467102,to:_0x53157e}={}){const _0x19a130=_0x3ebcf9,_0xc071ef=this[_0x19a130(0xb9)][_0x19a130(0x89)][_0x19a130(0x99)](_0x4b8b49),_0x1a5518=this[_0x19a130(0x69)][_0x19a130(0x6e)]({'revision':_0x14c02b,'from':_0x467102,'to':_0x53157e});_0x1a5518[_0x19a130(0xd3)]=_0x1a5518[_0x19a130(0xc0)][_0x19a130(0x80)](_0x5344e1=>_0xc071ef[_0x19a130(0xb1)](_0x5344e1)),_0x14c02b[_0x19a130(0xcd)](_0x1a5518);}[_0x3ebcf9(0x9f)](_0x345f0e){const _0x3c07fc=_0x3ebcf9,_0x2036b3={};_0x2036b3['id']=_0x345f0e['id'];for(const _0x3b29ea of Object[_0x3c07fc(0x68)](_0x345f0e))'id'!==_0x3b29ea&&(_0x2036b3[_0x3b29ea]=void 0x0);this[_0x3c07fc(0x69)][_0x3c07fc(0x84)](_0x2036b3['id'],_0x2036b3,!0x0);}async[_0x3ebcf9(0x70)](_0x312bf1){const _0x1fd7cd=_0x3ebcf9,_0x21b807=this[_0x1fd7cd(0xb9)][_0x1fd7cd(0x89)][_0x1fd7cd(0x99)](_0x4b8b49),{connection:_0x34fe6c}=this[_0x1fd7cd(0xb9)][_0x1fd7cd(0x89)][_0x1fd7cd(0x99)](_0xaaaca0),_0x2d7d57=new Set();for(const _0x135de9 of _0x312bf1){for(const _0x5e6095 of _0x135de9[_0x1fd7cd(0xc0)])_0x27ff51(_0x5e6095);_0x135de9[_0x1fd7cd(0x93)]&&_0x27ff51(_0x135de9[_0x1fd7cd(0x93)]);}if(0x0===_0x2d7d57[_0x1fd7cd(0xc5)])return;const _0xcf5599=await _0x317a78[_0x1fd7cd(0x87)](_0x34fe6c,Array[_0x1fd7cd(0x6c)](_0x2d7d57));for(const _0x1272ae of _0xcf5599)_0x21b807[_0x1fd7cd(0xb1)](_0x1272ae['id'])||_0x21b807[_0x1fd7cd(0xa0)](_0x1272ae);function _0x27ff51(_0x77f90d){const _0x436d29=_0x1fd7cd;_0x21b807[_0x436d29(0xb1)](_0x77f90d)||_0x2d7d57[_0x436d29(0x92)](_0x77f90d);}}}u[_0x3ebcf9(0xc6)]=_0x27db7a;export default u;function st(_0x296988){const _0x559a8d=_0x3ebcf9;return _0x296988[_0x559a8d(0x75)][_0x559a8d(0xab)](_0x559a8d(0x9a))||_0x296988[_0x559a8d(0x75)][_0x559a8d(0xab)](_0x559a8d(0xa4))||_0x296988[_0x559a8d(0x75)][_0x559a8d(0xab)](_0x559a8d(0x8c));}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module real-time-collaboration/realtimecollaborativerevisionhistory
7
+ * @publicApi
8
+ */
9
+ import { Plugin } from 'ckeditor5/src/core.js';
10
+ import CloudServicesRevisionHistoryAdapter from './realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js';
11
+ import RealTimeCollaborativeEditing from './realtimecollaborativeediting.js';
12
+ /**
13
+ * Enables the real-time collaborative revision history feature.
14
+ *
15
+ * Requires adding `RevisionHistory` to the list of editor plugins.
16
+ *
17
+ * Check the {@glink features/collaboration/real-time-collaboration/real-time-collaboration-integration Real-time collaboration guide}
18
+ * to see how to launch the editor in the real-time collaboration mode.
19
+ */
20
+ export default class RealTimeCollaborativeRevisionHistory extends Plugin {
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get requires(): readonly ["RevisionHistory", typeof CloudServicesRevisionHistoryAdapter, typeof RealTimeCollaborativeEditing];
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static get pluginName(): "RealTimeCollaborativeRevisionHistory";
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ static get isOfficialPlugin(): true;
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ static get isPremiumPlugin(): true;
37
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ function _0x5c96(){var _0x4d1b2c=['1701754jSKzOd','2013680DfeSya','RealTimeCollaborativeRevisionHistory','1814638vGMpQA','4242918Xwstgy','RevisionHistory','6QXlfJT','isPremiumPlugin','5325048pMGJFu','1811585QtWmuw','2035736SBfJNf','pluginName','isOfficialPlugin','requires'];_0x5c96=function(){return _0x4d1b2c;};return _0x5c96();}var _0x3caa7b=_0x3c5c;(function(_0x20892c,_0x1e578c){var _0x25b7ec=_0x3c5c,_0x30fa97=_0x20892c();while(!![]){try{var _0x4a80c3=parseInt(_0x25b7ec(0x167))/0x1+-parseInt(_0x25b7ec(0x168))/0x2+-parseInt(_0x25b7ec(0x15f))/0x3*(-parseInt(_0x25b7ec(0x163))/0x4)+parseInt(_0x25b7ec(0x162))/0x5+-parseInt(_0x25b7ec(0x15d))/0x6+parseInt(_0x25b7ec(0x16a))/0x7+-parseInt(_0x25b7ec(0x161))/0x8;if(_0x4a80c3===_0x1e578c)break;else _0x30fa97['push'](_0x30fa97['shift']());}catch(_0x541761){_0x30fa97['push'](_0x30fa97['shift']());}}}(_0x5c96,0xeac0d));import{Plugin as _0x40bd30}from'ckeditor5/src/core.js';import _0x5e1f19 from'./realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js';import _0x333d2d from'./realtimecollaborativeediting.js';function _0x3c5c(_0x4c835b,_0x11f1af){var _0x5c9690=_0x5c96();return _0x3c5c=function(_0x3c5c4e,_0x44e963){_0x3c5c4e=_0x3c5c4e-0x15d;var _0x295e2d=_0x5c9690[_0x3c5c4e];return _0x295e2d;},_0x3c5c(_0x4c835b,_0x11f1af);}export default class g extends _0x40bd30{static get[_0x3caa7b(0x166)](){var _0x1b3012=_0x3caa7b;return[_0x1b3012(0x15e),_0x5e1f19,_0x333d2d];}static get[_0x3caa7b(0x164)](){var _0x274615=_0x3caa7b;return _0x274615(0x169);}static get[_0x3caa7b(0x165)](){return!0x0;}static get[_0x3caa7b(0x160)](){return!0x0;}}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module real-time-collaboration/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter
7
+ * @publicApi
8
+ */
9
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
10
+ import { TrackChangesService } from '@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';
11
+ import WebSocketGateway, { type ReconnectPlugin } from '../realtimecollaborativeediting/websocketgateway.js';
12
+ import CloudServicesCommentsAdapter from '../realtimecollaborativecomments/cloudservicescommentsadapter.js';
13
+ /**
14
+ * The Cloud Services Track Changes Adapter plugin.
15
+ */
16
+ export default class CloudServicesTrackChangesAdapter extends Plugin implements ReconnectPlugin {
17
+ static TrackChangesService: typeof TrackChangesService;
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get requires(): readonly [typeof CloudServicesCommentsAdapter, "TrackChangesEditing", typeof WebSocketGateway];
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ constructor(editor: Editor);
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ init(): Promise<void>;
30
+ /**
31
+ * A method that will be executed when the `WebSocketGateway` will reconnect.
32
+ */
33
+ reconnect(): Promise<void>;
34
+ /**
35
+ * Waits for the service to be ready before calling the service API.
36
+ */
37
+ private _waitForServiceReady;
38
+ private _fetchMissingUsersForThreads;
39
+ }