@yonus_amire01/chat 2.1.4 → 2.2.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 (59) hide show
  1. package/dist/chat.css +1 -1
  2. package/dist/index.cjs +11 -5
  3. package/dist/index.mjs +16389 -7305
  4. package/dist/types/app/components/ChatPage.vue.d.ts +1 -1
  5. package/dist/types/app/components/ChatPage.vue.d.ts.map +1 -1
  6. package/dist/types/app/components/call/Call.vue.d.ts +36 -0
  7. package/dist/types/app/components/call/Call.vue.d.ts.map +1 -0
  8. package/dist/types/app/components/chat/ChatBubble.vue.d.ts +8 -8
  9. package/dist/types/app/components/chat/ChatBubble.vue.d.ts.map +1 -1
  10. package/dist/types/app/components/chat/ChatInput.vue.d.ts.map +1 -1
  11. package/dist/types/app/components/chat/ChatPageBar.vue.d.ts.map +1 -1
  12. package/dist/types/app/components/chat/ChatProfileOverview.vue.d.ts.map +1 -1
  13. package/dist/types/app/components/chat/ChatView.vue.d.ts.map +1 -1
  14. package/dist/types/app/components/chat/chat-bubbles/BubbleOptions.vue.d.ts +8 -8
  15. package/dist/types/app/components/chat/chat-bubbles/BubbleVideo.vue.d.ts +1 -1
  16. package/dist/types/app/components/chat/chat-bubbles/BubbleVideo.vue.d.ts.map +1 -1
  17. package/dist/types/app/components/chat/chat-input/PermissionPopup.vue.d.ts.map +1 -1
  18. package/dist/types/app/components/chat/contact/ChatList.vue.d.ts.map +1 -1
  19. package/dist/types/app/components/global/BIcon.vue.d.ts.map +1 -1
  20. package/dist/types/app/components/global/BInput.vue.d.ts +3 -3
  21. package/dist/types/app/components/global/BInput.vue.d.ts.map +1 -1
  22. package/dist/types/app/components/global/BLabel.vue.d.ts +1 -1
  23. package/dist/types/app/components/global/BLabel.vue.d.ts.map +1 -1
  24. package/dist/types/app/components/global/BMenu.vue.d.ts +2 -2
  25. package/dist/types/app/components/global/BMenu.vue.d.ts.map +1 -1
  26. package/dist/types/app/components/global/BSelect.vue.d.ts +1 -1
  27. package/dist/types/app/components/global/BSelect.vue.d.ts.map +1 -1
  28. package/dist/types/app/composables/useAppPermissions.d.ts.map +1 -1
  29. package/dist/types/app/composables/useCall.d.ts +156 -0
  30. package/dist/types/app/composables/useCall.d.ts.map +1 -0
  31. package/dist/types/app/index.d.ts +3 -1
  32. package/dist/types/app/index.d.ts.map +1 -1
  33. package/dist/types/app/provider/callProvider.d.ts +4 -0
  34. package/dist/types/app/provider/callProvider.d.ts.map +1 -0
  35. package/dist/types/app/stores/callStore.d.ts +19 -857
  36. package/dist/types/app/stores/callStore.d.ts.map +1 -1
  37. package/dist/types/app/stores/chatStore.d.ts +49 -1
  38. package/dist/types/app/stores/chatStore.d.ts.map +1 -1
  39. package/dist/types/app/stores/profileStore.d.ts +59 -5
  40. package/dist/types/app/stores/profileStore.d.ts.map +1 -1
  41. package/dist/types/app/types/index.d.ts +105 -27
  42. package/dist/types/app/types/index.d.ts.map +1 -1
  43. package/dist/types/i18n/locales/index.d.ts +38 -0
  44. package/dist/types/i18n/locales/index.d.ts.map +1 -1
  45. package/package.json +4 -1
  46. package/dist/signature_pad-BvnS6ckP.cjs +0 -4
  47. package/dist/signature_pad-CSadMJ3H.js +0 -478
  48. package/dist/types/app/components/call/CallBoard.vue.d.ts +0 -33
  49. package/dist/types/app/components/call/CallBoard.vue.d.ts.map +0 -1
  50. package/dist/types/app/components/call/CallMemberDisplay.vue.d.ts +0 -16
  51. package/dist/types/app/components/call/CallMemberDisplay.vue.d.ts.map +0 -1
  52. package/dist/types/app/components/call/CallPageOverlay.vue.d.ts +0 -7
  53. package/dist/types/app/components/call/CallPageOverlay.vue.d.ts.map +0 -1
  54. package/dist/types/app/components/call/paint-board/BoardColorPicker.vue.d.ts +0 -24
  55. package/dist/types/app/components/call/paint-board/BoardColorPicker.vue.d.ts.map +0 -1
  56. package/dist/types/app/components/call/paint-board/BrushSizeSlider.vue.d.ts +0 -19
  57. package/dist/types/app/components/call/paint-board/BrushSizeSlider.vue.d.ts.map +0 -1
  58. package/dist/types/app/components/call/paint-board/CallPaintBoard.vue.d.ts +0 -47
  59. package/dist/types/app/components/call/paint-board/CallPaintBoard.vue.d.ts.map +0 -1
