videomail-client 15.3.3 → 15.5.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.
package/dist/umd/index.js CHANGED
@@ -5,581 +5,13 @@
5
5
  else root["VideomailClient"] = factory();
6
6
  })(globalThis, ()=>(()=>{
7
7
  var __webpack_modules__ = {
8
- 6546 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
9
- "use strict";
10
- /*! Capacitor: https://capacitorjs.com/ - MIT License */ var ExceptionCode;
11
- (function(ExceptionCode) {
12
- ExceptionCode["Unimplemented"] = "UNIMPLEMENTED";
13
- ExceptionCode["Unavailable"] = "UNAVAILABLE";
14
- })(ExceptionCode || (ExceptionCode = {}));
15
- class CapacitorException extends Error {
16
- constructor(message, code, data){
17
- super(message);
18
- this.message = message;
19
- this.code = code;
20
- this.data = data;
21
- }
22
- }
23
- const getPlatformId = (win)=>{
24
- var _a, _b;
25
- if (null == win ? void 0 : win.androidBridge) return 'android';
26
- if (null == (_b = null == (_a = null == win ? void 0 : win.webkit) ? void 0 : _a.messageHandlers) ? void 0 : _b.bridge) return 'ios';
27
- return 'web';
28
- };
29
- const createCapacitor = (win)=>{
30
- const capCustomPlatform = win.CapacitorCustomPlatform || null;
31
- const cap = win.Capacitor || {};
32
- const Plugins = cap.Plugins = cap.Plugins || {};
33
- const getPlatform = ()=>null !== capCustomPlatform ? capCustomPlatform.name : getPlatformId(win);
34
- const isNativePlatform = ()=>'web' !== getPlatform();
35
- const isPluginAvailable = (pluginName)=>{
36
- const plugin = registeredPlugins.get(pluginName);
37
- if (null == plugin ? void 0 : plugin.platforms.has(getPlatform())) return true;
38
- if (getPluginHeader(pluginName)) return true;
39
- return false;
40
- };
41
- const getPluginHeader = (pluginName)=>{
42
- var _a;
43
- return null == (_a = cap.PluginHeaders) ? void 0 : _a.find((h)=>h.name === pluginName);
44
- };
45
- const handleError = (err)=>win.console.error(err);
46
- const registeredPlugins = new Map();
47
- const registerPlugin = (pluginName, jsImplementations = {})=>{
48
- const registeredPlugin = registeredPlugins.get(pluginName);
49
- if (registeredPlugin) {
50
- console.warn(`Capacitor plugin "${pluginName}" already registered. Cannot register plugins twice.`);
51
- return registeredPlugin.proxy;
52
- }
53
- const platform = getPlatform();
54
- const pluginHeader = getPluginHeader(pluginName);
55
- let jsImplementation;
56
- const loadPluginImplementation = async ()=>{
57
- if (!jsImplementation && platform in jsImplementations) jsImplementation = 'function' == typeof jsImplementations[platform] ? jsImplementation = await jsImplementations[platform]() : jsImplementation = jsImplementations[platform];
58
- else if (null !== capCustomPlatform && !jsImplementation && 'web' in jsImplementations) jsImplementation = 'function' == typeof jsImplementations['web'] ? jsImplementation = await jsImplementations['web']() : jsImplementation = jsImplementations['web'];
59
- return jsImplementation;
60
- };
61
- const createPluginMethod = (impl, prop)=>{
62
- var _a, _b;
63
- if (pluginHeader) {
64
- const methodHeader = null == pluginHeader ? void 0 : pluginHeader.methods.find((m)=>prop === m.name);
65
- if (methodHeader) if ('promise' === methodHeader.rtype) return (options)=>cap.nativePromise(pluginName, prop.toString(), options);
66
- else return (options, callback)=>cap.nativeCallback(pluginName, prop.toString(), options, callback);
67
- if (impl) return null == (_a = impl[prop]) ? void 0 : _a.bind(impl);
68
- } else if (impl) return null == (_b = impl[prop]) ? void 0 : _b.bind(impl);
69
- else throw new CapacitorException(`"${pluginName}" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented);
70
- };
71
- const createPluginMethodWrapper = (prop)=>{
72
- let remove;
73
- const wrapper = (...args)=>{
74
- const p = loadPluginImplementation().then((impl)=>{
75
- const fn = createPluginMethod(impl, prop);
76
- if (fn) {
77
- const p = fn(...args);
78
- remove = null == p ? void 0 : p.remove;
79
- return p;
80
- }
81
- throw new CapacitorException(`"${pluginName}.${prop}()" is not implemented on ${platform}`, ExceptionCode.Unimplemented);
82
- });
83
- if ('addListener' === prop) p.remove = async ()=>remove();
84
- return p;
85
- };
86
- wrapper.toString = ()=>`${prop.toString()}() { [capacitor code] }`;
87
- Object.defineProperty(wrapper, 'name', {
88
- value: prop,
89
- writable: false,
90
- configurable: false
91
- });
92
- return wrapper;
93
- };
94
- const addListener = createPluginMethodWrapper('addListener');
95
- const removeListener = createPluginMethodWrapper('removeListener');
96
- const addListenerNative = (eventName, callback)=>{
97
- const call = addListener({
98
- eventName
99
- }, callback);
100
- const remove = async ()=>{
101
- const callbackId = await call;
102
- removeListener({
103
- eventName,
104
- callbackId
105
- }, callback);
106
- };
107
- const p = new Promise((resolve)=>call.then(()=>resolve({
108
- remove
109
- })));
110
- p.remove = async ()=>{
111
- console.warn("Using addListener() without 'await' is deprecated.");
112
- await remove();
113
- };
114
- return p;
115
- };
116
- const proxy = new Proxy({}, {
117
- get (_, prop) {
118
- switch(prop){
119
- case '$$typeof':
120
- return;
121
- case 'toJSON':
122
- return ()=>({});
123
- case 'addListener':
124
- return pluginHeader ? addListenerNative : addListener;
125
- case 'removeListener':
126
- return removeListener;
127
- default:
128
- return createPluginMethodWrapper(prop);
129
- }
130
- }
131
- });
132
- Plugins[pluginName] = proxy;
133
- registeredPlugins.set(pluginName, {
134
- name: pluginName,
135
- proxy,
136
- platforms: new Set([
137
- ...Object.keys(jsImplementations),
138
- ...pluginHeader ? [
139
- platform
140
- ] : []
141
- ])
142
- });
143
- return proxy;
144
- };
145
- if (!cap.convertFileSrc) cap.convertFileSrc = (filePath)=>filePath;
146
- cap.getPlatform = getPlatform;
147
- cap.handleError = handleError;
148
- cap.isNativePlatform = isNativePlatform;
149
- cap.isPluginAvailable = isPluginAvailable;
150
- cap.registerPlugin = registerPlugin;
151
- cap.Exception = CapacitorException;
152
- cap.DEBUG = !!cap.DEBUG;
153
- cap.isLoggingEnabled = !!cap.isLoggingEnabled;
154
- return cap;
155
- };
156
- const initCapacitorGlobal = (win)=>win.Capacitor = createCapacitor(win);
157
- const Capacitor = /*#__PURE__*/ initCapacitorGlobal("u" > typeof globalThis ? globalThis : "u" > typeof self ? self : "u" > typeof window ? window : void 0 !== __webpack_require__.g ? __webpack_require__.g : {});
158
- const registerPlugin = Capacitor.registerPlugin;
159
- class WebPlugin {
160
- constructor(){
161
- this.listeners = {};
162
- this.retainedEventArguments = {};
163
- this.windowListeners = {};
164
- }
165
- addListener(eventName, listenerFunc) {
166
- let firstListener = false;
167
- const listeners = this.listeners[eventName];
168
- if (!listeners) {
169
- this.listeners[eventName] = [];
170
- firstListener = true;
171
- }
172
- this.listeners[eventName].push(listenerFunc);
173
- const windowListener = this.windowListeners[eventName];
174
- if (windowListener && !windowListener.registered) this.addWindowListener(windowListener);
175
- if (firstListener) this.sendRetainedArgumentsForEvent(eventName);
176
- const remove = async ()=>this.removeListener(eventName, listenerFunc);
177
- const p = Promise.resolve({
178
- remove
179
- });
180
- return p;
181
- }
182
- async removeAllListeners() {
183
- this.listeners = {};
184
- for(const listener in this.windowListeners)this.removeWindowListener(this.windowListeners[listener]);
185
- this.windowListeners = {};
186
- }
187
- notifyListeners(eventName, data, retainUntilConsumed) {
188
- const listeners = this.listeners[eventName];
189
- if (!listeners) {
190
- if (retainUntilConsumed) {
191
- let args = this.retainedEventArguments[eventName];
192
- if (!args) args = [];
193
- args.push(data);
194
- this.retainedEventArguments[eventName] = args;
195
- }
196
- return;
197
- }
198
- listeners.forEach((listener)=>listener(data));
199
- }
200
- hasListeners(eventName) {
201
- var _a;
202
- return !!(null == (_a = this.listeners[eventName]) ? void 0 : _a.length);
203
- }
204
- registerWindowListener(windowEventName, pluginEventName) {
205
- this.windowListeners[pluginEventName] = {
206
- registered: false,
207
- windowEventName,
208
- pluginEventName,
209
- handler: (event)=>{
210
- this.notifyListeners(pluginEventName, event);
211
- }
212
- };
213
- }
214
- unimplemented(msg = 'not implemented') {
215
- return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);
216
- }
217
- unavailable(msg = 'not available') {
218
- return new Capacitor.Exception(msg, ExceptionCode.Unavailable);
219
- }
220
- async removeListener(eventName, listenerFunc) {
221
- const listeners = this.listeners[eventName];
222
- if (!listeners) return;
223
- const index = listeners.indexOf(listenerFunc);
224
- this.listeners[eventName].splice(index, 1);
225
- if (!this.listeners[eventName].length) this.removeWindowListener(this.windowListeners[eventName]);
226
- }
227
- addWindowListener(handle) {
228
- window.addEventListener(handle.windowEventName, handle.handler);
229
- handle.registered = true;
230
- }
231
- removeWindowListener(handle) {
232
- if (!handle) return;
233
- window.removeEventListener(handle.windowEventName, handle.handler);
234
- handle.registered = false;
235
- }
236
- sendRetainedArgumentsForEvent(eventName) {
237
- const args = this.retainedEventArguments[eventName];
238
- if (!args) return;
239
- delete this.retainedEventArguments[eventName];
240
- args.forEach((arg)=>{
241
- this.notifyListeners(eventName, arg);
242
- });
243
- }
244
- }
245
- const encode = (str)=>encodeURIComponent(str).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
246
- const decode = (str)=>str.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
247
- class CapacitorCookiesPluginWeb extends WebPlugin {
248
- async getCookies() {
249
- const cookies = document.cookie;
250
- const cookieMap = {};
251
- cookies.split(';').forEach((cookie)=>{
252
- if (cookie.length <= 0) return;
253
- let [key, value] = cookie.replace(/=/, 'CAP_COOKIE').split('CAP_COOKIE');
254
- key = decode(key).trim();
255
- value = decode(value).trim();
256
- cookieMap[key] = value;
257
- });
258
- return cookieMap;
259
- }
260
- async setCookie(options) {
261
- try {
262
- const encodedKey = encode(options.key);
263
- const encodedValue = encode(options.value);
264
- const expires = options.expires ? `; expires=${options.expires.replace('expires=', '')}` : '';
265
- const path = (options.path || '/').replace('path=', '');
266
- const domain = null != options.url && options.url.length > 0 ? `domain=${options.url}` : '';
267
- document.cookie = `${encodedKey}=${encodedValue || ''}${expires}; path=${path}; ${domain};`;
268
- } catch (error) {
269
- return Promise.reject(error);
270
- }
271
- }
272
- async deleteCookie(options) {
273
- try {
274
- document.cookie = `${options.key}=; Max-Age=0`;
275
- } catch (error) {
276
- return Promise.reject(error);
277
- }
278
- }
279
- async clearCookies() {
280
- try {
281
- const cookies = document.cookie.split(';') || [];
282
- for (const cookie of cookies)document.cookie = cookie.replace(/^ +/, '').replace(/=.*/, `=;expires=${new Date().toUTCString()};path=/`);
283
- } catch (error) {
284
- return Promise.reject(error);
285
- }
286
- }
287
- async clearAllCookies() {
288
- try {
289
- await this.clearCookies();
290
- } catch (error) {
291
- return Promise.reject(error);
292
- }
293
- }
294
- }
295
- registerPlugin('CapacitorCookies', {
296
- web: ()=>new CapacitorCookiesPluginWeb()
297
- });
298
- const readBlobAsBase64 = async (blob)=>new Promise((resolve, reject)=>{
299
- const reader = new FileReader();
300
- reader.onload = ()=>{
301
- const base64String = reader.result;
302
- resolve(base64String.indexOf(',') >= 0 ? base64String.split(',')[1] : base64String);
303
- };
304
- reader.onerror = (error)=>reject(error);
305
- reader.readAsDataURL(blob);
306
- });
307
- const normalizeHttpHeaders = (headers = {})=>{
308
- const originalKeys = Object.keys(headers);
309
- const loweredKeys = Object.keys(headers).map((k)=>k.toLocaleLowerCase());
310
- const normalized = loweredKeys.reduce((acc, key, index)=>{
311
- acc[key] = headers[originalKeys[index]];
312
- return acc;
313
- }, {});
314
- return normalized;
315
- };
316
- const buildUrlParams = (params, shouldEncode = true)=>{
317
- if (!params) return null;
318
- const output = Object.entries(params).reduce((accumulator, entry)=>{
319
- const [key, value] = entry;
320
- let encodedValue;
321
- let item;
322
- if (Array.isArray(value)) {
323
- item = '';
324
- value.forEach((str)=>{
325
- encodedValue = shouldEncode ? encodeURIComponent(str) : str;
326
- item += `${key}=${encodedValue}&`;
327
- });
328
- item.slice(0, -1);
329
- } else {
330
- encodedValue = shouldEncode ? encodeURIComponent(value) : value;
331
- item = `${key}=${encodedValue}`;
332
- }
333
- return `${accumulator}&${item}`;
334
- }, '');
335
- return output.substr(1);
336
- };
337
- const buildRequestInit = (options, extra = {})=>{
338
- const output = Object.assign({
339
- method: options.method || 'GET',
340
- headers: options.headers
341
- }, extra);
342
- const headers = normalizeHttpHeaders(options.headers);
343
- const type = headers['content-type'] || '';
344
- if ('string' == typeof options.data) output.body = options.data;
345
- else if (type.includes('application/x-www-form-urlencoded')) {
346
- const params = new URLSearchParams();
347
- for (const [key, value] of Object.entries(options.data || {}))params.set(key, value);
348
- output.body = params.toString();
349
- } else if (type.includes('multipart/form-data') || options.data instanceof FormData) {
350
- const form = new FormData();
351
- if (options.data instanceof FormData) options.data.forEach((value, key)=>{
352
- form.append(key, value);
353
- });
354
- else for (const key of Object.keys(options.data))form.append(key, options.data[key]);
355
- output.body = form;
356
- const headers = new Headers(output.headers);
357
- headers.delete('content-type');
358
- output.headers = headers;
359
- } else if (type.includes('application/json') || 'object' == typeof options.data) output.body = JSON.stringify(options.data);
360
- return output;
361
- };
362
- class CapacitorHttpPluginWeb extends WebPlugin {
363
- async request(options) {
364
- const requestInit = buildRequestInit(options, options.webFetchExtra);
365
- const urlParams = buildUrlParams(options.params, options.shouldEncodeUrlParams);
366
- const url = urlParams ? `${options.url}?${urlParams}` : options.url;
367
- const response = await fetch(url, requestInit);
368
- const contentType = response.headers.get('content-type') || '';
369
- let { responseType = 'text' } = response.ok ? options : {};
370
- if (contentType.includes('application/json')) responseType = 'json';
371
- let data;
372
- let blob;
373
- switch(responseType){
374
- case 'arraybuffer':
375
- case 'blob':
376
- blob = await response.blob();
377
- data = await readBlobAsBase64(blob);
378
- break;
379
- case 'json':
380
- data = await response.json();
381
- break;
382
- case 'document':
383
- case 'text':
384
- default:
385
- data = await response.text();
386
- }
387
- const headers = {};
388
- response.headers.forEach((value, key)=>{
389
- headers[key] = value;
390
- });
391
- return {
392
- data,
393
- headers,
394
- status: response.status,
395
- url: response.url
396
- };
397
- }
398
- async get(options) {
399
- return this.request(Object.assign(Object.assign({}, options), {
400
- method: 'GET'
401
- }));
402
- }
403
- async post(options) {
404
- return this.request(Object.assign(Object.assign({}, options), {
405
- method: 'POST'
406
- }));
407
- }
408
- async put(options) {
409
- return this.request(Object.assign(Object.assign({}, options), {
410
- method: 'PUT'
411
- }));
412
- }
413
- async patch(options) {
414
- return this.request(Object.assign(Object.assign({}, options), {
415
- method: 'PATCH'
416
- }));
417
- }
418
- async delete(options) {
419
- return this.request(Object.assign(Object.assign({}, options), {
420
- method: 'DELETE'
421
- }));
422
- }
423
- }
424
- registerPlugin('CapacitorHttp', {
425
- web: ()=>new CapacitorHttpPluginWeb()
426
- });
427
- var SystemBarsStyle;
428
- (function(SystemBarsStyle) {
429
- SystemBarsStyle["Dark"] = "DARK";
430
- SystemBarsStyle["Light"] = "LIGHT";
431
- SystemBarsStyle["Default"] = "DEFAULT";
432
- })(SystemBarsStyle || (SystemBarsStyle = {}));
433
- var SystemBarType;
434
- (function(SystemBarType) {
435
- SystemBarType["StatusBar"] = "StatusBar";
436
- SystemBarType["NavigationBar"] = "NavigationBar";
437
- })(SystemBarType || (SystemBarType = {}));
438
- class SystemBarsPluginWeb extends WebPlugin {
439
- async setStyle() {
440
- this.unavailable('not available for web');
441
- }
442
- async setAnimation() {
443
- this.unavailable('not available for web');
444
- }
445
- async show() {
446
- this.unavailable('not available for web');
447
- }
448
- async hide() {
449
- this.unavailable('not available for web');
450
- }
451
- }
452
- registerPlugin('SystemBars', {
453
- web: ()=>new SystemBarsPluginWeb()
454
- });
455
- __webpack_require__.d(__webpack_exports__, {
456
- E_: ()=>WebPlugin
457
- }, {
458
- F3: registerPlugin
459
- });
460
- },
461
- 5303 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
462
- "use strict";
463
- var _capacitor_core__rspack_import_0 = __webpack_require__(6546);
464
- class DeviceWeb extends _capacitor_core__rspack_import_0.E_ {
465
- async getId() {
466
- return {
467
- identifier: this.getUid()
468
- };
469
- }
470
- async getInfo() {
471
- if ("u" < typeof navigator || !navigator.userAgent) throw this.unavailable('Device API not available in this browser');
472
- const ua = navigator.userAgent;
473
- const uaFields = this.parseUa(ua);
474
- return {
475
- model: uaFields.model,
476
- platform: 'web',
477
- operatingSystem: uaFields.operatingSystem,
478
- osVersion: uaFields.osVersion,
479
- manufacturer: navigator.vendor,
480
- isVirtual: false,
481
- webViewVersion: uaFields.browserVersion
482
- };
483
- }
484
- async getBatteryInfo() {
485
- if ("u" < typeof navigator || !navigator.getBattery) throw this.unavailable('Device API not available in this browser');
486
- let battery = {};
487
- try {
488
- battery = await navigator.getBattery();
489
- } catch (e) {}
490
- return {
491
- batteryLevel: battery.level,
492
- isCharging: battery.charging
493
- };
494
- }
495
- async getLanguageCode() {
496
- return {
497
- value: navigator.language.split('-')[0].toLowerCase()
498
- };
499
- }
500
- async getLanguageTag() {
501
- return {
502
- value: navigator.language
503
- };
504
- }
505
- parseUa(ua) {
506
- const uaFields = {};
507
- const start = ua.indexOf('(') + 1;
508
- let end = ua.indexOf(') AppleWebKit');
509
- if (-1 !== ua.indexOf(') Gecko')) end = ua.indexOf(') Gecko');
510
- const fields = ua.substring(start, end);
511
- if (-1 !== ua.indexOf('Android')) {
512
- const tmpFields = fields.replace('; wv', '').split('; ').pop();
513
- if (tmpFields) uaFields.model = tmpFields.split(' Build')[0];
514
- uaFields.osVersion = fields.split('; ')[1];
515
- } else {
516
- uaFields.model = fields.split('; ')[0];
517
- if ("u" > typeof navigator && navigator.oscpu) uaFields.osVersion = navigator.oscpu;
518
- else if (-1 !== ua.indexOf('Windows')) uaFields.osVersion = fields;
519
- else {
520
- const tmpFields = fields.split('; ').pop();
521
- if (tmpFields) {
522
- const lastParts = tmpFields.replace(' like Mac OS X', '').split(' ');
523
- uaFields.osVersion = lastParts[lastParts.length - 1].replace(/_/g, '.');
524
- }
525
- }
526
- }
527
- if (/android/i.test(ua)) uaFields.operatingSystem = 'android';
528
- else if (/iPad|iPhone|iPod/.test(ua) && !window.MSStream) uaFields.operatingSystem = 'ios';
529
- else if (/Win/.test(ua)) uaFields.operatingSystem = 'windows';
530
- else if (/Mac/i.test(ua)) uaFields.operatingSystem = 'mac';
531
- else uaFields.operatingSystem = 'unknown';
532
- const isSafari = !!window.ApplePaySession;
533
- const isChrome = !!window.chrome;
534
- const isFirefox = /Firefox/.test(ua);
535
- const isEdge = /Edg/.test(ua);
536
- const isFirefoxIOS = /FxiOS/.test(ua);
537
- const isChromeIOS = /CriOS/.test(ua);
538
- const isEdgeIOS = /EdgiOS/.test(ua);
539
- if (isSafari || isChrome && !isEdge || isFirefoxIOS || isChromeIOS || isEdgeIOS) {
540
- let searchWord;
541
- searchWord = isFirefoxIOS ? 'FxiOS' : isChromeIOS ? 'CriOS' : isEdgeIOS ? 'EdgiOS' : isSafari ? 'Version' : 'Chrome';
542
- const words = ua.split(' ');
543
- for (const word of words)if (word.includes(searchWord)) {
544
- const version = word.split('/')[1];
545
- uaFields.browserVersion = version;
546
- }
547
- } else if (isFirefox || isEdge) {
548
- const reverseUA = ua.split('').reverse().join('');
549
- const reverseVersion = reverseUA.split('/')[0];
550
- const version = reverseVersion.split('').reverse().join('');
551
- uaFields.browserVersion = version;
552
- }
553
- return uaFields;
554
- }
555
- getUid() {
556
- if ("u" > typeof window && window.localStorage) {
557
- let uid = window.localStorage.getItem('_capuid');
558
- if (uid) return uid;
559
- uid = this.uuid4();
560
- window.localStorage.setItem('_capuid', uid);
561
- return uid;
562
- }
563
- return this.uuid4();
564
- }
565
- uuid4() {
566
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
567
- const r = 16 * Math.random() | 0, v = 'x' === c ? r : 0x3 & r | 0x8;
568
- return v.toString(16);
569
- });
570
- }
571
- }
572
- __webpack_require__.d(__webpack_exports__, {
573
- DeviceWeb: ()=>DeviceWeb
574
- });
575
- },
576
8
  2791 (module1, __webpack_exports__, __webpack_require__) {
577
9
  "use strict";
578
- var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__(5068);
579
- var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
580
- var _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__(37);
581
- var _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
582
- var ___CSS_LOADER_EXPORT___ = _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
10
+ var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1 = __webpack_require__(5068);
11
+ var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1);
12
+ var _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0 = __webpack_require__(37);
13
+ var _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0);
14
+ var ___CSS_LOADER_EXPORT___ = _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0_default()(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1_default());
583
15
  ___CSS_LOADER_EXPORT___.push([
584
16
  module1.id,
585
17
  `@keyframes blink {
@@ -6583,9 +6015,9 @@
6583
6015
  return String.fromCharCode(parseInt(numberStr, 10));
6584
6016
  });
6585
6017
  };
6586
- var parseArrayValue = function(val, options, currentArrayLength, isFlatArrayValue) {
6018
+ var parseArrayValue = function(val, options, currentArrayLength) {
6587
6019
  if (val && 'string' == typeof val && options.comma && val.indexOf(',') > -1) {
6588
- if (isFlatArrayValue && options.throwOnLimitExceeded) {
6020
+ if (options.throwOnLimitExceeded) {
6589
6021
  var commaCount = 0;
6590
6022
  var commaIndex = val.indexOf(',');
6591
6023
  while(commaIndex > -1){
@@ -6632,7 +6064,7 @@
6632
6064
  val = options.strictNullHandling ? null : '';
6633
6065
  } else {
6634
6066
  key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
6635
- if (null !== key) val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options, isArray(obj[key]) ? obj[key].length : 0, -1 === part.indexOf('[]=')), function(encodedVal) {
6067
+ if (null !== key) val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options, isArray(obj[key]) ? obj[key].length : 0), function(encodedVal) {
6636
6068
  return options.decoder(encodedVal, defaults.decoder, charset, 'value');
6637
6069
  });
6638
6070
  }
@@ -6834,6 +6266,7 @@
6834
6266
  charsetSentinel: false,
6835
6267
  commaRoundTrip: false,
6836
6268
  delimiter: '&',
6269
+ depth: 1 / 0,
6837
6270
  encode: true,
6838
6271
  encodeDotInKeys: false,
6839
6272
  encoder: utils.encode,
@@ -6852,8 +6285,9 @@
6852
6285
  return 'string' == typeof v || 'number' == typeof v || 'boolean' == typeof v || 'symbol' == typeof v || 'bigint' == typeof v;
6853
6286
  };
6854
6287
  var sentinel = {};
6855
- var stringify = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
6288
+ var stringify = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel, depth, currentDepth) {
6856
6289
  var obj = object;
6290
+ if (currentDepth > depth) throw new RangeError('Input depth exceeded depth option of ' + depth);
6857
6291
  var tmpSc = sideChannel;
6858
6292
  var step = 0;
6859
6293
  var findFlag = false;
@@ -6864,8 +6298,8 @@
6864
6298
  else findFlag = true;
6865
6299
  if (void 0 === tmpSc.get(sentinel)) step = 0;
6866
6300
  }
6867
- if ('function' == typeof filter) obj = filter(prefix, obj);
6868
- else if (obj instanceof Date) obj = serializeDate(obj);
6301
+ obj = 'function' == typeof filter ? filter(prefix, obj) : obj;
6302
+ if (obj instanceof Date) obj = serializeDate(obj);
6869
6303
  else if ('comma' === generateArrayPrefix && isArray(obj)) obj = utils.maybeMap(obj, function(value) {
6870
6304
  if (value instanceof Date) return serializeDate(value);
6871
6305
  return value;
@@ -6904,7 +6338,7 @@
6904
6338
  }
6905
6339
  var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix);
6906
6340
  var adjustedPrefix = commaRoundTrip && isArray(obj) && 1 === obj.length ? encodedPrefix + '[]' : encodedPrefix;
6907
- if (allowEmptyArrays && isArray(obj) && 0 === obj.length) return adjustedPrefix + '[]';
6341
+ if (allowEmptyArrays && isArray(obj) && 0 === obj.length && 0 === Object.keys(obj).length) return adjustedPrefix + '[]';
6908
6342
  for(var j = 0; j < objKeys.length; ++j){
6909
6343
  var key = objKeys[j];
6910
6344
  var value = 'object' == typeof key && key && void 0 !== key.value ? key.value : obj[key];
@@ -6914,7 +6348,7 @@
6914
6348
  sideChannel.set(object, step);
6915
6349
  var valueSideChannel = getSideChannel();
6916
6350
  valueSideChannel.set(sentinel, sideChannel);
6917
- pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, 'comma' === generateArrayPrefix && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel));
6351
+ pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, 'comma' === generateArrayPrefix && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel, depth, currentDepth + 1));
6918
6352
  }
6919
6353
  }
6920
6354
  return values;
@@ -6947,6 +6381,7 @@
6947
6381
  charsetSentinel: 'boolean' == typeof opts.charsetSentinel ? opts.charsetSentinel : defaults.charsetSentinel,
6948
6382
  commaRoundTrip: !!opts.commaRoundTrip,
6949
6383
  delimiter: void 0 === opts.delimiter ? defaults.delimiter : opts.delimiter,
6384
+ depth: 'number' == typeof opts.depth ? opts.depth : defaults.depth,
6950
6385
  encode: 'boolean' == typeof opts.encode ? opts.encode : defaults.encode,
6951
6386
  encodeDotInKeys: 'boolean' == typeof opts.encodeDotInKeys ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
6952
6387
  encoder: 'function' == typeof opts.encoder ? opts.encoder : defaults.encoder,
@@ -6983,7 +6418,10 @@
6983
6418
  var key = objKeys[i];
6984
6419
  if (null != key) {
6985
6420
  var value = obj[key];
6986
- if (!options.skipNulls || null !== value) pushToArray(keys, stringify(value, key, generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel));
6421
+ if (!options.skipNulls || null !== value) {
6422
+ var encodedKey = options.encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key);
6423
+ pushToArray(keys, stringify(value, encodedKey, generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel, options.depth, 0));
6424
+ }
6987
6425
  }
6988
6426
  }
