videomail-client 13.1.2 → 13.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.
- package/dist/cjs/index.cjs +91 -82
- package/dist/esm/index.js +60 -52
- package/dist/esm/types/Videomail.d.ts +1 -0
- package/dist/esm/util/getValidity.d.ts +2 -0
- package/dist/esm/wrappers/form.d.ts +2 -0
- package/dist/umd/index.js +57 -49
- package/package.json +12 -12
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var __webpack_modules__ = {
|
|
2
|
-
"./node_modules/@
|
|
2
|
+
"./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[13].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[13].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[13].use[3]!./src/styles/main.styl": function(module, __webpack_exports__, __webpack_require__) {
|
|
3
3
|
"use strict";
|
|
4
4
|
__webpack_require__.d(__webpack_exports__, {
|
|
5
5
|
A: ()=>__WEBPACK_DEFAULT_EXPORT__
|
|
6
6
|
});
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var ___CSS_LOADER_EXPORT___ =
|
|
7
|
+
var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
|
|
8
|
+
var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
9
|
+
var _node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/api.js");
|
|
10
|
+
var _node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
11
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
|
|
12
12
|
___CSS_LOADER_EXPORT___.push([
|
|
13
13
|
module.id,
|
|
14
14
|
`@keyframes blink {
|
|
@@ -10199,7 +10199,7 @@ var __webpack_modules__ = {
|
|
|
10199
10199
|
"?aa23": function() {},
|
|
10200
10200
|
"?9936": function() {},
|
|
10201
10201
|
"?5f55": function() {},
|
|
10202
|
-
"./node_modules/@
|
|
10202
|
+
"./node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module) {
|
|
10203
10203
|
"use strict";
|
|
10204
10204
|
module.exports = function(cssWithMappingToString) {
|
|
10205
10205
|
var list = [];
|
|
@@ -10253,13 +10253,13 @@ var __webpack_modules__ = {
|
|
|
10253
10253
|
return list;
|
|
10254
10254
|
};
|
|
10255
10255
|
},
|
|
10256
|
-
"./node_modules/@
|
|
10256
|
+
"./node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js": function(module) {
|
|
10257
10257
|
"use strict";
|
|
10258
10258
|
module.exports = function(i) {
|
|
10259
10259
|
return i[1];
|
|
10260
10260
|
};
|
|
10261
10261
|
},
|
|
10262
|
-
"./node_modules/@
|
|
10262
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js": function(module) {
|
|
10263
10263
|
"use strict";
|
|
10264
10264
|
var stylesInDOM = [];
|
|
10265
10265
|
function getIndexByIdentifier(identifier) {
|
|
@@ -10338,7 +10338,7 @@ var __webpack_modules__ = {
|
|
|
10338
10338
|
};
|
|
10339
10339
|
};
|
|
10340
10340
|
},
|
|
10341
|
-
"./node_modules/@
|
|
10341
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js": function(module) {
|
|
10342
10342
|
"use strict";
|
|
10343
10343
|
var memo = {};
|
|
10344
10344
|
function getTarget(target) {
|
|
@@ -10360,7 +10360,7 @@ var __webpack_modules__ = {
|
|
|
10360
10360
|
}
|
|
10361
10361
|
module.exports = insertBySelector;
|
|
10362
10362
|
},
|
|
10363
|
-
"./node_modules/@
|
|
10363
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js": function(module) {
|
|
10364
10364
|
"use strict";
|
|
10365
10365
|
function insertStyleElement(options) {
|
|
10366
10366
|
var element = document.createElement("style");
|
|
@@ -10370,7 +10370,7 @@ var __webpack_modules__ = {
|
|
|
10370
10370
|
}
|
|
10371
10371
|
module.exports = insertStyleElement;
|
|
10372
10372
|
},
|
|
10373
|
-
"./node_modules/@
|
|
10373
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
10374
10374
|
"use strict";
|
|
10375
10375
|
function setAttributesWithoutAttributes(styleElement) {
|
|
10376
10376
|
var nonce = __webpack_require__.nc;
|
|
@@ -10378,7 +10378,7 @@ var __webpack_modules__ = {
|
|
|
10378
10378
|
}
|
|
10379
10379
|
module.exports = setAttributesWithoutAttributes;
|
|
10380
10380
|
},
|
|
10381
|
-
"./node_modules/@
|
|
10381
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js": function(module) {
|
|
10382
10382
|
"use strict";
|
|
10383
10383
|
function apply(styleElement, options, obj) {
|
|
10384
10384
|
var css = "";
|
|
@@ -10415,7 +10415,7 @@ var __webpack_modules__ = {
|
|
|
10415
10415
|
}
|
|
10416
10416
|
module.exports = domAPI;
|
|
10417
10417
|
},
|
|
10418
|
-
"./node_modules/@
|
|
10418
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js": function(module) {
|
|
10419
10419
|
"use strict";
|
|
10420
10420
|
function styleTagTransform(css, styleElement) {
|
|
10421
10421
|
if (styleElement.styleSheet) styleElement.styleSheet.cssText = css;
|
|
@@ -10664,7 +10664,7 @@ var __webpack_exports__ = {};
|
|
|
10664
10664
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10665
10665
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10666
10666
|
var package_namespaceObject = {
|
|
10667
|
-
rE: "13.
|
|
10667
|
+
rE: "13.2.0"
|
|
10668
10668
|
};
|
|
10669
10669
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10670
10670
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13961,12 +13961,12 @@ var __webpack_exports__ = {};
|
|
|
13961
13961
|
else obj[key] = value;
|
|
13962
13962
|
return obj;
|
|
13963
13963
|
}
|
|
13964
|
-
class
|
|
13964
|
+
class HTTPVideomailError extends Error {
|
|
13965
13965
|
constructor(...args){
|
|
13966
13966
|
super(...args), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0);
|
|
13967
13967
|
}
|
|
13968
13968
|
}
|
|
13969
|
-
const
|
|
13969
|
+
const error_HTTPVideomailError = HTTPVideomailError;
|
|
13970
13970
|
function VideomailError_define_property(obj, key, value) {
|
|
13971
13971
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
13972
13972
|
value: value,
|
|
@@ -13977,7 +13977,7 @@ var __webpack_exports__ = {};
|
|
|
13977
13977
|
else obj[key] = value;
|
|
13978
13978
|
return obj;
|
|
13979
13979
|
}
|
|
13980
|
-
class VideomailError extends
|
|
13980
|
+
class VideomailError extends error_HTTPVideomailError {
|
|
13981
13981
|
hasClass(name) {
|
|
13982
13982
|
var _this_classList;
|
|
13983
13983
|
return null == (_this_classList = this.classList) ? void 0 : _this_classList.includes(name);
|
|
@@ -14292,25 +14292,25 @@ var __webpack_exports__ = {};
|
|
|
14292
14292
|
else obj[key] = value;
|
|
14293
14293
|
return obj;
|
|
14294
14294
|
}
|
|
14295
|
-
class
|
|
14295
|
+
class Despot {
|
|
14296
14296
|
emit(eventName, ...params) {
|
|
14297
14297
|
const firstParam = params[0];
|
|
14298
14298
|
const showParams = firstParam && ("object" != typeof firstParam || "object" == typeof firstParam && Object.keys(firstParam).filter(Boolean).length > 0);
|
|
14299
14299
|
if (showParams) this.options.logger.debug(`${this.name} emits ${eventName} with ${util_pretty(params)}`);
|
|
14300
14300
|
else this.options.logger.debug(`${this.name} emits ${eventName}`);
|
|
14301
14301
|
try {
|
|
14302
|
-
|
|
14302
|
+
Despot.EMITTER.emit(eventName, ...params);
|
|
14303
14303
|
} catch (exc) {
|
|
14304
|
-
if (exc instanceof error_VideomailError)
|
|
14304
|
+
if (exc instanceof error_VideomailError) Despot.EMITTER.emit("ERROR", {
|
|
14305
14305
|
err: exc
|
|
14306
14306
|
});
|
|
14307
|
-
else
|
|
14307
|
+
else Despot.EMITTER.emit("ERROR", {
|
|
14308
14308
|
exc
|
|
14309
14309
|
});
|
|
14310
14310
|
}
|
|
14311
14311
|
}
|
|
14312
14312
|
on(eventName, callback) {
|
|
14313
|
-
return
|
|
14313
|
+
return Despot.EMITTER.on(eventName, callback);
|
|
14314
14314
|
}
|
|
14315
14315
|
once(eventName, listener) {
|
|
14316
14316
|
const callback = (...params)=>{
|
|
@@ -14321,13 +14321,13 @@ var __webpack_exports__ = {};
|
|
|
14321
14321
|
return unbind;
|
|
14322
14322
|
}
|
|
14323
14323
|
static getListeners(eventName) {
|
|
14324
|
-
return
|
|
14324
|
+
return Despot.EMITTER.events[eventName];
|
|
14325
14325
|
}
|
|
14326
14326
|
static removeListener(eventName) {
|
|
14327
|
-
delete
|
|
14327
|
+
delete Despot.EMITTER.events[eventName];
|
|
14328
14328
|
}
|
|
14329
14329
|
static removeAllListeners() {
|
|
14330
|
-
|
|
14330
|
+
Despot.EMITTER.events = {};
|
|
14331
14331
|
}
|
|
14332
14332
|
constructor(name, options){
|
|
14333
14333
|
Despot_define_property(this, "name", void 0);
|
|
@@ -14336,8 +14336,13 @@ var __webpack_exports__ = {};
|
|
|
14336
14336
|
this.options = options;
|
|
14337
14337
|
}
|
|
14338
14338
|
}
|
|
14339
|
-
Despot_define_property(
|
|
14340
|
-
const
|
|
14339
|
+
Despot_define_property(Despot, "EMITTER", createNanoEvents());
|
|
14340
|
+
const util_Despot = Despot;
|
|
14341
|
+
function getValidity(element) {
|
|
14342
|
+
const validity = "validity" in element ? element.validity : void 0;
|
|
14343
|
+
return validity;
|
|
14344
|
+
}
|
|
14345
|
+
const util_getValidity = getValidity;
|
|
14341
14346
|
function hideElement(element) {
|
|
14342
14347
|
if (!element) return;
|
|
14343
14348
|
element.style.setProperty("display", "none", "important");
|
|
@@ -14401,7 +14406,7 @@ var __webpack_exports__ = {};
|
|
|
14401
14406
|
PUT: "put",
|
|
14402
14407
|
GET: "get"
|
|
14403
14408
|
};
|
|
14404
|
-
class Form extends
|
|
14409
|
+
class Form extends util_Despot {
|
|
14405
14410
|
getData() {
|
|
14406
14411
|
return getFormData(this.formElement, {
|
|
14407
14412
|
includeDisabled: true
|
|
@@ -14568,7 +14573,7 @@ var __webpack_exports__ = {};
|
|
|
14568
14573
|
unload() {
|
|
14569
14574
|
this.options.logger.debug("Form: unload()");
|
|
14570
14575
|
this.removeAllInputListeners();
|
|
14571
|
-
|
|
14576
|
+
util_Despot.removeAllListeners();
|
|
14572
14577
|
this.stopListeningToSubmitEvents();
|
|
14573
14578
|
this.resetForm();
|
|
14574
14579
|
}
|
|
@@ -14616,7 +14621,7 @@ var __webpack_exports__ = {};
|
|
|
14616
14621
|
getInvalidElement() {
|
|
14617
14622
|
const elements = this.getRegisteredFormElements();
|
|
14618
14623
|
for (const element of elements){
|
|
14619
|
-
const validity =
|
|
14624
|
+
const validity = util_getValidity(element);
|
|
14620
14625
|
if (!(null == validity ? void 0 : validity.valid)) return element;
|
|
14621
14626
|
}
|
|
14622
14627
|
return null;
|
|
@@ -14704,7 +14709,7 @@ var __webpack_exports__ = {};
|
|
|
14704
14709
|
if ("error" in body) {
|
|
14705
14710
|
const message = body.error.message;
|
|
14706
14711
|
const cause = body.error.cause;
|
|
14707
|
-
const error = new
|
|
14712
|
+
const error = new error_HTTPVideomailError(message, {
|
|
14708
14713
|
cause
|
|
14709
14714
|
});
|
|
14710
14715
|
if (body.error.name) error.name = body.error.name;
|
|
@@ -14817,6 +14822,7 @@ var __webpack_exports__ = {};
|
|
|
14817
14822
|
return resource_async_to_generator(function*() {
|
|
14818
14823
|
const newVideomail = this.applyDefaultValues(videomail);
|
|
14819
14824
|
newVideomail[constants.VERSION_LABEL] = package_namespaceObject.rE;
|
|
14825
|
+
newVideomail.recordLocation = window.location.href;
|
|
14820
14826
|
try {
|
|
14821
14827
|
let res;
|
|
14822
14828
|
if (this.options.callbacks.adjustFormDataBeforePosting) {
|
|
@@ -15015,7 +15021,7 @@ var __webpack_exports__ = {};
|
|
|
15015
15021
|
else obj[key] = value;
|
|
15016
15022
|
return obj;
|
|
15017
15023
|
}
|
|
15018
|
-
class
|
|
15024
|
+
class CollectLogger {
|
|
15019
15025
|
lifo(level, parameters) {
|
|
15020
15026
|
const line = parameters.join();
|
|
15021
15027
|
if (this.stack.length > this.options.logStackSize) this.stack.pop();
|
|
@@ -15054,37 +15060,37 @@ var __webpack_exports__ = {};
|
|
|
15054
15060
|
this.logger = options.logger;
|
|
15055
15061
|
}
|
|
15056
15062
|
}
|
|
15057
|
-
const
|
|
15063
|
+
const util_CollectLogger = CollectLogger;
|
|
15058
15064
|
var isTest_process = __webpack_require__("./node_modules/process/browser.js");
|
|
15059
15065
|
function isTest() {
|
|
15060
15066
|
return "test" === isTest_process.env.ENVIRON;
|
|
15061
15067
|
}
|
|
15062
15068
|
const util_isTest = isTest;
|
|
15063
|
-
function
|
|
15069
|
+
function mergeWithDefaultOptions(options = {}) {
|
|
15064
15070
|
const newOptions = cjs_default()(src_options, options, {
|
|
15065
15071
|
arrayMerge (_destination, source) {
|
|
15066
15072
|
return source;
|
|
15067
15073
|
}
|
|
15068
15074
|
});
|
|
15069
|
-
const collectLogger = new
|
|
15075
|
+
const collectLogger = new util_CollectLogger(newOptions);
|
|
15070
15076
|
newOptions.logger = collectLogger;
|
|
15071
15077
|
if (util_isTest()) newOptions.verbose = false;
|
|
15072
15078
|
return newOptions;
|
|
15073
15079
|
}
|
|
15074
|
-
const
|
|
15075
|
-
var injectStylesIntoStyleTag = __webpack_require__("./node_modules/@
|
|
15080
|
+
const options_mergeWithDefaultOptions = mergeWithDefaultOptions;
|
|
15081
|
+
var injectStylesIntoStyleTag = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js");
|
|
15076
15082
|
var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
|
|
15077
|
-
var styleDomAPI = __webpack_require__("./node_modules/@
|
|
15083
|
+
var styleDomAPI = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js");
|
|
15078
15084
|
var styleDomAPI_default = /*#__PURE__*/ __webpack_require__.n(styleDomAPI);
|
|
15079
|
-
var insertBySelector = __webpack_require__("./node_modules/@
|
|
15085
|
+
var insertBySelector = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js");
|
|
15080
15086
|
var insertBySelector_default = /*#__PURE__*/ __webpack_require__.n(insertBySelector);
|
|
15081
|
-
var setAttributesWithoutAttributes = __webpack_require__("./node_modules/@
|
|
15087
|
+
var setAttributesWithoutAttributes = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js");
|
|
15082
15088
|
var setAttributesWithoutAttributes_default = /*#__PURE__*/ __webpack_require__.n(setAttributesWithoutAttributes);
|
|
15083
|
-
var insertStyleElement = __webpack_require__("./node_modules/@
|
|
15089
|
+
var insertStyleElement = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js");
|
|
15084
15090
|
var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement);
|
|
15085
|
-
var styleTagTransform = __webpack_require__("./node_modules/@
|
|
15091
|
+
var styleTagTransform = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js");
|
|
15086
15092
|
var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform);
|
|
15087
|
-
var main = __webpack_require__("./node_modules/@
|
|
15093
|
+
var main = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[13].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[13].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[13].use[3]!./src/styles/main.styl");
|
|
15088
15094
|
var main_options = {};
|
|
15089
15095
|
main_options.styleTagTransform = styleTagTransform_default();
|
|
15090
15096
|
main_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
@@ -15105,7 +15111,7 @@ var __webpack_exports__ = {};
|
|
|
15105
15111
|
return limitedHeight;
|
|
15106
15112
|
}
|
|
15107
15113
|
const dimensions_limitHeight = limitHeight;
|
|
15108
|
-
function
|
|
15114
|
+
function getOuterWidth(element) {
|
|
15109
15115
|
let rect = element.getBoundingClientRect();
|
|
15110
15116
|
let outerWidth = rect.right - rect.left;
|
|
15111
15117
|
if (outerWidth < 1) {
|
|
@@ -15114,10 +15120,10 @@ var __webpack_exports__ = {};
|
|
|
15114
15120
|
}
|
|
15115
15121
|
return outerWidth;
|
|
15116
15122
|
}
|
|
15117
|
-
const
|
|
15123
|
+
const dimensions_getOuterWidth = getOuterWidth;
|
|
15118
15124
|
function limitWidth(element, options, width) {
|
|
15119
15125
|
let limitedWidth;
|
|
15120
|
-
const outerWidth =
|
|
15126
|
+
const outerWidth = dimensions_getOuterWidth(element);
|
|
15121
15127
|
limitedWidth = width && "number" == typeof width ? outerWidth > 0 && outerWidth < width ? outerWidth : width : outerWidth;
|
|
15122
15128
|
if (Number.isInteger(limitedWidth) && limitedWidth < 1) throw error_createError({
|
|
15123
15129
|
message: "Limited width cannot be less than 1!",
|
|
@@ -15163,7 +15169,7 @@ var __webpack_exports__ = {};
|
|
|
15163
15169
|
else obj[key] = value;
|
|
15164
15170
|
return obj;
|
|
15165
15171
|
}
|
|
15166
|
-
class Buttons extends
|
|
15172
|
+
class Buttons extends util_Despot {
|
|
15167
15173
|
replaceClickHandler(element, clickHandler) {
|
|
15168
15174
|
const wrappedClickHandler = (ev)=>{
|
|
15169
15175
|
ev.preventDefault();
|
|
@@ -15537,7 +15543,7 @@ var __webpack_exports__ = {};
|
|
|
15537
15543
|
if (this.built) {
|
|
15538
15544
|
this.reset();
|
|
15539
15545
|
this.options.logger.debug("Buttons: unload()");
|
|
15540
|
-
|
|
15546
|
+
util_Despot.removeAllListeners();
|
|
15541
15547
|
this.hide();
|
|
15542
15548
|
this.built = false;
|
|
15543
15549
|
}
|
|
@@ -15567,12 +15573,12 @@ var __webpack_exports__ = {};
|
|
|
15567
15573
|
}
|
|
15568
15574
|
}
|
|
15569
15575
|
const buttons = Buttons;
|
|
15570
|
-
function
|
|
15576
|
+
function isHidden(element) {
|
|
15571
15577
|
if (!element) return true;
|
|
15572
15578
|
const display = element.style.getPropertyValue("display");
|
|
15573
15579
|
return display.includes("none");
|
|
15574
15580
|
}
|
|
15575
|
-
const
|
|
15581
|
+
const html_isHidden = isHidden;
|
|
15576
15582
|
function countdown_define_property(obj, key, value) {
|
|
15577
15583
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
15578
15584
|
value: value,
|
|
@@ -15663,7 +15669,7 @@ var __webpack_exports__ = {};
|
|
|
15663
15669
|
else obj[key] = value;
|
|
15664
15670
|
return obj;
|
|
15665
15671
|
}
|
|
15666
|
-
class FacingMode extends
|
|
15672
|
+
class FacingMode extends util_Despot {
|
|
15667
15673
|
initEvents() {
|
|
15668
15674
|
this.on("ERROR", ()=>{
|
|
15669
15675
|
this.hide();
|
|
@@ -15958,7 +15964,7 @@ var __webpack_exports__ = {};
|
|
|
15958
15964
|
else obj[key] = value;
|
|
15959
15965
|
return obj;
|
|
15960
15966
|
}
|
|
15961
|
-
class RecorderInsides extends
|
|
15967
|
+
class RecorderInsides extends util_Despot {
|
|
15962
15968
|
startRecording() {
|
|
15963
15969
|
this.recordTimer.start();
|
|
15964
15970
|
}
|
|
@@ -16074,7 +16080,7 @@ var __webpack_exports__ = {};
|
|
|
16074
16080
|
return obj;
|
|
16075
16081
|
}
|
|
16076
16082
|
const NOTIFIER_MESSAGE_ID = "notifierMessage";
|
|
16077
|
-
class Notifier extends
|
|
16083
|
+
class Notifier extends util_Despot {
|
|
16078
16084
|
onStopping(limitReached = false) {
|
|
16079
16085
|
let lead = "";
|
|
16080
16086
|
this.visuals.beginWaiting();
|
|
@@ -16248,7 +16254,7 @@ var __webpack_exports__ = {};
|
|
|
16248
16254
|
}
|
|
16249
16255
|
isVisible() {
|
|
16250
16256
|
if (!this.built) return false;
|
|
16251
|
-
return this.notifyElement && !
|
|
16257
|
+
return this.notifyElement && !html_isHidden(this.notifyElement);
|
|
16252
16258
|
}
|
|
16253
16259
|
isBuilt() {
|
|
16254
16260
|
return this.built;
|
|
@@ -16376,7 +16382,7 @@ var __webpack_exports__ = {};
|
|
|
16376
16382
|
return minHeight;
|
|
16377
16383
|
}
|
|
16378
16384
|
const dimensions_figureMinHeight = figureMinHeight;
|
|
16379
|
-
function
|
|
16385
|
+
function getRatio(options, videoHeight, videoWidth) {
|
|
16380
16386
|
let ratio = 1;
|
|
16381
16387
|
const hasVideoDimensions = videoHeight && videoWidth;
|
|
16382
16388
|
const desiredHeight = options.video.height;
|
|
@@ -16386,7 +16392,7 @@ var __webpack_exports__ = {};
|
|
|
16386
16392
|
else if (hasVideoDimensions) ratio = videoHeight / videoWidth;
|
|
16387
16393
|
return ratio;
|
|
16388
16394
|
}
|
|
16389
|
-
const
|
|
16395
|
+
const dimensions_getRatio = getRatio;
|
|
16390
16396
|
function calculateHeight(responsive, videoWidth, options, target, ratio, element) {
|
|
16391
16397
|
let width = videoWidth;
|
|
16392
16398
|
if (width < 1) throw error_createError({
|
|
@@ -16394,7 +16400,7 @@ var __webpack_exports__ = {};
|
|
|
16394
16400
|
options
|
|
16395
16401
|
});
|
|
16396
16402
|
if (responsive && element) width = dimensions_limitWidth(element, options, width);
|
|
16397
|
-
const chosenRatio = null != ratio ? ratio :
|
|
16403
|
+
const chosenRatio = null != ratio ? ratio : dimensions_getRatio(options, void 0, videoWidth);
|
|
16398
16404
|
const height = Math.round(width * chosenRatio);
|
|
16399
16405
|
if (Number.isInteger(height) && height < 1) throw error_createError({
|
|
16400
16406
|
message: "Just calculated a height less than 1 which is wrong.",
|
|
@@ -16410,7 +16416,7 @@ var __webpack_exports__ = {};
|
|
|
16410
16416
|
message: `Height ${height} cannot be smaller than 1 when calculating width.`,
|
|
16411
16417
|
options
|
|
16412
16418
|
});
|
|
16413
|
-
const chosenRatio = null != ratio ? ratio :
|
|
16419
|
+
const chosenRatio = null != ratio ? ratio : dimensions_getRatio(options, videoHeight);
|
|
16414
16420
|
const calculatedWidth = Math.round(height / chosenRatio);
|
|
16415
16421
|
if (calculatedWidth < 1) throw error_createError({
|
|
16416
16422
|
message: "Calculated width cannot be smaller than 1!",
|
|
@@ -16446,7 +16452,7 @@ var __webpack_exports__ = {};
|
|
|
16446
16452
|
function getAudioContextClass() {
|
|
16447
16453
|
return window.AudioContext;
|
|
16448
16454
|
}
|
|
16449
|
-
class
|
|
16455
|
+
class AudioRecorder {
|
|
16450
16456
|
hasAudioContext() {
|
|
16451
16457
|
return Boolean(getAudioContextClass()) && Boolean(this.getAudioContext());
|
|
16452
16458
|
}
|
|
@@ -16526,7 +16532,7 @@ var __webpack_exports__ = {};
|
|
|
16526
16532
|
this.userMedia = userMedia;
|
|
16527
16533
|
}
|
|
16528
16534
|
}
|
|
16529
|
-
const
|
|
16535
|
+
const media_AudioRecorder = AudioRecorder;
|
|
16530
16536
|
function getFirstVideoTrack(localMediaStream) {
|
|
16531
16537
|
const videoTracks = localMediaStream.getVideoTracks();
|
|
16532
16538
|
let videoTrack;
|
|
@@ -16566,7 +16572,7 @@ var __webpack_exports__ = {};
|
|
|
16566
16572
|
return obj;
|
|
16567
16573
|
}
|
|
16568
16574
|
const EVENT_ASCII = "|—O—|";
|
|
16569
|
-
class UserMedia extends
|
|
16575
|
+
class UserMedia extends util_Despot {
|
|
16570
16576
|
attachMediaStream(stream) {
|
|
16571
16577
|
this.currentVisualStream = stream;
|
|
16572
16578
|
if (this.rawVisualUserMedia) this.rawVisualUserMedia.srcObject = stream;
|
|
@@ -16614,7 +16620,7 @@ var __webpack_exports__ = {};
|
|
|
16614
16620
|
}
|
|
16615
16621
|
audioRecord(audioCallback) {
|
|
16616
16622
|
var _this_audioRecorder;
|
|
16617
|
-
|
|
16623
|
+
util_Despot.removeListener("SENDING_FIRST_FRAME");
|
|
16618
16624
|
null == (_this_audioRecorder = this.audioRecorder) || _this_audioRecorder.record(audioCallback);
|
|
16619
16625
|
}
|
|
16620
16626
|
init(localMediaStream, videoCallback, audioCallback, endedEarlyCallback, switchingFacingMode) {
|
|
@@ -16625,12 +16631,12 @@ var __webpack_exports__ = {};
|
|
|
16625
16631
|
this.onPlayReached = false;
|
|
16626
16632
|
this.onLoadedMetaDataReached = false;
|
|
16627
16633
|
this.playingPromiseReached = false;
|
|
16628
|
-
if (isAudioEnabled(this.options)) null != this.audioRecorder || (this.audioRecorder = new
|
|
16634
|
+
if (isAudioEnabled(this.options)) null != this.audioRecorder || (this.audioRecorder = new media_AudioRecorder(this, this.options));
|
|
16629
16635
|
const unloadAllEventListeners = ()=>{
|
|
16630
16636
|
var _this_rawVisualUserMedia, _this_rawVisualUserMedia1;
|
|
16631
16637
|
this.options.logger.debug("UserMedia: unloadAllEventListeners()");
|
|
16632
16638
|
this.unloadRemainingEventListeners();
|
|
16633
|
-
|
|
16639
|
+
util_Despot.removeListener("SENDING_FIRST_FRAME");
|
|
16634
16640
|
null == (_this_rawVisualUserMedia = this.rawVisualUserMedia) || _this_rawVisualUserMedia.removeEventListener("play", onPlay);
|
|
16635
16641
|
null == (_this_rawVisualUserMedia1 = this.rawVisualUserMedia) || _this_rawVisualUserMedia1.removeEventListener("loadedmetadata", onLoadedMetaData);
|
|
16636
16642
|
};
|
|
@@ -16873,7 +16879,7 @@ var __webpack_exports__ = {};
|
|
|
16873
16879
|
return obj;
|
|
16874
16880
|
}
|
|
16875
16881
|
const PIPE_SYMBOL = "°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ";
|
|
16876
|
-
class Recorder extends
|
|
16882
|
+
class Recorder extends util_Despot {
|
|
16877
16883
|
writeStream(buffer, opts) {
|
|
16878
16884
|
if (this.stream) if (this.stream.destroyed) {
|
|
16879
16885
|
this.stopPings();
|
|
@@ -17145,7 +17151,7 @@ var __webpack_exports__ = {};
|
|
|
17145
17151
|
this.clearUserMediaTimeout();
|
|
17146
17152
|
const characteristics = null == (_this_userMedia = this.userMedia) ? void 0 : _this_userMedia.getCharacteristics();
|
|
17147
17153
|
this.options.logger.debug(`Recorder: userMediaErrorCallback(), name: ${err.name}, message: ${err.message} and Webcam characteristics: ${characteristics ? util_pretty(characteristics) : "none"}`);
|
|
17148
|
-
const errorListeners =
|
|
17154
|
+
const errorListeners = util_Despot.getListeners("ERROR");
|
|
17149
17155
|
if (null == errorListeners ? void 0 : errorListeners.length) {
|
|
17150
17156
|
if (err.name !== error_VideomailError.MEDIA_DEVICE_NOT_SUPPORTED) {
|
|
17151
17157
|
const videomailError = error_createError({
|
|
@@ -17248,7 +17254,7 @@ var __webpack_exports__ = {};
|
|
|
17248
17254
|
this.clearUserMediaTimeout();
|
|
17249
17255
|
this.options.logger.debug("Recorder: failed to load genuine user media");
|
|
17250
17256
|
this.userMediaLoading = false;
|
|
17251
|
-
const errorListeners =
|
|
17257
|
+
const errorListeners = util_Despot.getListeners("ERROR");
|
|
17252
17258
|
if (null == errorListeners ? void 0 : errorListeners.length) this.emit("ERROR", {
|
|
17253
17259
|
exc
|
|
17254
17260
|
});
|
|
@@ -17322,7 +17328,7 @@ var __webpack_exports__ = {};
|
|
|
17322
17328
|
return this.visuals.isNotifying();
|
|
17323
17329
|
}
|
|
17324
17330
|
isHidden() {
|
|
17325
|
-
return !this.recorderElement ||
|
|
17331
|
+
return !this.recorderElement || html_isHidden(this.recorderElement);
|
|
17326
17332
|
}
|
|
17327
17333
|
writeCommand(command, args, cb) {
|
|
17328
17334
|
if (this.connected) {
|
|
@@ -17751,7 +17757,7 @@ var __webpack_exports__ = {};
|
|
|
17751
17757
|
const userMediaVideoHeight = this.userMedia.getVideoHeight();
|
|
17752
17758
|
if (!userMediaVideoWidth || userMediaVideoWidth < 1) ratio = this.visuals.getRatio();
|
|
17753
17759
|
else if (userMediaVideoHeight) ratio = userMediaVideoHeight / userMediaVideoWidth;
|
|
17754
|
-
} else ratio =
|
|
17760
|
+
} else ratio = dimensions_getRatio(this.options);
|
|
17755
17761
|
return ratio;
|
|
17756
17762
|
}
|
|
17757
17763
|
calculateWidth(responsive) {
|
|
@@ -17808,7 +17814,7 @@ var __webpack_exports__ = {};
|
|
|
17808
17814
|
else obj[key] = value;
|
|
17809
17815
|
return obj;
|
|
17810
17816
|
}
|
|
17811
|
-
class Replay extends
|
|
17817
|
+
class Replay extends util_Despot {
|
|
17812
17818
|
buildElement(replayParentElement) {
|
|
17813
17819
|
const videoSelector = `video.${this.options.selectors.replayClass}`;
|
|
17814
17820
|
this.replayElement = replayParentElement.querySelector(videoSelector);
|
|
@@ -17957,7 +17963,7 @@ var __webpack_exports__ = {};
|
|
|
17957
17963
|
}
|
|
17958
17964
|
unload(params) {
|
|
17959
17965
|
this.options.logger.debug("Replay: unload()");
|
|
17960
|
-
|
|
17966
|
+
util_Despot.removeAllListeners();
|
|
17961
17967
|
if (null == params ? void 0 : params.startingOver) this.hide();
|
|
17962
17968
|
else {
|
|
17963
17969
|
var _this_replayElement;
|
|
@@ -18053,7 +18059,7 @@ var __webpack_exports__ = {};
|
|
|
18053
18059
|
}
|
|
18054
18060
|
isShown() {
|
|
18055
18061
|
if (!this.replayElement) return false;
|
|
18056
|
-
return !
|
|
18062
|
+
return !html_isHidden(this.replayElement) && !this.visuals.isHidden();
|
|
18057
18063
|
}
|
|
18058
18064
|
getVisuals() {
|
|
18059
18065
|
return this.visuals;
|
|
@@ -18077,7 +18083,7 @@ var __webpack_exports__ = {};
|
|
|
18077
18083
|
else obj[key] = value;
|
|
18078
18084
|
return obj;
|
|
18079
18085
|
}
|
|
18080
|
-
class Visuals extends
|
|
18086
|
+
class Visuals extends util_Despot {
|
|
18081
18087
|
buildNoScriptTag() {
|
|
18082
18088
|
let noScriptElement = this.container.querySelector("noscript");
|
|
18083
18089
|
if (noScriptElement) {
|
|
@@ -18266,7 +18272,7 @@ var __webpack_exports__ = {};
|
|
|
18266
18272
|
}
|
|
18267
18273
|
isHidden() {
|
|
18268
18274
|
if (!this.built) return true;
|
|
18269
|
-
return
|
|
18275
|
+
return html_isHidden(this.visualsElement);
|
|
18270
18276
|
}
|
|
18271
18277
|
showVisuals() {
|
|
18272
18278
|
html_showElement(this.visualsElement);
|
|
@@ -18388,7 +18394,7 @@ var __webpack_exports__ = {};
|
|
|
18388
18394
|
else obj[key] = value;
|
|
18389
18395
|
return obj;
|
|
18390
18396
|
}
|
|
18391
|
-
class Container extends
|
|
18397
|
+
class Container extends util_Despot {
|
|
18392
18398
|
buildChildren(playerOnly = false, parentElement) {
|
|
18393
18399
|
const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
|
|
18394
18400
|
this.options.logger.debug(`Container: buildChildren (playerOnly = ${playerOnly}${parentElementInfo})`);
|
|
@@ -18434,8 +18440,9 @@ var __webpack_exports__ = {};
|
|
|
18434
18440
|
return this.containerElement.closest("form");
|
|
18435
18441
|
}
|
|
18436
18442
|
getFormElement() {
|
|
18443
|
+
var _this_containerElement;
|
|
18437
18444
|
let formElement;
|
|
18438
|
-
if (this.containerElement
|
|
18445
|
+
if ((null == (_this_containerElement = this.containerElement) ? void 0 : _this_containerElement.tagName) === "FORM") formElement = this.containerElement;
|
|
18439
18446
|
else if (this.options.selectors.formId) {
|
|
18440
18447
|
formElement = document.querySelector(`#${this.options.selectors.formId}`);
|
|
18441
18448
|
if (formElement && "FORM" !== formElement.tagName) throw new Error(`HTML element with ID ${this.options.selectors.formId} is not a form.`);
|
|
@@ -18597,7 +18604,7 @@ var __webpack_exports__ = {};
|
|
|
18597
18604
|
exc
|
|
18598
18605
|
});
|
|
18599
18606
|
} finally{
|
|
18600
|
-
|
|
18607
|
+
util_Despot.removeAllListeners();
|
|
18601
18608
|
this.built = this.submitted = false;
|
|
18602
18609
|
}
|
|
18603
18610
|
}
|
|
@@ -18697,8 +18704,10 @@ var __webpack_exports__ = {};
|
|
|
18697
18704
|
const invalidInput = this.form.getInvalidElement();
|
|
18698
18705
|
if (invalidInput) {
|
|
18699
18706
|
const name = invalidInput.getAttribute("name");
|
|
18707
|
+
const validity = util_getValidity(invalidInput);
|
|
18700
18708
|
valid = false;
|
|
18701
|
-
if (name) {
|
|
18709
|
+
if (name) if (null == validity ? void 0 : validity.valueMissing) whyInvalid = `Please fill out field "${name}" ⚠️`;
|
|
18710
|
+
else {
|
|
18702
18711
|
whyInvalid = `Input "${name}" seems wrong 🤔`;
|
|
18703
18712
|
invalidData = {
|
|
18704
18713
|
[name]: invalidInput.getAttribute("value")
|
|
@@ -18915,7 +18924,7 @@ var __webpack_exports__ = {};
|
|
|
18915
18924
|
else obj[key] = value;
|
|
18916
18925
|
return obj;
|
|
18917
18926
|
}
|
|
18918
|
-
class VideomailClient extends
|
|
18927
|
+
class VideomailClient extends util_Despot {
|
|
18919
18928
|
validateOptions() {
|
|
18920
18929
|
const width = this.options.video.width;
|
|
18921
18930
|
if (void 0 !== width && width % 2 !== 0) throw error_createError({
|
|
@@ -18998,9 +19007,9 @@ var __webpack_exports__ = {};
|
|
|
18998
19007
|
if (this.options.logger.getLines) return this.options.logger.getLines();
|
|
18999
19008
|
}
|
|
19000
19009
|
constructor(options = {}){
|
|
19001
|
-
super("VideomailClient",
|
|
19010
|
+
super("VideomailClient", options_mergeWithDefaultOptions(options)), client_define_property(this, "container", void 0);
|
|
19002
19011
|
this.validateOptions();
|
|
19003
|
-
|
|
19012
|
+
util_Despot.removeAllListeners();
|
|
19004
19013
|
this.container = new wrappers_container(this.options);
|
|
19005
19014
|
}
|
|
19006
19015
|
}
|