@@ -1,478 +0,0 @@
1
- var C = Object.defineProperty;
2
- var T = (r, s, t) => s in r ? C(r, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[s] = t;
3
- var d = (r, s, t) => T(r, typeof s != "symbol" ? s + "" : s, t);
4
- /*!
5
- * Signature Pad v5.1.3 | https://github.com/szimek/signature_pad
6
- * (c) 2025 Szymon Nowak | Released under the MIT license
7
- */
8
- var E = class {
9
- constructor(r, s, t, e) {
10
- d(this, "x");
11
- d(this, "y");
12
- d(this, "pressure");
13
- d(this, "time");
14
- if (isNaN(r) || isNaN(s))
15
- throw new Error(`Point is invalid: (${r}, ${s})`);
16
- this.x = +r, this.y = +s, this.pressure = t || 0, this.time = e || Date.now();
17
- }
18
- distanceTo(r) {
19
- return Math.sqrt(
20
- Math.pow(this.x - r.x, 2) + Math.pow(this.y - r.y, 2)
21
- );
22
- }
23
- equals(r) {
24
- return this.x === r.x && this.y === r.y && this.pressure === r.pressure && this.time === r.time;
25
- }
26
- velocityFrom(r) {
27
- return this.time !== r.time ? this.distanceTo(r) / (this.time - r.time) : 0;
28
- }
29
- }, M = class b {
30
- constructor(s, t, e, i, n, o) {
31
- this.startPoint = s, this.control2 = t, this.control1 = e, this.endPoint = i, this.startWidth = n, this.endWidth = o;
32
- }
33
- static fromPoints(s, t) {
34
- const e = this.calculateControlPoints(s[0], s[1], s[2]).c2, i = this.calculateControlPoints(s[1], s[2], s[3]).c1;
35
- return new b(s[1], e, i, s[2], t.start, t.end);
36
- }
37
- static calculateControlPoints(s, t, e) {
38
- const i = s.x - t.x, n = s.y - t.y, o = t.x - e.x, u = t.y - e.y, a = { x: (s.x + t.x) / 2, y: (s.y + t.y) / 2 }, l = { x: (t.x + e.x) / 2, y: (t.y + e.y) / 2 }, c = Math.sqrt(i * i + n * n), _ = Math.sqrt(o * o + u * u), m = a.x - l.x, x = a.y - l.y, v = c + _ == 0 ? 0 : _ / (c + _), g = { x: l.x + m * v, y: l.y + x * v }, h = t.x - g.x, w = t.y - g.y;
39
- return {
40
- c1: new E(a.x + h, a.y + w),
41
- c2: new E(l.x + h, l.y + w)
42
- };
43
- }
44
- // Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html.
45
- length() {
46
- let t = 0, e, i;
47
- for (let n = 0; n <= 10; n += 1) {
48
- const o = n / 10, u = this.point(
49
- o,
50
- this.startPoint.x,
51
- this.control1.x,
52
- this.control2.x,
53
- this.endPoint.x
54
- ), a = this.point(
55
- o,
56
- this.startPoint.y,
57
- this.control1.y,
58
- this.control2.y,
59
- this.endPoint.y
60
- );
61
- if (n > 0) {
62
- const l = u - e, c = a - i;
63
- t += Math.sqrt(l * l + c * c);
64
- }
65
- e = u, i = a;
66
- }
67
- return t;
68
- }
69
- // Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve.
70
- point(s, t, e, i, n) {
71
- return t * (1 - s) * (1 - s) * (1 - s) + 3 * e * (1 - s) * (1 - s) * s + 3 * i * (1 - s) * s * s + n * s * s * s;
72
- }
73
- }, U = class {
74
- /* tslint:enable: variable-name */
75
- constructor() {
76
- /* tslint:disable: variable-name */
77
- d(this, "_et");
78
- try {
79
- this._et = new EventTarget();
80
- } catch {
81
- this._et = document;
82
- }
83
- }
84
- addEventListener(r, s, t) {
85
- this._et.addEventListener(r, s, t);
86
- }
87
- dispatchEvent(r) {
88
- return this._et.dispatchEvent(r);
89
- }
90
- removeEventListener(r, s, t) {
91
- this._et.removeEventListener(r, s, t);
92
- }
93
- };
94
- function W(r, s = 250) {
95
- let t = 0, e = null, i, n, o;
96
- const u = () => {
97
- t = Date.now(), e = null, i = r.apply(n, o), e || (n = null, o = []);
98
- };
99
- return function(...l) {
100
- const c = Date.now(), _ = s - (c - t);
101
- return n = this, o = l, _ <= 0 || _ > s ? (e && (clearTimeout(e), e = null), t = c, i = r.apply(n, o), e || (n = null, o = [])) : e || (e = window.setTimeout(u, _)), i;
102
- };
103
- }
104
- var O = class S extends U {
105
- /* tslint:enable: variable-name */
106
- constructor(t, e = {}) {
107
- super();
108
- // Public stuff
109
- d(this, "dotSize");
110
- d(this, "minWidth");
111
- d(this, "maxWidth");
112
- d(this, "penColor");
113
- d(this, "minDistance");
114
- d(this, "velocityFilterWeight");
115
- d(this, "compositeOperation");
116
- d(this, "backgroundColor");
117
- d(this, "throttle");
118
- d(this, "canvasContextOptions");
119
- // Private stuff
120
- /* tslint:disable: variable-name */
121
- d(this, "_ctx");
122
- d(this, "_drawingStroke", !1);
123
- d(this, "_isEmpty", !0);
124
- d(this, "_dataUrl");
125
- d(this, "_dataUrlOptions");
126
- d(this, "_lastPoints", []);
127
- // Stores up to 4 most recent points; used to generate a new curve
128
- d(this, "_data", []);
129
- // Stores all points in groups (one group per line or dot)
130
- d(this, "_lastVelocity", 0);
131
- d(this, "_lastWidth", 0);
132
- d(this, "_strokeMoveUpdate");
133
- d(this, "_strokePointerId");
134
- this.canvas = t, this.velocityFilterWeight = e.velocityFilterWeight || 0.7, this.minWidth = e.minWidth || 0.5, this.maxWidth = e.maxWidth || 2.5, this.throttle = e.throttle ?? 16, this.minDistance = e.minDistance ?? 5, this.dotSize = e.dotSize || 0, this.penColor = e.penColor || "black", this.backgroundColor = e.backgroundColor || "rgba(0,0,0,0)", this.compositeOperation = e.compositeOperation || "source-over", this.canvasContextOptions = e.canvasContextOptions ?? {}, this._strokeMoveUpdate = this.throttle ? W(S.prototype._strokeUpdate, this.throttle) : S.prototype._strokeUpdate, this._handleMouseDown = this._handleMouseDown.bind(this), this._handleMouseMove = this._handleMouseMove.bind(this), this._handleMouseUp = this._handleMouseUp.bind(this), this._handleTouchStart = this._handleTouchStart.bind(this), this._handleTouchMove = this._handleTouchMove.bind(this), this._handleTouchEnd = this._handleTouchEnd.bind(this), this._handlePointerDown = this._handlePointerDown.bind(this), this._handlePointerMove = this._handlePointerMove.bind(this), this._handlePointerUp = this._handlePointerUp.bind(this), this._handlePointerCancel = this._handlePointerCancel.bind(this), this._handleTouchCancel = this._handleTouchCancel.bind(this), this._ctx = t.getContext(
135
- "2d",
136
- this.canvasContextOptions
137
- ), this.clear(), this.on();
138
- }
139
- clear() {
140
- const { _ctx: t, canvas: e } = this;
141
- t.fillStyle = this.backgroundColor, t.clearRect(0, 0, e.width, e.height), t.fillRect(0, 0, e.width, e.height), this._data = [], this._reset(this._getPointGroupOptions()), this._isEmpty = !0, this._dataUrl = void 0, this._dataUrlOptions = void 0, this._strokePointerId = void 0;
142
- }
143
- redraw() {
144
- const t = this._data, e = this._dataUrl, i = this._dataUrlOptions;
145
- this.clear(), e && this.fromDataURL(e, i), this.fromData(t, { clear: !1 });
146
- }
147
- fromDataURL(t, e = {}) {
148
- return new Promise((i, n) => {
149
- const o = new Image(), u = e.ratio || window.devicePixelRatio || 1, a = e.width || this.canvas.width / u, l = e.height || this.canvas.height / u, c = e.xOffset || 0, _ = e.yOffset || 0;
150
- this._reset(this._getPointGroupOptions()), o.onload = () => {
151
- this._ctx.drawImage(o, c, _, a, l), i();
152
- }, o.onerror = (m) => {
153
- n(m);
154
- }, o.crossOrigin = "anonymous", o.src = t, this._isEmpty = !1, this._dataUrl = t, this._dataUrlOptions = { ...e };
155
- });
156
- }
157
- toDataURL(t = "image/png", e) {
158
- switch (t) {
159
- case "image/svg+xml":
160
- return typeof e != "object" && (e = void 0), `data:image/svg+xml;base64,${btoa(
161
- this.toSVG(e)
162
- )}`;
163
- default:
164
- return typeof e != "number" && (e = void 0), this.canvas.toDataURL(t, e);
165
- }
166
- }
167
- on() {
168
- this.canvas.style.touchAction = "none", this.canvas.style.msTouchAction = "none", this.canvas.style.userSelect = "none", this.canvas.style.webkitUserSelect = "none";
169
- const t = /Macintosh/.test(navigator.userAgent) && "ontouchstart" in document;
170
- window.PointerEvent && !t ? this._handlePointerEvents() : (this._handleMouseEvents(), "ontouchstart" in window && this._handleTouchEvents());
171
- }
172
- off() {
173
- this.canvas.style.touchAction = "auto", this.canvas.style.msTouchAction = "auto", this.canvas.style.userSelect = "auto", this.canvas.style.webkitUserSelect = "auto", this.canvas.removeEventListener("pointerdown", this._handlePointerDown), this.canvas.removeEventListener("mousedown", this._handleMouseDown), this.canvas.removeEventListener("touchstart", this._handleTouchStart), this._removeMoveUpEventListeners();
174
- }
175
- _getListenerFunctions() {
176
- const t = window.document === this.canvas.ownerDocument ? window : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;
177
- return {
178
- addEventListener: t.addEventListener.bind(
179
- t
180
- ),
181
- removeEventListener: t.removeEventListener.bind(
182
- t
183
- )
184
- };
185
- }
186
- _removeMoveUpEventListeners() {
187
- const { removeEventListener: t } = this._getListenerFunctions();
188
- t("pointermove", this._handlePointerMove), t("pointerup", this._handlePointerUp), t("pointercancel", this._handlePointerCancel), t("mousemove", this._handleMouseMove), t("mouseup", this._handleMouseUp), t("touchmove", this._handleTouchMove), t("touchend", this._handleTouchEnd), t("touchcancel", this._handleTouchCancel);
189
- }
190
- isEmpty() {
191
- return this._isEmpty;
192
- }
193
- fromData(t, { clear: e = !0 } = {}) {
194
- e && this.clear(), this._fromData(
195
- t,
196
- this._drawCurve.bind(this),
197
- this._drawDot.bind(this)
198
- ), this._data = this._data.concat(t);
199
- }
200
- toData() {
201
- return this._data;
202
- }
203
- _isLeftButtonPressed(t, e) {
204
- return e ? t.buttons === 1 : (t.buttons & 1) === 1;
205
- }
206
- _pointerEventToSignatureEvent(t) {
207
- return {
208
- event: t,
209
- type: t.type,
210
- x: t.clientX,
211
- y: t.clientY,
212
- pressure: "pressure" in t ? t.pressure : 0
213
- };
214
- }
215
- _touchEventToSignatureEvent(t) {
216
- const e = t.changedTouches[0];
217
- return {
218
- event: t,
219
- type: t.type,
220
- x: e.clientX,
221
- y: e.clientY,
222
- pressure: e.force
223
- };
224
- }
225
- // Event handlers
226
- _handleMouseDown(t) {
227
- !this._isLeftButtonPressed(t, !0) || this._drawingStroke || this._strokeBegin(this._pointerEventToSignatureEvent(t));
228
- }
229
- _handleMouseMove(t) {
230
- if (!this._isLeftButtonPressed(t, !0) || !this._drawingStroke) {
231
- this._strokeEnd(this._pointerEventToSignatureEvent(t), !1);
232
- return;
233
- }
234
- this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t));
235
- }
236
- _handleMouseUp(t) {
237
- this._isLeftButtonPressed(t) || this._strokeEnd(this._pointerEventToSignatureEvent(t));
238
- }
239
- _handleTouchStart(t) {
240
- t.targetTouches.length !== 1 || this._drawingStroke || (t.cancelable && t.preventDefault(), this._strokeBegin(this._touchEventToSignatureEvent(t)));
241
- }
242
- _handleTouchMove(t) {
243
- if (t.targetTouches.length === 1) {
244
- if (t.cancelable && t.preventDefault(), !this._drawingStroke) {
245
- this._strokeEnd(this._touchEventToSignatureEvent(t), !1);
246
- return;
247
- }
248
- this._strokeMoveUpdate(this._touchEventToSignatureEvent(t));
249
- }
250
- }
251
- _handleTouchEnd(t) {
252
- t.targetTouches.length === 0 && (t.cancelable && t.preventDefault(), this._strokeEnd(this._touchEventToSignatureEvent(t)));
253
- }
254
- _handlePointerCancel(t) {
255
- this._allowPointerId(t) && (t.preventDefault(), this._strokeEnd(this._pointerEventToSignatureEvent(t), !1));
256
- }
257
- _handleTouchCancel(t) {
258
- t.cancelable && t.preventDefault(), this._strokeEnd(this._touchEventToSignatureEvent(t), !1);
259
- }
260
- _getPointerId(t) {
261
- return t.persistentDeviceId || t.pointerId;
262
- }
263
- _allowPointerId(t, e = !1) {
264
- return typeof this._strokePointerId > "u" ? e : this._getPointerId(t) === this._strokePointerId;
265
- }
266
- _handlePointerDown(t) {
267
- this._drawingStroke || !this._isLeftButtonPressed(t) || !this._allowPointerId(t, !0) || (this._strokePointerId = this._getPointerId(t), t.preventDefault(), this._strokeBegin(this._pointerEventToSignatureEvent(t)));
268
- }
269
- _handlePointerMove(t) {
270
- if (this._allowPointerId(t)) {
271
- if (!this._isLeftButtonPressed(t, !0) || !this._drawingStroke) {
272
- this._strokeEnd(this._pointerEventToSignatureEvent(t), !1);
273
- return;
274
- }
275
- t.preventDefault(), this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t));
276
- }
277
- }
278
- _handlePointerUp(t) {
279
- this._isLeftButtonPressed(t) || !this._allowPointerId(t) || (t.preventDefault(), this._strokeEnd(this._pointerEventToSignatureEvent(t)));
280
- }
281
- _getPointGroupOptions(t) {
282
- return {
283
- penColor: t && "penColor" in t ? t.penColor : this.penColor,
284
- dotSize: t && "dotSize" in t ? t.dotSize : this.dotSize,
285
- minWidth: t && "minWidth" in t ? t.minWidth : this.minWidth,
286
- maxWidth: t && "maxWidth" in t ? t.maxWidth : this.maxWidth,
287
- velocityFilterWeight: t && "velocityFilterWeight" in t ? t.velocityFilterWeight : this.velocityFilterWeight,
288
- compositeOperation: t && "compositeOperation" in t ? t.compositeOperation : this.compositeOperation
289
- };
290
- }
291
- // Private methods
292
- _strokeBegin(t) {
293
- if (!this.dispatchEvent(
294
- new CustomEvent("beginStroke", { detail: t, cancelable: !0 })
295
- ))
296
- return;
297
- const { addEventListener: i } = this._getListenerFunctions();
298
- switch (t.event.type) {
299
- case "mousedown":
300
- i("mousemove", this._handleMouseMove, {
301
- passive: !1
302
- }), i("mouseup", this._handleMouseUp, { passive: !1 });
303
- break;
304
- case "touchstart":
305
- i("touchmove", this._handleTouchMove, {
306
- passive: !1
307
- }), i("touchend", this._handleTouchEnd, { passive: !1 }), i("touchcancel", this._handleTouchCancel, { passive: !1 });
308
- break;
309
- case "pointerdown":
310
- i("pointermove", this._handlePointerMove, {
311
- passive: !1
312
- }), i("pointerup", this._handlePointerUp, {
313
- passive: !1
314
- }), i("pointercancel", this._handlePointerCancel, {
315
- passive: !1
316
- });
317
- break;
318
- }
319
- this._drawingStroke = !0;
320
- const n = this._getPointGroupOptions(), o = {
321
- ...n,
322
- points: []
323
- };
324
- this._data.push(o), this._reset(n), this._strokeUpdate(t);
325
- }
326
- _strokeUpdate(t) {
327
- if (!this._drawingStroke)
328
- return;
329
- if (this._data.length === 0) {
330
- this._strokeBegin(t);
331
- return;
332
- }
333
- this.dispatchEvent(
334
- new CustomEvent("beforeUpdateStroke", { detail: t })
335
- );
336
- const e = this._createPoint(t.x, t.y, t.pressure), i = this._data[this._data.length - 1], n = i.points, o = n.length > 0 && n[n.length - 1], u = o ? e.distanceTo(o) <= this.minDistance : !1, a = this._getPointGroupOptions(i);
337
- if (!o || !(o && u)) {
338
- const l = this._addPoint(e, a);
339
- o ? l && this._drawCurve(l, a) : this._drawDot(e, a), n.push({
340
- time: e.time,
341
- x: e.x,
342
- y: e.y,
343
- pressure: e.pressure
344
- });
345
- }
346
- this.dispatchEvent(new CustomEvent("afterUpdateStroke", { detail: t }));
347
- }
348
- _strokeEnd(t, e = !0) {
349
- this._removeMoveUpEventListeners(), this._drawingStroke && (e && this._strokeUpdate(t), this._drawingStroke = !1, this._strokePointerId = void 0, this.dispatchEvent(new CustomEvent("endStroke", { detail: t })));
350
- }
351
- _handlePointerEvents() {
352
- this._drawingStroke = !1, this.canvas.addEventListener("pointerdown", this._handlePointerDown, {
353
- passive: !1
354
- });
355
- }
356
- _handleMouseEvents() {
357
- this._drawingStroke = !1, this.canvas.addEventListener("mousedown", this._handleMouseDown, {
358
- passive: !1
359
- });
360
- }
361
- _handleTouchEvents() {
362
- this.canvas.addEventListener("touchstart", this._handleTouchStart, {
363
- passive: !1
364
- });
365
- }
366
- // Called when a new line is started
367
- _reset(t) {
368
- this._lastPoints = [], this._lastVelocity = 0, this._lastWidth = (t.minWidth + t.maxWidth) / 2, this._ctx.fillStyle = t.penColor, this._ctx.globalCompositeOperation = t.compositeOperation;
369
- }
370
- _createPoint(t, e, i) {
371
- const n = this.canvas.getBoundingClientRect();
372
- return new E(
373
- t - n.left,
374
- e - n.top,
375
- i,
376
- (/* @__PURE__ */ new Date()).getTime()
377
- );
378
- }
379
- // Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3)
380
- _addPoint(t, e) {
381
- const { _lastPoints: i } = this;
382
- if (i.push(t), i.length > 2) {
383
- i.length === 3 && i.unshift(i[0]);
384
- const n = this._calculateCurveWidths(
385
- i[1],
386
- i[2],
387
- e
388
- ), o = M.fromPoints(i, n);
389
- return i.shift(), o;
390
- }
391
- return null;
392
- }
393
- _calculateCurveWidths(t, e, i) {
394
- const n = i.velocityFilterWeight * e.velocityFrom(t) + (1 - i.velocityFilterWeight) * this._lastVelocity, o = this._strokeWidth(n, i), u = {
395
- end: o,
396
- start: this._lastWidth
397
- };
398
- return this._lastVelocity = n, this._lastWidth = o, u;
399
- }
400
- _strokeWidth(t, e) {
401
- return Math.max(e.maxWidth / (t + 1), e.minWidth);
402
- }
403
- _drawCurveSegment(t, e, i) {
404
- const n = this._ctx;
405
- n.moveTo(t, e), n.arc(t, e, i, 0, 2 * Math.PI, !1), this._isEmpty = !1;
406
- }
407
- _drawCurve(t, e) {
408
- const i = this._ctx, n = t.endWidth - t.startWidth, o = Math.ceil(t.length()) * 2;
409
- i.beginPath(), i.fillStyle = e.penColor;
410
- for (let u = 0; u < o; u += 1) {
411
- const a = u / o, l = a * a, c = l * a, _ = 1 - a, m = _ * _, x = m * _;
412
- let v = x * t.startPoint.x;
413
- v += 3 * m * a * t.control1.x, v += 3 * _ * l * t.control2.x, v += c * t.endPoint.x;
414
- let g = x * t.startPoint.y;
415
- g += 3 * m * a * t.control1.y, g += 3 * _ * l * t.control2.y, g += c * t.endPoint.y;
416
- const h = Math.min(
417
- t.startWidth + c * n,
418
- e.maxWidth
419
- );
420
- this._drawCurveSegment(v, g, h);
421
- }
422
- i.closePath(), i.fill();
423
- }
424
- _drawDot(t, e) {
425
- const i = this._ctx, n = e.dotSize > 0 ? e.dotSize : (e.minWidth + e.maxWidth) / 2;
426
- i.beginPath(), this._drawCurveSegment(t.x, t.y, n), i.closePath(), i.fillStyle = e.penColor, i.fill();
427
- }
428
- _fromData(t, e, i) {
429
- for (const n of t) {
430
- const { points: o } = n, u = this._getPointGroupOptions(n);
431
- if (o.length > 1)
432
- for (let a = 0; a < o.length; a += 1) {
433
- const l = o[a], c = new E(
434
- l.x,
435
- l.y,
436
- l.pressure,
437
- l.time
438
- );
439
- a === 0 && this._reset(u);
440
- const _ = this._addPoint(c, u);
441
- _ && e(_, u);
442
- }
443
- else
444
- this._reset(u), i(o[0], u);
445
- }
446
- }
447
- toSVG({ includeBackgroundColor: t = !1, includeDataUrl: e = !1 } = {}) {
448
- var _, m, x, v, g;
449
- const i = this._data, n = Math.max(window.devicePixelRatio || 1, 1), o = 0, u = 0, a = this.canvas.width / n, l = this.canvas.height / n, c = document.createElementNS("http://www.w3.org/2000/svg", "svg");
450
- if (c.setAttribute("xmlns", "http://www.w3.org/2000/svg"), c.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), c.setAttribute("viewBox", `${o} ${u} ${a} ${l}`), c.setAttribute("width", a.toString()), c.setAttribute("height", l.toString()), t && this.backgroundColor) {
451
- const h = document.createElement("rect");
452
- h.setAttribute("width", "100%"), h.setAttribute("height", "100%"), h.setAttribute("fill", this.backgroundColor), c.appendChild(h);
453
- }
454
- if (e && this._dataUrl) {
455
- const h = ((_ = this._dataUrlOptions) == null ? void 0 : _.ratio) || window.devicePixelRatio || 1, w = ((m = this._dataUrlOptions) == null ? void 0 : m.width) || this.canvas.width / h, f = ((x = this._dataUrlOptions) == null ? void 0 : x.height) || this.canvas.height / h, y = ((v = this._dataUrlOptions) == null ? void 0 : v.xOffset) || 0, P = ((g = this._dataUrlOptions) == null ? void 0 : g.yOffset) || 0, p = document.createElement("image");
456
- p.setAttribute("x", y.toString()), p.setAttribute("y", P.toString()), p.setAttribute("width", w.toString()), p.setAttribute("height", f.toString()), p.setAttribute("preserveAspectRatio", "none"), p.setAttribute("href", this._dataUrl), c.appendChild(p);
457
- }
458
- return this._fromData(
459
- i,
460
- (h, { penColor: w }) => {
461
- const f = document.createElement("path");
462
- if (!isNaN(h.control1.x) && !isNaN(h.control1.y) && !isNaN(h.control2.x) && !isNaN(h.control2.y)) {
463
- const y = `M ${h.startPoint.x.toFixed(3)},${h.startPoint.y.toFixed(
464
- 3
465
- )} C ${h.control1.x.toFixed(3)},${h.control1.y.toFixed(3)} ${h.control2.x.toFixed(3)},${h.control2.y.toFixed(3)} ${h.endPoint.x.toFixed(3)},${h.endPoint.y.toFixed(3)}`;
466
- f.setAttribute("d", y), f.setAttribute("stroke-width", (h.endWidth * 2.25).toFixed(3)), f.setAttribute("stroke", w), f.setAttribute("fill", "none"), f.setAttribute("stroke-linecap", "round"), c.appendChild(f);
467
- }
468
- },
469
- (h, { penColor: w, dotSize: f, minWidth: y, maxWidth: P }) => {
470
- const p = document.createElement("circle"), k = f > 0 ? f : (y + P) / 2;
471
- p.setAttribute("r", k.toString()), p.setAttribute("cx", h.x.toString()), p.setAttribute("cy", h.y.toString()), p.setAttribute("fill", w), c.appendChild(p);
472
- }
473
- ), c.outerHTML;
474
- }
475
- };
476
- export {
477
- O as default
478
- };
@@ -1,33 +0,0 @@
1
- declare function __VLS_template(): {
2
- attrs: Partial<{}>;
3
- slots: {
4
- trigger?(_: {
5
- isOpen: boolean;
6
- }): any;
7
- trigger?(_: {
8
- isOpen: any;
9
- }): any;
10
- };
11
- refs: {
12
- menuRef: unknown;
13
- popupRef: unknown;
14
- };
15
- rootEl: any;
16
- };
17
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
- declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
- close: () => any;
20
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
21
- onClose?: () => any;
22
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
23
- menuRef: unknown;
24
- popupRef: unknown;
25
- }, any>;
26
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
27
- export default _default;
28
- type __VLS_WithTemplateSlots<T, S> = T & {
29
- new (): {
30
- $slots: S;
31
- };
32
- };
33
- //# sourceMappingURL=CallBoard.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CallBoard.vue.d.ts","sourceRoot":"","sources":["../../../../../app/components/call/CallBoard.vue"],"names":[],"mappings":"AAqBA;AAoFA,iBAAS,cAAc;WA6HT,OAAO,IAA6B;;;;YAbrB,GAAG;;;YACH,GAAG;;;;;;;EAiB/B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;OAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,16 +0,0 @@
1
- import { CallMember } from '../../types';
2
- type __VLS_Props = {
3
- contact: CallMember;
4
- isFullScreen?: boolean;
5
- };
6
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
- "toggle-fullscreen": () => any;
8
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- "onToggle-fullscreen"?: () => any;
10
- }>, {
11
- isFullScreen: boolean;
12
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
13
- videoRef: HTMLVideoElement;
14
- }, HTMLDivElement>;
15
- export default _default;
16
- //# sourceMappingURL=CallMemberDisplay.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CallMemberDisplay.vue.d.ts","sourceRoot":"","sources":["../../../../../app/components/call/CallMemberDisplay.vue"],"names":[],"mappings":"AAwDA;AA8GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,UAAU,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;;;;;;kBADe,OAAO;;;;AAoK1B,wBAUG"}
@@ -1,7 +0,0 @@
1
- import { Contact } from '../../types';
2
- type __VLS_Props = {
3
- contacts?: Contact[];
4
- };
5
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
6
- export default _default;
7
- //# sourceMappingURL=CallPageOverlay.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CallPageOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../../app/components/call/CallPageOverlay.vue"],"names":[],"mappings":"AA6GA;AAoYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAqBvC,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB,CAAC;;AAsgBF,wBAOG"}
@@ -1,24 +0,0 @@
1
- export interface BoardColorPickerExposed {
2
- open: () => void;
3
- close: () => void;
4
- }
5
- declare const _default: import('vue').DefineComponent<{
6
- modelValue?: string;
7
- colors: string[];
8
- }, {
9
- open: () => void;
10
- close: () => void;
11
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
- "update:modelValue": (value: string) => any;
13
- }, string, import('vue').PublicProps, Readonly<{
14
- modelValue?: string;
15
- colors: string[];
16
- }> & Readonly<{
17
- "onUpdate:modelValue"?: (value: string) => any;
18
- }>, {
19
- modelValue: string;
20
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
21
- colorPickerWrapper: HTMLDivElement;
22
- }, HTMLDivElement>;
23
- export default _default;
24
- //# sourceMappingURL=BoardColorPicker.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BoardColorPicker.vue.d.ts","sourceRoot":"","sources":["../../../../../../app/components/call/paint-board/BoardColorPicker.vue"],"names":[],"mappings":"AAiDA;AAqJA,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;;iBAIgB,MAAM;YACX,MAAM,EAAE;;UAPZ,MAAM,IAAI;WACT,MAAM,IAAI;;;;iBAKF,MAAM;YACX,MAAM,EAAE;;;;gBADH,MAAM;;;;AAFvB,wBAoNK"}
@@ -1,19 +0,0 @@
1
- type __VLS_Props = {
2
- modelValue: number;
3
- min?: number;
4
- max?: number;
5
- color?: string;
6
- };
7
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
- "update:modelValue": (value: number) => any;
9
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- "onUpdate:modelValue"?: (value: number) => any;
11
- }>, {
12
- color: string;
13
- min: number;
14
- max: number;
15
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
16
- sliderRef: HTMLDivElement;
17
- }, HTMLDivElement>;
18
- export default _default;
19
- //# sourceMappingURL=BrushSizeSlider.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BrushSizeSlider.vue.d.ts","sourceRoot":"","sources":["../../../../../../app/components/call/paint-board/BrushSizeSlider.vue"],"names":[],"mappings":"AAqCA;AA+GA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;;;;;;WADQ,MAAM;SAFR,MAAM;SACN,MAAM;;;;AA8IhB,wBAUG"}
@@ -1,47 +0,0 @@
1
- type __VLS_Props = {
2
- isOpen?: boolean;
3
- };
4
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
- close: () => any;
6
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
7
- onClose?: () => any;
8
- }>, {
9
- isOpen: boolean;
10
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
11
- canvasRef: HTMLCanvasElement;
12
- colorPickerMenu: unknown;
13
- boardColorPicker: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
14
- modelValue?: string;
15
- colors: string[];
16
- }> & Readonly<{
17
- "onUpdate:modelValue"?: (value: string) => any;
18
- }>, {
19
- open: () => void;
20
- close: () => void;
21
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
22
- "update:modelValue": (value: string) => any;
23
- }, import('vue').PublicProps, {
24
- modelValue: string;
25
- }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
26
- colorPickerWrapper: HTMLDivElement;
27
- }, HTMLDivElement, import('vue').ComponentProvideOptions, {
28
- P: {};
29
- B: {};
30
- D: {};
31
- C: {};
32
- M: {};
33
- Defaults: {};
34
- }, Readonly<{
35
- modelValue?: string;
36
- colors: string[];
37
- }> & Readonly<{
38
- "onUpdate:modelValue"?: (value: string) => any;
39
- }>, {
40
- open: () => void;
41
- close: () => void;
42
- }, {}, {}, {}, {
43
- modelValue: string;
44
- }>;
45
- }, HTMLDivElement>;
46
- export default _default;
47
- //# sourceMappingURL=CallPaintBoard.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CallPaintBoard.vue.d.ts","sourceRoot":"","sources":["../../../../../../app/components/call/paint-board/CallPaintBoard.vue"],"names":[],"mappings":"AAwIA;AAgdA,KAAK,WAAW,GAAG;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;;;;;;YADS,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgoBpB,wBAUG"}