6989
6427
  var joined = keys.join(options.delimiter);
@@ -7217,13 +6655,19 @@
7217
6655
  };
7218
6656
  var isBuffer = function(obj) {
7219
6657
  if (!obj || 'object' != typeof obj) return false;
7220
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
6658
+ return !!(obj.constructor && 'function' == typeof obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
7221
6659
  };
7222
6660
  var combine = function(a, b, arrayLimit, plainObjects, throwOnLimitExceeded) {
7223
6661
  if (isOverflow(a)) {
7224
6662
  if (throwOnLimitExceeded) throw new RangeError('Array limit exceeded. Only ' + arrayLimit + ' element' + (1 === arrayLimit ? '' : 's') + ' allowed in an array.');
7225
- var newIndex = getMaxIndex(a) + 1;
7226
- a[newIndex] = b;
6663
+ var bValues = isArray(b) ? b : [
6664
+ b
6665
+ ];
6666
+ var newIndex = getMaxIndex(a);
6667
+ for(var i = 0; i < bValues.length; ++i){
6668
+ newIndex += 1;
6669
+ a[newIndex] = bValues[i];
6670
+ }
7227
6671
  setMaxIndex(a, newIndex);
7228
6672
  return a;
7229
6673
  }
@@ -11238,8 +10682,7 @@
11238
10682
  __webpack_require__.d(__webpack_exports__, {
11239
10683
  Reactions: ()=>Reactions,
11240
10684
  VideoType: ()=>VideoType,
11241
- VideomailClient: ()=>VideomailClient,
11242
- getCapacitorDeviceMetadata: ()=>util_getCapacitorDeviceMetadata
10685
+ VideomailClient: ()=>VideomailClient
11243
10686
  });
11244
10687
  const VideoType = {
11245
10688
  WebM: "webm",
@@ -11495,7 +10938,7 @@
11495
10938
  var client = __webpack_require__(5734);
11496
10939
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
11497
10940
  var package_namespaceObject = {
11498
- rE: "15.3.3"
10941
+ rE: "15.5.0"
11499
10942
  };
11500
10943
  function isAudioEnabled(options) {
11501
10944
  return Boolean(options.audio.enabled);
@@ -15109,48 +14552,6 @@
15109
14552
  return exc;
15110
14553
  }
15111
14554
  const error_findOriginalExc = findOriginalExc;
15112
- var dist = __webpack_require__(6546);
15113
- const Device = (0, dist.F3)('Device', {
15114
- web: ()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__, 5303)).then((m)=>new m.DeviceWeb())
15115
- });
15116
- async function getCapacitorDeviceMetadata() {
15117
- const errors = [];
15118
- let battery;
15119
- let info;
15120
- let languageCode;
15121
- let languageTag;
15122
- try {
15123
- info = await Device.getInfo();
15124
- } catch (exc) {
15125
- const err = serializeError(exc);
15126
- let ignore = false;
15127
- if (err.message?.includes("Device API not available in this browser")) ignore = true;
15128
- if (!ignore) errors.push(err);
15129
- }
15130
- try {
15131
- battery = await Device.getBatteryInfo();
15132
- } catch (exc) {
15133
- errors.push(serializeError(exc));
15134
- }
15135
- try {
15136
- languageCode = await Device.getLanguageCode();
15137
- } catch (exc) {
15138
- errors.push(serializeError(exc));
15139
- }
15140
- try {
15141
- languageTag = await Device.getLanguageTag();
15142
- } catch (exc) {
15143
- errors.push(serializeError(exc));
15144
- }
15145
- const metadata = {};
15146
- if (battery) metadata.battery = battery;
15147
- if (errors.length > 0) metadata.errors = errors;
15148
- if (info) metadata.info = info;
15149
- if (languageCode) metadata.languageCode = languageCode;
15150
- if (languageTag) metadata.languageTag = languageTag;
15151
- return metadata;
15152
- }
15153
- const util_getCapacitorDeviceMetadata = getCapacitorDeviceMetadata;
15154
14555
  function _extends() {
15155
14556
  _extends = Object.assign || function(target) {
15156
14557
  for(var i = 1; i < arguments.length; i++){
@@ -15668,11 +15069,9 @@
15668
15069
  [constants.WHITELIST_KEY_LABEL]: this.options.whitelistKey
15669
15070
  };
15670
15071
  const url = `${this.options.apiUrl}/client-error/`;
15671
- const capacitorDevice = await util_getCapacitorDeviceMetadata();
15672
15072
  const supportedConstraints = navigator.mediaDevices.getSupportedConstraints();
15673
15073
  const enumerateDevices = await navigator.mediaDevices.enumerateDevices();
15674
15074
  const fullVideomailErrorData = {
15675
- capacitorDevice,
15676
15075
  browser: err.browser,
15677
15076
  code: err.code,
15678
15077
  cookie: err.cookie,
@@ -17789,6 +17188,7 @@
17789
17188
  userMedia;
17790
17189
  userMediaTimeout;
17791
17190
  retryTimeout;
17191
+ connectionTimeout;
17792
17192
  frameProgress;
17793
17193
  sampleProgress;
17794
17194
  canvas;
@@ -17801,6 +17201,7 @@
17801
17201
  stream;
17802
17202
  connecting = false;
17803
17203
  connected = false;
17204
+ connectionFailed = false;
17804
17205
  blocking = false;
17805
17206
  built = false;
17806
17207
  key;
@@ -17901,6 +17302,30 @@
17901
17302
  window.clearTimeout(this.retryTimeout);
17902
17303
  this.retryTimeout = void 0;
17903
17304
  }
17305
+ clearConnectionTimeout() {
17306
+ if (!this.connectionTimeout) return;
17307
+ this.options.logger.debug("Recorder: clearConnectionTimeout()");
17308
+ window.clearTimeout(this.connectionTimeout);
17309
+ this.connectionTimeout = void 0;
17310
+ }
17311
+ failConnection(params) {
17312
+ if (this.connectionFailed || this.connected || this.unloaded) return;
17313
+ this.connectionFailed = true;
17314
+ this.connecting = false;
17315
+ this.clearConnectionTimeout();
17316
+ if (this.stream) {
17317
+ this.stream.destroy();
17318
+ this.stream = void 0;
17319
+ }
17320
+ const err = error_createError({
17321
+ message: "Unable to connect to the server",
17322
+ explanation: params.explanation,
17323
+ options: this.options
17324
+ });
17325
+ this.emit("ERROR", {
17326
+ err
17327
+ });
17328
+ }
17904
17329
  calculateFrameProgress() {
17905
17330
  return `${(this.confirmedFrameNumber / (this.framesCount || 1) * 100).toFixed(2)}%`;
17906
17331
  }
@@ -17972,6 +17397,7 @@
17972
17397
  initSocket(cb) {
17973
17398
  if (!this.connected) {
17974
17399
  this.connecting = true;
17400
+ this.connectionFailed = false;
17975
17401
  this.emit("CONNECTING");
17976
17402
  let url2Connect;
17977
17403
  try {
@@ -18026,16 +17452,27 @@
18026
17452
  });
18027
17453
  }
18028
17454
  if (this.stream) {
18029
- this.stream.on("close", (err)=>{
17455
+ const connectionTimeoutMs = this.options.timeouts.connection;
17456
+ this.connectionTimeout = window.setTimeout(()=>{
17457
+ this.failConnection({
17458
+ url2Connect,
17459
+ explanation: `The server at ${url2Connect} did not respond within ${connectionTimeoutMs}ms. Please check your internet connection and try again. If the problem persists, contact us.`
17460
+ });
17461
+ }, connectionTimeoutMs);
17462
+ this.stream.on("close", ()=>{
18030
17463
  this.options.logger.debug(`${PIPE_SYMBOL}Stream has closed`);
17464
+ const neverConnected = this.connecting && !this.connected;
17465
+ this.clearConnectionTimeout();
18031
17466
  this.connecting = this.connected = false;
18032
- if (err) this.emit("ERROR", {
18033
- err
17467
+ if (neverConnected) this.failConnection({
17468
+ url2Connect,
17469
+ explanation: `The connection to ${url2Connect} was refused or could not be reached. Please check your internet connection and try again. If the problem persists, contact us.`
18034
17470
  });
18035
17471
  else if (this.userMediaLoaded) this.initSocket();
18036
17472
  });
18037
17473
  this.stream.on("connect", ()=>{
18038
17474
  this.options.logger.debug(`${PIPE_SYMBOL}Stream *connect* event emitted`);
17475
+ this.clearConnectionTimeout();
18039
17476
  const isClosing = this.stream?.socket.readyState === WebSocket.CLOSING;
18040
17477
  if (!this.connected && !isClosing && !this.unloaded) {
18041
17478
  this.connected = true;
@@ -18394,6 +17831,8 @@
18394
17831
  this.options.logger.debug(`Recorder: unload()${prettyCause}`);
18395
17832
  this.reset();
18396
17833
  this.clearUserMediaTimeout();
17834
+ this.clearConnectionTimeout();
17835
+ this.connecting = false;
18397
17836
  if (this.userMedia) this.userMedia.unloadRemainingEventListeners();
18398
17837
  if (this.submitting) ;
18399
17838
  else if (this.stream) {